@bygd/gd-sdk-pes 1.41.13 → 1.41.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/newArrowCheck";import n from"@babel/runtime/helpers/typeof";import r from"@babel/runtime/regenerator";import{parseJSON as i,getParentUrl as a,getParentDomain as s,getIframeDepth as o,getQueryParams as c,getTopDomain as d,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as g,Layers as A,getKeyByValue as v,getQueryString as b,EventBus as y,getIMASampleTags as _,SDKEvents as w,IMAEvents as k,Macros as E,setDankLog as x,ImplementationTest as D}from"@bygd/gd-sdk-era/dist/default";import S from"@babel/runtime/helpers/createClass";import R from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import C from"url-parse";import{Base64 as I}from"js-base64";import O from"validator";import P from"is-valid-domain";import B from"get-value";import L from"set-value";import U from"lodash.clonedeep";import{EventEmitter as M}from"events";import F from"can-autoplay";import{isPlainObject as j}from"is-plain-object";import G from"querystringify";import N from"lodash.merge";import{v4 as q}from"uuid";import H from"@babel/runtime/helpers/toConsumableArray";import V from"@fnet/inter-service-js";import Q from"@flownet/lib-connect-to-tcf";var z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},W=function(e){return e&&e.Math==Math&&e},K=W("object"==typeof globalThis&&globalThis)||W("object"==typeof window&&window)||W("object"==typeof self&&self)||W("object"==typeof z&&z)||function(){return this}()||Function("return this")(),Y={exports:{}},J=K,Z=Object.defineProperty,X=function(e,t){try{Z(J,e,{value:t,configurable:!0,writable:!0})}catch(n){J[e]=t}return t},$=X,ee="__core-js_shared__",te=K[ee]||$(ee,{}),ne=te;(Y.exports=function(e,t){return ne[e]||(ne[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var re,ie,ae=function(e){try{return!!e()}catch(e){return!0}},se=!ae((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),oe=se,ce=Function.prototype,de=ce.call,ue=oe&&ce.bind.bind(de,de),le=oe?ue:function(e){return function(){return de.apply(e,arguments)}},he=function(e){return null==e},pe=he,fe=TypeError,me=function(e){if(pe(e))throw fe("Can't call method on "+e);return e},ge=me,Ae=Object,ve=function(e){return Ae(ge(e))},be=ve,ye=le({}.hasOwnProperty),_e=Object.hasOwn||function(e,t){return ye(be(e),t)},we=le,ke=0,Ee=Math.random(),xe=we(1..toString),De=function(e){return"Symbol("+(void 0===e?"":e)+")_"+xe(++ke+Ee,36)},Se="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Re=K,Te=Se,Ce=Re.process,Ie=Re.Deno,Oe=Ce&&Ce.versions||Ie&&Ie.version,Pe=Oe&&Oe.v8;Pe&&(ie=(re=Pe.split("."))[0]>0&&re[0]<4?1:+(re[0]+re[1])),!ie&&Te&&(!(re=Te.match(/Edge\/(\d+)/))||re[1]>=74)&&(re=Te.match(/Chrome\/(\d+)/))&&(ie=+re[1]);var Be=ie,Le=Be,Ue=ae,Me=!!Object.getOwnPropertySymbols&&!Ue((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Le&&Le<41})),Fe=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,je=K,Ge=Y.exports,Ne=_e,qe=De,He=Me,Ve=Fe,Qe=je.Symbol,ze=Ge("wks"),We=Ve?Qe.for||Qe:Qe&&Qe.withoutSetter||qe,Ke=function(e){return Ne(ze,e)||(ze[e]=He&&Ne(Qe,e)?Qe[e]:We("Symbol."+e)),ze[e]},Ye={};Ye[Ke("toStringTag")]="z";var Je="[object z]"===String(Ye),Ze="object"==typeof document&&document.all,Xe={all:Ze,IS_HTMLDDA:void 0===Ze&&void 0!==Ze},$e=Xe.all,et=Xe.IS_HTMLDDA?function(e){return"function"==typeof e||e===$e}:function(e){return"function"==typeof e},tt={},nt=!ae((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),rt=et,it=Xe.all,at=Xe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:rt(e)||e===it}:function(e){return"object"==typeof e?null!==e:rt(e)},st=at,ot=K.document,ct=st(ot)&&st(ot.createElement),dt=function(e){return ct?ot.createElement(e):{}},ut=dt,lt=!nt&&!ae((function(){return 7!=Object.defineProperty(ut("div"),"a",{get:function(){return 7}}).a})),ht=nt&&ae((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),pt=at,ft=String,mt=TypeError,gt=function(e){if(pt(e))return e;throw mt(ft(e)+" is not an object")},At=se,vt=Function.prototype.call,bt=At?vt.bind(vt):function(){return vt.apply(vt,arguments)},yt=K,_t=et,wt=function(e,t){return arguments.length<2?(n=yt[e],_t(n)?n:void 0):yt[e]&&yt[e][t];var n},kt=le({}.isPrototypeOf),Et=wt,xt=et,Dt=kt,St=Object,Rt=Fe?function(e){return"symbol"==typeof e}:function(e){var t=Et("Symbol");return xt(t)&&Dt(t.prototype,St(e))},Tt=String,Ct=function(e){try{return Tt(e)}catch(e){return"Object"}},It=et,Ot=Ct,Pt=TypeError,Bt=function(e){if(It(e))return e;throw Pt(Ot(e)+" is not a function")},Lt=Bt,Ut=he,Mt=function(e,t){var n=e[t];return Ut(n)?void 0:Lt(n)},Ft=bt,jt=et,Gt=at,Nt=TypeError,qt=bt,Ht=at,Vt=Rt,Qt=Mt,zt=function(e,t){var n,r;if("string"===t&&jt(n=e.toString)&&!Gt(r=Ft(n,e)))return r;if(jt(n=e.valueOf)&&!Gt(r=Ft(n,e)))return r;if("string"!==t&&jt(n=e.toString)&&!Gt(r=Ft(n,e)))return r;throw Nt("Can't convert object to primitive value")},Wt=TypeError,Kt=Ke("toPrimitive"),Yt=function(e,t){if(!Ht(e)||Vt(e))return e;var n,r=Qt(e,Kt);if(r){if(void 0===t&&(t="default"),n=qt(r,e,t),!Ht(n)||Vt(n))return n;throw Wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),zt(e,t)},Jt=Rt,Zt=function(e){var t=Yt(e,"string");return Jt(t)?t:t+""},Xt=nt,$t=lt,en=ht,tn=gt,nn=Zt,rn=TypeError,an=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,on="enumerable",cn="configurable",dn="writable";tt.f=Xt?en?function(e,t,n){if(tn(e),t=nn(t),tn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&dn in n&&!n[dn]){var r=sn(e,t);r&&r[dn]&&(e[t]=n.value,n={configurable:cn in n?n[cn]:r[cn],enumerable:on in n?n[on]:r[on],writable:!1})}return an(e,t,n)}:an:function(e,t,n){if(tn(e),t=nn(t),tn(n),$t)try{return an(e,t,n)}catch(e){}if("get"in n||"set"in n)throw rn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var un={exports:{}},ln=nt,hn=_e,pn=Function.prototype,fn=ln&&Object.getOwnPropertyDescriptor,mn=hn(pn,"name"),gn={EXISTS:mn,PROPER:mn&&"something"===function(){}.name,CONFIGURABLE:mn&&(!ln||ln&&fn(pn,"name").configurable)},An=et,vn=te,bn=le(Function.toString);An(vn.inspectSource)||(vn.inspectSource=function(e){return bn(e)});var yn,_n,wn,kn=vn.inspectSource,En=et,xn=K.WeakMap,Dn=En(xn)&&/native code/.test(String(xn)),Sn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Rn=tt,Tn=Sn,Cn=nt?function(e,t,n){return Rn.f(e,t,Tn(1,n))}:function(e,t,n){return e[t]=n,e},In=Y.exports,On=De,Pn=In("keys"),Bn=function(e){return Pn[e]||(Pn[e]=On(e))},Ln={},Un=Dn,Mn=K,Fn=at,jn=Cn,Gn=_e,Nn=te,qn=Bn,Hn=Ln,Vn="Object already initialized",Qn=Mn.TypeError,zn=Mn.WeakMap;if(Un||Nn.state){var Wn=Nn.state||(Nn.state=new zn);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,yn=function(e,t){if(Wn.has(e))throw Qn(Vn);return t.facade=e,Wn.set(e,t),t},_n=function(e){return Wn.get(e)||{}},wn=function(e){return Wn.has(e)}}else{var Kn=qn("state");Hn[Kn]=!0,yn=function(e,t){if(Gn(e,Kn))throw Qn(Vn);return t.facade=e,jn(e,Kn,t),t},_n=function(e){return Gn(e,Kn)?e[Kn]:{}},wn=function(e){return Gn(e,Kn)}}var Yn={set:yn,get:_n,has:wn,enforce:function(e){return wn(e)?_n(e):yn(e,{})},getterFor:function(e){return function(t){var n;if(!Fn(t)||(n=_n(t)).type!==e)throw Qn("Incompatible receiver, "+e+" required");return n}}},Jn=le,Zn=ae,Xn=et,$n=_e,er=nt,tr=gn.CONFIGURABLE,nr=kn,rr=Yn.enforce,ir=Yn.get,ar=String,sr=Object.defineProperty,or=Jn("".slice),cr=Jn("".replace),dr=Jn([].join),ur=er&&!Zn((function(){return 8!==sr((function(){}),"length",{value:8}).length})),lr=String(String).split("String"),hr=un.exports=function(e,t,n){"Symbol("===or(ar(t),0,7)&&(t="["+cr(ar(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!$n(e,"name")||tr&&e.name!==t)&&(er?sr(e,"name",{value:t,configurable:!0}):e.name=t),ur&&n&&$n(n,"arity")&&e.length!==n.arity&&sr(e,"length",{value:n.arity});try{n&&$n(n,"constructor")&&n.constructor?er&&sr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=rr(e);return $n(r,"source")||(r.source=dr(lr,"string"==typeof t?t:"")),e};Function.prototype.toString=hr((function(){return Xn(this)&&ir(this).source||nr(this)}),"toString");var pr=et,fr=tt,mr=un.exports,gr=X,Ar=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(pr(n)&&mr(n,a,r),r.global)i?e[t]=n:gr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:fr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},vr=le,br=vr({}.toString),yr=vr("".slice),_r=function(e){return yr(br(e),8,-1)},wr=Je,kr=et,Er=_r,xr=Ke("toStringTag"),Dr=Object,Sr="Arguments"==Er(function(){return arguments}()),Rr=wr?Er:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Dr(e),xr))?n:Sr?Er(t):"Object"==(r=Er(t))&&kr(t.callee)?"Arguments":r},Tr=Rr,Cr=Je?{}.toString:function(){return"[object "+Tr(this)+"]"};Je||Ar(Object.prototype,"toString",Cr,{unsafe:!0});var Ir={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Or=dt("span").classList,Pr=Or&&Or.constructor&&Or.constructor.prototype,Br=Pr===Object.prototype?void 0:Pr,Lr=_r,Ur=le,Mr=function(e){if("Function"===Lr(e))return Ur(e)},Fr=Bt,jr=se,Gr=Mr(Mr.bind),Nr=function(e,t){return Fr(e),void 0===t?e:jr?Gr(e,t):function(){return e.apply(t,arguments)}},qr=ae,Hr=_r,Vr=Object,Qr=le("".split),zr=qr((function(){return!Vr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Hr(e)?Qr(e,""):Vr(e)}:Vr,Wr=Math.ceil,Kr=Math.floor,Yr=Math.trunc||function(e){var t=+e;return(t>0?Kr:Wr)(t)},Jr=function(e){var t=+e;return t!=t||0===t?0:Yr(t)},Zr=Jr,Xr=Math.min,$r=function(e){return e>0?Xr(Zr(e),9007199254740991):0},ei=$r,ti=function(e){return ei(e.length)},ni=_r,ri=Array.isArray||function(e){return"Array"==ni(e)},ii=le,ai=ae,si=et,oi=Rr,ci=kn,di=function(){},ui=[],li=wt("Reflect","construct"),hi=/^\s*(?:class|function)\b/,pi=ii(hi.exec),fi=!hi.exec(di),mi=function(e){if(!si(e))return!1;try{return li(di,ui,e),!0}catch(e){return!1}},gi=function(e){if(!si(e))return!1;switch(oi(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fi||!!pi(hi,ci(e))}catch(e){return!0}};gi.sham=!0;var Ai=!li||ai((function(){var e;return mi(mi.call)||!mi(Object)||!mi((function(){e=!0}))||e}))?gi:mi,vi=ri,bi=Ai,yi=at,_i=Ke("species"),wi=Array,ki=function(e){var t;return vi(e)&&(t=e.constructor,(bi(t)&&(t===wi||vi(t.prototype))||yi(t)&&null===(t=t[_i]))&&(t=void 0)),void 0===t?wi:t},Ei=function(e,t){return new(ki(e))(0===t?0:t)},xi=Nr,Di=zr,Si=ve,Ri=ti,Ti=Ei,Ci=le([].push),Ii=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,s=7==e,o=5==e||a;return function(c,d,u,l){for(var h,p,f=Si(c),m=Di(f),g=xi(d,u),A=Ri(m),v=0,b=l||Ti,y=t?b(c,A):n||s?b(c,0):void 0;A>v;v++)if((o||v in m)&&(p=g(h=m[v],v,f),e))if(t)y[v]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:Ci(y,h)}else switch(e){case 4:return!1;case 7:Ci(y,h)}return a?-1:r||i?i:y}},Oi={forEach:Ii(0),map:Ii(1),filter:Ii(2),some:Ii(3),every:Ii(4),find:Ii(5),findIndex:Ii(6),filterReject:Ii(7)},Pi=ae,Bi=function(e,t){var n=[][e];return!!n&&Pi((function(){n.call(null,t||function(){return 1},1)}))},Li=Oi.forEach,Ui=K,Mi=Ir,Fi=Br,ji=Bi("forEach")?[].forEach:function(e){return Li(this,e,arguments.length>1?arguments[1]:void 0)},Gi=Cn,Ni=function(e){if(e&&e.forEach!==ji)try{Gi(e,"forEach",ji)}catch(t){e.forEach=ji}};for(var qi in Mi)Mi[qi]&&Ni(Ui[qi]&&Ui[qi].prototype);Ni(Fi);var Hi={},Vi={},Qi={}.propertyIsEnumerable,zi=Object.getOwnPropertyDescriptor,Wi=zi&&!Qi.call({1:2},1);Vi.f=Wi?function(e){var t=zi(this,e);return!!t&&t.enumerable}:Qi;var Ki=zr,Yi=me,Ji=function(e){return Ki(Yi(e))},Zi=nt,Xi=bt,$i=Vi,ea=Sn,ta=Ji,na=Zt,ra=_e,ia=lt,aa=Object.getOwnPropertyDescriptor;Hi.f=Zi?aa:function(e,t){if(e=ta(e),t=na(t),ia)try{return aa(e,t)}catch(e){}if(ra(e,t))return ea(!Xi($i.f,e,t),e[t])};var sa={},oa=Jr,ca=Math.max,da=Math.min,ua=function(e,t){var n=oa(e);return n<0?ca(n+t,0):da(n,t)},la=Ji,ha=ua,pa=ti,fa=function(e){return function(t,n,r){var i,a=la(t),s=pa(a),o=ha(r,s);if(e&&n!=n){for(;s>o;)if((i=a[o++])!=i)return!0}else for(;s>o;o++)if((e||o in a)&&a[o]===n)return e||o||0;return!e&&-1}},ma={includes:fa(!0),indexOf:fa(!1)},ga=_e,Aa=Ji,va=ma.indexOf,ba=Ln,ya=le([].push),_a=function(e,t){var n,r=Aa(e),i=0,a=[];for(n in r)!ga(ba,n)&&ga(r,n)&&ya(a,n);for(;t.length>i;)ga(r,n=t[i++])&&(~va(a,n)||ya(a,n));return a},wa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ka=_a,Ea=wa.concat("length","prototype");sa.f=Object.getOwnPropertyNames||function(e){return ka(e,Ea)};var xa={};xa.f=Object.getOwnPropertySymbols;var Da=wt,Sa=sa,Ra=xa,Ta=gt,Ca=le([].concat),Ia=Da("Reflect","ownKeys")||function(e){var t=Sa.f(Ta(e)),n=Ra.f;return n?Ca(t,n(e)):t},Oa=_e,Pa=Ia,Ba=Hi,La=tt,Ua=function(e,t,n){for(var r=Pa(t),i=La.f,a=Ba.f,s=0;s<r.length;s++){var o=r[s];Oa(e,o)||n&&Oa(n,o)||i(e,o,a(t,o))}},Ma=ae,Fa=et,ja=/#|\.prototype\./,Ga=function(e,t){var n=qa[Na(e)];return n==Va||n!=Ha&&(Fa(t)?Ma(t):!!t)},Na=Ga.normalize=function(e){return String(e).replace(ja,".").toLowerCase()},qa=Ga.data={},Ha=Ga.NATIVE="N",Va=Ga.POLYFILL="P",Qa=Ga,za=K,Wa=Hi.f,Ka=Cn,Ya=Ar,Ja=X,Za=Ua,Xa=Qa,$a=function(e,t){var n,r,i,a,s,o=e.target,c=e.global,d=e.stat;if(n=c?za:d?za[o]||Ja(o,{}):(za[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Wa(n,r))&&s.value:n[r],!Xa(c?r:o+(d?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Za(a,i)}(e.sham||i&&i.sham)&&Ka(a,"sham",!0),Ya(n,r,a,e)}},es=_a,ts=wa,ns=Object.keys||function(e){return es(e,ts)},rs=ve,is=ns;$a({target:"Object",stat:!0,forced:ae((function(){is(1)}))},{keys:function(e){return is(rs(e))}});var as=Array.isArray,ss=Object.prototype.toString,os=as||function(e){return!!e&&"[object Array]"==ss.call(e)},cs={name:"@bygd/gd-sdk-pes",version:"1.41.13",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap inline --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.6","@flownet/lib-connect-to-tcf":"^0.2.10","@fnet/inter-service-js":"^0.9.4",axios:"^0.26.1","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",uuid:"^8.3.2",validator:"^13.6.0"}},ds=function(e){var t=us("object"===n(e)?e:i(e));return t&&t.version?cs.version>=t.version?t:void 0:t},us=function(e){var n=this;if(!os(e)||0===e.length)return e;if(1===e.length)return e[0];var r=0;e.forEach(function(e){t(this,n),e.weight=e.weight||1,r+=e.weight}.bind(this));var i=Math.floor(Math.random()*Math.floor(r));r=0;for(var a=0;a<e.length;a++){var s=e[a];if(i<(r+=s.weight))return s}},ls=function(){},hs=function(){var e;(e=console).log.apply(e,arguments)},ps=function(){var e;(e=console).log.apply(e,arguments)};JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima","adsense"],midroll:["ima","adsense","ima","adsense"],rewarded:["ima","adsense","ima","adsense"]}}),JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima"],midroll:["ima","adsense","ima"],rewarded:["ima","adsense","ima","adsense"]}});var fs={},ms=Rr,gs=String,As=function(e){if("Symbol"===ms(e))throw TypeError("Cannot convert a Symbol value to a string");return gs(e)},vs={},bs=nt,ys=ht,_s=tt,ws=gt,ks=Ji,Es=ns;vs.f=bs&&!ys?Object.defineProperties:function(e,t){ws(e);for(var n,r=ks(t),i=Es(t),a=i.length,s=0;a>s;)_s.f(e,n=i[s++],r[n]);return e};var xs,Ds=wt("document","documentElement"),Ss=gt,Rs=vs,Ts=wa,Cs=Ln,Is=Ds,Os=dt,Ps="prototype",Bs="script",Ls=Bn("IE_PROTO"),Us=function(){},Ms=function(e){return"<"+Bs+">"+e+"</"+Bs+">"},Fs=function(e){e.write(Ms("")),e.close();var t=e.parentWindow.Object;return e=null,t},js=function(){try{xs=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;js="undefined"!=typeof document?document.domain&&xs?Fs(xs):(t=Os("iframe"),n="java"+Bs+":",t.style.display="none",Is.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ms("document.F=Object")),e.close(),e.F):Fs(xs);for(var r=Ts.length;r--;)delete js[Ps][Ts[r]];return js()};Cs[Ls]=!0;var Gs=Object.create||function(e,t){var n;return null!==e?(Us[Ps]=Ss(e),n=new Us,Us[Ps]=null,n[Ls]=e):n=js(),void 0===t?n:Rs.f(n,t)},Ns={},Hs=Zt,Vs=tt,Qs=Sn,zs=function(e,t,n){var r=Hs(t);r in e?Vs.f(e,r,Qs(0,n)):e[r]=n},Ws=ua,Ks=ti,Ys=zs,Js=Array,Zs=Math.max,Xs=function(e,t,n){for(var r=Ks(e),i=Ws(t,r),a=Ws(void 0===n?r:n,r),s=Js(Zs(a-i,0)),o=0;i<a;i++,o++)Ys(s,o,e[i]);return s.length=o,s},$s=_r,eo=Ji,to=sa.f,no=Xs,ro="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ns.f=function(e){return ro&&"Window"==$s(e)?function(e){try{return to(e)}catch(e){return no(ro)}}(e):to(eo(e))};var ao=un.exports,so=tt,oo=function(e,t,n){return n.get&&ao(n.get,t,{getter:!0}),n.set&&ao(n.set,t,{setter:!0}),so.f(e,t,n)},co={},uo=Ke;co.f=uo;var lo=K,ho=_e,po=co,fo=tt.f,mo=function(e){var t=lo.Symbol||(lo.Symbol={});ho(t,e)||fo(t,e,{value:po.f(e)})},go=bt,Ao=wt,vo=Ke,bo=Ar,yo=tt.f,_o=_e,wo=Ke("toStringTag"),ko=function(e,t,n){e&&!n&&(e=e.prototype),e&&!_o(e,wo)&&yo(e,wo,{configurable:!0,value:t})},Eo=$a,xo=K,Do=bt,So=le,Ro=nt,To=Me,Co=ae,Io=_e,Oo=kt,Po=gt,Bo=Ji,Lo=Zt,Uo=As,Mo=Sn,Fo=Gs,jo=ns,Go=sa,No=Ns,qo=xa,Ho=Hi,Vo=tt,Qo=vs,zo=Vi,Wo=Ar,Ko=oo,Yo=Y.exports,Jo=Ln,Zo=De,Xo=Ke,$o=co,ec=mo,tc=function(){var e=Ao("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=vo("toPrimitive");t&&!t[r]&&bo(t,r,(function(e){return go(n,this)}),{arity:1})},nc=ko,rc=Yn,ic=Oi.forEach,ac=Bn("hidden"),sc="Symbol",oc="prototype",cc=rc.set,dc=rc.getterFor(sc),uc=Object[oc],lc=xo.Symbol,hc=lc&&lc[oc],pc=xo.TypeError,fc=xo.QObject,mc=Ho.f,gc=Vo.f,Ac=No.f,vc=zo.f,bc=So([].push),yc=Yo("symbols"),_c=Yo("op-symbols"),wc=Yo("wks"),kc=!fc||!fc[oc]||!fc[oc].findChild,Ec=Ro&&Co((function(){return 7!=Fo(gc({},"a",{get:function(){return gc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=mc(uc,t);r&&delete uc[t],gc(e,t,n),r&&e!==uc&&gc(uc,t,r)}:gc,xc=function(e,t){var n=yc[e]=Fo(hc);return cc(n,{type:sc,tag:e,description:t}),Ro||(n.description=t),n},Dc=function(e,t,n){e===uc&&Dc(_c,t,n),Po(e);var r=Lo(t);return Po(n),Io(yc,r)?(n.enumerable?(Io(e,ac)&&e[ac][r]&&(e[ac][r]=!1),n=Fo(n,{enumerable:Mo(0,!1)})):(Io(e,ac)||gc(e,ac,Mo(1,{})),e[ac][r]=!0),Ec(e,r,n)):gc(e,r,n)},Sc=function(e,t){Po(e);var n=Bo(t),r=jo(n).concat(Ic(n));return ic(r,(function(t){Ro&&!Do(Rc,n,t)||Dc(e,t,n[t])})),e},Rc=function(e){var t=Lo(e),n=Do(vc,this,t);return!(this===uc&&Io(yc,t)&&!Io(_c,t))&&(!(n||!Io(this,t)||!Io(yc,t)||Io(this,ac)&&this[ac][t])||n)},Tc=function(e,t){var n=Bo(e),r=Lo(t);if(n!==uc||!Io(yc,r)||Io(_c,r)){var i=mc(n,r);return!i||!Io(yc,r)||Io(n,ac)&&n[ac][r]||(i.enumerable=!0),i}},Cc=function(e){var t=Ac(Bo(e)),n=[];return ic(t,(function(e){Io(yc,e)||Io(Jo,e)||bc(n,e)})),n},Ic=function(e){var t=e===uc,n=Ac(t?_c:Bo(e)),r=[];return ic(n,(function(e){!Io(yc,e)||t&&!Io(uc,e)||bc(r,yc[e])})),r};To||(Wo(hc=(lc=function(){if(Oo(hc,this))throw pc("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Uo(arguments[0]):void 0,t=Zo(e),n=function(e){this===uc&&Do(n,_c,e),Io(this,ac)&&Io(this[ac],t)&&(this[ac][t]=!1),Ec(this,t,Mo(1,e))};return Ro&&kc&&Ec(uc,t,{configurable:!0,set:n}),xc(t,e)})[oc],"toString",(function(){return dc(this).tag})),Wo(lc,"withoutSetter",(function(e){return xc(Zo(e),e)})),zo.f=Rc,Vo.f=Dc,Qo.f=Sc,Ho.f=Tc,Go.f=No.f=Cc,qo.f=Ic,$o.f=function(e){return xc(Xo(e),e)},Ro&&(Ko(hc,"description",{configurable:!0,get:function(){return dc(this).description}}),Wo(uc,"propertyIsEnumerable",Rc,{unsafe:!0}))),Eo({global:!0,constructor:!0,wrap:!0,forced:!To,sham:!To},{Symbol:lc}),ic(jo(wc),(function(e){ec(e)})),Eo({target:sc,stat:!0,forced:!To},{useSetter:function(){kc=!0},useSimple:function(){kc=!1}}),Eo({target:"Object",stat:!0,forced:!To,sham:!Ro},{create:function(e,t){return void 0===t?Fo(e):Sc(Fo(e),t)},defineProperty:Dc,defineProperties:Sc,getOwnPropertyDescriptor:Tc}),Eo({target:"Object",stat:!0,forced:!To},{getOwnPropertyNames:Cc}),tc(),nc(lc,sc),Jo[ac]=!0;var Oc=Me&&!!Symbol.for&&!!Symbol.keyFor,Pc=$a,Bc=wt,Lc=_e,Uc=As,Mc=Y.exports,Fc=Oc,jc=Mc("string-to-symbol-registry"),Gc=Mc("symbol-to-string-registry");Pc({target:"Symbol",stat:!0,forced:!Fc},{for:function(e){var t=Uc(e);if(Lc(jc,t))return jc[t];var n=Bc("Symbol")(t);return jc[t]=n,Gc[n]=t,n}});var Nc=$a,qc=_e,Hc=Rt,Vc=Ct,Qc=Oc,zc=(0,Y.exports)("symbol-to-string-registry");Nc({target:"Symbol",stat:!0,forced:!Qc},{keyFor:function(e){if(!Hc(e))throw TypeError(Vc(e)+" is not a symbol");if(qc(zc,e))return zc[e]}});var Wc=se,Kc=Function.prototype,Yc=Kc.apply,Jc=Kc.call,Zc="object"==typeof Reflect&&Reflect.apply||(Wc?Jc.bind(Yc):function(){return Jc.apply(Yc,arguments)}),Xc=le([].slice),$c=ri,ed=et,td=_r,nd=As,rd=le([].push),id=$a,ad=wt,sd=Zc,od=bt,cd=le,dd=ae,ud=et,ld=Rt,hd=Xc,pd=function(e){if(ed(e))return e;if($c(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?rd(n,i):"number"!=typeof i&&"Number"!=td(i)&&"String"!=td(i)||rd(n,nd(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if($c(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},fd=Me,md=String,gd=ad("JSON","stringify"),Ad=cd(/./.exec),vd=cd("".charAt),bd=cd("".charCodeAt),yd=cd("".replace),_d=cd(1..toString),wd=/[\uD800-\uDFFF]/g,kd=/^[\uD800-\uDBFF]$/,Ed=/^[\uDC00-\uDFFF]$/,xd=!fd||dd((function(){var e=ad("Symbol")();return"[null]"!=gd([e])||"{}"!=gd({a:e})||"{}"!=gd(Object(e))})),Dd=dd((function(){return'"\\udf06\\ud834"'!==gd("\udf06\ud834")||'"\\udead"'!==gd("\udead")})),Sd=function(e,t){var n=hd(arguments),r=pd(t);if(ud(r)||void 0!==e&&!ld(e))return n[1]=function(e,t){if(ud(r)&&(t=od(r,this,md(e),t)),!ld(t))return t},sd(gd,null,n)},Rd=function(e,t,n){var r=vd(n,t-1),i=vd(n,t+1);return Ad(kd,e)&&!Ad(Ed,i)||Ad(Ed,e)&&!Ad(kd,r)?"\\u"+_d(bd(e,0),16):e};gd&&id({target:"JSON",stat:!0,arity:3,forced:xd||Dd},{stringify:function(e,t,n){var r=hd(arguments),i=sd(xd?Sd:gd,null,r);return Dd&&"string"==typeof i?yd(i,wd,Rd):i}});var Td=xa,Cd=ve;$a({target:"Object",stat:!0,forced:!Me||ae((function(){Td.f(1)}))},{getOwnPropertySymbols:function(e){var t=Td.f;return t?t(Cd(e)):[]}});var Id=ae,Od=Be,Pd=Ke("species"),Bd=function(e){return Od>=51||!Id((function(){var t=[];return(t.constructor={})[Pd]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ld=Oi.filter;$a({target:"Array",proto:!0,forced:!Bd("filter")},{filter:function(e){return Ld(this,e,arguments.length>1?arguments[1]:void 0)}});var Ud=$a,Md=ae,Fd=Ji,jd=Hi.f,Gd=nt;Ud({target:"Object",stat:!0,forced:!Gd||Md((function(){jd(1)})),sham:!Gd},{getOwnPropertyDescriptor:function(e,t){return jd(Fd(e),t)}});var Nd=Ia,qd=Ji,Hd=Hi,Vd=zs;$a({target:"Object",stat:!0,sham:!nt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=qd(e),i=Hd.f,a=Nd(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&Vd(s,t,n);return s}});var Qd=$a,zd=ri,Wd=Ai,Kd=at,Yd=ua,Jd=ti,Zd=Ji,Xd=zs,$d=Ke,eu=Xc,tu=Bd("slice"),nu=$d("species"),ru=Array,iu=Math.max;Qd({target:"Array",proto:!0,forced:!tu},{slice:function(e,t){var n,r,i,a=Zd(this),s=Jd(a),o=Yd(e,s),c=Yd(void 0===t?s:t,s);if(zd(a)&&(n=a.constructor,(Wd(n)&&(n===ru||zd(n.prototype))||Kd(n)&&null===(n=n[nu]))&&(n=void 0),n===ru||void 0===n))return eu(a,o,c);for(r=new(void 0===n?ru:n)(iu(c-o,0)),i=0;o<c;o++,i++)o in a&&Xd(r,i,a[o]);return r.length=i,r}});var au=bt,su=gt,ou=Mt,cu=function(e,t,n){var r,i;su(e);try{if(!(r=ou(e,"return"))){if("throw"===t)throw n;return n}r=au(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return su(r),n},du=gt,uu=cu,lu={},hu=lu,pu=Ke("iterator"),fu=Array.prototype,mu=function(e){return void 0!==e&&(hu.Array===e||fu[pu]===e)},gu=Rr,Au=Mt,vu=he,bu=lu,yu=Ke("iterator"),_u=function(e){if(!vu(e))return Au(e,yu)||Au(e,"@@iterator")||bu[gu(e)]},wu=bt,ku=Bt,Eu=gt,xu=Ct,Du=_u,Su=TypeError,Ru=function(e,t){var n=arguments.length<2?Du(e):t;if(ku(n))return Eu(wu(n,e));throw Su(xu(e)+" is not iterable")},Tu=Nr,Cu=bt,Iu=ve,Ou=function(e,t,n,r){try{return r?t(du(n)[0],n[1]):t(n)}catch(t){uu(e,"throw",t)}},Pu=mu,Bu=Ai,Lu=ti,Uu=zs,Mu=Ru,Fu=_u,ju=Array,Gu=function(e){var t=Iu(e),n=Bu(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Tu(i,r>2?arguments[2]:void 0));var s,o,c,d,u,l,h=Fu(t),p=0;if(!h||this===ju&&Pu(h))for(s=Lu(t),o=n?new this(s):ju(s);s>p;p++)l=a?i(t[p],p):t[p],Uu(o,p,l);else for(u=(d=Mu(t,h)).next,o=n?new this:[];!(c=Cu(u,d)).done;p++)l=a?Ou(d,i,[c.value,p],!0):c.value,Uu(o,p,l);return o.length=p,o},Nu=Ke("iterator"),qu=!1;try{var Hu=0,Vu={next:function(){return{done:!!Hu++}},return:function(){qu=!0}};Vu[Nu]=function(){return this},Array.from(Vu,(function(){throw 2}))}catch(e){}var Qu=function(e,t){if(!t&&!qu)return!1;var n=!1;try{var r={};r[Nu]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},zu=Gu;$a({target:"Array",stat:!0,forced:!Qu((function(e){Array.from(e)}))},{from:zu});var Wu,Ku,Yu,Ju=le,Zu=Jr,Xu=As,$u=me,el=Ju("".charAt),tl=Ju("".charCodeAt),nl=Ju("".slice),rl=function(e){return function(t,n){var r,i,a=Xu($u(t)),s=Zu(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=tl(a,s))<55296||r>56319||s+1===o||(i=tl(a,s+1))<56320||i>57343?e?el(a,s):r:e?nl(a,s,s+2):i-56320+(r-55296<<10)+65536}},il={codeAt:rl(!1),charAt:rl(!0)},al=!ae((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),sl=_e,ol=et,cl=ve,dl=al,ul=Bn("IE_PROTO"),ll=Object,hl=ll.prototype,pl=dl?ll.getPrototypeOf:function(e){var t=cl(e);if(sl(t,ul))return t[ul];var n=t.constructor;return ol(n)&&t instanceof n?n.prototype:t instanceof ll?hl:null},fl=ae,ml=et,gl=at,Al=pl,vl=Ar,bl=Ke("iterator"),yl=!1;[].keys&&("next"in(Yu=[].keys())?(Ku=Al(Al(Yu)))!==Object.prototype&&(Wu=Ku):yl=!0);var _l=!gl(Wu)||fl((function(){var e={};return Wu[bl].call(e)!==e}));_l&&(Wu={}),ml(Wu[bl])||vl(Wu,bl,(function(){return this}));var wl={IteratorPrototype:Wu,BUGGY_SAFARI_ITERATORS:yl},kl=wl.IteratorPrototype,El=Gs,xl=Sn,Dl=ko,Sl=lu,Rl=function(){return this},Tl=function(e,t,n,r){var i=t+" Iterator";return e.prototype=El(kl,{next:xl(+!r,n)}),Dl(e,i,!1),Sl[i]=Rl,e},Cl=le,Il=Bt,Ol=et,Pl=String,Bl=TypeError,Ll=function(e,t,n){try{return Cl(Il(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Ul=gt,Ml=function(e){if("object"==typeof e||Ol(e))return e;throw Bl("Can't set "+Pl(e)+" as a prototype")},Fl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ll(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ul(n),Ml(r),t?e(n,r):n.__proto__=r,n}}():void 0),jl=$a,Gl=bt,Nl=et,ql=Tl,Hl=pl,Vl=Fl,Ql=ko,zl=Cn,Wl=Ar,Kl=lu,Yl=gn.PROPER,Jl=gn.CONFIGURABLE,Zl=wl.IteratorPrototype,Xl=wl.BUGGY_SAFARI_ITERATORS,$l=Ke("iterator"),eh="keys",th="values",nh="entries",rh=function(){return this},ih=function(e,t,n,r,i,a,s){ql(n,t,r);var o,c,d,u=function(e){if(e===i&&m)return m;if(!Xl&&e in p)return p[e];switch(e){case eh:case th:case nh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[$l]||p["@@iterator"]||i&&p[i],m=!Xl&&f||u(i),g="Array"==t&&p.entries||f;if(g&&(o=Hl(g.call(new e)))!==Object.prototype&&o.next&&(Hl(o)!==Zl&&(Vl?Vl(o,Zl):Nl(o[$l])||Wl(o,$l,rh)),Ql(o,l,!0)),Yl&&i==th&&f&&f.name!==th&&(Jl?zl(p,"name",th):(h=!0,m=function(){return Gl(f,this)})),i)if(c={values:u(th),keys:a?m:u(eh),entries:u(nh)},s)for(d in c)(Xl||h||!(d in p))&&Wl(p,d,c[d]);else jl({target:t,proto:!0,forced:Xl||h},c);return p[$l]!==m&&Wl(p,$l,m,{name:i}),Kl[t]=m,c},ah=function(e,t){return{value:e,done:t}},sh=il.charAt,oh=As,ch=Yn,dh=ih,uh=ah,lh="String Iterator",hh=ch.set,ph=ch.getterFor(lh);dh(String,"String",(function(e){hh(this,{type:lh,string:oh(e),index:0})}),(function(){var e,t=ph(this),n=t.string,r=t.index;return r>=n.length?uh(void 0,!0):(e=sh(n,r),t.index+=e.length,uh(e,!1))}));var fh=gt,mh=function(){var e=fh(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},gh=ae,Ah=K.RegExp,vh=gh((function(){var e=Ah("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),bh=vh||gh((function(){return!Ah("a","y").sticky})),yh={BROKEN_CARET:vh||gh((function(){var e=Ah("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:bh,UNSUPPORTED_Y:vh},_h=ae,wh=K.RegExp,kh=_h((function(){var e=wh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Eh=ae,xh=K.RegExp,Dh=Eh((function(){var e=xh("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Sh=bt,Rh=le,Th=As,Ch=mh,Ih=yh,Oh=Y.exports,Ph=Gs,Bh=Yn.get,Lh=kh,Uh=Dh,Mh=Oh("native-string-replace",String.prototype.replace),Fh=RegExp.prototype.exec,jh=Fh,Gh=Rh("".charAt),Nh=Rh("".indexOf),qh=Rh("".replace),Hh=Rh("".slice),Vh=function(){var e=/a/,t=/b*/g;return Sh(Fh,e,"a"),Sh(Fh,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Qh=Ih.BROKEN_CARET,zh=void 0!==/()??/.exec("")[1];(Vh||zh||Qh||Lh||Uh)&&(jh=function(e){var t,n,r,i,a,s,o,c=this,d=Bh(c),u=Th(e),l=d.raw;if(l)return l.lastIndex=c.lastIndex,t=Sh(jh,l,u),c.lastIndex=l.lastIndex,t;var h=d.groups,p=Qh&&c.sticky,f=Sh(Ch,c),m=c.source,g=0,A=u;if(p&&(f=qh(f,"y",""),-1===Nh(f,"g")&&(f+="g"),A=Hh(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Gh(u,c.lastIndex-1))&&(m="(?: "+m+")",A=" "+A,g++),n=new RegExp("^(?:"+m+")",f)),zh&&(n=new RegExp("^"+m+"$(?!\\s)",f)),Vh&&(r=c.lastIndex),i=Sh(Fh,p?n:c,A),p?i?(i.input=Hh(i.input,g),i[0]=Hh(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Vh&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),zh&&i&&i.length>1&&Sh(Mh,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=s=Ph(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var Wh=jh;$a({target:"RegExp",proto:!0,forced:/./.exec!==Wh},{exec:Wh});var Kh=$a,Yh=nt,Jh=le,Zh=_e,Xh=et,$h=kt,ep=As,tp=oo,np=Ua,rp=K.Symbol,ip=rp&&rp.prototype;if(Yh&&Xh(rp)&&(!("description"in ip)||void 0!==rp().description)){var ap={},sp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:ep(arguments[0]),t=$h(ip,this)?new rp(e):void 0===e?rp():rp(e);return""===e&&(ap[t]=!0),t};np(sp,rp),sp.prototype=ip,ip.constructor=sp;var op="Symbol(test)"==String(rp("test")),cp=Jh(ip.valueOf),dp=Jh(ip.toString),up=/^Symbol\((.*)\)[^)]+$/,lp=Jh("".replace),hp=Jh("".slice);tp(ip,"description",{configurable:!0,get:function(){var e=cp(this);if(Zh(ap,e))return"";var t=dp(e),n=op?hp(t,7,-1):lp(t,up,"$1");return""===n?void 0:n}}),Kh({global:!0,constructor:!0,forced:!0},{Symbol:sp})}mo("iterator");var pp=Ke,fp=Gs,mp=tt.f,gp=pp("unscopables"),Ap=Array.prototype;null==Ap[gp]&&mp(Ap,gp,{configurable:!0,value:fp(null)});var vp=function(e){Ap[gp][e]=!0},bp=Ji,yp=vp,_p=lu,wp=Yn,kp=tt.f,Ep=ih,xp=ah,Dp=nt,Sp="Array Iterator",Rp=wp.set,Tp=wp.getterFor(Sp),Cp=Ep(Array,"Array",(function(e,t){Rp(this,{type:Sp,target:bp(e),index:0,kind:t})}),(function(){var e=Tp(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,xp(void 0,!0)):xp("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Ip=_p.Arguments=_p.Array;if(yp("keys"),yp("values"),yp("entries"),Dp&&"values"!==Ip.name)try{kp(Ip,"name",{value:"values"})}catch(e){}var Op=K,Pp=Ir,Bp=Br,Lp=Cp,Up=Cn,Mp=Ke,Fp=Mp("iterator"),jp=Mp("toStringTag"),Gp=Lp.values,Np=function(e,t){if(e){if(e[Fp]!==Gp)try{Up(e,Fp,Gp)}catch(t){e[Fp]=Gp}if(e[jp]||Up(e,jp,t),Pp[t])for(var n in Lp)if(e[n]!==Lp[n])try{Up(e,n,Lp[n])}catch(t){e[n]=Lp[n]}}};for(var qp in Pp)Np(Op[qp]&&Op[qp].prototype,qp);Np(Bp,"DOMTokenList");var Hp,Vp,Qp,zp,Wp="undefined"!=typeof process&&"process"==_r(process),Kp=wt,Yp=oo,Jp=nt,Zp=Ke("species"),Xp=function(e){var t=Kp(e);Jp&&t&&!t[Zp]&&Yp(t,Zp,{configurable:!0,get:function(){return this}})},$p=kt,ef=TypeError,tf=function(e,t){if($p(t,e))return e;throw ef("Incorrect invocation")},nf=Ai,rf=Ct,af=TypeError,sf=gt,of=function(e){if(nf(e))return e;throw af(rf(e)+" is not a constructor")},cf=he,df=Ke("species"),uf=function(e,t){var n,r=sf(e).constructor;return void 0===r||cf(n=sf(r)[df])?t:of(n)},lf=TypeError,hf=function(e,t){if(e<t)throw lf("Not enough arguments");return e},pf=/(?:ipad|iphone|ipod).*applewebkit/i.test(Se),ff=K,mf=Zc,gf=Nr,Af=et,vf=_e,bf=ae,yf=Ds,_f=Xc,wf=dt,kf=hf,Ef=pf,xf=Wp,Df=ff.setImmediate,Sf=ff.clearImmediate,Rf=ff.process,Tf=ff.Dispatch,Cf=ff.Function,If=ff.MessageChannel,Of=ff.String,Pf=0,Bf={},Lf="onreadystatechange";bf((function(){Hp=ff.location}));var Uf=function(e){if(vf(Bf,e)){var t=Bf[e];delete Bf[e],t()}},Mf=function(e){return function(){Uf(e)}},Ff=function(e){Uf(e.data)},jf=function(e){ff.postMessage(Of(e),Hp.protocol+"//"+Hp.host)};Df&&Sf||(Df=function(e){kf(arguments.length,1);var t=Af(e)?e:Cf(e),n=_f(arguments,1);return Bf[++Pf]=function(){mf(t,void 0,n)},Vp(Pf),Pf},Sf=function(e){delete Bf[e]},xf?Vp=function(e){Rf.nextTick(Mf(e))}:Tf&&Tf.now?Vp=function(e){Tf.now(Mf(e))}:If&&!Ef?(zp=(Qp=new If).port2,Qp.port1.onmessage=Ff,Vp=gf(zp.postMessage,zp)):ff.addEventListener&&Af(ff.postMessage)&&!ff.importScripts&&Hp&&"file:"!==Hp.protocol&&!bf(jf)?(Vp=jf,ff.addEventListener("message",Ff,!1)):Vp=Lf in wf("script")?function(e){yf.appendChild(wf("script"))[Lf]=function(){yf.removeChild(this),Uf(e)}}:function(e){setTimeout(Mf(e),0)});var Gf={set:Df,clear:Sf},Nf=function(){this.head=null,this.tail=null};Nf.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var qf,Hf,Vf,Qf,zf,Wf=Nf,Kf=/ipad|iphone|ipod/i.test(Se)&&"undefined"!=typeof Pebble,Yf=/web0s(?!.*chrome)/i.test(Se),Jf=K,Zf=Nr,Xf=Hi.f,$f=Gf.set,em=Wf,tm=pf,nm=Kf,rm=Yf,im=Wp,am=Jf.MutationObserver||Jf.WebKitMutationObserver,sm=Jf.document,om=Jf.process,cm=Jf.Promise,dm=Xf(Jf,"queueMicrotask"),um=dm&&dm.value;if(!um){var lm=new em,hm=function(){var e,t;for(im&&(e=om.domain)&&e.exit();t=lm.get();)try{t()}catch(e){throw lm.head&&qf(),e}e&&e.enter()};tm||im||rm||!am||!sm?!nm&&cm&&cm.resolve?((Qf=cm.resolve(void 0)).constructor=cm,zf=Zf(Qf.then,Qf),qf=function(){zf(hm)}):im?qf=function(){om.nextTick(hm)}:($f=Zf($f,Jf),qf=function(){$f(hm)}):(Hf=!0,Vf=sm.createTextNode(""),new am(hm).observe(Vf,{characterData:!0}),qf=function(){Vf.data=Hf=!Hf}),um=function(e){lm.head||qf(),lm.add(e)}}var pm=um,fm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},mm=K.Promise,gm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Am=!gm&&!Wp&&"object"==typeof window&&"object"==typeof document,vm=K,bm=mm,ym=et,_m=Qa,wm=kn,km=Ke,Em=Am,xm=gm,Dm=Be;bm&&bm.prototype;var Sm=km("species"),Rm=!1,Tm=ym(vm.PromiseRejectionEvent),Cm=_m("Promise",(function(){var e=wm(bm),t=e!==String(bm);if(!t&&66===Dm)return!0;if(!Dm||Dm<51||!/native code/.test(e)){var n=new bm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Sm]=r,!(Rm=n.then((function(){}))instanceof r))return!0}return!t&&(Em||xm)&&!Tm})),Im={CONSTRUCTOR:Cm,REJECTION_EVENT:Tm,SUBCLASSING:Rm},Om={},Pm=Bt,Bm=TypeError,Lm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Bm("Bad Promise constructor");t=e,n=r})),this.resolve=Pm(t),this.reject=Pm(n)};Om.f=function(e){return new Lm(e)};var Um,Mm,Fm,jm=$a,Gm=Wp,Nm=K,qm=bt,Hm=Ar,Vm=Fl,Qm=ko,zm=Xp,Wm=Bt,Km=et,Ym=at,Jm=tf,Zm=uf,Xm=Gf.set,$m=pm,eg=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},tg=fm,ng=Wf,rg=Yn,ig=mm,ag=Om,sg="Promise",og=Im.CONSTRUCTOR,cg=Im.REJECTION_EVENT,dg=Im.SUBCLASSING,ug=rg.getterFor(sg),lg=rg.set,hg=ig&&ig.prototype,pg=ig,fg=hg,mg=Nm.TypeError,gg=Nm.document,Ag=Nm.process,vg=ag.f,bg=vg,yg=!!(gg&&gg.createEvent&&Nm.dispatchEvent),_g="unhandledrejection",wg=function(e){var t;return!(!Ym(e)||!Km(t=e.then))&&t},kg=function(e,t){var n,r,i,a=t.value,s=1==t.state,o=s?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{o?(s||(2===t.rejection&&Rg(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?d(mg("Promise-chain cycle")):(r=wg(n))?qm(r,n,c,d):c(n)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},Eg=function(e,t){e.notified||(e.notified=!0,$m((function(){for(var n,r=e.reactions;n=r.get();)kg(n,e);e.notified=!1,t&&!e.rejection&&Dg(e)})))},xg=function(e,t,n){var r,i;yg?((r=gg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Nm.dispatchEvent(r)):r={promise:t,reason:n},!cg&&(i=Nm["on"+e])?i(r):e===_g&&eg("Unhandled promise rejection",n)},Dg=function(e){qm(Xm,Nm,(function(){var t,n=e.facade,r=e.value;if(Sg(e)&&(t=tg((function(){Gm?Ag.emit("unhandledRejection",r,n):xg(_g,n,r)})),e.rejection=Gm||Sg(e)?2:1,t.error))throw t.value}))},Sg=function(e){return 1!==e.rejection&&!e.parent},Rg=function(e){qm(Xm,Nm,(function(){var t=e.facade;Gm?Ag.emit("rejectionHandled",t):xg("rejectionhandled",t,e.value)}))},Tg=function(e,t,n){return function(r){e(t,r,n)}},Cg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Eg(e,!0))},Ig=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw mg("Promise can't be resolved itself");var r=wg(t);r?$m((function(){var n={done:!1};try{qm(r,t,Tg(Ig,n,e),Tg(Cg,n,e))}catch(t){Cg(n,t,e)}})):(e.value=t,e.state=1,Eg(e,!1))}catch(t){Cg({done:!1},t,e)}}};if(og&&(fg=(pg=function(e){Jm(this,fg),Wm(e),qm(Um,this);var t=ug(this);try{e(Tg(Ig,t),Tg(Cg,t))}catch(e){Cg(t,e)}}).prototype,(Um=function(e){lg(this,{type:sg,done:!1,notified:!1,parent:!1,reactions:new ng,rejection:!1,state:0,value:void 0})}).prototype=Hm(fg,"then",(function(e,t){var n=ug(this),r=vg(Zm(this,pg));return n.parent=!0,r.ok=!Km(e)||e,r.fail=Km(t)&&t,r.domain=Gm?Ag.domain:void 0,0==n.state?n.reactions.add(r):$m((function(){kg(r,n)})),r.promise})),Mm=function(){var e=new Um,t=ug(e);this.promise=e,this.resolve=Tg(Ig,t),this.reject=Tg(Cg,t)},ag.f=vg=function(e){return e===pg||undefined===e?new Mm(e):bg(e)},Km(ig)&&hg!==Object.prototype)){Fm=hg.then,dg||Hm(hg,"then",(function(e,t){var n=this;return new pg((function(e,t){qm(Fm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete hg.constructor}catch(e){}Vm&&Vm(hg,fg)}jm({global:!0,constructor:!0,wrap:!0,forced:og},{Promise:pg}),Qm(pg,sg,!1),zm(sg);var Og=Nr,Pg=bt,Bg=gt,Lg=Ct,Ug=mu,Mg=ti,Fg=kt,jg=Ru,Gg=_u,Ng=cu,qg=TypeError,Hg=function(e,t){this.stopped=e,this.result=t},Vg=Hg.prototype,Qg=function(e,t,n){var r,i,a,s,o,c,d,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=Og(t,u),g=function(e){return r&&Ng(r,"normal",e),new Hg(!0,e)},A=function(e){return l?(Bg(e),f?m(e[0],e[1],g):m(e[0],e[1])):f?m(e,g):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Gg(e)))throw qg(Lg(e)+" is not iterable");if(Ug(i)){for(a=0,s=Mg(e);s>a;a++)if((o=A(e[a]))&&Fg(Vg,o))return o;return new Hg(!1)}r=jg(e,i)}for(c=h?e.next:r.next;!(d=Pg(c,r)).done;){try{o=A(d.value)}catch(e){Ng(r,"throw",e)}if("object"==typeof o&&o&&Fg(Vg,o))return o}return new Hg(!1)},zg=mm,Wg=Im.CONSTRUCTOR||!Qu((function(e){zg.all(e).then(void 0,(function(){}))})),Kg=bt,Yg=Bt,Jg=Om,Zg=fm,Xg=Qg;$a({target:"Promise",stat:!0,forced:Wg},{all:function(e){var t=this,n=Jg.f(t),r=n.resolve,i=n.reject,a=Zg((function(){var n=Yg(t.resolve),a=[],s=0,o=1;Xg(e,(function(e){var c=s++,d=!1;o++,Kg(n,t,e).then((function(e){d||(d=!0,a[c]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var $g=$a,eA=Im.CONSTRUCTOR,tA=mm,nA=wt,rA=et,iA=Ar,aA=tA&&tA.prototype;if($g({target:"Promise",proto:!0,forced:eA,real:!0},{catch:function(e){return this.then(void 0,e)}}),rA(tA)){var sA=nA("Promise").prototype.catch;aA.catch!==sA&&iA(aA,"catch",sA,{unsafe:!0})}var oA=bt,cA=Bt,dA=Om,uA=fm,lA=Qg;$a({target:"Promise",stat:!0,forced:Wg},{race:function(e){var t=this,n=dA.f(t),r=n.reject,i=uA((function(){var i=cA(t.resolve);lA(e,(function(e){oA(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var hA=bt,pA=Om;$a({target:"Promise",stat:!0,forced:Im.CONSTRUCTOR},{reject:function(e){var t=pA.f(this);return hA(t.reject,void 0,e),t.promise}});var fA=gt,mA=at,gA=Om,AA=function(e,t){if(fA(e),mA(t)&&t.constructor===e)return t;var n=gA.f(e);return(0,n.resolve)(t),n.promise},vA=$a,bA=Im.CONSTRUCTOR,yA=AA;wt("Promise"),vA({target:"Promise",stat:!0,forced:bA},{resolve:function(e){return yA(this,e)}});var _A=TypeError,wA=$a,kA=ae,EA=ri,xA=at,DA=ve,SA=ti,RA=function(e){if(e>9007199254740991)throw _A("Maximum allowed index exceeded");return e},TA=zs,CA=Ei,IA=Bd,OA=Be,PA=Ke("isConcatSpreadable"),BA=OA>=51||!kA((function(){var e=[];return e[PA]=!1,e.concat()[0]!==e})),LA=function(e){if(!xA(e))return!1;var t=e[PA];return void 0!==t?!!t:EA(e)};wA({target:"Array",proto:!0,arity:1,forced:!BA||!IA("concat")},{concat:function(e){var t,n,r,i,a,s=DA(this),o=CA(s,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(LA(a=-1===t?s:arguments[t]))for(i=SA(a),RA(c+i),n=0;n<i;n++,c++)n in a&&TA(o,c,a[n]);else RA(c+1),TA(o,c++,a);return o.length=c,o}});var UA=nt,MA=gn.EXISTS,FA=le,jA=oo,GA=Function.prototype,NA=FA(GA.toString),qA=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,HA=FA(qA.exec);function VA(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return QA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QA(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function QA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zA(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}UA&&!MA&&jA(GA,"name",{configurable:!0,get:function(){try{return HA(qA,NA(this))[1]}catch(e){return""}}});var KA,YA={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},JA={},ZA=function(e,t){JA[e]=WA(WA({},t),{},{isLoading:!1})},XA=function(e){var n=this,r=e.id,i=e.src;return new Promise(function(e,a){if(t(this,n),document.getElementById(r))e();else{var s=document.createElement("script");s.onload=function(){e()},s.id=r,s.setAttribute("crossorigin",!0),s.src=i,document.head.appendChild(s)}}.bind(this))},$A=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(i=JA[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=VA(i.dependencies),e.prev=8,a.s();case 10:if((s=a.n()).done){e.next=26;break}if(o=s.value,e.prev=12,c=YA[o].name,!window[c]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,XA({id:o,src:YA[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=o.id,u=o.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,XA({id:t,src:i.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(i.source,"."),e.t2);case 43:return i.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(e){return t.apply(this,arguments)}}(),ev=S((function t(){var n=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$A("Leaderboard");case 2:n.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"showLeaderboard",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=window.GD_OPTIONS.gameId,n.leaderboard){e.next=4;break}return e.next=4,n.load();case 4:n.leaderboard.showLeaderBoard(i,t);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),T(this,"addScore",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.leaderboard){e.next=3;break}return e.next=3,n.load();case 3:n.leaderboard.addScore(t);case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},ZA(this.moduleName,this.moduleConfig)})),tv=new ev,nv=at,rv=_r,iv=Ke("match"),av=function(e){var t;return nv(e)&&(void 0!==(t=e[iv])?!!t:"RegExp"==rv(e))},sv=av,ov=TypeError,cv=function(e){if(sv(e))throw ov("The method doesn't accept regular expressions");return e},dv=Ke("match"),uv=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[dv]=!1,"/./"[e](t)}catch(e){}}return!1},lv=$a,hv=Mr,pv=Hi.f,fv=$r,mv=As,gv=cv,Av=me,vv=uv,bv=hv("".startsWith),yv=hv("".slice),_v=Math.min,wv=vv("startsWith");lv({target:"String",proto:!0,forced:!!(wv||(KA=pv(String.prototype,"startsWith"),!KA||KA.writable))&&!wv},{startsWith:function(e){var t=mv(Av(this));gv(e);var n=fv(_v(arguments.length>1?arguments[1]:void 0,t.length)),r=mv(e);return bv?bv(t,r,n):yv(t,n,n+r.length)===r}});var kv=bt,Ev=_e,xv=kt,Dv=mh,Sv=RegExp.prototype,Rv=function(e){var t=e.flags;return void 0!==t||"flags"in Sv||Ev(e,"flags")||!xv(Sv,e)?t:kv(Dv,e)},Tv=gn.PROPER,Cv=Ar,Iv=gt,Ov=As,Pv=ae,Bv=Rv,Lv="toString",Uv=RegExp.prototype[Lv],Mv=Pv((function(){return"/a/b"!=Uv.call({source:"a",flags:"b"})})),Fv=Tv&&Uv.name!=Lv;(Mv||Fv)&&Cv(RegExp.prototype,Lv,(function(){var e=Iv(this);return"/"+Ov(e.source)+"/"+Ov(Bv(e))}),{unsafe:!0});var jv=Mr,Gv=Ar,Nv=Wh,qv=ae,Hv=Ke,Vv=Cn,Qv=Hv("species"),zv=RegExp.prototype,Wv=function(e,t,n,r){var i=Hv(e),a=!qv((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!qv((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Qv]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=jv(/./[i]),c=t(i,""[e],(function(e,t,n,r,i){var s=jv(e),c=t.exec;return c===Nv||c===zv.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Gv(String.prototype,e,c[0]),Gv(zv,i,c[1])}r&&Vv(zv[i],"sham",!0)},Kv=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Yv=bt,Jv=gt,Zv=et,Xv=_r,$v=Wh,eb=TypeError,tb=function(e,t){var n=e.exec;if(Zv(n)){var r=Yv(n,e,t);return null!==r&&Jv(r),r}if("RegExp"===Xv(e))return Yv($v,e,t);throw eb("RegExp#exec called on incompatible receiver")},nb=bt,rb=gt,ib=he,ab=me,sb=Kv,ob=As,cb=Mt,db=tb;function ub(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ub(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ub(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Wv("search",(function(e,t,n){return[function(t){var n=ab(this),r=ib(t)?void 0:cb(t,e);return r?nb(r,t,n):new RegExp(t)[e](ob(n))},function(e){var r=rb(this),i=ob(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;sb(s,0)||(r.lastIndex=0);var o=db(r,i);return sb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var hb,pb,fb=function(){function e(){R(this,e)}return S(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",A);var v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:v,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:A,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:c===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new C(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new C(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new C(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new C(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new C(e,!0);return n.query=lb(lb({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),mb=function(){try{return(new fb).getBridgeContext()}catch(e){return{}}}(),gb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(hb=!1,(pb=c("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===pb.xanthophyll&&(hb=!0),hb)},Ab=il.charAt,vb=le,bb=ve,yb=Math.floor,_b=vb("".charAt),wb=vb("".replace),kb=vb("".slice),Eb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xb=/\$([$&'`]|\d{1,2})/g,Db=Zc,Sb=bt,Rb=le,Tb=Wv,Cb=ae,Ib=gt,Ob=et,Pb=he,Bb=Jr,Lb=$r,Ub=As,Mb=me,Fb=function(e,t,n){return t+(n?Ab(e,t).length:1)},jb=Mt,Gb=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,c=xb;return void 0!==i&&(i=bb(i),c=Eb),wb(a,c,(function(a,c){var d;switch(_b(c,0)){case"$":return"$";case"&":return e;case"`":return kb(t,0,n);case"'":return kb(t,s);case"<":d=i[kb(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>o){var l=yb(u/10);return 0===l?a:l<=o?void 0===r[l-1]?_b(c,1):r[l-1]+_b(c,1):a}d=r[u-1]}return void 0===d?"":d}))},Nb=tb,qb=Ke("replace"),Hb=Math.max,Vb=Math.min,Qb=Rb([].concat),zb=Rb([].push),Wb=Rb("".indexOf),Kb=Rb("".slice),Yb="$0"==="a".replace(/./,"$0"),Jb=!!/./[qb]&&""===/./[qb]("a","$0");Tb("replace",(function(e,t,n){var r=Jb?"$":"$0";return[function(e,n){var r=Mb(this),i=Pb(e)?void 0:jb(e,qb);return i?Sb(i,e,r,n):Sb(t,Ub(r),e,n)},function(e,i){var a=Ib(this),s=Ub(e);if("string"==typeof i&&-1===Wb(i,r)&&-1===Wb(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var c=Ob(i);c||(i=Ub(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=Nb(a,s);if(null===h)break;if(zb(l,h),!d)break;""===Ub(h[0])&&(a.lastIndex=Fb(s,Lb(a.lastIndex),u))}for(var p,f="",m=0,g=0;g<l.length;g++){for(var A=Ub((h=l[g])[0]),v=Hb(Vb(Bb(h.index),s.length),0),b=[],y=1;y<h.length;y++)zb(b,void 0===(p=h[y])?p:String(p));var _=h.groups;if(c){var w=Qb([A],b,v,s);void 0!==_&&zb(w,_);var k=Ub(Db(i,void 0,w))}else k=Gb(A,s,v,b,_,i);v>=m&&(f+=Kb(s,m,v)+k,m=v+A.length)}return f+Kb(s,m)}]}),!!Cb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Yb||Jb);var Zb=ae,Xb=nt,$b=Ke("iterator"),ey=!Zb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Xb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[$b]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),ty=Ar,ny=Xs,ry=Math.floor,iy=function(e,t){var n=e.length,r=ry(n/2);return n<8?ay(e,t):sy(e,iy(ny(e,0,r),t),iy(ny(e,r),t),t)},ay=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},sy=function(e,t,n,r){for(var i=t.length,a=n.length,s=0,o=0;s<i||o<a;)e[s+o]=s<i&&o<a?r(t[s],n[o])<=0?t[s++]:n[o++]:s<i?t[s++]:n[o++];return e},oy=$a,cy=K,dy=bt,uy=le,ly=nt,hy=ey,py=Ar,fy=oo,my=function(e,t,n){for(var r in t)ty(e,r,t[r],n);return e},gy=ko,Ay=Tl,vy=Yn,by=tf,yy=et,_y=_e,wy=Nr,ky=Rr,Ey=gt,xy=at,Dy=As,Sy=Gs,Ry=Sn,Ty=Ru,Cy=_u,Iy=hf,Oy=iy,Py=Ke("iterator"),By="URLSearchParams",Ly=By+"Iterator",Uy=vy.set,My=vy.getterFor(By),Fy=vy.getterFor(Ly),jy=Object.getOwnPropertyDescriptor,Gy=function(e){if(!ly)return cy[e];var t=jy(cy,e);return t&&t.value},Ny=Gy("fetch"),qy=Gy("Request"),Hy=Gy("Headers"),Vy=qy&&qy.prototype,Qy=Hy&&Hy.prototype,zy=cy.RegExp,Wy=cy.TypeError,Ky=cy.decodeURIComponent,Yy=cy.encodeURIComponent,Jy=uy("".charAt),Zy=uy([].join),Xy=uy([].push),$y=uy("".replace),e_=uy([].shift),t_=uy([].splice),n_=uy("".split),r_=uy("".slice),i_=/\+/g,a_=Array(4),s_=function(e){return a_[e-1]||(a_[e-1]=zy("((?:%[\\da-f]{2}){"+e+"})","gi"))},o_=function(e){try{return Ky(e)}catch(t){return e}},c_=function(e){var t=$y(e,i_," "),n=4;try{return Ky(t)}catch(e){for(;n;)t=$y(t,s_(n--),o_);return t}},d_=/[!'()~]|%20/g,u_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},l_=function(e){return u_[e]},h_=function(e){return $y(Yy(e),d_,l_)},p_=Ay((function(e,t){Uy(this,{type:Ly,iterator:Ty(My(e).entries),kind:t})}),"Iterator",(function(){var e=Fy(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),f_=function(e){this.entries=[],this.url=null,void 0!==e&&(xy(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Jy(e,0)?r_(e,1):e:Dy(e)))};f_.prototype={type:By,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,c=Cy(e);if(c)for(n=(t=Ty(e,c)).next;!(r=dy(n,t)).done;){if(a=(i=Ty(Ey(r.value))).next,(s=dy(a,i)).done||(o=dy(a,i)).done||!dy(a,i).done)throw Wy("Expected sequence with length 2");Xy(this.entries,{key:Dy(s.value),value:Dy(o.value)})}else for(var d in e)_y(e,d)&&Xy(this.entries,{key:d,value:Dy(e[d])})},parseQuery:function(e){if(e)for(var t,n,r=n_(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=n_(t,"="),Xy(this.entries,{key:c_(e_(n)),value:c_(Zy(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Xy(n,h_(e.key)+"="+h_(e.value));return Zy(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var m_=function(){by(this,g_);var e=Uy(this,new f_(arguments.length>0?arguments[0]:void 0));ly||(this.length=e.entries.length)},g_=m_.prototype;if(my(g_,{append:function(e,t){Iy(arguments.length,2);var n=My(this);Xy(n.entries,{key:Dy(e),value:Dy(t)}),ly||this.length++,n.updateURL()},delete:function(e){Iy(arguments.length,1);for(var t=My(this),n=t.entries,r=Dy(e),i=0;i<n.length;)n[i].key===r?t_(n,i,1):i++;ly||(this.length=n.length),t.updateURL()},get:function(e){Iy(arguments.length,1);for(var t=My(this).entries,n=Dy(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Iy(arguments.length,1);for(var t=My(this).entries,n=Dy(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Xy(r,t[i].value);return r},has:function(e){Iy(arguments.length,1);for(var t=My(this).entries,n=Dy(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Iy(arguments.length,1);for(var n,r=My(this),i=r.entries,a=!1,s=Dy(e),o=Dy(t),c=0;c<i.length;c++)(n=i[c]).key===s&&(a?t_(i,c--,1):(a=!0,n.value=o));a||Xy(i,{key:s,value:o}),ly||(this.length=i.length),r.updateURL()},sort:function(){var e=My(this);Oy(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=My(this).entries,r=wy(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new p_(this,"keys")},values:function(){return new p_(this,"values")},entries:function(){return new p_(this,"entries")}},{enumerable:!0}),py(g_,Py,g_.entries,{name:"entries"}),py(g_,"toString",(function(){return My(this).serialize()}),{enumerable:!0}),ly&&fy(g_,"size",{get:function(){return My(this).entries.length},configurable:!0,enumerable:!0}),gy(m_,By),oy({global:!0,constructor:!0,forced:!hy},{URLSearchParams:m_}),!hy&&yy(Hy)){var A_=uy(Qy.has),v_=uy(Qy.set),b_=function(e){if(xy(e)){var t,n=e.body;if(ky(n)===By)return t=e.headers?new Hy(e.headers):new Hy,A_(t,"content-type")||v_(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Sy(e,{body:Ry(0,Dy(n)),headers:Ry(0,t)})}return e};if(yy(Ny)&&oy({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Ny(e,arguments.length>1?b_(arguments[1]):{})}}),yy(qy)){var y_=function(e){return by(this,Vy),new qy(e,arguments.length>1?b_(arguments[1]):{})};Vy.constructor=y_,y_.prototype=Vy,oy({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:y_})}}var __={URLSearchParams:m_,getState:My},w_=ma.includes,k_=vp;$a({target:"Array",proto:!0,forced:ae((function(){return!Array(1).includes()}))},{includes:function(e){return w_(this,e,arguments.length>1?arguments[1]:void 0)}}),k_("includes");var E_=$a,x_=cv,D_=me,S_=As,R_=uv,T_=le("".indexOf);function C_(e){var n=this,r={},i=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,s=(null==e?void 0:e.self_origin)||window.location.origin,o=(null==e?void 0:e.referrer_url)||document.referrer;function c(e){return B(r,e)}function d(e,t){return L(r,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new C(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,o],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=(s=decodeURIComponent(s)).startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),O.isURL(s)))return s}}}return function(){var e;t(this,n),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(d("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],d("top.domain.from","origins");else if(0===t)n=s,d("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,d("top.domain.from","referrer"))}d("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(P(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?P(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",o),d("partner.url.from","fallback"))}.bind(this)(),{get:c,print:function(e){console.log(c(e))}}}E_({target:"String",proto:!0,forced:!R_("includes")},{includes:function(e){return!!~T_(S_(D_(this)),S_(x_(e)),arguments.length>1?arguments[1]:void 0)}});var I_="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==I_&&I_,O_={searchParams:"URLSearchParams"in I_,iterable:"Symbol"in I_&&"iterator"in Symbol,blob:"FileReader"in I_&&"Blob"in I_&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in I_,arrayBuffer:"ArrayBuffer"in I_};if(O_.arrayBuffer)var P_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],B_=ArrayBuffer.isView||function(e){return e&&P_.indexOf(Object.prototype.toString.call(e))>-1};function L_(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function U_(e){return"string"!=typeof e&&(e=String(e)),e}function M_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return O_.iterable&&(t[Symbol.iterator]=function(){return t}),t}function F_(e){this.map={},e instanceof F_?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function j_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function G_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function N_(e){var t=new FileReader,n=G_(t);return t.readAsArrayBuffer(e),n}function q_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function H_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:O_.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:O_.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:O_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():O_.arrayBuffer&&O_.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=q_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):O_.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||B_(e))?this._bodyArrayBuffer=q_(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):O_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},O_.blob&&(this.blob=function(){var e=j_(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=j_(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(N_)}),this.text=function(){var e=j_(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=G_(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},O_.formData&&(this.formData=function(){return this.text().then(z_)}),this.json=function(){return this.text().then(JSON.parse)},this}F_.prototype.append=function(e,t){e=L_(e),t=U_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},F_.prototype.delete=function(e){delete this.map[L_(e)]},F_.prototype.get=function(e){return e=L_(e),this.has(e)?this.map[e]:null},F_.prototype.has=function(e){return this.map.hasOwnProperty(L_(e))},F_.prototype.set=function(e,t){this.map[L_(e)]=U_(t)},F_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},F_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),M_(e)},F_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),M_(e)},F_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),M_(e)},O_.iterable&&(F_.prototype[Symbol.iterator]=F_.prototype.entries);var V_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Q_(e,t){if(!(this instanceof Q_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof Q_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new F_(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new F_(t.headers)),this.method=function(e){var t=e.toUpperCase();return V_.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function z_(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function W_(e,t){if(!(this instanceof W_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new F_(t.headers),this.url=t.url||"",this._initBody(e)}Q_.prototype.clone=function(){return new Q_(this,{body:this._bodyInit})},H_.call(Q_.prototype),H_.call(W_.prototype),W_.prototype.clone=function(){return new W_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new F_(this.headers),url:this.url})},W_.error=function(){var e=new W_(null,{status:0,statusText:""});return e.type="error",e};var K_=[301,302,303,307,308];W_.redirect=function(e,t){if(-1===K_.indexOf(t))throw new RangeError("Invalid status code");return new W_(null,{status:t,headers:{location:e}})};var Y_,J_=I_.DOMException;try{new J_}catch(e){J_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},J_.prototype=Object.create(Error.prototype),J_.prototype.constructor=J_}function Z_(e,t){return new Promise((function(n,r){var i=new Q_(e,t);if(i.signal&&i.signal.aborted)return r(new J_("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new F_,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new W_(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new J_("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&I_.location.href?I_.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&(O_.blob?a.responseType="blob":O_.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof F_?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,U_(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}Z_.polyfill=!0,I_.fetch||(I_.fetch=Z_,I_.Headers=F_,I_.Request=Q_,I_.Response=W_);var X_=function(e){var n=this;if(!Y_){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:mb.topDomain,domain:mb.parentDomain,referrer:mb.parentURL,depth:o(),version:cs.version,byloader:mb.isTokenGameURL,isTokenGameURL:mb.isTokenGameURL,isMasterGameURL:mb.isMasterGameURL,isExtHostedGameURL:mb.isExtHostedGameURL,byloaderVersion:mb.version,tracking:gb.userDeclinedTracking,whitelabel:gb.whitelabelPartner,platform:u()};Y_=new l(r)}return Y_||{send:function(){t(this,n)}.bind(this)}},$_={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var n=this;try{var r="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},ew={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},tw={gameAPI:"game.api.gamedistribution.com"},nw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},rw=function(){var e=this,n=ew.acc.some(function(n){var r;return t(this,e),n===(null===(r=window.location.host)||void 0===r?void 0:r.toLowerCase())}.bind(this));return{env:n?"acc":"prod",config:n?nw:tw}},iw=function(e){var n=this,r=e.url;return new Promise(function(e,i){t(this,n);var a=new XMLHttpRequest;a.open("GET",r,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else i(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){i(e)},a.send()}.bind(this))};function aw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ow,cw,dw,uw=new M,lw=[],hw=function(e){lw.push(e)},pw=function(e){ow=X_(dw=e)},fw=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(cw){e.next=6;break}return e.next=3,Aw(dw);case 3:cw=e.sent,uw.emit("game-data-ready",cw),mw();case 6:return e.abrupt("return",cw);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),mw=function(){var t,n;if(null!==(t=cw)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,c;if(gw(),null!==(i=cw)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=cw)&&void 0!==o&&o.url)$_.getGameData(null===(c=cw)||void 0===c?void 0:c.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Aw(dw);case 3:cw=e.sent,ls("gd-aws-test, new game data received",null===(t=cw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},gw=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,y,_,w,k=this,E=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(u=E.length,l=new Array(u),h=0;h<u;h++)l[h]=E[h];p=l[0],f=l[1],m=null===(i=cw)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,g=null===(o=cw)||void 0===o||null===(c=o.aws_tst)||void 0===c||null===(d=c.ep)||void 0===d?void 0:d.msgrt,A=function(e,r){var i=this;t(this,k);var a=p.replace(e,r);n(a,f).then(function(){t(this,i)}.bind(this))}.bind(this);try{m&&p.indexOf("tag.atom")>0&&A("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),g&&p.indexOf("msgrt.gamedistribution.com")>0&&(ls("gd-aws-test hook",null===(v=cw)||void 0===v?void 0:v.aws_tst,null===(b=cw)||void 0===b||null===(y=b.aws_tst)||void 0===y||null===(_=y.ep)||void 0===_?void 0:_.msgrt),A("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(p,f);case 9:return w=e.sent,e.abrupt("return",w);case 11:case"end":return e.stop()}}),e,this)})))},Aw=function(n){var i=this;ow.send("gdfw.loading",{message:"loading"}),lw=[],hw("1"),hw("2");var a=new C_;hw("3");var s=a.get("partner.domain.value");hw("4");var o=function(){return t(this,i),{gameId:n.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);hw("5");var c=function(){t(this,i);var e=d(),r=e?"&mode=".concat(e):"",a=rw().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(cs.version,"&localTime=").concat((new Date).getHours())}.bind(this);hw("6");var d=function(){var e=this;t(this,i);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);return hw("7"),new Promise(function(n){var a=this;t(this,i),hw("7.1");var s=o();try{hw("7.2");var d=c();hw("7.3"),fetch(d).then(function(){var t=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return hw("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),ls("gameData fetch error, fallback to other ajax api",e.t0),e.next=12,iw({url:d});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()).then(function(e){var r=this;if(t(this,a),hw("7.5"),e.success){var i,o,c,u=e.result.game;hw("7.6");var l={company:u.company,gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,activeStatus:u.activeStatus,description:u.description,disableAds:u.enableAds,preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,publishedAt:u.publishedAt,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,dmn:u.dmn,aws_tst:u.aws_tst,meta:u.meta,adsc:u.adsc,adspn:ds(u.adspn)||{},__t4r:ds(u.__t4r)||{},block_exts:ds(u.push_cuda),bloc_gard:ds(u.bloc_gard),cookie:ds(u.cookie),gdpr:ds(u.gdpr),diagnostic:ds(u.diagnostic),cmp:ds(u.cmp),gft:ds(u.gft)||{},sdk:ds(u.sdk)||{},sdkfw:ds(u.sdkfw)||{},loader:ds(u.loader)||{},splash:ds(u.splash)||{},promo:ds(u.promo)||{},dAds:ds(u.dads)||{},pAds:ds(u.pads)||{},mAds:ds(u.mads)||{},rAds:ds(u.rads)||{},lp:ds(u.lp)||{},extsc:ds(u.extsc)||{},evnts:ds(u.evnts)||{},dp:ds(u.dp)||{},adflw:ds(u.adflw)||{},afgszf:ds(u.afgszf)||{},fllc:ds(u.fllc)||{},lotm:ds(u.lotm)||{},t4rc:ds(u.t4rc)||{},midroll_plus:ds(u.midroll_plus)||{},gmky:ds(u.gmky)||{},urlBlockExc:ds(u.url_blck_exc)||{},sdk_wrp:ds(u.sdk_wrp)||{},dbglg:ds(u.dbglg)||{},extHosting:ds(u.ext_hosting)||{},directTokenUse:ds(u.dtu)||{},aeria:ds(u.aeria)||{},advlm:ds(u.advlm)||{},ad_blcks:ds(u.ad_blcks)||{},rmblck:ds(u.rmblck)||{},gs_trc:ds(u.gs_trc)||{},rwskp:ds(u.rwskp)||{},isv_fw:ds(u.isv_fw)||{},ext_vst:ds(u.ext_vst)||{},fix_score:ds(u.fix_score)||{},compensation:ds(u.comps)||{}};hw("7.7");var p=h(U(s),l);hw("7.8"),p.afg_disabled=!1===(null===(i=p.sdk)||void 0===i||null===(o=i.afg)||void 0===o?void 0:o.enabled),p.url=d,function(){t(this,r),void 0!==fs.afgEnabled&&(p.afg_disabled=!fs.afgEnabled),void 0!==fs.promoEnabled&&(p.promo=p.promo||{},p.promo=sw(sw({},p.promo),{},{rainbow:{enabled:fs.promoEnabled}}))}.bind(this),hw("7.9"),null!==(c=p.pAds)&&void 0!==c&&c.enabled&&(p.preroll=!0),hw("7.10"),ow.send("gdfw.success",{message:"success"}),n(p)}else{s.failed=!0;var f=lw[lw.length-1];ow.send("gdfw.err",{message:"".concat(f,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=lw[lw.length-1];ow.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=lw[lw.length-1];ow.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},vw=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return n=e.sent,e.abrupt("return",!(null==n||null===(t=n.sdkfw)||void 0===t||!t.enabled));case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),bw=function(){var t=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return n=e.sent,i=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),yw=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return n=e.sent,e.next=5,vw();case 5:if(e.t0=e.sent,!e.t0){e.next=8;break}e.t0=!(null==n||null===(t=n.sdkfw)||void 0===t||!t.handshake);case 8:return e.abrupt("return",e.t0);case 9:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),_w=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return c=e.sent,d=!(null==c||null===(t=c.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==c||null===(n=c.extsc)||void 0===n?void 0:n.path:"",name:d?null==c||null===(i=c.extsc)||void 0===i?void 0:i.name:"",ref:d?null==c||null===(a=c.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==c||null===(s=c.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==c||null===(o=c.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),ww=function(){var n=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_w();case 2:if((n=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return i=n.path,a=n.name,s=n.ref,e.prev=6,o={},e.next=10,f(i,a,{error_prefix:"Blocked:",exists:function(){return t(this,c),!!s&&!!window[s]}.bind(this),attrs:o});case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("extsc: error on external partner script load",a,e.t0),p("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),kw=!1,Ew=!1,xw=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!kw){e.next=4;break}return e.abrupt("return",n(Ew));case 4:kw=!0;case 5:return e.next=7,_w();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return Ew=!0,e.abrupt("return",n(!0));case 16:c=!0,setTimeout(function(){t(this,u),c&&(c=!1,kw=!0,n(!1))}.bind(this),5e3),d=setInterval(function(){t(this,u),c&&o&&window[s]?(c=!1,kw=!0,Ew=!0,clearInterval(d),n(!0)):c||clearInterval(d)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},Dw=$a,Sw=mm,Rw=ae,Tw=wt,Cw=et,Iw=uf,Ow=AA,Pw=Ar,Bw=Sw&&Sw.prototype;if(Dw({target:"Promise",proto:!0,real:!0,forced:!!Sw&&Rw((function(){Bw.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Iw(this,Tw("Promise")),n=Cw(e);return this.then(n?function(n){return Ow(t,e()).then((function(){return n}))}:e,n?function(n){return Ow(t,e()).then((function(){throw n}))}:e)}}),Cw(Sw)){var Lw=Tw("Promise").prototype.finally;Bw.finally!==Lw&&Pw(Bw,"finally",Lw,{unsafe:!0})}var Uw="\t\n\v\f\r                 \u2028\u2029\ufeff",Mw=me,Fw=As,jw=Uw,Gw=le("".replace),Nw=RegExp("^["+jw+"]+"),qw=RegExp("(^|[^"+jw+"])["+jw+"]+$"),Hw=function(e){return function(t){var n=Fw(Mw(t));return 1&e&&(n=Gw(n,Nw,"")),2&e&&(n=Gw(n,qw,"$1")),n}},Vw={start:Hw(1),end:Hw(2),trim:Hw(3)},Qw=gn.PROPER,zw=ae,Ww=Uw,Kw=Vw.trim;$a({target:"String",proto:!0,forced:function(e){return zw((function(){return!!Ww[e]()||"​…᠎"!=="​…᠎"[e]()||Qw&&Ww[e].name!==e}))}("trim")},{trim:function(){return Kw(this)}});var Yw=$a,Jw=Oi.find,Zw=vp,Xw="find",$w=!0;Xw in[]&&Array(1)[Xw]((function(){$w=!1})),Yw({target:"Array",proto:!0,forced:$w},{find:function(e){return Jw(this,e,arguments.length>1?arguments[1]:void 0)}}),Zw(Xw);var ek=et,tk=at,nk=Fl,rk=tt.f,ik=nt,ak=K,sk=le,ok=Qa,ck=function(e,t,n){var r,i;return nk&&ek(r=t.constructor)&&r!==n&&tk(i=r.prototype)&&i!==n.prototype&&nk(e,i),e},dk=Cn,uk=sa.f,lk=kt,hk=av,pk=As,fk=Rv,mk=yh,gk=function(e,t,n){n in e||rk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},Ak=Ar,vk=ae,bk=_e,yk=Yn.enforce,_k=Xp,wk=kh,kk=Dh,Ek=Ke("match"),xk=ak.RegExp,Dk=xk.prototype,Sk=ak.SyntaxError,Rk=sk(Dk.exec),Tk=sk("".charAt),Ck=sk("".replace),Ik=sk("".indexOf),Ok=sk("".slice),Pk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Bk=/a/g,Lk=/a/g,Uk=new xk(Bk)!==Bk,Mk=mk.MISSED_STICKY,Fk=mk.UNSUPPORTED_Y,jk=ik&&(!Uk||Mk||wk||kk||vk((function(){return Lk[Ek]=!1,xk(Bk)!=Bk||xk(Lk)==Lk||"/a/i"!=xk(Bk,"i")})));if(ok("RegExp",jk)){for(var Gk=function(e,t){var n,r,i,a,s,o,c=lk(Dk,this),d=hk(e),u=void 0===t,l=[],h=e;if(!c&&d&&u&&e.constructor===Gk)return e;if((d||lk(Dk,e))&&(e=e.source,u&&(t=fk(h))),e=void 0===e?"":pk(e),t=void 0===t?"":pk(t),h=e,wk&&"dotAll"in Bk&&(r=!!t&&Ik(t,"s")>-1)&&(t=Ck(t,/s/g,"")),n=t,Mk&&"sticky"in Bk&&(i=!!t&&Ik(t,"y")>-1)&&Fk&&(t=Ck(t,/y/g,"")),kk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,c=!1,d=0,u="";r<=n;r++){if("\\"===(t=Tk(e,r)))t+=Tk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:Rk(Pk,Ok(e,r+1))&&(r+=2,c=!0),i+=t,d++;continue;case">"===t&&c:if(""===u||bk(s,u))throw new Sk("Invalid capture group name");s[u]=!0,a[a.length]=[u,d],c=!1,u="";continue}c?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=ck(xk(e,t),c?this:Dk,Gk),(r||i||l.length)&&(o=yk(s),r&&(o.dotAll=!0,o.raw=Gk(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=Tk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+Tk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{dk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Nk=uk(xk),qk=0;Nk.length>qk;)gk(Gk,xk,Nk[qk++]);Dk.constructor=Gk,Gk.prototype=Dk,Ak(ak,"RegExp",Gk,{constructor:!0})}_k("RegExp");var Hk=$a,Vk=zr,Qk=Ji,zk=Bi,Wk=le([].join);Hk({target:"Array",proto:!0,forced:Vk!=Object||!zk("join",",")},{join:function(e){return Wk(Qk(this),void 0===e?",":e)}});var Kk=Oi.map;$a({target:"Array",proto:!0,forced:!Bd("map")},{map:function(e){return Kk(this,e,arguments.length>1?arguments[1]:void 0)}});var Yk=nt,Jk=le,Zk=bt,Xk=ae,$k=ns,eE=xa,tE=Vi,nE=ve,rE=zr,iE=Object.assign,aE=Object.defineProperty,sE=Jk([].concat),oE=!iE||Xk((function(){if(Yk&&1!==iE({b:1},iE(aE({},"a",{enumerable:!0,get:function(){aE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=iE({},e)[n]||$k(iE({},t)).join("")!=r}))?function(e,t){for(var n=nE(e),r=arguments.length,i=1,a=eE.f,s=tE.f;r>i;)for(var o,c=rE(arguments[i++]),d=a?sE($k(c),a(c)):$k(c),u=d.length,l=0;u>l;)o=d[l++],Yk&&!Zk(s,c,o)||(n[o]=c[o]);return n}:iE,cE=oE;$a({target:"Object",stat:!0,arity:2,forced:Object.assign!==cE},{assign:cE});var dE,uE=le,lE=2147483647,hE=/[^\0-\u007E]/,pE=/[.\u3002\uFF0E\uFF61]/g,fE="Overflow: input needs wider integers to process",mE=RangeError,gE=uE(pE.exec),AE=Math.floor,vE=String.fromCharCode,bE=uE("".charCodeAt),yE=uE([].join),_E=uE([].push),wE=uE("".replace),kE=uE("".split),EE=uE("".toLowerCase),xE=function(e){return e+22+75*(e<26)},DE=function(e,t,n){var r=0;for(e=n?AE(e/700):e>>1,e+=AE(e/t);e>455;)e=AE(e/35),r+=36;return AE(r+36*e/(e+38))},SE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=bE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=bE(e,n++);56320==(64512&a)?_E(t,((1023&i)<<10)+(1023&a)+65536):(_E(t,i),n--)}else _E(t,i)}return t}(e);var n,r,i=e.length,a=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&_E(t,vE(r));var c=t.length,d=c;for(c&&_E(t,"-");d<i;){var u=lE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=d+1;if(u-a>AE((lE-s)/l))throw mE(fE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>lE)throw mE(fE);if(r==a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,g=36-f;_E(t,vE(xE(f+m%g))),h=AE(m/g),p+=36}_E(t,vE(xE(h))),o=DE(s,l,d==c),s=0,d++}}s++,a++}return yE(t,"")},RE=$a,TE=nt,CE=ey,IE=K,OE=Nr,PE=le,BE=Ar,LE=oo,UE=tf,ME=_e,FE=oE,jE=Gu,GE=Xs,NE=il.codeAt,qE=function(e){var t,n,r=[],i=kE(wE(EE(e),pE,"."),".");for(t=0;t<i.length;t++)n=i[t],_E(r,gE(hE,n)?"xn--"+SE(n):n);return yE(r,".")},HE=As,VE=ko,QE=hf,zE=__,WE=Yn,KE=WE.set,YE=WE.getterFor("URL"),JE=zE.URLSearchParams,ZE=zE.getState,XE=IE.URL,$E=IE.TypeError,ex=IE.parseInt,tx=Math.floor,nx=Math.pow,rx=PE("".charAt),ix=PE(/./.exec),ax=PE([].join),sx=PE(1..toString),ox=PE([].pop),cx=PE([].push),dx=PE("".replace),ux=PE([].shift),lx=PE("".split),hx=PE("".slice),px=PE("".toLowerCase),fx=PE([].unshift),mx="Invalid scheme",gx="Invalid host",Ax="Invalid port",vx=/[a-z]/i,bx=/[\d+-.a-z]/i,yx=/\d/,_x=/^0x/i,wx=/^[0-7]+$/,kx=/^\d+$/,Ex=/^[\da-f]+$/i,xx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Dx=/[\0\t\n\r #/:<>?@[\\\]^|]/,Sx=/^[\u0000-\u0020]+/,Rx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Tx=/[\t\n\r]/g,Cx=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)fx(t,e%256),e=tx(e/256);return ax(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=sx(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Ix={},Ox=FE({},Ix,{" ":1,'"':1,"<":1,">":1,"`":1}),Px=FE({},Ox,{"#":1,"?":1,"{":1,"}":1}),Bx=FE({},Px,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Lx=function(e,t){var n=NE(e,0);return n>32&&n<127&&!ME(t,e)?e:encodeURIComponent(e)},Ux={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Mx=function(e,t){var n;return 2==e.length&&ix(vx,rx(e,0))&&(":"==(n=rx(e,1))||!t&&"|"==n)},Fx=function(e){var t;return e.length>1&&Mx(hx(e,0,2))&&(2==e.length||"/"===(t=rx(e,2))||"\\"===t||"?"===t||"#"===t)},jx=function(e){return"."===e||"%2e"===px(e)},Gx={},Nx={},qx={},Hx={},Vx={},Qx={},zx={},Wx={},Kx={},Yx={},Jx={},Zx={},Xx={},$x={},eD={},tD={},nD={},rD={},iD={},aD={},sD={},oD=function(e,t,n){var r,i,a,s=HE(e);if(t){if(i=this.parse(s))throw $E(i);this.searchParams=null}else{if(void 0!==n&&(r=new oD(n,!0)),i=this.parse(s,null,r))throw $E(i);(a=ZE(new JE)).bindURL(this),this.searchParams=a}};oD.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,c=this,d=t||Gx,u=0,l="",h=!1,p=!1,f=!1;for(e=HE(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=dx(e,Sx,""),e=dx(e,Rx,"$1")),e=dx(e,Tx,""),r=jE(e);u<=r.length;){switch(i=r[u],d){case Gx:if(!i||!ix(vx,i)){if(t)return mx;d=qx;continue}l+=px(i),d=Nx;break;case Nx:if(i&&(ix(bx,i)||"+"==i||"-"==i||"."==i))l+=px(i);else{if(":"!=i){if(t)return mx;l="",d=qx,u=0;continue}if(t&&(c.isSpecial()!=ME(Ux,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&Ux[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?d=$x:c.isSpecial()&&n&&n.scheme==c.scheme?d=Hx:c.isSpecial()?d=Wx:"/"==r[u+1]?(d=Vx,u++):(c.cannotBeABaseURL=!0,cx(c.path,""),d=iD)}break;case qx:if(!n||n.cannotBeABaseURL&&"#"!=i)return mx;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=GE(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,d=sD;break}d="file"==n.scheme?$x:Qx;continue;case Hx:if("/"!=i||"/"!=r[u+1]){d=Qx;continue}d=Kx,u++;break;case Vx:if("/"==i){d=Yx;break}d=rD;continue;case Qx:if(c.scheme=n.scheme,i==dE)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=GE(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())d=zx;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=GE(n.path),c.query="",d=aD;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=GE(n.path),c.path.length--,d=rD;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=GE(n.path),c.query=n.query,c.fragment="",d=sD}break;case zx:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,d=rD;continue}d=Yx}else d=Kx;break;case Wx:if(d=Kx,"/"!=i||"/"!=rx(l,u+1))continue;u++;break;case Kx:if("/"!=i&&"\\"!=i){d=Yx;continue}break;case Yx:if("@"==i){h&&(l="%40"+l),h=!0,a=jE(l);for(var m=0;m<a.length;m++){var g=a[m];if(":"!=g||f){var A=Lx(g,Bx);f?c.password+=A:c.username+=A}else f=!0}l=""}else if(i==dE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==l)return"Invalid authority";u-=jE(l).length+1,l="",d=Jx}else l+=i;break;case Jx:case Zx:if(t&&"file"==c.scheme){d=tD;continue}if(":"!=i||p){if(i==dE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==l)return gx;if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(l))return s;if(l="",d=nD,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return gx;if(s=c.parseHost(l))return s;if(l="",d=Xx,t==Zx)return}break;case Xx:if(!ix(yx,i)){if(i==dE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=l){var v=ex(l,10);if(v>65535)return Ax;c.port=c.isSpecial()&&v===Ux[c.scheme]?null:v,l=""}if(t)return;d=nD;continue}return Ax}l+=i;break;case $x:if(c.scheme="file","/"==i||"\\"==i)d=eD;else{if(!n||"file"!=n.scheme){d=rD;continue}if(i==dE)c.host=n.host,c.path=GE(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=GE(n.path),c.query="",d=aD;else{if("#"!=i){Fx(ax(GE(r,u),""))||(c.host=n.host,c.path=GE(n.path),c.shortenPath()),d=rD;continue}c.host=n.host,c.path=GE(n.path),c.query=n.query,c.fragment="",d=sD}}break;case eD:if("/"==i||"\\"==i){d=tD;break}n&&"file"==n.scheme&&!Fx(ax(GE(r,u),""))&&(Mx(n.path[0],!0)?cx(c.path,n.path[0]):c.host=n.host),d=rD;continue;case tD:if(i==dE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Mx(l))d=rD;else if(""==l){if(c.host="",t)return;d=nD}else{if(s=c.parseHost(l))return s;if("localhost"==c.host&&(c.host=""),t)return;l="",d=nD}continue}l+=i;break;case nD:if(c.isSpecial()){if(d=rD,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=dE&&(d=rD,"/"!=i))continue}else c.fragment="",d=sD;else c.query="",d=aD;break;case rD:if(i==dE||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=px(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||cx(c.path,"")):jx(l)?"/"==i||"\\"==i&&c.isSpecial()||cx(c.path,""):("file"==c.scheme&&!c.path.length&&Mx(l)&&(c.host&&(c.host=""),l=rx(l,0)+":"),cx(c.path,l)),l="","file"==c.scheme&&(i==dE||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)ux(c.path);"?"==i?(c.query="",d=aD):"#"==i&&(c.fragment="",d=sD)}else l+=Lx(i,Px);break;case iD:"?"==i?(c.query="",d=aD):"#"==i?(c.fragment="",d=sD):i!=dE&&(c.path[0]+=Lx(i,Ix));break;case aD:t||"#"!=i?i!=dE&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Lx(i,Ix)):(c.fragment="",d=sD);break;case sD:i!=dE&&(c.fragment+=Lx(i,Ox))}u++}},parseHost:function(e){var t,n,r;if("["==rx(e,0)){if("]"!=rx(e,e.length-1))return gx;if(t=function(e){var t,n,r,i,a,s,o,c=[0,0,0,0,0,0,0,0],d=0,u=null,l=0,h=function(){return rx(e,l)};if(":"==h()){if(":"!=rx(e,1))return;l+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&ix(Ex,h());)t=16*t+ex(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!ix(yx,h()))return;for(;ix(yx,h());){if(a=ex(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}c[d]=256*c[d]+i,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;l++,u=++d}}if(null!==u)for(s=d-u,d=7;0!=d&&s>0;)o=c[d],c[d--]=c[u+s-1],c[u+--s]=o;else if(8!=d)return;return c}(hx(e,1,-1)),!t)return gx;this.host=t}else if(this.isSpecial()){if(e=qE(e),ix(xx,e))return gx;if(t=function(e){var t,n,r,i,a,s,o,c=lx(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(a=10,i.length>1&&"0"==rx(i,0)&&(a=ix(_x,i)?16:8,i=hx(i,8==a?1:2)),""===i)s=0;else{if(!ix(10==a?kx:8==a?wx:Ex,i))return e;s=ex(i,a)}cx(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=nx(256,5-t))return null}else if(s>255)return null;for(o=ox(n),r=0;r<n.length;r++)o+=n[r]*nx(256,3-r);return o}(e),null===t)return gx;this.host=t}else{if(ix(Dx,e))return gx;for(t="",n=jE(e),r=0;r<n.length;r++)t+=Lx(n[r],Ix);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ME(Ux,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Mx(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,s=e.path,o=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=Cx(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+ax(s,"/"):"",null!==o&&(d+="?"+o),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw $E(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new cD(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Cx(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(HE(e)+":",Gx)},getUsername:function(){return this.username},setUsername:function(e){var t=jE(HE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Lx(t[n],Bx)}},getPassword:function(){return this.password},setPassword:function(e){var t=jE(HE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Lx(t[n],Bx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Cx(e):Cx(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Jx)},getHostname:function(){var e=this.host;return null===e?"":Cx(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Zx)},getPort:function(){var e=this.port;return null===e?"":HE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=HE(e))?this.port=null:this.parse(e,Xx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+ax(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,nD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=HE(e))?this.query=null:("?"==rx(e,0)&&(e=hx(e,1)),this.query="",this.parse(e,aD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=HE(e))?("#"==rx(e,0)&&(e=hx(e,1)),this.fragment="",this.parse(e,sD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var cD=function(e){var t=UE(this,dD),n=QE(arguments.length,1)>1?arguments[1]:void 0,r=KE(t,new oD(e,!1,n));TE||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},dD=cD.prototype,uD=function(e,t){return{get:function(){return YE(this)[e]()},set:t&&function(e){return YE(this)[t](e)},configurable:!0,enumerable:!0}};if(TE&&(LE(dD,"href",uD("serialize","setHref")),LE(dD,"origin",uD("getOrigin")),LE(dD,"protocol",uD("getProtocol","setProtocol")),LE(dD,"username",uD("getUsername","setUsername")),LE(dD,"password",uD("getPassword","setPassword")),LE(dD,"host",uD("getHost","setHost")),LE(dD,"hostname",uD("getHostname","setHostname")),LE(dD,"port",uD("getPort","setPort")),LE(dD,"pathname",uD("getPathname","setPathname")),LE(dD,"search",uD("getSearch","setSearch")),LE(dD,"searchParams",uD("getSearchParams")),LE(dD,"hash",uD("getHash","setHash"))),BE(dD,"toJSON",(function(){return YE(this).serialize()}),{enumerable:!0}),BE(dD,"toString",(function(){return YE(this).serialize()}),{enumerable:!0}),XE){var lD=XE.createObjectURL,hD=XE.revokeObjectURL;lD&&BE(cD,"createObjectURL",OE(lD,XE)),hD&&BE(cD,"revokeObjectURL",OE(hD,XE))}VE(cD,"URL"),RE({global:!0,constructor:!0,forced:!CE,sham:!TE},{URL:cD});var pD=function(){function e(t){R(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return S(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var n={},r=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,i=new C(location.href,!0);for(var a in i.query)n[a]=i.query[a];return Object.keys(n).filter(function(n){var r=this;return t(this,e),this.customParamKeys.some(function(e){return t(this,r),e===n}.bind(this))}.bind(this)).length>0||r?(console.log("custom-params",n,r),n):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),fD=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return S(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var n=document.createElement("div");this.adResumeButton=n,n.id="gd__resume__button",n.setAttribute("title","Resume"),this.addStyles(),n.classList.add("gd__resume__button"),n.addEventListener("click",function(){t(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(n);var r=document.createElement("div");this.adResumeButtonOverlay=r,r.id="gd__resume__button__overlay",r.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(r)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),mD=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return S(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),gD=function(){function e(t,n,r){R(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return S(e,[{key:"show",value:function(){this.skipAd.style.display="block"}},{key:"hide",value:function(){this.skipAd.style.display="none"}},{key:"add",value:function(){var e=this;try{var n=document.createElement("div");this.skipAd=n;var r=document.createElement("span");r.innerText="Skip Ad >>",this.addStyles(),n.classList.add("gd__skip__ad"),r.classList.add("gd__skip__span"),this.skipAd.appendChild(r),this.adContainer.appendChild(n),this.skipAd.addEventListener("click",function(){t(this,e),this.OnSkip()}.bind(this))}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__skip__ad__style",e,"\n .gd__skip__ad{\n background-color:black; \n width: 260px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n right: 0px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n padding: 10px;\n }\n .gd__skip__ad:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__skip__span{\n color: white;\n font-size: 22px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),AD=function(){function e(t){R(this,e),this.adContainer=t}return S(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="&#9432;",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),vD=function(){function e(t){R(this,e),this.adContainer=t}return S(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),bD=function(e){if(!e)return!1;var t=yD.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},yD=Object.prototype.toString;function _D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_D(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kD(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var ED,xD="13998",DD="_cc".concat(xD),SD=["https://tags.crwdcntrl.net/c/".concat(xD,"/cc.js?ns=").concat(DD)],RD=function(){return!!ED&&"function"==typeof ED.bcpf&&"function"==typeof ED.add},TD=function(e,t){try{if(!RD())return;ED.add(e,t),ls("lotame add success ".concat(e," ").concat(t))}catch(e){ls("lotame add error",err)}},CD=function(e,t){try{if(!RD())return;ED.bcpw(e,t),ls("lotame send success ".concat(e," ").concat(t))}catch(e){}},ID=function(e){var n=this;try{TD("act","play"),TD("med","game"),"complete"===document.readyState?ED.bcpf():ED.bcp(),e.tags.forEach(function(e){t(this,n),CD("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),CD("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},OD=function(){window.addEventListener("load",(function(){uw.once("game-data-ready",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=mb&&mb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,vw();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(i=t.lotm)&&void 0!==i&&i.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,f(SD[0],"LOTCC_".concat(xD),{alternates:SD});case 16:"object"===n(window[DD])&&(ED=window[DD]),RD()&&ID(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),ls("lotame init error",e.t1);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},PD=function(){CD("genp","ad video"),CD("act","ad impression")},BD=function(){CD("act","ad skipped")},LD=function(){CD("act","ad click")},UD=function(){CD("act","ad complete")},MD=new C_,FD=function(e,n){var r=this,i={env:"vp",iu:"/6556/huffpost.desktop.video/en/azerion/video",description_url:MD.get("partner.url.value"),tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},jD=new C_,GD={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},ND=function(e,n){var r=this,i=function(e,t){var n=jD.get("partner.url.value"),r=GD[t],i="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(i),description_url:n,tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())}}(e,n),a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},qD=function(){var e=(new C_).get("partner.url.value");return C(e,!0).host},HD=function(e){var t,n=null==e||null===(t=e.ext_vst)||void 0===t?void 0:t.enabled,r=qD(),i="Softgames-Azerion"===(null==e?void 0:e.dname)&&("latimes.com"===r||"www.latimes.com"===r);return n||i},VD=function(e,t){var n=function(e,t){var n,r=function(){var n=t.slug;return ND(n,e)},i={"latimes.com":r,"www.latimes.com":r,"huffpost.com":function(){return t.slug,FD()}},a=qD();return null==i||null===(n=i[a])||void 0===n?void 0:n.call(i,e)}(e,t);return n},QD=function(){var e=(new C_).get("partner.url.value"),t=new C(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,i="1"===r||"2"===r,a="1"===r;n={useTestAds:i,disableMidrolltimer:a,isRevisionTest:a||i}}return n},zD=function(){function e(){R(this,e),this.adContainer=window.document.body}return S(e,[{key:"show",value:function(e){this.adSpinner.style.display="block",this.adSpinnerOverlay.style.display="block",e?(this.adSpinner.style.display="block",this.adSpinnerFail.style.display="none",this.adSpinnerButton.style.display="none"):(this.adSpinner.style.display="none",this.adSpinnerFail.style.display="block",this.adSpinnerButton.style.display="block")}},{key:"hide",value:function(){this.adSpinner.style.display="none",this.adSpinnerOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{this.addStyles();var n=document.createElement("div");n.id="gd__spinner",n.setAttribute("title","Spinner"),n.classList.add("gd__spinner"),this.adSpinner=n;var r=document.createElement("div");r.id="gd__spinner__fail",r.setAttribute("title","Spinner"),r.classList.add("gd__spinner__fail"),r.innerHTML="No Ads Available!",this.adSpinnerFail=r;var i=document.createElement("div");i.id="gd__spinner__button",i.setAttribute("title","Spinner"),i.classList.add("gd__spinner__button"),i.onclick=function(){t(this,e),this.hide()}.bind(this);var a=document.createElement("p");a.innerText="OK!",i.appendChild(a),this.adSpinnerButton=i;var s=document.createElement("div");s.id="gd__spinner__logo",s.setAttribute("title","Spinner"),s.classList.add("gd__spinner__logo"),this.adSpinnerLogo=s;var o=document.createElement("div");o.id="gd__spinner__container",o.classList.add("gd__spinner__container"),o.appendChild(this.adSpinner),o.appendChild(this.adSpinnerFail),o.appendChild(this.adSpinnerButton),o.appendChild(this.adSpinnerLogo),this.adSpinnerContainer=o;var c=document.createElement("div");c.id="gd__spinner__overlay",c.classList.add("gd__spinner__overlay"),c.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=c,this.adContainer.appendChild(this.adSpinnerOverlay)}catch(e){console.log("Spinner error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__spinner__style",e,'\n .gd__spinner__button{ \n text-align: center; \n width: 150px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 75px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 50px;\n color: white;\n }\n\n .gd__spinner__fail{\n text-align: center; \n width: 300px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(65% - 25px);\n left: calc(50% - 150px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n color: #ff8c1c;\n }\n\n .gd__spinner__logo{\n background: url("https://static.gamedistribution.com/android-chrome-192x192.png") no-repeat;\n background-size: cover; \n width: 100px;\n height: 100px;\n position: absolute;\n display: block;\n z-index: 2000;\n cursor: pointer;\n top: calc(30% - 50px);\n left: calc(50% - 50px);\n margin: 0;\n border-radius: 50%;\n }\n\n .gd__spinner__container{ \n background-color: black; \n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 150px);\n left: calc(50% - 150px);\n margin: 0;\n border-radius: 20px;\n border: 2px solid #06b8a2;\n }\n\n\n .gd__spinner{\n background: url("https://static.gamedistribution.com/assets/loader.gif") no-repeat;\n background-size: cover; \n width: 50px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 25px);\n margin: 0;\n border-radius: 50%;\n }\n \n .gd__spinner__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}();function WD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var YD=new M,JD=null,ZD=function(){function n(e,r,i){var a=this;if(R(this,n),JD)return JD;JD=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new y,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=_(),this.atom_display,this.adType_="",this.rewardGuarantied=!1,this.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==e?document.getElementById(e):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:c,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){t(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){t(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var i,a,s,o,c,d,u,l,p,w,k,E,x,D,O,P,B,L,M,q,H,V,Q,z,W,K,Y;return S(n,[{key:"start",value:(Y=e(r.mark((function n(){var i,a,s,o=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_afg_script({});case 2:case"end":return e.stop()}}),e)}))));case 3:return i=n.sent,this.afgInitSuccess=i.success,n.next=7,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_hl_script();case 2:return e.next=4,o._init_ima_script();case 4:o._createPlayer(),o._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(a=n.sent,this.imaInitSuccess=a.success,s=[],this.afgInitSuccess||s.push(i.error),this.imaInitSuccess||s.push(a.error),!(s.length>0)){n.next=14;break}throw s[0];case 14:window.eventTest=function(e){t(this,o),this._broadcast(e,{message:"",status:"success"})}.bind(this),n.next=21;break;case 17:throw n.prev=17,n.t0=n.catch(0),ps("gd-adflow error on ads.start",n.t0),new Error(n.t0);case 21:case"end":return n.stop()}}),n,this,[[0,17]])}))),function(){return Y.apply(this,arguments)})},{key:"adSystemInitialize",value:(K=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={success:!1},e.prev=1,e.next=4,t();case 4:n.success=!0,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n.error=e.t0;case 10:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,null,[[1,7]])}))),function(e){return K.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(W=e(r.mark((function e(t){var n,i,a,s,o,c,d,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,c=this.nextAdPosition(n),e.next=6,this._create_dp_context(c,i);case 6:return d=e.sent,o?(ls("spil-adaptor: in _getSpilUrl, adType, adPosition, gamedata",n,c,this.gameData),u=o[c]||o.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),l=100*d.floor_price,ls("spil-adaptor: fp",d.floor_price),h=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return W.apply(this,arguments)})},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h,p,f,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag")||QD().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],c=Math.floor(Math.random()*o.length),d=o[c],s({url:d,tnl_keys:{tnl_ad_pos:null==i?void 0:i.adTypeFound}}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,u=a.nextAdPosition(n),null!=i&&i.adTypeFound&&(u=null==i?void 0:i.adTypeFound),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&j(l.preroll)?l=l.preroll:"midroll"===u&&j(l.midroll)?l=l.midroll:"rewarded"===u&&j(l.rewarded)&&(l=l.rewarded),h="","audio"===i.adapter||"audio"===i.giftType?(a.isAudioAd=!0,h="midrollaudio"):(a.isAudioAd=!1,h="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),e.next=20,window.idhb.isLoaded();case 20:return e.next=22,a._create_dp_context(u,i);case 22:p=e.sent,hs("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(KD(KD({},f),{},{adaptor_order:i.adapterIndex})),ls("hl-order 2",window.idhb.getAdserverTargetingForAdSlot(h)),window.idhb.requestAds({slots:T({},h,{bidFloor:(null==p?void 0:p.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,g),"Missing configuration"===(null==e?void 0:e.error)&&a._broadcast("HL_CONFIG_ERROR",{status:"warning"}),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:KD(KD({},window.idhb.getAdserverTargetingForAdSlot(h)),{},{tnl_ad_pos:u,tnl_asset_id:a.gameData.gameId}),url:e,dp:p,hl:n};a._extend_hl_url(i),s(i)}.bind(this)}),e.next=34;break;case 31:throw e.prev=31,e.t0=e.catch(10),new Error(e.t0);case 34:case"end":return e.stop()}}),e,this,[[10,31]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===g.Rewarded)return this.adRewardedCount++,"rewarded";if(e===g.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===g.Rewarded?"rewarded":e===g.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===g.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===g.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,c=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,n),l=KD(KD({},n),{},{adTag:u,tnl_ad_pos:c});this.adCounter[c]=this.adCounter[c]||0,this.adCounter[c]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!u.bidder&&(h.adtag_url=u.url);var f=this._isVMAP(c);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):u.url="original_broken",ls("gd-adflow, _requestAd, dp.adtag_url",null==h?void 0:h.adtag_url),ls("gd-adflow, _requestAd, dp.fallback_url",null==h?void 0:h.fallback_url),ls("gd-adflow, _requestAd, adTag.url",u.url))}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)d.adTagUrl=m;else if(f){ls("gd-adflow, _isVMAP");var g=function(e){for(var t=[],n="",r=Date.now(),i={ppos:1,lip:!0,vad_type:"linear"},a=0;a<e.length;a++){var s=new C(e[a].adtag.url,!0);s.query=wD(wD({},s.query),{},{ad_rule:0,vpos:e[a].positon,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),a<e.length-1&&(s.query=wD(wD({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),c=1;c<=t.length;c++){var d,u,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(c,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(kD({id:o++,adtag_url:t[c-1],error_url:null===(d=e[c-1].dp)||void 0===d?void 0:d.error_url,impression_url:null===(u=e[c-1].dp)||void 0===u?void 0:u.impression_url,fallback_url:null===(l=e[c-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[c-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:h,adtag:u,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(c)}));d.adsResponse=g}else if(h&&p.bidFloorApplied){ls("gd-adflow, vast wrapper"),h.adtag_url||(h.adtag_url=u.url);var A=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(h);d.adsResponse=A}else if(h&&h.fallback_url){ls("gd-adflow, vast wrapper 2");var v=function(e){return'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim()}(h);d.adsResponse=v}else ls("gd-adflow, without dp"),d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(n.autoplayAllowed),d.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(d,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=HD(this.gameData)&&VD(n,this.gameData),ls("external-vast success",t)}catch(e){console.log("external-vast err",e)}return t}},{key:"cancel",value:function(e){var t;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var n=(null==e||null===(t=e.message)||void 0===t?void 0:t.indexOf("NO_VAST_URL"))>=0,r="AD_SDK_CANCELED";this._broadcast(r,{name:r,message:"Advertisement has been canceled.",status:"warning",noVast:n,analytics:{category:this.eventCategory,action:r,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(z=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome"),F.video({inline:!0,muted:!1}).then(function(n){t(this,i);var r=n.result;n.error,e(!0===r?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return z.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(Q=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return Q.apply(this,arguments)})},{key:"startAd",value:(V=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.adType,s=n.params,this.adType_=a,this.isAudioAd=!1,this.adContext=KD(KD({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new zD,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==s?void 0:s.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(s,a));case 7:if("adsense"!==(null==s?void 0:s.adapter)){e.next=31;break}if(a!==g.Interstitial){e.next=24;break}if("preroll"!==(null==s?void 0:s.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 13:if("start"!==(null==s?void 0:s.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 17:if("next"!==(null==s?void 0:s.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 22:e.next=29;break;case 24:if(a!==g.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 28:throw new Error("Unsupported ad type");case 29:e.next=44;break;case 31:if(!["ima","spil","audio"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))){e.next=42;break}if(a!==g.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==g.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(s));case 41:throw new Error("Unsupported ad type");case 42:["opus"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))&&this._startOpusAd(s);case 44:case"end":return e.stop()}}),e,this)}))),function(e){return V.apply(this,arguments)})},{key:"_startOpusAd",value:(H=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.adTypeFound="rewarded"===n.adTypeFound?"reward":n.adTypeFound,a=n.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=9;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error",reason:"request-running"}),this._send_atom_event("opus-ad.already-running"),e.abrupt("return");case 9:if(s=null===(i=window.gdlocus)||void 0===i?void 0:i.adBreak){e.next=14;break}return this._send_atom_event("opus-ad.not-initialized"),this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error",reason:"opus-not-found"}),e.abrupt("return");case 14:this._send_atom_event("opus-ad.ready"),o=void function(){return t(this,b),!0}.bind(this),this.requestRunning=!0,c=this.gameData,d=c.gameId,u=c.slug,l=c.title,h={assetId:d,slug:u,title:l,debug:o},p=function(e){t(this,b),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),f=function(e){t(this,b),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),m=function(){t(this,b),this.opusEventReceived=!0}.bind(this),g=function(){t(this,b),this.opusEventReceived=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),A=function(e){t(this,b),this.opusEventReceived=!0,this.resetForNext();var n="".concat(a);this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):this._broadcast("AD_ERROR",{message:e.errorMessage,errorType:e.errorType,status:e.breakStatus,reason:"opus-error"})}.bind(this),console.log("opus-ad meta",h),v={type:a,meta:h,beforeAd:p,afterAd:f,adBreakDone:A},"reward"===a&&(v=KD(KD({},v),{},{adDismissed:m,adViewed:g})),this.opusEventReceived=!1,this._startTimeoutForOpus(),s&&s(v);case 31:case"end":return e.stop()}}),e,this)}))),function(e){return H.apply(this,arguments)})},{key:"preloadAd",value:(q=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==g.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==g.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return q.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this),r=function(){t(this,e),this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!1),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._hideSkipButton(),this.cancel()}.bind(this);try{this.adResume=new fD(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new mD(this.adContainer,n),this.rewardedLabel.add(),this.skipAdButton=new gD(this.adContainer,n,r),this.skipAdButton.add(),this.audioAdLabel=new AD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(M=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u,l,h,p,f,m,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{ls("display_test load",i),(c=i?i.containerId:null)||s("Container id is not specified"),d=document.getElementById(c),document.getElementById(c)||s("No container is found with this id - ".concat(c)),void 0===window.idhb.requestAds&&s("Prebid.js wrapper script hit an error or didn't exist!"),u=i.slotId?i.slotId:"gd__banner@".concat(c),document.getElementById(u)||(l="\n .gd__banner{\n z-index: ".concat(A.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }"),document.getElementById("gd__banner__style")||((h=document.createElement("style")).type="text/css",h.id="gd__banner__style",h.styleSheet?h.styleSheet.cssText=l:h.appendChild(document.createTextNode(l)),d.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),d.appendChild(p)),a.atom_display=null,null!==(o=a.atom_display)&&void 0!==o&&o.params&&window.idhb.setAdserverTargeting(null===(f=a.atom_display)||void 0===f?void 0:f.params),(m={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},ls("display_test slots",m),window.idhb.requestAds({slots:m,callback:function(e){t(this,g),ls("display_test callback",JSON.stringify(e,null,2))}.bind(this)}),n()}catch(e){console.log("display_test error",e),s(e.message||e)}case 1:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return M.apply(this,arguments)})},{key:"_startInterstitialAd",value:(L=e(r.mark((function e(n){var i,a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,d),fs.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return a=e.sent,e.next=13,this._loadInterstitialAd(KD(KD({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(c=this.gameData.advlm)||void 0===c?void 0:c.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),ls("VAST_URL_2 error",e.t0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return L.apply(this,arguments)})},{key:"_startPromo",value:(B=e(r.mark((function e(t,n){var i,a,s,o,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return a=e.sent,e.next=11,this._loadPromo(KD(KD({},a),t),n);case 11:if(s=e.sent,o=s.success,s.args,o){e.next=16;break}return e.abrupt("return");case 16:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(c=this.gameData.advlm)||void 0===c?void 0:c.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return B.apply(this,arguments)})},{key:"_loadPromo",value:(P=e(r.mark((function e(t,n){var i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,i=this.nextAdPosition(n),a=this._create_promo_context(i),this._requestPromo(a,KD({adType:g.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return P.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(O=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(g.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,KD({adType:g.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return O.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var s=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!0,args:e})}.bind(this),1)}.bind(this),o=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",s,a),this.eventBus.subscribe("AD_SDK_CANCELED",o,a),this.eventBus.subscribe("AD_ERROR",o,a)}.bind(this))}},{key:"_startRewardedAd",value:(D=e(r.mark((function e(n){var i,a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,d),fs.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return a=e.sent,e.next=13,this._loadRewardedAd(KD(KD({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(c=this.gameData.advlm)||void 0===c?void 0:c.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return D.apply(this,arguments)})},{key:"_loadRewardedAd",value:(x=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(g.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,KD({adType:g.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return x.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(E=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(g.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return E.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(k=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(g.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return k.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var n=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var r=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var i=this._adrequest_user_context.t4RResult?this._adrequest_user_context.t4RResult:this._isT4R(e);this._adrequest_user_context.t4RResult=i;var a=i.success,s=i.reason,o=this._getT4ROptions(e);if("loaded"===r){var c,d,u=(null===(c=this._adrequest_user_context)||void 0===c||null===(d=c.adTag)||void 0===d?void 0:d.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:u}),a||this._broadcast("AD_T4R_NONE",{reason:s}),this.activeAdContainer.style.opacity=a?.001:1,a&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new vD(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){var e;t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(e=this.adContext)&&void 0!==e&&e.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==o?void 0:o.min)||1234)+Math.random()*((null==o?void 0:o.max)||3210))}else if("click"===r||"first_quartile"===r){var l;if(a&&"click"===r){var h,p=null===(h=this._adrequest_user_context)||void 0===h?void 0:h.tnl_ad_pos;this.clickCount[p]++,this._broadcast("AD_T4R_CLICK")}a||"click"!==r||this._broadcast("AD_CLICK"),this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(l=this.adContext)&&void 0!==l&&l.muteRequested?0:1)}}}},{key:"_createPlayer",value:function(){var e=this,n=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=A.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var r=document.createElement("video");r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline",!0),r.id="".concat(this.prefix,"advertisement_video"),r.style.position="absolute",r.style.backgroundColor="#000000",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.video_ad_player=r,this.adContainer.appendChild(r);var i=document.createElement("div");i.id="".concat(this.prefix,"advertisement_slot"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",this.adContainerInner=i,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(i),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(i),n.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var a=function(){t(this,e);var n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:n,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",a),window.document.addEventListener("DOMContentLoaded",a)}},{key:"_setUpIMA",value:function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerInner,this.video_ad_player),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0),this.adsLoader.getSettings().setLocale(this.options.locale),this.adsLoader.getSettings().setVpaidMode(this._getVPAIDMode()),this.adsLoader.getSettings().setAutoPlayAdBreaks(!0);var e=this.adsLoader.getSettings().getNumRedirects();this.adsLoader.getSettings().setNumRedirects(2*e),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1,this),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError,!1,this)}},{key:"_onAdsManagerLoaded",value:function(e){var n=this,r=new google.ima.AdsRenderingSettings;r.autoAlign=!1,r.enablePreloading=!1,r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.useStyledNonLinearAds=!0,r.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,r),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){t(this,n),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r,i,a,s=this,o=new Date,c=o.getHours(),d=o.getDate(),u=o.getMonth(),l=o.getFullYear(),h=v(google.ima.AdEvent.Type,e.type),p=!1,f=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",m=!f.startsWith("image")&&!f.startsWith("text"),A=null==e||null===(r=e.ad)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.title,b=null==e||null===(a=e.getAd())||void 0===a?void 0:a.data.skippable;this._sendIMAEventsToHB(e);var y=document.getElementById("game"),_="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:_="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:_="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(p=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,_="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:_="Fired when the ad is clicked.";var w=e.getAd().getContentType();this._show({mode:"click",contentType:w}),LD();break;case google.ima.AdEvent.Type.COMPLETE:ls("gd-adflow ON COMPLETE!",e.getAd()),p=this._is_completed(e.getAd()),_="Fired when the ad completes playing.",this.adType_!==g.Rewarded||this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0);break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(y.style.display="none"),this.contentPaused=!0,_="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(y.style.display="block"),_="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?p=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide(),this._clearTimeoutForSkipAddButton();break;case google.ima.AdEvent.Type.DURATION_CHANGE:_="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:_="Fired when the ad playhead crosses first quartile.";var k=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:k});break;case google.ima.AdEvent.Type.IMPRESSION:_="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:_="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:_="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var E=e.getAd().getContentType();_=E,this._show({mode:"loaded",contentType:E});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(_=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:_="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==A&&this.adResume.show(),_="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:_="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:_="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:p=this._is_completed(e.getAd()),_="Fired when the ad is skipped by the user.",BD(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var x;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===g.Rewarded)!b&&null!==(x=this.gameData.rwskp)&&void 0!==x&&x.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){t(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4)),this.rewardedLabel.show();this._hideAddResume(),_="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:_="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:p=this._is_completed(e.getAd()),_="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:_="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:_="Fired when the ad volume has been muted."}if(""!==h&&""!==_){var D=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,S=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;D||S||this.isAudioAd||this._broadcast(h,{name:h,message:_,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(c," d").concat(d," m").concat(u," y").concat(l)}})}if(p&&!this.adSuccess){this.adSuccess=!0;var R=e.getAd(),T="Rainbow"===(null==R?void 0:R.getAdSystem())&&(null==R?void 0:R.getWrapperAdIds().some(function(e){return t(this,s),"promo"===e}.bind(this)));ls("gd-adflow isPromoSuccess",T,null==R?void 0:R.getAdSystem(),null==R?void 0:R.getWrapperAdIds()),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:T}),this.resetForNext(e)}}},{key:"_clearTimeoutForSkipAddButton",value:function(){this._skipAdButtonTimeout&&(clearTimeout(this._skipAdButtonTimeout),this._skipAdButtonTimeout=null)}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var c=e.type,d=e.url;if("none"===c||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){t(this,n)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,n){var r=this,i={type:"none"};try{var a=this.current_dp,s=a.id,o=a.error_url,c=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!n)return i={type:"imp_err",url:o};var l=e.getWrapperAdIds().some(function(e){return t(this,r),e==="".concat(s)}.bind(this)),h=e.getWrapperAdIds().some(function(e){return t(this,r),"fallback"===e}.bind(this)),p=e.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this));l&&n?i={type:"normal_imp",url:c}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:u}:h&&n&&(i={type:"fallbacj_imp",url:d})}catch(e){}return i}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),i=this._getInnerErrorCode(n);YD.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume(),this._clearTimeoutForSkipAddButton()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideAdSpinner",value:function(){try{var e;null!==(e=this.gameData.adspn)&&void 0!==e&&e.enabled&&this.adFlowProcessSpinner&&this.adFlowProcessSpinner.hide()}catch(e){console.log("Error on hide adSpinner",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===g.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===g.Rewarded&&this.skipAdButton&&this.skipAdButton.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,n){var r=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){t(this,r),this.cancel(),this._clearSafetyTimer(n)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(bD(e.getInnerError)){var t=e.getInnerError();if(t)return bD(t.getErrorCode)&&bD(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,n){var r=this;if(e){var i=this.macros.transform(e,{get:function(e){if(t(this,r),n&&n.tnl_keys)return n.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in i.query||{}){var s=i.query[a];j(s)&&(i.query[a]=G.stringify(s))}var o=new C(i.url,!0);return N(o.query,i.query||{}),KD({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new C(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new C(e.url,!0);if(a.query.cust_params){var s=G.parse(a.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=a}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,n,r){var i=this;if(e&&n&&e.tnl_keys){var a=this.options.vast_query;if(n.retry_on_success&&this.options.retry_on_success&&j(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&j(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=U(a),j(a)){var s=r.query;if(a.$$remove){for(var o in s){new RegExp(a.$$remove,"i").test(o)&&delete s[o]}delete a.$$remove}var c=G.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in c){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete c[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=c,N(s,u),s.cust_params=G.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a,s=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx";this.msgrt.send("bidder",{message:s}),ls("ex_bidder ad request context",this._adrequest_user_context,'bidder:"'.concat(s,'"'));var o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[],c=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return c.length>0?d=!c.some(function(n){return t(this,e),n===s}.bind(this)):o.length>0&&(d=o.some(function(n){return t(this,e),n===s}.bind(this))),ls("ex_bidder_result",s,d),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n,r,i=this._isExcludedBidderForT4R(),a=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,s=null!=a&&a.enabled?(null==a?void 0:a.rate)||.8:0,o=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx",c=Math.random();return i||"adx"!==o&&c<s}},{key:"_isT4R",value:function(e){var t,n,r,i,a,s,o;if(!this.gameData.publishedAt)return{success:!1,reason:"pdate-2"};var c=new Date(this.gameData.publishedAt);if(((new Date).getTime()-c.getTime())/864e5<=10)return{success:!1,reason:"pdate-1"};var d=this.gameData.meta,u=e.t4r.meta;if((null==d||null===(t=d.ast)||void 0===t?void 0:t.c)>=(null==u||null===(n=u.ast)||void 0===n?void 0:n.c)&&(null==d||null===(r=d.sit)||void 0===r?void 0:r.c)>=(null==u||null===(i=u.sit)||void 0===i?void 0:i.c))return{success:!1,reason:"meta"};if(this._isExcludedBidderForT4RWithBidderExcRate())return this.msgrt.send("bidder.ex",{message:"true"}),{success:!1,reason:"bidder"};this.msgrt.send("bidder.ex",{message:"false"});var l=null===(a=this._adrequest_user_context)||void 0===a?void 0:a.tnl_ad_pos;if(this.clickCount[l]>=(null===(s=e.t4r[l])||void 0===s?void 0:s.count))return{success:!1,reason:"click-count"};if(null!=e&&null!==(o=e.contentType)&&void 0!==o&&o.startsWith("image/")||"text"===(null==e?void 0:e.contentType)){var h,p=l&&(null===(h=e.t4r[l])||void 0===h?void 0:h.enabled);return{success:p,reason:p?null:"rule-check"}}if(null!=e&&e.contentType.startsWith("video/")){var f,m=(null===(f=e.t4r[l])||void 0===f?void 0:f.viper)||0;if(m>0){var g,A=Math.random()<m,v=l&&A&&(null===(g=e.t4r[l])||void 0===g?void 0:g.enabled);return{success:v,reason:v?null:"viper-check"}}return{success:!1,reason:"rule-check-viper"}}return{success:!1,reason:"media-format"}}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s,o,c,d,u,l,h,p,f,m;if(!e)return!1;var g="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(c=this.gameData)||void 0===c||null===(d=c.mAds)||void 0===d||null===(u=d.vmap)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var A=this._get_vmap_config(e),v=this.adCounter[e];return void 0!==(null==A?void 0:A.start)?v>=(null==A?void 0:A.start):g}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){for(var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=r.count||2,s=[],o=1;o<=a;o++){var c={};c.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,c.position=n,c.dp=r["vast_"+o]?void 0:i,s.push(c)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,c;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(c=o.pAds)||void 0===c?void 0:c.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new pD(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(I.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(I.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,c="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=o?c:void 0;return function(){t(this,r),fs.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a._isDP(n)){e.next=5;break}return a.msgrt.send("dp.na",{message:"rule"}),e.abrupt("return",s());case 5:c={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(d=new pD(a.gameData).checkCustomParams())&&(c.cp=d),u=encodeURIComponent(I.encode(JSON.stringify(c))),ls("gd-adflow isLastAdapter",null==i?void 0:i.adapterIndex,null==i?void 0:i.isLastAdapter),l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,ls("gd-adflow promo_enabled",!1,null==l?void 0:l.enabled,null==i?void 0:i.isLastAdapter),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(u)).then(function(e){return t(this,h),e.json()}.bind(this)).then(function(e){if(t(this,h),!e||!e.p)return a.msgrt.send("dp.na",{message:"atom"}),s();var n=e.p/100;a.msgrt.send("dp.fp",{message:n}),s({id:Date.now(),floor_price:n,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){t(this,h),a.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),s()}.bind(this)),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),a.msgrt.send("dp.err",{message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||e.t0}),s();case 20:case"end":return e.stop()}}),e,this,[[0,16]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new C(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=G.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=G.stringify(i,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var i,a=new C(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=G.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=G.stringify(s,!1),e.url=a.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(w=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._getPrebidScripts(),a=i[0],s=function(){return t(this,h),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:s},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(o=new URL(a)).searchParams.append("referer",window.idhb.options.configUrl),a=o.href,e.next=13,f(a,"gdsdk_prebid",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,h),window.idhb.requestAds}.bind(this)});case 13:return e.next=15,this.checkOpphbPath();case 15:c=b("ch",window.location.href),d=b("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},c&&(u.channel=c),d&&(u.ch_date=d),(l=b("hl_label",this.parentURL)||b("hl_label",window.location.href))&&(u.label=l),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,h);try{var r,i,a=e.slotId.split("@");a=1===a.length?a[0]:a[1],e.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),ls("display_test DISPLAYAD_ERR",e),this._broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(null!==(i=this.atom_display)&&void 0!==i&&i.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),ls("display_test DISPLAYAD_IMPRESSION"),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 25:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"checkOpphbPath",value:(p=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=this.topDomain||this.parentDomain||"",a=(null===(t=this.gameData)||void 0===t?void 0:t.gameId)||"",s=(null===(n=this.options)||void 0===n?void 0:n.width)||640,e.next=6,fetch("https://pub.headerlift.com/opphb?page_url=".concat(i,"&page_type=gd&page_width=").concat(s,"&aid=").concat(a));case 6:o=e.sent,hs("opphb load success",o),e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(0),new Error("Blocked: https://pub.headerlift.com/opphb");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return p.apply(this,arguments)})},{key:"_init_ima_script",value:(l=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],a=this.options.debug?i[0]:i[1],e.next=4,f(a,"gdsdk_ima",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,s),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"_init_afg_script",value:(u=e(r.mark((function e(n){var i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(o={}).crossorigin="anonymous",o["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",o["data-ad-frequency-hint"]="30s",o.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(o["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(o["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(o["data-adbreak-test"]="on"),e.next=15,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,c),!!window.adsbygoogle}.bind(this),attrs:o});case 15:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 17:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",i=n||!0,a=document.getElementsByClassName("adsbygoogle"),s=0;s<a.length;s++){var o,c=a[s],d=c&&(null===(o=c.children[0])||void 0===o?void 0:o.children[0]);d&&"IFRAME"===d.tagName&&d.style.height!==r&&(ls("out-of-bounds fix apply"),d.style.height=r,i&&(d.parentElement.style.overflow="auto"))}}catch(e){ls("out-of-bounds error: ".concat(e.message))}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(d=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,h),fs.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),i=!1,a=function(){t(this,h),i=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),s=function(){t(this,h),i=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),o=function(){t(this,h),i=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),c=function(){t(this,h),i=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),d=function(e){t(this,h),i=!0,e()}.bind(this),u=function(e){t(this,h),i=!0,this.resetForNext();var n="rewarded";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),l=function(e){window.adsbygoogle.push(e)},setTimeout(function(){t(this,h),i||(hs("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),l({type:"reward",name:"reward-in-game",beforeAd:a,afterAd:s,adDismissed:o,adViewed:c,beforeReward:d,adBreakDone:u}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return d.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(c=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,s),fs.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),this.adPlacementEventReceived=!1,i=function(){t(this,s),this.adPlacementEventReceived=!0}.bind(this),a=function(e){t(this,s),this.adPlacementEventReceived=!0,this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),r={type:"preroll",beforeAd:i,adBreakDone:a},window.adsbygoogle.push(r),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var r}),e,this,[[1,18]])}))),function(e){return c.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(o=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),fs.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error 2",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),i=function(){t(this,o),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,s=function(e){t(this,o),this.adPlacementEventReceived=!0,this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var r}),e,this,[[1,19]])}))),function(e){return o.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var n,r,i,a,s,o,c=this;if(null===(n=this.gameData)||void 0===n||null===(r=n.ad_blcks)||void 0===r||null===(i=r.adsenseTimeout)||void 0===i?void 0:i.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(s=a.ad_blcks)||void 0===s||null===(o=s.adsenseTimeout)||void 0===o||o.timeout;var d=setTimeout(function(){t(this,c),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(d)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,n=setTimeout(function(){t(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"opus-sdk-timeout",status:"error",reason:"forced-sdk-timeout"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(n)}.bind(this),8e3)}},{key:"_startAdsensePlacementNext",value:(s=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),fs.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense midroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),i=function(){t(this,o),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,s=function(e){t(this,o),this.adPlacementEventReceived=!0,this.resetForNext();var n="midroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"midroll"}),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var r}),e,this,[[1,19]])}))),function(e){return s.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,i=n._ua,a={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:i.browser.name,brvs:i.browser.version,osnm:i.os.name,osvs:i.os.version,dvmd:i.device.model,w:r.w,h:r.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(a)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new C_).get();return n=KD(KD({},n),r),n=t?KD(KD({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===g.Rewarded)t="reward";else if(n===g.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,KD(KD({},n),{},{skipForward:i,adPosition:a}))}},{key:"mute",value:(a=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adContext&&(this.adContext.muteRequested=!0),this.adsManager&&this.adsManager.setVolume(0);case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"terminate",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cancel();case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),XD=S((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$A(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"promo",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-stone-dynamic",s=n.package_version||"1.1.1",o=n.template||"puzzle",c=n.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},ZA(this.moduleName,this.moduleConfig)})),$D=S((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$A(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"splash",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-air-dynamic",s=n.package_version||"1.2.0",o=n.template||"pluto",c=n.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},ZA(this.moduleName,this.moduleConfig)})),eS=function(e,t){console.log(e,t)},tS={},nS={},rS=null;function iS(){for(var e,t=window,n=null,r=null;!e;){try{if("function"==typeof t.__tcfapi||"function"==typeof t.__cmp){"function"==typeof t.__tcfapi?(r=2,n=t.__tcfapi):(r=1,n=t.__cmp),e=t;break}}catch(e){}try{if(t.frames.__tcfapiLocator){r=2,e=t;break}}catch(e){}try{if(t.frames.__cmpLocator){r=1,e=t;break}}catch(e){}if(t===window.top)break;t=t.parent}return tS.version=r,tS.frame=e,tS.function=n,tS.version}function aS(e){var n=this;return rS||(rS=new Promise(function(r){function i(t,n){if(eS("Received a response from CMP",t),n){var i,a;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(a=(i=t)&&"boolean"==typeof i.gdprApplies?i.gdprApplies:e.defaultGdprScope)||!0===a&&"string"!=typeof i.tcString)&&r({result:"cmpUnexpectedResponse",cmp:tS,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),iS(),tS.frame?2===tS.version?(eS("TCF v2 CMP found. Fetching the consent."),tS.function?(eS("CMP API is directly accessible, calling it now..."),tS.function("addEventListener",tS.version,i)):(eS("CMP API is outside the current iframe, calling it now..."),function(e,n,r){var i=this,a="__tcfapi";function s(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==nS[r.callId]&&nS[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var c=Math.random()+"",d="".concat(a,"Call"),u=T({},d,{command:e,parameter:o,callId:c,version:r});nS[c]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,tS.version,r)}("addEventListener",tS.frame,i))):r({result:"cmpVersionNotV2",cmp:tS}):r({result:"cmpNotFound"})}.bind(this)),rS)}var sS=new(function(){function t(){R(this,t),this.productName="Game Distribution"}var n;return S(t,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(n=e(r.mark((function e(t,n){var i,a,s,o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),c=encodeURIComponent(s),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=12,fetch(d,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=22,fetch(u,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,t){return n.apply(this,arguments)})}]),t}());function oS(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return cS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cS(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function cS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dS=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var c=this;t(this,n);try{var d=document.createElement("script");if(d.async=null==s||s,d.type="text/javascript",d.onload=function(){t(this,c),e()}.bind(this),d.onerror=function(){t(this,c);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),d.src=r,i){var u,l=oS(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;d.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},uS="ffd4774b-99ae-4464-8f40-3afa12b4692e",lS=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,dS({src:"https://cdn.cookielaw.org/consent/tcf.stub.js",attributes:[{key:"id",value:"gd-cookie-pro-tcf-stub"},{key:"charset",value:"UTF-8"}],isAsync:!1});case 3:return e.next=5,dS({src:"https://cdn.cookielaw.org/consent/".concat(uS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,dS({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:uS}],isAsync:!1});case 7:n=void 0,r=void 0,i=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(i=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 13:case"end":return e.stop()}var t,n,r,i}),e,null,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),hS=new M,pS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},fS=!1;function mS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=r.type;if(Object.keys(pS).some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=!r.type||!r.type.startsWith("gd-sdk")&&!("parent-data-response"===r.type)||"sg-game-event"===r.type;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var i="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(fS=!0),i&&fS&&(fS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var c=o();if(!c)return;var d=c&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),c.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!d&&!u)return}var l=r.eventName,h=r.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==l&&"levelFinish"!==l||window.mpHelper.sendStat("level",h.level),"levelFinish"===l&&window.mpHelper.sendStat("score",h.score)),window.parent.postMessage(r,"*")}if(a){var p=pS[i][a];p&&hS.emit(p,r)}}}),!1);var gS="__msgr",AS=q(),vS=function(e){var n=this;if(!window[gS]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=gS,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:AS,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){_S(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",_S(i)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){t(this,n);try{var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=AS,_S(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},bS=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=yS(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},yS=function e(t){try{var n,r,i=null==t?void 0:t.parent;if("game"===(null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return i;e(i)}catch(e){return t}},_S=function(e){try{window[gS]&&window[gS].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},wS=function(){function n(e){R(this,n),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=e.adRequest,this._gameData=e._gameData,this._msgrt=e._msgrt,this._adInstance=e._adInstance,this._eventBus=e._eventBus,this.blockedAdsMap=e._blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e._onResumeGame.bind(e),this._onPauseGame=e._onPauseGame.bind(e),this._onRewardedWatchComplete=e._onRewardedWatchComplete.bind(e),this._onAdError=e._onAdError.bind(e),this._promoShowSuccess=!1}var i,a,s;return S(n,[{key:"run",value:function(n){var i=n.duration,a=this;return new Promise(function(){var n=e(r.mark((function e(n,s){var o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.add();case 3:o=a.show(),setTimeout(function(){t(this,c);try{a.hide(),n({success:o})}catch(e){s(e)}}.bind(this),1e3*i),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),s(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(s=e(r.mark((function t(){var n,i,a,s=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.fetch_promo();case 3:this.promo_data=t.sent,n=document.createElement("div"),this.promo=n,i=this.promo_data,this.promo.addEventListener("click",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(i),s.track_click(i.click_tracking),window.open(i.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),(a=document.createElement("iframe")).src=this.promo_data.renderer_url,a.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),a.classList.add("gd__promo__iframe"),this.promo.appendChild(a),this.adContainer.appendChild(this.promo),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),console.log(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return s.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(a=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return t(this,i),e.json()}.bind(this));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"track_click",value:(i=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}]),n}(),kS=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GD",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ObjectStore";R(this,n),this.dbName=e,this.storeName=t,this.db=null,this.init()}var i,a,s,o;return S(n,[{key:"init",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){t(this,i),console.error("Database error:",e.target.error),r(e.target.error)}.bind(this),a.onsuccess=function(e){t(this,i),this.db=e.target.result,n(this.db)}.bind(this),a.onupgradeneeded=function(e){t(this,i);var n=e.target.result;n.objectStoreNames.contains(this.storeName)||n.createObjectStore(this.storeName,{keyPath:"key"})}.bind(this)}.bind(this))}},{key:"getItem",value:(o=e(r.mark((function e(n){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;t(this,i);var s=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(n);s.onerror=function(e){t(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),s.onsuccess=function(n){t(this,a),s.result?e(s.result.value):e(null)}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"setItem",value:(s=e(r.mark((function e(n,i){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var s=this;t(this,a);var o=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:n,value:i});o.onerror=function(e){t(this,s),console.error("Set item error:",e.target.error),r(e.target.error)}.bind(this),o.onsuccess=function(n){t(this,s),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"removeItem",value:(a=e(r.mark((function e(n){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;t(this,i);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(n);s.onerror=function(e){t(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),s.onsuccess=function(n){t(this,a),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"clear",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){t(this,i),console.error("Clear store error:",e.target.error),r(e.target.error)}.bind(this),a.onsuccess=function(n){t(this,i),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),ES=function(){function t(n){var i=n.mode;R(this,t),this.setItem=function(){var t=e(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}(),this.getItem=function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),"indexed-db"===i?(this.indexedStore=new kS,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===i&&(this.setItem=function(){var t=e(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m.set(t,n));case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}(),this.getItem=function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m.getString(t));case 1:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}())}var n,i;return S(t,[{key:"set",value:(i=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=JSON.stringify(n),e.next=3,this.setItem(t,i);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"get",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItem(t);case 2:return n=e.sent,e.abrupt("return",n?JSON.parse(n):null);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}();function xS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var SS,RS="_gd_vs";function TS(e){return CS.apply(this,arguments)}function CS(){return CS=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,i=t.serverDate,s=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,PS({gameId:n,serverDate:i});case 6:a=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),ps("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(a||!m.available){e.next=24;break}return e.prev=14,e.next=17,IS({gameId:n,serverDate:i});case 17:a=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),ps("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",DS(DS({},a),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),CS.apply(this,arguments)}function IS(e){return OS.apply(this,arguments)}function OS(){return OS=e(r.mark((function e(t){var n,i,a,s,o,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,i=t.serverDate,s=new ES({mode:a="local-storage"}),e.next=5,s.get(RS);case 5:return(o=e.sent)||(o={gids:{}}),o.gids[n]||(o.gids[n]={fv:i,vc:0}),(c=o.gids[n]).vc++,c.lv=i,e.next=13,s.set(RS,o);case 13:return e.abrupt("return",{visit:c,mode:a});case 14:case"end":return e.stop()}}),e)}))),OS.apply(this,arguments)}function PS(e){return BS.apply(this,arguments)}function BS(){return BS=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,i=t.serverDate,s=new ES({mode:a="indexed-db"}),e.next=5,s.get(n);case 5:return(o=e.sent)||(o={fv:i,vc:0}),o.vc++,o.lv=i,e.next=11,s.set(n,o);case 11:return e.abrupt("return",{visit:o,mode:a});case 12:case"end":return e.stop()}}),e)}))),BS.apply(this,arguments)}function LS(){return LS=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.whichFrame,i=t.options,e.prev=1,a="gd-".concat(n),void 0,s=undefined,!("loader-frame"===n)){e.next=12;break}return e.next=9,US({id:a,verbose:s,options:i});case 9:SS=e.sent,e.next=15;break;case 12:return e.next=14,FS({id:a,verbose:s,options:i});case 14:SS=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),ls("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),LS.apply(this,arguments)}function US(e){return MS.apply(this,arguments)}function MS(){return MS=e(r.mark((function n(i){var a,s,o,c,d=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.id,s=i.verbose,o=i.options,n.next=4,V({id:a,verbose:s,router:!0});case 4:return(c=n.sent).on("connected",function(e){t(this,d)}.bind(this)),c.register({method:"whoami",handler:function(){return t(this,d),"[GD-IS] I am ".concat(a)}.bind(this)}),c.register({method:"isLoader",handler:function(){return t(this,d),!0}.bind(this)}),c.register({method:"hasRouter",handler:function(){return t(this,d),!1}.bind(this)}),c.register({method:"showAd",handler:function(){var t=e(r.mark((function t(n){var i,a,s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=o.showAd?o.showAd:function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),a=n.adType,s=n.params,t.next=4,i(a,s);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),c.register({method:"registerOnEvents",handler:function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c.registerProxy({alias:"onEvent",method:"onEvent",service:"gd-game-frame"}),e.abrupt("return","[GD-IS] gd-game-frame registered for onEvents");case 3:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}()}),n.next=13,c.whoami();case 13:return n.sent,n.abrupt("return",c);case 16:case"end":return n.stop()}}),n,this)}))),MS.apply(this,arguments)}function FS(e){return jS.apply(this,arguments)}function jS(){return jS=e(r.mark((function e(n){var i,a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.id,a=n.verbose,s=n.options,e.next=4,V({id:i,verbose:a,router:!1});case 4:return o=e.sent,"gd-loader-frame",e.next=8,o.findRouter({where:{id:"gd-loader-frame"}}).catch(function(e){t(this,d)}.bind(this));case 8:if(c=e.sent,e.t0=!!c,!e.t0){e.next=15;break}return e.next=14,o.connect(c).catch(function(e){t(this,d),ls("[GD-IS] Failed to connect to router",(null==e?void 0:e.message)||e)}.bind(this));case 14:e.t0=e.sent;case 15:return e.t0,o.register({method:"whoami",handler:function(){return t(this,d),"[GD-IS] I am ".concat(i)}.bind(this)}),o.register({method:"onEvent",handler:function(e){var n=this;t(this,d);var r=e.event;(s.onEvent||function(e){t(this,n)}.bind(this))(r)}.bind(this)}),o.register({method:"isLoader",handler:function(){return t(this,d),!1}.bind(this)}),o.register({method:"hasRouter",handler:function(){return t(this,d),!!c}.bind(this)}),c&&(o.registerProxy({alias:"whoIsLoader",method:"whoami"}),o.registerProxy({alias:"registerOnEvents",method:"registerOnEvents"}),o.registerProxy({alias:"showAd",method:"showAd"})),e.next=24,o.whoami();case 24:if(e.sent,!c){e.next=35;break}return e.next=29,o.whoIsLoader();case 29:return e.sent,e.next=32,o.registerOnEvents();case 32:e.sent;case 35:return e.abrupt("return",o);case 36:case"end":return e.stop()}}),e,this)}))),jS.apply(this,arguments)}var GS=!1;function NS(){var e=this;return new Promise(function(n,r){var i=this;if(t(this,e),SS||GS)n(SS);else{var a=setInterval(function(){t(this,i),SS&&(GS=!0,clearInterval(a),n(SS))}.bind(this),100);setTimeout(function(){t(this,i),clearInterval(a),SS||(GS=!0,n(SS))}.bind(this),5e3)}}.bind(this))}function qS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var VS,QS,zS,WS=function(){var t=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js",t=["https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js"],e.next=4,f(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),KS=0,YS=!1,JS=function(){var n=e(r.mark((function n(i){var a,s,o,c,d,u,l,h=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=i.args,s=i.onError,n.prev=1,!window.isForwarderFrame){n.next=5;break}return n.abrupt("return");case 5:return n.next=7,NS();case 7:if(!(o=n.sent)){n.next=18;break}return n.next=11,o.isLoader();case 11:if(!(c=n.sent)&&(c||o.hasRouter())){n.next=16;break}o.register({method:"sendSocketEvent",handler:function(e){t(this,h),$S(e.topic,e.args)}.bind(this)}),n.next=18;break;case 16:return o.registerProxy({alias:"sendSocketEvent",method:"sendSocketEvent"}),n.abrupt("return");case 18:if(d=new C(window.location.href),!((u=!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return t(this,h),e.toLowerCase()===d.host.toLowerCase()}.bind(this)))&&o&&o.hasRouter())){n.next=24;break}return n.abrupt("return");case 24:return u&&o&&o.hasRouter(),n.next=27,WS();case 27:QS=q(),l={json:JSON.stringify(a)},"wss://ws.gamedistribution.com",(VS=io("wss://ws.gamedistribution.com",{query:l,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){t(this,h)}.bind(this)),VS.on("after-connect",function(){var t=e(r.mark((function e(t){var n,i,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return zS=zS||(null==t?void 0:t.serverDate),n=a.gameId,e.next=4,TS({gameId:n,serverDate:zS});case 4:i=e.sent,s=i.visit,o=i.mode,c=i.errors,a.visit=HS(HS({},s),{},{stm:o,errors:c}),d={json:JSON.stringify(a)},VS.emit("client-info",{clientId:QS,counter:KS++,serverDate:zS,query:d}),YS=!0;case 12:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),VS.on("disconnect",function(e){t(this,h),YS=!1}.bind(this)),VS.connect(),n.next=40;break;case 37:n.prev=37,n.t0=n.catch(1),s&&s(n.t0);case 40:case"end":return n.stop()}}),n,this,[[1,37]])})));return function(e){return n.apply(this,arguments)}}(),ZS=!1,XS=[];function $S(e,t){return eR.apply(this,arguments)}function eR(){return eR=e(r.mark((function e(n,i){var a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,NS();case 2:if(!(a=e.sent)){e.next=11;break}return e.next=6,a.isLoader();case 6:if(e.sent||!a.hasRouter()){e.next=11;break}return e.next=10,a.sendSocketEvent({topic:n,args:i});case 10:return e.abrupt("return");case 11:if("play"!==n){e.next=15;break}if(!ZS){e.next=14;break}return e.abrupt("return");case 14:ZS=!0;case 15:s=function(e,n){t(this,c);try{var r={json:JSON.stringify(n||{})};VS.emit("socket-event",{topic:e,clientId:QS,counter:KS,serverDate:zS,query:r})}catch(e){ps("game-session: Error on sending socket-event",e.message)}}.bind(this),o=function(){t(this,c),s(n,i)}.bind(this),XS.push(o);case 19:case"end":return e.stop()}}),e,this)}))),eR.apply(this,arguments)}function tR(e){var n=this,r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},i=Object.keys(r).find(function(i){var a=this;return t(this,n),r[i].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return i||"midroll"}function nR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return rR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function rR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}setInterval((function(){if(0!==XS.length&&VS&&YS){for(var e=function(){var e=this,i=r[n];i(),XS=XS.filter(function(n){return t(this,e),n!==i}.bind(this))},n=0,r=H(XS);n<r.length;n++)e();ls("game-session: commands length",XS.length)}}),100);var iR=3,aR=1,sR=5,oR={lastImpressionDate:null,imps:0};function cR(){return dR.apply(this,arguments)}function dR(){return(dR=e(r.mark((function e(){var n,i,a,s,o,c,d,u,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,fw();case 3:if(i=e.sent,a=i.compensation||{enabled:!1},n.ruleEnabled=null==a?void 0:a.enabled,!(void 0===(null==a?void 0:a.exctg)||(null==a?void 0:a.exctg))){e.next=28;break}s=["co-op","multiplayer","IAPs"],o=(null==i?void 0:i.tags)||[],c=!1,d=nR(o),e.prev=12,l=r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=u.value,s.some(function(e){return t(this,i),e===n.title}.bind(this))&&(c=!0);case 2:case"end":return e.stop()}}),e,this)})),d.s();case 15:if((u=d.n()).done){e.next=19;break}return e.delegateYield(l(),"t0",17);case 17:e.next=15;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(12),d.e(e.t1);case 24:return e.prev=24,d.f(),e.finish(24);case 27:n.disabledByTag=c;case 28:return n.isLowScoreGame=uR(i),n.enabled=n.ruleEnabled&&!n.disabledByTag&&n.isLowScoreGame,i.hasActiveCompensations=n.enabled,e.abrupt("return",n);case 32:case"end":return e.stop()}}),e,null,[[12,21,24,27]])})))).apply(this,arguments)}function uR(e){var t=!1,n=e.compensation||{enabled:!1},r=null==e?void 0:e.adsc;if(1===(null==r?void 0:r.s)&&null!=r&&r.t){var i=null==r?void 0:r.t,a=(null==n?void 0:n.esc)||aR,s=(null==n?void 0:n.ascl)||sR,o=i||{},c=o.adsc,d=o.reqsc,u=o.pdur,l=o.rspdur;o.aspdur,t=(l||d/(u/iR))<=a&&c<s}return t}var lR=!1;function hR(){return pR.apply(this,arguments)}function pR(){return(pR=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!lR){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,cR();case 4:(t=e.sent).enabled,t.override,t.giftEnabled,t.midrollPlusEnabled,lR=!0;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fR(e){var t=e.rateType,n=e.gameData,r=!1;if(n.hasActiveCompensations){var i=n.compensation,a="gift"===t?null==i?void 0:i.gftr:null==i?void 0:i.mpr;a=void 0===a?1:a,r=Math.random()<=a}else r=!0;return r}function mR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return gR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function gR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var AR=!1,vR=3,bR=5,yR=1,_R=60,wR=10;function kR(){return ER.apply(this,arguments)}function ER(){return(ER=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return oR.imps++,oR.lastImpressionDate=new Date,e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xR(e){return DR.apply(this,arguments)}function DR(){return DR=e(r.mark((function n(i){var a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,y,_,w,k,E,x,D,S,R,T,C,I,O,P,B,L,U,M,F,j,G,N,q,H,V,Q=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=i.gameData,c=i.executeCompensation,d=function(){var t=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.whenAvailable)||!1,!c){e.next=7;break}return e.next=4,c({whenAvailable:n});case 4:e.t0=e.sent,e.next=10;break;case 7:return e.next=9,kR();case 9:e.t0=e.sent;case 10:return i=e.t0,a=i.args,e.abrupt("return",null==a?void 0:a.success);case 13:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),u=!AR,!AR){n.next=5;break}return n.abrupt("return");case 5:if(AR=!0,l=o.adsc){n.next=10;break}return n.abrupt("return");case 10:if(h=l.s,p=l.t,1===h){n.next=13;break}return n.abrupt("return");case 13:if(null!=(f=o.compensation||{enabled:!1})&&f.enabled){n.next=17;break}return n.abrupt("return");case 17:if(!(void 0===(null==f?void 0:f.exctg)||(null==f?void 0:f.exctg))){n.next=42;break}m=["co-op","multiplayer","IAPs"],g=(null==o?void 0:o.tags)||[],A=!1,v=mR(g),n.prev=24,y=r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=b.value,m.some(function(e){return t(this,i),e===n.title}.bind(this))&&(A=!0);case 2:case"end":return e.stop()}}),e,this)})),v.s();case 27:if((b=v.n()).done){n.next=31;break}return n.delegateYield(y(),"t0",29);case 29:n.next=27;break;case 31:n.next=36;break;case 33:n.prev=33,n.t1=n.catch(24),v.e(n.t1);case 36:return n.prev=36,v.f(),n.finish(36);case 39:if(!A){n.next=42;break}return n.abrupt("return");case 42:if(_=(null==f?void 0:f.esc)||yR,w=void 0===(null==f?void 0:f.depgft)||(null==f?void 0:f.depgft),k=null!=f&&f.depgftr?null==f?void 0:f.depgftr:1,E=(null==f?void 0:f.onst)||!1,x=(null==f?void 0:f.sl)||3,D=(null==f?void 0:f.tl)||180,S=(null==o||null===(a=o.gft)||void 0===a?void 0:a.midroll.enabled)||!1,R=(null==o||null===(s=o.midroll_plus)||void 0===s?void 0:s.enabled)||!1,(!S||!R)&&(D/=k),T=void 0===(null==f?void 0:f.tc)||(null==f?void 0:f.tc),C=(null==f?void 0:f.ascl)||bR,!w){n.next=62;break}if(P=(null==o||null===(I=o.gft)||void 0===I?void 0:I.midroll.enabled)||!1,B=(null==o||null===(O=o.midroll_plus)||void 0===O?void 0:O.enabled)||!1,P&&B){n.next=62;break}return n.abrupt("return");case 62:if(U=(L=p||{}).adsc,M=L.reqsc,F=L.pdur,j=L.rspdur,L.aspdur,(j||M/(F/vR))<=_&&U<C){n.next=69;break}return n.abrupt("return");case 69:if(G=Math.ceil(F/vR),!E||!u){n.next=76;break}return n.next=76,d({whenAvailable:!0});case 76:N=0,q=1,H=function(){t(this,Q),N=0,q=1}.bind(this),V=setInterval(e(r.mark((function e(){var n,i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(T&&oR.imps>=G)){e.next=4;break}return clearInterval(V),e.abrupt("return");case 4:if(n=new Date,i=oR.lastImpressionDate?(r=oR.lastImpressionDate,o=n,c=void 0,u=void 0,void 0,void 0,c=r.getTime(),u=o.getTime(),(u-c)/1e3):D+1,!((a=D-i)>0)){e.next=20;break}if(!(a<=_R-wR)){e.next=17;break}return e.next=15,new Promise(function(e){var n=this;t(this,s),setTimeout(function(){t(this,n),e()}.bind(this),1e3*a)}.bind(this));case 15:e.next=20;break;case 17:return H(),e.abrupt("return");case 20:if(++N%q==0){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,d({});case 26:e.sent?H():(N=0,q=q+1>x?x:q+1);case 28:case"end":return e.stop()}var r,o,c,u}),e,this)}))),1e3*_R);case 80:case"end":return n.stop()}}),n,this,[[24,33,36,39]])}))),DR.apply(this,arguments)}function SR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return CR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function CR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var IR,OR=function(){function n(e){var r=this;R(this,n),this._gameData=e._gameData,this._msgrt=e.msgrt,this._adInstance=e.adInstance,this._eventBus=e.eventBus,this.blockedAdsMap=e.blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e.onResumeGame.bind(e),this._onPauseGame=e.onPauseGame.bind(e),this._onRewardedWatchComplete=e.onRewardedWatchComplete.bind(e),this._onAdError=e.onAdError.bind(e),this._setAdRequestTimer=e._setAdRequestTimer.bind(e),this._giveGift=e._giveGift.bind(e),this._executeMidrollPlus=e._executeMidrollPlus.bind(e),this.executeCompensation=e.executeCompensation.bind(e),this._runAutoResume=e._runAutoResume.bind(e),this.send_atom_event=e.send_atom_event.bind(e),this.get_session_id=e.get_session_id.bind(e),this.get_ad_system_init_result=e.get_ad_system_init_result.bind(e),this.eventBus=new y,this.isOpusReady=function(){return t(this,r),e.isOpusReady}.bind(this),this._muteRequested=!1,this._terminateRequested=!1,this._registerForEvents()}var i,a;return S(n,[{key:"_registerForEvents",value:function(){var e=this;this.eventBus.subscribe("HL_CONFIG_ERROR",function(n){t(this,e),this.hasHLConfigError=!0}.bind(this))}},{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,y,_,w,k,E,x,D,S,R,C,I,O,P,B,L,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,Z,X,$,ee,te,ne,re,ie,ae,se=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,NS();case 3:!(h=e.sent)||h.isLoader(),this.adRequest=n,p=tR(n),n.params.adTypeFound=p,ls("gd-adflow, adTypeFound",p,n.params.position),(f=this._getAdFlow(p)).find(function(e){return t(this,se),"opus"===e}.bind(this))&&!this.isOpusReady()&&(f=f.filter(function(e){return t(this,se),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),m=this._gameData,g=m.afg_disabled,A=null===(i=n.params)||void 0===i?void 0:i.isGift,v=null===(a=n.params)||void 0===a?void 0:a.isMidrollPlus,b=null===(s=n.params)||void 0===s?void 0:s.isCompensation,null===(o=n.params)||void 0===o||o.position,y=null===(c=m.promo)||void 0===c?void 0:c.rainbow,_=(null==y?void 0:y.enabled)&&(null===(d=y.position)||void 0===d?void 0:d[p]),w=null==y?void 0:y.gift,k=_&&null!=y&&y.duration?null==y?void 0:y.duration:5,E=g?f.filter(function(e){return t(this,se),"adsense"!==e}.bind(this)):f,x=this.get_ad_system_init_result(),D=x.afg,S=x.ima,R=null==m||null===(u=m.ad_blcks)||void 0===u||null===(l=u.removeOtherAdaptors)||void 0===l?void 0:l.enabled,this.anyAdBlocking=!D||!S,this.bothAdBlocking=!D&&!S,this.adsBlocked=R&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(hs("gd-adflow adsBlocked so changing the flow"),E=[]):(D||(E=E.filter(function(e){return t(this,se),"adsense"!==e}.bind(this))),S||(E=E.filter(function(e){return t(this,se),"ima"!==e}.bind(this)))),C=!1,I=!1,O=[],P=0,B=!1,U={},M=TR(E),e.prev=40,M.s();case 42:if((F=M.n()).done){e.next=88;break}if(j=F.value,!this._terminateRequested){e.next=46;break}return e.abrupt("break",88);case 46:if(n.params.adapter=j,G=P===E.length-1,N=A&&w||!A,q=G&&_&&N,n.params=RR(RR({},n.params),{},{adapterIndex:P,isLastAdapter:G,shouldFail:!1,extraPromoRunOnFail:q,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==j){e.next=53;break}return e.abrupt("continue",86);case 53:return function(){t(this,se),fs.firstSuccessOrder&&!isNaN(fs.firstSuccessOrder)&&(n.params.shouldFail=P<fs.firstSuccessOrder)}.bind(this),hs("gd-adflow, before adInvoke",P,j,n.params.shouldFail),e.next=57,this.adInvoke(n);case 57:if(H=e.sent,V=H.success,Q=H.args,z=H.isSkipped,W=H.noVast,K=H.t4r,Y=null==Q?void 0:Q.reason,J=null==Q?void 0:Q.message,Z=null==Q?void 0:Q.errorType,U[j]=U[j]||{req:0,imp:0,fail:0},U[j].req++,V?U[j].imp++:(U[j].fail++,U[j].failReason=Y,U[j].failMessage=J,U[j].failType=Z),!V){e.next=77;break}return hs("gd-adflow, adapter-result-success",P,j,Q),C=!0,I=!(null==Q||!Q.isPromoSuccess),L=K,e.abrupt("break",88);case 77:if(hs("gd-adflow, adapter-result-failure",P,j,Q.message),P++,O.push(Q.message),!z){e.next=82;break}return e.abrupt("break",88);case 82:if(!W){e.next=85;break}return this._runAutoResume(),e.abrupt("break",88);case 85:B=q;case 86:e.next=42;break;case 88:e.next=93;break;case 90:e.prev=90,e.t0=e.catch(40),M.e(e.t0);case 93:return e.prev=93,M.f(),e.finish(93);case 96:if(!B){e.next=102;break}return e.next=99,new wS(this).run({duration:k});case 99:e.sent.success&&(I=!0);case 102:return function(){var e;t(this,se),fs.disableGift&&null!==(e=m.gft)&&void 0!==e&&e[p].enabled&&(m.gft[p].enabled=!1)}.bind(this),X=O.join(" /n"),C?(oR.imps++,oR.lastImpressionDate=new Date,this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(p),"midroll"===p&&this._executeMidrollPlus()):(this._onResumeGame(X,"warning"),this._giveGift(p),"midroll"===p&&this._executeMidrollPlus()),xR({gameData:m,executeCompensation:this.executeCompensation}),$="-1",ee="none",C?($="index_".concat(P),ee=E[P]):I&&($="promo",ee="promo"),te=this.get_session_id(),this.anyAdBlocking&&"-1"===$?(ne="rewarded"===p?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[ne]=this.blockedAdsMap[ne]?this.blockedAdsMap[ne]+1:1,ls("gd-adflow, blocked-ad",JSON.stringify(this.blockedAdsMap)),this._msgrt.send("adflow.blocked.pos",{message:"".concat(ne)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!D,imaBlocked:!S,isGift:A,isMidrollPlus:v,adType:ne,sessionId:te,successAdapter:"none",adFlowIndex:$,adapterResults:U})):(T(re={},"adflow.all.index",{message:"".concat($)}),T(re,"adflow.all.success_adapter",{message:"".concat(ee)}),T(re,"adflow.".concat(p,".index"),{message:"".concat($)}),T(re,"adflow.".concat(p,".success_adapter"),{message:"".concat(ee)}),ie=re,Object.keys(ie).forEach(function(e){t(this,se);var n=ie[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:$,successAdapter:ee,adBlocker:!1,afgBlocked:!D,imaBlocked:!S,isGift:A,isMidrollPlus:v,isCompensation:b,adType:p,sessionId:te,t4r:L,adapterResults:U})),$S("ad-session",{adSession:{adType:p,imp:"-1"!==$&&"promo"!==$,promo:"promo"===$,blocked:this.anyAdBlocking&&"-1"===$,hasHLConfigError:this.hasHLConfigError,isGift:A,isMidrollPlus:v,isCompensation:b}}),ae={adType:p},this.eventBus.broadcast("AD_FLOW_COMPLETE",ae),e.abrupt("return",RR(RR({},ae),{},{args:{success:C,isGift:A,isMidrollPlus:v}}));case 120:case"end":return e.stop()}}),e,this,[[40,90,93,96]])}))),function(e){return a.apply(this,arguments)})},{key:"adInvoke",value:(i=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="main.showad.".concat(i.params.adapter,".").concat(i.params.adapterIndex),ls("adInvoke.start",{scopeName:o,adRequest:JSON.stringify(i)}),c={},d=function(e){t(this,l),ls("adInvoke.failure",{args:e,adRequest:JSON.stringify(i)}),a._eventBus.unsubscribeScope(o);var r="dismissed"===(null==e?void 0:e.message);n({success:!1,args:e,isSkipped:r,noVast:e.noVast})}.bind(this),u=function(e){t(this,l),ls("adInvoke.success",{args:e,adRequest:JSON.stringify(i)}),a._eventBus.unsubscribeScope(o),n({success:!0,args:e,t4r:c})}.bind(this),a._eventBus.subscribe("AD_ERROR",d,o),a._eventBus.subscribe("AD_SDK_CANCELED",d,o),a._eventBus.subscribe("AD_SUCCESS",u,o),a._eventBus.subscribe("AD_T4R",function(){t(this,l),c.loaded=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_CLICK",function(){t(this,l),c.t4rClick=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_VIDEO",function(){t(this,l),c.t4rVideo=!0}.bind(this),o),a._eventBus.subscribe("AD_CLICK",function(){t(this,l),c.click=!0}.bind(this),o),a._eventBus.subscribe("AD_BIDDER",function(e){t(this,l),c.bidder=null==e?void 0:e.bidder}.bind(this),o),a._eventBus.subscribe("AD_T4R_NONE",function(e){t(this,l),c.fail_reason=null==e?void 0:e.reason}.bind(this),o),e.prev=14,e.next=17,a._adInstance.startAd(i);case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(14),ps("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 23:case"end":return e.stop()}}),e,this,[[14,19]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var n,r,i,a,s,o,c,d,u=this,l=void function(){if(t(this,u),fs.customAdFlow)return JSON.parse(fs.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(c=h)||void 0===c||null===(d=c.adapters)||void 0===d?void 0:d[e]:p}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(n){t(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(n){t(this,e)}.bind(this)),this._setAdRequestTimer()}}]),n}(),PR=new M,BR=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=e.source;if(BR.some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=r.system;r.action;var o="aeriaExternalHostsConnector"===s;if("Softgames"===s)IR=a,(window.parent||window).postMessage(r,"*"),PR.emit("aeria-event",r);else if(o){IR&&IR.postMessage(r,"*");var c=window.parent||window;c&&c.postMessage(r,"*")}}}),!1);var LR="https://html5.gamedistribution.com",UR="parent-data-request",MR="parent-data-response",FR=function(){function n(){R(this,n)}var i;return S(n,[{key:"init",value:function(e){var n=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(r){if(t(this,n),r){var i=r.adRequestTimer;e.adRequestTimer=i,ls("gd-frame-data-bridge, adRequestTimer on init ",e.adRequestTimer)}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var n=this;window.addEventListener("message",function(r){t(this,n);var i=r.data,a=r.origin,s=r.source,o=i.type;if(i.value,a===LR&&o===UR){var c={adRequestTimer:e.adRequestTimer};s.postMessage({type:MR,value:c})}}.bind(this))}},{key:"_askForParentFrameData",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;r===LR&&i===MR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:UR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),jR=new FR,GR={SDKExistsOnUpperFrame:!1};function NR(){return qR.apply(this,arguments)}function qR(){return(qR=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=["https://pm.azerioncircle.com/p/gd-blck-rmv/"],e.next=4,f(t[0],"blckrmv",{alternates:t});case 4:return n=window.GD_BLCK_RMV||{},console.log("new blocker",n),e.abrupt("return",n.AdBlockerPage);case 9:e.prev=9,e.t0=e.catch(0),console.log("new blcoker error => ",e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function HR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var QR=function(){hs("gtag: GA not initialized",arguments)};function zR(e){return WR.apply(this,arguments)}function WR(){return WR=e(r.mark((function e(i){var a,s,o,c,d,u,l,h,p,m,g,A,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.onError,s=i.args,c="gdSDKDataLayer",d="https://www.googletagmanager.com/gtag/js?id=".concat(o="G-PLRTBHGSEL","&l=").concat(c),u=[d],e.prev=5,e.next=8,f(u[0],"gdsdk_google_analytics",{alternates:u,error_prefix:"Blocked:",exists:function(){return t(this,v),window[c]}.bind(this)});case 8:return window[c]=window[c]||[],QR=function(){window[c].push(arguments)},QR("js",new Date),e.next=14,Q();case 14:return l=e.sent,h=l.lookupIabConsent,p=l.getGoogleAdType,e.next=19,h();case 19:m=e.sent,g=p(m.consentData),A=VR(VR({},A=s||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:m.result,gdpr:"ok"===m.result?"object"===n(m.consentData)?!0===m.consentData.gdprApplies:"N/A":m.result,google_ads:null==g?void 0:g.type}),QR("config",o,A),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),ps("gtag: load GA error",e.t0),a&&a(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),WR.apply(this,arguments)}new C("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=3792570314314042&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&cust_params=hb_uuid%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_cache_id%3Dundefined%26tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26hb_cache_host%3Dprebid.adnxs.com%26hb_format%3Dvideo%26hb_size%3D0x0%26hb_pb%3D1.15%26hb_adid%3D259407b5792767%26hb_bidder%3Dimprovedigital%26hb_cache_host_improv%3Dprebid.adnxs.com%26hb_uuid_improvedigit%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_format_improvedig%3Dvideo%26hb_size_improvedigit%3D0x0%26hb_pb_improvedigital%3D1.15%26hb_adid_improvedigit%3D259407b5792767%26hb_bidder_improvedig%3Dimprovedigital%26tnl_wog%3D0%26gdGameId%3Daeac8455b2024f25abfa943ec96aa749%26tnl_content_category%3Dpuzzle%26adaptor_order%3D0%26pbct%3D2%26tnl_test%3Da%26fp%3D0.9%26fpt%3D99%26bfa%3D1%26adsense%3D0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&plcmt=1&vpmute=1&vpa=auto&sdkv=h.3.633.0&osd=2&frm=2&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=1&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&sdki=445&ptt=20&adk=2541783110&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&sid=E657451B-8F2F-4921-A55A-21D1A6F3C39E&nel=1&eid=44777649%2C44781409%2C44785452%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&ref=https%3A%2F%2Fwww.gry.pl%2F&top=https%3A%2F%2Fwww.gry.pl%2F&loc=https%3A%2F%2Fhtml5.gamedistribution.com%2Faeac8455b2024f25abfa943ec96aa749%2F%3Ftimestamp%3D1713336375%26countryCode%3Dpl%26siteid%3D88%26channelid%3D1%26siteLocale%3Dpl%26locale%3Dpl%26gd_sdk_referrer_url%3Dhttps%253A%252F%252Fwww.gry.pl%252Fgra%252Fkings-and-queens-match&dlt=1713336379046&idt=2621&dt=1713336390920&scor=3473667703821297&ged=ve4_td12_tt10_pd12_la2000_er0.0.156.300_vi0.0.600.510_vp100_eb24427",!0),new C("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=2275053868608838&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&vpa=auto&vpmute=0&plcmt=1&cust_params=tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26gd_opus%3D1%26fp%3D0.9%26gd_np%3D1%26bfa%3D1%26fpt%3D99%26tnl_wog%3D0&sdkv=h.3.633.0&osd=2&frm=0&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=0&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&sdki=445&ptt=20&adk=1748861338&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&media_url=blob%3Ahttps%253a%2F%2Fwww.gry.pl%2Ffa4fae4b-f435-43b4-9cee-af65696fe59e&sid=D3F4C4E1-4002-4BEE-A1F2-2638CD3B9197&a3p=EloKDWNyd2RjbnRybC5uZXQSQGE0MmZkMWJkNGI5MjgyOTY5NzUxNDUyYzVlNmUxNmQ1MzkzODYxY2E5Y2U2MGUzNjk3Y2ZlNTExMTQxYjFhZjgYucX8se4xSAASxgEKCHJ0YmhvdXNlEqwBWVNmZ3hFVno0OXBMOFI2c3ltSWtSdUFNdFg4d2Y0clBkdVMwTlVuLzZpUnhJZWh0cnRjVUtLSjFraHJDQWZERmp1N1pDNHJEc1lxMkduKzJFTFMxRmgzWlEzTUxaK0owbXZoTDR4UFlNc2JUbmlGNkczTWRaZjZQK3hEVVkwTU1FUlpkZzlKMjArcjlQNUtQOFBmWVhMaEkwRitGMUNhYUNwQS9aRVNNMVNnPRjBxfyx7jFIAFICCGoSGQoKdWlkYXBpLmNvbRjDz9ay7jFIAFICCGQSPgoFb3BlbngSLGV5SnBJam9pZEZoNU5XbDNSakZUT0ZjNVoxTlZRbFl5YWtRemR6MDlJbjA9GJ3I_LHuMUgA&nel=1&eid=44776494%2C44777649%2C44781409%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&top=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&loc=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&dt=1713336184147&cookie=ID%3Da17ef48e823e6627%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MY20KDMmAY5MP3sMYIZndoHFyvxhg&gpic=UID%3D00000d6b0028013d%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MZ7af9EvfEMcTpwOjK9LSfd-RfFCQ&scor=3968881391553945&ged=ve4_td21_tt0_pd21_la21000_er271.162.427.462_vi0.0.873.1064_vp100_eb24171",!0);var KR=function(e){var n=this,r=e.handler,i=e.timeout,a=e.interval,s=r||function(){return t(this,n),!0}.bind(this),o=i||1e3,c=a||10;return new Promise(function(e,i){var a=this;if(t(this,n),r())e(!0);else{var d=!1,u=setInterval(function(){t(this,a);try{s()&&(clearInterval(u),d=!0,e(!0))}catch(t){clearInterval(u),e(!1)}}.bind(this),c);setTimeout(function(){t(this,a),clearInterval(u),d||e(!1)}.bind(this),o)}}.bind(this))};function YR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function JR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZR(e){var n=e.gameData,r=e.msgrt,i=e.topDomain,a=e.parentDomain,s=e.parentURL;return{send_atom_event:function(e,o){if(function(e){var r=this,i=n.dbglg;return(null==i?void 0:i.enabled)&&i.topics&&i.topics.some(function(n){return t(this,r),n===e}.bind(this))}(e)){var c={gid:n.slug,md5:n.gameId,pid:0,pnm:n.pname,ctry:n.ctry,lcl:"en",hle:1,ads:1,args:o,href:window.location.href},d=(new C_).get();return c=JR(JR({},c),d),function(e,t){try{var n=r._layout,o=r._ua,c={tp:e,ct:0,vrs:cs.version,url:s,rfr:document.referrer,tdmn:i||a,dpth:0,args:t,ua:{brnm:o.browser.name,brvs:o.browser.version,osnm:o.os.name,osvs:o.os.version,dvmd:o.device.model,w:n.w,h:n.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(c)))))}catch(e){}}(e,c=o?JR(JR({},c),o):c)}}}}function XR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var eT=q(),tT=null,nT=null,rT=function(){function n(e){var r,i,a,s,o=this;if(R(this,n),T(this,"_whichFrameV2",function(){var e=this;t(this,o);var n=C(window.location.href,!0),r=n.host,i=n.query,a="html5.gamedistribution.com"!==r,s=function(n){return t(this,e),"revision.gamedistribution.com"===n||"uncached-html5.gamedistribution.com"===n}.bind(this),c=s(r);null!=i&&i.gd_sdk_referrer_url&&(c=s(C(i.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||c?"loader-frame":"game-frame"}.bind(this)),tT)return tT;tT=this,this.isOpusReady=!1,this.isMidrollPlusExecuted=!1,this.blockedAdsMap={},this.blockingDetectedKey="d8d9b9b63e704668a29559970c1818be",this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new C_,this._location.print();var c=this._location.get(),d=(null==c||null===(r=c.top)||void 0===r||null===(i=r.domain)||void 0===i?void 0:i.value)||(null==c||null===(a=c.partner.domain)||void 0===a?void 0:a.value),u=null==c||null===(s=c.partner.url)||void 0===s?void 0:s.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||u,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||d,ls("locs found:",this._topDomain,this._parentURL),this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,function(e){LS.apply(this,arguments)}({whichFrame:this._whichFrameV2(),options:{showAd:this.showAd.bind(this),onEvent:this._onEvent.bind(this)}}),this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,o),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,o),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i,a=this;if((t(this,o),null===(e=this._gameData)||void 0===e||null===(n=e.directTokenUse)||void 0===n?void 0:n.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new ZR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(r=this._gameData.lp)||void 0===r?void 0:r.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(i=this._gameData.evnts)&&void 0!==i&&i.enabled&&this._isLoaderGameURL()&&(vS(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),jR.init(this),this._send_gametag_data("sdk_init"),this.fixScore()}.bind(this)),this._registerSGBridge(),ls("which-frame",this._whichFrame()),this._loadLocus()}var i,A,v,b,_,O,P,B,L,M,F,j,N,q,H,V,Q,z,W,K,Y,J;return S(n,[{key:"_getVisitorId",value:(J=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,KR({handler:function(){return t(this,c),!!nT}.bind(this),timeout:1e3,interval:10});case 2:return s=e.sent,o=s?null===(n=nT)||void 0===n||null===(i=n.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId:"noVisitorId",e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)}))),function(){return J.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(Y=e(r.mark((function e(){var n,i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,y,_,w,k,E,x,D,S,R=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=this._gameData)||void 0===n||null===(i=n.gs_trc)||void 0===i?void 0:i.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:d=e.sent,u=this._gameData,l=u.category,h=u.dname,p=u.pname,f=u.gameId,m=u.slug,g=u.title,A=u.ctry,v=this._topDomain||this._parentDomain,b=new C_,y=b.get(),_=this.msgrt._ua,w=document.referrer,k=this.msgrt._layout,E=cs.version,x=(null===(a=this._gameData)||void 0===a||null===(s=a.gft)||void 0===s?void 0:s.midroll.enabled)||!1,D=(null===(o=this._gameData)||void 0===o||null===(c=o.midroll_plus)||void 0===c?void 0:c.enabled)||!1,S={args:{rfr:w,category:l,dname:h,pname:p,gameId:f,slug:m,title:g,ctry:A,domain:v,loc:y,ua:_,layout:k,version:E,visitorId:d,hasGft:x,hasMp:D},onError:function(e){t(this,R),this._sendSDKError(e)}.bind(this)},JS(S);case 20:case"end":return e.stop()}}),e,this)}))),function(){return Y.apply(this,arguments)})},{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(t(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var n=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];n&&n.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(K=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=u()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return K.apply(this,arguments)})},{key:"_loadCMP",value:(W=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(i=new C_,0!==(null==(a=i.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(s=this._gameData)||void 0===s||null===(o=s.cmp)||void 0===o||!o.checkDepthOnly){e.next=9;break}return e.next=7,lS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,lS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return W.apply(this,arguments)})},{key:"testConsent",value:function(){try{iS();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aS({});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})))()}catch(e){console.log("find CMP error",e)}}},{key:"_sendLoaderDataEvent",value:function(){try{this.options.onLoaderEvent&&this.options.onLoaderEvent({name:"LOADER_DATA",message:{game:this._gameData,bridge:this._bridge},status:this._sdk_ready?"success":"error"})}catch(e){}}},{key:"_registerSGBridge",value:function(){var e=this;hS.on("splash-hidden",function(n){t(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(e){if(this._isLoaded||(this._isLoaded={}),!this._isLoaded[e]){this._isLoaded[e]=!0;var t="loader-frame"===this._whichFrame()&&(this._isHostHTML5Domain()||this._isExternalHoster());C(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{ls("which-frame, sending tunnel event",this._whichFrame()),this._sendTunnlEvent(e),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(z=e(r.mark((function e(n,i){var a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6:return this._bridge.isCoreSDKMode=(null===(a=this._gameData.disableAds)||void 0===a?void 0:a.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==(null===(s=this._gameData.diagnostic)||void 0===s?void 0:s.close_ads)&&!1!==(null===(o=this._gameData.diagnostic)||void 0===o?void 0:o.close_ads)||(this.videoAdReady=this._initializeVideoAd().then(function(){t(this,c),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"})),this._checkAdBlockerRemoval()}.bind(this)).catch(function(e){t(this,c);var n="".concat(e).startsWith("Error: Blocked:");hs("gd-adflow adsBlocked",n,e);var r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(this.adsBlocked=!i&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var s=i||a?i?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(s)})}this._sendSDKError(e),this._checkAdBlocker(),console.error(e.message||e)}.bind(this))),e.next=15,hR();case 15:n(this._gameData),e.next=23;break;case 18:e.prev=18,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 23:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(e,t){return z.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_checkAdBlockerRemoval",value:function(){m.getBoolean(this.blockingDetectedKey)&&(m.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(Q=e(r.mark((function e(){var t,n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.get_ad_system_init_result(),n=t.ima,i=t.afg,n&&i){e.next=12;break}if(m.set(this.blockingDetectedKey,!0),null===(a=this._gameData.rmblck)||void 0===a||!a.enabled){e.next=12;break}if(this.adBlockerPage){e.next=12;break}return e.next=9,NR();case 9:s=e.sent,this.adBlockerPage=new s(this._gameData),this.adBlockerPage.add();case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log(e.t0.message);case 17:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(){return Q.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=U(e);this.options=t?h(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=cs.version,t=console.log("%c %c %c GameDistribution.com HTML5 SDK | Version: "+e+" %c %c %c","background: #9854d8","background: #6c2ca7","color: #fff; background: #450f78;","background: #6c2ca7","background: #9854d8","background: #ffffff");console.log.apply(console,t)}}},{key:"_shouldSendTunnlEvent",value:function(e){return this.tunnlEventCounts||(this.tunnlEventCounts={}),this.tunnlEventCounts[e]||(this.tunnlEventCounts[e]=0),this.tunnlEventCounts[e]++,1===this.tunnlEventCounts[e]}},{key:"_sendTunnlEvent",value:function(e){var n=this;if(this._shouldSendTunnlEvent(e)){void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var r={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://hlana.gamedistribution.com/event?".concat(G.stringify(r))).catch(function(i){t(this,n),this._sendHLAnalyicsLog({query:$R($R({},r),{},{error:null==i?void 0:i.message}),eventType:-e})}.bind(this)),this._sendHLAnalyicsLog({query:r,eventType:e}),this.adInstance._send_atom_event("hl.config",r),this._send_gametag_data("sdk_gameplay")}}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=e.query,r=e.eventType;if(1===r?t="hl.gameplay":2===r?t="hl.gameload":3===r?t="hl.adblock":-1===r?t="hl.gameplay.error":-2===r?t="hl.gameload.error":-3===r&&(t="hl.adblock.error"),t)try{this.dumper.send_atom_event(t,n)}catch(e){console.log("Error on sending dump!",e)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=c("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,p("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!m.available)return;"developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._topDomain?(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0),m.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0)),m.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new l({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:o(),version:cs.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:u(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var n=[this._gameData.gmky.url];f(n[0],"GamedockSDK",{alternates:n}).then(function(){var n,r;t(this,e),nT=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&nT.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),sS.track(nT,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=nT)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),f(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_loadLocus",value:function(){var n=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus/"],window.gdlocus=window.gdlocus||{cmd:[]},window.gdlocus.cmd.push(function(){t(this,i),this.isOpusReady=!0,window.gdlocus.iservice.register({method:"muteAdFlow",handler:this._muteFlowSound.bind(this)}),window.gdlocus.iservice.register({method:"terminateAdFlow",handler:this._terminateFlow.bind(this)})}.bind(this)),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this)).then(function(){t(this,i)}.bind(this));case 10:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_muteFlowSound",value:(V=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.mute();case 3:case"end":return e.stop()}}),e,this)}))),function(){return V.apply(this,arguments)})},{key:"_terminateFlow",value:(H=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.terminate();case 3:case"end":return e.stop()}}),e,this)}))),function(){return H.apply(this,arguments)})},{key:"_loadGoogleAnalytics",value:function(){var e=this;if(!this._bridge.isCoreSDKMode){var n=this._gameData,r=n.gameId,i=n.slug,a=n.title,s=new C_,o={provider:"gd-sdk",page_depth:s.get("depth.value"),partner_domain_from:s.get("partner.domain.from"),top_domain_from:s.get("top.domain.from"),top_domain:this._topDomain,parent_domain:this._parentDomain,parent_url:this._parentURL,game_id:r,game_slug:i,game_title:a};zR({onError:function(n){t(this,e),this._sendSDKError(n)}.bind(this),args:o})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new C(e,!0);t="".concat(n.protocol,"//").concat(n.hostname,"/").concat(n.pathname)}catch(e){}return t}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new y,w.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),k.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){t(this,e);var n=this._getDeveloperDomains(),r=n.developerDomain,i=n.gameApiDomain;if(r){fetch("https://".concat(i,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}UD()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),PD(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&sS.track(nT,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(n){t(this,e),this.msgrt.send("ad.error",{message:n.message,details:n.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(n){t(this,e),this._sendAdRequestContext(n.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(n){if(t(this,e),n.message.startsWith("Blocked:")){var r=n.message.replace("Blocked:","").trim(),i=this._getCleanUrl(r),a="Blocked: ".concat(i);if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:a}),!this._hasBlocker)){this._hasBlocker=!0;this.msgrt.send("adblck.src",{message:a});var s=this.get_ad_system_init_result(),o=s.ima,c=s.afg;(!o||!c)&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:n.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(n){t(this,e),this.msgrt.send("tunnl.keys.empty",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(n){t(this,e),this.msgrt.send("tunnl.keys.fallback",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(n){return t(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Please check if your GAME ID is correct. Otherwise, no revenue will be reported.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain,t=rw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(cs.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(q=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,i=this._parentDomain.indexOf("gamedistribution.com")>=0,t=(t=void 0===this._gameData.dmain||this._gameData.dmain)||i,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking(!1,!t);case 7:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new C_,i="html5.gamedistribution.com"!==C(document.referrer).host,a=n&&!GR.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&i;if(a&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,c=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===c?this._redirectToLoaderFrame():"to-blocked-page"===c&&this._redirectToBlocking(!0)}return{blocked:a}}},{key:"_redirectToBlocking",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.msgrt.send("blocked");var a=this._gameData;setTimeout(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=9;break}return e.prev=1,e.next=4,n.adInstance._send_atom_event("token-blocked");case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log("Could not send dump.token-blocked",e.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(G.stringify({domain:n._parentDomain,id:a.gameId,img:n._get_game_thumbnail_url(),title:a.title,unregistered:i,utm_source:n._parentDomain,utm_medium:(null==a?void 0:a.slug)||(null==a?void 0:a.title)||(null==a?void 0:a.gameId)||"unknown",utm_campaign:"block-and-redirect"}));case 10:case"end":return e.stop()}}),e,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var t=this,n=this._gameData;setTimeout(e(r.mark((function e(){var i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.adInstance._send_atom_event("loader-redirect");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("Could not send dump.loader-redirect",e.t0);case 8:i=C(location.href,!0),a=$R($R({},i.query),{},{rd:"1"}),s=G.stringify(a),o="https://html5.gamedistribution.com/".concat(n.gameId,"/?").concat(s),window.location.href=o;case 13:case"end":return e.stop()}}),e,null,[[0,5]])}))),100)}},{key:"_checkGameDeleted",value:function(){var e=this;6!==this._gameData.status&&4!==this._gameData.activeStatus||(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){t(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;QD().disableMidrolltimer?e.midroll=0:m.available&&m.getBoolean("gd_debug_ex")&&(m.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var i,a=this._gameData,s=a.gdpr&&!0===a.gdpr.consent,o=a.loader,c=null===(t=a.promo)||void 0===t?void 0:t[null===(n=a.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=c&&c.enabled?this._createPromoBeforeSplash(a,s):o.enabled&&!0!==(null===(i=o.splash)||void 0===i?void 0:i.skip)?this._createSplash(a,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=c&&c.enabled?this._createPromoBeforeSplash(a,s):!1!==o.enabled&&this._createSplash(a,s):null!=c&&c.enabled&&this._createPromo(a,s))}},{key:"_initializeVideoAd",value:(N=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=h(this.options.advertisementSettings,t.sdk)),this.macros=new E({game:t,bridge:this._bridge}),this.adInstance=new ZD(this.options.flashSettings.adContainerId,this.options.advertisementSettings,{parentURL:this._parentURL,parentDomain:this._parentDomain,topDomain:this._topDomain}),this.adInstance.gameId=t.gameId,this.adInstance.category=t.category,this.adInstance.tags=t.tags,this.adInstance.noPreroll=this._bridge.noPreroll,this.adInstance.macros=this.macros,this.adInstance.gameData=t,this.adInstance.msgrt=this.msgrt,this.adInstance.PackageJSON=cs,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return N.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"IscForwardOnEvent",value:(j=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,NS();case 4:if(!(i=e.sent)){e.next=14;break}return e.next=8,i.isLoader();case 8:if(o=e.sent,!((null===(a=this._gameData)||void 0===a||null===(s=a.isv_fw)||void 0===s?void 0:s.enabled)&&o&&i.onEvent)){e.next=14;break}return n=!0,i.onEvent({event:t}),e.abrupt("return",n);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),ls("[GD-IS] error on onEvent forward",e.t0);case 19:return e.abrupt("return",n);case 20:case"end":return e.stop()}}),e,this,[[1,16]])}))),function(e){return j.apply(this,arguments)})},{key:"_onEvent",value:(F=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.IscForwardOnEvent(t);case 2:if(!e.sent){e.next=5;break}return e.abrupt("return");case 5:if(ls("[GD-IS] onEvent executing",{event:null==t?void 0:t.name,e:t,location:window.location.href}),p(t.name,t.message,t.status),!t.skipForward){e.next=9;break}return e.abrupt("return");case 9:hs("[developer-event]",t.name);try{this.options.onEvent({name:t.name,message:t.message,status:t.status,skipForward:t.skipForward,adPosition:t.adPosition})}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}case 11:case"end":return e.stop()}}),e,this)}))),function(e){return F.apply(this,arguments)})},{key:"_getGameData",value:(M=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return t=e.sent,this.msgrt.setGameData(t),x(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return M.apply(this,arguments)})},{key:"_createSplash",value:(L=e(r.mark((function n(i,a){var s,o,c,d,u=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this._getSplashTemplate(i);case 2:return s=n.sent,o=new s($R($R({},this.options),{},{isConsentDomain:a,version:cs.version}),i,this._parentDomain),n.next=6,_w();case 6:c=n.sent,d=c.enabled,o.on("playClick",function(){var n,s,c,l=this;if(t(this,u),((null===(n=window.gdlocus)||void 0===n?void 0:n.firstUserAction)||e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("gd-adflow locus-first-user-action is not defined");case 1:case"end":return e.stop()}}),e)}))))({game_id:i.gameId}).catch(function(e){t(this,l),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),a){var h=new Date;h.setDate(h.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(h.toUTCString(),"; path=/")}if(this._hideCMPButton(),$S("play"),d)window.gdsdk.showAd(g.Interstitial,{position:"preroll"}).catch(function(e){t(this,l),o.hide()}.bind(this));else{var p={position:"preroll"};(function(){t(this,l),fs.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),p.adapter="adsense")}).bind(this),this.showAd(g.Interstitial,p).catch(function(e){t(this,l)}.bind(this))}null!==(s=this._gameData)&&void 0!==s&&null!==(c=s.evnts)&&void 0!==c&&c.enabled&&(bS({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){t(this,u),o.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,u),o.hide()}.bind(this));case 12:case"end":return n.stop()}}),n,this)}))),function(e,t){return L.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(B=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o($R($R({},this.options),{},{isConsentDomain:i,version:cs.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.hide(),this._createSplash(n,i)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return B.apply(this,arguments)})},{key:"_createPromo",value:(P=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o($R($R({},this.options),{},{isConsentDomain:i,version:cs.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return P.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(g.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(O=e(r.mark((function e(t){var n,i,a,s,o,c,d,u=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:{},s={forwarded:i=!1,result:a},e.prev=3,null===(o=this._gameData)||void 0===o||null===(c=o.isv_fw)||void 0===c?void 0:c.enabled){e.next=7;break}return e.abrupt("return",s);case 7:return e.next=10,NS();case 10:if(d=e.sent){e.next=13;break}return e.abrupt("return",s);case 13:return e.next=16,d.isLoader();case 16:if(e.sent||!d.hasRouter()){e.next=23;break}return hs("[GD-IS] forwarding ad call",{location:window.location.href}),i=!0,e.next=22,d.showAd({adType:t,params:n});case 22:a=e.sent;case 23:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(3),ls("[GD-IS] error on showAd forward",e.t0);case 29:return e.abrupt("return",{forwarded:i,result:a});case 30:case"end":return e.stop()}}),e,this,[[3,26]])}))),function(e){return O.apply(this,arguments)})},{key:"showAd",value:(_=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,c,d,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.IscForwardShowAd(n,i);case 3:if(c=e.sent,d=c.forwarded,u=c.result,!d){e.next=9;break}return t(u),e.abrupt("return");case 9:if($S("play"),l={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},!a._autoResumeIfAdsAreDisabled(tR(l))){e.next=15;break}return e.abrupt("return",t());case 15:return e.next=18,a.sdkReady;case 18:return h=e.sent,e.next=21,a.videoAdReady;case 21:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(1),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:h,adRequest:l}),a._rejectAdIfAdDisabled({gameData:h,adRequest:l}),a._rejectAdIfUnsupportedType({adRequest:l}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||null!=i&&i.isCompensation||a._rejectAdIfAdRateHits({gameData:h,adRequest:l}),i&&(i.isGift||i.isMidrollPlus||i.isCompensation)||!a.adBlockerPage||(a._setAdRequestTimer(),a.adBlockerPage.show()),a.adInstance.attachAfgPosition(l),!a.adFlowRunning){e.next=32;break}return e.abrupt("return",t());case 32:return a.adFlowRunning=!0,p=new OR(a),a._adFlow=p,e.next=37,p.runAdFlow(l);case 37:f=e.sent,a.adFlowRunning=!1,a._adFlow=null,t(f),a._post_message({topic:"adrequest.instream"}),e.next=51;break;case 44:e.prev=44,e.t0=e.catch(0),a.adFlowRunning=!1,a._adFlow=null,a.onAdError(e.t0.message),a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 51:case"end":return e.stop()}}),e,null,[[0,44]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return _.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t,n=!1,r=null===(t=this._gameData.diagnostic)||void 0===t?void 0:t.close_ads,i=this._gameData.disableAds[e],a=r||i;return ls("gd-adflow autoresume result: adModuleDisabled,adDisabled",r,i,e,this._gameData.diagnostic,this._gameData.disableAds),a&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e=this,n="CONTENT_PAUSE_REQUESTED",r="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(n,{name:n,message:"Auto pause when ads are disabled"}),setTimeout(function(){t(this,e),this.eventBus.broadcast(r,{name:r,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}.bind(this),3e3)}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s,o,c,d,u,l,h,p,f,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(i=r.gft)||void 0===i||null===(a=i[e].durations[this._giftCount[e]])||void 0===a?void 0:a.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(c=this._gameData)||void 0===c||null===(d=c.gft)||void 0===d||null===(u=d[e].durations[this._giftCount[e]])||void 0===u?void 0:u.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(p=this._gameData)||void 0===p||null===(f=p.gft)||void 0===f||null===(m=f[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=tR(e.adRequest);if(t.disableAds[n]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==g.Interstitial&&t.adType!==g.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=g.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===g.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,c=e.adRequest,d=null;c.adType===g.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(d=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):d=o.midroll;if(c.adType===g.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<d)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(b=e(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,a){var s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.sdkReady;case 3:return s=e.sent,e.next=6,i.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[n]&&!i._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(n,"..."));case 10:if(n){e.next=14;break}n=g.Rewarded,e.next=16;break;case 14:if(n===g.Interstitial||n===g.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:if(!i.adInstance){e.next=22;break}return e.next=19,i.adInstance.preloadAd(n);case 19:e.t0=e.sent,e.next=23;break;case 22:e.t0="gdsdk://preloaded";case 23:o=e.t0,t(o),e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),a(e.t1);case 30:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return b.apply(this,arguments)})},{key:"cancelAd",value:(v=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(bS({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(bS({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new D(this).start(),m.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var n=this._gameData;n.sdk.fullscreen&&"auto"===n.sdk.fullscreen&&document.addEventListener("click",function(){if(t(this,e),!this._isFullScreen){var n=document.body,r=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullscreen;if(r)r.call(n);else if(void 0!==window.ActiveXObject){var i=new ActiveXObject("WScript.Shell");null!==i&&i.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var n=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){t(this,n),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_shouldAllowExternalUrl",value:function(e){var n,r=this,i=new C(e),a=i.host;return i.href,((null===(n=this._gameData.urlBlockExc)||void 0===n?void 0:n.hosts)||[]).some(function(e){return t(this,r),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var n=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var r=this;t(this,n);var i=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var s=e.getAttribute("href");e.removeAttribute("href"),i||(e.onclick=function(e){return t(this,r),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(s)}),!1}.bind(this))}}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:v,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:A,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:c===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isHostHTML5Domain",value:function(){var e=new C(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_checkTokenGameUrl",value:function(){var e=C(location.href),t=e.origin,n=e.pathname,r="".concat(t).concat(n);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(r)}},{key:"_isTokenGameURL",value:function(){var e,t=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i,n="1"===(null===(e=C(location.href,!0).query)||void 0===e?void 0:e.rd);return t.test(location.href)||!n&&t.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new C(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new C(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new C(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new $D(t).splash()}},{key:"_createPrerollPromoTemplate",value:(A=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new XD(s),e.abrupt("return",o.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new C(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(G.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new C(e,!0);return n.query=$R($R({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)nT.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,n=this._gameData,r=n.assets.find(function(n){return t(this,e),n.hasOwnProperty("name")&&512===n.width&&512===n.height}.bind(this));return r||(r=n.assets.length>0?n.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(r.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,i=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var a=window.top||window.parent;a&&a.postMessage({source:"gdsdk",topic:n,data:r},i)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"fixScore",value:function(){var e,n,r,i,a=this;if(null===(e=this._gameData)||void 0===e||null===(n=e.fix_score)||void 0===n?void 0:n.enabled){var s=(null===(r=this._gameData)||void 0===r||null===(i=r.fix_score)||void 0===i?void 0:i.wait)||10;setTimeout(function(){var e=this;t(this,a),this.showAd(g.Interstitial,{position:"midroll"}).catch(function(n){t(this,e)}.bind(this))}.bind(this),1e3*s)}}},{key:"executeCompensation",value:(i=e(r.mark((function n(i){var a,s,o,c,d,u,l=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(null==i?void 0:i.whenAvailable)||!1,s=!this.adInstance.requestRunning&&!this.adFlowRunning,o=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.showAd(g.Interstitial,{position:"midroll",isCompensation:!0});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),!s){n.next=10;break}return n.next=7,o();case 7:return c=n.sent,n.abrupt("return",c);case 10:if(!a){n.next=17;break}return d=!1,n.next=15,new Promise(function(n,i){var a=this;t(this,l);var s=!1,c=setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.adInstance.requestRunning||a.adFlowRunning){e.next=19;break}return clearInterval(c),e.prev=4,e.next=7,o();case 7:t=e.sent,s=!0,n(t),d=!0,e.next=19;break;case 14:e.prev=14,e.t0=e.catch(4),ls("[compensation] execution error after became available",e.t0),n({err:e.t0,success:!1}),d=!0;case 19:case"end":return e.stop()}}),e,null,[[4,14]])}))),1e3);setTimeout(function(){t(this,a),s||d||n({success:!1})}.bind(this),6e4)}.bind(this));case 15:return u=n.sent,n.abrupt("return",u);case 17:case"end":return n.stop()}}),n,this)}))),function(e){return i.apply(this,arguments)})},{key:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o="gift";if(!fR({rateType:o,gameData:this._gameData}))return void ls("[compensation] rate check did not pass for ".concat(o));ls("[compensation] rate check passed for ".concat(o));var c=setInterval(e(r.mark((function e(){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.adInstance.requestRunning||i.adFlowRunning?console.log("Advertisement already running..."):(ls("gd-adflow WILL GIVE GIFT!!!"),i.showAd(g.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(c),i._giftCount[n]++);case 1:case"end":return e.stop()}}),e,this)}))),1e3*s.durations[this._giftCount[n]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return eT}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._topDomain?e=this._topDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,n=this;if(fR({rateType:"midroll+",gameData:this._gameData})&&null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&!this.isMidrollPlusExecuted){var r;this.isMidrollPlusExecuted=!0;var i=this._gameData.midroll_plus.type||"midroll";if(null!==(r=this._gameData.midroll_plus)&&void 0!==r&&r.interval)var a=setInterval(function(){var e,r,s=this;(t(this,n),this.adFlowRunning)||(this.showAd(g.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(e){t(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(r=this._gameData.midroll_plus)||void 0===r?void 0:r.interval)&&clearInterval(a))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;t(this,n),this.showAd(g.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function iT(){return(iT=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus/"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var aT=new M,sT=function(e){var n=this;!function(){iT.apply(this,arguments)}();var r,i=function(e){var r=this;return t(this,n),new Promise(function(n,i){var a=this;t(this,r);var s=function(e){t(this,a),"SDK_GAME_START"===e.name&&(aT.off("sdk-event",s),n())}.bind(this);aT.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new rT(e)),r}.bind(this),s=function(e){return t(this,n),i(e)}.bind(this),o=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),c=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),d=function(){return t(this,n),m("cancelAd")}.bind(this),u=function(){return t(this,n),m("openConsole")}.bind(this),l=function(){return t(this,n),m("showBanner")}.bind(this),h=function(){return t(this,n),m("session")}.bind(this),p=function(e){return t(this,n),m("sendGenericEvent",{options:e})}.bind(this),f=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),m=function(e,r){var i=this;return t(this,n),r||(r={}),new Promise(function(n,a){t(this,i);try{var s={type:"gd-sdk",method:e,options:r};window.parent.postMessage(s,"*"),n()}catch(e){console.log("gd:adp:m:s:error",e),n()}}.bind(this))}.bind(this),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&v(r)}),!1)}.bind(this),A=function(){t(this,n),g(),m("init")}.bind(this),v=function(r){t(this,n);try{aT.emit("sdk-event",r),e.onEvent&&e.onEvent(r)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:c,cancelAd:d,openConsole:u,getSession:h,onEvent:v,init:A,_sendSDKReady:f,sendGenericEvent:p}},oT=function(e){var t=sT(e);return t.init(),t},cT=function(){var e=this,n=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),r=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),i=function(){t(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){t(this,e);var i="html5.gamedistribution.com"!==C(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},dT="gd-sdk-frame-handshake-request",uT="gd-sdk-frame-handshake-response",lT=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:dT},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===dT){var o={type:uT};i.postMessage(o,r)}else a===uT&&(s=!0,e({origin:r,source:i}))})),setTimeout(function(){t(this,i),s||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},hT=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vw();case 2:return t=e.sent,e.next=6,lT();case 6:if(n=e.sent,GR.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=cT(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,yw();case 14:return o=e.sent,c=!1,c=o?!s&&!!n:!s,e.abrupt("return",c);case 18:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),pT=nt,fT=le,mT=ns,gT=Ji,AT=fT(Vi.f),vT=fT([].push),bT=function(e){return function(t){for(var n,r=gT(t),i=mT(r),a=i.length,s=0,o=[];a>s;)n=i[s++],pT&&!AT(r,n)||vT(o,e?[n,r[n]]:r[n]);return o}},yT={entries:bT(!0),values:bT(!1)}.values;$a({target:"Object",stat:!0},{values:function(e){return yT(e)}});var _T,wT={},kT=function(e){try{if(e.skipForward)return void ls("gd-adflow fw-skip-forward",e);if(ls("gd-adflow fw-forwarding",e),wT.source){var t={type:"gd-sdk-on-event",event:e};wT.source.postMessage(t,wT.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},ET=function(){kT({name:"SDK_READY",status:"success",message:"Everything is ready."}),kT({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),kT({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},xT=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,c=a.type,d=a.method,u=a.options;if("gd-sdk-self"!==c){if("gd-sdk"===c){if(!wT.source&&"init"===d)return function(e){var t=e.source,n=e.origin;wT={source:t,origin:n}}({source:o,origin:s}),void ET();var l=n[d];l&&e(r.mark((function e(){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,function(){t(this,a),"showAd"===d&&fs.firstAdapterModeAdsense&&"rewarded"!==u.adType&&(console.log("promo-test, set first adapter to adssense 3"),u.params=u.params?u.params:{},u.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(u)))||!i.then){e.next=6;break}return e.next=6,i;case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("gd:adp:m:r onFrameMessage error",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))()}}else{var h={type:"gd-sdk",method:d,options:u};window.postMessage(h,location.origin)}}),!1)},DT=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){kT(e),t.apply(this,arguments)}}(e);var t=new rT(e);return xT(t),t},ST=function(){function t(){R(this,t),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},ZA(this.moduleName,this.moduleConfig)}var n,i;return S(t,[{key:"load",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,$A(this.moduleName);case 3:this.module=e.sent,ls("aeria module load success",this.module),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return i.apply(this,arguments)})},{key:"runYMenu",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}(),RT=function(){var t=e(r.mark((function t(){var n,i,a,s,o,c,d,u,l,h,p,f,m,g,A,v;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new C_).get("partner.domain.value")||e.get("top.domain.value");return{isAeriaDomain:"minigame.aeriagames.jp"===t||"minigame-stg.aeriagames.jp"===t,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===t}}(),i=n.isAeriaDomain,a=n.isAeriaStagingDomain,!i){t.next=21;break}return c=function(){var e=(new C_).get("partner.url.value");return new C(e,!0)},d=function(){var e="ae-soft-323";try{var t=c(),n=t.pathname,r=n.split("/"),i=r[r.length-1];hs("aeria-ylogin:loc",t,n,i),e=i}catch(e){ps("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:d,score:100},env:a?"staging":"production",system:"Softgames"},l=function(){var e=window.parent||window,t=u;e.postMessage(t,"*")},h=new y,t.next=13,fw();case 13:p=t.sent,f=null==p||null===(s=p.aeria)||void 0===s?void 0:s.yMenuExcluded,m=null==p||null===(o=p.aeria)||void 0===o?void 0:o.yLoginExcluded,h.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(m||l())})),g=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new ST).runYMenu({gameId:d});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),A=cT(),v=A.whichFrame,"game-frame"===v()&&(f||g());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),TT=function(e){try{var t=X_(e);e.gameId||t.send("nogameid",{message:"".concat(mb.parentURL)})}catch(e){}},CT=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,RT();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),IT={create:function(){var t=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,TT(t),pw(t),e.next=5,hT();case 5:return n=e.sent,e.next=8,CT();case 8:return window.isForwarderFrame=n,i=n?oT(t):DT(t),ww(),e.abrupt("return",i);case 14:return e.prev=14,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",DT(t));case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(e){return t.apply(this,arguments)}}()};function OT(){return(OT=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,UT(t);case 9:e.t0=e.sent;case 10:return i=e.t0,e.abrupt("return",n(i));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var PT,BT,LT=!1;function UT(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),_T)return r(_T);if(LT)var s=setInterval(function(){t(this,a),_T&&(LT=!1,clearInterval(s),r(_T))}.bind(this),100);else LT=!0,IT.create(e).then(function(e){t(this,a),_T=e,e._sendSDKReady(),LT=!1,r(_T)}.bind(this))}.bind(this))}function MT(e){return UT(e),{invoke:function(t){return function(e,t){return OT.apply(this,arguments)}(e,t)}}}function FT(n,i){var a=this;return new Promise(function(s,o){var c,d=this;t(this,a);var u=function(e){var t="https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js";return e&&(t="https://pm.azerioncircle.com/@bygd/gd-sdk-wrp/".concat(e,"/dist/default/iife/index.js")),[t]}(null==i||null===(c=i.game)||void 0===c?void 0:c.version);jT({text:"sdk-wrapper-script-load"}),f(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){t(this,d),jT({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),o(e)}.bind(this)).then(e(r.mark((function e(){var t,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,jT({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,jT({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:BT=e.sent,jT({text:"sdk-wrapper after gdSdkWrp.init"}),s(BT),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),jT({text:"sdk-wrapper load error 2",error:e.t0.message}),o(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,12]])}))))}.bind(this))}function jT(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(t))))),console.log(H(Object.values(e)))}catch(e){}}function GT(e){if(e){var t=e.name,n=e.message,r=e.status;try{jT({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!PT}),PT&&PT.onEvent({name:t,message:n,status:r})}catch(t){jT({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function NT(e){return qT.apply(this,arguments)}function qT(){return(qT=e(r.mark((function e(t){var n,i,a,s,o,c,d,u,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return PT=t,pw(t),e.next=4,fw();case 4:if(s=e.sent,!BT){e.next=7;break}return e.abrupt("return",BT);case 7:if(o=null==s||null===(n=s.sdk_wrp)||void 0===n?void 0:n.enabled,c=null==s||null===(i=s.sdk_wrp)||void 0===i?void 0:i.version,d=null==s?void 0:s.gameId,u=null==s?void 0:s.title,VT("isWrapEnabled ".concat(o)),o){e.next=14;break}return e.abrupt("return");case 14:return l=null==s||null===(a=s.sdk_wrp)||void 0===a?void 0:a.wrapper,e.next=17,FT(l,{onEvent:GT,game:{gameId:d,title:u,version:c}});case 17:return BT=e.sent,e.abrupt("return",BT);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function HT(){return HT=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,VT("beforeGetDeveloperSettings"),i=n(),VT("afterGetDeveloperSettings"),e.prev=4,e.next=7,NT(i);case 7:a=e.sent,VT("after get SDK wrapper: ".concat(!!a)),a&&(VT("setting SDK Wrapper as gd-sdk"),window.sdkWrapper=a,window.gdsdk=a,window.gdApi=window.gdsdk),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Error on SDK wrapper init",e.t0),VT("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),HT.apply(this,arguments)}function VT(e){window.sdkLog.push(e)}function QT(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":n(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===n(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}window.sdkLog=[],"img.samsungapps.com"===function(){var e,t,n=C(window.location.href,!0),r=n.host,i=n.query,a=r,s=null==i?void 0:i.gd_sdk_referrer_url;return s&&(s=s.startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),null!==(t=e=C(s,!0))&&void 0!==t&&t.host&&(a=e.host)),a}()?VT("skipped normal SDK init!"):(!function(){OD();var n=MT(QT());function i(){var i=this;this.AdType=g,this.preloadAd=function(){var i=e(r.mark((function e(i){var a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.invoke(function(e){return t(this,s),e.preloadAd(i)}.bind(this));case 2:return a=e.sent,hs("[developer-event] preloadAd check",a),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));return function(e){return i.apply(this,arguments)}}(),this.showAd=function(){var i=e(r.mark((function e(i,a){var s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.invoke(function(e){var n=this;if(t(this,o),i===g.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),fs.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),r.adapter="adsense")}.bind(this),e.showAd(i,r)}.bind(this));case 2:return s=e.sent,hs("[developer-event] after showAd",s),e.abrupt("return",s);case 5:case"end":return e.stop()}}),e,this)})));return function(e,t){return i.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return n.invoke(function(n){return t(this,e),n.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return n.invoke(function(n){return t(this,e),n.openConsole()}.bind(this))},this.getSession=function(){var e=this;return n.invoke(function(n){return t(this,e),n.session()}.bind(this))},this.sendEvent=function(e){var r=this;return n.invoke(function(n){return t(this,r),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){t(this,i),tv.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),tv.addScore(e)}.bind(this)}}i.prototype=new function(){this.showBanner=function(){var e=this;return n.invoke(function(n){return t(this,e),n.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new i,window.gdApi=window.gdsdk}(),VT("afterSDKInit")),function(e){HT.apply(this,arguments)}({_get_developer_sets:QT});
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/newArrowCheck";import n from"@babel/runtime/helpers/typeof";import r from"@babel/runtime/regenerator";import{parseJSON as i,getParentUrl as a,getParentDomain as s,getIframeDepth as o,getQueryParams as c,getTopDomain as d,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as g,Layers as A,getKeyByValue as v,getQueryString as b,EventBus as _,getIMASampleTags as y,SDKEvents as w,IMAEvents as k,Macros as E,setDankLog as x,ImplementationTest as D}from"@bygd/gd-sdk-era/dist/default";import S from"@babel/runtime/helpers/createClass";import R from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import C from"url-parse";import{Base64 as I}from"js-base64";import O from"validator";import P from"is-valid-domain";import B from"get-value";import L from"set-value";import U from"lodash.clonedeep";import{EventEmitter as M}from"events";import F from"can-autoplay";import{isPlainObject as j}from"is-plain-object";import G from"querystringify";import N from"lodash.merge";import{v4 as q}from"uuid";import H from"@babel/runtime/helpers/toConsumableArray";import V from"@fnet/inter-service-js";import Q from"@flownet/lib-connect-to-tcf";var z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},W=function(e){return e&&e.Math==Math&&e},K=W("object"==typeof globalThis&&globalThis)||W("object"==typeof window&&window)||W("object"==typeof self&&self)||W("object"==typeof z&&z)||function(){return this}()||Function("return this")(),Y={exports:{}},J=K,Z=Object.defineProperty,X=function(e,t){try{Z(J,e,{value:t,configurable:!0,writable:!0})}catch(n){J[e]=t}return t},$=X,ee="__core-js_shared__",te=K[ee]||$(ee,{}),ne=te;(Y.exports=function(e,t){return ne[e]||(ne[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var re,ie,ae=function(e){try{return!!e()}catch(e){return!0}},se=!ae((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),oe=se,ce=Function.prototype,de=ce.call,ue=oe&&ce.bind.bind(de,de),le=oe?ue:function(e){return function(){return de.apply(e,arguments)}},he=function(e){return null==e},pe=he,fe=TypeError,me=function(e){if(pe(e))throw fe("Can't call method on "+e);return e},ge=me,Ae=Object,ve=function(e){return Ae(ge(e))},be=ve,_e=le({}.hasOwnProperty),ye=Object.hasOwn||function(e,t){return _e(be(e),t)},we=le,ke=0,Ee=Math.random(),xe=we(1..toString),De=function(e){return"Symbol("+(void 0===e?"":e)+")_"+xe(++ke+Ee,36)},Se="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Re=K,Te=Se,Ce=Re.process,Ie=Re.Deno,Oe=Ce&&Ce.versions||Ie&&Ie.version,Pe=Oe&&Oe.v8;Pe&&(ie=(re=Pe.split("."))[0]>0&&re[0]<4?1:+(re[0]+re[1])),!ie&&Te&&(!(re=Te.match(/Edge\/(\d+)/))||re[1]>=74)&&(re=Te.match(/Chrome\/(\d+)/))&&(ie=+re[1]);var Be=ie,Le=Be,Ue=ae,Me=!!Object.getOwnPropertySymbols&&!Ue((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Le&&Le<41})),Fe=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,je=K,Ge=Y.exports,Ne=ye,qe=De,He=Me,Ve=Fe,Qe=je.Symbol,ze=Ge("wks"),We=Ve?Qe.for||Qe:Qe&&Qe.withoutSetter||qe,Ke=function(e){return Ne(ze,e)||(ze[e]=He&&Ne(Qe,e)?Qe[e]:We("Symbol."+e)),ze[e]},Ye={};Ye[Ke("toStringTag")]="z";var Je="[object z]"===String(Ye),Ze="object"==typeof document&&document.all,Xe={all:Ze,IS_HTMLDDA:void 0===Ze&&void 0!==Ze},$e=Xe.all,et=Xe.IS_HTMLDDA?function(e){return"function"==typeof e||e===$e}:function(e){return"function"==typeof e},tt={},nt=!ae((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),rt=et,it=Xe.all,at=Xe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:rt(e)||e===it}:function(e){return"object"==typeof e?null!==e:rt(e)},st=at,ot=K.document,ct=st(ot)&&st(ot.createElement),dt=function(e){return ct?ot.createElement(e):{}},ut=dt,lt=!nt&&!ae((function(){return 7!=Object.defineProperty(ut("div"),"a",{get:function(){return 7}}).a})),ht=nt&&ae((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),pt=at,ft=String,mt=TypeError,gt=function(e){if(pt(e))return e;throw mt(ft(e)+" is not an object")},At=se,vt=Function.prototype.call,bt=At?vt.bind(vt):function(){return vt.apply(vt,arguments)},_t=K,yt=et,wt=function(e,t){return arguments.length<2?(n=_t[e],yt(n)?n:void 0):_t[e]&&_t[e][t];var n},kt=le({}.isPrototypeOf),Et=wt,xt=et,Dt=kt,St=Object,Rt=Fe?function(e){return"symbol"==typeof e}:function(e){var t=Et("Symbol");return xt(t)&&Dt(t.prototype,St(e))},Tt=String,Ct=function(e){try{return Tt(e)}catch(e){return"Object"}},It=et,Ot=Ct,Pt=TypeError,Bt=function(e){if(It(e))return e;throw Pt(Ot(e)+" is not a function")},Lt=Bt,Ut=he,Mt=function(e,t){var n=e[t];return Ut(n)?void 0:Lt(n)},Ft=bt,jt=et,Gt=at,Nt=TypeError,qt=bt,Ht=at,Vt=Rt,Qt=Mt,zt=function(e,t){var n,r;if("string"===t&&jt(n=e.toString)&&!Gt(r=Ft(n,e)))return r;if(jt(n=e.valueOf)&&!Gt(r=Ft(n,e)))return r;if("string"!==t&&jt(n=e.toString)&&!Gt(r=Ft(n,e)))return r;throw Nt("Can't convert object to primitive value")},Wt=TypeError,Kt=Ke("toPrimitive"),Yt=function(e,t){if(!Ht(e)||Vt(e))return e;var n,r=Qt(e,Kt);if(r){if(void 0===t&&(t="default"),n=qt(r,e,t),!Ht(n)||Vt(n))return n;throw Wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),zt(e,t)},Jt=Rt,Zt=function(e){var t=Yt(e,"string");return Jt(t)?t:t+""},Xt=nt,$t=lt,en=ht,tn=gt,nn=Zt,rn=TypeError,an=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,on="enumerable",cn="configurable",dn="writable";tt.f=Xt?en?function(e,t,n){if(tn(e),t=nn(t),tn(n),"function"==typeof e&&"prototype"===t&&"value"in n&&dn in n&&!n[dn]){var r=sn(e,t);r&&r[dn]&&(e[t]=n.value,n={configurable:cn in n?n[cn]:r[cn],enumerable:on in n?n[on]:r[on],writable:!1})}return an(e,t,n)}:an:function(e,t,n){if(tn(e),t=nn(t),tn(n),$t)try{return an(e,t,n)}catch(e){}if("get"in n||"set"in n)throw rn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var un={exports:{}},ln=nt,hn=ye,pn=Function.prototype,fn=ln&&Object.getOwnPropertyDescriptor,mn=hn(pn,"name"),gn={EXISTS:mn,PROPER:mn&&"something"===function(){}.name,CONFIGURABLE:mn&&(!ln||ln&&fn(pn,"name").configurable)},An=et,vn=te,bn=le(Function.toString);An(vn.inspectSource)||(vn.inspectSource=function(e){return bn(e)});var _n,yn,wn,kn=vn.inspectSource,En=et,xn=K.WeakMap,Dn=En(xn)&&/native code/.test(String(xn)),Sn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Rn=tt,Tn=Sn,Cn=nt?function(e,t,n){return Rn.f(e,t,Tn(1,n))}:function(e,t,n){return e[t]=n,e},In=Y.exports,On=De,Pn=In("keys"),Bn=function(e){return Pn[e]||(Pn[e]=On(e))},Ln={},Un=Dn,Mn=K,Fn=at,jn=Cn,Gn=ye,Nn=te,qn=Bn,Hn=Ln,Vn="Object already initialized",Qn=Mn.TypeError,zn=Mn.WeakMap;if(Un||Nn.state){var Wn=Nn.state||(Nn.state=new zn);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,_n=function(e,t){if(Wn.has(e))throw Qn(Vn);return t.facade=e,Wn.set(e,t),t},yn=function(e){return Wn.get(e)||{}},wn=function(e){return Wn.has(e)}}else{var Kn=qn("state");Hn[Kn]=!0,_n=function(e,t){if(Gn(e,Kn))throw Qn(Vn);return t.facade=e,jn(e,Kn,t),t},yn=function(e){return Gn(e,Kn)?e[Kn]:{}},wn=function(e){return Gn(e,Kn)}}var Yn={set:_n,get:yn,has:wn,enforce:function(e){return wn(e)?yn(e):_n(e,{})},getterFor:function(e){return function(t){var n;if(!Fn(t)||(n=yn(t)).type!==e)throw Qn("Incompatible receiver, "+e+" required");return n}}},Jn=le,Zn=ae,Xn=et,$n=ye,er=nt,tr=gn.CONFIGURABLE,nr=kn,rr=Yn.enforce,ir=Yn.get,ar=String,sr=Object.defineProperty,or=Jn("".slice),cr=Jn("".replace),dr=Jn([].join),ur=er&&!Zn((function(){return 8!==sr((function(){}),"length",{value:8}).length})),lr=String(String).split("String"),hr=un.exports=function(e,t,n){"Symbol("===or(ar(t),0,7)&&(t="["+cr(ar(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!$n(e,"name")||tr&&e.name!==t)&&(er?sr(e,"name",{value:t,configurable:!0}):e.name=t),ur&&n&&$n(n,"arity")&&e.length!==n.arity&&sr(e,"length",{value:n.arity});try{n&&$n(n,"constructor")&&n.constructor?er&&sr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=rr(e);return $n(r,"source")||(r.source=dr(lr,"string"==typeof t?t:"")),e};Function.prototype.toString=hr((function(){return Xn(this)&&ir(this).source||nr(this)}),"toString");var pr=et,fr=tt,mr=un.exports,gr=X,Ar=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(pr(n)&&mr(n,a,r),r.global)i?e[t]=n:gr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:fr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},vr=le,br=vr({}.toString),_r=vr("".slice),yr=function(e){return _r(br(e),8,-1)},wr=Je,kr=et,Er=yr,xr=Ke("toStringTag"),Dr=Object,Sr="Arguments"==Er(function(){return arguments}()),Rr=wr?Er:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Dr(e),xr))?n:Sr?Er(t):"Object"==(r=Er(t))&&kr(t.callee)?"Arguments":r},Tr=Rr,Cr=Je?{}.toString:function(){return"[object "+Tr(this)+"]"};Je||Ar(Object.prototype,"toString",Cr,{unsafe:!0});var Ir={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Or=dt("span").classList,Pr=Or&&Or.constructor&&Or.constructor.prototype,Br=Pr===Object.prototype?void 0:Pr,Lr=yr,Ur=le,Mr=function(e){if("Function"===Lr(e))return Ur(e)},Fr=Bt,jr=se,Gr=Mr(Mr.bind),Nr=function(e,t){return Fr(e),void 0===t?e:jr?Gr(e,t):function(){return e.apply(t,arguments)}},qr=ae,Hr=yr,Vr=Object,Qr=le("".split),zr=qr((function(){return!Vr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Hr(e)?Qr(e,""):Vr(e)}:Vr,Wr=Math.ceil,Kr=Math.floor,Yr=Math.trunc||function(e){var t=+e;return(t>0?Kr:Wr)(t)},Jr=function(e){var t=+e;return t!=t||0===t?0:Yr(t)},Zr=Jr,Xr=Math.min,$r=function(e){return e>0?Xr(Zr(e),9007199254740991):0},ei=$r,ti=function(e){return ei(e.length)},ni=yr,ri=Array.isArray||function(e){return"Array"==ni(e)},ii=le,ai=ae,si=et,oi=Rr,ci=kn,di=function(){},ui=[],li=wt("Reflect","construct"),hi=/^\s*(?:class|function)\b/,pi=ii(hi.exec),fi=!hi.exec(di),mi=function(e){if(!si(e))return!1;try{return li(di,ui,e),!0}catch(e){return!1}},gi=function(e){if(!si(e))return!1;switch(oi(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return fi||!!pi(hi,ci(e))}catch(e){return!0}};gi.sham=!0;var Ai=!li||ai((function(){var e;return mi(mi.call)||!mi(Object)||!mi((function(){e=!0}))||e}))?gi:mi,vi=ri,bi=Ai,_i=at,yi=Ke("species"),wi=Array,ki=function(e){var t;return vi(e)&&(t=e.constructor,(bi(t)&&(t===wi||vi(t.prototype))||_i(t)&&null===(t=t[yi]))&&(t=void 0)),void 0===t?wi:t},Ei=function(e,t){return new(ki(e))(0===t?0:t)},xi=Nr,Di=zr,Si=ve,Ri=ti,Ti=Ei,Ci=le([].push),Ii=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,s=7==e,o=5==e||a;return function(c,d,u,l){for(var h,p,f=Si(c),m=Di(f),g=xi(d,u),A=Ri(m),v=0,b=l||Ti,_=t?b(c,A):n||s?b(c,0):void 0;A>v;v++)if((o||v in m)&&(p=g(h=m[v],v,f),e))if(t)_[v]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:Ci(_,h)}else switch(e){case 4:return!1;case 7:Ci(_,h)}return a?-1:r||i?i:_}},Oi={forEach:Ii(0),map:Ii(1),filter:Ii(2),some:Ii(3),every:Ii(4),find:Ii(5),findIndex:Ii(6),filterReject:Ii(7)},Pi=ae,Bi=function(e,t){var n=[][e];return!!n&&Pi((function(){n.call(null,t||function(){return 1},1)}))},Li=Oi.forEach,Ui=K,Mi=Ir,Fi=Br,ji=Bi("forEach")?[].forEach:function(e){return Li(this,e,arguments.length>1?arguments[1]:void 0)},Gi=Cn,Ni=function(e){if(e&&e.forEach!==ji)try{Gi(e,"forEach",ji)}catch(t){e.forEach=ji}};for(var qi in Mi)Mi[qi]&&Ni(Ui[qi]&&Ui[qi].prototype);Ni(Fi);var Hi={},Vi={},Qi={}.propertyIsEnumerable,zi=Object.getOwnPropertyDescriptor,Wi=zi&&!Qi.call({1:2},1);Vi.f=Wi?function(e){var t=zi(this,e);return!!t&&t.enumerable}:Qi;var Ki=zr,Yi=me,Ji=function(e){return Ki(Yi(e))},Zi=nt,Xi=bt,$i=Vi,ea=Sn,ta=Ji,na=Zt,ra=ye,ia=lt,aa=Object.getOwnPropertyDescriptor;Hi.f=Zi?aa:function(e,t){if(e=ta(e),t=na(t),ia)try{return aa(e,t)}catch(e){}if(ra(e,t))return ea(!Xi($i.f,e,t),e[t])};var sa={},oa=Jr,ca=Math.max,da=Math.min,ua=function(e,t){var n=oa(e);return n<0?ca(n+t,0):da(n,t)},la=Ji,ha=ua,pa=ti,fa=function(e){return function(t,n,r){var i,a=la(t),s=pa(a),o=ha(r,s);if(e&&n!=n){for(;s>o;)if((i=a[o++])!=i)return!0}else for(;s>o;o++)if((e||o in a)&&a[o]===n)return e||o||0;return!e&&-1}},ma={includes:fa(!0),indexOf:fa(!1)},ga=ye,Aa=Ji,va=ma.indexOf,ba=Ln,_a=le([].push),ya=function(e,t){var n,r=Aa(e),i=0,a=[];for(n in r)!ga(ba,n)&&ga(r,n)&&_a(a,n);for(;t.length>i;)ga(r,n=t[i++])&&(~va(a,n)||_a(a,n));return a},wa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ka=ya,Ea=wa.concat("length","prototype");sa.f=Object.getOwnPropertyNames||function(e){return ka(e,Ea)};var xa={};xa.f=Object.getOwnPropertySymbols;var Da=wt,Sa=sa,Ra=xa,Ta=gt,Ca=le([].concat),Ia=Da("Reflect","ownKeys")||function(e){var t=Sa.f(Ta(e)),n=Ra.f;return n?Ca(t,n(e)):t},Oa=ye,Pa=Ia,Ba=Hi,La=tt,Ua=function(e,t,n){for(var r=Pa(t),i=La.f,a=Ba.f,s=0;s<r.length;s++){var o=r[s];Oa(e,o)||n&&Oa(n,o)||i(e,o,a(t,o))}},Ma=ae,Fa=et,ja=/#|\.prototype\./,Ga=function(e,t){var n=qa[Na(e)];return n==Va||n!=Ha&&(Fa(t)?Ma(t):!!t)},Na=Ga.normalize=function(e){return String(e).replace(ja,".").toLowerCase()},qa=Ga.data={},Ha=Ga.NATIVE="N",Va=Ga.POLYFILL="P",Qa=Ga,za=K,Wa=Hi.f,Ka=Cn,Ya=Ar,Ja=X,Za=Ua,Xa=Qa,$a=function(e,t){var n,r,i,a,s,o=e.target,c=e.global,d=e.stat;if(n=c?za:d?za[o]||Ja(o,{}):(za[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Wa(n,r))&&s.value:n[r],!Xa(c?r:o+(d?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Za(a,i)}(e.sham||i&&i.sham)&&Ka(a,"sham",!0),Ya(n,r,a,e)}},es=ya,ts=wa,ns=Object.keys||function(e){return es(e,ts)},rs=ve,is=ns;$a({target:"Object",stat:!0,forced:ae((function(){is(1)}))},{keys:function(e){return is(rs(e))}});var as=Array.isArray,ss=Object.prototype.toString,os=as||function(e){return!!e&&"[object Array]"==ss.call(e)},cs={name:"@bygd/gd-sdk-pes",version:"1.41.15",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap inline --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.6","@flownet/lib-connect-to-tcf":"^0.2.10","@fnet/inter-service-js":"^0.9.4",axios:"^0.26.1","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",uuid:"^8.3.2",validator:"^13.6.0"}},ds=function(e){var t=us("object"===n(e)?e:i(e));return t&&t.version?cs.version>=t.version?t:void 0:t},us=function(e){var n=this;if(!os(e)||0===e.length)return e;if(1===e.length)return e[0];var r=0;e.forEach(function(e){t(this,n),e.weight=e.weight||1,r+=e.weight}.bind(this));var i=Math.floor(Math.random()*Math.floor(r));r=0;for(var a=0;a<e.length;a++){var s=e[a];if(i<(r+=s.weight))return s}},ls=function(){},hs=function(){var e;(e=console).log.apply(e,arguments)},ps=function(){var e;(e=console).log.apply(e,arguments)};JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima","adsense"],midroll:["ima","adsense","ima","adsense"],rewarded:["ima","adsense","ima","adsense"]}}),JSON.stringify({adapters:{default:["ima","adsense","ima","adsense"],preroll:["ima","adsense","ima"],midroll:["ima","adsense","ima"],rewarded:["ima","adsense","ima","adsense"]}});var fs={},ms=Rr,gs=String,As=function(e){if("Symbol"===ms(e))throw TypeError("Cannot convert a Symbol value to a string");return gs(e)},vs={},bs=nt,_s=ht,ys=tt,ws=gt,ks=Ji,Es=ns;vs.f=bs&&!_s?Object.defineProperties:function(e,t){ws(e);for(var n,r=ks(t),i=Es(t),a=i.length,s=0;a>s;)ys.f(e,n=i[s++],r[n]);return e};var xs,Ds=wt("document","documentElement"),Ss=gt,Rs=vs,Ts=wa,Cs=Ln,Is=Ds,Os=dt,Ps="prototype",Bs="script",Ls=Bn("IE_PROTO"),Us=function(){},Ms=function(e){return"<"+Bs+">"+e+"</"+Bs+">"},Fs=function(e){e.write(Ms("")),e.close();var t=e.parentWindow.Object;return e=null,t},js=function(){try{xs=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;js="undefined"!=typeof document?document.domain&&xs?Fs(xs):(t=Os("iframe"),n="java"+Bs+":",t.style.display="none",Is.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ms("document.F=Object")),e.close(),e.F):Fs(xs);for(var r=Ts.length;r--;)delete js[Ps][Ts[r]];return js()};Cs[Ls]=!0;var Gs=Object.create||function(e,t){var n;return null!==e?(Us[Ps]=Ss(e),n=new Us,Us[Ps]=null,n[Ls]=e):n=js(),void 0===t?n:Rs.f(n,t)},Ns={},Hs=Zt,Vs=tt,Qs=Sn,zs=function(e,t,n){var r=Hs(t);r in e?Vs.f(e,r,Qs(0,n)):e[r]=n},Ws=ua,Ks=ti,Ys=zs,Js=Array,Zs=Math.max,Xs=function(e,t,n){for(var r=Ks(e),i=Ws(t,r),a=Ws(void 0===n?r:n,r),s=Js(Zs(a-i,0)),o=0;i<a;i++,o++)Ys(s,o,e[i]);return s.length=o,s},$s=yr,eo=Ji,to=sa.f,no=Xs,ro="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ns.f=function(e){return ro&&"Window"==$s(e)?function(e){try{return to(e)}catch(e){return no(ro)}}(e):to(eo(e))};var ao=un.exports,so=tt,oo=function(e,t,n){return n.get&&ao(n.get,t,{getter:!0}),n.set&&ao(n.set,t,{setter:!0}),so.f(e,t,n)},co={},uo=Ke;co.f=uo;var lo=K,ho=ye,po=co,fo=tt.f,mo=function(e){var t=lo.Symbol||(lo.Symbol={});ho(t,e)||fo(t,e,{value:po.f(e)})},go=bt,Ao=wt,vo=Ke,bo=Ar,_o=tt.f,yo=ye,wo=Ke("toStringTag"),ko=function(e,t,n){e&&!n&&(e=e.prototype),e&&!yo(e,wo)&&_o(e,wo,{configurable:!0,value:t})},Eo=$a,xo=K,Do=bt,So=le,Ro=nt,To=Me,Co=ae,Io=ye,Oo=kt,Po=gt,Bo=Ji,Lo=Zt,Uo=As,Mo=Sn,Fo=Gs,jo=ns,Go=sa,No=Ns,qo=xa,Ho=Hi,Vo=tt,Qo=vs,zo=Vi,Wo=Ar,Ko=oo,Yo=Y.exports,Jo=Ln,Zo=De,Xo=Ke,$o=co,ec=mo,tc=function(){var e=Ao("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=vo("toPrimitive");t&&!t[r]&&bo(t,r,(function(e){return go(n,this)}),{arity:1})},nc=ko,rc=Yn,ic=Oi.forEach,ac=Bn("hidden"),sc="Symbol",oc="prototype",cc=rc.set,dc=rc.getterFor(sc),uc=Object[oc],lc=xo.Symbol,hc=lc&&lc[oc],pc=xo.TypeError,fc=xo.QObject,mc=Ho.f,gc=Vo.f,Ac=No.f,vc=zo.f,bc=So([].push),_c=Yo("symbols"),yc=Yo("op-symbols"),wc=Yo("wks"),kc=!fc||!fc[oc]||!fc[oc].findChild,Ec=Ro&&Co((function(){return 7!=Fo(gc({},"a",{get:function(){return gc(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=mc(uc,t);r&&delete uc[t],gc(e,t,n),r&&e!==uc&&gc(uc,t,r)}:gc,xc=function(e,t){var n=_c[e]=Fo(hc);return cc(n,{type:sc,tag:e,description:t}),Ro||(n.description=t),n},Dc=function(e,t,n){e===uc&&Dc(yc,t,n),Po(e);var r=Lo(t);return Po(n),Io(_c,r)?(n.enumerable?(Io(e,ac)&&e[ac][r]&&(e[ac][r]=!1),n=Fo(n,{enumerable:Mo(0,!1)})):(Io(e,ac)||gc(e,ac,Mo(1,{})),e[ac][r]=!0),Ec(e,r,n)):gc(e,r,n)},Sc=function(e,t){Po(e);var n=Bo(t),r=jo(n).concat(Ic(n));return ic(r,(function(t){Ro&&!Do(Rc,n,t)||Dc(e,t,n[t])})),e},Rc=function(e){var t=Lo(e),n=Do(vc,this,t);return!(this===uc&&Io(_c,t)&&!Io(yc,t))&&(!(n||!Io(this,t)||!Io(_c,t)||Io(this,ac)&&this[ac][t])||n)},Tc=function(e,t){var n=Bo(e),r=Lo(t);if(n!==uc||!Io(_c,r)||Io(yc,r)){var i=mc(n,r);return!i||!Io(_c,r)||Io(n,ac)&&n[ac][r]||(i.enumerable=!0),i}},Cc=function(e){var t=Ac(Bo(e)),n=[];return ic(t,(function(e){Io(_c,e)||Io(Jo,e)||bc(n,e)})),n},Ic=function(e){var t=e===uc,n=Ac(t?yc:Bo(e)),r=[];return ic(n,(function(e){!Io(_c,e)||t&&!Io(uc,e)||bc(r,_c[e])})),r};To||(Wo(hc=(lc=function(){if(Oo(hc,this))throw pc("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Uo(arguments[0]):void 0,t=Zo(e),n=function(e){this===uc&&Do(n,yc,e),Io(this,ac)&&Io(this[ac],t)&&(this[ac][t]=!1),Ec(this,t,Mo(1,e))};return Ro&&kc&&Ec(uc,t,{configurable:!0,set:n}),xc(t,e)})[oc],"toString",(function(){return dc(this).tag})),Wo(lc,"withoutSetter",(function(e){return xc(Zo(e),e)})),zo.f=Rc,Vo.f=Dc,Qo.f=Sc,Ho.f=Tc,Go.f=No.f=Cc,qo.f=Ic,$o.f=function(e){return xc(Xo(e),e)},Ro&&(Ko(hc,"description",{configurable:!0,get:function(){return dc(this).description}}),Wo(uc,"propertyIsEnumerable",Rc,{unsafe:!0}))),Eo({global:!0,constructor:!0,wrap:!0,forced:!To,sham:!To},{Symbol:lc}),ic(jo(wc),(function(e){ec(e)})),Eo({target:sc,stat:!0,forced:!To},{useSetter:function(){kc=!0},useSimple:function(){kc=!1}}),Eo({target:"Object",stat:!0,forced:!To,sham:!Ro},{create:function(e,t){return void 0===t?Fo(e):Sc(Fo(e),t)},defineProperty:Dc,defineProperties:Sc,getOwnPropertyDescriptor:Tc}),Eo({target:"Object",stat:!0,forced:!To},{getOwnPropertyNames:Cc}),tc(),nc(lc,sc),Jo[ac]=!0;var Oc=Me&&!!Symbol.for&&!!Symbol.keyFor,Pc=$a,Bc=wt,Lc=ye,Uc=As,Mc=Y.exports,Fc=Oc,jc=Mc("string-to-symbol-registry"),Gc=Mc("symbol-to-string-registry");Pc({target:"Symbol",stat:!0,forced:!Fc},{for:function(e){var t=Uc(e);if(Lc(jc,t))return jc[t];var n=Bc("Symbol")(t);return jc[t]=n,Gc[n]=t,n}});var Nc=$a,qc=ye,Hc=Rt,Vc=Ct,Qc=Oc,zc=(0,Y.exports)("symbol-to-string-registry");Nc({target:"Symbol",stat:!0,forced:!Qc},{keyFor:function(e){if(!Hc(e))throw TypeError(Vc(e)+" is not a symbol");if(qc(zc,e))return zc[e]}});var Wc=se,Kc=Function.prototype,Yc=Kc.apply,Jc=Kc.call,Zc="object"==typeof Reflect&&Reflect.apply||(Wc?Jc.bind(Yc):function(){return Jc.apply(Yc,arguments)}),Xc=le([].slice),$c=ri,ed=et,td=yr,nd=As,rd=le([].push),id=$a,ad=wt,sd=Zc,od=bt,cd=le,dd=ae,ud=et,ld=Rt,hd=Xc,pd=function(e){if(ed(e))return e;if($c(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?rd(n,i):"number"!=typeof i&&"Number"!=td(i)&&"String"!=td(i)||rd(n,nd(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if($c(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},fd=Me,md=String,gd=ad("JSON","stringify"),Ad=cd(/./.exec),vd=cd("".charAt),bd=cd("".charCodeAt),_d=cd("".replace),yd=cd(1..toString),wd=/[\uD800-\uDFFF]/g,kd=/^[\uD800-\uDBFF]$/,Ed=/^[\uDC00-\uDFFF]$/,xd=!fd||dd((function(){var e=ad("Symbol")();return"[null]"!=gd([e])||"{}"!=gd({a:e})||"{}"!=gd(Object(e))})),Dd=dd((function(){return'"\\udf06\\ud834"'!==gd("\udf06\ud834")||'"\\udead"'!==gd("\udead")})),Sd=function(e,t){var n=hd(arguments),r=pd(t);if(ud(r)||void 0!==e&&!ld(e))return n[1]=function(e,t){if(ud(r)&&(t=od(r,this,md(e),t)),!ld(t))return t},sd(gd,null,n)},Rd=function(e,t,n){var r=vd(n,t-1),i=vd(n,t+1);return Ad(kd,e)&&!Ad(Ed,i)||Ad(Ed,e)&&!Ad(kd,r)?"\\u"+yd(bd(e,0),16):e};gd&&id({target:"JSON",stat:!0,arity:3,forced:xd||Dd},{stringify:function(e,t,n){var r=hd(arguments),i=sd(xd?Sd:gd,null,r);return Dd&&"string"==typeof i?_d(i,wd,Rd):i}});var Td=xa,Cd=ve;$a({target:"Object",stat:!0,forced:!Me||ae((function(){Td.f(1)}))},{getOwnPropertySymbols:function(e){var t=Td.f;return t?t(Cd(e)):[]}});var Id=ae,Od=Be,Pd=Ke("species"),Bd=function(e){return Od>=51||!Id((function(){var t=[];return(t.constructor={})[Pd]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ld=Oi.filter;$a({target:"Array",proto:!0,forced:!Bd("filter")},{filter:function(e){return Ld(this,e,arguments.length>1?arguments[1]:void 0)}});var Ud=$a,Md=ae,Fd=Ji,jd=Hi.f,Gd=nt;Ud({target:"Object",stat:!0,forced:!Gd||Md((function(){jd(1)})),sham:!Gd},{getOwnPropertyDescriptor:function(e,t){return jd(Fd(e),t)}});var Nd=Ia,qd=Ji,Hd=Hi,Vd=zs;$a({target:"Object",stat:!0,sham:!nt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=qd(e),i=Hd.f,a=Nd(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&Vd(s,t,n);return s}});var Qd=$a,zd=ri,Wd=Ai,Kd=at,Yd=ua,Jd=ti,Zd=Ji,Xd=zs,$d=Ke,eu=Xc,tu=Bd("slice"),nu=$d("species"),ru=Array,iu=Math.max;Qd({target:"Array",proto:!0,forced:!tu},{slice:function(e,t){var n,r,i,a=Zd(this),s=Jd(a),o=Yd(e,s),c=Yd(void 0===t?s:t,s);if(zd(a)&&(n=a.constructor,(Wd(n)&&(n===ru||zd(n.prototype))||Kd(n)&&null===(n=n[nu]))&&(n=void 0),n===ru||void 0===n))return eu(a,o,c);for(r=new(void 0===n?ru:n)(iu(c-o,0)),i=0;o<c;o++,i++)o in a&&Xd(r,i,a[o]);return r.length=i,r}});var au=bt,su=gt,ou=Mt,cu=function(e,t,n){var r,i;su(e);try{if(!(r=ou(e,"return"))){if("throw"===t)throw n;return n}r=au(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return su(r),n},du=gt,uu=cu,lu={},hu=lu,pu=Ke("iterator"),fu=Array.prototype,mu=function(e){return void 0!==e&&(hu.Array===e||fu[pu]===e)},gu=Rr,Au=Mt,vu=he,bu=lu,_u=Ke("iterator"),yu=function(e){if(!vu(e))return Au(e,_u)||Au(e,"@@iterator")||bu[gu(e)]},wu=bt,ku=Bt,Eu=gt,xu=Ct,Du=yu,Su=TypeError,Ru=function(e,t){var n=arguments.length<2?Du(e):t;if(ku(n))return Eu(wu(n,e));throw Su(xu(e)+" is not iterable")},Tu=Nr,Cu=bt,Iu=ve,Ou=function(e,t,n,r){try{return r?t(du(n)[0],n[1]):t(n)}catch(t){uu(e,"throw",t)}},Pu=mu,Bu=Ai,Lu=ti,Uu=zs,Mu=Ru,Fu=yu,ju=Array,Gu=function(e){var t=Iu(e),n=Bu(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Tu(i,r>2?arguments[2]:void 0));var s,o,c,d,u,l,h=Fu(t),p=0;if(!h||this===ju&&Pu(h))for(s=Lu(t),o=n?new this(s):ju(s);s>p;p++)l=a?i(t[p],p):t[p],Uu(o,p,l);else for(u=(d=Mu(t,h)).next,o=n?new this:[];!(c=Cu(u,d)).done;p++)l=a?Ou(d,i,[c.value,p],!0):c.value,Uu(o,p,l);return o.length=p,o},Nu=Ke("iterator"),qu=!1;try{var Hu=0,Vu={next:function(){return{done:!!Hu++}},return:function(){qu=!0}};Vu[Nu]=function(){return this},Array.from(Vu,(function(){throw 2}))}catch(e){}var Qu=function(e,t){if(!t&&!qu)return!1;var n=!1;try{var r={};r[Nu]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},zu=Gu;$a({target:"Array",stat:!0,forced:!Qu((function(e){Array.from(e)}))},{from:zu});var Wu,Ku,Yu,Ju=le,Zu=Jr,Xu=As,$u=me,el=Ju("".charAt),tl=Ju("".charCodeAt),nl=Ju("".slice),rl=function(e){return function(t,n){var r,i,a=Xu($u(t)),s=Zu(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=tl(a,s))<55296||r>56319||s+1===o||(i=tl(a,s+1))<56320||i>57343?e?el(a,s):r:e?nl(a,s,s+2):i-56320+(r-55296<<10)+65536}},il={codeAt:rl(!1),charAt:rl(!0)},al=!ae((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),sl=ye,ol=et,cl=ve,dl=al,ul=Bn("IE_PROTO"),ll=Object,hl=ll.prototype,pl=dl?ll.getPrototypeOf:function(e){var t=cl(e);if(sl(t,ul))return t[ul];var n=t.constructor;return ol(n)&&t instanceof n?n.prototype:t instanceof ll?hl:null},fl=ae,ml=et,gl=at,Al=pl,vl=Ar,bl=Ke("iterator"),_l=!1;[].keys&&("next"in(Yu=[].keys())?(Ku=Al(Al(Yu)))!==Object.prototype&&(Wu=Ku):_l=!0);var yl=!gl(Wu)||fl((function(){var e={};return Wu[bl].call(e)!==e}));yl&&(Wu={}),ml(Wu[bl])||vl(Wu,bl,(function(){return this}));var wl={IteratorPrototype:Wu,BUGGY_SAFARI_ITERATORS:_l},kl=wl.IteratorPrototype,El=Gs,xl=Sn,Dl=ko,Sl=lu,Rl=function(){return this},Tl=function(e,t,n,r){var i=t+" Iterator";return e.prototype=El(kl,{next:xl(+!r,n)}),Dl(e,i,!1),Sl[i]=Rl,e},Cl=le,Il=Bt,Ol=et,Pl=String,Bl=TypeError,Ll=function(e,t,n){try{return Cl(Il(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Ul=gt,Ml=function(e){if("object"==typeof e||Ol(e))return e;throw Bl("Can't set "+Pl(e)+" as a prototype")},Fl=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ll(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ul(n),Ml(r),t?e(n,r):n.__proto__=r,n}}():void 0),jl=$a,Gl=bt,Nl=et,ql=Tl,Hl=pl,Vl=Fl,Ql=ko,zl=Cn,Wl=Ar,Kl=lu,Yl=gn.PROPER,Jl=gn.CONFIGURABLE,Zl=wl.IteratorPrototype,Xl=wl.BUGGY_SAFARI_ITERATORS,$l=Ke("iterator"),eh="keys",th="values",nh="entries",rh=function(){return this},ih=function(e,t,n,r,i,a,s){ql(n,t,r);var o,c,d,u=function(e){if(e===i&&m)return m;if(!Xl&&e in p)return p[e];switch(e){case eh:case th:case nh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[$l]||p["@@iterator"]||i&&p[i],m=!Xl&&f||u(i),g="Array"==t&&p.entries||f;if(g&&(o=Hl(g.call(new e)))!==Object.prototype&&o.next&&(Hl(o)!==Zl&&(Vl?Vl(o,Zl):Nl(o[$l])||Wl(o,$l,rh)),Ql(o,l,!0)),Yl&&i==th&&f&&f.name!==th&&(Jl?zl(p,"name",th):(h=!0,m=function(){return Gl(f,this)})),i)if(c={values:u(th),keys:a?m:u(eh),entries:u(nh)},s)for(d in c)(Xl||h||!(d in p))&&Wl(p,d,c[d]);else jl({target:t,proto:!0,forced:Xl||h},c);return p[$l]!==m&&Wl(p,$l,m,{name:i}),Kl[t]=m,c},ah=function(e,t){return{value:e,done:t}},sh=il.charAt,oh=As,ch=Yn,dh=ih,uh=ah,lh="String Iterator",hh=ch.set,ph=ch.getterFor(lh);dh(String,"String",(function(e){hh(this,{type:lh,string:oh(e),index:0})}),(function(){var e,t=ph(this),n=t.string,r=t.index;return r>=n.length?uh(void 0,!0):(e=sh(n,r),t.index+=e.length,uh(e,!1))}));var fh=gt,mh=function(){var e=fh(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},gh=ae,Ah=K.RegExp,vh=gh((function(){var e=Ah("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),bh=vh||gh((function(){return!Ah("a","y").sticky})),_h={BROKEN_CARET:vh||gh((function(){var e=Ah("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:bh,UNSUPPORTED_Y:vh},yh=ae,wh=K.RegExp,kh=yh((function(){var e=wh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Eh=ae,xh=K.RegExp,Dh=Eh((function(){var e=xh("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Sh=bt,Rh=le,Th=As,Ch=mh,Ih=_h,Oh=Y.exports,Ph=Gs,Bh=Yn.get,Lh=kh,Uh=Dh,Mh=Oh("native-string-replace",String.prototype.replace),Fh=RegExp.prototype.exec,jh=Fh,Gh=Rh("".charAt),Nh=Rh("".indexOf),qh=Rh("".replace),Hh=Rh("".slice),Vh=function(){var e=/a/,t=/b*/g;return Sh(Fh,e,"a"),Sh(Fh,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Qh=Ih.BROKEN_CARET,zh=void 0!==/()??/.exec("")[1];(Vh||zh||Qh||Lh||Uh)&&(jh=function(e){var t,n,r,i,a,s,o,c=this,d=Bh(c),u=Th(e),l=d.raw;if(l)return l.lastIndex=c.lastIndex,t=Sh(jh,l,u),c.lastIndex=l.lastIndex,t;var h=d.groups,p=Qh&&c.sticky,f=Sh(Ch,c),m=c.source,g=0,A=u;if(p&&(f=qh(f,"y",""),-1===Nh(f,"g")&&(f+="g"),A=Hh(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Gh(u,c.lastIndex-1))&&(m="(?: "+m+")",A=" "+A,g++),n=new RegExp("^(?:"+m+")",f)),zh&&(n=new RegExp("^"+m+"$(?!\\s)",f)),Vh&&(r=c.lastIndex),i=Sh(Fh,p?n:c,A),p?i?(i.input=Hh(i.input,g),i[0]=Hh(i[0],g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Vh&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),zh&&i&&i.length>1&&Sh(Mh,i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=s=Ph(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var Wh=jh;$a({target:"RegExp",proto:!0,forced:/./.exec!==Wh},{exec:Wh});var Kh=$a,Yh=nt,Jh=le,Zh=ye,Xh=et,$h=kt,ep=As,tp=oo,np=Ua,rp=K.Symbol,ip=rp&&rp.prototype;if(Yh&&Xh(rp)&&(!("description"in ip)||void 0!==rp().description)){var ap={},sp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:ep(arguments[0]),t=$h(ip,this)?new rp(e):void 0===e?rp():rp(e);return""===e&&(ap[t]=!0),t};np(sp,rp),sp.prototype=ip,ip.constructor=sp;var op="Symbol(test)"==String(rp("test")),cp=Jh(ip.valueOf),dp=Jh(ip.toString),up=/^Symbol\((.*)\)[^)]+$/,lp=Jh("".replace),hp=Jh("".slice);tp(ip,"description",{configurable:!0,get:function(){var e=cp(this);if(Zh(ap,e))return"";var t=dp(e),n=op?hp(t,7,-1):lp(t,up,"$1");return""===n?void 0:n}}),Kh({global:!0,constructor:!0,forced:!0},{Symbol:sp})}mo("iterator");var pp=Ke,fp=Gs,mp=tt.f,gp=pp("unscopables"),Ap=Array.prototype;null==Ap[gp]&&mp(Ap,gp,{configurable:!0,value:fp(null)});var vp=function(e){Ap[gp][e]=!0},bp=Ji,_p=vp,yp=lu,wp=Yn,kp=tt.f,Ep=ih,xp=ah,Dp=nt,Sp="Array Iterator",Rp=wp.set,Tp=wp.getterFor(Sp),Cp=Ep(Array,"Array",(function(e,t){Rp(this,{type:Sp,target:bp(e),index:0,kind:t})}),(function(){var e=Tp(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,xp(void 0,!0)):xp("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Ip=yp.Arguments=yp.Array;if(_p("keys"),_p("values"),_p("entries"),Dp&&"values"!==Ip.name)try{kp(Ip,"name",{value:"values"})}catch(e){}var Op=K,Pp=Ir,Bp=Br,Lp=Cp,Up=Cn,Mp=Ke,Fp=Mp("iterator"),jp=Mp("toStringTag"),Gp=Lp.values,Np=function(e,t){if(e){if(e[Fp]!==Gp)try{Up(e,Fp,Gp)}catch(t){e[Fp]=Gp}if(e[jp]||Up(e,jp,t),Pp[t])for(var n in Lp)if(e[n]!==Lp[n])try{Up(e,n,Lp[n])}catch(t){e[n]=Lp[n]}}};for(var qp in Pp)Np(Op[qp]&&Op[qp].prototype,qp);Np(Bp,"DOMTokenList");var Hp,Vp,Qp,zp,Wp="undefined"!=typeof process&&"process"==yr(process),Kp=wt,Yp=oo,Jp=nt,Zp=Ke("species"),Xp=function(e){var t=Kp(e);Jp&&t&&!t[Zp]&&Yp(t,Zp,{configurable:!0,get:function(){return this}})},$p=kt,ef=TypeError,tf=function(e,t){if($p(t,e))return e;throw ef("Incorrect invocation")},nf=Ai,rf=Ct,af=TypeError,sf=gt,of=function(e){if(nf(e))return e;throw af(rf(e)+" is not a constructor")},cf=he,df=Ke("species"),uf=function(e,t){var n,r=sf(e).constructor;return void 0===r||cf(n=sf(r)[df])?t:of(n)},lf=TypeError,hf=function(e,t){if(e<t)throw lf("Not enough arguments");return e},pf=/(?:ipad|iphone|ipod).*applewebkit/i.test(Se),ff=K,mf=Zc,gf=Nr,Af=et,vf=ye,bf=ae,_f=Ds,yf=Xc,wf=dt,kf=hf,Ef=pf,xf=Wp,Df=ff.setImmediate,Sf=ff.clearImmediate,Rf=ff.process,Tf=ff.Dispatch,Cf=ff.Function,If=ff.MessageChannel,Of=ff.String,Pf=0,Bf={},Lf="onreadystatechange";bf((function(){Hp=ff.location}));var Uf=function(e){if(vf(Bf,e)){var t=Bf[e];delete Bf[e],t()}},Mf=function(e){return function(){Uf(e)}},Ff=function(e){Uf(e.data)},jf=function(e){ff.postMessage(Of(e),Hp.protocol+"//"+Hp.host)};Df&&Sf||(Df=function(e){kf(arguments.length,1);var t=Af(e)?e:Cf(e),n=yf(arguments,1);return Bf[++Pf]=function(){mf(t,void 0,n)},Vp(Pf),Pf},Sf=function(e){delete Bf[e]},xf?Vp=function(e){Rf.nextTick(Mf(e))}:Tf&&Tf.now?Vp=function(e){Tf.now(Mf(e))}:If&&!Ef?(zp=(Qp=new If).port2,Qp.port1.onmessage=Ff,Vp=gf(zp.postMessage,zp)):ff.addEventListener&&Af(ff.postMessage)&&!ff.importScripts&&Hp&&"file:"!==Hp.protocol&&!bf(jf)?(Vp=jf,ff.addEventListener("message",Ff,!1)):Vp=Lf in wf("script")?function(e){_f.appendChild(wf("script"))[Lf]=function(){_f.removeChild(this),Uf(e)}}:function(e){setTimeout(Mf(e),0)});var Gf={set:Df,clear:Sf},Nf=function(){this.head=null,this.tail=null};Nf.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var qf,Hf,Vf,Qf,zf,Wf=Nf,Kf=/ipad|iphone|ipod/i.test(Se)&&"undefined"!=typeof Pebble,Yf=/web0s(?!.*chrome)/i.test(Se),Jf=K,Zf=Nr,Xf=Hi.f,$f=Gf.set,em=Wf,tm=pf,nm=Kf,rm=Yf,im=Wp,am=Jf.MutationObserver||Jf.WebKitMutationObserver,sm=Jf.document,om=Jf.process,cm=Jf.Promise,dm=Xf(Jf,"queueMicrotask"),um=dm&&dm.value;if(!um){var lm=new em,hm=function(){var e,t;for(im&&(e=om.domain)&&e.exit();t=lm.get();)try{t()}catch(e){throw lm.head&&qf(),e}e&&e.enter()};tm||im||rm||!am||!sm?!nm&&cm&&cm.resolve?((Qf=cm.resolve(void 0)).constructor=cm,zf=Zf(Qf.then,Qf),qf=function(){zf(hm)}):im?qf=function(){om.nextTick(hm)}:($f=Zf($f,Jf),qf=function(){$f(hm)}):(Hf=!0,Vf=sm.createTextNode(""),new am(hm).observe(Vf,{characterData:!0}),qf=function(){Vf.data=Hf=!Hf}),um=function(e){lm.head||qf(),lm.add(e)}}var pm=um,fm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},mm=K.Promise,gm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Am=!gm&&!Wp&&"object"==typeof window&&"object"==typeof document,vm=K,bm=mm,_m=et,ym=Qa,wm=kn,km=Ke,Em=Am,xm=gm,Dm=Be;bm&&bm.prototype;var Sm=km("species"),Rm=!1,Tm=_m(vm.PromiseRejectionEvent),Cm=ym("Promise",(function(){var e=wm(bm),t=e!==String(bm);if(!t&&66===Dm)return!0;if(!Dm||Dm<51||!/native code/.test(e)){var n=new bm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Sm]=r,!(Rm=n.then((function(){}))instanceof r))return!0}return!t&&(Em||xm)&&!Tm})),Im={CONSTRUCTOR:Cm,REJECTION_EVENT:Tm,SUBCLASSING:Rm},Om={},Pm=Bt,Bm=TypeError,Lm=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Bm("Bad Promise constructor");t=e,n=r})),this.resolve=Pm(t),this.reject=Pm(n)};Om.f=function(e){return new Lm(e)};var Um,Mm,Fm,jm=$a,Gm=Wp,Nm=K,qm=bt,Hm=Ar,Vm=Fl,Qm=ko,zm=Xp,Wm=Bt,Km=et,Ym=at,Jm=tf,Zm=uf,Xm=Gf.set,$m=pm,eg=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},tg=fm,ng=Wf,rg=Yn,ig=mm,ag=Om,sg="Promise",og=Im.CONSTRUCTOR,cg=Im.REJECTION_EVENT,dg=Im.SUBCLASSING,ug=rg.getterFor(sg),lg=rg.set,hg=ig&&ig.prototype,pg=ig,fg=hg,mg=Nm.TypeError,gg=Nm.document,Ag=Nm.process,vg=ag.f,bg=vg,_g=!!(gg&&gg.createEvent&&Nm.dispatchEvent),yg="unhandledrejection",wg=function(e){var t;return!(!Ym(e)||!Km(t=e.then))&&t},kg=function(e,t){var n,r,i,a=t.value,s=1==t.state,o=s?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{o?(s||(2===t.rejection&&Rg(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?d(mg("Promise-chain cycle")):(r=wg(n))?qm(r,n,c,d):c(n)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},Eg=function(e,t){e.notified||(e.notified=!0,$m((function(){for(var n,r=e.reactions;n=r.get();)kg(n,e);e.notified=!1,t&&!e.rejection&&Dg(e)})))},xg=function(e,t,n){var r,i;_g?((r=gg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Nm.dispatchEvent(r)):r={promise:t,reason:n},!cg&&(i=Nm["on"+e])?i(r):e===yg&&eg("Unhandled promise rejection",n)},Dg=function(e){qm(Xm,Nm,(function(){var t,n=e.facade,r=e.value;if(Sg(e)&&(t=tg((function(){Gm?Ag.emit("unhandledRejection",r,n):xg(yg,n,r)})),e.rejection=Gm||Sg(e)?2:1,t.error))throw t.value}))},Sg=function(e){return 1!==e.rejection&&!e.parent},Rg=function(e){qm(Xm,Nm,(function(){var t=e.facade;Gm?Ag.emit("rejectionHandled",t):xg("rejectionhandled",t,e.value)}))},Tg=function(e,t,n){return function(r){e(t,r,n)}},Cg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Eg(e,!0))},Ig=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw mg("Promise can't be resolved itself");var r=wg(t);r?$m((function(){var n={done:!1};try{qm(r,t,Tg(Ig,n,e),Tg(Cg,n,e))}catch(t){Cg(n,t,e)}})):(e.value=t,e.state=1,Eg(e,!1))}catch(t){Cg({done:!1},t,e)}}};if(og&&(fg=(pg=function(e){Jm(this,fg),Wm(e),qm(Um,this);var t=ug(this);try{e(Tg(Ig,t),Tg(Cg,t))}catch(e){Cg(t,e)}}).prototype,(Um=function(e){lg(this,{type:sg,done:!1,notified:!1,parent:!1,reactions:new ng,rejection:!1,state:0,value:void 0})}).prototype=Hm(fg,"then",(function(e,t){var n=ug(this),r=vg(Zm(this,pg));return n.parent=!0,r.ok=!Km(e)||e,r.fail=Km(t)&&t,r.domain=Gm?Ag.domain:void 0,0==n.state?n.reactions.add(r):$m((function(){kg(r,n)})),r.promise})),Mm=function(){var e=new Um,t=ug(e);this.promise=e,this.resolve=Tg(Ig,t),this.reject=Tg(Cg,t)},ag.f=vg=function(e){return e===pg||undefined===e?new Mm(e):bg(e)},Km(ig)&&hg!==Object.prototype)){Fm=hg.then,dg||Hm(hg,"then",(function(e,t){var n=this;return new pg((function(e,t){qm(Fm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete hg.constructor}catch(e){}Vm&&Vm(hg,fg)}jm({global:!0,constructor:!0,wrap:!0,forced:og},{Promise:pg}),Qm(pg,sg,!1),zm(sg);var Og=Nr,Pg=bt,Bg=gt,Lg=Ct,Ug=mu,Mg=ti,Fg=kt,jg=Ru,Gg=yu,Ng=cu,qg=TypeError,Hg=function(e,t){this.stopped=e,this.result=t},Vg=Hg.prototype,Qg=function(e,t,n){var r,i,a,s,o,c,d,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=Og(t,u),g=function(e){return r&&Ng(r,"normal",e),new Hg(!0,e)},A=function(e){return l?(Bg(e),f?m(e[0],e[1],g):m(e[0],e[1])):f?m(e,g):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Gg(e)))throw qg(Lg(e)+" is not iterable");if(Ug(i)){for(a=0,s=Mg(e);s>a;a++)if((o=A(e[a]))&&Fg(Vg,o))return o;return new Hg(!1)}r=jg(e,i)}for(c=h?e.next:r.next;!(d=Pg(c,r)).done;){try{o=A(d.value)}catch(e){Ng(r,"throw",e)}if("object"==typeof o&&o&&Fg(Vg,o))return o}return new Hg(!1)},zg=mm,Wg=Im.CONSTRUCTOR||!Qu((function(e){zg.all(e).then(void 0,(function(){}))})),Kg=bt,Yg=Bt,Jg=Om,Zg=fm,Xg=Qg;$a({target:"Promise",stat:!0,forced:Wg},{all:function(e){var t=this,n=Jg.f(t),r=n.resolve,i=n.reject,a=Zg((function(){var n=Yg(t.resolve),a=[],s=0,o=1;Xg(e,(function(e){var c=s++,d=!1;o++,Kg(n,t,e).then((function(e){d||(d=!0,a[c]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var $g=$a,eA=Im.CONSTRUCTOR,tA=mm,nA=wt,rA=et,iA=Ar,aA=tA&&tA.prototype;if($g({target:"Promise",proto:!0,forced:eA,real:!0},{catch:function(e){return this.then(void 0,e)}}),rA(tA)){var sA=nA("Promise").prototype.catch;aA.catch!==sA&&iA(aA,"catch",sA,{unsafe:!0})}var oA=bt,cA=Bt,dA=Om,uA=fm,lA=Qg;$a({target:"Promise",stat:!0,forced:Wg},{race:function(e){var t=this,n=dA.f(t),r=n.reject,i=uA((function(){var i=cA(t.resolve);lA(e,(function(e){oA(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var hA=bt,pA=Om;$a({target:"Promise",stat:!0,forced:Im.CONSTRUCTOR},{reject:function(e){var t=pA.f(this);return hA(t.reject,void 0,e),t.promise}});var fA=gt,mA=at,gA=Om,AA=function(e,t){if(fA(e),mA(t)&&t.constructor===e)return t;var n=gA.f(e);return(0,n.resolve)(t),n.promise},vA=$a,bA=Im.CONSTRUCTOR,_A=AA;wt("Promise"),vA({target:"Promise",stat:!0,forced:bA},{resolve:function(e){return _A(this,e)}});var yA=TypeError,wA=$a,kA=ae,EA=ri,xA=at,DA=ve,SA=ti,RA=function(e){if(e>9007199254740991)throw yA("Maximum allowed index exceeded");return e},TA=zs,CA=Ei,IA=Bd,OA=Be,PA=Ke("isConcatSpreadable"),BA=OA>=51||!kA((function(){var e=[];return e[PA]=!1,e.concat()[0]!==e})),LA=function(e){if(!xA(e))return!1;var t=e[PA];return void 0!==t?!!t:EA(e)};wA({target:"Array",proto:!0,arity:1,forced:!BA||!IA("concat")},{concat:function(e){var t,n,r,i,a,s=DA(this),o=CA(s,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(LA(a=-1===t?s:arguments[t]))for(i=SA(a),RA(c+i),n=0;n<i;n++,c++)n in a&&TA(o,c,a[n]);else RA(c+1),TA(o,c++,a);return o.length=c,o}});var UA=nt,MA=gn.EXISTS,FA=le,jA=oo,GA=Function.prototype,NA=FA(GA.toString),qA=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,HA=FA(qA.exec);function VA(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return QA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QA(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function QA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function WA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zA(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}UA&&!MA&&jA(GA,"name",{configurable:!0,get:function(){try{return HA(qA,NA(this))[1]}catch(e){return""}}});var KA,YA={react:{src:"https://pm.azerioncircle.com/react/16.14.0/umd/react.production.min.js",name:"React"},"react-dom":{src:"https://pm.azerioncircle.com/react-dom/16.14.0/umd/react-dom.production.min.js",name:"ReactDOM"},redux:{src:"https://pm.azerioncircle.com/redux/4.0.5/dist/redux.min.js",name:"Redux"},"react-redux":{src:"https://pm.azerioncircle.com/react-redux/7.2.1/dist/react-redux.min.js",name:"ReactRedux"},"material-ui-core":{src:"https://pm.azerioncircle.com/@material-ui/core/4.11.3/umd/material-ui.production.min.js",name:"MaterialUI"}},JA={},ZA=function(e,t){JA[e]=WA(WA({},t),{},{isLoading:!1})},XA=function(e){var n=this,r=e.id,i=e.src;return new Promise(function(e,a){if(t(this,n),document.getElementById(r))e();else{var s=document.createElement("script");s.onload=function(){e()},s.id=r,s.setAttribute("crossorigin",!0),s.src=i,document.head.appendChild(s)}}.bind(this))},$A=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=window[t])){e.next=3;break}return e.abrupt("return",n);case 3:if(!(i=JA[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=VA(i.dependencies),e.prev=8,a.s();case 10:if((s=a.n()).done){e.next=26;break}if(o=s.value,e.prev=12,c=YA[o].name,!window[c]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,XA({id:o,src:YA[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=o.id,u=o.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,XA({id:t,src:i.source});case 37:n=window[t],e.next=43;break;case 40:e.prev=40,e.t2=e.catch(34),console.log("Could not load module ".concat(t," ").concat(i.source,"."),e.t2);case 43:return i.isLoading=!1,e.abrupt("return",n);case 45:case"end":return e.stop()}}),e,null,[[8,28,31,34],[12,20],[34,40]])})));return function(e){return t.apply(this,arguments)}}(),ev=S((function t(){var n=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$A("Leaderboard");case 2:n.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"showLeaderboard",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=window.GD_OPTIONS.gameId,n.leaderboard){e.next=4;break}return e.next=4,n.load();case 4:n.leaderboard.showLeaderBoard(i,t);case 5:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),T(this,"addScore",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.leaderboard){e.next=3;break}return e.next=3,n.load();case 3:n.leaderboard.addScore(t);case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),this.moduleName="Leaderboard",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-leaderboard/0.1.43/dist/default/iife/index.js",dependencies:["react","react-dom","redux","react-redux","material-ui-core"]},ZA(this.moduleName,this.moduleConfig)})),tv=new ev,nv=at,rv=yr,iv=Ke("match"),av=function(e){var t;return nv(e)&&(void 0!==(t=e[iv])?!!t:"RegExp"==rv(e))},sv=av,ov=TypeError,cv=function(e){if(sv(e))throw ov("The method doesn't accept regular expressions");return e},dv=Ke("match"),uv=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[dv]=!1,"/./"[e](t)}catch(e){}}return!1},lv=$a,hv=Mr,pv=Hi.f,fv=$r,mv=As,gv=cv,Av=me,vv=uv,bv=hv("".startsWith),_v=hv("".slice),yv=Math.min,wv=vv("startsWith");lv({target:"String",proto:!0,forced:!!(wv||(KA=pv(String.prototype,"startsWith"),!KA||KA.writable))&&!wv},{startsWith:function(e){var t=mv(Av(this));gv(e);var n=fv(yv(arguments.length>1?arguments[1]:void 0,t.length)),r=mv(e);return bv?bv(t,r,n):_v(t,n,n+r.length)===r}});var kv=bt,Ev=ye,xv=kt,Dv=mh,Sv=RegExp.prototype,Rv=function(e){var t=e.flags;return void 0!==t||"flags"in Sv||Ev(e,"flags")||!xv(Sv,e)?t:kv(Dv,e)},Tv=gn.PROPER,Cv=Ar,Iv=gt,Ov=As,Pv=ae,Bv=Rv,Lv="toString",Uv=RegExp.prototype[Lv],Mv=Pv((function(){return"/a/b"!=Uv.call({source:"a",flags:"b"})})),Fv=Tv&&Uv.name!=Lv;(Mv||Fv)&&Cv(RegExp.prototype,Lv,(function(){var e=Iv(this);return"/"+Ov(e.source)+"/"+Ov(Bv(e))}),{unsafe:!0});var jv=Mr,Gv=Ar,Nv=Wh,qv=ae,Hv=Ke,Vv=Cn,Qv=Hv("species"),zv=RegExp.prototype,Wv=function(e,t,n,r){var i=Hv(e),a=!qv((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!qv((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Qv]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=jv(/./[i]),c=t(i,""[e],(function(e,t,n,r,i){var s=jv(e),c=t.exec;return c===Nv||c===zv.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Gv(String.prototype,e,c[0]),Gv(zv,i,c[1])}r&&Vv(zv[i],"sham",!0)},Kv=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Yv=bt,Jv=gt,Zv=et,Xv=yr,$v=Wh,eb=TypeError,tb=function(e,t){var n=e.exec;if(Zv(n)){var r=Yv(n,e,t);return null!==r&&Jv(r),r}if("RegExp"===Xv(e))return Yv($v,e,t);throw eb("RegExp#exec called on incompatible receiver")},nb=bt,rb=gt,ib=he,ab=me,sb=Kv,ob=As,cb=Mt,db=tb;function ub(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ub(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ub(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Wv("search",(function(e,t,n){return[function(t){var n=ab(this),r=ib(t)?void 0:cb(t,e);return r?nb(r,t,n):new RegExp(t)[e](ob(n))},function(e){var r=rb(this),i=ob(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;sb(s,0)||(r.lastIndex=0);var o=db(r,i);return sb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var hb,pb,fb=function(){function e(){R(this,e)}return S(e,[{key:"getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",A);var v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:v,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:A,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:c===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_isTokenGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new C(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new C(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new C(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new C(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(qs.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new C(e,!0);return n.query=lb(lb({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),mb=function(){try{return(new fb).getBridgeContext()}catch(e){return{}}}(),gb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(hb=!1,(pb=c("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===pb.xanthophyll&&(hb=!0),hb)},Ab=il.charAt,vb=le,bb=ve,_b=Math.floor,yb=vb("".charAt),wb=vb("".replace),kb=vb("".slice),Eb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,xb=/\$([$&'`]|\d{1,2})/g,Db=Zc,Sb=bt,Rb=le,Tb=Wv,Cb=ae,Ib=gt,Ob=et,Pb=he,Bb=Jr,Lb=$r,Ub=As,Mb=me,Fb=function(e,t,n){return t+(n?Ab(e,t).length:1)},jb=Mt,Gb=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,c=xb;return void 0!==i&&(i=bb(i),c=Eb),wb(a,c,(function(a,c){var d;switch(yb(c,0)){case"$":return"$";case"&":return e;case"`":return kb(t,0,n);case"'":return kb(t,s);case"<":d=i[kb(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>o){var l=_b(u/10);return 0===l?a:l<=o?void 0===r[l-1]?yb(c,1):r[l-1]+yb(c,1):a}d=r[u-1]}return void 0===d?"":d}))},Nb=tb,qb=Ke("replace"),Hb=Math.max,Vb=Math.min,Qb=Rb([].concat),zb=Rb([].push),Wb=Rb("".indexOf),Kb=Rb("".slice),Yb="$0"==="a".replace(/./,"$0"),Jb=!!/./[qb]&&""===/./[qb]("a","$0");Tb("replace",(function(e,t,n){var r=Jb?"$":"$0";return[function(e,n){var r=Mb(this),i=Pb(e)?void 0:jb(e,qb);return i?Sb(i,e,r,n):Sb(t,Ub(r),e,n)},function(e,i){var a=Ib(this),s=Ub(e);if("string"==typeof i&&-1===Wb(i,r)&&-1===Wb(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var c=Ob(i);c||(i=Ub(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=Nb(a,s);if(null===h)break;if(zb(l,h),!d)break;""===Ub(h[0])&&(a.lastIndex=Fb(s,Lb(a.lastIndex),u))}for(var p,f="",m=0,g=0;g<l.length;g++){for(var A=Ub((h=l[g])[0]),v=Hb(Vb(Bb(h.index),s.length),0),b=[],_=1;_<h.length;_++)zb(b,void 0===(p=h[_])?p:String(p));var y=h.groups;if(c){var w=Qb([A],b,v,s);void 0!==y&&zb(w,y);var k=Ub(Db(i,void 0,w))}else k=Gb(A,s,v,b,y,i);v>=m&&(f+=Kb(s,m,v)+k,m=v+A.length)}return f+Kb(s,m)}]}),!!Cb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Yb||Jb);var Zb=ae,Xb=nt,$b=Ke("iterator"),e_=!Zb((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Xb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[$b]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),t_=Ar,n_=Xs,r_=Math.floor,i_=function(e,t){var n=e.length,r=r_(n/2);return n<8?a_(e,t):s_(e,i_(n_(e,0,r),t),i_(n_(e,r),t),t)},a_=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},s_=function(e,t,n,r){for(var i=t.length,a=n.length,s=0,o=0;s<i||o<a;)e[s+o]=s<i&&o<a?r(t[s],n[o])<=0?t[s++]:n[o++]:s<i?t[s++]:n[o++];return e},o_=$a,c_=K,d_=bt,u_=le,l_=nt,h_=e_,p_=Ar,f_=oo,m_=function(e,t,n){for(var r in t)t_(e,r,t[r],n);return e},g_=ko,A_=Tl,v_=Yn,b_=tf,__=et,y_=ye,w_=Nr,k_=Rr,E_=gt,x_=at,D_=As,S_=Gs,R_=Sn,T_=Ru,C_=yu,I_=hf,O_=i_,P_=Ke("iterator"),B_="URLSearchParams",L_=B_+"Iterator",U_=v_.set,M_=v_.getterFor(B_),F_=v_.getterFor(L_),j_=Object.getOwnPropertyDescriptor,G_=function(e){if(!l_)return c_[e];var t=j_(c_,e);return t&&t.value},N_=G_("fetch"),q_=G_("Request"),H_=G_("Headers"),V_=q_&&q_.prototype,Q_=H_&&H_.prototype,z_=c_.RegExp,W_=c_.TypeError,K_=c_.decodeURIComponent,Y_=c_.encodeURIComponent,J_=u_("".charAt),Z_=u_([].join),X_=u_([].push),$_=u_("".replace),ey=u_([].shift),ty=u_([].splice),ny=u_("".split),ry=u_("".slice),iy=/\+/g,ay=Array(4),sy=function(e){return ay[e-1]||(ay[e-1]=z_("((?:%[\\da-f]{2}){"+e+"})","gi"))},oy=function(e){try{return K_(e)}catch(t){return e}},cy=function(e){var t=$_(e,iy," "),n=4;try{return K_(t)}catch(e){for(;n;)t=$_(t,sy(n--),oy);return t}},dy=/[!'()~]|%20/g,uy={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ly=function(e){return uy[e]},hy=function(e){return $_(Y_(e),dy,ly)},py=A_((function(e,t){U_(this,{type:L_,iterator:T_(M_(e).entries),kind:t})}),"Iterator",(function(){var e=F_(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),fy=function(e){this.entries=[],this.url=null,void 0!==e&&(x_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===J_(e,0)?ry(e,1):e:D_(e)))};fy.prototype={type:B_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,c=C_(e);if(c)for(n=(t=T_(e,c)).next;!(r=d_(n,t)).done;){if(a=(i=T_(E_(r.value))).next,(s=d_(a,i)).done||(o=d_(a,i)).done||!d_(a,i).done)throw W_("Expected sequence with length 2");X_(this.entries,{key:D_(s.value),value:D_(o.value)})}else for(var d in e)y_(e,d)&&X_(this.entries,{key:d,value:D_(e[d])})},parseQuery:function(e){if(e)for(var t,n,r=ny(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=ny(t,"="),X_(this.entries,{key:cy(ey(n)),value:cy(Z_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],X_(n,hy(e.key)+"="+hy(e.value));return Z_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var my=function(){b_(this,gy);var e=U_(this,new fy(arguments.length>0?arguments[0]:void 0));l_||(this.length=e.entries.length)},gy=my.prototype;if(m_(gy,{append:function(e,t){I_(arguments.length,2);var n=M_(this);X_(n.entries,{key:D_(e),value:D_(t)}),l_||this.length++,n.updateURL()},delete:function(e){I_(arguments.length,1);for(var t=M_(this),n=t.entries,r=D_(e),i=0;i<n.length;)n[i].key===r?ty(n,i,1):i++;l_||(this.length=n.length),t.updateURL()},get:function(e){I_(arguments.length,1);for(var t=M_(this).entries,n=D_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){I_(arguments.length,1);for(var t=M_(this).entries,n=D_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&X_(r,t[i].value);return r},has:function(e){I_(arguments.length,1);for(var t=M_(this).entries,n=D_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){I_(arguments.length,1);for(var n,r=M_(this),i=r.entries,a=!1,s=D_(e),o=D_(t),c=0;c<i.length;c++)(n=i[c]).key===s&&(a?ty(i,c--,1):(a=!0,n.value=o));a||X_(i,{key:s,value:o}),l_||(this.length=i.length),r.updateURL()},sort:function(){var e=M_(this);O_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=M_(this).entries,r=w_(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new py(this,"keys")},values:function(){return new py(this,"values")},entries:function(){return new py(this,"entries")}},{enumerable:!0}),p_(gy,P_,gy.entries,{name:"entries"}),p_(gy,"toString",(function(){return M_(this).serialize()}),{enumerable:!0}),l_&&f_(gy,"size",{get:function(){return M_(this).entries.length},configurable:!0,enumerable:!0}),g_(my,B_),o_({global:!0,constructor:!0,forced:!h_},{URLSearchParams:my}),!h_&&__(H_)){var Ay=u_(Q_.has),vy=u_(Q_.set),by=function(e){if(x_(e)){var t,n=e.body;if(k_(n)===B_)return t=e.headers?new H_(e.headers):new H_,Ay(t,"content-type")||vy(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S_(e,{body:R_(0,D_(n)),headers:R_(0,t)})}return e};if(__(N_)&&o_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return N_(e,arguments.length>1?by(arguments[1]):{})}}),__(q_)){var _y=function(e){return b_(this,V_),new q_(e,arguments.length>1?by(arguments[1]):{})};V_.constructor=_y,_y.prototype=V_,o_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:_y})}}var yy={URLSearchParams:my,getState:M_},wy=ma.includes,ky=vp;$a({target:"Array",proto:!0,forced:ae((function(){return!Array(1).includes()}))},{includes:function(e){return wy(this,e,arguments.length>1?arguments[1]:void 0)}}),ky("includes");var Ey=$a,xy=cv,Dy=me,Sy=As,Ry=uv,Ty=le("".indexOf);function Cy(e){var n=this,r={},i=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,s=(null==e?void 0:e.self_origin)||window.location.origin,o=(null==e?void 0:e.referrer_url)||document.referrer;function c(e){return B(r,e)}function d(e,t){return L(r,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new C(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,o],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var s=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(s&&(s=(s=decodeURIComponent(s)).startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),O.isURL(s)))return s}}}return function(){var e;t(this,n),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(d("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],d("top.domain.from","origins");else if(0===t)n=s,d("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,d("top.domain.from","referrer"))}d("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(P(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",r.top.domain.value),d("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?P(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",o),d("partner.url.from","fallback"))}.bind(this)(),{get:c,print:function(e){console.log(c(e))}}}Ey({target:"String",proto:!0,forced:!Ry("includes")},{includes:function(e){return!!~Ty(Sy(Dy(this)),Sy(xy(e)),arguments.length>1?arguments[1]:void 0)}});var Iy="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Iy&&Iy,Oy={searchParams:"URLSearchParams"in Iy,iterable:"Symbol"in Iy&&"iterator"in Symbol,blob:"FileReader"in Iy&&"Blob"in Iy&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in Iy,arrayBuffer:"ArrayBuffer"in Iy};if(Oy.arrayBuffer)var Py=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],By=ArrayBuffer.isView||function(e){return e&&Py.indexOf(Object.prototype.toString.call(e))>-1};function Ly(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function Uy(e){return"string"!=typeof e&&(e=String(e)),e}function My(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Oy.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Fy(e){this.map={},e instanceof Fy?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function jy(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Gy(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Ny(e){var t=new FileReader,n=Gy(t);return t.readAsArrayBuffer(e),n}function qy(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Hy(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Oy.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Oy.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Oy.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Oy.arrayBuffer&&Oy.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=qy(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Oy.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||By(e))?this._bodyArrayBuffer=qy(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Oy.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Oy.blob&&(this.blob=function(){var e=jy(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=jy(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(Ny)}),this.text=function(){var e=jy(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Gy(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Oy.formData&&(this.formData=function(){return this.text().then(zy)}),this.json=function(){return this.text().then(JSON.parse)},this}Fy.prototype.append=function(e,t){e=Ly(e),t=Uy(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Fy.prototype.delete=function(e){delete this.map[Ly(e)]},Fy.prototype.get=function(e){return e=Ly(e),this.has(e)?this.map[e]:null},Fy.prototype.has=function(e){return this.map.hasOwnProperty(Ly(e))},Fy.prototype.set=function(e,t){this.map[Ly(e)]=Uy(t)},Fy.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Fy.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),My(e)},Fy.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),My(e)},Fy.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),My(e)},Oy.iterable&&(Fy.prototype[Symbol.iterator]=Fy.prototype.entries);var Vy=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Qy(e,t){if(!(this instanceof Qy))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof Qy){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Fy(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Fy(t.headers)),this.method=function(e){var t=e.toUpperCase();return Vy.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function zy(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Wy(e,t){if(!(this instanceof Wy))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Fy(t.headers),this.url=t.url||"",this._initBody(e)}Qy.prototype.clone=function(){return new Qy(this,{body:this._bodyInit})},Hy.call(Qy.prototype),Hy.call(Wy.prototype),Wy.prototype.clone=function(){return new Wy(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Fy(this.headers),url:this.url})},Wy.error=function(){var e=new Wy(null,{status:0,statusText:""});return e.type="error",e};var Ky=[301,302,303,307,308];Wy.redirect=function(e,t){if(-1===Ky.indexOf(t))throw new RangeError("Invalid status code");return new Wy(null,{status:t,headers:{location:e}})};var Yy,Jy=Iy.DOMException;try{new Jy}catch(e){Jy=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Jy.prototype=Object.create(Error.prototype),Jy.prototype.constructor=Jy}function Zy(e,t){return new Promise((function(n,r){var i=new Qy(e,t);if(i.signal&&i.signal.aborted)return r(new Jy("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Fy,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new Wy(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new Jy("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Iy.location.href?Iy.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&(Oy.blob?a.responseType="blob":Oy.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Fy?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,Uy(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}Zy.polyfill=!0,Iy.fetch||(Iy.fetch=Zy,Iy.Headers=Fy,Iy.Request=Qy,Iy.Response=Wy);var Xy=function(e){var n=this;if(!Yy){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:mb.topDomain,domain:mb.parentDomain,referrer:mb.parentURL,depth:o(),version:cs.version,byloader:mb.isTokenGameURL,isTokenGameURL:mb.isTokenGameURL,isMasterGameURL:mb.isMasterGameURL,isExtHostedGameURL:mb.isExtHostedGameURL,byloaderVersion:mb.version,tracking:gb.userDeclinedTracking,whitelabel:gb.whitelabelPartner,platform:u()};Yy=new l(r)}return Yy||{send:function(){t(this,n)}.bind(this)}},$y={getGameData:function(e){var n=this;try{var r=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var n=this;try{var r="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(r).then(function(e){t(this,n)}.bind(this)).catch(function(e){t(this,n)}.bind(this))}catch(e){}}},ew={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},tw={gameAPI:"game.api.gamedistribution.com"},nw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},rw=function(){var e=this,n=ew.acc.some(function(n){var r;return t(this,e),n===(null===(r=window.location.host)||void 0===r?void 0:r.toLowerCase())}.bind(this));return{env:n?"acc":"prod",config:n?nw:tw}},iw=function(e){var n=this,r=e.url;return new Promise(function(e,i){t(this,n);var a=new XMLHttpRequest;a.open("GET",r,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else i(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){i(e)},a.send()}.bind(this))};function aw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aw(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ow,cw,dw,uw=new M,lw=[],hw=function(e){lw.push(e)},pw=function(e){ow=Xy(dw=e)},fw=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(cw){e.next=6;break}return e.next=3,Aw(dw);case 3:cw=e.sent,uw.emit("game-data-ready",cw),mw();case 6:return e.abrupt("return",cw);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),mw=function(){var t,n;if(null!==(t=cw)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,c;if(gw(),null!==(i=cw)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=cw)&&void 0!==o&&o.url)$y.getGameData(null===(c=cw)||void 0===c?void 0:c.url);setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Aw(dw);case 3:cw=e.sent,ls("gd-aws-test, new game data received",null===(t=cw)||void 0===t?void 0:t.aws_tst),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),e,null,[[0,7]])}))),3e5)}},gw=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,_,y,w,k=this,E=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(u=E.length,l=new Array(u),h=0;h<u;h++)l[h]=E[h];p=l[0],f=l[1],m=null===(i=cw)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,g=null===(o=cw)||void 0===o||null===(c=o.aws_tst)||void 0===c||null===(d=c.ep)||void 0===d?void 0:d.msgrt,A=function(e,r){var i=this;t(this,k);var a=p.replace(e,r);n(a,f).then(function(){t(this,i)}.bind(this))}.bind(this);try{m&&p.indexOf("tag.atom")>0&&A("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),g&&p.indexOf("msgrt.gamedistribution.com")>0&&(ls("gd-aws-test hook",null===(v=cw)||void 0===v?void 0:v.aws_tst,null===(b=cw)||void 0===b||null===(_=b.aws_tst)||void 0===_||null===(y=_.ep)||void 0===y?void 0:y.msgrt),A("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(p,f);case 9:return w=e.sent,e.abrupt("return",w);case 11:case"end":return e.stop()}}),e,this)})))},Aw=function(n){var i=this;ow.send("gdfw.loading",{message:"loading"}),lw=[],hw("1"),hw("2");var a=new Cy;hw("3");var s=a.get("partner.domain.value");hw("4");var o=function(){return t(this,i),{gameId:n.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);hw("5");var c=function(){t(this,i);var e=d(),r=e?"&mode=".concat(e):"",a=rw().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(cs.version,"&localTime=").concat((new Date).getHours())}.bind(this);hw("6");var d=function(){var e=this;t(this,i);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}.bind(this);return hw("7"),new Promise(function(n){var a=this;t(this,i),hw("7.1");var s=o();try{hw("7.2");var d=c();hw("7.3"),fetch(d).then(function(){var t=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return hw("7.4"),e.prev=1,e.next=4,t.json();case 4:n=e.sent,e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(1),ls("gameData fetch error, fallback to other ajax api",e.t0),e.next=12,iw({url:d});case 12:n=e.sent;case 13:return e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[1,7]])})));return function(e){return t.apply(this,arguments)}}()).then(function(e){var r=this;if(t(this,a),hw("7.5"),e.success){var i,o,c,u=e.result.game;hw("7.6");var l={company:u.company,gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,activeStatus:u.activeStatus,description:u.description,disableAds:u.enableAds,preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,publishedAt:u.publishedAt,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,dmn:u.dmn,aws_tst:u.aws_tst,meta:u.meta,adsc:u.adsc,adspn:ds(u.adspn)||{},__t4r:ds(u.__t4r)||{},block_exts:ds(u.push_cuda),bloc_gard:ds(u.bloc_gard),cookie:ds(u.cookie),gdpr:ds(u.gdpr),diagnostic:ds(u.diagnostic),cmp:ds(u.cmp),gft:ds(u.gft)||{},sdk:ds(u.sdk)||{},sdkfw:ds(u.sdkfw)||{},loader:ds(u.loader)||{},splash:ds(u.splash)||{},promo:ds(u.promo)||{},dAds:ds(u.dads)||{},pAds:ds(u.pads)||{},mAds:ds(u.mads)||{},rAds:ds(u.rads)||{},lp:ds(u.lp)||{},extsc:ds(u.extsc)||{},evnts:ds(u.evnts)||{},dp:ds(u.dp)||{},adflw:ds(u.adflw)||{},afgszf:ds(u.afgszf)||{},fllc:ds(u.fllc)||{},lotm:ds(u.lotm)||{},t4rc:ds(u.t4rc)||{},midroll_plus:ds(u.midroll_plus)||{},gmky:ds(u.gmky)||{},urlBlockExc:ds(u.url_blck_exc)||{},sdk_wrp:ds(u.sdk_wrp)||{},dbglg:ds(u.dbglg)||{},extHosting:ds(u.ext_hosting)||{},directTokenUse:ds(u.dtu)||{},aeria:ds(u.aeria)||{},advlm:ds(u.advlm)||{},ad_blcks:ds(u.ad_blcks)||{},rmblck:ds(u.rmblck)||{},gs_trc:ds(u.gs_trc)||{},rwskp:ds(u.rwskp)||{},isv_fw:ds(u.isv_fw)||{},ext_vst:ds(u.ext_vst)||{},fix_score:ds(u.fix_score)||{},compensation:ds(u.comps)||{}};hw("7.7");var p=h(U(s),l);hw("7.8"),p.afg_disabled=!1===(null===(i=p.sdk)||void 0===i||null===(o=i.afg)||void 0===o?void 0:o.enabled),p.url=d,function(){t(this,r),void 0!==fs.afgEnabled&&(p.afg_disabled=!fs.afgEnabled),void 0!==fs.promoEnabled&&(p.promo=p.promo||{},p.promo=sw(sw({},p.promo),{},{rainbow:{enabled:fs.promoEnabled}}))}.bind(this),hw("7.9"),null!==(c=p.pAds)&&void 0!==c&&c.enabled&&(p.preroll=!0),hw("7.10"),ow.send("gdfw.success",{message:"success"}),n(p)}else{s.failed=!0;var f=lw[lw.length-1];ow.send("gdfw.err",{message:"".concat(f,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=lw[lw.length-1];ow.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=lw[lw.length-1];ow.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},vw=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return n=e.sent,e.abrupt("return",!(null==n||null===(t=n.sdkfw)||void 0===t||!t.enabled));case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),bw=function(){var t=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return n=e.sent,i=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),_w=function(){var t=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return n=e.sent,e.next=5,vw();case 5:if(e.t0=e.sent,!e.t0){e.next=8;break}e.t0=!(null==n||null===(t=n.sdkfw)||void 0===t||!t.handshake);case 8:return e.abrupt("return",e.t0);case 9:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),yw=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return c=e.sent,d=!(null==c||null===(t=c.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==c||null===(n=c.extsc)||void 0===n?void 0:n.path:"",name:d?null==c||null===(i=c.extsc)||void 0===i?void 0:i.name:"",ref:d?null==c||null===(a=c.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==c||null===(s=c.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==c||null===(o=c.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),ww=function(){var n=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yw();case 2:if((n=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return i=n.path,a=n.name,s=n.ref,e.prev=6,o={},e.next=10,f(i,a,{error_prefix:"Blocked:",exists:function(){return t(this,c),!!s&&!!window[s]}.bind(this),attrs:o});case 10:e.next=16;break;case 12:e.prev=12,e.t0=e.catch(6),console.log("extsc: error on external partner script load",a,e.t0),p("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return n.apply(this,arguments)}}(),kw=!1,Ew=!1,xw=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!kw){e.next=4;break}return e.abrupt("return",n(Ew));case 4:kw=!0;case 5:return e.next=7,yw();case 7:if((a=e.sent).enabled){e.next=10;break}return e.abrupt("return",n(!1));case 10:if(s=a.loadedFlag,!(o=a.loadedFlagCheck)||s){e.next=13;break}return e.abrupt("return",n(!1));case 13:if(o){e.next=16;break}return Ew=!0,e.abrupt("return",n(!0));case 16:c=!0,setTimeout(function(){t(this,u),c&&(c=!1,kw=!0,n(!1))}.bind(this),5e3),d=setInterval(function(){t(this,u),c&&o&&window[s]?(c=!1,kw=!0,Ew=!0,clearInterval(d),n(!0)):c||clearInterval(d)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},Dw=$a,Sw=mm,Rw=ae,Tw=wt,Cw=et,Iw=uf,Ow=AA,Pw=Ar,Bw=Sw&&Sw.prototype;if(Dw({target:"Promise",proto:!0,real:!0,forced:!!Sw&&Rw((function(){Bw.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Iw(this,Tw("Promise")),n=Cw(e);return this.then(n?function(n){return Ow(t,e()).then((function(){return n}))}:e,n?function(n){return Ow(t,e()).then((function(){throw n}))}:e)}}),Cw(Sw)){var Lw=Tw("Promise").prototype.finally;Bw.finally!==Lw&&Pw(Bw,"finally",Lw,{unsafe:!0})}var Uw="\t\n\v\f\r                 \u2028\u2029\ufeff",Mw=me,Fw=As,jw=Uw,Gw=le("".replace),Nw=RegExp("^["+jw+"]+"),qw=RegExp("(^|[^"+jw+"])["+jw+"]+$"),Hw=function(e){return function(t){var n=Fw(Mw(t));return 1&e&&(n=Gw(n,Nw,"")),2&e&&(n=Gw(n,qw,"$1")),n}},Vw={start:Hw(1),end:Hw(2),trim:Hw(3)},Qw=gn.PROPER,zw=ae,Ww=Uw,Kw=Vw.trim;$a({target:"String",proto:!0,forced:function(e){return zw((function(){return!!Ww[e]()||"​…᠎"!=="​…᠎"[e]()||Qw&&Ww[e].name!==e}))}("trim")},{trim:function(){return Kw(this)}});var Yw=$a,Jw=Oi.find,Zw=vp,Xw="find",$w=!0;Xw in[]&&Array(1)[Xw]((function(){$w=!1})),Yw({target:"Array",proto:!0,forced:$w},{find:function(e){return Jw(this,e,arguments.length>1?arguments[1]:void 0)}}),Zw(Xw);var ek=et,tk=at,nk=Fl,rk=tt.f,ik=nt,ak=K,sk=le,ok=Qa,ck=function(e,t,n){var r,i;return nk&&ek(r=t.constructor)&&r!==n&&tk(i=r.prototype)&&i!==n.prototype&&nk(e,i),e},dk=Cn,uk=sa.f,lk=kt,hk=av,pk=As,fk=Rv,mk=_h,gk=function(e,t,n){n in e||rk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},Ak=Ar,vk=ae,bk=ye,_k=Yn.enforce,yk=Xp,wk=kh,kk=Dh,Ek=Ke("match"),xk=ak.RegExp,Dk=xk.prototype,Sk=ak.SyntaxError,Rk=sk(Dk.exec),Tk=sk("".charAt),Ck=sk("".replace),Ik=sk("".indexOf),Ok=sk("".slice),Pk=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Bk=/a/g,Lk=/a/g,Uk=new xk(Bk)!==Bk,Mk=mk.MISSED_STICKY,Fk=mk.UNSUPPORTED_Y,jk=ik&&(!Uk||Mk||wk||kk||vk((function(){return Lk[Ek]=!1,xk(Bk)!=Bk||xk(Lk)==Lk||"/a/i"!=xk(Bk,"i")})));if(ok("RegExp",jk)){for(var Gk=function(e,t){var n,r,i,a,s,o,c=lk(Dk,this),d=hk(e),u=void 0===t,l=[],h=e;if(!c&&d&&u&&e.constructor===Gk)return e;if((d||lk(Dk,e))&&(e=e.source,u&&(t=fk(h))),e=void 0===e?"":pk(e),t=void 0===t?"":pk(t),h=e,wk&&"dotAll"in Bk&&(r=!!t&&Ik(t,"s")>-1)&&(t=Ck(t,/s/g,"")),n=t,Mk&&"sticky"in Bk&&(i=!!t&&Ik(t,"y")>-1)&&Fk&&(t=Ck(t,/y/g,"")),kk&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,c=!1,d=0,u="";r<=n;r++){if("\\"===(t=Tk(e,r)))t+=Tk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:Rk(Pk,Ok(e,r+1))&&(r+=2,c=!0),i+=t,d++;continue;case">"===t&&c:if(""===u||bk(s,u))throw new Sk("Invalid capture group name");s[u]=!0,a[a.length]=[u,d],c=!1,u="";continue}c?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=ck(xk(e,t),c?this:Dk,Gk),(r||i||l.length)&&(o=_k(s),r&&(o.dotAll=!0,o.raw=Gk(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=Tk(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+Tk(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{dk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Nk=uk(xk),qk=0;Nk.length>qk;)gk(Gk,xk,Nk[qk++]);Dk.constructor=Gk,Gk.prototype=Dk,Ak(ak,"RegExp",Gk,{constructor:!0})}yk("RegExp");var Hk=nt,Vk=le,Qk=ns,zk=Ji,Wk=Vk(Vi.f),Kk=Vk([].push),Yk=function(e){return function(t){for(var n,r=zk(t),i=Qk(r),a=i.length,s=0,o=[];a>s;)n=i[s++],Hk&&!Wk(r,n)||Kk(o,e?[n,r[n]]:r[n]);return o}},Jk={entries:Yk(!0),values:Yk(!1)}.values;$a({target:"Object",stat:!0},{values:function(e){return Jk(e)}});var Zk=$a,Xk=zr,$k=Ji,eE=Bi,tE=le([].join);Zk({target:"Array",proto:!0,forced:Xk!=Object||!eE("join",",")},{join:function(e){return tE($k(this),void 0===e?",":e)}});var nE=Oi.map;$a({target:"Array",proto:!0,forced:!Bd("map")},{map:function(e){return nE(this,e,arguments.length>1?arguments[1]:void 0)}});var rE=nt,iE=le,aE=bt,sE=ae,oE=ns,cE=xa,dE=Vi,uE=ve,lE=zr,hE=Object.assign,pE=Object.defineProperty,fE=iE([].concat),mE=!hE||sE((function(){if(rE&&1!==hE({b:1},hE(pE({},"a",{enumerable:!0,get:function(){pE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=hE({},e)[n]||oE(hE({},t)).join("")!=r}))?function(e,t){for(var n=uE(e),r=arguments.length,i=1,a=cE.f,s=dE.f;r>i;)for(var o,c=lE(arguments[i++]),d=a?fE(oE(c),a(c)):oE(c),u=d.length,l=0;u>l;)o=d[l++],rE&&!aE(s,c,o)||(n[o]=c[o]);return n}:hE,gE=mE;$a({target:"Object",stat:!0,arity:2,forced:Object.assign!==gE},{assign:gE});var AE,vE=le,bE=2147483647,_E=/[^\0-\u007E]/,yE=/[.\u3002\uFF0E\uFF61]/g,wE="Overflow: input needs wider integers to process",kE=RangeError,EE=vE(yE.exec),xE=Math.floor,DE=String.fromCharCode,SE=vE("".charCodeAt),RE=vE([].join),TE=vE([].push),CE=vE("".replace),IE=vE("".split),OE=vE("".toLowerCase),PE=function(e){return e+22+75*(e<26)},BE=function(e,t,n){var r=0;for(e=n?xE(e/700):e>>1,e+=xE(e/t);e>455;)e=xE(e/35),r+=36;return xE(r+36*e/(e+38))},LE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=SE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=SE(e,n++);56320==(64512&a)?TE(t,((1023&i)<<10)+(1023&a)+65536):(TE(t,i),n--)}else TE(t,i)}return t}(e);var n,r,i=e.length,a=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&TE(t,DE(r));var c=t.length,d=c;for(c&&TE(t,"-");d<i;){var u=bE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=d+1;if(u-a>xE((bE-s)/l))throw kE(wE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>bE)throw kE(wE);if(r==a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,g=36-f;TE(t,DE(PE(f+m%g))),h=xE(m/g),p+=36}TE(t,DE(PE(h))),o=BE(s,l,d==c),s=0,d++}}s++,a++}return RE(t,"")},UE=$a,ME=nt,FE=e_,jE=K,GE=Nr,NE=le,qE=Ar,HE=oo,VE=tf,QE=ye,zE=mE,WE=Gu,KE=Xs,YE=il.codeAt,JE=function(e){var t,n,r=[],i=IE(CE(OE(e),yE,"."),".");for(t=0;t<i.length;t++)n=i[t],TE(r,EE(_E,n)?"xn--"+LE(n):n);return RE(r,".")},ZE=As,XE=ko,$E=hf,ex=yy,tx=Yn,nx=tx.set,rx=tx.getterFor("URL"),ix=ex.URLSearchParams,ax=ex.getState,sx=jE.URL,ox=jE.TypeError,cx=jE.parseInt,dx=Math.floor,ux=Math.pow,lx=NE("".charAt),hx=NE(/./.exec),px=NE([].join),fx=NE(1..toString),mx=NE([].pop),gx=NE([].push),Ax=NE("".replace),vx=NE([].shift),bx=NE("".split),_x=NE("".slice),yx=NE("".toLowerCase),wx=NE([].unshift),kx="Invalid scheme",Ex="Invalid host",xx="Invalid port",Dx=/[a-z]/i,Sx=/[\d+-.a-z]/i,Rx=/\d/,Tx=/^0x/i,Cx=/^[0-7]+$/,Ix=/^\d+$/,Ox=/^[\da-f]+$/i,Px=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Bx=/[\0\t\n\r #/:<>?@[\\\]^|]/,Lx=/^[\u0000-\u0020]+/,Ux=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Mx=/[\t\n\r]/g,Fx=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)wx(t,e%256),e=dx(e/256);return px(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=fx(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},jx={},Gx=zE({},jx,{" ":1,'"':1,"<":1,">":1,"`":1}),Nx=zE({},Gx,{"#":1,"?":1,"{":1,"}":1}),qx=zE({},Nx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Hx=function(e,t){var n=YE(e,0);return n>32&&n<127&&!QE(t,e)?e:encodeURIComponent(e)},Vx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Qx=function(e,t){var n;return 2==e.length&&hx(Dx,lx(e,0))&&(":"==(n=lx(e,1))||!t&&"|"==n)},zx=function(e){var t;return e.length>1&&Qx(_x(e,0,2))&&(2==e.length||"/"===(t=lx(e,2))||"\\"===t||"?"===t||"#"===t)},Wx=function(e){return"."===e||"%2e"===yx(e)},Kx={},Yx={},Jx={},Zx={},Xx={},$x={},eD={},tD={},nD={},rD={},iD={},aD={},sD={},oD={},cD={},dD={},uD={},lD={},hD={},pD={},fD={},mD=function(e,t,n){var r,i,a,s=ZE(e);if(t){if(i=this.parse(s))throw ox(i);this.searchParams=null}else{if(void 0!==n&&(r=new mD(n,!0)),i=this.parse(s,null,r))throw ox(i);(a=ax(new ix)).bindURL(this),this.searchParams=a}};mD.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,c=this,d=t||Kx,u=0,l="",h=!1,p=!1,f=!1;for(e=ZE(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=Ax(e,Lx,""),e=Ax(e,Ux,"$1")),e=Ax(e,Mx,""),r=WE(e);u<=r.length;){switch(i=r[u],d){case Kx:if(!i||!hx(Dx,i)){if(t)return kx;d=Jx;continue}l+=yx(i),d=Yx;break;case Yx:if(i&&(hx(Sx,i)||"+"==i||"-"==i||"."==i))l+=yx(i);else{if(":"!=i){if(t)return kx;l="",d=Jx,u=0;continue}if(t&&(c.isSpecial()!=QE(Vx,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&Vx[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?d=oD:c.isSpecial()&&n&&n.scheme==c.scheme?d=Zx:c.isSpecial()?d=tD:"/"==r[u+1]?(d=Xx,u++):(c.cannotBeABaseURL=!0,gx(c.path,""),d=hD)}break;case Jx:if(!n||n.cannotBeABaseURL&&"#"!=i)return kx;if(n.cannotBeABaseURL&&"#"==i){c.scheme=n.scheme,c.path=KE(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,d=fD;break}d="file"==n.scheme?oD:$x;continue;case Zx:if("/"!=i||"/"!=r[u+1]){d=$x;continue}d=nD,u++;break;case Xx:if("/"==i){d=rD;break}d=lD;continue;case $x:if(c.scheme=n.scheme,i==AE)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=KE(n.path),c.query=n.query;else if("/"==i||"\\"==i&&c.isSpecial())d=eD;else if("?"==i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=KE(n.path),c.query="",d=pD;else{if("#"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=KE(n.path),c.path.length--,d=lD;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=KE(n.path),c.query=n.query,c.fragment="",d=fD}break;case eD:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,d=lD;continue}d=rD}else d=nD;break;case tD:if(d=nD,"/"!=i||"/"!=lx(l,u+1))continue;u++;break;case nD:if("/"!=i&&"\\"!=i){d=rD;continue}break;case rD:if("@"==i){h&&(l="%40"+l),h=!0,a=WE(l);for(var m=0;m<a.length;m++){var g=a[m];if(":"!=g||f){var A=Hx(g,qx);f?c.password+=A:c.username+=A}else f=!0}l=""}else if(i==AE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==l)return"Invalid authority";u-=WE(l).length+1,l="",d=iD}else l+=i;break;case iD:case aD:if(t&&"file"==c.scheme){d=dD;continue}if(":"!=i||p){if(i==AE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==l)return Ex;if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(s=c.parseHost(l))return s;if(l="",d=uD,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return Ex;if(s=c.parseHost(l))return s;if(l="",d=sD,t==aD)return}break;case sD:if(!hx(Rx,i)){if(i==AE||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=l){var v=cx(l,10);if(v>65535)return xx;c.port=c.isSpecial()&&v===Vx[c.scheme]?null:v,l=""}if(t)return;d=uD;continue}return xx}l+=i;break;case oD:if(c.scheme="file","/"==i||"\\"==i)d=cD;else{if(!n||"file"!=n.scheme){d=lD;continue}if(i==AE)c.host=n.host,c.path=KE(n.path),c.query=n.query;else if("?"==i)c.host=n.host,c.path=KE(n.path),c.query="",d=pD;else{if("#"!=i){zx(px(KE(r,u),""))||(c.host=n.host,c.path=KE(n.path),c.shortenPath()),d=lD;continue}c.host=n.host,c.path=KE(n.path),c.query=n.query,c.fragment="",d=fD}}break;case cD:if("/"==i||"\\"==i){d=dD;break}n&&"file"==n.scheme&&!zx(px(KE(r,u),""))&&(Qx(n.path[0],!0)?gx(c.path,n.path[0]):c.host=n.host),d=lD;continue;case dD:if(i==AE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Qx(l))d=lD;else if(""==l){if(c.host="",t)return;d=uD}else{if(s=c.parseHost(l))return s;if("localhost"==c.host&&(c.host=""),t)return;l="",d=uD}continue}l+=i;break;case uD:if(c.isSpecial()){if(d=lD,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=AE&&(d=lD,"/"!=i))continue}else c.fragment="",d=fD;else c.query="",d=pD;break;case lD:if(i==AE||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=yx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||gx(c.path,"")):Wx(l)?"/"==i||"\\"==i&&c.isSpecial()||gx(c.path,""):("file"==c.scheme&&!c.path.length&&Qx(l)&&(c.host&&(c.host=""),l=lx(l,0)+":"),gx(c.path,l)),l="","file"==c.scheme&&(i==AE||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)vx(c.path);"?"==i?(c.query="",d=pD):"#"==i&&(c.fragment="",d=fD)}else l+=Hx(i,Nx);break;case hD:"?"==i?(c.query="",d=pD):"#"==i?(c.fragment="",d=fD):i!=AE&&(c.path[0]+=Hx(i,jx));break;case pD:t||"#"!=i?i!=AE&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Hx(i,jx)):(c.fragment="",d=fD);break;case fD:i!=AE&&(c.fragment+=Hx(i,Gx))}u++}},parseHost:function(e){var t,n,r;if("["==lx(e,0)){if("]"!=lx(e,e.length-1))return Ex;if(t=function(e){var t,n,r,i,a,s,o,c=[0,0,0,0,0,0,0,0],d=0,u=null,l=0,h=function(){return lx(e,l)};if(":"==h()){if(":"!=lx(e,1))return;l+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=n=0;n<4&&hx(Ox,h());)t=16*t+cx(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,d>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;l++}if(!hx(Rx,h()))return;for(;hx(Rx,h());){if(a=cx(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}c[d]=256*c[d]+i,2!=++r&&4!=r||d++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;l++,u=++d}}if(null!==u)for(s=d-u,d=7;0!=d&&s>0;)o=c[d],c[d--]=c[u+s-1],c[u+--s]=o;else if(8!=d)return;return c}(_x(e,1,-1)),!t)return Ex;this.host=t}else if(this.isSpecial()){if(e=JE(e),hx(Px,e))return Ex;if(t=function(e){var t,n,r,i,a,s,o,c=bx(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(a=10,i.length>1&&"0"==lx(i,0)&&(a=hx(Tx,i)?16:8,i=_x(i,8==a?1:2)),""===i)s=0;else{if(!hx(10==a?Ix:8==a?Cx:Ox,i))return e;s=cx(i,a)}gx(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=ux(256,5-t))return null}else if(s>255)return null;for(o=mx(n),r=0;r<n.length;r++)o+=n[r]*ux(256,3-r);return o}(e),null===t)return Ex;this.host=t}else{if(hx(Bx,e))return Ex;for(t="",n=WE(e),r=0;r<n.length;r++)t+=Hx(n[r],jx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return QE(Vx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Qx(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,s=e.path,o=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=n+(r?":"+r:"")+"@"),d+=Fx(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?s[0]:s.length?"/"+px(s,"/"):"",null!==o&&(d+="?"+o),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw ox(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new gD(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Fx(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(ZE(e)+":",Kx)},getUsername:function(){return this.username},setUsername:function(e){var t=WE(ZE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Hx(t[n],qx)}},getPassword:function(){return this.password},setPassword:function(e){var t=WE(ZE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Hx(t[n],qx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Fx(e):Fx(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,iD)},getHostname:function(){var e=this.host;return null===e?"":Fx(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,aD)},getPort:function(){var e=this.port;return null===e?"":ZE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=ZE(e))?this.port=null:this.parse(e,sD))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+px(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,uD))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=ZE(e))?this.query=null:("?"==lx(e,0)&&(e=_x(e,1)),this.query="",this.parse(e,pD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=ZE(e))?("#"==lx(e,0)&&(e=_x(e,1)),this.fragment="",this.parse(e,fD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var gD=function(e){var t=VE(this,AD),n=$E(arguments.length,1)>1?arguments[1]:void 0,r=nx(t,new mD(e,!1,n));ME||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},AD=gD.prototype,vD=function(e,t){return{get:function(){return rx(this)[e]()},set:t&&function(e){return rx(this)[t](e)},configurable:!0,enumerable:!0}};if(ME&&(HE(AD,"href",vD("serialize","setHref")),HE(AD,"origin",vD("getOrigin")),HE(AD,"protocol",vD("getProtocol","setProtocol")),HE(AD,"username",vD("getUsername","setUsername")),HE(AD,"password",vD("getPassword","setPassword")),HE(AD,"host",vD("getHost","setHost")),HE(AD,"hostname",vD("getHostname","setHostname")),HE(AD,"port",vD("getPort","setPort")),HE(AD,"pathname",vD("getPathname","setPathname")),HE(AD,"search",vD("getSearch","setSearch")),HE(AD,"searchParams",vD("getSearchParams")),HE(AD,"hash",vD("getHash","setHash"))),qE(AD,"toJSON",(function(){return rx(this).serialize()}),{enumerable:!0}),qE(AD,"toString",(function(){return rx(this).serialize()}),{enumerable:!0}),sx){var bD=sx.createObjectURL,_D=sx.revokeObjectURL;bD&&qE(gD,"createObjectURL",GE(bD,sx)),_D&&qE(gD,"revokeObjectURL",GE(_D,sx))}XE(gD,"URL"),UE({global:!0,constructor:!0,forced:!FE,sham:!ME},{URL:gD});var yD=function(){function e(t){R(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return S(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var n={},r=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,i=new C(location.href,!0);for(var a in i.query)n[a]=i.query[a];return Object.keys(n).filter(function(n){var r=this;return t(this,e),this.customParamKeys.some(function(e){return t(this,r),e===n}.bind(this))}.bind(this)).length>0||r?(console.log("custom-params",n,r),n):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),wD=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return S(e,[{key:"show",value:function(){this.adResumeButton.style.display="block",this.adResumeButtonOverlay.style.display="block"}},{key:"hide",value:function(){this.adResumeButton.style.display="none",this.adResumeButtonOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{var n=document.createElement("div");this.adResumeButton=n,n.id="gd__resume__button",n.setAttribute("title","Resume"),this.addStyles(),n.classList.add("gd__resume__button"),n.addEventListener("click",function(){t(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(n);var r=document.createElement("div");this.adResumeButtonOverlay=r,r.id="gd__resume__button__overlay",r.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(r)}catch(e){console.log("Resume button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__resume__button__style",e,'\n .gd__resume__button{\n background-image: url("https://img.gamedistribution.com/play-black.svg");\n background-color:white; \n width: 120px;\n height: 120px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 60px);\n left: calc(50% - 60px);\n margin: 0;\n border-radius: 50%;\n border: 2px solid white;\n animation: play-button 1s ease-in-out infinite alternate;\n -webkit-animation: play-button 1s ease-in-out infinite alternate;\n }\n \n .gd__resume__button__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n @keyframes play-button {\n 0% {\n transform: scale(1.0);\n -webkit-transform: scale(1.0);\n }\n 100% {\n transform: scale(1.1);\n -webkit-transform: scale(1.1);\n }\n }\n .gd__resume__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),kD=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return S(e,[{key:"show",value:function(){this.rewardLabel.style.display="block"}},{key:"hide",value:function(){this.rewardLabel.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div");this.rewardLabel=e;var t=document.createElement("span");t.innerText="To receive the reward, please do not skip the ad",this.addStyles(),e.classList.add("gd__reward__label"),t.classList.add("gd__reward__span"),this.rewardLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__reward__label__style",e,"\n .gd__reward__label{\n background-color:black; \n width: 160px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n left: 10px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n }\n .gd__reward__label:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__reward__span{\n color: white;\n font-size: 12px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),ED=function(){function e(t,n,r){R(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return S(e,[{key:"show",value:function(){this.skipAd.style.display="block"}},{key:"hide",value:function(){this.skipAd.style.display="none"}},{key:"add",value:function(){var e=this;try{var n=document.createElement("div");this.skipAd=n;var r=document.createElement("span");r.innerText="Skip Ad >>",this.addStyles(),n.classList.add("gd__skip__ad"),r.classList.add("gd__skip__span"),this.skipAd.appendChild(r),this.adContainer.appendChild(n),this.skipAd.addEventListener("click",function(){t(this,e),this.OnSkip()}.bind(this))}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__skip__ad__style",e,"\n .gd__skip__ad{\n background-color:black; \n width: 260px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n right: 0px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n padding: 10px;\n }\n .gd__skip__ad:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__skip__span{\n color: white;\n font-size: 22px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),xD=function(){function e(t){R(this,e),this.adContainer=t}return S(e,[{key:"show",value:function(){this.audioLabel.style.display="block"}},{key:"hide",value:function(){this.audioLabel.style.display="none"}},{key:"mute",value:function(){document.getElementById("game").contentWindow.postMessage("mute","*")}},{key:"unmute",value:function(){document.getElementById("game").contentWindow.postMessage("unmute","*")}},{key:"add",value:function(){try{var e=document.createElement("div");this.audioLabel=e;var t=document.createElement("span");t.innerText="Audio Ad is Playing";var n=document.createElement("span");n.innerHTML="&#9432;",this.addStyles(),e.classList.add("gd__audio__label"),t.classList.add("gd__audio__span"),n.classList.add("gd__audio__span"),this.audioLabel.appendChild(n),this.audioLabel.appendChild(t),this.adContainer.appendChild(e)}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__audio__label__style",e,"\n .gd__audio__label{\n background-color: #ffca00; \n width: 200px;\n position: relative;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: 0px;\n margin: 0 auto;\n border-radius: 0px;\n border: 0px;\n text-align: center;\n height: 30px;\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n padding: 5px;\n }\n .gd__audio__span{\n color: black;\n font-size: 14px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),DD=function(){function e(t){R(this,e),this.adContainer=t}return S(e,[{key:"show",value:function(){this.t4rButton.style.display="block"}},{key:"hide",value:function(){this.t4rButton.style.display="none"}},{key:"add",value:function(){try{var e=document.createElement("div"),t=document.createElement("p");this.addStyles(),t.innerText="x",e.appendChild(t),e.id="gd__exit__button",e.setAttribute("title","Exit"),e.classList.add("gd__exit__button"),this.t4rButton=e,document.body.appendChild(e)}catch(e){console.log("Exit button add error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__exit__button__style",e,"\n .gd__exit__button{\n background-color: transparent; \n width: 50px;\n height: 50px;\n position: absolute;\n pointer-events:none; \n z-index: 2000;\n top: 17px;\n right: 17px;\n margin: 0;\n border-radius: 50px;\n border: 1px solid white;\n text-align: center; \n font-size: 16px;\n line-height: normal;\n font-family: 'Arial';\n font-weight: bolder;\n }\n .gd__exit__button:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),SD=function(e){if(!e)return!1;var t=RD.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},RD=Object.prototype.toString;function TD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function CD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ID(e){return null!=e&&e.error_url?"<vmap:VASTAdData>".concat(function(e){return e.promo_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),"</vmap:VASTAdData>"):'<vmap:AdTagURI templateType="vast3"><![CDATA['.concat(null==e?void 0:e.adtag_url,"]]></vmap:AdTagURI>")}var OD,PD="13998",BD="_cc".concat(PD),LD=["https://tags.crwdcntrl.net/c/".concat(PD,"/cc.js?ns=").concat(BD)],UD=function(){return!!OD&&"function"==typeof OD.bcpf&&"function"==typeof OD.add},MD=function(e,t){try{if(!UD())return;OD.add(e,t),ls("lotame add success ".concat(e," ").concat(t))}catch(e){ls("lotame add error",err)}},FD=function(e,t){try{if(!UD())return;OD.bcpw(e,t),ls("lotame send success ".concat(e," ").concat(t))}catch(e){}},jD=function(e){var n=this;try{MD("act","play"),MD("med","game"),"complete"===document.readyState?OD.bcpf():OD.bcp(),e.tags.forEach(function(e){t(this,n),FD("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),FD("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},GD=function(){window.addEventListener("load",(function(){uw.once("game-data-ready",function(){var t=e(r.mark((function e(t){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=mb&&mb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,vw();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(i=t.lotm)&&void 0!==i&&i.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,f(LD[0],"LOTCC_".concat(PD),{alternates:LD});case 16:"object"===n(window[BD])&&(OD=window[BD]),UD()&&jD(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),ls("lotame init error",e.t1);case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},ND=function(){FD("genp","ad video"),FD("act","ad impression")},qD=function(){FD("act","ad skipped")},HD=function(){FD("act","ad click")},VD=function(){FD("act","ad complete")},QD=new Cy,zD=function(e,n){var r=this,i={env:"vp",iu:"/6556/huffpost.desktop.video/en/azerion/video",description_url:QD.get("partner.url.value"),tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},WD=new Cy,KD={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},YD=function(e,n){var r=this,i=function(e,t){var n=WD.get("partner.url.value"),r=KD[t],i="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(i),description_url:n,tfcd:0,npa:0,sz:"400x300|480x360|480x361|640x360|640x480",gdfp_req:1,output:"vast",unviewed_position_start:1,impl:"s",correlator:"".concat(Date.now())}}(e,n),a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(i[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},JD=function(){var e=(new Cy).get("partner.url.value");return C(e,!0).host},ZD=function(e){var t,n=null==e||null===(t=e.ext_vst)||void 0===t?void 0:t.enabled,r=JD(),i="Softgames-Azerion"===(null==e?void 0:e.dname)&&("latimes.com"===r||"www.latimes.com"===r);return n||i},XD=function(e,t){var n=function(e,t){var n,r=function(){var n=t.slug;return YD(n,e)},i={"latimes.com":r,"www.latimes.com":r,"huffpost.com":function(){return t.slug,zD()}},a=JD();return null==i||null===(n=i[a])||void 0===n?void 0:n.call(i,e)}(e,t);return n},$D=function(){var e=(new Cy).get("partner.url.value"),t=new C(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,i="1"===r||"2"===r,a="1"===r;n={useTestAds:i,disableMidrolltimer:a,isRevisionTest:a||i}}return n},eS=function(){function e(){R(this,e),this.adContainer=window.document.body}return S(e,[{key:"show",value:function(e){this.adSpinner.style.display="block",this.adSpinnerOverlay.style.display="block",e?(this.adSpinner.style.display="block",this.adSpinnerFail.style.display="none",this.adSpinnerButton.style.display="none"):(this.adSpinner.style.display="none",this.adSpinnerFail.style.display="block",this.adSpinnerButton.style.display="block")}},{key:"hide",value:function(){this.adSpinner.style.display="none",this.adSpinnerOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{this.addStyles();var n=document.createElement("div");n.id="gd__spinner",n.setAttribute("title","Spinner"),n.classList.add("gd__spinner"),this.adSpinner=n;var r=document.createElement("div");r.id="gd__spinner__fail",r.setAttribute("title","Spinner"),r.classList.add("gd__spinner__fail"),r.innerHTML="No Ads Available!",this.adSpinnerFail=r;var i=document.createElement("div");i.id="gd__spinner__button",i.setAttribute("title","Spinner"),i.classList.add("gd__spinner__button"),i.onclick=function(){t(this,e),this.hide()}.bind(this);var a=document.createElement("p");a.innerText="OK!",i.appendChild(a),this.adSpinnerButton=i;var s=document.createElement("div");s.id="gd__spinner__logo",s.setAttribute("title","Spinner"),s.classList.add("gd__spinner__logo"),this.adSpinnerLogo=s;var o=document.createElement("div");o.id="gd__spinner__container",o.classList.add("gd__spinner__container"),o.appendChild(this.adSpinner),o.appendChild(this.adSpinnerFail),o.appendChild(this.adSpinnerButton),o.appendChild(this.adSpinnerLogo),this.adSpinnerContainer=o;var c=document.createElement("div");c.id="gd__spinner__overlay",c.classList.add("gd__spinner__overlay"),c.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=c,this.adContainer.appendChild(this.adSpinnerOverlay)}catch(e){console.log("Spinner error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__spinner__style",e,'\n .gd__spinner__button{ \n text-align: center; \n width: 150px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 75px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 50px;\n color: white;\n }\n\n .gd__spinner__fail{\n text-align: center; \n width: 300px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(65% - 25px);\n left: calc(50% - 150px);\n margin: 0;\n font-size: large;\n font-family: monospace;\n color: #ff8c1c;\n }\n\n .gd__spinner__logo{\n background: url("https://static.gamedistribution.com/android-chrome-192x192.png") no-repeat;\n background-size: cover; \n width: 100px;\n height: 100px;\n position: absolute;\n display: block;\n z-index: 2000;\n cursor: pointer;\n top: calc(30% - 50px);\n left: calc(50% - 50px);\n margin: 0;\n border-radius: 50%;\n }\n\n .gd__spinner__container{ \n background-color: black; \n width: 300px;\n height: 300px;\n position: absolute;\n z-index: 2000;\n cursor: pointer;\n top: calc(50% - 150px);\n left: calc(50% - 150px);\n margin: 0;\n border-radius: 20px;\n border: 2px solid #06b8a2;\n }\n\n\n .gd__spinner{\n background: url("https://static.gamedistribution.com/assets/loader.gif") no-repeat;\n background-size: cover; \n width: 50px;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n top: calc(80% - 25px);\n left: calc(50% - 25px);\n margin: 0;\n border-radius: 50%;\n }\n \n .gd__spinner__overlay {\n position: fixed;\n display: none;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0,0,0,0.5);\n z-index: 1999;\n cursor: pointer;\n }\n ')}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}();function tS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rS=new M,iS=null,aS=function(){function n(e,r,i){var a=this;if(R(this,n),iS)return iS;iS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new _,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=y(),this.atom_display,this.adType_="",this.rewardGuarantied=!1,this.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==e?document.getElementById(e):null,this.options.width="number"==typeof this.options.width?this.options.width:"100%"===this.options.width?640:this.options.width.replace(/[^0-9]/g,""),this.options.height="number"==typeof this.options.height?this.options.height:"100%"===this.options.height?360:this.options.height.replace(/[^0-9]/g,"");var o=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:o,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:c,this.category="",this.tags=[],this.eventCategory="AD",this.eventBus.subscribe("LOADED",function(){t(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){t(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var i,a,s,o,c,d,u,l,p,w,k,E,x,D,O,P,B,L,M,q,H,V,Q,z,W,K,Y;return S(n,[{key:"start",value:(Y=e(r.mark((function n(){var i,a,s,o=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_afg_script({});case 2:case"end":return e.stop()}}),e)}))));case 3:return i=n.sent,this.afgInitSuccess=i.success,n.next=7,this.adSystemInitialize(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o._init_hl_script();case 2:return e.next=4,o._init_ima_script();case 4:o._createPlayer(),o._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(a=n.sent,this.imaInitSuccess=a.success,s=[],this.afgInitSuccess||s.push(i.error),this.imaInitSuccess||s.push(a.error),!(s.length>0)){n.next=14;break}throw s[0];case 14:window.eventTest=function(e){t(this,o),this._broadcast(e,{message:"",status:"success"})}.bind(this),n.next=21;break;case 17:throw n.prev=17,n.t0=n.catch(0),ps("gd-adflow error on ads.start",n.t0),new Error(n.t0);case 21:case"end":return n.stop()}}),n,this,[[0,17]])}))),function(){return Y.apply(this,arguments)})},{key:"adSystemInitialize",value:(K=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={success:!1},e.prev=1,e.next=4,t();case 4:n.success=!0,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),n.error=e.t0;case 10:return e.abrupt("return",n);case 12:case"end":return e.stop()}}),e,null,[[1,7]])}))),function(e){return K.apply(this,arguments)})},{key:"_getDefaultSpilAdapterConfig",value:function(){return{vast:null,url:"https://pubads.g.doubleclick.net/gampad/ads",query:{correlator:"{{CACHEBUSTER}}",description_url:"{{PAGE_URL}}",env:"vp",gdfp_req:1,impl:"s",iu:"/59392726/gd_instream",npa:0,output:"vast",sz:"640x480|400x300",tfcd:0,unviewed_position_start:1}}}},{key:"_getSpilUrl",value:(W=e(r.mark((function e(t){var n,i,a,s,o,c,d,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,c=this.nextAdPosition(n),e.next=6,this._create_dp_context(c,i);case 6:return d=e.sent,o?(ls("spil-adaptor: in _getSpilUrl, adType, adPosition, gamedata",n,c,this.gameData),u=o[c]||o.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),l=100*d.floor_price,ls("spil-adaptor: fp",d.floor_price),h=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return W.apply(this,arguments)})},{key:"_getAdVast",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h,p,f,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag")||$D().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],c=Math.floor(Math.random()*o.length),d=o[c],s({url:d,tnl_keys:{tnl_ad_pos:null==i?void 0:i.adTypeFound}}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,u=a.nextAdPosition(n),null!=i&&i.adTypeFound&&(u=null==i?void 0:i.adTypeFound),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&j(l.preroll)?l=l.preroll:"midroll"===u&&j(l.midroll)?l=l.midroll:"rewarded"===u&&j(l.rewarded)&&(l=l.rewarded),h="","audio"===i.adapter||"audio"===i.giftType?(a.isAudioAd=!0,h="midrollaudio"):(a.isAudioAd=!1,h="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),e.next=20,window.idhb.isLoaded();case 20:return e.next=22,a._create_dp_context(u,i);case 22:p=e.sent,hs("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(nS(nS({},f),{},{adaptor_order:i.adapterIndex})),ls("hl-order 2",window.idhb.getAdserverTargetingForAdSlot(h)),window.idhb.requestAds({slots:T({},h,{bidFloor:(null==p?void 0:p.floor_price)||void 0}),callback:function(e,n){var r=this;t(this,g),"Missing configuration"===(null==e?void 0:e.error)&&a._broadcast("HL_CONFIG_ERROR",{status:"warning"}),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:nS(nS({},window.idhb.getAdserverTargetingForAdSlot(h)),{},{tnl_ad_pos:u,tnl_asset_id:a.gameData.gameId}),url:e,dp:p,hl:n};a._extend_hl_url(i),s(i)}.bind(this)}),e.next=34;break;case 31:throw e.prev=31,e.t0=e.catch(10),new Error(e.t0);case 34:case"end":return e.stop()}}),e,this,[[10,31]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===g.Rewarded)return this.adRewardedCount++,"rewarded";if(e===g.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===g.Rewarded?"rewarded":e===g.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===g.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===g.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,c=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,n),l=nS(nS({},n),{},{adTag:u,tnl_ad_pos:c});this.adCounter[c]=this.adCounter[c]||0,this.adCounter[c]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!u.bidder&&(h.adtag_url=u.url);var f=this._isVMAP(c);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):u.url="original_broken",ls("gd-adflow, _requestAd, dp.adtag_url",null==h?void 0:h.adtag_url),ls("gd-adflow, _requestAd, dp.fallback_url",null==h?void 0:h.fallback_url),ls("gd-adflow, _requestAd, adTag.url",u.url))}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)d.adTagUrl=m;else if(f){ls("gd-adflow, _isVMAP");var g=function(e){for(var t=[],n="",r=Date.now(),i={ppos:1,lip:!0,vad_type:"linear"},a=0;a<e.length;a++){var s=new C(e[a].adtag.url,!0);s.query=CD(CD({},s.query),{},{ad_rule:0,vpos:e[a].positon,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),a<e.length-1&&(s.query=CD(CD({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),c=1;c<=t.length;c++){var d,u,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(c,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(ID({id:o++,adtag_url:t[c-1],error_url:null===(d=e[c-1].dp)||void 0===d?void 0:d.error_url,impression_url:null===(u=e[c-1].dp)||void 0===u?void 0:u.impression_url,fallback_url:null===(l=e[c-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[c-1].dp)||void 0===h?void 0:h.fallback_imp_url}),"</vmap:AdSource>\n </vmap:AdBreak>")}return'<?xml version="1.0" encoding="UTF-8"?>\n <vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">\n '.concat(n,"\n </vmap:VMAP>").trim()}(this._get_vmap_context({dp:h,adtag:u,position:"preroll"===l.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(c)}));d.adsResponse=g}else if(h&&p.bidFloorApplied){ls("gd-adflow, vast wrapper"),h.adtag_url||(h.adtag_url=u.url);var A=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(h);d.adsResponse=A}else if(h&&h.fallback_url){ls("gd-adflow, vast wrapper 2");var v=function(e){return'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim()}(h);d.adsResponse=v}else ls("gd-adflow, without dp"),d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(n.autoplayAllowed),d.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(d,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=ZD(this.gameData)&&XD(n,this.gameData),ls("external-vast success",t)}catch(e){console.log("external-vast err",e)}return t}},{key:"cancel",value:function(e){var t;if(!1!==this.requestRunning){this.requestRunning=!1,this._resetAdsLoader(),this._hide("cancel");var n=(null==e||null===(t=e.message)||void 0===t?void 0:t.indexOf("NO_VAST_URL"))>=0,r="AD_SDK_CANCELED";this._broadcast(r,{name:r,message:"Advertisement has been canceled.",status:"warning",noVast:n,analytics:{category:this.eventCategory,action:r,label:this.gameData.gameId}})}}},{key:"_checkAutoPlay",value:(z=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome"),F.video({inline:!0,muted:!1}).then(function(n){t(this,i);var r=n.result;n.error,e(!0===r?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return z.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(Q=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._checkAutoPlay(!1);case 2:return t=e.sent,this._autoplay=t,this.video_ad_player.autoplay=t.autoplayAllowed,this.video_ad_player.volume=t.autoplayRequiresMute?0:1,this.video_ad_player.muted=!!t.autoplayRequiresMute,t.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return Q.apply(this,arguments)})},{key:"startAd",value:(V=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.adType,s=n.params,this.adType_=a,this.isAudioAd=!1,this.adContext=nS(nS({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new eS,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==s?void 0:s.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(s,a));case 7:if("adsense"!==(null==s?void 0:s.adapter)){e.next=31;break}if(a!==g.Interstitial){e.next=24;break}if("preroll"!==(null==s?void 0:s.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 13:if("start"!==(null==s?void 0:s.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 17:if("next"!==(null==s?void 0:s.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 22:e.next=29;break;case 24:if(a!==g.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 28:throw new Error("Unsupported ad type");case 29:e.next=44;break;case 31:if(!["ima","spil","audio"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))){e.next=42;break}if(a!==g.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==g.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(s));case 41:throw new Error("Unsupported ad type");case 42:["opus"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))&&this._startOpusAd(s);case 44:case"end":return e.stop()}}),e,this)}))),function(e){return V.apply(this,arguments)})},{key:"_startOpusAd",value:(H=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.adTypeFound="rewarded"===n.adTypeFound?"reward":n.adTypeFound,a=n.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=9;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error",reason:"request-running"}),this._send_atom_event("opus-ad.already-running"),e.abrupt("return");case 9:if(s=null===(i=window.gdlocus)||void 0===i?void 0:i.adBreak){e.next=14;break}return this._send_atom_event("opus-ad.not-initialized"),this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error",reason:"opus-not-found"}),e.abrupt("return");case 14:this._send_atom_event("opus-ad.ready"),o=void function(){return t(this,b),!0}.bind(this),this.requestRunning=!0,c=this.gameData,d=c.gameId,u=c.slug,l=c.title,h={assetId:d,slug:u,title:l,debug:o},p=function(e){t(this,b),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),f=function(e){t(this,b),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),m=function(){t(this,b),this.opusEventReceived=!0}.bind(this),g=function(){t(this,b),this.opusEventReceived=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),A=function(e){t(this,b),this.opusEventReceived=!0,this.resetForNext();var n="".concat(a);this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):this._broadcast("AD_ERROR",{message:e.errorMessage,errorType:e.errorType,status:e.breakStatus,reason:"opus-error"})}.bind(this),console.log("opus-ad meta",h),v={type:a,meta:h,beforeAd:p,afterAd:f,adBreakDone:A},"reward"===a&&(v=nS(nS({},v),{},{adDismissed:m,adViewed:g})),this.opusEventReceived=!1,this._startTimeoutForOpus(),s&&s(v);case 31:case"end":return e.stop()}}),e,this)}))),function(e){return H.apply(this,arguments)})},{key:"preloadAd",value:(q=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==g.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==g.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return q.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this),r=function(){t(this,e),this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!1),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._hideSkipButton(),this.cancel()}.bind(this);try{this.adResume=new wD(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new kD(this.adContainer,n),this.rewardedLabel.add(),this.skipAdButton=new ED(this.adContainer,n,r),this.skipAdButton.add(),this.audioAdLabel=new xD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(M=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u,l,h,p,f,m,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{ls("display_test load",i),(c=i?i.containerId:null)||s("Container id is not specified"),d=document.getElementById(c),document.getElementById(c)||s("No container is found with this id - ".concat(c)),void 0===window.idhb.requestAds&&s("Prebid.js wrapper script hit an error or didn't exist!"),u=i.slotId?i.slotId:"gd__banner@".concat(c),document.getElementById(u)||(l="\n .gd__banner{\n z-index: ".concat(A.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }"),document.getElementById("gd__banner__style")||((h=document.createElement("style")).type="text/css",h.id="gd__banner__style",h.styleSheet?h.styleSheet.cssText=l:h.appendChild(document.createTextNode(l)),d.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),d.appendChild(p)),a.atom_display=null,null!==(o=a.atom_display)&&void 0!==o&&o.params&&window.idhb.setAdserverTargeting(null===(f=a.atom_display)||void 0===f?void 0:f.params),(m={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},ls("display_test slots",m),window.idhb.requestAds({slots:m,callback:function(e){t(this,g),ls("display_test callback",JSON.stringify(e,null,2))}.bind(this)}),n()}catch(e){console.log("display_test error",e),s(e.message||e)}case 1:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return M.apply(this,arguments)})},{key:"_startInterstitialAd",value:(L=e(r.mark((function e(n){var i,a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,d),fs.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return a=e.sent,e.next=13,this._loadInterstitialAd(nS(nS({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(c=this.gameData.advlm)||void 0===c?void 0:c.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),ls("VAST_URL_2 error",e.t0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return L.apply(this,arguments)})},{key:"_startPromo",value:(B=e(r.mark((function e(t,n){var i,a,s,o,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return a=e.sent,e.next=11,this._loadPromo(nS(nS({},a),t),n);case 11:if(s=e.sent,o=s.success,s.args,o){e.next=16;break}return e.abrupt("return");case 16:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(c=this.gameData.advlm)||void 0===c?void 0:c.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return B.apply(this,arguments)})},{key:"_loadPromo",value:(P=e(r.mark((function e(t,n){var i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,i=this.nextAdPosition(n),a=this._create_promo_context(i),this._requestPromo(a,nS({adType:g.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return P.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(O=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(g.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,nS({adType:g.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return O.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var s=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!0,args:e})}.bind(this),1)}.bind(this),o=function(e){var r=this;t(this,i),setTimeout(function(){t(this,r),this.eventBus.unsubscribeScope(a),n({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",s,a),this.eventBus.subscribe("AD_SDK_CANCELED",o,a),this.eventBus.subscribe("AD_ERROR",o,a)}.bind(this))}},{key:"_startRewardedAd",value:(D=e(r.mark((function e(n){var i,a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:if(!void function(){if(t(this,d),fs.fictionalIMAError)return this._broadcast("AD_ERROR",{message:"fictional IMA error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=7;break}return e.abrupt("return");case 7:return this.requestRunning=!0,e.next=10,this._initDisplayContainerWithAutoPlay();case 10:return a=e.sent,e.next=13,this._loadRewardedAd(nS(nS({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:null!==(i=this.adContext)&&void 0!==i&&i.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(c=this.gameData.advlm)||void 0===c?void 0:c.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return D.apply(this,arguments)})},{key:"_loadRewardedAd",value:(x=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._resetAdsLoader(),e.prev=1,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=7;break}return e.next=6,this._getAdVast(g.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,nS({adType:g.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return x.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(E=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(g.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return E.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(k=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(g.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return k.apply(this,arguments)})},{key:"_onError",value:function(e){this.cancel(e),this._clearSafetyTimer("ERROR")}},{key:"_hide",value:function(e){this.video_ad_player&&(this.video_ad_player.src=""),this.activeAdContainer&&(this.activeAdContainer.style.visibility="hidden")}},{key:"_show",value:function(e){var n=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var r=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var i=this._adrequest_user_context.t4RResult?this._adrequest_user_context.t4RResult:this._isT4R(e);this._adrequest_user_context.t4RResult=i;var a=i.success,s=i.reason,o=this._getT4ROptions(e);if("loaded"===r){var c,d,u=(null===(c=this._adrequest_user_context)||void 0===c||null===(d=c.adTag)||void 0===d?void 0:d.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:u}),a||this._broadcast("AD_T4R_NONE",{reason:s}),this.activeAdContainer.style.opacity=a?.001:1,a&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new DD(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){var e;t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(e=this.adContext)&&void 0!==e&&e.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==o?void 0:o.min)||1234)+Math.random()*((null==o?void 0:o.max)||3210))}else if("click"===r||"first_quartile"===r){var l;if(a&&"click"===r){var h,p=null===(h=this._adrequest_user_context)||void 0===h?void 0:h.tnl_ad_pos;this.clickCount[p]++,this._broadcast("AD_T4R_CLICK")}a||"click"!==r||this._broadcast("AD_CLICK"),this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(l=this.adContext)&&void 0!==l&&l.muteRequested?0:1)}}}},{key:"_createPlayer",value:function(){var e=this,n=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=A.AdsContainer.zIndex,this.adContainer.style.top="0",this.adContainer.style.left="0",this.adContainer.style.width="100%",this.adContainer.style.height="100%",this.thirdPartyContainer&&(this.thirdPartyContainer.style.transform=null);var r=document.createElement("video");r.setAttribute("playsinline",!0),r.setAttribute("webkit-playsinline",!0),r.id="".concat(this.prefix,"advertisement_video"),r.style.position="absolute",r.style.backgroundColor="#000000",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.video_ad_player=r,this.adContainer.appendChild(r);var i=document.createElement("div");i.id="".concat(this.prefix,"advertisement_slot"),i.style.position="absolute",i.style.top="0",i.style.left="0",i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",this.adContainerInner=i,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(i),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(i),n.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var a=function(){t(this,e);var n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.options.width=this.thirdPartyContainer?this.thirdPartyContainer.offsetWidth:n,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,i.style.width=this.options.width+"px",i.style.height=this.options.height+"px",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",a),window.document.addEventListener("DOMContentLoaded",a)}},{key:"_setUpIMA",value:function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.adContainerInner,this.video_ad_player),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setDisableCustomPlaybackForIOS10Plus(!0),this.adsLoader.getSettings().setLocale(this.options.locale),this.adsLoader.getSettings().setVpaidMode(this._getVPAIDMode()),this.adsLoader.getSettings().setAutoPlayAdBreaks(!0);var e=this.adsLoader.getSettings().getNumRedirects();this.adsLoader.getSettings().setNumRedirects(2*e),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this._onAdsManagerLoaded,!1,this),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError,!1,this)}},{key:"_onAdsManagerLoaded",value:function(e){var n=this,r=new google.ima.AdsRenderingSettings;r.autoAlign=!1,r.enablePreloading=!1,r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.useStyledNonLinearAds=!0,r.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,r),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this._onAdError.bind(this),!1,this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_METADATA,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CLICK,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.DURATION_CHANGE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.FIRST_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.IMPRESSION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.INTERACTION,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LINEAR_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.MIDPOINT,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.THIRD_QUARTILE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_CHANGED,this._onAdEvent.bind(this),this),this.adsManager.addEventListener(google.ima.AdEvent.Type.VOLUME_MUTED,this._onAdEvent.bind(this),this),window.addEventListener("resize",function(){t(this,n),this.adsManager&&this.adsManager.resize(this.options.width,this.options.height,google.ima.ViewMode.NORMAL)}.bind(this)),this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0);var i=new Date,a=i.getHours(),s=i.getDate(),o=i.getMonth(),c=i.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(c)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r,i,a,s=this,o=new Date,c=o.getHours(),d=o.getDate(),u=o.getMonth(),l=o.getFullYear(),h=v(google.ima.AdEvent.Type,e.type),p=!1,f=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",m=!f.startsWith("image")&&!f.startsWith("text"),A=null==e||null===(r=e.ad)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.title,b=null==e||null===(a=e.getAd())||void 0===a?void 0:a.data.skippable;this._sendIMAEventsToHB(e);var _=document.getElementById("game"),y="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:y="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:y="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(p=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,y="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:y="Fired when the ad is clicked.";var w=e.getAd().getContentType();this._show({mode:"click",contentType:w}),HD();break;case google.ima.AdEvent.Type.COMPLETE:ls("gd-adflow ON COMPLETE!",e.getAd()),p=this._is_completed(e.getAd()),y="Fired when the ad completes playing.",this.adType_!==g.Rewarded||this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0);break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(_.style.display="none"),this.contentPaused=!0,y="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(_.style.display="block"),y="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?p=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide(),this._clearTimeoutForSkipAddButton();break;case google.ima.AdEvent.Type.DURATION_CHANGE:y="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:y="Fired when the ad playhead crosses first quartile.";var k=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:k});break;case google.ima.AdEvent.Type.IMPRESSION:y="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:y="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:y="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var E=e.getAd().getContentType();y=E,this._show({mode:"loaded",contentType:E});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(y=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:y="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==A&&this.adResume.show(),y="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:y="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:y="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:p=this._is_completed(e.getAd()),y="Fired when the ad is skipped by the user.",qD(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var x;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===g.Rewarded)!b&&null!==(x=this.gameData.rwskp)&&void 0!==x&&x.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){t(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4)),this.rewardedLabel.show();this._hideAddResume(),y="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:y="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:p=this._is_completed(e.getAd()),y="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:y="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:y="Fired when the ad volume has been muted."}if(""!==h&&""!==y){var D=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,S=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;D||S||this.isAudioAd||this._broadcast(h,{name:h,message:y,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(c," d").concat(d," m").concat(u," y").concat(l)}})}if(p&&!this.adSuccess){this.adSuccess=!0;var R=e.getAd(),T="Rainbow"===(null==R?void 0:R.getAdSystem())&&(null==R?void 0:R.getWrapperAdIds().some(function(e){return t(this,s),"promo"===e}.bind(this)));ls("gd-adflow isPromoSuccess",T,null==R?void 0:R.getAdSystem(),null==R?void 0:R.getWrapperAdIds()),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:T}),this.resetForNext(e)}}},{key:"_clearTimeoutForSkipAddButton",value:function(){this._skipAdButtonTimeout&&(clearTimeout(this._skipAdButtonTimeout),this._skipAdButtonTimeout=null)}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var c=e.type,d=e.url;if("none"===c||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){t(this,n)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,n){var r=this,i={type:"none"};try{var a=this.current_dp,s=a.id,o=a.error_url,c=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!n)return i={type:"imp_err",url:o};var l=e.getWrapperAdIds().some(function(e){return t(this,r),e==="".concat(s)}.bind(this)),h=e.getWrapperAdIds().some(function(e){return t(this,r),"fallback"===e}.bind(this)),p=e.getWrapperAdIds().some(function(e){return t(this,r),"promo"===e}.bind(this));l&&n?i={type:"normal_imp",url:c}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:u}:h&&n&&(i={type:"fallbacj_imp",url:d})}catch(e){}return i}},{key:"_onAdError",value:function(e){this.requestRunning=!1,this._resetAdsLoader(),this._clearSafetyTimer("ERROR"),this._hide("_onAdError"),this._sendIMAEventsToHB(e);try{var t="AD_ERROR",n=e.getError(),r=n.getErrorCode().toString()||n.getVastErrorCode().toString(),i=this._getInnerErrorCode(n);rS.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume(),this._clearTimeoutForSkipAddButton()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideAdSpinner",value:function(){try{var e;null!==(e=this.gameData.adspn)&&void 0!==e&&e.enabled&&this.adFlowProcessSpinner&&this.adFlowProcessSpinner.hide()}catch(e){console.log("Error on hide adSpinner",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===g.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===g.Rewarded&&this.skipAdButton&&this.skipAdButton.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,n){var r=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){t(this,r),this.cancel(),this._clearSafetyTimer(n)}.bind(this),e)}},{key:"_clearSafetyTimer",value:function(e){void 0!==this.safetyTimer&&null!==this.safetyTimer&&(clearTimeout(this.safetyTimer),this.safetyTimer=void 0)}},{key:"_getVPAIDMode",value:function(){return google.ima.ImaSdkSettings.VpaidMode.ENABLED}},{key:"_getPrebidScripts",value:function(){var e=["https://hb.improvedigital.com/pbw/headerlift.min.js","http://hb.improvedigital.com/pbw/headerlift.min.js"];return this.options.hb_script?[this.options.hb_script].concat(e):e}},{key:"_getInnerErrorCode",value:function(e){if(SD(e.getInnerError)){var t=e.getInnerError();if(t)return SD(t.getErrorCode)&&SD(t.getVastErrorCode)?t.getErrorCode().toString()||t.getVastErrorCode().toString():t.message}}},{key:"resetForNext",value:function(){this.requestRunning=!1,this._hide("resetForNext")}},{key:"_createCustomAdVastUrl",value:function(e,n){var r=this;if(e){var i=this.macros.transform(e,{get:function(e){if(t(this,r),n&&n.tnl_keys)return n.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in i.query||{}){var s=i.query[a];j(s)&&(i.query[a]=G.stringify(s))}var o=new C(i.url,!0);return N(o.query,i.query||{}),nS({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new C(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new C(e.url,!0);if(a.query.cust_params){var s=G.parse(a.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=a}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,n,r){var i=this;if(e&&n&&e.tnl_keys){var a=this.options.vast_query;if(n.retry_on_success&&this.options.retry_on_success&&j(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&j(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=U(a),j(a)){var s=r.query;if(a.$$remove){for(var o in s){new RegExp(a.$$remove,"i").test(o)&&delete s[o]}delete a.$$remove}var c=G.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in c){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete c[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(n){return t(this,i),e.tnl_keys[n.toLowerCase()]}.bind(this)});return s.cust_params=c,N(s,u),s.cust_params=G.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a,s=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx";this.msgrt.send("bidder",{message:s}),ls("ex_bidder ad request context",this._adrequest_user_context,'bidder:"'.concat(s,'"'));var o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[],c=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return c.length>0?d=!c.some(function(n){return t(this,e),n===s}.bind(this)):o.length>0&&(d=o.some(function(n){return t(this,e),n===s}.bind(this))),ls("ex_bidder_result",s,d),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n,r,i=this._isExcludedBidderForT4R(),a=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,s=null!=a&&a.enabled?(null==a?void 0:a.rate)||.8:0,o=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx",c=Math.random();return i||"adx"!==o&&c<s}},{key:"_isT4R",value:function(e){var t=null==e?void 0:e.contentType,n={isImage:null==t?void 0:t.startsWith("image/"),isText:"text"===t,isVideo:null==t?void 0:t.startsWith("video/")},r=Object.values(this._getT4RValidators(e)||{}),i={success:!0};try{for(var a=0,s=r;a<s.length;a++){var o=(0,s[a])(n);if(!o.success){i=o;break}}}catch(e){i={success:!1,reason:"internal-error"}}return i}},{key:"_getT4RValidators",value:function(e){var n=this,r=function(e){if(t(this,n),this.gameData.publishedAt){var r=new Date(this.gameData.publishedAt);return((new Date).getTime()-r.getTime())/864e5<=10?{success:!1,reason:"pdate-1",name:"pdate"}:{success:!0,name:"pdate"}}return{success:!1,reason:"pdate-2",name:"pdate"}}.bind(this),i=function(r){var i,a,s,o;t(this,n);var c=this.gameData.meta,d=e.t4r.meta;return(null==c||null===(i=c.ast)||void 0===i?void 0:i.c)>=(null==d||null===(a=d.ast)||void 0===a?void 0:a.c)&&(null==c||null===(s=c.sit)||void 0===s?void 0:s.c)>=(null==d||null===(o=d.sit)||void 0===o?void 0:o.c)?{success:!1,reason:"meta",name:"meta"}:{success:!0,name:"meta"}}.bind(this),a=function(e){t(this,n);var r=this._isExcludedBidderForT4RWithBidderExcRate();return this.msgrt.send("bidder.ex",{message:r?"true":"false"}),{success:!r,reason:r?"bidder":null,name:"bidder"}}.bind(this),s=function(r){var i,a;t(this,n);var s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos,o=s&&this.clickCount[s]>=(null===(a=e.t4r[s])||void 0===a?void 0:a.count);return{success:!o,reason:o?"click-count":null,name:"click-count"}}.bind(this),o=function(r){var i,a;t(this,n);var s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos,o=s&&(null===(a=e.t4r[s])||void 0===a?void 0:a.enabled);return{success:o,reason:o?null:"rule-check",name:"rule-check"}}.bind(this),c=function(r){var i,a;if(t(this,n),!r.isVideo)return{success:!0,name:"viper-check"};var s=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos,o=(null===(a=e.t4r[s])||void 0===a?void 0:a.viper)||0;if(o>0){var c,d=Math.random()<o,u=s&&d&&(null===(c=e.t4r[s])||void 0===c?void 0:c.enabled);return{success:u,reason:u?null:"viper-check",name:"viper-check"}}return{success:!1,reason:"rule-check-viper",name:"viper-check"}}.bind(this),d=function(e){t(this,n);var r=e.isImage,i=e.isText,a=e.isVideo,s=r||i||a;return{success:s,reason:s?null:"media-format",name:"media-format"}}.bind(this);return{checkRule:o,checkMediaFormat:d,checkPublishDate:r,checkMeta:i,checkClickCount:s,checkViper:c,checkExcludedBidder:a}}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s,o,c,d,u,l,h,p,f,m;if(!e)return!1;var g="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(c=this.gameData)||void 0===c||null===(d=c.mAds)||void 0===d||null===(u=d.vmap)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var A=this._get_vmap_config(e),v=this.adCounter[e];return void 0!==(null==A?void 0:A.start)?v>=(null==A?void 0:A.start):g}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){for(var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=r.count||2,s=[],o=1;o<=a;o++){var c={};c.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,c.position=n,c.dp=r["vast_"+o]?void 0:i,s.push(c)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i,a,s,o,c;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(c=o.pAds)||void 0===c?void 0:c.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new yD(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(I.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(I.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,c="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=o?c:void 0;return function(){t(this,r),fs.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:o?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(n,i){var a=this;return new Promise(function(){var s=e(r.mark((function e(s){var o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,a._isDP(n)){e.next=5;break}return a.msgrt.send("dp.na",{message:"rule"}),e.abrupt("return",s());case 5:c={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(d=new yD(a.gameData).checkCustomParams())&&(c.cp=d),u=encodeURIComponent(I.encode(JSON.stringify(c))),ls("gd-adflow isLastAdapter",null==i?void 0:i.adapterIndex,null==i?void 0:i.isLastAdapter),l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,ls("gd-adflow promo_enabled",!1,null==l?void 0:l.enabled,null==i?void 0:i.isLastAdapter),fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(u)).then(function(e){return t(this,h),e.json()}.bind(this)).then(function(e){if(t(this,h),!e||!e.p)return a.msgrt.send("dp.na",{message:"atom"}),s();var n=e.p/100;a.msgrt.send("dp.fp",{message:n}),s({id:Date.now(),floor_price:n,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(u,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(u),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(u),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){t(this,h),a.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),s()}.bind(this)),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),a.msgrt.send("dp.err",{message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||e.t0}),s();case 20:case"end":return e.stop()}}),e,this,[[0,16]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new C(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var i=G.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=G.stringify(i,!1),e.fallback_url=r.toString(),e.fallback_imp_url="https://tag.atom.gamedistribution.com/v1/rainbow/green"}catch(e){}}},{key:"_extend_hl_url",value:function(e){e.dp;var t=e.hl;e.src;var n=e.tnl_keys,r=!0!==(null==t?void 0:t.bidFloorApplied)?0:1;0===r&&null!=n&&n.hasOwnProperty("fp")?r=2:1!==r||null!=n&&n.hasOwnProperty("fp")||(r=3),n.bfa=r;try{var i,a=new C(e.url,!0);if(null===(i=a.query)||void 0===i||!i.cust_params)return;var s=G.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=G.stringify(s,!1),e.url=a.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(w=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._getPrebidScripts(),a=i[0],s=function(){return t(this,h),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:s},window.idhb.options=window.idhb.options||{},Object.assign(window.idhb.options,{assetId:this.gameData.gameId,configUrl:this.topDomain||this.parentDomain,parentUrl:this.parentURL,pageType:"gd"}),"undefined"===window.idhb.options.configUrl&&(window.idhb.options.configUrl=null),window.idhb.que=window.idhb.que||[],(o=new URL(a)).searchParams.append("referer",window.idhb.options.configUrl),a=o.href,e.next=13,f(a,"gdsdk_prebid",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,h),window.idhb.requestAds}.bind(this)});case 13:return e.next=15,this.checkOpphbPath();case 15:c=b("ch",window.location.href),d=b("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},c&&(u.channel=c),d&&(u.ch_date=d),(l=b("hl_label",this.parentURL)||b("hl_label",window.location.href))&&(u.label=l),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var n=this;t(this,h);try{var r,i,a=e.slotId.split("@");a=1===a.length?a[0]:a[1],e.isEmpty?(null!==(r=this.atom_display)&&void 0!==r&&r.error_url&&(fetch(this.atom_display.error_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),ls("display_test DISPLAYAD_ERR",e),this._broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(null!==(i=this.atom_display)&&void 0!==i&&i.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){t(this,n)}.bind(this)),delete this.atom_display),ls("display_test DISPLAYAD_IMPRESSION"),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 25:case"end":return e.stop()}}),e,this)}))),function(e){return w.apply(this,arguments)})},{key:"checkOpphbPath",value:(p=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=this.topDomain||this.parentDomain||"",a=(null===(t=this.gameData)||void 0===t?void 0:t.gameId)||"",s=(null===(n=this.options)||void 0===n?void 0:n.width)||640,e.next=6,fetch("https://pub.headerlift.com/opphb?page_url=".concat(i,"&page_type=gd&page_width=").concat(s,"&aid=").concat(a));case 6:o=e.sent,hs("opphb load success",o),e.next=13;break;case 10:throw e.prev=10,e.t0=e.catch(0),new Error("Blocked: https://pub.headerlift.com/opphb");case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return p.apply(this,arguments)})},{key:"_init_ima_script",value:(l=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=["https://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","https://imasdk.googleapis.com/js/sdkloader/ima3.js","http://imasdk.googleapis.com/js/sdkloader/ima3_debug.js","http://imasdk.googleapis.com/js/sdkloader/ima3.js"],a=this.options.debug?i[0]:i[1],e.next=4,f(a,"gdsdk_ima",{alternates:i,error_prefix:"Blocked:",exists:function(){return t(this,s),window.google&&window.google.ima}.bind(this)});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"_init_afg_script",value:(u=e(r.mark((function e(n){var i,a,s,o,c,d,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.gameData.afg_disabled){e.next=3;break}return e.abrupt("return");case 3:return(d={}).crossorigin="anonymous",d["data-ad-client"]=(null==n||null===(i=n.adsense_client)||void 0===i?void 0:i.length)>0?n.adsense_client:"ca-pub-2316275586951220",d["data-ad-frequency-hint"]="30s",d.allow="autoplay",(null==n||null===(a=n.adsense_channel)||void 0===a?void 0:a.length)>0&&(d["data-ad-channel"]=n.adsense_channel),(null==n||null===(s=n.adsense_host)||void 0===s?void 0:s.length)>0&&(d["data-ad-host"]=n.adsense_host),!0===(null==n?void 0:n.adsense_adbreak_test)&&(d["data-adbreak-test"]="on"),null!==(o=this.gameData.sdk.afg)&&void 0!==o&&o.enabled&&null!==(c=this.gameData.sdk.afg)&&void 0!==c&&c.use_own&&(d["data-ad-client"]=this.gameData.sdk.afg.adsense_client,d["data-ad-slot"]=this.gameData.sdk.afg.adsense_ad_slot,d["data-ad-format"]="auto"),e.next=16,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,u),!!window.adsbygoogle}.bind(this),attrs:d});case 16:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 18:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"fixOutOfBounds",value:function(){try{if(!(this.gameData.afgszf&&this.gameData.afgszf.enabled))return;for(var e=this.gameData.afgszf,t=e.height,n=e.scrolls,r=t||"120vh",i=n||!0,a=document.getElementsByClassName("adsbygoogle"),s=0;s<a.length;s++){var o,c=a[s],d=c&&(null===(o=c.children[0])||void 0===o?void 0:o.children[0]);d&&"IFRAME"===d.tagName&&d.style.height!==r&&(ls("out-of-bounds fix apply"),d.style.height=r,i&&(d.parentElement.style.overflow="auto"))}}catch(e){ls("out-of-bounds error: ".concat(e.message))}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(d=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,h),fs.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense rewarded error",status:"error",skipForward:!0}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.rw.requested"),i=!1,a=function(){t(this,h),i=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),s=function(){t(this,h),i=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),o=function(){t(this,h),i=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),c=function(){t(this,h),i=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),d=function(e){t(this,h),i=!0,e()}.bind(this),u=function(e){t(this,h),i=!0,this.resetForNext();var n="rewarded";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error",skipForward:!0}),"dismissed"!==e.breakStatus&&this._send_atom_event("sg.dbg.rw",e))}.bind(this),l=function(e){window.adsbygoogle.push(e)},setTimeout(function(){t(this,h),i||(hs("gd-adflow adsense.reward timeout happened!"),this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"timeout",status:"error",skipForward:!0}),this._send_atom_event("sg.dbg.rw",{breakStatus:"timeout"}))}.bind(this),1e3),l({type:"reward",name:"reward-in-game",beforeAd:a,afterAd:s,adDismissed:o,adViewed:c,beforeReward:d,adBreakDone:u}),e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 26:case"end":return e.stop()}}),e,this,[[1,22]])}))),function(e){return d.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(c=e(r.mark((function e(n){var i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,s),fs.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),this.adPlacementEventReceived=!1,i=function(){t(this,s),this.adPlacementEventReceived=!0}.bind(this),a=function(e){t(this,s),this.adPlacementEventReceived=!0,this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),r={type:"preroll",beforeAd:i,adBreakDone:a},window.adsbygoogle.push(r),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var r}),e,this,[[1,18]])}))),function(e){return c.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(o=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),fs.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error 2",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),i=function(){t(this,o),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,s=function(e){t(this,o),this.adPlacementEventReceived=!0,this.resetForNext();var n="preroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var r}),e,this,[[1,19]])}))),function(e){return o.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var n,r,i,a,s,o,c=this;if(null===(n=this.gameData)||void 0===n||null===(r=n.ad_blcks)||void 0===r||null===(i=r.adsenseTimeout)||void 0===i?void 0:i.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(s=a.ad_blcks)||void 0===s||null===(o=s.adsenseTimeout)||void 0===o||o.timeout;var d=setTimeout(function(){t(this,c),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(d)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,n=setTimeout(function(){t(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"opus-sdk-timeout",status:"error",reason:"forced-sdk-timeout"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(n)}.bind(this),8e3)}},{key:"_startAdsensePlacementNext",value:(s=e(r.mark((function e(n){var i,a,s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.params,e.prev=1,!this.requestRunning){e.next=5;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 5:if(!void function(){if(t(this,o),fs.fictionalAdSenseError||n.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense midroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.mr.requested"),i=function(){t(this,o),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,s=function(e){t(this,o),this.adPlacementEventReceived=!0,this.resetForNext();var n="midroll";this.adCounter[n]=this.adCounter[n]||0,this.adCounter[n]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"midroll"}),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var r}),e,this,[[1,19]])}))),function(e){return s.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,i=n._ua,a={tp:e,ct:0,vrs:this.PackageJSON.version,url:this.parentURL,rfr:document.referrer,tdmn:this.topDomain||this.parentDomain,dpth:0,args:t,ua:{brnm:i.browser.name,brvs:i.browser.version,osnm:i.os.name,osvs:i.os.version,dvmd:i.device.model,w:r.w,h:r.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(a)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new Cy).get();return n=nS(nS({},n),r),n=t?nS(nS({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===g.Rewarded)t="reward";else if(n===g.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,nS(nS({},n),{},{skipForward:i,adPosition:a}))}},{key:"mute",value:(a=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adContext&&(this.adContext.muteRequested=!0),this.adsManager&&this.adsManager.setVolume(0);case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"terminate",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cancel();case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),sS=S((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$A(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"promo",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-stone-dynamic",s=n.package_version||"1.1.1",o=n.template||"puzzle",c=n.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},ZA(this.moduleName,this.moduleConfig)})),oS=S((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$A(i.moduleName);case 2:i.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),T(this,"splash",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.module){e.next=3;break}return e.next=3,i.load();case 3:return e.abrupt("return",i.module[i.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var a=n.package||"gd-sdk-air-dynamic",s=n.package_version||"1.2.0",o=n.template||"pluto",c=n.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=o.charAt(0).toUpperCase()+o.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(a,"/").concat(s,"/dist/").concat(o.toLowerCase(),"/iife/index.js"),dependencies:c},ZA(this.moduleName,this.moduleConfig)})),cS=function(e,t){console.log(e,t)},dS={},uS={},lS=null;function hS(){for(var e,t=window,n=null,r=null;!e;){try{if("function"==typeof t.__tcfapi||"function"==typeof t.__cmp){"function"==typeof t.__tcfapi?(r=2,n=t.__tcfapi):(r=1,n=t.__cmp),e=t;break}}catch(e){}try{if(t.frames.__tcfapiLocator){r=2,e=t;break}}catch(e){}try{if(t.frames.__cmpLocator){r=1,e=t;break}}catch(e){}if(t===window.top)break;t=t.parent}return dS.version=r,dS.frame=e,dS.function=n,dS.version}function pS(e){var n=this;return lS||(lS=new Promise(function(r){function i(t,n){if(cS("Received a response from CMP",t),n){var i,a;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(a=(i=t)&&"boolean"==typeof i.gdprApplies?i.gdprApplies:e.defaultGdprScope)||!0===a&&"string"!=typeof i.tcString)&&r({result:"cmpUnexpectedResponse",cmp:dS,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),hS(),dS.frame?2===dS.version?(cS("TCF v2 CMP found. Fetching the consent."),dS.function?(cS("CMP API is directly accessible, calling it now..."),dS.function("addEventListener",dS.version,i)):(cS("CMP API is outside the current iframe, calling it now..."),function(e,n,r){var i=this,a="__tcfapi";function s(e){var t="".concat(a,"Return"),n="string"==typeof e.data&&e.data.indexOf(t)>=0?JSON.parse(e.data):e.data;if(n[t]&&n[t].callId){var r=n[t];void 0!==uS[r.callId]&&uS[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var c=Math.random()+"",d="".concat(a,"Call"),u=T({},d,{command:e,parameter:o,callId:c,version:r});uS[c]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,dS.version,r)}("addEventListener",dS.frame,i))):r({result:"cmpVersionNotV2",cmp:dS}):r({result:"cmpNotFound"})}.bind(this)),lS)}var fS=new(function(){function t(){R(this,t),this.productName="Game Distribution"}var n;return S(t,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(n=e(r.mark((function e(t,n){var i,a,s,o,c,d,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),c=encodeURIComponent(s),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=12,fetch(d,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(c),e.next=22,fetch(u,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,t){return n.apply(this,arguments)})}]),t}());function mS(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return gS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gS(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function gS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var AS=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var c=this;t(this,n);try{var d=document.createElement("script");if(d.async=null==s||s,d.type="text/javascript",d.onload=function(){t(this,c),e()}.bind(this),d.onerror=function(){t(this,c);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),d.src=r,i){var u,l=mS(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;d.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},vS="ffd4774b-99ae-4464-8f40-3afa12b4692e",bS=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,AS({src:"https://cdn.cookielaw.org/consent/tcf.stub.js",attributes:[{key:"id",value:"gd-cookie-pro-tcf-stub"},{key:"charset",value:"UTF-8"}],isAsync:!1});case 3:return e.next=5,AS({src:"https://cdn.cookielaw.org/consent/".concat(vS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,AS({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:vS}],isAsync:!1});case 7:n=void 0,r=void 0,i=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(i=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(i),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 13:case"end":return e.stop()}var t,n,r,i}),e,null,[[0,10]])})));return function(){return t.apply(this,arguments)}}(),_S=new M,yS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},wS=!1;function kS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=r.type;if(Object.keys(yS).some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=!r.type||!r.type.startsWith("gd-sdk")&&!("parent-data-response"===r.type)||"sg-game-event"===r.type;!function(e){if("gd-sdk-on-event"===(null==e?void 0:e.type)){var t,n,r;if("midroll"!==(null==e||null===(t=e.event)||void 0===t?void 0:t.adPosition))return;var i="CONTENT_RESUME_REQUESTED"===(null===(n=e.event)||void 0===n?void 0:n.name);"CONTENT_PAUSE_REQUESTED"===(null===(r=e.event)||void 0===r?void 0:r.name)&&(wS=!0),i&&wS&&(wS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var c=o();if(!c)return;var d=c&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),c.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return t(this,n),e===(null==r?void 0:r.type)}.bind(this));if(!d&&!u)return}var l=r.eventName,h=r.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==l&&"levelFinish"!==l||window.mpHelper.sendStat("level",h.level),"levelFinish"===l&&window.mpHelper.sendStat("score",h.score)),window.parent.postMessage(r,"*")}if(a){var p=yS[i][a];p&&_S.emit(p,r)}}}),!1);var ES="__msgr",xS=q(),DS=function(e){var n=this;if(!window[ES]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=ES,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:xS,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){TS(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",TS(i)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){t(this,n);try{var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=xS,TS(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},SS=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=RS(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},RS=function e(t){try{var n,r,i=null==t?void 0:t.parent;if("game"===(null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return i;e(i)}catch(e){return t}},TS=function(e){try{window[ES]&&window[ES].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},CS=function(){function n(e){R(this,n),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=e.adRequest,this._gameData=e._gameData,this._msgrt=e._msgrt,this._adInstance=e._adInstance,this._eventBus=e._eventBus,this.blockedAdsMap=e._blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e._onResumeGame.bind(e),this._onPauseGame=e._onPauseGame.bind(e),this._onRewardedWatchComplete=e._onRewardedWatchComplete.bind(e),this._onAdError=e._onAdError.bind(e),this._promoShowSuccess=!1}var i,a,s;return S(n,[{key:"run",value:function(n){var i=n.duration,a=this;return new Promise(function(){var n=e(r.mark((function e(n,s){var o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.add();case 3:o=a.show(),setTimeout(function(){t(this,c);try{a.hide(),n({success:o})}catch(e){s(e)}}.bind(this),1e3*i),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),s(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"show",value:function(){return this.promo_data.game?(this.adContainer.style.visibility="visible",this.promo.style.display="block",this._onPauseGame("Pause the game for the promo","success"),this._promoShowSuccess=!0):this._onAdError("Promo not found"),this._promoShowSuccess}},{key:"hide",value:function(){var e;(this.promo.remove(),this.adContainer.style.visibility="hidden",this._promoShowSuccess)&&("reward"===(null===(e=this._adRequest.params)||void 0===e?void 0:e.position)&&this._onRewardedWatchComplete());this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success")}},{key:"add",value:(s=e(r.mark((function t(){var n,i,a,s=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.fetch_promo();case 3:this.promo_data=t.sent,n=document.createElement("div"),this.promo=n,i=this.promo_data,this.promo.addEventListener("click",function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(i),s.track_click(i.click_tracking),window.open(i.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),(a=document.createElement("iframe")).src=this.promo_data.renderer_url,a.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),a.classList.add("gd__promo__iframe"),this.promo.appendChild(a),this.adContainer.appendChild(this.promo),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),console.log(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return s.apply(this,arguments)})},{key:"addStyles",value:function(){var e="\n .gd__promo{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: transparent;\n z-index: 1;\n cursor: pointer;\n }\n .gd__promo__iframe{\n position: relative;\n z-index: -1;\n width:".concat(this.adContainerInner.style.width,";\n height:").concat(this.adContainerInner.style.height,";\n }\n "),t=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__promo__style",t,e)}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}},{key:"fetch_promo",value:(a=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://tag.atom.gamedistribution.com/v1/rainbow/pick?id=".concat(this._parentDomain,"&aid=").concat(this._gameData.gameId)).then(function(e){return t(this,i),e.json()}.bind(this));case 2:return n=e.sent,e.abrupt("return",n);case 4:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"track_click",value:(i=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}]),n}(),IS=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GD",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ObjectStore";R(this,n),this.dbName=e,this.storeName=t,this.db=null,this.init()}var i,a,s,o;return S(n,[{key:"init",value:function(){var e=this;return new Promise(function(n,r){var i=this;t(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){t(this,i),console.error("Database error:",e.target.error),r(e.target.error)}.bind(this),a.onsuccess=function(e){t(this,i),this.db=e.target.result,n(this.db)}.bind(this),a.onupgradeneeded=function(e){t(this,i);var n=e.target.result;n.objectStoreNames.contains(this.storeName)||n.createObjectStore(this.storeName,{keyPath:"key"})}.bind(this)}.bind(this))}},{key:"getItem",value:(o=e(r.mark((function e(n){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;t(this,i);var s=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(n);s.onerror=function(e){t(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),s.onsuccess=function(n){t(this,a),s.result?e(s.result.value):e(null)}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"setItem",value:(s=e(r.mark((function e(n,i){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var s=this;t(this,a);var o=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:n,value:i});o.onerror=function(e){t(this,s),console.error("Set item error:",e.target.error),r(e.target.error)}.bind(this),o.onsuccess=function(n){t(this,s),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"removeItem",value:(a=e(r.mark((function e(n){var i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;t(this,i);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(n);s.onerror=function(e){t(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),s.onsuccess=function(n){t(this,a),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"clear",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){t(this,i),console.error("Clear store error:",e.target.error),r(e.target.error)}.bind(this),a.onsuccess=function(n){t(this,i),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),OS=function(){function t(n){var i=n.mode;R(this,t),this.setItem=function(){var t=e(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}(),this.getItem=function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),"indexed-db"===i?(this.indexedStore=new IS,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===i&&(this.setItem=function(){var t=e(r.mark((function e(t,n){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m.set(t,n));case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}(),this.getItem=function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m.getString(t));case 1:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}())}var n,i;return S(t,[{key:"set",value:(i=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=JSON.stringify(n),e.next=3,this.setItem(t,i);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"get",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItem(t);case 2:return n=e.sent,e.abrupt("return",n?JSON.parse(n):null);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}();function PS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function BS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var LS,US="_gd_vs";function MS(e){return FS.apply(this,arguments)}function FS(){return FS=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,i=t.serverDate,s=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,NS({gameId:n,serverDate:i});case 6:a=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),ps("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(a||!m.available){e.next=24;break}return e.prev=14,e.next=17,jS({gameId:n,serverDate:i});case 17:a=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),ps("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",BS(BS({},a),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),FS.apply(this,arguments)}function jS(e){return GS.apply(this,arguments)}function GS(){return GS=e(r.mark((function e(t){var n,i,a,s,o,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,i=t.serverDate,s=new OS({mode:a="local-storage"}),e.next=5,s.get(US);case 5:return(o=e.sent)||(o={gids:{}}),o.gids[n]||(o.gids[n]={fv:i,vc:0}),(c=o.gids[n]).vc++,c.lv=i,e.next=13,s.set(US,o);case 13:return e.abrupt("return",{visit:c,mode:a});case 14:case"end":return e.stop()}}),e)}))),GS.apply(this,arguments)}function NS(e){return qS.apply(this,arguments)}function qS(){return qS=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,i=t.serverDate,s=new OS({mode:a="indexed-db"}),e.next=5,s.get(n);case 5:return(o=e.sent)||(o={fv:i,vc:0}),o.vc++,o.lv=i,e.next=11,s.set(n,o);case 11:return e.abrupt("return",{visit:o,mode:a});case 12:case"end":return e.stop()}}),e)}))),qS.apply(this,arguments)}function HS(){return HS=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.whichFrame,i=t.options,e.prev=1,a="gd-".concat(n),void 0,s=undefined,!("loader-frame"===n)){e.next=12;break}return e.next=9,VS({id:a,verbose:s,options:i});case 9:LS=e.sent,e.next=15;break;case 12:return e.next=14,zS({id:a,verbose:s,options:i});case 14:LS=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),ls("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),HS.apply(this,arguments)}function VS(e){return QS.apply(this,arguments)}function QS(){return QS=e(r.mark((function n(i){var a,s,o,c,d=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=i.id,s=i.verbose,o=i.options,n.next=4,V({id:a,verbose:s,router:!0});case 4:return(c=n.sent).on("connected",function(e){t(this,d)}.bind(this)),c.register({method:"whoami",handler:function(){return t(this,d),"[GD-IS] I am ".concat(a)}.bind(this)}),c.register({method:"isLoader",handler:function(){return t(this,d),!0}.bind(this)}),c.register({method:"hasRouter",handler:function(){return t(this,d),!1}.bind(this)}),c.register({method:"showAd",handler:function(){var t=e(r.mark((function t(n){var i,a,s;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=o.showAd?o.showAd:function(){var t=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),a=n.adType,s=n.params,t.next=4,i(a,s);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),c.register({method:"registerOnEvents",handler:function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c.registerProxy({alias:"onEvent",method:"onEvent",service:"gd-game-frame"}),e.abrupt("return","[GD-IS] gd-game-frame registered for onEvents");case 3:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}()}),n.next=13,c.whoami();case 13:return n.sent,n.abrupt("return",c);case 16:case"end":return n.stop()}}),n,this)}))),QS.apply(this,arguments)}function zS(e){return WS.apply(this,arguments)}function WS(){return WS=e(r.mark((function e(n){var i,a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.id,a=n.verbose,s=n.options,e.next=4,V({id:i,verbose:a,router:!1});case 4:return o=e.sent,"gd-loader-frame",e.next=8,o.findRouter({where:{id:"gd-loader-frame"}}).catch(function(e){t(this,d)}.bind(this));case 8:if(c=e.sent,e.t0=!!c,!e.t0){e.next=15;break}return e.next=14,o.connect(c).catch(function(e){t(this,d),ls("[GD-IS] Failed to connect to router",(null==e?void 0:e.message)||e)}.bind(this));case 14:e.t0=e.sent;case 15:return e.t0,o.register({method:"whoami",handler:function(){return t(this,d),"[GD-IS] I am ".concat(i)}.bind(this)}),o.register({method:"onEvent",handler:function(e){var n=this;t(this,d);var r=e.event;(s.onEvent||function(e){t(this,n)}.bind(this))(r)}.bind(this)}),o.register({method:"isLoader",handler:function(){return t(this,d),!1}.bind(this)}),o.register({method:"hasRouter",handler:function(){return t(this,d),!!c}.bind(this)}),c&&(o.registerProxy({alias:"whoIsLoader",method:"whoami"}),o.registerProxy({alias:"registerOnEvents",method:"registerOnEvents"}),o.registerProxy({alias:"showAd",method:"showAd"})),e.next=24,o.whoami();case 24:if(e.sent,!c){e.next=35;break}return e.next=29,o.whoIsLoader();case 29:return e.sent,e.next=32,o.registerOnEvents();case 32:e.sent;case 35:return e.abrupt("return",o);case 36:case"end":return e.stop()}}),e,this)}))),WS.apply(this,arguments)}var KS=!1;function YS(){var e=this;return new Promise(function(n,r){var i=this;if(t(this,e),LS||KS)n(LS);else{var a=setInterval(function(){t(this,i),LS&&(KS=!0,clearInterval(a),n(LS))}.bind(this),100);setTimeout(function(){t(this,i),clearInterval(a),LS||(KS=!0,n(LS))}.bind(this),5e3)}}.bind(this))}function JS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var XS,$S,eR,tR=function(){var t=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js",t=["https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js"],e.next=4,f(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),nR=0,rR=!1,iR=function(){var n=e(r.mark((function n(i){var a,s,o,c,d,u,l,h=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=i.args,s=i.onError,n.prev=1,!window.isForwarderFrame){n.next=5;break}return n.abrupt("return");case 5:return n.next=7,YS();case 7:if(!(o=n.sent)){n.next=18;break}return n.next=11,o.isLoader();case 11:if(!(c=n.sent)&&(c||o.hasRouter())){n.next=16;break}o.register({method:"sendSocketEvent",handler:function(e){t(this,h),oR(e.topic,e.args)}.bind(this)}),n.next=18;break;case 16:return o.registerProxy({alias:"sendSocketEvent",method:"sendSocketEvent"}),n.abrupt("return");case 18:if(d=new C(window.location.href),!((u=!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return t(this,h),e.toLowerCase()===d.host.toLowerCase()}.bind(this)))&&o&&o.hasRouter())){n.next=24;break}return n.abrupt("return");case 24:return u&&o&&o.hasRouter(),n.next=27,tR();case 27:$S=q(),l={json:JSON.stringify(a)},"wss://ws.gamedistribution.com",(XS=io("wss://ws.gamedistribution.com",{query:l,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){t(this,h)}.bind(this)),XS.on("after-connect",function(){var t=e(r.mark((function e(t){var n,i,s,o,c,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return eR=eR||(null==t?void 0:t.serverDate),n=a.gameId,e.next=4,MS({gameId:n,serverDate:eR});case 4:i=e.sent,s=i.visit,o=i.mode,c=i.errors,a.visit=ZS(ZS({},s),{},{stm:o,errors:c}),d={json:JSON.stringify(a)},XS.emit("client-info",{clientId:$S,counter:nR++,serverDate:eR,query:d}),rR=!0;case 12:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}()),XS.on("disconnect",function(e){t(this,h),rR=!1}.bind(this)),XS.connect(),n.next=40;break;case 37:n.prev=37,n.t0=n.catch(1),s&&s(n.t0);case 40:case"end":return n.stop()}}),n,this,[[1,37]])})));return function(e){return n.apply(this,arguments)}}(),aR=!1,sR=[];function oR(e,t){return cR.apply(this,arguments)}function cR(){return cR=e(r.mark((function e(n,i){var a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,YS();case 2:if(!(a=e.sent)){e.next=11;break}return e.next=6,a.isLoader();case 6:if(e.sent||!a.hasRouter()){e.next=11;break}return e.next=10,a.sendSocketEvent({topic:n,args:i});case 10:return e.abrupt("return");case 11:if("play"!==n){e.next=15;break}if(!aR){e.next=14;break}return e.abrupt("return");case 14:aR=!0;case 15:s=function(e,n){t(this,c);try{var r={json:JSON.stringify(n||{})};XS.emit("socket-event",{topic:e,clientId:$S,counter:nR,serverDate:eR,query:r})}catch(e){ps("game-session: Error on sending socket-event",e.message)}}.bind(this),o=function(){t(this,c),s(n,i)}.bind(this),sR.push(o);case 19:case"end":return e.stop()}}),e,this)}))),cR.apply(this,arguments)}function dR(e){var n=this,r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},i=Object.keys(r).find(function(i){var a=this;return t(this,n),r[i].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return i||"midroll"}function uR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return lR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function lR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}setInterval((function(){if(0!==sR.length&&XS&&rR){for(var e=function(){var e=this,i=r[n];i(),sR=sR.filter(function(n){return t(this,e),n!==i}.bind(this))},n=0,r=H(sR);n<r.length;n++)e();ls("game-session: commands length",sR.length)}}),100);var hR=3,pR=1,fR=5,mR={lastImpressionDate:null,imps:0};function gR(){return AR.apply(this,arguments)}function AR(){return(AR=e(r.mark((function e(){var n,i,a,s,o,c,d,u,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},e.next=3,fw();case 3:if(i=e.sent,a=i.compensation||{enabled:!1},n.ruleEnabled=null==a?void 0:a.enabled,!(void 0===(null==a?void 0:a.exctg)||(null==a?void 0:a.exctg))){e.next=28;break}s=["co-op","multiplayer","IAPs"],o=(null==i?void 0:i.tags)||[],c=!1,d=uR(o),e.prev=12,l=r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=u.value,s.some(function(e){return t(this,i),e===n.title}.bind(this))&&(c=!0);case 2:case"end":return e.stop()}}),e,this)})),d.s();case 15:if((u=d.n()).done){e.next=19;break}return e.delegateYield(l(),"t0",17);case 17:e.next=15;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(12),d.e(e.t1);case 24:return e.prev=24,d.f(),e.finish(24);case 27:n.disabledByTag=c;case 28:return n.isLowScoreGame=vR(i),n.enabled=n.ruleEnabled&&!n.disabledByTag&&n.isLowScoreGame,i.hasActiveCompensations=n.enabled,e.abrupt("return",n);case 32:case"end":return e.stop()}}),e,null,[[12,21,24,27]])})))).apply(this,arguments)}function vR(e){var t=!1,n=e.compensation||{enabled:!1},r=null==e?void 0:e.adsc;if(1===(null==r?void 0:r.s)&&null!=r&&r.t){var i=null==r?void 0:r.t,a=(null==n?void 0:n.esc)||pR,s=(null==n?void 0:n.ascl)||fR,o=i||{},c=o.adsc,d=o.reqsc,u=o.pdur,l=o.rspdur;o.aspdur,t=(l||d/(u/hR))<=a&&c<s}return t}var bR=!1;function _R(){return yR.apply(this,arguments)}function yR(){return(yR=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!bR){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,gR();case 4:(t=e.sent).enabled,t.override,t.giftEnabled,t.midrollPlusEnabled,bR=!0;case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wR(e){var t=e.rateType,n=e.gameData,r=!1;if(n.hasActiveCompensations){var i=n.compensation,a="gift"===t?null==i?void 0:i.gftr:null==i?void 0:i.mpr;a=void 0===a?1:a,r=Math.random()<=a}else r=!0;return r}function kR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ER(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ER(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function ER(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xR=!1,DR=3,SR=5,RR=1,TR=60,CR=10;function IR(){return OR.apply(this,arguments)}function OR(){return(OR=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return mR.imps++,mR.lastImpressionDate=new Date,e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function PR(e){return BR.apply(this,arguments)}function BR(){return BR=e(r.mark((function n(i){var a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,_,y,w,k,E,x,D,S,R,T,C,I,O,P,B,L,U,M,F,j,G,N,q,H,V,Q=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=i.gameData,c=i.executeCompensation,d=function(){var t=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.whenAvailable)||!1,!c){e.next=7;break}return e.next=4,c({whenAvailable:n});case 4:e.t0=e.sent,e.next=10;break;case 7:return e.next=9,IR();case 9:e.t0=e.sent;case 10:return i=e.t0,a=i.args,e.abrupt("return",null==a?void 0:a.success);case 13:case"end":return e.stop()}}),e)})));return function(e){return t.apply(this,arguments)}}(),u=!xR,!xR){n.next=5;break}return n.abrupt("return");case 5:if(xR=!0,l=o.adsc){n.next=10;break}return n.abrupt("return");case 10:if(h=l.s,p=l.t,1===h){n.next=13;break}return n.abrupt("return");case 13:if(null!=(f=o.compensation||{enabled:!1})&&f.enabled){n.next=17;break}return n.abrupt("return");case 17:if(!(void 0===(null==f?void 0:f.exctg)||(null==f?void 0:f.exctg))){n.next=42;break}m=["co-op","multiplayer","IAPs"],g=(null==o?void 0:o.tags)||[],A=!1,v=kR(g),n.prev=24,_=r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=b.value,m.some(function(e){return t(this,i),e===n.title}.bind(this))&&(A=!0);case 2:case"end":return e.stop()}}),e,this)})),v.s();case 27:if((b=v.n()).done){n.next=31;break}return n.delegateYield(_(),"t0",29);case 29:n.next=27;break;case 31:n.next=36;break;case 33:n.prev=33,n.t1=n.catch(24),v.e(n.t1);case 36:return n.prev=36,v.f(),n.finish(36);case 39:if(!A){n.next=42;break}return n.abrupt("return");case 42:if(y=(null==f?void 0:f.esc)||RR,w=void 0===(null==f?void 0:f.depgft)||(null==f?void 0:f.depgft),k=null!=f&&f.depgftr?null==f?void 0:f.depgftr:1,E=(null==f?void 0:f.onst)||!1,x=(null==f?void 0:f.sl)||3,D=(null==f?void 0:f.tl)||180,S=(null==o||null===(a=o.gft)||void 0===a?void 0:a.midroll.enabled)||!1,R=(null==o||null===(s=o.midroll_plus)||void 0===s?void 0:s.enabled)||!1,(!S||!R)&&(D/=k),T=void 0===(null==f?void 0:f.tc)||(null==f?void 0:f.tc),C=(null==f?void 0:f.ascl)||SR,!w){n.next=62;break}if(P=(null==o||null===(I=o.gft)||void 0===I?void 0:I.midroll.enabled)||!1,B=(null==o||null===(O=o.midroll_plus)||void 0===O?void 0:O.enabled)||!1,P&&B){n.next=62;break}return n.abrupt("return");case 62:if(U=(L=p||{}).adsc,M=L.reqsc,F=L.pdur,j=L.rspdur,L.aspdur,(j||M/(F/DR))<=y&&U<C){n.next=69;break}return n.abrupt("return");case 69:if(G=Math.ceil(F/DR),!E||!u){n.next=76;break}return n.next=76,d({whenAvailable:!0});case 76:N=0,q=1,H=function(){t(this,Q),N=0,q=1}.bind(this),V=setInterval(e(r.mark((function e(){var n,i,a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(T&&mR.imps>=G)){e.next=4;break}return clearInterval(V),e.abrupt("return");case 4:if(n=new Date,i=mR.lastImpressionDate?(r=mR.lastImpressionDate,o=n,c=void 0,u=void 0,void 0,void 0,c=r.getTime(),u=o.getTime(),(u-c)/1e3):D+1,!((a=D-i)>0)){e.next=20;break}if(!(a<=TR-CR)){e.next=17;break}return e.next=15,new Promise(function(e){var n=this;t(this,s),setTimeout(function(){t(this,n),e()}.bind(this),1e3*a)}.bind(this));case 15:e.next=20;break;case 17:return H(),e.abrupt("return");case 20:if(++N%q==0){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,d({});case 26:e.sent?H():(N=0,q=q+1>x?x:q+1);case 28:case"end":return e.stop()}var r,o,c,u}),e,this)}))),1e3*TR);case 80:case"end":return n.stop()}}),n,this,[[24,33,36,39]])}))),BR.apply(this,arguments)}function LR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function MR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return FR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FR(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function FR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jR,GR=function(){function n(e){var r=this;R(this,n),this._gameData=e._gameData,this._msgrt=e.msgrt,this._adInstance=e.adInstance,this._eventBus=e.eventBus,this.blockedAdsMap=e.blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e.onResumeGame.bind(e),this._onPauseGame=e.onPauseGame.bind(e),this._onRewardedWatchComplete=e.onRewardedWatchComplete.bind(e),this._onAdError=e.onAdError.bind(e),this._setAdRequestTimer=e._setAdRequestTimer.bind(e),this._giveGift=e._giveGift.bind(e),this._executeMidrollPlus=e._executeMidrollPlus.bind(e),this.executeCompensation=e.executeCompensation.bind(e),this._runAutoResume=e._runAutoResume.bind(e),this.send_atom_event=e.send_atom_event.bind(e),this.get_session_id=e.get_session_id.bind(e),this.get_ad_system_init_result=e.get_ad_system_init_result.bind(e),this.eventBus=new _,this.isOpusReady=function(){return t(this,r),e.isOpusReady}.bind(this),this._muteRequested=!1,this._terminateRequested=!1,this._registerForEvents()}var i,a;return S(n,[{key:"_registerForEvents",value:function(){var e=this;this.eventBus.subscribe("HL_CONFIG_ERROR",function(n){t(this,e),this.hasHLConfigError=!0}.bind(this))}},{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,_,y,w,k,E,x,D,S,R,C,I,O,P,B,L,U,M,F,j,G,N,q,H,V,Q,z,W,K,Y,J,Z,X,$,ee,te,ne,re,ie,ae,se=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,YS();case 3:!(h=e.sent)||h.isLoader(),this.adRequest=n,p=dR(n),n.params.adTypeFound=p,ls("gd-adflow, adTypeFound",p,n.params.position),(f=this._getAdFlow(p)).find(function(e){return t(this,se),"opus"===e}.bind(this))&&!this.isOpusReady()&&(f=f.filter(function(e){return t(this,se),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),m=this._gameData,g=m.afg_disabled,A=null===(i=n.params)||void 0===i?void 0:i.isGift,v=null===(a=n.params)||void 0===a?void 0:a.isMidrollPlus,b=null===(s=n.params)||void 0===s?void 0:s.isCompensation,null===(o=n.params)||void 0===o||o.position,_=null===(c=m.promo)||void 0===c?void 0:c.rainbow,y=(null==_?void 0:_.enabled)&&(null===(d=_.position)||void 0===d?void 0:d[p]),w=null==_?void 0:_.gift,k=y&&null!=_&&_.duration?null==_?void 0:_.duration:5,E=g?f.filter(function(e){return t(this,se),"adsense"!==e}.bind(this)):f,x=this.get_ad_system_init_result(),D=x.afg,S=x.ima,R=null==m||null===(u=m.ad_blcks)||void 0===u||null===(l=u.removeOtherAdaptors)||void 0===l?void 0:l.enabled,this.anyAdBlocking=!D||!S,this.bothAdBlocking=!D&&!S,this.adsBlocked=R&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(hs("gd-adflow adsBlocked so changing the flow"),E=[]):(D||(E=E.filter(function(e){return t(this,se),"adsense"!==e}.bind(this))),S||(E=E.filter(function(e){return t(this,se),"ima"!==e}.bind(this)))),C=!1,I=!1,O=[],P=0,B=!1,U={},M=MR(E),e.prev=40,M.s();case 42:if((F=M.n()).done){e.next=88;break}if(j=F.value,!this._terminateRequested){e.next=46;break}return e.abrupt("break",88);case 46:if(n.params.adapter=j,G=P===E.length-1,N=A&&w||!A,q=G&&y&&N,n.params=UR(UR({},n.params),{},{adapterIndex:P,isLastAdapter:G,shouldFail:!1,extraPromoRunOnFail:q,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==j){e.next=53;break}return e.abrupt("continue",86);case 53:return function(){t(this,se),fs.firstSuccessOrder&&!isNaN(fs.firstSuccessOrder)&&(n.params.shouldFail=P<fs.firstSuccessOrder)}.bind(this),hs("gd-adflow, before adInvoke",P,j,n.params.shouldFail),e.next=57,this.adInvoke(n);case 57:if(H=e.sent,V=H.success,Q=H.args,z=H.isSkipped,W=H.noVast,K=H.t4r,Y=null==Q?void 0:Q.reason,J=null==Q?void 0:Q.message,Z=null==Q?void 0:Q.errorType,U[j]=U[j]||{req:0,imp:0,fail:0},U[j].req++,V?U[j].imp++:(U[j].fail++,U[j].failReason=Y,U[j].failMessage=J,U[j].failType=Z),!V){e.next=77;break}return hs("gd-adflow, adapter-result-success",P,j,Q),C=!0,I=!(null==Q||!Q.isPromoSuccess),L=K,e.abrupt("break",88);case 77:if(hs("gd-adflow, adapter-result-failure",P,j,Q.message),P++,O.push(Q.message),!z){e.next=82;break}return e.abrupt("break",88);case 82:if(!W){e.next=85;break}return this._runAutoResume(),e.abrupt("break",88);case 85:B=q;case 86:e.next=42;break;case 88:e.next=93;break;case 90:e.prev=90,e.t0=e.catch(40),M.e(e.t0);case 93:return e.prev=93,M.f(),e.finish(93);case 96:if(!B){e.next=102;break}return e.next=99,new CS(this).run({duration:k});case 99:e.sent.success&&(I=!0);case 102:return function(){var e;t(this,se),fs.disableGift&&null!==(e=m.gft)&&void 0!==e&&e[p].enabled&&(m.gft[p].enabled=!1)}.bind(this),X=O.join(" /n"),C?(mR.imps++,mR.lastImpressionDate=new Date,this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(p),"midroll"===p&&this._executeMidrollPlus()):(this._onResumeGame(X,"warning"),this._giveGift(p),"midroll"===p&&this._executeMidrollPlus()),PR({gameData:m,executeCompensation:this.executeCompensation}),$="-1",ee="none",C?($="index_".concat(P),ee=E[P]):I&&($="promo",ee="promo"),te=this.get_session_id(),this.anyAdBlocking&&"-1"===$?(ne="rewarded"===p?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[ne]=this.blockedAdsMap[ne]?this.blockedAdsMap[ne]+1:1,ls("gd-adflow, blocked-ad",JSON.stringify(this.blockedAdsMap)),this._msgrt.send("adflow.blocked.pos",{message:"".concat(ne)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!D,imaBlocked:!S,isGift:A,isMidrollPlus:v,adType:ne,sessionId:te,successAdapter:"none",adFlowIndex:$,adapterResults:U})):(T(re={},"adflow.all.index",{message:"".concat($)}),T(re,"adflow.all.success_adapter",{message:"".concat(ee)}),T(re,"adflow.".concat(p,".index"),{message:"".concat($)}),T(re,"adflow.".concat(p,".success_adapter"),{message:"".concat(ee)}),ie=re,Object.keys(ie).forEach(function(e){t(this,se);var n=ie[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:$,successAdapter:ee,adBlocker:!1,afgBlocked:!D,imaBlocked:!S,isGift:A,isMidrollPlus:v,isCompensation:b,adType:p,sessionId:te,t4r:L,adapterResults:U})),oR("ad-session",{adSession:{adType:p,imp:"-1"!==$&&"promo"!==$,promo:"promo"===$,blocked:this.anyAdBlocking&&"-1"===$,hasHLConfigError:this.hasHLConfigError,isGift:A,isMidrollPlus:v,isCompensation:b}}),ae={adType:p},this.eventBus.broadcast("AD_FLOW_COMPLETE",ae),e.abrupt("return",UR(UR({},ae),{},{args:{success:C,isGift:A,isMidrollPlus:v}}));case 120:case"end":return e.stop()}}),e,this,[[40,90,93,96]])}))),function(e){return a.apply(this,arguments)})},{key:"adInvoke",value:(i=e(r.mark((function n(i){var a=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(function(){var n=e(r.mark((function e(n,s){var o,c,d,u,l=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="main.showad.".concat(i.params.adapter,".").concat(i.params.adapterIndex),ls("adInvoke.start",{scopeName:o,adRequest:JSON.stringify(i)}),c={},d=function(e){t(this,l),ls("adInvoke.failure",{args:e,adRequest:JSON.stringify(i)}),a._eventBus.unsubscribeScope(o);var r="dismissed"===(null==e?void 0:e.message);n({success:!1,args:e,isSkipped:r,noVast:e.noVast})}.bind(this),u=function(e){t(this,l),ls("adInvoke.success",{args:e,adRequest:JSON.stringify(i)}),a._eventBus.unsubscribeScope(o),n({success:!0,args:e,t4r:c})}.bind(this),a._eventBus.subscribe("AD_ERROR",d,o),a._eventBus.subscribe("AD_SDK_CANCELED",d,o),a._eventBus.subscribe("AD_SUCCESS",u,o),a._eventBus.subscribe("AD_T4R",function(){t(this,l),c.loaded=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_CLICK",function(){t(this,l),c.t4rClick=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_VIDEO",function(){t(this,l),c.t4rVideo=!0}.bind(this),o),a._eventBus.subscribe("AD_CLICK",function(){t(this,l),c.click=!0}.bind(this),o),a._eventBus.subscribe("AD_BIDDER",function(e){t(this,l),c.bidder=null==e?void 0:e.bidder}.bind(this),o),a._eventBus.subscribe("AD_T4R_NONE",function(e){t(this,l),c.fail_reason=null==e?void 0:e.reason}.bind(this),o),e.prev=14,e.next=17,a._adInstance.startAd(i);case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(14),ps("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 23:case"end":return e.stop()}}),e,this,[[14,19]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var n,r,i,a,s,o,c,d,u=this,l=void function(){if(t(this,u),fs.customAdFlow)return JSON.parse(fs.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(c=h)||void 0===c||null===(d=c.adapters)||void 0===d?void 0:d[e]:p}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(n){t(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(n){t(this,e)}.bind(this)),this._setAdRequestTimer()}}]),n}(),NR=new M,qR=["https://games.softgames.com","https://sg.gamedistribution.com","https://minigame-stg.aeriagames.jp","https://minigame.aeriagames.jp","https://html5.gamedistribution.com","http://localhost:3005","https://yjgames.gamedistribution.com","https://portal-staging-sgweb.gamedistribution.com/"];window.addEventListener("message",(function(e){var n=this,r=e.data,i=e.origin,a=e.source;if(qR.some(function(e){return t(this,n),e===i}.bind(this))&&(null==r||!r.__tcfapiCall)){var s=r.system;r.action;var o="aeriaExternalHostsConnector"===s;if("Softgames"===s)jR=a,(window.parent||window).postMessage(r,"*"),NR.emit("aeria-event",r);else if(o){jR&&jR.postMessage(r,"*");var c=window.parent||window;c&&c.postMessage(r,"*")}}}),!1);var HR="https://html5.gamedistribution.com",VR="parent-data-request",QR="parent-data-response",zR=function(){function n(){R(this,n)}var i;return S(n,[{key:"init",value:function(e){var n=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(r){if(t(this,n),r){var i=r.adRequestTimer;e.adRequestTimer=i,ls("gd-frame-data-bridge, adRequestTimer on init ",e.adRequestTimer)}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var n=this;window.addEventListener("message",function(r){t(this,n);var i=r.data,a=r.origin,s=r.source,o=i.type;if(i.value,a===HR&&o===VR){var c={adRequestTimer:e.adRequestTimer};s.postMessage({type:QR,value:c})}}.bind(this))}},{key:"_askForParentFrameData",value:(i=e(r.mark((function e(){var n=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){var i=this;t(this,n);var a=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin;t.source;var i=n.type,s=n.value;r===HR&&i===QR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:VR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),WR=new zR,KR={SDKExistsOnUpperFrame:!1};function YR(){return JR.apply(this,arguments)}function JR(){return(JR=e(r.mark((function e(){var t,n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=["https://pm.azerioncircle.com/p/gd-blck-rmv/"],e.next=4,f(t[0],"blckrmv",{alternates:t});case 4:return n=window.GD_BLCK_RMV||{},console.log("new blocker",n),e.abrupt("return",n.AdBlockerPage);case 9:e.prev=9,e.t0=e.catch(0),console.log("new blcoker error => ",e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function ZR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $R=function(){hs("gtag: GA not initialized",arguments)};function eT(e){return tT.apply(this,arguments)}function tT(){return tT=e(r.mark((function e(i){var a,s,o,c,d,u,l,h,p,m,g,A,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.onError,s=i.args,c="gdSDKDataLayer",d="https://www.googletagmanager.com/gtag/js?id=".concat(o="G-PLRTBHGSEL","&l=").concat(c),u=[d],e.prev=5,e.next=8,f(u[0],"gdsdk_google_analytics",{alternates:u,error_prefix:"Blocked:",exists:function(){return t(this,v),window[c]}.bind(this)});case 8:return window[c]=window[c]||[],$R=function(){window[c].push(arguments)},$R("js",new Date),e.next=14,Q();case 14:return l=e.sent,h=l.lookupIabConsent,p=l.getGoogleAdType,e.next=19,h();case 19:m=e.sent,g=p(m.consentData),A=XR(XR({},A=s||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:m.result,gdpr:"ok"===m.result?"object"===n(m.consentData)?!0===m.consentData.gdprApplies:"N/A":m.result,google_ads:null==g?void 0:g.type}),$R("config",o,A),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),ps("gtag: load GA error",e.t0),a&&a(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),tT.apply(this,arguments)}new C("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=3792570314314042&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&cust_params=hb_uuid%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_cache_id%3Dundefined%26tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26hb_cache_host%3Dprebid.adnxs.com%26hb_format%3Dvideo%26hb_size%3D0x0%26hb_pb%3D1.15%26hb_adid%3D259407b5792767%26hb_bidder%3Dimprovedigital%26hb_cache_host_improv%3Dprebid.adnxs.com%26hb_uuid_improvedigit%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_format_improvedig%3Dvideo%26hb_size_improvedigit%3D0x0%26hb_pb_improvedigital%3D1.15%26hb_adid_improvedigit%3D259407b5792767%26hb_bidder_improvedig%3Dimprovedigital%26tnl_wog%3D0%26gdGameId%3Daeac8455b2024f25abfa943ec96aa749%26tnl_content_category%3Dpuzzle%26adaptor_order%3D0%26pbct%3D2%26tnl_test%3Da%26fp%3D0.9%26fpt%3D99%26bfa%3D1%26adsense%3D0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&plcmt=1&vpmute=1&vpa=auto&sdkv=h.3.633.0&osd=2&frm=2&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=1&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&sdki=445&ptt=20&adk=2541783110&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&sid=E657451B-8F2F-4921-A55A-21D1A6F3C39E&nel=1&eid=44777649%2C44781409%2C44785452%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&ref=https%3A%2F%2Fwww.gry.pl%2F&top=https%3A%2F%2Fwww.gry.pl%2F&loc=https%3A%2F%2Fhtml5.gamedistribution.com%2Faeac8455b2024f25abfa943ec96aa749%2F%3Ftimestamp%3D1713336375%26countryCode%3Dpl%26siteid%3D88%26channelid%3D1%26siteLocale%3Dpl%26locale%3Dpl%26gd_sdk_referrer_url%3Dhttps%253A%252F%252Fwww.gry.pl%252Fgra%252Fkings-and-queens-match&dlt=1713336379046&idt=2621&dt=1713336390920&scor=3473667703821297&ged=ve4_td12_tt10_pd12_la2000_er0.0.156.300_vi0.0.600.510_vp100_eb24427",!0),new C("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=2275053868608838&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&vpa=auto&vpmute=0&plcmt=1&cust_params=tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26gd_opus%3D1%26fp%3D0.9%26gd_np%3D1%26bfa%3D1%26fpt%3D99%26tnl_wog%3D0&sdkv=h.3.633.0&osd=2&frm=0&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=0&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&sdki=445&ptt=20&adk=1748861338&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&media_url=blob%3Ahttps%253a%2F%2Fwww.gry.pl%2Ffa4fae4b-f435-43b4-9cee-af65696fe59e&sid=D3F4C4E1-4002-4BEE-A1F2-2638CD3B9197&a3p=EloKDWNyd2RjbnRybC5uZXQSQGE0MmZkMWJkNGI5MjgyOTY5NzUxNDUyYzVlNmUxNmQ1MzkzODYxY2E5Y2U2MGUzNjk3Y2ZlNTExMTQxYjFhZjgYucX8se4xSAASxgEKCHJ0YmhvdXNlEqwBWVNmZ3hFVno0OXBMOFI2c3ltSWtSdUFNdFg4d2Y0clBkdVMwTlVuLzZpUnhJZWh0cnRjVUtLSjFraHJDQWZERmp1N1pDNHJEc1lxMkduKzJFTFMxRmgzWlEzTUxaK0owbXZoTDR4UFlNc2JUbmlGNkczTWRaZjZQK3hEVVkwTU1FUlpkZzlKMjArcjlQNUtQOFBmWVhMaEkwRitGMUNhYUNwQS9aRVNNMVNnPRjBxfyx7jFIAFICCGoSGQoKdWlkYXBpLmNvbRjDz9ay7jFIAFICCGQSPgoFb3BlbngSLGV5SnBJam9pZEZoNU5XbDNSakZUT0ZjNVoxTlZRbFl5YWtRemR6MDlJbjA9GJ3I_LHuMUgA&nel=1&eid=44776494%2C44777649%2C44781409%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&top=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&loc=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&dt=1713336184147&cookie=ID%3Da17ef48e823e6627%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MY20KDMmAY5MP3sMYIZndoHFyvxhg&gpic=UID%3D00000d6b0028013d%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MZ7af9EvfEMcTpwOjK9LSfd-RfFCQ&scor=3968881391553945&ged=ve4_td21_tt0_pd21_la21000_er271.162.427.462_vi0.0.873.1064_vp100_eb24171",!0);var nT=function(e){var n=this,r=e.handler,i=e.timeout,a=e.interval,s=r||function(){return t(this,n),!0}.bind(this),o=i||1e3,c=a||10;return new Promise(function(e,i){var a=this;if(t(this,n),r())e(!0);else{var d=!1,u=setInterval(function(){t(this,a);try{s()&&(clearInterval(u),d=!0,e(!0))}catch(t){clearInterval(u),e(!1)}}.bind(this),c);setTimeout(function(){t(this,a),clearInterval(u),d||e(!1)}.bind(this),o)}}.bind(this))};function rT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rT(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aT(e){var n=e.gameData,r=e.msgrt,i=e.topDomain,a=e.parentDomain,s=e.parentURL;return{send_atom_event:function(e,o){if(function(e){var r=this,i=n.dbglg;return(null==i?void 0:i.enabled)&&i.topics&&i.topics.some(function(n){return t(this,r),n===e}.bind(this))}(e)){var c={gid:n.slug,md5:n.gameId,pid:0,pnm:n.pname,ctry:n.ctry,lcl:"en",hle:1,ads:1,args:o,href:window.location.href},d=(new Cy).get();return c=iT(iT({},c),d),function(e,t){try{var n=r._layout,o=r._ua,c={tp:e,ct:0,vrs:cs.version,url:s,rfr:document.referrer,tdmn:i||a,dpth:0,args:t,ua:{brnm:o.browser.name,brvs:o.browser.version,osnm:o.os.name,osvs:o.os.version,dvmd:o.device.model,w:n.w,h:n.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(c)))))}catch(e){}}(e,c=o?iT(iT({},c),o):c)}}}}function sT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sT(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cT=q(),dT=null,uT=null,lT=function(){function n(e){var r,i,a,s,o=this;if(R(this,n),T(this,"_whichFrameV2",function(){var e=this;t(this,o);var n=C(window.location.href,!0),r=n.host,i=n.query,a="html5.gamedistribution.com"!==r,s=function(n){return t(this,e),"revision.gamedistribution.com"===n||"uncached-html5.gamedistribution.com"===n}.bind(this),c=s(r);null!=i&&i.gd_sdk_referrer_url&&(c=s(C(i.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||c?"loader-frame":"game-frame"}.bind(this)),dT)return dT;dT=this,this.isOpusReady=!1,this.isMidrollPlusExecuted=!1,this.blockedAdsMap={},this.blockingDetectedKey="d8d9b9b63e704668a29559970c1818be",this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new Cy,this._location.print();var c=this._location.get(),d=(null==c||null===(r=c.top)||void 0===r||null===(i=r.domain)||void 0===i?void 0:i.value)||(null==c||null===(a=c.partner.domain)||void 0===a?void 0:a.value),u=null==c||null===(s=c.partner.url)||void 0===s?void 0:s.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||u,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||d,ls("locs found:",this._topDomain,this._parentURL),this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,function(e){HS.apply(this,arguments)}({whichFrame:this._whichFrameV2(),options:{showAd:this.showAd.bind(this),onEvent:this._onEvent.bind(this)}}),this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,o),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,o),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i,a=this;if((t(this,o),null===(e=this._gameData)||void 0===e||null===(n=e.directTokenUse)||void 0===n?void 0:n.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new aT({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(r=this._gameData.lp)||void 0===r?void 0:r.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(i=this._gameData.evnts)&&void 0!==i&&i.enabled&&this._isLoaderGameURL()&&(DS(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),WR.init(this),this._send_gametag_data("sdk_init"),this.fixScore()}.bind(this)),this._registerSGBridge(),ls("which-frame",this._whichFrame()),this._loadLocus()}var i,A,v,b,y,O,P,B,L,M,F,j,N,q,H,V,Q,z,W,K,Y,J;return S(n,[{key:"_getVisitorId",value:(J=e(r.mark((function e(){var n,i,a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nT({handler:function(){return t(this,c),!!uT}.bind(this),timeout:1e3,interval:10});case 2:return s=e.sent,o=s?null===(n=uT)||void 0===n||null===(i=n.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId:"noVisitorId",e.abrupt("return",o);case 5:case"end":return e.stop()}}),e,this)}))),function(){return J.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(Y=e(r.mark((function e(){var n,i,a,s,o,c,d,u,l,h,p,f,m,g,A,v,b,_,y,w,k,E,x,D,S,R=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=this._gameData)||void 0===n||null===(i=n.gs_trc)||void 0===i?void 0:i.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:d=e.sent,u=this._gameData,l=u.category,h=u.dname,p=u.pname,f=u.gameId,m=u.slug,g=u.title,A=u.ctry,v=this._topDomain||this._parentDomain,b=new Cy,_=b.get(),y=this.msgrt._ua,w=document.referrer,k=this.msgrt._layout,E=cs.version,x=(null===(a=this._gameData)||void 0===a||null===(s=a.gft)||void 0===s?void 0:s.midroll.enabled)||!1,D=(null===(o=this._gameData)||void 0===o||null===(c=o.midroll_plus)||void 0===c?void 0:c.enabled)||!1,S={args:{rfr:w,category:l,dname:h,pname:p,gameId:f,slug:m,title:g,ctry:A,domain:v,loc:_,ua:y,layout:k,version:E,visitorId:d,hasGft:x,hasMp:D},onError:function(e){t(this,R),this._sendSDKError(e)}.bind(this)},iR(S);case 20:case"end":return e.stop()}}),e,this)}))),function(){return Y.apply(this,arguments)})},{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(t(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var n=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];n&&n.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(K=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=u()||"web",this.adInstance._send("tg.created",{gmid:this.options.gameId,dvc:n,qint:t}));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return K.apply(this,arguments)})},{key:"_loadCMP",value:(W=e(r.mark((function e(){var t,n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(i=new Cy,0!==(null==(a=i.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(s=this._gameData)||void 0===s||null===(o=s.cmp)||void 0===o||!o.checkDepthOnly){e.next=9;break}return e.next=7,bS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,bS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return W.apply(this,arguments)})},{key:"testConsent",value:function(){try{hS();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pS({});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})))()}catch(e){console.log("find CMP error",e)}}},{key:"_sendLoaderDataEvent",value:function(){try{this.options.onLoaderEvent&&this.options.onLoaderEvent({name:"LOADER_DATA",message:{game:this._gameData,bridge:this._bridge},status:this._sdk_ready?"success":"error"})}catch(e){}}},{key:"_registerSGBridge",value:function(){var e=this;_S.on("splash-hidden",function(n){t(this,e),this._hideCMPButton()}.bind(this))}},{key:"_hideCMPButton",value:function(){var e=document.getElementById("ot-sdk-btn-floating");e&&(e.style.display="none")}},{key:"_sendLoadedEvent",value:function(e){if(this._isLoaded||(this._isLoaded={}),!this._isLoaded[e]){this._isLoaded[e]=!0;var t="loader-frame"===this._whichFrame()&&(this._isHostHTML5Domain()||this._isExternalHoster());C(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{ls("which-frame, sending tunnel event",this._whichFrame()),this._sendTunnlEvent(e),this.msgrt.send("loaded",{message:this._hasBlocker?"Has Blocker":"No Blocker"})}catch(e){}}}},{key:"_sendGamedockGamePlay",value:function(){var e=this._isTokenGameURL();if(!(this._gameData.loader.enabled&&e||this._gameDockGamePlaySent))try{this._sendGamedockEvent("gameplay"),this._gameDockGamePlaySent=!0}catch(e){}}},{key:"_safeInit",value:function(){this._checkUserDeclinedTracking(),this._checkWhitelabelPartner();var e=this._gameData.diagnostic;void 0!==e&&void 0!==e.close_ga&&!1!==e.close_ga||this._loadGoogleAnalytics(),void 0!==e&&void 0!==e.close_gamedock&&!1!==e.close_gamedock||!this._bridge.isCoreSDKMode&&!this._bridge.noGamedockSDK&&this._loadGamedockTracker(),void 0!==e&&void 0!==e.close_minijuegos&&!1!==e.close_minijuegos||(console.log("noMinijuegosSDK",!this._bridge.isCoreSDKMode,!this._bridge.noMinijuegosSDK,document.location.search.indexOf("mp_game_id")>=0),!this._bridge.isCoreSDKMode&&!this._bridge.noMinijuegosSDK&&document.location.search.indexOf("mp_game_id")>=0&&this._loadMiniJuegosGratisTracker())}},{key:"_initializeSDKWithGameData",value:(z=e(r.mark((function e(n,i){var a,s,o,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6:return this._bridge.isCoreSDKMode=(null===(a=this._gameData.disableAds)||void 0===a?void 0:a.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==(null===(s=this._gameData.diagnostic)||void 0===s?void 0:s.close_ads)&&!1!==(null===(o=this._gameData.diagnostic)||void 0===o?void 0:o.close_ads)||(this.videoAdReady=this._initializeVideoAd().then(function(){t(this,c),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"})),this._checkAdBlockerRemoval()}.bind(this)).catch(function(e){t(this,c);var n="".concat(e).startsWith("Error: Blocked:");hs("gd-adflow adsBlocked",n,e);var r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(this.adsBlocked=!i&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var s=i||a?i?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(s)})}this._sendSDKError(e),this._checkAdBlocker(),console.error(e.message||e)}.bind(this))),e.next=15,_R();case 15:n(this._gameData),e.next=23;break;case 18:e.prev=18,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 23:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(e,t){return z.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_checkAdBlockerRemoval",value:function(){m.getBoolean(this.blockingDetectedKey)&&(m.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(Q=e(r.mark((function e(){var t,n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.get_ad_system_init_result(),n=t.ima,i=t.afg,n&&i){e.next=12;break}if(m.set(this.blockingDetectedKey,!0),null===(a=this._gameData.rmblck)||void 0===a||!a.enabled){e.next=12;break}if(this.adBlockerPage){e.next=12;break}return e.next=9,YR();case 9:s=e.sent,this.adBlockerPage=new s(this._gameData),this.adBlockerPage.add();case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log(e.t0.message);case 17:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(){return Q.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=U(e);this.options=t?h(n,t):n,this.options.gameId=this.options.gameId.trim()}},{key:"_setConsoleBanner",value:function(){if(!this._bridge.noConsoleBanner){var e=cs.version,t=console.log("%c %c %c GameDistribution.com HTML5 SDK | Version: "+e+" %c %c %c","background: #9854d8","background: #6c2ca7","color: #fff; background: #450f78;","background: #6c2ca7","background: #9854d8","background: #ffffff");console.log.apply(console,t)}}},{key:"_shouldSendTunnlEvent",value:function(e){return this.tunnlEventCounts||(this.tunnlEventCounts={}),this.tunnlEventCounts[e]||(this.tunnlEventCounts[e]=0),this.tunnlEventCounts[e]++,1===this.tunnlEventCounts[e]}},{key:"_sendTunnlEvent",value:function(e){var n=this;if(this._shouldSendTunnlEvent(e)){void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var r={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://hlana.gamedistribution.com/event?".concat(G.stringify(r))).catch(function(i){t(this,n),this._sendHLAnalyicsLog({query:oT(oT({},r),{},{error:null==i?void 0:i.message}),eventType:-e})}.bind(this)),this._sendHLAnalyicsLog({query:r,eventType:e}),this.adInstance._send_atom_event("hl.config",r),this._send_gametag_data("sdk_gameplay")}}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=e.query,r=e.eventType;if(1===r?t="hl.gameplay":2===r?t="hl.gameload":3===r?t="hl.adblock":-1===r?t="hl.gameplay.error":-2===r?t="hl.gameload.error":-3===r&&(t="hl.adblock.error"),t)try{this.dumper.send_atom_event(t,n)}catch(e){console.log("Error on sending dump!",e)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=c("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,p("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!m.available)return;"developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._parentDomain||"developer-acc.gamedistribution.com"===this._topDomain?(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0),m.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(m.set("gd_debug_ex",!0),m.set("gd_disable_midroll_timer",!0)),m.getBoolean("gd_debug_ex")&&(this.openConsole(),this.msgrt.send("dev.console",{message:this._parentDomain}))}catch(e){}}},{key:"_checkUserDeclinedTracking",value:function(){this._userDeclinedTracking=this._bridge.isCoreSDKMode||document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0}},{key:"_initializeMessageRouter",value:function(){this.msgrt=new l({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:o(),version:cs.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:u(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var n=[this._gameData.gmky.url];f(n[0],"GamedockSDK",{alternates:n}).then(function(){var n,r;t(this,e),uT=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&uT.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),fS.track(uT,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=uT)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),f(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_loadLocus",value:function(){var n=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus/"],window.gdlocus=window.gdlocus||{cmd:[]},window.gdlocus.cmd.push(function(){t(this,i),this.isOpusReady=!0,window.gdlocus.iservice.register({method:"muteAdFlow",handler:this._muteFlowSound.bind(this)}),window.gdlocus.iservice.register({method:"terminateAdFlow",handler:this._terminateFlow.bind(this)})}.bind(this)),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this)).then(function(){t(this,i)}.bind(this));case 10:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_muteFlowSound",value:(V=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.mute();case 3:case"end":return e.stop()}}),e,this)}))),function(){return V.apply(this,arguments)})},{key:"_terminateFlow",value:(H=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.terminate();case 3:case"end":return e.stop()}}),e,this)}))),function(){return H.apply(this,arguments)})},{key:"_loadGoogleAnalytics",value:function(){var e=this;if(!this._bridge.isCoreSDKMode){var n=this._gameData,r=n.gameId,i=n.slug,a=n.title,s=new Cy,o={provider:"gd-sdk",page_depth:s.get("depth.value"),partner_domain_from:s.get("partner.domain.from"),top_domain_from:s.get("top.domain.from"),top_domain:this._topDomain,parent_domain:this._parentDomain,parent_url:this._parentURL,game_id:r,game_slug:i,game_title:a};eT({onError:function(n){t(this,e),this._sendSDKError(n)}.bind(this),args:o})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new C(e,!0);t="".concat(n.protocol,"//").concat(n.hostname,"/").concat(n.pathname)}catch(e){}return t}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new _,w.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),k.forEach(function(n){var r=this;return t(this,e),this.eventBus.subscribe(n,function(e){return t(this,r),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){t(this,e);var n=this._getDeveloperDomains(),r=n.developerDomain,i=n.gameApiDomain;if(r){fetch("https://".concat(i,"/game/v2/hasapi/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var a=JSON.stringify({type:"GD_SDK_IMPLEMENTED",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(a,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(a,"*")}catch(e){}}VD()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),ND(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&fS.track(uT,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(n){t(this,e),this.msgrt.send("ad.error",{message:n.message,details:n.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(n){t(this,e),this._sendAdRequestContext(n.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(n){if(t(this,e),n.message.startsWith("Blocked:")){var r=n.message.replace("Blocked:","").trim(),i=this._getCleanUrl(r),a="Blocked: ".concat(i);if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:a}),!this._hasBlocker)){this._hasBlocker=!0;this.msgrt.send("adblck.src",{message:a});var s=this.get_ad_system_init_result(),o=s.ima,c=s.afg;(!o||!c)&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:n.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(n){t(this,e),this.msgrt.send("tunnl.keys.empty",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(n){t(this,e),this.msgrt.send("tunnl.keys.fallback",{message:n.message,details:n.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(n){return t(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Please check if your GAME ID is correct. Otherwise, no revenue will be reported.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain,t=rw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(cs.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(q=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,i=this._parentDomain.indexOf("gamedistribution.com")>=0,t=(t=void 0===this._gameData.dmain||this._gameData.dmain)||i,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking(!1,!t);case 7:case"end":return e.stop()}}),e,this)}))),function(){return q.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new Cy,i="html5.gamedistribution.com"!==C(document.referrer).host,a=n&&!KR.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&i;if(a&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,c=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===c?this._redirectToLoaderFrame():"to-blocked-page"===c&&this._redirectToBlocking(!0)}return{blocked:a}}},{key:"_redirectToBlocking",value:function(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.msgrt.send("blocked");var a=this._gameData;setTimeout(e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=9;break}return e.prev=1,e.next=4,n.adInstance._send_atom_event("token-blocked");case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log("Could not send dump.token-blocked",e.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(G.stringify({domain:n._parentDomain,id:a.gameId,img:n._get_game_thumbnail_url(),title:a.title,unregistered:i,utm_source:n._parentDomain,utm_medium:(null==a?void 0:a.slug)||(null==a?void 0:a.title)||(null==a?void 0:a.gameId)||"unknown",utm_campaign:"block-and-redirect"}));case 10:case"end":return e.stop()}}),e,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var t=this,n=this._gameData;setTimeout(e(r.mark((function e(){var i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.adInstance._send_atom_event("loader-redirect");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("Could not send dump.loader-redirect",e.t0);case 8:i=C(location.href,!0),a=oT(oT({},i.query),{},{rd:"1"}),s=G.stringify(a),o="https://html5.gamedistribution.com/".concat(n.gameId,"/?").concat(s),window.location.href=o;case 13:case"end":return e.stop()}}),e,null,[[0,5]])}))),100)}},{key:"_checkGameDeleted",value:function(){var e=this;6!==this._gameData.status&&4!==this._gameData.activeStatus||(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){t(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;$D().disableMidrolltimer?e.midroll=0:m.available&&m.getBoolean("gd_debug_ex")&&(m.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var i,a=this._gameData,s=a.gdpr&&!0===a.gdpr.consent,o=a.loader,c=null===(t=a.promo)||void 0===t?void 0:t[null===(n=a.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=c&&c.enabled?this._createPromoBeforeSplash(a,s):o.enabled&&!0!==(null===(i=o.splash)||void 0===i?void 0:i.skip)?this._createSplash(a,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=c&&c.enabled?this._createPromoBeforeSplash(a,s):!1!==o.enabled&&this._createSplash(a,s):null!=c&&c.enabled&&this._createPromo(a,s))}},{key:"_initializeVideoAd",value:(N=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._bridge.isCoreSDKMode){e.next=2;break}return e.abrupt("return");case 2:return(t=this._gameData).sdk.enabled&&(this.options.advertisementSettings=h(this.options.advertisementSettings,t.sdk)),this.macros=new E({game:t,bridge:this._bridge}),this.adInstance=new aS(this.options.flashSettings.adContainerId,this.options.advertisementSettings,{parentURL:this._parentURL,parentDomain:this._parentDomain,topDomain:this._topDomain}),this.adInstance.gameId=t.gameId,this.adInstance.category=t.category,this.adInstance.tags=t.tags,this.adInstance.noPreroll=this._bridge.noPreroll,this.adInstance.macros=this.macros,this.adInstance.gameData=t,this.adInstance.msgrt=this.msgrt,this.adInstance.PackageJSON=cs,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return N.apply(this,arguments)})},{key:"_sendSDKReady",value:function(){var e="Everything is ready.";this.eventBus.broadcast("SDK_READY",{message:e,status:"success"});try{this.options.onInit(e)}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_sendSDKError",value:function(e){e=e.message?e:{message:e};this.eventBus.broadcast("SDK_ERROR",{message:e.message,status:"error"});try{this.options.onError(e)}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"IscForwardOnEvent",value:(j=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,YS();case 4:if(!(i=e.sent)){e.next=14;break}return e.next=8,i.isLoader();case 8:if(o=e.sent,!((null===(a=this._gameData)||void 0===a||null===(s=a.isv_fw)||void 0===s?void 0:s.enabled)&&o&&i.onEvent)){e.next=14;break}return n=!0,i.onEvent({event:t}),e.abrupt("return",n);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),ls("[GD-IS] error on onEvent forward",e.t0);case 19:return e.abrupt("return",n);case 20:case"end":return e.stop()}}),e,this,[[1,16]])}))),function(e){return j.apply(this,arguments)})},{key:"_onEvent",value:(F=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.IscForwardOnEvent(t);case 2:if(!e.sent){e.next=5;break}return e.abrupt("return");case 5:if(ls("[GD-IS] onEvent executing",{event:null==t?void 0:t.name,e:t,location:window.location.href}),p(t.name,t.message,t.status),!t.skipForward){e.next=9;break}return e.abrupt("return");case 9:hs("[developer-event]",t.name);try{this.options.onEvent({name:t.name,message:t.message,status:t.status,skipForward:t.skipForward,adPosition:t.adPosition})}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}case 11:case"end":return e.stop()}}),e,this)}))),function(e){return F.apply(this,arguments)})},{key:"_getGameData",value:(M=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fw();case 2:return t=e.sent,this.msgrt.setGameData(t),x(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return M.apply(this,arguments)})},{key:"_createSplash",value:(L=e(r.mark((function n(i,a){var s,o,c,d,u=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this._getSplashTemplate(i);case 2:return s=n.sent,o=new s(oT(oT({},this.options),{},{isConsentDomain:a,version:cs.version}),i,this._parentDomain),n.next=6,yw();case 6:c=n.sent,d=c.enabled,o.on("playClick",function(){var n,s,c,l=this;if(t(this,u),((null===(n=window.gdlocus)||void 0===n?void 0:n.firstUserAction)||e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("gd-adflow locus-first-user-action is not defined");case 1:case"end":return e.stop()}}),e)}))))({game_id:i.gameId}).catch(function(e){t(this,l),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),a){var h=new Date;h.setDate(h.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(h.toUTCString(),"; path=/")}if(this._hideCMPButton(),oR("play"),d)window.gdsdk.showAd(g.Interstitial,{position:"preroll"}).catch(function(e){t(this,l),o.hide()}.bind(this));else{var p={position:"preroll"};(function(){t(this,l),fs.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),p.adapter="adsense")}).bind(this),this.showAd(g.Interstitial,p).catch(function(e){t(this,l)}.bind(this))}null!==(s=this._gameData)&&void 0!==s&&null!==(c=s.evnts)&&void 0!==c&&c.enabled&&(SS({event:"FirstInteraction",game:this._gameData}),this._send_gametag_data("first_interaction"))}.bind(this)),this.onPauseGame("Pause the game and wait for a user gesture","success"),this.eventBus.subscribe("SDK_GAME_PAUSE",function(){t(this,u),o.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,u),o.hide()}.bind(this));case 12:case"end":return n.stop()}}),n,this)}))),function(e,t){return L.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(B=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(oT(oT({},this.options),{},{isConsentDomain:i,version:cs.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.hide(),this._createSplash(n,i)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(n,i);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return B.apply(this,arguments)})},{key:"_createPromo",value:(P=e(r.mark((function e(n,i){var a,s,o,c,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(c=new o(oT(oT({},this.options),{},{isConsentDomain:i,version:cs.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,d),c.hide(),this.onResumeGame("Resumed after the promo","warning")}.bind(this)),this.onPauseGame("Pause the game for the promo","success"),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.onResumeGame("Resumed after the promo","warning");case 12:case"end":return e.stop()}}),e,this,[[0,9]])}))),function(e,t){return P.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(g.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(O=e(r.mark((function e(t){var n,i,a,s,o,c,d,u=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:{},s={forwarded:i=!1,result:a},e.prev=3,null===(o=this._gameData)||void 0===o||null===(c=o.isv_fw)||void 0===c?void 0:c.enabled){e.next=7;break}return e.abrupt("return",s);case 7:return e.next=10,YS();case 10:if(d=e.sent){e.next=13;break}return e.abrupt("return",s);case 13:return e.next=16,d.isLoader();case 16:if(e.sent||!d.hasRouter()){e.next=23;break}return hs("[GD-IS] forwarding ad call",{location:window.location.href}),i=!0,e.next=22,d.showAd({adType:t,params:n});case 22:a=e.sent;case 23:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(3),ls("[GD-IS] error on showAd forward",e.t0);case 29:return e.abrupt("return",{forwarded:i,result:a});case 30:case"end":return e.stop()}}),e,this,[[3,26]])}))),function(e){return O.apply(this,arguments)})},{key:"showAd",value:(y=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,c,d,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,a.IscForwardShowAd(n,i);case 3:if(c=e.sent,d=c.forwarded,u=c.result,!d){e.next=9;break}return t(u),e.abrupt("return");case 9:if(oR("play"),l={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},!a._autoResumeIfAdsAreDisabled(dR(l))){e.next=15;break}return e.abrupt("return",t());case 15:return e.next=18,a.sdkReady;case 18:return h=e.sent,e.next=21,a.videoAdReady;case 21:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(1),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:h,adRequest:l}),a._rejectAdIfAdDisabled({gameData:h,adRequest:l}),a._rejectAdIfUnsupportedType({adRequest:l}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||null!=i&&i.isCompensation||a._rejectAdIfAdRateHits({gameData:h,adRequest:l}),i&&(i.isGift||i.isMidrollPlus||i.isCompensation)||!a.adBlockerPage||(a._setAdRequestTimer(),a.adBlockerPage.show()),a.adInstance.attachAfgPosition(l),!a.adFlowRunning){e.next=32;break}return e.abrupt("return",t());case 32:return a.adFlowRunning=!0,p=new GR(a),a._adFlow=p,e.next=37,p.runAdFlow(l);case 37:f=e.sent,a.adFlowRunning=!1,a._adFlow=null,t(f),a._post_message({topic:"adrequest.instream"}),e.next=51;break;case 44:e.prev=44,e.t0=e.catch(0),a.adFlowRunning=!1,a._adFlow=null,a.onAdError(e.t0.message),a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 51:case"end":return e.stop()}}),e,null,[[0,44]])})));return function(e,n){return t.apply(this,arguments)}}()));case 2:case"end":return t.stop()}}),t)}))),function(e){return y.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t,n=!1,r=null===(t=this._gameData.diagnostic)||void 0===t?void 0:t.close_ads,i=this._gameData.disableAds[e],a=r||i;return ls("gd-adflow autoresume result: adModuleDisabled,adDisabled",r,i,e,this._gameData.diagnostic,this._gameData.disableAds),a&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e=this,n="CONTENT_PAUSE_REQUESTED",r="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(n,{name:n,message:"Auto pause when ads are disabled"}),setTimeout(function(){t(this,e),this.eventBus.broadcast(r,{name:r,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}.bind(this),3e3)}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s,o,c,d,u,l,h,p,f,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(i=r.gft)||void 0===i||null===(a=i[e].durations[this._giftCount[e]])||void 0===a?void 0:a.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(c=this._gameData)||void 0===c||null===(d=c.gft)||void 0===d||null===(u=d[e].durations[this._giftCount[e]])||void 0===u?void 0:u.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(p=this._gameData)||void 0===p||null===(f=p.gft)||void 0===f||null===(m=f[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=dR(e.adRequest);if(t.disableAds[n]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==g.Interstitial&&t.adType!==g.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=g.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===g.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,c=e.adRequest,d=null;c.adType===g.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(d=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):d=o.midroll;if(c.adType===g.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<d)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(b=e(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,a){var s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.sdkReady;case 3:return s=e.sent,e.next=6,i.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[n]&&!i._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(n,"..."));case 10:if(n){e.next=14;break}n=g.Rewarded,e.next=16;break;case 14:if(n===g.Interstitial||n===g.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:if(!i.adInstance){e.next=22;break}return e.next=19,i.adInstance.preloadAd(n);case 19:e.t0=e.sent,e.next=23;break;case 22:e.t0="gdsdk://preloaded";case 23:o=e.t0,t(o),e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),a(e.t1);case 30:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(e){return b.apply(this,arguments)})},{key:"cancelAd",value:(v=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(SS({event:"GameStarted",game:this._gameData}),this._send_gametag_data("game_started"))}},{key:"onPauseGame",value:function(e,t){var n;this._allowExternals({enabled:!0});try{this.options.pauseGame()}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_PAUSE";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(SS({event:"GamePaused",game:this._gameData}),this._send_gametag_data("game_paused"))}},{key:"onRewardedWatchComplete",value:function(){this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"})}},{key:"onAdError",value:function(e){this.eventBus.broadcast("AD_ERROR",{message:e,status:"error"})}},{key:"openConsole",value:function(){try{new D(this).start(),m.set("gd_debug_ex",!0)}catch(e){console.log(e)}}},{key:"_initBlockingExternals",value:function(){var e=this._gameData;(e.failed||e.block_exts&&e.block_exts.enabled)&&(this.window_open=window.open,this._allowExternals({enabled:!1}),this._removeExternalsInHtml({enabled:!1}))}},{key:"_checkFullscreen",value:function(){var e=this;try{var n=this._gameData;n.sdk.fullscreen&&"auto"===n.sdk.fullscreen&&document.addEventListener("click",function(){if(t(this,e),!this._isFullScreen){var n=document.body,r=n.requestFullScreen||n.webkitRequestFullScreen||n.mozRequestFullScreen||n.msRequestFullscreen;if(r)r.call(n);else if(void 0!==window.ActiveXObject){var i=new ActiveXObject("WScript.Shell");null!==i&&i.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var n=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){t(this,n),this.msgrt.send("external",{message:"C> ".concat(e)}),(e.startsWith("https://play.google.com")||e.startsWith("https://itunes.apple.com"))&&this.window_open.call(null,e)}.bind(this):window.open=this.window_open)}},{key:"_shouldAllowExternalUrl",value:function(e){var n,r=this,i=new C(e),a=i.host;return i.href,((null===(n=this._gameData.urlBlockExc)||void 0===n?void 0:n.hosts)||[]).some(function(e){return t(this,r),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var n=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var r=this;t(this,n);var i=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var s=e.getAttribute("href");e.removeAttribute("href"),i||(e.onclick=function(e){return t(this,r),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(s)}),!1}.bind(this))}}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var i=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:a()),c=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?c:d()),l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:l,noLoadedEvent:h,noBlockerEvent:p,noPreroll:v,parentURL:i,parentDomain:c,topDomain:u&&u.length?u:c,noGAPageView:f,noLotamePageView:m,noGamedockSDK:g,noMinijuegosSDK:A,version:r.version,pauseGameOnStartup:b,depth:o(),domainMatched:c===u,exports:{formatTokenURLSearch:this._formatTokenURLSearch.bind(this),extendUrlQuery:this._extendUrlQuery.bind(this),base64Encode:this._base64_encode.bind(this)}}}},{key:"_isHostHTML5Domain",value:function(){var e=new C(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_checkTokenGameUrl",value:function(){var e=C(location.href),t=e.origin,n=e.pathname,r="".concat(t).concat(n);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(r)}},{key:"_isTokenGameURL",value:function(){var e,t=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i,n="1"===(null===(e=C(location.href,!0).query)||void 0===e?void 0:e.rd);return t.test(location.href)||!n&&t.test(document.referrer)}},{key:"_isExtHostedGameURL",value:function(){var e=/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i;return e.test(location.href)||e.test(document.referrer)}},{key:"_isLoaderGameURL",value:function(){return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)&&location.href.startsWith("https://html5.gamedistribution.com")}},{key:"_getTokenGameURLConfig",value:function(){try{var e,t=/http[s]?:\/\/html5\.gamedistribution\.com\/[A-Za-z0-9]{8}\/[A-Fa-f0-9]{32}\/.*/i;if(t.test(location.href)){var n=new C(location.href,!0);if(!n.query.gd_zone_config)return;e=n.query.gd_zone_config}else if(t.test(document.referrer)){var r=new C(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new C(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new oS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(A=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new sS(s),e.abrupt("return",o.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new C(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(G.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new C(e,!0);return n.query=oT(oT({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)uT.tracking.trackEvent("milestoneAchieved",{pageId:this.options.gameId,pageType:"game",isAuthorized:null===(t=e.data)||void 0===t?void 0:t.isAuthorized,milestoneDescription:null===(n=e.data)||void 0===n?void 0:n.milestoneDescription});else if("game_event"==e.eventName)return this._gameEventPostMessage(e)}catch(e){console.log(e.message)}}},{key:"_gameEventPostMessage",value:function(e){if(void 0!==e.data.level&&this._numberValidator(e.data.level))if(void 0!==e.data.score&&this._numberValidator(e.data.score)){var t={type:e.eventName,data:e.data};window.location!==window.top.location&&window.top.postMessage(t,"*")}else console.log("Level data type should be number!");else console.log("Level data type should be number!")}},{key:"_numberValidator",value:function(e){return"number"==typeof e&&/^\d*$/.test(e)}},{key:"_getisMobile",value:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),!1===t&&window.orientation>-1&&(t=!0),t}},{key:"_get_game_thumbnail_url",value:function(){var e=this,n=this._gameData,r=n.assets.find(function(n){return t(this,e),n.hasOwnProperty("name")&&512===n.width&&512===n.height}.bind(this));return r||(r=n.assets.length>0?n.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(r.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,i=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var a=window.top||window.parent;a&&a.postMessage({source:"gdsdk",topic:n,data:r},i)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"fixScore",value:function(){var e,n,r,i,a=this;if(null===(e=this._gameData)||void 0===e||null===(n=e.fix_score)||void 0===n?void 0:n.enabled){var s=(null===(r=this._gameData)||void 0===r||null===(i=r.fix_score)||void 0===i?void 0:i.wait)||10;setTimeout(function(){var e=this;t(this,a),this.showAd(g.Interstitial,{position:"midroll"}).catch(function(n){t(this,e)}.bind(this))}.bind(this),1e3*s)}}},{key:"executeCompensation",value:(i=e(r.mark((function n(i){var a,s,o,c,d,u,l=this;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=(null==i?void 0:i.whenAvailable)||!1,s=!this.adInstance.requestRunning&&!this.adFlowRunning,o=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.showAd(g.Interstitial,{position:"midroll",isCompensation:!0});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),!s){n.next=10;break}return n.next=7,o();case 7:return c=n.sent,n.abrupt("return",c);case 10:if(!a){n.next=17;break}return d=!1,n.next=15,new Promise(function(n,i){var a=this;t(this,l);var s=!1,c=setInterval(e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.adInstance.requestRunning||a.adFlowRunning){e.next=19;break}return clearInterval(c),e.prev=4,e.next=7,o();case 7:t=e.sent,s=!0,n(t),d=!0,e.next=19;break;case 14:e.prev=14,e.t0=e.catch(4),ls("[compensation] execution error after became available",e.t0),n({err:e.t0,success:!1}),d=!0;case 19:case"end":return e.stop()}}),e,null,[[4,14]])}))),1e3);setTimeout(function(){t(this,a),s||d||n({success:!1})}.bind(this),6e4)}.bind(this));case 15:return u=n.sent,n.abrupt("return",u);case 17:case"end":return n.stop()}}),n,this)}))),function(e){return i.apply(this,arguments)})},{key:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o="gift";if(!wR({rateType:o,gameData:this._gameData}))return void ls("[compensation] rate check did not pass for ".concat(o));ls("[compensation] rate check passed for ".concat(o));var c=setInterval(e(r.mark((function e(){var a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i.adInstance.requestRunning||i.adFlowRunning?console.log("Advertisement already running..."):(ls("gd-adflow WILL GIVE GIFT!!!"),i.showAd(g.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(c),i._giftCount[n]++);case 1:case"end":return e.stop()}}),e,this)}))),1e3*s.durations[this._giftCount[n]].wait)}catch(e){console.log("Advertisement Error...")}}},{key:"send_atom_event",value:function(e,t){this.adInstance._send_atom_event(e,t)}},{key:"get_session_id",value:function(){return cT}},{key:"get_ad_system_init_result",value:function(){return{afg:this.adInstance.afgInitSuccess,ima:this.adInstance.imaInitSuccess}}},{key:"_getDeveloperDomains",value:function(){var e,t;return"developer.gamedistribution.com"===this._topDomain||"developer-acc.gamedistribution.com"===this._topDomain?e=this._topDomain:!0===new RegExp("^localhost").test(this._parentDomain)&&(e="localhost"),e&&(t={"developer-acc.gamedistribution.com":"game-api-acc-real-aws.gamedistribution.com","developer.gamedistribution.com":"game.api.gamedistribution.com",localhost:"game-api-acc-real-aws.gamedistribution.com"}[e]),{developerDomain:e,gameApiDomain:t}}},{key:"_setGameRewardedFlag",value:function(){try{var e=this._getDeveloperDomains(),t=e.developerDomain,n=e.gameApiDomain;if(t){fetch("https://".concat(n,"/game/v2/hasrewarded/").concat(this.options.gameId,"?timestamp=").concat((new Date).valueOf()));try{var r=JSON.stringify({type:"GD_SDK_REWARDED_SET",gameID:this.options.gameId});window.location!==window.top.location?window.top.postMessage(r,"*"):null!==window.opener&&window.opener.location!==window.location&&window.opener.postMessage(r,"*")}catch(e){}}}catch(e){}}},{key:"_getGdModeIfExist",value:function(){var e=this,n=new Proxy(new URLSearchParams(window.location.search),{get:function(n,r){return t(this,e),n.get(r)}.bind(this)});return!n.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:n.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,n=this;if(wR({rateType:"midroll+",gameData:this._gameData})&&null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&!this.isMidrollPlusExecuted){var r;this.isMidrollPlusExecuted=!0;var i=this._gameData.midroll_plus.type||"midroll";if(null!==(r=this._gameData.midroll_plus)&&void 0!==r&&r.interval)var a=setInterval(function(){var e,r,s=this;(t(this,n),this.adFlowRunning)||(this.showAd(g.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(e){t(this,s)}.bind(this)),this._mplus_count++,"infinite"!==(null===(e=this._gameData.midroll_plus)||void 0===e?void 0:e.interval)&&this._mplus_count===(null===(r=this._gameData.midroll_plus)||void 0===r?void 0:r.interval)&&clearInterval(a))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;t(this,n),this.showAd(g.Interstitial,{position:"midroll",giftType:i,isMidrollPlus:!0}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function hT(){return(hT=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,bw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:n=["https://pm.azerioncircle.com/p/locus/"],console.log("locus loading"),f(n[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var pT,fT=new M,mT=function(e){var n=this;!function(){hT.apply(this,arguments)}();var r,i=function(e){var r=this;return t(this,n),new Promise(function(n,i){var a=this;t(this,r);var s=function(e){t(this,a),"SDK_GAME_START"===e.name&&(fT.off("sdk-event",s),n())}.bind(this);fT.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new lT(e)),r}.bind(this),s=function(e){return t(this,n),i(e)}.bind(this),o=function(e){return t(this,n),"gdsdk://preloaded"}.bind(this),c=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),d=function(){return t(this,n),m("cancelAd")}.bind(this),u=function(){return t(this,n),m("openConsole")}.bind(this),l=function(){return t(this,n),m("showBanner")}.bind(this),h=function(){return t(this,n),m("session")}.bind(this),p=function(e){return t(this,n),m("sendGenericEvent",{options:e})}.bind(this),f=function(){t(this,n),console.log("_sendSDKReady")}.bind(this),m=function(e,r){var i=this;return t(this,n),r||(r={}),new Promise(function(n,a){t(this,i);try{var s={type:"gd-sdk",method:e,options:r};window.parent.postMessage(s,"*"),n()}catch(e){console.log("gd:adp:m:s:error",e),n()}}.bind(this))}.bind(this),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&v(r)}),!1)}.bind(this),A=function(){t(this,n),g(),m("init")}.bind(this),v=function(r){t(this,n);try{fT.emit("sdk-event",r),e.onEvent&&e.onEvent(r)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:l,showAd:s,preloadAd:o,showDisplayAd:c,cancelAd:d,openConsole:u,getSession:h,onEvent:v,init:A,_sendSDKReady:f,sendGenericEvent:p}},gT=function(e){var t=mT(e);return t.init(),t},AT=function(){var e=this,n=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),r=function(){t(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),i=function(){t(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){t(this,e);var i="html5.gamedistribution.com"!==C(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},vT="gd-sdk-frame-handshake-request",bT="gd-sdk-frame-handshake-response",_T=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:vT},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===vT){var o={type:bT};i.postMessage(o,r)}else a===bT&&(s=!0,e({origin:r,source:i}))})),setTimeout(function(){t(this,i),s||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},yT=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vw();case 2:return t=e.sent,e.next=6,_T();case 6:if(n=e.sent,KR.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=AT(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,_w();case 14:return o=e.sent,c=!1,c=o?!s&&!!n:!s,e.abrupt("return",c);case 18:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),wT={},kT=function(e){try{if(e.skipForward)return void ls("gd-adflow fw-skip-forward",e);if(ls("gd-adflow fw-forwarding",e),wT.source){var t={type:"gd-sdk-on-event",event:e};wT.source.postMessage(t,wT.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},ET=function(){kT({name:"SDK_READY",status:"success",message:"Everything is ready."}),kT({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),kT({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},xT=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,c=a.type,d=a.method,u=a.options;if("gd-sdk-self"!==c){if("gd-sdk"===c){if(!wT.source&&"init"===d)return function(e){var t=e.source,n=e.origin;wT={source:t,origin:n}}({source:o,origin:s}),void ET();var l=n[d];l&&e(r.mark((function e(){var i,a=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,function(){t(this,a),"showAd"===d&&fs.firstAdapterModeAdsense&&"rewarded"!==u.adType&&(console.log("promo-test, set first adapter to adssense 3"),u.params=u.params?u.params:{},u.params.adapter="adsense")}.bind(this),!(i=l.apply(n,Object.values(u)))||!i.then){e.next=6;break}return e.next=6,i;case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log("gd:adp:m:r onFrameMessage error",e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})))()}}else{var h={type:"gd-sdk",method:d,options:u};window.postMessage(h,location.origin)}}),!1)},DT=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){kT(e),t.apply(this,arguments)}}(e);var t=new lT(e);return xT(t),t},ST=function(){function t(){R(this,t),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},ZA(this.moduleName,this.moduleConfig)}var n,i;return S(t,[{key:"load",value:(i=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,$A(this.moduleName);case 3:this.module=e.sent,ls("aeria module load success",this.module),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("aeria module load error",e.t0),this.module=null;case 11:case"end":return e.stop()}}),e,this,[[0,7]])}))),function(){return i.apply(this,arguments)})},{key:"runYMenu",value:(n=e(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,this.module){e.next=4;break}return e.next=4,this.load();case 4:(new this.module.Aeria).renderYMenu({gameId:n});case 6:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}]),t}(),RT=function(){var t=e(r.mark((function t(){var n,i,a,s,o,c,d,u,l,h,p,f,m,g,A,v;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new Cy).get("partner.domain.value")||e.get("top.domain.value");return{isAeriaDomain:"minigame.aeriagames.jp"===t||"minigame-stg.aeriagames.jp"===t,isAeriaStagingDomain:"minigame-stg.aeriagames.jp"===t}}(),i=n.isAeriaDomain,a=n.isAeriaStagingDomain,!i){t.next=21;break}return c=function(){var e=(new Cy).get("partner.url.value");return new C(e,!0)},d=function(){var e="ae-soft-323";try{var t=c(),n=t.pathname,r=n.split("/"),i=r[r.length-1];hs("aeria-ylogin:loc",t,n,i),e=i}catch(e){ps("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:d,score:100},env:a?"staging":"production",system:"Softgames"},l=function(){var e=window.parent||window,t=u;e.postMessage(t,"*")},h=new _,t.next=13,fw();case 13:p=t.sent,f=null==p||null===(s=p.aeria)||void 0===s?void 0:s.yMenuExcluded,m=null==p||null===(o=p.aeria)||void 0===o?void 0:o.yLoginExcluded,h.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(m||l())})),g=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new ST).runYMenu({gameId:d});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),A=AT(),v=A.whichFrame,"game-frame"===v()&&(f||g());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),TT=function(e){try{var t=Xy(e);e.gameId||t.send("nogameid",{message:"".concat(mb.parentURL)})}catch(e){}},CT=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,RT();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),IT={create:function(){var t=e(r.mark((function e(t){var n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,TT(t),pw(t),e.next=5,yT();case 5:return n=e.sent,e.next=8,CT();case 8:return window.isForwarderFrame=n,i=n?gT(t):DT(t),ww(),e.abrupt("return",i);case 14:return e.prev=14,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",DT(t));case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(e){return t.apply(this,arguments)}}()};function OT(){return(OT=e(r.mark((function e(t,n){var i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,xw();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,UT(t);case 9:e.t0=e.sent;case 10:return i=e.t0,e.abrupt("return",n(i));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var PT,BT,LT=!1;function UT(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),pT)return r(pT);if(LT)var s=setInterval(function(){t(this,a),pT&&(LT=!1,clearInterval(s),r(pT))}.bind(this),100);else LT=!0,IT.create(e).then(function(e){t(this,a),pT=e,e._sendSDKReady(),LT=!1,r(pT)}.bind(this))}.bind(this))}function MT(e){return UT(e),{invoke:function(t){return function(e,t){return OT.apply(this,arguments)}(e,t)}}}function FT(n,i){var a=this;return new Promise(function(s,o){var c,d=this;t(this,a);var u=function(e){var t="https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js";return e&&(t="https://pm.azerioncircle.com/@bygd/gd-sdk-wrp/".concat(e,"/dist/default/iife/index.js")),[t]}(null==i||null===(c=i.game)||void 0===c?void 0:c.version);jT({text:"sdk-wrapper-script-load"}),f(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){t(this,d),jT({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),o(e)}.bind(this)).then(e(r.mark((function e(){var t,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,jT({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,jT({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:BT=e.sent,jT({text:"sdk-wrapper after gdSdkWrp.init"}),s(BT),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),jT({text:"sdk-wrapper load error 2",error:e.t0.message}),o(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,12]])}))))}.bind(this))}function jT(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(t))))),console.log(H(Object.values(e)))}catch(e){}}function GT(e){if(e){var t=e.name,n=e.message,r=e.status;try{jT({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!PT}),PT&&PT.onEvent({name:t,message:n,status:r})}catch(t){jT({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function NT(e){return qT.apply(this,arguments)}function qT(){return(qT=e(r.mark((function e(t){var n,i,a,s,o,c,d,u,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return PT=t,pw(t),e.next=4,fw();case 4:if(s=e.sent,!BT){e.next=7;break}return e.abrupt("return",BT);case 7:if(o=null==s||null===(n=s.sdk_wrp)||void 0===n?void 0:n.enabled,c=null==s||null===(i=s.sdk_wrp)||void 0===i?void 0:i.version,d=null==s?void 0:s.gameId,u=null==s?void 0:s.title,VT("isWrapEnabled ".concat(o)),o){e.next=14;break}return e.abrupt("return");case 14:return l=null==s||null===(a=s.sdk_wrp)||void 0===a?void 0:a.wrapper,e.next=17,FT(l,{onEvent:GT,game:{gameId:d,title:u,version:c}});case 17:return BT=e.sent,e.abrupt("return",BT);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function HT(){return HT=e(r.mark((function e(t){var n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,VT("beforeGetDeveloperSettings"),i=n(),VT("afterGetDeveloperSettings"),e.prev=4,e.next=7,NT(i);case 7:a=e.sent,VT("after get SDK wrapper: ".concat(!!a)),a&&(VT("setting SDK Wrapper as gd-sdk"),window.sdkWrapper=a,window.gdsdk=a,window.gdApi=window.gdsdk),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),console.log("Error on SDK wrapper init",e.t0),VT("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),HT.apply(this,arguments)}function VT(e){window.sdkLog.push(e)}function QT(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":n(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===n(window.gdApi.q[0][0])&&window.gdApi.q[0][0]&&((e=window.gdApi.q[0][0]).hasOwnProperty("advertisementSettings")||(e.advertisementSettings={autoplay:!0}))}catch(e){console.log("_get_developer_sets failed",e)}return e}window.sdkLog=[],"img.samsungapps.com"===function(){var e,t,n=C(window.location.href,!0),r=n.host,i=n.query,a=r,s=null==i?void 0:i.gd_sdk_referrer_url;return s&&(s=s.startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),null!==(t=e=C(s,!0))&&void 0!==t&&t.host&&(a=e.host)),a}()?VT("skipped normal SDK init!"):(!function(){GD();var n=MT(QT());function i(){var i=this;this.AdType=g,this.preloadAd=function(){var i=e(r.mark((function e(i){var a,s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.invoke(function(e){return t(this,s),e.preloadAd(i)}.bind(this));case 2:return a=e.sent,hs("[developer-event] preloadAd check",a),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));return function(e){return i.apply(this,arguments)}}(),this.showAd=function(){var i=e(r.mark((function e(i,a){var s,o=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.invoke(function(e){var n=this;if(t(this,o),i===g.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),fs.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),r.adapter="adsense")}.bind(this),e.showAd(i,r)}.bind(this));case 2:return s=e.sent,hs("[developer-event] after showAd",s),e.abrupt("return",s);case 5:case"end":return e.stop()}}),e,this)})));return function(e,t){return i.apply(this,arguments)}}(),this.cancelAd=function(){var e=this;return n.invoke(function(n){return t(this,e),n.cancelAd()}.bind(this))},this.openConsole=function(){var e=this;return n.invoke(function(n){return t(this,e),n.openConsole()}.bind(this))},this.getSession=function(){var e=this;return n.invoke(function(n){return t(this,e),n.session()}.bind(this))},this.sendEvent=function(e){var r=this;return n.invoke(function(n){return t(this,r),n.sendGenericEvent(e)}.bind(this))},this.leaderboard={show:function(){t(this,i),tv.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),tv.addScore(e)}.bind(this)}}i.prototype=new function(){this.showBanner=function(){var e=this;return n.invoke(function(n){return t(this,e),n.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new i,window.gdApi=window.gdsdk}(),VT("afterSDKInit")),function(e){HT.apply(this,arguments)}({_get_developer_sets:QT});