@bygd/gd-sdk-pes 1.38.0 → 1.38.2

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 d,getTopDomain as c,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as v,Layers as g,getKeyByValue as b,getQueryString as _,EventBus as y,getIMASampleTags as w,SDKEvents as k,IMAEvents as A,Macros as E,setDankLog as x,ImplementationTest as S}from"@bygd/gd-sdk-era/dist/default";import R from"@babel/runtime/helpers/createClass";import D from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import O from"url-parse";import{Base64 as C}from"js-base64";import I from"validator";import P from"is-valid-domain";import L from"get-value";import U from"set-value";import M from"lodash.clonedeep";import{EventEmitter as j}from"events";import B from"can-autoplay";import{isPlainObject as N}from"is-plain-object";import G from"querystringify";import F from"lodash.merge";import{v4 as q}from"uuid";import V from"@babel/runtime/helpers/toConsumableArray";var z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},H=function(e){return e&&e.Math===Math&&e},W=H("object"==typeof globalThis&&globalThis)||H("object"==typeof window&&window)||H("object"==typeof self&&self)||H("object"==typeof z&&z)||H("object"==typeof z&&z)||function(){return this}()||Function("return this")(),K={exports:{}},$=W,Q=Object.defineProperty,J=function(e,t){try{Q($,e,{value:t,configurable:!0,writable:!0})}catch(n){$[e]=t}return t},Y=J,X="__core-js_shared__",Z=W[X]||Y(X,{}),ee=Z;(K.exports=function(e,t){return ee[e]||(ee[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.34.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"});var te,ne,re=function(e){try{return!!e()}catch(e){return!0}},ie=!re((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ae=ie,se=Function.prototype,oe=se.call,de=ae&&se.bind.bind(oe,oe),ce=ae?de:function(e){return function(){return oe.apply(e,arguments)}},ue=function(e){return null==e},le=ue,he=TypeError,pe=function(e){if(le(e))throw new he("Can't call method on "+e);return e},fe=pe,me=Object,ve=function(e){return me(fe(e))},ge=ve,be=ce({}.hasOwnProperty),_e=Object.hasOwn||function(e,t){return be(ge(e),t)},ye=ce,we=0,ke=Math.random(),Ae=ye(1..toString),Ee=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ae(++we+ke,36)},xe="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Se=W,Re=xe,De=Se.process,Te=Se.Deno,Oe=De&&De.versions||Te&&Te.version,Ce=Oe&&Oe.v8;Ce&&(ne=(te=Ce.split("."))[0]>0&&te[0]<4?1:+(te[0]+te[1])),!ne&&Re&&(!(te=Re.match(/Edge\/(\d+)/))||te[1]>=74)&&(te=Re.match(/Chrome\/(\d+)/))&&(ne=+te[1]);var Ie=ne,Pe=Ie,Le=re,Ue=W.String,Me=!!Object.getOwnPropertySymbols&&!Le((function(){var e=Symbol("symbol detection");return!Ue(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),je=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Be=W,Ne=K.exports,Ge=_e,Fe=Ee,qe=Me,Ve=je,ze=Be.Symbol,He=Ne("wks"),We=Ve?ze.for||ze:ze&&ze.withoutSetter||Fe,Ke=function(e){return Ge(He,e)||(He[e]=qe&&Ge(ze,e)?ze[e]:We("Symbol."+e)),He[e]},$e={};$e[Ke("toStringTag")]="z";var Qe="[object z]"===String($e),Je="object"==typeof document&&document.all,Ye={all:Je,IS_HTMLDDA:void 0===Je&&void 0!==Je},Xe=Ye.all,Ze=Ye.IS_HTMLDDA?function(e){return"function"==typeof e||e===Xe}:function(e){return"function"==typeof e},et={},tt=!re((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),nt=Ze,rt=Ye.all,it=Ye.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:nt(e)||e===rt}:function(e){return"object"==typeof e?null!==e:nt(e)},at=it,st=W.document,ot=at(st)&&at(st.createElement),dt=function(e){return ot?st.createElement(e):{}},ct=dt,ut=!tt&&!re((function(){return 7!==Object.defineProperty(ct("div"),"a",{get:function(){return 7}}).a})),lt=tt&&re((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ht=it,pt=String,ft=TypeError,mt=function(e){if(ht(e))return e;throw new ft(pt(e)+" is not an object")},vt=ie,gt=Function.prototype.call,bt=vt?gt.bind(gt):function(){return gt.apply(gt,arguments)},_t=W,yt=Ze,wt=function(e,t){return arguments.length<2?(n=_t[e],yt(n)?n:void 0):_t[e]&&_t[e][t];var n},kt=ce({}.isPrototypeOf),At=wt,Et=Ze,xt=kt,St=Object,Rt=je?function(e){return"symbol"==typeof e}:function(e){var t=At("Symbol");return Et(t)&&xt(t.prototype,St(e))},Dt=String,Tt=function(e){try{return Dt(e)}catch(e){return"Object"}},Ot=Ze,Ct=Tt,It=TypeError,Pt=function(e){if(Ot(e))return e;throw new It(Ct(e)+" is not a function")},Lt=Pt,Ut=ue,Mt=function(e,t){var n=e[t];return Ut(n)?void 0:Lt(n)},jt=bt,Bt=Ze,Nt=it,Gt=TypeError,Ft=bt,qt=it,Vt=Rt,zt=Mt,Ht=function(e,t){var n,r;if("string"===t&&Bt(n=e.toString)&&!Nt(r=jt(n,e)))return r;if(Bt(n=e.valueOf)&&!Nt(r=jt(n,e)))return r;if("string"!==t&&Bt(n=e.toString)&&!Nt(r=jt(n,e)))return r;throw new Gt("Can't convert object to primitive value")},Wt=TypeError,Kt=Ke("toPrimitive"),$t=function(e,t){if(!qt(e)||Vt(e))return e;var n,r=zt(e,Kt);if(r){if(void 0===t&&(t="default"),n=Ft(r,e,t),!qt(n)||Vt(n))return n;throw new Wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Ht(e,t)},Qt=Rt,Jt=function(e){var t=$t(e,"string");return Qt(t)?t:t+""},Yt=tt,Xt=ut,Zt=lt,en=mt,tn=Jt,nn=TypeError,rn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,sn="enumerable",on="configurable",dn="writable";et.f=Yt?Zt?function(e,t,n){if(en(e),t=tn(t),en(n),"function"==typeof e&&"prototype"===t&&"value"in n&&dn in n&&!n[dn]){var r=an(e,t);r&&r[dn]&&(e[t]=n.value,n={configurable:on in n?n[on]:r[on],enumerable:sn in n?n[sn]:r[sn],writable:!1})}return rn(e,t,n)}:rn:function(e,t,n){if(en(e),t=tn(t),en(n),Xt)try{return rn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new nn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var cn={exports:{}},un=tt,ln=_e,hn=Function.prototype,pn=un&&Object.getOwnPropertyDescriptor,fn=ln(hn,"name"),mn={EXISTS:fn,PROPER:fn&&"something"===function(){}.name,CONFIGURABLE:fn&&(!un||un&&pn(hn,"name").configurable)},vn=Ze,gn=Z,bn=ce(Function.toString);vn(gn.inspectSource)||(gn.inspectSource=function(e){return bn(e)});var _n,yn,wn,kn=gn.inspectSource,An=Ze,En=W.WeakMap,xn=An(En)&&/native code/.test(String(En)),Sn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Rn=et,Dn=Sn,Tn=tt?function(e,t,n){return Rn.f(e,t,Dn(1,n))}:function(e,t,n){return e[t]=n,e},On=K.exports,Cn=Ee,In=On("keys"),Pn=function(e){return In[e]||(In[e]=Cn(e))},Ln={},Un=xn,Mn=W,jn=it,Bn=Tn,Nn=_e,Gn=Z,Fn=Pn,qn=Ln,Vn="Object already initialized",zn=Mn.TypeError,Hn=Mn.WeakMap;if(Un||Gn.state){var Wn=Gn.state||(Gn.state=new Hn);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,_n=function(e,t){if(Wn.has(e))throw new zn(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=Fn("state");qn[Kn]=!0,_n=function(e,t){if(Nn(e,Kn))throw new zn(Vn);return t.facade=e,Bn(e,Kn,t),t},yn=function(e){return Nn(e,Kn)?e[Kn]:{}},wn=function(e){return Nn(e,Kn)}}var $n={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(!jn(t)||(n=yn(t)).type!==e)throw new zn("Incompatible receiver, "+e+" required");return n}}},Qn=ce,Jn=re,Yn=Ze,Xn=_e,Zn=tt,er=mn.CONFIGURABLE,tr=kn,nr=$n.enforce,rr=$n.get,ir=String,ar=Object.defineProperty,sr=Qn("".slice),or=Qn("".replace),dr=Qn([].join),cr=Zn&&!Jn((function(){return 8!==ar((function(){}),"length",{value:8}).length})),ur=String(String).split("String"),lr=cn.exports=function(e,t,n){"Symbol("===sr(ir(t),0,7)&&(t="["+or(ir(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Xn(e,"name")||er&&e.name!==t)&&(Zn?ar(e,"name",{value:t,configurable:!0}):e.name=t),cr&&n&&Xn(n,"arity")&&e.length!==n.arity&&ar(e,"length",{value:n.arity});try{n&&Xn(n,"constructor")&&n.constructor?Zn&&ar(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=nr(e);return Xn(r,"source")||(r.source=dr(ur,"string"==typeof t?t:"")),e};Function.prototype.toString=lr((function(){return Yn(this)&&rr(this).source||tr(this)}),"toString");var hr=Ze,pr=et,fr=cn.exports,mr=J,vr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(hr(n)&&fr(n,a,r),r.global)i?e[t]=n:mr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:pr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},gr=ce,br=gr({}.toString),_r=gr("".slice),yr=function(e){return _r(br(e),8,-1)},wr=Qe,kr=Ze,Ar=yr,Er=Ke("toStringTag"),xr=Object,Sr="Arguments"===Ar(function(){return arguments}()),Rr=wr?Ar: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=xr(e),Er))?n:Sr?Ar(t):"Object"===(r=Ar(t))&&kr(t.callee)?"Arguments":r},Dr=Rr,Tr=Qe?{}.toString:function(){return"[object "+Dr(this)+"]"};Qe||vr(Object.prototype,"toString",Tr,{unsafe:!0});var Or={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},Cr=dt("span").classList,Ir=Cr&&Cr.constructor&&Cr.constructor.prototype,Pr=Ir===Object.prototype?void 0:Ir,Lr=yr,Ur=ce,Mr=function(e){if("Function"===Lr(e))return Ur(e)},jr=Pt,Br=ie,Nr=Mr(Mr.bind),Gr=function(e,t){return jr(e),void 0===t?e:Br?Nr(e,t):function(){return e.apply(t,arguments)}},Fr=re,qr=yr,Vr=Object,zr=ce("".split),Hr=Fr((function(){return!Vr("z").propertyIsEnumerable(0)}))?function(e){return"String"===qr(e)?zr(e,""):Vr(e)}:Vr,Wr=Math.ceil,Kr=Math.floor,$r=Math.trunc||function(e){var t=+e;return(t>0?Kr:Wr)(t)},Qr=function(e){var t=+e;return t!=t||0===t?0:$r(t)},Jr=Qr,Yr=Math.min,Xr=function(e){return e>0?Yr(Jr(e),9007199254740991):0},Zr=Xr,ei=function(e){return Zr(e.length)},ti=yr,ni=Array.isArray||function(e){return"Array"===ti(e)},ri=ce,ii=re,ai=Ze,si=Rr,oi=kn,di=function(){},ci=[],ui=wt("Reflect","construct"),li=/^\s*(?:class|function)\b/,hi=ri(li.exec),pi=!li.test(di),fi=function(e){if(!ai(e))return!1;try{return ui(di,ci,e),!0}catch(e){return!1}},mi=function(e){if(!ai(e))return!1;switch(si(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return pi||!!hi(li,oi(e))}catch(e){return!0}};mi.sham=!0;var vi=!ui||ii((function(){var e;return fi(fi.call)||!fi(Object)||!fi((function(){e=!0}))||e}))?mi:fi,gi=ni,bi=vi,_i=it,yi=Ke("species"),wi=Array,ki=function(e){var t;return gi(e)&&(t=e.constructor,(bi(t)&&(t===wi||gi(t.prototype))||_i(t)&&null===(t=t[yi]))&&(t=void 0)),void 0===t?wi:t},Ai=function(e,t){return new(ki(e))(0===t?0:t)},Ei=Gr,xi=Hr,Si=ve,Ri=ei,Di=Ai,Ti=ce([].push),Oi=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(d,c,u,l){for(var h,p,f=Si(d),m=xi(f),v=Ri(m),g=Ei(c,u),b=0,_=l||Di,y=t?_(d,v):n||s?_(d,0):void 0;v>b;b++)if((o||b in m)&&(p=g(h=m[b],b,f),e))if(t)y[b]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:Ti(y,h)}else switch(e){case 4:return!1;case 7:Ti(y,h)}return a?-1:r||i?i:y}},Ci={forEach:Oi(0),map:Oi(1),filter:Oi(2),some:Oi(3),every:Oi(4),find:Oi(5),findIndex:Oi(6),filterReject:Oi(7)},Ii=re,Pi=function(e,t){var n=[][e];return!!n&&Ii((function(){n.call(null,t||function(){return 1},1)}))},Li=Ci.forEach,Ui=W,Mi=Or,ji=Pr,Bi=Pi("forEach")?[].forEach:function(e){return Li(this,e,arguments.length>1?arguments[1]:void 0)},Ni=Tn,Gi=function(e){if(e&&e.forEach!==Bi)try{Ni(e,"forEach",Bi)}catch(t){e.forEach=Bi}};for(var Fi in Mi)Mi[Fi]&&Gi(Ui[Fi]&&Ui[Fi].prototype);Gi(ji);var qi={},Vi={},zi={}.propertyIsEnumerable,Hi=Object.getOwnPropertyDescriptor,Wi=Hi&&!zi.call({1:2},1);Vi.f=Wi?function(e){var t=Hi(this,e);return!!t&&t.enumerable}:zi;var Ki=Hr,$i=pe,Qi=function(e){return Ki($i(e))},Ji=tt,Yi=bt,Xi=Vi,Zi=Sn,ea=Qi,ta=Jt,na=_e,ra=ut,ia=Object.getOwnPropertyDescriptor;qi.f=Ji?ia:function(e,t){if(e=ea(e),t=ta(t),ra)try{return ia(e,t)}catch(e){}if(na(e,t))return Zi(!Yi(Xi.f,e,t),e[t])};var aa={},sa=Qr,oa=Math.max,da=Math.min,ca=function(e,t){var n=sa(e);return n<0?oa(n+t,0):da(n,t)},ua=Qi,la=ca,ha=ei,pa=function(e){return function(t,n,r){var i,a=ua(t),s=ha(a),o=la(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}},fa={includes:pa(!0),indexOf:pa(!1)},ma=_e,va=Qi,ga=fa.indexOf,ba=Ln,_a=ce([].push),ya=function(e,t){var n,r=va(e),i=0,a=[];for(n in r)!ma(ba,n)&&ma(r,n)&&_a(a,n);for(;t.length>i;)ma(r,n=t[i++])&&(~ga(a,n)||_a(a,n));return a},wa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ka=ya,Aa=wa.concat("length","prototype");aa.f=Object.getOwnPropertyNames||function(e){return ka(e,Aa)};var Ea={};Ea.f=Object.getOwnPropertySymbols;var xa=wt,Sa=aa,Ra=Ea,Da=mt,Ta=ce([].concat),Oa=xa("Reflect","ownKeys")||function(e){var t=Sa.f(Da(e)),n=Ra.f;return n?Ta(t,n(e)):t},Ca=_e,Ia=Oa,Pa=qi,La=et,Ua=function(e,t,n){for(var r=Ia(t),i=La.f,a=Pa.f,s=0;s<r.length;s++){var o=r[s];Ca(e,o)||n&&Ca(n,o)||i(e,o,a(t,o))}},Ma=re,ja=Ze,Ba=/#|\.prototype\./,Na=function(e,t){var n=Fa[Ga(e)];return n===Va||n!==qa&&(ja(t)?Ma(t):!!t)},Ga=Na.normalize=function(e){return String(e).replace(Ba,".").toLowerCase()},Fa=Na.data={},qa=Na.NATIVE="N",Va=Na.POLYFILL="P",za=Na,Ha=W,Wa=qi.f,Ka=Tn,$a=vr,Qa=J,Ja=Ua,Ya=za,Xa=function(e,t){var n,r,i,a,s,o=e.target,d=e.global,c=e.stat;if(n=d?Ha:c?Ha[o]||Qa(o,{}):(Ha[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Wa(n,r))&&s.value:n[r],!Ya(d?r:o+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ja(a,i)}(e.sham||i&&i.sham)&&Ka(a,"sham",!0),$a(n,r,a,e)}},Za=ya,es=wa,ts=Object.keys||function(e){return Za(e,es)},ns=ve,rs=ts;Xa({target:"Object",stat:!0,forced:re((function(){rs(1)}))},{keys:function(e){return rs(ns(e))}});var is=TypeError,as=Jt,ss=et,os=Sn,ds=function(e,t,n){var r=as(t);r in e?ss.f(e,r,os(0,n)):e[r]=n},cs=re,us=Ie,ls=Ke("species"),hs=function(e){return us>=51||!cs((function(){var t=[];return(t.constructor={})[ls]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},ps=Xa,fs=re,ms=ni,vs=it,gs=ve,bs=ei,_s=function(e){if(e>9007199254740991)throw is("Maximum allowed index exceeded");return e},ys=ds,ws=Ai,ks=hs,As=Ie,Es=Ke("isConcatSpreadable"),xs=As>=51||!fs((function(){var e=[];return e[Es]=!1,e.concat()[0]!==e})),Ss=function(e){if(!vs(e))return!1;var t=e[Es];return void 0!==t?!!t:ms(e)};ps({target:"Array",proto:!0,arity:1,forced:!xs||!ks("concat")},{concat:function(e){var t,n,r,i,a,s=gs(this),o=ws(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Ss(a=-1===t?s:arguments[t]))for(i=bs(a),_s(d+i),n=0;n<i;n++,d++)n in a&&ys(o,d,a[n]);else _s(d+1),ys(o,d++,a);return o.length=d,o}});var Rs=Array.isArray,Ds=Object.prototype.toString,Ts=Rs||function(e){return!!e&&"[object Array]"==Ds.call(e)},Os={name:"@bygd/gd-sdk-pes",version:"1.38.0",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap --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",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"}},Cs=function(e){var t=Is("object"===n(e)?e:i(e));return t&&t.version?Os.version>=t.version?t:void 0:t},Is=function(e){var n=this;if(!Ts(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}},Ps=function(){var e;(e=console).log.apply(e,arguments)},Ls=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 Us={},Ms=Rr,js=String,Bs=function(e){if("Symbol"===Ms(e))throw new TypeError("Cannot convert a Symbol value to a string");return js(e)},Ns={},Gs=tt,Fs=lt,Vs=et,zs=mt,Hs=Qi,Ws=ts;Ns.f=Gs&&!Fs?Object.defineProperties:function(e,t){zs(e);for(var n,r=Hs(t),i=Ws(t),a=i.length,s=0;a>s;)Vs.f(e,n=i[s++],r[n]);return e};var Ks,$s=wt("document","documentElement"),Qs=mt,Js=Ns,Ys=wa,Xs=Ln,Zs=$s,eo=dt,to="prototype",no="script",ro=Pn("IE_PROTO"),io=function(){},ao=function(e){return"<"+no+">"+e+"</"+no+">"},so=function(e){e.write(ao("")),e.close();var t=e.parentWindow.Object;return e=null,t},oo=function(){try{Ks=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;oo="undefined"!=typeof document?document.domain&&Ks?so(Ks):(t=eo("iframe"),n="java"+no+":",t.style.display="none",Zs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(ao("document.F=Object")),e.close(),e.F):so(Ks);for(var r=Ys.length;r--;)delete oo[to][Ys[r]];return oo()};Xs[ro]=!0;var co=Object.create||function(e,t){var n;return null!==e?(io[to]=Qs(e),n=new io,io[to]=null,n[ro]=e):n=oo(),void 0===t?n:Js.f(n,t)},uo={},lo=ca,ho=ei,po=ds,fo=Array,mo=Math.max,vo=function(e,t,n){for(var r=ho(e),i=lo(t,r),a=lo(void 0===n?r:n,r),s=fo(mo(a-i,0)),o=0;i<a;i++,o++)po(s,o,e[i]);return s.length=o,s},go=yr,bo=Qi,_o=aa.f,yo=vo,wo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];uo.f=function(e){return wo&&"Window"===go(e)?function(e){try{return _o(e)}catch(e){return yo(wo)}}(e):_o(bo(e))};var ko=cn.exports,Ao=et,Eo=function(e,t,n){return n.get&&ko(n.get,t,{getter:!0}),n.set&&ko(n.set,t,{setter:!0}),Ao.f(e,t,n)},xo={},So=Ke;xo.f=So;var Ro=W,Do=_e,To=xo,Oo=et.f,Co=function(e){var t=Ro.Symbol||(Ro.Symbol={});Do(t,e)||Oo(t,e,{value:To.f(e)})},Io=bt,Po=wt,Lo=Ke,Uo=vr,Mo=et.f,jo=_e,Bo=Ke("toStringTag"),No=function(e,t,n){e&&!n&&(e=e.prototype),e&&!jo(e,Bo)&&Mo(e,Bo,{configurable:!0,value:t})},Go=Xa,Fo=W,qo=bt,Vo=ce,zo=tt,Ho=Me,Wo=re,Ko=_e,$o=kt,Qo=mt,Jo=Qi,Yo=Jt,Xo=Bs,Zo=Sn,ed=co,td=ts,nd=aa,rd=uo,id=Ea,ad=qi,sd=et,od=Ns,dd=Vi,cd=vr,ud=Eo,ld=K.exports,hd=Ln,pd=Ee,fd=Ke,md=xo,vd=Co,gd=function(){var e=Po("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Lo("toPrimitive");t&&!t[r]&&Uo(t,r,(function(e){return Io(n,this)}),{arity:1})},bd=No,_d=$n,yd=Ci.forEach,wd=Pn("hidden"),kd="Symbol",Ad="prototype",Ed=_d.set,xd=_d.getterFor(kd),Sd=Object[Ad],Rd=Fo.Symbol,Dd=Rd&&Rd[Ad],Td=Fo.RangeError,Od=Fo.TypeError,Cd=Fo.QObject,Id=ad.f,Pd=sd.f,Ld=rd.f,Ud=dd.f,Md=Vo([].push),jd=ld("symbols"),Bd=ld("op-symbols"),Nd=ld("wks"),Gd=!Cd||!Cd[Ad]||!Cd[Ad].findChild,Fd=function(e,t,n){var r=Id(Sd,t);r&&delete Sd[t],Pd(e,t,n),r&&e!==Sd&&Pd(Sd,t,r)},qd=zo&&Wo((function(){return 7!==ed(Pd({},"a",{get:function(){return Pd(this,"a",{value:7}).a}})).a}))?Fd:Pd,Vd=function(e,t){var n=jd[e]=ed(Dd);return Ed(n,{type:kd,tag:e,description:t}),zo||(n.description=t),n},zd=function(e,t,n){e===Sd&&zd(Bd,t,n),Qo(e);var r=Yo(t);return Qo(n),Ko(jd,r)?(n.enumerable?(Ko(e,wd)&&e[wd][r]&&(e[wd][r]=!1),n=ed(n,{enumerable:Zo(0,!1)})):(Ko(e,wd)||Pd(e,wd,Zo(1,{})),e[wd][r]=!0),qd(e,r,n)):Pd(e,r,n)},Hd=function(e,t){Qo(e);var n=Jo(t),r=td(n).concat(Qd(n));return yd(r,(function(t){zo&&!qo(Wd,n,t)||zd(e,t,n[t])})),e},Wd=function(e){var t=Yo(e),n=qo(Ud,this,t);return!(this===Sd&&Ko(jd,t)&&!Ko(Bd,t))&&(!(n||!Ko(this,t)||!Ko(jd,t)||Ko(this,wd)&&this[wd][t])||n)},Kd=function(e,t){var n=Jo(e),r=Yo(t);if(n!==Sd||!Ko(jd,r)||Ko(Bd,r)){var i=Id(n,r);return!i||!Ko(jd,r)||Ko(n,wd)&&n[wd][r]||(i.enumerable=!0),i}},$d=function(e){var t=Ld(Jo(e)),n=[];return yd(t,(function(e){Ko(jd,e)||Ko(hd,e)||Md(n,e)})),n},Qd=function(e){var t=e===Sd,n=Ld(t?Bd:Jo(e)),r=[];return yd(n,(function(e){!Ko(jd,e)||t&&!Ko(Sd,e)||Md(r,jd[e])})),r};Ho||(cd(Dd=(Rd=function(){if($o(Dd,this))throw new Od("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Xo(arguments[0]):void 0,t=pd(e),n=function(e){var r=void 0===this?Fo:this;r===Sd&&qo(n,Bd,e),Ko(r,wd)&&Ko(r[wd],t)&&(r[wd][t]=!1);var i=Zo(1,e);try{qd(r,t,i)}catch(e){if(!(e instanceof Td))throw e;Fd(r,t,i)}};return zo&&Gd&&qd(Sd,t,{configurable:!0,set:n}),Vd(t,e)})[Ad],"toString",(function(){return xd(this).tag})),cd(Rd,"withoutSetter",(function(e){return Vd(pd(e),e)})),dd.f=Wd,sd.f=zd,od.f=Hd,ad.f=Kd,nd.f=rd.f=$d,id.f=Qd,md.f=function(e){return Vd(fd(e),e)},zo&&(ud(Dd,"description",{configurable:!0,get:function(){return xd(this).description}}),cd(Sd,"propertyIsEnumerable",Wd,{unsafe:!0}))),Go({global:!0,constructor:!0,wrap:!0,forced:!Ho,sham:!Ho},{Symbol:Rd}),yd(td(Nd),(function(e){vd(e)})),Go({target:kd,stat:!0,forced:!Ho},{useSetter:function(){Gd=!0},useSimple:function(){Gd=!1}}),Go({target:"Object",stat:!0,forced:!Ho,sham:!zo},{create:function(e,t){return void 0===t?ed(e):Hd(ed(e),t)},defineProperty:zd,defineProperties:Hd,getOwnPropertyDescriptor:Kd}),Go({target:"Object",stat:!0,forced:!Ho},{getOwnPropertyNames:$d}),gd(),bd(Rd,kd),hd[wd]=!0;var Jd=Me&&!!Symbol.for&&!!Symbol.keyFor,Yd=Xa,Xd=wt,Zd=_e,ec=Bs,tc=K.exports,nc=Jd,rc=tc("string-to-symbol-registry"),ic=tc("symbol-to-string-registry");Yd({target:"Symbol",stat:!0,forced:!nc},{for:function(e){var t=ec(e);if(Zd(rc,t))return rc[t];var n=Xd("Symbol")(t);return rc[t]=n,ic[n]=t,n}});var ac=Xa,sc=_e,oc=Rt,dc=Tt,cc=Jd,uc=(0,K.exports)("symbol-to-string-registry");ac({target:"Symbol",stat:!0,forced:!cc},{keyFor:function(e){if(!oc(e))throw new TypeError(dc(e)+" is not a symbol");if(sc(uc,e))return uc[e]}});var lc=ie,hc=Function.prototype,pc=hc.apply,fc=hc.call,mc="object"==typeof Reflect&&Reflect.apply||(lc?fc.bind(pc):function(){return fc.apply(pc,arguments)}),vc=ce([].slice),gc=ni,bc=Ze,_c=yr,yc=Bs,wc=ce([].push),kc=Xa,Ac=wt,Ec=mc,xc=bt,Sc=ce,Rc=re,Dc=Ze,Tc=Rt,Oc=vc,Cc=function(e){if(bc(e))return e;if(gc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?wc(n,i):"number"!=typeof i&&"Number"!==_c(i)&&"String"!==_c(i)||wc(n,yc(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(gc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Ic=Me,Pc=String,Lc=Ac("JSON","stringify"),Uc=Sc(/./.exec),Mc=Sc("".charAt),jc=Sc("".charCodeAt),Bc=Sc("".replace),Nc=Sc(1..toString),Gc=/[\uD800-\uDFFF]/g,Fc=/^[\uD800-\uDBFF]$/,qc=/^[\uDC00-\uDFFF]$/,Vc=!Ic||Rc((function(){var e=Ac("Symbol")("stringify detection");return"[null]"!==Lc([e])||"{}"!==Lc({a:e})||"{}"!==Lc(Object(e))})),zc=Rc((function(){return'"\\udf06\\ud834"'!==Lc("\udf06\ud834")||'"\\udead"'!==Lc("\udead")})),Hc=function(e,t){var n=Oc(arguments),r=Cc(t);if(Dc(r)||void 0!==e&&!Tc(e))return n[1]=function(e,t){if(Dc(r)&&(t=xc(r,this,Pc(e),t)),!Tc(t))return t},Ec(Lc,null,n)},Wc=function(e,t,n){var r=Mc(n,t-1),i=Mc(n,t+1);return Uc(Fc,e)&&!Uc(qc,i)||Uc(qc,e)&&!Uc(Fc,r)?"\\u"+Nc(jc(e,0),16):e};Lc&&kc({target:"JSON",stat:!0,arity:3,forced:Vc||zc},{stringify:function(e,t,n){var r=Oc(arguments),i=Ec(Vc?Hc:Lc,null,r);return zc&&"string"==typeof i?Bc(i,Gc,Wc):i}});var Kc=Ea,$c=ve;Xa({target:"Object",stat:!0,forced:!Me||re((function(){Kc.f(1)}))},{getOwnPropertySymbols:function(e){var t=Kc.f;return t?t($c(e)):[]}});var Qc=Ci.filter;Xa({target:"Array",proto:!0,forced:!hs("filter")},{filter:function(e){return Qc(this,e,arguments.length>1?arguments[1]:void 0)}});var Jc=Xa,Yc=re,Xc=Qi,Zc=qi.f,eu=tt;Jc({target:"Object",stat:!0,forced:!eu||Yc((function(){Zc(1)})),sham:!eu},{getOwnPropertyDescriptor:function(e,t){return Zc(Xc(e),t)}});var tu=Oa,nu=Qi,ru=qi,iu=ds;Xa({target:"Object",stat:!0,sham:!tt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=nu(e),i=ru.f,a=tu(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&iu(s,t,n);return s}});var au=Xa,su=ni,ou=vi,du=it,cu=ca,uu=ei,lu=Qi,hu=ds,pu=Ke,fu=vc,mu=hs("slice"),vu=pu("species"),gu=Array,bu=Math.max;au({target:"Array",proto:!0,forced:!mu},{slice:function(e,t){var n,r,i,a=lu(this),s=uu(a),o=cu(e,s),d=cu(void 0===t?s:t,s);if(su(a)&&(n=a.constructor,(ou(n)&&(n===gu||su(n.prototype))||du(n)&&null===(n=n[vu]))&&(n=void 0),n===gu||void 0===n))return fu(a,o,d);for(r=new(void 0===n?gu:n)(bu(d-o,0)),i=0;o<d;o++,i++)o in a&&hu(r,i,a[o]);return r.length=i,r}});var _u=mt,yu=function(){var e=_u(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},wu=bt,ku=_e,Au=kt,Eu=yu,xu=RegExp.prototype,Su=function(e){var t=e.flags;return void 0!==t||"flags"in xu||ku(e,"flags")||!Au(xu,e)?t:wu(Eu,e)},Ru=mn.PROPER,Du=vr,Tu=mt,Ou=Bs,Cu=re,Iu=Su,Pu="toString",Lu=RegExp.prototype[Pu],Uu=Cu((function(){return"/a/b"!==Lu.call({source:"a",flags:"b"})})),Mu=Ru&&Lu.name!==Pu;(Uu||Mu)&&Du(RegExp.prototype,Pu,(function(){var e=Tu(this);return"/"+Ou(e.source)+"/"+Ou(Iu(e))}),{unsafe:!0});var ju=bt,Bu=mt,Nu=Mt,Gu=function(e,t,n){var r,i;Bu(e);try{if(!(r=Nu(e,"return"))){if("throw"===t)throw n;return n}r=ju(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Bu(r),n},Fu=mt,qu=Gu,Vu={},zu=Vu,Hu=Ke("iterator"),Wu=Array.prototype,Ku=function(e){return void 0!==e&&(zu.Array===e||Wu[Hu]===e)},$u=Rr,Qu=Mt,Ju=ue,Yu=Vu,Xu=Ke("iterator"),Zu=function(e){if(!Ju(e))return Qu(e,Xu)||Qu(e,"@@iterator")||Yu[$u(e)]},el=bt,tl=Pt,nl=mt,rl=Tt,il=Zu,al=TypeError,sl=function(e,t){var n=arguments.length<2?il(e):t;if(tl(n))return nl(el(n,e));throw new al(rl(e)+" is not iterable")},ol=Gr,dl=bt,cl=ve,ul=function(e,t,n,r){try{return r?t(Fu(n)[0],n[1]):t(n)}catch(t){qu(e,"throw",t)}},ll=Ku,hl=vi,pl=ei,fl=ds,ml=sl,vl=Zu,gl=Array,bl=function(e){var t=cl(e),n=hl(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=ol(i,r>2?arguments[2]:void 0));var s,o,d,c,u,l,h=vl(t),p=0;if(!h||this===gl&&ll(h))for(s=pl(t),o=n?new this(s):gl(s);s>p;p++)l=a?i(t[p],p):t[p],fl(o,p,l);else for(u=(c=ml(t,h)).next,o=n?new this:[];!(d=dl(u,c)).done;p++)l=a?ul(c,i,[d.value,p],!0):d.value,fl(o,p,l);return o.length=p,o},_l=Ke("iterator"),yl=!1;try{var wl=0,kl={next:function(){return{done:!!wl++}},return:function(){yl=!0}};kl[_l]=function(){return this},Array.from(kl,(function(){throw 2}))}catch(e){}var Al=function(e,t){try{if(!t&&!yl)return!1}catch(e){return!1}var n=!1;try{var r={};r[_l]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},El=bl;Xa({target:"Array",stat:!0,forced:!Al((function(e){Array.from(e)}))},{from:El});var xl,Sl,Rl,Dl=ce,Tl=Qr,Ol=Bs,Cl=pe,Il=Dl("".charAt),Pl=Dl("".charCodeAt),Ll=Dl("".slice),Ul=function(e){return function(t,n){var r,i,a=Ol(Cl(t)),s=Tl(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Pl(a,s))<55296||r>56319||s+1===o||(i=Pl(a,s+1))<56320||i>57343?e?Il(a,s):r:e?Ll(a,s,s+2):i-56320+(r-55296<<10)+65536}},Ml={codeAt:Ul(!1),charAt:Ul(!0)},jl=!re((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Bl=_e,Nl=Ze,Gl=ve,Fl=jl,ql=Pn("IE_PROTO"),Vl=Object,zl=Vl.prototype,Hl=Fl?Vl.getPrototypeOf:function(e){var t=Gl(e);if(Bl(t,ql))return t[ql];var n=t.constructor;return Nl(n)&&t instanceof n?n.prototype:t instanceof Vl?zl:null},Wl=re,Kl=Ze,$l=it,Ql=Hl,Jl=vr,Yl=Ke("iterator"),Xl=!1;[].keys&&("next"in(Rl=[].keys())?(Sl=Ql(Ql(Rl)))!==Object.prototype&&(xl=Sl):Xl=!0);var Zl=!$l(xl)||Wl((function(){var e={};return xl[Yl].call(e)!==e}));Zl&&(xl={}),Kl(xl[Yl])||Jl(xl,Yl,(function(){return this}));var eh={IteratorPrototype:xl,BUGGY_SAFARI_ITERATORS:Xl},th=eh.IteratorPrototype,nh=co,rh=Sn,ih=No,ah=Vu,sh=function(){return this},oh=function(e,t,n,r){var i=t+" Iterator";return e.prototype=nh(th,{next:rh(+!r,n)}),ih(e,i,!1),ah[i]=sh,e},dh=ce,ch=Pt,uh=Ze,lh=String,hh=TypeError,ph=function(e,t,n){try{return dh(ch(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},fh=mt,mh=function(e){if("object"==typeof e||uh(e))return e;throw new hh("Can't set "+lh(e)+" as a prototype")},vh=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=ph(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return fh(n),mh(r),t?e(n,r):n.__proto__=r,n}}():void 0),gh=Xa,bh=bt,_h=Ze,yh=oh,wh=Hl,kh=vh,Ah=No,Eh=Tn,xh=vr,Sh=Vu,Rh=mn.PROPER,Dh=mn.CONFIGURABLE,Th=eh.IteratorPrototype,Oh=eh.BUGGY_SAFARI_ITERATORS,Ch=Ke("iterator"),Ih="keys",Ph="values",Lh="entries",Uh=function(){return this},Mh=function(e,t,n,r,i,a,s){yh(n,t,r);var o,d,c,u=function(e){if(e===i&&m)return m;if(!Oh&&e&&e in p)return p[e];switch(e){case Ih:case Ph:case Lh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Ch]||p["@@iterator"]||i&&p[i],m=!Oh&&f||u(i),v="Array"===t&&p.entries||f;if(v&&(o=wh(v.call(new e)))!==Object.prototype&&o.next&&(wh(o)!==Th&&(kh?kh(o,Th):_h(o[Ch])||xh(o,Ch,Uh)),Ah(o,l,!0)),Rh&&i===Ph&&f&&f.name!==Ph&&(Dh?Eh(p,"name",Ph):(h=!0,m=function(){return bh(f,this)})),i)if(d={values:u(Ph),keys:a?m:u(Ih),entries:u(Lh)},s)for(c in d)(Oh||h||!(c in p))&&xh(p,c,d[c]);else gh({target:t,proto:!0,forced:Oh||h},d);return p[Ch]!==m&&xh(p,Ch,m,{name:i}),Sh[t]=m,d},jh=function(e,t){return{value:e,done:t}},Bh=Ml.charAt,Nh=Bs,Gh=$n,Fh=Mh,qh=jh,Vh="String Iterator",zh=Gh.set,Hh=Gh.getterFor(Vh);Fh(String,"String",(function(e){zh(this,{type:Vh,string:Nh(e),index:0})}),(function(){var e,t=Hh(this),n=t.string,r=t.index;return r>=n.length?qh(void 0,!0):(e=Bh(n,r),t.index+=e.length,qh(e,!1))}));var Wh=re,Kh=W.RegExp,$h=Wh((function(){var e=Kh("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Qh=$h||Wh((function(){return!Kh("a","y").sticky})),Jh={BROKEN_CARET:$h||Wh((function(){var e=Kh("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Qh,UNSUPPORTED_Y:$h},Yh=re,Xh=W.RegExp,Zh=Yh((function(){var e=Xh(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),ep=re,tp=W.RegExp,np=ep((function(){var e=tp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),rp=bt,ip=ce,ap=Bs,sp=yu,op=Jh,dp=K.exports,cp=co,up=$n.get,lp=Zh,hp=np,pp=dp("native-string-replace",String.prototype.replace),fp=RegExp.prototype.exec,mp=fp,vp=ip("".charAt),gp=ip("".indexOf),bp=ip("".replace),_p=ip("".slice),yp=function(){var e=/a/,t=/b*/g;return rp(fp,e,"a"),rp(fp,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),wp=op.BROKEN_CARET,kp=void 0!==/()??/.exec("")[1];(yp||kp||wp||lp||hp)&&(mp=function(e){var t,n,r,i,a,s,o,d=this,c=up(d),u=ap(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=rp(mp,l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,p=wp&&d.sticky,f=rp(sp,d),m=d.source,v=0,g=u;if(p&&(f=bp(f,"y",""),-1===gp(f,"g")&&(f+="g"),g=_p(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==vp(u,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",f)),kp&&(n=new RegExp("^"+m+"$(?!\\s)",f)),yp&&(r=d.lastIndex),i=rp(fp,p?n:d,g),p?i?(i.input=_p(i.input,v),i[0]=_p(i[0],v),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:yp&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),kp&&i&&i.length>1&&rp(pp,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=cp(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var Ap=mp;Xa({target:"RegExp",proto:!0,forced:/./.exec!==Ap},{exec:Ap});var Ep=Xa,xp=tt,Sp=ce,Rp=_e,Dp=Ze,Tp=kt,Op=Bs,Cp=Eo,Ip=Ua,Pp=W.Symbol,Lp=Pp&&Pp.prototype;if(xp&&Dp(Pp)&&(!("description"in Lp)||void 0!==Pp().description)){var Up={},Mp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Op(arguments[0]),t=Tp(Lp,this)?new Pp(e):void 0===e?Pp():Pp(e);return""===e&&(Up[t]=!0),t};Ip(Mp,Pp),Mp.prototype=Lp,Lp.constructor=Mp;var jp="Symbol(description detection)"===String(Pp("description detection")),Bp=Sp(Lp.valueOf),Np=Sp(Lp.toString),Gp=/^Symbol\((.*)\)[^)]+$/,Fp=Sp("".replace),qp=Sp("".slice);Cp(Lp,"description",{configurable:!0,get:function(){var e=Bp(this);if(Rp(Up,e))return"";var t=Np(e),n=jp?qp(t,7,-1):Fp(t,Gp,"$1");return""===n?void 0:n}}),Ep({global:!0,constructor:!0,forced:!0},{Symbol:Mp})}Co("iterator");var Vp=Ke,zp=co,Hp=et.f,Wp=Vp("unscopables"),Kp=Array.prototype;void 0===Kp[Wp]&&Hp(Kp,Wp,{configurable:!0,value:zp(null)});var $p=function(e){Kp[Wp][e]=!0},Qp=Qi,Jp=$p,Yp=Vu,Xp=$n,Zp=et.f,ef=Mh,tf=jh,nf=tt,rf="Array Iterator",af=Xp.set,sf=Xp.getterFor(rf),of=ef(Array,"Array",(function(e,t){af(this,{type:rf,target:Qp(e),index:0,kind:t})}),(function(){var e=sf(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,tf(void 0,!0);switch(e.kind){case"keys":return tf(n,!1);case"values":return tf(t[n],!1)}return tf([n,t[n]],!1)}),"values"),df=Yp.Arguments=Yp.Array;if(Jp("keys"),Jp("values"),Jp("entries"),nf&&"values"!==df.name)try{Zp(df,"name",{value:"values"})}catch(e){}var cf=W,uf=Or,lf=Pr,hf=of,pf=Tn,ff=No,mf=Ke("iterator"),vf=hf.values,gf=function(e,t){if(e){if(e[mf]!==vf)try{pf(e,mf,vf)}catch(t){e[mf]=vf}if(ff(e,t,!0),uf[t])for(var n in hf)if(e[n]!==hf[n])try{pf(e,n,hf[n])}catch(t){e[n]=hf[n]}}};for(var bf in uf)gf(cf[bf]&&cf[bf].prototype,bf);gf(lf,"DOMTokenList");var _f,yf,wf,kf,Af="process"===yr(W.process),Ef=wt,xf=Eo,Sf=tt,Rf=Ke("species"),Df=function(e){var t=Ef(e);Sf&&t&&!t[Rf]&&xf(t,Rf,{configurable:!0,get:function(){return this}})},Tf=kt,Of=TypeError,Cf=function(e,t){if(Tf(t,e))return e;throw new Of("Incorrect invocation")},If=vi,Pf=Tt,Lf=TypeError,Uf=mt,Mf=function(e){if(If(e))return e;throw new Lf(Pf(e)+" is not a constructor")},jf=ue,Bf=Ke("species"),Nf=function(e,t){var n,r=Uf(e).constructor;return void 0===r||jf(n=Uf(r)[Bf])?t:Mf(n)},Gf=TypeError,Ff=function(e,t){if(e<t)throw new Gf("Not enough arguments");return e},qf=/(?:ipad|iphone|ipod).*applewebkit/i.test(xe),Vf=W,zf=mc,Hf=Gr,Wf=Ze,Kf=_e,$f=re,Qf=$s,Jf=vc,Yf=dt,Xf=Ff,Zf=qf,em=Af,tm=Vf.setImmediate,nm=Vf.clearImmediate,rm=Vf.process,im=Vf.Dispatch,am=Vf.Function,sm=Vf.MessageChannel,om=Vf.String,dm=0,cm={},um="onreadystatechange";$f((function(){_f=Vf.location}));var lm=function(e){if(Kf(cm,e)){var t=cm[e];delete cm[e],t()}},hm=function(e){return function(){lm(e)}},pm=function(e){lm(e.data)},fm=function(e){Vf.postMessage(om(e),_f.protocol+"//"+_f.host)};tm&&nm||(tm=function(e){Xf(arguments.length,1);var t=Wf(e)?e:am(e),n=Jf(arguments,1);return cm[++dm]=function(){zf(t,void 0,n)},yf(dm),dm},nm=function(e){delete cm[e]},em?yf=function(e){rm.nextTick(hm(e))}:im&&im.now?yf=function(e){im.now(hm(e))}:sm&&!Zf?(kf=(wf=new sm).port2,wf.port1.onmessage=pm,yf=Hf(kf.postMessage,kf)):Vf.addEventListener&&Wf(Vf.postMessage)&&!Vf.importScripts&&_f&&"file:"!==_f.protocol&&!$f(fm)?(yf=fm,Vf.addEventListener("message",pm,!1)):yf=um in Yf("script")?function(e){Qf.appendChild(Yf("script"))[um]=function(){Qf.removeChild(this),lm(e)}}:function(e){setTimeout(hm(e),0)});var mm={set:tm,clear:nm},vm=function(){this.head=null,this.tail=null};vm.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 gm,bm,_m,ym,wm,km=vm,Am=/ipad|iphone|ipod/i.test(xe)&&"undefined"!=typeof Pebble,Em=/web0s(?!.*chrome)/i.test(xe),xm=W,Sm=Gr,Rm=qi.f,Dm=mm.set,Tm=km,Om=qf,Cm=Am,Im=Em,Pm=Af,Lm=xm.MutationObserver||xm.WebKitMutationObserver,Um=xm.document,Mm=xm.process,jm=xm.Promise,Bm=Rm(xm,"queueMicrotask"),Nm=Bm&&Bm.value;if(!Nm){var Gm=new Tm,Fm=function(){var e,t;for(Pm&&(e=Mm.domain)&&e.exit();t=Gm.get();)try{t()}catch(e){throw Gm.head&&gm(),e}e&&e.enter()};Om||Pm||Im||!Lm||!Um?!Cm&&jm&&jm.resolve?((ym=jm.resolve(void 0)).constructor=jm,wm=Sm(ym.then,ym),gm=function(){wm(Fm)}):Pm?gm=function(){Mm.nextTick(Fm)}:(Dm=Sm(Dm,xm),gm=function(){Dm(Fm)}):(bm=!0,_m=Um.createTextNode(""),new Lm(Fm).observe(_m,{characterData:!0}),gm=function(){_m.data=bm=!bm}),Nm=function(e){Gm.head||gm(),Gm.add(e)}}var qm=Nm,Vm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},zm=W.Promise,Hm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Wm=!Hm&&!Af&&"object"==typeof window&&"object"==typeof document,Km=W,$m=zm,Qm=Ze,Jm=za,Ym=kn,Xm=Ke,Zm=Wm,ev=Hm,tv=Ie;$m&&$m.prototype;var nv=Xm("species"),rv=!1,iv=Qm(Km.PromiseRejectionEvent),av=Jm("Promise",(function(){var e=Ym($m),t=e!==String($m);if(!t&&66===tv)return!0;if(!tv||tv<51||!/native code/.test(e)){var n=new $m((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[nv]=r,!(rv=n.then((function(){}))instanceof r))return!0}return!t&&(Zm||ev)&&!iv})),sv={CONSTRUCTOR:av,REJECTION_EVENT:iv,SUBCLASSING:rv},ov={},dv=Pt,cv=TypeError,uv=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new cv("Bad Promise constructor");t=e,n=r})),this.resolve=dv(t),this.reject=dv(n)};ov.f=function(e){return new uv(e)};var lv,hv,pv,fv=Xa,mv=Af,vv=W,gv=bt,bv=vr,_v=vh,yv=No,wv=Df,kv=Pt,Av=Ze,Ev=it,xv=Cf,Sv=Nf,Rv=mm.set,Dv=qm,Tv=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}},Ov=Vm,Cv=km,Iv=$n,Pv=zm,Lv=ov,Uv="Promise",Mv=sv.CONSTRUCTOR,jv=sv.REJECTION_EVENT,Bv=sv.SUBCLASSING,Nv=Iv.getterFor(Uv),Gv=Iv.set,Fv=Pv&&Pv.prototype,qv=Pv,Vv=Fv,zv=vv.TypeError,Hv=vv.document,Wv=vv.process,Kv=Lv.f,$v=Kv,Qv=!!(Hv&&Hv.createEvent&&vv.dispatchEvent),Jv="unhandledrejection",Yv=function(e){var t;return!(!Ev(e)||!Av(t=e.then))&&t},Xv=function(e,t){var n,r,i,a=t.value,s=1===t.state,o=s?e.ok:e.fail,d=e.resolve,c=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?c(new zv("Promise-chain cycle")):(r=Yv(n))?gv(r,n,d,c):d(n)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},Zv=function(e,t){e.notified||(e.notified=!0,Dv((function(){for(var n,r=e.reactions;n=r.get();)Xv(n,e);e.notified=!1,t&&!e.rejection&&tg(e)})))},eg=function(e,t,n){var r,i;Qv?((r=Hv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),vv.dispatchEvent(r)):r={promise:t,reason:n},!jv&&(i=vv["on"+e])?i(r):e===Jv&&Tv("Unhandled promise rejection",n)},tg=function(e){gv(Rv,vv,(function(){var t,n=e.facade,r=e.value;if(ng(e)&&(t=Ov((function(){mv?Wv.emit("unhandledRejection",r,n):eg(Jv,n,r)})),e.rejection=mv||ng(e)?2:1,t.error))throw t.value}))},ng=function(e){return 1!==e.rejection&&!e.parent},rg=function(e){gv(Rv,vv,(function(){var t=e.facade;mv?Wv.emit("rejectionHandled",t):eg("rejectionhandled",t,e.value)}))},ig=function(e,t,n){return function(r){e(t,r,n)}},ag=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Zv(e,!0))},sg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new zv("Promise can't be resolved itself");var r=Yv(t);r?Dv((function(){var n={done:!1};try{gv(r,t,ig(sg,n,e),ig(ag,n,e))}catch(t){ag(n,t,e)}})):(e.value=t,e.state=1,Zv(e,!1))}catch(t){ag({done:!1},t,e)}}};if(Mv&&(Vv=(qv=function(e){xv(this,Vv),kv(e),gv(lv,this);var t=Nv(this);try{e(ig(sg,t),ig(ag,t))}catch(e){ag(t,e)}}).prototype,(lv=function(e){Gv(this,{type:Uv,done:!1,notified:!1,parent:!1,reactions:new Cv,rejection:!1,state:0,value:void 0})}).prototype=bv(Vv,"then",(function(e,t){var n=Nv(this),r=Kv(Sv(this,qv));return n.parent=!0,r.ok=!Av(e)||e,r.fail=Av(t)&&t,r.domain=mv?Wv.domain:void 0,0===n.state?n.reactions.add(r):Dv((function(){Xv(r,n)})),r.promise})),hv=function(){var e=new lv,t=Nv(e);this.promise=e,this.resolve=ig(sg,t),this.reject=ig(ag,t)},Lv.f=Kv=function(e){return e===qv||undefined===e?new hv(e):$v(e)},Av(Pv)&&Fv!==Object.prototype)){pv=Fv.then,Bv||bv(Fv,"then",(function(e,t){var n=this;return new qv((function(e,t){gv(pv,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete Fv.constructor}catch(e){}_v&&_v(Fv,Vv)}fv({global:!0,constructor:!0,wrap:!0,forced:Mv},{Promise:qv}),yv(qv,Uv,!1),wv(Uv);var og=Gr,dg=bt,cg=mt,ug=Tt,lg=Ku,hg=ei,pg=kt,fg=sl,mg=Zu,vg=Gu,gg=TypeError,bg=function(e,t){this.stopped=e,this.result=t},_g=bg.prototype,yg=function(e,t,n){var r,i,a,s,o,d,c,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),v=function(e){return r&&vg(r,"normal",e),new bg(!0,e)},g=function(e){return l?(cg(e),f?m(e[0],e[1],v):m(e[0],e[1])):f?m(e,v):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=mg(e)))throw new gg(ug(e)+" is not iterable");if(lg(i)){for(a=0,s=hg(e);s>a;a++)if((o=g(e[a]))&&pg(_g,o))return o;return new bg(!1)}r=fg(e,i)}for(d=h?e.next:r.next;!(c=dg(d,r)).done;){try{o=g(c.value)}catch(e){vg(r,"throw",e)}if("object"==typeof o&&o&&pg(_g,o))return o}return new bg(!1)},wg=zm,kg=sv.CONSTRUCTOR||!Al((function(e){wg.all(e).then(void 0,(function(){}))})),Ag=bt,Eg=Pt,xg=ov,Sg=Vm,Rg=yg;Xa({target:"Promise",stat:!0,forced:kg},{all:function(e){var t=this,n=xg.f(t),r=n.resolve,i=n.reject,a=Sg((function(){var n=Eg(t.resolve),a=[],s=0,o=1;Rg(e,(function(e){var d=s++,c=!1;o++,Ag(n,t,e).then((function(e){c||(c=!0,a[d]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var Dg=Xa,Tg=sv.CONSTRUCTOR,Og=zm,Cg=wt,Ig=Ze,Pg=vr,Lg=Og&&Og.prototype;if(Dg({target:"Promise",proto:!0,forced:Tg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Ig(Og)){var Ug=Cg("Promise").prototype.catch;Lg.catch!==Ug&&Pg(Lg,"catch",Ug,{unsafe:!0})}var Mg=bt,jg=Pt,Bg=ov,Ng=Vm,Gg=yg;Xa({target:"Promise",stat:!0,forced:kg},{race:function(e){var t=this,n=Bg.f(t),r=n.reject,i=Ng((function(){var i=jg(t.resolve);Gg(e,(function(e){Mg(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Fg=bt,qg=ov;Xa({target:"Promise",stat:!0,forced:sv.CONSTRUCTOR},{reject:function(e){var t=qg.f(this);return Fg(t.reject,void 0,e),t.promise}});var Vg=mt,zg=it,Hg=ov,Wg=function(e,t){if(Vg(e),zg(t)&&t.constructor===e)return t;var n=Hg.f(e);return(0,n.resolve)(t),n.promise},Kg=Xa,$g=sv.CONSTRUCTOR,Qg=Wg;wt("Promise"),Kg({target:"Promise",stat:!0,forced:$g},{resolve:function(e){return Qg(this,e)}});var Jg=tt,Yg=mn.EXISTS,Xg=ce,Zg=Eo,eb=Function.prototype,tb=Xg(eb.toString),nb=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,rb=Xg(nb.exec);function ib(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 ab(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 ab(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 ab(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 sb(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 ob(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sb(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Jg&&!Yg&&Zg(eb,"name",{configurable:!0,get:function(){try{return rb(nb,tb(this))[1]}catch(e){return""}}});var db,cb={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"}},ub={},lb=function(e,t){ub[e]=ob(ob({},t),{},{isLoading:!1})},hb=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))},pb=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,d,c,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=ub[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=ib(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,d=cb[o].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,hb({id:o,src:cb[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),c=o.id,u=o.src,console.log("Could not load external script ".concat(c," ").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,hb({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)}}(),fb=R((function t(){var n=this;D(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,pb("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"]},lb(this.moduleName,this.moduleConfig)})),mb=new fb,vb=it,gb=yr,bb=Ke("match"),_b=function(e){var t;return vb(e)&&(void 0!==(t=e[bb])?!!t:"RegExp"===gb(e))},yb=_b,wb=TypeError,kb=function(e){if(yb(e))throw new wb("The method doesn't accept regular expressions");return e},Ab=Ke("match"),Eb=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Ab]=!1,"/./"[e](t)}catch(e){}}return!1},xb=Xa,Sb=Mr,Rb=qi.f,Db=Xr,Tb=Bs,Ob=kb,Cb=pe,Ib=Eb,Pb=Sb("".startsWith),Lb=Sb("".slice),Ub=Math.min,Mb=Ib("startsWith");xb({target:"String",proto:!0,forced:!!(Mb||(db=Rb(String.prototype,"startsWith"),!db||db.writable))&&!Mb},{startsWith:function(e){var t=Tb(Cb(this));Ob(e);var n=Db(Ub(arguments.length>1?arguments[1]:void 0,t.length)),r=Tb(e);return Pb?Pb(t,r,n):Lb(t,n,n+r.length)===r}});var jb=Mr,Bb=vr,Nb=Ap,Gb=re,Fb=Ke,qb=Tn,Vb=Fb("species"),zb=RegExp.prototype,Hb=function(e,t,n,r){var i=Fb(e),a=!Gb((function(){var t={};return t[i]=function(){return 7},7!==""[e](t)})),s=a&&!Gb((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Vb]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=jb(/./[i]),d=t(i,""[e],(function(e,t,n,r,i){var s=jb(e),d=t.exec;return d===Nb||d===zb.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Bb(String.prototype,e,d[0]),Bb(zb,i,d[1])}r&&qb(zb[i],"sham",!0)},Wb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Kb=bt,$b=mt,Qb=Ze,Jb=yr,Yb=Ap,Xb=TypeError,Zb=function(e,t){var n=e.exec;if(Qb(n)){var r=Kb(n,e,t);return null!==r&&$b(r),r}if("RegExp"===Jb(e))return Kb(Yb,e,t);throw new Xb("RegExp#exec called on incompatible receiver")},e_=bt,t_=mt,n_=ue,r_=pe,i_=Wb,a_=Bs,s_=Mt,o_=Zb;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 c_(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}Hb("search",(function(e,t,n){return[function(t){var n=r_(this),r=n_(t)?void 0:s_(t,e);return r?e_(r,t,n):new RegExp(t)[e](a_(n))},function(e){var r=t_(this),i=a_(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;i_(s,0)||(r.lastIndex=0);var o=o_(r,i);return i_(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var u_,l_,h_=function(){function e(){D(this,e)}return R(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()),d=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:c()),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,v=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",g);var b=(e||n)&&r.loaderEnabled,_=(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:b,parentURL:i,parentDomain:d,topDomain:u&&u.length?u:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:v,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:_,depth:o(),domainMatched:d===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 O(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 O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(C.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(C.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(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 O(e,!0);return n.query=c_(c_({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return C.encode(JSON.stringify(e))}}]),e}(),p_=function(){try{return(new h_).getBridgeContext()}catch(e){return{}}}(),f_={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(u_=!1,(l_=d("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===l_.xanthophyll&&(u_=!0),u_)},m_=Ml.charAt,v_=ce,g_=ve,b_=Math.floor,__=v_("".charAt),y_=v_("".replace),w_=v_("".slice),k_=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,A_=/\$([$&'`]|\d{1,2})/g,E_=mc,x_=bt,S_=ce,R_=Hb,D_=re,T_=mt,O_=Ze,C_=ue,I_=Qr,P_=Xr,L_=Bs,U_=pe,M_=function(e,t,n){return t+(n?m_(e,t).length:1)},j_=Mt,B_=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,d=A_;return void 0!==i&&(i=g_(i),d=k_),y_(a,d,(function(a,d){var c;switch(__(d,0)){case"$":return"$";case"&":return e;case"`":return w_(t,0,n);case"'":return w_(t,s);case"<":c=i[w_(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>o){var l=b_(u/10);return 0===l?a:l<=o?void 0===r[l-1]?__(d,1):r[l-1]+__(d,1):a}c=r[u-1]}return void 0===c?"":c}))},N_=Zb,G_=Ke("replace"),F_=Math.max,q_=Math.min,V_=S_([].concat),z_=S_([].push),H_=S_("".indexOf),W_=S_("".slice),K_="$0"==="a".replace(/./,"$0"),$_=!!/./[G_]&&""===/./[G_]("a","$0");R_("replace",(function(e,t,n){var r=$_?"$":"$0";return[function(e,n){var r=U_(this),i=C_(e)?void 0:j_(e,G_);return i?x_(i,e,r,n):x_(t,L_(r),e,n)},function(e,i){var a=T_(this),s=L_(e);if("string"==typeof i&&-1===H_(i,r)&&-1===H_(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var d=O_(i);d||(i=L_(i));var c,u=a.global;u&&(c=a.unicode,a.lastIndex=0);for(var l,h=[];null!==(l=N_(a,s))&&(z_(h,l),u);){""===L_(l[0])&&(a.lastIndex=M_(s,P_(a.lastIndex),c))}for(var p,f="",m=0,v=0;v<h.length;v++){for(var g,b=L_((l=h[v])[0]),_=F_(q_(I_(l.index),s.length),0),y=[],w=1;w<l.length;w++)z_(y,void 0===(p=l[w])?p:String(p));var k=l.groups;if(d){var A=V_([b],y,_,s);void 0!==k&&z_(A,k),g=L_(E_(i,void 0,A))}else g=B_(b,s,_,y,k,i);_>=m&&(f+=W_(s,m,_)+g,m=_+b.length)}return f+W_(s,m)}]}),!!D_((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!K_||$_);var Q_=re,J_=tt,Y_=Ke("iterator"),X_=!Q_((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),n.delete("a",2),n.delete("b",void 0),!t.size&&!J_||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Y_]||"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"!==r||"x"!==new URL("http://x",void 0).host})),Z_=vr,ey=vo,ty=Math.floor,ny=function(e,t){var n=e.length,r=ty(n/2);return n<8?ry(e,t):iy(e,ny(ey(e,0,r),t),ny(ey(e,r),t),t)},ry=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},iy=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},ay=Xa,sy=W,oy=bt,dy=ce,cy=tt,uy=X_,ly=vr,hy=Eo,py=function(e,t,n){for(var r in t)Z_(e,r,t[r],n);return e},fy=No,my=oh,vy=$n,gy=Cf,by=Ze,_y=_e,yy=Gr,wy=Rr,ky=mt,Ay=it,Ey=Bs,xy=co,Sy=Sn,Ry=sl,Dy=Zu,Ty=jh,Oy=Ff,Cy=ny,Iy=Ke("iterator"),Py="URLSearchParams",Ly=Py+"Iterator",Uy=vy.set,My=vy.getterFor(Py),jy=vy.getterFor(Ly),By=Object.getOwnPropertyDescriptor,Ny=function(e){if(!cy)return sy[e];var t=By(sy,e);return t&&t.value},Gy=Ny("fetch"),Fy=Ny("Request"),qy=Ny("Headers"),Vy=Fy&&Fy.prototype,zy=qy&&qy.prototype,Hy=sy.RegExp,Wy=sy.TypeError,Ky=sy.decodeURIComponent,$y=sy.encodeURIComponent,Qy=dy("".charAt),Jy=dy([].join),Yy=dy([].push),Xy=dy("".replace),Zy=dy([].shift),ew=dy([].splice),tw=dy("".split),nw=dy("".slice),rw=/\+/g,iw=Array(4),aw=function(e){return iw[e-1]||(iw[e-1]=Hy("((?:%[\\da-f]{2}){"+e+"})","gi"))},sw=function(e){try{return Ky(e)}catch(t){return e}},ow=function(e){var t=Xy(e,rw," "),n=4;try{return Ky(t)}catch(e){for(;n;)t=Xy(t,aw(n--),sw);return t}},dw=/[!'()~]|%20/g,cw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},uw=function(e){return cw[e]},lw=function(e){return Xy($y(e),dw,uw)},hw=my((function(e,t){Uy(this,{type:Ly,target:My(e).entries,index:0,kind:t})}),Py,(function(){var e=jy(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Ty(void 0,!0);var r=t[n];switch(e.kind){case"keys":return Ty(r.key,!1);case"values":return Ty(r.value,!1)}return Ty([r.key,r.value],!1)}),!0),pw=function(e){this.entries=[],this.url=null,void 0!==e&&(Ay(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Qy(e,0)?nw(e,1):e:Ey(e)))};pw.prototype={type:Py,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,d=this.entries,c=Dy(e);if(c)for(n=(t=Ry(e,c)).next;!(r=oy(n,t)).done;){if(a=(i=Ry(ky(r.value))).next,(s=oy(a,i)).done||(o=oy(a,i)).done||!oy(a,i).done)throw new Wy("Expected sequence with length 2");Yy(d,{key:Ey(s.value),value:Ey(o.value)})}else for(var u in e)_y(e,u)&&Yy(d,{key:u,value:Ey(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,i=tw(e,"&"),a=0;a<i.length;)(t=i[a++]).length&&(n=tw(t,"="),Yy(r,{key:ow(Zy(n)),value:ow(Jy(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Yy(n,lw(e.key)+"="+lw(e.value));return Jy(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var fw=function(){gy(this,mw);var e=Uy(this,new pw(arguments.length>0?arguments[0]:void 0));cy||(this.size=e.entries.length)},mw=fw.prototype;if(py(mw,{append:function(e,t){var n=My(this);Oy(arguments.length,2),Yy(n.entries,{key:Ey(e),value:Ey(t)}),cy||this.length++,n.updateURL()},delete:function(e){for(var t=My(this),n=Oy(arguments.length,1),r=t.entries,i=Ey(e),a=n<2?void 0:arguments[1],s=void 0===a?a:Ey(a),o=0;o<r.length;){var d=r[o];if(d.key!==i||void 0!==s&&d.value!==s)o++;else if(ew(r,o,1),void 0!==s)break}cy||(this.size=r.length),t.updateURL()},get:function(e){var t=My(this).entries;Oy(arguments.length,1);for(var n=Ey(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=My(this).entries;Oy(arguments.length,1);for(var n=Ey(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Yy(r,t[i].value);return r},has:function(e){for(var t=My(this).entries,n=Oy(arguments.length,1),r=Ey(e),i=n<2?void 0:arguments[1],a=void 0===i?i:Ey(i),s=0;s<t.length;){var o=t[s++];if(o.key===r&&(void 0===a||o.value===a))return!0}return!1},set:function(e,t){var n=My(this);Oy(arguments.length,1);for(var r,i=n.entries,a=!1,s=Ey(e),o=Ey(t),d=0;d<i.length;d++)(r=i[d]).key===s&&(a?ew(i,d--,1):(a=!0,r.value=o));a||Yy(i,{key:s,value:o}),cy||(this.size=i.length),n.updateURL()},sort:function(){var e=My(this);Cy(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=yy(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 hw(this,"keys")},values:function(){return new hw(this,"values")},entries:function(){return new hw(this,"entries")}},{enumerable:!0}),ly(mw,Iy,mw.entries,{name:"entries"}),ly(mw,"toString",(function(){return My(this).serialize()}),{enumerable:!0}),cy&&hy(mw,"size",{get:function(){return My(this).entries.length},configurable:!0,enumerable:!0}),fy(fw,Py),ay({global:!0,constructor:!0,forced:!uy},{URLSearchParams:fw}),!uy&&by(qy)){var vw=dy(zy.has),gw=dy(zy.set),bw=function(e){if(Ay(e)){var t,n=e.body;if(wy(n)===Py)return t=e.headers?new qy(e.headers):new qy,vw(t,"content-type")||gw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),xy(e,{body:Sy(0,Ey(n)),headers:Sy(0,t)})}return e};if(by(Gy)&&ay({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Gy(e,arguments.length>1?bw(arguments[1]):{})}}),by(Fy)){var _w=function(e){return gy(this,Vy),new Fy(e,arguments.length>1?bw(arguments[1]):{})};Vy.constructor=_w,_w.prototype=Vy,ay({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:_w})}}var yw={URLSearchParams:fw,getState:My},ww=fa.includes,kw=$p;Xa({target:"Array",proto:!0,forced:re((function(){return!Array(1).includes()}))},{includes:function(e){return ww(this,e,arguments.length>1?arguments[1]:void 0)}}),kw("includes");var Aw=Xa,Ew=kb,xw=pe,Sw=Bs,Rw=Eb,Dw=ce("".indexOf);function Tw(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 d(e){return L(r,e)}function c(e,t){return U(r,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O(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=decodeURIComponent(s),I.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){c("depth.error",e.message)}c("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(c("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],c("top.domain.from","origins");else if(0===t)n=s,c("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,c("top.domain.from","referrer"))}c("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(P(e))c("partner.domain.value",e),c("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)c("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),c("partner.domain.from","partner-url");else c("partner.domain.value",r.top.domain.value),c("partner.domain.from","partner-fallback")}else c("partner.domain.value",r.top.domain.value),c("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(c("partner.url.value",a),c("partner.url.from","self-top")):e?P(e)?(c("partner.url.value",a),c("partner.url.from","partner-domain")):(c("partner.url.value",e),c("partner.url.from","partner-url")):(c("partner.url.value",o),c("partner.url.from","fallback"))}.bind(this)(),{get:d,print:function(e){console.log(d(e))}}}Aw({target:"String",proto:!0,forced:!Rw("includes")},{includes:function(e){return!!~Dw(Sw(xw(this)),Sw(Ew(e)),arguments.length>1?arguments[1]:void 0)}});var Ow="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},Cw="URLSearchParams"in Ow,Iw="Symbol"in Ow&&"iterator"in Symbol,Pw="FileReader"in Ow&&"Blob"in Ow&&function(){try{return new Blob,!0}catch(e){return!1}}(),Lw="FormData"in Ow,Uw="ArrayBuffer"in Ow;if(Uw)var Mw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],jw=ArrayBuffer.isView||function(e){return e&&Mw.indexOf(Object.prototype.toString.call(e))>-1};function Bw(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 Nw(e){return"string"!=typeof e&&(e=String(e)),e}function Gw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Iw&&(t[Symbol.iterator]=function(){return t}),t}function Fw(e){this.map={},e instanceof Fw?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function qw(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function Vw(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function zw(e){var t=new FileReader,n=Vw(t);return t.readAsArrayBuffer(e),n}function Hw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Ww(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Pw&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Lw&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Cw&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Uw&&Pw&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Hw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Uw&&(ArrayBuffer.prototype.isPrototypeOf(e)||jw(e))?this._bodyArrayBuffer=Hw(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,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):Cw&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Pw&&(this.blob=function(){var e=qw(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=qw(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))}if(Pw)return this.blob().then(zw);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e=qw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Vw(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),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)},Lw&&(this.formData=function(){return this.text().then(Qw)}),this.json=function(){return this.text().then(JSON.parse)},this}Fw.prototype.append=function(e,t){e=Bw(e),t=Nw(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Fw.prototype.delete=function(e){delete this.map[Bw(e)]},Fw.prototype.get=function(e){return e=Bw(e),this.has(e)?this.map[e]:null},Fw.prototype.has=function(e){return this.map.hasOwnProperty(Bw(e))},Fw.prototype.set=function(e,t){this.map[Bw(e)]=Nw(t)},Fw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Fw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Gw(e)},Fw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Gw(e)},Fw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Gw(e)},Iw&&(Fw.prototype[Symbol.iterator]=Fw.prototype.entries);var Kw=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];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.');var n=(t=t||{}).body;if(e instanceof $w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Fw(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 Fw(t.headers)),this.method=function(e){var t=e.toUpperCase();return Kw.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Ow)return(new AbortController).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 Qw(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 Jw(e,t){if(!(this instanceof Jw))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Fw(t.headers),this.url=t.url||"",this._initBody(e)}$w.prototype.clone=function(){return new $w(this,{body:this._bodyInit})},Ww.call($w.prototype),Ww.call(Jw.prototype),Jw.prototype.clone=function(){return new Jw(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Fw(this.headers),url:this.url})},Jw.error=function(){var e=new Jw(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var Yw=[301,302,303,307,308];Jw.redirect=function(e,t){if(-1===Yw.indexOf(t))throw new RangeError("Invalid status code");return new Jw(null,{status:t,headers:{location:e}})};var Xw,Zw=Ow.DOMException;try{new Zw}catch(e){Zw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Zw.prototype=Object.create(Error.prototype),Zw.prototype.constructor=Zw}function ek(e,t){return new Promise((function(n,r){var i=new $w(e,t);if(i.signal&&i.signal.aborted)return r(new Zw("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}if(a.onload=function(){var e,t,r={statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Fw,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();try{t.append(r,i)}catch(e){console.warn("Response "+e.message)}}})),t)};i.url.startsWith("file://")&&(a.status<200||a.status>599)?r.status=200:r.status=a.status,r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var s="response"in a?a.response:a.responseText;setTimeout((function(){n(new Jw(s,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request timed out"))}),0)},a.onabort=function(){setTimeout((function(){r(new Zw("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Ow.location.href?Ow.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&&(Pw?a.responseType="blob":Uw&&(a.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof Fw||Ow.Headers&&t.headers instanceof Ow.Headers)){var o=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){o.push(Bw(e)),a.setRequestHeader(e,Nw(t.headers[e]))})),i.headers.forEach((function(e,t){-1===o.indexOf(t)&&a.setRequestHeader(t,e)}))}else i.headers.forEach((function(e,t){a.setRequestHeader(t,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)}))}ek.polyfill=!0,Ow.fetch||(Ow.fetch=ek,Ow.Headers=Fw,Ow.Request=$w,Ow.Response=Jw);var tk=function(e){var n=this;if(!Xw){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:p_.topDomain,domain:p_.parentDomain,referrer:p_.parentURL,depth:o(),version:Os.version,byloader:p_.isTokenGameURL,isTokenGameURL:p_.isTokenGameURL,isMasterGameURL:p_.isMasterGameURL,isExtHostedGameURL:p_.isExtHostedGameURL,byloaderVersion:p_.version,tracking:f_.userDeclinedTracking,whitelabel:f_.whitelabelPartner,platform:u()};Xw=new l(r)}return Xw||{send:function(){t(this,n)}.bind(this)}},nk={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){}}},rk={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},ik={gameAPI:"game.api.gamedistribution.com"},ak={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},sk=function(){var e=this,n=rk.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?ak:ik}},ok=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 dk(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 ck(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dk(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var uk,lk,hk,pk=new j,fk=[],mk=function(e){fk.push(e)},vk=function(e){uk=tk(hk=e)},gk=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(lk){e.next=6;break}return e.next=3,yk(hk);case 3:lk=e.sent,pk.emit("game-data-ready",lk),bk();case 6:return e.abrupt("return",lk);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),bk=function(){var t;if(null!==(t=lk)&&void 0!==t&&null!==(t=t.aws_tst)&&void 0!==t&&t.enabled){var n,i,a;if(_k(),null!==(n=lk)&&void 0!==n&&null!==(n=n.aws_tst)&&void 0!==n&&null!==(n=n.ep)&&void 0!==n&&n.api&&null!==(i=lk)&&void 0!==i&&i.url)nk.getGameData(null===(a=lk)||void 0===a?void 0:a.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,yk(hk);case 3:lk=e.sent,null===(t=lk)||void 0===t||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)}},_k=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,d,c,u,l,h,p,f,m,v,g=this,b=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=b.length,o=new Array(s),d=0;d<s;d++)o[d]=b[d];c=o[0],u=o[1],l=null===(i=lk)||void 0===i||null===(i=i.aws_tst)||void 0===i||null===(i=i.ep)||void 0===i?void 0:i.atm,h=null===(a=lk)||void 0===a||null===(a=a.aws_tst)||void 0===a||null===(a=a.ep)||void 0===a?void 0:a.msgrt,p=function(e,r){var i=this;t(this,g);var a=c.replace(e,r);n(a,u).then(function(){t(this,i)}.bind(this))}.bind(this);try{l&&c.indexOf("tag.atom")>0&&p("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),h&&c.indexOf("msgrt.gamedistribution.com")>0&&(null===(f=lk)||void 0===f||f.aws_tst,null===(m=lk)||void 0===m||null===(m=m.aws_tst)||void 0===m||null===(m=m.ep)||void 0===m||m.msgrt,p("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(c,u);case 9:return v=e.sent,e.abrupt("return",v);case 11:case"end":return e.stop()}}),e,this)})))},yk=function(n){var i=this;uk.send("gdfw.loading",{message:"loading"}),fk=[],mk("1"),mk("2");var a=new Tw;mk("3");var s=a.get("partner.domain.value");mk("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);mk("5");var d=function(){t(this,i);var e=c(),r=e?"&mode=".concat(e):"",a=sk().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(Os.version,"&localTime=").concat((new Date).getHours())}.bind(this);mk("6");var c=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 mk("7"),new Promise(function(n){var a=this;t(this,i),mk("7.1");var s=o();try{mk("7.2");var c=d();mk("7.3"),fetch(c).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 mk("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),e.t0,e.next=12,ok({url:c});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),mk("7.5"),e.success){var i,o,d=e.result.game;mk("7.6");var u={company:d.company,gameId:d.gameMd5,slug:d.slug,pname:d.pname,dname:d.dname,status:d.status,activeStatus:d.activeStatus,description:d.description,disableAds:d.enableAds,preroll:d.preRoll,midroll:6e4*d.timeAds,rewardedAds:d.rewardedAds,title:d.title,publishedAt:d.publishedAt,tags:d.tags,category:d.category,assets:d.assets,disp_2nd_prer:d.disp_2nd_prer,ctry_vst:d.ctry_vst,ctry:d.ctry,crtv:d.crtv,dmain:d.dmain,aws_tst:d.aws_tst,meta:d.meta,adspn:Cs(d.adspn)||{},__t4r:Cs(d.__t4r)||{},block_exts:Cs(d.push_cuda),bloc_gard:Cs(d.bloc_gard),cookie:Cs(d.cookie),gdpr:Cs(d.gdpr),diagnostic:Cs(d.diagnostic),cmp:Cs(d.cmp),gft:Cs(d.gft)||{},sdk:Cs(d.sdk)||{},sdkfw:Cs(d.sdkfw)||{},loader:Cs(d.loader)||{},splash:Cs(d.splash)||{},promo:Cs(d.promo)||{},dAds:Cs(d.dads)||{},pAds:Cs(d.pads)||{},mAds:Cs(d.mads)||{},rAds:Cs(d.rads)||{},lp:Cs(d.lp)||{},extsc:Cs(d.extsc)||{},evnts:Cs(d.evnts)||{},dp:Cs(d.dp)||{},adflw:Cs(d.adflw)||{},afgszf:Cs(d.afgszf)||{},fllc:Cs(d.fllc)||{},lotm:Cs(d.lotm)||{},t4rc:Cs(d.t4rc)||{},midroll_plus:Cs(d.midroll_plus)||{},gmky:Cs(d.gmky)||{},urlBlockExc:Cs(d.url_blck_exc)||{},sdk_wrp:Cs(d.sdk_wrp)||{},dbglg:Cs(d.dbglg)||{},extHosting:Cs(d.ext_hosting)||{},directTokenUse:Cs(d.dtu)||{},aeria:Cs(d.aeria)||{},advlm:Cs(d.advlm)||{},ad_blcks:Cs(d.ad_blcks)||{},rmblck:Cs(d.rmblck)||{}};mk("7.7");var l=h(M(s),u);mk("7.8"),l.afg_disabled=!1===(null===(i=l.sdk)||void 0===i||null===(i=i.afg)||void 0===i?void 0:i.enabled),l.url=c,function(){t(this,r),void 0!==Us.afgEnabled&&(l.afg_disabled=!Us.afgEnabled),void 0!==Us.promoEnabled&&(l.promo=l.promo||{},l.promo=ck(ck({},l.promo),{},{rainbow:{enabled:Us.promoEnabled}}))}.bind(this),mk("7.9"),null!==(o=l.pAds)&&void 0!==o&&o.enabled&&(l.preroll=!0),mk("7.10"),uk.send("gdfw.success",{message:"success"}),n(l)}else{s.failed=!0;var p=fk[fk.length-1];uk.send("gdfw.err",{message:"".concat(p,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=fk[fk.length-1];uk.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=fk[fk.length-1];uk.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},wk=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,gk();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)}}(),kk=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,gk();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)}}(),Ak=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,gk();case 2:return n=e.sent,e.next=5,wk();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)}}(),Ek=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gk();case 2:return d=e.sent,c=!(null==d||null===(t=d.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:c,path:c?null==d||null===(n=d.extsc)||void 0===n?void 0:n.path:"",name:c?null==d||null===(i=d.extsc)||void 0===i?void 0:i.name:"",ref:c?null==d||null===(a=d.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:c?null==d||null===(s=d.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!c&&!(null==d||null===(o=d.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),xk=function(){var n=e(r.mark((function e(){var n,i,a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ek();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,d),!!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)}}(),Sk=!1,Rk=!1,Dk=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,d,c,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Sk){e.next=4;break}return e.abrupt("return",n(Rk));case 4:Sk=!0;case 5:return e.next=7,Ek();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 Rk=!0,e.abrupt("return",n(!0));case 16:d=!0,setTimeout(function(){t(this,u),d&&(d=!1,Sk=!0,n(!1))}.bind(this),5e3),c=setInterval(function(){t(this,u),d&&o&&window[s]?(d=!1,Sk=!0,Rk=!0,clearInterval(c),n(!0)):d||clearInterval(c)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},Tk=Xa,Ok=zm,Ck=re,Ik=wt,Pk=Ze,Lk=Nf,Uk=Wg,Mk=vr,jk=Ok&&Ok.prototype;if(Tk({target:"Promise",proto:!0,real:!0,forced:!!Ok&&Ck((function(){jk.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Lk(this,Ik("Promise")),n=Pk(e);return this.then(n?function(n){return Uk(t,e()).then((function(){return n}))}:e,n?function(n){return Uk(t,e()).then((function(){throw n}))}:e)}}),Pk(Ok)){var Bk=Ik("Promise").prototype.finally;jk.finally!==Bk&&Mk(jk,"finally",Bk,{unsafe:!0})}var Nk="\t\n\v\f\r                 \u2028\u2029\ufeff",Gk=pe,Fk=Bs,qk=Nk,Vk=ce("".replace),zk=RegExp("^["+qk+"]+"),Hk=RegExp("(^|[^"+qk+"])["+qk+"]+$"),Wk=function(e){return function(t){var n=Fk(Gk(t));return 1&e&&(n=Vk(n,zk,"")),2&e&&(n=Vk(n,Hk,"$1")),n}},Kk={start:Wk(1),end:Wk(2),trim:Wk(3)},$k=mn.PROPER,Qk=re,Jk=Nk,Yk=Kk.trim;Xa({target:"String",proto:!0,forced:function(e){return Qk((function(){return!!Jk[e]()||"​…᠎"!=="​…᠎"[e]()||$k&&Jk[e].name!==e}))}("trim")},{trim:function(){return Yk(this)}});var Xk=Xa,Zk=Ci.find,eA=$p,tA="find",nA=!0;tA in[]&&Array(1)[tA]((function(){nA=!1})),Xk({target:"Array",proto:!0,forced:nA},{find:function(e){return Zk(this,e,arguments.length>1?arguments[1]:void 0)}}),eA(tA);var rA=Ze,iA=it,aA=vh,sA=et.f,oA=tt,dA=W,cA=ce,uA=za,lA=function(e,t,n){var r,i;return aA&&rA(r=t.constructor)&&r!==n&&iA(i=r.prototype)&&i!==n.prototype&&aA(e,i),e},hA=Tn,pA=co,fA=aa.f,mA=kt,vA=_b,gA=Bs,bA=Su,_A=Jh,yA=function(e,t,n){n in e||sA(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},wA=vr,kA=re,AA=_e,EA=$n.enforce,xA=Df,SA=Zh,RA=np,DA=Ke("match"),TA=dA.RegExp,OA=TA.prototype,CA=dA.SyntaxError,IA=cA(OA.exec),PA=cA("".charAt),LA=cA("".replace),UA=cA("".indexOf),MA=cA("".slice),jA=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,BA=/a/g,NA=/a/g,GA=new TA(BA)!==BA,FA=_A.MISSED_STICKY,qA=_A.UNSUPPORTED_Y,VA=oA&&(!GA||FA||SA||RA||kA((function(){return NA[DA]=!1,TA(BA)!==BA||TA(NA)===NA||"/a/i"!==String(TA(BA,"i"))})));if(uA("RegExp",VA)){for(var zA=function(e,t){var n,r,i,a,s,o,d=mA(OA,this),c=vA(e),u=void 0===t,l=[],h=e;if(!d&&c&&u&&e.constructor===zA)return e;if((c||mA(OA,e))&&(e=e.source,u&&(t=bA(h))),e=void 0===e?"":gA(e),t=void 0===t?"":gA(t),h=e,SA&&"dotAll"in BA&&(r=!!t&&UA(t,"s")>-1)&&(t=LA(t,/s/g,"")),n=t,FA&&"sticky"in BA&&(i=!!t&&UA(t,"y")>-1)&&qA&&(t=LA(t,/y/g,"")),RA&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s=pA(null),o=!1,d=!1,c=0,u="";r<=n;r++){if("\\"===(t=PA(e,r)))t+=PA(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:IA(jA,MA(e,r+1))&&(r+=2,d=!0),i+=t,c++;continue;case">"===t&&d:if(""===u||AA(s,u))throw new CA("Invalid capture group name");s[u]=!0,a[a.length]=[u,c],d=!1,u="";continue}d?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=lA(TA(e,t),d?this:OA,zA),(r||i||l.length)&&(o=EA(s),r&&(o.dotAll=!0,o.raw=zA(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=PA(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+PA(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{hA(s,"source",""===h?"(?:)":h)}catch(e){}return s},HA=fA(TA),WA=0;HA.length>WA;)yA(zA,TA,HA[WA++]);OA.constructor=zA,zA.prototype=OA,wA(dA,"RegExp",zA,{constructor:!0})}xA("RegExp");var KA=Xa,$A=Hr,QA=Qi,JA=Pi,YA=ce([].join);KA({target:"Array",proto:!0,forced:$A!==Object||!JA("join",",")},{join:function(e){return YA(QA(this),void 0===e?",":e)}});var XA=Ci.map;Xa({target:"Array",proto:!0,forced:!hs("map")},{map:function(e){return XA(this,e,arguments.length>1?arguments[1]:void 0)}});var ZA=tt,eE=ce,tE=bt,nE=re,rE=ts,iE=Ea,aE=Vi,sE=ve,oE=Hr,dE=Object.assign,cE=Object.defineProperty,uE=eE([].concat),lE=!dE||nE((function(){if(ZA&&1!==dE({b:1},dE(cE({},"a",{enumerable:!0,get:function(){cE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!==dE({},e)[n]||rE(dE({},t)).join("")!==r}))?function(e,t){for(var n=sE(e),r=arguments.length,i=1,a=iE.f,s=aE.f;r>i;)for(var o,d=oE(arguments[i++]),c=a?uE(rE(d),a(d)):rE(d),u=c.length,l=0;u>l;)o=c[l++],ZA&&!tE(s,d,o)||(n[o]=d[o]);return n}:dE,hE=lE;Xa({target:"Object",stat:!0,arity:2,forced:Object.assign!==hE},{assign:hE});var pE,fE=ce,mE=2147483647,vE=/[^\0-\u007E]/,gE=/[.\u3002\uFF0E\uFF61]/g,bE="Overflow: input needs wider integers to process",_E=RangeError,yE=fE(gE.exec),wE=Math.floor,kE=String.fromCharCode,AE=fE("".charCodeAt),EE=fE([].join),xE=fE([].push),SE=fE("".replace),RE=fE("".split),DE=fE("".toLowerCase),TE=function(e){return e+22+75*(e<26)},OE=function(e,t,n){var r=0;for(e=n?wE(e/700):e>>1,e+=wE(e/t);e>455;)e=wE(e/35),r+=36;return wE(r+36*e/(e+38))},CE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=AE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=AE(e,n++);56320==(64512&a)?xE(t,((1023&i)<<10)+(1023&a)+65536):(xE(t,i),n--)}else xE(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&&xE(t,kE(r));var d=t.length,c=d;for(d&&xE(t,"-");c<i;){var u=mE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=c+1;if(u-a>wE((mE-s)/l))throw new _E(bE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>mE)throw new _E(bE);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,v=36-f;xE(t,kE(TE(f+m%v))),h=wE(m/v),p+=36}xE(t,kE(TE(h))),o=OE(s,l,c===d),s=0,c++}}s++,a++}return EE(t,"")},IE=Xa,PE=tt,LE=X_,UE=W,ME=Gr,jE=ce,BE=vr,NE=Eo,GE=Cf,FE=_e,qE=lE,VE=bl,zE=vo,HE=Ml.codeAt,WE=function(e){var t,n,r=[],i=RE(SE(DE(e),gE,"."),".");for(t=0;t<i.length;t++)n=i[t],xE(r,yE(vE,n)?"xn--"+CE(n):n);return EE(r,".")},KE=Bs,$E=No,QE=Ff,JE=yw,YE=$n,XE=YE.set,ZE=YE.getterFor("URL"),ex=JE.URLSearchParams,tx=JE.getState,nx=UE.URL,rx=UE.TypeError,ix=UE.parseInt,ax=Math.floor,sx=Math.pow,ox=jE("".charAt),dx=jE(/./.exec),cx=jE([].join),ux=jE(1..toString),lx=jE([].pop),hx=jE([].push),px=jE("".replace),fx=jE([].shift),mx=jE("".split),vx=jE("".slice),gx=jE("".toLowerCase),bx=jE([].unshift),_x="Invalid scheme",yx="Invalid host",wx="Invalid port",kx=/[a-z]/i,Ax=/[\d+-.a-z]/i,Ex=/\d/,xx=/^0x/i,Sx=/^[0-7]+$/,Rx=/^\d+$/,Dx=/^[\da-f]+$/i,Tx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ox=/[\0\t\n\r #/:<>?@[\\\]^|]/,Cx=/^[\u0000-\u0020]+/,Ix=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Px=/[\t\n\r]/g,Lx=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)bx(t,e%256),e=ax(e/256);return cx(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+=ux(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Ux={},Mx=qE({},Ux,{" ":1,'"':1,"<":1,">":1,"`":1}),jx=qE({},Mx,{"#":1,"?":1,"{":1,"}":1}),Bx=qE({},jx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Nx=function(e,t){var n=HE(e,0);return n>32&&n<127&&!FE(t,e)?e:encodeURIComponent(e)},Gx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Fx=function(e,t){var n;return 2===e.length&&dx(kx,ox(e,0))&&(":"===(n=ox(e,1))||!t&&"|"===n)},qx=function(e){var t;return e.length>1&&Fx(vx(e,0,2))&&(2===e.length||"/"===(t=ox(e,2))||"\\"===t||"?"===t||"#"===t)},Vx=function(e){return"."===e||"%2e"===gx(e)},zx={},Hx={},Wx={},Kx={},$x={},Qx={},Jx={},Yx={},Xx={},Zx={},eS={},tS={},nS={},rS={},iS={},aS={},sS={},oS={},dS={},cS={},uS={},lS=function(e,t,n){var r,i,a,s=KE(e);if(t){if(i=this.parse(s))throw new rx(i);this.searchParams=null}else{if(void 0!==n&&(r=new lS(n,!0)),i=this.parse(s,null,r))throw new rx(i);(a=tx(new ex)).bindURL(this),this.searchParams=a}};lS.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,d=this,c=t||zx,u=0,l="",h=!1,p=!1,f=!1;for(e=KE(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=px(e,Cx,""),e=px(e,Ix,"$1")),e=px(e,Px,""),r=VE(e);u<=r.length;){switch(i=r[u],c){case zx:if(!i||!dx(kx,i)){if(t)return _x;c=Wx;continue}l+=gx(i),c=Hx;break;case Hx:if(i&&(dx(Ax,i)||"+"===i||"-"===i||"."===i))l+=gx(i);else{if(":"!==i){if(t)return _x;l="",c=Wx,u=0;continue}if(t&&(d.isSpecial()!==FE(Gx,l)||"file"===l&&(d.includesCredentials()||null!==d.port)||"file"===d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Gx[d.scheme]===d.port&&(d.port=null));l="","file"===d.scheme?c=rS:d.isSpecial()&&n&&n.scheme===d.scheme?c=Kx:d.isSpecial()?c=Yx:"/"===r[u+1]?(c=$x,u++):(d.cannotBeABaseURL=!0,hx(d.path,""),c=dS)}break;case Wx:if(!n||n.cannotBeABaseURL&&"#"!==i)return _x;if(n.cannotBeABaseURL&&"#"===i){d.scheme=n.scheme,d.path=zE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,c=uS;break}c="file"===n.scheme?rS:Qx;continue;case Kx:if("/"!==i||"/"!==r[u+1]){c=Qx;continue}c=Xx,u++;break;case $x:if("/"===i){c=Zx;break}c=oS;continue;case Qx:if(d.scheme=n.scheme,i===pE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query=n.query;else if("/"===i||"\\"===i&&d.isSpecial())c=Jx;else if("?"===i)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query="",c=cS;else{if("#"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.path.length--,c=oS;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query=n.query,d.fragment="",c=uS}break;case Jx:if(!d.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,c=oS;continue}c=Zx}else c=Xx;break;case Yx:if(c=Xx,"/"!==i||"/"!==ox(l,u+1))continue;u++;break;case Xx:if("/"!==i&&"\\"!==i){c=Zx;continue}break;case Zx:if("@"===i){h&&(l="%40"+l),h=!0,a=VE(l);for(var m=0;m<a.length;m++){var v=a[m];if(":"!==v||f){var g=Nx(v,Bx);f?d.password+=g:d.username+=g}else f=!0}l=""}else if(i===pE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()){if(h&&""===l)return"Invalid authority";u-=VE(l).length+1,l="",c=eS}else l+=i;break;case eS:case tS:if(t&&"file"===d.scheme){c=aS;continue}if(":"!==i||p){if(i===pE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()){if(d.isSpecial()&&""===l)return yx;if(t&&""===l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",c=sS,t)return;continue}"["===i?p=!0:"]"===i&&(p=!1),l+=i}else{if(""===l)return yx;if(s=d.parseHost(l))return s;if(l="",c=nS,t===tS)return}break;case nS:if(!dx(Ex,i)){if(i===pE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()||t){if(""!==l){var b=ix(l,10);if(b>65535)return wx;d.port=d.isSpecial()&&b===Gx[d.scheme]?null:b,l=""}if(t)return;c=sS;continue}return wx}l+=i;break;case rS:if(d.scheme="file","/"===i||"\\"===i)c=iS;else{if(!n||"file"!==n.scheme){c=oS;continue}switch(i){case pE:d.host=n.host,d.path=zE(n.path),d.query=n.query;break;case"?":d.host=n.host,d.path=zE(n.path),d.query="",c=cS;break;case"#":d.host=n.host,d.path=zE(n.path),d.query=n.query,d.fragment="",c=uS;break;default:qx(cx(zE(r,u),""))||(d.host=n.host,d.path=zE(n.path),d.shortenPath()),c=oS;continue}}break;case iS:if("/"===i||"\\"===i){c=aS;break}n&&"file"===n.scheme&&!qx(cx(zE(r,u),""))&&(Fx(n.path[0],!0)?hx(d.path,n.path[0]):d.host=n.host),c=oS;continue;case aS:if(i===pE||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Fx(l))c=oS;else if(""===l){if(d.host="",t)return;c=sS}else{if(s=d.parseHost(l))return s;if("localhost"===d.host&&(d.host=""),t)return;l="",c=sS}continue}l+=i;break;case sS:if(d.isSpecial()){if(c=oS,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==pE&&(c=oS,"/"!==i))continue}else d.fragment="",c=uS;else d.query="",c=cS;break;case oS:if(i===pE||"/"===i||"\\"===i&&d.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(o=gx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"===i||"\\"===i&&d.isSpecial()||hx(d.path,"")):Vx(l)?"/"===i||"\\"===i&&d.isSpecial()||hx(d.path,""):("file"===d.scheme&&!d.path.length&&Fx(l)&&(d.host&&(d.host=""),l=ox(l,0)+":"),hx(d.path,l)),l="","file"===d.scheme&&(i===pE||"?"===i||"#"===i))for(;d.path.length>1&&""===d.path[0];)fx(d.path);"?"===i?(d.query="",c=cS):"#"===i&&(d.fragment="",c=uS)}else l+=Nx(i,jx);break;case dS:"?"===i?(d.query="",c=cS):"#"===i?(d.fragment="",c=uS):i!==pE&&(d.path[0]+=Nx(i,Ux));break;case cS:t||"#"!==i?i!==pE&&("'"===i&&d.isSpecial()?d.query+="%27":d.query+="#"===i?"%23":Nx(i,Ux)):(d.fragment="",c=uS);break;case uS:i!==pE&&(d.fragment+=Nx(i,Mx))}u++}},parseHost:function(e){var t,n,r;if("["===ox(e,0)){if("]"!==ox(e,e.length-1))return yx;if(t=function(e){var t,n,r,i,a,s,o,d=[0,0,0,0,0,0,0,0],c=0,u=null,l=0,h=function(){return ox(e,l)};if(":"===h()){if(":"!==ox(e,1))return;l+=2,u=++c}for(;h();){if(8===c)return;if(":"!==h()){for(t=n=0;n<4&&dx(Dx,h());)t=16*t+ix(h(),16),l++,n++;if("."===h()){if(0===n)return;if(l-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."===h()&&r<4))return;l++}if(!dx(Ex,h()))return;for(;dx(Ex,h());){if(a=ix(h(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;l++}d[c]=256*d[c]+i,2!=++r&&4!==r||c++}if(4!==r)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;d[c++]=t}else{if(null!==u)return;l++,u=++c}}if(null!==u)for(s=c-u,c=7;0!==c&&s>0;)o=d[c],d[c--]=d[u+s-1],d[u+--s]=o;else if(8!==c)return;return d}(vx(e,1,-1)),!t)return yx;this.host=t}else if(this.isSpecial()){if(e=WE(e),dx(Tx,e))return yx;if(t=function(e){var t,n,r,i,a,s,o,d=mx(e,".");if(d.length&&""===d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""===(i=d[r]))return e;if(a=10,i.length>1&&"0"===ox(i,0)&&(a=dx(xx,i)?16:8,i=vx(i,8===a?1:2)),""===i)s=0;else{if(!dx(10===a?Rx:8===a?Sx:Dx,i))return e;s=ix(i,a)}hx(n,s)}for(r=0;r<t;r++)if(s=n[r],r===t-1){if(s>=sx(256,5-t))return null}else if(s>255)return null;for(o=lx(n),r=0;r<n.length;r++)o+=n[r]*sx(256,3-r);return o}(e),null===t)return yx;this.host=t}else{if(dx(Ox,e))return yx;for(t="",n=VE(e),r=0;r<n.length;r++)t+=Nx(n[r],Ux);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return FE(Gx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Fx(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,d=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=Lx(i),null!==a&&(c+=":"+a)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+cx(s,"/"):"",null!==o&&(c+="?"+o),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw new rx(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new hS(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+Lx(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(KE(e)+":",zx)},getUsername:function(){return this.username},setUsername:function(e){var t=VE(KE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Nx(t[n],Bx)}},getPassword:function(){return this.password},setPassword:function(e){var t=VE(KE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Nx(t[n],Bx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Lx(e):Lx(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,eS)},getHostname:function(){var e=this.host;return null===e?"":Lx(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,tS)},getPort:function(){var e=this.port;return null===e?"":KE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=KE(e))?this.port=null:this.parse(e,nS))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+cx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,sS))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=KE(e))?this.query=null:("?"===ox(e,0)&&(e=vx(e,1)),this.query="",this.parse(e,cS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=KE(e))?("#"===ox(e,0)&&(e=vx(e,1)),this.fragment="",this.parse(e,uS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var hS=function(e){var t=GE(this,pS),n=QE(arguments.length,1)>1?arguments[1]:void 0,r=XE(t,new lS(e,!1,n));PE||(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())},pS=hS.prototype,fS=function(e,t){return{get:function(){return ZE(this)[e]()},set:t&&function(e){return ZE(this)[t](e)},configurable:!0,enumerable:!0}};if(PE&&(NE(pS,"href",fS("serialize","setHref")),NE(pS,"origin",fS("getOrigin")),NE(pS,"protocol",fS("getProtocol","setProtocol")),NE(pS,"username",fS("getUsername","setUsername")),NE(pS,"password",fS("getPassword","setPassword")),NE(pS,"host",fS("getHost","setHost")),NE(pS,"hostname",fS("getHostname","setHostname")),NE(pS,"port",fS("getPort","setPort")),NE(pS,"pathname",fS("getPathname","setPathname")),NE(pS,"search",fS("getSearch","setSearch")),NE(pS,"searchParams",fS("getSearchParams")),NE(pS,"hash",fS("getHash","setHash"))),BE(pS,"toJSON",(function(){return ZE(this).serialize()}),{enumerable:!0}),BE(pS,"toString",(function(){return ZE(this).serialize()}),{enumerable:!0}),nx){var mS=nx.createObjectURL,vS=nx.revokeObjectURL;mS&&BE(hS,"createObjectURL",ME(mS,nx)),vS&&BE(hS,"revokeObjectURL",ME(vS,nx))}$E(hS,"URL"),IE({global:!0,constructor:!0,forced:!LE,sham:!PE},{URL:hS});var gS=function(){function e(t){D(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return R(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 O(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}(),bS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(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}(),_S=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(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}(),yS=function(){function e(t){D(this,e),this.adContainer=t}return R(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}(),wS=function(){function e(t){D(this,e),this.adContainer=t}return R(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}(),kS=function(e){if(!e)return!1;var t=AS.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)},AS=Object.prototype.toString;function ES(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 xS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ES(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ES(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SS(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 RS,DS="13998",TS="_cc".concat(DS),OS=["https://tags.crwdcntrl.net/c/".concat(DS,"/cc.js?ns=").concat(TS)],CS=function(){return!!RS&&"function"==typeof RS.bcpf&&"function"==typeof RS.add},IS=function(e,t){try{if(!CS())return;RS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},PS=function(e,t){try{if(!CS())return;RS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},LS=function(e){var n=this;try{IS("act","play"),IS("med","game"),"complete"===document.readyState?RS.bcpf():RS.bcp(),e.tags.forEach(function(e){t(this,n),PS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),PS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},US=function(){window.addEventListener("load",(function(){pk.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!=p_&&p_.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,wk();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(OS[0],"LOTCC_".concat(DS),{alternates:OS});case 16:"object"===n(window[TS])&&(RS=window[TS]),CS()&&LS(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),e.t1;case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},MS=function(){PS("genp","ad video"),PS("act","ad impression")},jS=function(){PS("act","ad skipped")},BS=function(){PS("act","ad click")},NS=function(){PS("act","ad complete")},GS=new Tw,FS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},qS=function(e,n){var r=this,i=function(e,t){var n=GS.get("partner.url.value"),r=FS[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)},VS=(new Tw).get("partner.domain.value"),zS=["latimes.com"],HS={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&zS.some(function(e){return t(this,n),e===VS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return qS(n,e)}}[VS](e)}(e,t)}},WS=function(){var e=(new Tw).get("partner.url.value"),t=new O(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},KS=function(){function e(){D(this,e),this.adContainer=window.document.body}return R(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 d=document.createElement("div");d.id="gd__spinner__overlay",d.classList.add("gd__spinner__overlay"),d.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=d,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 $S(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 QS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$S(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var JS=new j,YS=null,XS=function(){function n(e,r,i){var a=this;if(D(this,n),YS)return YS;YS=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=w(),this.atom_display,this.adType_="",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,d=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:d,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,d,c,u,l,p,k,A,E,x,S,I,P,L,U,j,q,V,z,H,W;return R(n,[{key:"start",value:(W=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({adsense_channel:"4089988593"});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),Ls("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 W.apply(this,arguments)})},{key:"adSystemInitialize",value:(H=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 H.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:(z=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l,h,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(a=a.adapterConfig)||void 0===a?void 0:a.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,i);case 6:return d=e.sent,s?(this.gameData,c=s[o]||s.default||this._getDefaultSpilAdapterConfig()):c=this._getDefaultSpilAdapterConfig(),u=100*d.floor_price,d.floor_price,l=this._createCustomAdVastUrl(c,{tnl_keys:{floor_price:u}}),h=l.url,p={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",p);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 z.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,d,c,u,l,h,p,f,v=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")||WS().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],d=Math.floor(Math.random()*o.length),c=o[d],s({url:c,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=null!=i&&i.adTypeFound?null==i?void 0:i.adTypeFound:a.nextAdPosition(n),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&N(l.preroll)?l=l.preroll:"midroll"===u&&N(l.midroll)?l=l.midroll:"rewarded"===u&&N(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=19,window.idhb.isLoaded();case 19:return e.next=21,a._create_dp_context(u,i);case 21:p=e.sent,Ps("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(QS(QS({},f),{},{adaptor_order:i.adapterIndex})),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,v),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:QS(QS({},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=33;break;case 30:throw e.prev=30,e.t0=e.catch(10),new Error(e.t0);case 33:case"end":return e.stop()}}),e,this,[[10,30]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===v.Rewarded)return this.adRewardedCount++,"rewarded";if(e===v.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===v.Rewarded?"rewarded":e===v.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===v.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===v.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,d=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var c=new google.ima.AdsRequest,u=this._transformVast(e,n),l=QS(QS({},n),{},{adTag:u,tnl_ad_pos:d});this.adCounter[d]=this.adCounter[d]||0,this.adCounter[d]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!u.bidder&&(h.adtag_url=u.url);var f=this._isVMAP(d);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):u.url="original_broken",null==h||h.adtag_url,null==h||h.fallback_url,u.url)}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)c.adTagUrl=m;else if(f){var v=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 O(e[a].adtag.url,!0);s.query=xS(xS({},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=xS(xS({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var c,u,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(d,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(SS({id:o++,adtag_url:t[d-1],error_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.error_url,impression_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.impression_url,fallback_url:null===(l=e[d-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[d-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(d)}));c.adsResponse=v}else if(h&&p.bidFloorApplied){h.adtag_url||(h.adtag_url=u.url);var g=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);c.adsResponse=g}else if(h&&h.fallback_url){var b=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);c.adsResponse=b}else c.adTagUrl=u.url;c.linearAdSlotWidth=this.options.width,c.linearAdSlotHeight=this.options.height,c.nonLinearAdSlotWidth=this.options.width,c.nonLinearAdSlotHeight=this.options.height,c.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(c.vastLoadTimeout=this.options.vast_load_timeout),c.setAdWillAutoPlay(n.autoplayAllowed),c.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(c,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(c)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=HS.exist(this.gameData)&&HS.get(n,this.gameData)}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:(V=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"),B.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 V.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:(j=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=QS(QS({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new KS,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!==v.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!==v.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!==v.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==v.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 j.apply(this,arguments)})},{key:"_startOpusAd",value:(U=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h,p,f,m,v,g,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.requestRunning){e.next=7;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error"}),e.abrupt("return");case 7:if(s=null===(i=window.gdlocus)||void 0===i?void 0:i.adBreak){e.next=11;break}return this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error"}),e.abrupt("return");case 11:o=void function(){return t(this,_),!0}.bind(this),this.requestRunning=!0,d=this.gameData,c=d.gameId,u=d.slug,l=d.title,h={assetId:c,slug:u,title:l,debug:o},p=function(e){t(this,_),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),f=function(e){t(this,_),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),m=function(){t(this,_),this.opusEventReceived=!0}.bind(this),v=function(){t(this,_),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),g=function(e){t(this,_),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.breakStatus,status:"error"})}.bind(this),console.log("opus-ad meta",h),b={type:a,meta:h,beforeAd:p,afterAd:f,adBreakDone:g},"reward"===a&&(b=QS(QS({},b),{},{adDismissed:m,adViewed:v})),this.opusEventReceived=!1,this._startTimeoutForOpus(),s&&s(b);case 27:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"preloadAd",value:(L=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==v.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==v.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 L.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new bS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new _S(this.adContainer,n),this.rewardedLabel.add(),this.audioAdLabel=new yS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(P=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,d,c,u,l,h,p,f,m,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{(d=i?i.containerId:null)||s("Container id is not specified"),c=document.getElementById(d),document.getElementById(d)||s("No container is found with this id - ".concat(d)),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(d),document.getElementById(u)||(l="\n .gd__banner{\n z-index: ".concat(g.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\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)),c.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),c.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:[c.offsetWidth,c.offsetHeight]},window.idhb.requestAds({slots:m,callback:function(e){t(this,v),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 P.apply(this,arguments)})},{key:"_startInterstitialAd",value:(I=e(r.mark((function e(n){var i,a,s,o,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),Us.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(QS(QS({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.mode)&&this.adsManager.setVolume(1),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=29;break;case 24:throw e.prev=24,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 29:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e){return I.apply(this,arguments)})},{key:"_startPromo",value:(S=e(r.mark((function e(t,n){var i,a,s,o;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(QS(QS({},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:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.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=28;break;case 23:throw e.prev=23,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 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e,t){return S.apply(this,arguments)})},{key:"_loadPromo",value:(x=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,QS({adType:v.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 x.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(E=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(v.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,QS({adType:v.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 E.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:(A=e(r.mark((function e(n){var i,a,s,o,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),Us.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(QS(QS({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.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 24:throw e.prev=24,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e){return A.apply(this,arguments)})},{key:"_loadRewardedAd",value:(k=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(v.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,QS({adType:v.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 k.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=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(v.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 p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(l=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(v.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 l.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 d,c=(null===(d=this._adrequest_user_context)||void 0===d||null===(d=d.adTag)||void 0===d?void 0:d.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:c}),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 wS(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(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){if(a&&"click"===r){var u,l=null===(u=this._adrequest_user_context)||void 0===u?void 0:u.tnl_ad_pos;this.clickCount[l]++,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(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=g.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(),d=i.getFullYear(),c="AD_SDK_MANAGER_READY";this._broadcast(c,{name:c,message:"AD SDK is ready",status:"success",analytics:{category:c,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(d)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r,i=this,a=new Date,s=a.getHours(),o=a.getDate(),d=a.getMonth(),c=a.getFullYear(),u=b(google.ima.AdEvent.Type,e.type),l=!1,h=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",p=!h.startsWith("image")&&!h.startsWith("text"),f=null==e||null===(r=e.ad)||void 0===r||null===(r=r.data)||void 0===r?void 0:r.title;this._sendIMAEventsToHB(e);var m=document.getElementById("game"),g="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:g="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:g="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(l=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),g="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:g="Fired when the ad is clicked.";var _=e.getAd().getContentType();this._show({mode:"click",contentType:_}),BS();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),l=this._is_completed(e.getAd()),g="Fired when the ad completes playing.",this.adType_===v.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(m.style.display="none"),this.contentPaused=!0,g="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&&(m.style.display="block"),g="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?l=!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.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.DURATION_CHANGE:g="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:g="Fired when the ad playhead crosses first quartile.";var y=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:y});break;case google.ima.AdEvent.Type.IMPRESSION:g="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:g="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:g="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var w=e.getAd().getContentType();g=w,this._show({mode:"loaded",contentType:w});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(g=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:g="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:p&&"VPAID"!==f&&this.adResume.show(),g="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:g="Fired when the ad is resumed.",p&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:g="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:l=this._is_completed(e.getAd()),g="Fired when the ad is skipped by the user.",jS(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===v.Rewarded&&this.rewardedLabel.show(),this._hideAddResume(),g="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:g="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:l=this._is_completed(e.getAd()),g="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:g="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:g="Fired when the ad volume has been muted."}if(""!==u&&""!==g){var k=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,A=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;k||A||this.isAudioAd||this._broadcast(u,{name:u,message:g,status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(s," d").concat(o," m").concat(d," y").concat(c)}})}if(l&&!this.adSuccess){this.adSuccess=!0;var E=e.getAd(),x="Rainbow"===(null==E?void 0:E.getAdSystem())&&(null==E?void 0:E.getWrapperAdIds().some(function(e){return t(this,i),"promo"===e}.bind(this)));null==E||E.getAdSystem(),null==E||E.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:x}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i;if(!((null===(r=this.gameData)||void 0===r||null===(r=r.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(i=this.gameData)||void 0===i||null===(i=i.aws_tst)||void 0===i||null===(i=i.ep)||void 0===i?void 0:i.atm)))return;var a=e.type,s=e.url;if("none"===a||!s)return;s=s.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(s).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,d=a.impression_url,c=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:d}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:u}:h&&n&&(i={type:"fallbacj_imp",url:c})}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);JS.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume()}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_===v.Rewarded&&this.rewardedLabel&&this.rewardedLabel.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(kS(e.getInnerError)){var t=e.getInnerError();if(t)return kS(t.getErrorCode)&&kS(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];N(s)&&(i.query[a]=G.stringify(s))}var o=new O(i.url,!0);return F(o.query,i.query||{}),QS({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new O(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&&N(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&N(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M(a),N(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 d=G.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var c in d){new RegExp(a.cust_params.$$remove,"i").test(c)&&delete d[c]}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=d,F(s,u),s.cust_params=G.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a=(null===(n=this._adrequest_user_context)||void 0===n||null===(n=n.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:a}),this._adrequest_user_context,'bidder:"'.concat(a,'"');var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(n){return t(this,e),n===a}.bind(this)):s.length>0&&(d=s.some(function(n){return t(this,e),n===a}.bind(this))),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n=this._isExcludedBidderForT4R(),r=null===(e=this.gameData)||void 0===e||null===(e=e.t4rc)||void 0===e?void 0:e.bidder_exc_rate,i=null!=r&&r.enabled?(null==r?void 0:r.rate)||.8:0,a=(null===(t=this._adrequest_user_context)||void 0===t||null===(t=t.adTag)||void 0===t?void 0:t.bidder)||"adx",s=Math.random();return n||"adx"!==a&&s<i}},{key:"_isT4R",value:function(e){var t,n,r,i,a,s,o;if(!this.gameData.publishedAt)return{success:!1,reason:"pdate-2"};var d=new Date(this.gameData.publishedAt);if(((new Date).getTime()-d.getTime())/864e5<=10)return{success:!1,reason:"pdate-1"};var c=this.gameData.meta,u=e.t4r.meta;if((null==c||null===(t=c.ast)||void 0===t?void 0:t.c)>=(null==u||null===(n=u.ast)||void 0===n?void 0:n.c)&&(null==c||null===(r=c.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"};var l=this._isExcludedBidderForT4RWithBidderExcRate();if(console.log("zxcv isExcludedBidderForT4R",l),l)return this.msgrt.send("bidder.ex",{message:"true"}),{success:!1,reason:"bidder"};this.msgrt.send("bidder.ex",{message:"false"});var h=null===(a=this._adrequest_user_context)||void 0===a?void 0:a.tnl_ad_pos;if(this.clickCount[h]>=(null===(s=e.t4r[h])||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 p,f=h&&(null===(p=e.t4r[h])||void 0===p?void 0:p.enabled);return{success:f,reason:f?null:"rule-check"}}if(null!=e&&e.contentType.startsWith("video/")){var m,v=(null===(m=e.t4r[h])||void 0===m?void 0:m.viper)||0;if(v>0){var g,b=Math.random()<v,_=h&&b&&(null===(g=e.t4r[h])||void 0===g?void 0:g.enabled);return{success:_,reason:_?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;if(!e)return!1;var o="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(t=t.pAds)||void 0===t?void 0:t.vmap)||!0===(null===(n=this.gameData)||void 0===n||null===(n=n.pAds)||void 0===n||null===(n=n.vmap)||void 0===n?void 0:n.enabled))||"midroll"===e&&(!0===(null===(r=this.gameData)||void 0===r||null===(r=r.mAds)||void 0===r?void 0:r.vmap)||!0===(null===(i=this.gameData)||void 0===i||null===(i=i.mAds)||void 0===i||null===(i=i.vmap)||void 0===i?void 0:i.enabled))||"rewarded"===e&&(!0===(null===(a=this.gameData)||void 0===a||null===(a=a.rAds)||void 0===a?void 0:a.vmap)||!0===(null===(s=this.gameData)||void 0===s||null===(s=s.rAds)||void 0===s||null===(s=s.vmap)||void 0===s?void 0:s.enabled));if(!o)return!1;var d=this._get_vmap_config(e),c=this.adCounter[e];return void 0!==(null==d?void 0:d.start)?c>=(null==d?void 0:d.start):o}},{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 d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:i,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(t=t.pAds)||void 0===t?void 0:t.vmap;case"midroll":return null===(n=this.gameData)||void 0===n||null===(n=n.mAds)||void 0===n?void 0:n.vmap;case"rewarded":return null===(r=this.gameData)||void 0===r||null===(r=r.rAds)||void 0===r?void 0:r.vmap;default:return null===(i=this.gameData)||void 0===i||null===(i=i.pAds)||void 0===i?void 0:i.vmap}}},{key:"_isDP",value:function(e){var t;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(t=t.dp)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.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 gS(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(C.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(C.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,d="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),c=o?d:void 0;return function(){t(this,r),Us.promoError&&(console.log("promo-test fictional promo error"),c=void 0)}.bind(this),{promo_url:c,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,d,c,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:d={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(c=new gS(a.gameData).checkCustomParams())&&(d.cp=c),u=encodeURIComponent(C.encode(JSON.stringify(d))),null==i||i.adapterIndex,null==i||i.isLastAdapter,l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,!1,null==l||l.enabled,null==i||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 O(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 O(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:(u=e(r.mark((function e(n){var i,a,s,o,d,c,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:d=_("ch",window.location.href),c=_("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},d&&(u.channel=d),c&&(u.ch_date=c),(l=_("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),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),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 23:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"_init_ima_script",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: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 c.apply(this,arguments)})},{key:"_init_afg_script",value:(d=e(r.mark((function e(n){var i,a,s,o,d=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=14,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,d),!!window.adsbygoogle}.bind(this),attrs:o});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return d.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,d=a[s],c=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);c&&"IFRAME"===c.tagName&&c.style.height!==r&&(c.style.height=r,i&&(c.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=e(r.mark((function e(n){var i,a,s,o,d,c,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),Us.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),d=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),c=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||(Ps("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:d,beforeReward:c,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 o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=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),Us.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 s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(a=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),Us.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 a.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var n,r,i=this;if(null===(n=this.gameData)||void 0===n||null===(n=n.ad_blcks)||void 0===n||null===(n=n.adsenseTimeout)||void 0===n?void 0:n.enabled)var a=(null==e?void 0:e.adType)||"default",s=null===(r=this.gameData)||void 0===r||null===(r=r.ad_blcks)||void 0===r||null===(r=r.adsenseTimeout)||void 0===r?void 0:r.timeout,o=(null==s?void 0:s[a])||(null==s?void 0:s.default)||15,d=setTimeout(function(){t(this,i),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(d)}.bind(this),1e3*o)}},{key:"_startTimeoutForOpus",value:function(){var e=this,n=setTimeout(function(){t(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"timeout",status:"error"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(n)}.bind(this),5e3)}},{key:"_startAdsensePlacementNext",value:(i=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),Us.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 i.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(C.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 Tw).get();return n=QS(QS({},n),r),n=t?QS(QS({},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===v.Rewarded)t="reward";else if(n===v.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,QS(QS({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),ZS=R((function t(n){var i=this;D(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,pb(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",d=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:d},lb(this.moduleName,this.moduleConfig)})),eR=R((function t(n){var i=this;D(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,pb(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",d=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:d},lb(this.moduleName,this.moduleConfig)})),tR=function(e,t){console.log(e,t)},nR={},rR={},iR=null;function aR(){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 nR.version=r,nR.frame=e,nR.function=n,nR.version}function sR(e){var n=this;return iR||(iR=new Promise(function(r){function i(t,n){if(tR("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:nR,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),aR(),nR.frame?2===nR.version?(tR("TCF v2 CMP found. Fetching the consent."),nR.function?(tR("CMP API is directly accessible, calling it now..."),nR.function("addEventListener",nR.version,i)):(tR("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!==rR[r.callId]&&rR[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var d=Math.random()+"",c="".concat(a,"Call"),u=T({},c,{command:e,parameter:o,callId:d,version:r});rR[d]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,nR.version,r)}("addEventListener",nR.frame,i))):r({result:"cmpVersionNotV2",cmp:nR}):r({result:"cmpNotFound"})}.bind(this)),iR)}var oR=new(function(){function t(){D(this,t),this.productName="Game Distribution"}var n;return R(t,[{key:"checkIfExcluded",value:function(e){try{var t;return!(null===(t=e.diagnostic)||void 0===t||null===(t=t.gameDock)||void 0===t||!t.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,d,c;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(a=null==t||null===(i=t.visitor)||void 0===i||null===(i=i.visitorData)||void 0===i?void 0:i.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(a),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),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,c="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(c,{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 dR(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 uR=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var d=this;t(this,n);try{var c=document.createElement("script");if(c.async=null==s||s,c.type="text/javascript",c.onload=function(){t(this,d),e()}.bind(this),c.onerror=function(){t(this,d);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),c.src=r,i){var u,l=dR(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;c.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(c)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},lR="ffd4774b-99ae-4464-8f40-3afa12b4692e",hR=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,uR({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,uR({src:"https://cdn.cookielaw.org/consent/".concat(lR,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,uR({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:lR}],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)}}(),pR=new j,fR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},mR=!1;function vR(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(fR).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)&&(mR=!0),i&&mR&&(mR=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r;return null==e||null===(r=e.source)||void 0===r||null===(r=r.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var d=o();if(!d)return;var c=d&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),d.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(!c&&!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=fR[i][a];p&&pR.emit(p,r)}}}),!1);var gR="__msgr",bR=q(),_R=function(e){var n=this;if(!window[gR]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=gR,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:bR,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){kR(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",kR(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?vR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=bR,kR(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},yR=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=wR(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},wR=function e(t){try{var n,r=null==t?void 0:t.parent;if("game"===(null===(n=r.document)||void 0===n||null===(n=n.activeElement)||void 0===n?void 0:n.id))return r;e(r)}catch(e){return t}},kR=function(e){try{window[gR]&&window[gR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},AR=function(){function n(e){D(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 R(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,d=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,d);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}();function ER(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?ER(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ER(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SR(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}var DR,TR=function(){function n(e){var r=this;D(this,n),T(this,"_getAdTypeByAfgPosition",function(e){var n=this;t(this,r);var i={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(i).find(function(r){var a=this;return t(this,n),i[r].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),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._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}var i,a;return R(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h,p,f,m,v,g,b,_,y,w,k,A,E,x,S,R,D,O,C,I,P,L,U,M,j,B,N,G,F,q,V,z,H,W,K,$,Q=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,c=this._getAdTypeByAfgPosition(n),n.params.adTypeFound=c,n.params.position,u=this._getAdFlow(c),l=this._gameData,h=l.afg_disabled,p=null===(i=n.params)||void 0===i?void 0:i.isGift,null===(a=n.params)||void 0===a||a.position,f=null===(s=l.promo)||void 0===s?void 0:s.rainbow,m=(null==f?void 0:f.enabled)&&(null===(o=f.position)||void 0===o?void 0:o[c]),v=null==f?void 0:f.gift,g=m&&null!=f&&f.duration?null==f?void 0:f.duration:5,b=h?u.filter(function(e){return t(this,Q),"adsense"!==e}.bind(this)):u,_=this.get_ad_system_init_result(),y=_.afg,w=_.ima,k=null==l||null===(d=l.ad_blcks)||void 0===d||null===(d=d.removeOtherAdaptors)||void 0===d?void 0:d.enabled,this.anyAdBlocking=!y||!w,this.bothAdBlocking=!y&&!w,this.adsBlocked=k&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(Ps("gd-adflow adsBlocked so changing the flow"),b=[]):(y||(b=b.filter(function(e){return t(this,Q),"adsense"!==e}.bind(this))),w||(b=b.filter(function(e){return t(this,Q),"ima"!==e}.bind(this)))),A=!1,E=!1,x=[],S=0,R=!1,O=SR(b),e.prev=30,O.s();case 32:if((C=O.n()).done){e.next=68;break}return I=C.value,n.params.adapter=I,P=S===b.length-1,L=p&&v||!p,U=P&&m&&L,n.params=xR(xR({},n.params),{},{adapterIndex:S,isLastAdapter:P,shouldFail:!1,extraPromoRunOnFail:U}),function(){t(this,Q),Us.firstSuccessOrder&&!isNaN(Us.firstSuccessOrder)&&(n.params.shouldFail=S<Us.firstSuccessOrder)}.bind(this),Ps("gd-adflow, before adInvoke",S,I,n.params.shouldFail),e.next=43,this.adInvoke(n);case 43:if(M=e.sent,j=M.success,B=M.args,N=M.isSkipped,G=M.noVast,F=M.t4r,!j){e.next=57;break}return Ps("gd-adflow, adapter-result-success",S,I,B,F),A=!0,E=!(null==B||!B.isPromoSuccess),D=F,e.abrupt("break",68);case 57:if(Ps("gd-adflow, adapter-result-failure",S,I,B.message),S++,x.push(B.message),!N){e.next=62;break}return e.abrupt("break",68);case 62:if(!G){e.next=65;break}return this._runAutoResume(),e.abrupt("break",68);case 65:R=U;case 66:e.next=32;break;case 68:e.next=73;break;case 70:e.prev=70,e.t0=e.catch(30),O.e(e.t0);case 73:return e.prev=73,O.f(),e.finish(73);case 76:if(!R){e.next=82;break}return e.next=79,new AR(this).run({duration:g});case 79:e.sent.success&&(E=!0);case 82:return function(){var e;t(this,Q),Us.disableGift&&null!==(e=l.gft)&&void 0!==e&&e[c].enabled&&(l.gft[c].enabled=!1)}.bind(this),q=x.join(" /n"),A?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(c)):(this._onResumeGame(q,"warning"),this._giveGift(c)),V="-1",z="none",A?(V="index_".concat(S),z=b[S]):E&&(V="promo",z="promo"),H=this.get_session_id(),this.anyAdBlocking&&"-1"===V?(W="rewarded"===c?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[W]=this.blockedAdsMap[W]?this.blockedAdsMap[W]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(W)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!y,imaBlocked:!w,adType:W,sessionId:H,successAdapter:"none",adFlowIndex:V})):(K=T(T(T(T({},"adflow.all.index",{message:"".concat(V)}),"adflow.all.success_adapter",{message:"".concat(z)}),"adflow.".concat(c,".index"),{message:"".concat(V)}),"adflow.".concat(c,".success_adapter"),{message:"".concat(z)}),Object.keys(K).forEach(function(e){t(this,Q);var n=K[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:V,successAdapter:z,adBlocker:!1,afgBlocked:!y,imaBlocked:!w,adType:c,sessionId:H,t4r:D})),$={adType:c},this.eventBus.broadcast("AD_FLOW_COMPLETE",$),e.abrupt("return",$);case 95:case"end":return e.stop()}}),e,this,[[30,70,73,76]])}))),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,d,c,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),d={},c=function(e){t(this,l),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),a._eventBus.unsubscribeScope(o),n({success:!0,args:e,t4r:d})}.bind(this),a._eventBus.subscribe("AD_ERROR",c,o),a._eventBus.subscribe("AD_SDK_CANCELED",c,o),a._eventBus.subscribe("AD_SUCCESS",u,o),a._eventBus.subscribe("AD_T4R",function(){t(this,l),d.loaded=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_CLICK",function(){t(this,l),d.t4rClick=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_VIDEO",function(){t(this,l),d.t4rVideo=!0}.bind(this),o),a._eventBus.subscribe("AD_CLICK",function(){t(this,l),d.click=!0}.bind(this),o),a._eventBus.subscribe("AD_BIDDER",function(e){t(this,l),d.bidder=null==e?void 0:e.bidder}.bind(this),o),a._eventBus.subscribe("AD_T4R_NONE",function(e){t(this,l),d.fail_reason=null==e?void 0:e.reason}.bind(this),o),e.prev=13,e.next=16,a._adInstance.startAd(i);case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(13),Ls("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 22:case"end":return e.stop()}}),e,this,[[13,18]])})));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=this,o=void function(){if(t(this,s),Us.customAdFlow)return JSON.parse(Us.customAdFlow)}.bind(this),d=this._gameData.adflw;o&&(d=o);var c=null!==(n=d)&&void 0!==n&&null!==(n=n.adapters)&&void 0!==n&&n.default?null===(r=d)||void 0===r||null===(r=r.adapters)||void 0===r?void 0:r.default:["ima","adsense"];return c=null!==(i=d)&&void 0!==i&&null!==(i=i.adapters)&&void 0!==i&&i[e]?null===(a=d)||void 0===a||null===(a=a.adapters)||void 0===a?void 0:a[e]:c}}]),n}(),OR=new j,CR=["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(CR.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)DR=a,(window.parent||window).postMessage(r,"*"),OR.emit("aeria-event",r);else if(o){DR&&DR.postMessage(r,"*");var d=window.parent||window;d&&d.postMessage(r,"*")}}}),!1);var IR="https://html5.gamedistribution.com",PR="parent-data-request",LR="parent-data-response",UR=function(){function n(){D(this,n)}var i;return R(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,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===IR&&o===PR){var d={adRequestTimer:e.adRequestTimer};s.postMessage({type:LR,value:d})}}.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===IR&&i===LR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:PR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),MR=new UR,jR={SDKExistsOnUpperFrame:!1},BR=function(){function e(){D(this,e),this.adContainer=window.document.body}return R(e,[{key:"show",value:function(){this.adBlockerOverlay.style.display="block",this.adBlockerButton.style.display="block"}},{key:"hide",value:function(){this.adBlockerOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{this.addStyles();var n=document.createElement("div");n.id="gd__adblocker__button",n.setAttribute("title","AdBlocker"),n.classList.add("gd__adblocker__button"),n.onclick=function(){t(this,e),this.hide(),window.location.reload()}.bind(this);var r=document.createElement("p");r.innerText="Continue",n.appendChild(r),this.adBlockerButton=n;var i=document.createElement("div");i.id="gd__adblocker__logo",i.setAttribute("title","AdBlocker"),i.classList.add("gd__adblocker__logo"),this.adBlockerLogo=i;var a=document.createElement("p");a.id="gd__adblocker__text",a.classList.add("gd__adblocker__text1"),a.innerText="Thanks for playing!",this.adBlockerText1=a;var s=document.createElement("p");s.id="gd__adblocker__text",s.classList.add("gd__adblocker__text1"),s.innerText="It seems you’re using a plugin to block advertising within this game.To ensure the game works properly and to support our game creators, we kindly ask that you disable your ad blocker.",this.adBlockerText2=s;var o=document.createElement("p");o.id="gd__adblocker__text",o.classList.add("gd__adblocker__text1"),o.innerText="Thank you!",this.adBlockerText3=o;var d=document.createElement("div");d.id="gd__adblocker__container",d.classList.add("gd__adblocker__container"),d.appendChild(this.adBlockerText1),d.appendChild(this.adBlockerText2),d.appendChild(this.adBlockerText3),d.appendChild(this.adBlockerButton),this.adBlockerContainer=d;var c=document.createElement("div");c.id="gd__adblocker__overlay",c.classList.add("gd__adblocker__overlay"),c.appendChild(this.adBlockerContainer),this.adBlockerOverlay=c,this.adContainer.appendChild(this.adBlockerOverlay)}catch(e){console.log("AdBlocker error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__adblocker__style",e,"\n .gd__adblocker__button {\n text-align: center;\n width: 90%;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: calc(10% - 20px); /* Container'ın altından 20px yukarıda */\n left: 5%; /* Container'ın solundan %5 içeride */\n right: 5%; /* Container'ın sağından %5 içeride */\n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 50px;\n color: white;\n margin: 0 auto;\n }\n\n .gd__adblocker__button > p {\n position: relative;\n text-align: center;\n margin: 0 auto;\n height: 100%;\n top: 30%;\n color: white;\n }\n\n .gd__adblocker__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(20% - 50px);\n left: calc(50% - 50px);\n margin: 0;\n border-radius: 50%;\n }\n\n .gd__adblocker__container {\n position: absolute;\n z-index: 2000;\n cursor: pointer;\n border-radius: 20px;\n border: 5px solid #06b8a2;\n margin: 0 auto;\n top: 10%;\n left: 10%;\n right: 10%;\n bottom: 10%;\n max-width: 80%; \n max-height: 80%; \n width: auto; \n height: auto; \n }\n \n .gd__adblocker__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,1);\n z-index: 1999;\n cursor: pointer;\n }\n\n .gd__adblocker__text1 {\n text-align: center;\n top: 25%;\n position: relative;\n font-family: monospace;\n color: white;\n margin: 10px;\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 NR(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 GR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var FR=q(),qR=null,VR=null,zR=function(){function n(e){var r,i,a,s=this;if(D(this,n),qR)return qR;qR=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new Tw,this._location.print();var o=this._location.get(),d=(null==o||null===(r=o.top)||void 0===r||null===(r=r.domain)||void 0===r?void 0:r.value)||(null==o||null===(i=o.partner.domain)||void 0===i?void 0:i.value),c=null==o||null===(a=o.partner.url)||void 0===a?void 0:a.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||c,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||d,this._topDomain,this._parentURL,this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i=this;if((t(this,s),null===(e=this._gameData)||void 0===e||null===(e=e.directTokenUse)||void 0===e?void 0:e.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this._sendLoadedEvent(2),!0===(null===(n=this._gameData.lp)||void 0===n?void 0:n.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(r=this._gameData.evnts)&&void 0!==r&&r.enabled&&this._isLoaderGameURL()&&(_R(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),MR.init(this),this._send_gametag_data("sdk_init"),this._executeMidrollPlus()}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,g,b,_,w,T,I,P,L,U,j,B,N;return R(n,[{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:(N=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 N.apply(this,arguments)})},{key:"_loadCMP",value:(B=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(n=new Tw,0!==(null==(i=n.get("depth"))?void 0:i.value)||null===(t=this._gameData)||void 0===t||null===(t=t.cmp)||void 0===t||!t.enabled){e.next=12;break}if(null===(a=this._gameData)||void 0===a||null===(a=a.cmp)||void 0===a||!a.checkDepthOnly){e.next=9;break}return e.next=7,hR();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,hR();case 12:case"end":return e.stop()}}),e,this)}))),function(){return B.apply(this,arguments)})},{key:"testConsent",value:function(){try{aR();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sR({});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;pR.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());O(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{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._bridge.isCoreSDKMode&&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:(j=e(r.mark((function e(n,i){var a,s,o,d=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: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,d),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){t(this,d);var n="".concat(e).startsWith("Error: Blocked:");Ps("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._checkAdBlocker(),console.error(e.message||e)}.bind(this))),n(this._gameData),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return j.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:"_checkAdBlocker",value:function(){var e=this;try{var n,r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(!i||!a)if(null!==(n=this._gameData.rmblck)&&void 0!==n&&n.enabled){var s=m.getBoolean("infdl1JMwI9JRg3U2MAIiQ==");this.adBlockerPage||(this.adBlockerPage=new BR,this.adBlockerPage.add()),s?setTimeout(function(){t(this,e),this.adBlockerPage.show()}.bind(this),500):setTimeout(function(){t(this,e),m.set("infdl1JMwI9JRg3U2MAIiQ==",!0),this.adBlockerPage.show()}.bind(this),18e4)}}catch(e){}}},{key:"_extendDefaultOptions",value:function(e,t){var n=M(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=Os.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:"_sendTunnlEvent",value:function(e){var n=this;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://tag.atom.gamedistribution.com/v1/hl/event?".concat(G.stringify(r))).catch(function(i){t(this,n),this._sendHLAnalyicsLog({query:GR(GR({},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 n,r=this,i=e.query,a=e.eventType,s=this._gameData.dbglg;if(s&&s.enabled&&s.topics&&(1===a?n="hl.gameplay":2===a?n="hl.gameload":-1===a?n="hl.gameplay.error":-2===a&&(n="hl.gameload.error"),n)){if(!s.topics.some(function(e){return t(this,r),e===n}.bind(this)))return;this.adInstance._send_atom_event(n,i)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=d("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?(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:Os.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;t(this,e),VR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(n=n.gameDock)&&void 0!==n&&n.adViewEvent&&VR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),oR.track(VR,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;null===(t=VR)||void 0===t||null===(t=t.tracking)||void 0===t||t.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,kk();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:f((n=["https://pm.azerioncircle.com/p/locus"])[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this)).then(function(){t(this,i)}.bind(this));case 8:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_loadGoogleAnalytics",value:function(){var e=this,n=["https://www.google-analytics.com/analytics.js"];f(n[0],"gdsdk_google_analytics",{alternates:n,error_prefix:"Blocked:",exists:function(){return t(this,e),window.ga}.bind(this)}).then(function(){t(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new y,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),"sdk")}.bind(this)),A.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){}}NS()}.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;t(this,e),this.msgrt.send("ad.impression"),MS(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(r=r.gameDock)&&void 0!==r&&r.adViewEvent&&oR.track(VR,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:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:n.message}),!this._hasBlocker)){this._hasBlocker=!0;var r=Math.random()<.25;this.msgrt.send("adblck.src",{message:n.message}),r&&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=sk().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Os.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(U=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=void 0===this._gameData.dmain||this._gameData.dmain,console.log("zxcv exclude, isAllowedDomain",i,t),t=t||i,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking();case 8:case"end":return e.stop()}}),e,this)}))),function(){return U.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t=this._checkTokenGameUrl(),n=new Tw,r="html5.gamedistribution.com"!==O(document.referrer).host,i=t&&!jR.SDKExistsOnUpperFrame&&n.get("depth.value")>0&&r;if(i&&(null===(e=this._gameData)||void 0===e||null===(e=e.directTokenUse)||void 0===e?void 0:e.enabled)){var a,s=null===(a=this._gameData)||void 0===a||null===(a=a.directTokenUse)||void 0===a?void 0:a.behavior;"to-loader"===s?this._redirectToLoaderFrame():"to-blocked-page"===s&&this._redirectToBlocking(!0)}return{blocked:i}}},{key:"_redirectToBlocking",value:function(t){var n=this;this.msgrt.send("blocked");var i=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:i.gameId,img:n._get_game_thumbnail_url(),title:i.title}));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=O(location.href,!0),a=GR(GR({},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;WS().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;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,i=this._gameData,a=i.gdpr&&!0===i.gdpr.consent,s=i.loader,o=null===(t=i.promo)||void 0===t?void 0:t[null===(n=i.promo)||void 0===n||null===(n=n.template)||void 0===n?void 0:n.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(i,a):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):!1!==s.enabled&&this._createSplash(i,a):null!=o&&o.enabled&&this._createPromo(i,a))}},{key:"_initializeVideoAd",value:(L=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 XS(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=Os,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return L.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:"_onEvent",value:function(e){p(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward,adPosition:e.adPosition})}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(P=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gk();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 P.apply(this,arguments)})},{key:"_createSplash",value:(I=e(r.mark((function e(n,i){var a,s,o,d,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(n);case 2:return a=e.sent,s=new a(GR(GR({},this.options),{},{isConsentDomain:i,version:Os.version}),n,this._parentDomain),e.next=6,Ek();case 6:o=e.sent,d=o.enabled,s.on("playClick",function(){var e,n=this;if(t(this,c),i){var r=new Date;r.setDate(r.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(r.toUTCString(),"; path=/")}if(this._hideCMPButton(),d)window.gdsdk.showAd(v.Interstitial,{position:"preroll"}).catch(function(e){t(this,n),s.hide()}.bind(this));else{var a={position:"preroll"};(function(){t(this,n),Us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),a.adapter="adsense")}).bind(this),this.showAd(v.Interstitial,a).catch(function(e){t(this,n)}.bind(this))}null!==(e=this._gameData)&&void 0!==e&&null!==(e=e.evnts)&&void 0!==e&&e.enabled&&(yR({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,c),s.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,c),s.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(T=e(r.mark((function e(n,i){var a,s,o,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:s=e.sent,(o=new s(GR(GR({},this.options),{},{isConsentDomain:i,version:Os.version,template:null===(a=n.promo)||void 0===a||null===(a=a.template)||void 0===a?void 0:a.preroll}),n)).on("done",function(){t(this,d),o.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 T.apply(this,arguments)})},{key:"_createPromo",value:(w=e(r.mark((function e(n,i){var a,s,o,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:s=e.sent,(o=new s(GR(GR({},this.options),{},{isConsentDomain:i,version:Os.version,template:null===(a=n.promo)||void 0===a||null===(a=a.template)||void 0===a?void 0:a.preroll}),n)).on("done",function(){t(this,d),o.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 w.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(v.Interstitial).catch(function(){t(this,e)}.bind(this))}},{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,d,c,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!a._autoResumeIfAdsAreDisabled(n||"interstitial")){e.next=5;break}return e.abrupt("return",t());case 5:return d={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=9,a.sdkReady;case 9:return c=e.sent,e.next=12,a.videoAdReady;case 12:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(1),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:c,adRequest:d}),a._rejectAdIfAdDisabled({gameData:c,adRequest:d}),a._rejectAdIfUnsupportedType({adRequest:d}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||a._rejectAdIfAdRateHits({gameData:c,adRequest:d}),a.adInstance.attachAfgPosition(d),!a.adFlowRunning){e.next=22;break}return e.abrupt("return",t());case 22:return a.adFlowRunning=!0,u=new TR(a),e.next=26,u.runAdFlow(d);case 26:a.adFlowRunning=!1,t(),a._post_message({topic:"adrequest.instream"}),e.next=36;break;case 31:e.prev=31,e.t0=e.catch(0),a.adFlowRunning=!1,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 36:case"end":return e.stop()}}),e,null,[[0,31]])})));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 this._gameData.diagnostic,this._gameData.disableAds,a&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(t=t.gft)&&void 0!==t&&t[e].enabled&&(null===(n=this._gameData)||void 0===n||null===(n=n.gft)||void 0===n||null===(n=n[e].durations[this._giftCount[e]])||void 0===n?void 0:n.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(r=this._gameData)&&void 0!==r&&null!==(r=r.gft)&&void 0!==r&&r[e].enabled&&(null===(i=this._gameData)||void 0===i||null===(i=i.gft)||void 0===i||null===(i=i[e].durations[this._giftCount[e]])||void 0===i?void 0:i.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(a=this._gameData)&&void 0!==a&&null!==(a=a.gft)&&void 0!==a&&a[e].enabled&&(null===(s=this._gameData)||void 0===s||null===(s=s.gft)||void 0===s||null===(s=s[e].durations[this._giftCount[e]])||void 0===s?void 0:s.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=e.adRequest;if(t.disableAds[n.adType]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==v.Interstitial&&t.adType!==v.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=v.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===v.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i=e.gameData,a=e.adRequest,s=null;a.adType===v.Interstitial&&null!==(t=i.diagnostic)&&void 0!==t&&null!==(t=t.useMidrollIndex)&&void 0!==t&&t.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(n=i.diagnostic)||void 0===n||null===(n=n.useMidrollIndex)||void 0===n?void 0:n.indexes.length)-1||(s=6e4*(null===(r=i.diagnostic)||void 0===r||null===(r=r.useMidrollIndex)||void 0===r?void 0:r.indexes[this.adInstance.adMidrollCount])):s=i.midroll;if(a.adType===v.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<s)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=v.Rewarded,e.next=16;break;case 14:if(n===v.Interstitial||n===v.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:return e.next=18,i.adInstance.preloadAd(n);case 18:o=e.sent,t(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),a(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));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:(g=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 g.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;this._allowExternals({enabled:!1});try{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(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(yR({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()||(yR({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 S(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 O(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()),d=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:c()),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,v=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled,_=(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:b,parentURL:i,parentDomain:d,topDomain:u&&u.length?u:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:v,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:_,depth:o(),domainMatched:d===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 O(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e;return null===(e=this._gameData)||void 0===e||null===(e=e.extHosting)||void 0===e?void 0:e.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=O(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=O(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 O(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 O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(C.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new eR(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(i=i.template)||void 0===i?void 0:i.preroll],s=new ZS(a),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(C.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(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 O(e,!0);return n.query=GR(GR({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return C.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)VR.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:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o=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..."):(i.showAd(v.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(o),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 FR}},{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(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0){var r,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(v.Interstitial,{position:"midroll",giftType:i}).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(v.Interstitial,{position:"midroll",giftType:i}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function HR(){return(HR=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,kk();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 WR=new j,KR=function(e){var n=this;!function(){HR.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&&(WR.off("sdk-event",s),n())}.bind(this);WR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new zR(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),d=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),c=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),v=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&&b(r)}),!1)}.bind(this),g=function(){t(this,n),v(),m("init")}.bind(this),b=function(r){t(this,n);try{WR.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:d,cancelAd:c,openConsole:u,getSession:h,onEvent:b,init:g,_sendSDKReady:f,sendGenericEvent:p}},$R=function(e){var t=KR(e);return t.init(),t},QR=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"!==O(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},JR="gd-sdk-frame-handshake-request",YR="gd-sdk-frame-handshake-response",XR=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:JR},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===JR){var o={type:YR};i.postMessage(o,r)}else a===YR&&(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))},ZR=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wk();case 2:return t=e.sent,e.next=6,XR();case 6:if(n=e.sent,jR.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=QR(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,Ak();case 14:return o=e.sent,d=!1,d=o?!s&&!!n:!s,e.abrupt("return",d);case 18:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),eD=tt,tD=re,nD=ce,rD=Hl,iD=ts,aD=Qi,sD=nD(Vi.f),oD=nD([].push),dD=eD&&tD((function(){var e=Object.create(null);return e[2]=2,!sD(e,2)})),cD=function(e){return function(t){for(var n,r=aD(t),i=iD(r),a=dD&&null===rD(r),s=i.length,o=0,d=[];s>o;)n=i[o++],eD&&!(a?n in r:sD(r,n))||oD(d,e?[n,r[n]]:r[n]);return d}},uD={entries:cD(!0),values:cD(!1)}.values;Xa({target:"Object",stat:!0},{values:function(e){return uD(e)}});var lD,hD={},pD=function(e){try{if(e.skipForward)return;if(hD.source){var t={type:"gd-sdk-on-event",event:e};hD.source.postMessage(t,hD.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},fD=function(){pD({name:"SDK_READY",status:"success",message:"Everything is ready."}),pD({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),pD({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},mD=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,d=a.type,c=a.method,u=a.options;if("gd-sdk-self"!==d){if("gd-sdk"===d){if(!hD.source&&"init"===c)return function(e){var t=e.source,n=e.origin;hD={source:t,origin:n}}({source:o,origin:s}),void fD();var l=n[c];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"===c&&Us.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:c,options:u};window.postMessage(h,location.origin)}}),!1)},vD=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){pD(e),t.apply(this,arguments)}}(e);var t=new zR(e);return mD(t),t},gD=function(){function t(){D(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:[]},lb(this.moduleName,this.moduleConfig)}var n,i;return R(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,pb(this.moduleName);case 3:this.module=e.sent,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}(),bD=function(){var t=e(r.mark((function t(){var n,i,a,s,o,d,c,u,l,h,p,f,m,v,g,b;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new Tw).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 d=function(){var e=(new Tw).get("partner.url.value");return new O(e,!0)},c=function(){var e="ae-soft-323";try{var t=d(),n=t.pathname,r=n.split("/"),i=r[r.length-1];Ps("aeria-ylogin:loc",t,n,i),e=i}catch(e){Ls("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:c,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,gk();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())})),v=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 gD).runYMenu({gameId:c});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),g=QR(),b=g.whichFrame,"game-frame"===b()&&(f||v());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_D=function(e){try{var t=tk(e);e.gameId||t.send("nogameid",{message:"".concat(p_.parentURL)})}catch(e){}},yD=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,bD();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("zxcv error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),wD={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,_D(t),vk(t),e.next=5,ZR();case 5:return n=e.sent,e.next=8,yD();case 8:return i=n?$R(t):vD(t),xk(),e.abrupt("return",i);case 13:return e.prev=13,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",vD(t));case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(e){return t.apply(this,arguments)}}()};function kD(){return(kD=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,Dk();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,SD(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 AD,ED,xD=!1;function SD(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),lD)return r(lD);if(xD)var s=setInterval(function(){t(this,a),lD&&(xD=!1,clearInterval(s),r(lD))}.bind(this),100);else xD=!0,wD.create(e).then(function(e){t(this,a),lD=e,e._sendSDKReady(),xD=!1,r(lD)}.bind(this))}.bind(this))}function RD(e){return SD(e),{invoke:function(t){return function(e,t){return kD.apply(this,arguments)}(e,t)}}}function DD(n,i){var a=this;return new Promise(function(s,o){var d,c=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===(d=i.game)||void 0===d?void 0:d.version);TD({text:"sdk-wrapper-script-load"}),f(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){t(this,c),TD({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,TD({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,TD({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:ED=e.sent,TD({text:"sdk-wrapper after gdSdkWrp.init"}),s(ED),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),TD({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 TD(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(C.encode(JSON.stringify(t))))),console.log(V(Object.values(e)))}catch(e){}}function OD(e){if(e){var t=e.name,n=e.message,r=e.status;try{TD({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!AD}),AD&&AD.onEvent({name:t,message:n,status:r})}catch(t){TD({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function CD(e){return ID.apply(this,arguments)}function ID(){return(ID=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return AD=t,vk(t),e.next=4,gk();case 4:if(s=e.sent,!ED){e.next=7;break}return e.abrupt("return",ED);case 7:if(o=null==s||null===(n=s.sdk_wrp)||void 0===n?void 0:n.enabled,d=null==s||null===(i=s.sdk_wrp)||void 0===i?void 0:i.version,c=null==s?void 0:s.gameId,u=null==s?void 0:s.title,MD("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,TD({text:"sdk-wrapper-load-instant-play"}),e.next=18,LD();case 18:return TD({text:"sdk-wrapper-load-instant-play-loaded"}),e.next=21,DD(l,{onEvent:OD,game:{gameId:c,title:u,version:d}});case 21:return ED=e.sent,e.abrupt("return",ED);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function PD(){return PD=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,MD("beforeGetDeveloperSettings"),i=n(),MD("afterGetDeveloperSettings"),e.prev=4,e.next=7,CD(i);case 7:a=e.sent,MD("after get SDK wrapper: ".concat(!!a)),a&&(MD("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),MD("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),PD.apply(this,arguments)}function LD(){return UD.apply(this,arguments)}function UD(){return(UD=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="https://gtg.samsungapps.com/gsinstant-sdk/gsinstant.0.43.js",e.next=3,f(n,"samsung_instant_play_sdk",{alternates:[n],error_prefix:"Blocked:",exists:function(){return t(this,i),window.GSInstant}.bind(this)});case 3:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function MD(e){window.sdkLog.push(e)}function jD(){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=O(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=O(s,!0))&&void 0!==t&&t.host&&(a=e.host)),a}()?MD("skipped normal SDK init!"):(!function(){US();var n=RD(jD());function i(){var i=this;this.AdType=v,this.preloadAd=function(e){var r=this;return n.invoke(function(n){return t(this,r),n.preloadAd(e)}.bind(this))},this.showAd=function(){var i=e(r.mark((function e(i,a){var s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.invoke(function(e){var n=this;if(t(this,s),i===v.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),Us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),r.adapter="adsense")}.bind(this),e.showAd(i,r)}.bind(this)));case 1: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),mb.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),mb.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}(),MD("afterSDKInit")),function(e){PD.apply(this,arguments)}({_get_developer_sets:jD});
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 d,getTopDomain as c,getMobilePlatform as u,MessageRouter as l,extendDefaults as h,dankLog as p,getScript as f,Ls as m,AdType as v,Layers as g,getKeyByValue as b,getQueryString as _,EventBus as y,getIMASampleTags as w,SDKEvents as k,IMAEvents as A,Macros as E,setDankLog as x,ImplementationTest as S}from"@bygd/gd-sdk-era/dist/default";import R from"@babel/runtime/helpers/createClass";import D from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import O from"url-parse";import{Base64 as C}from"js-base64";import I from"validator";import P from"is-valid-domain";import L from"get-value";import U from"set-value";import M from"lodash.clonedeep";import{EventEmitter as j}from"events";import B from"can-autoplay";import{isPlainObject as N}from"is-plain-object";import G from"querystringify";import F from"lodash.merge";import{v4 as q}from"uuid";import V from"@babel/runtime/helpers/toConsumableArray";var z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},H=function(e){return e&&e.Math===Math&&e},W=H("object"==typeof globalThis&&globalThis)||H("object"==typeof window&&window)||H("object"==typeof self&&self)||H("object"==typeof z&&z)||H("object"==typeof z&&z)||function(){return this}()||Function("return this")(),K={exports:{}},$=W,Q=Object.defineProperty,J=function(e,t){try{Q($,e,{value:t,configurable:!0,writable:!0})}catch(n){$[e]=t}return t},Y=J,X="__core-js_shared__",Z=W[X]||Y(X,{}),ee=Z;(K.exports=function(e,t){return ee[e]||(ee[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.34.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"});var te,ne,re=function(e){try{return!!e()}catch(e){return!0}},ie=!re((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ae=ie,se=Function.prototype,oe=se.call,de=ae&&se.bind.bind(oe,oe),ce=ae?de:function(e){return function(){return oe.apply(e,arguments)}},ue=function(e){return null==e},le=ue,he=TypeError,pe=function(e){if(le(e))throw new he("Can't call method on "+e);return e},fe=pe,me=Object,ve=function(e){return me(fe(e))},ge=ve,be=ce({}.hasOwnProperty),_e=Object.hasOwn||function(e,t){return be(ge(e),t)},ye=ce,we=0,ke=Math.random(),Ae=ye(1..toString),Ee=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ae(++we+ke,36)},xe="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Se=W,Re=xe,De=Se.process,Te=Se.Deno,Oe=De&&De.versions||Te&&Te.version,Ce=Oe&&Oe.v8;Ce&&(ne=(te=Ce.split("."))[0]>0&&te[0]<4?1:+(te[0]+te[1])),!ne&&Re&&(!(te=Re.match(/Edge\/(\d+)/))||te[1]>=74)&&(te=Re.match(/Chrome\/(\d+)/))&&(ne=+te[1]);var Ie=ne,Pe=Ie,Le=re,Ue=W.String,Me=!!Object.getOwnPropertySymbols&&!Le((function(){var e=Symbol("symbol detection");return!Ue(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),je=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Be=W,Ne=K.exports,Ge=_e,Fe=Ee,qe=Me,Ve=je,ze=Be.Symbol,He=Ne("wks"),We=Ve?ze.for||ze:ze&&ze.withoutSetter||Fe,Ke=function(e){return Ge(He,e)||(He[e]=qe&&Ge(ze,e)?ze[e]:We("Symbol."+e)),He[e]},$e={};$e[Ke("toStringTag")]="z";var Qe="[object z]"===String($e),Je="object"==typeof document&&document.all,Ye={all:Je,IS_HTMLDDA:void 0===Je&&void 0!==Je},Xe=Ye.all,Ze=Ye.IS_HTMLDDA?function(e){return"function"==typeof e||e===Xe}:function(e){return"function"==typeof e},et={},tt=!re((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),nt=Ze,rt=Ye.all,it=Ye.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:nt(e)||e===rt}:function(e){return"object"==typeof e?null!==e:nt(e)},at=it,st=W.document,ot=at(st)&&at(st.createElement),dt=function(e){return ot?st.createElement(e):{}},ct=dt,ut=!tt&&!re((function(){return 7!==Object.defineProperty(ct("div"),"a",{get:function(){return 7}}).a})),lt=tt&&re((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ht=it,pt=String,ft=TypeError,mt=function(e){if(ht(e))return e;throw new ft(pt(e)+" is not an object")},vt=ie,gt=Function.prototype.call,bt=vt?gt.bind(gt):function(){return gt.apply(gt,arguments)},_t=W,yt=Ze,wt=function(e,t){return arguments.length<2?(n=_t[e],yt(n)?n:void 0):_t[e]&&_t[e][t];var n},kt=ce({}.isPrototypeOf),At=wt,Et=Ze,xt=kt,St=Object,Rt=je?function(e){return"symbol"==typeof e}:function(e){var t=At("Symbol");return Et(t)&&xt(t.prototype,St(e))},Dt=String,Tt=function(e){try{return Dt(e)}catch(e){return"Object"}},Ot=Ze,Ct=Tt,It=TypeError,Pt=function(e){if(Ot(e))return e;throw new It(Ct(e)+" is not a function")},Lt=Pt,Ut=ue,Mt=function(e,t){var n=e[t];return Ut(n)?void 0:Lt(n)},jt=bt,Bt=Ze,Nt=it,Gt=TypeError,Ft=bt,qt=it,Vt=Rt,zt=Mt,Ht=function(e,t){var n,r;if("string"===t&&Bt(n=e.toString)&&!Nt(r=jt(n,e)))return r;if(Bt(n=e.valueOf)&&!Nt(r=jt(n,e)))return r;if("string"!==t&&Bt(n=e.toString)&&!Nt(r=jt(n,e)))return r;throw new Gt("Can't convert object to primitive value")},Wt=TypeError,Kt=Ke("toPrimitive"),$t=function(e,t){if(!qt(e)||Vt(e))return e;var n,r=zt(e,Kt);if(r){if(void 0===t&&(t="default"),n=Ft(r,e,t),!qt(n)||Vt(n))return n;throw new Wt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Ht(e,t)},Qt=Rt,Jt=function(e){var t=$t(e,"string");return Qt(t)?t:t+""},Yt=tt,Xt=ut,Zt=lt,en=mt,tn=Jt,nn=TypeError,rn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,sn="enumerable",on="configurable",dn="writable";et.f=Yt?Zt?function(e,t,n){if(en(e),t=tn(t),en(n),"function"==typeof e&&"prototype"===t&&"value"in n&&dn in n&&!n[dn]){var r=an(e,t);r&&r[dn]&&(e[t]=n.value,n={configurable:on in n?n[on]:r[on],enumerable:sn in n?n[sn]:r[sn],writable:!1})}return rn(e,t,n)}:rn:function(e,t,n){if(en(e),t=tn(t),en(n),Xt)try{return rn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new nn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var cn={exports:{}},un=tt,ln=_e,hn=Function.prototype,pn=un&&Object.getOwnPropertyDescriptor,fn=ln(hn,"name"),mn={EXISTS:fn,PROPER:fn&&"something"===function(){}.name,CONFIGURABLE:fn&&(!un||un&&pn(hn,"name").configurable)},vn=Ze,gn=Z,bn=ce(Function.toString);vn(gn.inspectSource)||(gn.inspectSource=function(e){return bn(e)});var _n,yn,wn,kn=gn.inspectSource,An=Ze,En=W.WeakMap,xn=An(En)&&/native code/.test(String(En)),Sn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Rn=et,Dn=Sn,Tn=tt?function(e,t,n){return Rn.f(e,t,Dn(1,n))}:function(e,t,n){return e[t]=n,e},On=K.exports,Cn=Ee,In=On("keys"),Pn=function(e){return In[e]||(In[e]=Cn(e))},Ln={},Un=xn,Mn=W,jn=it,Bn=Tn,Nn=_e,Gn=Z,Fn=Pn,qn=Ln,Vn="Object already initialized",zn=Mn.TypeError,Hn=Mn.WeakMap;if(Un||Gn.state){var Wn=Gn.state||(Gn.state=new Hn);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,_n=function(e,t){if(Wn.has(e))throw new zn(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=Fn("state");qn[Kn]=!0,_n=function(e,t){if(Nn(e,Kn))throw new zn(Vn);return t.facade=e,Bn(e,Kn,t),t},yn=function(e){return Nn(e,Kn)?e[Kn]:{}},wn=function(e){return Nn(e,Kn)}}var $n={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(!jn(t)||(n=yn(t)).type!==e)throw new zn("Incompatible receiver, "+e+" required");return n}}},Qn=ce,Jn=re,Yn=Ze,Xn=_e,Zn=tt,er=mn.CONFIGURABLE,tr=kn,nr=$n.enforce,rr=$n.get,ir=String,ar=Object.defineProperty,sr=Qn("".slice),or=Qn("".replace),dr=Qn([].join),cr=Zn&&!Jn((function(){return 8!==ar((function(){}),"length",{value:8}).length})),ur=String(String).split("String"),lr=cn.exports=function(e,t,n){"Symbol("===sr(ir(t),0,7)&&(t="["+or(ir(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Xn(e,"name")||er&&e.name!==t)&&(Zn?ar(e,"name",{value:t,configurable:!0}):e.name=t),cr&&n&&Xn(n,"arity")&&e.length!==n.arity&&ar(e,"length",{value:n.arity});try{n&&Xn(n,"constructor")&&n.constructor?Zn&&ar(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=nr(e);return Xn(r,"source")||(r.source=dr(ur,"string"==typeof t?t:"")),e};Function.prototype.toString=lr((function(){return Yn(this)&&rr(this).source||tr(this)}),"toString");var hr=Ze,pr=et,fr=cn.exports,mr=J,vr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(hr(n)&&fr(n,a,r),r.global)i?e[t]=n:mr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:pr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},gr=ce,br=gr({}.toString),_r=gr("".slice),yr=function(e){return _r(br(e),8,-1)},wr=Qe,kr=Ze,Ar=yr,Er=Ke("toStringTag"),xr=Object,Sr="Arguments"===Ar(function(){return arguments}()),Rr=wr?Ar: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=xr(e),Er))?n:Sr?Ar(t):"Object"===(r=Ar(t))&&kr(t.callee)?"Arguments":r},Dr=Rr,Tr=Qe?{}.toString:function(){return"[object "+Dr(this)+"]"};Qe||vr(Object.prototype,"toString",Tr,{unsafe:!0});var Or={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},Cr=dt("span").classList,Ir=Cr&&Cr.constructor&&Cr.constructor.prototype,Pr=Ir===Object.prototype?void 0:Ir,Lr=yr,Ur=ce,Mr=function(e){if("Function"===Lr(e))return Ur(e)},jr=Pt,Br=ie,Nr=Mr(Mr.bind),Gr=function(e,t){return jr(e),void 0===t?e:Br?Nr(e,t):function(){return e.apply(t,arguments)}},Fr=re,qr=yr,Vr=Object,zr=ce("".split),Hr=Fr((function(){return!Vr("z").propertyIsEnumerable(0)}))?function(e){return"String"===qr(e)?zr(e,""):Vr(e)}:Vr,Wr=Math.ceil,Kr=Math.floor,$r=Math.trunc||function(e){var t=+e;return(t>0?Kr:Wr)(t)},Qr=function(e){var t=+e;return t!=t||0===t?0:$r(t)},Jr=Qr,Yr=Math.min,Xr=function(e){return e>0?Yr(Jr(e),9007199254740991):0},Zr=Xr,ei=function(e){return Zr(e.length)},ti=yr,ni=Array.isArray||function(e){return"Array"===ti(e)},ri=ce,ii=re,ai=Ze,si=Rr,oi=kn,di=function(){},ci=[],ui=wt("Reflect","construct"),li=/^\s*(?:class|function)\b/,hi=ri(li.exec),pi=!li.test(di),fi=function(e){if(!ai(e))return!1;try{return ui(di,ci,e),!0}catch(e){return!1}},mi=function(e){if(!ai(e))return!1;switch(si(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return pi||!!hi(li,oi(e))}catch(e){return!0}};mi.sham=!0;var vi=!ui||ii((function(){var e;return fi(fi.call)||!fi(Object)||!fi((function(){e=!0}))||e}))?mi:fi,gi=ni,bi=vi,_i=it,yi=Ke("species"),wi=Array,ki=function(e){var t;return gi(e)&&(t=e.constructor,(bi(t)&&(t===wi||gi(t.prototype))||_i(t)&&null===(t=t[yi]))&&(t=void 0)),void 0===t?wi:t},Ai=function(e,t){return new(ki(e))(0===t?0:t)},Ei=Gr,xi=Hr,Si=ve,Ri=ei,Di=Ai,Ti=ce([].push),Oi=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(d,c,u,l){for(var h,p,f=Si(d),m=xi(f),v=Ri(m),g=Ei(c,u),b=0,_=l||Di,y=t?_(d,v):n||s?_(d,0):void 0;v>b;b++)if((o||b in m)&&(p=g(h=m[b],b,f),e))if(t)y[b]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:Ti(y,h)}else switch(e){case 4:return!1;case 7:Ti(y,h)}return a?-1:r||i?i:y}},Ci={forEach:Oi(0),map:Oi(1),filter:Oi(2),some:Oi(3),every:Oi(4),find:Oi(5),findIndex:Oi(6),filterReject:Oi(7)},Ii=re,Pi=function(e,t){var n=[][e];return!!n&&Ii((function(){n.call(null,t||function(){return 1},1)}))},Li=Ci.forEach,Ui=W,Mi=Or,ji=Pr,Bi=Pi("forEach")?[].forEach:function(e){return Li(this,e,arguments.length>1?arguments[1]:void 0)},Ni=Tn,Gi=function(e){if(e&&e.forEach!==Bi)try{Ni(e,"forEach",Bi)}catch(t){e.forEach=Bi}};for(var Fi in Mi)Mi[Fi]&&Gi(Ui[Fi]&&Ui[Fi].prototype);Gi(ji);var qi={},Vi={},zi={}.propertyIsEnumerable,Hi=Object.getOwnPropertyDescriptor,Wi=Hi&&!zi.call({1:2},1);Vi.f=Wi?function(e){var t=Hi(this,e);return!!t&&t.enumerable}:zi;var Ki=Hr,$i=pe,Qi=function(e){return Ki($i(e))},Ji=tt,Yi=bt,Xi=Vi,Zi=Sn,ea=Qi,ta=Jt,na=_e,ra=ut,ia=Object.getOwnPropertyDescriptor;qi.f=Ji?ia:function(e,t){if(e=ea(e),t=ta(t),ra)try{return ia(e,t)}catch(e){}if(na(e,t))return Zi(!Yi(Xi.f,e,t),e[t])};var aa={},sa=Qr,oa=Math.max,da=Math.min,ca=function(e,t){var n=sa(e);return n<0?oa(n+t,0):da(n,t)},ua=Qi,la=ca,ha=ei,pa=function(e){return function(t,n,r){var i,a=ua(t),s=ha(a),o=la(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}},fa={includes:pa(!0),indexOf:pa(!1)},ma=_e,va=Qi,ga=fa.indexOf,ba=Ln,_a=ce([].push),ya=function(e,t){var n,r=va(e),i=0,a=[];for(n in r)!ma(ba,n)&&ma(r,n)&&_a(a,n);for(;t.length>i;)ma(r,n=t[i++])&&(~ga(a,n)||_a(a,n));return a},wa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ka=ya,Aa=wa.concat("length","prototype");aa.f=Object.getOwnPropertyNames||function(e){return ka(e,Aa)};var Ea={};Ea.f=Object.getOwnPropertySymbols;var xa=wt,Sa=aa,Ra=Ea,Da=mt,Ta=ce([].concat),Oa=xa("Reflect","ownKeys")||function(e){var t=Sa.f(Da(e)),n=Ra.f;return n?Ta(t,n(e)):t},Ca=_e,Ia=Oa,Pa=qi,La=et,Ua=function(e,t,n){for(var r=Ia(t),i=La.f,a=Pa.f,s=0;s<r.length;s++){var o=r[s];Ca(e,o)||n&&Ca(n,o)||i(e,o,a(t,o))}},Ma=re,ja=Ze,Ba=/#|\.prototype\./,Na=function(e,t){var n=Fa[Ga(e)];return n===Va||n!==qa&&(ja(t)?Ma(t):!!t)},Ga=Na.normalize=function(e){return String(e).replace(Ba,".").toLowerCase()},Fa=Na.data={},qa=Na.NATIVE="N",Va=Na.POLYFILL="P",za=Na,Ha=W,Wa=qi.f,Ka=Tn,$a=vr,Qa=J,Ja=Ua,Ya=za,Xa=function(e,t){var n,r,i,a,s,o=e.target,d=e.global,c=e.stat;if(n=d?Ha:c?Ha[o]||Qa(o,{}):(Ha[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Wa(n,r))&&s.value:n[r],!Ya(d?r:o+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ja(a,i)}(e.sham||i&&i.sham)&&Ka(a,"sham",!0),$a(n,r,a,e)}},Za=ya,es=wa,ts=Object.keys||function(e){return Za(e,es)},ns=ve,rs=ts;Xa({target:"Object",stat:!0,forced:re((function(){rs(1)}))},{keys:function(e){return rs(ns(e))}});var is=TypeError,as=Jt,ss=et,os=Sn,ds=function(e,t,n){var r=as(t);r in e?ss.f(e,r,os(0,n)):e[r]=n},cs=re,us=Ie,ls=Ke("species"),hs=function(e){return us>=51||!cs((function(){var t=[];return(t.constructor={})[ls]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},ps=Xa,fs=re,ms=ni,vs=it,gs=ve,bs=ei,_s=function(e){if(e>9007199254740991)throw is("Maximum allowed index exceeded");return e},ys=ds,ws=Ai,ks=hs,As=Ie,Es=Ke("isConcatSpreadable"),xs=As>=51||!fs((function(){var e=[];return e[Es]=!1,e.concat()[0]!==e})),Ss=function(e){if(!vs(e))return!1;var t=e[Es];return void 0!==t?!!t:ms(e)};ps({target:"Array",proto:!0,arity:1,forced:!xs||!ks("concat")},{concat:function(e){var t,n,r,i,a,s=gs(this),o=ws(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Ss(a=-1===t?s:arguments[t]))for(i=bs(a),_s(d+i),n=0;n<i;n++,d++)n in a&&ys(o,d,a[n]);else _s(d+1),ys(o,d++,a);return o.length=d,o}});var Rs=Array.isArray,Ds=Object.prototype.toString,Ts=Rs||function(e){return!!e&&"[object Array]"==Ds.call(e)},Os={name:"@bygd/gd-sdk-pes",version:"1.38.2",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",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"}},Cs=function(e){var t=Is("object"===n(e)?e:i(e));return t&&t.version?Os.version>=t.version?t:void 0:t},Is=function(e){var n=this;if(!Ts(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}},Ps=function(){var e;(e=console).log.apply(e,arguments)},Ls=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 Us={},Ms=Rr,js=String,Bs=function(e){if("Symbol"===Ms(e))throw new TypeError("Cannot convert a Symbol value to a string");return js(e)},Ns={},Gs=tt,Fs=lt,Vs=et,zs=mt,Hs=Qi,Ws=ts;Ns.f=Gs&&!Fs?Object.defineProperties:function(e,t){zs(e);for(var n,r=Hs(t),i=Ws(t),a=i.length,s=0;a>s;)Vs.f(e,n=i[s++],r[n]);return e};var Ks,$s=wt("document","documentElement"),Qs=mt,Js=Ns,Ys=wa,Xs=Ln,Zs=$s,eo=dt,to="prototype",no="script",ro=Pn("IE_PROTO"),io=function(){},ao=function(e){return"<"+no+">"+e+"</"+no+">"},so=function(e){e.write(ao("")),e.close();var t=e.parentWindow.Object;return e=null,t},oo=function(){try{Ks=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;oo="undefined"!=typeof document?document.domain&&Ks?so(Ks):(t=eo("iframe"),n="java"+no+":",t.style.display="none",Zs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(ao("document.F=Object")),e.close(),e.F):so(Ks);for(var r=Ys.length;r--;)delete oo[to][Ys[r]];return oo()};Xs[ro]=!0;var co=Object.create||function(e,t){var n;return null!==e?(io[to]=Qs(e),n=new io,io[to]=null,n[ro]=e):n=oo(),void 0===t?n:Js.f(n,t)},uo={},lo=ca,ho=ei,po=ds,fo=Array,mo=Math.max,vo=function(e,t,n){for(var r=ho(e),i=lo(t,r),a=lo(void 0===n?r:n,r),s=fo(mo(a-i,0)),o=0;i<a;i++,o++)po(s,o,e[i]);return s.length=o,s},go=yr,bo=Qi,_o=aa.f,yo=vo,wo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];uo.f=function(e){return wo&&"Window"===go(e)?function(e){try{return _o(e)}catch(e){return yo(wo)}}(e):_o(bo(e))};var ko=cn.exports,Ao=et,Eo=function(e,t,n){return n.get&&ko(n.get,t,{getter:!0}),n.set&&ko(n.set,t,{setter:!0}),Ao.f(e,t,n)},xo={},So=Ke;xo.f=So;var Ro=W,Do=_e,To=xo,Oo=et.f,Co=function(e){var t=Ro.Symbol||(Ro.Symbol={});Do(t,e)||Oo(t,e,{value:To.f(e)})},Io=bt,Po=wt,Lo=Ke,Uo=vr,Mo=et.f,jo=_e,Bo=Ke("toStringTag"),No=function(e,t,n){e&&!n&&(e=e.prototype),e&&!jo(e,Bo)&&Mo(e,Bo,{configurable:!0,value:t})},Go=Xa,Fo=W,qo=bt,Vo=ce,zo=tt,Ho=Me,Wo=re,Ko=_e,$o=kt,Qo=mt,Jo=Qi,Yo=Jt,Xo=Bs,Zo=Sn,ed=co,td=ts,nd=aa,rd=uo,id=Ea,ad=qi,sd=et,od=Ns,dd=Vi,cd=vr,ud=Eo,ld=K.exports,hd=Ln,pd=Ee,fd=Ke,md=xo,vd=Co,gd=function(){var e=Po("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=Lo("toPrimitive");t&&!t[r]&&Uo(t,r,(function(e){return Io(n,this)}),{arity:1})},bd=No,_d=$n,yd=Ci.forEach,wd=Pn("hidden"),kd="Symbol",Ad="prototype",Ed=_d.set,xd=_d.getterFor(kd),Sd=Object[Ad],Rd=Fo.Symbol,Dd=Rd&&Rd[Ad],Td=Fo.RangeError,Od=Fo.TypeError,Cd=Fo.QObject,Id=ad.f,Pd=sd.f,Ld=rd.f,Ud=dd.f,Md=Vo([].push),jd=ld("symbols"),Bd=ld("op-symbols"),Nd=ld("wks"),Gd=!Cd||!Cd[Ad]||!Cd[Ad].findChild,Fd=function(e,t,n){var r=Id(Sd,t);r&&delete Sd[t],Pd(e,t,n),r&&e!==Sd&&Pd(Sd,t,r)},qd=zo&&Wo((function(){return 7!==ed(Pd({},"a",{get:function(){return Pd(this,"a",{value:7}).a}})).a}))?Fd:Pd,Vd=function(e,t){var n=jd[e]=ed(Dd);return Ed(n,{type:kd,tag:e,description:t}),zo||(n.description=t),n},zd=function(e,t,n){e===Sd&&zd(Bd,t,n),Qo(e);var r=Yo(t);return Qo(n),Ko(jd,r)?(n.enumerable?(Ko(e,wd)&&e[wd][r]&&(e[wd][r]=!1),n=ed(n,{enumerable:Zo(0,!1)})):(Ko(e,wd)||Pd(e,wd,Zo(1,{})),e[wd][r]=!0),qd(e,r,n)):Pd(e,r,n)},Hd=function(e,t){Qo(e);var n=Jo(t),r=td(n).concat(Qd(n));return yd(r,(function(t){zo&&!qo(Wd,n,t)||zd(e,t,n[t])})),e},Wd=function(e){var t=Yo(e),n=qo(Ud,this,t);return!(this===Sd&&Ko(jd,t)&&!Ko(Bd,t))&&(!(n||!Ko(this,t)||!Ko(jd,t)||Ko(this,wd)&&this[wd][t])||n)},Kd=function(e,t){var n=Jo(e),r=Yo(t);if(n!==Sd||!Ko(jd,r)||Ko(Bd,r)){var i=Id(n,r);return!i||!Ko(jd,r)||Ko(n,wd)&&n[wd][r]||(i.enumerable=!0),i}},$d=function(e){var t=Ld(Jo(e)),n=[];return yd(t,(function(e){Ko(jd,e)||Ko(hd,e)||Md(n,e)})),n},Qd=function(e){var t=e===Sd,n=Ld(t?Bd:Jo(e)),r=[];return yd(n,(function(e){!Ko(jd,e)||t&&!Ko(Sd,e)||Md(r,jd[e])})),r};Ho||(cd(Dd=(Rd=function(){if($o(Dd,this))throw new Od("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Xo(arguments[0]):void 0,t=pd(e),n=function(e){var r=void 0===this?Fo:this;r===Sd&&qo(n,Bd,e),Ko(r,wd)&&Ko(r[wd],t)&&(r[wd][t]=!1);var i=Zo(1,e);try{qd(r,t,i)}catch(e){if(!(e instanceof Td))throw e;Fd(r,t,i)}};return zo&&Gd&&qd(Sd,t,{configurable:!0,set:n}),Vd(t,e)})[Ad],"toString",(function(){return xd(this).tag})),cd(Rd,"withoutSetter",(function(e){return Vd(pd(e),e)})),dd.f=Wd,sd.f=zd,od.f=Hd,ad.f=Kd,nd.f=rd.f=$d,id.f=Qd,md.f=function(e){return Vd(fd(e),e)},zo&&(ud(Dd,"description",{configurable:!0,get:function(){return xd(this).description}}),cd(Sd,"propertyIsEnumerable",Wd,{unsafe:!0}))),Go({global:!0,constructor:!0,wrap:!0,forced:!Ho,sham:!Ho},{Symbol:Rd}),yd(td(Nd),(function(e){vd(e)})),Go({target:kd,stat:!0,forced:!Ho},{useSetter:function(){Gd=!0},useSimple:function(){Gd=!1}}),Go({target:"Object",stat:!0,forced:!Ho,sham:!zo},{create:function(e,t){return void 0===t?ed(e):Hd(ed(e),t)},defineProperty:zd,defineProperties:Hd,getOwnPropertyDescriptor:Kd}),Go({target:"Object",stat:!0,forced:!Ho},{getOwnPropertyNames:$d}),gd(),bd(Rd,kd),hd[wd]=!0;var Jd=Me&&!!Symbol.for&&!!Symbol.keyFor,Yd=Xa,Xd=wt,Zd=_e,ec=Bs,tc=K.exports,nc=Jd,rc=tc("string-to-symbol-registry"),ic=tc("symbol-to-string-registry");Yd({target:"Symbol",stat:!0,forced:!nc},{for:function(e){var t=ec(e);if(Zd(rc,t))return rc[t];var n=Xd("Symbol")(t);return rc[t]=n,ic[n]=t,n}});var ac=Xa,sc=_e,oc=Rt,dc=Tt,cc=Jd,uc=(0,K.exports)("symbol-to-string-registry");ac({target:"Symbol",stat:!0,forced:!cc},{keyFor:function(e){if(!oc(e))throw new TypeError(dc(e)+" is not a symbol");if(sc(uc,e))return uc[e]}});var lc=ie,hc=Function.prototype,pc=hc.apply,fc=hc.call,mc="object"==typeof Reflect&&Reflect.apply||(lc?fc.bind(pc):function(){return fc.apply(pc,arguments)}),vc=ce([].slice),gc=ni,bc=Ze,_c=yr,yc=Bs,wc=ce([].push),kc=Xa,Ac=wt,Ec=mc,xc=bt,Sc=ce,Rc=re,Dc=Ze,Tc=Rt,Oc=vc,Cc=function(e){if(bc(e))return e;if(gc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?wc(n,i):"number"!=typeof i&&"Number"!==_c(i)&&"String"!==_c(i)||wc(n,yc(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(gc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Ic=Me,Pc=String,Lc=Ac("JSON","stringify"),Uc=Sc(/./.exec),Mc=Sc("".charAt),jc=Sc("".charCodeAt),Bc=Sc("".replace),Nc=Sc(1..toString),Gc=/[\uD800-\uDFFF]/g,Fc=/^[\uD800-\uDBFF]$/,qc=/^[\uDC00-\uDFFF]$/,Vc=!Ic||Rc((function(){var e=Ac("Symbol")("stringify detection");return"[null]"!==Lc([e])||"{}"!==Lc({a:e})||"{}"!==Lc(Object(e))})),zc=Rc((function(){return'"\\udf06\\ud834"'!==Lc("\udf06\ud834")||'"\\udead"'!==Lc("\udead")})),Hc=function(e,t){var n=Oc(arguments),r=Cc(t);if(Dc(r)||void 0!==e&&!Tc(e))return n[1]=function(e,t){if(Dc(r)&&(t=xc(r,this,Pc(e),t)),!Tc(t))return t},Ec(Lc,null,n)},Wc=function(e,t,n){var r=Mc(n,t-1),i=Mc(n,t+1);return Uc(Fc,e)&&!Uc(qc,i)||Uc(qc,e)&&!Uc(Fc,r)?"\\u"+Nc(jc(e,0),16):e};Lc&&kc({target:"JSON",stat:!0,arity:3,forced:Vc||zc},{stringify:function(e,t,n){var r=Oc(arguments),i=Ec(Vc?Hc:Lc,null,r);return zc&&"string"==typeof i?Bc(i,Gc,Wc):i}});var Kc=Ea,$c=ve;Xa({target:"Object",stat:!0,forced:!Me||re((function(){Kc.f(1)}))},{getOwnPropertySymbols:function(e){var t=Kc.f;return t?t($c(e)):[]}});var Qc=Ci.filter;Xa({target:"Array",proto:!0,forced:!hs("filter")},{filter:function(e){return Qc(this,e,arguments.length>1?arguments[1]:void 0)}});var Jc=Xa,Yc=re,Xc=Qi,Zc=qi.f,eu=tt;Jc({target:"Object",stat:!0,forced:!eu||Yc((function(){Zc(1)})),sham:!eu},{getOwnPropertyDescriptor:function(e,t){return Zc(Xc(e),t)}});var tu=Oa,nu=Qi,ru=qi,iu=ds;Xa({target:"Object",stat:!0,sham:!tt},{getOwnPropertyDescriptors:function(e){for(var t,n,r=nu(e),i=ru.f,a=tu(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&iu(s,t,n);return s}});var au=Xa,su=ni,ou=vi,du=it,cu=ca,uu=ei,lu=Qi,hu=ds,pu=Ke,fu=vc,mu=hs("slice"),vu=pu("species"),gu=Array,bu=Math.max;au({target:"Array",proto:!0,forced:!mu},{slice:function(e,t){var n,r,i,a=lu(this),s=uu(a),o=cu(e,s),d=cu(void 0===t?s:t,s);if(su(a)&&(n=a.constructor,(ou(n)&&(n===gu||su(n.prototype))||du(n)&&null===(n=n[vu]))&&(n=void 0),n===gu||void 0===n))return fu(a,o,d);for(r=new(void 0===n?gu:n)(bu(d-o,0)),i=0;o<d;o++,i++)o in a&&hu(r,i,a[o]);return r.length=i,r}});var _u=mt,yu=function(){var e=_u(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},wu=bt,ku=_e,Au=kt,Eu=yu,xu=RegExp.prototype,Su=function(e){var t=e.flags;return void 0!==t||"flags"in xu||ku(e,"flags")||!Au(xu,e)?t:wu(Eu,e)},Ru=mn.PROPER,Du=vr,Tu=mt,Ou=Bs,Cu=re,Iu=Su,Pu="toString",Lu=RegExp.prototype[Pu],Uu=Cu((function(){return"/a/b"!==Lu.call({source:"a",flags:"b"})})),Mu=Ru&&Lu.name!==Pu;(Uu||Mu)&&Du(RegExp.prototype,Pu,(function(){var e=Tu(this);return"/"+Ou(e.source)+"/"+Ou(Iu(e))}),{unsafe:!0});var ju=bt,Bu=mt,Nu=Mt,Gu=function(e,t,n){var r,i;Bu(e);try{if(!(r=Nu(e,"return"))){if("throw"===t)throw n;return n}r=ju(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return Bu(r),n},Fu=mt,qu=Gu,Vu={},zu=Vu,Hu=Ke("iterator"),Wu=Array.prototype,Ku=function(e){return void 0!==e&&(zu.Array===e||Wu[Hu]===e)},$u=Rr,Qu=Mt,Ju=ue,Yu=Vu,Xu=Ke("iterator"),Zu=function(e){if(!Ju(e))return Qu(e,Xu)||Qu(e,"@@iterator")||Yu[$u(e)]},el=bt,tl=Pt,nl=mt,rl=Tt,il=Zu,al=TypeError,sl=function(e,t){var n=arguments.length<2?il(e):t;if(tl(n))return nl(el(n,e));throw new al(rl(e)+" is not iterable")},ol=Gr,dl=bt,cl=ve,ul=function(e,t,n,r){try{return r?t(Fu(n)[0],n[1]):t(n)}catch(t){qu(e,"throw",t)}},ll=Ku,hl=vi,pl=ei,fl=ds,ml=sl,vl=Zu,gl=Array,bl=function(e){var t=cl(e),n=hl(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=ol(i,r>2?arguments[2]:void 0));var s,o,d,c,u,l,h=vl(t),p=0;if(!h||this===gl&&ll(h))for(s=pl(t),o=n?new this(s):gl(s);s>p;p++)l=a?i(t[p],p):t[p],fl(o,p,l);else for(u=(c=ml(t,h)).next,o=n?new this:[];!(d=dl(u,c)).done;p++)l=a?ul(c,i,[d.value,p],!0):d.value,fl(o,p,l);return o.length=p,o},_l=Ke("iterator"),yl=!1;try{var wl=0,kl={next:function(){return{done:!!wl++}},return:function(){yl=!0}};kl[_l]=function(){return this},Array.from(kl,(function(){throw 2}))}catch(e){}var Al=function(e,t){try{if(!t&&!yl)return!1}catch(e){return!1}var n=!1;try{var r={};r[_l]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},El=bl;Xa({target:"Array",stat:!0,forced:!Al((function(e){Array.from(e)}))},{from:El});var xl,Sl,Rl,Dl=ce,Tl=Qr,Ol=Bs,Cl=pe,Il=Dl("".charAt),Pl=Dl("".charCodeAt),Ll=Dl("".slice),Ul=function(e){return function(t,n){var r,i,a=Ol(Cl(t)),s=Tl(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Pl(a,s))<55296||r>56319||s+1===o||(i=Pl(a,s+1))<56320||i>57343?e?Il(a,s):r:e?Ll(a,s,s+2):i-56320+(r-55296<<10)+65536}},Ml={codeAt:Ul(!1),charAt:Ul(!0)},jl=!re((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Bl=_e,Nl=Ze,Gl=ve,Fl=jl,ql=Pn("IE_PROTO"),Vl=Object,zl=Vl.prototype,Hl=Fl?Vl.getPrototypeOf:function(e){var t=Gl(e);if(Bl(t,ql))return t[ql];var n=t.constructor;return Nl(n)&&t instanceof n?n.prototype:t instanceof Vl?zl:null},Wl=re,Kl=Ze,$l=it,Ql=Hl,Jl=vr,Yl=Ke("iterator"),Xl=!1;[].keys&&("next"in(Rl=[].keys())?(Sl=Ql(Ql(Rl)))!==Object.prototype&&(xl=Sl):Xl=!0);var Zl=!$l(xl)||Wl((function(){var e={};return xl[Yl].call(e)!==e}));Zl&&(xl={}),Kl(xl[Yl])||Jl(xl,Yl,(function(){return this}));var eh={IteratorPrototype:xl,BUGGY_SAFARI_ITERATORS:Xl},th=eh.IteratorPrototype,nh=co,rh=Sn,ih=No,ah=Vu,sh=function(){return this},oh=function(e,t,n,r){var i=t+" Iterator";return e.prototype=nh(th,{next:rh(+!r,n)}),ih(e,i,!1),ah[i]=sh,e},dh=ce,ch=Pt,uh=Ze,lh=String,hh=TypeError,ph=function(e,t,n){try{return dh(ch(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},fh=mt,mh=function(e){if("object"==typeof e||uh(e))return e;throw new hh("Can't set "+lh(e)+" as a prototype")},vh=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=ph(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return fh(n),mh(r),t?e(n,r):n.__proto__=r,n}}():void 0),gh=Xa,bh=bt,_h=Ze,yh=oh,wh=Hl,kh=vh,Ah=No,Eh=Tn,xh=vr,Sh=Vu,Rh=mn.PROPER,Dh=mn.CONFIGURABLE,Th=eh.IteratorPrototype,Oh=eh.BUGGY_SAFARI_ITERATORS,Ch=Ke("iterator"),Ih="keys",Ph="values",Lh="entries",Uh=function(){return this},Mh=function(e,t,n,r,i,a,s){yh(n,t,r);var o,d,c,u=function(e){if(e===i&&m)return m;if(!Oh&&e&&e in p)return p[e];switch(e){case Ih:case Ph:case Lh:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Ch]||p["@@iterator"]||i&&p[i],m=!Oh&&f||u(i),v="Array"===t&&p.entries||f;if(v&&(o=wh(v.call(new e)))!==Object.prototype&&o.next&&(wh(o)!==Th&&(kh?kh(o,Th):_h(o[Ch])||xh(o,Ch,Uh)),Ah(o,l,!0)),Rh&&i===Ph&&f&&f.name!==Ph&&(Dh?Eh(p,"name",Ph):(h=!0,m=function(){return bh(f,this)})),i)if(d={values:u(Ph),keys:a?m:u(Ih),entries:u(Lh)},s)for(c in d)(Oh||h||!(c in p))&&xh(p,c,d[c]);else gh({target:t,proto:!0,forced:Oh||h},d);return p[Ch]!==m&&xh(p,Ch,m,{name:i}),Sh[t]=m,d},jh=function(e,t){return{value:e,done:t}},Bh=Ml.charAt,Nh=Bs,Gh=$n,Fh=Mh,qh=jh,Vh="String Iterator",zh=Gh.set,Hh=Gh.getterFor(Vh);Fh(String,"String",(function(e){zh(this,{type:Vh,string:Nh(e),index:0})}),(function(){var e,t=Hh(this),n=t.string,r=t.index;return r>=n.length?qh(void 0,!0):(e=Bh(n,r),t.index+=e.length,qh(e,!1))}));var Wh=re,Kh=W.RegExp,$h=Wh((function(){var e=Kh("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Qh=$h||Wh((function(){return!Kh("a","y").sticky})),Jh={BROKEN_CARET:$h||Wh((function(){var e=Kh("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Qh,UNSUPPORTED_Y:$h},Yh=re,Xh=W.RegExp,Zh=Yh((function(){var e=Xh(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),ep=re,tp=W.RegExp,np=ep((function(){var e=tp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),rp=bt,ip=ce,ap=Bs,sp=yu,op=Jh,dp=K.exports,cp=co,up=$n.get,lp=Zh,hp=np,pp=dp("native-string-replace",String.prototype.replace),fp=RegExp.prototype.exec,mp=fp,vp=ip("".charAt),gp=ip("".indexOf),bp=ip("".replace),_p=ip("".slice),yp=function(){var e=/a/,t=/b*/g;return rp(fp,e,"a"),rp(fp,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),wp=op.BROKEN_CARET,kp=void 0!==/()??/.exec("")[1];(yp||kp||wp||lp||hp)&&(mp=function(e){var t,n,r,i,a,s,o,d=this,c=up(d),u=ap(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=rp(mp,l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,p=wp&&d.sticky,f=rp(sp,d),m=d.source,v=0,g=u;if(p&&(f=bp(f,"y",""),-1===gp(f,"g")&&(f+="g"),g=_p(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==vp(u,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",f)),kp&&(n=new RegExp("^"+m+"$(?!\\s)",f)),yp&&(r=d.lastIndex),i=rp(fp,p?n:d,g),p?i?(i.input=_p(i.input,v),i[0]=_p(i[0],v),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:yp&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),kp&&i&&i.length>1&&rp(pp,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=cp(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var Ap=mp;Xa({target:"RegExp",proto:!0,forced:/./.exec!==Ap},{exec:Ap});var Ep=Xa,xp=tt,Sp=ce,Rp=_e,Dp=Ze,Tp=kt,Op=Bs,Cp=Eo,Ip=Ua,Pp=W.Symbol,Lp=Pp&&Pp.prototype;if(xp&&Dp(Pp)&&(!("description"in Lp)||void 0!==Pp().description)){var Up={},Mp=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Op(arguments[0]),t=Tp(Lp,this)?new Pp(e):void 0===e?Pp():Pp(e);return""===e&&(Up[t]=!0),t};Ip(Mp,Pp),Mp.prototype=Lp,Lp.constructor=Mp;var jp="Symbol(description detection)"===String(Pp("description detection")),Bp=Sp(Lp.valueOf),Np=Sp(Lp.toString),Gp=/^Symbol\((.*)\)[^)]+$/,Fp=Sp("".replace),qp=Sp("".slice);Cp(Lp,"description",{configurable:!0,get:function(){var e=Bp(this);if(Rp(Up,e))return"";var t=Np(e),n=jp?qp(t,7,-1):Fp(t,Gp,"$1");return""===n?void 0:n}}),Ep({global:!0,constructor:!0,forced:!0},{Symbol:Mp})}Co("iterator");var Vp=Ke,zp=co,Hp=et.f,Wp=Vp("unscopables"),Kp=Array.prototype;void 0===Kp[Wp]&&Hp(Kp,Wp,{configurable:!0,value:zp(null)});var $p=function(e){Kp[Wp][e]=!0},Qp=Qi,Jp=$p,Yp=Vu,Xp=$n,Zp=et.f,ef=Mh,tf=jh,nf=tt,rf="Array Iterator",af=Xp.set,sf=Xp.getterFor(rf),of=ef(Array,"Array",(function(e,t){af(this,{type:rf,target:Qp(e),index:0,kind:t})}),(function(){var e=sf(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,tf(void 0,!0);switch(e.kind){case"keys":return tf(n,!1);case"values":return tf(t[n],!1)}return tf([n,t[n]],!1)}),"values"),df=Yp.Arguments=Yp.Array;if(Jp("keys"),Jp("values"),Jp("entries"),nf&&"values"!==df.name)try{Zp(df,"name",{value:"values"})}catch(e){}var cf=W,uf=Or,lf=Pr,hf=of,pf=Tn,ff=No,mf=Ke("iterator"),vf=hf.values,gf=function(e,t){if(e){if(e[mf]!==vf)try{pf(e,mf,vf)}catch(t){e[mf]=vf}if(ff(e,t,!0),uf[t])for(var n in hf)if(e[n]!==hf[n])try{pf(e,n,hf[n])}catch(t){e[n]=hf[n]}}};for(var bf in uf)gf(cf[bf]&&cf[bf].prototype,bf);gf(lf,"DOMTokenList");var _f,yf,wf,kf,Af="process"===yr(W.process),Ef=wt,xf=Eo,Sf=tt,Rf=Ke("species"),Df=function(e){var t=Ef(e);Sf&&t&&!t[Rf]&&xf(t,Rf,{configurable:!0,get:function(){return this}})},Tf=kt,Of=TypeError,Cf=function(e,t){if(Tf(t,e))return e;throw new Of("Incorrect invocation")},If=vi,Pf=Tt,Lf=TypeError,Uf=mt,Mf=function(e){if(If(e))return e;throw new Lf(Pf(e)+" is not a constructor")},jf=ue,Bf=Ke("species"),Nf=function(e,t){var n,r=Uf(e).constructor;return void 0===r||jf(n=Uf(r)[Bf])?t:Mf(n)},Gf=TypeError,Ff=function(e,t){if(e<t)throw new Gf("Not enough arguments");return e},qf=/(?:ipad|iphone|ipod).*applewebkit/i.test(xe),Vf=W,zf=mc,Hf=Gr,Wf=Ze,Kf=_e,$f=re,Qf=$s,Jf=vc,Yf=dt,Xf=Ff,Zf=qf,em=Af,tm=Vf.setImmediate,nm=Vf.clearImmediate,rm=Vf.process,im=Vf.Dispatch,am=Vf.Function,sm=Vf.MessageChannel,om=Vf.String,dm=0,cm={},um="onreadystatechange";$f((function(){_f=Vf.location}));var lm=function(e){if(Kf(cm,e)){var t=cm[e];delete cm[e],t()}},hm=function(e){return function(){lm(e)}},pm=function(e){lm(e.data)},fm=function(e){Vf.postMessage(om(e),_f.protocol+"//"+_f.host)};tm&&nm||(tm=function(e){Xf(arguments.length,1);var t=Wf(e)?e:am(e),n=Jf(arguments,1);return cm[++dm]=function(){zf(t,void 0,n)},yf(dm),dm},nm=function(e){delete cm[e]},em?yf=function(e){rm.nextTick(hm(e))}:im&&im.now?yf=function(e){im.now(hm(e))}:sm&&!Zf?(kf=(wf=new sm).port2,wf.port1.onmessage=pm,yf=Hf(kf.postMessage,kf)):Vf.addEventListener&&Wf(Vf.postMessage)&&!Vf.importScripts&&_f&&"file:"!==_f.protocol&&!$f(fm)?(yf=fm,Vf.addEventListener("message",pm,!1)):yf=um in Yf("script")?function(e){Qf.appendChild(Yf("script"))[um]=function(){Qf.removeChild(this),lm(e)}}:function(e){setTimeout(hm(e),0)});var mm={set:tm,clear:nm},vm=function(){this.head=null,this.tail=null};vm.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 gm,bm,_m,ym,wm,km=vm,Am=/ipad|iphone|ipod/i.test(xe)&&"undefined"!=typeof Pebble,Em=/web0s(?!.*chrome)/i.test(xe),xm=W,Sm=Gr,Rm=qi.f,Dm=mm.set,Tm=km,Om=qf,Cm=Am,Im=Em,Pm=Af,Lm=xm.MutationObserver||xm.WebKitMutationObserver,Um=xm.document,Mm=xm.process,jm=xm.Promise,Bm=Rm(xm,"queueMicrotask"),Nm=Bm&&Bm.value;if(!Nm){var Gm=new Tm,Fm=function(){var e,t;for(Pm&&(e=Mm.domain)&&e.exit();t=Gm.get();)try{t()}catch(e){throw Gm.head&&gm(),e}e&&e.enter()};Om||Pm||Im||!Lm||!Um?!Cm&&jm&&jm.resolve?((ym=jm.resolve(void 0)).constructor=jm,wm=Sm(ym.then,ym),gm=function(){wm(Fm)}):Pm?gm=function(){Mm.nextTick(Fm)}:(Dm=Sm(Dm,xm),gm=function(){Dm(Fm)}):(bm=!0,_m=Um.createTextNode(""),new Lm(Fm).observe(_m,{characterData:!0}),gm=function(){_m.data=bm=!bm}),Nm=function(e){Gm.head||gm(),Gm.add(e)}}var qm=Nm,Vm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},zm=W.Promise,Hm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Wm=!Hm&&!Af&&"object"==typeof window&&"object"==typeof document,Km=W,$m=zm,Qm=Ze,Jm=za,Ym=kn,Xm=Ke,Zm=Wm,ev=Hm,tv=Ie;$m&&$m.prototype;var nv=Xm("species"),rv=!1,iv=Qm(Km.PromiseRejectionEvent),av=Jm("Promise",(function(){var e=Ym($m),t=e!==String($m);if(!t&&66===tv)return!0;if(!tv||tv<51||!/native code/.test(e)){var n=new $m((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[nv]=r,!(rv=n.then((function(){}))instanceof r))return!0}return!t&&(Zm||ev)&&!iv})),sv={CONSTRUCTOR:av,REJECTION_EVENT:iv,SUBCLASSING:rv},ov={},dv=Pt,cv=TypeError,uv=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new cv("Bad Promise constructor");t=e,n=r})),this.resolve=dv(t),this.reject=dv(n)};ov.f=function(e){return new uv(e)};var lv,hv,pv,fv=Xa,mv=Af,vv=W,gv=bt,bv=vr,_v=vh,yv=No,wv=Df,kv=Pt,Av=Ze,Ev=it,xv=Cf,Sv=Nf,Rv=mm.set,Dv=qm,Tv=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}},Ov=Vm,Cv=km,Iv=$n,Pv=zm,Lv=ov,Uv="Promise",Mv=sv.CONSTRUCTOR,jv=sv.REJECTION_EVENT,Bv=sv.SUBCLASSING,Nv=Iv.getterFor(Uv),Gv=Iv.set,Fv=Pv&&Pv.prototype,qv=Pv,Vv=Fv,zv=vv.TypeError,Hv=vv.document,Wv=vv.process,Kv=Lv.f,$v=Kv,Qv=!!(Hv&&Hv.createEvent&&vv.dispatchEvent),Jv="unhandledrejection",Yv=function(e){var t;return!(!Ev(e)||!Av(t=e.then))&&t},Xv=function(e,t){var n,r,i,a=t.value,s=1===t.state,o=s?e.ok:e.fail,d=e.resolve,c=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?c(new zv("Promise-chain cycle")):(r=Yv(n))?gv(r,n,d,c):d(n)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},Zv=function(e,t){e.notified||(e.notified=!0,Dv((function(){for(var n,r=e.reactions;n=r.get();)Xv(n,e);e.notified=!1,t&&!e.rejection&&tg(e)})))},eg=function(e,t,n){var r,i;Qv?((r=Hv.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),vv.dispatchEvent(r)):r={promise:t,reason:n},!jv&&(i=vv["on"+e])?i(r):e===Jv&&Tv("Unhandled promise rejection",n)},tg=function(e){gv(Rv,vv,(function(){var t,n=e.facade,r=e.value;if(ng(e)&&(t=Ov((function(){mv?Wv.emit("unhandledRejection",r,n):eg(Jv,n,r)})),e.rejection=mv||ng(e)?2:1,t.error))throw t.value}))},ng=function(e){return 1!==e.rejection&&!e.parent},rg=function(e){gv(Rv,vv,(function(){var t=e.facade;mv?Wv.emit("rejectionHandled",t):eg("rejectionhandled",t,e.value)}))},ig=function(e,t,n){return function(r){e(t,r,n)}},ag=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Zv(e,!0))},sg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new zv("Promise can't be resolved itself");var r=Yv(t);r?Dv((function(){var n={done:!1};try{gv(r,t,ig(sg,n,e),ig(ag,n,e))}catch(t){ag(n,t,e)}})):(e.value=t,e.state=1,Zv(e,!1))}catch(t){ag({done:!1},t,e)}}};if(Mv&&(Vv=(qv=function(e){xv(this,Vv),kv(e),gv(lv,this);var t=Nv(this);try{e(ig(sg,t),ig(ag,t))}catch(e){ag(t,e)}}).prototype,(lv=function(e){Gv(this,{type:Uv,done:!1,notified:!1,parent:!1,reactions:new Cv,rejection:!1,state:0,value:void 0})}).prototype=bv(Vv,"then",(function(e,t){var n=Nv(this),r=Kv(Sv(this,qv));return n.parent=!0,r.ok=!Av(e)||e,r.fail=Av(t)&&t,r.domain=mv?Wv.domain:void 0,0===n.state?n.reactions.add(r):Dv((function(){Xv(r,n)})),r.promise})),hv=function(){var e=new lv,t=Nv(e);this.promise=e,this.resolve=ig(sg,t),this.reject=ig(ag,t)},Lv.f=Kv=function(e){return e===qv||undefined===e?new hv(e):$v(e)},Av(Pv)&&Fv!==Object.prototype)){pv=Fv.then,Bv||bv(Fv,"then",(function(e,t){var n=this;return new qv((function(e,t){gv(pv,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete Fv.constructor}catch(e){}_v&&_v(Fv,Vv)}fv({global:!0,constructor:!0,wrap:!0,forced:Mv},{Promise:qv}),yv(qv,Uv,!1),wv(Uv);var og=Gr,dg=bt,cg=mt,ug=Tt,lg=Ku,hg=ei,pg=kt,fg=sl,mg=Zu,vg=Gu,gg=TypeError,bg=function(e,t){this.stopped=e,this.result=t},_g=bg.prototype,yg=function(e,t,n){var r,i,a,s,o,d,c,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),v=function(e){return r&&vg(r,"normal",e),new bg(!0,e)},g=function(e){return l?(cg(e),f?m(e[0],e[1],v):m(e[0],e[1])):f?m(e,v):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=mg(e)))throw new gg(ug(e)+" is not iterable");if(lg(i)){for(a=0,s=hg(e);s>a;a++)if((o=g(e[a]))&&pg(_g,o))return o;return new bg(!1)}r=fg(e,i)}for(d=h?e.next:r.next;!(c=dg(d,r)).done;){try{o=g(c.value)}catch(e){vg(r,"throw",e)}if("object"==typeof o&&o&&pg(_g,o))return o}return new bg(!1)},wg=zm,kg=sv.CONSTRUCTOR||!Al((function(e){wg.all(e).then(void 0,(function(){}))})),Ag=bt,Eg=Pt,xg=ov,Sg=Vm,Rg=yg;Xa({target:"Promise",stat:!0,forced:kg},{all:function(e){var t=this,n=xg.f(t),r=n.resolve,i=n.reject,a=Sg((function(){var n=Eg(t.resolve),a=[],s=0,o=1;Rg(e,(function(e){var d=s++,c=!1;o++,Ag(n,t,e).then((function(e){c||(c=!0,a[d]=e,--o||r(a))}),i)})),--o||r(a)}));return a.error&&i(a.value),n.promise}});var Dg=Xa,Tg=sv.CONSTRUCTOR,Og=zm,Cg=wt,Ig=Ze,Pg=vr,Lg=Og&&Og.prototype;if(Dg({target:"Promise",proto:!0,forced:Tg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Ig(Og)){var Ug=Cg("Promise").prototype.catch;Lg.catch!==Ug&&Pg(Lg,"catch",Ug,{unsafe:!0})}var Mg=bt,jg=Pt,Bg=ov,Ng=Vm,Gg=yg;Xa({target:"Promise",stat:!0,forced:kg},{race:function(e){var t=this,n=Bg.f(t),r=n.reject,i=Ng((function(){var i=jg(t.resolve);Gg(e,(function(e){Mg(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var Fg=bt,qg=ov;Xa({target:"Promise",stat:!0,forced:sv.CONSTRUCTOR},{reject:function(e){var t=qg.f(this);return Fg(t.reject,void 0,e),t.promise}});var Vg=mt,zg=it,Hg=ov,Wg=function(e,t){if(Vg(e),zg(t)&&t.constructor===e)return t;var n=Hg.f(e);return(0,n.resolve)(t),n.promise},Kg=Xa,$g=sv.CONSTRUCTOR,Qg=Wg;wt("Promise"),Kg({target:"Promise",stat:!0,forced:$g},{resolve:function(e){return Qg(this,e)}});var Jg=tt,Yg=mn.EXISTS,Xg=ce,Zg=Eo,eb=Function.prototype,tb=Xg(eb.toString),nb=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,rb=Xg(nb.exec);function ib(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 ab(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 ab(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 ab(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 sb(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 ob(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sb(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Jg&&!Yg&&Zg(eb,"name",{configurable:!0,get:function(){try{return rb(nb,tb(this))[1]}catch(e){return""}}});var db,cb={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"}},ub={},lb=function(e,t){ub[e]=ob(ob({},t),{},{isLoading:!1})},hb=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))},pb=function(){var t=e(r.mark((function e(t){var n,i,a,s,o,d,c,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=ub[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=ib(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,d=cb[o].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,hb({id:o,src:cb[o].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),c=o.id,u=o.src,console.log("Could not load external script ".concat(c," ").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,hb({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)}}(),fb=R((function t(){var n=this;D(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,pb("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"]},lb(this.moduleName,this.moduleConfig)})),mb=new fb,vb=it,gb=yr,bb=Ke("match"),_b=function(e){var t;return vb(e)&&(void 0!==(t=e[bb])?!!t:"RegExp"===gb(e))},yb=_b,wb=TypeError,kb=function(e){if(yb(e))throw new wb("The method doesn't accept regular expressions");return e},Ab=Ke("match"),Eb=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Ab]=!1,"/./"[e](t)}catch(e){}}return!1},xb=Xa,Sb=Mr,Rb=qi.f,Db=Xr,Tb=Bs,Ob=kb,Cb=pe,Ib=Eb,Pb=Sb("".startsWith),Lb=Sb("".slice),Ub=Math.min,Mb=Ib("startsWith");xb({target:"String",proto:!0,forced:!!(Mb||(db=Rb(String.prototype,"startsWith"),!db||db.writable))&&!Mb},{startsWith:function(e){var t=Tb(Cb(this));Ob(e);var n=Db(Ub(arguments.length>1?arguments[1]:void 0,t.length)),r=Tb(e);return Pb?Pb(t,r,n):Lb(t,n,n+r.length)===r}});var jb=Mr,Bb=vr,Nb=Ap,Gb=re,Fb=Ke,qb=Tn,Vb=Fb("species"),zb=RegExp.prototype,Hb=function(e,t,n,r){var i=Fb(e),a=!Gb((function(){var t={};return t[i]=function(){return 7},7!==""[e](t)})),s=a&&!Gb((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Vb]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=jb(/./[i]),d=t(i,""[e],(function(e,t,n,r,i){var s=jb(e),d=t.exec;return d===Nb||d===zb.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Bb(String.prototype,e,d[0]),Bb(zb,i,d[1])}r&&qb(zb[i],"sham",!0)},Wb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Kb=bt,$b=mt,Qb=Ze,Jb=yr,Yb=Ap,Xb=TypeError,Zb=function(e,t){var n=e.exec;if(Qb(n)){var r=Kb(n,e,t);return null!==r&&$b(r),r}if("RegExp"===Jb(e))return Kb(Yb,e,t);throw new Xb("RegExp#exec called on incompatible receiver")},e_=bt,t_=mt,n_=ue,r_=pe,i_=Wb,a_=Bs,s_=Mt,o_=Zb;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 c_(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}Hb("search",(function(e,t,n){return[function(t){var n=r_(this),r=n_(t)?void 0:s_(t,e);return r?e_(r,t,n):new RegExp(t)[e](a_(n))},function(e){var r=t_(this),i=a_(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;i_(s,0)||(r.lastIndex=0);var o=o_(r,i);return i_(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var u_,l_,h_=function(){function e(){D(this,e)}return R(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()),d=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:c()),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,v=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",g);var b=(e||n)&&r.loaderEnabled,_=(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:b,parentURL:i,parentDomain:d,topDomain:u&&u.length?u:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:v,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:_,depth:o(),domainMatched:d===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 O(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 O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(C.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(C.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(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 O(e,!0);return n.query=c_(c_({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return C.encode(JSON.stringify(e))}}]),e}(),p_=function(){try{return(new h_).getBridgeContext()}catch(e){return{}}}(),f_={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(u_=!1,(l_=d("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===l_.xanthophyll&&(u_=!0),u_)},m_=Ml.charAt,v_=ce,g_=ve,b_=Math.floor,__=v_("".charAt),y_=v_("".replace),w_=v_("".slice),k_=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,A_=/\$([$&'`]|\d{1,2})/g,E_=mc,x_=bt,S_=ce,R_=Hb,D_=re,T_=mt,O_=Ze,C_=ue,I_=Qr,P_=Xr,L_=Bs,U_=pe,M_=function(e,t,n){return t+(n?m_(e,t).length:1)},j_=Mt,B_=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,d=A_;return void 0!==i&&(i=g_(i),d=k_),y_(a,d,(function(a,d){var c;switch(__(d,0)){case"$":return"$";case"&":return e;case"`":return w_(t,0,n);case"'":return w_(t,s);case"<":c=i[w_(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>o){var l=b_(u/10);return 0===l?a:l<=o?void 0===r[l-1]?__(d,1):r[l-1]+__(d,1):a}c=r[u-1]}return void 0===c?"":c}))},N_=Zb,G_=Ke("replace"),F_=Math.max,q_=Math.min,V_=S_([].concat),z_=S_([].push),H_=S_("".indexOf),W_=S_("".slice),K_="$0"==="a".replace(/./,"$0"),$_=!!/./[G_]&&""===/./[G_]("a","$0");R_("replace",(function(e,t,n){var r=$_?"$":"$0";return[function(e,n){var r=U_(this),i=C_(e)?void 0:j_(e,G_);return i?x_(i,e,r,n):x_(t,L_(r),e,n)},function(e,i){var a=T_(this),s=L_(e);if("string"==typeof i&&-1===H_(i,r)&&-1===H_(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var d=O_(i);d||(i=L_(i));var c,u=a.global;u&&(c=a.unicode,a.lastIndex=0);for(var l,h=[];null!==(l=N_(a,s))&&(z_(h,l),u);){""===L_(l[0])&&(a.lastIndex=M_(s,P_(a.lastIndex),c))}for(var p,f="",m=0,v=0;v<h.length;v++){for(var g,b=L_((l=h[v])[0]),_=F_(q_(I_(l.index),s.length),0),y=[],w=1;w<l.length;w++)z_(y,void 0===(p=l[w])?p:String(p));var k=l.groups;if(d){var A=V_([b],y,_,s);void 0!==k&&z_(A,k),g=L_(E_(i,void 0,A))}else g=B_(b,s,_,y,k,i);_>=m&&(f+=W_(s,m,_)+g,m=_+b.length)}return f+W_(s,m)}]}),!!D_((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!K_||$_);var Q_=re,J_=tt,Y_=Ke("iterator"),X_=!Q_((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),n.delete("a",2),n.delete("b",void 0),!t.size&&!J_||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Y_]||"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"!==r||"x"!==new URL("http://x",void 0).host})),Z_=vr,ey=vo,ty=Math.floor,ny=function(e,t){var n=e.length,r=ty(n/2);return n<8?ry(e,t):iy(e,ny(ey(e,0,r),t),ny(ey(e,r),t),t)},ry=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},iy=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},ay=Xa,sy=W,oy=bt,dy=ce,cy=tt,uy=X_,ly=vr,hy=Eo,py=function(e,t,n){for(var r in t)Z_(e,r,t[r],n);return e},fy=No,my=oh,vy=$n,gy=Cf,by=Ze,_y=_e,yy=Gr,wy=Rr,ky=mt,Ay=it,Ey=Bs,xy=co,Sy=Sn,Ry=sl,Dy=Zu,Ty=jh,Oy=Ff,Cy=ny,Iy=Ke("iterator"),Py="URLSearchParams",Ly=Py+"Iterator",Uy=vy.set,My=vy.getterFor(Py),jy=vy.getterFor(Ly),By=Object.getOwnPropertyDescriptor,Ny=function(e){if(!cy)return sy[e];var t=By(sy,e);return t&&t.value},Gy=Ny("fetch"),Fy=Ny("Request"),qy=Ny("Headers"),Vy=Fy&&Fy.prototype,zy=qy&&qy.prototype,Hy=sy.RegExp,Wy=sy.TypeError,Ky=sy.decodeURIComponent,$y=sy.encodeURIComponent,Qy=dy("".charAt),Jy=dy([].join),Yy=dy([].push),Xy=dy("".replace),Zy=dy([].shift),ew=dy([].splice),tw=dy("".split),nw=dy("".slice),rw=/\+/g,iw=Array(4),aw=function(e){return iw[e-1]||(iw[e-1]=Hy("((?:%[\\da-f]{2}){"+e+"})","gi"))},sw=function(e){try{return Ky(e)}catch(t){return e}},ow=function(e){var t=Xy(e,rw," "),n=4;try{return Ky(t)}catch(e){for(;n;)t=Xy(t,aw(n--),sw);return t}},dw=/[!'()~]|%20/g,cw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},uw=function(e){return cw[e]},lw=function(e){return Xy($y(e),dw,uw)},hw=my((function(e,t){Uy(this,{type:Ly,target:My(e).entries,index:0,kind:t})}),Py,(function(){var e=jy(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Ty(void 0,!0);var r=t[n];switch(e.kind){case"keys":return Ty(r.key,!1);case"values":return Ty(r.value,!1)}return Ty([r.key,r.value],!1)}),!0),pw=function(e){this.entries=[],this.url=null,void 0!==e&&(Ay(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Qy(e,0)?nw(e,1):e:Ey(e)))};pw.prototype={type:Py,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,d=this.entries,c=Dy(e);if(c)for(n=(t=Ry(e,c)).next;!(r=oy(n,t)).done;){if(a=(i=Ry(ky(r.value))).next,(s=oy(a,i)).done||(o=oy(a,i)).done||!oy(a,i).done)throw new Wy("Expected sequence with length 2");Yy(d,{key:Ey(s.value),value:Ey(o.value)})}else for(var u in e)_y(e,u)&&Yy(d,{key:u,value:Ey(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,i=tw(e,"&"),a=0;a<i.length;)(t=i[a++]).length&&(n=tw(t,"="),Yy(r,{key:ow(Zy(n)),value:ow(Jy(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Yy(n,lw(e.key)+"="+lw(e.value));return Jy(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var fw=function(){gy(this,mw);var e=Uy(this,new pw(arguments.length>0?arguments[0]:void 0));cy||(this.size=e.entries.length)},mw=fw.prototype;if(py(mw,{append:function(e,t){var n=My(this);Oy(arguments.length,2),Yy(n.entries,{key:Ey(e),value:Ey(t)}),cy||this.length++,n.updateURL()},delete:function(e){for(var t=My(this),n=Oy(arguments.length,1),r=t.entries,i=Ey(e),a=n<2?void 0:arguments[1],s=void 0===a?a:Ey(a),o=0;o<r.length;){var d=r[o];if(d.key!==i||void 0!==s&&d.value!==s)o++;else if(ew(r,o,1),void 0!==s)break}cy||(this.size=r.length),t.updateURL()},get:function(e){var t=My(this).entries;Oy(arguments.length,1);for(var n=Ey(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=My(this).entries;Oy(arguments.length,1);for(var n=Ey(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Yy(r,t[i].value);return r},has:function(e){for(var t=My(this).entries,n=Oy(arguments.length,1),r=Ey(e),i=n<2?void 0:arguments[1],a=void 0===i?i:Ey(i),s=0;s<t.length;){var o=t[s++];if(o.key===r&&(void 0===a||o.value===a))return!0}return!1},set:function(e,t){var n=My(this);Oy(arguments.length,1);for(var r,i=n.entries,a=!1,s=Ey(e),o=Ey(t),d=0;d<i.length;d++)(r=i[d]).key===s&&(a?ew(i,d--,1):(a=!0,r.value=o));a||Yy(i,{key:s,value:o}),cy||(this.size=i.length),n.updateURL()},sort:function(){var e=My(this);Cy(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=yy(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 hw(this,"keys")},values:function(){return new hw(this,"values")},entries:function(){return new hw(this,"entries")}},{enumerable:!0}),ly(mw,Iy,mw.entries,{name:"entries"}),ly(mw,"toString",(function(){return My(this).serialize()}),{enumerable:!0}),cy&&hy(mw,"size",{get:function(){return My(this).entries.length},configurable:!0,enumerable:!0}),fy(fw,Py),ay({global:!0,constructor:!0,forced:!uy},{URLSearchParams:fw}),!uy&&by(qy)){var vw=dy(zy.has),gw=dy(zy.set),bw=function(e){if(Ay(e)){var t,n=e.body;if(wy(n)===Py)return t=e.headers?new qy(e.headers):new qy,vw(t,"content-type")||gw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),xy(e,{body:Sy(0,Ey(n)),headers:Sy(0,t)})}return e};if(by(Gy)&&ay({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Gy(e,arguments.length>1?bw(arguments[1]):{})}}),by(Fy)){var _w=function(e){return gy(this,Vy),new Fy(e,arguments.length>1?bw(arguments[1]):{})};Vy.constructor=_w,_w.prototype=Vy,ay({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:_w})}}var yw={URLSearchParams:fw,getState:My},ww=fa.includes,kw=$p;Xa({target:"Array",proto:!0,forced:re((function(){return!Array(1).includes()}))},{includes:function(e){return ww(this,e,arguments.length>1?arguments[1]:void 0)}}),kw("includes");var Aw=Xa,Ew=kb,xw=pe,Sw=Bs,Rw=Eb,Dw=ce("".indexOf);function Tw(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 d(e){return L(r,e)}function c(e,t){return U(r,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O(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=decodeURIComponent(s),I.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){c("depth.error",e.message)}c("depth.value",e)}(),function(){var e=i,t=r.depth.value,n=s;if(c("top.domain.from","fallback"),e&&e.length>0)n=e[e.length-1],c("top.domain.from","origins");else if(0===t)n=s,c("top.domain.from","self-top");else if(1===t){var a=u(o);a&&(n=a.origin,c("top.domain.from","referrer"))}c("top.domain.value",n.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(P(e))c("partner.domain.value",e),c("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)c("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),c("partner.domain.from","partner-url");else c("partner.domain.value",r.top.domain.value),c("partner.domain.from","partner-fallback")}else c("partner.domain.value",r.top.domain.value),c("partner.domain.from","fallback")}(),e=l(),0===r.depth.value?(c("partner.url.value",a),c("partner.url.from","self-top")):e?P(e)?(c("partner.url.value",a),c("partner.url.from","partner-domain")):(c("partner.url.value",e),c("partner.url.from","partner-url")):(c("partner.url.value",o),c("partner.url.from","fallback"))}.bind(this)(),{get:d,print:function(e){console.log(d(e))}}}Aw({target:"String",proto:!0,forced:!Rw("includes")},{includes:function(e){return!!~Dw(Sw(xw(this)),Sw(Ew(e)),arguments.length>1?arguments[1]:void 0)}});var Ow="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||"undefined"!=typeof global&&global||{},Cw="URLSearchParams"in Ow,Iw="Symbol"in Ow&&"iterator"in Symbol,Pw="FileReader"in Ow&&"Blob"in Ow&&function(){try{return new Blob,!0}catch(e){return!1}}(),Lw="FormData"in Ow,Uw="ArrayBuffer"in Ow;if(Uw)var Mw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],jw=ArrayBuffer.isView||function(e){return e&&Mw.indexOf(Object.prototype.toString.call(e))>-1};function Bw(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 Nw(e){return"string"!=typeof e&&(e=String(e)),e}function Gw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Iw&&(t[Symbol.iterator]=function(){return t}),t}function Fw(e){this.map={},e instanceof Fw?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function qw(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function Vw(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function zw(e){var t=new FileReader,n=Vw(t);return t.readAsArrayBuffer(e),n}function Hw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Ww(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Pw&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Lw&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Cw&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Uw&&Pw&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Hw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Uw&&(ArrayBuffer.prototype.isPrototypeOf(e)||jw(e))?this._bodyArrayBuffer=Hw(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,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):Cw&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Pw&&(this.blob=function(){var e=qw(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=qw(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))}if(Pw)return this.blob().then(zw);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e=qw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Vw(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),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)},Lw&&(this.formData=function(){return this.text().then(Qw)}),this.json=function(){return this.text().then(JSON.parse)},this}Fw.prototype.append=function(e,t){e=Bw(e),t=Nw(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Fw.prototype.delete=function(e){delete this.map[Bw(e)]},Fw.prototype.get=function(e){return e=Bw(e),this.has(e)?this.map[e]:null},Fw.prototype.has=function(e){return this.map.hasOwnProperty(Bw(e))},Fw.prototype.set=function(e,t){this.map[Bw(e)]=Nw(t)},Fw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Fw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Gw(e)},Fw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Gw(e)},Fw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Gw(e)},Iw&&(Fw.prototype[Symbol.iterator]=Fw.prototype.entries);var Kw=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];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.');var n=(t=t||{}).body;if(e instanceof $w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Fw(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 Fw(t.headers)),this.method=function(e){var t=e.toUpperCase();return Kw.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Ow)return(new AbortController).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 Qw(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 Jw(e,t){if(!(this instanceof Jw))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Fw(t.headers),this.url=t.url||"",this._initBody(e)}$w.prototype.clone=function(){return new $w(this,{body:this._bodyInit})},Ww.call($w.prototype),Ww.call(Jw.prototype),Jw.prototype.clone=function(){return new Jw(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Fw(this.headers),url:this.url})},Jw.error=function(){var e=new Jw(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var Yw=[301,302,303,307,308];Jw.redirect=function(e,t){if(-1===Yw.indexOf(t))throw new RangeError("Invalid status code");return new Jw(null,{status:t,headers:{location:e}})};var Xw,Zw=Ow.DOMException;try{new Zw}catch(e){Zw=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Zw.prototype=Object.create(Error.prototype),Zw.prototype.constructor=Zw}function ek(e,t){return new Promise((function(n,r){var i=new $w(e,t);if(i.signal&&i.signal.aborted)return r(new Zw("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}if(a.onload=function(){var e,t,r={statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Fw,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();try{t.append(r,i)}catch(e){console.warn("Response "+e.message)}}})),t)};i.url.startsWith("file://")&&(a.status<200||a.status>599)?r.status=200:r.status=a.status,r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var s="response"in a?a.response:a.responseText;setTimeout((function(){n(new Jw(s,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request timed out"))}),0)},a.onabort=function(){setTimeout((function(){r(new Zw("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Ow.location.href?Ow.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&&(Pw?a.responseType="blob":Uw&&(a.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof Fw||Ow.Headers&&t.headers instanceof Ow.Headers)){var o=[];Object.getOwnPropertyNames(t.headers).forEach((function(e){o.push(Bw(e)),a.setRequestHeader(e,Nw(t.headers[e]))})),i.headers.forEach((function(e,t){-1===o.indexOf(t)&&a.setRequestHeader(t,e)}))}else i.headers.forEach((function(e,t){a.setRequestHeader(t,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)}))}ek.polyfill=!0,Ow.fetch||(Ow.fetch=ek,Ow.Headers=Fw,Ow.Request=$w,Ow.Response=Jw);var tk=function(e){var n=this;if(!Xw){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:p_.topDomain,domain:p_.parentDomain,referrer:p_.parentURL,depth:o(),version:Os.version,byloader:p_.isTokenGameURL,isTokenGameURL:p_.isTokenGameURL,isMasterGameURL:p_.isMasterGameURL,isExtHostedGameURL:p_.isExtHostedGameURL,byloaderVersion:p_.version,tracking:f_.userDeclinedTracking,whitelabel:f_.whitelabelPartner,platform:u()};Xw=new l(r)}return Xw||{send:function(){t(this,n)}.bind(this)}},nk={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){}}},rk={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},ik={gameAPI:"game.api.gamedistribution.com"},ak={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},sk=function(){var e=this,n=rk.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?ak:ik}},ok=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 dk(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 ck(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dk(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var uk,lk,hk,pk=new j,fk=[],mk=function(e){fk.push(e)},vk=function(e){uk=tk(hk=e)},gk=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(lk){e.next=6;break}return e.next=3,yk(hk);case 3:lk=e.sent,pk.emit("game-data-ready",lk),bk();case 6:return e.abrupt("return",lk);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),bk=function(){var t;if(null!==(t=lk)&&void 0!==t&&null!==(t=t.aws_tst)&&void 0!==t&&t.enabled){var n,i,a;if(_k(),null!==(n=lk)&&void 0!==n&&null!==(n=n.aws_tst)&&void 0!==n&&null!==(n=n.ep)&&void 0!==n&&n.api&&null!==(i=lk)&&void 0!==i&&i.url)nk.getGameData(null===(a=lk)||void 0===a?void 0:a.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,yk(hk);case 3:lk=e.sent,null===(t=lk)||void 0===t||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)}},_k=function(){var n=window.fetch;window.fetch=e(r.mark((function e(){var i,a,s,o,d,c,u,l,h,p,f,m,v,g=this,b=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(s=b.length,o=new Array(s),d=0;d<s;d++)o[d]=b[d];c=o[0],u=o[1],l=null===(i=lk)||void 0===i||null===(i=i.aws_tst)||void 0===i||null===(i=i.ep)||void 0===i?void 0:i.atm,h=null===(a=lk)||void 0===a||null===(a=a.aws_tst)||void 0===a||null===(a=a.ep)||void 0===a?void 0:a.msgrt,p=function(e,r){var i=this;t(this,g);var a=c.replace(e,r);n(a,u).then(function(){t(this,i)}.bind(this))}.bind(this);try{l&&c.indexOf("tag.atom")>0&&p("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),h&&c.indexOf("msgrt.gamedistribution.com")>0&&(null===(f=lk)||void 0===f||f.aws_tst,null===(m=lk)||void 0===m||null===(m=m.aws_tst)||void 0===m||null===(m=m.ep)||void 0===m||m.msgrt,p("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(c,u);case 9:return v=e.sent,e.abrupt("return",v);case 11:case"end":return e.stop()}}),e,this)})))},yk=function(n){var i=this;uk.send("gdfw.loading",{message:"loading"}),fk=[],mk("1"),mk("2");var a=new Tw;mk("3");var s=a.get("partner.domain.value");mk("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);mk("5");var d=function(){t(this,i);var e=c(),r=e?"&mode=".concat(e):"",a=sk().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(Os.version,"&localTime=").concat((new Date).getHours())}.bind(this);mk("6");var c=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 mk("7"),new Promise(function(n){var a=this;t(this,i),mk("7.1");var s=o();try{mk("7.2");var c=d();mk("7.3"),fetch(c).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 mk("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),e.t0,e.next=12,ok({url:c});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),mk("7.5"),e.success){var i,o,d=e.result.game;mk("7.6");var u={company:d.company,gameId:d.gameMd5,slug:d.slug,pname:d.pname,dname:d.dname,status:d.status,activeStatus:d.activeStatus,description:d.description,disableAds:d.enableAds,preroll:d.preRoll,midroll:6e4*d.timeAds,rewardedAds:d.rewardedAds,title:d.title,publishedAt:d.publishedAt,tags:d.tags,category:d.category,assets:d.assets,disp_2nd_prer:d.disp_2nd_prer,ctry_vst:d.ctry_vst,ctry:d.ctry,crtv:d.crtv,dmain:d.dmain,aws_tst:d.aws_tst,meta:d.meta,adspn:Cs(d.adspn)||{},__t4r:Cs(d.__t4r)||{},block_exts:Cs(d.push_cuda),bloc_gard:Cs(d.bloc_gard),cookie:Cs(d.cookie),gdpr:Cs(d.gdpr),diagnostic:Cs(d.diagnostic),cmp:Cs(d.cmp),gft:Cs(d.gft)||{},sdk:Cs(d.sdk)||{},sdkfw:Cs(d.sdkfw)||{},loader:Cs(d.loader)||{},splash:Cs(d.splash)||{},promo:Cs(d.promo)||{},dAds:Cs(d.dads)||{},pAds:Cs(d.pads)||{},mAds:Cs(d.mads)||{},rAds:Cs(d.rads)||{},lp:Cs(d.lp)||{},extsc:Cs(d.extsc)||{},evnts:Cs(d.evnts)||{},dp:Cs(d.dp)||{},adflw:Cs(d.adflw)||{},afgszf:Cs(d.afgszf)||{},fllc:Cs(d.fllc)||{},lotm:Cs(d.lotm)||{},t4rc:Cs(d.t4rc)||{},midroll_plus:Cs(d.midroll_plus)||{},gmky:Cs(d.gmky)||{},urlBlockExc:Cs(d.url_blck_exc)||{},sdk_wrp:Cs(d.sdk_wrp)||{},dbglg:Cs(d.dbglg)||{},extHosting:Cs(d.ext_hosting)||{},directTokenUse:Cs(d.dtu)||{},aeria:Cs(d.aeria)||{},advlm:Cs(d.advlm)||{},ad_blcks:Cs(d.ad_blcks)||{},rmblck:Cs(d.rmblck)||{}};mk("7.7");var l=h(M(s),u);mk("7.8"),l.afg_disabled=!1===(null===(i=l.sdk)||void 0===i||null===(i=i.afg)||void 0===i?void 0:i.enabled),l.url=c,function(){t(this,r),void 0!==Us.afgEnabled&&(l.afg_disabled=!Us.afgEnabled),void 0!==Us.promoEnabled&&(l.promo=l.promo||{},l.promo=ck(ck({},l.promo),{},{rainbow:{enabled:Us.promoEnabled}}))}.bind(this),mk("7.9"),null!==(o=l.pAds)&&void 0!==o&&o.enabled&&(l.preroll=!0),mk("7.10"),uk.send("gdfw.success",{message:"success"}),n(l)}else{s.failed=!0;var p=fk[fk.length-1];uk.send("gdfw.err",{message:"".concat(p,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=fk[fk.length-1];uk.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=fk[fk.length-1];uk.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},wk=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,gk();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)}}(),kk=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,gk();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)}}(),Ak=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,gk();case 2:return n=e.sent,e.next=5,wk();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)}}(),Ek=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d,c;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gk();case 2:return d=e.sent,c=!(null==d||null===(t=d.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:c,path:c?null==d||null===(n=d.extsc)||void 0===n?void 0:n.path:"",name:c?null==d||null===(i=d.extsc)||void 0===i?void 0:i.name:"",ref:c?null==d||null===(a=d.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:c?null==d||null===(s=d.extsc)||void 0===s?void 0:s.loadedFlag:void 0,loadedFlagCheck:!!c&&!(null==d||null===(o=d.extsc)||void 0===o||!o.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),xk=function(){var n=e(r.mark((function e(){var n,i,a,s,o,d=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ek();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,d),!!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)}}(),Sk=!1,Rk=!1,Dk=function(){return new Promise(function(){var n=e(r.mark((function e(n,i){var a,s,o,d,c,u=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Sk){e.next=4;break}return e.abrupt("return",n(Rk));case 4:Sk=!0;case 5:return e.next=7,Ek();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 Rk=!0,e.abrupt("return",n(!0));case 16:d=!0,setTimeout(function(){t(this,u),d&&(d=!1,Sk=!0,n(!1))}.bind(this),5e3),c=setInterval(function(){t(this,u),d&&o&&window[s]?(d=!1,Sk=!0,Rk=!0,clearInterval(c),n(!0)):d||clearInterval(c)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(e,t){return n.apply(this,arguments)}}())},Tk=Xa,Ok=zm,Ck=re,Ik=wt,Pk=Ze,Lk=Nf,Uk=Wg,Mk=vr,jk=Ok&&Ok.prototype;if(Tk({target:"Promise",proto:!0,real:!0,forced:!!Ok&&Ck((function(){jk.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Lk(this,Ik("Promise")),n=Pk(e);return this.then(n?function(n){return Uk(t,e()).then((function(){return n}))}:e,n?function(n){return Uk(t,e()).then((function(){throw n}))}:e)}}),Pk(Ok)){var Bk=Ik("Promise").prototype.finally;jk.finally!==Bk&&Mk(jk,"finally",Bk,{unsafe:!0})}var Nk="\t\n\v\f\r                 \u2028\u2029\ufeff",Gk=pe,Fk=Bs,qk=Nk,Vk=ce("".replace),zk=RegExp("^["+qk+"]+"),Hk=RegExp("(^|[^"+qk+"])["+qk+"]+$"),Wk=function(e){return function(t){var n=Fk(Gk(t));return 1&e&&(n=Vk(n,zk,"")),2&e&&(n=Vk(n,Hk,"$1")),n}},Kk={start:Wk(1),end:Wk(2),trim:Wk(3)},$k=mn.PROPER,Qk=re,Jk=Nk,Yk=Kk.trim;Xa({target:"String",proto:!0,forced:function(e){return Qk((function(){return!!Jk[e]()||"​…᠎"!=="​…᠎"[e]()||$k&&Jk[e].name!==e}))}("trim")},{trim:function(){return Yk(this)}});var Xk=Xa,Zk=Ci.find,eA=$p,tA="find",nA=!0;tA in[]&&Array(1)[tA]((function(){nA=!1})),Xk({target:"Array",proto:!0,forced:nA},{find:function(e){return Zk(this,e,arguments.length>1?arguments[1]:void 0)}}),eA(tA);var rA=Ze,iA=it,aA=vh,sA=et.f,oA=tt,dA=W,cA=ce,uA=za,lA=function(e,t,n){var r,i;return aA&&rA(r=t.constructor)&&r!==n&&iA(i=r.prototype)&&i!==n.prototype&&aA(e,i),e},hA=Tn,pA=co,fA=aa.f,mA=kt,vA=_b,gA=Bs,bA=Su,_A=Jh,yA=function(e,t,n){n in e||sA(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},wA=vr,kA=re,AA=_e,EA=$n.enforce,xA=Df,SA=Zh,RA=np,DA=Ke("match"),TA=dA.RegExp,OA=TA.prototype,CA=dA.SyntaxError,IA=cA(OA.exec),PA=cA("".charAt),LA=cA("".replace),UA=cA("".indexOf),MA=cA("".slice),jA=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,BA=/a/g,NA=/a/g,GA=new TA(BA)!==BA,FA=_A.MISSED_STICKY,qA=_A.UNSUPPORTED_Y,VA=oA&&(!GA||FA||SA||RA||kA((function(){return NA[DA]=!1,TA(BA)!==BA||TA(NA)===NA||"/a/i"!==String(TA(BA,"i"))})));if(uA("RegExp",VA)){for(var zA=function(e,t){var n,r,i,a,s,o,d=mA(OA,this),c=vA(e),u=void 0===t,l=[],h=e;if(!d&&c&&u&&e.constructor===zA)return e;if((c||mA(OA,e))&&(e=e.source,u&&(t=bA(h))),e=void 0===e?"":gA(e),t=void 0===t?"":gA(t),h=e,SA&&"dotAll"in BA&&(r=!!t&&UA(t,"s")>-1)&&(t=LA(t,/s/g,"")),n=t,FA&&"sticky"in BA&&(i=!!t&&UA(t,"y")>-1)&&qA&&(t=LA(t,/y/g,"")),RA&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s=pA(null),o=!1,d=!1,c=0,u="";r<=n;r++){if("\\"===(t=PA(e,r)))t+=PA(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:IA(jA,MA(e,r+1))&&(r+=2,d=!0),i+=t,c++;continue;case">"===t&&d:if(""===u||AA(s,u))throw new CA("Invalid capture group name");s[u]=!0,a[a.length]=[u,c],d=!1,u="";continue}d?u+=t:i+=t}return[i,a]}(e),e=a[0],l=a[1]),s=lA(TA(e,t),d?this:OA,zA),(r||i||l.length)&&(o=EA(s),r&&(o.dotAll=!0,o.raw=zA(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=PA(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+PA(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{hA(s,"source",""===h?"(?:)":h)}catch(e){}return s},HA=fA(TA),WA=0;HA.length>WA;)yA(zA,TA,HA[WA++]);OA.constructor=zA,zA.prototype=OA,wA(dA,"RegExp",zA,{constructor:!0})}xA("RegExp");var KA=Xa,$A=Hr,QA=Qi,JA=Pi,YA=ce([].join);KA({target:"Array",proto:!0,forced:$A!==Object||!JA("join",",")},{join:function(e){return YA(QA(this),void 0===e?",":e)}});var XA=Ci.map;Xa({target:"Array",proto:!0,forced:!hs("map")},{map:function(e){return XA(this,e,arguments.length>1?arguments[1]:void 0)}});var ZA=tt,eE=ce,tE=bt,nE=re,rE=ts,iE=Ea,aE=Vi,sE=ve,oE=Hr,dE=Object.assign,cE=Object.defineProperty,uE=eE([].concat),lE=!dE||nE((function(){if(ZA&&1!==dE({b:1},dE(cE({},"a",{enumerable:!0,get:function(){cE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!==dE({},e)[n]||rE(dE({},t)).join("")!==r}))?function(e,t){for(var n=sE(e),r=arguments.length,i=1,a=iE.f,s=aE.f;r>i;)for(var o,d=oE(arguments[i++]),c=a?uE(rE(d),a(d)):rE(d),u=c.length,l=0;u>l;)o=c[l++],ZA&&!tE(s,d,o)||(n[o]=d[o]);return n}:dE,hE=lE;Xa({target:"Object",stat:!0,arity:2,forced:Object.assign!==hE},{assign:hE});var pE,fE=ce,mE=2147483647,vE=/[^\0-\u007E]/,gE=/[.\u3002\uFF0E\uFF61]/g,bE="Overflow: input needs wider integers to process",_E=RangeError,yE=fE(gE.exec),wE=Math.floor,kE=String.fromCharCode,AE=fE("".charCodeAt),EE=fE([].join),xE=fE([].push),SE=fE("".replace),RE=fE("".split),DE=fE("".toLowerCase),TE=function(e){return e+22+75*(e<26)},OE=function(e,t,n){var r=0;for(e=n?wE(e/700):e>>1,e+=wE(e/t);e>455;)e=wE(e/35),r+=36;return wE(r+36*e/(e+38))},CE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=AE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=AE(e,n++);56320==(64512&a)?xE(t,((1023&i)<<10)+(1023&a)+65536):(xE(t,i),n--)}else xE(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&&xE(t,kE(r));var d=t.length,c=d;for(d&&xE(t,"-");c<i;){var u=mE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=c+1;if(u-a>wE((mE-s)/l))throw new _E(bE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>mE)throw new _E(bE);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,v=36-f;xE(t,kE(TE(f+m%v))),h=wE(m/v),p+=36}xE(t,kE(TE(h))),o=OE(s,l,c===d),s=0,c++}}s++,a++}return EE(t,"")},IE=Xa,PE=tt,LE=X_,UE=W,ME=Gr,jE=ce,BE=vr,NE=Eo,GE=Cf,FE=_e,qE=lE,VE=bl,zE=vo,HE=Ml.codeAt,WE=function(e){var t,n,r=[],i=RE(SE(DE(e),gE,"."),".");for(t=0;t<i.length;t++)n=i[t],xE(r,yE(vE,n)?"xn--"+CE(n):n);return EE(r,".")},KE=Bs,$E=No,QE=Ff,JE=yw,YE=$n,XE=YE.set,ZE=YE.getterFor("URL"),ex=JE.URLSearchParams,tx=JE.getState,nx=UE.URL,rx=UE.TypeError,ix=UE.parseInt,ax=Math.floor,sx=Math.pow,ox=jE("".charAt),dx=jE(/./.exec),cx=jE([].join),ux=jE(1..toString),lx=jE([].pop),hx=jE([].push),px=jE("".replace),fx=jE([].shift),mx=jE("".split),vx=jE("".slice),gx=jE("".toLowerCase),bx=jE([].unshift),_x="Invalid scheme",yx="Invalid host",wx="Invalid port",kx=/[a-z]/i,Ax=/[\d+-.a-z]/i,Ex=/\d/,xx=/^0x/i,Sx=/^[0-7]+$/,Rx=/^\d+$/,Dx=/^[\da-f]+$/i,Tx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ox=/[\0\t\n\r #/:<>?@[\\\]^|]/,Cx=/^[\u0000-\u0020]+/,Ix=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Px=/[\t\n\r]/g,Lx=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)bx(t,e%256),e=ax(e/256);return cx(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+=ux(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Ux={},Mx=qE({},Ux,{" ":1,'"':1,"<":1,">":1,"`":1}),jx=qE({},Mx,{"#":1,"?":1,"{":1,"}":1}),Bx=qE({},jx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Nx=function(e,t){var n=HE(e,0);return n>32&&n<127&&!FE(t,e)?e:encodeURIComponent(e)},Gx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Fx=function(e,t){var n;return 2===e.length&&dx(kx,ox(e,0))&&(":"===(n=ox(e,1))||!t&&"|"===n)},qx=function(e){var t;return e.length>1&&Fx(vx(e,0,2))&&(2===e.length||"/"===(t=ox(e,2))||"\\"===t||"?"===t||"#"===t)},Vx=function(e){return"."===e||"%2e"===gx(e)},zx={},Hx={},Wx={},Kx={},$x={},Qx={},Jx={},Yx={},Xx={},Zx={},eS={},tS={},nS={},rS={},iS={},aS={},sS={},oS={},dS={},cS={},uS={},lS=function(e,t,n){var r,i,a,s=KE(e);if(t){if(i=this.parse(s))throw new rx(i);this.searchParams=null}else{if(void 0!==n&&(r=new lS(n,!0)),i=this.parse(s,null,r))throw new rx(i);(a=tx(new ex)).bindURL(this),this.searchParams=a}};lS.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,d=this,c=t||zx,u=0,l="",h=!1,p=!1,f=!1;for(e=KE(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=px(e,Cx,""),e=px(e,Ix,"$1")),e=px(e,Px,""),r=VE(e);u<=r.length;){switch(i=r[u],c){case zx:if(!i||!dx(kx,i)){if(t)return _x;c=Wx;continue}l+=gx(i),c=Hx;break;case Hx:if(i&&(dx(Ax,i)||"+"===i||"-"===i||"."===i))l+=gx(i);else{if(":"!==i){if(t)return _x;l="",c=Wx,u=0;continue}if(t&&(d.isSpecial()!==FE(Gx,l)||"file"===l&&(d.includesCredentials()||null!==d.port)||"file"===d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Gx[d.scheme]===d.port&&(d.port=null));l="","file"===d.scheme?c=rS:d.isSpecial()&&n&&n.scheme===d.scheme?c=Kx:d.isSpecial()?c=Yx:"/"===r[u+1]?(c=$x,u++):(d.cannotBeABaseURL=!0,hx(d.path,""),c=dS)}break;case Wx:if(!n||n.cannotBeABaseURL&&"#"!==i)return _x;if(n.cannotBeABaseURL&&"#"===i){d.scheme=n.scheme,d.path=zE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,c=uS;break}c="file"===n.scheme?rS:Qx;continue;case Kx:if("/"!==i||"/"!==r[u+1]){c=Qx;continue}c=Xx,u++;break;case $x:if("/"===i){c=Zx;break}c=oS;continue;case Qx:if(d.scheme=n.scheme,i===pE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query=n.query;else if("/"===i||"\\"===i&&d.isSpecial())c=Jx;else if("?"===i)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query="",c=cS;else{if("#"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.path.length--,c=oS;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=zE(n.path),d.query=n.query,d.fragment="",c=uS}break;case Jx:if(!d.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,c=oS;continue}c=Zx}else c=Xx;break;case Yx:if(c=Xx,"/"!==i||"/"!==ox(l,u+1))continue;u++;break;case Xx:if("/"!==i&&"\\"!==i){c=Zx;continue}break;case Zx:if("@"===i){h&&(l="%40"+l),h=!0,a=VE(l);for(var m=0;m<a.length;m++){var v=a[m];if(":"!==v||f){var g=Nx(v,Bx);f?d.password+=g:d.username+=g}else f=!0}l=""}else if(i===pE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()){if(h&&""===l)return"Invalid authority";u-=VE(l).length+1,l="",c=eS}else l+=i;break;case eS:case tS:if(t&&"file"===d.scheme){c=aS;continue}if(":"!==i||p){if(i===pE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()){if(d.isSpecial()&&""===l)return yx;if(t&&""===l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",c=sS,t)return;continue}"["===i?p=!0:"]"===i&&(p=!1),l+=i}else{if(""===l)return yx;if(s=d.parseHost(l))return s;if(l="",c=nS,t===tS)return}break;case nS:if(!dx(Ex,i)){if(i===pE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()||t){if(""!==l){var b=ix(l,10);if(b>65535)return wx;d.port=d.isSpecial()&&b===Gx[d.scheme]?null:b,l=""}if(t)return;c=sS;continue}return wx}l+=i;break;case rS:if(d.scheme="file","/"===i||"\\"===i)c=iS;else{if(!n||"file"!==n.scheme){c=oS;continue}switch(i){case pE:d.host=n.host,d.path=zE(n.path),d.query=n.query;break;case"?":d.host=n.host,d.path=zE(n.path),d.query="",c=cS;break;case"#":d.host=n.host,d.path=zE(n.path),d.query=n.query,d.fragment="",c=uS;break;default:qx(cx(zE(r,u),""))||(d.host=n.host,d.path=zE(n.path),d.shortenPath()),c=oS;continue}}break;case iS:if("/"===i||"\\"===i){c=aS;break}n&&"file"===n.scheme&&!qx(cx(zE(r,u),""))&&(Fx(n.path[0],!0)?hx(d.path,n.path[0]):d.host=n.host),c=oS;continue;case aS:if(i===pE||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Fx(l))c=oS;else if(""===l){if(d.host="",t)return;c=sS}else{if(s=d.parseHost(l))return s;if("localhost"===d.host&&(d.host=""),t)return;l="",c=sS}continue}l+=i;break;case sS:if(d.isSpecial()){if(c=oS,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==pE&&(c=oS,"/"!==i))continue}else d.fragment="",c=uS;else d.query="",c=cS;break;case oS:if(i===pE||"/"===i||"\\"===i&&d.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(o=gx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"===i||"\\"===i&&d.isSpecial()||hx(d.path,"")):Vx(l)?"/"===i||"\\"===i&&d.isSpecial()||hx(d.path,""):("file"===d.scheme&&!d.path.length&&Fx(l)&&(d.host&&(d.host=""),l=ox(l,0)+":"),hx(d.path,l)),l="","file"===d.scheme&&(i===pE||"?"===i||"#"===i))for(;d.path.length>1&&""===d.path[0];)fx(d.path);"?"===i?(d.query="",c=cS):"#"===i&&(d.fragment="",c=uS)}else l+=Nx(i,jx);break;case dS:"?"===i?(d.query="",c=cS):"#"===i?(d.fragment="",c=uS):i!==pE&&(d.path[0]+=Nx(i,Ux));break;case cS:t||"#"!==i?i!==pE&&("'"===i&&d.isSpecial()?d.query+="%27":d.query+="#"===i?"%23":Nx(i,Ux)):(d.fragment="",c=uS);break;case uS:i!==pE&&(d.fragment+=Nx(i,Mx))}u++}},parseHost:function(e){var t,n,r;if("["===ox(e,0)){if("]"!==ox(e,e.length-1))return yx;if(t=function(e){var t,n,r,i,a,s,o,d=[0,0,0,0,0,0,0,0],c=0,u=null,l=0,h=function(){return ox(e,l)};if(":"===h()){if(":"!==ox(e,1))return;l+=2,u=++c}for(;h();){if(8===c)return;if(":"!==h()){for(t=n=0;n<4&&dx(Dx,h());)t=16*t+ix(h(),16),l++,n++;if("."===h()){if(0===n)return;if(l-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."===h()&&r<4))return;l++}if(!dx(Ex,h()))return;for(;dx(Ex,h());){if(a=ix(h(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;l++}d[c]=256*d[c]+i,2!=++r&&4!==r||c++}if(4!==r)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;d[c++]=t}else{if(null!==u)return;l++,u=++c}}if(null!==u)for(s=c-u,c=7;0!==c&&s>0;)o=d[c],d[c--]=d[u+s-1],d[u+--s]=o;else if(8!==c)return;return d}(vx(e,1,-1)),!t)return yx;this.host=t}else if(this.isSpecial()){if(e=WE(e),dx(Tx,e))return yx;if(t=function(e){var t,n,r,i,a,s,o,d=mx(e,".");if(d.length&&""===d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""===(i=d[r]))return e;if(a=10,i.length>1&&"0"===ox(i,0)&&(a=dx(xx,i)?16:8,i=vx(i,8===a?1:2)),""===i)s=0;else{if(!dx(10===a?Rx:8===a?Sx:Dx,i))return e;s=ix(i,a)}hx(n,s)}for(r=0;r<t;r++)if(s=n[r],r===t-1){if(s>=sx(256,5-t))return null}else if(s>255)return null;for(o=lx(n),r=0;r<n.length;r++)o+=n[r]*sx(256,3-r);return o}(e),null===t)return yx;this.host=t}else{if(dx(Ox,e))return yx;for(t="",n=VE(e),r=0;r<n.length;r++)t+=Nx(n[r],Ux);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return FE(Gx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Fx(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,d=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=n+(r?":"+r:"")+"@"),c+=Lx(i),null!==a&&(c+=":"+a)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+cx(s,"/"):"",null!==o&&(c+="?"+o),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw new rx(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new hS(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+Lx(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(KE(e)+":",zx)},getUsername:function(){return this.username},setUsername:function(e){var t=VE(KE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Nx(t[n],Bx)}},getPassword:function(){return this.password},setPassword:function(e){var t=VE(KE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Nx(t[n],Bx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Lx(e):Lx(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,eS)},getHostname:function(){var e=this.host;return null===e?"":Lx(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,tS)},getPort:function(){var e=this.port;return null===e?"":KE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=KE(e))?this.port=null:this.parse(e,nS))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+cx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,sS))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=KE(e))?this.query=null:("?"===ox(e,0)&&(e=vx(e,1)),this.query="",this.parse(e,cS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=KE(e))?("#"===ox(e,0)&&(e=vx(e,1)),this.fragment="",this.parse(e,uS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var hS=function(e){var t=GE(this,pS),n=QE(arguments.length,1)>1?arguments[1]:void 0,r=XE(t,new lS(e,!1,n));PE||(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())},pS=hS.prototype,fS=function(e,t){return{get:function(){return ZE(this)[e]()},set:t&&function(e){return ZE(this)[t](e)},configurable:!0,enumerable:!0}};if(PE&&(NE(pS,"href",fS("serialize","setHref")),NE(pS,"origin",fS("getOrigin")),NE(pS,"protocol",fS("getProtocol","setProtocol")),NE(pS,"username",fS("getUsername","setUsername")),NE(pS,"password",fS("getPassword","setPassword")),NE(pS,"host",fS("getHost","setHost")),NE(pS,"hostname",fS("getHostname","setHostname")),NE(pS,"port",fS("getPort","setPort")),NE(pS,"pathname",fS("getPathname","setPathname")),NE(pS,"search",fS("getSearch","setSearch")),NE(pS,"searchParams",fS("getSearchParams")),NE(pS,"hash",fS("getHash","setHash"))),BE(pS,"toJSON",(function(){return ZE(this).serialize()}),{enumerable:!0}),BE(pS,"toString",(function(){return ZE(this).serialize()}),{enumerable:!0}),nx){var mS=nx.createObjectURL,vS=nx.revokeObjectURL;mS&&BE(hS,"createObjectURL",ME(mS,nx)),vS&&BE(hS,"revokeObjectURL",ME(vS,nx))}$E(hS,"URL"),IE({global:!0,constructor:!0,forced:!LE,sham:!PE},{URL:hS});var gS=function(){function e(t){D(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return R(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 O(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}(),bS=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(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}(),_S=function(){function e(t,n){D(this,e),this.adContainer=t,this.onResume=n}return R(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}(),yS=function(){function e(t){D(this,e),this.adContainer=t}return R(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}(),wS=function(){function e(t){D(this,e),this.adContainer=t}return R(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}(),kS=function(e){if(!e)return!1;var t=AS.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)},AS=Object.prototype.toString;function ES(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 xS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ES(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ES(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SS(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 RS,DS="13998",TS="_cc".concat(DS),OS=["https://tags.crwdcntrl.net/c/".concat(DS,"/cc.js?ns=").concat(TS)],CS=function(){return!!RS&&"function"==typeof RS.bcpf&&"function"==typeof RS.add},IS=function(e,t){try{if(!CS())return;RS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},PS=function(e,t){try{if(!CS())return;RS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},LS=function(e){var n=this;try{IS("act","play"),IS("med","game"),"complete"===document.readyState?RS.bcpf():RS.bcp(),e.tags.forEach(function(e){t(this,n),PS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),PS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},US=function(){window.addEventListener("load",(function(){pk.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!=p_&&p_.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,wk();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(OS[0],"LOTCC_".concat(DS),{alternates:OS});case 16:"object"===n(window[TS])&&(RS=window[TS]),CS()&&LS(t),e.next=23;break;case 20:e.prev=20,e.t1=e.catch(1),e.t1;case 23:case"end":return e.stop()}}),e,null,[[1,20]])})));return function(e){return t.apply(this,arguments)}}())}))},MS=function(){PS("genp","ad video"),PS("act","ad impression")},jS=function(){PS("act","ad skipped")},BS=function(){PS("act","ad click")},NS=function(){PS("act","ad complete")},GS=new Tw,FS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},qS=function(e,n){var r=this,i=function(e,t){var n=GS.get("partner.url.value"),r=FS[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)},VS=(new Tw).get("partner.domain.value"),zS=["latimes.com"],HS={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&zS.some(function(e){return t(this,n),e===VS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return qS(n,e)}}[VS](e)}(e,t)}},WS=function(){var e=(new Tw).get("partner.url.value"),t=new O(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},KS=function(){function e(){D(this,e),this.adContainer=window.document.body}return R(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 d=document.createElement("div");d.id="gd__spinner__overlay",d.classList.add("gd__spinner__overlay"),d.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=d,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 $S(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 QS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$S(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var JS=new j,YS=null,XS=function(){function n(e,r,i){var a=this;if(D(this,n),YS)return YS;YS=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=w(),this.atom_display,this.adType_="",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,d=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:d,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,d,c,u,l,p,k,A,E,x,S,I,P,L,U,j,q,V,z,H,W;return R(n,[{key:"start",value:(W=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({adsense_channel:"4089988593"});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),Ls("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 W.apply(this,arguments)})},{key:"adSystemInitialize",value:(H=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 H.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:(z=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l,h,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(a=a.adapterConfig)||void 0===a?void 0:a.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,i);case 6:return d=e.sent,s?(this.gameData,c=s[o]||s.default||this._getDefaultSpilAdapterConfig()):c=this._getDefaultSpilAdapterConfig(),u=100*d.floor_price,d.floor_price,l=this._createCustomAdVastUrl(c,{tnl_keys:{floor_price:u}}),h=l.url,p={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",p);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 z.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,d,c,u,l,h,p,f,v=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")||WS().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],d=Math.floor(Math.random()*o.length),c=o[d],s({url:c,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=null!=i&&i.adTypeFound?null==i?void 0:i.adTypeFound:a.nextAdPosition(n),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&N(l.preroll)?l=l.preroll:"midroll"===u&&N(l.midroll)?l=l.midroll:"rewarded"===u&&N(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=19,window.idhb.isLoaded();case 19:return e.next=21,a._create_dp_context(u,i);case 21:p=e.sent,Ps("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(QS(QS({},f),{},{adaptor_order:i.adapterIndex})),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,v),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:QS(QS({},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=33;break;case 30:throw e.prev=30,e.t0=e.catch(10),new Error(e.t0);case 33:case"end":return e.stop()}}),e,this,[[10,30]])})));return function(e){return s.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===v.Rewarded)return this.adRewardedCount++,"rewarded";if(e===v.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===v.Rewarded?"rewarded":e===v.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===v.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===v.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,d=null==e||null===(s=e.tnl_keys)||void 0===s?void 0:s.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var c=new google.ima.AdsRequest,u=this._transformVast(e,n),l=QS(QS({},n),{},{adTag:u,tnl_ad_pos:d});this.adCounter[d]=this.adCounter[d]||0,this.adCounter[d]++;var h=e.dp,p=e.hl;this.current_dp=h,h&&!u.bidder&&(h.adtag_url=u.url);var f=this._isVMAP(d);(function(){t(this,a),n.shouldFail&&(h?(h.adtag_url="dp_original_broken",h.fallback_url="dp_fallback_broken"):u.url="original_broken",null==h||h.adtag_url,null==h||h.fallback_url,u.url)}).bind(this);var m=this._getExternalVast(null===(o=n)||void 0===o?void 0:o.adType);if(m)c.adTagUrl=m;else if(f){var v=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 O(e[a].adtag.url,!0);s.query=xS(xS({},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=xS(xS({},s.query),i)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var c,u,l,h;n+='<vmap:AdBreak timeOffset="start" breakType="linear" breakId="break-'.concat(d,'">\n <vmap:AdSource id="').concat(o++,'" allowMultipleAds="false" followRedirects="true">\n ').concat(SS({id:o++,adtag_url:t[d-1],error_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.error_url,impression_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.impression_url,fallback_url:null===(l=e[d-1].dp)||void 0===l?void 0:l.fallback_url,fallback_imp_url:null===(h=e[d-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(d)}));c.adsResponse=v}else if(h&&p.bidFloorApplied){h.adtag_url||(h.adtag_url=u.url);var g=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);c.adsResponse=g}else if(h&&h.fallback_url){var b=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);c.adsResponse=b}else c.adTagUrl=u.url;c.linearAdSlotWidth=this.options.width,c.linearAdSlotHeight=this.options.height,c.nonLinearAdSlotWidth=this.options.width,c.nonLinearAdSlotHeight=this.options.height,c.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(c.vastLoadTimeout=this.options.vast_load_timeout),c.setAdWillAutoPlay(n.autoplayAllowed),c.setAdWillPlayMuted(n.autoplayRequiresMute),this.adsLoader.requestAds(c,l);try{this._broadcast("AD_SDK_REQUEST",{message:l})}catch(e){}i(c)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=HS.exist(this.gameData)&&HS.get(n,this.gameData)}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:(V=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"),B.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 V.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:(j=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=QS(QS({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new KS,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!==v.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!==v.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!==v.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==v.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 j.apply(this,arguments)})},{key:"_startOpusAd",value:(U=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h,p,f,m,v,g,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.requestRunning){e.next=7;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error"}),e.abrupt("return");case 7:if(s=null===(i=window.gdlocus)||void 0===i?void 0:i.adBreak){e.next=11;break}return this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error"}),e.abrupt("return");case 11:o=void function(){return t(this,_),!0}.bind(this),this.requestRunning=!0,d=this.gameData,c=d.gameId,u=d.slug,l=d.title,h={assetId:c,slug:u,title:l,debug:o},p=function(e){t(this,_),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),f=function(e){t(this,_),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),m=function(){t(this,_),this.opusEventReceived=!0}.bind(this),v=function(){t(this,_),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),g=function(e){t(this,_),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.breakStatus,status:"error"})}.bind(this),console.log("opus-ad meta",h),b={type:a,meta:h,beforeAd:p,afterAd:f,adBreakDone:g},"reward"===a&&(b=QS(QS({},b),{},{adDismissed:m,adViewed:v})),this.opusEventReceived=!1,this._startTimeoutForOpus(),s&&s(b);case 27:case"end":return e.stop()}}),e,this)}))),function(e){return U.apply(this,arguments)})},{key:"preloadAd",value:(L=e(r.mark((function e(t){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==v.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==v.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 L.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,n=function(){t(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new bS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new _S(this.adContainer,n),this.rewardedLabel.add(),this.audioAdLabel=new yS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(P=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,d,c,u,l,h,p,f,m,v=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{(d=i?i.containerId:null)||s("Container id is not specified"),c=document.getElementById(d),document.getElementById(d)||s("No container is found with this id - ".concat(d)),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(d),document.getElementById(u)||(l="\n .gd__banner{\n z-index: ".concat(g.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\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)),c.appendChild(h)),(p=document.createElement("div")).id=u,p.classList.add("gd__banner"),c.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:[c.offsetWidth,c.offsetHeight]},window.idhb.requestAds({slots:m,callback:function(e){t(this,v),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 P.apply(this,arguments)})},{key:"_startInterstitialAd",value:(I=e(r.mark((function e(n){var i,a,s,o,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),Us.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(QS(QS({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.mode)&&this.adsManager.setVolume(1),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=29;break;case 24:throw e.prev=24,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 29:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e){return I.apply(this,arguments)})},{key:"_startPromo",value:(S=e(r.mark((function e(t,n){var i,a,s,o;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(QS(QS({},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:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.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=28;break;case 23:throw e.prev=23,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 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e,t){return S.apply(this,arguments)})},{key:"_loadPromo",value:(x=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,QS({adType:v.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 x.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(E=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(v.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,QS({adType:v.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 E.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:(A=e(r.mark((function e(n){var i,a,s,o,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),Us.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(QS(QS({},a),n));case 13:if(s=e.sent,o=s.success,s.args,o){e.next=18;break}return e.abrupt("return");case 18:a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(i=this.gameData.advlm)||void 0===i?void 0:i.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 24:throw e.prev=24,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,24]])}))),function(e){return A.apply(this,arguments)})},{key:"_loadRewardedAd",value:(k=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(v.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,QS({adType:v.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 k.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(p=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(v.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 p.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(l=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(v.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 l.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 d,c=(null===(d=this._adrequest_user_context)||void 0===d||null===(d=d.adTag)||void 0===d?void 0:d.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:c}),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 wS(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(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){if(a&&"click"===r){var u,l=null===(u=this._adrequest_user_context)||void 0===u?void 0:u.tnl_ad_pos;this.clickCount[l]++,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(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=g.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(),d=i.getFullYear(),c="AD_SDK_MANAGER_READY";this._broadcast(c,{name:c,message:"AD SDK is ready",status:"success",analytics:{category:c,action:this.parentDomain,label:"h".concat(a," d").concat(s," m").concat(o," y").concat(d)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var n,r,i=this,a=new Date,s=a.getHours(),o=a.getDate(),d=a.getMonth(),c=a.getFullYear(),u=b(google.ima.AdEvent.Type,e.type),l=!1,h=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",p=!h.startsWith("image")&&!h.startsWith("text"),f=null==e||null===(r=e.ad)||void 0===r||null===(r=r.data)||void 0===r?void 0:r.title;this._sendIMAEventsToHB(e);var m=document.getElementById("game"),g="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:g="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:g="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(l=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),g="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:g="Fired when the ad is clicked.";var _=e.getAd().getContentType();this._show({mode:"click",contentType:_}),BS();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),l=this._is_completed(e.getAd()),g="Fired when the ad completes playing.",this.adType_===v.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(m.style.display="none"),this.contentPaused=!0,g="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&&(m.style.display="block"),g="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?l=!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.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.DURATION_CHANGE:g="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:g="Fired when the ad playhead crosses first quartile.";var y=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:y});break;case google.ima.AdEvent.Type.IMPRESSION:g="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:g="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:g="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var w=e.getAd().getContentType();g=w,this._show({mode:"loaded",contentType:w});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(g=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:g="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:p&&"VPAID"!==f&&this.adResume.show(),g="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:g="Fired when the ad is resumed.",p&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:g="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:l=this._is_completed(e.getAd()),g="Fired when the ad is skipped by the user.",jS(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===v.Rewarded&&this.rewardedLabel.show(),this._hideAddResume(),g="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:g="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:l=this._is_completed(e.getAd()),g="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:g="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:g="Fired when the ad volume has been muted."}if(""!==u&&""!==g){var k=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,A=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;k||A||this.isAudioAd||this._broadcast(u,{name:u,message:g,status:"success",analytics:{category:u,action:this.parentDomain,label:"h".concat(s," d").concat(o," m").concat(d," y").concat(c)}})}if(l&&!this.adSuccess){this.adSuccess=!0;var E=e.getAd(),x="Rainbow"===(null==E?void 0:E.getAdSystem())&&(null==E?void 0:E.getWrapperAdIds().some(function(e){return t(this,i),"promo"===e}.bind(this)));null==E||E.getAdSystem(),null==E||E.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:x}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i;if(!((null===(r=this.gameData)||void 0===r||null===(r=r.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(i=this.gameData)||void 0===i||null===(i=i.aws_tst)||void 0===i||null===(i=i.ep)||void 0===i?void 0:i.atm)))return;var a=e.type,s=e.url;if("none"===a||!s)return;s=s.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(s).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,d=a.impression_url,c=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:d}:l&&!n?i={type:"normal_err",url:o}:p&&n?i={type:"promo_imp",url:u}:h&&n&&(i={type:"fallbacj_imp",url:c})}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);JS.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:i,status:"warning",analytics:{category:t,action:i,label:r}}),this._hideAddResume()}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_===v.Rewarded&&this.rewardedLabel&&this.rewardedLabel.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(kS(e.getInnerError)){var t=e.getInnerError();if(t)return kS(t.getErrorCode)&&kS(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];N(s)&&(i.query[a]=G.stringify(s))}var o=new O(i.url,!0);return F(o.query,i.query||{}),QS({url:o.toString()},n)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O(e.url,!0),i=this._transformQuery(e,t,r);i&&(n.url=r.toString());var a=i?r:new O(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&&N(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&N(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M(a),N(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 d=G.parse(s.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var c in d){new RegExp(a.cust_params.$$remove,"i").test(c)&&delete d[c]}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=d,F(s,u),s.cust_params=G.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a=(null===(n=this._adrequest_user_context)||void 0===n||null===(n=n.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:a}),this._adrequest_user_context,'bidder:"'.concat(a,'"');var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(n){return t(this,e),n===a}.bind(this)):s.length>0&&(d=s.some(function(n){return t(this,e),n===a}.bind(this))),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n=this._isExcludedBidderForT4R(),r=null===(e=this.gameData)||void 0===e||null===(e=e.t4rc)||void 0===e?void 0:e.bidder_exc_rate,i=null!=r&&r.enabled?(null==r?void 0:r.rate)||.8:0,a=(null===(t=this._adrequest_user_context)||void 0===t||null===(t=t.adTag)||void 0===t?void 0:t.bidder)||"adx",s=Math.random();return n||"adx"!==a&&s<i}},{key:"_isT4R",value:function(e){var t,n,r,i,a,s,o;if(!this.gameData.publishedAt)return{success:!1,reason:"pdate-2"};var d=new Date(this.gameData.publishedAt);if(((new Date).getTime()-d.getTime())/864e5<=10)return{success:!1,reason:"pdate-1"};var c=this.gameData.meta,u=e.t4r.meta;if((null==c||null===(t=c.ast)||void 0===t?void 0:t.c)>=(null==u||null===(n=u.ast)||void 0===n?void 0:n.c)&&(null==c||null===(r=c.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"};var l=this._isExcludedBidderForT4RWithBidderExcRate();if(console.log("zxcv isExcludedBidderForT4R",l),l)return this.msgrt.send("bidder.ex",{message:"true"}),{success:!1,reason:"bidder"};this.msgrt.send("bidder.ex",{message:"false"});var h=null===(a=this._adrequest_user_context)||void 0===a?void 0:a.tnl_ad_pos;if(this.clickCount[h]>=(null===(s=e.t4r[h])||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 p,f=h&&(null===(p=e.t4r[h])||void 0===p?void 0:p.enabled);return{success:f,reason:f?null:"rule-check"}}if(null!=e&&e.contentType.startsWith("video/")){var m,v=(null===(m=e.t4r[h])||void 0===m?void 0:m.viper)||0;if(v>0){var g,b=Math.random()<v,_=h&&b&&(null===(g=e.t4r[h])||void 0===g?void 0:g.enabled);return{success:_,reason:_?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;if(!e)return!1;var o="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(t=t.pAds)||void 0===t?void 0:t.vmap)||!0===(null===(n=this.gameData)||void 0===n||null===(n=n.pAds)||void 0===n||null===(n=n.vmap)||void 0===n?void 0:n.enabled))||"midroll"===e&&(!0===(null===(r=this.gameData)||void 0===r||null===(r=r.mAds)||void 0===r?void 0:r.vmap)||!0===(null===(i=this.gameData)||void 0===i||null===(i=i.mAds)||void 0===i||null===(i=i.vmap)||void 0===i?void 0:i.enabled))||"rewarded"===e&&(!0===(null===(a=this.gameData)||void 0===a||null===(a=a.rAds)||void 0===a?void 0:a.vmap)||!0===(null===(s=this.gameData)||void 0===s||null===(s=s.rAds)||void 0===s||null===(s=s.vmap)||void 0===s?void 0:s.enabled));if(!o)return!1;var d=this._get_vmap_config(e),c=this.adCounter[e];return void 0!==(null==d?void 0:d.start)?c>=(null==d?void 0:d.start):o}},{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 d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:i,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,i;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(t=t.pAds)||void 0===t?void 0:t.vmap;case"midroll":return null===(n=this.gameData)||void 0===n||null===(n=n.mAds)||void 0===n?void 0:n.vmap;case"rewarded":return null===(r=this.gameData)||void 0===r||null===(r=r.rAds)||void 0===r?void 0:r.vmap;default:return null===(i=this.gameData)||void 0===i||null===(i=i.pAds)||void 0===i?void 0:i.vmap}}},{key:"_isDP",value:function(e){var t;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(t=t.dp)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.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 gS(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(C.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(C.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,d="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),c=o?d:void 0;return function(){t(this,r),Us.promoError&&(console.log("promo-test fictional promo error"),c=void 0)}.bind(this),{promo_url:c,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,d,c,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:d={id:a.topDomain||a.parentDomain,au:n||"unknown",ty:"video",aid:a.gameData.gameId,pgu:a.parentURL},(c=new gS(a.gameData).checkCustomParams())&&(d.cp=c),u=encodeURIComponent(C.encode(JSON.stringify(d))),null==i||i.adapterIndex,null==i||i.isLastAdapter,l=null===(o=a.gameData.promo)||void 0===o?void 0:o.rainbow,!1,null==l||l.enabled,null==i||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 O(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 O(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:(u=e(r.mark((function e(n){var i,a,s,o,d,c,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:d=_("ch",window.location.href),c=_("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},d&&(u.channel=d),c&&(u.ch_date=c),(l=_("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),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),this._broadcast("DISPLAYAD_IMPRESSION",{message:a,status:"success"}))}catch(e){}}.bind(this));case 23:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"_init_ima_script",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: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 c.apply(this,arguments)})},{key:"_init_afg_script",value:(d=e(r.mark((function e(n){var i,a,s,o,d=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=14,f("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return t(this,d),!!window.adsbygoogle}.bind(this),attrs:o});case 14:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 16:case"end":return e.stop()}}),e,this)}))),function(e){return d.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,d=a[s],c=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);c&&"IFRAME"===c.tagName&&c.style.height!==r&&(c.style.height=r,i&&(c.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=e(r.mark((function e(n){var i,a,s,o,d,c,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),Us.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),d=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),c=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||(Ps("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:d,beforeReward:c,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 o.apply(this,arguments)})},{key:"_startAdsensePlacementPreroll",value:(s=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),Us.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 s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(a=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),Us.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 a.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var n,r,i=this;if(null===(n=this.gameData)||void 0===n||null===(n=n.ad_blcks)||void 0===n||null===(n=n.adsenseTimeout)||void 0===n?void 0:n.enabled)var a=(null==e?void 0:e.adType)||"default",s=null===(r=this.gameData)||void 0===r||null===(r=r.ad_blcks)||void 0===r||null===(r=r.adsenseTimeout)||void 0===r?void 0:r.timeout,o=(null==s?void 0:s[a])||(null==s?void 0:s.default)||15,d=setTimeout(function(){t(this,i),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(d)}.bind(this),1e3*o)}},{key:"_startTimeoutForOpus",value:function(){var e=this,n=setTimeout(function(){t(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"timeout",status:"error"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(n)}.bind(this),5e3)}},{key:"_startAdsensePlacementNext",value:(i=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),Us.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 i.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(C.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 Tw).get();return n=QS(QS({},n),r),n=t?QS(QS({},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===v.Rewarded)t="reward";else if(n===v.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,QS(QS({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),ZS=R((function t(n){var i=this;D(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,pb(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",d=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:d},lb(this.moduleName,this.moduleConfig)})),eR=R((function t(n){var i=this;D(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,pb(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",d=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:d},lb(this.moduleName,this.moduleConfig)})),tR=function(e,t){console.log(e,t)},nR={},rR={},iR=null;function aR(){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 nR.version=r,nR.frame=e,nR.function=n,nR.version}function sR(e){var n=this;return iR||(iR=new Promise(function(r){function i(t,n){if(tR("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:nR,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),aR(),nR.frame?2===nR.version?(tR("TCF v2 CMP found. Fetching the consent."),nR.function?(tR("CMP API is directly accessible, calling it now..."),nR.function("addEventListener",nR.version,i)):(tR("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!==rR[r.callId]&&rR[r.callId](r.returnValue,r.success)}}window[a]=function(e,r,s,o){t(this,i);var d=Math.random()+"",c="".concat(a,"Call"),u=T({},c,{command:e,parameter:o,callId:d,version:r});rR[d]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,nR.version,r)}("addEventListener",nR.frame,i))):r({result:"cmpVersionNotV2",cmp:nR}):r({result:"cmpNotFound"})}.bind(this)),iR)}var oR=new(function(){function t(){D(this,t),this.productName="Game Distribution"}var n;return R(t,[{key:"checkIfExcluded",value:function(e){try{var t;return!(null===(t=e.diagnostic)||void 0===t||null===(t=t.gameDock)||void 0===t||!t.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,d,c;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(a=null==t||null===(i=t.visitor)||void 0===i||null===(i=i.visitorData)||void 0===i?void 0:i.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(a),e.prev=8,d="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),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,c="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),e.next=22,fetch(c,{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 dR(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 uR=function(e){var n=this,r=e.src,i=e.attributes,a=e.target,s=e.isAsync;return new Promise(function(e,o){var d=this;t(this,n);try{var c=document.createElement("script");if(c.async=null==s||s,c.type="text/javascript",c.onload=function(){t(this,d),e()}.bind(this),c.onerror=function(){t(this,d);var e="Error on script load, Error: ".concat(r);console.log(e),o(e)}.bind(this),c.src=r,i){var u,l=dR(i);try{for(l.s();!(u=l.n()).done;){var h=u.value,p=h.key,f=h.value;c.setAttribute(p,f)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(c)}catch(e){var m="Error on script load catch, Error: ".concat(r);console.log(m,e),o(m)}}.bind(this))},lR="ffd4774b-99ae-4464-8f40-3afa12b4692e",hR=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,uR({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,uR({src:"https://cdn.cookielaw.org/consent/".concat(lR,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,uR({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:lR}],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)}}(),pR=new j,fR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},mR=!1;function vR(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(fR).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)&&(mR=!0),i&&mR&&(mR=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r;return null==e||null===(r=e.source)||void 0===r||null===(r=r.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var d=o();if(!d)return;var c=d&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return t(this,n),d.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(!c&&!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=fR[i][a];p&&pR.emit(p,r)}}}),!1);var gR="__msgr",bR=q(),_R=function(e){var n=this;if(!window[gR]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=gR,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:bR,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){kR(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",kR(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?vR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=bR,kR(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},yR=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=wR(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},wR=function e(t){try{var n,r=null==t?void 0:t.parent;if("game"===(null===(n=r.document)||void 0===n||null===(n=n.activeElement)||void 0===n?void 0:n.id))return r;e(r)}catch(e){return t}},kR=function(e){try{window[gR]&&window[gR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},AR=function(){function n(e){D(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 R(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,d=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,d);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}();function ER(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?ER(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ER(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SR(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}var DR,TR=function(){function n(e){var r=this;D(this,n),T(this,"_getAdTypeByAfgPosition",function(e){var n=this;t(this,r);var i={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(i).find(function(r){var a=this;return t(this,n),i[r].some(function(n){return t(this,a),n===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),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._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}var i,a;return R(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h,p,f,m,v,g,b,_,y,w,k,A,E,x,S,R,D,O,C,I,P,L,U,M,j,B,N,G,F,q,V,z,H,W,K,$,Q=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,c=this._getAdTypeByAfgPosition(n),n.params.adTypeFound=c,n.params.position,u=this._getAdFlow(c),l=this._gameData,h=l.afg_disabled,p=null===(i=n.params)||void 0===i?void 0:i.isGift,null===(a=n.params)||void 0===a||a.position,f=null===(s=l.promo)||void 0===s?void 0:s.rainbow,m=(null==f?void 0:f.enabled)&&(null===(o=f.position)||void 0===o?void 0:o[c]),v=null==f?void 0:f.gift,g=m&&null!=f&&f.duration?null==f?void 0:f.duration:5,b=h?u.filter(function(e){return t(this,Q),"adsense"!==e}.bind(this)):u,_=this.get_ad_system_init_result(),y=_.afg,w=_.ima,k=null==l||null===(d=l.ad_blcks)||void 0===d||null===(d=d.removeOtherAdaptors)||void 0===d?void 0:d.enabled,this.anyAdBlocking=!y||!w,this.bothAdBlocking=!y&&!w,this.adsBlocked=k&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(Ps("gd-adflow adsBlocked so changing the flow"),b=[]):(y||(b=b.filter(function(e){return t(this,Q),"adsense"!==e}.bind(this))),w||(b=b.filter(function(e){return t(this,Q),"ima"!==e}.bind(this)))),A=!1,E=!1,x=[],S=0,R=!1,O=SR(b),e.prev=30,O.s();case 32:if((C=O.n()).done){e.next=68;break}return I=C.value,n.params.adapter=I,P=S===b.length-1,L=p&&v||!p,U=P&&m&&L,n.params=xR(xR({},n.params),{},{adapterIndex:S,isLastAdapter:P,shouldFail:!1,extraPromoRunOnFail:U}),function(){t(this,Q),Us.firstSuccessOrder&&!isNaN(Us.firstSuccessOrder)&&(n.params.shouldFail=S<Us.firstSuccessOrder)}.bind(this),Ps("gd-adflow, before adInvoke",S,I,n.params.shouldFail),e.next=43,this.adInvoke(n);case 43:if(M=e.sent,j=M.success,B=M.args,N=M.isSkipped,G=M.noVast,F=M.t4r,!j){e.next=57;break}return Ps("gd-adflow, adapter-result-success",S,I,B,F),A=!0,E=!(null==B||!B.isPromoSuccess),D=F,e.abrupt("break",68);case 57:if(Ps("gd-adflow, adapter-result-failure",S,I,B.message),S++,x.push(B.message),!N){e.next=62;break}return e.abrupt("break",68);case 62:if(!G){e.next=65;break}return this._runAutoResume(),e.abrupt("break",68);case 65:R=U;case 66:e.next=32;break;case 68:e.next=73;break;case 70:e.prev=70,e.t0=e.catch(30),O.e(e.t0);case 73:return e.prev=73,O.f(),e.finish(73);case 76:if(!R){e.next=82;break}return e.next=79,new AR(this).run({duration:g});case 79:e.sent.success&&(E=!0);case 82:return function(){var e;t(this,Q),Us.disableGift&&null!==(e=l.gft)&&void 0!==e&&e[c].enabled&&(l.gft[c].enabled=!1)}.bind(this),q=x.join(" /n"),A?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(c)):(this._onResumeGame(q,"warning"),this._giveGift(c)),V="-1",z="none",A?(V="index_".concat(S),z=b[S]):E&&(V="promo",z="promo"),H=this.get_session_id(),this.anyAdBlocking&&"-1"===V?(W="rewarded"===c?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[W]=this.blockedAdsMap[W]?this.blockedAdsMap[W]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(W)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!y,imaBlocked:!w,adType:W,sessionId:H,successAdapter:"none",adFlowIndex:V})):(K=T(T(T(T({},"adflow.all.index",{message:"".concat(V)}),"adflow.all.success_adapter",{message:"".concat(z)}),"adflow.".concat(c,".index"),{message:"".concat(V)}),"adflow.".concat(c,".success_adapter"),{message:"".concat(z)}),Object.keys(K).forEach(function(e){t(this,Q);var n=K[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:V,successAdapter:z,adBlocker:!1,afgBlocked:!y,imaBlocked:!w,adType:c,sessionId:H,t4r:D})),$={adType:c},this.eventBus.broadcast("AD_FLOW_COMPLETE",$),e.abrupt("return",$);case 95:case"end":return e.stop()}}),e,this,[[30,70,73,76]])}))),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,d,c,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),d={},c=function(e){t(this,l),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),a._eventBus.unsubscribeScope(o),n({success:!0,args:e,t4r:d})}.bind(this),a._eventBus.subscribe("AD_ERROR",c,o),a._eventBus.subscribe("AD_SDK_CANCELED",c,o),a._eventBus.subscribe("AD_SUCCESS",u,o),a._eventBus.subscribe("AD_T4R",function(){t(this,l),d.loaded=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_CLICK",function(){t(this,l),d.t4rClick=!0}.bind(this),o),a._eventBus.subscribe("AD_T4R_VIDEO",function(){t(this,l),d.t4rVideo=!0}.bind(this),o),a._eventBus.subscribe("AD_CLICK",function(){t(this,l),d.click=!0}.bind(this),o),a._eventBus.subscribe("AD_BIDDER",function(e){t(this,l),d.bidder=null==e?void 0:e.bidder}.bind(this),o),a._eventBus.subscribe("AD_T4R_NONE",function(e){t(this,l),d.fail_reason=null==e?void 0:e.reason}.bind(this),o),e.prev=13,e.next=16,a._adInstance.startAd(i);case 16:e.next=22;break;case 18:e.prev=18,e.t0=e.catch(13),Ls("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 22:case"end":return e.stop()}}),e,this,[[13,18]])})));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=this,o=void function(){if(t(this,s),Us.customAdFlow)return JSON.parse(Us.customAdFlow)}.bind(this),d=this._gameData.adflw;o&&(d=o);var c=null!==(n=d)&&void 0!==n&&null!==(n=n.adapters)&&void 0!==n&&n.default?null===(r=d)||void 0===r||null===(r=r.adapters)||void 0===r?void 0:r.default:["ima","adsense"];return c=null!==(i=d)&&void 0!==i&&null!==(i=i.adapters)&&void 0!==i&&i[e]?null===(a=d)||void 0===a||null===(a=a.adapters)||void 0===a?void 0:a[e]:c}}]),n}(),OR=new j,CR=["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(CR.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)DR=a,(window.parent||window).postMessage(r,"*"),OR.emit("aeria-event",r);else if(o){DR&&DR.postMessage(r,"*");var d=window.parent||window;d&&d.postMessage(r,"*")}}}),!1);var IR="https://html5.gamedistribution.com",PR="parent-data-request",LR="parent-data-response",UR=function(){function n(){D(this,n)}var i;return R(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,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===IR&&o===PR){var d={adRequestTimer:e.adRequestTimer};s.postMessage({type:LR,value:d})}}.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===IR&&i===LR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:PR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),MR=new UR,jR={SDKExistsOnUpperFrame:!1},BR=function(){function e(){D(this,e),this.adContainer=window.document.body}return R(e,[{key:"show",value:function(){this.adBlockerOverlay.style.display="block",this.adBlockerButton.style.display="block"}},{key:"hide",value:function(){this.adBlockerOverlay.style.display="none"}},{key:"add",value:function(){var e=this;try{this.addStyles();var n=document.createElement("div");n.id="gd__adblocker__button",n.setAttribute("title","AdBlocker"),n.classList.add("gd__adblocker__button"),n.onclick=function(){t(this,e),this.hide(),window.location.reload()}.bind(this);var r=document.createElement("p");r.innerText="Continue",n.appendChild(r),this.adBlockerButton=n;var i=document.createElement("div");i.id="gd__adblocker__logo",i.setAttribute("title","AdBlocker"),i.classList.add("gd__adblocker__logo"),this.adBlockerLogo=i;var a=document.createElement("p");a.id="gd__adblocker__text",a.classList.add("gd__adblocker__text1"),a.innerText="Thanks for playing!",this.adBlockerText1=a;var s=document.createElement("p");s.id="gd__adblocker__text",s.classList.add("gd__adblocker__text1"),s.innerText="It seems you’re using a plugin to block advertising within this game.To ensure the game works properly and to support our game creators, we kindly ask that you disable your ad blocker.",this.adBlockerText2=s;var o=document.createElement("p");o.id="gd__adblocker__text",o.classList.add("gd__adblocker__text1"),o.innerText="Thank you!",this.adBlockerText3=o;var d=document.createElement("div");d.id="gd__adblocker__container",d.classList.add("gd__adblocker__container"),d.appendChild(this.adBlockerText1),d.appendChild(this.adBlockerText2),d.appendChild(this.adBlockerText3),d.appendChild(this.adBlockerButton),this.adBlockerContainer=d;var c=document.createElement("div");c.id="gd__adblocker__overlay",c.classList.add("gd__adblocker__overlay"),c.appendChild(this.adBlockerContainer),this.adBlockerOverlay=c,this.adContainer.appendChild(this.adBlockerOverlay)}catch(e){console.log("AdBlocker error",e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__adblocker__style",e,"\n .gd__adblocker__button {\n text-align: center;\n width: 90%;\n height: 50px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: calc(10% - 20px); /* Container'ın altından 20px yukarıda */\n left: 5%; /* Container'ın solundan %5 içeride */\n right: 5%; /* Container'ın sağından %5 içeride */\n font-size: large;\n font-family: monospace;\n background-color: #ff8c1c;\n border-radius: 50px;\n color: white;\n margin: 0 auto;\n }\n\n .gd__adblocker__button > p {\n position: relative;\n text-align: center;\n margin: 0 auto;\n height: 100%;\n top: 30%;\n color: white;\n }\n\n .gd__adblocker__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(20% - 50px);\n left: calc(50% - 50px);\n margin: 0;\n border-radius: 50%;\n }\n\n .gd__adblocker__container {\n position: absolute;\n z-index: 2000;\n cursor: pointer;\n border-radius: 20px;\n border: 5px solid #06b8a2;\n margin: 0 auto;\n top: 10%;\n left: 10%;\n right: 10%;\n bottom: 10%;\n max-width: 80%; \n max-height: 80%; \n width: auto; \n height: auto; \n }\n \n .gd__adblocker__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,1);\n z-index: 1999;\n cursor: pointer;\n }\n\n .gd__adblocker__text1 {\n text-align: center;\n top: 25%;\n position: relative;\n font-family: monospace;\n color: white;\n margin: 10px;\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 NR(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 GR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var FR=q(),qR=null,VR=null,zR=function(){function n(e){var r,i,a,s=this;if(D(this,n),qR)return qR;qR=this,this.blockedAdsMap={},this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,e),this._version=e.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new Tw,this._location.print();var o=this._location.get(),d=(null==o||null===(r=o.top)||void 0===r||null===(r=r.domain)||void 0===r?void 0:r.value)||(null==o||null===(i=o.partner.domain)||void 0===i?void 0:i.value),c=null==o||null===(a=o.partner.url)||void 0===a?void 0:a.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||c,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||d,this._topDomain,this._parentURL,this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){t(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,r,i=this;if((t(this,s),null===(e=this._gameData)||void 0===e||null===(e=e.directTokenUse)||void 0===e?void 0:e.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this._sendLoadedEvent(2),!0===(null===(n=this._gameData.lp)||void 0===n?void 0:n.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(r=this._gameData.evnts)&&void 0!==r&&r.enabled&&this._isLoaderGameURL()&&(_R(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,i),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),MR.init(this),this._send_gametag_data("sdk_init"),this._executeMidrollPlus()}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,g,b,_,w,T,I,P,L,U,j,B,N;return R(n,[{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:(N=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 N.apply(this,arguments)})},{key:"_loadCMP",value:(B=e(r.mark((function e(){var t,n,i,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(n=new Tw,0!==(null==(i=n.get("depth"))?void 0:i.value)||null===(t=this._gameData)||void 0===t||null===(t=t.cmp)||void 0===t||!t.enabled){e.next=12;break}if(null===(a=this._gameData)||void 0===a||null===(a=a.cmp)||void 0===a||!a.checkDepthOnly){e.next=9;break}return e.next=7,hR();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,hR();case 12:case"end":return e.stop()}}),e,this)}))),function(){return B.apply(this,arguments)})},{key:"testConsent",value:function(){try{aR();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sR({});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;pR.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());O(location.href,!0);if(this._whichFrame(),this._isMasterGameURL(),this._isExtHostedGameURL(),this._isTokenGameURL(),this._isHostHTML5Domain(),this._isExternalHoster(),location.href,document.referrer,t)try{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._bridge.isCoreSDKMode&&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:(j=e(r.mark((function e(n,i){var a,s,o,d=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: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,d),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"}))}.bind(this)).catch(function(e){t(this,d);var n="".concat(e).startsWith("Error: Blocked:");Ps("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._checkAdBlocker(),console.error(e.message||e)}.bind(this))),n(this._gameData),e.next=21;break;case 16:e.prev=16,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),i(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return j.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:"_checkAdBlocker",value:function(){var e=this;try{var n,r=this.get_ad_system_init_result(),i=r.ima,a=r.afg;if(!i||!a)if(null!==(n=this._gameData.rmblck)&&void 0!==n&&n.enabled){var s=m.getBoolean("infdl1JMwI9JRg3U2MAIiQ==");this.adBlockerPage||(this.adBlockerPage=new BR,this.adBlockerPage.add()),s?setTimeout(function(){t(this,e),this.adBlockerPage.show()}.bind(this),500):setTimeout(function(){t(this,e),m.set("infdl1JMwI9JRg3U2MAIiQ==",!0),this.adBlockerPage.show()}.bind(this),18e4)}}catch(e){}}},{key:"_extendDefaultOptions",value:function(e,t){var n=M(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=Os.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:"_sendTunnlEvent",value:function(e){var n=this;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:GR(GR({},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 n,r=this,i=e.query,a=e.eventType,s=this._gameData.dbglg;if(s&&s.enabled&&s.topics&&(1===a?n="hl.gameplay":2===a?n="hl.gameload":-1===a?n="hl.gameplay.error":-2===a&&(n="hl.gameload.error"),n)){if(!s.topics.some(function(e){return t(this,r),e===n}.bind(this)))return;this.adInstance._send_atom_event(n,i)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=d("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?(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:Os.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;t(this,e),VR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(n=n.gameDock)&&void 0!==n&&n.adViewEvent&&VR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),oR.track(VR,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;null===(t=VR)||void 0===t||null===(t=t.tracking)||void 0===t||t.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,kk();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:f((n=["https://pm.azerioncircle.com/p/locus"])[0],"locus",{alternates:n}).catch(function(e){t(this,i),this._sendSDKError(e)}.bind(this)).then(function(){t(this,i)}.bind(this));case 8:case"end":return e.stop()}}),e,this)})));return function(){return n.apply(this,arguments)}}()},{key:"_loadGoogleAnalytics",value:function(){var e=this,n=["https://www.google-analytics.com/analytics.js"];f(n[0],"gdsdk_google_analytics",{alternates:n,error_prefix:"Blocked:",exists:function(){return t(this,e),window.ga}.bind(this)}).then(function(){t(this,e),window.ga("create","UA-60359297-49",{name:"gd",cookieExpires:7776e3,sampleRate:5},"auto"),this._bridge.noGAPageView||window.ga("gd.send","pageview"),this._userDeclinedTracking||window.ga("gd.set","anonymizeIp",!0)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new y,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),"sdk")}.bind(this)),A.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){}}NS()}.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;t(this,e),this.msgrt.send("ad.impression"),MS(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(r=r.gameDock)&&void 0!==r&&r.adViewEvent&&oR.track(VR,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:")){if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:n.message}),!this._hasBlocker)){this._hasBlocker=!0;var r=Math.random()<.25;this.msgrt.send("adblck.src",{message:n.message}),r&&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=sk().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(Os.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(U=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=void 0===this._gameData.dmain||this._gameData.dmain,console.log("zxcv exclude, isAllowedDomain",i,t),t=t||i,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking();case 8:case"end":return e.stop()}}),e,this)}))),function(){return U.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t=this._checkTokenGameUrl(),n=new Tw,r="html5.gamedistribution.com"!==O(document.referrer).host,i=t&&!jR.SDKExistsOnUpperFrame&&n.get("depth.value")>0&&r;if(i&&(null===(e=this._gameData)||void 0===e||null===(e=e.directTokenUse)||void 0===e?void 0:e.enabled)){var a,s=null===(a=this._gameData)||void 0===a||null===(a=a.directTokenUse)||void 0===a?void 0:a.behavior;"to-loader"===s?this._redirectToLoaderFrame():"to-blocked-page"===s&&this._redirectToBlocking(!0)}return{blocked:i}}},{key:"_redirectToBlocking",value:function(t){var n=this;this.msgrt.send("blocked");var i=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:i.gameId,img:n._get_game_thumbnail_url(),title:i.title}));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=O(location.href,!0),a=GR(GR({},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;WS().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;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var r,i=this._gameData,a=i.gdpr&&!0===i.gdpr.consent,s=i.loader,o=null===(t=i.promo)||void 0===t?void 0:t[null===(n=i.promo)||void 0===n||null===(n=n.template)||void 0===n?void 0:n.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(i,a):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||a?null!=o&&o.enabled?this._createPromoBeforeSplash(i,a):!1!==s.enabled&&this._createSplash(i,a):null!=o&&o.enabled&&this._createPromo(i,a))}},{key:"_initializeVideoAd",value:(L=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 XS(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=Os,this.adInstance._send_atom_event("gd.location"),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return L.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:"_onEvent",value:function(e){p(e.name,e.message,e.status);try{this.options.onEvent({name:e.name,message:e.message,status:e.status,skipForward:e.skipForward,adPosition:e.adPosition})}catch(e){p("DEVELOPER_ERROR",e.message,"warning")}}},{key:"_getGameData",value:(P=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gk();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 P.apply(this,arguments)})},{key:"_createSplash",value:(I=e(r.mark((function e(n,i){var a,s,o,d,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(n);case 2:return a=e.sent,s=new a(GR(GR({},this.options),{},{isConsentDomain:i,version:Os.version}),n,this._parentDomain),e.next=6,Ek();case 6:o=e.sent,d=o.enabled,s.on("playClick",function(){var e,n=this;if(t(this,c),i){var r=new Date;r.setDate(r.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(r.toUTCString(),"; path=/")}if(this._hideCMPButton(),d)window.gdsdk.showAd(v.Interstitial,{position:"preroll"}).catch(function(e){t(this,n),s.hide()}.bind(this));else{var a={position:"preroll"};(function(){t(this,n),Us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),a.adapter="adsense")}).bind(this),this.showAd(v.Interstitial,a).catch(function(e){t(this,n)}.bind(this))}null!==(e=this._gameData)&&void 0!==e&&null!==(e=e.evnts)&&void 0!==e&&e.enabled&&(yR({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,c),s.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){t(this,c),s.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(T=e(r.mark((function e(n,i){var a,s,o,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:s=e.sent,(o=new s(GR(GR({},this.options),{},{isConsentDomain:i,version:Os.version,template:null===(a=n.promo)||void 0===a||null===(a=a.template)||void 0===a?void 0:a.preroll}),n)).on("done",function(){t(this,d),o.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 T.apply(this,arguments)})},{key:"_createPromo",value:(w=e(r.mark((function e(n,i){var a,s,o,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:s=e.sent,(o=new s(GR(GR({},this.options),{},{isConsentDomain:i,version:Os.version,template:null===(a=n.promo)||void 0===a||null===(a=a.template)||void 0===a?void 0:a.preroll}),n)).on("done",function(){t(this,d),o.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 w.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(v.Interstitial).catch(function(){t(this,e)}.bind(this))}},{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,d,c,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!a._autoResumeIfAdsAreDisabled(n||"interstitial")){e.next=5;break}return e.abrupt("return",t());case 5:return d={adType:n||"interstitial",params:i,adTimestamp:a.adRequestTimer},e.next=9,a.sdkReady;case 9:return c=e.sent,e.next=12,a.videoAdReady;case 12:if(null!==(o=a._gameData.lp)&&void 0!==o&&o.load||a._sendLoadedEvent(1),a._sendGamedockGamePlay(),a._rejectAdIfGameBlocked({gameData:c,adRequest:d}),a._rejectAdIfAdDisabled({gameData:c,adRequest:d}),a._rejectAdIfUnsupportedType({adRequest:d}),"rewarded"===n&&a._setGameRewardedFlag(),null!=i&&i.isGift||a._rejectAdIfAdRateHits({gameData:c,adRequest:d}),a.adInstance.attachAfgPosition(d),!a.adFlowRunning){e.next=22;break}return e.abrupt("return",t());case 22:return a.adFlowRunning=!0,u=new TR(a),e.next=26,u.runAdFlow(d);case 26:a.adFlowRunning=!1,t(),a._post_message({topic:"adrequest.instream"}),e.next=36;break;case 31:e.prev=31,e.t0=e.catch(0),a.adFlowRunning=!1,a.onResumeGame(e.t0.message,"warning"),s(e.t0.message);case 36:case"end":return e.stop()}}),e,null,[[0,31]])})));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 this._gameData.diagnostic,this._gameData.disableAds,a&&(this._runAutoResume(),n=!0),n}},{key:"_runAutoResume",value:function(){var e="CONTENT_PAUSE_REQUESTED",t="CONTENT_RESUME_REQUESTED";this.eventBus.broadcast(e,{name:e,message:"Auto pause when ads are disabled"}),this.eventBus.broadcast(t,{name:t,message:"Auto resume when ads are disabled"}),this.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success")}},{key:"_giveGift",value:function(e){var t,n,r,i,a,s;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(t=t.gft)&&void 0!==t&&t[e].enabled&&(null===(n=this._gameData)||void 0===n||null===(n=n.gft)||void 0===n||null===(n=n[e].durations[this._giftCount[e]])||void 0===n?void 0:n.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(r=this._gameData)&&void 0!==r&&null!==(r=r.gft)&&void 0!==r&&r[e].enabled&&(null===(i=this._gameData)||void 0===i||null===(i=i.gft)||void 0===i||null===(i=i[e].durations[this._giftCount[e]])||void 0===i?void 0:i.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(a=this._gameData)&&void 0!==a&&null!==(a=a.gft)&&void 0!==a&&a[e].enabled&&(null===(s=this._gameData)||void 0===s||null===(s=s.gft)||void 0===s||null===(s=s[e].durations[this._giftCount[e]])||void 0===s?void 0:s.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=e.adRequest;if(t.disableAds[n.adType]||this._whitelabelPartner)throw new Error("Advertisements are disabled.")}},{key:"_rejectAdIfUnsupportedType",value:function(e){var t=e.adRequest;if(t.adType){if(t.adType!==v.Interstitial&&t.adType!==v.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=v.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===v.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i=e.gameData,a=e.adRequest,s=null;a.adType===v.Interstitial&&null!==(t=i.diagnostic)&&void 0!==t&&null!==(t=t.useMidrollIndex)&&void 0!==t&&t.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(n=i.diagnostic)||void 0===n||null===(n=n.useMidrollIndex)||void 0===n?void 0:n.indexes.length)-1||(s=6e4*(null===(r=i.diagnostic)||void 0===r||null===(r=r.useMidrollIndex)||void 0===r?void 0:r.indexes[this.adInstance.adMidrollCount])):s=i.midroll;if(a.adType===v.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<s)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=v.Rewarded,e.next=16;break;case 14:if(n===v.Interstitial||n===v.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16:return e.next=18,i.adInstance.preloadAd(n);case 18:o=e.sent,t(o),e.next=25;break;case 22:e.prev=22,e.t0=e.catch(0),a(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,22]])})));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:(g=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 g.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;this._allowExternals({enabled:!1});try{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(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(yR({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()||(yR({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 S(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 O(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()),d=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:s()),u=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===o()?d:c()),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,v=(e||n)&&r.loaderEnabled,g=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled,_=(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:b,parentURL:i,parentDomain:d,topDomain:u&&u.length?u:d,noGAPageView:f,noLotamePageView:m,noGamedockSDK:v,noMinijuegosSDK:g,version:r.version,pauseGameOnStartup:_,depth:o(),domainMatched:d===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 O(location.href);return"html5.gamedistribution.com"===(null==e?void 0:e.host.toLowerCase())}},{key:"_isExternalHoster",value:function(){var e;return null===(e=this._gameData)||void 0===e||null===(e=e.extHosting)||void 0===e?void 0:e.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=O(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=O(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 O(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 O(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var i=new O(location.href,!0);if(!i.query.gd_zone_config)return;e=i.query.gd_zone_config}return JSON.parse(C.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new eR(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=e(r.mark((function e(t){var n,i,a,s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(i=i.template)||void 0===i?void 0:i.preroll],s=new ZS(a),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(C.encode(JSON.stringify(e)))}catch(e){}try{var n=new O(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 O(e,!0);return n.query=GR(GR({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return C.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)VR.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:"decideToGiveAGift",value:function(n){var i=this;try{var a,s=null===(a=this._gameData)||void 0===a?void 0:a.gft[n],o=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..."):(i.showAd(v.Interstitial,{position:n,isGift:!0}).catch(function(e){t(this,a)}.bind(this)),clearInterval(o),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 FR}},{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(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&this.adInstance.adMidrollCount<=0){var r,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(v.Interstitial,{position:"midroll",giftType:i}).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(v.Interstitial,{position:"midroll",giftType:i}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function HR(){return(HR=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,kk();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 WR=new j,KR=function(e){var n=this;!function(){HR.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&&(WR.off("sdk-event",s),n())}.bind(this);WR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new zR(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),d=function(e){return t(this,n),a().showDisplayAd(e)}.bind(this),c=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),v=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&&b(r)}),!1)}.bind(this),g=function(){t(this,n),v(),m("init")}.bind(this),b=function(r){t(this,n);try{WR.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:d,cancelAd:c,openConsole:u,getSession:h,onEvent:b,init:g,_sendSDKReady:f,sendGenericEvent:p}},$R=function(e){var t=KR(e);return t.init(),t},QR=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"!==O(window.location.href).host;return n()&&!(r()||i)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:n,isTokenGameURL:r,isExtHostedGameURL:i,whichFrame:a}},JR="gd-sdk-frame-handshake-request",YR="gd-sdk-frame-handshake-response",XR=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:JR},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===JR){var o={type:YR};i.postMessage(o,r)}else a===YR&&(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))},ZR=function(){var t=e(r.mark((function e(){var t,n,i,a,s,o,d;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wk();case 2:return t=e.sent,e.next=6,XR();case 6:if(n=e.sent,jR.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=QR(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,Ak();case 14:return o=e.sent,d=!1,d=o?!s&&!!n:!s,e.abrupt("return",d);case 18:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),eD=tt,tD=re,nD=ce,rD=Hl,iD=ts,aD=Qi,sD=nD(Vi.f),oD=nD([].push),dD=eD&&tD((function(){var e=Object.create(null);return e[2]=2,!sD(e,2)})),cD=function(e){return function(t){for(var n,r=aD(t),i=iD(r),a=dD&&null===rD(r),s=i.length,o=0,d=[];s>o;)n=i[o++],eD&&!(a?n in r:sD(r,n))||oD(d,e?[n,r[n]]:r[n]);return d}},uD={entries:cD(!0),values:cD(!1)}.values;Xa({target:"Object",stat:!0},{values:function(e){return uD(e)}});var lD,hD={},pD=function(e){try{if(e.skipForward)return;if(hD.source){var t={type:"gd-sdk-on-event",event:e};hD.source.postMessage(t,hD.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},fD=function(){pD({name:"SDK_READY",status:"success",message:"Everything is ready."}),pD({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),pD({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},mD=function(n){window.addEventListener("message",(function(i){var a=i.data,s=i.origin,o=i.source,d=a.type,c=a.method,u=a.options;if("gd-sdk-self"!==d){if("gd-sdk"===d){if(!hD.source&&"init"===c)return function(e){var t=e.source,n=e.origin;hD={source:t,origin:n}}({source:o,origin:s}),void fD();var l=n[c];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"===c&&Us.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:c,options:u};window.postMessage(h,location.origin)}}),!1)},vD=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){pD(e),t.apply(this,arguments)}}(e);var t=new zR(e);return mD(t),t},gD=function(){function t(){D(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:[]},lb(this.moduleName,this.moduleConfig)}var n,i;return R(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,pb(this.moduleName);case 3:this.module=e.sent,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}(),bD=function(){var t=e(r.mark((function t(){var n,i,a,s,o,d,c,u,l,h,p,f,m,v,g,b;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new Tw).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 d=function(){var e=(new Tw).get("partner.url.value");return new O(e,!0)},c=function(){var e="ae-soft-323";try{var t=d(),n=t.pathname,r=n.split("/"),i=r[r.length-1];Ps("aeria-ylogin:loc",t,n,i),e=i}catch(e){Ls("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:c,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,gk();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())})),v=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 gD).runYMenu({gameId:c});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),g=QR(),b=g.whichFrame,"game-frame"===b()&&(f||v());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_D=function(e){try{var t=tk(e);e.gameId||t.send("nogameid",{message:"".concat(p_.parentURL)})}catch(e){}},yD=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,bD();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log("zxcv error on creating some bridge module");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),wD={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,_D(t),vk(t),e.next=5,ZR();case 5:return n=e.sent,e.next=8,yD();case 8:return i=n?$R(t):vD(t),xk(),e.abrupt("return",i);case 13:return e.prev=13,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",vD(t));case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(e){return t.apply(this,arguments)}}()};function kD(){return(kD=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,Dk();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,SD(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 AD,ED,xD=!1;function SD(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),lD)return r(lD);if(xD)var s=setInterval(function(){t(this,a),lD&&(xD=!1,clearInterval(s),r(lD))}.bind(this),100);else xD=!0,wD.create(e).then(function(e){t(this,a),lD=e,e._sendSDKReady(),xD=!1,r(lD)}.bind(this))}.bind(this))}function RD(e){return SD(e),{invoke:function(t){return function(e,t){return kD.apply(this,arguments)}(e,t)}}}function DD(n,i){var a=this;return new Promise(function(s,o){var d,c=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===(d=i.game)||void 0===d?void 0:d.version);TD({text:"sdk-wrapper-script-load"}),f(u[0],"gd-sdk-wrp",{alternates:u}).catch(function(e){t(this,c),TD({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,TD({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,TD({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:ED=e.sent,TD({text:"sdk-wrapper after gdSdkWrp.init"}),s(ED),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),TD({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 TD(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(C.encode(JSON.stringify(t))))),console.log(V(Object.values(e)))}catch(e){}}function OD(e){if(e){var t=e.name,n=e.message,r=e.status;try{TD({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!AD}),AD&&AD.onEvent({name:t,message:n,status:r})}catch(t){TD({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function CD(e){return ID.apply(this,arguments)}function ID(){return(ID=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return AD=t,vk(t),e.next=4,gk();case 4:if(s=e.sent,!ED){e.next=7;break}return e.abrupt("return",ED);case 7:if(o=null==s||null===(n=s.sdk_wrp)||void 0===n?void 0:n.enabled,d=null==s||null===(i=s.sdk_wrp)||void 0===i?void 0:i.version,c=null==s?void 0:s.gameId,u=null==s?void 0:s.title,MD("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,TD({text:"sdk-wrapper-load-instant-play"}),e.next=18,LD();case 18:return TD({text:"sdk-wrapper-load-instant-play-loaded"}),e.next=21,DD(l,{onEvent:OD,game:{gameId:c,title:u,version:d}});case 21:return ED=e.sent,e.abrupt("return",ED);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function PD(){return PD=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,MD("beforeGetDeveloperSettings"),i=n(),MD("afterGetDeveloperSettings"),e.prev=4,e.next=7,CD(i);case 7:a=e.sent,MD("after get SDK wrapper: ".concat(!!a)),a&&(MD("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),MD("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),PD.apply(this,arguments)}function LD(){return UD.apply(this,arguments)}function UD(){return(UD=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="https://gtg.samsungapps.com/gsinstant-sdk/gsinstant.0.43.js",e.next=3,f(n,"samsung_instant_play_sdk",{alternates:[n],error_prefix:"Blocked:",exists:function(){return t(this,i),window.GSInstant}.bind(this)});case 3:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function MD(e){window.sdkLog.push(e)}function jD(){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=O(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=O(s,!0))&&void 0!==t&&t.host&&(a=e.host)),a}()?MD("skipped normal SDK init!"):(!function(){US();var n=RD(jD());function i(){var i=this;this.AdType=v,this.preloadAd=function(e){var r=this;return n.invoke(function(n){return t(this,r),n.preloadAd(e)}.bind(this))},this.showAd=function(){var i=e(r.mark((function e(i,a){var s=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.invoke(function(e){var n=this;if(t(this,s),i===v.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),Us.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),r.adapter="adsense")}.bind(this),e.showAd(i,r)}.bind(this)));case 1: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),mb.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),mb.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}(),MD("afterSDKInit")),function(e){PD.apply(this,arguments)}({_get_developer_sets:jD});