b388addf9c8ba4bc2852132727bd9df68c99db7ca97d22fdb18ad2a426d02a5b

Source Code:

/*! amazon-dtb-javascript-api - apstag - v7.50.00 - 2020-05-11 18:07:55 */
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=22)}([function(t,e,n){"use strict";n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return f})),n.d(e,"a",(function(){return b}));var r=n(1),o=n(8),i=n(2),c=n(4),a=n(6),u=Object(r.n)(10),s=[];function d(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];try{(n||Object(c.d)("errors"))&&console.error(t);var r={ts:Date.now(),url:encodeURIComponent(Object(a.f)(window)),r:encodeURIComponent(Object(a.g)(window)),_type:"apsLibraryError",e:{et:t.name,el:e,msg:t.message}};return s.push(r),i.a.dispatch({type:"LOG_ERROR",error:r}),!!u&&(Object(o.b)(r),!0)}catch(t){console.error(t)}return!1}function l(t,e,n){var r=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];return d({name:e,message:"".concat(t," was of type '").concat(e,"' instead of '").concat(n,"'")},"TypeError-".concat(t),r)}function f(t,e){return function(){try{return t.apply(null,arguments)}catch(t){return d(t,e,!0),null}}}function b(t){(1<arguments.length&&void 0!==arguments[1]&&arguments[1]||Object(c.d)("errors"))&&console.warn(t)}!0===Object(c.c)("exposeErrors")&&(window.apstagErrors=s)},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){try{var e=parseInt(t,10);if(!isNaN(e))return!(e<=0)&&(100<=e||100*Math.random()<=e)}catch(t){}return!1}function i(t,e){var n=parseInt(e,10),r=[],o=0;if(!s(t))return r;if(isNaN(n)||n<1)return[t];for(var i=t.length;o<i;){var c=o;o+=n,r.push(t.slice(c,o))}return r}function c(){return"".concat(Math.round(1e12*Math.random())).concat(Date.now())}function a(t){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=new Array(t),r=0;r<t;r++)n[r]=e[Math.floor(Math.random()*e.length)];return n.join("")}function u(t){return"object"===r(t)&&null!==t}function s(t){return"[object Array]"===Object.prototype.toString.call(t)}function d(t,e){return u(t)&&void 0!==t[e]&&""!==t[e]}function l(){var t="amzn_lsTest";try{return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}function f(t,e){return-1!==t.indexOf(e)}function b(){return document.cookie.split("; ").map((function(t){return t.split("=")}))}function p(t){var e=new Date;return e.setDate(e.getDate()+t),e.toUTCString()}function g(t){try{var e=t.innerWidth||t.document.documentElement.clientWidth||t.document.body.clientWidth,n=t.innerHeight||t.document.documentElement.clientHeight||t.document.body.clientHeight;return"".concat(e,"x").concat(n)}catch(t){}return"x"}function m(t,e){return decodeURIComponent(t).split("?")[0].split("#")[0]===decodeURIComponent(e).split("?")[0].split("#")[0]}function y(t){var e=Object.keys(t);return e.filter((function(e){return t[e]})).length===e.length}n.d(e,"n",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return a})),n.d(e,"l",(function(){return u})),n.d(e,"k",(function(){return s})),n.d(e,"m",(function(){return d})),n.d(e,"i",(function(){return l})),n.d(e,"j",(function(){return f})),n.d(e,"d",(function(){return b})),n.d(e,"g",(function(){return p})),n.d(e,"h",(function(){return g})),n.d(e,"b",(function(){return m})),n.d(e,"a",(function(){return y}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var r,o=n(3),i=n(1),c=n(4);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{AAXReqs:[],aaxViewabilityEnabled:!1,bidConfigs:{},bidReqs:{},bsPixels:{},cfg:{v:-1,CSM_JS:"//c.amazon-adsystem.com/aax2/csm.js.gz",CSM_RTB_COMMUNICATOR_JS:"//c.amazon-adsystem.com/bao-csm/aps-comm/aps_csm.js",DEBUG_APP_HTML:"//c.amazon-adsystem.com/aax2/debugApp.html",DEBUG_APP_HTML_V2:"//c.amazon-adsystem.com/aax2/debug_app_v2.html",DEFAULT_TIMEOUT:2e3,DTB_PATH:"/e/dtb",TEST_PATH_FREQUENCY:0,TEST_BID_ENDPOINT:null,TEST_PATH_LATENCY_SAMPLE_RATE:null,PIXEL_PATH:"/x/px/",LATENCY_SAMPLING_RATE:1,COOKIE_MATCH_DELAY:0,MAX_SLOTS_PER_REQUEST:1,CF_ROUTING_RATE:100,SLOT_RENDER_SAMPLING_RATE:1},cmpFired:!1,config:{pubID:""},displayAdServer:{noBidSlotIDs:[],shouldSampleRender:!1,slotRenderEndedSet:!1},errors:[],eventLog:[],experiments:{},gamSlotFetchLog:[],gamSlotRenderPixel:{aaxReqOffset:0,gamSlotFetchLogOffset:0},gdpr:null,gdprQue:[],hosts:{DEFAULT_AAX_BID_HOST:"aax.amazon-adsystem.com",DEFAULT_AAX_PIXEL_HOST:"aax.amazon-adsystem.com"},Q:[],slotBids:{},slotIdMap:[],sync917:!1,targetingKeys:{}},e=1<arguments.length?arguments[1]:void 0;return{AAXReqs:function(t,e){switch(e.type){case"RECORD_AAX_REQUEST":return[].concat(d(t),[e.data]);case"RECORD_AAX_REQ_PROP":return t.map((function(t){return(t=u({},t)).bidReqID===e.bidReqID&&(t[e.key]=e.value),t}));default:return d(t)}}(t.AAXReqs,e),aaxViewabilityEnabled:function(t,e){switch(e.type){case"SET_VIEWABILITY":return e.viewability;default:return t}}(t.aaxViewabilityEnabled,e),bidConfigs:function(t,e){switch(e.type){case"RECORD_ORIGINAL_BID_CONFIG":return u({},t,s({},e.bidConfig.bidReqID,e.bidConfig));default:return u({},t)}}(t.bidConfigs,e),bidReqs:function(t,e){var n;switch(e.type){case"ADD_CHUNKED_REQUESTS":return u({},t,s({},e.fid,u({},t[e.fid],{networkReqs:new Array(e.numChunks)})));case"NEW_FETCH_BID_REQUEST":return u({},t,s({},e.fid,{pto:e.pto,hasCallbackExecuted:!1,networkReqs:[]}));case"RECORD_CALLBACK":return u({},t,s({},e.fid,u({},t[e.fid],{hasCallbackExecuted:!0})));case"RECORD_NETWORK_EXCHANGE":var r=t[e.fid].networkReqs;return r[e.networkID]=u({},r[e.networkID],(s(n={},"".concat(e.exchangeType,"Time"),e.timestamp),s(n,"inFlight","request"===e.exchangeType),n)),u({},t,s({},e.fid,u({},t[e.fid],{networkReqs:r})));case"RECORD_TIMEOUT":return u({},t,s({},e.fid,u({},t[e.fid],{networkReqs:t[e.fid].networkReqs.map((function(t){return t.inFlight?u({},t,{timeOut:e.timeOut}):t}))})));default:return u({},t)}}(t.bidReqs,e),bsPixels:function(t,e){switch(e.type){case"RECORD_BID_INFO_SENT":return u({},t,s({},e.bidInfo.iid,e.bidInfo.state));default:return u({},t)}}(t.bsPixels,e),cfg:function(t,e){switch(e.type){case"SET_CFG":return u({},t,{},e.cfg);default:return u({},t)}}(t.cfg,e),cmpFired:function(t,e){switch(e.type){case"CMP_FIRED":return!0;default:return t}}(t.cmpFired,e),config:function(t,e){switch(e.type){case"SET_CONFIG":return u({},e.config,{gdpr:u({cmpTimeout:e.defaultCmpTimeout},e.config.gdpr),isSelfServePub:void 0!==e.config.pubID&&5<=e.config.pubID.length});default:return u({},t)}}(t.config,e),displayAdServer:function(t,e){switch(e.type){case"SLOT_RENDER_ENDED_SET":return u({},t,{slotRenderEndedSet:!0});case"NO_BID_ON_ADSERVER_SLOTS":return u({},t,{noBidSlotIDs:t.noBidSlotIDs.concat(e.slotIDs)});case"REQUESTED_BID_FOR_ADSERVER_SLOTS":return u({},t,{noBidSlotIDs:t.noBidSlotIDs.filter((function(t){return!Object(i.j)(e.slotIDs,t)}))});case"SHOULD_SAMPLE_SLOT_RENDER":return u({},t,{shouldSampleRender:e.value});default:return u({},t,{noBidSlotIDs:d(t.noBidSlotIDs)})}}(t.displayAdServer,e),errors:function(t,e){switch(e.type){case"LOG_ERROR":return[].concat(d(t),[u({},e.error)]);default:return d(t)}}(t.errors,e),eventLog:function(t,e){switch(e.type){case"LOG_EVENT":return[].concat(d(t),[u({},e.event)]);default:return d(t)}}(t.eventLog,e),experiments:function(t,e){switch(e.type){case"SHOULD_CHUNK_REQUESTS":return u({chunkRequests:!0===t.shouldSampleLatency&&e.value},t);case"SHOULD_CF_ROUTE":return u({},t,{shouldCFRoute:e.value});case"SHOULD_SAMPLE_LATENCY":return u({},t,{shouldSampleLatency:e.value});case"SHOULD_USE_TEST_BID_ENDPOINT":return u({},t,{shouldUseTestBidEndpoint:e.value});default:return u({},t)}}(t.experiments,e),gamSlotFetchLog:function(t,e){switch(e.type){case"LOG_GAM_EVENT":return[].concat(d(t),[u({},e.event)]);default:return d(t)}}(t.gamSlotFetchLog,e),gamSlotRenderPixel:function(t,e){switch(e.type){case"UPDATE_RENDER_OFFSETS":return u({},t,{},e.offsets);default:return u({},t)}}(t.gamSlotRenderPixel,e),gdpr:function(t,e){switch(e.type){case"SET_GDPR_CONFIG":return null===e.config?null:u({},e.config);default:return null===t?t:u({},t)}}(t.gdpr,e),gdprQue:function(t,e){switch(e.type){case"ADD_GDPR_QUE_ITEM":return[].concat(d(t),[e.func]);case"CLEAR_GDPR_QUE":return[];default:return d(t)}}(t.gdprQue,e),hosts:function(t,e){switch(e.type){case"SET_HOST":return u({},t,s({},e.hostName,e.hostValue));default:return u({},t)}}(t.hosts,e),Q:function(t,e){switch(e.type){case"SET_Q":return d(e.Q);default:return d(t)}}(t.Q,e),slotBids:function(t,e){switch(e.type){case"BID_STATE_CHANGE":return u({},t,s({},e.slotID,t[e.slotID].map((function(t){return t._targetingSetID===e._targetingSetID&&(t.bidState=e.bidState,e.bidState===o.b.rendered?t.timing.renderTime=e.ts:e.bidState===o.b.set&&t.timing.setAtTimes.push(e.ts)),t}))));case"UPDATE_BID_INFO_PROP":return void 0===t[e.slotID]||t[e.slotID].filter((function(t){return t.matchesBidCacheId(e.iid)})).length<1?u({},t):u({},t,s({},e.slotID,t[e.slotID].map((function(t){return t.matchesBidCacheId(e.iid)&&(t[e.key]=e.value),t}))));case"UPDATE_SLOT_BIDS":return u({},t,{},e.bids.reduce((function(e,n){return Object(i.m)(e,n.slotID)?e[n.slotID]=[].concat(d(e[n.slotID]),[n]):Object(i.m)(t,n.slotID)?e[n.slotID]=[].concat(d(t[n.slotID]),[n]):e[n.slotID]=[n],e}),{}));default:return u({},t)}}(t.slotBids,e),slotIdMap:function(t,e){switch(e.type){case"ADD_SLOT_ID":return-1===t.indexOf(e.slotID)?[].concat(d(t),[e.slotID]):t;default:return t}}(t.slotIdMap,e),sync917:function(t,e){switch(e.type){case"SET_SYNC_917":return e.value;default:return t}}(t.sync917,e),targetingKeys:function(t,e){switch(e.type){case"UPDATE_SLOT_BIDS":return u({},t,{},e.bids.reduce((function(e,n){return Object(i.m)(t,n.slotID)?e[n.slotID]=[].concat(d(t[n.slotID]),d((n.bidConfig.targeting?n.bidConfig.targeting:o.g).filter((function(e){return-1===t[n.slotID].indexOf(e)})))):e[n.slotID]=n.bidConfig.targeting?n.bidConfig.targeting:o.g,e}),{}));default:return u({},t)}}(t.targetingKeys,e)}}var b={getState:function(){return r},dispatch:function(t){r=f(r,t)}};Object(c.d)("redux")&&Object(i.i)()&&Object(i.m)(window,"__REDUX_DEVTOOLS_EXTENSION__")&&(b=window.__REDUX_DEVTOOLS_EXTENSION__(f)),b.dispatch({type:"NOOP"})},function(t,e,n){"use strict";n.d(e,"g",(function(){return i})),n.d(e,"u",(function(){return c})),n.d(e,"b",(function(){return r})),n.d(e,"f",(function(){return d})),n.d(e,"t",(function(){return l})),n.d(e,"d",(function(){return f})),n.d(e,"e",(function(){return b})),n.d(e,"c",(function(){return p})),n.d(e,"n",(function(){return g})),n.d(e,"l",(function(){return m})),n.d(e,"m",(function(){return a})),n.d(e,"k",(function(){return s})),n.d(e,"s",(function(){return S})),n.d(e,"h",(function(){return y})),n.d(e,"r",(function(){return O})),n.d(e,"q",(function(){return v})),n.d(e,"j",(function(){return _})),n.d(e,"p",(function(){return w})),n.d(e,"i",(function(){return D})),n.d(e,"a",(function(){return E})),n.d(e,"o",(function(){return I}));var r,o,i=["amznbid","amzniid","amznsz","amznp"],c=["amznbid","amzniid","amznp","r_amznbid","r_amzniid","r_amznp"];(o=r=r||{}).new="NEW",o.exposed="EXPOSED",o.set="SET",o.rendered="RENDERED";var a,u,s,d="apstagDebug",l=["redux","fake_bids","verbose","console","console_v2","errors"],f="apstagDebugHeight",b="apstagDEBUG",p="apstagCfg",g=0,m=0;(u=a=a||{}).amznbid="testBid",u.amzniid="testImpression",u.amznp="testP",u.crid="testCrid",(s||(s={})).video="v";var y,h,O,j,S=["amznbid","amznp"];(h=y=y||{}).__apsid="ck",h.__aps_id_p="ckp",h.aps_ext_917="st",(j=O=O||{}).noRequest="0",j.bidInFlight="1",j.noBid="2";var v="600",_="7.50.00",w="https://",D="function"==typeof XMLHttpRequest&&void 0!==(new XMLHttpRequest).withCredentials,E="apstagLOADED",I=13},function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return m})),n.d(e,"d",(function(){return w})),n.d(e,"c",(function(){return E})),n.d(e,"e",(function(){return T}));var r=n(2),o=n(1),i=n(3),c=n(9),a=n(8),u=n(0),s=["getLog","getState"];function d(t,e,n){try{switch(Object(o.j)(s,t)&&(Object(u.b)(new Error("Debug call made: ".concat(t)),"debugPublicApi-call-".concat(t)),s=s.filter((function(e){return e!==t}))),t){case"getLog":return r.a.getState().eventLog;case"getState":return r.a.getState();case"enable":return D("fake_bids",!0),"DEBUG MODE ENABLED";case"disable":return D("fake_bids",!1),"DEBUG MODE DISABLED";case"enableConsole":return m(!1,"command"),"Debug console enabled";case"enableConsoleV2":return m(!0,"command"),"Debug console v2 enabled";case"disableConsole":return function(){try{D("console",!1),D("console_v2",!1),null!==l&&document.body.removeChild(l),g=!1,Object(o.i)()&&window.localStorage.removeItem(i.d)}catch(t){Object(u.b)(t,"disableDebugConsole",!0)}}(),"Debug console disabled";case"setDebug":return D(e,n)?"Set debug mode '".concat(e,"' to '").concat(n,"'"):"Failed to set debug mode '".concat(e,"' to '").concat(n,"'");default:return"unknown debug argument"}}catch(e){return Object(u.b)(e,"debugPublicApi",!0),"error"}}var l,f,b,p,g=!1;function m(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=1<arguments.length?arguments[1]:void 0;try{if(D(t?"console_v2":"console",!0),g)return;var n={url:t?r.a.getState().cfg.DEBUG_APP_HTML_V2:r.a.getState().cfg.DEBUG_APP_HTML,onload:y,onerror:function(){return Object(u.b)(new Error("Error Loading Debug Console"),"enableDebugConsole-".concat(t?"v2":"v1","-onerror"),!0)}};Object(c.d)(n),setTimeout((function(){try{var n={_type:"debugLoad",mode:t?2:1};Object(o.m)(r.a.getState().config,"pubID")&&(n.src=r.a.getState().config.pubID),null!==e&&(n.method=e),Object(a.b)(n)}catch(n){Object(u.b)(n,"enableDebugConsole-setTimeout",!0)}}),5e3)}catch(n){Object(u.b)(n,"enableDebugConsole",!0)}}function y(t){try{var e=t.responseText;l=document.createElement("div"),f=document.createElement("div"),b=document.createElement("iframe");var n=200;w("console_v2")&&(n=330),Object(o.i)()&&null!==window.localStorage.getItem(i.d)&&(n=parseInt(window.localStorage.getItem(i.d),10)),(isNaN(n)||n>window.innerHeight)&&(n=200),l.style.background="#eaeded",l.style.zIndex="2147483647",l.style.bottom="0",l.style.position="fixed !important",l.style.display="block !important",l.style.left="0",l.style.right="0",l.style.height="".concat(n,"px"),f.style.cursor="row-resize",f.style.height="2px",f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.right="0",f.style.backgroundColor="RGBA(0,0,0,0)",l.appendChild(f),b.frameBorder="0",b.marginHeight="0",b.marginWidth="0",b.scrolling="no",b.id="apstag-debug-iframe",b.src="about:blank",b.style.display="block",b.style.width="100%",b.style.height="".concat(n,"px"),l.appendChild(b),document.body.appendChild(l),null!==b.contentDocument&&(b.contentDocument.open(),b.contentDocument.write(e),b.contentDocument.close()),f.addEventListener("mousedown",j)}catch(t){Object(u.b)(t,"renderDebugConsole",!0)}}function h(t){try{var e=window.innerHeight-t.clientY;return e<200&&(e=200),l.style.height="".concat(e,"px"),b.style.height="".concat(e,"px"),e}catch(t){return Object(u.b)(t,"resizeDebugConsole",!0),200}}function O(t){try{return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,t.returnValue=!1}catch(t){return Object(u.b)(t,"preventEvent",!0),!1}}function j(){try{void 0===p&&((p=document.createElement("div")).style.position="fixed",p.style.left="0",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.zIndex="9999999999"),l.appendChild(p),window.addEventListener("mouseup",v),window.addEventListener("mousemove",S)}catch(t){Object(u.b)(t,"resizeBarMouseDownListener",!0)}}function S(t){try{return h(t),O(t)}catch(t){return Object(u.b)(t,"resizeBarMouseMoveListener",!0),!1}}function v(t){try{null!==p&&l.removeChild(p),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",v);var e=h(t);return Object(o.i)()&&window.localStorage.setItem(i.d,"".concat(e)),O(t)}catch(t){return Object(u.b)(t,"resizeBarMouseUpListener",!0),!1}}function _(){try{if(!Object(o.i)())return[];var t=window.localStorage.getItem(i.f);null===t||"false"===t?t="[]":"true"===t&&(t='["fake_bids"]');var e=[];try{e=JSON.parse(t)}catch(t){}return Object(o.k)(e)||(e=[]),e.filter((function(t){return Object(o.j)(i.t,t)}))}catch(t){return Object(u.b)(t,"getCurrentDebugArray"),[]}}function w(t){try{return Object(o.j)(_(),t)}catch(t){return Object(u.b)(t,"isDebugEnabled"),!1}}function D(t,e){try{if(!Object(o.i)())return;if(-1===i.t.indexOf(t))return;var n=_();return e&&-1===n.indexOf(t)?n.push(t):e||(n=n.filter((function(e){return e!==t}))),0===n.length?window.localStorage.removeItem(i.f):window.localStorage.setItem(i.f,JSON.stringify(n)),T(),1}catch(e){return void Object(u.b)(e,"setDebugMode")}}function E(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;try{if(Object(o.m)(window,i.e)&&Object(o.m)(window[i.e],t))return window[i.e][t]}catch(t){Object(u.b)(t,"getDebugValue")}return e}var I=[];function T(){try{_().filter((function(t){return-1===I.indexOf(t)})).forEach((function(t){Object(u.b)(new Error("Debug method enabled: ".concat(t)),"debugPublicApi-enabled-".concat(t),!0),I.push(t)}))}catch(t){Object(u.b)(t,"pixelDebugModes")}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return D})),n.d(e,"b",(function(){return E}));var r=n(1),o=n(13),i=n(0);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}function d(t){return function(){var e,n,r,o=f(t);if(function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(t){return}}}()){var i=f(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return n=this,!(r=e)||"object"!==c(r)&&"function"!=typeof r?l(n):r}}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&function(t,e){(Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}(t,e)}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=function(){b(e,o.c);var t=d(e);function e(n,r){var o;return a(this,e),p(l(o=t.call(this,r.targetId,n)),"rawSlot",void 0),p(l(o),"mediaType","display"),o.rawSlot=r,o}return s(e,[{key:"reportError",value:function(t,e){Object(i.b)(t,"ApnSlot-".concat(e))}},{key:"initKeywords",value:function(){try{Object(r.m)(this.rawSlot,"keywords")||(this.rawSlot.keywords={})}catch(t){this.reportError(t,"initKeywords")}}},{key:"setTargeting",value:function(t,e){try{this.initKeywords(),this.rawSlot.keywords[t]=e}catch(t){this.reportError(t,"setTargeting")}}},{key:"getTargeting",value:function(t){try{return this.initKeywords(),Object(r.m)(this.rawSlot.keywords,t)?[this.rawSlot.keywords[t]]:[]}catch(t){return this.reportError(t,"getTargeting"),[]}}},{key:"clearTargeting",value:function(t){try{this.initKeywords(),delete this.rawSlot.keywords[t]}catch(t){this.reportError(t,"clearTargeting")}}},{key:"sizes",get:function(){try{return this.rawSlot.sizes}catch(t){return this.reportError(t,"sizes"),[]}}}]),e}(),m=function(){b(e,o.b);var t=d(e);function e(){var n;a(this,e);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return p(l(n=t.call.apply(t,[this].concat(o))),"isSupported",!0),n}return s(e,[{key:"reportError",value:function(t,e){Object(i.b)(t,"AppNexusAdServer-".concat(e))}},{key:"cmdQueuePush",value:function(t){try{window.apntag.anq.push(t)}catch(t){this.reportError(t,"cmdQueuePush")}}},{key:"setTargeting",value:function(t,e){try{if(!Object(r.m)(window,"apntag")||!Object(r.m)(window.apntag,"requests"))return;Object(r.m)(window.apntag.requests,"keywords")||(window.apntag.requests.keywords={}),window.apntag.requests.keywords[t]=e}catch(t){this.reportError(t,"setTargeting")}}},{key:"getTargeting",value:function(t){try{if(!Object(r.m)(window,"apntag")||!Object(r.m)(window.apntag,"requests"))return[];Object(r.m)(window.apntag.requests,"keywords")||(window.apntag.requests.keywords={});var e=window.apntag.requests.keywords[t];return void 0===e?[]:[e]}catch(t){return this.reportError(t,"getTargeting"),[]}}},{key:"clearTargeting",value:function(t){try{Object(r.m)(window,"apntag")&&Object(r.m)(window.apntag,"requests")&&Object(r.m)(window.apntag.requests,"keywords")&&delete window.apntag.requests.keywords[t]}catch(t){this.reportError(t,"clearTargeting")}}},{key:"hasAdServerObjectLoaded",value:function(){try{return Object(r.m)(window,"apntag")&&Object(r.m)(window.apntag,"loaded")&&!0===window.apntag.loaded}catch(t){return this.reportError(t,"hasAdServerObjectLoaded"),!1}}},{key:"isCommandQueueDefined",value:function(){try{return Object(r.m)(window,"apntag")&&Object(r.m)(window.apntag,"anq")}catch(t){return this.reportError(t,"isCommandQueueDefined"),!1}}},{key:"getSlots",value:function(){try{var t=[];return Object(r.m)(window,"apntag")&&Object(r.m)(window.apntag,"requests")&&Object(r.m)(window.apntag.requests,"tags")&&Object(r.l)(window.apntag.requests.tags)&&Object.keys(window.apntag.requests.tags).forEach((function(e){var n=window.apntag.requests.tags[e];t.push(new g(e,n))})),t}catch(t){return this.reportError(t,"getSlots"),[]}}}]),e}(),y=n(15);function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var w=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(c,o.b);var t,e,n=function(t){return function(){var e,n,r,o=S(t);if(function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(t){return}}}()){var i=S(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return n=this,!(r=e)||"object"!==h(r)&&"function"!=typeof r?j(n):r}}(c);function c(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return _(j(t=n.call.apply(n,[this].concat(r))),"isSupported",!0),_(j(t),"needNewBidObject",!0),t}return t=c,(e=[{key:"reportError",value:function(t,e){Object(i.b)(t,"SmartAdServer-".concat(e))}},{key:"cmdQueuePush",value:function(t){try{window.sas.cmd.push(t)}catch(t){this.reportError(t,"cmdQueuePush")}}},{key:"hasAdServerObjectLoaded",value:function(){try{return Object(r.m)(window,"sas")&&Object(r.m)(window.sas,"__smartLoaded")&&!0===window.sas.__smartLoaded}catch(t){return this.reportError(t,"hasAdServerObjectLoaded"),!1}}},{key:"isCommandQueueDefined",value:function(){try{return Object(r.m)(window,"sas")&&Object(r.m)(window.sas,"cmd")}catch(t){return this.reportError(t,"isCommandQueueDefined"),!1}}}])&&O(t.prototype,e),c}(),D=new o.b;function E(t){try{switch(t){case"appnexus":D=new m;break;case"googletag":D=new y.a;break;case"sas":D=new w;break;default:D=new o.b}}catch(t){Object(i.b)(t,"setDisplayAdServer")}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"i",(function(){return d})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return f})),n.d(e,"c",(function(){return b})),n.d(e,"d",(function(){return p})),n.d(e,"e",(function(){return g})),n.d(e,"h",(function(){return y})),n.d(e,"a",(function(){return h}));var r=n(4),o=n(1),i=n(0),c=n(3),a=n(2);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){try{return t.split("_").pop()}catch(t){return Object(i.b)(t,"getAmpAmznBidValue"),""}}function d(t){try{return!Object(o.m)(t,"slots")}catch(t){return Object(i.b)(t,"isAAXPunt"),!0}}function l(t){try{var e,n=Object(r.c)("url");if(null!==n)return encodeURIComponent(n);try{e=t.top.location.href}catch(t){e=null}if(null===e||!e||void 0===e){e="";try{t.top!==t.self&&(e=t.document.referrer)}catch(t){}}return encodeURIComponent(e)}catch(t){return Object(i.b)(t,"getCurrentUrl"),""}}function f(t){try{var e,n="",o=Object(r.c)("url");if(null!==o)return encodeURIComponent(o);try{try{e=t.top.document.referrer}catch(n){e=t.document.referrer}n=encodeURIComponent(e)}catch(n){}return n}catch(n){return Object(i.b)(n,"getReferrerUrl"),""}}function b(){try{var t={cookiesParams:""};return Object(o.d)().forEach((function(e){if(e[0]in c.h)switch(e[0]){case"aps_ext_917":t.fb=e[1];break;default:t.cookiesParams+="&".concat(c.h[e[0]],"=").concat(e[1])}})),t.fb||a.a.getState().sync917||a.a.dispatch({type:"SET_SYNC_917",value:!0}),t}catch(t){return Object(i.b)(t,"getApsFirstPartyCookies"),{cookiesParams:""}}}function p(t){try{var e=a.a.getState().config.blockedBidders;Object(o.m)(t,"blockedBidders")&&Object(o.k)(t.blockedBidders)&&(e=t.blockedBidders);var n="";return Object(o.k)(e)&&(n=JSON.stringify(e)),n}catch(t){return Object(i.b)(t,"getBlockedBidders",!0),""}}function g(){try{if(!Object(o.i)())return c.n;var t=a.a.getState();return Object(o.m)(t,"cfg")&&Object(o.m)(t.cfg,"v")&&-1!==t.cfg.v?t.cfg.v:null}catch(t){return Object(i.b)(t,"getCfgVersion"),null}}function m(t){try{if(-1===["string","number"].indexOf(u(t)))return!1;var e=Math.floor(Number(t));if(e>c.l)return e}catch(t){Object(i.b)(t,"parseTimeout",!0)}return!1}function y(t,e){try{var n=m(t.timeout);return!1===n&&(n=m(e.config.bidTimeout)),!1===n&&(n=m(e.cfg.DEFAULT_TIMEOUT)),n}catch(t){return Object(i.b)(t,"getTimeout",!0),2e3}}function h(t,e){var n,r=!1;function o(e){if(!r)try{t(e)}catch(e){Object(i.b)(e,"executeFunctionOnceWithTimeout-wrappedFunction",!0)}clearTimeout(n),r=!0}try{return n=setTimeout(o,e,!0),o.bind(null,!1)}catch(e){return Object(i.b)(e,"executeFunctionOnceWithTimeout",!0),function(){}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return y})),n.d(e,"d",(function(){return h})),n.d(e,"h",(function(){return O})),n.d(e,"e",(function(){return j})),n.d(e,"c",(function(){return S})),n.d(e,"i",(function(){return v})),n.d(e,"g",(function(){return _})),n.d(e,"f",(function(){return w}));var r=n(2),o=n(4),i=n(3),c=n(1),a=n(9),u=n(0),s=n(6),d=n(11),l=n(10);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){g(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),g(this,"bidConfig",void 0),g(this,"bidState",i.b.new),g(this,"_targetingSetID",void 0),g(this,"timing",{setAtTimes:[]}),g(this,"pixelSent",!1),g(this,"bidReqID",""),g(this,"host",void 0),g(this,"ev",void 0),g(this,"cfe",void 0),g(this,"isAmp",!1),g(this,"doc",void 0),this.bidConfig=e,this._targetingSetID=Object(c.e)()}var e,n;return e=t,(n=[{key:"reportError",value:function(t,e,n){var r=2<arguments.length&&void 0!==n&&n;Object(u.b)(t,"Bid-".concat(e),r)}},{key:"matchesBidCacheId",value:function(t){var e=this;try{return this.bidConfig.targeting.reduce((function(n,r){return n||-1!==r.indexOf("amzniid")&&e.bidConfig[r]===t}),!1)}catch(t){return this.reportError(t,"matchesBidCacheId"),!1}}},{key:"targeting",get:function(){var t=this;try{return this.bidConfig.targeting.map((function(e){return"&".concat(e,"=").concat(t.bidConfig[e])})).join("")}catch(t){return this.reportError(t,"targeting"),""}}},{key:"bidObject",get:function(){try{var t={slotID:this.bidConfig.slotID,amzniid:this.bidConfig.amzniid,amznbid:this.bidConfig.amznbid,amznp:this.bidConfig.amznp,amznsz:this.bidConfig.amznsz,size:this.bidConfig.amznsz};return"video"!==this.bidConfig.mediaType&&"v"!==this.bidConfig.mediaType||(t.mediaType="video",t.qsParams=this.targeting,t.encodedQsParams=encodeURIComponent(this.targeting),t.r_amznbid=this.bidConfig.r_amznbid,t.r_amzniid=this.bidConfig.r_amzniid,t.r_amznp=this.bidConfig.r_amznp),t}catch(t){return this.reportError(t,"bidObject",!0),{slotID:"",amzniid:"error",amznbid:"error",amznp:"error",amznsz:"error",size:"error"}}}},{key:"newBidObject",get:function(){var t=this;try{var e={slotID:this.bidConfig.slotID,size:this.bidConfig.amznsz,mediaType:"video"===this.bidConfig.mediaType?"v":this.bidConfig.mediaType,targeting:{},helpers:{targetingKeys:this.bidConfig.targeting,qsParams:function(){return t.targeting},encodedQsParams:function(){return encodeURIComponent(t.targeting)}}};return this.bidConfig.meta.forEach((function(n){e[n]=t.bidConfig[n]})),this.bidConfig.targeting.forEach((function(n){e.targeting[n]=t.bidConfig[n]})),-1!==this.slotID.indexOf("_")&&(e.sasTargeting=this.bidConfig.targeting.map((function(e){return"".concat(e,"_").concat(t.slotID.split("_")[1],"=").concat(t.bidConfig[e])})).join(";")),e}catch(t){return this.reportError(t,"newBidObject",!0),{slotID:"",size:"",mediaType:"d",targeting:{},helpers:{targetingKeys:[],qsParams:function(){return""},encodedQsParams:function(){return""}}}}}},{key:"slotID",get:function(){try{return this.bidConfig.slotID}catch(t){return this.reportError(t,"slotID"),""}}}])&&p(e.prototype,n),t}(),y=Object(c.f)(i.o);function h(t,e){try{var n=r.a.getState(),l={},f=Object(o.c)("host",n.hosts.DEFAULT_AAX_BID_HOST),p=n.cfg.DTB_PATH,g="bid";n.experiments.shouldUseTestBidEndpoint&&null!==n.cfg.TEST_BID_ENDPOINT&&(g=n.cfg.TEST_BID_ENDPOINT);var m={src:n.config.pubID,u:Object(s.f)(window),pr:Object(s.g)(window),pid:y,cb:t.bidReqID,ws:Object(c.h)(window),v:i.j,t:e,slots:function(t){try{return Object(a.c)(t.map((function(t){var e;if(Object(c.m)(t,"mediaType")&&"video"===t.mediaType)e=t.aaxSlot;else{if(!(Object(c.m)(t,"sizes")&&0<t.sizes.length))return Object(u.b)({name:"SlotError",message:"There was an error with the configuration for this slot: ".concat(JSON.stringify(t.rawSlot))},"buildSlotsUrlParam-invalidSlot",!0),{id:"ERROR",mt:i.k.video,error:!0};var n=t.aaxSlot;Object(c.m)(t,"slotName")&&t.slotName!==t.slotID&&(r.a.dispatch({type:"ADD_SLOT_ID",slotID:t.slotID}),n.sd="".concat(r.a.getState().slotIdMap.indexOf(t.slotID)),n.sn=t.slotName),e=n}return e})).filter((function(t){return!0!==t.error})))}catch(t){return Object(u.b)(t,"buildSlotsUrlParam",!0),""}}(t.slots),pj:function(t,e){try{var n=b({},Object(c.l)(t.config.params)?t.config.params:{},{},Object(c.l)(e.params)?e.params:{});return 0===Object.keys(n).length?"":Object(a.c)(n)}catch(t){return Object(u.b)(t,"getBidParams",!0),""}}(n,t),cfgv:Object(s.e)(),bb:Object(s.d)(t)};if(r.a.dispatch({type:"RECORD_AAX_REQUEST",data:{bidConfig:t,bidReqID:t.bidReqID,timeout:e,ws:m.ws,url:m.u,rqTs:Date.now()}}),n.experiments.chunkRequests){var h=t.bidReqID.split("-");r.a.dispatch({type:"RECORD_NETWORK_EXCHANGE",fid:h[0],networkID:parseInt(h[1],10),timestamp:Date.now(),exchangeType:"request"})}n.config.isSelfServePub&&(m.pubid=m.src,m.src=600);var O=Object(s.c)();O.fb&&(l[917]=O.fb,m[i.h.aps_ext_917]=Object(a.c)(l));var j=Object(o.c)("bidParams");if(Object(c.l)(j)&&(m=b({},m,{},j)),Object(c.l)(n.gdpr)){var S;if(Object(c.m)(n.gdpr,"enabled")&&(m.gdpre=encodeURIComponent(n.gdpr.enabled)),Object(c.m)(n.gdpr,"consent")&&(m.gdprc=encodeURIComponent(n.gdpr.consent)),S=Object(c.m)(n.gdpr,"log")?JSON.parse(n.gdpr.log):{},Object(c.i)()){var v=window.localStorage.getItem(d.b),_=[];try{_=JSON.parse(v)}catch(t){}window.localStorage.removeItem(d.b),null!==_&&0<_.length&&(S.rtimes=_);var w=window.localStorage.getItem(d.a);null!==w&&(window.localStorage.removeItem(d.a),S.cc=w)}m.gdprl=Object(a.c)(S)}var D=Object.keys(m).filter((function(t){return Object(c.m)(m,t)&&"undefined"!==m[t]&&""!==m[t]&&null!==m[t]})).map((function(t){return"".concat(t,"=").concat(m[t])})).join("&");O.cookiesParams&&(D+=O.cookiesParams);var E="".concat(i.p).concat(f).concat(p,"/").concat(g,"?").concat(D);return r.a.dispatch({type:"RECORD_AAX_REQ_PROP",bidReqID:t.bidReqID,key:"urlLength",value:E.length}),E}catch(t){return Object(u.b)(t,"buildBidUrl",!0),""}}function O(t,e){try{return Object(c.m)(t,"config")&&Object(c.m)(t.config,"deals")&&!0===t.config.deals||!0===e.needNewBidObject}catch(t){return Object(u.b)(t,"isNewBidObjectRequired"),!1}}function j(t,e){return new m({size:"0x0",crid:"",slotID:t,mediaType:"d",meta:["slotID","mediaType","size"],amznbid:e,amzniid:"",amznp:e,amznsz:"0x0",targeting:["amzniid","amznbid","amznp","amznsz"]})}function S(t,e,n){try{var r,o=t.map(l.c),a=e.slots.filter(l.d).map(l.c).filter((function(t){return!Object(c.j)(o,t)}));return r=n?i.r.bidInFlight:i.r.noBid,t.concat(a.map((function(t){return j(t,r)})))}catch(e){return Object(u.b)(e,"addStateTrackingBidsToRealBids"),t}}function v(t){try{if(Object(c.m)(t,"slots")){var e=r.a.getState().slotIdMap;t.slots.forEach((function(t){null!==t.slotID.match(/^\d+$/)&&parseInt(t.slotID,10)<e.length&&(t.slotID=e[parseInt(t.slotID,10)])}))}}catch(t){Object(u.b)(t,"mapSlotIDValues")}}function _(t){try{if(Object(c.j)(r.a.getState().displayAdServer.noBidSlotIDs,t.slotID))return!1;var e=r.a.getState().AAXReqs.filter((function(e){return e.bidReqID===t.bidReqID}))[0];return!(Object(c.m)(e,"rqTs")&&Date.now()-e.rqTs>24e4)&&(!(Object(c.m)(e,"url")&&!Object(c.b)(e.url,Object(s.f)(window)))&&t.bidState!==i.b.rendered)}catch(e){return Object(u.b)(e,"isBidEligible"),!1}}function w(t){try{var e=t.map(l.c),n=r.a.getState();return Object.keys(n.slotBids).filter((function(t){return Object(c.j)(e,t)})).reduce((function(t,e){var o=n.slotBids[e].filter((function(t){return t.bidState===i.b.new})).filter(_);if(0<o.length){var c=o[o.length-1];r.a.dispatch({type:"BID_STATE_CHANGE",slotID:e,_targetingSetID:c._targetingSetID,bidState:i.b.exposed}),t[e]=c}return t}),{})}catch(t){return Object(u.b)(t,"getNewSlotBidsAndExposeForRequestedSlots"),{}}}},function(t,e,n){"use strict";n.d(e,"c",(function(){return l})),n.d(e,"b",(function(){return b})),n.d(e,"a",(function(){return p})),n.d(e,"d",(function(){return g}));var r=n(3),o=n(2),i=n(4),c=n(1),a=n(0),u=[],s=!1,d=[];function l(t){var e=new Image;return e.src=t,d.push(e),e}function f(t){try{if(s){var e=function(){try{var t=o.a.getState(),e=t.cfg.PIXEL_PATH,n=t.hosts.DEFAULT_AAX_PIXEL_HOST,c=Object(i.c)("pixelHost",n);return"".concat(r.p).concat(c).concat(e)}catch(t){return Object(a.b)(t,"buildPixelBaseUrl"),""}}();return void 0===t.bidId?e+="p/PH/":e+="".concat(t.bidId,"/"),l(e+=function(t){try{t._tl="aps-tag";var e=o.a.getState(),n=null,i="";Object(c.m)(e,"config")&&Object(c.m)(e.config,"pubID")&&""!==e.config.pubID&&(n=e.config.isSelfServePub,i=e.config.pubID),null!==n&&(n?(t.src=r.q,t.pubid=i):t.src=i),t.lv=r.j;var u=JSON.stringify(t);return u=function(t){try{return t.replace(/\\.{1}/g,"")}catch(t){return Object(a.b)(t,"escapeJsonForAax"),""}}(u),u=encodeURIComponent(u)}catch(t){return Object(a.b)(t,"objectToUrlPath"),""}}(t.payload))}return u.push(t),!1}catch(t){return Object(a.b)(t,"sendPixel"),!1}}function b(t){return f({payload:t})}function p(t,e){return f({payload:e,bidId:t})}function g(){try{if(s)return;s=!0,u.forEach(f)}catch(t){Object(a.b)(t,"sendPixels")}}!0===Object(i.c)("exposePixels")&&(window.apstagPixelQueue=u,window.apstagPixelsSent=d)},function(t,e,n){"use strict";n.d(e,"d",(function(){return o})),n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return a}));var r=n(0);function o(t){var e=t.url,n=t.onload,o=t.onerror,i=t.ontimeout,c=t.withCredentials;try{var a=new window.XMLHttpRequest;a.onload=n.bind(null,a),void 0!==o&&(a.onerror=o),void 0!==i&&(a.ontimeout=i),void 0!==c&&(a.withCredentials=c),a.open("GET",e),a.send(null)}catch(t){Object(r.b)(t,"xhrGet")}}function i(t,e,n,o){try{if(void 0===n&&(n=document),void 0===t)return"function"==typeof e&&e(!0),!1;var i=n.getElementsByTagName("script")[0]||n.body.firstChild,a=n.createElement("script");if(a.type="text/javascript",a.async=!0,a.src=t,e&&c(a,e),c(a,o||function(){Object(r.b)(new Error("Error Loading Script Tag"),"loadScriptTag-onerror")},[],"onerror"),null!==i.parentNode)return i.parentNode.insertBefore(a,i),!0}catch(t){Object(r.b)(t,"loadScriptTag",!0)}return!1}function c(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"onload";try{return"function"==typeof e&&(t[o]=function(){e.apply(null,n)},!0)}catch(t){return Object(r.b)(t,"addCallbackFunction"),!1}}function a(t){try{return encodeURIComponent(JSON.stringify(t))}catch(t){return Object(r.b)(t,"objToUrlParam"),""}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return c})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return u}));var r=n(0),o=n(1);function i(t){var e=[];try{t.hasAdServerObjectLoaded()&&(e=t.getSlots())}catch(t){Object(r.b)(t,"getDisplayAdServerSlots")}return e}function c(t){try{return Object(o.m)(t,"sizes")&&Object(o.k)(t.sizes)&&0!==t.sizes.length}catch(t){return Object(r.b)(t,"doesSlotHaveSizes"),!1}}function a(t){try{return"video"!==t.mediaType}catch(t){return Object(r.b)(t,"isDisplaySlot"),!0}}function u(t){try{return t.slotID}catch(t){return Object(r.b)(t,"getSlotID"),""}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return f})),n.d(e,"c",(function(){return D}));var r=n(1),o=n(0);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};var s,d,l="cmpRTimesA",f="crfgL0cSt0rC",b=50,p=[1,1,3,5],g=0,m=!1,y="crfgL0cSt0r",h=!1,O="-timeout",j=null,S={};function v(t,e){try{if(j=null,Object(r.m)(window,t.cmpGlobalv2)&&"function"==typeof window[t.cmpGlobalv2])j="tcfv2";else{if(!Object(r.m)(window,t.cmpGlobal)||"function"!=typeof window[t.cmpGlobal])return e({error:"no-cmp"}),void(g<p.length&&(setTimeout(v,1e3*p[g],t,e),g++));j="cmp"}setTimeout(e,t.cmpTimeout,{timeout:!0},!0),s=Date.now();try{"cmp"===j?window[t.cmpGlobal]("getConsentData",null,e):window[t.cmpGlobalv2]("getTCData",2,e)}catch(t){e({error:"".concat(j,"-internal-error")}),Object(o.b)(t,"getCmpConfig-".concat(j),!0)}}catch(t){Object(o.b)(t,"getCmpConfig",!0)}}function _(t,e,n){if(!0!==m||!Object(r.m)(e,"timeout")||!e.timeout){m=!0;try{if(Object(r.m)(e,"error"))return S.status=e.error,void w(t);if(!n||"object"!==u(e)||null===e)return S.status="".concat(j,"-error"),void w(t);if(Object(r.m)(e,"timeout")&&e.timeout)return S.status="".concat(j).concat(O),void w(t);!function(t){if(Object(r.i)())try{var e=window.localStorage.getItem(l),n=[];null!==e&&(n=JSON.parse(e)),n.push(t),window.localStorage.setItem(l,JSON.stringify(n))}catch(t){Object(o.b)(t,"saveCmpResponseTime")}}(Date.now()-s),S.status="".concat(j,"-success"),Object(r.m)(e,"tcString")?t.consent=e.tcString:Object(r.m)(e,"consentData")&&(t.consent=e.consentData),t.enabled=e.gdprApplies?1:0,0===t.enabled&&delete t.consent,function(t){try{if(!Object(r.i)())return;window.localStorage.setItem(f,"0"),!1!==h&&h.enabled===t.enabled&&h.consent===t.consent||(window.localStorage.setItem(f,"2"),window.localStorage.setItem(y,JSON.stringify({enabled:t.enabled,consent:t.consent})),!1!==h&&(S.lsStatus="".concat(j,"-override"),window.localStorage.setItem(f,"1"))),window.document.cookie="".concat(y,"=true;max-age=604800")}catch(t){return Object(o.b)(t,"saveConsentData")}}(t),w(t)}catch(e){return Object(o.b)(e,"parseCmpResponse",!0),S.status="func-error",void w(t)}}}function w(t){"boolean"==typeof(t=c({},t)).enabled&&(t.enabled=t.enabled?1:0);var e=c({},t);try{Object.keys(S).forEach((function(t){"string"==typeof S[t]&&-1!==S[t].indexOf("/")&&(S[t]=encodeURIComponent(S[t]))})),e.log=JSON.stringify(S)}catch(t){Object(o.b)(t,"stringifyAndCallCallback")}d(e)}function D(t,e){j=null,g=0,m=!(S={}),O="-timeout";try{d=Object(o.d)(e,"GdprCallback"),t="object"!==u(t)||null===t?{}:c({},t),!(S={cmpGlobal:t.cmpGlobal,cmpGlobalv2:t.cmpGlobalv2,cmpTimeout:t.cmpTimeout,enabled:t.enabled})===t.enabled?S.status="explicit-no-gdpr":!0===t.enabled&&(S.status=Object(r.m)(t,"consent")?"explicit-consent-passed":"explicit-no-consent-passed"),!1!==(h=function(){try{var t=window.localStorage.getItem(y);if(null!==t)return JSON.parse(t)}catch(t){Object(o.b)(t,"getConfigFromLocalStorage")}return!1}())&&(void 0===window.document.cookie||-1===window.document.cookie.indexOf("".concat(y,"=true"))?(h=!1,S.lsStatus="invalid"):(S.lsStatus="present",b=50,O="-timeout-cfb")),"string"!=typeof t.cmpGlobal&&(t.cmpGlobal="__cmp"),"string"!=typeof t.cmpGlobalv2&&(t.cmpGlobalv2="__tcfapi"),Number.isInteger(t.cmpTimeout)||(t.cmpTimeout=b);var n=t,i=function(t){try{var e={log:JSON.stringify(S)};return void 0===t.enabled||(!1===t.enabled?e.enabled=0:(Number.isInteger(t.enabled)?e.enabled=t.enabled:e.enabled=1,"string"==typeof t.consent&&(e.consent=t.consent))),e}catch(t){return Object(o.b)(t,"parsePubConfig",!0),{}}}(n);if(void 0!==i.enabled)return void w(i);var a={};!1!==h&&(a=c({},h)),v(n,_.bind(null,a))}catch(t){m||e({log:'{"status":"global-func-error"}'}),m=!0,Object(o.b)(t,"getGdprConfig",!0)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return i})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return a})),n.d(e,"d",(function(){return u}));function r(t,e){try{return"number"!=typeof t[e]?0:Math.round(t[e])}catch(t){return 0}}function o(t,e){try{var n=i(t,e)[0];if(void 0!==n)return n}catch(t){}return null}function i(t,e){try{return t.performance.getEntriesByType("resource").filter((function(t){return e.test(t.name)}))}catch(t){return[]}}function c(t,e){try{var n=t.performance.timing[e];return void 0===n?0:n}catch(t){return 0}}function a(t){try{if(0===["redirectStart","redirectEnd","domainLookupStart","domainLookupEnd","connectStart","connectEnd","requestStart","responseStart","secureConnectionStart"].reduce((function(e,n){return e+r(t,n)}),0))return null;var e=r(t,"fetchStart");return["domainLookupStart","domainLookupEnd","connectStart","connectEnd"].reduce((function(n,o){return n&&r(t,o)===e}),!0)}catch(t){return null}}function u(){try{var t=window.performance.timeOrigin;return void 0===t&&(t=window.performance.timing.navigationStart),t}catch(t){return 0}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return m})),n.d(e,"a",(function(){return y}));var r=n(1),o=n(0);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t,e,n){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=function(){function t(){l(this,t),p(this,"isSupported",!1),p(this,"needNewBidObject",!1)}return b(t,[{key:"cmdQueuePush",value:function(){}},{key:"slotRenderEndedEvent",value:function(){}},{key:"setTargeting",value:function(){}},{key:"getTargeting",value:function(){return[]}},{key:"clearTargeting",value:function(){}},{key:"hasAdServerObjectLoaded",value:function(){return!1}},{key:"isCommandQueueDefined",value:function(){return!1}},{key:"getSlots",value:function(){return[]}}]),t}(),m=function(){function t(e,n,r){l(this,t),p(this,"mediaType","display"),p(this,"slotID",void 0),p(this,"slotName",void 0),p(this,"slotParams",void 0),p(this,"rawSlot",void 0),this.slotID=e,this.slotName=n,this.slotParams=r}return b(t,[{key:"reportError",value:function(t,e){Object(o.b)(t,"Slot-".concat(e))}},{key:"setTargeting",value:function(){}},{key:"getTargeting",value:function(){return[]}},{key:"clearTargeting",value:function(){}},{key:"sizes",get:function(){return[]}},{key:"slotConfig",get:function(){try{return{slotID:this.slotID,slotName:this.slotName,sizes:this.sizes}}catch(t){return this.reportError(t,"slotConfig"),{slotID:"",slotName:"",sizes:[]}}}},{key:"aaxSlotParams",get:function(){var t=this;try{return Object(r.m)(this,"slotParams")&&Object(r.l)(this.slotParams)?Object.keys(this.slotParams).filter((function(e){return function t(e){try{return Object(r.k)(e)?0<e.length&&e.reduce((function(e,n){return e&&t(n)}),!0):"string"==typeof e&&0<e.length}catch(e){return Object(o.b)(e,"validateSlotParamValue"),!1}}(t.slotParams[e])})).reduce((function(e,n){return e[n]=t.slotParams[n],e}),{}):void 0}catch(t){return this.reportError(t,"aaxSlotParams"),this.slotParams}}},{key:"aaxSlot",get:function(){try{var t={sd:this.slotID,s:this.sizes.filter(r.k).map((function(t){return t.join("x")})),kv:this.aaxSlotParams};return this.slotID!==this.slotName&&(t.sn=this.slotName),t}catch(t){return this.reportError(t,"aaxSlot"),{sd:"",s:[],kv:{}}}}}]),t}(),y=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(e,m);var t=function(t){return function(){var e,n,r,o=s(t);if(function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(t){return}}}()){var c=s(this).constructor;e=Reflect.construct(o,arguments,c)}else e=o.apply(this,arguments);return n=this,!(r=e)||"object"!==i(r)&&"function"!=typeof r?u(n):r}}(e);function e(n){var r;return l(this,e),p(u(r=t.call(this,n.slotID,n.slotName,n.slotParams)),"rawSlot",void 0),r.mediaType="video"===n.mediaType?"video":"display",r.rawSlot=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},n),r}return b(e,[{key:"reportError",value:function(t,e){Object(o.b)(t,"AaxSlot-".concat(e))}},{key:"aaxSlot",get:function(){try{return"video"===this.rawSlot.mediaType?{id:this.slotID,mt:"v",kv:this.aaxSlotParams}:a(s(e.prototype),"aaxSlot",this)}catch(t){return this.reportError(t,"aaxSlot"),{sd:"",s:[]}}}},{key:"sizes",get:function(){try{var t=[];return Object(r.m)(this.rawSlot,"sizes")&&Object(r.k)(this.rawSlot.sizes)&&(t=0<this.rawSlot.sizes.length&&!Object(r.k)(this.rawSlot.sizes[0])?[this.rawSlot.sizes]:this.rawSlot.sizes),t}catch(t){return this.reportError(t,"sizes"),[]}}}]),e}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return a}));var r=n(0),o=n(1);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){try{return function(t){try{if(!a(t,["number","string"]))return!1;if(isNaN(t))return!1;if("number"==typeof t)return!0;var e=parseInt(t,10);return!isNaN(e)}catch(t){return Object(r.b)(t,"isNumber"),!0}}(t)||void 0===t}catch(t){return Object(r.b)(t,"isNumberOrUndefined"),!0}}function a(t,e){try{return Object(o.j)(e,i(t))}catch(t){return Object(r.b)(t,"isVarOfTypes"),!0}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return g})),n.d(e,"a",(function(){return m}));var r=n(1),o=n(13),i=n(0);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}function d(t){return function(){var e,n,r,o=f(t);if(function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(t){return}}}()){var i=f(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return n=this,!(r=e)||"object"!==c(r)&&"function"!=typeof r?l(n):r}}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&function(t,e){(Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}(t,e)}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=function(){b(e,o.c);var t=d(e);function e(n){var r;return a(this,e),p(l(r=t.call(this,n.getSlotElementId(),n.getAdUnitPath())),"rawSlot",void 0),p(l(r),"mediaType","display"),r.rawSlot=n,r}return s(e,[{key:"reportError",value:function(t,e){Object(i.b)(t,"GptSlot-".concat(e))}},{key:"setTargeting",value:function(t,e){try{this.rawSlot.setTargeting(t,e)}catch(t){this.reportError(t,"setTargeting")}}},{key:"getTargeting",value:function(t){try{return this.rawSlot.getTargeting(t)}catch(t){return this.reportError(t,"getTargeting"),[]}}},{key:"clearTargeting",value:function(t){try{this.rawSlot.clearTargeting(t)}catch(t){this.reportError(t,"clearTargeting")}}},{key:"sizes",get:function(){try{var t=Object(r.h)(window).split("x").map((function(t){return Number(t)}));return this.rawSlot.getSizes(t[0],t[1]).filter((function(t){return"fluid"!==t})).map((function(t){return[t.getWidth(),t.getHeight()]}))}catch(t){return this.reportError(t,"sizes"),[]}}}]),e}(),m=function(){b(e,o.b);var t=d(e);function e(){var n;a(this,e);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return p(l(n=t.call.apply(t,[this].concat(o))),"isSupported",!0),n}return s(e,[{key:"reportError",value:function(t,e){Object(i.b)(t,"GoogletagAdServer-".concat(e))}},{key:"cmdQueuePush",value:function(t){try{window.googletag.cmd.push(t)}catch(t){this.reportError(t,"cmdQueuePush")}}},{key:"slotRenderEndedEvent",value:function(t){try{window.googletag.pubads().addEventListener("slotRenderEnded",(function(e){var n=new g(e.slot);t(n)}))}catch(t){this.reportError(t,"slotRenderEndedEvent")}}},{key:"setTargeting",value:function(t,e){try{window.googletag.pubads().setTargeting(t,e)}catch(t){this.reportError(t,"setTargeting")}}},{key:"getTargeting",value:function(t){try{return window.googletag.pubads().getTargeting(t)}catch(t){return this.reportError(t,"getTargeting"),[]}}},{key:"clearTargeting",value:function(t){try{window.googletag.pubads().clearTargeting(t)}catch(t){this.reportError(t,"clearTargeting")}}},{key:"hasAdServerObjectLoaded",value:function(){try{return Object(r.m)(window,"googletag")&&Object(r.m)(window.googletag,"apiReady")&&!0===window.googletag.apiReady}catch(t){return this.reportError(t,"hasAdServerObjectLoaded"),!1}}},{key:"isCommandQueueDefined",value:function(){try{return Object(r.m)(window,"googletag")&&Object(r.m)(window.googletag,"cmd")}catch(t){return this.reportError(t,"isCommandQueueDefined"),!1}}},{key:"getSlots",value:function(){try{return window.googletag.pubads().getSlots().map((function(t){return new g(t)}))}catch(t){return this.reportError(t,"getSlots"),[]}}}]),e}()},function(t,e,n){"use strict";function r(t){return void 0!==t.amzniid}function o(t){return void 0!==t.kvMap}function i(t){return void 0!==t.html&&void 0!==t.ev&&void 0!==t.amzniid}n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return a}));var r=n(0),o=n(1);function i(t){try{return!(!Object(o.m)(t,"$sf")||!Object(o.m)(t.$sf,"ext"))}catch(t){return Object(r.b)(t,"isSafeFrame"),!1}}function c(t,e){try{var n=e.innerWidth,o=e.innerHeight,i=parseInt(t[0],10),c=parseInt(t[1],10),a=i-n,u=c-o,s=e.sfAPI||e.$sf.ext;s&&(n===i&&o===c||(s.register(i,c),s.expand({r:a,b:u,push:!0})))}catch(t){Object(r.b)(t,"expandSf")}}function a(t){try{return 1===t.innerWidth&&1===t.innerHeight}catch(t){return Object(r.b)(t,"is1x1Creative"),!1}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return a}));var r=n(3),o=n(1),i=n(0);function c(t){try{return Object(o.m)(t,"debug")}catch(t){return Object(i.b)(t,"isApstagLibrary"),!1}}function a(t){try{return!!Object(o.m)(t,r.a)&&!0===t[r.a]}catch(t){return Object(i.b)(t,"hasApstagJsLoaded"),!1}}},,,,function(t,e,n){t.exports=n(23)},function(t,e,n){"use strict";n.r(e);var Lt=n(11),Nt=n(2),qt=n(6),Ut=n(1),Mt=n(10),Ft=n(4),Gt=n(3),Qt=n(12),Ht=n(17),Xt=n(8),Vt=n(0),Kt=n(9),Jt=n(15),r=n(18),Wt=n(5),Yt=n(7),$t=n(13),Zt=n(16),te=n(14);function ee(t){return a(t)||c(t)||i(t)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function c(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function a(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ne(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){re(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function re(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oe(t){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}try{var d=Object(r.b)(window.apstag);d?Object(Vt.b)(new Error("apstag has already loaded - preventing duplicate load"),"apstag-duplicateLoad",!0):(Object(r.a)(window)&&Object(Vt.b)(new Error("apstag was loaded and then destroyed"),"apstag-destroyReload",!0),window.apstagLOADED=!0,function(){var r=Object(Qt.e)(window,"navigationStart"),t="ls",e=Object(Ft.d)("console")||function(){try{return-1!==window.location.href.indexOf("amzn_debug_console=1")&&(t="url",!0)}catch(t){return!1}}(),n=Object(Ft.d)("console_v2")||function(){try{return-1!==window.location.href.indexOf("amzn_debug_console=2")&&(t="url",!0)}catch(t){return!1}}();function o(t){try{t.ts=Date.now(),Nt.a.dispatch({type:"LOG_EVENT",event:t})}catch(t){Object(Vt.b)(t,"_logEvent")}}function i(t){function e(t){try{if(!Nt.a.getState().cmpFired){Nt.a.dispatch({type:"CMP_FIRED"});var e=document.createElement("iframe");e.style.display="none",e.src=t,document.body.appendChild(e)}}catch(t){Object(Vt.b)(t,"_doCookieMatch-ready")}}try{"loading"===document.readyState?document.addEventListener&&document.addEventListener("DOMContentLoaded",(function(){e(t)}),!1):e(t)}catch(t){Object(Vt.b)(t,"_doCookieMatch")}}function c(t){try{var e=Nt.a.getState().cfg.COOKIE_MATCH_DELAY;setTimeout((function(){try{Object(Ut.m)(t,"cmp")?i(t.cmp):Object(Ut.m)(t,"cmpjs")&&Object(Kt.b)(t.cmpjs)}catch(t){Object(Vt.b)(t,"_tryCookieMatch-setTimeout")}}),e)}catch(t){Object(Vt.b)(t,"_tryCookieMatch")}}function a(t){try{return!Nt.a.getState().experiments.chunkRequests||0===Nt.a.getState().bidReqs[t.split("-")[0]].networkReqs.filter((function(t){return t.inFlight})).length}catch(t){return Object(Vt.b)(t,"_isRequestComplete"),1}}function u(t,e){try{!Nt.a.getState().bidReqs[t].hasCallbackExecuted&&a(t)&&(Nt.a.dispatch({type:"RECORD_CALLBACK",fid:t}),e())}catch(t){Object(Vt.b)(t,"_checkAndCallCallback")}}function s(t){try{Nt.a.getState().experiments.chunkRequests&&Nt.a.dispatch({type:"RECORD_NETWORK_EXCHANGE",fid:t[0],timestamp:Date.now(),exchangeType:"response",networkID:parseInt(t[1],10)})}catch(t){Object(Vt.b)(t,"_recordResponse")}}function d(t,r,e){var o=e.split("-"),n={url:t,withCredentials:!0,onload:function t(e){try{s(o);var n=e.responseText;eval(n),u(o[0],r)}catch(t){Object(Vt.b)(t,"_xhrBid-onload",!0)}},onerror:function(){try{s(o),u(o[0],r)}catch(t){Object(Vt.b)(t,"_xhrBid-onerror",!0)}}};try{Object(Kt.d)(n)}catch(t){Object(Vt.b)(t,"_xhrBid",!0),s(o),u(o[0],r)}}function l(t){try{var e=new Date;return e.setTime(e.getTime()+1e3*t),e.toUTCString()}catch(t){return Object(Vt.b)(t,"_getCookieExpiry"),"Thu, 01 Jan 1970 00:00:00 GMT"}}function f(t){try{Object(Ut.m)(t,"cr")&&t.cr.forEach((function(t){document.cookie="".concat(t.k,"=").concat(t.v,";expires=").concat(-1!==t.exp?l(t.exp):Object(Ut.g)(365),";path=/;")}))}catch(t){Object(Vt.b)(t,"_setFirstPartyCookies")}}function b(t){try{if(Object(Ut.m)(t,"cb")){Nt.a.dispatch({type:"RECORD_AAX_REQ_PROP",bidReqID:t.cb,key:"resTs",value:Date.now()});var e=new RegExp("e/dtb/bid.*cb=".concat(t.cb));Nt.a.dispatch({type:"RECORD_AAX_REQ_PROP",bidReqID:t.cb,key:"perf",value:Object(Qt.c)(window,e)})}Object(Ut.m)(t,"cfg")&&Nt.a.dispatch({type:"SET_CFG",cfg:t.cfg}),K(t)}catch(t){Object(Vt.b)(t,"_doOnAaxResponse",!0)}}function p(t){try{if(c(t),f(t),Object(Ut.m)(t,"cfg")&&localStorage.setItem(Gt.c,JSON.stringify(t.cfg)),Object(Ut.m)(t,"st")&&Object(Ut.j)(t.st,917)&&Nt.a.getState().sync917){Nt.a.dispatch({type:"SET_SYNC_917",value:!1});try{k()}catch(t){Object(Vt.b)(t,"__error-doFbSync__")}}g(t),Object(qt.i)(t)||Object(Xt.d)()}catch(t){Object(Vt.b)(t,"_doAfterAaxResponse",!0)}}function g(t){try{if(Object(Ut.m)(t,"fp")){var e=t.fp;Object(Ut.m)(e,"length")&&e.forEach((function(t){var e=t.d?t.d:0;setTimeout((function(){Object(Xt.c)(t.s)}),e)}))}}catch(t){Object(Vt.b)(t,"fireAAXPixels")}}function m(){try{Nt.a.getState().Q.forEach((function(t){"i"===t[0]?window.apstag.init.apply(null,t[1]):window.apstag.fetchBids.apply(null,t[1])}))}catch(t){Object(Vt.b)(t,"_QHandler",!0)}}function y(t){try{Object(te.b)(t.pubID,["string","number"])?"number"==typeof t.pubID&&(t.pubID="".concat(t.pubID)):Object(Vt.c)("init.config.pubID",oe(t.pubID),"string"),Object(te.b)(t.adServer,["undefined","string"])||Object(Vt.c)("init.config.adServer",oe(t.adServer),"string"),Object(te.a)(t.bidTimeout)||("string"==typeof t.bidTimeout?Object(Vt.b)({name:"string-".concat(t.bidTimeout),message:"init.config.bidTimeout was a non-numeric string '".concat(t.bidTimeout,"'")},"TypeError-init.config.bidTimeout",!0):Object(Vt.c)("init.config.bidTimeout",oe(t.bidTimeout),"number")),Object(te.b)(t.gdpr,["undefined","object"])?"object"===oe(t.gdpr)&&(Object(te.a)(t.gdpr.cmpTimeout)||(Object(te.b)(t.gdpr.cmpTimeout,["string","undefined"])?Object(Vt.b)({name:"string-".concat(t.bidTimeout),message:"init.config.gdpr.cmpTimeout was a non-numeric string '".concat(t.gdpr.cmpTimeout,"'")},"TypeError-init.config.gdpr.cmpTimeout",!0):Object(Vt.c)("init.config.gdpr.cmpTimeout",oe(t.gdpr.cmpTimeout),"number"))):Object(Vt.c)("init.config.gdpr",oe(t.gdpr),"object"),Object(Ut.m)(t,"params")&&!Object(Ut.l)(t.params)?Object(Vt.c)("init.config.params",oe(t.params),"object"):Object(Ut.m)(t,"params")&&Object.keys(t.params).forEach((function(e){return"string"==typeof t.params[e]||"number"==typeof t.params[e]||(Object(Ut.k)(t.params[e])?!!t.params[e].reduce((function(t,e){return t&&("string"==typeof e||"number"==typeof e)}),!0)||(Object(Vt.b)({name:"non-string array item",message:"'init.config.params.".concat(e," contains a non-string item")},"TypeError-init.config.params.".concat(e),!0),!1):(Object(Vt.c)("init.config.params.".concat(e),oe(t.params[e]),"string' or 'array"),!1))})),Object(Ut.m)(t,"blockedBidders")&&!Object(Ut.k)(t.blockedBidders)?Object(Vt.c)("init.config.blockedBidders",oe(t.blockedBidders),"array"):Object(Ut.m)(t,"blockedBidders")&&Object(Ut.k)(t.blockedBidders)&&(t.blockedBidders.reduce((function(t,e){return t&&("string"==typeof e||"number"==typeof e)}),!0)||Object(Vt.b)({name:"non-string array item",message:"'init.config.blockedBidders contains a non-string item"},"TypeError-init.config.blockedBidders",!0)),Object(te.b)(t.simplerGPT,["undefined","boolean"])||Object(Vt.c)("init.config.simplerGPT",oe(t.simplerGPT),"boolean"),Object(te.b)(t.deals,["undefined","boolean"])||Object(Vt.c)("init.config.deals",oe(t.deals),"boolean")}catch(e){Object(Vt.b)(e,"_validateAndStoreConfig-validateConfig")}try{var e=Nt.a.getState().config;Object(Ut.m)(e,"pubID")&&Object(Ut.m)(t,"pubID")&&e.pubID!==t.pubID&&Object(Vt.b)(new Error("`apstag.init` was called multiple times with different pubIDs (".concat(e.pubID," then ").concat(t.pubID,")")),"_validateAndStoreConfig-diffPubId",!0),Nt.a.dispatch({type:"SET_GDPR_CONFIG",config:null}),Nt.a.dispatch({type:"SET_CONFIG",config:t,defaultCmpTimeout:Nt.a.getState().cfg.GDPR_CMP_TIMEOUT})}catch(e){Object(Vt.b)(e,"_validateAndStoreConfig",!0)}}function h(t){try{var e=t.slotID;if(Object(Ut.m)(t.bidConfig,"mediaType")&&"v"===t.bidConfig.mediaType)return;if(!Wt.a.hasAdServerObjectLoaded())return void Object(Vt.a)("displayAdServer Object hasn't been defined",!0);if(!Wt.a.isCommandQueueDefined())return void Object(Vt.a)("displayAdServer Object's cmd queue hasn't been defined",!0);Wt.a.hasAdServerObjectLoaded()?null!==O(e)?R(t):Object(Vt.a)("".concat(e," isn't defined when trying to set amazon bid!")):Wt.a.cmdQueuePush((function(){h(t)}))}catch(t){Object(Vt.b)(t,"_safeApplySlotTargeting",!0)}}function O(t){var e=null;try{e=Object(Mt.b)(Wt.a).filter((function(e){return e.slotID===t}))[0]||null}catch(e){Object(Vt.b)(e,"_getAdServerSlot")}return e}function j(t){try{var e=Nt.a.getState().targetingKeys[t.slotID];Wt.a.hasAdServerObjectLoaded()&&Object(Ut.k)(e)&&e.forEach((function(e){return 0<t.getTargeting(e).length&&t.clearTargeting(e)}))}catch(e){Object(Vt.b)(e,"_clearTargetingFromSlot",!0)}}function S(t){try{if(Object(Ut.m)(Nt.a.getState().slotBids,t.slotID)){var e=Nt.a.getState().slotBids[t.slotID].filter((function(t){return t.bidState===Gt.b.set}))[0];e&&e.bidState===Gt.b.set&&Nt.a.dispatch({type:"BID_STATE_CHANGE",slotID:t.slotID,_targetingSetID:e._targetingSetID,bidState:Gt.b.exposed})}}catch(t){Object(Vt.b)(t,"_clearBidSetOnSlot",!0)}}function v(t,e){try{return t.map((function(t){return Object(Ut.j)(e,t)})).filter((function(t){return t})).length===t.length}catch(t){return void Object(Vt.b)(t,"_hasAllItemsInArray")}}function _(){var t={};try{Object.keys(Nt.a.getState().slotBids).forEach((function(e){var n=Nt.a.getState().slotBids[e].filter(Yt.g);0<n.length&&(t[e]=n.map((function(t){return{rqTs:Nt.a.getState().AAXReqs.filter((function(e){return e.bidReqID===t.bidReqID}))[0].rqTs,bid:t}})).reduce((function(t,e){return t.rqTs>e.rqTs?t:e})).bid)}))}catch(t){Object(Vt.b)(t,"_getCurrentSlotBids",!0)}return t}function w(t,e){try{return Object(Ut.k)(Nt.a.getState().targetingKeys[t])?e?["amzniid_sp"]:Nt.a.getState().targetingKeys[t].filter((function(t){return-1<t.indexOf("amzniid")&&t.indexOf("amzniid_sp")<0})):["amzniid"]}catch(t){return Object(Vt.b)(t,"_getAllBidIdKeys"),[]}}function D(t,e){var n,r;try{var o=Nt.a.getState().slotBids;Object.keys(o).forEach((function(i){o[i].forEach((function(o){w(i,e).forEach((function(e){o.bidConfig[e]===t&&(n=o,"amzniid_sp"===e?r="sp":"amzniid"!==e&&(r=e.substr(0,e.indexOf("amzniid"))))}))}))}))}catch(t){Object(Vt.b)(t,"_findSlotBidByBidID",!0)}return{slotBid:n,dealId:r}}function E(t,e,n){var r="";try{e.bidConfig[n+"amzniid"]===t&&(r=n.split("_").pop().trim())}catch(t){Object(Vt.b)(t,"_getPMPBidSize")}return r}function I(t){try{if(void 0===t.slots)return[];var e={};return t.slots.forEach((function(t){"video"!==t.mediaType?e[t.slotID]=new Yt.a(t):(0<=t.slotID.indexOf("rsv-")&&(t={slotID:t.slotID.substring(4),r_amznbid:t.amznbid,r_amzniid:t.amzniid,r_amznp:t.amznp,mediaType:"video",targeting:["r_amznbid","r_amzniid","r_amznp"],amznsz:t.amznsz,size:t.size,crid:t.crid,meta:t.meta}),Object(Ut.m)(e,t.slotID)?t.targeting.forEach((function(n){e[t.slotID].bidConfig[n]=t[n],-1===e[t.slotID].bidConfig.targeting.indexOf(n)&&e[t.slotID].bidConfig.targeting.push(n)})):e[t.slotID]=new Yt.a(t))})),Object.keys(e).map((function(t){return e[t]}))}catch(t){return Object(Vt.b)(t,"_mergeVideoBids"),[]}}function T(t){var e=I(t),n=[];try{n=e.map((function(e){return e.bidReqID=t.cb,e.host=t.host,e.ev=t.ev,e.cfe=t.cfe,e}))}catch(e){Object(Vt.b)(e,"_convertAaxResponse")}return n}function R(t){try{var e=t.slotID,n=t._targetingSetID,r=t.bidConfig.targeting?t.bidConfig.targeting:zt("display");if(t.bidState===Gt.b.set)return;var o=O(e);null!==o&&(S(o),Object.keys(t.bidConfig).filter((function(t){return Object(Ut.j)(r,t)})).forEach((function(e){return o.setTargeting(e,t.bidConfig[e])})),Nt.a.dispatch({type:"BID_STATE_CHANGE",slotID:e,_targetingSetID:n,bidState:Gt.b.set,ts:Date.now()}))}catch(e){Object(Vt.b)(e,"_applyTargetingToAdServerSlot",!0)}}function A(t){try{var e=_();t.forEach((function(t){e[t]&&h(e[t])}))}catch(t){Object(Vt.b)(t,"_applySuppliedSlotBidsToAdServerObject",!0)}}function C(){try{var t=_();Object.keys(t).forEach((function(e){return h(t[e])}))}catch(t){Object(Vt.b)(t,"_applyAllCurrentSlotBidsTargetingToAdServerObject",!0)}}function P(t){try{t?A(t):C(),Nt.a.getState().displayAdServer.slotRenderEndedSet||(Wt.a.cmdQueuePush((function(){try{Wt.a.slotRenderEndedEvent((function(t){try{j(t),S(t)}catch(t){Object(Vt.b)(t,"_applySlotTargeting-cmdQueue-slotCb",!0)}}))}catch(t){Object(Vt.b)(t,"_applySlotTargeting-cmdQueue",!0)}})),Nt.a.dispatch({type:"SLOT_RENDER_ENDED_SET"}))}catch(t){Object(Vt.b)(t,"_applySlotTargeting",!0)}}function k(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",e="1881141382166183";function n(t){try{var e=JSON.parse(t),n=e.fbToken,r=new Date(parseInt(e.expAfter,10)).toUTCString();document.cookie="aps_ext_917=".concat(n,"; expires=").concat(r)}catch(t){Object(Vt.b)(t,"_doFbSync-setFbCookie")}}function r(e){try{!function(t,e,n){try{!function(t,e){try{var n={url:t,withCredentials:!0,onload:function(t){return e(t.responseText)}};Object(Kt.d)(n)}catch(t){Object(Vt.b)(t,"_doFbSync-sendTokenRequest")}}(function(t,e){try{return"".concat("https://www.facebook.com/audiencenetwork/token/update","?partner=").concat(encodeURIComponent(t),"&vr_token=").concat(encodeURIComponent(e))}catch(t){return Object(Vt.b)(t,"_doFbSync-getUpdateUrl"),""}}(t,e),n)}catch(t){Object(Vt.b)(t,"_doFbSync-getV4Token")}}(e,function(){try{for(var e="VR_",n=0;n<197;++n)e+=t.charAt(Math.floor(Math.random()*t.length));return e}catch(e){return Object(Vt.b)(e,"_doFbSync-getVrToken"),""}}(),n)}catch(e){Object(Vt.b)(e,"_doFbSync-getTokenResponse")}}try{"complete"===document.readyState?r(e):window.addEventListener("load",(function(){r(e)}))}catch(e){Object(Vt.b)(e,"_doFbSync")}}function z(t,e){function n(){if(!o)if(20<=i++)Object(Vt.b)({name:"LoopError",message:"Too many attempts to append to document.body"},"_safeDocumentBodyAppendChild-callback-loops",!0);else{try{if(t&&t.body&&null!==t.body&&"function"==typeof t.body.appendChild)return t.body.appendChild(e),r(),void(o=!0)}catch(t){Object(Vt.b)(t,"_safeDocumentBodyAppendChild-callback")}setTimeout(n,100)}}var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(){},o=!1,i=0;try{"complete"===t.readyState||"interactive"===t.readyState?n():t.addEventListener("DOMContentLoaded",n)}catch(t){Object(Vt.b)(t,"_safeDocumentBodyAppendChild")}}function B(t){try{var e,n;return e="".concat(t.host).concat(Nt.a.getState().cfg.DTB_PATH,"/imp"),n="".concat(t.host).concat(Nt.a.getState().cfg.DTB_PATH,"/adm"),t.cfe||t.isAmp?n:e}catch(t){return Object(Vt.b)(t,"determineCreativeFetchEndpoint"),""}}function x(t){try{var e,n="?b=".concat(t.bidID,"&rnd=").concat(Object(Ut.e)());return Object(Ut.m)(t,"pp")&&(n+="&pp=".concat(t.pp)),Object(Ut.m)(t,"amznp")&&(n+="&p=".concat(t.amznp)),Object(Ut.m)(t,"crID")&&(n+="&crid=".concat(t.crID)),Object(Ut.m)(t,"isSharedPMP")&&!0===t.isSharedPMP&&(n+="&sp=true"),e=B(t),t.fif?"".concat(e,"j").concat(n):"".concat(e,"i").concat(n)}catch(t){return Object(Vt.b)(t,"_creativeURL"),""}}function L(t){try{var e=t.doc.createElement("iframe");return e.frameBorder="0",e.marginHeight="0",e.marginWidth="0",e.style.marginTop="0",e.style.marginLeft="0",e.scrolling="no",t.inheritSize?(e.width="100%",e.height="100%"):(e.width="".concat(t.sizes[0],"px"),e.height="".concat(t.sizes[1],"px")),e}catch(t){return Object(Vt.b)(t,"_baseIframe"),window.document.createElement("iframe")}}function N(t){try{if(Object(Ut.m)(t,"bidType")){var e=t.kvMap;switch(t.bidType){case"sharedPMP":return{bidID:e.amzniid_sp[0],pp:e.amznbid_sp[0],sizes:e.amznsz_sp[0].split("x"),amznp:e.amznp_sp[0],isSharedPMP:t.isSharedPMP};case"preferredPMP":if(Object(Zt.b)(t)&&Object(Ut.m)(t,"amzndeal")){var n=t.amzndeal.split("_").pop().trim();return{bidID:e["".concat(t.amzndeal,"amzniid")][0],sizes:vt(n)}}break;case"openAuction":if(Object(Zt.b)(t)&&Object(Ut.m)(t,"kvMap"))return{bidID:e.amzniid[0],pp:Object(qt.b)(e.amznbid[0]),amznp:e.amznp[0],sizes:e.amznsz[0].split("x")};if(Object(Zt.c)(t))return{bidID:t.amzniid,pp:Object(qt.b)(t.amznbid),amznp:t.amznp,sizes:t.amznsz.split("x")};break;default:Object(Vt.b)({name:"Invalid AMP Bid Type: ".concat(t.bidType),message:"No valid AMP bid type"},"getAmpAdData-invalidBidType")}}}catch(t){Object(Vt.b)(t,"getAmpAdData")}return{bidID:"ERROR",sizes:[]}}function q(t,e){try{var n=null;if(void 0!==e&&Object(Ut.m)(e,"ampEnv")&&e.ampEnv&&(n=e,Object(Ut.m)(e,"bidType")&&"sharedPMP"===e.bidType?n.isSharedPMP=!0:n.isSharedPMP=!1,n.document=t,n.amznhost=n.kvMap.amznhost[0]),jt(t)&&((n=t).bidType="openAuction",n.ampEnv=!0),null===n)return void Object(Vt.b)(new Error("Invalid AMP parameters"),"_renderAmpImpression-invalidParams",!0);var r=N(n);if("ERROR"===r.bidID)return;if(r.doc=n.document,r.host=n.amznhost.replace("http://","https://"),r.adID="amznad".concat(Object(Ut.e)()),r.isAmp=n.ampEnv,r.isSf=Object(Ht.c)(window),Nt.a.getState().aaxViewabilityEnabled)return void Dt(r,r.doc);M(r)}catch(t){Object(Vt.b)(t,"_renderAmpImpression")}}function U(t){var e,n,r=20;function o(){try{if(r--,null===e.contentDocument&&r<=0&&(Object(Vt.b)({name:"NoDocument",message:"iframe.contentDocument was null inside renderAd"},"__loadAdIntoFriendlyIframe-renderAd-noDocument",!0),clearInterval(n)),null===e.contentDocument)return;if(t.hasRendered)return void Object(Vt.b)({name:"DupeRender",message:"Render was called twice"},"__loadAdIntoFriendlyIframe-renderAd-rerender",!0);clearInterval(n),t.hasRendered=!0,e.contentDocument.open(),e.contentDocument.write(t.html),e.contentDocument.close()}catch(t){Object(Vt.b)(t,"__loadAdIntoFriendlyIframe-renderAd")}}try{if(void 0===t.html)throw new Error("No HTML available for ad, most likely the creative has expired");t=ne({hasRendered:!1},t),(e=L(t)).id="apstag-f-iframe-".concat(Object(Ut.e)()),z(t.doc,e,(function(){try{null!==e.contentDocument&&Object(Ut.j)(["complete","interactive"],e.contentDocument.readyState)?o():null!==e.contentDocument?e.contentDocument.addEventListener("DOMContentLoaded",o):(n=setInterval(o,50),Object(Vt.b)({name:"NoDocument",message:"iframe.contentDocument is null"},"_loadAdIntoFriendlyIframe-noDocument"))}catch(t){Object(Vt.b)(t,"_loadAdIntoFriendlyIframe-setAttributes")}}))}catch(t){Object(Vt.b)(t,"_loadAdIntoFriendlyIframe",!0)}}function M(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{states:{csmLoaded:!1,iframeLoaded:!1,shouldRunViewability:!1}},n=2<arguments.length?arguments[2]:void 0;try{var r=L(t);if(r.id=t.adID,r.setAttribute("sandbox","allow-forms allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation"),Object(Ft.d)("fake_bids")){var o='<body style="background-color: #FF9900;">'.concat(50<parseInt(t.sizes[1],10)?"<h3>apstag Test Creative</h3>":"","<h4>amzniid - ").concat(t.bidID," | amznbid: ").concat(t.pp," | size: ").concat(t.sizes.join("x"),"</h4></body>");r.src="javascript:'".concat(o,"'")}else r.src=x(t);t.isAmp&&t.isSf&&Object(Ht.b)(window)&&Object(Ht.a)(t.sizes,window),z(t.doc,r),(e.iframe=r).onload=function(){e.states.iframeLoaded=!0,n&&n()}}catch(t){Object(Vt.b)(t,"_loadAdIntoUnfriendlyIframe",!0)}}function F(t){var e=t.states,n=t.doc,r=t.bidID,o=t.iframe;try{if(Object(Ut.a)(e))return;var i;e.shouldRunViewability=!1,Object(Ut.m)(window,"amzncsm")?i=window.amzncsm:void 0!==n&&null!==n.defaultView&&Object(Ut.m)(n.defaultView,"amzncsm")&&(i=n.defaultView.amzncsm),void 0!==n&&void 0!==i&&Object(Ut.m)(i,"rmD")&&(i.host=Object(Ft.c)("host",Nt.a.getState().hosts.DEFAULT_AAX_PIXEL_HOST),i.rmD(o,r,n.defaultView,n,Nt.a.getState().config.pubID))}catch(t){Object(Vt.b)(t,"_triggerViewability")}}function G(t,e){return function(n){try{var r=Object(Yt.f)(e.slots),o=Object.keys(r),i=[];n&&(Nt.a.dispatch({type:"RECORD_AAX_REQ_PROP",bidReqID:e.bidReqID,key:"timedOutAt",value:Date.now()}),Nt.a.getState().experiments.chunkRequests&&Nt.a.dispatch({type:"RECORD_TIMEOUT",fid:e.bidReqID,timeOut:Date.now()})),o.forEach((function(t){if(Object(Ut.m)(r,t)){var e=r[t];Object(Yt.h)(Nt.a.getState(),Wt.a)||Object(Ut.m)(e.bidConfig,"amznbid")?Object(Ut.m)(e.bidConfig,"amznp")||(e.bidConfig.amznp=""):e=Object(Yt.e)(e.slotID,Gt.r.noBid),i.push(e)}})),Wt.a.isSupported&&(i=Object(Yt.c)(i,e,n));var c={fromTimeout:n},a=Object(Yt.h)(Nt.a.getState(),Wt.a);t(i.map((function(t){return a?t.newBidObject:t.bidObject})),c)}catch(n){Object(Vt.b)(n,"_bidCallbackHandler",!0)}}}function Q(t,e){try{var n;n=t.defaultView&&t.defaultView.frameElement?t.defaultView.frameElement:window.frameElement,e.inheritSize||(n.width=e.sizes[0],n.height=e.sizes[1])}catch(t){Object(Vt.b)(t,"_resizeIframe")}}function H(t){try{return"".concat(t[0],"x").concat(t[1])}catch(t){return Object(Vt.b)(t,"_sizeArrayToSring"),"x"}}function X(t){try{return 1===t.length?H(t[0]):H(t[Math.floor(t.length*Math.random())])}catch(t){return Object(Vt.b)(t,"_pickRandomSizeForMockBid",!0),""}}function V(t,e){try{var n,r=Object(Ft.c)("host",Nt.a.getState().hosts.DEFAULT_AAX_BID_HOST),o=Object(qt.f)(window),i=t.bidReqID,c=Object(Ut.h)(window),a=Object(Ft.c)("testBidTimeout",200);Nt.a.dispatch({type:"RECORD_AAX_REQUEST",data:{bidConfig:t,timeout:a,bidReqID:i,ws:c,url:o,rqTs:Date.now()}}),n=t.slots.map((function(t){var e,n=X(t.sizes),r="testDeal".concat(Object(Ut.e)(),"_").concat(n),o="testDealIi-".concat(Object(Ut.e)()),i=X(t.sizes),c=(re(e={slotID:t.slotID,crid:"".concat(Gt.m.crid,"-").concat(Object(Ut.e)()),size:i,amzniid:"".concat(Gt.m.amzniid,"-").concat(Object(Ut.e)()),amznbid:Gt.m.amznbid,amznp:Gt.m.amznp,amznsz:i,amzniid_sp:"".concat(Gt.m.amzniid,"-").concat(Object(Ut.e)()),amznbid_sp:"".concat(Gt.m.amznbid,"SP"),amznp_sp:"".concat(Gt.m.amznp,"SP"),amznsz_sp:X(t.sizes),amzndeals:[r]},"".concat(r,"amzniid"),o),re(e,"mediaType","d"),re(e,"meta",["slotID","mediaType","size"]),re(e,"targeting",["amzniid","amznbid","amznp","amznsz","amzniid_sp","amznbid_sp","amznp_sp","amznsz_sp","amzndeal_sp","amzndeals","".concat(r,"amzniid")]),e);"video"===t.mediaType&&(c.mediaType="video",c.amznbid="v_".concat(c.amznbid));var a=new Yt.a(c);return Object(Yt.h)(Nt.a.getState(),Wt.a)?a.newBidObject:a.bidObject})),setTimeout((function(){window.apstag.bids({slots:n,host:r,status:"ok",cb:i}),e(!0)}),a)}catch(t){Object(Vt.b)(t,"_doMockBid",!0)}}function K(t){try{var e=Nt.a.getState().AAXReqs.filter((function(e){return e.bidReqID===t.cb}))[0];if(e&&e.bidConfig&&e.bidConfig.slots){var n=e.bidConfig.slots.filter(Mt.d).map((function(t){return t.slotID})),r=Object(Ut.m)(t,"slots")?t.slots.map((function(t){return t.slotID})):[],o=n.filter((function(t){return!Object(Ut.j)(r,t)}));Nt.a.dispatch({type:"NO_BID_ON_ADSERVER_SLOTS",slotIDs:o}),Wt.a.hasAdServerObjectLoaded()?Y():Wt.a.isCommandQueueDefined()&&Wt.a.cmdQueuePush((function(){Y()}))}}catch(e){Object(Vt.b)(e,"_determineNoBidStateForAdServerObject")}}function J(t){return Object(Ut.j)(Nt.a.getState().AAXReqs.filter((function(t){return!t.resTs})).map((function(t){return t.bidConfig.slots})).reduce((function(t,e){return t.concat(e)}),[]).map(Mt.c),t)}function W(t){try{var e=t.getTargeting("amznbid");return 0<e.length&&2<e[0].length}catch(t){return Object(Vt.b)(t,"_isRealAmznbidTargetingSetOnSlot"),1}}function Y(){try{Wt.a.hasAdServerObjectLoaded()&&"1"===Wt.a.getTargeting("amznbid")[0]&&Z(),Object(Mt.b)(Wt.a).forEach((function(t){!Object(Ut.j)(Nt.a.getState().displayAdServer.noBidSlotIDs,t.slotID)||J(t.slotID)||W(t)||"2"===t.getTargeting("amznbid")[0]||$("noBid",t)}))}catch(t){Object(Vt.b)(t,"_applyNoBidFromAAXState")}}function $(t,e){Gt.s.forEach((function(n){return e.setTargeting(n,Gt.r[t])}))}function Z(){Gt.s.forEach((function(t){return Wt.a.clearTargeting(t)}))}function tt(t){try{var e={_type:"dupePixel",dd:Date.now()-t.timing.renderTime};Object(Xt.a)(t.bidConfig.amzniid,e)}catch(t){Object(Vt.b)(t,"_sendDupeBidPixel")}}function et(){try{var t=Object(Qt.c)(window,new RegExp("aax2/apstag.js"));if(null!==t){var e={_type:"libLatency",pid:Yt.b,ns:r,fs:Object(Qt.a)(t,"fetchStart"),re:Object(Qt.a)(t,"responseEnd")},n=Object(Qt.f)(t);null!==n&&(e.c=n?1:0),setTimeout(Xt.b,1e3,e)}}catch(t){Object(Vt.b)(t,"_sendInitLatencyPixel")}}!function(){if(Object(Ut.i)()){var t=localStorage.getItem(Gt.c);if(t){var e=JSON.parse(t);null!==e&&Nt.a.dispatch({type:"SET_CFG",cfg:e})}}}();var nt=0,rt;function ot(){try{if(!Object(Ut.m)(window,"googletag")||!Object(Ut.m)(window.googletag,"cmd"))return void(++nt<5&&setTimeout(ot,100));(new Jt.a).cmdQueuePush((function(){try{window.googletag.pubads().addEventListener("slotRequested",(function(t){try{var e=t.slot;Nt.a.dispatch({type:"LOG_GAM_EVENT",event:ne({},new Jt.b(e).slotConfig,{ts:Date.now(),targeting:e.getTargetingMap()})})}catch(t){Object(Vt.b)(t,"_initializeSlotRequestedEventListener-cmdQueue-listener")}}))}catch(t){Object(Vt.b)(t,"_initializeSlotRequestedEventListener-cmdQueue")}}))}catch(t){Object(Vt.b)(t,"_initializeSlotRequestedEventListener")}}function it(t){try{var e=t.AAXReqs.slice(t.gamSlotRenderPixel.aaxReqOffset).reduce((function(t,e){return t.concat(e.bidConfig.slots)}),[]).map((function(t){return ne({},t,{type:"a"})})).filter((function(t){return"video"!==t.mediaType})),n=t.gamSlotFetchLog.slice(t.gamSlotRenderPixel.gamSlotFetchLogOffset).map((function(t){return ne({},t,{type:"g"})})),r=[].concat(ee(e),ee(n)).reduce((function(t,e){return void 0===t[e.slotID]&&(t[e.slotID]={sd:e.slotID,a:{c:0},g:{c:0}}),t[e.slotID][e.type].c++,t[e.slotID][e.type].s=e.sizes,t[e.slotID][e.type].sn=e.slotName||"",t}),{});return Object.keys(r).map((function(t){return r[t]})).filter((function(t){return 0!==t.a.c||0!==t.g.c}))}catch(t){return Object(Vt.b)(t,"getSlotFetchCounts"),[]}}function ct(){try{var t=Nt.a.getState(),e=it(t);0<Object.keys(e).length&&(Object(Ut.c)(e,5).forEach((function(e){var n={slots:e,pid:Yt.b,url:Object(qt.f)(window).split("?")[0],ws:Object(Ut.h)(window),pubid:t.config.pubID,_type:"slotRenders"};Object(Xt.b)(n)})),Nt.a.dispatch({type:"UPDATE_RENDER_OFFSETS",offsets:{aaxReqOffset:t.AAXReqs.length,gamSlotFetchLogOffset:t.gamSlotFetchLog.length}}))}catch(e){Object(Vt.b)(e,"sendDisplayAdServerRenderPixel")}}function at(){setInterval((function(){ct()}),5e3)}function ut(){try{setTimeout((function(){try{var t=ft().filter((function(t){return!Object(Ut.m)(Nt.a.getState().bsPixels,t.iid)||t.state!==Nt.a.getState().bsPixels[t.iid]}));t&&t.length&&0<t.length&&(t.forEach((function(t){return Object(Xt.a)(t.iid,dt(t))})),st(t));var e={fetchStart:"a",domainLookupStart:"b",domainLookupEnd:"c",connectStart:"d",secureConnectionStart:"e",connectEnd:"f",requestStart:"g",responseStart:"h",responseEnd:"i"};Object.keys(Nt.a.getState().slotBids).forEach((function(t){Nt.a.getState().slotBids[t].forEach((function(n){if(Object(Ut.m)(n.bidConfig,"amzniid")&&!n.pixelSent){var r=Nt.a.getState().AAXReqs.filter((function(t){return t.bidReqID===n.bidReqID}))[0];if("object"===oe(r)&&null!==r){var o=r.rqTs-Object(Qt.d)(),i={pid:Yt.b,ns:r.bidConfig.slots.length,fid:n.bidReqID,fbrq:r.rqTs,_type:"latencyBd"};"object"===oe(r.perf)&&null!==r.perf&&Object.keys(e).forEach((function(t){Object(Ut.m)(r,"perf")&&0!==Object(Qt.a)(r.perf,t)&&(i[e[t]]=Object(Qt.a)(r.perf,t)-o)})),i.j=r.resTs-r.rqTs,Object(Xt.a)(n.bidConfig.amzniid,i),Nt.a.dispatch({type:"UPDATE_BID_INFO_PROP",slotID:t,iid:n.bidConfig.amzniid,key:"pixelSent",value:!0})}}}))})),ut()}catch(t){Object(Vt.b)(t,"_sendBidsSetOnDFPPixel-timeout")}}),5e3)}catch(t){Object(Vt.b)(t,"_sendBidsSetOnDFPPixel")}}function st(t){t.forEach((function(t){return Nt.a.dispatch({type:"RECORD_BID_INFO_SENT",bidInfo:t})}))}function dt(t){try{var e=lt(t.fid),n={status:t.state,pubid:Nt.a.getState().config.pubID,_type:"bidSetPixel",toa:Object(Ut.m)(e.req,"timedOutAt")?e.req.timedOutAt:0,fbrq:e.req.rqTs,pto:e.req.timeout,ns:e.req.bidConfig.slots.length,bla:e.req.resTs-e.req.rqTs,reqindex:e.index,fid:t.fid,tbs:0};Nt.a.getState().cfg.CHUNK_BID_REQUESTS_PROPORTION&&(n.eid=Nt.a.getState().experiments.chunkRequests?2:1,n.fbindex=e.fbIndex,n.fbns=Nt.a.getState().bidConfigs[parseInt(t.fid.split("-")[0],10)].slots.length);var r=Nt.a.getState().experiments;Object(Ut.m)(r,"shouldUseTestBidEndpoint")&&(n.tbs=r.shouldUseTestBidEndpoint?2:1),t.delta&&(n.delay=t.delta);var o=e.req.perf;return void 0!==o&&(n.ul=e.req.urlLength,n.es=Object(Qt.a)(o,"encodedBodySize")),n}catch(t){return Object(Vt.b)(t,"_mapBidInfoToPixel"),{_type:"bidSetPixel",status:-1,pubid:"",toa:0,fbrq:0,pto:0,ns:0,bla:0,reqindex:0,fid:"",tbs:0}}}function lt(t){var e=Nt.a.getState().AAXReqs.filter((function(e){return e.bidReqID===t}))[0],n=Nt.a.getState().AAXReqs.indexOf(e)+1,r={req:e,index:n,fbIndex:n};return r.index=Nt.a.getState().AAXReqs.indexOf(r.req)+1,Nt.a.getState().experiments.chunkRequests&&(r.fbIndex=Nt.a.getState().AAXReqs.filter((function(t){return-1===t.bidReqID.indexOf("-")||"0"===t.bidReqID.split("-")[1]})).map((function(t){return t.bidReqID.split("-")[0]})).indexOf(t.split("-")[0])+1),r}function ft(){try{var t=mt(),e=[];return null===t||Object.keys(Nt.a.getState().slotBids).forEach((function(n){"video"!==Nt.a.getState().slotBids[n][0].bidConfig.mediaType&&Nt.a.getState().slotBids[n].filter((function(t){return Object(Ut.m)(t.bidConfig,"amzniid")})).forEach((function(r){if(null!==t){var o={state:-1,slotID:n,iid:r.bidConfig.amzniid,fid:r.bidReqID},i=[],c=[];if(n in t&&(i=t[n].fetchedAt.filter((function(t){return t.AAXReqInfo&&t.AAXReqInfo.bidReqID===r.bidReqID})),c=t[n].targetedAt.filter((function(t){return t.targeting===r.bidConfig.amzniid}))),0<i.length?0<i.length&&c.length>=i.length&&i.slice(i.length-1)[0].ts>c.slice(i.length-1)[0].ts?1===t[n].fetchWithIID.filter((function(t){return t===r.bidConfig.amzniid})).length?o.state=1:o.state=4:Object(Ut.j)(t[n].fetchWithIID,r.bidConfig.amzniid)?o.state=3:o.state=2:o.state=0,1===o.state||2===o.state){var a=Nt.a.getState().AAXReqs.filter((function(t){return t.bidReqID===r.bidReqID}))[0].resTs,u=bt(a,t[n].fetchedAt,2===o.state);u&&Object(Ut.m)(u,"ts")&&(o.delta=a-u.ts)}e.push(o)}}))})),e}catch(t){return Object(Vt.b)(t,"_getBidSetInfo"),[]}}function bt(t,e,n){var r=e.map((function(e){var r=t-e.ts;return!n&&r<=0?-r:n&&0<=r?r:null}));return e[pt(r)]}function pt(t){for(var e=-1,n=-1,r=0;r<t.length;r++)null!==t[r]&&(-1===n||t[r]<e)&&(e=t[n=r]);return n}function gt(t,e){return Nt.a.getState().AAXReqs.filter((function(t){return Object(Ut.j)(t.bidConfig.slots.map((function(t){return t.slotID})),e)}))[t]}function mt(){try{if(!Wt.a.hasAdServerObjectLoaded())return null;var t=Nt.a.getState().gamSlotFetchLog.reduce((function(t,e){Object(Ut.m)(t,e.slotID)||(t[e.slotID]={fetchedAt:[],targetedAt:[]});var n=t[e.slotID];return n.fetchedAt.push({ts:e.ts,AAXReqInfo:gt(n.fetchedAt.length,e.slotID)}),Object(Ut.m)(e.targeting,"amzniid")&&0<e.targeting.amzniid.length?n.targetedAt.push({ts:e.ts-1,targeting:e.targeting.amzniid[0]}):n.targetedAt.push({ts:e.ts-1,targeting:""}),t}),{});return Object.keys(t).forEach((function(e){if(Object(Ut.m)(t,e)){var n=t[e];n.fetchWithIID=n.fetchedAt.map((function(t){var e=bt(t.ts,n.targetedAt,!0);return e?e.targeting:0})),t[e]=n}})),t}catch(t){return Object(Vt.b)(t,"_getDFPSlotFetches"),null}}function yt(){try{Wt.a.hasAdServerObjectLoaded()?$("noRequest",Wt.a):Wt.a.isCommandQueueDefined()&&Wt.a.cmdQueuePush((function(){$("noRequest",Wt.a)}))}catch(t){Object(Vt.b)(t,"_applyNoRequestToAAXState")}}function ht(t){try{Wt.a.isCommandQueueDefined()&&(Nt.a.dispatch({type:"REQUESTED_BID_FOR_ADSERVER_SLOTS",slotIDs:t}),Wt.a.cmdQueuePush((function(){try{var e=Object(Mt.b)(Wt.a);"0"===Wt.a.getTargeting("amznbid")[0]&&Z(),v(t,e.map((function(t){return t.slotID})))?e.forEach((function(e){Object(Ut.j)(t,e.slotID)&&!W(e)&&$("bidInFlight",e)})):Wt.a.cmdQueuePush((function(){try{$("bidInFlight",Wt.a)}catch(t){Object(Vt.b)(t,"_setRequestToAAXInFlightState-cmdQueue-cmdQueue")}}))}catch(e){Object(Vt.b)(e,"_setRequestToAAXInFlightState-cmdQueue")}})))}catch(t){Object(Vt.b)(t,"_setRequestToAAXInFlightState")}}function Ot(){try{return Object(Ut.m)(window,"AMP_CONTEXT_DATA")&&Object(Ut.m)(window.AMP_CONTEXT_DATA,"tagName")&&"AMP-AD"===window.AMP_CONTEXT_DATA.tagName}catch(t){return void Object(Vt.b)(t,"_isInAmpAd")}}function jt(t){try{return Object(Ut.m)(t,"type")&&!(t instanceof Document)&&"amp"===t.type}catch(t){return Object(Vt.b)(t,"_isLegacyAmpCreative"),!1}}function St(t,e){try{return void 0!==e&&Object(Ut.m)(e,"ampEnv")&&e.ampEnv||jt(t)}catch(t){return void Object(Vt.b)(t,"_isAmpImpression")}}function vt(t){return t.split("x")}function _t(t,e,n){try{Object(Xt.d)()}catch(t){Object(Vt.b)(t,"_renderImp-pixels")}try{if(St(t,n)&&Ot())return void q(t,n);1!==arguments.length||Object(Zt.a)(t)||Object(Vt.b)({message:JSON.stringify(Object.keys(t)),name:"IncorrectJsonp"},"_renderImp-IncorrectArgJsonP");var r=!1;"string"==typeof e&&0===e.indexOf("sp|")&&(e=e.substring(3),r=!0);var o,i=e||t.amzniid,c=D(i,r),a=c.slotBid,u=c.dealId;if(a){if(o=u&&1<=u.length?vt("sp"===u?a.bidConfig.amznsz_sp:E(i,a,u)):vt(a.bidConfig.amznsz),1===arguments.length)return void U({doc:a.doc,bidID:a.bidConfig.amzniid,sizes:o,html:t.html,inheritSize:!1});a.bidState===Gt.b.rendered&&tt(a),Nt.a.dispatch({type:"BID_STATE_CHANGE",slotID:a.slotID,_targetingSetID:a._targetingSetID,bidState:Gt.b.rendered,ts:Date.now()});var s=a.host,d="amznad".concat(Math.round(1e6*Math.random())),l={bidID:i,doc:t,pp:wt("amznbid",a,u),host:s,adID:d,sizes:o,amznp:wt("amznp",a,u),crID:wt("crid",a,u),fif:!1,dealId:u,isSharedPMP:r,cfe:a.cfe,inheritSize:Object(Ut.l)(n)&&Object(Ut.m)(n,"inheritSize")&&!0===n.inheritSize};"1"===a.bidConfig.fif?(l.fif=!0,Nt.a.dispatch({type:"UPDATE_BID_INFO_PROP",slotID:a.slotID,iid:e,key:"doc",value:t}),Object(Kt.b)(x(l),(function(){}),document,(function(){return Object(Vt.b)(new Error("Error Loading JSONP Render Callback"),"renderImp-fif-callback-load",!0)}))):Nt.a.getState().aaxViewabilityEnabled?Dt(l,t):M(l),Q(t,l)}else Object(Vt.b)(new Error("Invalid bid ID tried to render"),"_renderImp-invalidId",!0)}catch(t){Object(Vt.b)(t,"_renderImp",!0)}}function wt(t,e,n){try{var r="";if(void 0!==n&&1<=n.length){var o="".concat(t,"_sp");"sp"===n&&Object(Ut.m)(e.bidConfig,o)&&(r=e.bidConfig[o])}else Object(Ut.m)(e.bidConfig,t)&&(r=e.bidConfig[t]);return r}catch(t){return Object(Vt.b)(t,"_getProperBidInfoValue"),""}}function Dt(t,e){try{var n=e.createElement("script");n.type="text/javascript",n.async=!0;var r={doc:e,bidID:t.bidID,states:{csmLoaded:!1,iframeLoaded:!1,shouldRunViewability:!0}},o=F.bind(null,r);Object(Kt.a)(n,(function(){r.states.csmLoaded=!0,o()}));try{n.addEventListener("error",(function(t){return Object(Xt.b)({_type:"csm_fail",ts:Date.now(),msg:t.message})}))}catch(t){Object(Vt.b)(t,"_loadViewabilityAd-csm")}M(t,r,o),n.src=Nt.a.getState().cfg.CSM_JS,z(e,n)}catch(t){Object(Vt.b)(t,"_loadViewabilityAd")}}function Et(t){try{Object(Yt.i)(t),b(t),Object(Ut.m)(t,"slots")&&(Nt.a.dispatch({type:"UPDATE_SLOT_BIDS",bids:T(t)}),Object(Ut.m)(t,"ev")&&Nt.a.dispatch({type:"SET_VIEWABILITY",viewability:t.ev}),Object(Ut.m)(t,"cfn")&&Nt.a.dispatch({type:"SET_CFG",cfg:{CSM_JS:"//"===t.cfn.substring(0,2)?t.cfn:"//c.amazon-adsystem.com/".concat(t.cfn)}})),p(t)}catch(t){Object(Vt.b)(t,"_bids",!0)}}function It(){return"number"==typeof Nt.a.getState().cfg.MAX_SLOTS_PER_REQUEST&&0<Nt.a.getState().cfg.MAX_SLOTS_PER_REQUEST}function Tt(t,e){try{var n=At.bind(null,t,e);void 0===Nt.a.getState().gdpr||null===Nt.a.getState().gdpr?(Nt.a.dispatch({type:"ADD_GDPR_QUE_ITEM",func:n}),1===Nt.a.getState().gdprQue.length&&Object(Lt.c)(Nt.a.getState().config.gdpr,Rt)):n()}catch(t){Object(Vt.b)(t,"_checkGdprAndFetchBids",!0)}}function Rt(t){try{Nt.a.dispatch({type:"SET_GDPR_CONFIG",config:t}),Nt.a.getState().gdprQue.map((function(t){return t()})),Nt.a.dispatch({type:"CLEAR_GDPR_QUE"})}catch(t){Object(Vt.b)(t,"_gdprCallback")}}function At(t,e){try{Object(te.b)(e,["function","undefined"])||Object(Vt.c)("fetchBids.callback",oe(e),"function"),"function"!=typeof e&&(e=function(){}),Object(Ut.l)(t)||(Object(Vt.c)("fetchBids.bidConfig",oe(t),"object"),t={}),Object(te.a)(t.timeout)||("string"==typeof t.timeout?Object(Vt.b)({name:"string-".concat(t.timeout),message:"fetchBids.bidConfig.timeout was a non-numeric string '".concat(t.timeout,"'")},"TypeError-fetchBids.bidConfig.timeout",!0):Object(Vt.c)("fetchBids.bidConfig.timeout",oe(t.timeout),"number")),Object(Ut.m)(t,"params")&&!Object(Ut.l)(t.params)?Object(Vt.c)("fetchBids.bidConfig.params",oe(t.params),"object"):Object(Ut.m)(t,"params")&&Object(Ut.l)(t.params)&&Object.keys(t.params).forEach((function(e){return!(void 0===t.params||"string"!=typeof t.params[e]&&"number"!=typeof t.params[e]&&(Object(Ut.k)(t.params[e])?!t.params[e].reduce((function(t,e){return t&&("string"==typeof e||"number"==typeof e)}),!0)&&(Object(Vt.b)({name:"non-string array item",message:"'fetchBids.bidConfig.params.".concat(e," contains a non-string item")},"TypeError-fetchBids.bidConfig.params.".concat(e),!0),1):(Object(Vt.c)("fetchBids.bidConfig.params.".concat(e),oe(t.params[e]),"string' or 'array"),1)))})),Object(Ut.m)(t,"blockedBidders")&&!Object(Ut.k)(t.blockedBidders)?Object(Vt.c)("fetchBids.bidConfig.blockedBidders",oe(t.blockedBidders),"array"):Object(Ut.m)(t,"blockedBidders")&&Object(Ut.k)(t.blockedBidders)&&(t.blockedBidders.reduce((function(t,e){return t&&("string"==typeof e||"number"==typeof e)}),!0)||Object(Vt.b)({name:"non-string array item",message:"'fetchBids.bidConfig.blockedBidders contains a non-string item"},"TypeError-fetchBids.bidConfig.blockedBidders",!0)),Object(Ut.m)(t,"slots")&&!Object(Ut.k)(t.slots)&&Object(Vt.c)("fetchBids.bidConfig.slots",oe(t.slots),"array")}catch(n){Object(Vt.b)(n,"_fetchBids-validation",!0)}var n=Nt.a.getState().config.simplerGPT,r=ne({},t,{bidReqID:"".concat(Nt.a.getState().AAXReqs.length),slots:[],networkReqs:[]}),o=!1;try{!0===n&&(!Object(Ut.m)(t,"slots")||Object(Ut.m)(t,"slots")&&Object(Ut.k)(t.slots)&&0<t.slots.length&&!Object(Ut.m)(t.slots[0],"slotID"))?0===Object(Mt.b)(Wt.a).length?(Object(Vt.b)(new Error("fetchBids was called in simplerGPT mode before any slots were defined in GPT"),"_fetchBids-simplerGpt-NoSlots",!0),o=!0,r.slots=[]):(t.slots?r.slots=t.slots.map((function(t){return new Jt.b(t)})):r.slots=Object(Mt.b)(Wt.a),r.slots=r.slots.filter(Mt.a),0===r.slots.length&&(Object(Vt.b)(new Error("No GPT slots provided to apstag.fetchBids() had valid sizes"),"_fetchBids-simplerGpt-NoValidSizes",!0),o=!0)):Object(Ut.m)(t,"slots")&&Object(Ut.k)(t.slots)&&(r.slots=t.slots.map((function(t){return new $t.a(t)})))}catch(n){Object(Vt.b)(n,"_fetchBids-getSlots",!0)}var i,c=Object(qt.h)(r,Nt.a.getState());try{e=Object(qt.a)(G(e,r),c)}catch(n){Object(Vt.b)(n,"_fetchBids-wrapCallback",!0)}try{if(0===r.slots.length)return!1===o&&Object(Vt.b)(new Error("No slots provided to apstag.fetchBids"),"_fetchBids-noSlots",!0),void setTimeout(e.bind(null,[]),10);if(ht(r.slots.filter(Mt.d).map(Mt.c)),Nt.a.dispatch({type:"NEW_FETCH_BID_REQUEST",fid:r.bidReqID,pto:c}),Nt.a.dispatch({type:"RECORD_ORIGINAL_BID_CONFIG",bidConfig:r}),Object(Ft.d)("fake_bids"))V(r,e);else if(Gt.i)if(Nt.a.dispatch({type:"SHOULD_CHUNK_REQUESTS",value:Object(Ut.n)(Nt.a.getState().cfg.CHUNK_BID_REQUESTS_PROPORTION)}),Nt.a.getState().experiments.chunkRequests&&It()){i=Ct(r);for(var a=0;a<i.length;a++)i[a].bidReqID="".concat(r.bidReqID,"-").concat(a);Nt.a.dispatch({type:"ADD_CHUNKED_REQUESTS",fid:r.bidReqID,numChunks:i.length}),i.forEach((function(t){d(Object(Yt.d)(t,c),e,t.bidReqID)}))}else d(Object(Yt.d)(r,c),e,r.bidReqID);else Object(Kt.b)(Object(Yt.d)(r,c),e)}catch(n){Object(Vt.b)(n,"_fetchBids",!0)}}function Ct(t){try{for(var e=Math.ceil(t.slots.length/Nt.a.getState().cfg.MAX_SLOTS_PER_REQUEST),n=new Array(e),r=0;r<e;r++){var o=r*Nt.a.getState().cfg.MAX_SLOTS_PER_REQUEST;n[r]={slots:t.slots.slice(o,o+Nt.a.getState().cfg.MAX_SLOTS_PER_REQUEST)}}return n.map((function(e){return ne({},t,{},e)}))}catch(e){return Object(Vt.b)(e,"chunkConfig",!0),[]}}function Pt(t){try{Object(Ut.m)(Nt.a.getState().config,"adServer")?Wt.a.isSupported?(P(t),Y()):Object(Vt.b)(new Error("apstag.setDisplayBids called with unsupported ad server: ".concat(Nt.a.getState().config.adServer)),"_setDisplayBids-invalidAdServer",!0):Object(Vt.b)(new Error("apstag.setDisplayBids called without specifying ad server"),"_setDisplayBids-noAdServer",!0)}catch(t){Object(Vt.b)(t,"_setDisplayBids",!0)}}function kt(t,e){try{y(t),Object(Wt.b)(t.adServer),yt()}catch(t){Object(Vt.b)(t,"_init")}"function"==typeof e&&e()}function zt(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"display";try{switch(t){case"display":return Gt.g;case"video":return Gt.u;default:return Object(Yt.h)(Nt.a.getState(),Wt.a)&&Object(Ut.k)(Nt.a.getState().targetingKeys[t])?Nt.a.getState().targetingKeys[t]:[]}}catch(t){return Object(Vt.b)(t,"_targetingKeys",!0),[]}}function Bt(){try{return Nt.a.getState().AAXReqs.reduce((function(t,e){return e.bidConfig.slots.reduce((function(t,e){return t[e.slotID]=e.slotName,t}),t)}),{})}catch(t){return Object(Vt.b)(t,"_getSlotIdToNameMapping",!0),{}}}function xt(t,e){var n=e;return function(){return o({method:t,args:arguments}),n.apply(void 0,arguments)}}try{Object(Ut.m)(window,"apstag")&&Object(Ut.m)(window.apstag,"_Q")&&0<window.apstag._Q.length&&Nt.a.dispatch({type:"SET_Q",Q:window.apstag._Q})}catch(t){Object(Vt.b)(t,"apstag-storeQ",!0)}window.apstag=(rt={punt:Et,init:kt,debug:Ft.a,_getSlotIdToNameMapping:Bt,targetingKeys:zt,fetchBids:Tt,setDisplayBids:Pt,renderImp:_t,bids:Et},Object.keys(rt).forEach((function(t){rt[t]=xt(t,rt[t]),rt[t]=Object(Vt.d)(rt[t],t)})),n?Object(Ft.b)(!0,t):e&&Object(Ft.b)(!1,t),!0===Object(Ft.c)("exposeApi")&&(rt._api={_getBidSetInfo:ft,_applyTargetingToGPTSlot:R,dispatch:Nt.a.dispatch,_clearTargetingFromGPTSlot:j,_clearBidSetOnSlot:S,_doFbSync:k,_getCurrentSlotBids:_,_creativeURL:x,getSlotFetchCounts:it,buildBidUrl:Yt.d}),rt),function(){try{if(Nt.a.dispatch({type:"SHOULD_CF_ROUTE",value:Object(Ut.n)(Nt.a.getState().cfg.CF_ROUTING_RATE)}),Nt.a.getState().experiments.shouldCFRoute&&Nt.a.dispatch({type:"SET_HOST",hostName:"DEFAULT_AAX_BID_HOST",hostValue:"c.amazon-adsystem.com"}),Nt.a.dispatch({type:"SHOULD_SAMPLE_LATENCY",value:Object(Ut.n)(Nt.a.getState().cfg.LATENCY_SAMPLING_RATE)}),null!==Nt.a.getState().cfg.TEST_BID_ENDPOINT){var t=Object(Ut.n)(Nt.a.getState().cfg.TEST_PATH_FREQUENCY);Nt.a.dispatch({type:"SHOULD_USE_TEST_BID_ENDPOINT",value:t}),t&&null!==Nt.a.getState().cfg.TEST_PATH_LATENCY_SAMPLE_RATE&&Nt.a.dispatch({type:"SHOULD_SAMPLE_LATENCY",value:Object(Ut.n)(Nt.a.getState().cfg.TEST_PATH_LATENCY_SAMPLE_RATE)})}Nt.a.dispatch({type:"SHOULD_SAMPLE_SLOT_RENDER",value:Object(Ut.n)(Nt.a.getState().cfg.SLOT_RENDER_SAMPLING_RATE)});var e=Nt.a.getState();(e.experiments.shouldSampleLatency||e.displayAdServer.shouldSampleRender)&&ot(),e.displayAdServer.shouldSampleRender&&at(),e.experiments.shouldSampleLatency&&(et(),ut())}catch(t){Object(Vt.b)(t,"apstag-sampleLatency")}try{m()}catch(t){Object(Vt.b)(t,"apstag-doLast")}if(!Ot())try{var n=function(t){t&&"object"!==oe(t)||(t="Request Timeout or Error"),Object(Vt.b)({message:"csm-rtb-comm-js loading failed",name:t},"__csm-rtb-comm-js__")};Object(Kt.d)({url:Nt.a.getState().cfg.CSM_RTB_COMMUNICATOR_JS,onload:function t(e){e.readyState===XMLHttpRequest.DONE&&200===e.status?eval(e.responseText):n(JSON.stringify({status:e.statusText,response:e.responseXML}))},onerror:n,ontimeout:n})}catch(t){Object(Vt.b)(t,"__load-csm-rtb-comm-js__")}Object(Ft.e)()}()}())}catch(t){Object(Vt.b)(t,"apstag")}}]);
//# sourceMappingURL=apstag.js.map