/*! Cookie Auto Blocker by TrustArc version: 4b527b1 */ this.trustarc=this.trustarc||{},this.trustarc.ccm=this.trustarc.ccm||{},this.trustarc.ccm.cab=function(t){"use strict";function e(t){return e="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},e(t)}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function r(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o,c="data-ta-blocked",i="data-ta-domain",u="ta-blocked",a="data-ta-src",l="data-ta-type",s="ignore",f=function(t){return t.UNBLOCKED="0",t.BLOCKED="1",t}({}),d=function(t){return t.OPTED_OUT="0",t.OPTED_IN="1",t.NONE="2",t}({}),b="optout_domains",v="notice_gdpr_prefs",g="gpcishonored",m=function(t){return t.DEFAULT="default",t.DNT="dnt",t.GPC="gpc",t.USER="user",t}({});function h(t,e){t.forEach((function(t){var n=t.nodeName.toLowerCase();"script"===n||"img"===n||"iframe"===n?e(t,t.nodeName):t.hasChildNodes()&&h(t.childNodes,e)}))}var p=function(){o.disconnect()};function y(t){return(o=new MutationObserver((function(e){e.forEach((function(e){"HTML"!==e.target.nodeName&&"childList"===e.type&&e.addedNodes.length>0&&h(e.addedNodes,(function(e,n){t.handler[n].handle(e)}))}))}))).observe(document.documentElement,{childList:!0,subtree:!0}),p}var O=document.createElement,E=function(){document.createElement=O};function A(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return S(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,c=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw c}}}}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,c=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw c}}}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Object.entries(j(t)),o={};return r.length>0?r.forEach((function(t){var r=B(t,2),c=r[0],i=j(r[1]);o[c]={value:"string"==typeof i.value?i.value:"",domains:{}},Object.entries(j(i.domains)).forEach((function(t){var r=B(t,2),u=r[0],a=r[1];if(u){if(n&&n.size>0&&e){var l,s=n.has(i.value);if("{}"===JSON.stringify(e))a=s?"1":"0";else(null==e||null===(l=e[i.value])||void 0===l||null===(l=l.d)||void 0===l?void 0:l.includes(u))&&(a=s?"0":"1")}o[c].domains[u]=function(t){return"0"===t||"1"===t||"2"===t?t:d.NONE}(a)}}))})):e&&Object.keys(e).forEach((function(t,n){var r="Category ".concat(n+1);o[r]={value:t,domains:{}},e[t].d.forEach((function(t){o[r].domains[t]=d.OPTED_OUT}))})),o}var x=I("autoblock");function z(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(function(){var t=window.localStorage;try{var e="__storage_test__";return t.setItem(e,e),t.removeItem(e),!0}catch(t){return!1}}())try{var n=t||b,r=window.localStorage.getItem(n);if(r)try{x.debug("optout_domains ",JSON.parse(r))}catch(t){x.debug("optout_domains ",r)}var o=F(n+"_pc");return o&&"skip"===o&&(o=null),H(JSON.parse(r),JSON.parse(o),e)}catch(t){}return{}}function J(t,e,n,r){var o=function(t,e,n){var r={},o=Object.values(t),c=n.gpcEnabled&&U(),i=n.dntEnabled&&k(),u=(n.cpraFinProg||!c&&!i)&&0===e.size;return n.autoblockDefaultLevels.size>0&&u?(o.forEach((function(t){t.domains.forEach((function(e){var o=t.value&&"0"===t.value;r[e]=o||n.autoblockDefaultLevels.has(t.value)?d.OPTED_IN:d.OPTED_OUT}))})),r):n.enableAutoBlockOnConsent&&u?(o.forEach((function(t){t.domains.forEach((function(t){r[t]=d.OPTED_IN}))})),r):(o.forEach((function(t){t.domains.forEach((function(n){var o=t.value&&("0"===t.value||e.has(t.value)),c=r[n]===d.OPTED_IN;r[n]=o||c?d.OPTED_IN:d.OPTED_OUT}))})),r)}(t,n,r),c=function(t){var e={};return Object.values(t).forEach((function(t){Object.entries(t.domains).forEach((function(n){var r=B(n,2),o=r[0],c=r[1],i=t.value&&"0"===t.value,u=e[o]===d.OPTED_IN;e[o]=i||u?d.OPTED_IN:c}))})),e}(e);return Object.assign({},o,c)}function W(t,e,n,r){return t===d.OPTED_OUT||!(t||!e)&&(r&&n&&r.debug("Strict mode: unlisted domain ".concat(n," flagged for blocking")),!0)}function Y(t,e){if(e){["consent-pref.trustarc.com","consent-pref-staging.trustarc.com","consent-pref.qa.trustarc.com","consent-pref.dev.trustarc.com","consent.trustarc.com","consent.truste.com","consent-icon-staging.trustarc.com","consent-icon.qa.trustarc.com","consent-icon.dev.trustarc.com"].forEach((function(e){void 0===t[e]&&(t[e]=d.OPTED_IN)}))}}var $=I("iframe");function q(t){var n={src:Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,"src")},r=HTMLIFrameElement.prototype.setAttribute,o={},i=function(t,e){t.contentWindow&&"function"==typeof t.contentWindow.stop&&t.contentWindow.stop(),"srcdoc"in HTMLIFrameElement.prototype&&r.call(t,"srcdoc","
");var i=e||t.src||t.getAttribute("src")||t.getAttribute(a)||"";r.call(t,a,i),r.call(t,c,f.BLOCKED),n.src.set.call(t,"");var u=new URL(i,document.baseURI).host;o[u]=o[u]||[],o[u].push(t),$.event("x",i)},u=function(n){var r=!0,o=!1;if(t.getStatus()===_.UNBLOCKING_ALL)return o;var i=n instanceof HTMLIFrameElement,u=i?n.src:"string"==typeof n?n:"object"===e(n)&&"function"==typeof n.toString?n.toString():"";if(i){var b=n.getAttribute(c);if(n.getAttribute(l)===s)return o;if(b===f.UNBLOCKED)return o;if(n.getAttribute(a)&&!n.getAttribute("src")){if(b===f.BLOCKED)return o;var v=new URL(n.getAttribute(a),document.baseURI).host;return t.getPreference(v)===d.OPTED_IN?o:r}}if(u){var g=new URL(u,document.baseURI);if(W(t.getPreference(g.host),t.isStrictMode(),g.host,$))return r}return o},b=function(t){var e=t.getAttribute(a);if($.debug("u: ".concat(t.getAttribute(a))),t.getAttribute(c)===f.UNBLOCKED||!e)return null;var o=t;return t.isConnected||($.debug("Original iframe is disconnected from the DOM"),o=function(t){var e,n=R(document.getElementsByTagName("iframe"));try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r.getAttribute(a)===t)return r}}catch(t){n.e(t)}finally{n.f()}return null}(e),$.debug("".concat(o?"Found an iframe":"No iframe found"," with similar data-ta-src value"))),o?(Object.defineProperty(o,"src",n.src),o.setAttribute=r,o.setAttribute("src",e),o.setAttribute(c,f.UNBLOCKED),o.removeAttribute(a),o.removeAttribute("srcdoc"),$.event("u",o.src),o):t};return{IFRAME:{blockElement:i,shouldBlock:u,handle:function(t){var e=t.src;$.debug("h: ".concat(e)),u(t)?i(t):!t.getAttribute("src")&&t.getAttribute(a)&&t.getAttribute(c)!==f.BLOCKED&&b(t)},patch:function(t){return Object.defineProperty(t,"src",{configurable:!0,get:function(){return n.src.get.call(this)},set:function(t){$.debug("p: ".concat(t)),u(t)?i(this,t):n.src.set.call(this,t)}}),t.setAttribute=function(t,e){"src"===t?this.src=e:r.call(this,t,e)},t},unblock:function(t){t.forEach((function(t){var e=o[t];e&&e.length>0&&(e.forEach((function(t){b(t)})),o[t]=[])}))},unblockAll:function(){Object.values(o).flatMap((function(t){return t})).forEach((function(t){b(t)})),o={}},unblockElement:b}}}var Q=I("img");var V=I("script");function X(t,e){var n={src:Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"src"),type:Object.getOwnPropertyDescriptor(HTMLScriptElement.prototype,"type")},r=HTMLScriptElement.prototype.setAttribute,o={},a=function(t){var e,a=t.type===u;if(!a||t.getAttribute(c)!==f.BLOCKED){n.type.set.call(t,u),r.call(t,c,f.BLOCKED);var l=t.getAttribute(i),s=t.src?new URL(t.src).host:l||window.location.host;o[s]=o[s]||[],o[s].push(t),V.event(a?"m":"x",null!==(e=t.src||l)&&void 0!==e?e:"")}},b=function(n){var r=!0,o=!1;if(t.getStatus()===_.UNBLOCKING_ALL)return o;var a=n.src,b=n.getAttribute(c);if(n.getAttribute(l)===s)return o;if(b===f.UNBLOCKED)return o;if(n.type===u){if(b===f.BLOCKED)return o;var v=n.src?new URL(n.src).host:n.getAttribute(i);if(v){if(t.getPreference(v)===d.OPTED_IN)return o}else if(t.hasConsentLevel("0")||e)return o;return r}if(a){var g=new URL(a);if(W(t.getPreference(g.host),t.isStrictMode(),g.host,V))return r}return o},v=function(t){var e,n;if(V.debug("u: ".concat(null!==(e=t.src||t.getAttribute(i))&&void 0!==e?e:"")),t.getAttribute(c)===f.UNBLOCKED)return null;var o=function(t){var e=document.createElement("script");if(t.hasAttributes())for(var n=HTMLScriptElement.prototype.setAttribute,r=t.attributes,o=0;o0&&(e.forEach((function(t){v(t)})),o[t]=[])}))},unblockAll:function(){Object.values(o).flatMap((function(t){return t})).forEach((function(t){v(t)})),o={}},unblockElement:v}}}function Z(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 tt(t){for(var e=1;e0&&(e.forEach((function(t){u(t)})),r[t]=[])}))},unblockAll:function(){Object.values(r).flatMap((function(t){return t})).forEach((function(t){u(t)})),r={}},unblockElement:u}}}({getStatus:o,getPreference:i,hasConsentLevel:u,isStrictMode:v}));e.enableIframeBlocking&&(nt.debug("Iframe blocking is enabled."),Object.assign(p,q({getStatus:o,getPreference:i,hasConsentLevel:u,isStrictMode:v})));var S={handler:p},N=y(S),P=function(t){return document.createElement=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:"";try{var n,r=(new DOMParser).parseFromString(e,"text/html");n=r.body.children.length>0?r.body.children:r.head.children;var o,c="",i=!1,u=A(n);try{for(u.s();!(o=u.n()).done;){var a=o.value;a.id||(a.id="ts-".concat(Date.now(),"-").concat(Math.floor(100*Math.random())),i=!0),c+=a.outerHTML}}catch(t){u.e(t)}finally{u.f()}w.call(document,i?c:e);var l,s=A(n);try{for(s.s();!(l=s.n()).done;){var f=l.value,d=document.getElementById(f.id);switch(!0){case"SCRIPT"===d.nodeName:case"IMG"===d.nodeName:case"IFRAME"===d.nodeName:t.handler[d.nodeName].handle(d);break;case d.hasChildNodes():h(d.childNodes,(function(e,n){t.handler[n].handle(e)}))}}}catch(t){s.e(t)}finally{s.f()}}catch(t){}},T}(S),I=function(t){return window.Image=function(e,n){var r=new D(e,n),o=t.handler.IMG;return o?o.patch(r):r},L}(S);return ct=_.STARTED,nt.debug("Started"),{submitConsent:function(n){nt.event("c",n?"with value:":"without value"),n&&nt.debug(n),et=G(e.cookieNameOverride),nt.debug("Consent Submitted: ",Array.from(et)),ot=m.USER,nt.debug("source consent:",ot);var r,o=[];(rt=J(t,n?H(n):z(e.localStorageNameOverride),et,e),e.autoOptInTrustArcDomain)&&Y(rt,null!==(r=e.enableStrictMode)&&void 0!==r&&r);o=function(t){return Object.keys(t).filter((function(e){return t[e]===d.OPTED_IN}))}(rt),e.autoOptInHostAfterConsent&&!o.includes(window.location.host)&&o.push(window.location.host),nt.debug("Consent Submitted opt-in:",o),function(t,e){Object.values(t).forEach((function(t){t.unblock(e)}))}(p,o)},unblockAll:function(){nt.debug("Unblocking all blocked tags..."),ct=_.UNBLOCKING_ALL,function(t){Object.values(t).forEach((function(t){t.unblockAll()}))}(p),Object.keys(rt).forEach((function(t){rt[t]=d.OPTED_IN})),N(),P(),C(),I(),ct=_.STOPPED,nt.debug("Stopped")},getInfo:function(){return{sourceConsent:ot,status:ct}},resetSourceConsent:function(){ot=m.DEFAULT,nt.debug("source consent:",ot)}}};return t.BlockStatus=f,t.DATA_TA_BLOCKED=c,t.DATA_TA_DOMAIN=i,t.DATA_TA_SRC=a,t.DATA_TA_TYPE=l,t.DATA_TA_TYPE_IGNORED=s,t.GPC_ISHONORED=g,t.NOTICE_GDPR_PREFS_COOKIE=v,t.OPTOUT_DOMAINS_STORAGE_KEY=b,t.Preference=d,t.SourceConsent=m,t.TYPE_TA_BLOCKED=u,t.init=function(t,e){var n=t.categories;return it(function(t){var e=Object.entries(j(t)),n={};return e.forEach((function(t){var e=B(t,2),r=e[0],o=j(e[1]);n[r]={value:"string"==typeof o.value?o.value:"",domains:[]},Array.isArray(o.domains)&&o.domains.forEach((function(t){"string"==typeof t&&t&&n[r].domains.push(t)}))})),n}(n),e)},t.shouldLog=N,Object.defineProperty(t,"__esModule",{value:!0}),t}({});