@bygd/gd-sdk-pes 1.36.0 → 1.36.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 g,Layers as v,getKeyByValue as b,getQueryString as y,EventBus as _,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 I}from"js-base64";import C 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 G}from"is-plain-object";import N 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)||function(){return this}()||z||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.33.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.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,ge=function(e){return me(fe(e))},ve=ge,be=ce({}.hasOwnProperty),ye=Object.hasOwn||function(e,t){return be(ve(e),t)},_e=ce,we=0,ke=Math.random(),Ae=_e(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,Ie=Oe&&Oe.v8;Ie&&(ne=(te=Ie.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 Ce=ne,Pe=Ce,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,Ge=K.exports,Ne=ye,Fe=Ee,qe=Me,Ve=je,ze=Be.Symbol,He=Ge("wks"),We=Ve?ze.for||ze:ze&&ze.withoutSetter||Fe,Ke=function(e){return Ne(He,e)||(He[e]=qe&&Ne(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")},gt=ie,vt=Function.prototype.call,bt=gt?vt.bind(vt):function(){return vt.apply(vt,arguments)},yt=W,_t=Ze,wt=function(e,t){return arguments.length<2?(n=yt[e],_t(n)?n:void 0):yt[e]&&yt[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,It=Tt,Ct=TypeError,Pt=function(e){if(Ot(e))return e;throw new Ct(It(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,Gt=it,Nt=TypeError,Ft=bt,qt=it,Vt=Rt,zt=Mt,Ht=function(e,t){var n,r;if("string"===t&&Bt(n=e.toString)&&!Gt(r=jt(n,e)))return r;if(Bt(n=e.valueOf)&&!Gt(r=jt(n,e)))return r;if("string"!==t&&Bt(n=e.toString)&&!Gt(r=jt(n,e)))return r;throw new Nt("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=ye,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)},gn=Ze,vn=Z,bn=ce(Function.toString);gn(vn.inspectSource)||(vn.inspectSource=function(e){return bn(e)});var yn,_n,wn,kn=vn.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,In=Ee,Cn=On("keys"),Pn=function(e){return Cn[e]||(Cn[e]=In(e))},Ln={},Un=xn,Mn=W,jn=it,Bn=Tn,Gn=ye,Nn=Z,Fn=Pn,qn=Ln,Vn="Object already initialized",zn=Mn.TypeError,Hn=Mn.WeakMap;if(Un||Nn.state){var Wn=Nn.state||(Nn.state=new Hn);Wn.get=Wn.get,Wn.has=Wn.has,Wn.set=Wn.set,yn=function(e,t){if(Wn.has(e))throw new zn(Vn);return t.facade=e,Wn.set(e,t),t},_n=function(e){return Wn.get(e)||{}},wn=function(e){return Wn.has(e)}}else{var Kn=Fn("state");qn[Kn]=!0,yn=function(e,t){if(Gn(e,Kn))throw new zn(Vn);return t.facade=e,Bn(e,Kn,t),t},_n=function(e){return Gn(e,Kn)?e[Kn]:{}},wn=function(e){return Gn(e,Kn)}}var $n={set:yn,get:_n,has:wn,enforce:function(e){return wn(e)?_n(e):yn(e,{})},getterFor:function(e){return function(t){var n;if(!jn(t)||(n=_n(t)).type!==e)throw new zn("Incompatible receiver, "+e+" required");return n}}},Qn=ce,Jn=re,Yn=Ze,Xn=ye,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,gr=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},vr=ce,br=vr({}.toString),yr=vr("".slice),_r=function(e){return yr(br(e),8,-1)},wr=Qe,kr=Ze,Ar=_r,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||gr(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},Ir=dt("span").classList,Cr=Ir&&Ir.constructor&&Ir.constructor.prototype,Pr=Cr===Object.prototype?void 0:Cr,Lr=_r,Ur=ce,Mr=function(e){if("Function"===Lr(e))return Ur(e)},jr=Pt,Br=ie,Gr=Mr(Mr.bind),Nr=function(e,t){return jr(e),void 0===t?e:Br?Gr(e,t):function(){return e.apply(t,arguments)}},Fr=re,qr=_r,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=_r,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 gi=!ui||ii((function(){var e;return fi(fi.call)||!fi(Object)||!fi((function(){e=!0}))||e}))?mi:fi,vi=ni,bi=gi,yi=it,_i=Ke("species"),wi=Array,ki=function(e){var t;return vi(e)&&(t=e.constructor,(bi(t)&&(t===wi||vi(t.prototype))||yi(t)&&null===(t=t[_i]))&&(t=void 0)),void 0===t?wi:t},Ai=function(e,t){return new(ki(e))(0===t?0:t)},Ei=Nr,xi=Hr,Si=ge,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),g=Ei(c,u),v=Ri(m),b=0,y=l||Di,_=t?y(d,v):n||s?y(d,0):void 0;v>b;b++)if((o||b in m)&&(p=g(h=m[b],b,f),e))if(t)_[b]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:Ti(_,h)}else switch(e){case 4:return!1;case 7:Ti(_,h)}return a?-1:r||i?i:_}},Ii={forEach:Oi(0),map:Oi(1),filter:Oi(2),some:Oi(3),every:Oi(4),find:Oi(5),findIndex:Oi(6),filterReject:Oi(7)},Ci=re,Pi=function(e,t){var n=[][e];return!!n&&Ci((function(){n.call(null,t||function(){return 1},1)}))},Li=Ii.forEach,Ui=W,Mi=Or,ji=Pr,Bi=Pi("forEach")?[].forEach:function(e){return Li(this,e,arguments.length>1?arguments[1]:void 0)},Gi=Tn,Ni=function(e){if(e&&e.forEach!==Bi)try{Gi(e,"forEach",Bi)}catch(t){e.forEach=Bi}};for(var Fi in Mi)Mi[Fi]&&Ni(Ui[Fi]&&Ui[Fi].prototype);Ni(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=ye,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=ye,ga=Qi,va=fa.indexOf,ba=Ln,ya=ce([].push),_a=function(e,t){var n,r=ga(e),i=0,a=[];for(n in r)!ma(ba,n)&&ma(r,n)&&ya(a,n);for(;t.length>i;)ma(r,n=t[i++])&&(~va(a,n)||ya(a,n));return a},wa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ka=_a,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},Ia=ye,Ca=Oa,Pa=qi,La=et,Ua=function(e,t,n){for(var r=Ca(t),i=La.f,a=Pa.f,s=0;s<r.length;s++){var o=r[s];Ia(e,o)||n&&Ia(n,o)||i(e,o,a(t,o))}},Ma=re,ja=Ze,Ba=/#|\.prototype\./,Ga=function(e,t){var n=Fa[Na(e)];return n===Va||n!==qa&&(ja(t)?Ma(t):!!t)},Na=Ga.normalize=function(e){return String(e).replace(Ba,".").toLowerCase()},Fa=Ga.data={},qa=Ga.NATIVE="N",Va=Ga.POLYFILL="P",za=Ga,Ha=W,Wa=qi.f,Ka=Tn,$a=gr,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=_a,es=wa,ts=Object.keys||function(e){return Za(e,es)},ns=ge,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=Ce,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,gs=it,vs=ge,bs=ei,ys=function(e){if(e>9007199254740991)throw is("Maximum allowed index exceeded");return e},_s=ds,ws=Ai,ks=hs,As=Ce,Es=Ke("isConcatSpreadable"),xs=As>=51||!fs((function(){var e=[];return e[Es]=!1,e.concat()[0]!==e})),Ss=function(e){if(!gs(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=vs(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),ys(d+i),n=0;n<i;n++,d++)n in a&&_s(o,d,a[n]);else ys(d+1),_s(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.36.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"}},Is=function(e){var t=Cs("object"===n(e)?e:i(e));return t&&t.version?Os.version>=t.version?t:void 0:t},Cs=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)},Gs={},Ns=tt,Fs=lt,Vs=et,zs=mt,Hs=Qi,Ws=ts;Gs.f=Ns&&!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=Gs,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,go=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},vo=_r,bo=Qi,yo=aa.f,_o=go,wo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];uo.f=function(e){return wo&&"Window"===vo(e)?function(e){try{return yo(e)}catch(e){return _o(wo)}}(e):yo(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=ye,To=xo,Oo=et.f,Io=function(e){var t=Ro.Symbol||(Ro.Symbol={});Do(t,e)||Oo(t,e,{value:To.f(e)})},Co=bt,Po=wt,Lo=Ke,Uo=gr,Mo=et.f,jo=ye,Bo=Ke("toStringTag"),Go=function(e,t,n){e&&!n&&(e=e.prototype),e&&!jo(e,Bo)&&Mo(e,Bo,{configurable:!0,value:t})},No=Xa,Fo=W,qo=bt,Vo=ce,zo=tt,Ho=Me,Wo=re,Ko=ye,$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=Gs,dd=Vi,cd=gr,ud=Eo,ld=K.exports,hd=Ln,pd=Ee,fd=Ke,md=xo,gd=Io,vd=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 Co(n,this)}),{arity:1})},bd=Go,yd=$n,_d=Ii.forEach,wd=Pn("hidden"),kd="Symbol",Ad="prototype",Ed=yd.set,xd=yd.getterFor(kd),Sd=Object[Ad],Rd=Fo.Symbol,Dd=Rd&&Rd[Ad],Td=Fo.RangeError,Od=Fo.TypeError,Id=Fo.QObject,Cd=ad.f,Pd=sd.f,Ld=rd.f,Ud=dd.f,Md=Vo([].push),jd=ld("symbols"),Bd=ld("op-symbols"),Gd=ld("wks"),Nd=!Id||!Id[Ad]||!Id[Ad].findChild,Fd=function(e,t,n){var r=Cd(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 _d(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=Cd(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 _d(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 _d(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){this===Sd&&qo(n,Bd,e),Ko(this,wd)&&Ko(this[wd],t)&&(this[wd][t]=!1);var r=Zo(1,e);try{qd(this,t,r)}catch(e){if(!(e instanceof Td))throw e;Fd(this,t,r)}};return zo&&Nd&&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}))),No({global:!0,constructor:!0,wrap:!0,forced:!Ho,sham:!Ho},{Symbol:Rd}),_d(td(Gd),(function(e){gd(e)})),No({target:kd,stat:!0,forced:!Ho},{useSetter:function(){Nd=!0},useSimple:function(){Nd=!1}}),No({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}),No({target:"Object",stat:!0,forced:!Ho},{getOwnPropertyNames:$d}),vd(),bd(Rd,kd),hd[wd]=!0;var Jd=Me&&!!Symbol.for&&!!Symbol.keyFor,Yd=Xa,Xd=wt,Zd=ye,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=ye,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)}),gc=ce([].slice),vc=ni,bc=Ze,yc=_r,_c=Bs,wc=ce([].push),kc=Xa,Ac=wt,Ec=mc,xc=bt,Sc=ce,Rc=re,Dc=Ze,Tc=Rt,Oc=gc,Ic=function(e){if(bc(e))return e;if(vc(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"!==yc(i)&&"String"!==yc(i)||wc(n,_c(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(vc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Cc=Me,Pc=String,Lc=Ac("JSON","stringify"),Uc=Sc(/./.exec),Mc=Sc("".charAt),jc=Sc("".charCodeAt),Bc=Sc("".replace),Gc=Sc(1..toString),Nc=/[\uD800-\uDFFF]/g,Fc=/^[\uD800-\uDBFF]$/,qc=/^[\uDC00-\uDFFF]$/,Vc=!Cc||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=Ic(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"+Gc(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,Nc,Wc):i}});var Kc=Ea,$c=ge;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=Ii.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=gi,du=it,cu=ca,uu=ei,lu=Qi,hu=ds,pu=Ke,fu=gc,mu=hs("slice"),gu=pu("species"),vu=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===vu||su(n.prototype))||du(n)&&null===(n=n[gu]))&&(n=void 0),n===vu||void 0===n))return fu(a,o,d);for(r=new(void 0===n?vu: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 yu=mt,_u=function(){var e=yu(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=ye,Au=kt,Eu=_u,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=gr,Tu=mt,Ou=Bs,Iu=re,Cu=Su,Pu="toString",Lu=RegExp.prototype[Pu],Uu=Iu((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(Cu(e))}),{unsafe:!0});var ju=bt,Bu=mt,Gu=Mt,Nu=function(e,t,n){var r,i;Bu(e);try{if(!(r=Gu(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=Nu,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=Nr,dl=bt,cl=ge,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=gi,pl=ei,fl=ds,ml=sl,gl=Zu,vl=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=gl(t),p=0;if(!h||this===vl&&ll(h))for(s=pl(t),o=n?new this(s):vl(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},yl=Ke("iterator"),_l=!1;try{var wl=0,kl={next:function(){return{done:!!wl++}},return:function(){_l=!0}};kl[yl]=function(){return this},Array.from(kl,(function(){throw 2}))}catch(e){}var Al=function(e,t){try{if(!t&&!_l)return!1}catch(e){return!1}var n=!1;try{var r={};r[yl]=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,Il=pe,Cl=Dl("".charAt),Pl=Dl("".charCodeAt),Ll=Dl("".slice),Ul=function(e){return function(t,n){var r,i,a=Ol(Il(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?Cl(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=ye,Gl=Ze,Nl=ge,Fl=jl,ql=Pn("IE_PROTO"),Vl=Object,zl=Vl.prototype,Hl=Fl?Vl.getPrototypeOf:function(e){var t=Nl(e);if(Bl(t,ql))return t[ql];var n=t.constructor;return Gl(n)&&t instanceof n?n.prototype:t instanceof Vl?zl:null},Wl=re,Kl=Ze,$l=it,Ql=Hl,Jl=gr,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=Go,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")},gh=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),vh=Xa,bh=bt,yh=Ze,_h=oh,wh=Hl,kh=gh,Ah=Go,Eh=Tn,xh=gr,Sh=Vu,Rh=mn.PROPER,Dh=mn.CONFIGURABLE,Th=eh.IteratorPrototype,Oh=eh.BUGGY_SAFARI_ITERATORS,Ih=Ke("iterator"),Ch="keys",Ph="values",Lh="entries",Uh=function(){return this},Mh=function(e,t,n,r,i,a,s){_h(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 Ch: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[Ih]||p["@@iterator"]||i&&p[i],m=!Oh&&f||u(i),g="Array"===t&&p.entries||f;if(g&&(o=wh(g.call(new e)))!==Object.prototype&&o.next&&(wh(o)!==Th&&(kh?kh(o,Th):yh(o[Ih])||xh(o,Ih,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(Ch),entries:u(Lh)},s)for(c in d)(Oh||h||!(c in p))&&xh(p,c,d[c]);else vh({target:t,proto:!0,forced:Oh||h},d);return p[Ih]!==m&&xh(p,Ih,m,{name:i}),Sh[t]=m,d},jh=function(e,t){return{value:e,done:t}},Bh=Ml.charAt,Gh=Bs,Nh=$n,Fh=Mh,qh=jh,Vh="String Iterator",zh=Nh.set,Hh=Nh.getterFor(Vh);Fh(String,"String",(function(e){zh(this,{type:Vh,string:Gh(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=_u,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,gp=ip("".charAt),vp=ip("".indexOf),bp=ip("".replace),yp=ip("".slice),_p=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];(_p||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,g=0,v=u;if(p&&(f=bp(f,"y",""),-1===vp(f,"g")&&(f+="g"),v=yp(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==gp(u,d.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",f)),kp&&(n=new RegExp("^"+m+"$(?!\\s)",f)),_p&&(r=d.lastIndex),i=rp(fp,p?n:d,v),p?i?(i.input=yp(i.input,g),i[0]=yp(i[0],g),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:_p&&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=ye,Dp=Ze,Tp=kt,Op=Bs,Ip=Eo,Cp=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};Cp(Mp,Pp),Mp.prototype=Lp,Lp.constructor=Mp;var jp="Symbol(description detection)"===String(Pp("description detection")),Bp=Sp(Lp.valueOf),Gp=Sp(Lp.toString),Np=/^Symbol\((.*)\)[^)]+$/,Fp=Sp("".replace),qp=Sp("".slice);Ip(Lp,"description",{configurable:!0,get:function(){var e=Bp(this);if(Rp(Up,e))return"";var t=Gp(e),n=jp?qp(t,7,-1):Fp(t,Np,"$1");return""===n?void 0:n}}),Ep({global:!0,constructor:!0,forced:!0},{Symbol:Mp})}Io("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.kind,r=e.index++;if(!t||r>=t.length)return e.target=void 0,tf(void 0,!0);switch(n){case"keys":return tf(r,!1);case"values":return tf(t[r],!1)}return tf([r,t[r]],!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=Ke,mf=ff("iterator"),gf=ff("toStringTag"),vf=hf.values,bf=function(e,t){if(e){if(e[mf]!==vf)try{pf(e,mf,vf)}catch(t){e[mf]=vf}if(e[gf]||pf(e,gf,t),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 yf in uf)bf(cf[yf]&&cf[yf].prototype,yf);bf(lf,"DOMTokenList");var _f,wf,kf,Af,Ef="process"===_r(W.process),xf=wt,Sf=Eo,Rf=tt,Df=Ke("species"),Tf=function(e){var t=xf(e);Rf&&t&&!t[Df]&&Sf(t,Df,{configurable:!0,get:function(){return this}})},Of=kt,If=TypeError,Cf=function(e,t){if(Of(t,e))return e;throw new If("Incorrect invocation")},Pf=gi,Lf=Tt,Uf=TypeError,Mf=mt,jf=function(e){if(Pf(e))return e;throw new Uf(Lf(e)+" is not a constructor")},Bf=ue,Gf=Ke("species"),Nf=function(e,t){var n,r=Mf(e).constructor;return void 0===r||Bf(n=Mf(r)[Gf])?t:jf(n)},Ff=TypeError,qf=function(e,t){if(e<t)throw new Ff("Not enough arguments");return e},Vf=/(?:ipad|iphone|ipod).*applewebkit/i.test(xe),zf=W,Hf=mc,Wf=Nr,Kf=Ze,$f=ye,Qf=re,Jf=$s,Yf=gc,Xf=dt,Zf=qf,em=Vf,tm=Ef,nm=zf.setImmediate,rm=zf.clearImmediate,im=zf.process,am=zf.Dispatch,sm=zf.Function,om=zf.MessageChannel,dm=zf.String,cm=0,um={},lm="onreadystatechange";Qf((function(){_f=zf.location}));var hm=function(e){if($f(um,e)){var t=um[e];delete um[e],t()}},pm=function(e){return function(){hm(e)}},fm=function(e){hm(e.data)},mm=function(e){zf.postMessage(dm(e),_f.protocol+"//"+_f.host)};nm&&rm||(nm=function(e){Zf(arguments.length,1);var t=Kf(e)?e:sm(e),n=Yf(arguments,1);return um[++cm]=function(){Hf(t,void 0,n)},wf(cm),cm},rm=function(e){delete um[e]},tm?wf=function(e){im.nextTick(pm(e))}:am&&am.now?wf=function(e){am.now(pm(e))}:om&&!em?(Af=(kf=new om).port2,kf.port1.onmessage=fm,wf=Wf(Af.postMessage,Af)):zf.addEventListener&&Kf(zf.postMessage)&&!zf.importScripts&&_f&&"file:"!==_f.protocol&&!Qf(mm)?(wf=mm,zf.addEventListener("message",fm,!1)):wf=lm in Xf("script")?function(e){Jf.appendChild(Xf("script"))[lm]=function(){Jf.removeChild(this),hm(e)}}:function(e){setTimeout(pm(e),0)});var gm={set:nm,clear:rm},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 bm,ym,_m,wm,km,Am=vm,Em=/ipad|iphone|ipod/i.test(xe)&&"undefined"!=typeof Pebble,xm=/web0s(?!.*chrome)/i.test(xe),Sm=W,Rm=Nr,Dm=qi.f,Tm=gm.set,Om=Am,Im=Vf,Cm=Em,Pm=xm,Lm=Ef,Um=Sm.MutationObserver||Sm.WebKitMutationObserver,Mm=Sm.document,jm=Sm.process,Bm=Sm.Promise,Gm=Dm(Sm,"queueMicrotask"),Nm=Gm&&Gm.value;if(!Nm){var Fm=new Om,qm=function(){var e,t;for(Lm&&(e=jm.domain)&&e.exit();t=Fm.get();)try{t()}catch(e){throw Fm.head&&bm(),e}e&&e.enter()};Im||Lm||Pm||!Um||!Mm?!Cm&&Bm&&Bm.resolve?((wm=Bm.resolve(void 0)).constructor=Bm,km=Rm(wm.then,wm),bm=function(){km(qm)}):Lm?bm=function(){jm.nextTick(qm)}:(Tm=Rm(Tm,Sm),bm=function(){Tm(qm)}):(ym=!0,_m=Mm.createTextNode(""),new Um(qm).observe(_m,{characterData:!0}),bm=function(){_m.data=ym=!ym}),Nm=function(e){Fm.head||bm(),Fm.add(e)}}var Vm=Nm,zm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Hm=W.Promise,Wm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Km=!Wm&&!Ef&&"object"==typeof window&&"object"==typeof document,$m=W,Qm=Hm,Jm=Ze,Ym=za,Xm=kn,Zm=Ke,eg=Km,tg=Wm,ng=Ce;Qm&&Qm.prototype;var rg=Zm("species"),ig=!1,ag=Jm($m.PromiseRejectionEvent),sg=Ym("Promise",(function(){var e=Xm(Qm),t=e!==String(Qm);if(!t&&66===ng)return!0;if(!ng||ng<51||!/native code/.test(e)){var n=new Qm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[rg]=r,!(ig=n.then((function(){}))instanceof r))return!0}return!t&&(eg||tg)&&!ag})),og={CONSTRUCTOR:sg,REJECTION_EVENT:ag,SUBCLASSING:ig},dg={},cg=Pt,ug=TypeError,lg=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new ug("Bad Promise constructor");t=e,n=r})),this.resolve=cg(t),this.reject=cg(n)};dg.f=function(e){return new lg(e)};var hg,pg,fg,mg=Xa,gg=Ef,vg=W,bg=bt,yg=gr,_g=gh,wg=Go,kg=Tf,Ag=Pt,Eg=Ze,xg=it,Sg=Cf,Rg=Nf,Dg=gm.set,Tg=Vm,Og=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}},Ig=zm,Cg=Am,Pg=$n,Lg=Hm,Ug=dg,Mg="Promise",jg=og.CONSTRUCTOR,Bg=og.REJECTION_EVENT,Gg=og.SUBCLASSING,Ng=Pg.getterFor(Mg),Fg=Pg.set,qg=Lg&&Lg.prototype,Vg=Lg,zg=qg,Hg=vg.TypeError,Wg=vg.document,Kg=vg.process,$g=Ug.f,Qg=$g,Jg=!!(Wg&&Wg.createEvent&&vg.dispatchEvent),Yg="unhandledrejection",Xg=function(e){var t;return!(!xg(e)||!Eg(t=e.then))&&t},Zg=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&&iv(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?c(new Hg("Promise-chain cycle")):(r=Xg(n))?bg(r,n,d,c):d(n)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},ev=function(e,t){e.notified||(e.notified=!0,Tg((function(){for(var n,r=e.reactions;n=r.get();)Zg(n,e);e.notified=!1,t&&!e.rejection&&nv(e)})))},tv=function(e,t,n){var r,i;Jg?((r=Wg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),vg.dispatchEvent(r)):r={promise:t,reason:n},!Bg&&(i=vg["on"+e])?i(r):e===Yg&&Og("Unhandled promise rejection",n)},nv=function(e){bg(Dg,vg,(function(){var t,n=e.facade,r=e.value;if(rv(e)&&(t=Ig((function(){gg?Kg.emit("unhandledRejection",r,n):tv(Yg,n,r)})),e.rejection=gg||rv(e)?2:1,t.error))throw t.value}))},rv=function(e){return 1!==e.rejection&&!e.parent},iv=function(e){bg(Dg,vg,(function(){var t=e.facade;gg?Kg.emit("rejectionHandled",t):tv("rejectionhandled",t,e.value)}))},av=function(e,t,n){return function(r){e(t,r,n)}},sv=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,ev(e,!0))},ov=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new Hg("Promise can't be resolved itself");var r=Xg(t);r?Tg((function(){var n={done:!1};try{bg(r,t,av(ov,n,e),av(sv,n,e))}catch(t){sv(n,t,e)}})):(e.value=t,e.state=1,ev(e,!1))}catch(t){sv({done:!1},t,e)}}};if(jg&&(zg=(Vg=function(e){Sg(this,zg),Ag(e),bg(hg,this);var t=Ng(this);try{e(av(ov,t),av(sv,t))}catch(e){sv(t,e)}}).prototype,(hg=function(e){Fg(this,{type:Mg,done:!1,notified:!1,parent:!1,reactions:new Cg,rejection:!1,state:0,value:void 0})}).prototype=yg(zg,"then",(function(e,t){var n=Ng(this),r=$g(Rg(this,Vg));return n.parent=!0,r.ok=!Eg(e)||e,r.fail=Eg(t)&&t,r.domain=gg?Kg.domain:void 0,0===n.state?n.reactions.add(r):Tg((function(){Zg(r,n)})),r.promise})),pg=function(){var e=new hg,t=Ng(e);this.promise=e,this.resolve=av(ov,t),this.reject=av(sv,t)},Ug.f=$g=function(e){return e===Vg||undefined===e?new pg(e):Qg(e)},Eg(Lg)&&qg!==Object.prototype)){fg=qg.then,Gg||yg(qg,"then",(function(e,t){var n=this;return new Vg((function(e,t){bg(fg,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete qg.constructor}catch(e){}_g&&_g(qg,zg)}mg({global:!0,constructor:!0,wrap:!0,forced:jg},{Promise:Vg}),wg(Vg,Mg,!1),kg(Mg);var dv=Nr,cv=bt,uv=mt,lv=Tt,hv=Ku,pv=ei,fv=kt,mv=sl,gv=Zu,vv=Nu,bv=TypeError,yv=function(e,t){this.stopped=e,this.result=t},_v=yv.prototype,wv=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=dv(t,u),g=function(e){return r&&vv(r,"normal",e),new yv(!0,e)},v=function(e){return l?(uv(e),f?m(e[0],e[1],g):m(e[0],e[1])):f?m(e,g):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=gv(e)))throw new bv(lv(e)+" is not iterable");if(hv(i)){for(a=0,s=pv(e);s>a;a++)if((o=v(e[a]))&&fv(_v,o))return o;return new yv(!1)}r=mv(e,i)}for(d=h?e.next:r.next;!(c=cv(d,r)).done;){try{o=v(c.value)}catch(e){vv(r,"throw",e)}if("object"==typeof o&&o&&fv(_v,o))return o}return new yv(!1)},kv=Hm,Av=og.CONSTRUCTOR||!Al((function(e){kv.all(e).then(void 0,(function(){}))})),Ev=bt,xv=Pt,Sv=dg,Rv=zm,Dv=wv;Xa({target:"Promise",stat:!0,forced:Av},{all:function(e){var t=this,n=Sv.f(t),r=n.resolve,i=n.reject,a=Rv((function(){var n=xv(t.resolve),a=[],s=0,o=1;Dv(e,(function(e){var d=s++,c=!1;o++,Ev(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 Tv=Xa,Ov=og.CONSTRUCTOR,Iv=Hm,Cv=wt,Pv=Ze,Lv=gr,Uv=Iv&&Iv.prototype;if(Tv({target:"Promise",proto:!0,forced:Ov,real:!0},{catch:function(e){return this.then(void 0,e)}}),Pv(Iv)){var Mv=Cv("Promise").prototype.catch;Uv.catch!==Mv&&Lv(Uv,"catch",Mv,{unsafe:!0})}var jv=bt,Bv=Pt,Gv=dg,Nv=zm,Fv=wv;Xa({target:"Promise",stat:!0,forced:Av},{race:function(e){var t=this,n=Gv.f(t),r=n.reject,i=Nv((function(){var i=Bv(t.resolve);Fv(e,(function(e){jv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var qv=bt,Vv=dg;Xa({target:"Promise",stat:!0,forced:og.CONSTRUCTOR},{reject:function(e){var t=Vv.f(this);return qv(t.reject,void 0,e),t.promise}});var zv=mt,Hv=it,Wv=dg,Kv=function(e,t){if(zv(e),Hv(t)&&t.constructor===e)return t;var n=Wv.f(e);return(0,n.resolve)(t),n.promise},$v=Xa,Qv=og.CONSTRUCTOR,Jv=Kv;wt("Promise"),$v({target:"Promise",stat:!0,forced:Qv},{resolve:function(e){return Jv(this,e)}});var Yv=tt,Xv=mn.EXISTS,Zv=ce,eb=Eo,tb=Function.prototype,nb=Zv(tb.toString),rb=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,ib=Zv(rb.exec);function ab(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 sb(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 sb(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 sb(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 ob(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 db(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ob(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ob(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Yv&&!Xv&&eb(tb,"name",{configurable:!0,get:function(){try{return ib(rb,nb(this))[1]}catch(e){return""}}});var cb,ub={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"}},lb={},hb=function(e,t){lb[e]=db(db({},t),{},{isLoading:!1})},pb=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))},fb=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=lb[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=ab(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=ub[o].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,pb({id:o,src:ub[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,pb({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)}}(),mb=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,fb("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"]},hb(this.moduleName,this.moduleConfig)})),gb=new mb,vb=it,bb=_r,yb=Ke("match"),_b=function(e){var t;return vb(e)&&(void 0!==(t=e[yb])?!!t:"RegExp"===bb(e))},wb=_b,kb=TypeError,Ab=function(e){if(wb(e))throw new kb("The method doesn't accept regular expressions");return e},Eb=Ke("match"),xb=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Eb]=!1,"/./"[e](t)}catch(e){}}return!1},Sb=Xa,Rb=Mr,Db=qi.f,Tb=Xr,Ob=Bs,Ib=Ab,Cb=pe,Pb=xb,Lb=Rb("".startsWith),Ub=Rb("".slice),Mb=Math.min,jb=Pb("startsWith");Sb({target:"String",proto:!0,forced:!!(jb||(cb=Db(String.prototype,"startsWith"),!cb||cb.writable))&&!jb},{startsWith:function(e){var t=Ob(Cb(this));Ib(e);var n=Tb(Mb(arguments.length>1?arguments[1]:void 0,t.length)),r=Ob(e);return Lb?Lb(t,r,n):Ub(t,n,n+r.length)===r}});var Bb=Mr,Gb=gr,Nb=Ap,Fb=re,qb=Ke,Vb=Tn,zb=qb("species"),Hb=RegExp.prototype,Wb=function(e,t,n,r){var i=qb(e),a=!Fb((function(){var t={};return t[i]=function(){return 7},7!==""[e](t)})),s=a&&!Fb((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[zb]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=Bb(/./[i]),d=t(i,""[e],(function(e,t,n,r,i){var s=Bb(e),d=t.exec;return d===Nb||d===Hb.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Gb(String.prototype,e,d[0]),Gb(Hb,i,d[1])}r&&Vb(Hb[i],"sham",!0)},Kb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},$b=bt,Qb=mt,Jb=Ze,Yb=_r,Xb=Ap,Zb=TypeError,ey=function(e,t){var n=e.exec;if(Jb(n)){var r=$b(n,e,t);return null!==r&&Qb(r),r}if("RegExp"===Yb(e))return $b(Xb,e,t);throw new Zb("RegExp#exec called on incompatible receiver")},ty=bt,ny=mt,ry=ue,iy=pe,ay=Kb,sy=Bs,oy=Mt,dy=ey;function cy(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 uy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cy(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Wb("search",(function(e,t,n){return[function(t){var n=iy(this),r=ry(t)?void 0:oy(t,e);return r?ty(r,t,n):new RegExp(t)[e](sy(n))},function(e){var r=ny(this),i=sy(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ay(s,0)||(r.lastIndex=0);var o=dy(r,i);return ay(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var ly,hy,py=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,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",v);var b=(e||n)&&r.loaderEnabled,y=(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:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,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(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new 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=uy(uy({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),fy=function(){try{return(new py).getBridgeContext()}catch(e){return{}}}(),my={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(ly=!1,(hy=d("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===hy.xanthophyll&&(ly=!0),ly)},gy=Ml.charAt,vy=ce,by=ge,yy=Math.floor,_y=vy("".charAt),wy=vy("".replace),ky=vy("".slice),Ay=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ey=/\$([$&'`]|\d{1,2})/g,xy=mc,Sy=bt,Ry=ce,Dy=Wb,Ty=re,Oy=mt,Iy=Ze,Cy=ue,Py=Qr,Ly=Xr,Uy=Bs,My=pe,jy=function(e,t,n){return t+(n?gy(e,t).length:1)},By=Mt,Gy=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,d=Ey;return void 0!==i&&(i=by(i),d=Ay),wy(a,d,(function(a,d){var c;switch(_y(d,0)){case"$":return"$";case"&":return e;case"`":return ky(t,0,n);case"'":return ky(t,s);case"<":c=i[ky(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>o){var l=yy(u/10);return 0===l?a:l<=o?void 0===r[l-1]?_y(d,1):r[l-1]+_y(d,1):a}c=r[u-1]}return void 0===c?"":c}))},Ny=ey,Fy=Ke("replace"),qy=Math.max,Vy=Math.min,zy=Ry([].concat),Hy=Ry([].push),Wy=Ry("".indexOf),Ky=Ry("".slice),$y="$0"==="a".replace(/./,"$0"),Qy=!!/./[Fy]&&""===/./[Fy]("a","$0");Dy("replace",(function(e,t,n){var r=Qy?"$":"$0";return[function(e,n){var r=My(this),i=Cy(e)?void 0:By(e,Fy);return i?Sy(i,e,r,n):Sy(t,Uy(r),e,n)},function(e,i){var a=Oy(this),s=Uy(e);if("string"==typeof i&&-1===Wy(i,r)&&-1===Wy(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var d=Iy(i);d||(i=Uy(i));var c,u=a.global;u&&(c=a.unicode,a.lastIndex=0);for(var l,h=[];null!==(l=Ny(a,s))&&(Hy(h,l),u);){""===Uy(l[0])&&(a.lastIndex=jy(s,Ly(a.lastIndex),c))}for(var p,f="",m=0,g=0;g<h.length;g++){for(var v,b=Uy((l=h[g])[0]),y=qy(Vy(Py(l.index),s.length),0),_=[],w=1;w<l.length;w++)Hy(_,void 0===(p=l[w])?p:String(p));var k=l.groups;if(d){var A=zy([b],_,y,s);void 0!==k&&Hy(A,k),v=Uy(xy(i,void 0,A))}else v=Gy(b,s,y,_,k,i);y>=m&&(f+=Ky(s,m,y)+v,m=y+b.length)}return f+Ky(s,m)}]}),!!Ty((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!$y||Qy);var Jy=re,Yy=tt,Xy=Ke("iterator"),Zy=!Jy((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&&!Yy||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Xy]||"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})),e_=gr,t_=go,n_=Math.floor,r_=function(e,t){var n=e.length,r=n_(n/2);return n<8?i_(e,t):a_(e,r_(t_(e,0,r),t),r_(t_(e,r),t),t)},i_=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},a_=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},s_=Xa,o_=W,d_=bt,c_=ce,u_=tt,l_=Zy,h_=gr,p_=Eo,f_=function(e,t,n){for(var r in t)e_(e,r,t[r],n);return e},m_=Go,g_=oh,v_=$n,b_=Cf,y_=Ze,__=ye,w_=Nr,k_=Rr,A_=mt,E_=it,x_=Bs,S_=co,R_=Sn,D_=sl,T_=Zu,O_=qf,I_=r_,C_=Ke("iterator"),P_="URLSearchParams",L_=P_+"Iterator",U_=v_.set,M_=v_.getterFor(P_),j_=v_.getterFor(L_),B_=Object.getOwnPropertyDescriptor,G_=function(e){if(!u_)return o_[e];var t=B_(o_,e);return t&&t.value},N_=G_("fetch"),F_=G_("Request"),q_=G_("Headers"),V_=F_&&F_.prototype,z_=q_&&q_.prototype,H_=o_.RegExp,W_=o_.TypeError,K_=o_.decodeURIComponent,$_=o_.encodeURIComponent,Q_=c_("".charAt),J_=c_([].join),Y_=c_([].push),X_=c_("".replace),Z_=c_([].shift),ew=c_([].splice),tw=c_("".split),nw=c_("".slice),rw=/\+/g,iw=Array(4),aw=function(e){return iw[e-1]||(iw[e-1]=H_("((?:%[\\da-f]{2}){"+e+"})","gi"))},sw=function(e){try{return K_(e)}catch(t){return e}},ow=function(e){var t=X_(e,rw," "),n=4;try{return K_(t)}catch(e){for(;n;)t=X_(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 X_($_(e),dw,uw)},hw=g_((function(e,t){U_(this,{type:L_,iterator:D_(M_(e).entries),kind:t})}),"Iterator",(function(){var e=j_(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),pw=function(e){this.entries=[],this.url=null,void 0!==e&&(E_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Q_(e,0)?nw(e,1):e:x_(e)))};pw.prototype={type:P_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,d=T_(e);if(d)for(n=(t=D_(e,d)).next;!(r=d_(n,t)).done;){if(a=(i=D_(A_(r.value))).next,(s=d_(a,i)).done||(o=d_(a,i)).done||!d_(a,i).done)throw new W_("Expected sequence with length 2");Y_(this.entries,{key:x_(s.value),value:x_(o.value)})}else for(var c in e)__(e,c)&&Y_(this.entries,{key:c,value:x_(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=tw(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=tw(t,"="),Y_(this.entries,{key:ow(Z_(n)),value:ow(J_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Y_(n,lw(e.key)+"="+lw(e.value));return J_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var fw=function(){b_(this,mw);var e=U_(this,new pw(arguments.length>0?arguments[0]:void 0));u_||(this.size=e.entries.length)},mw=fw.prototype;if(f_(mw,{append:function(e,t){var n=M_(this);O_(arguments.length,2),Y_(n.entries,{key:x_(e),value:x_(t)}),u_||this.length++,n.updateURL()},delete:function(e){for(var t=M_(this),n=O_(arguments.length,1),r=t.entries,i=x_(e),a=n<2?void 0:arguments[1],s=void 0===a?a:x_(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}u_||(this.size=r.length),t.updateURL()},get:function(e){var t=M_(this).entries;O_(arguments.length,1);for(var n=x_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=M_(this).entries;O_(arguments.length,1);for(var n=x_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Y_(r,t[i].value);return r},has:function(e){for(var t=M_(this).entries,n=O_(arguments.length,1),r=x_(e),i=n<2?void 0:arguments[1],a=void 0===i?i:x_(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=M_(this);O_(arguments.length,1);for(var r,i=n.entries,a=!1,s=x_(e),o=x_(t),d=0;d<i.length;d++)(r=i[d]).key===s&&(a?ew(i,d--,1):(a=!0,r.value=o));a||Y_(i,{key:s,value:o}),u_||(this.size=i.length),n.updateURL()},sort:function(){var e=M_(this);I_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=M_(this).entries,r=w_(e,arguments.length>1?arguments[1]:void 0),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new hw(this,"keys")},values:function(){return new hw(this,"values")},entries:function(){return new hw(this,"entries")}},{enumerable:!0}),h_(mw,C_,mw.entries,{name:"entries"}),h_(mw,"toString",(function(){return M_(this).serialize()}),{enumerable:!0}),u_&&p_(mw,"size",{get:function(){return M_(this).entries.length},configurable:!0,enumerable:!0}),m_(fw,P_),s_({global:!0,constructor:!0,forced:!l_},{URLSearchParams:fw}),!l_&&y_(q_)){var gw=c_(z_.has),vw=c_(z_.set),bw=function(e){if(E_(e)){var t,n=e.body;if(k_(n)===P_)return t=e.headers?new q_(e.headers):new q_,gw(t,"content-type")||vw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),S_(e,{body:R_(0,x_(n)),headers:R_(0,t)})}return e};if(y_(N_)&&s_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return N_(e,arguments.length>1?bw(arguments[1]):{})}}),y_(F_)){var yw=function(e){return b_(this,V_),new F_(e,arguments.length>1?bw(arguments[1]):{})};V_.constructor=yw,yw.prototype=V_,s_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:yw})}}var _w={URLSearchParams:fw,getState:M_},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=Ab,xw=pe,Sw=Bs,Rw=xb,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),C.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||{},Iw="URLSearchParams"in Ow,Cw="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 Gw(e){return"string"!=typeof e&&(e=String(e)),e}function Nw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Cw&&(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:Iw&&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):Iw&&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=Gw(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)]=Gw(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)})),Nw(e)},Fw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Nw(e)},Fw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Nw(e)},Cw&&(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,Gw(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:fy.topDomain,domain:fy.parentDomain,referrer:fy.parentURL,depth:o(),version:Os.version,byloader:fy.isTokenGameURL,isTokenGameURL:fy.isTokenGameURL,isMasterGameURL:fy.isMasterGameURL,isExtHostedGameURL:fy.isExtHostedGameURL,byloaderVersion:fy.version,tracking:my.userDeclinedTracking,whitelabel:my.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)},gk=function(e){uk=tk(hk=e)},vk=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,_k(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(yk(),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,_k(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)}},yk=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,g,v=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,v);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 g=e.sent,e.abrupt("return",g);case 11:case"end":return e.stop()}}),e,this)})))},_k=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,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:Is(d.adspn)||{},__t4r:Is(d.__t4r)||{},block_exts:Is(d.push_cuda),bloc_gard:Is(d.bloc_gard),cookie:Is(d.cookie),gdpr:Is(d.gdpr),diagnostic:Is(d.diagnostic),cmp:Is(d.cmp),gft:Is(d.gft)||{},sdk:Is(d.sdk)||{},sdkfw:Is(d.sdkfw)||{},loader:Is(d.loader)||{},splash:Is(d.splash)||{},promo:Is(d.promo)||{},dAds:Is(d.dads)||{},pAds:Is(d.pads)||{},mAds:Is(d.mads)||{},rAds:Is(d.rads)||{},lp:Is(d.lp)||{},extsc:Is(d.extsc)||{},evnts:Is(d.evnts)||{},dp:Is(d.dp)||{},adflw:Is(d.adflw)||{},afgszf:Is(d.afgszf)||{},fllc:Is(d.fllc)||{},lotm:Is(d.lotm)||{},t4rc:Is(d.t4rc)||{},midroll_plus:Is(d.midroll_plus)||{},gmky:Is(d.gmky)||{},urlBlockExc:Is(d.url_blck_exc)||{},sdk_wrp:Is(d.sdk_wrp)||{},dbglg:Is(d.dbglg)||{},extHosting:Is(d.ext_hosting)||{},directTokenUse:Is(d.dtu)||{},aeria:Is(d.aeria)||{}};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,vk();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,vk();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,vk();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,vk();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=Hm,Ik=re,Ck=wt,Pk=Ze,Lk=Nf,Uk=Kv,Mk=gr,jk=Ok&&Ok.prototype;if(Tk({target:"Promise",proto:!0,real:!0,forced:!!Ok&&Ik((function(){jk.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Lk(this,Ck("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=Ck("Promise").prototype.finally;jk.finally!==Bk&&Mk(jk,"finally",Bk,{unsafe:!0})}var Gk="\t\n\v\f\r                 \u2028\u2029\ufeff",Nk=pe,Fk=Bs,qk=Gk,Vk=ce("".replace),zk=RegExp("^["+qk+"]+"),Hk=RegExp("(^|[^"+qk+"])["+qk+"]+$"),Wk=function(e){return function(t){var n=Fk(Nk(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=Gk,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=Ii.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=gh,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=aa.f,fA=kt,mA=_b,gA=Bs,vA=Su,bA=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}})},_A=gr,wA=re,kA=ye,AA=$n.enforce,EA=Tf,xA=Zh,SA=np,RA=Ke("match"),DA=dA.RegExp,TA=DA.prototype,OA=dA.SyntaxError,IA=cA(TA.exec),CA=cA("".charAt),PA=cA("".replace),LA=cA("".indexOf),UA=cA("".slice),MA=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,jA=/a/g,BA=/a/g,GA=new DA(jA)!==jA,NA=bA.MISSED_STICKY,FA=bA.UNSUPPORTED_Y,qA=oA&&(!GA||NA||xA||SA||wA((function(){return BA[RA]=!1,DA(jA)!==jA||DA(BA)===BA||"/a/i"!==String(DA(jA,"i"))})));if(uA("RegExp",qA)){for(var VA=function(e,t){var n,r,i,a,s,o,d=fA(TA,this),c=mA(e),u=void 0===t,l=[],h=e;if(!d&&c&&u&&e.constructor===VA)return e;if((c||fA(TA,e))&&(e=e.source,u&&(t=vA(h))),e=void 0===e?"":gA(e),t=void 0===t?"":gA(t),h=e,xA&&"dotAll"in jA&&(r=!!t&&LA(t,"s")>-1)&&(t=PA(t,/s/g,"")),n=t,NA&&"sticky"in jA&&(i=!!t&&LA(t,"y")>-1)&&FA&&(t=PA(t,/y/g,"")),SA&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,d=!1,c=0,u="";r<=n;r++){if("\\"===(t=CA(e,r)))t+=CA(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:IA(MA,UA(e,r+1))&&(r+=2,d=!0),i+=t,c++;continue;case">"===t&&d:if(""===u||kA(s,u))throw new OA("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(DA(e,t),d?this:TA,VA),(r||i||l.length)&&(o=AA(s),r&&(o.dotAll=!0,o.raw=VA(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=CA(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+CA(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},zA=pA(DA),HA=0;zA.length>HA;)yA(VA,DA,zA[HA++]);TA.constructor=VA,VA.prototype=TA,_A(dA,"RegExp",VA,{constructor:!0})}EA("RegExp");var WA=Xa,KA=Hr,$A=Qi,QA=Pi,JA=ce([].join);WA({target:"Array",proto:!0,forced:KA!==Object||!QA("join",",")},{join:function(e){return JA($A(this),void 0===e?",":e)}});var YA=Ii.map;Xa({target:"Array",proto:!0,forced:!hs("map")},{map:function(e){return YA(this,e,arguments.length>1?arguments[1]:void 0)}});var XA=tt,ZA=ce,eE=bt,tE=re,nE=ts,rE=Ea,iE=Vi,aE=ge,sE=Hr,oE=Object.assign,dE=Object.defineProperty,cE=ZA([].concat),uE=!oE||tE((function(){if(XA&&1!==oE({b:1},oE(dE({},"a",{enumerable:!0,get:function(){dE(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!==oE({},e)[n]||nE(oE({},t)).join("")!==r}))?function(e,t){for(var n=aE(e),r=arguments.length,i=1,a=rE.f,s=iE.f;r>i;)for(var o,d=sE(arguments[i++]),c=a?cE(nE(d),a(d)):nE(d),u=c.length,l=0;u>l;)o=c[l++],XA&&!eE(s,d,o)||(n[o]=d[o]);return n}:oE,lE=uE;Xa({target:"Object",stat:!0,arity:2,forced:Object.assign!==lE},{assign:lE});var hE,pE=ce,fE=2147483647,mE=/[^\0-\u007E]/,gE=/[.\u3002\uFF0E\uFF61]/g,vE="Overflow: input needs wider integers to process",bE=RangeError,yE=pE(gE.exec),_E=Math.floor,wE=String.fromCharCode,kE=pE("".charCodeAt),AE=pE([].join),EE=pE([].push),xE=pE("".replace),SE=pE("".split),RE=pE("".toLowerCase),DE=function(e){return e+22+75*(e<26)},TE=function(e,t,n){var r=0;for(e=n?_E(e/700):e>>1,e+=_E(e/t);e>455;)e=_E(e/35),r+=36;return _E(r+36*e/(e+38))},OE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=kE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=kE(e,n++);56320==(64512&a)?EE(t,((1023&i)<<10)+(1023&a)+65536):(EE(t,i),n--)}else EE(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&&EE(t,wE(r));var d=t.length,c=d;for(d&&EE(t,"-");c<i;){var u=fE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=c+1;if(u-a>_E((fE-s)/l))throw new bE(vE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>fE)throw new bE(vE);if(r===a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,g=36-f;EE(t,wE(DE(f+m%g))),h=_E(m/g),p+=36}EE(t,wE(DE(h))),o=TE(s,l,c===d),s=0,c++}}s++,a++}return AE(t,"")},IE=Xa,CE=tt,PE=Zy,LE=W,UE=Nr,ME=ce,jE=gr,BE=Eo,GE=Cf,NE=ye,FE=uE,qE=bl,VE=go,zE=Ml.codeAt,HE=function(e){var t,n,r=[],i=SE(xE(RE(e),gE,"."),".");for(t=0;t<i.length;t++)n=i[t],EE(r,yE(mE,n)?"xn--"+OE(n):n);return AE(r,".")},WE=Bs,KE=Go,$E=qf,QE=_w,JE=$n,YE=JE.set,XE=JE.getterFor("URL"),ZE=QE.URLSearchParams,ex=QE.getState,tx=LE.URL,nx=LE.TypeError,rx=LE.parseInt,ix=Math.floor,ax=Math.pow,sx=ME("".charAt),ox=ME(/./.exec),dx=ME([].join),cx=ME(1..toString),ux=ME([].pop),lx=ME([].push),hx=ME("".replace),px=ME([].shift),fx=ME("".split),mx=ME("".slice),gx=ME("".toLowerCase),vx=ME([].unshift),bx="Invalid scheme",yx="Invalid host",_x="Invalid port",wx=/[a-z]/i,kx=/[\d+-.a-z]/i,Ax=/\d/,Ex=/^0x/i,xx=/^[0-7]+$/,Sx=/^\d+$/,Rx=/^[\da-f]+$/i,Dx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Tx=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ox=/^[\u0000-\u0020]+/,Ix=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Cx=/[\t\n\r]/g,Px=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)vx(t,e%256),e=ix(e/256);return dx(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+=cx(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Lx={},Ux=FE({},Lx,{" ":1,'"':1,"<":1,">":1,"`":1}),Mx=FE({},Ux,{"#":1,"?":1,"{":1,"}":1}),jx=FE({},Mx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Bx=function(e,t){var n=zE(e,0);return n>32&&n<127&&!NE(t,e)?e:encodeURIComponent(e)},Gx={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Nx=function(e,t){var n;return 2===e.length&&ox(wx,sx(e,0))&&(":"===(n=sx(e,1))||!t&&"|"===n)},Fx=function(e){var t;return e.length>1&&Nx(mx(e,0,2))&&(2===e.length||"/"===(t=sx(e,2))||"\\"===t||"?"===t||"#"===t)},qx=function(e){return"."===e||"%2e"===gx(e)},Vx={},zx={},Hx={},Wx={},Kx={},$x={},Qx={},Jx={},Yx={},Xx={},Zx={},eS={},tS={},nS={},rS={},iS={},aS={},sS={},oS={},dS={},cS={},uS=function(e,t,n){var r,i,a,s=WE(e);if(t){if(i=this.parse(s))throw new nx(i);this.searchParams=null}else{if(void 0!==n&&(r=new uS(n,!0)),i=this.parse(s,null,r))throw new nx(i);(a=ex(new ZE)).bindURL(this),this.searchParams=a}};uS.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,d=this,c=t||Vx,u=0,l="",h=!1,p=!1,f=!1;for(e=WE(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=hx(e,Ox,""),e=hx(e,Ix,"$1")),e=hx(e,Cx,""),r=qE(e);u<=r.length;){switch(i=r[u],c){case Vx:if(!i||!ox(wx,i)){if(t)return bx;c=Hx;continue}l+=gx(i),c=zx;break;case zx:if(i&&(ox(kx,i)||"+"===i||"-"===i||"."===i))l+=gx(i);else{if(":"!==i){if(t)return bx;l="",c=Hx,u=0;continue}if(t&&(d.isSpecial()!==NE(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=nS:d.isSpecial()&&n&&n.scheme===d.scheme?c=Wx:d.isSpecial()?c=Jx:"/"===r[u+1]?(c=Kx,u++):(d.cannotBeABaseURL=!0,lx(d.path,""),c=oS)}break;case Hx:if(!n||n.cannotBeABaseURL&&"#"!==i)return bx;if(n.cannotBeABaseURL&&"#"===i){d.scheme=n.scheme,d.path=VE(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,c=cS;break}c="file"===n.scheme?nS:$x;continue;case Wx:if("/"!==i||"/"!==r[u+1]){c=$x;continue}c=Yx,u++;break;case Kx:if("/"===i){c=Xx;break}c=sS;continue;case $x:if(d.scheme=n.scheme,i===hE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=VE(n.path),d.query=n.query;else if("/"===i||"\\"===i&&d.isSpecial())c=Qx;else if("?"===i)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=VE(n.path),d.query="",c=dS;else{if("#"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=VE(n.path),d.path.length--,c=sS;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=VE(n.path),d.query=n.query,d.fragment="",c=cS}break;case Qx:if(!d.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,c=sS;continue}c=Xx}else c=Yx;break;case Jx:if(c=Yx,"/"!==i||"/"!==sx(l,u+1))continue;u++;break;case Yx:if("/"!==i&&"\\"!==i){c=Xx;continue}break;case Xx:if("@"===i){h&&(l="%40"+l),h=!0,a=qE(l);for(var m=0;m<a.length;m++){var g=a[m];if(":"!==g||f){var v=Bx(g,jx);f?d.password+=v:d.username+=v}else f=!0}l=""}else if(i===hE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()){if(h&&""===l)return"Invalid authority";u-=qE(l).length+1,l="",c=Zx}else l+=i;break;case Zx:case eS:if(t&&"file"===d.scheme){c=iS;continue}if(":"!==i||p){if(i===hE||"/"===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=aS,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=tS,t===eS)return}break;case tS:if(!ox(Ax,i)){if(i===hE||"/"===i||"?"===i||"#"===i||"\\"===i&&d.isSpecial()||t){if(""!==l){var b=rx(l,10);if(b>65535)return _x;d.port=d.isSpecial()&&b===Gx[d.scheme]?null:b,l=""}if(t)return;c=aS;continue}return _x}l+=i;break;case nS:if(d.scheme="file","/"===i||"\\"===i)c=rS;else{if(!n||"file"!==n.scheme){c=sS;continue}switch(i){case hE:d.host=n.host,d.path=VE(n.path),d.query=n.query;break;case"?":d.host=n.host,d.path=VE(n.path),d.query="",c=dS;break;case"#":d.host=n.host,d.path=VE(n.path),d.query=n.query,d.fragment="",c=cS;break;default:Fx(dx(VE(r,u),""))||(d.host=n.host,d.path=VE(n.path),d.shortenPath()),c=sS;continue}}break;case rS:if("/"===i||"\\"===i){c=iS;break}n&&"file"===n.scheme&&!Fx(dx(VE(r,u),""))&&(Nx(n.path[0],!0)?lx(d.path,n.path[0]):d.host=n.host),c=sS;continue;case iS:if(i===hE||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Nx(l))c=sS;else if(""===l){if(d.host="",t)return;c=aS}else{if(s=d.parseHost(l))return s;if("localhost"===d.host&&(d.host=""),t)return;l="",c=aS}continue}l+=i;break;case aS:if(d.isSpecial()){if(c=sS,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==hE&&(c=sS,"/"!==i))continue}else d.fragment="",c=cS;else d.query="",c=dS;break;case sS:if(i===hE||"/"===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()||lx(d.path,"")):qx(l)?"/"===i||"\\"===i&&d.isSpecial()||lx(d.path,""):("file"===d.scheme&&!d.path.length&&Nx(l)&&(d.host&&(d.host=""),l=sx(l,0)+":"),lx(d.path,l)),l="","file"===d.scheme&&(i===hE||"?"===i||"#"===i))for(;d.path.length>1&&""===d.path[0];)px(d.path);"?"===i?(d.query="",c=dS):"#"===i&&(d.fragment="",c=cS)}else l+=Bx(i,Mx);break;case oS:"?"===i?(d.query="",c=dS):"#"===i?(d.fragment="",c=cS):i!==hE&&(d.path[0]+=Bx(i,Lx));break;case dS:t||"#"!==i?i!==hE&&("'"===i&&d.isSpecial()?d.query+="%27":d.query+="#"===i?"%23":Bx(i,Lx)):(d.fragment="",c=cS);break;case cS:i!==hE&&(d.fragment+=Bx(i,Ux))}u++}},parseHost:function(e){var t,n,r;if("["===sx(e,0)){if("]"!==sx(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 sx(e,l)};if(":"===h()){if(":"!==sx(e,1))return;l+=2,u=++c}for(;h();){if(8===c)return;if(":"!==h()){for(t=n=0;n<4&&ox(Rx,h());)t=16*t+rx(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(!ox(Ax,h()))return;for(;ox(Ax,h());){if(a=rx(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}(mx(e,1,-1)),!t)return yx;this.host=t}else if(this.isSpecial()){if(e=HE(e),ox(Dx,e))return yx;if(t=function(e){var t,n,r,i,a,s,o,d=fx(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"===sx(i,0)&&(a=ox(Ex,i)?16:8,i=mx(i,8===a?1:2)),""===i)s=0;else{if(!ox(10===a?Sx:8===a?xx:Rx,i))return e;s=rx(i,a)}lx(n,s)}for(r=0;r<t;r++)if(s=n[r],r===t-1){if(s>=ax(256,5-t))return null}else if(s>255)return null;for(o=ux(n),r=0;r<n.length;r++)o+=n[r]*ax(256,3-r);return o}(e),null===t)return yx;this.host=t}else{if(ox(Tx,e))return yx;for(t="",n=qE(e),r=0;r<n.length;r++)t+=Bx(n[r],Lx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return NE(Gx,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Nx(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+=Px(i),null!==a&&(c+=":"+a)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+dx(s,"/"):"",null!==o&&(c+="?"+o),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw new nx(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new lS(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+Px(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(WE(e)+":",Vx)},getUsername:function(){return this.username},setUsername:function(e){var t=qE(WE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Bx(t[n],jx)}},getPassword:function(){return this.password},setPassword:function(e){var t=qE(WE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Bx(t[n],jx)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Px(e):Px(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Zx)},getHostname:function(){var e=this.host;return null===e?"":Px(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,eS)},getPort:function(){var e=this.port;return null===e?"":WE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=WE(e))?this.port=null:this.parse(e,tS))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+dx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,aS))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=WE(e))?this.query=null:("?"===sx(e,0)&&(e=mx(e,1)),this.query="",this.parse(e,dS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=WE(e))?("#"===sx(e,0)&&(e=mx(e,1)),this.fragment="",this.parse(e,cS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var lS=function(e){var t=GE(this,hS),n=$E(arguments.length,1)>1?arguments[1]:void 0,r=YE(t,new uS(e,!1,n));CE||(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())},hS=lS.prototype,pS=function(e,t){return{get:function(){return XE(this)[e]()},set:t&&function(e){return XE(this)[t](e)},configurable:!0,enumerable:!0}};if(CE&&(BE(hS,"href",pS("serialize","setHref")),BE(hS,"origin",pS("getOrigin")),BE(hS,"protocol",pS("getProtocol","setProtocol")),BE(hS,"username",pS("getUsername","setUsername")),BE(hS,"password",pS("getPassword","setPassword")),BE(hS,"host",pS("getHost","setHost")),BE(hS,"hostname",pS("getHostname","setHostname")),BE(hS,"port",pS("getPort","setPort")),BE(hS,"pathname",pS("getPathname","setPathname")),BE(hS,"search",pS("getSearch","setSearch")),BE(hS,"searchParams",pS("getSearchParams")),BE(hS,"hash",pS("getHash","setHash"))),jE(hS,"toJSON",(function(){return XE(this).serialize()}),{enumerable:!0}),jE(hS,"toString",(function(){return XE(this).serialize()}),{enumerable:!0}),tx){var fS=tx.createObjectURL,mS=tx.revokeObjectURL;fS&&jE(lS,"createObjectURL",UE(fS,tx)),mS&&jE(lS,"revokeObjectURL",UE(mS,tx))}KE(lS,"URL"),IE({global:!0,constructor:!0,forced:!PE,sham:!CE},{URL:lS});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}(),vS=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}(),bS=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}(),_S=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}(),wS=function(e){if(!e)return!1;var t=kS.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)},kS=Object.prototype.toString;function AS(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 ES(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xS(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 SS,RS="13998",DS="_cc".concat(RS),TS=["https://tags.crwdcntrl.net/c/".concat(RS,"/cc.js?ns=").concat(DS)],OS=function(){return!!SS&&"function"==typeof SS.bcpf&&"function"==typeof SS.add},IS=function(e,t){try{if(!OS())return;SS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},CS=function(e,t){try{if(!OS())return;SS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},PS=function(e){var n=this;try{IS("act","play"),IS("med","game"),"complete"===document.readyState?SS.bcpf():SS.bcp(),e.tags.forEach(function(e){t(this,n),CS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),CS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},LS=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!=fy&&fy.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(TS[0],"LOTCC_".concat(RS),{alternates:TS});case 16:"object"===n(window[DS])&&(SS=window[DS]),OS()&&PS(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)}}())}))},US=function(){CS("genp","ad video"),CS("act","ad impression")},MS=function(){CS("act","ad skipped")},jS=function(){CS("act","ad click")},BS=function(){CS("act","ad complete")},GS=new Tw,NS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},FS=function(e,n){var r=this,i=function(e,t){var n=GS.get("partner.url.value"),r=NS[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)},qS=(new Tw).get("partner.domain.value"),VS=["latimes.com"],zS={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&VS.some(function(e){return t(this,n),e===qS}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return FS(n,e)}}[qS](e)}(e,t)}},HS=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},WS=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 KS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var QS=new j,JS=null,YS=function(){function n(e,r,i){var a=this;if(D(this,n),JS)return JS;JS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new _,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=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,C,P,L,U,j,q,V,z,H;return R(n,[{key:"start",value:(H=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 H.apply(this,arguments)})},{key:"adSystemInitialize",value:(z=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 z.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:(V=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 V.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,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag")||HS().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],d=Math.floor(Math.random()*o.length),c=o[d],s({url:c}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,u=a.nextAdPosition(n),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&G(l.preroll)?l=l.preroll:"midroll"===u&&G(l.midroll)?l=l.midroll:"rewarded"===u&&G(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($S($S({},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,g),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:$S($S({},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===g.Rewarded)return this.adRewardedCount++,"rewarded";if(e===g.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===g.Rewarded?"rewarded":e===g.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===g.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===g.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,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=$S($S({},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,this._extend_dp_with_adsense(h,p,null==e?void 0:e.tnl_keys));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 g=function(e){for(var t=[],n="",r=Date.now(),i={ppos:1,lip:!0,vad_type:"linear"},a=0;a<e.length;a++){var s=new O(e[a].adtag.url,!0);s.query=ES(ES({},s.query),{},{ad_rule:0,vpos:e[a].positon,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),0===a&&(s.query=ES(ES({},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(xS({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=g}else if(h&&p.bidFloorApplied){h.adtag_url||(h.adtag_url=u.url);var v=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=v}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=zS.exist(this.gameData)&&zS.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:(q=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")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):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 q.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(j=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 j.apply(this,arguments)})},{key:"startAd",value:(U=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=$S($S({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new WS,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==s?void 0:s.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(s,a));case 7:if("adsense"!==(null==s?void 0:s.adapter)){e.next=31;break}if(a!==g.Interstitial){e.next=24;break}if("preroll"!==(null==s?void 0:s.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 13:if("start"!==(null==s?void 0:s.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 17:if("next"!==(null==s?void 0:s.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 22:e.next=29;break;case 24:if(a!==g.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 28:case 41:throw new Error("Unsupported ad type");case 29:e.next=42;break;case 31:if(!["ima","spil","audio"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))){e.next=42;break}if(a!==g.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==g.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(s));case 42: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!==g.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==g.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return 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 vS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new bS(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,g=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(v.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,g),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:(C=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(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,o),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 i=e.sent,e.next=13,this._loadInterstitialAd($S($S({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return C.apply(this,arguments)})},{key:"_startPromo",value:(S=e(r.mark((function e(t,n){var i,a,s;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 i=e.sent,e.next=11,this._loadPromo($S($S({},i),t),n);case 11:if(a=e.sent,s=a.success,a.args,s){e.next=16;break}return e.abrupt("return");case 16:i.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return 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,$S({adType:g.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return 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(g.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,$S({adType:g.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return 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=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,o),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 i=e.sent,e.next=13,this._loadRewardedAd($S($S({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return 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(g.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,$S({adType:g.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return 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(g.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return 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(g.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return 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._isT4R(e),a=this._getT4ROptions(e);if("loaded"===r)this.activeAdContainer.style.opacity=i?.001:1,i&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new _S(this.adContainer),this.t4rButton.add()),i&&this.adsManager.setVolume(0),i&&this._broadcast("AD_T4R"),i&&setTimeout(function(){t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===r||"first_quartile"===r){if(i&&"click"===r){var s,o=null===(s=this._adrequest_user_context)||void 0===s?void 0:s.tnl_ad_pos;this.clickCount[o]++}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=v.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"),v="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:v="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:v="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),v="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:v="Fired when the ad is clicked.";var y=e.getAd().getContentType();this._show({mode:"click",contentType:y}),jS();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),l=this._is_completed(e.getAd()),v="Fired when the ad completes playing.",this.adType_===g.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,v="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"),v="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:v="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:v="Fired when the ad playhead crosses first quartile.";var _=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:_});break;case google.ima.AdEvent.Type.IMPRESSION:v="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:v="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:v="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();v=w,this._show({mode:"loaded",contentType:w});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(v=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:v="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:p&&"VPAID"!==f&&this.adResume.show(),v="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:v="Fired when the ad is resumed.",p&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:v="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:l=this._is_completed(e.getAd()),v="Fired when the ad is skipped by the user.",MS(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===g.Rewarded&&this.rewardedLabel.show(),this._hideAddResume(),v="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:v="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:l=this._is_completed(e.getAd()),v="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:v="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:v="Fired when the ad volume has been muted."}if(""!==u&&""!==v){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:v,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);QS.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_===g.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(wS(e.getInnerError)){var t=e.getInnerError();if(t)return wS(t.getErrorCode)&&wS(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];G(s)&&(i.query[a]=N.stringify(s))}var o=new O(i.url,!0);return F(o.query,i.query||{}),$S({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=N.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&&G(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&G(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M(a),G(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=N.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=N.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:"_isT4R",value:function(e){var t,n,r,i,a;if(!this.gameData.publishedAt)return!1;var s=new Date(this.gameData.publishedAt);if(((new Date).getTime()-s.getTime())/864e5<=10)return!1;var o=this.gameData.meta,d=e.t4r.meta;if((null==o?void 0:o.ast.c)>=(null==d?void 0:d.ast.c)&&(null==o||null===(t=o.sit)||void 0===t?void 0:t.c)>=(null==d||null===(n=d.sit)||void 0===n?void 0:n.c))return!1;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var c,u=null===(r=this._adrequest_user_context)||void 0===r?void 0:r.tnl_ad_pos;if(this.clickCount[u]>=(null===(i=e.t4r[u])||void 0===i?void 0:i.count))return!1;if(null!=e&&null!==(a=e.contentType)&&void 0!==a&&a.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return u&&(null===(c=e.t4r[u])||void 0===c?void 0:c.enabled);if(null!=e&&e.contentType.startsWith("video/")){var l,h=(null===(l=e.t4r[u])||void 0===l?void 0:l.viper)||0;if(h>0){var p,f=Math.random()<h;return u&&f&&(null===(p=e.t4r[u])||void 0===p?void 0:p.enabled)}return!1}return!1}},{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(I.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(I.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,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(I.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=N.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=N.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=N.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=N.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=y("ch",window.location.href),c=y("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},d&&(u.channel=d),c&&(u.ch_date=c),(l=y("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=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,a),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"),i=function(e){t(this,a),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),r={type:"preroll",adBreakDone:i},window.adsbygoogle.push(r),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}var r}),e,this,[[1,15]])}))),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.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),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),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var r}),e,this,[[1,17]])}))),function(e){return a.apply(this,arguments)})},{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.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),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),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var r}),e,this,[[1,17]])}))),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(I.encode(JSON.stringify(a)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new Tw).get();return n=$S($S({},n),r),n=t?$S($S({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===g.Rewarded)t="reward";else if(n===g.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,$S($S({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),XS=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,fb(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},hb(this.moduleName,this.moduleConfig)})),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,fb(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},hb(this.moduleName,this.moduleConfig)})),eR=function(e,t){console.log(e,t)},tR={},nR={},rR=null;function iR(){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 tR.version=r,tR.frame=e,tR.function=n,tR.version}function aR(e){var n=this;return rR||(rR=new Promise(function(r){function i(t,n){if(eR("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:tR,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),iR(),tR.frame?2===tR.version?(eR("TCF v2 CMP found. Fetching the consent."),tR.function?(eR("CMP API is directly accessible, calling it now..."),tR.function("addEventListener",tR.version,i)):(eR("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!==nR[r.callId]&&nR[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});nR[d]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,tR.version,r)}("addEventListener",tR.frame,i))):r({result:"cmpVersionNotV2",cmp:tR}):r({result:"cmpNotFound"})}.bind(this)),rR)}var sR=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 oR(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 dR(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 dR(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 dR(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 cR=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=oR(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))},uR="ffd4774b-99ae-4464-8f40-3afa12b4692e",lR=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,cR({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,cR({src:"https://cdn.cookielaw.org/consent/".concat(uR,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,cR({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:uR}],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)}}(),hR=new j,pR={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},fR=!1;function mR(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(pR).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)&&(fR=!0),i&&fR&&(fR=!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=pR[i][a];p&&hR.emit(p,r)}}}),!1);var gR="__msgr",vR=q(),bR=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:vR,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){wR(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",wR(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?mR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=vR,wR(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=_R(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},_R=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}},wR=function(e){try{window[gR]&&window[gR].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},kR=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 AR(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 ER(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xR(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 SR(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 SR(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 SR(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 RR,DR=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 _}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,g,v,b,y,_,w,k,A,E,x,S,R,D,O,I,C,P,L,U,M,j,B,G,N,F,q,V,z,H,W=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,d=this._getAdTypeByAfgPosition(n),n.params.position,c=this._getAdFlow(d),u=this._gameData,l=u.afg_disabled,h=null===(i=n.params)||void 0===i?void 0:i.isGift,null===(a=n.params)||void 0===a||a.position,p=null===(s=u.promo)||void 0===s?void 0:s.rainbow,f=(null==p?void 0:p.enabled)&&(null===(o=p.position)||void 0===o?void 0:o[d]),m=null==p?void 0:p.gift,g=f&&null!=p&&p.duration?null==p?void 0:p.duration:5,v=l?c.filter(function(e){return t(this,W),"adsense"!==e}.bind(this)):c,b=this.get_ad_system_init_result(),y=b.afg,_=b.ima,this.adsBlocked=!y&&!_,this.adsBlocked?(Ps("gd-adflow adsBlocked so changing the flow"),v=[]):(y||(v=v.filter(function(e){return t(this,W),"adsense"!==e}.bind(this))),_||(v=v.filter(function(e){return t(this,W),"ima"!==e}.bind(this)))),w=!1,k=!1,A=[],E=0,x=!1,S=xR(v),e.prev=26,S.s();case 28:if((R=S.n()).done){e.next=62;break}return D=R.value,n.params.adapter=D,O=E===v.length-1,I=h&&m||!h,C=O&&f&&I,n.params=ER(ER({},n.params),{},{adapterIndex:E,isLastAdapter:O,shouldFail:!1,extraPromoRunOnFail:C}),function(){t(this,W),Us.firstSuccessOrder&&!isNaN(Us.firstSuccessOrder)&&(n.params.shouldFail=E<Us.firstSuccessOrder)}.bind(this),Ps("gd-adflow, before adInvoke",E,D,n.params.shouldFail),e.next=39,this.adInvoke(n);case 39:if(P=e.sent,L=P.success,U=P.args,M=P.isSkipped,j=P.noVast,!L){e.next=51;break}return Ps("gd-adflow, adapter-result-success",E,D,U),w=!0,k=!(null==U||!U.isPromoSuccess),e.abrupt("break",62);case 51:if(Ps("gd-adflow, adapter-result-failure",E,D,U.message),E++,A.push(U.message),!M){e.next=56;break}return e.abrupt("break",62);case 56:if(!j){e.next=59;break}return this._runAutoResume(),e.abrupt("break",62);case 59:x=C;case 60:e.next=28;break;case 62:e.next=67;break;case 64:e.prev=64,e.t0=e.catch(26),S.e(e.t0);case 67:return e.prev=67,S.f(),e.finish(67);case 70:if(!x){e.next=76;break}return e.next=73,new kR(this).run({duration:g});case 73:e.sent.success&&(k=!0);case 76:return function(){var e;t(this,W),Us.disableGift&&null!==(e=u.gft)&&void 0!==e&&e[d].enabled&&(u.gft[d].enabled=!1)}.bind(this),B=A.join(" /n"),w?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(d)):(this._onResumeGame(B,"warning"),this._giveGift(d)),G="-1",N="none",w?(G="index_".concat(E),N=v[E]):k&&(G="promo",N="promo"),F=this.get_session_id(),this.adsBlocked&&"-1"===G?(q="rewarded"===d?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[q]=this.blockedAdsMap[q]?this.blockedAdsMap[q]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(q)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:q,sessionId:F,successAdapter:"none",adFlowIndex:G})):(T(V={},"adflow.all.index",{message:"".concat(G)}),T(V,"adflow.all.success_adapter",{message:"".concat(N)}),T(V,"adflow.".concat(d,".index"),{message:"".concat(G)}),T(V,"adflow.".concat(d,".success_adapter"),{message:"".concat(N)}),z=V,Object.keys(z).forEach(function(e){t(this,W);var n=z[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:G,successAdapter:N,adBlocker:!1,afgBlocked:!y,imaBlocked:!_,adType:d,sessionId:F})),H={adType:d},this.eventBus.broadcast("AD_FLOW_COMPLETE",H),e.abrupt("return",H);case 89:case"end":return e.stop()}}),e,this,[[26,64,67,70]])}))),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=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=function(e){t(this,u),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),c=function(e){t(this,u),a._eventBus.unsubscribeScope(o),n({success:!0,args:e})}.bind(this),a._eventBus.subscribe("AD_ERROR",d,o),a._eventBus.subscribe("AD_SDK_CANCELED",d,o),a._eventBus.subscribe("AD_SUCCESS",c,o),e.prev=6,e.next=9,a._adInstance.startAd(i);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),Ls("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));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}(),TR=new j,OR=["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(OR.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)RR=a,(window.parent||window).postMessage(r,"*"),TR.emit("aeria-event",r);else if(o){RR&&RR.postMessage(r,"*");var d=window.parent||window;d&&d.postMessage(r,"*")}}}),!1);var IR="https://html5.gamedistribution.com",CR="parent-data-request",PR="parent-data-response",LR=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===CR){var d={adRequestTimer:e.adRequestTimer};s.postMessage({type:PR,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===PR&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:CR};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),UR=new LR,MR={SDKExistsOnUpperFrame:!1};function jR(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 BR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jR(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var GR=q(),NR=null,FR=null,qR=function(){function n(e){var r=this;if(D(this,n),NR)return NR;NR=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(),this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,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,r),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,r),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,i,a=this;if((t(this,r),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!==(i=this._gameData.evnts)&&void 0!==i&&i.enabled&&this._isLoaderGameURL()&&(bR(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),UR.init(this),this._send_gametag_data("sdk_init"),this._executeMidrollPlus()}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,v,b,y,w,T,C,P,L,U,j,B,G;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:(G=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 G.apply(this,arguments)})},{key:"_loadCMP",value:(B=e(r.mark((function e(){var t,n,i;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=6;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||"html5.gamedistribution.com"!==this._topDomain){e.next=6;break}return e.next=6,lR();case 6:case"end":return e.stop()}}),e,this)}))),function(){return B.apply(this,arguments)})},{key:"testConsent",value:function(){try{iR();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aR({});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;hR.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)})}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:"_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://ana.headerlift.com/event?".concat(N.stringify(r))).catch(function(e){t(this,n)}.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"),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?(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),FR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(n=n.gameDock)&&void 0!==n&&n.adViewEvent&&FR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),sR.track(FR,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=FR)||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));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 _,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){}}BS()}.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"),US(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(r=r.gameDock)&&void 0!==r&&r.adViewEvent&&sR.track(FR,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("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{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&&!MR.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(N.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=BR(BR({},i.query),{},{rd:"1"}),s=N.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&&(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;HS().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;this._gameData.loader&&!1===this._gameData.loader.mobile&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var n,r=this._gameData,i=r.gdpr&&!0===r.gdpr.consent,a=r.loader,s=null===(e=r.promo)||void 0===e?void 0:e[null===(t=r.promo)||void 0===t||null===(t=t.template)||void 0===t?void 0:t.preroll];(r.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=s&&s.enabled?this._createPromoBeforeSplash(r,i):a.enabled&&!0!==(null===(n=a.splash)||void 0===n?void 0:n.skip)?this._createSplash(r,i):this.onResumeGame("Skipped splash.","success"):a.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||i?null!=s&&s.enabled?this._createPromoBeforeSplash(r,i):!1!==a.enabled&&this._createSplash(r,i):null!=s&&s.enabled&&this._createPromo(r,i))}},{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 YS(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,vk();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:(C=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(BR(BR({},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(g.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(g.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 C.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(BR(BR({},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(BR(BR({},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(g.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"showAd",value:(y=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,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 DR(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 y.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t,n=!1,r=null===(t=this._gameData.diagnostic)||void 0===t?void 0:t.close_ads,i=this._gameData.disableAds[e],a=r||i;return 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!==g.Interstitial&&t.adType!==g.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=g.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===g.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i=e.gameData,a=e.adRequest,s=null;a.adType===g.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===g.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=g.Rewarded,e.next=16;break;case 14:if(n===g.Interstitial||n===g.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16: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:(v=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;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,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled,y=(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:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,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(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new ZS(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 XS(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(I.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(N.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=BR(BR({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)FR.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(g.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 GR}},{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._parentDomain||"developer-acc.gamedistribution.com"===this._parentDomain?e=this._parentDomain:!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(g.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(g.Interstitial,{position:"midroll",giftType:i}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function VR(){return(VR=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 zR=new j,HR=function(e){var n=this;!function(){VR.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&&(zR.off("sdk-event",s),n())}.bind(this);zR.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new qR(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),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&b(r)}),!1)}.bind(this),v=function(){t(this,n),g(),m("init")}.bind(this),b=function(r){t(this,n);try{zR.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:v,_sendSDKReady:f,sendGenericEvent:p}},WR=function(e){var t=HR(e);return t.init(),t},KR=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}},$R="gd-sdk-frame-handshake-request",QR="gd-sdk-frame-handshake-response",JR=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:$R},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===$R){var o={type:QR};i.postMessage(o,r)}else a===QR&&(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))},YR=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,JR();case 6:if(n=e.sent,MR.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=KR(),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)}}(),XR=tt,ZR=re,eD=ce,tD=Hl,nD=ts,rD=Qi,iD=eD(Vi.f),aD=eD([].push),sD=XR&&ZR((function(){var e=Object.create(null);return e[2]=2,!iD(e,2)})),oD=function(e){return function(t){for(var n,r=rD(t),i=nD(r),a=sD&&null===tD(r),s=i.length,o=0,d=[];s>o;)n=i[o++],XR&&!(a?n in r:iD(r,n))||aD(d,e?[n,r[n]]:r[n]);return d}},dD={entries:oD(!0),values:oD(!1)}.values;Xa({target:"Object",stat:!0},{values:function(e){return dD(e)}});var cD,uD={},lD=function(e){try{if(e.skipForward)return;if(uD.source){var t={type:"gd-sdk-on-event",event:e};uD.source.postMessage(t,uD.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},hD=function(){lD({name:"SDK_READY",status:"success",message:"Everything is ready."}),lD({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),lD({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},pD=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(!uD.source&&"init"===c)return function(e){var t=e.source,n=e.origin;uD={source:t,origin:n}}({source:o,origin:s}),void hD();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)},fD=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){lD(e),t.apply(this,arguments)}}(e);var t=new qR(e);return pD(t),t},mD=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:[]},hb(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,fb(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}(),gD=function(){var t=e(r.mark((function t(){var n,i,a,s,o,d,c,u,l,h,p,f,m,g,v,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 _,t.next=13,vk();case 13:p=t.sent,f=null==p||null===(s=p.aeria)||void 0===s?void 0:s.yMenuExcluded,m=null==p||null===(o=p.aeria)||void 0===o?void 0:o.yLoginExcluded,h.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(m||l())})),g=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new mD).runYMenu({gameId:c});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),v=KR(),b=v.whichFrame,"game-frame"===b()&&(f||g());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),vD=function(e){try{var t=tk(e);e.gameId||t.send("nogameid",{message:"".concat(fy.parentURL)})}catch(e){}},bD=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,gD();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)}}(),yD={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,vD(t),gk(t),e.next=5,YR();case 5:return n=e.sent,e.next=8,bD();case 8:return i=n?WR(t):fD(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",fD(t));case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(e){return t.apply(this,arguments)}}()};function _D(){return(_D=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,ED(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 wD,kD,AD=!1;function ED(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),cD)return r(cD);if(AD)var s=setInterval(function(){t(this,a),cD&&(AD=!1,clearInterval(s),r(cD))}.bind(this),100);else AD=!0,yD.create(e).then(function(e){t(this,a),cD=e,e._sendSDKReady(),AD=!1,r(cD)}.bind(this))}.bind(this))}function xD(e){return ED(e),{invoke:function(t){return function(e,t){return _D.apply(this,arguments)}(e,t)}}}function SD(n,i){var a=this;return new Promise(function(s,o){var d=this;t(this,a);var c=["https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js"];f(c[0],"gd-sdk-wrp",{alternates:c}).catch(function(e){t(this,d),RD({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,RD({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,RD({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:kD=e.sent,RD({text:"sdk-wrapper after gdSdkWrp.init"}),s(kD),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),RD({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 RD(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(t))))),console.log(V(Object.values(e)))}catch(e){}}function DD(e){if(e){var t=e.name,n=e.message,r=e.status;try{RD({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!wD}),wD&&wD.onEvent({name:t,message:n,status:r})}catch(t){RD({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function TD(e){return OD.apply(this,arguments)}function OD(){return(OD=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return wD=t,gk(t),e.next=4,vk();case 4:if(a=e.sent,!kD){e.next=7;break}return e.abrupt("return",kD);case 7:if(s=null==a||null===(n=a.sdk_wrp)||void 0===n?void 0:n.enabled,LD("isWrapEnabled ".concat(s)),s){e.next=11;break}return e.abrupt("return");case 11:return o=null==a||null===(i=a.sdk_wrp)||void 0===i?void 0:i.wrapper,e.next=14,CD();case 14:return e.next=16,SD(o,{onEvent:DD});case 16:return kD=e.sent,e.abrupt("return",kD);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ID(){return ID=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,LD("beforeGetDeveloperSettings"),i=n(),LD("afterGetDeveloperSettings"),e.prev=4,e.next=7,TD(i);case 7:a=e.sent,LD("after get SDK wrapper: ".concat(!!a)),a&&(LD("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),LD("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),ID.apply(this,arguments)}function CD(){return PD.apply(this,arguments)}function PD(){return(PD=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 LD(e){window.sdkLog.push(e)}function UD(){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}()?LD("skipped normal SDK init!"):(!function(){LS();var n=xD(UD());function i(){var i=this;this.AdType=g,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===g.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),gb.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),gb.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}(),LD("afterSDKInit")),function(e){ID.apply(this,arguments)}({_get_developer_sets:UD});
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 g,Layers as v,getKeyByValue as b,getQueryString as y,EventBus as _,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 D from"@babel/runtime/helpers/createClass";import R from"@babel/runtime/helpers/classCallCheck";import T from"@babel/runtime/helpers/defineProperty";import O from"url-parse";import{Base64 as I}from"js-base64";import P from"validator";import C 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 G}from"is-plain-object";import N 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)||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.30.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE",source:"https://github.com/zloirock/core-js"});var 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 he("Can't call method on "+e);return e},fe=pe,me=Object,ge=function(e){return me(fe(e))},ve=ge,be=ce({}.hasOwnProperty),ye=Object.hasOwn||function(e,t){return be(ve(e),t)},_e=ce,we=0,ke=Math.random(),Ae=_e(1..toString),Ee=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ae(++we+ke,36)},xe="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Se=W,De=xe,Re=Se.process,Te=Se.Deno,Oe=Re&&Re.versions||Te&&Te.version,Ie=Oe&&Oe.v8;Ie&&(ne=(te=Ie.split("."))[0]>0&&te[0]<4?1:+(te[0]+te[1])),!ne&&De&&(!(te=De.match(/Edge\/(\d+)/))||te[1]>=74)&&(te=De.match(/Chrome\/(\d+)/))&&(ne=+te[1]);var Pe=ne,Ce=Pe,Le=re,Ue=!!Object.getOwnPropertySymbols&&!Le((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ce&&Ce<41})),Me=Ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,je=W,Be=K.exports,Ge=ye,Ne=Ee,Fe=Ue,qe=Me,Ve=je.Symbol,ze=Be("wks"),He=qe?Ve.for||Ve:Ve&&Ve.withoutSetter||Ne,We=function(e){return Ge(ze,e)||(ze[e]=Fe&&Ge(Ve,e)?Ve[e]:He("Symbol."+e)),ze[e]},Ke={};Ke[We("toStringTag")]="z";var $e="[object z]"===String(Ke),Qe="object"==typeof document&&document.all,Je={all:Qe,IS_HTMLDDA:void 0===Qe&&void 0!==Qe},Ye=Je.all,Xe=Je.IS_HTMLDDA?function(e){return"function"==typeof e||e===Ye}:function(e){return"function"==typeof e},Ze={},et=!re((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),tt=Xe,nt=Je.all,rt=Je.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:tt(e)||e===nt}:function(e){return"object"==typeof e?null!==e:tt(e)},it=rt,at=W.document,st=it(at)&&it(at.createElement),ot=function(e){return st?at.createElement(e):{}},dt=ot,ct=!et&&!re((function(){return 7!=Object.defineProperty(dt("div"),"a",{get:function(){return 7}}).a})),ut=et&&re((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),lt=rt,ht=String,pt=TypeError,ft=function(e){if(lt(e))return e;throw pt(ht(e)+" is not an object")},mt=ie,gt=Function.prototype.call,vt=mt?gt.bind(gt):function(){return gt.apply(gt,arguments)},bt=W,yt=Xe,_t=function(e,t){return arguments.length<2?(n=bt[e],yt(n)?n:void 0):bt[e]&&bt[e][t];var n},wt=ce({}.isPrototypeOf),kt=_t,At=Xe,Et=wt,xt=Object,St=Me?function(e){return"symbol"==typeof e}:function(e){var t=kt("Symbol");return At(t)&&Et(t.prototype,xt(e))},Dt=String,Rt=function(e){try{return Dt(e)}catch(e){return"Object"}},Tt=Xe,Ot=Rt,It=TypeError,Pt=function(e){if(Tt(e))return e;throw It(Ot(e)+" is not a function")},Ct=Pt,Lt=ue,Ut=function(e,t){var n=e[t];return Lt(n)?void 0:Ct(n)},Mt=vt,jt=Xe,Bt=rt,Gt=TypeError,Nt=vt,Ft=rt,qt=St,Vt=Ut,zt=function(e,t){var n,r;if("string"===t&&jt(n=e.toString)&&!Bt(r=Mt(n,e)))return r;if(jt(n=e.valueOf)&&!Bt(r=Mt(n,e)))return r;if("string"!==t&&jt(n=e.toString)&&!Bt(r=Mt(n,e)))return r;throw Gt("Can't convert object to primitive value")},Ht=TypeError,Wt=We("toPrimitive"),Kt=function(e,t){if(!Ft(e)||qt(e))return e;var n,r=Vt(e,Wt);if(r){if(void 0===t&&(t="default"),n=Nt(r,e,t),!Ft(n)||qt(n))return n;throw Ht("Can't convert object to primitive value")}return void 0===t&&(t="number"),zt(e,t)},$t=St,Qt=function(e){var t=Kt(e,"string");return $t(t)?t:t+""},Jt=et,Yt=ct,Xt=ut,Zt=ft,en=Qt,tn=TypeError,nn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,an="enumerable",sn="configurable",on="writable";Ze.f=Jt?Xt?function(e,t,n){if(Zt(e),t=en(t),Zt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&on in n&&!n[on]){var r=rn(e,t);r&&r[on]&&(e[t]=n.value,n={configurable:sn in n?n[sn]:r[sn],enumerable:an in n?n[an]:r[an],writable:!1})}return nn(e,t,n)}:nn:function(e,t,n){if(Zt(e),t=en(t),Zt(n),Yt)try{return nn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw tn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var dn={exports:{}},cn=et,un=ye,ln=Function.prototype,hn=cn&&Object.getOwnPropertyDescriptor,pn=un(ln,"name"),fn={EXISTS:pn,PROPER:pn&&"something"===function(){}.name,CONFIGURABLE:pn&&(!cn||cn&&hn(ln,"name").configurable)},mn=Xe,gn=Z,vn=ce(Function.toString);mn(gn.inspectSource)||(gn.inspectSource=function(e){return vn(e)});var bn,yn,_n,wn=gn.inspectSource,kn=Xe,An=W.WeakMap,En=kn(An)&&/native code/.test(String(An)),xn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Sn=Ze,Dn=xn,Rn=et?function(e,t,n){return Sn.f(e,t,Dn(1,n))}:function(e,t,n){return e[t]=n,e},Tn=K.exports,On=Ee,In=Tn("keys"),Pn=function(e){return In[e]||(In[e]=On(e))},Cn={},Ln=En,Un=W,Mn=rt,jn=Rn,Bn=ye,Gn=Z,Nn=Pn,Fn=Cn,qn="Object already initialized",Vn=Un.TypeError,zn=Un.WeakMap;if(Ln||Gn.state){var Hn=Gn.state||(Gn.state=new zn);Hn.get=Hn.get,Hn.has=Hn.has,Hn.set=Hn.set,bn=function(e,t){if(Hn.has(e))throw Vn(qn);return t.facade=e,Hn.set(e,t),t},yn=function(e){return Hn.get(e)||{}},_n=function(e){return Hn.has(e)}}else{var Wn=Nn("state");Fn[Wn]=!0,bn=function(e,t){if(Bn(e,Wn))throw Vn(qn);return t.facade=e,jn(e,Wn,t),t},yn=function(e){return Bn(e,Wn)?e[Wn]:{}},_n=function(e){return Bn(e,Wn)}}var Kn={set:bn,get:yn,has:_n,enforce:function(e){return _n(e)?yn(e):bn(e,{})},getterFor:function(e){return function(t){var n;if(!Mn(t)||(n=yn(t)).type!==e)throw Vn("Incompatible receiver, "+e+" required");return n}}},$n=ce,Qn=re,Jn=Xe,Yn=ye,Xn=et,Zn=fn.CONFIGURABLE,er=wn,tr=Kn.enforce,nr=Kn.get,rr=String,ir=Object.defineProperty,ar=$n("".slice),sr=$n("".replace),or=$n([].join),dr=Xn&&!Qn((function(){return 8!==ir((function(){}),"length",{value:8}).length})),cr=String(String).split("String"),ur=dn.exports=function(e,t,n){"Symbol("===ar(rr(t),0,7)&&(t="["+sr(rr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Yn(e,"name")||Zn&&e.name!==t)&&(Xn?ir(e,"name",{value:t,configurable:!0}):e.name=t),dr&&n&&Yn(n,"arity")&&e.length!==n.arity&&ir(e,"length",{value:n.arity});try{n&&Yn(n,"constructor")&&n.constructor?Xn&&ir(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=tr(e);return Yn(r,"source")||(r.source=or(cr,"string"==typeof t?t:"")),e};Function.prototype.toString=ur((function(){return Jn(this)&&nr(this).source||er(this)}),"toString");var lr=Xe,hr=Ze,pr=dn.exports,fr=J,mr=function(e,t,n,r){r||(r={});var i=r.enumerable,a=void 0!==r.name?r.name:t;if(lr(n)&&pr(n,a,r),r.global)i?e[t]=n:fr(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:hr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},gr=ce,vr=gr({}.toString),br=gr("".slice),yr=function(e){return br(vr(e),8,-1)},_r=$e,wr=Xe,kr=yr,Ar=We("toStringTag"),Er=Object,xr="Arguments"==kr(function(){return arguments}()),Sr=_r?kr: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=Er(e),Ar))?n:xr?kr(t):"Object"==(r=kr(t))&&wr(t.callee)?"Arguments":r},Dr=Sr,Rr=$e?{}.toString:function(){return"[object "+Dr(this)+"]"};$e||mr(Object.prototype,"toString",Rr,{unsafe:!0});var Tr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Or=ot("span").classList,Ir=Or&&Or.constructor&&Or.constructor.prototype,Pr=Ir===Object.prototype?void 0:Ir,Cr=yr,Lr=ce,Ur=function(e){if("Function"===Cr(e))return Lr(e)},Mr=Pt,jr=ie,Br=Ur(Ur.bind),Gr=function(e,t){return Mr(e),void 0===t?e:jr?Br(e,t):function(){return e.apply(t,arguments)}},Nr=re,Fr=yr,qr=Object,Vr=ce("".split),zr=Nr((function(){return!qr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Fr(e)?Vr(e,""):qr(e)}:qr,Hr=Math.ceil,Wr=Math.floor,Kr=Math.trunc||function(e){var t=+e;return(t>0?Wr:Hr)(t)},$r=function(e){var t=+e;return t!=t||0===t?0:Kr(t)},Qr=$r,Jr=Math.min,Yr=function(e){return e>0?Jr(Qr(e),9007199254740991):0},Xr=Yr,Zr=function(e){return Xr(e.length)},ei=yr,ti=Array.isArray||function(e){return"Array"==ei(e)},ni=ce,ri=re,ii=Xe,ai=Sr,si=wn,oi=function(){},di=[],ci=_t("Reflect","construct"),ui=/^\s*(?:class|function)\b/,li=ni(ui.exec),hi=!ui.exec(oi),pi=function(e){if(!ii(e))return!1;try{return ci(oi,di,e),!0}catch(e){return!1}},fi=function(e){if(!ii(e))return!1;switch(ai(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return hi||!!li(ui,si(e))}catch(e){return!0}};fi.sham=!0;var mi=!ci||ri((function(){var e;return pi(pi.call)||!pi(Object)||!pi((function(){e=!0}))||e}))?fi:pi,gi=ti,vi=mi,bi=rt,yi=We("species"),_i=Array,wi=function(e){var t;return gi(e)&&(t=e.constructor,(vi(t)&&(t===_i||gi(t.prototype))||bi(t)&&null===(t=t[yi]))&&(t=void 0)),void 0===t?_i:t},ki=function(e,t){return new(wi(e))(0===t?0:t)},Ai=Gr,Ei=zr,xi=ge,Si=Zr,Di=ki,Ri=ce([].push),Ti=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=xi(d),m=Ei(f),g=Ai(c,u),v=Si(m),b=0,y=l||Di,_=t?y(d,v):n||s?y(d,0):void 0;v>b;b++)if((o||b in m)&&(p=g(h=m[b],b,f),e))if(t)_[b]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return b;case 2:Ri(_,h)}else switch(e){case 4:return!1;case 7:Ri(_,h)}return a?-1:r||i?i:_}},Oi={forEach:Ti(0),map:Ti(1),filter:Ti(2),some:Ti(3),every:Ti(4),find:Ti(5),findIndex:Ti(6),filterReject:Ti(7)},Ii=re,Pi=function(e,t){var n=[][e];return!!n&&Ii((function(){n.call(null,t||function(){return 1},1)}))},Ci=Oi.forEach,Li=W,Ui=Tr,Mi=Pr,ji=Pi("forEach")?[].forEach:function(e){return Ci(this,e,arguments.length>1?arguments[1]:void 0)},Bi=Rn,Gi=function(e){if(e&&e.forEach!==ji)try{Bi(e,"forEach",ji)}catch(t){e.forEach=ji}};for(var Ni in Ui)Ui[Ni]&&Gi(Li[Ni]&&Li[Ni].prototype);Gi(Mi);var Fi={},qi={},Vi={}.propertyIsEnumerable,zi=Object.getOwnPropertyDescriptor,Hi=zi&&!Vi.call({1:2},1);qi.f=Hi?function(e){var t=zi(this,e);return!!t&&t.enumerable}:Vi;var Wi=zr,Ki=pe,$i=function(e){return Wi(Ki(e))},Qi=et,Ji=vt,Yi=qi,Xi=xn,Zi=$i,ea=Qt,ta=ye,na=ct,ra=Object.getOwnPropertyDescriptor;Fi.f=Qi?ra:function(e,t){if(e=Zi(e),t=ea(t),na)try{return ra(e,t)}catch(e){}if(ta(e,t))return Xi(!Ji(Yi.f,e,t),e[t])};var ia={},aa=$r,sa=Math.max,oa=Math.min,da=function(e,t){var n=aa(e);return n<0?sa(n+t,0):oa(n,t)},ca=$i,ua=da,la=Zr,ha=function(e){return function(t,n,r){var i,a=ca(t),s=la(a),o=ua(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}},pa={includes:ha(!0),indexOf:ha(!1)},fa=ye,ma=$i,ga=pa.indexOf,va=Cn,ba=ce([].push),ya=function(e,t){var n,r=ma(e),i=0,a=[];for(n in r)!fa(va,n)&&fa(r,n)&&ba(a,n);for(;t.length>i;)fa(r,n=t[i++])&&(~ga(a,n)||ba(a,n));return a},_a=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wa=ya,ka=_a.concat("length","prototype");ia.f=Object.getOwnPropertyNames||function(e){return wa(e,ka)};var Aa={};Aa.f=Object.getOwnPropertySymbols;var Ea=_t,xa=ia,Sa=Aa,Da=ft,Ra=ce([].concat),Ta=Ea("Reflect","ownKeys")||function(e){var t=xa.f(Da(e)),n=Sa.f;return n?Ra(t,n(e)):t},Oa=ye,Ia=Ta,Pa=Fi,Ca=Ze,La=function(e,t,n){for(var r=Ia(t),i=Ca.f,a=Pa.f,s=0;s<r.length;s++){var o=r[s];Oa(e,o)||n&&Oa(n,o)||i(e,o,a(t,o))}},Ua=re,Ma=Xe,ja=/#|\.prototype\./,Ba=function(e,t){var n=Na[Ga(e)];return n==qa||n!=Fa&&(Ma(t)?Ua(t):!!t)},Ga=Ba.normalize=function(e){return String(e).replace(ja,".").toLowerCase()},Na=Ba.data={},Fa=Ba.NATIVE="N",qa=Ba.POLYFILL="P",Va=Ba,za=W,Ha=Fi.f,Wa=Rn,Ka=mr,$a=J,Qa=La,Ja=Va,Ya=function(e,t){var n,r,i,a,s,o=e.target,d=e.global,c=e.stat;if(n=d?za:c?za[o]||$a(o,{}):(za[o]||{}).prototype)for(r in t){if(a=t[r],i=e.dontCallGetSet?(s=Ha(n,r))&&s.value:n[r],!Ja(d?r:o+(c?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Qa(a,i)}(e.sham||i&&i.sham)&&Wa(a,"sham",!0),Ka(n,r,a,e)}},Xa=ya,Za=_a,es=Object.keys||function(e){return Xa(e,Za)},ts=ge,ns=es;Ya({target:"Object",stat:!0,forced:re((function(){ns(1)}))},{keys:function(e){return ns(ts(e))}});var rs=Array.isArray,is=Object.prototype.toString,as=rs||function(e){return!!e&&"[object Array]"==is.call(e)},ss={name:"@bygd/gd-sdk-pes",version:"1.36.2",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"}},os=function(e){var t=ds("object"===n(e)?e:i(e));return t&&t.version?ss.version>=t.version?t:void 0:t},ds=function(e){var n=this;if(!as(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}},cs=function(){var e;(e=console).log.apply(e,arguments)},us=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 ls={},hs=Sr,ps=String,fs=function(e){if("Symbol"===hs(e))throw TypeError("Cannot convert a Symbol value to a string");return ps(e)},ms={},gs=et,vs=ut,bs=Ze,ys=ft,_s=$i,ws=es;ms.f=gs&&!vs?Object.defineProperties:function(e,t){ys(e);for(var n,r=_s(t),i=ws(t),a=i.length,s=0;a>s;)bs.f(e,n=i[s++],r[n]);return e};var ks,As=_t("document","documentElement"),Es=ft,xs=ms,Ss=_a,Ds=Cn,Rs=As,Ts=ot,Os="prototype",Is="script",Ps=Pn("IE_PROTO"),Cs=function(){},Ls=function(e){return"<"+Is+">"+e+"</"+Is+">"},Us=function(e){e.write(Ls("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ms=function(){try{ks=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Ms="undefined"!=typeof document?document.domain&&ks?Us(ks):(t=Ts("iframe"),n="java"+Is+":",t.style.display="none",Rs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Ls("document.F=Object")),e.close(),e.F):Us(ks);for(var r=Ss.length;r--;)delete Ms[Os][Ss[r]];return Ms()};Ds[Ps]=!0;var js=Object.create||function(e,t){var n;return null!==e?(Cs[Os]=Es(e),n=new Cs,Cs[Os]=null,n[Ps]=e):n=Ms(),void 0===t?n:xs.f(n,t)},Bs={},Gs=Qt,Ns=Ze,Fs=xn,Vs=function(e,t,n){var r=Gs(t);r in e?Ns.f(e,r,Fs(0,n)):e[r]=n},zs=da,Hs=Zr,Ws=Vs,Ks=Array,$s=Math.max,Qs=function(e,t,n){for(var r=Hs(e),i=zs(t,r),a=zs(void 0===n?r:n,r),s=Ks($s(a-i,0)),o=0;i<a;i++,o++)Ws(s,o,e[i]);return s.length=o,s},Js=yr,Ys=$i,Xs=ia.f,Zs=Qs,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Bs.f=function(e){return eo&&"Window"==Js(e)?function(e){try{return Xs(e)}catch(e){return Zs(eo)}}(e):Xs(Ys(e))};var to=dn.exports,no=Ze,ro=function(e,t,n){return n.get&&to(n.get,t,{getter:!0}),n.set&&to(n.set,t,{setter:!0}),no.f(e,t,n)},io={},ao=We;io.f=ao;var so=W,oo=ye,co=io,uo=Ze.f,lo=function(e){var t=so.Symbol||(so.Symbol={});oo(t,e)||uo(t,e,{value:co.f(e)})},ho=vt,po=_t,fo=We,mo=mr,go=Ze.f,vo=ye,bo=We("toStringTag"),yo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!vo(e,bo)&&go(e,bo,{configurable:!0,value:t})},_o=Ya,wo=W,ko=vt,Ao=ce,Eo=et,xo=Ue,So=re,Do=ye,Ro=wt,To=ft,Oo=$i,Io=Qt,Po=fs,Co=xn,Lo=js,Uo=es,Mo=ia,jo=Bs,Bo=Aa,Go=Fi,No=Ze,Fo=ms,qo=qi,Vo=mr,zo=ro,Ho=K.exports,Wo=Cn,Ko=Ee,$o=We,Qo=io,Jo=lo,Yo=function(){var e=po("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=fo("toPrimitive");t&&!t[r]&&mo(t,r,(function(e){return ho(n,this)}),{arity:1})},Xo=yo,Zo=Kn,ed=Oi.forEach,td=Pn("hidden"),nd="Symbol",rd="prototype",id=Zo.set,ad=Zo.getterFor(nd),sd=Object[rd],od=wo.Symbol,dd=od&&od[rd],cd=wo.TypeError,ud=wo.QObject,ld=Go.f,hd=No.f,pd=jo.f,fd=qo.f,md=Ao([].push),gd=Ho("symbols"),vd=Ho("op-symbols"),bd=Ho("wks"),yd=!ud||!ud[rd]||!ud[rd].findChild,_d=Eo&&So((function(){return 7!=Lo(hd({},"a",{get:function(){return hd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=ld(sd,t);r&&delete sd[t],hd(e,t,n),r&&e!==sd&&hd(sd,t,r)}:hd,wd=function(e,t){var n=gd[e]=Lo(dd);return id(n,{type:nd,tag:e,description:t}),Eo||(n.description=t),n},kd=function(e,t,n){e===sd&&kd(vd,t,n),To(e);var r=Io(t);return To(n),Do(gd,r)?(n.enumerable?(Do(e,td)&&e[td][r]&&(e[td][r]=!1),n=Lo(n,{enumerable:Co(0,!1)})):(Do(e,td)||hd(e,td,Co(1,{})),e[td][r]=!0),_d(e,r,n)):hd(e,r,n)},Ad=function(e,t){To(e);var n=Oo(t),r=Uo(n).concat(Dd(n));return ed(r,(function(t){Eo&&!ko(Ed,n,t)||kd(e,t,n[t])})),e},Ed=function(e){var t=Io(e),n=ko(fd,this,t);return!(this===sd&&Do(gd,t)&&!Do(vd,t))&&(!(n||!Do(this,t)||!Do(gd,t)||Do(this,td)&&this[td][t])||n)},xd=function(e,t){var n=Oo(e),r=Io(t);if(n!==sd||!Do(gd,r)||Do(vd,r)){var i=ld(n,r);return!i||!Do(gd,r)||Do(n,td)&&n[td][r]||(i.enumerable=!0),i}},Sd=function(e){var t=pd(Oo(e)),n=[];return ed(t,(function(e){Do(gd,e)||Do(Wo,e)||md(n,e)})),n},Dd=function(e){var t=e===sd,n=pd(t?vd:Oo(e)),r=[];return ed(n,(function(e){!Do(gd,e)||t&&!Do(sd,e)||md(r,gd[e])})),r};xo||(Vo(dd=(od=function(){if(Ro(dd,this))throw cd("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Po(arguments[0]):void 0,t=Ko(e),n=function(e){this===sd&&ko(n,vd,e),Do(this,td)&&Do(this[td],t)&&(this[td][t]=!1),_d(this,t,Co(1,e))};return Eo&&yd&&_d(sd,t,{configurable:!0,set:n}),wd(t,e)})[rd],"toString",(function(){return ad(this).tag})),Vo(od,"withoutSetter",(function(e){return wd(Ko(e),e)})),qo.f=Ed,No.f=kd,Fo.f=Ad,Go.f=xd,Mo.f=jo.f=Sd,Bo.f=Dd,Qo.f=function(e){return wd($o(e),e)},Eo&&(zo(dd,"description",{configurable:!0,get:function(){return ad(this).description}}),Vo(sd,"propertyIsEnumerable",Ed,{unsafe:!0}))),_o({global:!0,constructor:!0,wrap:!0,forced:!xo,sham:!xo},{Symbol:od}),ed(Uo(bd),(function(e){Jo(e)})),_o({target:nd,stat:!0,forced:!xo},{useSetter:function(){yd=!0},useSimple:function(){yd=!1}}),_o({target:"Object",stat:!0,forced:!xo,sham:!Eo},{create:function(e,t){return void 0===t?Lo(e):Ad(Lo(e),t)},defineProperty:kd,defineProperties:Ad,getOwnPropertyDescriptor:xd}),_o({target:"Object",stat:!0,forced:!xo},{getOwnPropertyNames:Sd}),Yo(),Xo(od,nd),Wo[td]=!0;var Rd=Ue&&!!Symbol.for&&!!Symbol.keyFor,Td=Ya,Od=_t,Id=ye,Pd=fs,Cd=K.exports,Ld=Rd,Ud=Cd("string-to-symbol-registry"),Md=Cd("symbol-to-string-registry");Td({target:"Symbol",stat:!0,forced:!Ld},{for:function(e){var t=Pd(e);if(Id(Ud,t))return Ud[t];var n=Od("Symbol")(t);return Ud[t]=n,Md[n]=t,n}});var jd=Ya,Bd=ye,Gd=St,Nd=Rt,Fd=Rd,qd=(0,K.exports)("symbol-to-string-registry");jd({target:"Symbol",stat:!0,forced:!Fd},{keyFor:function(e){if(!Gd(e))throw TypeError(Nd(e)+" is not a symbol");if(Bd(qd,e))return qd[e]}});var Vd=ie,zd=Function.prototype,Hd=zd.apply,Wd=zd.call,Kd="object"==typeof Reflect&&Reflect.apply||(Vd?Wd.bind(Hd):function(){return Wd.apply(Hd,arguments)}),$d=ce([].slice),Qd=ti,Jd=Xe,Yd=yr,Xd=fs,Zd=ce([].push),ec=Ya,tc=_t,nc=Kd,rc=vt,ic=ce,ac=re,sc=Xe,oc=St,dc=$d,cc=function(e){if(Jd(e))return e;if(Qd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?Zd(n,i):"number"!=typeof i&&"Number"!=Yd(i)&&"String"!=Yd(i)||Zd(n,Xd(i))}var a=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Qd(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},uc=Ue,lc=String,hc=tc("JSON","stringify"),pc=ic(/./.exec),fc=ic("".charAt),mc=ic("".charCodeAt),gc=ic("".replace),vc=ic(1..toString),bc=/[\uD800-\uDFFF]/g,yc=/^[\uD800-\uDBFF]$/,_c=/^[\uDC00-\uDFFF]$/,wc=!uc||ac((function(){var e=tc("Symbol")();return"[null]"!=hc([e])||"{}"!=hc({a:e})||"{}"!=hc(Object(e))})),kc=ac((function(){return'"\\udf06\\ud834"'!==hc("\udf06\ud834")||'"\\udead"'!==hc("\udead")})),Ac=function(e,t){var n=dc(arguments),r=cc(t);if(sc(r)||void 0!==e&&!oc(e))return n[1]=function(e,t){if(sc(r)&&(t=rc(r,this,lc(e),t)),!oc(t))return t},nc(hc,null,n)},Ec=function(e,t,n){var r=fc(n,t-1),i=fc(n,t+1);return pc(yc,e)&&!pc(_c,i)||pc(_c,e)&&!pc(yc,r)?"\\u"+vc(mc(e,0),16):e};hc&&ec({target:"JSON",stat:!0,arity:3,forced:wc||kc},{stringify:function(e,t,n){var r=dc(arguments),i=nc(wc?Ac:hc,null,r);return kc&&"string"==typeof i?gc(i,bc,Ec):i}});var xc=Aa,Sc=ge;Ya({target:"Object",stat:!0,forced:!Ue||re((function(){xc.f(1)}))},{getOwnPropertySymbols:function(e){var t=xc.f;return t?t(Sc(e)):[]}});var Dc=re,Rc=Pe,Tc=We("species"),Oc=function(e){return Rc>=51||!Dc((function(){var t=[];return(t.constructor={})[Tc]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ic=Oi.filter;Ya({target:"Array",proto:!0,forced:!Oc("filter")},{filter:function(e){return Ic(this,e,arguments.length>1?arguments[1]:void 0)}});var Pc=Ya,Cc=re,Lc=$i,Uc=Fi.f,Mc=et;Pc({target:"Object",stat:!0,forced:!Mc||Cc((function(){Uc(1)})),sham:!Mc},{getOwnPropertyDescriptor:function(e,t){return Uc(Lc(e),t)}});var jc=Ta,Bc=$i,Gc=Fi,Nc=Vs;Ya({target:"Object",stat:!0,sham:!et},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Bc(e),i=Gc.f,a=jc(r),s={},o=0;a.length>o;)void 0!==(n=i(r,t=a[o++]))&&Nc(s,t,n);return s}});var Fc=Ya,qc=ti,Vc=mi,zc=rt,Hc=da,Wc=Zr,Kc=$i,$c=Vs,Qc=We,Jc=$d,Yc=Oc("slice"),Xc=Qc("species"),Zc=Array,eu=Math.max;Fc({target:"Array",proto:!0,forced:!Yc},{slice:function(e,t){var n,r,i,a=Kc(this),s=Wc(a),o=Hc(e,s),d=Hc(void 0===t?s:t,s);if(qc(a)&&(n=a.constructor,(Vc(n)&&(n===Zc||qc(n.prototype))||zc(n)&&null===(n=n[Xc]))&&(n=void 0),n===Zc||void 0===n))return Jc(a,o,d);for(r=new(void 0===n?Zc:n)(eu(d-o,0)),i=0;o<d;o++,i++)o in a&&$c(r,i,a[o]);return r.length=i,r}});var tu=vt,nu=ft,ru=Ut,iu=function(e,t,n){var r,i;nu(e);try{if(!(r=ru(e,"return"))){if("throw"===t)throw n;return n}r=tu(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return nu(r),n},au=ft,su=iu,ou={},du=ou,cu=We("iterator"),uu=Array.prototype,lu=function(e){return void 0!==e&&(du.Array===e||uu[cu]===e)},hu=Sr,pu=Ut,fu=ue,mu=ou,gu=We("iterator"),vu=function(e){if(!fu(e))return pu(e,gu)||pu(e,"@@iterator")||mu[hu(e)]},bu=vt,yu=Pt,_u=ft,wu=Rt,ku=vu,Au=TypeError,Eu=function(e,t){var n=arguments.length<2?ku(e):t;if(yu(n))return _u(bu(n,e));throw Au(wu(e)+" is not iterable")},xu=Gr,Su=vt,Du=ge,Ru=function(e,t,n,r){try{return r?t(au(n)[0],n[1]):t(n)}catch(t){su(e,"throw",t)}},Tu=lu,Ou=mi,Iu=Zr,Pu=Vs,Cu=Eu,Lu=vu,Uu=Array,Mu=function(e){var t=Du(e),n=Ou(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=xu(i,r>2?arguments[2]:void 0));var s,o,d,c,u,l,h=Lu(t),p=0;if(!h||this===Uu&&Tu(h))for(s=Iu(t),o=n?new this(s):Uu(s);s>p;p++)l=a?i(t[p],p):t[p],Pu(o,p,l);else for(u=(c=Cu(t,h)).next,o=n?new this:[];!(d=Su(u,c)).done;p++)l=a?Ru(c,i,[d.value,p],!0):d.value,Pu(o,p,l);return o.length=p,o},ju=We("iterator"),Bu=!1;try{var Gu=0,Nu={next:function(){return{done:!!Gu++}},return:function(){Bu=!0}};Nu[ju]=function(){return this},Array.from(Nu,(function(){throw 2}))}catch(e){}var Fu=function(e,t){if(!t&&!Bu)return!1;var n=!1;try{var r={};r[ju]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},qu=Mu;Ya({target:"Array",stat:!0,forced:!Fu((function(e){Array.from(e)}))},{from:qu});var Vu,zu,Hu,Wu=ce,Ku=$r,$u=fs,Qu=pe,Ju=Wu("".charAt),Yu=Wu("".charCodeAt),Xu=Wu("".slice),Zu=function(e){return function(t,n){var r,i,a=$u(Qu(t)),s=Ku(n),o=a.length;return s<0||s>=o?e?"":void 0:(r=Yu(a,s))<55296||r>56319||s+1===o||(i=Yu(a,s+1))<56320||i>57343?e?Ju(a,s):r:e?Xu(a,s,s+2):i-56320+(r-55296<<10)+65536}},el={codeAt:Zu(!1),charAt:Zu(!0)},tl=!re((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),nl=ye,rl=Xe,il=ge,al=tl,sl=Pn("IE_PROTO"),ol=Object,dl=ol.prototype,cl=al?ol.getPrototypeOf:function(e){var t=il(e);if(nl(t,sl))return t[sl];var n=t.constructor;return rl(n)&&t instanceof n?n.prototype:t instanceof ol?dl:null},ul=re,ll=Xe,hl=rt,pl=cl,fl=mr,ml=We("iterator"),gl=!1;[].keys&&("next"in(Hu=[].keys())?(zu=pl(pl(Hu)))!==Object.prototype&&(Vu=zu):gl=!0);var vl=!hl(Vu)||ul((function(){var e={};return Vu[ml].call(e)!==e}));vl&&(Vu={}),ll(Vu[ml])||fl(Vu,ml,(function(){return this}));var bl={IteratorPrototype:Vu,BUGGY_SAFARI_ITERATORS:gl},yl=bl.IteratorPrototype,_l=js,wl=xn,kl=yo,Al=ou,El=function(){return this},xl=function(e,t,n,r){var i=t+" Iterator";return e.prototype=_l(yl,{next:wl(+!r,n)}),kl(e,i,!1),Al[i]=El,e},Sl=ce,Dl=Pt,Rl=Xe,Tl=String,Ol=TypeError,Il=function(e,t,n){try{return Sl(Dl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Pl=ft,Cl=function(e){if("object"==typeof e||Rl(e))return e;throw Ol("Can't set "+Tl(e)+" as a prototype")},Ll=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Il(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Pl(n),Cl(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ul=Ya,Ml=vt,jl=Xe,Bl=xl,Gl=cl,Nl=Ll,Fl=yo,ql=Rn,Vl=mr,zl=ou,Hl=fn.PROPER,Wl=fn.CONFIGURABLE,Kl=bl.IteratorPrototype,$l=bl.BUGGY_SAFARI_ITERATORS,Ql=We("iterator"),Jl="keys",Yl="values",Xl="entries",Zl=function(){return this},eh=function(e,t,n,r,i,a,s){Bl(n,t,r);var o,d,c,u=function(e){if(e===i&&m)return m;if(!$l&&e in p)return p[e];switch(e){case Jl:case Yl:case Xl:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,p=e.prototype,f=p[Ql]||p["@@iterator"]||i&&p[i],m=!$l&&f||u(i),g="Array"==t&&p.entries||f;if(g&&(o=Gl(g.call(new e)))!==Object.prototype&&o.next&&(Gl(o)!==Kl&&(Nl?Nl(o,Kl):jl(o[Ql])||Vl(o,Ql,Zl)),Fl(o,l,!0)),Hl&&i==Yl&&f&&f.name!==Yl&&(Wl?ql(p,"name",Yl):(h=!0,m=function(){return Ml(f,this)})),i)if(d={values:u(Yl),keys:a?m:u(Jl),entries:u(Xl)},s)for(c in d)($l||h||!(c in p))&&Vl(p,c,d[c]);else Ul({target:t,proto:!0,forced:$l||h},d);return p[Ql]!==m&&Vl(p,Ql,m,{name:i}),zl[t]=m,d},th=function(e,t){return{value:e,done:t}},nh=el.charAt,rh=fs,ih=Kn,ah=eh,sh=th,oh="String Iterator",dh=ih.set,ch=ih.getterFor(oh);ah(String,"String",(function(e){dh(this,{type:oh,string:rh(e),index:0})}),(function(){var e,t=ch(this),n=t.string,r=t.index;return r>=n.length?sh(void 0,!0):(e=nh(n,r),t.index+=e.length,sh(e,!1))}));var uh=ft,lh=function(){var e=uh(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},hh=re,ph=W.RegExp,fh=hh((function(){var e=ph("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),mh=fh||hh((function(){return!ph("a","y").sticky})),gh={BROKEN_CARET:fh||hh((function(){var e=ph("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:mh,UNSUPPORTED_Y:fh},vh=re,bh=W.RegExp,yh=vh((function(){var e=bh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),_h=re,wh=W.RegExp,kh=_h((function(){var e=wh("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ah=vt,Eh=ce,xh=fs,Sh=lh,Dh=gh,Rh=K.exports,Th=js,Oh=Kn.get,Ih=yh,Ph=kh,Ch=Rh("native-string-replace",String.prototype.replace),Lh=RegExp.prototype.exec,Uh=Lh,Mh=Eh("".charAt),jh=Eh("".indexOf),Bh=Eh("".replace),Gh=Eh("".slice),Nh=function(){var e=/a/,t=/b*/g;return Ah(Lh,e,"a"),Ah(Lh,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Fh=Dh.BROKEN_CARET,qh=void 0!==/()??/.exec("")[1];(Nh||qh||Fh||Ih||Ph)&&(Uh=function(e){var t,n,r,i,a,s,o,d=this,c=Oh(d),u=xh(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=Ah(Uh,l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,p=Fh&&d.sticky,f=Ah(Sh,d),m=d.source,g=0,v=u;if(p&&(f=Bh(f,"y",""),-1===jh(f,"g")&&(f+="g"),v=Gh(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==Mh(u,d.lastIndex-1))&&(m="(?: "+m+")",v=" "+v,g++),n=new RegExp("^(?:"+m+")",f)),qh&&(n=new RegExp("^"+m+"$(?!\\s)",f)),Nh&&(r=d.lastIndex),i=Ah(Lh,p?n:d,v),p?i?(i.input=Gh(i.input,g),i[0]=Gh(i[0],g),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:Nh&&i&&(d.lastIndex=d.global?i.index+i[0].length:r),qh&&i&&i.length>1&&Ah(Ch,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=Th(null),a=0;a<h.length;a++)s[(o=h[a])[0]]=i[o[1]];return i});var Vh=Uh;Ya({target:"RegExp",proto:!0,forced:/./.exec!==Vh},{exec:Vh});var zh=Ya,Hh=et,Wh=ce,Kh=ye,$h=Xe,Qh=wt,Jh=fs,Yh=ro,Xh=La,Zh=W.Symbol,ep=Zh&&Zh.prototype;if(Hh&&$h(Zh)&&(!("description"in ep)||void 0!==Zh().description)){var tp={},np=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Jh(arguments[0]),t=Qh(ep,this)?new Zh(e):void 0===e?Zh():Zh(e);return""===e&&(tp[t]=!0),t};Xh(np,Zh),np.prototype=ep,ep.constructor=np;var rp="Symbol(test)"==String(Zh("test")),ip=Wh(ep.valueOf),ap=Wh(ep.toString),sp=/^Symbol\((.*)\)[^)]+$/,op=Wh("".replace),dp=Wh("".slice);Yh(ep,"description",{configurable:!0,get:function(){var e=ip(this);if(Kh(tp,e))return"";var t=ap(e),n=rp?dp(t,7,-1):op(t,sp,"$1");return""===n?void 0:n}}),zh({global:!0,constructor:!0,forced:!0},{Symbol:np})}lo("iterator");var cp=We,up=js,lp=Ze.f,hp=cp("unscopables"),pp=Array.prototype;null==pp[hp]&&lp(pp,hp,{configurable:!0,value:up(null)});var fp=function(e){pp[hp][e]=!0},mp=$i,gp=fp,vp=ou,bp=Kn,yp=Ze.f,_p=eh,wp=th,kp=et,Ap="Array Iterator",Ep=bp.set,xp=bp.getterFor(Ap),Sp=_p(Array,"Array",(function(e,t){Ep(this,{type:Ap,target:mp(e),index:0,kind:t})}),(function(){var e=xp(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,wp(void 0,!0)):wp("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Dp=vp.Arguments=vp.Array;if(gp("keys"),gp("values"),gp("entries"),kp&&"values"!==Dp.name)try{yp(Dp,"name",{value:"values"})}catch(e){}var Rp=W,Tp=Tr,Op=Pr,Ip=Sp,Pp=Rn,Cp=We,Lp=Cp("iterator"),Up=Cp("toStringTag"),Mp=Ip.values,jp=function(e,t){if(e){if(e[Lp]!==Mp)try{Pp(e,Lp,Mp)}catch(t){e[Lp]=Mp}if(e[Up]||Pp(e,Up,t),Tp[t])for(var n in Ip)if(e[n]!==Ip[n])try{Pp(e,n,Ip[n])}catch(t){e[n]=Ip[n]}}};for(var Bp in Tp)jp(Rp[Bp]&&Rp[Bp].prototype,Bp);jp(Op,"DOMTokenList");var Gp,Np,Fp,qp,Vp="undefined"!=typeof process&&"process"==yr(process),zp=_t,Hp=ro,Wp=et,Kp=We("species"),$p=function(e){var t=zp(e);Wp&&t&&!t[Kp]&&Hp(t,Kp,{configurable:!0,get:function(){return this}})},Qp=wt,Jp=TypeError,Yp=function(e,t){if(Qp(t,e))return e;throw Jp("Incorrect invocation")},Xp=mi,Zp=Rt,ef=TypeError,tf=ft,nf=function(e){if(Xp(e))return e;throw ef(Zp(e)+" is not a constructor")},rf=ue,af=We("species"),sf=function(e,t){var n,r=tf(e).constructor;return void 0===r||rf(n=tf(r)[af])?t:nf(n)},of=TypeError,df=function(e,t){if(e<t)throw of("Not enough arguments");return e},cf=/(?:ipad|iphone|ipod).*applewebkit/i.test(xe),uf=W,lf=Kd,hf=Gr,pf=Xe,ff=ye,mf=re,gf=As,vf=$d,bf=ot,yf=df,_f=cf,wf=Vp,kf=uf.setImmediate,Af=uf.clearImmediate,Ef=uf.process,xf=uf.Dispatch,Sf=uf.Function,Df=uf.MessageChannel,Rf=uf.String,Tf=0,Of={},If="onreadystatechange";mf((function(){Gp=uf.location}));var Pf=function(e){if(ff(Of,e)){var t=Of[e];delete Of[e],t()}},Cf=function(e){return function(){Pf(e)}},Lf=function(e){Pf(e.data)},Uf=function(e){uf.postMessage(Rf(e),Gp.protocol+"//"+Gp.host)};kf&&Af||(kf=function(e){yf(arguments.length,1);var t=pf(e)?e:Sf(e),n=vf(arguments,1);return Of[++Tf]=function(){lf(t,void 0,n)},Np(Tf),Tf},Af=function(e){delete Of[e]},wf?Np=function(e){Ef.nextTick(Cf(e))}:xf&&xf.now?Np=function(e){xf.now(Cf(e))}:Df&&!_f?(qp=(Fp=new Df).port2,Fp.port1.onmessage=Lf,Np=hf(qp.postMessage,qp)):uf.addEventListener&&pf(uf.postMessage)&&!uf.importScripts&&Gp&&"file:"!==Gp.protocol&&!mf(Uf)?(Np=Uf,uf.addEventListener("message",Lf,!1)):Np=If in bf("script")?function(e){gf.appendChild(bf("script"))[If]=function(){gf.removeChild(this),Pf(e)}}:function(e){setTimeout(Cf(e),0)});var Mf={set:kf,clear:Af},jf=function(){this.head=null,this.tail=null};jf.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 Bf,Gf,Nf,Ff,qf,Vf=jf,zf=/ipad|iphone|ipod/i.test(xe)&&"undefined"!=typeof Pebble,Hf=/web0s(?!.*chrome)/i.test(xe),Wf=W,Kf=Gr,$f=Fi.f,Qf=Mf.set,Jf=Vf,Yf=cf,Xf=zf,Zf=Hf,em=Vp,tm=Wf.MutationObserver||Wf.WebKitMutationObserver,nm=Wf.document,rm=Wf.process,im=Wf.Promise,am=$f(Wf,"queueMicrotask"),sm=am&&am.value;if(!sm){var om=new Jf,dm=function(){var e,t;for(em&&(e=rm.domain)&&e.exit();t=om.get();)try{t()}catch(e){throw om.head&&Bf(),e}e&&e.enter()};Yf||em||Zf||!tm||!nm?!Xf&&im&&im.resolve?((Ff=im.resolve(void 0)).constructor=im,qf=Kf(Ff.then,Ff),Bf=function(){qf(dm)}):em?Bf=function(){rm.nextTick(dm)}:(Qf=Kf(Qf,Wf),Bf=function(){Qf(dm)}):(Gf=!0,Nf=nm.createTextNode(""),new tm(dm).observe(Nf,{characterData:!0}),Bf=function(){Nf.data=Gf=!Gf}),sm=function(e){om.head||Bf(),om.add(e)}}var cm=sm,um=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},lm=W.Promise,hm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,pm=!hm&&!Vp&&"object"==typeof window&&"object"==typeof document,fm=W,mm=lm,gm=Xe,vm=Va,bm=wn,ym=We,_m=pm,wm=hm,km=Pe;mm&&mm.prototype;var Am=ym("species"),Em=!1,xm=gm(fm.PromiseRejectionEvent),Sm=vm("Promise",(function(){var e=bm(mm),t=e!==String(mm);if(!t&&66===km)return!0;if(!km||km<51||!/native code/.test(e)){var n=new mm((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Am]=r,!(Em=n.then((function(){}))instanceof r))return!0}return!t&&(_m||wm)&&!xm})),Dm={CONSTRUCTOR:Sm,REJECTION_EVENT:xm,SUBCLASSING:Em},Rm={},Tm=Pt,Om=TypeError,Im=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Om("Bad Promise constructor");t=e,n=r})),this.resolve=Tm(t),this.reject=Tm(n)};Rm.f=function(e){return new Im(e)};var Pm,Cm,Lm,Um=Ya,Mm=Vp,jm=W,Bm=vt,Gm=mr,Nm=Ll,Fm=yo,qm=$p,Vm=Pt,zm=Xe,Hm=rt,Wm=Yp,Km=sf,$m=Mf.set,Qm=cm,Jm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},Ym=um,Xm=Vf,Zm=Kn,eg=lm,tg=Rm,ng="Promise",rg=Dm.CONSTRUCTOR,ig=Dm.REJECTION_EVENT,ag=Dm.SUBCLASSING,sg=Zm.getterFor(ng),og=Zm.set,dg=eg&&eg.prototype,cg=eg,ug=dg,lg=jm.TypeError,hg=jm.document,pg=jm.process,fg=tg.f,mg=fg,gg=!!(hg&&hg.createEvent&&jm.dispatchEvent),vg="unhandledrejection",bg=function(e){var t;return!(!Hm(e)||!zm(t=e.then))&&t},yg=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&&Eg(t),t.rejection=1),!0===o?n=a:(u&&u.enter(),n=o(a),u&&(u.exit(),i=!0)),n===e.promise?c(lg("Promise-chain cycle")):(r=bg(n))?Bm(r,n,d,c):d(n)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},_g=function(e,t){e.notified||(e.notified=!0,Qm((function(){for(var n,r=e.reactions;n=r.get();)yg(n,e);e.notified=!1,t&&!e.rejection&&kg(e)})))},wg=function(e,t,n){var r,i;gg?((r=hg.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),jm.dispatchEvent(r)):r={promise:t,reason:n},!ig&&(i=jm["on"+e])?i(r):e===vg&&Jm("Unhandled promise rejection",n)},kg=function(e){Bm($m,jm,(function(){var t,n=e.facade,r=e.value;if(Ag(e)&&(t=Ym((function(){Mm?pg.emit("unhandledRejection",r,n):wg(vg,n,r)})),e.rejection=Mm||Ag(e)?2:1,t.error))throw t.value}))},Ag=function(e){return 1!==e.rejection&&!e.parent},Eg=function(e){Bm($m,jm,(function(){var t=e.facade;Mm?pg.emit("rejectionHandled",t):wg("rejectionhandled",t,e.value)}))},xg=function(e,t,n){return function(r){e(t,r,n)}},Sg=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,_g(e,!0))},Dg=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw lg("Promise can't be resolved itself");var r=bg(t);r?Qm((function(){var n={done:!1};try{Bm(r,t,xg(Dg,n,e),xg(Sg,n,e))}catch(t){Sg(n,t,e)}})):(e.value=t,e.state=1,_g(e,!1))}catch(t){Sg({done:!1},t,e)}}};if(rg&&(ug=(cg=function(e){Wm(this,ug),Vm(e),Bm(Pm,this);var t=sg(this);try{e(xg(Dg,t),xg(Sg,t))}catch(e){Sg(t,e)}}).prototype,(Pm=function(e){og(this,{type:ng,done:!1,notified:!1,parent:!1,reactions:new Xm,rejection:!1,state:0,value:void 0})}).prototype=Gm(ug,"then",(function(e,t){var n=sg(this),r=fg(Km(this,cg));return n.parent=!0,r.ok=!zm(e)||e,r.fail=zm(t)&&t,r.domain=Mm?pg.domain:void 0,0==n.state?n.reactions.add(r):Qm((function(){yg(r,n)})),r.promise})),Cm=function(){var e=new Pm,t=sg(e);this.promise=e,this.resolve=xg(Dg,t),this.reject=xg(Sg,t)},tg.f=fg=function(e){return e===cg||undefined===e?new Cm(e):mg(e)},zm(eg)&&dg!==Object.prototype)){Lm=dg.then,ag||Gm(dg,"then",(function(e,t){var n=this;return new cg((function(e,t){Bm(Lm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete dg.constructor}catch(e){}Nm&&Nm(dg,ug)}Um({global:!0,constructor:!0,wrap:!0,forced:rg},{Promise:cg}),Fm(cg,ng,!1),qm(ng);var Rg=Gr,Tg=vt,Og=ft,Ig=Rt,Pg=lu,Cg=Zr,Lg=wt,Ug=Eu,Mg=vu,jg=iu,Bg=TypeError,Gg=function(e,t){this.stopped=e,this.result=t},Ng=Gg.prototype,Fg=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=Rg(t,u),g=function(e){return r&&jg(r,"normal",e),new Gg(!0,e)},v=function(e){return l?(Og(e),f?m(e[0],e[1],g):m(e[0],e[1])):f?m(e,g):m(e)};if(h)r=e.iterator;else if(p)r=e;else{if(!(i=Mg(e)))throw Bg(Ig(e)+" is not iterable");if(Pg(i)){for(a=0,s=Cg(e);s>a;a++)if((o=v(e[a]))&&Lg(Ng,o))return o;return new Gg(!1)}r=Ug(e,i)}for(d=h?e.next:r.next;!(c=Tg(d,r)).done;){try{o=v(c.value)}catch(e){jg(r,"throw",e)}if("object"==typeof o&&o&&Lg(Ng,o))return o}return new Gg(!1)},qg=lm,Vg=Dm.CONSTRUCTOR||!Fu((function(e){qg.all(e).then(void 0,(function(){}))})),zg=vt,Hg=Pt,Wg=Rm,Kg=um,$g=Fg;Ya({target:"Promise",stat:!0,forced:Vg},{all:function(e){var t=this,n=Wg.f(t),r=n.resolve,i=n.reject,a=Kg((function(){var n=Hg(t.resolve),a=[],s=0,o=1;$g(e,(function(e){var d=s++,c=!1;o++,zg(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 Qg=Ya,Jg=Dm.CONSTRUCTOR,Yg=lm,Xg=_t,Zg=Xe,ev=mr,tv=Yg&&Yg.prototype;if(Qg({target:"Promise",proto:!0,forced:Jg,real:!0},{catch:function(e){return this.then(void 0,e)}}),Zg(Yg)){var nv=Xg("Promise").prototype.catch;tv.catch!==nv&&ev(tv,"catch",nv,{unsafe:!0})}var rv=vt,iv=Pt,av=Rm,sv=um,ov=Fg;Ya({target:"Promise",stat:!0,forced:Vg},{race:function(e){var t=this,n=av.f(t),r=n.reject,i=sv((function(){var i=iv(t.resolve);ov(e,(function(e){rv(i,t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var dv=vt,cv=Rm;Ya({target:"Promise",stat:!0,forced:Dm.CONSTRUCTOR},{reject:function(e){var t=cv.f(this);return dv(t.reject,void 0,e),t.promise}});var uv=ft,lv=rt,hv=Rm,pv=function(e,t){if(uv(e),lv(t)&&t.constructor===e)return t;var n=hv.f(e);return(0,n.resolve)(t),n.promise},fv=Ya,mv=Dm.CONSTRUCTOR,gv=pv;_t("Promise"),fv({target:"Promise",stat:!0,forced:mv},{resolve:function(e){return gv(this,e)}});var vv=TypeError,bv=Ya,yv=re,_v=ti,wv=rt,kv=ge,Av=Zr,Ev=function(e){if(e>9007199254740991)throw vv("Maximum allowed index exceeded");return e},xv=Vs,Sv=ki,Dv=Oc,Rv=Pe,Tv=We("isConcatSpreadable"),Ov=Rv>=51||!yv((function(){var e=[];return e[Tv]=!1,e.concat()[0]!==e})),Iv=function(e){if(!wv(e))return!1;var t=e[Tv];return void 0!==t?!!t:_v(e)};bv({target:"Array",proto:!0,arity:1,forced:!Ov||!Dv("concat")},{concat:function(e){var t,n,r,i,a,s=kv(this),o=Sv(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Iv(a=-1===t?s:arguments[t]))for(i=Av(a),Ev(d+i),n=0;n<i;n++,d++)n in a&&xv(o,d,a[n]);else Ev(d+1),xv(o,d++,a);return o.length=d,o}});var Pv=et,Cv=fn.EXISTS,Lv=ce,Uv=ro,Mv=Function.prototype,jv=Lv(Mv.toString),Bv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Gv=Lv(Bv.exec);function Nv(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 Fv(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 Fv(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 Fv(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 qv(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 Vv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qv(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Pv&&!Cv&&Uv(Mv,"name",{configurable:!0,get:function(){try{return Gv(Bv,jv(this))[1]}catch(e){return""}}});var zv,Hv={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"}},Wv={},Kv=function(e,t){Wv[e]=Vv(Vv({},t),{},{isLoading:!1})},$v=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))},Qv=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=Wv[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:i.isLoading=!0,a=Nv(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=Hv[o].name,!window[d]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,$v({id:o,src:Hv[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,$v({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)}}(),Jv=D((function t(){var n=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qv("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"]},Kv(this.moduleName,this.moduleConfig)})),Yv=new Jv,Xv=rt,Zv=yr,eb=We("match"),tb=function(e){var t;return Xv(e)&&(void 0!==(t=e[eb])?!!t:"RegExp"==Zv(e))},nb=tb,rb=TypeError,ib=function(e){if(nb(e))throw rb("The method doesn't accept regular expressions");return e},ab=We("match"),sb=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ab]=!1,"/./"[e](t)}catch(e){}}return!1},ob=Ya,db=Ur,cb=Fi.f,ub=Yr,lb=fs,hb=ib,pb=pe,fb=sb,mb=db("".startsWith),gb=db("".slice),vb=Math.min,bb=fb("startsWith");ob({target:"String",proto:!0,forced:!!(bb||(zv=cb(String.prototype,"startsWith"),!zv||zv.writable))&&!bb},{startsWith:function(e){var t=lb(pb(this));hb(e);var n=ub(vb(arguments.length>1?arguments[1]:void 0,t.length)),r=lb(e);return mb?mb(t,r,n):gb(t,n,n+r.length)===r}});var yb=vt,_b=ye,wb=wt,kb=lh,Ab=RegExp.prototype,Eb=function(e){var t=e.flags;return void 0!==t||"flags"in Ab||_b(e,"flags")||!wb(Ab,e)?t:yb(kb,e)},xb=fn.PROPER,Sb=mr,Db=ft,Rb=fs,Tb=re,Ob=Eb,Ib="toString",Pb=RegExp.prototype[Ib],Cb=Tb((function(){return"/a/b"!=Pb.call({source:"a",flags:"b"})})),Lb=xb&&Pb.name!=Ib;(Cb||Lb)&&Sb(RegExp.prototype,Ib,(function(){var e=Db(this);return"/"+Rb(e.source)+"/"+Rb(Ob(e))}),{unsafe:!0});var Ub=Ur,Mb=mr,jb=Vh,Bb=re,Gb=We,Nb=Rn,Fb=Gb("species"),qb=RegExp.prototype,Vb=function(e,t,n,r){var i=Gb(e),a=!Bb((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),s=a&&!Bb((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Fb]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!s||n){var o=Ub(/./[i]),d=t(i,""[e],(function(e,t,n,r,i){var s=Ub(e),d=t.exec;return d===jb||d===qb.exec?a&&!i?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Mb(String.prototype,e,d[0]),Mb(qb,i,d[1])}r&&Nb(qb[i],"sham",!0)},zb=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Hb=vt,Wb=ft,Kb=Xe,$b=yr,Qb=Vh,Jb=TypeError,Yb=function(e,t){var n=e.exec;if(Kb(n)){var r=Hb(n,e,t);return null!==r&&Wb(r),r}if("RegExp"===$b(e))return Hb(Qb,e,t);throw Jb("RegExp#exec called on incompatible receiver")},Xb=vt,Zb=ft,ey=ue,ty=pe,ny=zb,ry=fs,iy=Ut,ay=Yb;function sy(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 oy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sy(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Vb("search",(function(e,t,n){return[function(t){var n=ty(this),r=ey(t)?void 0:iy(t,e);return r?Xb(r,t,n):new RegExp(t)[e](ry(n))},function(e){var r=Zb(this),i=ry(e),a=n(t,r,i);if(a.done)return a.value;var s=r.lastIndex;ny(s,0)||(r.lastIndex=0);var o=ay(r,i);return ny(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var dy,cy,uy=function(){function e(){R(this,e)}return D(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,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",v);var b=(e||n)&&r.loaderEnabled,y=(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:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,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(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(I.encode(JSON.stringify(e)))}catch(e){}try{var n=new 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=oy(oy({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}}]),e}(),ly=function(){try{return(new uy).getBridgeContext()}catch(e){return{}}}(),hy={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(dy=!1,(cy=d("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===cy.xanthophyll&&(dy=!0),dy)},py=el.charAt,fy=ce,my=ge,gy=Math.floor,vy=fy("".charAt),by=fy("".replace),yy=fy("".slice),_y=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,wy=/\$([$&'`]|\d{1,2})/g,ky=Kd,Ay=vt,Ey=ce,xy=Vb,Sy=re,Dy=ft,Ry=Xe,Ty=ue,Oy=$r,Iy=Yr,Py=fs,Cy=pe,Ly=function(e,t,n){return t+(n?py(e,t).length:1)},Uy=Ut,My=function(e,t,n,r,i,a){var s=n+e.length,o=r.length,d=wy;return void 0!==i&&(i=my(i),d=_y),by(a,d,(function(a,d){var c;switch(vy(d,0)){case"$":return"$";case"&":return e;case"`":return yy(t,0,n);case"'":return yy(t,s);case"<":c=i[yy(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>o){var l=gy(u/10);return 0===l?a:l<=o?void 0===r[l-1]?vy(d,1):r[l-1]+vy(d,1):a}c=r[u-1]}return void 0===c?"":c}))},jy=Yb,By=We("replace"),Gy=Math.max,Ny=Math.min,Fy=Ey([].concat),qy=Ey([].push),Vy=Ey("".indexOf),zy=Ey("".slice),Hy="$0"==="a".replace(/./,"$0"),Wy=!!/./[By]&&""===/./[By]("a","$0");xy("replace",(function(e,t,n){var r=Wy?"$":"$0";return[function(e,n){var r=Cy(this),i=Ty(e)?void 0:Uy(e,By);return i?Ay(i,e,r,n):Ay(t,Py(r),e,n)},function(e,i){var a=Dy(this),s=Py(e);if("string"==typeof i&&-1===Vy(i,r)&&-1===Vy(i,"$<")){var o=n(t,a,s,i);if(o.done)return o.value}var d=Ry(i);d||(i=Py(i));var c=a.global;if(c){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=jy(a,s);if(null===h)break;if(qy(l,h),!c)break;""===Py(h[0])&&(a.lastIndex=Ly(s,Iy(a.lastIndex),u))}for(var p,f="",m=0,g=0;g<l.length;g++){for(var v=Py((h=l[g])[0]),b=Gy(Ny(Oy(h.index),s.length),0),y=[],_=1;_<h.length;_++)qy(y,void 0===(p=h[_])?p:String(p));var w=h.groups;if(d){var k=Fy([v],y,b,s);void 0!==w&&qy(k,w);var A=Py(ky(i,void 0,k))}else A=My(v,s,b,y,w,i);b>=m&&(f+=zy(s,m,b)+A,m=b+v.length)}return f+zy(s,m)}]}),!!Sy((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Hy||Wy);var Ky=re,$y=et,Qy=We("iterator"),Jy=!Ky((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!$y||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Qy]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),Yy=mr,Xy=Qs,Zy=Math.floor,e_=function(e,t){var n=e.length,r=Zy(n/2);return n<8?t_(e,t):n_(e,e_(Xy(e,0,r),t),e_(Xy(e,r),t),t)},t_=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},n_=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},r_=Ya,i_=W,a_=vt,s_=ce,o_=et,d_=Jy,c_=mr,u_=ro,l_=function(e,t,n){for(var r in t)Yy(e,r,t[r],n);return e},h_=yo,p_=xl,f_=Kn,m_=Yp,g_=Xe,v_=ye,b_=Gr,y_=Sr,__=ft,w_=rt,k_=fs,A_=js,E_=xn,x_=Eu,S_=vu,D_=df,R_=e_,T_=We("iterator"),O_="URLSearchParams",I_=O_+"Iterator",P_=f_.set,C_=f_.getterFor(O_),L_=f_.getterFor(I_),U_=Object.getOwnPropertyDescriptor,M_=function(e){if(!o_)return i_[e];var t=U_(i_,e);return t&&t.value},j_=M_("fetch"),B_=M_("Request"),G_=M_("Headers"),N_=B_&&B_.prototype,F_=G_&&G_.prototype,q_=i_.RegExp,V_=i_.TypeError,z_=i_.decodeURIComponent,H_=i_.encodeURIComponent,W_=s_("".charAt),K_=s_([].join),$_=s_([].push),Q_=s_("".replace),J_=s_([].shift),Y_=s_([].splice),X_=s_("".split),Z_=s_("".slice),ew=/\+/g,tw=Array(4),nw=function(e){return tw[e-1]||(tw[e-1]=q_("((?:%[\\da-f]{2}){"+e+"})","gi"))},rw=function(e){try{return z_(e)}catch(t){return e}},iw=function(e){var t=Q_(e,ew," "),n=4;try{return z_(t)}catch(e){for(;n;)t=Q_(t,nw(n--),rw);return t}},aw=/[!'()~]|%20/g,sw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ow=function(e){return sw[e]},dw=function(e){return Q_(H_(e),aw,ow)},cw=p_((function(e,t){P_(this,{type:I_,iterator:x_(C_(e).entries),kind:t})}),"Iterator",(function(){var e=L_(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),uw=function(e){this.entries=[],this.url=null,void 0!==e&&(w_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===W_(e,0)?Z_(e,1):e:k_(e)))};uw.prototype={type:O_,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,a,s,o,d=S_(e);if(d)for(n=(t=x_(e,d)).next;!(r=a_(n,t)).done;){if(a=(i=x_(__(r.value))).next,(s=a_(a,i)).done||(o=a_(a,i)).done||!a_(a,i).done)throw V_("Expected sequence with length 2");$_(this.entries,{key:k_(s.value),value:k_(o.value)})}else for(var c in e)v_(e,c)&&$_(this.entries,{key:c,value:k_(e[c])})},parseQuery:function(e){if(e)for(var t,n,r=X_(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(n=X_(t,"="),$_(this.entries,{key:iw(J_(n)),value:iw(K_(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],$_(n,dw(e.key)+"="+dw(e.value));return K_(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var lw=function(){m_(this,hw);var e=P_(this,new uw(arguments.length>0?arguments[0]:void 0));o_||(this.length=e.entries.length)},hw=lw.prototype;if(l_(hw,{append:function(e,t){D_(arguments.length,2);var n=C_(this);$_(n.entries,{key:k_(e),value:k_(t)}),o_||this.length++,n.updateURL()},delete:function(e){D_(arguments.length,1);for(var t=C_(this),n=t.entries,r=k_(e),i=0;i<n.length;)n[i].key===r?Y_(n,i,1):i++;o_||(this.length=n.length),t.updateURL()},get:function(e){D_(arguments.length,1);for(var t=C_(this).entries,n=k_(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){D_(arguments.length,1);for(var t=C_(this).entries,n=k_(e),r=[],i=0;i<t.length;i++)t[i].key===n&&$_(r,t[i].value);return r},has:function(e){D_(arguments.length,1);for(var t=C_(this).entries,n=k_(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){D_(arguments.length,1);for(var n,r=C_(this),i=r.entries,a=!1,s=k_(e),o=k_(t),d=0;d<i.length;d++)(n=i[d]).key===s&&(a?Y_(i,d--,1):(a=!0,n.value=o));a||$_(i,{key:s,value:o}),o_||(this.length=i.length),r.updateURL()},sort:function(){var e=C_(this);R_(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=C_(this).entries,r=b_(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 cw(this,"keys")},values:function(){return new cw(this,"values")},entries:function(){return new cw(this,"entries")}},{enumerable:!0}),c_(hw,T_,hw.entries,{name:"entries"}),c_(hw,"toString",(function(){return C_(this).serialize()}),{enumerable:!0}),o_&&u_(hw,"size",{get:function(){return C_(this).entries.length},configurable:!0,enumerable:!0}),h_(lw,O_),r_({global:!0,constructor:!0,forced:!d_},{URLSearchParams:lw}),!d_&&g_(G_)){var pw=s_(F_.has),fw=s_(F_.set),mw=function(e){if(w_(e)){var t,n=e.body;if(y_(n)===O_)return t=e.headers?new G_(e.headers):new G_,pw(t,"content-type")||fw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),A_(e,{body:E_(0,k_(n)),headers:E_(0,t)})}return e};if(g_(j_)&&r_({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return j_(e,arguments.length>1?mw(arguments[1]):{})}}),g_(B_)){var gw=function(e){return m_(this,N_),new B_(e,arguments.length>1?mw(arguments[1]):{})};N_.constructor=gw,gw.prototype=N_,r_({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:gw})}}var vw={URLSearchParams:lw,getState:C_},bw=pa.includes,yw=fp;Ya({target:"Array",proto:!0,forced:re((function(){return!Array(1).includes()}))},{includes:function(e){return bw(this,e,arguments.length>1?arguments[1]:void 0)}}),yw("includes");var _w=Ya,ww=ib,kw=pe,Aw=fs,Ew=sb,xw=ce("".indexOf);function Sw(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),P.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(C(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?C(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))}}}_w({target:"String",proto:!0,forced:!Ew("includes")},{includes:function(e){return!!~xw(Aw(kw(this)),Aw(ww(e)),arguments.length>1?arguments[1]:void 0)}});var Dw="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==Dw&&Dw,Rw={searchParams:"URLSearchParams"in Dw,iterable:"Symbol"in Dw&&"iterator"in Symbol,blob:"FileReader"in Dw&&"Blob"in Dw&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in Dw,arrayBuffer:"ArrayBuffer"in Dw};if(Rw.arrayBuffer)var Tw=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Ow=ArrayBuffer.isView||function(e){return e&&Tw.indexOf(Object.prototype.toString.call(e))>-1};function Iw(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 Pw(e){return"string"!=typeof e&&(e=String(e)),e}function Cw(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Rw.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Lw(e){this.map={},e instanceof Lw?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Uw(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Mw(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function jw(e){var t=new FileReader,n=Mw(t);return t.readAsArrayBuffer(e),n}function Bw(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Gw(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Rw.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Rw.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Rw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Rw.arrayBuffer&&Rw.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Bw(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Rw.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Ow(e))?this._bodyArrayBuffer=Bw(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Rw.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Rw.blob&&(this.blob=function(){var e=Uw(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=Uw(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(jw)}),this.text=function(){var e=Uw(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Mw(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Rw.formData&&(this.formData=function(){return this.text().then(qw)}),this.json=function(){return this.text().then(JSON.parse)},this}Lw.prototype.append=function(e,t){e=Iw(e),t=Pw(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Lw.prototype.delete=function(e){delete this.map[Iw(e)]},Lw.prototype.get=function(e){return e=Iw(e),this.has(e)?this.map[e]:null},Lw.prototype.has=function(e){return this.map.hasOwnProperty(Iw(e))},Lw.prototype.set=function(e,t){this.map[Iw(e)]=Pw(t)},Lw.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Lw.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Cw(e)},Lw.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Cw(e)},Lw.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Cw(e)},Rw.iterable&&(Lw.prototype[Symbol.iterator]=Lw.prototype.entries);var Nw=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Fw(e,t){if(!(this instanceof Fw))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 Fw){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Lw(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 Lw(t.headers)),this.method=function(e){var t=e.toUpperCase();return Nw.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function 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 Vw(e,t){if(!(this instanceof Vw))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Lw(t.headers),this.url=t.url||"",this._initBody(e)}Fw.prototype.clone=function(){return new Fw(this,{body:this._bodyInit})},Gw.call(Fw.prototype),Gw.call(Vw.prototype),Vw.prototype.clone=function(){return new Vw(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Lw(this.headers),url:this.url})},Vw.error=function(){var e=new Vw(null,{status:0,statusText:""});return e.type="error",e};var zw=[301,302,303,307,308];Vw.redirect=function(e,t){if(-1===zw.indexOf(t))throw new RangeError("Invalid status code");return new Vw(null,{status:t,headers:{location:e}})};var Hw,Ww=Dw.DOMException;try{new Ww}catch(e){Ww=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Ww.prototype=Object.create(Error.prototype),Ww.prototype.constructor=Ww}function Kw(e,t){return new Promise((function(n,r){var i=new Fw(e,t);if(i.signal&&i.signal.aborted)return r(new Ww("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new Lw,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new Vw(i,r))}),0)},a.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){r(new Ww("Aborted","AbortError"))}),0)},a.open(i.method,function(e){try{return""===e&&Dw.location.href?Dw.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&&(Rw.blob?a.responseType="blob":Rw.arrayBuffer&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Lw?i.headers.forEach((function(e,t){a.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){a.setRequestHeader(e,Pw(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",s)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}Kw.polyfill=!0,Dw.fetch||(Dw.fetch=Kw,Dw.Headers=Lw,Dw.Request=Fw,Dw.Response=Vw);var $w=function(e){var n=this;if(!Hw){var r={gameId:e.gameId,hours:(new Date).getHours(),topDomain:ly.topDomain,domain:ly.parentDomain,referrer:ly.parentURL,depth:o(),version:ss.version,byloader:ly.isTokenGameURL,isTokenGameURL:ly.isTokenGameURL,isMasterGameURL:ly.isMasterGameURL,isExtHostedGameURL:ly.isExtHostedGameURL,byloaderVersion:ly.version,tracking:hy.userDeclinedTracking,whitelabel:hy.whitelabelPartner,platform:u()};Hw=new l(r)}return Hw||{send:function(){t(this,n)}.bind(this)}},Qw={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){}}},Jw={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},Yw={gameAPI:"game.api.gamedistribution.com"},Xw={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},Zw=function(){var e=this,n=Jw.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?Xw:Yw}},ek=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 tk(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 nk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tk(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rk,ik,ak,sk=new j,ok=[],dk=function(e){ok.push(e)},ck=function(e){rk=$w(ak=e)},uk=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ik){e.next=6;break}return e.next=3,pk(ak);case 3:ik=e.sent,sk.emit("game-data-ready",ik),lk();case 6:return e.abrupt("return",ik);case 7:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),lk=function(){var t,n;if(null!==(t=ik)&&void 0!==t&&null!==(n=t.aws_tst)&&void 0!==n&&n.enabled){var i,a,s,o,d;if(hk(),null!==(i=ik)&&void 0!==i&&null!==(a=i.aws_tst)&&void 0!==a&&null!==(s=a.ep)&&void 0!==s&&s.api&&null!==(o=ik)&&void 0!==o&&o.url)Qw.getGameData(null===(d=ik)||void 0===d?void 0:d.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,pk(ak);case 3:ik=e.sent,null===(t=ik)||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)}},hk=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,g,v,b,y,_,w,k,A=this,E=arguments;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(u=E.length,l=new Array(u),h=0;h<u;h++)l[h]=E[h];p=l[0],f=l[1],m=null===(i=ik)||void 0===i||null===(a=i.aws_tst)||void 0===a||null===(s=a.ep)||void 0===s?void 0:s.atm,g=null===(o=ik)||void 0===o||null===(d=o.aws_tst)||void 0===d||null===(c=d.ep)||void 0===c?void 0:c.msgrt,v=function(e,r){var i=this;t(this,A);var a=p.replace(e,r);n(a,f).then(function(){t(this,i)}.bind(this))}.bind(this);try{m&&p.indexOf("tag.atom")>0&&v("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),g&&p.indexOf("msgrt.gamedistribution.com")>0&&(null===(b=ik)||void 0===b||b.aws_tst,null===(y=ik)||void 0===y||null===(_=y.aws_tst)||void 0===_||null===(w=_.ep)||void 0===w||w.msgrt,v("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return e.next=9,n(p,f);case 9:return k=e.sent,e.abrupt("return",k);case 11:case"end":return e.stop()}}),e,this)})))},pk=function(n){var i=this;rk.send("gdfw.loading",{message:"loading"}),ok=[],dk("1"),dk("2");var a=new Sw;dk("3");var s=a.get("partner.domain.value");dk("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);dk("5");var d=function(){t(this,i);var e=c(),r=e?"&mode=".concat(e):"",a=Zw().config;return"https://".concat(a.gameAPI,"/game/v4/get/").concat(n.gameId.replace(/-/g,""),"/?domain=").concat(s).concat(r,"&v=").concat(ss.version,"&localTime=").concat((new Date).getHours())}.bind(this);dk("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 dk("7"),new Promise(function(n){var a=this;t(this,i),dk("7.1");var s=o();try{dk("7.2");var c=d();dk("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 dk("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,ek({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),dk("7.5"),e.success){var i,o,d,u=e.result.game;dk("7.6");var l={company:u.company,gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,description:u.description,disableAds:u.enableAds,preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,publishedAt:u.publishedAt,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,aws_tst:u.aws_tst,meta:u.meta,adspn:os(u.adspn)||{},__t4r:os(u.__t4r)||{},block_exts:os(u.push_cuda),bloc_gard:os(u.bloc_gard),cookie:os(u.cookie),gdpr:os(u.gdpr),diagnostic:os(u.diagnostic),cmp:os(u.cmp),gft:os(u.gft)||{},sdk:os(u.sdk)||{},sdkfw:os(u.sdkfw)||{},loader:os(u.loader)||{},splash:os(u.splash)||{},promo:os(u.promo)||{},dAds:os(u.dads)||{},pAds:os(u.pads)||{},mAds:os(u.mads)||{},rAds:os(u.rads)||{},lp:os(u.lp)||{},extsc:os(u.extsc)||{},evnts:os(u.evnts)||{},dp:os(u.dp)||{},adflw:os(u.adflw)||{},afgszf:os(u.afgszf)||{},fllc:os(u.fllc)||{},lotm:os(u.lotm)||{},t4rc:os(u.t4rc)||{},midroll_plus:os(u.midroll_plus)||{},gmky:os(u.gmky)||{},urlBlockExc:os(u.url_blck_exc)||{},sdk_wrp:os(u.sdk_wrp)||{},dbglg:os(u.dbglg)||{},extHosting:os(u.ext_hosting)||{},directTokenUse:os(u.dtu)||{},aeria:os(u.aeria)||{}};dk("7.7");var p=h(M(s),l);dk("7.8"),p.afg_disabled=!1===(null===(i=p.sdk)||void 0===i||null===(o=i.afg)||void 0===o?void 0:o.enabled),p.url=c,function(){t(this,r),void 0!==ls.afgEnabled&&(p.afg_disabled=!ls.afgEnabled),void 0!==ls.promoEnabled&&(p.promo=p.promo||{},p.promo=nk(nk({},p.promo),{},{rainbow:{enabled:ls.promoEnabled}}))}.bind(this),dk("7.9"),null!==(d=p.pAds)&&void 0!==d&&d.enabled&&(p.preroll=!0),dk("7.10"),rk.send("gdfw.success",{message:"success"}),n(p)}else{s.failed=!0;var f=ok[ok.length-1];rk.send("gdfw.err",{message:"".concat(f,": json error")}),n(s)}}.bind(this)).catch(function(e){t(this,a);var r=ok[ok.length-1];rk.send("gdfw.err",{message:"".concat(r,": ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}.bind(this))}catch(e){var u=ok[ok.length-1];rk.send("gdfw.err",{message:"".concat(u,": global ").concat(e.message?e.message:e)}),s.failed=!0,n(s)}}.bind(this))},fk=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,uk();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)}}(),mk=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,uk();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)}}(),gk=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,uk();case 2:return n=e.sent,e.next=5,fk();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)}}(),vk=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,uk();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)}}(),bk=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,vk();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)}}(),yk=!1,_k=!1,wk=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(!yk){e.next=4;break}return e.abrupt("return",n(_k));case 4:yk=!0;case 5:return e.next=7,vk();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 _k=!0,e.abrupt("return",n(!0));case 16:d=!0,setTimeout(function(){t(this,u),d&&(d=!1,yk=!0,n(!1))}.bind(this),5e3),c=setInterval(function(){t(this,u),d&&o&&window[s]?(d=!1,yk=!0,_k=!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)}}())},kk=Ya,Ak=lm,Ek=re,xk=_t,Sk=Xe,Dk=sf,Rk=pv,Tk=mr,Ok=Ak&&Ak.prototype;if(kk({target:"Promise",proto:!0,real:!0,forced:!!Ak&&Ek((function(){Ok.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Dk(this,xk("Promise")),n=Sk(e);return this.then(n?function(n){return Rk(t,e()).then((function(){return n}))}:e,n?function(n){return Rk(t,e()).then((function(){throw n}))}:e)}}),Sk(Ak)){var Ik=xk("Promise").prototype.finally;Ok.finally!==Ik&&Tk(Ok,"finally",Ik,{unsafe:!0})}var Pk="\t\n\v\f\r                 \u2028\u2029\ufeff",Ck=pe,Lk=fs,Uk=Pk,Mk=ce("".replace),jk=RegExp("^["+Uk+"]+"),Bk=RegExp("(^|[^"+Uk+"])["+Uk+"]+$"),Gk=function(e){return function(t){var n=Lk(Ck(t));return 1&e&&(n=Mk(n,jk,"")),2&e&&(n=Mk(n,Bk,"$1")),n}},Nk={start:Gk(1),end:Gk(2),trim:Gk(3)},Fk=fn.PROPER,qk=re,Vk=Pk,zk=Nk.trim;Ya({target:"String",proto:!0,forced:function(e){return qk((function(){return!!Vk[e]()||"​…᠎"!=="​…᠎"[e]()||Fk&&Vk[e].name!==e}))}("trim")},{trim:function(){return zk(this)}});var Hk=Ya,Wk=Oi.find,Kk=fp,$k="find",Qk=!0;$k in[]&&Array(1)[$k]((function(){Qk=!1})),Hk({target:"Array",proto:!0,forced:Qk},{find:function(e){return Wk(this,e,arguments.length>1?arguments[1]:void 0)}}),Kk($k);var Jk=Xe,Yk=rt,Xk=Ll,Zk=Ze.f,eA=et,tA=W,nA=ce,rA=Va,iA=function(e,t,n){var r,i;return Xk&&Jk(r=t.constructor)&&r!==n&&Yk(i=r.prototype)&&i!==n.prototype&&Xk(e,i),e},aA=Rn,sA=ia.f,oA=wt,dA=tb,cA=fs,uA=Eb,lA=gh,hA=function(e,t,n){n in e||Zk(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},pA=mr,fA=re,mA=ye,gA=Kn.enforce,vA=$p,bA=yh,yA=kh,_A=We("match"),wA=tA.RegExp,kA=wA.prototype,AA=tA.SyntaxError,EA=nA(kA.exec),xA=nA("".charAt),SA=nA("".replace),DA=nA("".indexOf),RA=nA("".slice),TA=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,OA=/a/g,IA=/a/g,PA=new wA(OA)!==OA,CA=lA.MISSED_STICKY,LA=lA.UNSUPPORTED_Y,UA=eA&&(!PA||CA||bA||yA||fA((function(){return IA[_A]=!1,wA(OA)!=OA||wA(IA)==IA||"/a/i"!=wA(OA,"i")})));if(rA("RegExp",UA)){for(var MA=function(e,t){var n,r,i,a,s,o,d=oA(kA,this),c=dA(e),u=void 0===t,l=[],h=e;if(!d&&c&&u&&e.constructor===MA)return e;if((c||oA(kA,e))&&(e=e.source,u&&(t=uA(h))),e=void 0===e?"":cA(e),t=void 0===t?"":cA(t),h=e,bA&&"dotAll"in OA&&(r=!!t&&DA(t,"s")>-1)&&(t=SA(t,/s/g,"")),n=t,CA&&"sticky"in OA&&(i=!!t&&DA(t,"y")>-1)&&LA&&(t=SA(t,/y/g,"")),yA&&(a=function(e){for(var t,n=e.length,r=0,i="",a=[],s={},o=!1,d=!1,c=0,u="";r<=n;r++){if("\\"===(t=xA(e,r)))t+=xA(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:EA(TA,RA(e,r+1))&&(r+=2,d=!0),i+=t,c++;continue;case">"===t&&d:if(""===u||mA(s,u))throw new AA("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=iA(wA(e,t),d?this:kA,MA),(r||i||l.length)&&(o=gA(s),r&&(o.dotAll=!0,o.raw=MA(function(e){for(var t,n=e.length,r=0,i="",a=!1;r<=n;r++)"\\"!==(t=xA(e,r))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+xA(e,++r);return i}(e),n)),i&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{aA(s,"source",""===h?"(?:)":h)}catch(e){}return s},jA=sA(wA),BA=0;jA.length>BA;)hA(MA,wA,jA[BA++]);kA.constructor=MA,MA.prototype=kA,pA(tA,"RegExp",MA,{constructor:!0})}vA("RegExp");var GA=Ya,NA=zr,FA=$i,qA=Pi,VA=ce([].join);GA({target:"Array",proto:!0,forced:NA!=Object||!qA("join",",")},{join:function(e){return VA(FA(this),void 0===e?",":e)}});var zA=Oi.map;Ya({target:"Array",proto:!0,forced:!Oc("map")},{map:function(e){return zA(this,e,arguments.length>1?arguments[1]:void 0)}});var HA=et,WA=ce,KA=vt,$A=re,QA=es,JA=Aa,YA=qi,XA=ge,ZA=zr,eE=Object.assign,tE=Object.defineProperty,nE=WA([].concat),rE=!eE||$A((function(){if(HA&&1!==eE({b:1},eE(tE({},"a",{enumerable:!0,get:function(){tE(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=eE({},e)[n]||QA(eE({},t)).join("")!=r}))?function(e,t){for(var n=XA(e),r=arguments.length,i=1,a=JA.f,s=YA.f;r>i;)for(var o,d=ZA(arguments[i++]),c=a?nE(QA(d),a(d)):QA(d),u=c.length,l=0;u>l;)o=c[l++],HA&&!KA(s,d,o)||(n[o]=d[o]);return n}:eE,iE=rE;Ya({target:"Object",stat:!0,arity:2,forced:Object.assign!==iE},{assign:iE});var aE,sE=ce,oE=2147483647,dE=/[^\0-\u007E]/,cE=/[.\u3002\uFF0E\uFF61]/g,uE="Overflow: input needs wider integers to process",lE=RangeError,hE=sE(cE.exec),pE=Math.floor,fE=String.fromCharCode,mE=sE("".charCodeAt),gE=sE([].join),vE=sE([].push),bE=sE("".replace),yE=sE("".split),_E=sE("".toLowerCase),wE=function(e){return e+22+75*(e<26)},kE=function(e,t,n){var r=0;for(e=n?pE(e/700):e>>1,e+=pE(e/t);e>455;)e=pE(e/35),r+=36;return pE(r+36*e/(e+38))},AE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=mE(e,n++);if(i>=55296&&i<=56319&&n<r){var a=mE(e,n++);56320==(64512&a)?vE(t,((1023&i)<<10)+(1023&a)+65536):(vE(t,i),n--)}else vE(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&&vE(t,fE(r));var d=t.length,c=d;for(d&&vE(t,"-");c<i;){var u=oE;for(n=0;n<e.length;n++)(r=e[n])>=a&&r<u&&(u=r);var l=c+1;if(u-a>pE((oE-s)/l))throw lE(uE);for(s+=(u-a)*l,a=u,n=0;n<e.length;n++){if((r=e[n])<a&&++s>oE)throw lE(uE);if(r==a){for(var h=s,p=36;;){var f=p<=o?1:p>=o+26?26:p-o;if(h<f)break;var m=h-f,g=36-f;vE(t,fE(wE(f+m%g))),h=pE(m/g),p+=36}vE(t,fE(wE(h))),o=kE(s,l,c==d),s=0,c++}}s++,a++}return gE(t,"")},EE=Ya,xE=et,SE=Jy,DE=W,RE=Gr,TE=ce,OE=mr,IE=ro,PE=Yp,CE=ye,LE=rE,UE=Mu,ME=Qs,jE=el.codeAt,BE=function(e){var t,n,r=[],i=yE(bE(_E(e),cE,"."),".");for(t=0;t<i.length;t++)n=i[t],vE(r,hE(dE,n)?"xn--"+AE(n):n);return gE(r,".")},GE=fs,NE=yo,FE=df,qE=vw,VE=Kn,zE=VE.set,HE=VE.getterFor("URL"),WE=qE.URLSearchParams,KE=qE.getState,$E=DE.URL,QE=DE.TypeError,JE=DE.parseInt,YE=Math.floor,XE=Math.pow,ZE=TE("".charAt),ex=TE(/./.exec),tx=TE([].join),nx=TE(1..toString),rx=TE([].pop),ix=TE([].push),ax=TE("".replace),sx=TE([].shift),ox=TE("".split),dx=TE("".slice),cx=TE("".toLowerCase),ux=TE([].unshift),lx="Invalid scheme",hx="Invalid host",px="Invalid port",fx=/[a-z]/i,mx=/[\d+-.a-z]/i,gx=/\d/,vx=/^0x/i,bx=/^[0-7]+$/,yx=/^\d+$/,_x=/^[\da-f]+$/i,wx=/[\0\t\n\r #%/:<>?@[\\\]^|]/,kx=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ax=/^[\u0000-\u0020]+/,Ex=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,xx=/[\t\n\r]/g,Sx=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)ux(t,e%256),e=YE(e/256);return tx(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+=nx(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Dx={},Rx=LE({},Dx,{" ":1,'"':1,"<":1,">":1,"`":1}),Tx=LE({},Rx,{"#":1,"?":1,"{":1,"}":1}),Ox=LE({},Tx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ix=function(e,t){var n=jE(e,0);return n>32&&n<127&&!CE(t,e)?e:encodeURIComponent(e)},Px={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Cx=function(e,t){var n;return 2==e.length&&ex(fx,ZE(e,0))&&(":"==(n=ZE(e,1))||!t&&"|"==n)},Lx=function(e){var t;return e.length>1&&Cx(dx(e,0,2))&&(2==e.length||"/"===(t=ZE(e,2))||"\\"===t||"?"===t||"#"===t)},Ux=function(e){return"."===e||"%2e"===cx(e)},Mx={},jx={},Bx={},Gx={},Nx={},Fx={},qx={},Vx={},zx={},Hx={},Wx={},Kx={},$x={},Qx={},Jx={},Yx={},Xx={},Zx={},eS={},tS={},nS={},rS=function(e,t,n){var r,i,a,s=GE(e);if(t){if(i=this.parse(s))throw QE(i);this.searchParams=null}else{if(void 0!==n&&(r=new rS(n,!0)),i=this.parse(s,null,r))throw QE(i);(a=KE(new WE)).bindURL(this),this.searchParams=a}};rS.prototype={type:"URL",parse:function(e,t,n){var r,i,a,s,o,d=this,c=t||Mx,u=0,l="",h=!1,p=!1,f=!1;for(e=GE(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=ax(e,Ax,""),e=ax(e,Ex,"$1")),e=ax(e,xx,""),r=UE(e);u<=r.length;){switch(i=r[u],c){case Mx:if(!i||!ex(fx,i)){if(t)return lx;c=Bx;continue}l+=cx(i),c=jx;break;case jx:if(i&&(ex(mx,i)||"+"==i||"-"==i||"."==i))l+=cx(i);else{if(":"!=i){if(t)return lx;l="",c=Bx,u=0;continue}if(t&&(d.isSpecial()!=CE(Px,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Px[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?c=Qx:d.isSpecial()&&n&&n.scheme==d.scheme?c=Gx:d.isSpecial()?c=Vx:"/"==r[u+1]?(c=Nx,u++):(d.cannotBeABaseURL=!0,ix(d.path,""),c=eS)}break;case Bx:if(!n||n.cannotBeABaseURL&&"#"!=i)return lx;if(n.cannotBeABaseURL&&"#"==i){d.scheme=n.scheme,d.path=ME(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,c=nS;break}c="file"==n.scheme?Qx:Fx;continue;case Gx:if("/"!=i||"/"!=r[u+1]){c=Fx;continue}c=zx,u++;break;case Nx:if("/"==i){c=Hx;break}c=Zx;continue;case Fx:if(d.scheme=n.scheme,i==aE)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=ME(n.path),d.query=n.query;else if("/"==i||"\\"==i&&d.isSpecial())c=qx;else if("?"==i)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=ME(n.path),d.query="",c=tS;else{if("#"!=i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=ME(n.path),d.path.length--,c=Zx;continue}d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=ME(n.path),d.query=n.query,d.fragment="",c=nS}break;case qx:if(!d.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,c=Zx;continue}c=Hx}else c=zx;break;case Vx:if(c=zx,"/"!=i||"/"!=ZE(l,u+1))continue;u++;break;case zx:if("/"!=i&&"\\"!=i){c=Hx;continue}break;case Hx:if("@"==i){h&&(l="%40"+l),h=!0,a=UE(l);for(var m=0;m<a.length;m++){var g=a[m];if(":"!=g||f){var v=Ix(g,Ox);f?d.password+=v:d.username+=v}else f=!0}l=""}else if(i==aE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(h&&""==l)return"Invalid authority";u-=UE(l).length+1,l="",c=Wx}else l+=i;break;case Wx:case Kx:if(t&&"file"==d.scheme){c=Yx;continue}if(":"!=i||p){if(i==aE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(d.isSpecial()&&""==l)return hx;if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",c=Xx,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return hx;if(s=d.parseHost(l))return s;if(l="",c=$x,t==Kx)return}break;case $x:if(!ex(gx,i)){if(i==aE||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()||t){if(""!=l){var b=JE(l,10);if(b>65535)return px;d.port=d.isSpecial()&&b===Px[d.scheme]?null:b,l=""}if(t)return;c=Xx;continue}return px}l+=i;break;case Qx:if(d.scheme="file","/"==i||"\\"==i)c=Jx;else{if(!n||"file"!=n.scheme){c=Zx;continue}if(i==aE)d.host=n.host,d.path=ME(n.path),d.query=n.query;else if("?"==i)d.host=n.host,d.path=ME(n.path),d.query="",c=tS;else{if("#"!=i){Lx(tx(ME(r,u),""))||(d.host=n.host,d.path=ME(n.path),d.shortenPath()),c=Zx;continue}d.host=n.host,d.path=ME(n.path),d.query=n.query,d.fragment="",c=nS}}break;case Jx:if("/"==i||"\\"==i){c=Yx;break}n&&"file"==n.scheme&&!Lx(tx(ME(r,u),""))&&(Cx(n.path[0],!0)?ix(d.path,n.path[0]):d.host=n.host),c=Zx;continue;case Yx:if(i==aE||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Cx(l))c=Zx;else if(""==l){if(d.host="",t)return;c=Xx}else{if(s=d.parseHost(l))return s;if("localhost"==d.host&&(d.host=""),t)return;l="",c=Xx}continue}l+=i;break;case Xx:if(d.isSpecial()){if(c=Zx,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=aE&&(c=Zx,"/"!=i))continue}else d.fragment="",c=nS;else d.query="",c=tS;break;case Zx:if(i==aE||"/"==i||"\\"==i&&d.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(o=cx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==i||"\\"==i&&d.isSpecial()||ix(d.path,"")):Ux(l)?"/"==i||"\\"==i&&d.isSpecial()||ix(d.path,""):("file"==d.scheme&&!d.path.length&&Cx(l)&&(d.host&&(d.host=""),l=ZE(l,0)+":"),ix(d.path,l)),l="","file"==d.scheme&&(i==aE||"?"==i||"#"==i))for(;d.path.length>1&&""===d.path[0];)sx(d.path);"?"==i?(d.query="",c=tS):"#"==i&&(d.fragment="",c=nS)}else l+=Ix(i,Tx);break;case eS:"?"==i?(d.query="",c=tS):"#"==i?(d.fragment="",c=nS):i!=aE&&(d.path[0]+=Ix(i,Dx));break;case tS:t||"#"!=i?i!=aE&&("'"==i&&d.isSpecial()?d.query+="%27":d.query+="#"==i?"%23":Ix(i,Dx)):(d.fragment="",c=nS);break;case nS:i!=aE&&(d.fragment+=Ix(i,Rx))}u++}},parseHost:function(e){var t,n,r;if("["==ZE(e,0)){if("]"!=ZE(e,e.length-1))return hx;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 ZE(e,l)};if(":"==h()){if(":"!=ZE(e,1))return;l+=2,u=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&ex(_x,h());)t=16*t+JE(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(!ex(gx,h()))return;for(;ex(gx,h());){if(a=JE(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}(dx(e,1,-1)),!t)return hx;this.host=t}else if(this.isSpecial()){if(e=BE(e),ex(wx,e))return hx;if(t=function(e){var t,n,r,i,a,s,o,d=ox(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"==ZE(i,0)&&(a=ex(vx,i)?16:8,i=dx(i,8==a?1:2)),""===i)s=0;else{if(!ex(10==a?yx:8==a?bx:_x,i))return e;s=JE(i,a)}ix(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=XE(256,5-t))return null}else if(s>255)return null;for(o=rx(n),r=0;r<n.length;r++)o+=n[r]*XE(256,3-r);return o}(e),null===t)return hx;this.host=t}else{if(ex(kx,e))return hx;for(t="",n=UE(e),r=0;r<n.length;r++)t+=Ix(n[r],Dx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return CE(Px,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Cx(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+=Sx(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?s[0]:s.length?"/"+tx(s,"/"):"",null!==o&&(c+="?"+o),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw QE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new iS(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Sx(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(GE(e)+":",Mx)},getUsername:function(){return this.username},setUsername:function(e){var t=UE(GE(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Ix(t[n],Ox)}},getPassword:function(){return this.password},setPassword:function(e){var t=UE(GE(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Ix(t[n],Ox)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Sx(e):Sx(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Wx)},getHostname:function(){var e=this.host;return null===e?"":Sx(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Kx)},getPort:function(){var e=this.port;return null===e?"":GE(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=GE(e))?this.port=null:this.parse(e,$x))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+tx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Xx))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=GE(e))?this.query=null:("?"==ZE(e,0)&&(e=dx(e,1)),this.query="",this.parse(e,tS)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=GE(e))?("#"==ZE(e,0)&&(e=dx(e,1)),this.fragment="",this.parse(e,nS)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var iS=function(e){var t=PE(this,aS),n=FE(arguments.length,1)>1?arguments[1]:void 0,r=zE(t,new rS(e,!1,n));xE||(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())},aS=iS.prototype,sS=function(e,t){return{get:function(){return HE(this)[e]()},set:t&&function(e){return HE(this)[t](e)},configurable:!0,enumerable:!0}};if(xE&&(IE(aS,"href",sS("serialize","setHref")),IE(aS,"origin",sS("getOrigin")),IE(aS,"protocol",sS("getProtocol","setProtocol")),IE(aS,"username",sS("getUsername","setUsername")),IE(aS,"password",sS("getPassword","setPassword")),IE(aS,"host",sS("getHost","setHost")),IE(aS,"hostname",sS("getHostname","setHostname")),IE(aS,"port",sS("getPort","setPort")),IE(aS,"pathname",sS("getPathname","setPathname")),IE(aS,"search",sS("getSearch","setSearch")),IE(aS,"searchParams",sS("getSearchParams")),IE(aS,"hash",sS("getHash","setHash"))),OE(aS,"toJSON",(function(){return HE(this).serialize()}),{enumerable:!0}),OE(aS,"toString",(function(){return HE(this).serialize()}),{enumerable:!0}),$E){var oS=$E.createObjectURL,dS=$E.revokeObjectURL;oS&&OE(iS,"createObjectURL",RE(oS,$E)),dS&&OE(iS,"revokeObjectURL",RE(dS,$E))}NE(iS,"URL"),EE({global:!0,constructor:!0,forced:!SE,sham:!xE},{URL:iS});var cS=function(){function e(t){R(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return D(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}(),uS=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return D(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}(),lS=function(){function e(t,n){R(this,e),this.adContainer=t,this.onResume=n}return D(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}(),hS=function(){function e(t){R(this,e),this.adContainer=t}return D(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}(),pS=function(){function e(t){R(this,e),this.adContainer=t}return D(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}(),fS=function(e){if(!e)return!1;var t=mS.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)},mS=Object.prototype.toString;function gS(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 vS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bS(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 yS,_S="13998",wS="_cc".concat(_S),kS=["https://tags.crwdcntrl.net/c/".concat(_S,"/cc.js?ns=").concat(wS)],AS=function(){return!!yS&&"function"==typeof yS.bcpf&&"function"==typeof yS.add},ES=function(e,t){try{if(!AS())return;yS.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},xS=function(e,t){try{if(!AS())return;yS.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},SS=function(e){var n=this;try{ES("act","play"),ES("med","game"),"complete"===document.readyState?yS.bcpf():yS.bcp(),e.tags.forEach(function(e){t(this,n),xS("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),xS("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},DS=function(){window.addEventListener("load",(function(){sk.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!=ly&&ly.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,fk();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(kS[0],"LOTCC_".concat(_S),{alternates:kS});case 16:"object"===n(window[wS])&&(yS=window[wS]),AS()&&SS(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)}}())}))},RS=function(){xS("genp","ad video"),xS("act","ad impression")},TS=function(){xS("act","ad skipped")},OS=function(){xS("act","ad click")},IS=function(){xS("act","ad complete")},PS=new Sw,CS={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},LS=function(e,n){var r=this,i=function(e,t){var n=PS.get("partner.url.value"),r=CS[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)},US=(new Sw).get("partner.domain.value"),MS=["latimes.com"],jS={exist:function(e){var n=this;return"Softgames-Azerion"===e.dname&&MS.some(function(e){return t(this,n),e===US}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return LS(n,e)}}[US](e)}(e,t)}},BS=function(){var e=(new Sw).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},GS=function(){function e(){R(this,e),this.adContainer=window.document.body}return D(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 NS(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 FS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NS(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qS=new j,VS=null,zS=function(){function n(e,r,i){var a=this;if(R(this,n),VS)return VS;VS=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=r?h(s,r):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new _,this.safetyTimer=null,this.containerTransitionSpeed=0,this.adCounter={},this.adPrerollCount=0,this.adMidrollCount=0,this.adRewardedCount=0,this.preloadedAdType=null,this.requestRunning=!1,this.parentDomain=i.parentDomain,this.topDomain=i.topDomain,this.parentURL=i.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=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,P,C,L,U,j,q,V,z,H;return D(n,[{key:"start",value:(H=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),us("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 H.apply(this,arguments)})},{key:"adSystemInitialize",value:(z=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 z.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:(V=e(r.mark((function e(t){var n,i,a,s,o,d,c,u,l,h,p,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,i=t.options,e.prev=1,o=null===(a=this.gameData.adflw)||void 0===a||null===(s=a.adapterConfig)||void 0===s?void 0:s.spil,d=this.nextAdPosition(n),e.next=6,this._create_dp_context(d,i);case 6:return c=e.sent,o?(this.gameData,u=o[d]||o.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),l=100*c.floor_price,c.floor_price,h=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:l}}),p=h.url,f={url:p,dp:c,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return V.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,g=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(m.available&&m.getBoolean("gd_debug_ex")&&m.getBoolean("gd_tag")||BS().useTestAds)){e.next=6;break}return o=a.IMASampleTags[n],d=Math.floor(Math.random()*o.length),c=o[d],s({url:c}),e.abrupt("return");case 6:if("spil"!==i.adapter){e.next=8;break}return e.abrupt("return",s(a._getSpilUrl({adType:n,options:i})));case 8:if(void 0!==window.idhb.requestAds){e.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return e.prev=10,u=a.nextAdPosition(n),a._broadcast("AD_REQUEST",{message:u}),l=a.options,"preroll"===u&&G(l.preroll)?l=l.preroll:"midroll"===u&&G(l.midroll)?l=l.midroll:"rewarded"===u&&G(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,cs("gd-adflow, before idhb",u,h),f=window.idhb.getAdserverTargetingForAdSlot(h),window.idhb.setAdserverTargeting(FS(FS({},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,g),!p||null!=n&&n.bidFloorApplied||fetch(p.skip_url).catch(function(e){t(this,r)}.bind(this));var i={src:"hl",tnl_keys:FS(FS({},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===g.Rewarded)return this.adRewardedCount++,"rewarded";if(e===g.Interstitial){var t=!1===this.gameData.preroll||1===this.adPrerollCount;return t?this.adMidrollCount++:this.adPrerollCount++,t||this.adMidrollCount>0?"midroll":"preroll"}return"midroll"}},{key:"getAdPosition",value:function(e){return e===g.Rewarded?"rewarded":e===g.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===g.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===g.Rewarded?"rewarded":void 0}},{key:"_requestPromo",value:function(e,t){var n=new google.ima.AdsRequest;return n.adsResponse=function(e){return'<VAST version="3.0"> \n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA['.concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,"]]></VASTAdTagURI> \n </Wrapper>\n </Ad>\n </VAST>").trim()}(e),n.linearAdSlotWidth=this.options.width,n.linearAdSlotHeight=this.options.height,n.nonLinearAdSlotWidth=this.options.width,n.nonLinearAdSlotHeight=this.options.height,n.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(n.vastLoadTimeout=this.options.vast_load_timeout),n.setAdWillAutoPlay(t.autoplayAllowed),n.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(n),n}},{key:"_requestAd",value:function(e,n){var r=this;return n=n||{},new Promise(function(i){var a=this;if(t(this,r),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var s,o,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=FS(FS({},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,this._extend_dp_with_adsense(h,p,null==e?void 0:e.tnl_keys));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 g=function(e){for(var t=[],n="",r=Date.now(),i={ppos:1,lip:!0,vad_type:"linear"},a=0;a<e.length;a++){var s=new O(e[a].adtag.url,!0);s.query=vS(vS({},s.query),{},{ad_rule:0,vpos:e[a].positon,pod:1,correlator:0===a?r:++r,output:"xml_vast3"}),0===a&&(s.query=vS(vS({},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(bS({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=g}else if(h&&p.bidFloorApplied){h.adtag_url||(h.adtag_url=u.url);var v=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=v}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=jS.exist(this.gameData)&&jS.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:(q=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")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):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 q.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(j=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 j.apply(this,arguments)})},{key:"startAd",value:(U=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=FS(FS({},s),{},{adType:a}),null!==(i=this.gameData.adspn)&&void 0!==i&&i.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new GS,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==s?void 0:s.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(s,a));case 7:if("adsense"!==(null==s?void 0:s.adapter)){e.next=31;break}if(a!==g.Interstitial){e.next=24;break}if("preroll"!==(null==s?void 0:s.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 13:if("start"!==(null==s?void 0:s.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(n));case 17:if("next"!==(null==s?void 0:s.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(n));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(n));case 22:e.next=29;break;case 24:if(a!==g.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(n));case 28:case 41:throw new Error("Unsupported ad type");case 29:e.next=42;break;case 31:if(!["ima","spil","audio"].some(function(e){return t(this,o),e===(null==s?void 0:s.adapter)}.bind(this))){e.next=42;break}if(a!==g.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(s));case 37:if(a!==g.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(s));case 42: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!==g.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==g.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return 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 uS(this.adContainer,n),this.adResume.add(),this.rewardedLabel=new lS(this.adContainer,n),this.rewardedLabel.add(),this.audioAdLabel=new hS(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(C=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,g=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(v.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,g),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 C.apply(this,arguments)})},{key:"_startInterstitialAd",value:(P=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(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,o),ls.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 i=e.sent,e.next=13,this._loadInterstitialAd(FS(FS({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return P.apply(this,arguments)})},{key:"_startPromo",value:(S=e(r.mark((function e(t,n){var i,a,s;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 i=e.sent,e.next=11,this._loadPromo(FS(FS({},i),t),n);case 11:if(a=e.sent,s=a.success,a.args,s){e.next=16;break}return e.abrupt("return");case 16:i.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return 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,FS({adType:g.Interstitial},t)),e.next=7,this._waitOnAdLoad();case 7:return e.abrupt("return",e.sent);case 10:throw e.prev=10,e.t0=e.catch(1),new Error(e.t0);case 13:case"end":return e.stop()}}),e,this,[[1,10]])}))),function(e,t){return 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(g.Interstitial,t);case 6:e.t0=e.sent;case 7:if(n=e.t0,delete this.preloadedInterstitialAdVast,n.url){e.next=12;break}throw new Error("NO_VAST_URL");case 12:return e.next=14,this._requestAd(n,FS({adType:g.Interstitial},t));case 14:return e.sent,e.next=17,this._waitOnAdLoad();case 17:return e.abrupt("return",e.sent);case 20:throw e.prev=20,e.t1=e.catch(1),console.log("VAST_URL error",e.t1),new Error(e.t1);case 24:case"end":return e.stop()}}),e,this,[[1,20]])}))),function(e){return 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=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,o),ls.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 i=e.sent,e.next=13,this._loadRewardedAd(FS(FS({},i),n));case 13:if(a=e.sent,s=a.success,a.args,s){e.next=18;break}return e.abrupt("return");case 18:i.autoplayRequiresMute&&this.adsManager.setVolume(0),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return 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(g.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,FS({adType:g.Rewarded},t));case 11:return e.sent,e.next=14,this._waitOnAdLoad();case 14:return e.abrupt("return",e.sent);case 17:throw e.prev=17,e.t1=e.catch(1),new Error(e.t1);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return 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(g.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return 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(g.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return 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._isT4R(e),a=this._getT4ROptions(e);if("loaded"===r)this.activeAdContainer.style.opacity=i?.001:1,i&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new pS(this.adContainer),this.t4rButton.add()),i&&this.adsManager.setVolume(0),i&&this._broadcast("AD_T4R"),i&&setTimeout(function(){t(this,n),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210));else if("click"===r||"first_quartile"===r){if(i&&"click"===r){var s,o=null===(s=this._adrequest_user_context)||void 0===s?void 0:s.tnl_ad_pos;this.clickCount[o]++}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=v.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,a=this,s=new Date,o=s.getHours(),d=s.getDate(),c=s.getMonth(),u=s.getFullYear(),l=b(google.ima.AdEvent.Type,e.type),h=!1,p=(null==e||null===(n=e.getAd())||void 0===n?void 0:n.getContentType())||"",f=!p.startsWith("image")&&!p.startsWith("text"),m=null==e||null===(r=e.ad)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.title;this._sendIMAEventsToHB(e);var v=document.getElementById("game"),y="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:y="Fired when an ad rule or a VMAP ad break would have played if autoPlayAdBreaks is false.";break;case google.ima.AdEvent.Type.AD_METADATA:y="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(h=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),y="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:y="Fired when the ad is clicked.";var _=e.getAd().getContentType();this._show({mode:"click",contentType:_}),OS();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),h=this._is_completed(e.getAd()),y="Fired when the ad completes playing.",this.adType_===g.Rewarded&&this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(v.style.display="none"),this.contentPaused=!0,y="Fired when content should be paused. This usually happens right before an ad is about to cover the content.";break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.gameData.fllc.enabled&&(v.style.display="block"),y="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?h=!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:y="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:y="Fired when the ad playhead crosses first quartile.";var w=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:w});break;case google.ima.AdEvent.Type.IMPRESSION:y="Fired when the impression URL has been pinged.",e.getAd(),console.log("gdsdk: eventname IMPRESSION",this.isAudioAd),this._hideAdSpinner(),this.isAudioAd&&this.audioAdLabel.show();break;case google.ima.AdEvent.Type.INTERACTION:y="Fired when an ad triggers the interaction callback. Ad interactions contain an interaction ID string in the ad data.";break;case google.ima.AdEvent.Type.LINEAR_CHANGED:y="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var k=e.getAd().getContentType();y=k,this._show({mode:"loaded",contentType:k});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(y=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:y="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:f&&"VPAID"!==m&&this.adResume.show(),y="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:y="Fired when the ad is resumed.",f&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:y="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:h=this._is_completed(e.getAd()),y="Fired when the ad is skipped by the user.",TS(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:this.adType_===g.Rewarded&&this.rewardedLabel.show(),this._hideAddResume(),y="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:y="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:h=this._is_completed(e.getAd()),y="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:y="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:y="Fired when the ad volume has been muted."}if(""!==l&&""!==y){var A=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,E=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;A||E||this.isAudioAd||this._broadcast(l,{name:l,message:y,status:"success",analytics:{category:l,action:this.parentDomain,label:"h".concat(o," d").concat(d," m").concat(c," y").concat(u)}})}if(h&&!this.adSuccess){this.adSuccess=!0;var x=e.getAd(),S="Rainbow"===(null==x?void 0:x.getAdSystem())&&(null==x?void 0:x.getWrapperAdIds().some(function(e){return t(this,a),"promo"===e}.bind(this)));null==x||x.getAdSystem(),null==x||x.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:S}),this.resetForNext(e)}}},{key:"_run_atom_tag_aws_test",value:function(e){var n=this;try{var r,i,a,s,o;if(!((null===(r=this.gameData)||void 0===r||null===(i=r.aws_tst)||void 0===i?void 0:i.enabled)&&(null===(a=this.gameData)||void 0===a||null===(s=a.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.atm)))return;var d=e.type,c=e.url;if("none"===d||!c)return;c=c.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(c).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);qS.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_===g.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(fS(e.getInnerError)){var t=e.getInnerError();if(t)return fS(t.getErrorCode)&&fS(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];G(s)&&(i.query[a]=N.stringify(s))}var o=new O(i.url,!0);return F(o.query,i.query||{}),FS({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=N.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&&G(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:n.retry_on_failure&&this.options.retry_on_failure&&G(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M(a),G(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=N.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=N.stringify(s.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var n,r,i,a,s=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx";this.msgrt.send("bidder",{message:s}),this._adrequest_user_context,'bidder:"'.concat(s,'"');var o=(null===(i=this.gameData.t4rc)||void 0===i?void 0:i.bidder_exc)||[],d=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],c=!1;return d.length>0?c=!d.some(function(n){return t(this,e),n===s}.bind(this)):o.length>0&&(c=o.some(function(n){return t(this,e),n===s}.bind(this))),c}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isT4R",value:function(e){var t,n,r,i,a;if(!this.gameData.publishedAt)return!1;var s=new Date(this.gameData.publishedAt);if(((new Date).getTime()-s.getTime())/864e5<=10)return!1;var o=this.gameData.meta,d=e.t4r.meta;if((null==o?void 0:o.ast.c)>=(null==d?void 0:d.ast.c)&&(null==o||null===(t=o.sit)||void 0===t?void 0:t.c)>=(null==d||null===(n=d.sit)||void 0===n?void 0:n.c))return!1;if(this._isExcludedBidderForT4R())return this.msgrt.send("bidder.ex",{message:"true"}),!1;this.msgrt.send("bidder.ex",{message:"false"});var c,u=null===(r=this._adrequest_user_context)||void 0===r?void 0:r.tnl_ad_pos;if(this.clickCount[u]>=(null===(i=e.t4r[u])||void 0===i?void 0:i.count))return!1;if(null!=e&&null!==(a=e.contentType)&&void 0!==a&&a.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return u&&(null===(c=e.t4r[u])||void 0===c?void 0:c.enabled);if(null!=e&&e.contentType.startsWith("video/")){var l,h=(null===(l=e.t4r[u])||void 0===l?void 0:l.viper)||0;if(h>0){var p,f=Math.random()<h;return u&&f&&(null===(p=e.t4r[u])||void 0===p?void 0:p.enabled)}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,i,a,s,o,d,c,u,l,h,p,f,m;if(!e)return!1;var g="preroll"===e&&(!0===(null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap)||!0===(null===(r=this.gameData)||void 0===r||null===(i=r.pAds)||void 0===i||null===(a=i.vmap)||void 0===a?void 0:a.enabled))||"midroll"===e&&(!0===(null===(s=this.gameData)||void 0===s||null===(o=s.mAds)||void 0===o?void 0:o.vmap)||!0===(null===(d=this.gameData)||void 0===d||null===(c=d.mAds)||void 0===c||null===(u=c.vmap)||void 0===u?void 0:u.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(p=this.gameData)||void 0===p||null===(f=p.rAds)||void 0===f||null===(m=f.vmap)||void 0===m?void 0:m.enabled));if(!g)return!1;var v=this._get_vmap_config(e),b=this.adCounter[e];return void 0!==(null==v?void 0:v.start)?b>=(null==v?void 0:v.start):g}},{key:"_getT4ROptions",value:function(e){var t,n=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;switch(n){case"preroll":case"midroll":case"rewarded":return e.t4r[n]}}},{key:"_is_completed",value:function(e){var t=e.getContentType(),n=e.getAdPodInfo();return!(!t.startsWith("image/")&&"text"!==t&&1!==n.getTotalAds())}},{key:"_get_vmap_context",value:function(e){for(var t=e.adtag,n=e.position,r=e.config,i=e.dp,a=r.count||2,s=[],o=1;o<=a;o++){var 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,a,s,o,d;switch(e){case"preroll":return null===(t=this.gameData)||void 0===t||null===(n=t.pAds)||void 0===n?void 0:n.vmap;case"midroll":return null===(r=this.gameData)||void 0===r||null===(i=r.mAds)||void 0===i?void 0:i.vmap;case"rewarded":return null===(a=this.gameData)||void 0===a||null===(s=a.rAds)||void 0===s?void 0:s.vmap;default:return null===(o=this.gameData)||void 0===o||null===(d=o.pAds)||void 0===d?void 0:d.vmap}}},{key:"_isDP",value:function(e){var t,n,r;return!!e&&!0===(null===(t=this.gameData)||void 0===t||null===(n=t.dp)||void 0===n||null===(r=n[e])||void 0===r?void 0:r.enabled)}},{key:"_create_dp_display_context",value:function(){var e=this;return new Promise(function(n){var r=this;t(this,e);try{var i={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new cS(this.gameData).checkCustomParams();a&&(i.cp=a);var s=encodeURIComponent(I.encode(JSON.stringify(i)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(s)).then(function(e){return t(this,r),e.json()}.bind(this)).then(function(e){if(t(this,r),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),n();var i=e.p/100;this.msgrt.send("dp.fp",{message:i}),n({params:{fp:i},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(s),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(s)})}.bind(this)).catch(function(e){t(this,r),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),n()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var n,r=this,i={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(i).map(function(e){return t(this,r),"".concat(e,"=").concat(encodeURIComponent(i[e]))}.bind(this)).join("&");encodeURIComponent(I.encode(JSON.stringify(i)));var s=null===(n=this.gameData.promo)||void 0===n?void 0:n.rainbow,o=null==s?void 0:s.enabled,d="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),c=o?d:void 0;return function(){t(this,r),ls.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 cS(a.gameData).checkCustomParams())&&(d.cp=c),u=encodeURIComponent(I.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=N.parse(r.query.cust_params);if(!i.tnl_asset_id)return;i.adsense=1,r.query.cust_params=N.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=N.parse(a.query.cust_params);s.bfa=r,s.adsense=0,a.query.cust_params=N.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=y("ch",window.location.href),c=y("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},d&&(u.channel=d),c&&(u.ch_date=c),(l=y("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),ls.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||(cs("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=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,a),ls.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"),i=function(e){t(this,a),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),r={type:"preroll",adBreakDone:i},window.adsbygoogle.push(r),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 19:case"end":return e.stop()}var r}),e,this,[[1,15]])}))),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),ls.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.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),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),r={type:"start",name:"start-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var r}),e,this,[[1,17]])}))),function(e){return a.apply(this,arguments)})},{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),ls.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.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){t(this,o),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),s=function(e){t(this,o),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),r={type:"next",name:"next-in-game",beforeAd:i,afterAd:a,adBreakDone:s},window.adsbygoogle.push(r),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 21:case"end":return e.stop()}var r}),e,this,[[1,17]])}))),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(I.encode(JSON.stringify(a)))))}catch(e){}}},{key:"_send_atom_event",value:function(e,t){var n={gid:this.gameData.slug,md5:this.gameData.gameId,pid:0,pnm:this.gameData.pname,ctry:this.gameData.ctry,lcl:"en",hle:1,ads:1,args:t,href:window.location.href},r=(new Sw).get();return n=FS(FS({},n),r),n=t?FS(FS({},n),t):n,this._send(e,n)}},{key:"_isAfgPositionNext",value:function(e){return void 0!==e.adTimestamp}},{key:"_isAfgPositionStart",value:function(e){if(void 0!==e.adTimestamp)return!1;var t="preroll";return this.adCounter[t]=this.adCounter[t]||0,0===this.adCounter[t]}},{key:"attachAfgPosition",value:function(e){var t=e.params.position;switch(t){case"preroll":case"start":case"pause":case"next":case"browse":case"reward":return}var n=e.adType;if(n===g.Rewarded)t="reward";else if(n===g.Interstitial){var r,i;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(i=this.gameData.loader)&&void 0!==i&&i.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}t||(t="preroll"),e.params.position=t}},{key:"_broadcast",value:function(e,n){var r=this,i=!1;["AD_ERROR"].some(function(n){return t(this,r),n===e}.bind(this))&&(i=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,FS(FS({},n),{},{skipForward:i,adPosition:a}))}}]),n}(),HS=D((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qv(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},Kv(this.moduleName,this.moduleConfig)})),WS=D((function t(n){var i=this;R(this,t),T(this,"load",e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qv(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},Kv(this.moduleName,this.moduleConfig)})),KS=function(e,t){console.log(e,t)},$S={},QS={},JS=null;function YS(){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 $S.version=r,$S.frame=e,$S.function=n,$S.version}function XS(e){var n=this;return JS||(JS=new Promise(function(r){function i(t,n){if(KS("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:$S,consentData:i}),void r({result:"ok",consentData:t})):void 0;r({result:"ok",consentData:t})}else r({result:"cmpCallFailed"})}t(this,n),YS(),$S.frame?2===$S.version?(KS("TCF v2 CMP found. Fetching the consent."),$S.function?(KS("CMP API is directly accessible, calling it now..."),$S.function("addEventListener",$S.version,i)):(KS("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!==QS[r.callId]&&QS[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});QS[d]=s,n.postMessage(u,"*")}.bind(this),window.addEventListener("message",s,!1),window[a](e,$S.version,r)}("addEventListener",$S.frame,i))):r({result:"cmpVersionNotV2",cmp:$S}):r({result:"cmpNotFound"})}.bind(this)),JS)}var ZS=new(function(){function t(){R(this,t),this.productName="Game Distribution"}var n;return D(t,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(n=e(r.mark((function e(t,n){var i,a,s,o,d,c,u;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(s=null==t||null===(i=t.visitor)||void 0===i||null===(a=i.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return o=encodeURIComponent(this.productName),d=encodeURIComponent(s),e.prev=8,c="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(d),e.next=12,fetch(c,{method:"POST"});case 12:e.sent,e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(o,"/user_id/").concat(d),e.next=22,fetch(u,{method:"POST"});case 22:e.sent,e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,t){return n.apply(this,arguments)})}]),t}());function eD(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 tD(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 tD(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 tD(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 nD=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=eD(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))},rD="ffd4774b-99ae-4464-8f40-3afa12b4692e",iD=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,nD({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,nD({src:"https://cdn.cookielaw.org/consent/".concat(rD,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,nD({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:rD}],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)}}(),aD=new j,sD={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},oD=!1;function dD(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(sD).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)&&(oD=!0),i&&oD&&(oD=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(r);var o=function(){t(this,n);try{var r,i;return null==e||null===(r=e.source)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href}catch(e){}}.bind(this);if(window.parent&&s){if("https://html5.gamedistribution.com"===i){var 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=sD[i][a];p&&aD.emit(p,r)}}}),!1);var cD="__msgr",uD=q(),lD=function(e){var n=this;if(!window[cD]){var r=document.createElement("iframe");if(r.src="https://static.gamedistribution.com/message/index.html",r.style.display="none",r.name=cD,document.body.appendChild(r),window!==window.top){var i={gameId:e.gameId,target:e.evnts.domain,token:uD,event_name:"TokenGenerated",timestamp:Date.now()};r.onload=function(){fD(i)},setInterval(function(){t(this,n),i.timestamp=Date.now(),i.event_name="Heartbeat",fD(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?dD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!r.event_name)return;r.token=uD,fD(r)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},hD=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=pD(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},pD=function e(t){try{var n,r,i=null==t?void 0:t.parent;if("game"===(null===(n=i.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return i;e(i)}catch(e){return t}},fD=function(e){try{window[cD]&&window[cD].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},mD=function(){function n(e){R(this,n),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=e.adRequest,this._gameData=e._gameData,this._msgrt=e._msgrt,this._adInstance=e._adInstance,this._eventBus=e._eventBus,this.blockedAdsMap=e._blockedAdsMap,this._parentURL=e._parentURL,this._parentDomain=e._parentDomain,this._onResumeGame=e._onResumeGame.bind(e),this._onPauseGame=e._onPauseGame.bind(e),this._onRewardedWatchComplete=e._onRewardedWatchComplete.bind(e),this._onAdError=e._onAdError.bind(e),this._promoShowSuccess=!1}var i,a,s;return D(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 gD(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 vD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bD(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 yD(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 yD(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 yD(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 _D,wD=function(){function n(e){var r=this;R(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 _}var i,a;return D(n,[{key:"runAdFlow",value:(a=e(r.mark((function e(n){var i,a,s,o,d,c,u,l,h,p,f,m,g,v,b,y,_,w,k,A,E,x,S,D,R,O,I,P,C,L,U,M,j,B,G,N,F,q,V,z,H,W=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adRequest=n,d=this._getAdTypeByAfgPosition(n),n.params.position,c=this._getAdFlow(d),u=this._gameData,l=u.afg_disabled,h=null===(i=n.params)||void 0===i?void 0:i.isGift,null===(a=n.params)||void 0===a||a.position,p=null===(s=u.promo)||void 0===s?void 0:s.rainbow,f=(null==p?void 0:p.enabled)&&(null===(o=p.position)||void 0===o?void 0:o[d]),m=null==p?void 0:p.gift,g=f&&null!=p&&p.duration?null==p?void 0:p.duration:5,v=l?c.filter(function(e){return t(this,W),"adsense"!==e}.bind(this)):c,b=this.get_ad_system_init_result(),y=b.afg,_=b.ima,this.adsBlocked=!y&&!_,this.adsBlocked?(cs("gd-adflow adsBlocked so changing the flow"),v=[]):(y||(v=v.filter(function(e){return t(this,W),"adsense"!==e}.bind(this))),_||(v=v.filter(function(e){return t(this,W),"ima"!==e}.bind(this)))),w=!1,k=!1,A=[],E=0,x=!1,S=bD(v),e.prev=26,S.s();case 28:if((D=S.n()).done){e.next=62;break}return R=D.value,n.params.adapter=R,O=E===v.length-1,I=h&&m||!h,P=O&&f&&I,n.params=vD(vD({},n.params),{},{adapterIndex:E,isLastAdapter:O,shouldFail:!1,extraPromoRunOnFail:P}),function(){t(this,W),ls.firstSuccessOrder&&!isNaN(ls.firstSuccessOrder)&&(n.params.shouldFail=E<ls.firstSuccessOrder)}.bind(this),cs("gd-adflow, before adInvoke",E,R,n.params.shouldFail),e.next=39,this.adInvoke(n);case 39:if(C=e.sent,L=C.success,U=C.args,M=C.isSkipped,j=C.noVast,!L){e.next=51;break}return cs("gd-adflow, adapter-result-success",E,R,U),w=!0,k=!(null==U||!U.isPromoSuccess),e.abrupt("break",62);case 51:if(cs("gd-adflow, adapter-result-failure",E,R,U.message),E++,A.push(U.message),!M){e.next=56;break}return e.abrupt("break",62);case 56:if(!j){e.next=59;break}return this._runAutoResume(),e.abrupt("break",62);case 59:x=P;case 60:e.next=28;break;case 62:e.next=67;break;case 64:e.prev=64,e.t0=e.catch(26),S.e(e.t0);case 67:return e.prev=67,S.f(),e.finish(67);case 70:if(!x){e.next=76;break}return e.next=73,new mD(this).run({duration:g});case 73:e.sent.success&&(k=!0);case 76:return function(){var e;t(this,W),ls.disableGift&&null!==(e=u.gft)&&void 0!==e&&e[d].enabled&&(u.gft[d].enabled=!1)}.bind(this),B=A.join(" /n"),w?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(d)):(this._onResumeGame(B,"warning"),this._giveGift(d)),G="-1",N="none",w?(G="index_".concat(E),N=v[E]):k&&(G="promo",N="promo"),F=this.get_session_id(),this.adsBlocked&&"-1"===G?(q="rewarded"===d?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[q]=this.blockedAdsMap[q]?this.blockedAdsMap[q]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(q)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!0,imaBlocked:!0,adType:q,sessionId:F,successAdapter:"none",adFlowIndex:G})):(T(V={},"adflow.all.index",{message:"".concat(G)}),T(V,"adflow.all.success_adapter",{message:"".concat(N)}),T(V,"adflow.".concat(d,".index"),{message:"".concat(G)}),T(V,"adflow.".concat(d,".success_adapter"),{message:"".concat(N)}),z=V,Object.keys(z).forEach(function(e){t(this,W);var n=z[e];this._msgrt.send(e,n)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:G,successAdapter:N,adBlocker:!1,afgBlocked:!y,imaBlocked:!_,adType:d,sessionId:F})),H={adType:d},this.eventBus.broadcast("AD_FLOW_COMPLETE",H),e.abrupt("return",H);case 89:case"end":return e.stop()}}),e,this,[[26,64,67,70]])}))),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=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=function(e){t(this,u),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),c=function(e){t(this,u),a._eventBus.unsubscribeScope(o),n({success:!0,args:e})}.bind(this),a._eventBus.subscribe("AD_ERROR",d,o),a._eventBus.subscribe("AD_SDK_CANCELED",d,o),a._eventBus.subscribe("AD_SUCCESS",c,o),e.prev=6,e.next=9,a._adInstance.startAd(i);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),us("gd-adflow startAd error",e.t0),n({success:!1,err:e.t0});case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(e,t){return n.apply(this,arguments)}}()));case 1:case"end":return n.stop()}}),n)}))),function(e){return i.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var n,r,i,a,s,o,d,c,u=this,l=void function(){if(t(this,u),ls.customAdFlow)return JSON.parse(ls.customAdFlow)}.bind(this),h=this._gameData.adflw;l&&(h=l);var p=null!==(n=h)&&void 0!==n&&null!==(r=n.adapters)&&void 0!==r&&r.default?null===(i=h)||void 0===i||null===(a=i.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return p=null!==(s=h)&&void 0!==s&&null!==(o=s.adapters)&&void 0!==o&&o[e]?null===(d=h)||void 0===d||null===(c=d.adapters)||void 0===c?void 0:c[e]:p}}]),n}(),kD=new j,AD=["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(AD.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)_D=a,(window.parent||window).postMessage(r,"*"),kD.emit("aeria-event",r);else if(o){_D&&_D.postMessage(r,"*");var d=window.parent||window;d&&d.postMessage(r,"*")}}}),!1);var ED="https://html5.gamedistribution.com",xD="parent-data-request",SD="parent-data-response",DD=function(){function n(){R(this,n)}var i;return D(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===ED&&o===xD){var d={adRequestTimer:e.adRequestTimer};s.postMessage({type:SD,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===ED&&i===SD&&(e(s),a=!0)})),setTimeout(function(){t(this,i),a||e()}.bind(this),1e3);var s={type:xD};window.parent.postMessage(s,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}]),n}(),RD=new DD,TD={SDKExistsOnUpperFrame:!1};function OD(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 ID(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OD(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var PD=q(),CD=null,LD=null,UD=function(){function n(e){var r=this;if(R(this,n),CD)return CD;CD=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 Sw,this._location.print(),this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,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,r),this._sdk_ready=!0}.bind(this)).catch(function(e){t(this,r),this._sdk_ready=!1}.bind(this)).finally(function(){var e,n,i,a,s=this;if((t(this,r),null===(e=this._gameData)||void 0===e||null===(n=e.directTokenUse)||void 0===n?void 0:n.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this._sendLoadedEvent(2),!0===(null===(i=this._gameData.lp)||void 0===i?void 0:i.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(a=this._gameData.evnts)&&void 0!==a&&a.enabled&&this._isLoaderGameURL()&&(lD(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){t(this,s),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),RD.init(this),this._send_gametag_data("sdk_init"),this._executeMidrollPlus()}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var i,v,b,y,w,T,P,C,L,U,j,B,G;return D(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:(G=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 G.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=6;break}if(i=new Sw,0!==(null==(a=i.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled||"html5.gamedistribution.com"!==this._topDomain){e.next=6;break}return e.next=6,iD();case 6:case"end":return e.stop()}}),e,this)}))),function(){return B.apply(this,arguments)})},{key:"testConsent",value:function(){try{YS();e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,XS({});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;aD.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:");cs("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)})}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:"_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=ss.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://ana.headerlift.com/event?".concat(N.stringify(r))).catch(function(e){t(this,n)}.bind(this)),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"),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?(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:ss.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:u(),byloader:this._bridge.isTokenGameURL,isTokenGameURL:this._bridge.isTokenGameURL,isMasterGameURL:this._bridge.isMasterGameURL,isExtHostedGameURL:this._bridge.isExtHostedGameURL,byloaderVersion:this._bridge.version})}},{key:"_loadGamedockTracker",value:function(){var e=this;try{var n=[this._gameData.gmky.url];f(n[0],"GamedockSDK",{alternates:n}).then(function(){var n,r;t(this,e),LD=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&LD.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),ZS.track(LD,this._gameData)}.bind(this)).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendGamedockEvent",value:function(e){var t,n;null===(t=LD)||void 0===t||null===(n=t.tracking)||void 0===n||n.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var n=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),f(n[0],"MinijuegosSDK",{alternates:n}).catch(function(n){t(this,e),this._sendSDKError(n)}.bind(this))}},{key:"_loadLocus",value:function(){var n=e(r.mark((function e(){var n,i=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mk();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));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 _,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){}}IS()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return t(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(n){var r,i;t(this,e),this.msgrt.send("ad.impression"),RS(),null!==(r=this._gameData.diagnostic)&&void 0!==r&&null!==(i=r.gameDock)&&void 0!==i&&i.adViewEvent&&ZS.track(LD,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("Check correctness of your GAME ID. Otherwise, no revenue will be recorded.")}},{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=Zw().config;return"https://".concat(t.gameAPI,"/game/v4/get/").concat(this.options.gameId.replace(/-/g,""),"/?domain=").concat(e,"&v=").concat(ss.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,n=this._checkTokenGameUrl(),r=new Sw,i="html5.gamedistribution.com"!==O(document.referrer).host,a=n&&!TD.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&i;if(a&&(null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)){var s,o,d=null===(s=this._gameData)||void 0===s||null===(o=s.directTokenUse)||void 0===o?void 0:o.behavior;"to-loader"===d?this._redirectToLoaderFrame():"to-blocked-page"===d&&this._redirectToBlocking(!0)}return{blocked:a}}},{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(N.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=ID(ID({},i.query),{},{rd:"1"}),s=N.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&&(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;BS().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;this._gameData.loader&&!1===this._gameData.loader.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===(e=i.promo)||void 0===e?void 0:e[null===(t=i.promo)||void 0===t||null===(n=t.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 zS(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=ss,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:(C=e(r.mark((function e(){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uk();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 C.apply(this,arguments)})},{key:"_createSplash",value:(P=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(ID(ID({},this.options),{},{isConsentDomain:i,version:ss.version}),n,this._parentDomain),e.next=6,vk();case 6:o=e.sent,d=o.enabled,s.on("playClick",function(){var e,n,r=this;if(t(this,c),i){var a=new Date;a.setDate(a.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(a.toUTCString(),"; path=/")}if(this._hideCMPButton(),d)window.gdsdk.showAd(g.Interstitial,{position:"preroll"}).catch(function(e){t(this,r),s.hide()}.bind(this));else{var o={position:"preroll"};(function(){t(this,r),ls.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),o.adapter="adsense")}).bind(this),this.showAd(g.Interstitial,o).catch(function(e){t(this,r)}.bind(this))}null!==(e=this._gameData)&&void 0!==e&&null!==(n=e.evnts)&&void 0!==n&&n.enabled&&(hD({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 P.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(T=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.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(d=new o(ID(ID({},this.options),{},{isConsentDomain:i,version:ss.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,c),d.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,c=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(n);case 3:o=e.sent,(d=new o(ID(ID({},this.options),{},{isConsentDomain:i,version:ss.version,template:null===(a=n.promo)||void 0===a||null===(s=a.template)||void 0===s?void 0:s.preroll}),n)).on("done",function(){t(this,c),d.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(g.Interstitial).catch(function(){t(this,e)}.bind(this))}},{key:"showAd",value:(y=e(r.mark((function t(n){var i,a=this,s=arguments;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=s.length>1&&void 0!==s[1]?s[1]:{},t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,s){var o,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 wD(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 y.apply(this,arguments)})},{key:"_autoResumeIfAdsAreDisabled",value:function(e){var t,n=!1,r=null===(t=this._gameData.diagnostic)||void 0===t?void 0:t.close_ads,i=this._gameData.disableAds[e],a=r||i;return 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,o,d,c,u,l,h,p,f,m;switch(e){case"preroll":null!==(t=this._gameData)&&void 0!==t&&null!==(n=t.gft)&&void 0!==n&&n[e].enabled&&(null===(r=this._gameData)||void 0===r||null===(i=r.gft)||void 0===i||null===(a=i[e].durations[this._giftCount[e]])||void 0===a?void 0:a.after)===this.adInstance.adPrerollCount&&this.decideToGiveAGift(e);break;case"midroll":null!==(s=this._gameData)&&void 0!==s&&null!==(o=s.gft)&&void 0!==o&&o[e].enabled&&(null===(d=this._gameData)||void 0===d||null===(c=d.gft)||void 0===c||null===(u=c[e].durations[this._giftCount[e]])||void 0===u?void 0:u.after)===this.adInstance.adMidrollCount&&this.decideToGiveAGift(e);break;case"rewarded":null!==(l=this._gameData)&&void 0!==l&&null!==(h=l.gft)&&void 0!==h&&h[e].enabled&&(null===(p=this._gameData)||void 0===p||null===(f=p.gft)||void 0===f||null===(m=f[e].durations[this._giftCount[e]])||void 0===m?void 0:m.after)===this.adInstance.adRewardedCount&&this.decideToGiveAGift(e)}}},{key:"_setAdRequestTimer",value:function(){this.adRequestTimer=Date.now()}},{key:"clearSession",value:function(){this.adInstance.clearSession()}},{key:"_attachAfgFallback",value:function(e){var t=e.gameData,n=e.adRequest;if(!t.afg_disabled&&!n.params.hasOwnProperty("fallback_adsense"))switch(n.params.position){case"preroll":case"start":case"next":n.params.fallback_adsense=!0}}},{key:"_rejectAdIfGameBlocked",value:function(e){var t=e.gameData;if(t.bloc_gard&&!0===t.bloc_gard.enabled)throw new Error("Game or domain is blocked.")}},{key:"_rejectAdIfAdDisabled",value:function(e){var t=e.gameData,n=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!==g.Interstitial&&t.adType!==g.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=g.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===g.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,a,s,o=e.gameData,d=e.adRequest,c=null;d.adType===g.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(a=o.diagnostic)||void 0===a||null===(s=a.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):c=o.midroll;if(d.adType===g.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(b=e(r.mark((function t(n){var i=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,a){var s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,i.sdkReady;case 3:return s=e.sent,e.next=6,i.videoAdReady;case 6:if(!s.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[n]&&!i._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(n,"..."));case 10:if(n){e.next=14;break}n=g.Rewarded,e.next=16;break;case 14:if(n===g.Interstitial||n===g.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+n);case 16: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:(v=e(r.mark((function t(){var n=this;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(){var t=e(r.mark((function e(t,i){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n.adInstance.cancel(),n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),i()}catch(e){n.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),t(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(e,n){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"showDisplayAd",value:function(t){var n=this;return new Promise(function(){var i=e(r.mark((function e(i,a){var s;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.sdkReady;case 3:return s=e.sent,e.next=6,n.videoAdReady;case 6:if(!s.dAds.enabled){e.next=13;break}return e.next=9,n.adInstance.loadDisplayAd(t);case 9:n._post_message({topic:"adrequest.display"}),i(),e.next=14;break;case 13:a("Display-Ads are disabled.");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(0),a(e.t0.message||e.t0);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(e,t){return i.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;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()||(hD({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()||(hD({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,g=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled,b=(e||n)&&r.loaderEnabled,y=(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:g,noMinijuegosSDK:v,version:r.version,pauseGameOnStartup:y,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,t;return null===(e=this._gameData)||void 0===e||null===(t=e.extHosting)||void 0===t?void 0:t.enabled}},{key:"_whichFrame",value:function(){return(this._isMasterGameURL()||this._isExtHostedGameURL())&&!this._isTokenGameURL()?"loader-frame":"game-frame"}},{key:"_isMasterGameURL",value:function(){var e=/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i;return e.test(location.href)||!this._isTokenGameURL()&&e.test(document.referrer)}},{key:"_checkTokenGameUrl",value:function(){var e=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(I.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new WS(t).splash()}},{key:"_createPrerollPromoTemplate",value:(i=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=null===(n=t.promo)||void 0===n?void 0:n[null===(i=t.promo)||void 0===i||null===(a=i.template)||void 0===a?void 0:a.preroll],o=new HS(s),e.abrupt("return",o.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(I.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(N.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=ID(ID({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return I.encode(JSON.stringify(e))}},{key:"session",value:function(){var t=this;return new Promise(function(){var n=e(r.mark((function e(n,i){var a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.sdkReady;case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:a=t._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:t._bridge.parentDomain,topDomain:t._bridge.topDomain,parentURL:t._bridge.parentURL,depth:t._bridge.depth,loadedByGameZone:t._bridge.isTokenGameURL}});case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"sendGenericEvent",value:function(e){console.log("Received generic event",e,this._isMasterGameURL());try{var t,n;if("track-milestone"==e.eventName)LD.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(g.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 PD}},{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(g.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(g.Interstitial,{position:"midroll",giftType:i}).catch(function(n){t(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),n}();function MD(){return(MD=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,mk();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 jD=new j,BD=function(e){var n=this;!function(){MD.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&&(jD.off("sdk-event",s),n())}.bind(this);jD.on("sdk-event",s),m("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return t(this,n),r||(r=new UD(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),g=function(){t(this,n);window.addEventListener("message",(function(e){var t=e.data;e.origin,e.source;var n=t.type,r=t.event;"gd-sdk-on-event"===n&&r&&b(r)}),!1)}.bind(this),v=function(){t(this,n),g(),m("init")}.bind(this),b=function(r){t(this,n);try{jD.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:v,_sendSDKReady:f,sendGenericEvent:p}},GD=function(e){var t=BD(e);return t.init(),t},ND=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}},FD="gd-sdk-frame-handshake-request",qD="gd-sdk-frame-handshake-response",VD=function(e){var n=this;return new Promise(function(e,r){var i=this;t(this,n);var a={type:FD},s=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,i=t.source,a=n.type;if(a===FD){var o={type:qD};i.postMessage(o,r)}else a===qD&&(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))},zD=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,fk();case 2:return t=e.sent,e.next=6,VD();case 6:if(n=e.sent,TD.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return i=ND(),a=i.isMasterGameURL,i.isTokenGameURL,s=a(),e.next=14,gk();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)}}(),HD=et,WD=ce,KD=es,$D=$i,QD=WD(qi.f),JD=WD([].push),YD=function(e){return function(t){for(var n,r=$D(t),i=KD(r),a=i.length,s=0,o=[];a>s;)n=i[s++],HD&&!QD(r,n)||JD(o,e?[n,r[n]]:r[n]);return o}},XD={entries:YD(!0),values:YD(!1)}.values;Ya({target:"Object",stat:!0},{values:function(e){return XD(e)}});var ZD,eR={},tR=function(e){try{if(e.skipForward)return;if(eR.source){var t={type:"gd-sdk-on-event",event:e};eR.source.postMessage(t,eR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},nR=function(){tR({name:"SDK_READY",status:"success",message:"Everything is ready."}),tR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),tR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},rR=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(!eR.source&&"init"===c)return function(e){var t=e.source,n=e.origin;eR={source:t,origin:n}}({source:o,origin:s}),void nR();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&&ls.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)},iR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){tR(e),t.apply(this,arguments)}}(e);var t=new UD(e);return rR(t),t},aR=function(){function t(){R(this,t),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},Kv(this.moduleName,this.moduleConfig)}var n,i;return D(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,Qv(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}(),sR=function(){var t=e(r.mark((function t(){var n,i,a,s,o,d,c,u,l,h,p,f,m,g,v,b;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){var e,t=(e=new Sw).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 Sw).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];cs("aeria-ylogin:loc",t,n,i),e=i}catch(e){us("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 _,t.next=13,uk();case 13:p=t.sent,f=null==p||null===(s=p.aeria)||void 0===s?void 0:s.yMenuExcluded,m=null==p||null===(o=p.aeria)||void 0===o?void 0:o.yLoginExcluded,h.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(m||l())})),g=function(){var t=e(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new aR).runYMenu({gameId:c});case 2:case"end":return e.stop()}}),e)})));return function(){return t.apply(this,arguments)}}(),v=ND(),b=v.whichFrame,"game-frame"===b()&&(f||g());case 21:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),oR=function(e){try{var t=$w(e);e.gameId||t.send("nogameid",{message:"".concat(ly.parentURL)})}catch(e){}},dR=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,sR();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)}}(),cR={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,oR(t),ck(t),e.next=5,zD();case 5:return n=e.sent,e.next=8,dR();case 8:return i=n?GD(t):iR(t),bk(),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",iR(t));case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(e){return t.apply(this,arguments)}}()};function uR(){return(uR=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,wk();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,fR(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 lR,hR,pR=!1;function fR(e){var n=this;return new Promise(function(r,i){var a=this;if(t(this,n),ZD)return r(ZD);if(pR)var s=setInterval(function(){t(this,a),ZD&&(pR=!1,clearInterval(s),r(ZD))}.bind(this),100);else pR=!0,cR.create(e).then(function(e){t(this,a),ZD=e,e._sendSDKReady(),pR=!1,r(ZD)}.bind(this))}.bind(this))}function mR(e){return fR(e),{invoke:function(t){return function(e,t){return uR.apply(this,arguments)}(e,t)}}}function gR(n,i){var a=this;return new Promise(function(s,o){var d=this;t(this,a);var c=["https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js"];f(c[0],"gd-sdk-wrp",{alternates:c}).catch(function(e){t(this,d),vR({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,vR({text:"sdk-wrapper load success"}),t=window.GDSDKWRP.GDSDKWRP,a=new t,vR({text:"sdk-wrapper before gdSdkWrp.init"}),e.next=7,a.init(n,i);case 7:hR=e.sent,vR({text:"sdk-wrapper after gdSdkWrp.init"}),s(hR),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(0),vR({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 vR(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(I.encode(JSON.stringify(t))))),console.log(V(Object.values(e)))}catch(e){}}function bR(e){if(e){var t=e.name,n=e.message,r=e.status;try{vR({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!lR}),lR&&lR.onEvent({name:t,message:n,status:r})}catch(t){vR({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function yR(e){return _R.apply(this,arguments)}function _R(){return(_R=e(r.mark((function e(t){var n,i,a,s,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return lR=t,ck(t),e.next=4,uk();case 4:if(a=e.sent,!hR){e.next=7;break}return e.abrupt("return",hR);case 7:if(s=null==a||null===(n=a.sdk_wrp)||void 0===n?void 0:n.enabled,ER("isWrapEnabled ".concat(s)),s){e.next=11;break}return e.abrupt("return");case 11:return o=null==a||null===(i=a.sdk_wrp)||void 0===i?void 0:i.wrapper,e.next=14,kR();case 14:return e.next=16,gR(o,{onEvent:bR});case 16:return hR=e.sent,e.abrupt("return",hR);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wR(){return wR=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,ER("beforeGetDeveloperSettings"),i=n(),ER("afterGetDeveloperSettings"),e.prev=4,e.next=7,yR(i);case 7:a=e.sent,ER("after get SDK wrapper: ".concat(!!a)),a&&(ER("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),ER("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),wR.apply(this,arguments)}function kR(){return AR.apply(this,arguments)}function AR(){return(AR=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 ER(e){window.sdkLog.push(e)}function xR(){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}()?ER("skipped normal SDK init!"):(!function(){DS();var n=mR(xR());function i(){var i=this;this.AdType=g,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===g.Display)return e.showDisplayAd(a);var r={};return function(){t(this,n),ls.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),Yv.showLeaderboard()}.bind(this),addScore:function(e){t(this,i),Yv.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}(),ER("afterSDKInit")),function(e){wR.apply(this,arguments)}({_get_developer_sets:xR});