;(function(omidGlobal) {
  var n;function da(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function p(a){var b='undefined'!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if('number'==typeof a.length)return{next:da(a)};throw Error(String(a)+' is not an iterable or ArrayLike');}function r(a){if(!(a instanceof Array)){a=p(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}
var ea='function'==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},fa='function'==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function ha(a){a=['object'==typeof globalThis&&globalThis,a,'object'==typeof window&&window,'object'==typeof self&&self,'object'==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error('Cannot find global object');}var ia=ha(this);function t(a,b){if(b)a:{var c=ia;a=a.split('.');for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&fa(c,a,{configurable:!0,writable:!0,value:b})}}var ja;
if('function'==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={a:!0},ma={};try{ma.__proto__=la;ka=ma.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+' is not extensible');return a}:null}var na=ja;
function oa(a,b){a.prototype=ea(b.prototype);a.prototype.constructor=a;if(na)na(a,b);else for(var c in b)if('prototype'!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.wa=b.prototype}function u(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}function v(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
var pa='function'==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)v(d,e)&&(a[e]=d[e])}return a};t('Object.assign',function(a){return a||pa});
t('Symbol',function(a){function b(f){if(this instanceof b)throw new TypeError('Symbol is not a constructor');return new c(d+(f||'')+'_'+e++,f)}function c(f,h){this.g=f;fa(this,'description',{configurable:!0,writable:!0,value:h})}if(a)return a;c.prototype.toString=function(){return this.g};var d='jscomp_symbol_'+(1E9*Math.random()>>>0)+'_',e=0;return b});
t('Symbol.iterator',function(a){if(a)return a;a=Symbol('Symbol.iterator');for(var b='Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array'.split(' '),c=0;c<b.length;c++){var d=ia[b[c]];'function'===typeof d&&'function'!=typeof d.prototype[a]&&fa(d.prototype,a,{configurable:!0,writable:!0,value:function(){return qa(da(this))}})}return a});function qa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
t('WeakMap',function(a){function b(k){this.g=(g+=Math.random()+1).toString();if(k){k=p(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return'object'===l&&null!==k||'function'===l}function e(k){if(!v(k,h)){var l=new c;fa(k,h,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(q){return!1}}())return a;var h='$jscomp_hidden_'+Math.random();f('freeze');f('preventExtensions');f('seal');var g=0;b.prototype.set=function(k,l){if(!d(k))throw Error('Invalid WeakMap key');e(k);if(!v(k,h))throw Error('WeakMap key fail: '+k);k[h][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&v(k,h)?k[h][this.g]:void 0};b.prototype.has=function(k){return d(k)&&v(k,
h)&&v(k[h],this.g)};b.prototype.delete=function(k){return d(k)&&v(k,h)&&v(k[h],this.g)?delete k[h][this.g]:!1};return b});
t('Map',function(a){function b(){var g={};return g.L=g.next=g.head=g}function c(g,k){var l=g.g;return qa(function(){if(l){for(;l.head!=g.g;)l=l.L;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(g,k){var l=k&&typeof k;'object'==l||'function'==l?f.has(k)?l=f.get(k):(l=''+ ++h,f.set(k,l)):l='p_'+k;var m=g.h[l];if(m&&v(g.h,l))for(g=0;g<m.length;g++){var q=m[g];if(k!==k&&q.key!==q.key||k===q.key)return{id:l,list:m,index:g,A:q}}return{id:l,list:m,
index:-1,A:void 0}}function e(g){this.h={};this.g=b();this.size=0;if(g){g=p(g);for(var k;!(k=g.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var g=Object.seal({x:4}),k=new a(p([[g,'s']]));if('s'!=k.get(g)||1!=k.size||k.get({x:4})||k.set({x:4},'t')!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=g||'s'!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
't'!=m.value[1]||!l.next().done?!1:!0}catch(q){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(g,k){g=0===g?0:g;var l=d(this,g);l.list||(l.list=this.h[l.id]=[]);l.A?l.A.value=k:(l.A={next:this.g,L:this.g.L,head:this.g,key:g,value:k},l.list.push(l.A),this.g.L.next=l.A,this.g.L=l.A,this.size++);return this};e.prototype.delete=function(g){g=d(this,g);return g.A&&g.list?(g.list.splice(g.index,1),g.list.length||delete this.h[g.id],g.A.L.next=g.A.next,g.A.next.L=g.A.L,g.A.head=null,this.size--,
!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.L=b();this.size=0};e.prototype.has=function(g){return!!d(this,g).A};e.prototype.get=function(g){return(g=d(this,g).A)&&g.value};e.prototype.entries=function(){return c(this,function(g){return[g.key,g.value]})};e.prototype.keys=function(){return c(this,function(g){return g.key})};e.prototype.values=function(){return c(this,function(g){return g.value})};e.prototype.forEach=function(g,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,
g.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var h=0;return e});t('Object.values',function(a){return a?a:function(b){var c=[],d;for(d in b)v(b,d)&&c.push(b[d]);return c}});function ra(a,b){a instanceof String&&(a+='');var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}t('Array.prototype.keys',function(a){return a?a:function(){return ra(this,function(b){return b})}});
t('Set',function(a){function b(c){this.g=new Map;if(c){c=p(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||'function'!=typeof a||!a.prototype.entries||'function'!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(p([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
f.value[1]!=f.value[0]?!1:e.next().done}catch(h){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});t('Object.is',function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});t('Array.prototype.includes',function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
t('String.prototype.includes',function(a){return a?a:function(b,c){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(b instanceof RegExp)throw new TypeError('First argument to String.prototype.includes must not be a regular expression');return-1!==this.indexOf(b,c||0)}});t('Array.prototype.values',function(a){return a?a:function(){return ra(this,function(b,c){return c})}});
var x={na:'loaded',ta:'start',ka:'firstQuartile',oa:'midpoint',ua:'thirdQuartile',ia:'complete',pa:'pause',ra:'resume',ha:'bufferStart',ga:'bufferFinish',sa:'skipped',va:'volumeChange',qa:'playerStateChange',fa:'adUserInteraction'},sa={la:'full',ja:'domain',ma:'limited'};function z(a,b){this.x=null!=a.x?a.x:a.left;this.y=null!=a.y?a.y:a.top;this.width=a.width;this.height=a.height;this.J=this.x+this.width;this.K=this.y+this.height;this.H=a.H||void 0;this.V=a.V||[];this.h=a.friendlyObstructionClass||void 0;this.i=a.friendlyObstructionPurpose||void 0;this.j=a.friendlyObstructionReason||void 0;this.P=void 0!==a.P?!0===a.P:!0;this.m=void 0!==a.hasWindowFocus?!0===a.hasWindowFocus:!0;this.D=a.D||void 0;this.aa=a.aa||void 0;this.W='true'===a.W||!0===a.W||!1;this.N=a.N||
[];this.R=a.R||!1;this.g=b}function ta(a){var b={};return b.width=a.width,b.height=a.height,b}function B(a){var b={};return Object.assign({},ta(a),(b.x=a.x,b.y=a.y,b))}function ua(a){var b=B(a),c={};return Object.assign({},b,(c.endX=a.J,c.endY=a.K,c))}z.prototype.T=function(a){if(null==a)return!1;a=B(a);var b=a.y,c=a.width,d=a.height;return this.x===a.x&&this.y===b&&this.width===c&&this.height===d};function Aa(a){return a.width*a.height}function Ba(a){return 0===a.width||0===a.height};function Ca(a,b){a=B(a);for(var c=[],d=[],e=0;e<b.length;e++){var f=B(b[e]);f=Da(a,f);Ea(c,f.x);Ea(c,f.J);Ea(d,f.y);Ea(d,f.K)}c=c.sort(function(h,g){return h-g});d=d.sort(function(h,g){return h-g});return{da:c,ea:d}}function Da(a,b){return{x:Math.max(a.x,b.x),y:Math.max(a.y,b.y),J:Math.min(a.x+a.width,b.x+b.width),K:Math.min(a.y+a.height,b.y+b.height)}}function Ea(a,b){-1===a.indexOf(b)&&a.push(b)};function Fa(){this.h=this.g=this.i=this.l=void 0;this.u=0;this.o=[];this.v=[];this.B=0;this.s=[];this.j=[];this.m=[]}Fa.prototype.T=function(a){return null==a?!1:JSON.stringify(Ga(this))===JSON.stringify(Ga(a))};
function Ga(a){var b=[],c=[],d={viewport:a.l,adView:{percentageInView:a.u,pixelsInView:a.B,reasons:a.m},declaredFriendlyObstructions:a.o.length};if(void 0!==a.g){d.adView.geometry=B(a.g);d.adView.geometry.pixels=Aa(a.g);d.adView.onScreenGeometry=B(a.h);d.adView.onScreenGeometry.pixels=Ha(a);for(var e=0;e<a.j.length;e++)b.push(B(a.j[e]));for(e=0;e<a.v.length;e++){var f=a.v[e],h=f,g={};h.h&&(g.obstructionClass=h.h);h.i&&(g.obstructionPurpose=h.i);h.j&&(g.obstructionReason=h.j);f=Da(a.g,f);c.push(Object.assign({},
{x:f.x,y:f.y,width:f.J-f.x,height:f.K-f.y},g))}d.adView.onScreenGeometry.obstructions=b;d.adView.onScreenGeometry.friendlyObstructions=c}return d}function Ia(a,b){b=ta(b);a.l={};a.l.width=b.width;a.l.height=b.height;a.i={};a.i.x=0;a.i.y=0;a.i.width=b.width;a.i.height=b.height;a.i.endX=b.width;a.i.endY=b.height}function Ja(){return{x:0,y:0,endX:0,endY:0,width:0,height:0}}
function Ka(a,b){var c={};c.x=Math.max(a.x,b.x);c.y=Math.max(a.y,b.y);c.endX=Math.min(a.endX,b.endX);c.endY=Math.min(a.endY,b.endY);c.width=Math.max(0,c.endX-c.x);c.height=Math.max(0,c.endY-c.y);return c}function La(a,b){return.01<b.width-a.width||.01<b.height-a.height}function Ma(a){if(-1!==a.m.indexOf('backgrounded'))a.u=0,a.B=0;else{var b=Aa(a.g);if(0!==b){var c=Ha(a);a.u=Math.round(c/b*100);a.B=c}}}
function Na(a,b){if(Ba(b)||!a.h)b=!1;else{var c=ua(a.h),d=c.y,e=c.endX;a=c.endY;var f=b.J;c=c.x;(f=f<c||.01>Math.abs(f-c))||(f=b.x,f=f>e||.01>Math.abs(f-e));(e=f)||(e=b.K,e=e<d||.01>Math.abs(e-d));(d=e)||(b=b.y,d=b>a||.01>Math.abs(b-a));b=!d}return b}function D(a,b){for(var c=!1,d=0;d<a.m.length;d++)a.m[d]===b&&(c=!0);c||a.m.push(b)}
function Ha(a){var b=Math,c=b.max,d=Aa(a.h),e=a.j,f=0;if(0<e.length){var h=Ca(a.h,e);a=h.da;h=h.ea;for(var g=0;g<a.length-1;g++)for(var k=(a[g]+(a[g]+1))/2,l=a[g+1]-a[g],m=0;m<h.length-1;m++){for(var q=(h[m]+(h[m]+1))/2,C=h[m+1]-h[m],H=!1,K=0;K<e.length;K++){var y=B(e[K]);if(y.x<k&&y.x+y.width>k&&y.y<q&&y.y+y.height>q){H=!0;break}}H&&(f+=Math.round(l)*Math.round(C))}}return c.call(b,0,d-f)};function Oa(){};function Pa(){}
function Qa(a,b,c,d){var e=b.R?!0:b.H===d;if(e){c.g=b;var f=ua(c.g);a=Ka(c.i,f);var h=c.g;'notAttached'===h.D||'noWindowFocus'===h.D||'noAdView'===h.D?(D(c,'notFound'),c.h=new z(Ja(),!1)):(h=c.g,'viewInvisible'===h.D||'viewGone'===h.D||'viewNotVisible'===h.D||'viewAlphaZero'===h.D||'viewHidden'===h.D||void 0!==c.g.D||Ba(c.g)?(D(c,'hidden'),c.h=new z(Ja(),!1)):(c.g.W&&D(c,'pictureInPicture'),c.g.m||(D(c,'backgrounded'),D(c,'noWindowFocus')),La(a,f)&&D(c,'clipped'),c.h=new z(a,!1)))}else if(f=!0,b.g&&
(f=-1!==b.V.indexOf(d)?!1:!1===b.P),f){h=b.N;for(var g=0;g<h.length;g++)f=void 0!==c.g,Qa(a,new z(h[g],f),c,d)}e||void 0===c.g||(b.g?-1!==b.V.indexOf(d)?c.o.push(b):c.s.push(b):(e=ua(b),d=ua(c.h),B(c.h),!Ba(c.h)&&b.P&&(b=Ka(d,e),La(b,d)&&(D(c,'clipped'),c.h=new z(b,!1)))))};function Ra(){this.g=new Map;this.h=null}function Sa(){Ta||(Ta=new Ra);return Ta}var Ta=null;function Ua(a,b){this.y=this.x=0;this.width=a;this.height=b};function Va(){this.H=null;this.i={apiVersion:'1.0',accessMode:'limited',environment:'web',omidJsInfo:{omidImplementer:'omsdk',serviceVersion:'1.5.2-google27'},adSessionType:'html',supports:['clid','vlid']};this.C=null;this.B='foregrounded';this.s=this.j='none';this.o=this.l=this.m=this.G=this.h=this.g=this.M=this.v=null;this.u=new Map};var E=function(){if('undefined'!==typeof omidGlobal&&omidGlobal)return omidGlobal;if('undefined'!==typeof global&&global)return global;if('undefined'!==typeof window&&window)return window;if('undefined'!==typeof globalThis&&globalThis)return globalThis;var a=Function('return this')();if(a)return a;throw Error('Could not determine global object context.');}();function Wa(a){if(a===E)return!1;try{if('undefined'===typeof a.location.hostname)return!0}catch(b){return!0}return!1}function eb(){var a=omidGlobal;if(null==a||'undefined'===typeof a.top||null==a.top)return null;try{var b=a.top;return Wa(b)?null:b.location.href}catch(c){return null}};function fb(a,b){this.g=a;this.h=b}ia.Object.defineProperties(fb.prototype,{event:{configurable:!0,enumerable:!0,get:function(){return this.g}},origin:{configurable:!0,enumerable:!0,get:function(){return this.h}}});function G(){var a=u.apply(0,arguments);gb(function(){throw new (Function.prototype.bind.apply(Error,[null,'Could not complete the test successfully - '].concat(r(a))));},function(){return console.error.apply(console,r(a))})}function hb(){var a=u.apply(0,arguments);gb(function(){},function(){return console.error.apply(console,r(a))})}function gb(a,b){'undefined'!==typeof jasmine&&jasmine?a():'undefined'!==typeof console&&console&&console.error&&b()};function ib(a){this.g=a;this.m=[];this.i=[];this.j=[];this.l=[];this.o={}}function jb(a,b){if(void 0!==a.g&&a.g.H&&!1!==kb(a,b)){var c=b.event;a.j.filter(function(d){return d.type===c.type}).forEach(function(d){a.h(d.I,c)})}}function I(a,b){a.m.push(b);jb(a,b)}function lb(a,b,c){void 0!==a.g&&a.g.H&&a.m.filter(function(d){return d.event.type===b&&kb(a,d)}).map(function(d){return d.event}).forEach(function(d){a.h(c.I,d)})}
function kb(a,b){var c=b.event.type,d=-1!==Object.values(x).indexOf(c)&&'volumeChange'!==c;return'impression'===c||'loaded'===c&&a.g.h?b.origin===a.g.s:d?b.origin===a.g.j:!0}function mb(a,b,c){Object.keys(x).forEach(function(d){d=x[d];var e={type:d,U:c,I:b};a.j.push(e);lb(a,d,e)})}function nb(a,b,c,d){var e={ba:c,U:d,I:b};a.l.push(e);a.i.forEach(function(f){var h=ob(f);'sessionStart'===f.event.type&&pb(a,h,e);a.h(e.I,h)})}
function qb(a,b,c){var d=L(a,'sessionError','native',{errorType:b,message:c});a.i.push(d);a.l.forEach(function(e){a.h(e.I,d.event)})}function rb(a,b){a.o=Object.assign(a.o,b);b=a.g.i;if(void 0!==b){b=Object.assign({},sb(tb(a,ub(a,{context:b}),!0)),{supportsLoadedEvent:!!a.g.h||'video'==a.g.g});Object.assign(b,{pageUrl:eb(),contentUrl:a.g.C});var c=L(a,'sessionStart','native',b);a.i.push(c);a.l.forEach(function(d){var e=ob(c);pb(a,e,d);a.h(d.I,e)},a);vb(a)}}
function pb(a,b,c){c.ba&&(b.data.verificationParameters=a.o[c.ba]);c.U&&(c=a.g.u.get(c.U))&&(b.data.verificationParameters=c.verificationParameters,b.data.context.accessMode=c.accessMode,'full'===c.accessMode&&(a.g.l&&(b.data.context.videoElement=a.g.l),a.g.m&&(b.data.context.slotElement=a.g.m)))}function wb(a){var b=L(a,'sessionFinish','native');a.i.push(b);a.l.forEach(function(c){a.h(c.I,b.event)})}ib.prototype.h=function(a){var b=u.apply(1,arguments);try{a.apply(null,r(b))}catch(c){hb(c)}};
function vb(a){var b=a.m.filter(function(f){return Object.values(x).includes(f.event.type)&&'video'==a.g.g&&f.origin===a.g.j||'loaded'==f.event.type&&'display'==a.g.g&&f.origin===a.g.s?!0:!1}).map(function(f){return f.event}),c=a.g.H||'',d={};b=p(b);for(var e=b.next();!e.done;d={F:d.F},e=b.next()){d.F=e.value;d.F.adSessionId||(d.F.adSessionId=c);if('loaded'==d.F.type){if(!a.g.h&&'display'==a.g.g)continue;d.F.data=tb(a,ub(a,d.F.data))}a.j.filter(function(f){return function(h){return h.type===f.F.type}}(d)).forEach(function(f){return function(h){return h.I(f.F)}}(d))}}
function xb(a,b){a:{b=new Set(b);a=p(a.m.concat(a.i));for(var c=a.next();!c.done;c=a.next())if(c=c.value,b.has(c.event.type)&&'javascript'!=c.origin){b=!0;break a}b=!1}return b?(G('Event owner cannot be registered after its events have already been published.'),!1):!0}function yb(a){var b=a.g.s;return'none'!=b&&'javascript'!=b?(G('Impression event is owned by '+(a.g.s+', not javascript.')),!1):!0}
function zb(a){var b=a.g.j;return'none'!=b&&'javascript'!=b?(G('Media events are owned by '+(a.g.j+', not javascript.')),!1):!0}function tb(a,b,c){c=void 0===c?!1:c;b=Object.assign({},b);a.g.g&&Object.assign(b,{mediaType:a.g.g});a.g.h&&(c||'definedByJavaScript'!==a.g.h)&&Object.assign(b,{creativeType:a.g.h});return b}function sb(a){var b=Sa().h;return b?Object.assign({},a,{lastActivity:b}):a}function ub(a,b){return a.g.G?Object.assign({},b,{impressionType:a.g.G}):b}
function L(a,b,c,d){return new fb({adSessionId:a.g.H||'',timestamp:(new Date).getTime(),type:b,data:d},c)}function ob(a){a=a.event;var b=a.data?Object.assign({},a.data):void 0;'sessionStart'===a.type&&(b.context=Object.assign({},b.context));return{adSessionId:a.adSessionId,timestamp:a.timestamp,type:a.type,data:b}}function Ab(a,b,c){'start'!==b&&'volumeChange'!==b||null!=(c&&c.deviceVolume)||(c.deviceVolume=a.g.v)}
function Bb(a,b,c){if(c&&('start'===b||'volumeChange'===b)){b=c.videoPlayerVolume;var d=c.mediaPlayerVolume;null!=b?(Object.assign(c,{mediaPlayerVolume:b}),a.g.M=b):null!=d&&(Object.assign(c,{videoPlayerVolume:d}),a.g.M=d)}};function Cb(a,b){this.h=a;this.g=b};function Db(){var a;this.g=a=void 0===a?omidGlobal:a}Db.prototype.setInterval=function(a,b){return Eb(this,'setInterval')(a,b)};Db.prototype.clearInterval=function(a){Eb(this,'clearInterval')(a)};function Fb(a,b){Eb(a,'clearTimeout')(b)}function Eb(a,b){return a.g&&a.g[b]?a.g[b]:Gb(a,b)}
function Hb(a,b,c,d){if(a.g.document&&a.g.document.body){var e=a.g.document.createElement('img');e.width=1;e.height=1;e.style.display='none';e.src=b;c&&e.addEventListener('load',function(){return c()});d&&e.addEventListener('error',function(){return d()});a.g.document.body.appendChild(e)}else Gb(a,'sendUrl')(b,c,d)}function Gb(a,b){if(a.g&&a.g.omidNative&&a.g.omidNative[b])return a.g.omidNative[b].bind(a.g.omidNative);throw Error('Native interface method "'+b+'" not found.');};function Ib(a){return!(!a||!a.tagName||'iframe'!==a.tagName.toLowerCase())};function O(a,b,c,d,e){this.j=a;this.ca=b;this.X=c;this.i=d;this.$=e;this.h=null;this.g=this.m=this.M=void 0;this.Z=!0;this.o=void 0;Jb(this)}
function Jb(a){if(!a.h){var b;a:{if((b=a.j.document)&&b.getElementsByClassName&&(b=b.getElementsByClassName('omid-element'))){if(1==b.length){b=b[0];break a}1<b.length&&a.Z&&(qb(a.X,'generic',"More than one element with 'omid-element' class name."),a.Z=!1)}b=null}if(b&&b.tagName&&'video'===b.tagName.toLowerCase())a.i.l=b;else if(b&&b.tagName)a.i.m=b;else return;Kb(a)}}function Kb(a){a.i.l?(a.h=a.i.l,a.s()):a.i.m&&(a.h=a.i.m,Ib(a.h)?a.i.o&&a.s():a.s())}
function P(a){a.g&&(Ib(a.h)?a.i.o&&(a.S(),Lb(a)):(a.S(),Lb(a)))}O.prototype.v=function(){this.o&&(this.j.document.removeEventListener('visibilitychange',this.o),this.o=void 0)};O.prototype.s=function(){var a=this;this.o||(this.o=function(){a.i.B=a.j.document.hidden?'backgrounded':'foregrounded';P(a)},this.j.document.addEventListener('visibilitychange',this.o),this.o())};
function Lb(a){if(a.M){a.i.S=a.M;a=a.ca;var b=a.g.S,c=a.g.O;if(b&&!b.T(c)){c=Ga(b);var d=a.h;'audio'!=d.g.h&&I(d,L(d,'geometryChange','native',c));a.g.O=b}}}function Mb(a){if(a.g&&a.i.o){var b=new z(a.i.o,!1),c=a.g.x;a=a.g.y;b.x+=c;b.y+=a;b.J+=c;b.K+=a;b.P=!0;return b}};function Q(a,b,c,d,e,f){O.call(this,a,c,d,e,f);this.u=b;this.l=void 0}oa(Q,O);Q.prototype.v=function(){void 0!==this.l&&(this.$.clearInterval(this.l),this.l=void 0);O.prototype.v.call(this)};Q.prototype.s=function(){var a=this;O.prototype.s.call(this);null==this.h?this.l=void 0:void 0===this.l&&(this.l=this.$.setInterval(function(){return Nb(a)},200),Nb(this))};
Q.prototype.S=function(){if(this.m){var a=Mb(this);if(a){this.g.R=!1;a.R=!0;for(var b=!1,c=0;c<this.g.N.length;c++)if(this.g.N[c].R){this.g.N[c]=a;b=!0;break}b||this.g.N.push(a)}else this.g.R=!0;b=this.u;c=this.i.B;var d=this.i.H,e=this.O();a=new Fa;var f=new z(this.m,!1);Ia(a,f);Qa(b,f,a,d);if(e)if(f.aa)D(a,'backgrounded'),D(a,'noOutputDevice');else if('backgrounded'===c)D(a,'backgrounded');else if(void 0!==a.g){for(b=0;b<a.o.length;b++)Na(a,a.o[b])&&a.v.push(a.o[b]);for(b=0;b<a.s.length;b++){if(c=
Na(a,a.s[b])){b:{c=a.s[b];for(d=0;d<a.j.length;d++)if(a.j[d].T(c)){c=!0;break b}c=!1}c=!c}c&&(D(a,'obstructed'),a.j.push(a.s[b]))}Ma(a)}else D(a,'notFound');else a.m=['unmeasurable'],a.l=void 0,a.u=0,a.j=[],a.g&&(b=a.g,c={},b=new z((c.x=0,c.y=0,c.width=b.width,c.height=b.height,c),b.g),a.g=b),a.h=Ja();this.M=a}};Q.prototype.O=function(){return Ob(this)};
function Nb(a){if(void 0!==a.l){if(Ob(a)){var b=a.j.top;b=new z(new Ua(b.innerWidth,b.innerHeight),!1)}else b=new z(new Ua(0,0),!1);var c=a.h.getBoundingClientRect();if(null==c.x||isNaN(c.x))c.x=c.left;if(null==c.y||isNaN(c.y))c.y=c.top;c=new z(c,!1);b.T(a.m)&&c.T(a.g)||(a.g=c,a.g.P=!0,a.m=b,a.m.N.push(a.g),P(a))}}function Ob(a){try{var b=a.j.top;return 0<=b.innerHeight&&0<=b.innerWidth}catch(c){}return!1};function R(a,b,c,d,e,f){O.call(this,a,c,d,e,f);this.C=this.u=this.B=this.l=void 0;this.Y=!1;this.G=void 0}oa(R,O);R.prototype.v=function(){this.l&&this.l.disconnect();Pb(this);O.prototype.v.call(this)};R.prototype.s=function(){O.prototype.s.call(this);if(this.h&&(this.l||(this.l=Qb(this)),Rb(this),Sb(this.h)&&Tb(this),'backgrounded'===this.i.B)){var a=Ub(new Ua(0,0));this.G=this.g=this.m=a;P(this)}};
R.prototype.S=function(){if(this.g&&this.G){var a=Mb(this);if(a){var b=a;var c=this.G;var d=Math.max(a.x,c.x);var e=Math.max(a.y,c.y),f=Math.min(a.J,c.J);a=Math.min(a.K,c.K);f<=d||a<=e?d=null:(c={},d=new z((c.x=d,c.y=e,c.width=Math.abs(f-d),c.height=Math.abs(a-e),c),!1));d||(d=new z({x:0,y:0,width:0,height:0},!1))}else b=this.g,d=this.G;e=new Fa;this.m&&Ia(e,this.m);(f='backgrounded'==this.i.B)&&D(e,'backgrounded');e.g=b;e.h=d;Ma(e);this.Y?!f&&Ba(e.g)?D(e,'hidden'):f||100===e.u||D(e,'clipped'):D(e,
'viewport');this.M=e}};R.prototype.O=function(){return!0};function Pb(a){a.B&&(a.B.disconnect(),a.B=void 0);a.u&&(a.u.disconnect(),a.u=void 0);a.C&&((0,a.j.removeEventListener)('resize',a.C),a.C=void 0)}function Rb(a){a.l&&a.h&&(a.l.unobserve(a.h),a.l.observe(a.h))}function Sb(a){a=a.getBoundingClientRect();return 0==a.width||0==a.height}
function Qb(a){return new a.j.IntersectionObserver(function(b){try{if(b.length){for(var c,d=b[0],e=1;e<b.length;e++)b[e].time>d.time&&(d=b[e]);c=d;a.m=Ub(c.rootBounds);a.g=Ub(c.boundingClientRect);a.G=Ub(c.intersectionRect);a.Y=!!c.isIntersecting;P(a)}}catch(f){a.v(),qb(a.X,'generic','Problem handling IntersectionObserver callback: '+f.message)}},{root:null,rootMargin:'0px',threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]})}
function Tb(a){a.j.ResizeObserver?a.B||(a.B=Vb(a,function(){return Wb(a)}),a.B.observe(a.h)):(a.C||(a.C=function(){return Wb(a)},(0,a.j.addEventListener)('resize',a.C)),a.u||(a.u=new MutationObserver(function(){return Wb(a)}),a.u.observe(a.h,{childList:!1,attributes:!0,subtree:!1})))}function Wb(a){a.h&&!Sb(a.h)&&(Rb(a),Pb(a))}function Vb(a,b){return new a.j.ResizeObserver(b)}function Ub(a){if(a&&null!==a.x&&null!==a.y&&null!==a.width&&null!==a.height)return new z(a,!1)};function Xb(a){if('object'===typeof a&&'object'===typeof a.webOSSystem)return a.webOSSystem}function Yb(a){return'object'===typeof Xb(a)}function S(a){if('object'===typeof a&&'object'===typeof a.tizen)return a.tizen}function T(a){return'object'===typeof S(a)};function Zb(a,b){this.h=a;this.g=b};function $b(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(a){var b=16*Math.random()|0;return'y'===a?(b&3|8).toString(16):b.toString(16)})};function ac(a,b){var c=void 0===c?E:c;this.i=a;this.g=c;this.j=b;this.h=[]}
function bc(a){if(!a.g||!a.g.document)throw Error('OMID Service Script is not running within a window.');var b=a.h;a.h=[];b.forEach(function(c){try{var d=c.accessMode,e='string'===typeof d&&-1!==Object.values(sa).indexOf(d)?c.accessMode:null;var f=e?e:'limited';c.accessMode=f;a:{var h=c.resourceUrl,g=a.g.location.origin;try{var k=new URL(h,g);break a}catch(C){}try{k=new URL(h);break a}catch(C){}k=null}if(d=k){var l=$b();vc(a,l,d,f);var m=c.vendorKey,q=c.verificationParameters;m=void 0===m?'':m;q=
void 0===q?'':q;m&&'string'===typeof m&&''!==m&&q&&'string'===typeof q&&''!==q&&(a.i.o[m]=q);a.j.u.set(l,c)}}catch(C){hb('OMID verification script '+c.resourceUrl+' failed to load: '+C)}})}
function vc(a,b,c,d){var e=a.g.document,f=e.createElement('iframe');f.id='omid-verification-script-frame-'+b;f.style.display='none';if('full'==d){var h=function(){var g=f.contentWindow;g.omidVerificationProperties={serviceWindow:a.g,injectionSource:'web',injectionId:b};g=g.document;var k=g.createElement('script');k.src=c.href;g.head.appendChild(k);f.removeEventListener('load',h)};f.addEventListener('load',h)}else'limited'==d?f.srcdoc="<html><head>\n<script type=\"text/javascript\">window['omidVerificationProperties'] = {\n'serviceWindow': window.parent,\n'injectionSource': 'web',\n'injectionId': '"+
(b+'\',\n};\x3c/script>\n<script type="text/javascript" src="')+c.href+'">\x3c/script>\n</head><body></body></html>':'domain'==d&&(f.src=wc(a,b,c).href);['domain','limited'].includes(d)&&(f.sandbox='allow-scripts');e.body.appendChild(f);Sa().g.set(b,f)}
function wc(a,b,c){var d='/.well-known/omid/omloader-v1.html#';(new Map([['verificationScriptUrl',c.href],['injectionId',b]])).forEach(function(e,f){d+=encodeURIComponent(f)+'='+encodeURIComponent(e)+'&'});b=null;try{b=new URL(d,a.g.parent.location.origin)}catch(e){throw Error('OMID Service Script cannot access the parent window.');}return b};function xc(a,b){var c=window,d=this;if(Yb(c))if(c)if(c.WebOSServiceBridge){this.i=a;this.h=b;this.g=new c.WebOSServiceBridge;this.g.onservicecallback=function(e){try{var f=JSON.parse(e);if(f&&f.errorCode)d.error(e);else if(!f)d.error('No object recieved from webOS bridge');else if(!yc(d,e,f,'volumeStatus','object')){var h=f.volumeStatus;yc(d,e,h,'muteStatus','boolean')||yc(d,e,h,'volume','number')||yc(d,e,h,'maxVolume','number')||(0>=h.maxVolume?d.error('Invalid max volume status.'):d.i(h.muteStatus?
0:h.volume/h.maxVolume))}}catch(g){d.error(g)}};try{this.g.call('luna://com.webos.service.audio/master/getVolume','{"subscribe":true}')}catch(e){this.error(e)}}else this.h('No WebOSServiceBridge on windowContext');else this.h('No window context')}xc.prototype.stop=function(){this.g&&this.g.cancel&&this.g.cancel();this.g=null};xc.prototype.error=function(a){this.stop();this.h&&this.h(a)};
function yc(a,b,c,d,e){if(typeof c[d]===e)return!1;a.error('Unexpected formatting on message from webOS bridge: "'+b+'". Expected "'+d+'" to be of type "'+e+'" but was of type "'+typeof c[d]+'".');return!0};function zc(a){return T(a)?'object'===typeof S(a).tvinputdevice:!1}function Ac(a,b){var c=window,d=this;if(c)if(this.validate(c)){this.h=b;var e=S(c).tvaudiocontrol;this.g=void 0;b=function(){var f=e.isMute()?0:e.getVolume()/100;if(void 0===d.g||d.g!=f)d.g=f,a(d.g)};b();this.i=c.setInterval(b,200);this.j=c}else b('Invalid Tizen window context');else b('No window context')}
Ac.prototype.stop=function(){void 0!==this.i&&'function'===typeof this.j.clearInterval&&this.j.clearInterval(this.i);this.h=this.g=this.i=void 0};Ac.prototype.validate=function(a){return T(a)&&zc(a)&&'object'===typeof S(a).tvaudiocontrol&&'function'===typeof a.setInterval&&'function'===typeof a.clearInterval};Ac.prototype.error=function(a){this.stop();this.h&&this.h(a)};function Bc(a,b,c,d,e){var f=this;this.g=a;this.i=b;this.h=c;this.l=d;this.o=e;this.m=!1;Cc(this,function(h){if('sessionStart'===h.type){f.m=!0;try{bc(f.l)}catch(g){G(g.message)}}'sessionFinish'===h.type&&(f.m=!1)})}function Cc(a,b,c,d){nb(a.i,b,c,d)}n=Bc.prototype;n.setSlotElement=function(a){a&&a.tagName?(this.g.m=a,this.h&&Kb(this.h)):G('setSlotElement called with a non-HTMLElement.  It will be ignored.')};n.setElementBounds=function(a){this.g.o=a;this.h&&Kb(this.h);this.h&&P(this.h)};
n.error=function(a,b){qb(this.i,a,b)};n.injectVerificationScriptResources=function(a){var b=this.l;b.h.push.apply(b.h,r(a));if(this.m)try{bc(this.l)}catch(c){G(c.message)}};n.setCreativeType=function(a,b){b=void 0===b?null:b;if(!this.g.g||this.g.h)this.g.h=a,'video'==a||'audio'==a?this.g.g='video':'htmlDisplay'==a||'nativeDisplay'==a?this.g.g='display':'definedByJavaScript'==a&&b&&(this.g.g='none'==b?'display':'video')};n.setImpressionType=function(a){if(!this.g.g||this.g.h)this.g.G=a};
n.setClientInfo=function(a,b,c){var d=this.g.i||{};d.omidJsInfo=Object.assign({},d.omidJsInfo,{sessionClientVersion:a,partnerName:b,partnerVersion:c});this.g.i=d;return this.g.i.omidJsInfo.serviceVersion};
function Dc(a){if(T(window)||Yb(window)){var b=function(d){if(a.g.v!==d&&'none'!==a.i.g.j&&'number'===typeof d&&!isNaN(d)){a.g.v=d;var e=a.o,f=e.g.M;null!=f&&(d=e.h,e={mediaPlayerVolume:f,deviceVolume:e.g.v},Ab(d,'volumeChange',e),Bb(d,'volumeChange',e),I(d,L(d,'volumeChange','native',e)))}},c=function(d){G(d)};Yb(window)?a.j=new xc(b,c):T(window)&&(a.j=new Ac(b,c))}};function Ec(a,b){if(!b)return a.g;for(var c=p(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value,d.g.u.has(b))return d;return a.g}function U(a,b){return null==b?a.g:a.h.get(b)||a.g}function Fc(a){var b=new Va,c=new ib(b),d=new Oa,e=new Pa,f=new Cb(c,b);a=a.i;var h=omidGlobal;d=h?h.IntersectionObserver&&(h.MutationObserver||h.ResizeObserver)?new R(h,d,f,c,b,a):new Q(h,e,f,c,b,a):null;return new Bc(b,c,d,new ac(c,b),new Zb(c,b))};function V(a,b,c,d){this.h=a;this.method=b;this.version=c;this.g=d}function Gc(a){return!!a&&void 0!==a.omid_message_guid&&void 0!==a.omid_message_method&&void 0!==a.omid_message_version&&'string'===typeof a.omid_message_guid&&'string'===typeof a.omid_message_method&&'string'===typeof a.omid_message_version&&(void 0===a.omid_message_args||void 0!==a.omid_message_args)}function Hc(a){return new V(a.omid_message_guid,a.omid_message_method,a.omid_message_version,a.omid_message_args)}
function Ic(a){var b={};b=(b.omid_message_guid=a.h,b.omid_message_method=a.method,b.omid_message_version=a.version,b);void 0!==a.g&&(b.omid_message_args=a.g);return b};function Jc(a){this.i=a};function X(a){this.i=a;this.handleExportedMessage=X.prototype.j.bind(this)}oa(X,Jc);X.prototype.h=function(a,b){b=void 0===b?this.i:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.handleExportedMessage(Ic(a),this)};X.prototype.j=function(a,b){Gc(a)&&this.g&&this.g(Hc(a),b)};function Kc(a){return Lc(a,'SessionService.')}function Lc(a,b){return(a=a.match(new RegExp('^'+b+'(.*)')))&&a[1]};function Mc(a,b){this.h=a;this.i=b}Mc.prototype.g=function(a){var b=u.apply(1,arguments);a:switch(a){case 'registerSessionObserver':var c=b.slice(1);break a;default:c=b}return this.h('SessionService.'+a,this.j.bind(this,a,b),c)};Mc.prototype.j=function(a,b,c){switch(a){case 'registerSessionObserver':a=p(b).next().value,a(c)}};function Y(a,b){return a.g.bind(a,b)}
function Nc(a,b){b=void 0===b?E:b;null==b.omidSessionInterface&&(a={setSessionClientWindow:a.i,setClientInfo:Y(a,'setClientInfo'),registerSessionObserver:Y(a,'registerSessionObserver'),startAdSession:Y(a,'startSession'),finishAdSession:Y(a,'finishSession'),reportError:Y(a,'sessionError'),registerAdEvents:Y(a,'registerAdEvents'),registerMediaEvents:Y(a,'registerMediaEvents'),injectVerificationScriptResources:Y(a,'injectVerificationScriptResources'),setSlotElement:Y(a,'setSlotElement'),setVideoElement:Y(a,
'setVideoElement'),setElementBounds:Y(a,'setElementBounds'),setCreativeType:Y(a,'setCreativeType'),setImpressionType:Y(a,'setImpressionType'),setContentUrl:Y(a,'setContentUrl'),adEvents:{impressionOccurred:Y(a,'impressionOccurred'),loaded:Y(a,'loaded')},mediaEvents:{start:Y(a,'start'),firstQuartile:Y(a,'firstQuartile'),midpoint:Y(a,'midpoint'),thirdQuartile:Y(a,'thirdQuartile'),complete:Y(a,'complete'),pause:Y(a,'pause'),resume:Y(a,'resume'),bufferStart:Y(a,'bufferStart'),bufferFinish:Y(a,'bufferFinish'),
skipped:Y(a,'skipped'),volumeChange:Y(a,'volumeChange'),playerStateChange:Y(a,'playerStateChange'),adUserInteraction:Y(a,'adUserInteraction')}},a.mediaEvents.loaded=a.adEvents.loaded,a.videoEvents=a.mediaEvents,Object.freeze(a),Object.defineProperty(b,'omidSessionInterface',{value:a,writable:!1}))};function Oc(a,b){this.i=b=void 0===b?E:b;var c=this;a.addEventListener('message',function(d){if('object'===typeof d.data){var e=d.data;Gc(e)&&d.source&&c.g&&c.g(Hc(e),d.source)}})}oa(Oc,Jc);Oc.prototype.h=function(a,b){b=void 0===b?this.i:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.postMessage(Ic(a),'*')};function Pc(){this.g=Qc}n=Pc.prototype;n.registerSessionObserver=function(a,b){Cc(U(this.g,a),b)};n.setSlotElement=function(a,b){U(this.g,a).setSlotElement(b)};n.setElementBounds=function(a,b){U(this.g,a).setElementBounds(b)};n.error=function(a,b,c){U(this.g,a).error(b,c)};
function Z(a,b,c,d){a=U(a.g,b);if('impression'==c)yb(a.i)&&(c=a.i,d=(d=c.g.O)?Ga(d):null,d=tb(c,ub(c,d)),I(c,L(c,'impression','javascript',d)),a.h&&Jb(a.h));else{if('loaded'==c){if(b=d,b=void 0===b?null:b,zb(a.i)&&(d=a.i,d.g.h||'display'!=d.g.g))b=L(d,'loaded','javascript',tb(d,ub(d,void 0===b?null:b))),I(d,b)}else zb(a.i)&&(b=a.i,Ab(b,c,d),Bb(b,c,d),I(b,L(b,c,'javascript',d)));['loaded','start'].includes(c)&&a.h&&Jb(a.h)}}n.injectVerificationScriptResources=function(a,b){U(this.g,a).injectVerificationScriptResources(b)};
n.setCreativeType=function(a,b,c){c=void 0===c?null:c;U(this.g,a).setCreativeType(b,c)};n.setImpressionType=function(a,b){U(this.g,a).setImpressionType(b)};n.setClientInfo=function(a,b,c,d){var e=this.g;if(null==a)a=e.g;else{var f=[].concat(r(e.h.values())).includes(e.g)?Fc(e):e.g;e.h.set(a,f);a=f}return a.setClientInfo(b,c,d)};function Rc(a){a=a.split('-')[0].split('.');for(var b=['1','0','3'],c=0;3>c;c++){var d=parseInt(a[c],10),e=parseInt(b[c],10);if(d>e)break;else if(d<e)return!1}return!0};function Sc(a,b){return/\d+\.\d+\.\d+(-.*)?/.test(a)&&Rc(a)?b:JSON.stringify(b)}function Tc(a,b){return/\d+\.\d+\.\d+(-.*)?/.test(a)&&Rc(a)?b?b:[]:b&&'string'===typeof b?JSON.parse(b):[]};function Uc(){var a=Vc,b=this;var c=void 0===c?omidGlobal:c;this.g=a;this.h=c;this.j=new X;this.h.omid=this.h.omid||{};this.h.omid.v1_SessionServiceCommunication=this.j;this.i=c&&c.addEventListener&&c.postMessage?new Oc(c):null;this.m=null;this.j.g=this.l.bind(this);this.i&&(this.i.g=this.o.bind(this));this.s=new Mc(function(d,e,f){try{Wc(b,d,e,f)}catch(h){G(Xc(h))}},function(d){b.m=d;var e=$b();b.i.h(new V(e,'identifyServiceWindow','1.5.2-google27'),d)});Nc(this.s,this.h)}
Uc.prototype.l=function(a,b){null!=Kc(a.method)&&Yc(this,a,b,this.j)};Uc.prototype.o=function(a,b){if(null!=Kc(a.method)){if(!this.m||b!==this.m)return G('Unrecognized session client window. Cross-origin session clients must register via the setSessionClientWindow API. See https://interactiveadvertisingbureau.github.io/Open-Measurement-SDKJS/iframes.html#om-sdk-js-session-client'),!1;Yc(this,a,b,this.i)}};
function Yc(a,b,c,d){function e(){var k=new V(f,'response',g,Sc(g,u.apply(0,arguments)));d.h(k,c)}var f=b.h,h=b.method,g=b.version;b=Tc(g,b.g);try{Wc(a,h,e,b)}catch(k){d.h(new V(f,'error',g,Xc(k)),c)}}
function Wc(a,b,c,d){if(null!=Kc(b))switch(Kc(b)){case 'registerAdEvents':var e=p(d).next().value,f=U(a.g.g,e).i;xb(f,['impression'])&&yb(f)&&(f.g.s='javascript');break;case 'registerMediaEvents':var h=p(d).next().value,g=U(a.g.g,h).i;xb(g,Object.values(x))&&zb(g)&&(g.g.j='javascript');break;case 'registerSessionObserver':var k=p(d).next().value;a.g.registerSessionObserver(k,c);break;case 'setSlotElement':var l=p(d),m=l.next().value,q=l.next().value;a.g.setSlotElement(q,m);break;case 'setVideoElement':var C=
p(d),H=C.next().value,K=C.next().value,y=U(a.g.g,K);H&&H.tagName&&'video'===H.tagName.toLowerCase()?(y.g.l=H,y.h&&Kb(y.h)):G('setVideoElement called with a non-HTMLVideoElement. It will be ignored.');break;case 'setElementBounds':var va=p(d),Xa=va.next().value,Ya=va.next().value;a.g.setElementBounds(Ya,Xa);break;case 'startSession':var aa=p(d),F=aa.next().value,wa=aa.next().value;var A=a.h;if(null!=F&&'object'===typeof F){var ba=F.customReferenceData,w=F.underEvaluation;'string'===typeof ba||(ba=
void 0);'boolean'===typeof w||(w=!1);var M={customReferenceData:ba,underEvaluation:w};if(Yb(A)){var cc=Xb(A),xa;'object'===typeof cc&&(xa=cc.identifier);M.app={appId:xa&&'string'===typeof xa?xa:void 0};b:{var dc=Xb(A);if('object'===typeof dc){try{var ec=JSON.parse(dc.deviceInfo)}catch(gd){var Za=void 0;break b}Za={deviceType:ec.modelName||'Unknown',osVersion:ec.platformVersion||'Unknown',os:'webOS'}}else Za=void 0}M.deviceInfo=Za;M.deviceCategory='ctv'}else if(T(A)){b:{if(T(A)){try{var fc=S(A).application.getCurrentApplication().appInfo.id}catch(gd){var $a=
void 0;break b}if('string'===typeof fc){$a=fc;break b}}$a=void 0}M.app={appId:$a};if(T(A)){var ya=S(A).systeminfo;if('object'===typeof ya&&'function'===typeof ya.getCapability){var hd=ya.getCapability('http://tizen.org/system/model_name');var id=ya.getCapability('http://tizen.org/feature/platform.version')}var gc={deviceType:hd||'Unknown',osVersion:id||'Unknown',os:'tizen'}}else gc=void 0;M.deviceInfo=gc;zc(A)&&(M.deviceCategory='ctv')}F=M}else F=null;if(null==F)break;var N=F;var ab=void 0===ab?null:
ab;var J=U(a.g.g,wa),hc=J.g.i;hc.sessionOwner||(hc.sessionOwner='javascript');var jd=wa||$b();J.g.H=jd;N.canMeasureVisibility=J.h.O();var bb=J.g;void 0!==N.contentUrl&&(bb.C=N.contentUrl,N.contentUrl=void 0);var ic=bb.i||{};N.omidJsInfo=Object.assign({},ic.omidJsInfo||{},N.omidJsInfo||{});var kd=Object.assign({},ic,N);bb.i=kd;rb(J.i,ab);J.h&&Jb(J.h);Dc(J);break;case 'finishSession':var ld=p(d).next().value,jc=a.g,ca=U(jc.g,ld),kc=jc.g;kc.g=Fc(kc);wb(ca.i);ca.h.v();ca.j&&(ca.j.stop(),ca.j=null);break;
case 'impressionOccurred':var md=p(d).next().value;Z(a.g,md,'impression');break;case 'loaded':var lc=p(d),W=lc.next().value,mc=lc.next().value;if(W){var nc={skippable:W.isSkippable,autoPlay:W.isAutoPlay,position:W.position};W.isSkippable&&(nc.skipOffset=W.skipOffset);Z(a.g,mc,'loaded',nc)}else Z(a.g,mc,'loaded');break;case 'start':var cb=p(d),nd=cb.next().value,od=cb.next().value,pd=cb.next().value;Z(a.g,pd,'start',{duration:nd,mediaPlayerVolume:od});break;case 'firstQuartile':var qd=p(d).next().value;
Z(a.g,qd,'firstQuartile');break;case 'midpoint':var rd=p(d).next().value;Z(a.g,rd,'midpoint');break;case 'thirdQuartile':var sd=p(d).next().value;Z(a.g,sd,'thirdQuartile');break;case 'complete':var td=p(d).next().value;Z(a.g,td,'complete');break;case 'pause':var ud=p(d).next().value;Z(a.g,ud,'pause');break;case 'resume':var vd=p(d).next().value;Z(a.g,vd,'resume');break;case 'bufferStart':var wd=p(d).next().value;Z(a.g,wd,'bufferStart');break;case 'bufferFinish':var xd=p(d).next().value;Z(a.g,xd,'bufferFinish');
break;case 'skipped':var yd=p(d).next().value;Z(a.g,yd,'skipped');break;case 'volumeChange':var oc=p(d),zd=oc.next().value,Ad=oc.next().value;Z(a.g,Ad,'volumeChange',{mediaPlayerVolume:zd});break;case 'playerStateChange':var pc=p(d),Bd=pc.next().value,Cd=pc.next().value;Z(a.g,Cd,'playerStateChange',{state:Bd});break;case 'adUserInteraction':var qc=p(d),Dd=qc.next().value,Ed=qc.next().value;Z(a.g,Ed,'adUserInteraction',{interactionType:Dd});break;case 'setClientInfo':var za=p(d),Fd=za.next().value,
Gd=za.next().value,Hd=za.next().value,Id=za.next().value,Jd=a.g.setClientInfo(Id,Fd,Gd,Hd);c(Jd);break;case 'injectVerificationScriptResources':var rc=p(d),Kd=rc.next().value,Ld=rc.next().value;a.g.injectVerificationScriptResources(Ld,Kd);break;case 'setCreativeType':var sc=p(d),Md=sc.next().value,Nd=sc.next().value;a.g.setCreativeType(Nd,Md);break;case 'setImpressionType':var tc=p(d),Od=tc.next().value,Pd=tc.next().value;a.g.setImpressionType(Pd,Od);break;case 'setContentUrl':var uc=p(d),Qd=uc.next().value,
Rd=uc.next().value;U(a.g.g,Rd).g.C=Qd;break;case 'sessionError':var db=p(d),Sd=db.next().value,Td=db.next().value,Ud=db.next().value;a.g.error(Ud,Sd,Td)}}function Xc(a){return'\n        name: '+a.name+'\n        message: '+a.message+'\n        filename: '+a.filename+'\n        lineNumber: '+a.lineNumber+'\n        columnNumber: '+a.columnNumber+'\n        stack: '+a.stack+'\n        toString(): '+a.toString()};function Zc(){var a=Qc,b=$c,c=this;var d=void 0===d?E:d;this.j=a;this.g=b;this.l={};this.m={};this.i=new X;d.omid=d.omid||{};d.omid.v1_VerificationServiceCommunication=this.i;this.h=null;d&&d.addEventListener&&d.postMessage&&(this.h=new Oc(d));this.i.g=function(e,f){ad(c,e,f,c.i)};this.h&&(this.h.g=function(e,f){c.h&&ad(c,e,f,c.h)})}
function bd(a){a({adSessionId:'',timestamp:(new Date).getTime(),type:'sessionError',data:{errorType:'generic',message:'Registration to session events is only allowed for verification clients injected by the OM-SDK service itself. Please note that in a future release registration in this manner will be rejected.'}})}function cd(a,b,c,d){a=Ec(a.j,d);void 0!==d&&a.g.u.has(d)?(a=a.i,'media'===b||'video'===b?mb(a,c,d):(c={type:b,U:d,I:c},a.j.push(c),lb(a,b,c))):bd(c)}
function dd(a,b,c,d){a=Ec(a.j,d);void 0!==d&&a.g.u.has(d)?Cc(a,b,c,d):bd(b)}function ed(a,b,c,d){Hb(a.g,b,c,d)}Zc.prototype.setInterval=function(a,b){return this.g.setInterval(a,b)};Zc.prototype.clearInterval=function(a){this.g.clearInterval(a)};function fd(a,b,c,d){Gb(a.g,'downloadJavaScriptResource')(b,c,d)}
function ad(a,b,c,d){function e(){var w=new V(f,'response',g,Sc(g,u.apply(0,arguments)));d.h(w,c)}var f=b.h,h=b.method,g=b.version;b=Tc(g,b.g);if(null!=Lc(h,'VerificationService.')){h=Lc(h,'VerificationService.');try{switch(h){case 'addEventListener':var k=p(b),l=k.next().value,m=k.next().value||Vd(c);cd(a,l,e,m);break;case 'addSessionListener':var q=p(b),C=q.next().value,H=q.next().value||Vd(c);dd(a,e,C,H);break;case 'sendUrl':var K=p(b).next().value;ed(a,K,function(){return e(!0)},function(){return e(!1)});
break;case 'setTimeout':var y=p(b),va=y.next().value,Xa=y.next().value;a.l[va]=Eb(a.g,'setTimeout')(e,Xa);break;case 'clearTimeout':var Ya=p(b).next().value;Fb(a.g,a.l[Ya]);break;case 'setInterval':var aa=p(b),F=aa.next().value,wa=aa.next().value;a.m[F]=a.setInterval(e,wa);break;case 'clearInterval':var A=p(b).next().value;a.clearInterval(a.m[A]);break;case 'injectJavaScriptResource':var ba=p(b).next().value;fd(a,ba,function(w){return e(!0,w)},function(){return e(!1)});break;case 'getVersion':e('1.5.2-google27')}}catch(w){d.h(new V(f,
'error',g,'\n              name: '+w.name+'\n              message: '+w.message+'\n              filename: '+w.filename+'\n              lineNumber: '+w.lineNumber+'\n              columnNumber: '+w.columnNumber+'\n              stack: '+w.stack+'\n              toString(): '+w.toString()+'\n          '),c)}}}
function Vd(a){for(var b=Sa().g,c=p(b.keys()),d=c.next();!d.done;d=c.next()){d=d.value;var e=b.get(d);if(e){if(e.contentWindow===a)return d;try{if(e.contentWindow.Object.prototype.isPrototypeOf(a))return d}catch(f){}}}};function Wd(a){var b={};return(b.app='omid_v1_present_app',b.web='omid_v1_present_web',b)[a]}function Xd(a,b){a.document.write('<iframe style="display:none" id="'+(b+'" name="'+b+'" sandbox></iframe>'))}function Yd(a,b){var c=a.document.createElement('iframe');c.id=b;c.name=b;c.style.display='none';c.sandbox='';a.document.body.appendChild(c)}
function Zd(a,b){var c=new MutationObserver(function(d){d.forEach(function(e){'BODY'===e.addedNodes[0].nodeName&&(e=Wd(b),Yd(a,'omid_v1_present'),Yd(a,e),c.disconnect())})});c.observe(a.document.documentElement,{childList:!0})};var $c=new Db,Qc=new function(){this.i=$c;this.h=new Map;this.g=Fc(this)},Vc=new Pc;new Zc;new Uc;(function(a,b){a.frames&&a.document&&!['omid_v1_present','omid_v1_present_web','omid_v1_present_app'].some(function(c){return!!a.frames[c]})&&(null==a.document.body&&'MutationObserver'in a?Zd(a,b):(b=Wd(b),a.document.body?(Yd(a,'omid_v1_present'),Yd(a,b)):(Xd(a,'omid_v1_present'),Xd(a,b))))})(E,'web');
}).call(this, this);

