(function(){/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
'use strict';var g,h="function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b},k;if("function"==typeof Object.setPrototypeOf)k=Object.setPrototypeOf;else{var l;a:{var n={a:!0},p={};try{p.__proto__=n;l=p.a;break a}catch(a){}l=!1}k=l?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var q=k,r=this||self,t=function(a,b){a=a.split(".");var c=r;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};var u=function(){this.G={}};u.prototype.add=function(a,b){a="string"===typeof a?a:a.getString();this.G[a]||(this.G[a]=[]);this.G[a].push(b)};var v=function(a){var b=[],c="object"==typeof gwd&&"GwdId"in gwd,d;for(d in a.G)b.push(c?new gwd.GwdId(d):d);return b},w=function(a,b){return b?a.G["string"===typeof b?b:b.getString()]||[]:[]};var x=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},y=function(a){return"gwd-page"==a.tagName.toLowerCase()||"gwd-page"==a.getAttribute("is")},z=function(a){if(y(a))return a;for(;a&&9!=a.nodeType;)if((a=a.parentElement)&&y(a))return a;return null};var A=function(a,b){this.o=a;this.ea=b;this.M=this.S.bind(this)};A.prototype.observe=function(a){if(a.nodeType==Node.ELEMENT_NODE)for(var b=v(this.o),c=0;c<b.length;c++){var d=C(b[c]);if(d&&x(a,d)){var e=w(this.o,b[c]);if(e)for(var f=0;f<e.length;f++)d.addEventListener(e[f].event,this.M,!1)}}};A.prototype.S=function(a){this.ea(a)};var C=function(a){return"string"===typeof a?document.getElementById(a):a.getElement(document)};var D=function(a,b,c){c=void 0===c?null:c;var d=document.createEvent("CustomEvent");d.initCustomEvent(a,!0,!0,c);b.dispatchEvent(d);return d};Object.freeze&&Object.freeze([]);var E=function(a,b){var c=r.performance;a={label:a,type:9,value:c&&c.now&&c.timing?Math.floor(c.now()+c.timing.navigationStart):Date.now()};b=b.google_js_reporting_queue=b.google_js_reporting_queue||[];2048>b.length&&b.push(a)};var F={},G=!1,H=!1;F.$=function(a){G||(G=!0,E("11",a))};F.qa=function(a){H||(H=!0,E("12",a))};F.ra=function(a,b,c){var d=b;d=void 0===d?r:d;if(d=(d=d.performance)&&d.now?d.now():null)a={label:a,type:void 0===c?0:c,value:d},b=b.google_js_reporting_queue=b.google_js_reporting_queue||[],2048>b.length&&b.push(a)};F.reset=function(a){H=G=!1;(a.google_js_reporting_queue=a.google_js_reporting_queue||[]).length=0};t("gwd.rumUtil",F);t("gwd.rumUtil.logContentLoading",F.$);
t("gwd.rumUtil.logContentRendered",F.qa);t("gwd.rumUtil.logTimingEvent",F.ra);t("gwd.rumUtil.reset",F.reset);var I=function(){var a=HTMLElement.call(this)||this;a.X=a.ka.bind(a);a.P=a.ma.bind(a);a.Y=a.la.bind(a);a.J=a.ja.bind(a);a.I=a.ha.bind(a);a.K=D.bind(null,"expandfinish",a);a.H=D.bind(null,"collapsefinish",a);a.W=a.ia.bind(a);a.B=a.pa.bind(a);a.M=a.S.bind(a);a.ba=a.na.bind(a);a.da=a.oa.bind(a);a.m=null;a.i=null;a.F=!1;a.D=!1;a.T=[];a.u=!1;a.O=!1;a.C=null;a.v=!1;a.L=!1;a.N=window.innerHeight>=window.innerWidth?1:2;a.h=null;a.l=null;a.s=null;a.Z=!1;a.V=!1;return a},J=HTMLElement;I.prototype=h(J.prototype);
I.prototype.constructor=I;if(q)q(I,J);else for(var K in J)if("prototype"!=K)if(Object.defineProperties){var L=Object.getOwnPropertyDescriptor(J,K);L&&Object.defineProperty(I,K,L)}else I[K]=J[K];g=I.prototype;
g.connectedCallback=function(){var a=this;this.Z||(this.O=this.hasAttribute("fullscreen"),document.body.style.opacity="0",this.Z=!0);Enabler.addEventListener(studio.events.StudioEvent.EXPAND_START,this.J);Enabler.addEventListener(studio.events.StudioEvent.COLLAPSE_START,this.I);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_START,this.J);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_START,this.I);Enabler.addEventListener(studio.events.StudioEvent.EXPAND_FINISH,
this.K);Enabler.addEventListener(studio.events.StudioEvent.COLLAPSE_FINISH,this.H);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_FINISH,this.K);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_FINISH,this.H);Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_DIMENSIONS,this.W);window.addEventListener("resize",this.da,!1);(0,F.$)(window);setTimeout(function(){a.g=a.querySelector("gwd-pagedeck");a.g.addEventListener("pagetransitionend",a.ba,!1);
a.h=document.getElementById(a.getAttribute("data-provider"));a.l=document.querySelector("gwd-data-binder");a.s=document.querySelector("gwd-responsive-attributes-helper");a.s&&a.s.applyOverrides();var b=a.querySelector("gwd-metric-configuration"),c=new u;if(b){b=Array.prototype.slice.call(b.getElementsByTagName("gwd-metric-event"));for(var d=0;d<b.length;d++){var e=b[d],f=e.getAttribute("source");if(f){var m=e.getAttribute("exit");e={event:e.getAttribute("event"),sa:e.getAttribute("metric")||m,fa:e.hasAttribute("cumulative"),
exit:m};c.add(M(f),e)}}}a.o=c;a.aa=new A(a.o,a.M)},0)};
g.disconnectedCallback=function(){Enabler.removeEventListener(studio.events.StudioEvent.INIT,this.X);Enabler.removeEventListener(studio.events.StudioEvent.VISIBLE,this.P);Enabler.removeEventListener(studio.events.StudioEvent.PAGE_LOADED,this.Y);Enabler.removeEventListener(studio.events.StudioEvent.EXPAND_START,this.J);Enabler.removeEventListener(studio.events.StudioEvent.COLLAPSE_START,this.I);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_START,this.J);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_START,
this.I);Enabler.removeEventListener(studio.events.StudioEvent.EXPAND_FINISH,this.K);Enabler.removeEventListener(studio.events.StudioEvent.COLLAPSE_FINISH,this.H);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_EXPAND_FINISH,this.K);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_COLLAPSE_FINISH,this.H);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_DIMENSIONS,this.W);this.g.removeEventListener("pagetransitionend",this.ba,!1);window.removeEventListener("resize",
this.da,!1);this.h&&this.m&&this.h.removeEventListener("ready",this.m);this.l&&this.i&&this.l.removeEventListener("bindingfinished",this.i);Enabler.removeEventListener(studio.events.StudioEvent.HOSTPAGE_SCROLL,this.B,!1);window.removeEventListener("message",this.B,!1)};g.initAd=function(){this.u=!1;var a=this.X;Enabler.removeEventListener(studio.events.StudioEvent.INIT,a);Enabler.addEventListener(studio.events.StudioEvent.INIT,a);Enabler.isInitialized()&&a()};
g.exit=function(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?!0:d;Enabler.exit(a,b);d&&N(this);c&&this.goToPage(e)};g.exitOverride=function(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?!0:d;Enabler.exitOverride(a,b);d&&N(this);c&&this.goToPage(e)};g.incrementCounter=function(a,b){Enabler.counter(a,b)};g.startTimer=function(a){Enabler.startTimer(a)};g.stopTimer=function(a){Enabler.stopTimer(a)};g.reportManualClose=function(){Enabler.reportManualClose()};
g.S=function(a){var b=a.target,c=M(b),d=c+": "+a.type;a:{var e=w(this.o,c);for(var f=0;f<e.length;f++)if(e[f].event==a.type){e=e[f];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.h&&0==(this.h.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=z(b))&&a.gwdIsActive()&&this.incrementCounter(e.sa||d,e.fa)};
g.ka=function(){var a=this;Enabler.removeEventListener(studio.events.StudioEvent.HOSTPAGE_SCROLL,this.B,!1);window.removeEventListener("message",this.B,!1);Enabler.isServingInLiveEnvironment()?Enabler.addEventListener(studio.events.StudioEvent.HOSTPAGE_SCROLL,this.B,!1):window.addEventListener("message",this.B,!1);var b=function(){if(a.hasAttribute("polite-load")){var d=a.Y;Enabler.isPageLoaded()?d():Enabler.addEventListener(studio.events.StudioEvent.PAGE_LOADED,d)}else d=a.P,Enabler.isVisible()?
d():Enabler.addEventListener(studio.events.StudioEvent.VISIBLE,d)};if(this.O){var c=function(d){a.C=!!d.supported;a.C&&D("fullscreensupport",a);Enabler.removeEventListener(studio.events.StudioEvent.FULLSCREEN_SUPPORT,c);b()};Enabler.addEventListener(studio.events.StudioEvent.FULLSCREEN_SUPPORT,c);Enabler.queryFullscreenSupport()}else b()};
g.ma=function(a){var b=this;if(this.u)this.h&&O(this,null);else{var c;a&&(c=a.detail);var d=this.ua.bind(this,c);this.h&&(d=this.ga.bind(this,d));if(this.O){Enabler.setResponsiveExpanding(!0);var e=function(f){b.L=f;d()};Enabler.loadModule(studio.module.ModuleId.GDN,function(){var f=studio.sdk.gdn.getConfig();f.isInCreativeToolsetContext()?f.isInterstitial(e):d()})}else d()}};g.la=function(){var a=this.P;Enabler.isVisible()?a():Enabler.addEventListener(studio.events.StudioEvent.VISIBLE,a)};
g.ga=function(a){var b=this;this.h?(this.m&&this.h.removeEventListener("ready",this.m),this.m=function(){b.s&&b.V&&b.s.applyOverrides();O(b,a)},this.h.isDataLoaded()&&this.m(),this.h.addEventListener("ready",this.m)):a()};
var O=function(a,b){var c=!!b;if(a.l){a.i&&(a.l.removeEventListener("bindingfinished",a.i),a.i=null);var d=a.h.getData();d&&(c=a.g.getElementsBySelector("*"),c=c.concat(a.g.getPages()),a.l.bindData(d,c)?a.ca(b):(a.i=a.ca.bind(a,b),a.l.addEventListener("bindingfinished",a.i)),c=!1)}c&&b()};g=I.prototype;
g.ca=function(a){this.V=!0;this.i&&(this.l.removeEventListener("bindingfinished",this.i),this.i=null);if(this.u){var b=document.getElementsByTagName("gwd-text-helper");0<b.length&&b[0].refitAll()}D("dynamicelementsready",this);a&&a()};g.ua=function(a){this.u||(this.u=!0,document.body.style.opacity="",D("adinitialized",this,a),this.L?(a=this.g.getPage(this.g.findPageIndexByAttributeValue("expanded",!0)),this.goToPage(a.id)):this.goToPage())};
g.goToPage=function(a,b,c,d,e){var f=this.g.getPage(this.g.currentIndex);if(a=a?this.g.getPage(a):this.g.getDefaultPage()){var m=!!f&&!!a&&!this.F&&!this.L&&!f.hasAttribute("expanded")&&a.hasAttribute("expanded");f=!!f&&!!a&&!this.D&&!this.L&&f.hasAttribute("expanded")&&!a.hasAttribute("expanded");m&&this.D||f&&this.F||((this.j=a.id,b&&(this.A={transition:b,duration:c,easing:d,direction:e}),m)?this.O&&!1!==this.C?this.C&&(this.v=!0,Enabler.requestFullscreenExpand()):Enabler.requestExpand():f?this.v?
Enabler.requestFullscreenCollapse():Enabler.requestCollapse():(this.D=this.F=!1,this.R()))}};g.ja=function(){D("expandstart",this);this.C?(this.v=!0,Enabler.finishFullscreenExpand()):Enabler.finishExpand();if(!this.j){var a=this.g.getPage(this.g.findPageIndexByAttributeValue("expanded",!0));a&&(this.j=a.id)}a=this.g.getPage(this.g.currentIndex);this.F=!!a&&this.j!=a.id;window.setTimeout(this.R.bind(this),30)};
g.ha=function(){D("collapsestart",this);this.v?(Enabler.finishFullscreenCollapse(),this.v=!1):Enabler.finishCollapse();this.j||(this.reportManualClose(),this.j=this.g.getDefaultPage().id);var a=this.g.getPage(this.g.currentIndex);this.D=!!a&&this.j!=a.id;window.setTimeout(this.R.bind(this),30)};
g.pa=function(a){if(Enabler.isServingInLiveEnvironment())var b=a;else{if(!a.data||"string"!==typeof a.data)return;try{b=JSON.parse(a.data)}catch(c){return}if(b.eventType!==studio.events.StudioEvent.HOSTPAGE_SCROLL)return}D("hostpagescroll",this,b)};g.oa=function(){this.u&&this.s&&(this.s.applyOverrides(),O(this,null));if(!this.j){var a=window.innerHeight>=window.innerWidth?1:2;this.N!=a&&(this.N=a,(a=this.g.getPage(this.g.currentIndex))&&window.setTimeout(this.goToPage.bind(this,a.id),0))}};
g.ia=function(a){a&&Enabler.setResponsiveSize(a.width,a.height)};g.R=function(){if(this.j){this.N=window.innerHeight>=window.innerWidth?1:2;var a=this.g.getOrientationSpecificPage(this.N,this.j);this.A?this.g.goToPage(a.id,this.A.transition,this.A.duration,this.A.easing,this.A.direction):this.g.goToPage(a.id);this.v&&a.classList.add("fs")}this.A=this.j=void 0};
g.na=function(a){this.D=this.F=!1;if(a.target==this.g){var b=a.detail;a=b.outgoingPage;b=b.incomingPage;if(a){var c=this.aa;if(a.nodeType==Node.ELEMENT_NODE)for(var d=v(c.o),e=0;e<d.length;e++){var f=C(d[e]);if(f&&x(a,f))for(var m=w(c.o,d[e]),B=0;B<m.length;B++)f.removeEventListener(m[B].event,c.M,!1)}if((a=a.querySelectorAll("video, gwd-video"))&&0<a.length)for(this.U=[];this.T.length;)studio.video.Reporter.detach(this.T.shift())}this.aa.observe(b);(a=b.querySelectorAll("video, gwd-video"))&&0<a.length&&
(b=studio.video&&studio.video.Reporter,c=this.ta.bind(this),this.U=Array.prototype.slice.call(a),b?c():Enabler.loadModule(studio.module.ModuleId.VIDEO,c))}};g.ta=function(){for(var a,b;this.U.length;)if(b=this.U.shift(),a=M(b))studio.video.Reporter.attach(a,"gwd-video"==b.tagName.toLowerCase()?b.nativeElement:b,b.autoplay),this.T.push(a)};
var M=function(a){return"object"==typeof gwd&&"GwdId"in gwd?(new gwd.GwdId(a)).getString():"string"==typeof a?a:a.id},N=function(a){a=Array.prototype.slice.call(a.g.querySelectorAll("audio, video, gwd-video, gwd-youtube, gwd-youtube-livestream, gwd-audio"));for(var b=0;b<a.length;b++)a[b].pause()};customElements.define("gwd-google-ad",I);}).call(this);
