(function(){'use strict';var f;var k=function(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a},l=function(a){return"gwd-page"==a.tagName.toLowerCase()||"gwd-page"==a.getAttribute("is")},m=function(a){if(l(a))return a;for(;a&&9!=a.nodeType;)if((a=a.parentElement)&&l(a))return a;return null};function n(){this.w={}}n.prototype.add=function(a,b){a="string"==typeof a?a:a.getString();this.w[a]||(this.w[a]=[]);this.w[a].push(b)};var q=function(a){var b=[],c="object"==typeof gwd&&"GwdId"in gwd,d;for(d in a.w)b.push(c?new gwd.GwdId(d):d);return b},r=function(a,b){return b?a.w["string"==typeof b?b:b.getString()]||[]:[]};function t(a,b){this.j=a;this.aa=b;this.G=this.K.bind(this)}t.prototype.observe=function(a){if(a.nodeType==Node.ELEMENT_NODE)for(var b=q(this.j),c=0;c<b.length;c++){var d=u(b[c]);if(d&&k(a,d)){var e=r(this.j,b[c]);e&&e.forEach(function(g){d.addEventListener(g.event,this.G,!1)}.bind(this))}}};var v=function(a,b){if(b.nodeType==Node.ELEMENT_NODE)for(var c=q(a.j),d=0;d<c.length;d++){var e=u(c[d]);if(e&&k(b,e)){var g=r(a.j,c[d]);g&&g.forEach(function(h){e.removeEventListener(h.event,this.G,!1)}.bind(a))}}};
t.prototype.K=function(a){this.aa(a)};var u=function(a){return"string"==typeof a?document.getElementById(a):a.getElement(document)};document.registerElement("gwd-exit");document.registerElement("gwd-metric-event");document.registerElement("gwd-metric-configuration");document.registerElement("gwd-timer");var w=function(a,b,c){if(c){var d=document.createEvent("CustomEvent");d.initCustomEvent(a,!0,!0,c)}else d=document.createEvent("Event"),d.initEvent(a,!0,!0);b.dispatchEvent(d);return d};var x=this||self,y=Date.now||function(){return+new Date},z=function(a,b){a=a.split(".");var c=x;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b},A=function(a,b){function c(){}c.prototype=b.prototype;a.ra=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.qa=function(d,e,g){for(var h=Array(arguments.length-2),p=2;p<arguments.length;p++)h[p-2]=arguments[p];return b.prototype[e].apply(d,
h)}};var B=function(){this.X=""};B.prototype.toString=function(){return"SafeScript{"+this.X+"}"};B.prototype.g=function(a){this.X=a};(new B).g("");var C=function(){this.Z=""};C.prototype.toString=function(){return"SafeStyle{"+this.Z+"}"};C.prototype.g=function(a){this.Z=a};(new C).g("");var D=function(){this.Y=""};D.prototype.toString=function(){return"SafeStyleSheet{"+this.Y+"}"};D.prototype.g=function(a){this.Y=a};(new D).g("");var E=function(){this.W=""};E.prototype.toString=function(){return"SafeHtml{"+this.W+"}"};E.prototype.g=function(a){this.W=a};(new E).g("<!DOCTYPE html>");(new E).g("");(new E).g("<br>");Object.freeze&&Object.freeze([]);var F=function(a,b){var c=(c=x.performance)&&c.now&&c.timing?Math.floor(c.now()+c.timing.navigationStart):y();a={label:a,type:9,value:c};b=b.google_js_reporting_queue=b.google_js_reporting_queue||[];2048>b.length&&b.push(a)};var G={},H=!1,I=!1;G.la=function(a){H||(H=!0,F("11",a))};G.ma=function(a){I||(I=!0,F("12",a))};G.reset=function(a){I=H=!1;(a.google_js_reporting_queue=a.google_js_reporting_queue||[]).length=0};z("gwd.rumUtil",G);z("gwd.rumUtil.logContentLoading",G.la);z("gwd.rumUtil.logContentRendered",G.ma);z("gwd.rumUtil.reset",G.reset);var J=function(){};A(J,HTMLElement);f=J.prototype;
f.createdCallback=function(){document.body.style.opacity="0";this.R=this.ga.bind(this);this.I=this.ia.bind(this);this.S=this.ha.bind(this);this.C=this.fa.bind(this);this.B=this.da.bind(this);this.D=w.bind(null,"expandfinish",this);this.A=w.bind(null,"collapsefinish",this);this.P=this.ea.bind(this);this.G=this.K.bind(this);this.U=this.ja.bind(this);this.$=this.ka.bind(this);this.c=this.i=null;this.u=this.v=!1;this.L=[];this.s=!1;this.M=this.hasAttribute("fullscreen");this.o=null;this.F=this.l=!1;this.H=
window.innerHeight>=window.innerWidth?1:2;this.h=this.b=null};
f.attachedCallback=function(){Enabler.addEventListener(studio.events.StudioEvent.EXPAND_START,this.C);Enabler.addEventListener(studio.events.StudioEvent.COLLAPSE_START,this.B);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_START,this.C);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_START,this.B);Enabler.addEventListener(studio.events.StudioEvent.EXPAND_FINISH,this.D);Enabler.addEventListener(studio.events.StudioEvent.COLLAPSE_FINISH,this.A);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_FINISH,
this.D);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_FINISH,this.A);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_DIMENSIONS,this.P);this.a=this.querySelector("gwd-pagedeck");this.a.addEventListener("pagetransitionend",this.U,!1);this.b=document.getElementById(this.getAttribute("data-provider"));this.h=document.querySelector("gwd-data-binder");var a=this.querySelector("gwd-metric-configuration"),b=new n;if(a){a=Array.prototype.slice.call(a.getElementsByTagName("gwd-metric-event"));
for(var c=0;c<a.length;c++){var d=a[c],e=d.getAttribute("source");if(e){var g=d.getAttribute("exit");d={event:d.getAttribute("event"),na:d.getAttribute("metric")||g,ba:d.hasAttribute("cumulative"),exit:g};b.add(K(e),d)}}}this.j=b;this.T=new t(this.j,this.G);window.addEventListener("resize",this.$,!1);window.gwd&&window.gwd.rumUtil&&"function"===typeof window.gwd.rumUtil.logContentLoading&&window.gwd.rumUtil.logContentLoading(window)};
f.detachedCallback=function(){Enabler.removeEventListener(studio.events.StudioEvent.INIT,this.R);Enabler.removeEventListener(studio.events.StudioEvent.VISIBLE,this.I);Enabler.removeEventListener(studio.events.StudioEvent.PAGE_LOADED,this.S);Enabler.removeEventListener(studio.events.StudioEvent.EXPAND_START,this.C);Enabler.removeEventListener(studio.events.StudioEvent.COLLAPSE_START,this.B);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_START,this.C);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_START,
this.B);Enabler.removeEventListener(studio.events.StudioEvent.EXPAND_FINISH,this.D);Enabler.removeEventListener(studio.events.StudioEvent.COLLAPSE_FINISH,this.A);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_FINISH,this.D);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_FINISH,this.A);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_DIMENSIONS,this.P);this.a.removeEventListener("pagetransitionend",this.U,!1);window.removeEventListener("resize",
this.$,!1);this.b&&this.i&&this.b.removeEventListener("ready",this.i);this.h&&this.c&&this.h.removeEventListener("bindingfinished",this.c)};f.initAd=function(){this.s=!1;var a=this.R;Enabler.removeEventListener(studio.events.StudioEvent.INIT,a);Enabler.addEventListener(studio.events.StudioEvent.INIT,a);Enabler.isInitialized()&&a()};f.exit=function(a,b,c,d,e){Enabler.exit(a,b);("undefined"==typeof d||d)&&L(this);c&&this.goToPage(e)};
f.exitOverride=function(a,b,c,d,e){Enabler.exitOverride(a,b);("undefined"==typeof d||d)&&L(this);c&&this.goToPage(e)};f.incrementCounter=function(a,b){Enabler.counter(a,b)};f.startTimer=function(a){Enabler.startTimer(a)};f.stopTimer=function(a){Enabler.stopTimer(a)};f.reportManualClose=function(){Enabler.reportManualClose()};
f.K=function(a){var b=a.target,c=K(b),d=c+": "+a.type;a:{var e=r(this.j,c);for(var g=0;g<e.length;g++)if(e[g].event==a.type){e=e[g];break a}e=void 0}e.exit&&a.detail&&a.detail.url?(d=c+": "+e.exit,a.detail["exit-id"]&&(d=a.detail["exit-id"]),b="",null!=a.detail["product-index"]&&(b=a.detail["product-index"]),this.b&&0==(this.b.getAttribute("gwd-schema-id")||"").indexOf("dynamic_remarketing")?(c=a.detail["action-event"],e={},c&&(e.clickX=c.clientX||c.changedTouches[0].clientX,e.clickY=c.clientY||c.changedTouches[0].clientY),
Enabler.dynamicExit(d,a.detail.url,b,void 0,e)):Enabler.exitOverride(d,a.detail.url),a.detail.handled=!0,a.detail.collapse&&this.goToPage()):(a=m(b))&&a.gwdIsActive()&&this.incrementCounter(e.na||d,e.ba)};
f.ga=function(){var a=function(){if(this.hasAttribute("polite-load")){var c=this.S;Enabler.isPageLoaded()?c():Enabler.addEventListener(studio.events.StudioEvent.PAGE_LOADED,c)}else c=this.I,Enabler.isVisible()?c():Enabler.addEventListener(studio.events.StudioEvent.VISIBLE,c)}.bind(this);if(this.M){var b=function(c){(this.o=!!c.supported)&&w("fullscreensupport",this);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_SUPPORT,b);a()}.bind(this);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_SUPPORT,
b);Enabler.queryFullscreenSupport()}else a()};f.ia=function(a){if(this.s)this.b&&this.O(null);else{var b;a&&(b=a.detail);var c=this.pa.bind(this,b);this.b&&(c=this.ca.bind(this,c));if(this.M){Enabler.setResponsiveExpanding(!0);var d=function(e){this.F=e;c()}.bind(this);Enabler.loadModule(studio.module.ModuleId.GDN,function(){var e=studio.sdk.gdn.getConfig();e.isInCreativeToolsetContext()?e.isInterstitial(d):c()})}else c()}};
f.ha=function(){var a=this.I;Enabler.isVisible()?a():Enabler.addEventListener(studio.events.StudioEvent.VISIBLE,a)};f.ca=function(a){this.b?(this.i&&this.b.removeEventListener("ready",this.i),this.i=this.O.bind(this,a),this.b.isDataLoaded()&&this.i(),this.b.addEventListener("ready",this.i)):a()};
f.O=function(a){var b=!!a;if(this.h){this.c&&(this.h.removeEventListener("bindingfinished",this.c),this.c=null);var c=this.b.getData();c&&(b=this.a.getElementsBySelector("*"),b=b.concat(this.a.getPages()),this.h.bindData(c,b)?this.V(a):(this.c=this.V.bind(this,a),this.h.addEventListener("bindingfinished",this.c)),b=!1)}b&&a()};
f.V=function(a){this.c&&(this.h.removeEventListener("bindingfinished",this.c),this.c=null);if(this.s){var b=document.getElementsByTagName("gwd-text-helper");0<b.length&&b[0].refitAll()}w("dynamicelementsready",this);a&&a()};f.pa=function(a){this.s||(this.s=!0,document.body.style.opacity="",w("adinitialized",this,a),this.F?(a=this.a.getPage(this.a.findPageIndexByAttributeValue("expanded",!0)),this.goToPage(a.id)):this.goToPage())};
f.goToPage=function(a,b,c,d,e){var g=this.a.getPage(this.a.currentIndex);if(a=a?this.a.getPage(a):this.a.getDefaultPage()){var h=!!g&&!!a&&!this.v&&!this.F&&!g.hasAttribute("expanded")&&a.hasAttribute("expanded");g=!!g&&!!a&&!this.u&&!this.F&&g.hasAttribute("expanded")&&!a.hasAttribute("expanded");h&&this.u||g&&this.v||((this.f=a.id,b&&(this.m={transition:b,duration:c,easing:d,direction:e}),h)?this.M&&!1!==this.o?this.o&&(this.l=!0,Enabler.requestFullscreenExpand()):Enabler.requestExpand():g?this.l?
Enabler.requestFullscreenCollapse():Enabler.requestCollapse():(this.u=this.v=!1,this.J()))}};f.fa=function(){w("expandstart",this);this.o?(this.l=!0,Enabler.finishFullscreenExpand()):Enabler.finishExpand();if(!this.f){var a=this.a.getPage(this.a.findPageIndexByAttributeValue("expanded",!0));a&&(this.f=a.id)}a=this.a.getPage(this.a.currentIndex);this.v=!!a&&this.f!=a.id;setTimeout(this.J.bind(this),30)};
f.da=function(){w("collapsestart",this);this.l?(Enabler.finishFullscreenCollapse(),this.l=!1):Enabler.finishCollapse();this.f||(this.reportManualClose(),this.f=this.a.getDefaultPage().id);var a=this.a.getPage(this.a.currentIndex);this.u=!!a&&this.f!=a.id;setTimeout(this.J.bind(this),30)};f.ka=function(){if(!this.f){var a=window.innerHeight>=window.innerWidth?1:2;this.H!=a&&(this.H=a,(a=this.a.getPage(this.a.currentIndex))&&setTimeout(this.goToPage.bind(this,a.id),0))}};
f.ea=function(a){a&&Enabler.setResponsiveSize(a.width,a.height)};f.J=function(){if(this.f){this.H=window.innerHeight>=window.innerWidth?1:2;var a=this.a.getOrientationSpecificPage(this.H,this.f);this.m?this.a.goToPage(a.id,this.m.transition,this.m.duration,this.m.easing,this.m.direction):this.a.goToPage(a.id);this.l&&a.classList.add("fs")}this.m=this.f=void 0};
f.ja=function(a){this.u=this.v=!1;if(a.target==this.a){var b=a.detail;a=b.outgoingPage;b=b.incomingPage;if(a&&(v(this.T,a),(a=a.querySelectorAll("video, gwd-video"))&&0<a.length))for(this.N=[];this.L.length;)studio.video.Reporter.detach(this.L.shift());this.T.observe(b);if((a=b.querySelectorAll("video, gwd-video"))&&0<a.length){b=studio.video&&studio.video.Reporter;var c=this.oa.bind(this);this.N=Array.prototype.slice.call(a);b?c():Enabler.loadModule(studio.module.ModuleId.VIDEO,c)}}};
f.oa=function(){for(var a,b;this.N.length;)if(b=this.N.shift(),a=K(b))studio.video.Reporter.attach(a,"gwd-video"==b.tagName.toLowerCase()?b.nativeElement:b,b.autoplay),this.L.push(a)};var K=function(a){return"object"==typeof gwd&&"GwdId"in gwd?(new gwd.GwdId(a)).getString():"string"==typeof a?a:a.id},L=function(a){Array.prototype.slice.call(a.a.querySelectorAll("video, gwd-video, gwd-youtube, gwd-audio, audio")).forEach(function(b){b.pause()})};J.prototype.attributeChangedCallback=function(){};
document.registerElement("gwd-google-ad",{prototype:J.prototype});}).call(this);
