@bygd/gd-sdk-pes 1.40.19 → 1.40.21

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
- "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/newArrowCheck"),n=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),a=require("@bygd/gd-sdk-era/dist/default"),i=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/classCallCheck"),o=require("@babel/runtime/helpers/defineProperty"),d=require("url-parse"),u=require("js-base64"),c=require("validator"),l=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("events"),A=require("can-autoplay"),g=require("is-plain-object"),v=require("querystringify"),b=require("lodash.merge"),y=require("uuid"),_=require("@babel/runtime/helpers/toConsumableArray"),w=require("@fnet/inter-service-js"),k=require("@flownet/lib-connect-to-tcf");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=E(e),D=E(t),S=E(n),R=E(r),T=E(i),C=E(s),I=E(o),O=E(d),P=E(c),B=E(l),L=E(h),U=E(f),M=E(p),F=E(A),j=E(v),G=E(b),N=E(_),q=E(w),H=E(k),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},V=function(e){return e&&e.Math==Math&&e},z=V("object"==typeof globalThis&&globalThis)||V("object"==typeof window&&window)||V("object"==typeof self&&self)||V("object"==typeof Q&&Q)||function(){return this}()||Function("return this")(),W={exports:{}},K=z,Y=Object.defineProperty,J=function(e,t){try{Y(K,e,{value:t,configurable:!0,writable:!0})}catch(n){K[e]=t}return t},Z=J,X="__core-js_shared__",$=z[X]||Z(X,{}),ee=$;(W.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}},ae=!re((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ie=ae,se=Function.prototype,oe=se.call,de=ie&&se.bind.bind(oe,oe),ue=ie?de:function(e){return function(){return oe.apply(e,arguments)}},ce=function(e){return null==e},le=ce,he=TypeError,fe=function(e){if(le(e))throw he("Can't call method on "+e);return e},pe=fe,me=Object,Ae=function(e){return me(pe(e))},ge=Ae,ve=ue({}.hasOwnProperty),be=Object.hasOwn||function(e,t){return ve(ge(e),t)},ye=ue,_e=0,we=Math.random(),ke=ye(1..toString),Ee=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ke(++_e+we,36)},xe="undefined"!=typeof navigator&&String(navigator.userAgent)||"",De=z,Se=xe,Re=De.process,Te=De.Deno,Ce=Re&&Re.versions||Te&&Te.version,Ie=Ce&&Ce.v8;Ie&&(ne=(te=Ie.split("."))[0]>0&&te[0]<4?1:+(te[0]+te[1])),!ne&&Se&&(!(te=Se.match(/Edge\/(\d+)/))||te[1]>=74)&&(te=Se.match(/Chrome\/(\d+)/))&&(ne=+te[1]);var Oe=ne,Pe=Oe,Be=re,Le=!!Object.getOwnPropertySymbols&&!Be((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Ue=Le&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=z,Fe=W.exports,je=be,Ge=Ee,Ne=Le,qe=Ue,He=Me.Symbol,Qe=Fe("wks"),Ve=qe?He.for||He:He&&He.withoutSetter||Ge,ze=function(e){return je(Qe,e)||(Qe[e]=Ne&&je(He,e)?He[e]:Ve("Symbol."+e)),Qe[e]},We={};We[ze("toStringTag")]="z";var Ke="[object z]"===String(We),Ye="object"==typeof document&&document.all,Je={all:Ye,IS_HTMLDDA:void 0===Ye&&void 0!==Ye},Ze=Je.all,Xe=Je.IS_HTMLDDA?function(e){return"function"==typeof e||e===Ze}:function(e){return"function"==typeof e},$e={},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)},at=rt,it=z.document,st=at(it)&&at(it.createElement),ot=function(e){return st?it.createElement(e):{}},dt=ot,ut=!et&&!re((function(){return 7!=Object.defineProperty(dt("div"),"a",{get:function(){return 7}}).a})),ct=et&&re((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),lt=rt,ht=String,ft=TypeError,pt=function(e){if(lt(e))return e;throw ft(ht(e)+" is not an object")},mt=ae,At=Function.prototype.call,gt=mt?At.bind(At):function(){return At.apply(At,arguments)},vt=z,bt=Xe,yt=function(e,t){return arguments.length<2?(n=vt[e],bt(n)?n:void 0):vt[e]&&vt[e][t];var n},_t=ue({}.isPrototypeOf),wt=yt,kt=Xe,Et=_t,xt=Object,Dt=Ue?function(e){return"symbol"==typeof e}:function(e){var t=wt("Symbol");return kt(t)&&Et(t.prototype,xt(e))},St=String,Rt=function(e){try{return St(e)}catch(e){return"Object"}},Tt=Xe,Ct=Rt,It=TypeError,Ot=function(e){if(Tt(e))return e;throw It(Ct(e)+" is not a function")},Pt=Ot,Bt=ce,Lt=function(e,t){var n=e[t];return Bt(n)?void 0:Pt(n)},Ut=gt,Mt=Xe,Ft=rt,jt=TypeError,Gt=gt,Nt=rt,qt=Dt,Ht=Lt,Qt=function(e,t){var n,r;if("string"===t&&Mt(n=e.toString)&&!Ft(r=Ut(n,e)))return r;if(Mt(n=e.valueOf)&&!Ft(r=Ut(n,e)))return r;if("string"!==t&&Mt(n=e.toString)&&!Ft(r=Ut(n,e)))return r;throw jt("Can't convert object to primitive value")},Vt=TypeError,zt=ze("toPrimitive"),Wt=function(e,t){if(!Nt(e)||qt(e))return e;var n,r=Ht(e,zt);if(r){if(void 0===t&&(t="default"),n=Gt(r,e,t),!Nt(n)||qt(n))return n;throw Vt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Qt(e,t)},Kt=Dt,Yt=function(e){var t=Wt(e,"string");return Kt(t)?t:t+""},Jt=et,Zt=ut,Xt=ct,$t=pt,en=Yt,tn=TypeError,nn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,an="enumerable",sn="configurable",on="writable";$e.f=Jt?Xt?function(e,t,n){if($t(e),t=en(t),$t(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($t(e),t=en(t),$t(n),Zt)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:{}},un=et,cn=be,ln=Function.prototype,hn=un&&Object.getOwnPropertyDescriptor,fn=cn(ln,"name"),pn={EXISTS:fn,PROPER:fn&&"something"===function(){}.name,CONFIGURABLE:fn&&(!un||un&&hn(ln,"name").configurable)},mn=Xe,An=$,gn=ue(Function.toString);mn(An.inspectSource)||(An.inspectSource=function(e){return gn(e)});var vn,bn,yn,_n=An.inspectSource,wn=Xe,kn=z.WeakMap,En=wn(kn)&&/native code/.test(String(kn)),xn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Dn=$e,Sn=xn,Rn=et?function(e,t,n){return Dn.f(e,t,Sn(1,n))}:function(e,t,n){return e[t]=n,e},Tn=W.exports,Cn=Ee,In=Tn("keys"),On=function(e){return In[e]||(In[e]=Cn(e))},Pn={},Bn=En,Ln=z,Un=rt,Mn=Rn,Fn=be,jn=$,Gn=On,Nn=Pn,qn="Object already initialized",Hn=Ln.TypeError,Qn=Ln.WeakMap;if(Bn||jn.state){var Vn=jn.state||(jn.state=new Qn);Vn.get=Vn.get,Vn.has=Vn.has,Vn.set=Vn.set,vn=function(e,t){if(Vn.has(e))throw Hn(qn);return t.facade=e,Vn.set(e,t),t},bn=function(e){return Vn.get(e)||{}},yn=function(e){return Vn.has(e)}}else{var zn=Gn("state");Nn[zn]=!0,vn=function(e,t){if(Fn(e,zn))throw Hn(qn);return t.facade=e,Mn(e,zn,t),t},bn=function(e){return Fn(e,zn)?e[zn]:{}},yn=function(e){return Fn(e,zn)}}var Wn={set:vn,get:bn,has:yn,enforce:function(e){return yn(e)?bn(e):vn(e,{})},getterFor:function(e){return function(t){var n;if(!Un(t)||(n=bn(t)).type!==e)throw Hn("Incompatible receiver, "+e+" required");return n}}},Kn=ue,Yn=re,Jn=Xe,Zn=be,Xn=et,$n=pn.CONFIGURABLE,er=_n,tr=Wn.enforce,nr=Wn.get,rr=String,ar=Object.defineProperty,ir=Kn("".slice),sr=Kn("".replace),or=Kn([].join),dr=Xn&&!Yn((function(){return 8!==ar((function(){}),"length",{value:8}).length})),ur=String(String).split("String"),cr=dn.exports=function(e,t,n){"Symbol("===ir(rr(t),0,7)&&(t="["+sr(rr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Zn(e,"name")||$n&&e.name!==t)&&(Xn?ar(e,"name",{value:t,configurable:!0}):e.name=t),dr&&n&&Zn(n,"arity")&&e.length!==n.arity&&ar(e,"length",{value:n.arity});try{n&&Zn(n,"constructor")&&n.constructor?Xn&&ar(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=tr(e);return Zn(r,"source")||(r.source=or(ur,"string"==typeof t?t:"")),e};Function.prototype.toString=cr((function(){return Jn(this)&&nr(this).source||er(this)}),"toString");var lr=Xe,hr=$e,fr=dn.exports,pr=J,mr=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(lr(n)&&fr(n,i,r),r.global)a?e[t]=n:pr(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:hr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Ar=ue,gr=Ar({}.toString),vr=Ar("".slice),br=function(e){return vr(gr(e),8,-1)},yr=Ke,_r=Xe,wr=br,kr=ze("toStringTag"),Er=Object,xr="Arguments"==wr(function(){return arguments}()),Dr=yr?wr: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),kr))?n:xr?wr(t):"Object"==(r=wr(t))&&_r(t.callee)?"Arguments":r},Sr=Dr,Rr=Ke?{}.toString:function(){return"[object "+Sr(this)+"]"};Ke||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},Cr=ot("span").classList,Ir=Cr&&Cr.constructor&&Cr.constructor.prototype,Or=Ir===Object.prototype?void 0:Ir,Pr=br,Br=ue,Lr=function(e){if("Function"===Pr(e))return Br(e)},Ur=Ot,Mr=ae,Fr=Lr(Lr.bind),jr=function(e,t){return Ur(e),void 0===t?e:Mr?Fr(e,t):function(){return e.apply(t,arguments)}},Gr=re,Nr=br,qr=Object,Hr=ue("".split),Qr=Gr((function(){return!qr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Nr(e)?Hr(e,""):qr(e)}:qr,Vr=Math.ceil,zr=Math.floor,Wr=Math.trunc||function(e){var t=+e;return(t>0?zr:Vr)(t)},Kr=function(e){var t=+e;return t!=t||0===t?0:Wr(t)},Yr=Kr,Jr=Math.min,Zr=function(e){return e>0?Jr(Yr(e),9007199254740991):0},Xr=Zr,$r=function(e){return Xr(e.length)},ea=br,ta=Array.isArray||function(e){return"Array"==ea(e)},na=ue,ra=re,aa=Xe,ia=Dr,sa=_n,oa=function(){},da=[],ua=yt("Reflect","construct"),ca=/^\s*(?:class|function)\b/,la=na(ca.exec),ha=!ca.exec(oa),fa=function(e){if(!aa(e))return!1;try{return ua(oa,da,e),!0}catch(e){return!1}},pa=function(e){if(!aa(e))return!1;switch(ia(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ha||!!la(ca,sa(e))}catch(e){return!0}};pa.sham=!0;var ma=!ua||ra((function(){var e;return fa(fa.call)||!fa(Object)||!fa((function(){e=!0}))||e}))?pa:fa,Aa=ta,ga=ma,va=rt,ba=ze("species"),ya=Array,_a=function(e){var t;return Aa(e)&&(t=e.constructor,(ga(t)&&(t===ya||Aa(t.prototype))||va(t)&&null===(t=t[ba]))&&(t=void 0)),void 0===t?ya:t},wa=function(e,t){return new(_a(e))(0===t?0:t)},ka=jr,Ea=Qr,xa=Ae,Da=$r,Sa=wa,Ra=ue([].push),Ta=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,f,p=xa(d),m=Ea(p),A=ka(u,c),g=Da(m),v=0,b=l||Sa,y=t?b(d,g):n||s?b(d,0):void 0;g>v;v++)if((o||v in m)&&(f=A(h=m[v],v,p),e))if(t)y[v]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:Ra(y,h)}else switch(e){case 4:return!1;case 7:Ra(y,h)}return i?-1:r||a?a:y}},Ca={forEach:Ta(0),map:Ta(1),filter:Ta(2),some:Ta(3),every:Ta(4),find:Ta(5),findIndex:Ta(6),filterReject:Ta(7)},Ia=re,Oa=function(e,t){var n=[][e];return!!n&&Ia((function(){n.call(null,t||function(){return 1},1)}))},Pa=Ca.forEach,Ba=z,La=Tr,Ua=Or,Ma=Oa("forEach")?[].forEach:function(e){return Pa(this,e,arguments.length>1?arguments[1]:void 0)},Fa=Rn,ja=function(e){if(e&&e.forEach!==Ma)try{Fa(e,"forEach",Ma)}catch(t){e.forEach=Ma}};for(var Ga in La)La[Ga]&&ja(Ba[Ga]&&Ba[Ga].prototype);ja(Ua);var Na={},qa={},Ha={}.propertyIsEnumerable,Qa=Object.getOwnPropertyDescriptor,Va=Qa&&!Ha.call({1:2},1);qa.f=Va?function(e){var t=Qa(this,e);return!!t&&t.enumerable}:Ha;var za=Qr,Wa=fe,Ka=function(e){return za(Wa(e))},Ya=et,Ja=gt,Za=qa,Xa=xn,$a=Ka,ei=Yt,ti=be,ni=ut,ri=Object.getOwnPropertyDescriptor;Na.f=Ya?ri:function(e,t){if(e=$a(e),t=ei(t),ni)try{return ri(e,t)}catch(e){}if(ti(e,t))return Xa(!Ja(Za.f,e,t),e[t])};var ai={},ii=Kr,si=Math.max,oi=Math.min,di=function(e,t){var n=ii(e);return n<0?si(n+t,0):oi(n,t)},ui=Ka,ci=di,li=$r,hi=function(e){return function(t,n,r){var a,i=ui(t),s=li(i),o=ci(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},fi={includes:hi(!0),indexOf:hi(!1)},pi=be,mi=Ka,Ai=fi.indexOf,gi=Pn,vi=ue([].push),bi=function(e,t){var n,r=mi(e),a=0,i=[];for(n in r)!pi(gi,n)&&pi(r,n)&&vi(i,n);for(;t.length>a;)pi(r,n=t[a++])&&(~Ai(i,n)||vi(i,n));return i},yi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_i=bi,wi=yi.concat("length","prototype");ai.f=Object.getOwnPropertyNames||function(e){return _i(e,wi)};var ki={};ki.f=Object.getOwnPropertySymbols;var Ei=yt,xi=ai,Di=ki,Si=pt,Ri=ue([].concat),Ti=Ei("Reflect","ownKeys")||function(e){var t=xi.f(Si(e)),n=Di.f;return n?Ri(t,n(e)):t},Ci=be,Ii=Ti,Oi=Na,Pi=$e,Bi=function(e,t,n){for(var r=Ii(t),a=Pi.f,i=Oi.f,s=0;s<r.length;s++){var o=r[s];Ci(e,o)||n&&Ci(n,o)||a(e,o,i(t,o))}},Li=re,Ui=Xe,Mi=/#|\.prototype\./,Fi=function(e,t){var n=Gi[ji(e)];return n==qi||n!=Ni&&(Ui(t)?Li(t):!!t)},ji=Fi.normalize=function(e){return String(e).replace(Mi,".").toLowerCase()},Gi=Fi.data={},Ni=Fi.NATIVE="N",qi=Fi.POLYFILL="P",Hi=Fi,Qi=z,Vi=Na.f,zi=Rn,Wi=mr,Ki=J,Yi=Bi,Ji=Hi,Zi=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?Qi:u?Qi[o]||Ki(o,{}):(Qi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(s=Vi(n,r))&&s.value:n[r],!Ji(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Yi(i,a)}(e.sham||a&&a.sham)&&zi(i,"sham",!0),Wi(n,r,i,e)}},Xi=bi,$i=yi,es=Object.keys||function(e){return Xi(e,$i)},ts=Ae,ns=es;Zi({target:"Object",stat:!0,forced:re((function(){ns(1)}))},{keys:function(e){return ns(ts(e))}});var rs=Array.isArray,as=Object.prototype.toString,is=rs||function(e){return!!e&&"[object Array]"==as.call(e)},ss={name:"@bygd/gd-sdk-pes",version:"1.40.19",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap inline --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.6","@flownet/lib-connect-to-tcf":"^0.2.10","@fnet/inter-service-js":"^0.9.4",axios:"^0.26.1","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",uuid:"^8.3.2",validator:"^13.6.0"}},os=function(e){var t=ds("object"===S.default(e)?e:a.parseJSON(e));return t&&t.version?ss.version>=t.version?t:void 0:t},ds=function(e){var t=this;if(!is(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){D.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}},us=function(){var e;(e=console).log.apply(e,arguments)},cs=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=Dr,fs=String,ps=function(e){if("Symbol"===hs(e))throw TypeError("Cannot convert a Symbol value to a string");return fs(e)},ms={},As=et,gs=ct,vs=$e,bs=pt,ys=Ka,_s=es;ms.f=As&&!gs?Object.defineProperties:function(e,t){bs(e);for(var n,r=ys(t),a=_s(t),i=a.length,s=0;i>s;)vs.f(e,n=a[s++],r[n]);return e};var ws,ks=yt("document","documentElement"),Es=pt,xs=ms,Ds=yi,Ss=Pn,Rs=ks,Ts=ot,Cs="prototype",Is="script",Os=On("IE_PROTO"),Ps=function(){},Bs=function(e){return"<"+Is+">"+e+"</"+Is+">"},Ls=function(e){e.write(Bs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Us=function(){try{ws=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Us="undefined"!=typeof document?document.domain&&ws?Ls(ws):(t=Ts("iframe"),n="java"+Is+":",t.style.display="none",Rs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Bs("document.F=Object")),e.close(),e.F):Ls(ws);for(var r=Ds.length;r--;)delete Us[Cs][Ds[r]];return Us()};Ss[Os]=!0;var Ms=Object.create||function(e,t){var n;return null!==e?(Ps[Cs]=Es(e),n=new Ps,Ps[Cs]=null,n[Os]=e):n=Us(),void 0===t?n:xs.f(n,t)},Fs={},js=Yt,Gs=$e,Ns=xn,Hs=function(e,t,n){var r=js(t);r in e?Gs.f(e,r,Ns(0,n)):e[r]=n},Qs=di,Vs=$r,zs=Hs,Ws=Array,Ks=Math.max,Ys=function(e,t,n){for(var r=Vs(e),a=Qs(t,r),i=Qs(void 0===n?r:n,r),s=Ws(Ks(i-a,0)),o=0;a<i;a++,o++)zs(s,o,e[a]);return s.length=o,s},Js=br,Zs=Ka,Xs=ai.f,$s=Ys,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Fs.f=function(e){return eo&&"Window"==Js(e)?function(e){try{return Xs(e)}catch(e){return $s(eo)}}(e):Xs(Zs(e))};var to=dn.exports,no=$e,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)},ao={},so=ze;ao.f=so;var oo=z,uo=be,co=ao,lo=$e.f,ho=function(e){var t=oo.Symbol||(oo.Symbol={});uo(t,e)||lo(t,e,{value:co.f(e)})},fo=gt,po=yt,mo=ze,Ao=mr,go=$e.f,vo=be,bo=ze("toStringTag"),yo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!vo(e,bo)&&go(e,bo,{configurable:!0,value:t})},_o=Zi,wo=z,ko=gt,Eo=ue,xo=et,Do=Le,So=re,Ro=be,To=_t,Co=pt,Io=Ka,Oo=Yt,Po=ps,Bo=xn,Lo=Ms,Uo=es,Mo=ai,Fo=Fs,jo=ki,Go=Na,No=$e,qo=ms,Ho=qa,Qo=mr,Vo=ro,zo=W.exports,Wo=Pn,Ko=Ee,Yo=ze,Jo=ao,Zo=ho,Xo=function(){var e=po("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=mo("toPrimitive");t&&!t[r]&&Ao(t,r,(function(e){return fo(n,this)}),{arity:1})},$o=yo,ed=Wn,td=Ca.forEach,nd=On("hidden"),rd="Symbol",ad="prototype",id=ed.set,sd=ed.getterFor(rd),od=Object[ad],dd=wo.Symbol,ud=dd&&dd[ad],cd=wo.TypeError,ld=wo.QObject,hd=Go.f,fd=No.f,pd=Fo.f,md=Ho.f,Ad=Eo([].push),gd=zo("symbols"),vd=zo("op-symbols"),bd=zo("wks"),yd=!ld||!ld[ad]||!ld[ad].findChild,_d=xo&&So((function(){return 7!=Lo(fd({},"a",{get:function(){return fd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=hd(od,t);r&&delete od[t],fd(e,t,n),r&&e!==od&&fd(od,t,r)}:fd,wd=function(e,t){var n=gd[e]=Lo(ud);return id(n,{type:rd,tag:e,description:t}),xo||(n.description=t),n},kd=function(e,t,n){e===od&&kd(vd,t,n),Co(e);var r=Oo(t);return Co(n),Ro(gd,r)?(n.enumerable?(Ro(e,nd)&&e[nd][r]&&(e[nd][r]=!1),n=Lo(n,{enumerable:Bo(0,!1)})):(Ro(e,nd)||fd(e,nd,Bo(1,{})),e[nd][r]=!0),_d(e,r,n)):fd(e,r,n)},Ed=function(e,t){Co(e);var n=Io(t),r=Uo(n).concat(Rd(n));return td(r,(function(t){xo&&!ko(xd,n,t)||kd(e,t,n[t])})),e},xd=function(e){var t=Oo(e),n=ko(md,this,t);return!(this===od&&Ro(gd,t)&&!Ro(vd,t))&&(!(n||!Ro(this,t)||!Ro(gd,t)||Ro(this,nd)&&this[nd][t])||n)},Dd=function(e,t){var n=Io(e),r=Oo(t);if(n!==od||!Ro(gd,r)||Ro(vd,r)){var a=hd(n,r);return!a||!Ro(gd,r)||Ro(n,nd)&&n[nd][r]||(a.enumerable=!0),a}},Sd=function(e){var t=pd(Io(e)),n=[];return td(t,(function(e){Ro(gd,e)||Ro(Wo,e)||Ad(n,e)})),n},Rd=function(e){var t=e===od,n=pd(t?vd:Io(e)),r=[];return td(n,(function(e){!Ro(gd,e)||t&&!Ro(od,e)||Ad(r,gd[e])})),r};Do||(Qo(ud=(dd=function(){if(To(ud,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===od&&ko(n,vd,e),Ro(this,nd)&&Ro(this[nd],t)&&(this[nd][t]=!1),_d(this,t,Bo(1,e))};return xo&&yd&&_d(od,t,{configurable:!0,set:n}),wd(t,e)})[ad],"toString",(function(){return sd(this).tag})),Qo(dd,"withoutSetter",(function(e){return wd(Ko(e),e)})),Ho.f=xd,No.f=kd,qo.f=Ed,Go.f=Dd,Mo.f=Fo.f=Sd,jo.f=Rd,Jo.f=function(e){return wd(Yo(e),e)},xo&&(Vo(ud,"description",{configurable:!0,get:function(){return sd(this).description}}),Qo(od,"propertyIsEnumerable",xd,{unsafe:!0}))),_o({global:!0,constructor:!0,wrap:!0,forced:!Do,sham:!Do},{Symbol:dd}),td(Uo(bd),(function(e){Zo(e)})),_o({target:rd,stat:!0,forced:!Do},{useSetter:function(){yd=!0},useSimple:function(){yd=!1}}),_o({target:"Object",stat:!0,forced:!Do,sham:!xo},{create:function(e,t){return void 0===t?Lo(e):Ed(Lo(e),t)},defineProperty:kd,defineProperties:Ed,getOwnPropertyDescriptor:Dd}),_o({target:"Object",stat:!0,forced:!Do},{getOwnPropertyNames:Sd}),Xo(),$o(dd,rd),Wo[nd]=!0;var Td=Le&&!!Symbol.for&&!!Symbol.keyFor,Cd=Zi,Id=yt,Od=be,Pd=ps,Bd=W.exports,Ld=Td,Ud=Bd("string-to-symbol-registry"),Md=Bd("symbol-to-string-registry");Cd({target:"Symbol",stat:!0,forced:!Ld},{for:function(e){var t=Pd(e);if(Od(Ud,t))return Ud[t];var n=Id("Symbol")(t);return Ud[t]=n,Md[n]=t,n}});var Fd=Zi,jd=be,Gd=Dt,Nd=Rt,qd=Td,Hd=(0,W.exports)("symbol-to-string-registry");Fd({target:"Symbol",stat:!0,forced:!qd},{keyFor:function(e){if(!Gd(e))throw TypeError(Nd(e)+" is not a symbol");if(jd(Hd,e))return Hd[e]}});var Qd=ae,Vd=Function.prototype,zd=Vd.apply,Wd=Vd.call,Kd="object"==typeof Reflect&&Reflect.apply||(Qd?Wd.bind(zd):function(){return Wd.apply(zd,arguments)}),Yd=ue([].slice),Jd=ta,Zd=Xe,Xd=br,$d=ps,eu=ue([].push),tu=Zi,nu=yt,ru=Kd,au=gt,iu=ue,su=re,ou=Xe,du=Dt,uu=Yd,cu=function(e){if(Zd(e))return e;if(Jd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];"string"==typeof a?eu(n,a):"number"!=typeof a&&"Number"!=Xd(a)&&"String"!=Xd(a)||eu(n,$d(a))}var i=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Jd(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},lu=Le,hu=String,fu=nu("JSON","stringify"),pu=iu(/./.exec),mu=iu("".charAt),Au=iu("".charCodeAt),gu=iu("".replace),vu=iu(1..toString),bu=/[\uD800-\uDFFF]/g,yu=/^[\uD800-\uDBFF]$/,_u=/^[\uDC00-\uDFFF]$/,wu=!lu||su((function(){var e=nu("Symbol")();return"[null]"!=fu([e])||"{}"!=fu({a:e})||"{}"!=fu(Object(e))})),ku=su((function(){return'"\\udf06\\ud834"'!==fu("\udf06\ud834")||'"\\udead"'!==fu("\udead")})),Eu=function(e,t){var n=uu(arguments),r=cu(t);if(ou(r)||void 0!==e&&!du(e))return n[1]=function(e,t){if(ou(r)&&(t=au(r,this,hu(e),t)),!du(t))return t},ru(fu,null,n)},xu=function(e,t,n){var r=mu(n,t-1),a=mu(n,t+1);return pu(yu,e)&&!pu(_u,a)||pu(_u,e)&&!pu(yu,r)?"\\u"+vu(Au(e,0),16):e};fu&&tu({target:"JSON",stat:!0,arity:3,forced:wu||ku},{stringify:function(e,t,n){var r=uu(arguments),a=ru(wu?Eu:fu,null,r);return ku&&"string"==typeof a?gu(a,bu,xu):a}});var Du=ki,Su=Ae;Zi({target:"Object",stat:!0,forced:!Le||re((function(){Du.f(1)}))},{getOwnPropertySymbols:function(e){var t=Du.f;return t?t(Su(e)):[]}});var Ru=re,Tu=Oe,Cu=ze("species"),Iu=function(e){return Tu>=51||!Ru((function(){var t=[];return(t.constructor={})[Cu]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ou=Ca.filter;Zi({target:"Array",proto:!0,forced:!Iu("filter")},{filter:function(e){return Ou(this,e,arguments.length>1?arguments[1]:void 0)}});var Pu=Zi,Bu=re,Lu=Ka,Uu=Na.f,Mu=et;Pu({target:"Object",stat:!0,forced:!Mu||Bu((function(){Uu(1)})),sham:!Mu},{getOwnPropertyDescriptor:function(e,t){return Uu(Lu(e),t)}});var Fu=Ti,ju=Ka,Gu=Na,Nu=Hs;Zi({target:"Object",stat:!0,sham:!et},{getOwnPropertyDescriptors:function(e){for(var t,n,r=ju(e),a=Gu.f,i=Fu(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&Nu(s,t,n);return s}});var qu=Zi,Hu=ta,Qu=ma,Vu=rt,zu=di,Wu=$r,Ku=Ka,Yu=Hs,Ju=ze,Zu=Yd,Xu=Iu("slice"),$u=Ju("species"),ec=Array,tc=Math.max;qu({target:"Array",proto:!0,forced:!Xu},{slice:function(e,t){var n,r,a,i=Ku(this),s=Wu(i),o=zu(e,s),d=zu(void 0===t?s:t,s);if(Hu(i)&&(n=i.constructor,(Qu(n)&&(n===ec||Hu(n.prototype))||Vu(n)&&null===(n=n[$u]))&&(n=void 0),n===ec||void 0===n))return Zu(i,o,d);for(r=new(void 0===n?ec:n)(tc(d-o,0)),a=0;o<d;o++,a++)o in i&&Yu(r,a,i[o]);return r.length=a,r}});var nc=gt,rc=pt,ac=Lt,ic=function(e,t,n){var r,a;rc(e);try{if(!(r=ac(e,"return"))){if("throw"===t)throw n;return n}r=nc(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return rc(r),n},sc=pt,oc=ic,dc={},uc=dc,cc=ze("iterator"),lc=Array.prototype,hc=function(e){return void 0!==e&&(uc.Array===e||lc[cc]===e)},fc=Dr,pc=Lt,mc=ce,Ac=dc,gc=ze("iterator"),vc=function(e){if(!mc(e))return pc(e,gc)||pc(e,"@@iterator")||Ac[fc(e)]},bc=gt,yc=Ot,_c=pt,wc=Rt,kc=vc,Ec=TypeError,xc=function(e,t){var n=arguments.length<2?kc(e):t;if(yc(n))return _c(bc(n,e));throw Ec(wc(e)+" is not iterable")},Dc=jr,Sc=gt,Rc=Ae,Tc=function(e,t,n,r){try{return r?t(sc(n)[0],n[1]):t(n)}catch(t){oc(e,"throw",t)}},Cc=hc,Ic=ma,Oc=$r,Pc=Hs,Bc=xc,Lc=vc,Uc=Array,Mc=function(e){var t=Rc(e),n=Ic(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=Dc(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=Lc(t),f=0;if(!h||this===Uc&&Cc(h))for(s=Oc(t),o=n?new this(s):Uc(s);s>f;f++)l=i?a(t[f],f):t[f],Pc(o,f,l);else for(c=(u=Bc(t,h)).next,o=n?new this:[];!(d=Sc(c,u)).done;f++)l=i?Tc(u,a,[d.value,f],!0):d.value,Pc(o,f,l);return o.length=f,o},Fc=ze("iterator"),jc=!1;try{var Gc=0,Nc={next:function(){return{done:!!Gc++}},return:function(){jc=!0}};Nc[Fc]=function(){return this},Array.from(Nc,(function(){throw 2}))}catch(e){}var qc=function(e,t){if(!t&&!jc)return!1;var n=!1;try{var r={};r[Fc]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Hc=Mc;Zi({target:"Array",stat:!0,forced:!qc((function(e){Array.from(e)}))},{from:Hc});var Qc,Vc,zc,Wc=ue,Kc=Kr,Yc=ps,Jc=fe,Zc=Wc("".charAt),Xc=Wc("".charCodeAt),$c=Wc("".slice),el=function(e){return function(t,n){var r,a,i=Yc(Jc(t)),s=Kc(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Xc(i,s))<55296||r>56319||s+1===o||(a=Xc(i,s+1))<56320||a>57343?e?Zc(i,s):r:e?$c(i,s,s+2):a-56320+(r-55296<<10)+65536}},tl={codeAt:el(!1),charAt:el(!0)},nl=!re((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),rl=be,al=Xe,il=Ae,sl=nl,ol=On("IE_PROTO"),dl=Object,ul=dl.prototype,cl=sl?dl.getPrototypeOf:function(e){var t=il(e);if(rl(t,ol))return t[ol];var n=t.constructor;return al(n)&&t instanceof n?n.prototype:t instanceof dl?ul:null},ll=re,hl=Xe,fl=rt,pl=cl,ml=mr,Al=ze("iterator"),gl=!1;[].keys&&("next"in(zc=[].keys())?(Vc=pl(pl(zc)))!==Object.prototype&&(Qc=Vc):gl=!0);var vl=!fl(Qc)||ll((function(){var e={};return Qc[Al].call(e)!==e}));vl&&(Qc={}),hl(Qc[Al])||ml(Qc,Al,(function(){return this}));var bl={IteratorPrototype:Qc,BUGGY_SAFARI_ITERATORS:gl},yl=bl.IteratorPrototype,_l=Ms,wl=xn,kl=yo,El=dc,xl=function(){return this},Dl=function(e,t,n,r){var a=t+" Iterator";return e.prototype=_l(yl,{next:wl(+!r,n)}),kl(e,a,!1),El[a]=xl,e},Sl=ue,Rl=Ot,Tl=Xe,Cl=String,Il=TypeError,Ol=function(e,t,n){try{return Sl(Rl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Pl=pt,Bl=function(e){if("object"==typeof e||Tl(e))return e;throw Il("Can't set "+Cl(e)+" as a prototype")},Ll=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ol(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Pl(n),Bl(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ul=Zi,Ml=gt,Fl=Xe,jl=Dl,Gl=cl,Nl=Ll,ql=yo,Hl=Rn,Ql=mr,Vl=dc,zl=pn.PROPER,Wl=pn.CONFIGURABLE,Kl=bl.IteratorPrototype,Yl=bl.BUGGY_SAFARI_ITERATORS,Jl=ze("iterator"),Zl="keys",Xl="values",$l="entries",eh=function(){return this},th=function(e,t,n,r,a,i,s){jl(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!Yl&&e in f)return f[e];switch(e){case Zl:case Xl:case $l:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Jl]||f["@@iterator"]||a&&f[a],m=!Yl&&p||c(a),A="Array"==t&&f.entries||p;if(A&&(o=Gl(A.call(new e)))!==Object.prototype&&o.next&&(Gl(o)!==Kl&&(Nl?Nl(o,Kl):Fl(o[Jl])||Ql(o,Jl,eh)),ql(o,l,!0)),zl&&a==Xl&&p&&p.name!==Xl&&(Wl?Hl(f,"name",Xl):(h=!0,m=function(){return Ml(p,this)})),a)if(d={values:c(Xl),keys:i?m:c(Zl),entries:c($l)},s)for(u in d)(Yl||h||!(u in f))&&Ql(f,u,d[u]);else Ul({target:t,proto:!0,forced:Yl||h},d);return f[Jl]!==m&&Ql(f,Jl,m,{name:a}),Vl[t]=m,d},nh=function(e,t){return{value:e,done:t}},rh=tl.charAt,ah=ps,ih=Wn,sh=th,oh=nh,dh="String Iterator",uh=ih.set,ch=ih.getterFor(dh);sh(String,"String",(function(e){uh(this,{type:dh,string:ah(e),index:0})}),(function(){var e,t=ch(this),n=t.string,r=t.index;return r>=n.length?oh(void 0,!0):(e=rh(n,r),t.index+=e.length,oh(e,!1))}));var lh=pt,hh=function(){var e=lh(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},fh=re,ph=z.RegExp,mh=fh((function(){var e=ph("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ah=mh||fh((function(){return!ph("a","y").sticky})),gh={BROKEN_CARET:mh||fh((function(){var e=ph("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ah,UNSUPPORTED_Y:mh},vh=re,bh=z.RegExp,yh=vh((function(){var e=bh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),_h=re,wh=z.RegExp,kh=_h((function(){var e=wh("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Eh=gt,xh=ue,Dh=ps,Sh=hh,Rh=gh,Th=W.exports,Ch=Ms,Ih=Wn.get,Oh=yh,Ph=kh,Bh=Th("native-string-replace",String.prototype.replace),Lh=RegExp.prototype.exec,Uh=Lh,Mh=xh("".charAt),Fh=xh("".indexOf),jh=xh("".replace),Gh=xh("".slice),Nh=function(){var e=/a/,t=/b*/g;return Eh(Lh,e,"a"),Eh(Lh,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),qh=Rh.BROKEN_CARET,Hh=void 0!==/()??/.exec("")[1];(Nh||Hh||qh||Oh||Ph)&&(Uh=function(e){var t,n,r,a,i,s,o,d=this,u=Ih(d),c=Dh(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=Eh(Uh,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=qh&&d.sticky,p=Eh(Sh,d),m=d.source,A=0,g=c;if(f&&(p=jh(p,"y",""),-1===Fh(p,"g")&&(p+="g"),g=Gh(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==Mh(c,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,A++),n=new RegExp("^(?:"+m+")",p)),Hh&&(n=new RegExp("^"+m+"$(?!\\s)",p)),Nh&&(r=d.lastIndex),a=Eh(Lh,f?n:d,g),f?a?(a.input=Gh(a.input,A),a[0]=Gh(a[0],A),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:Nh&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),Hh&&a&&a.length>1&&Eh(Bh,a[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&h)for(a.groups=s=Ch(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var Qh=Uh;Zi({target:"RegExp",proto:!0,forced:/./.exec!==Qh},{exec:Qh});var Vh=Zi,zh=et,Wh=ue,Kh=be,Yh=Xe,Jh=_t,Zh=ps,Xh=ro,$h=Bi,ef=z.Symbol,tf=ef&&ef.prototype;if(zh&&Yh(ef)&&(!("description"in tf)||void 0!==ef().description)){var nf={},rf=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Zh(arguments[0]),t=Jh(tf,this)?new ef(e):void 0===e?ef():ef(e);return""===e&&(nf[t]=!0),t};$h(rf,ef),rf.prototype=tf,tf.constructor=rf;var af="Symbol(test)"==String(ef("test")),sf=Wh(tf.valueOf),of=Wh(tf.toString),df=/^Symbol\((.*)\)[^)]+$/,uf=Wh("".replace),cf=Wh("".slice);Xh(tf,"description",{configurable:!0,get:function(){var e=sf(this);if(Kh(nf,e))return"";var t=of(e),n=af?cf(t,7,-1):uf(t,df,"$1");return""===n?void 0:n}}),Vh({global:!0,constructor:!0,forced:!0},{Symbol:rf})}ho("iterator");var lf=ze,hf=Ms,ff=$e.f,pf=lf("unscopables"),mf=Array.prototype;null==mf[pf]&&ff(mf,pf,{configurable:!0,value:hf(null)});var Af=function(e){mf[pf][e]=!0},gf=Ka,vf=Af,bf=dc,yf=Wn,_f=$e.f,wf=th,kf=nh,Ef=et,xf="Array Iterator",Df=yf.set,Sf=yf.getterFor(xf),Rf=wf(Array,"Array",(function(e,t){Df(this,{type:xf,target:gf(e),index:0,kind:t})}),(function(){var e=Sf(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,kf(void 0,!0)):kf("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Tf=bf.Arguments=bf.Array;if(vf("keys"),vf("values"),vf("entries"),Ef&&"values"!==Tf.name)try{_f(Tf,"name",{value:"values"})}catch(e){}var Cf=z,If=Tr,Of=Or,Pf=Rf,Bf=Rn,Lf=ze,Uf=Lf("iterator"),Mf=Lf("toStringTag"),Ff=Pf.values,jf=function(e,t){if(e){if(e[Uf]!==Ff)try{Bf(e,Uf,Ff)}catch(t){e[Uf]=Ff}if(e[Mf]||Bf(e,Mf,t),If[t])for(var n in Pf)if(e[n]!==Pf[n])try{Bf(e,n,Pf[n])}catch(t){e[n]=Pf[n]}}};for(var Gf in If)jf(Cf[Gf]&&Cf[Gf].prototype,Gf);jf(Of,"DOMTokenList");var Nf,qf,Hf,Qf,Vf="undefined"!=typeof process&&"process"==br(process),zf=yt,Wf=ro,Kf=et,Yf=ze("species"),Jf=function(e){var t=zf(e);Kf&&t&&!t[Yf]&&Wf(t,Yf,{configurable:!0,get:function(){return this}})},Zf=_t,Xf=TypeError,$f=function(e,t){if(Zf(t,e))return e;throw Xf("Incorrect invocation")},ep=ma,tp=Rt,np=TypeError,rp=pt,ap=function(e){if(ep(e))return e;throw np(tp(e)+" is not a constructor")},ip=ce,sp=ze("species"),op=function(e,t){var n,r=rp(e).constructor;return void 0===r||ip(n=rp(r)[sp])?t:ap(n)},dp=TypeError,up=function(e,t){if(e<t)throw dp("Not enough arguments");return e},cp=/(?:ipad|iphone|ipod).*applewebkit/i.test(xe),lp=z,hp=Kd,fp=jr,pp=Xe,mp=be,Ap=re,gp=ks,vp=Yd,bp=ot,yp=up,_p=cp,wp=Vf,kp=lp.setImmediate,Ep=lp.clearImmediate,xp=lp.process,Dp=lp.Dispatch,Sp=lp.Function,Rp=lp.MessageChannel,Tp=lp.String,Cp=0,Ip={},Op="onreadystatechange";Ap((function(){Nf=lp.location}));var Pp=function(e){if(mp(Ip,e)){var t=Ip[e];delete Ip[e],t()}},Bp=function(e){return function(){Pp(e)}},Lp=function(e){Pp(e.data)},Up=function(e){lp.postMessage(Tp(e),Nf.protocol+"//"+Nf.host)};kp&&Ep||(kp=function(e){yp(arguments.length,1);var t=pp(e)?e:Sp(e),n=vp(arguments,1);return Ip[++Cp]=function(){hp(t,void 0,n)},qf(Cp),Cp},Ep=function(e){delete Ip[e]},wp?qf=function(e){xp.nextTick(Bp(e))}:Dp&&Dp.now?qf=function(e){Dp.now(Bp(e))}:Rp&&!_p?(Qf=(Hf=new Rp).port2,Hf.port1.onmessage=Lp,qf=fp(Qf.postMessage,Qf)):lp.addEventListener&&pp(lp.postMessage)&&!lp.importScripts&&Nf&&"file:"!==Nf.protocol&&!Ap(Up)?(qf=Up,lp.addEventListener("message",Lp,!1)):qf=Op in bp("script")?function(e){gp.appendChild(bp("script"))[Op]=function(){gp.removeChild(this),Pp(e)}}:function(e){setTimeout(Bp(e),0)});var Mp={set:kp,clear:Ep},Fp=function(){this.head=null,this.tail=null};Fp.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 jp,Gp,Np,qp,Hp,Qp=Fp,Vp=/ipad|iphone|ipod/i.test(xe)&&"undefined"!=typeof Pebble,zp=/web0s(?!.*chrome)/i.test(xe),Wp=z,Kp=jr,Yp=Na.f,Jp=Mp.set,Zp=Qp,Xp=cp,$p=Vp,em=zp,tm=Vf,nm=Wp.MutationObserver||Wp.WebKitMutationObserver,rm=Wp.document,am=Wp.process,im=Wp.Promise,sm=Yp(Wp,"queueMicrotask"),om=sm&&sm.value;if(!om){var dm=new Zp,um=function(){var e,t;for(tm&&(e=am.domain)&&e.exit();t=dm.get();)try{t()}catch(e){throw dm.head&&jp(),e}e&&e.enter()};Xp||tm||em||!nm||!rm?!$p&&im&&im.resolve?((qp=im.resolve(void 0)).constructor=im,Hp=Kp(qp.then,qp),jp=function(){Hp(um)}):tm?jp=function(){am.nextTick(um)}:(Jp=Kp(Jp,Wp),jp=function(){Jp(um)}):(Gp=!0,Np=rm.createTextNode(""),new nm(um).observe(Np,{characterData:!0}),jp=function(){Np.data=Gp=!Gp}),om=function(e){dm.head||jp(),dm.add(e)}}var cm=om,lm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},hm=z.Promise,fm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,pm=!fm&&!Vf&&"object"==typeof window&&"object"==typeof document,mm=z,Am=hm,gm=Xe,vm=Hi,bm=_n,ym=ze,_m=pm,wm=fm,km=Oe;Am&&Am.prototype;var Em=ym("species"),xm=!1,Dm=gm(mm.PromiseRejectionEvent),Sm=vm("Promise",(function(){var e=bm(Am),t=e!==String(Am);if(!t&&66===km)return!0;if(!km||km<51||!/native code/.test(e)){var n=new Am((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Em]=r,!(xm=n.then((function(){}))instanceof r))return!0}return!t&&(_m||wm)&&!Dm})),Rm={CONSTRUCTOR:Sm,REJECTION_EVENT:Dm,SUBCLASSING:xm},Tm={},Cm=Ot,Im=TypeError,Om=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Im("Bad Promise constructor");t=e,n=r})),this.resolve=Cm(t),this.reject=Cm(n)};Tm.f=function(e){return new Om(e)};var Pm,Bm,Lm,Um=Zi,Mm=Vf,Fm=z,jm=gt,Gm=mr,Nm=Ll,qm=yo,Hm=Jf,Qm=Ot,Vm=Xe,zm=rt,Wm=$f,Km=op,Ym=Mp.set,Jm=cm,Zm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},Xm=lm,$m=Qp,eA=Wn,tA=hm,nA=Tm,rA="Promise",aA=Rm.CONSTRUCTOR,iA=Rm.REJECTION_EVENT,sA=Rm.SUBCLASSING,oA=eA.getterFor(rA),dA=eA.set,uA=tA&&tA.prototype,cA=tA,lA=uA,hA=Fm.TypeError,fA=Fm.document,pA=Fm.process,mA=nA.f,AA=mA,gA=!!(fA&&fA.createEvent&&Fm.dispatchEvent),vA="unhandledrejection",bA=function(e){var t;return!(!zm(e)||!Vm(t=e.then))&&t},yA=function(e,t){var n,r,a,i=t.value,s=1==t.state,o=s?e.ok:e.fail,d=e.resolve,u=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&xA(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?u(hA("Promise-chain cycle")):(r=bA(n))?jm(r,n,d,u):d(n)):u(i)}catch(e){c&&!a&&c.exit(),u(e)}},_A=function(e,t){e.notified||(e.notified=!0,Jm((function(){for(var n,r=e.reactions;n=r.get();)yA(n,e);e.notified=!1,t&&!e.rejection&&kA(e)})))},wA=function(e,t,n){var r,a;gA?((r=fA.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Fm.dispatchEvent(r)):r={promise:t,reason:n},!iA&&(a=Fm["on"+e])?a(r):e===vA&&Zm("Unhandled promise rejection",n)},kA=function(e){jm(Ym,Fm,(function(){var t,n=e.facade,r=e.value;if(EA(e)&&(t=Xm((function(){Mm?pA.emit("unhandledRejection",r,n):wA(vA,n,r)})),e.rejection=Mm||EA(e)?2:1,t.error))throw t.value}))},EA=function(e){return 1!==e.rejection&&!e.parent},xA=function(e){jm(Ym,Fm,(function(){var t=e.facade;Mm?pA.emit("rejectionHandled",t):wA("rejectionhandled",t,e.value)}))},DA=function(e,t,n){return function(r){e(t,r,n)}},SA=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,_A(e,!0))},RA=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw hA("Promise can't be resolved itself");var r=bA(t);r?Jm((function(){var n={done:!1};try{jm(r,t,DA(RA,n,e),DA(SA,n,e))}catch(t){SA(n,t,e)}})):(e.value=t,e.state=1,_A(e,!1))}catch(t){SA({done:!1},t,e)}}};if(aA&&(lA=(cA=function(e){Wm(this,lA),Qm(e),jm(Pm,this);var t=oA(this);try{e(DA(RA,t),DA(SA,t))}catch(e){SA(t,e)}}).prototype,(Pm=function(e){dA(this,{type:rA,done:!1,notified:!1,parent:!1,reactions:new $m,rejection:!1,state:0,value:void 0})}).prototype=Gm(lA,"then",(function(e,t){var n=oA(this),r=mA(Km(this,cA));return n.parent=!0,r.ok=!Vm(e)||e,r.fail=Vm(t)&&t,r.domain=Mm?pA.domain:void 0,0==n.state?n.reactions.add(r):Jm((function(){yA(r,n)})),r.promise})),Bm=function(){var e=new Pm,t=oA(e);this.promise=e,this.resolve=DA(RA,t),this.reject=DA(SA,t)},nA.f=mA=function(e){return e===cA||undefined===e?new Bm(e):AA(e)},Vm(tA)&&uA!==Object.prototype)){Lm=uA.then,sA||Gm(uA,"then",(function(e,t){var n=this;return new cA((function(e,t){jm(Lm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete uA.constructor}catch(e){}Nm&&Nm(uA,lA)}Um({global:!0,constructor:!0,wrap:!0,forced:aA},{Promise:cA}),qm(cA,rA,!1),Hm(rA);var TA=jr,CA=gt,IA=pt,OA=Rt,PA=hc,BA=$r,LA=_t,UA=xc,MA=vc,FA=ic,jA=TypeError,GA=function(e,t){this.stopped=e,this.result=t},NA=GA.prototype,qA=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=TA(t,c),A=function(e){return r&&FA(r,"normal",e),new GA(!0,e)},g=function(e){return l?(IA(e),p?m(e[0],e[1],A):m(e[0],e[1])):p?m(e,A):m(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(a=MA(e)))throw jA(OA(e)+" is not iterable");if(PA(a)){for(i=0,s=BA(e);s>i;i++)if((o=g(e[i]))&&LA(NA,o))return o;return new GA(!1)}r=UA(e,a)}for(d=h?e.next:r.next;!(u=CA(d,r)).done;){try{o=g(u.value)}catch(e){FA(r,"throw",e)}if("object"==typeof o&&o&&LA(NA,o))return o}return new GA(!1)},HA=hm,QA=Rm.CONSTRUCTOR||!qc((function(e){HA.all(e).then(void 0,(function(){}))})),VA=gt,zA=Ot,WA=Tm,KA=lm,YA=qA;Zi({target:"Promise",stat:!0,forced:QA},{all:function(e){var t=this,n=WA.f(t),r=n.resolve,a=n.reject,i=KA((function(){var n=zA(t.resolve),i=[],s=0,o=1;YA(e,(function(e){var d=s++,u=!1;o++,VA(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise}});var JA=Zi,ZA=Rm.CONSTRUCTOR,XA=hm,$A=yt,eg=Xe,tg=mr,ng=XA&&XA.prototype;if(JA({target:"Promise",proto:!0,forced:ZA,real:!0},{catch:function(e){return this.then(void 0,e)}}),eg(XA)){var rg=$A("Promise").prototype.catch;ng.catch!==rg&&tg(ng,"catch",rg,{unsafe:!0})}var ag=gt,ig=Ot,sg=Tm,og=lm,dg=qA;Zi({target:"Promise",stat:!0,forced:QA},{race:function(e){var t=this,n=sg.f(t),r=n.reject,a=og((function(){var a=ig(t.resolve);dg(e,(function(e){ag(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var ug=gt,cg=Tm;Zi({target:"Promise",stat:!0,forced:Rm.CONSTRUCTOR},{reject:function(e){var t=cg.f(this);return ug(t.reject,void 0,e),t.promise}});var lg=pt,hg=rt,fg=Tm,pg=function(e,t){if(lg(e),hg(t)&&t.constructor===e)return t;var n=fg.f(e);return(0,n.resolve)(t),n.promise},mg=Zi,Ag=Rm.CONSTRUCTOR,gg=pg;yt("Promise"),mg({target:"Promise",stat:!0,forced:Ag},{resolve:function(e){return gg(this,e)}});var vg=TypeError,bg=Zi,yg=re,_g=ta,wg=rt,kg=Ae,Eg=$r,xg=function(e){if(e>9007199254740991)throw vg("Maximum allowed index exceeded");return e},Dg=Hs,Sg=wa,Rg=Iu,Tg=Oe,Cg=ze("isConcatSpreadable"),Ig=Tg>=51||!yg((function(){var e=[];return e[Cg]=!1,e.concat()[0]!==e})),Og=function(e){if(!wg(e))return!1;var t=e[Cg];return void 0!==t?!!t:_g(e)};bg({target:"Array",proto:!0,arity:1,forced:!Ig||!Rg("concat")},{concat:function(e){var t,n,r,a,i,s=kg(this),o=Sg(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Og(i=-1===t?s:arguments[t]))for(a=Eg(i),xg(d+a),n=0;n<a;n++,d++)n in i&&Dg(o,d,i[n]);else xg(d+1),Dg(o,d++,i);return o.length=d,o}});var Pg=et,Bg=pn.EXISTS,Lg=ue,Ug=ro,Mg=Function.prototype,Fg=Lg(Mg.toString),jg=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Gg=Lg(jg.exec);function Ng(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 qg(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 qg(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function qg(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 Hg(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 Qg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hg(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Pg&&!Bg&&Ug(Mg,"name",{configurable:!0,get:function(){try{return Gg(jg,Fg(this))[1]}catch(e){return""}}});var Vg,zg={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"}},Wg={},Kg=function(e,t){Wg[e]=Qg(Qg({},t),{},{isLoading:!1})},Yg=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(D.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},Jg=function(){var e=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u;return R.default.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(!(r=Wg[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=Ng(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=zg[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Yg({id:s,src:zg[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Yg({id:t,src:r.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(r.source,"."),e.t2);case 43:return r.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(t){return e.apply(this,arguments)}}(),Zg=T.default((function e(){var t=this;C.default(this,e),I.default(this,"load",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jg("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),I.default(this,"showLeaderboard",function(){var e=x.default(R.default.mark((function e(n){var r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),I.default(this,"addScore",function(){var e=x.default(R.default.mark((function e(n){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.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"]},Kg(this.moduleName,this.moduleConfig)})),Xg=new Zg,$g=rt,ev=br,tv=ze("match"),nv=function(e){var t;return $g(e)&&(void 0!==(t=e[tv])?!!t:"RegExp"==ev(e))},rv=nv,av=TypeError,iv=function(e){if(rv(e))throw av("The method doesn't accept regular expressions");return e},sv=ze("match"),ov=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[sv]=!1,"/./"[e](t)}catch(e){}}return!1},dv=Zi,uv=Lr,cv=Na.f,lv=Zr,hv=ps,fv=iv,pv=fe,mv=ov,Av=uv("".startsWith),gv=uv("".slice),vv=Math.min,bv=mv("startsWith");dv({target:"String",proto:!0,forced:!!(bv||(Vg=cv(String.prototype,"startsWith"),!Vg||Vg.writable))&&!bv},{startsWith:function(e){var t=hv(pv(this));fv(e);var n=lv(vv(arguments.length>1?arguments[1]:void 0,t.length)),r=hv(e);return Av?Av(t,r,n):gv(t,n,n+r.length)===r}});var yv=gt,_v=be,wv=_t,kv=hh,Ev=RegExp.prototype,xv=function(e){var t=e.flags;return void 0!==t||"flags"in Ev||_v(e,"flags")||!wv(Ev,e)?t:yv(kv,e)},Dv=pn.PROPER,Sv=mr,Rv=pt,Tv=ps,Cv=re,Iv=xv,Ov="toString",Pv=RegExp.prototype[Ov],Bv=Cv((function(){return"/a/b"!=Pv.call({source:"a",flags:"b"})})),Lv=Dv&&Pv.name!=Ov;(Bv||Lv)&&Sv(RegExp.prototype,Ov,(function(){var e=Rv(this);return"/"+Tv(e.source)+"/"+Tv(Iv(e))}),{unsafe:!0});var Uv=Lr,Mv=mr,Fv=Qh,jv=re,Gv=ze,Nv=Rn,qv=Gv("species"),Hv=RegExp.prototype,Qv=function(e,t,n,r){var a=Gv(e),i=!jv((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!jv((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[qv]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=Uv(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=Uv(e),d=t.exec;return d===Fv||d===Hv.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Mv(String.prototype,e,d[0]),Mv(Hv,a,d[1])}r&&Nv(Hv[a],"sham",!0)},Vv=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},zv=gt,Wv=pt,Kv=Xe,Yv=br,Jv=Qh,Zv=TypeError,Xv=function(e,t){var n=e.exec;if(Kv(n)){var r=zv(n,e,t);return null!==r&&Wv(r),r}if("RegExp"===Yv(e))return zv(Jv,e,t);throw Zv("RegExp#exec called on incompatible receiver")},$v=gt,eb=pt,tb=ce,nb=fe,rb=Vv,ab=ps,ib=Lt,sb=Xv;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){I.default(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}Qv("search",(function(e,t,n){return[function(t){var n=nb(this),r=tb(t)?void 0:ib(t,e);return r?$v(r,t,n):new RegExp(t)[e](ab(n))},function(e){var r=eb(this),a=ab(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;rb(s,0)||(r.lastIndex=0);var o=sb(r,a);return rb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var ub,cb,lb=function(){function e(){C.default(this,e)}return T.default(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.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",p);var m=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:A,depth:a.getIframeDepth(),domainMatched:s===o,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.default(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.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new O.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new O.default(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.default(e,!0);return n.query=db(db({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),hb=function(){try{return(new lb).getBridgeContext()}catch(e){return{}}}(),fb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(ub=!1,(cb=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===cb.xanthophyll&&(ub=!0),ub)},pb=tl.charAt,mb=ue,Ab=Ae,gb=Math.floor,vb=mb("".charAt),bb=mb("".replace),yb=mb("".slice),_b=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,wb=/\$([$&'`]|\d{1,2})/g,kb=Kd,Eb=gt,xb=ue,Db=Qv,Sb=re,Rb=pt,Tb=Xe,Cb=ce,Ib=Kr,Ob=Zr,Pb=ps,Bb=fe,Lb=function(e,t,n){return t+(n?pb(e,t).length:1)},Ub=Lt,Mb=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=wb;return void 0!==a&&(a=Ab(a),d=_b),bb(i,d,(function(i,d){var u;switch(vb(d,0)){case"$":return"$";case"&":return e;case"`":return yb(t,0,n);case"'":return yb(t,s);case"<":u=a[yb(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=gb(c/10);return 0===l?i:l<=o?void 0===r[l-1]?vb(d,1):r[l-1]+vb(d,1):i}u=r[c-1]}return void 0===u?"":u}))},Fb=Xv,jb=ze("replace"),Gb=Math.max,Nb=Math.min,qb=xb([].concat),Hb=xb([].push),Qb=xb("".indexOf),Vb=xb("".slice),zb="$0"==="a".replace(/./,"$0"),Wb=!!/./[jb]&&""===/./[jb]("a","$0");Db("replace",(function(e,t,n){var r=Wb?"$":"$0";return[function(e,n){var r=Bb(this),a=Cb(e)?void 0:Ub(e,jb);return a?Eb(a,e,r,n):Eb(t,Pb(r),e,n)},function(e,a){var i=Rb(this),s=Pb(e);if("string"==typeof a&&-1===Qb(a,r)&&-1===Qb(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=Tb(a);d||(a=Pb(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=Fb(i,s);if(null===h)break;if(Hb(l,h),!u)break;""===Pb(h[0])&&(i.lastIndex=Lb(s,Ob(i.lastIndex),c))}for(var f,p="",m=0,A=0;A<l.length;A++){for(var g=Pb((h=l[A])[0]),v=Gb(Nb(Ib(h.index),s.length),0),b=[],y=1;y<h.length;y++)Hb(b,void 0===(f=h[y])?f:String(f));var _=h.groups;if(d){var w=qb([g],b,v,s);void 0!==_&&Hb(w,_);var k=Pb(kb(a,void 0,w))}else k=Mb(g,s,v,b,_,a);v>=m&&(p+=Vb(s,m,v)+k,m=v+g.length)}return p+Vb(s,m)}]}),!!Sb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!zb||Wb);var Kb=re,Yb=et,Jb=ze("iterator"),Zb=!Kb((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&&!Yb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Jb]||"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})),Xb=mr,$b=Ys,ey=Math.floor,ty=function(e,t){var n=e.length,r=ey(n/2);return n<8?ny(e,t):ry(e,ty($b(e,0,r),t),ty($b(e,r),t),t)},ny=function(e,t){for(var n,r,a=e.length,i=1;i<a;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},ry=function(e,t,n,r){for(var a=t.length,i=n.length,s=0,o=0;s<a||o<i;)e[s+o]=s<a&&o<i?r(t[s],n[o])<=0?t[s++]:n[o++]:s<a?t[s++]:n[o++];return e},ay=Zi,iy=z,sy=gt,oy=ue,dy=et,uy=Zb,cy=mr,ly=ro,hy=function(e,t,n){for(var r in t)Xb(e,r,t[r],n);return e},fy=yo,py=Dl,my=Wn,Ay=$f,gy=Xe,vy=be,by=jr,yy=Dr,_y=pt,wy=rt,ky=ps,Ey=Ms,xy=xn,Dy=xc,Sy=vc,Ry=up,Ty=ty,Cy=ze("iterator"),Iy="URLSearchParams",Oy=Iy+"Iterator",Py=my.set,By=my.getterFor(Iy),Ly=my.getterFor(Oy),Uy=Object.getOwnPropertyDescriptor,My=function(e){if(!dy)return iy[e];var t=Uy(iy,e);return t&&t.value},Fy=My("fetch"),jy=My("Request"),Gy=My("Headers"),Ny=jy&&jy.prototype,qy=Gy&&Gy.prototype,Hy=iy.RegExp,Qy=iy.TypeError,Vy=iy.decodeURIComponent,zy=iy.encodeURIComponent,Wy=oy("".charAt),Ky=oy([].join),Yy=oy([].push),Jy=oy("".replace),Zy=oy([].shift),Xy=oy([].splice),$y=oy("".split),e_=oy("".slice),t_=/\+/g,n_=Array(4),r_=function(e){return n_[e-1]||(n_[e-1]=Hy("((?:%[\\da-f]{2}){"+e+"})","gi"))},a_=function(e){try{return Vy(e)}catch(t){return e}},i_=function(e){var t=Jy(e,t_," "),n=4;try{return Vy(t)}catch(e){for(;n;)t=Jy(t,r_(n--),a_);return t}},s_=/[!'()~]|%20/g,o_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},d_=function(e){return o_[e]},u_=function(e){return Jy(zy(e),s_,d_)},c_=py((function(e,t){Py(this,{type:Oy,iterator:Dy(By(e).entries),kind:t})}),"Iterator",(function(){var e=Ly(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),l_=function(e){this.entries=[],this.url=null,void 0!==e&&(wy(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Wy(e,0)?e_(e,1):e:ky(e)))};l_.prototype={type:Iy,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,d=Sy(e);if(d)for(n=(t=Dy(e,d)).next;!(r=sy(n,t)).done;){if(i=(a=Dy(_y(r.value))).next,(s=sy(i,a)).done||(o=sy(i,a)).done||!sy(i,a).done)throw Qy("Expected sequence with length 2");Yy(this.entries,{key:ky(s.value),value:ky(o.value)})}else for(var u in e)vy(e,u)&&Yy(this.entries,{key:u,value:ky(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=$y(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=$y(t,"="),Yy(this.entries,{key:i_(Zy(n)),value:i_(Ky(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Yy(n,u_(e.key)+"="+u_(e.value));return Ky(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var h_=function(){Ay(this,f_);var e=Py(this,new l_(arguments.length>0?arguments[0]:void 0));dy||(this.length=e.entries.length)},f_=h_.prototype;if(hy(f_,{append:function(e,t){Ry(arguments.length,2);var n=By(this);Yy(n.entries,{key:ky(e),value:ky(t)}),dy||this.length++,n.updateURL()},delete:function(e){Ry(arguments.length,1);for(var t=By(this),n=t.entries,r=ky(e),a=0;a<n.length;)n[a].key===r?Xy(n,a,1):a++;dy||(this.length=n.length),t.updateURL()},get:function(e){Ry(arguments.length,1);for(var t=By(this).entries,n=ky(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Ry(arguments.length,1);for(var t=By(this).entries,n=ky(e),r=[],a=0;a<t.length;a++)t[a].key===n&&Yy(r,t[a].value);return r},has:function(e){Ry(arguments.length,1);for(var t=By(this).entries,n=ky(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Ry(arguments.length,1);for(var n,r=By(this),a=r.entries,i=!1,s=ky(e),o=ky(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?Xy(a,d--,1):(i=!0,n.value=o));i||Yy(a,{key:s,value:o}),dy||(this.length=a.length),r.updateURL()},sort:function(){var e=By(this);Ty(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=By(this).entries,r=by(e,arguments.length>1?arguments[1]:void 0),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new c_(this,"keys")},values:function(){return new c_(this,"values")},entries:function(){return new c_(this,"entries")}},{enumerable:!0}),cy(f_,Cy,f_.entries,{name:"entries"}),cy(f_,"toString",(function(){return By(this).serialize()}),{enumerable:!0}),dy&&ly(f_,"size",{get:function(){return By(this).entries.length},configurable:!0,enumerable:!0}),fy(h_,Iy),ay({global:!0,constructor:!0,forced:!uy},{URLSearchParams:h_}),!uy&&gy(Gy)){var p_=oy(qy.has),m_=oy(qy.set),A_=function(e){if(wy(e)){var t,n=e.body;if(yy(n)===Iy)return t=e.headers?new Gy(e.headers):new Gy,p_(t,"content-type")||m_(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ey(e,{body:xy(0,ky(n)),headers:xy(0,t)})}return e};if(gy(Fy)&&ay({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Fy(e,arguments.length>1?A_(arguments[1]):{})}}),gy(jy)){var g_=function(e){return Ay(this,Ny),new jy(e,arguments.length>1?A_(arguments[1]):{})};Ny.constructor=g_,g_.prototype=Ny,ay({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:g_})}}var v_={URLSearchParams:h_,getState:By},b_=fi.includes,y_=Af;Zi({target:"Array",proto:!0,forced:re((function(){return!Array(1).includes()}))},{includes:function(e){return b_(this,e,arguments.length>1?arguments[1]:void 0)}}),y_("includes");var __=Zi,w_=iv,k_=fe,E_=ps,x_=ov,D_=ue("".indexOf);function S_(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return L.default(n,e)}function d(e,t){return U.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),P.default.isURL(o)))return o}}}return function(){var e;D.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(B.default(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?B.default(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}__({target:"String",proto:!0,forced:!x_("includes")},{includes:function(e){return!!~D_(E_(k_(this)),E_(w_(e)),arguments.length>1?arguments[1]:void 0)}});var R_="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==R_&&R_,T_={searchParams:"URLSearchParams"in R_,iterable:"Symbol"in R_&&"iterator"in Symbol,blob:"FileReader"in R_&&"Blob"in R_&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in R_,arrayBuffer:"ArrayBuffer"in R_};if(T_.arrayBuffer)var C_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],I_=ArrayBuffer.isView||function(e){return e&&C_.indexOf(Object.prototype.toString.call(e))>-1};function O_(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 P_(e){return"string"!=typeof e&&(e=String(e)),e}function B_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return T_.iterable&&(t[Symbol.iterator]=function(){return t}),t}function L_(e){this.map={},e instanceof L_?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 U_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function M_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function F_(e){var t=new FileReader,n=M_(t);return t.readAsArrayBuffer(e),n}function j_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function G_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:T_.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:T_.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:T_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():T_.arrayBuffer&&T_.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=j_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):T_.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||I_(e))?this._bodyArrayBuffer=j_(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):T_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},T_.blob&&(this.blob=function(){var e=U_(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=U_(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(F_)}),this.text=function(){var e=U_(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=M_(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)},T_.formData&&(this.formData=function(){return this.text().then(H_)}),this.json=function(){return this.text().then(JSON.parse)},this}L_.prototype.append=function(e,t){e=O_(e),t=P_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},L_.prototype.delete=function(e){delete this.map[O_(e)]},L_.prototype.get=function(e){return e=O_(e),this.has(e)?this.map[e]:null},L_.prototype.has=function(e){return this.map.hasOwnProperty(O_(e))},L_.prototype.set=function(e,t){this.map[O_(e)]=P_(t)},L_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},L_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),B_(e)},L_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),B_(e)},L_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),B_(e)},T_.iterable&&(L_.prototype[Symbol.iterator]=L_.prototype.entries);var N_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function q_(e,t){if(!(this instanceof q_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof q_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new L_(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 L_(t.headers)),this.method=function(e){var t=e.toUpperCase();return N_.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 H_(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function Q_(e,t){if(!(this instanceof Q_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');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 L_(t.headers),this.url=t.url||"",this._initBody(e)}q_.prototype.clone=function(){return new q_(this,{body:this._bodyInit})},G_.call(q_.prototype),G_.call(Q_.prototype),Q_.prototype.clone=function(){return new Q_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new L_(this.headers),url:this.url})},Q_.error=function(){var e=new Q_(null,{status:0,statusText:""});return e.type="error",e};var V_=[301,302,303,307,308];Q_.redirect=function(e,t){if(-1===V_.indexOf(t))throw new RangeError("Invalid status code");return new Q_(null,{status:t,headers:{location:e}})};var z_,W_=R_.DOMException;try{new W_}catch(e){W_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},W_.prototype=Object.create(Error.prototype),W_.prototype.constructor=W_}function K_(e,t){return new Promise((function(n,r){var a=new q_(e,t);if(a.signal&&a.signal.aborted)return r(new W_("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new L_,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 a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new Q_(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new W_("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&R_.location.href?R_.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(T_.blob?i.responseType="blob":T_.arrayBuffer&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof L_?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,P_(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}K_.polyfill=!0,R_.fetch||(R_.fetch=K_,R_.Headers=L_,R_.Request=q_,R_.Response=Q_);var Y_=function(e){var t=this;if(!z_){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:hb.topDomain,domain:hb.parentDomain,referrer:hb.parentURL,depth:a.getIframeDepth(),version:ss.version,byloader:hb.isTokenGameURL,isTokenGameURL:hb.isTokenGameURL,isMasterGameURL:hb.isMasterGameURL,isExtHostedGameURL:hb.isExtHostedGameURL,byloaderVersion:hb.version,tracking:fb.userDeclinedTracking,whitelabel:fb.whitelabelPartner,platform:a.getMobilePlatform()};z_=new a.MessageRouter(n)}return z_||{send:function(){D.default(this,t)}.bind(this)}},J_={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(n).then(function(e){D.default(this,t)}.bind(this)).catch(function(e){D.default(this,t)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var t=this;try{var n="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(n).then(function(e){D.default(this,t)}.bind(this)).catch(function(e){D.default(this,t)}.bind(this))}catch(e){}}},Z_={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},X_={gameAPI:"game.api.gamedistribution.com"},$_={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},ew=function(){var e=this,t=Z_.acc.some(function(t){var n;return D.default(this,e),t===(null===(n=window.location.host)||void 0===n?void 0:n.toLowerCase())}.bind(this));return{env:t?"acc":"prod",config:t?$_:X_}},tw=function(e){var t=this,n=e.url;return new Promise(function(e,r){D.default(this,t);var a=new XMLHttpRequest;a.open("GET",n,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else r(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){r(e)},a.send()}.bind(this))};function nw(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 rw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nw(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aw,iw,sw,ow=new m.EventEmitter,dw=[],uw=function(e){dw.push(e)},cw=function(e){aw=Y_(sw=e)},lw=function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(iw){e.next=6;break}return e.next=3,pw(sw);case 3:iw=e.sent,ow.emit("game-data-ready",iw),hw();case 6:return e.abrupt("return",iw);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),hw=function(){var e,t;if(null!==(e=iw)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(fw(),null!==(n=iw)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=iw)&&void 0!==i&&i.url)J_.getGameData(null===(s=iw)||void 0===s?void 0:s.url);setInterval(x.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,pw(sw);case 3:iw=e.sent,null===(t=iw)||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)}},fw=function(){var e=window.fetch;window.fetch=x.default(R.default.mark((function t(){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,A,g,v,b,y,_=this,w=arguments;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(d=w.length,u=new Array(d),c=0;c<d;c++)u[c]=w[c];l=u[0],h=u[1],f=null===(n=iw)||void 0===n||null===(r=n.aws_tst)||void 0===r||null===(a=r.ep)||void 0===a?void 0:a.atm,p=null===(i=iw)||void 0===i||null===(s=i.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.msgrt,m=function(t,n){var r=this;D.default(this,_);var a=l.replace(t,n);e(a,h).then(function(){D.default(this,r)}.bind(this))}.bind(this);try{f&&l.indexOf("tag.atom")>0&&m("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),p&&l.indexOf("msgrt.gamedistribution.com")>0&&(null===(A=iw)||void 0===A||A.aws_tst,null===(g=iw)||void 0===g||null===(v=g.aws_tst)||void 0===v||null===(b=v.ep)||void 0===b||b.msgrt,m("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return t.next=9,e(l,h);case 9:return y=t.sent,t.abrupt("return",y);case 11:case"end":return t.stop()}}),t,this)})))},pw=function(e){var t=this;aw.send("gdfw.loading",{message:"loading"}),dw=[],uw("1"),uw("2");var n=new S_;uw("3");var r=n.get("partner.domain.value");uw("4");var i=function(){return D.default(this,t),{gameId:e.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);uw("5");var s=function(){D.default(this,t);var n=o(),a=n?"&mode=".concat(n):"",i=ew().config;return"https://".concat(i.gameAPI,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(ss.version,"&localTime=").concat((new Date).getHours())}.bind(this);uw("6");var o=function(){var e=this;D.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return D.default(this,e),t.get(n)}.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 uw("7"),new Promise(function(e){var n=this;D.default(this,t),uw("7.1");var r=i();try{uw("7.2");var o=s();uw("7.3"),fetch(o).then(function(){var e=x.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return uw("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,tw({url:o});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(t){return e.apply(this,arguments)}}()).then(function(t){var i=this;if(D.default(this,n),uw("7.5"),t.success){var s,d,u,c=t.result.game;uw("7.6");var l={company:c.company,gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,activeStatus:c.activeStatus,description:c.description,disableAds:c.enableAds,preroll:c.preRoll,midroll:6e4*c.timeAds,rewardedAds:c.rewardedAds,title:c.title,publishedAt:c.publishedAt,tags:c.tags,category:c.category,assets:c.assets,disp_2nd_prer:c.disp_2nd_prer,ctry_vst:c.ctry_vst,ctry:c.ctry,crtv:c.crtv,dmain:c.dmain,aws_tst:c.aws_tst,meta:c.meta,adspn:os(c.adspn)||{},__t4r:os(c.__t4r)||{},block_exts:os(c.push_cuda),bloc_gard:os(c.bloc_gard),cookie:os(c.cookie),gdpr:os(c.gdpr),diagnostic:os(c.diagnostic),cmp:os(c.cmp),gft:os(c.gft)||{},sdk:os(c.sdk)||{},sdkfw:os(c.sdkfw)||{},loader:os(c.loader)||{},splash:os(c.splash)||{},promo:os(c.promo)||{},dAds:os(c.dads)||{},pAds:os(c.pads)||{},mAds:os(c.mads)||{},rAds:os(c.rads)||{},lp:os(c.lp)||{},extsc:os(c.extsc)||{},evnts:os(c.evnts)||{},dp:os(c.dp)||{},adflw:os(c.adflw)||{},afgszf:os(c.afgszf)||{},fllc:os(c.fllc)||{},lotm:os(c.lotm)||{},t4rc:os(c.t4rc)||{},midroll_plus:os(c.midroll_plus)||{},gmky:os(c.gmky)||{},urlBlockExc:os(c.url_blck_exc)||{},sdk_wrp:os(c.sdk_wrp)||{},dbglg:os(c.dbglg)||{},extHosting:os(c.ext_hosting)||{},directTokenUse:os(c.dtu)||{},aeria:os(c.aeria)||{},advlm:os(c.advlm)||{},ad_blcks:os(c.ad_blcks)||{},rmblck:os(c.rmblck)||{},gs_trc:os(c.gs_trc)||{},rwskp:os(c.rwskp)||{},isv_fw:os(c.isv_fw)||{}};uw("7.7");var h=a.extendDefaults(M.default(r),l);uw("7.8"),h.afg_disabled=!1===(null===(s=h.sdk)||void 0===s||null===(d=s.afg)||void 0===d?void 0:d.enabled),h.url=o,function(){D.default(this,i),void 0!==ls.afgEnabled&&(h.afg_disabled=!ls.afgEnabled),void 0!==ls.promoEnabled&&(h.promo=h.promo||{},h.promo=rw(rw({},h.promo),{},{rainbow:{enabled:ls.promoEnabled}}))}.bind(this),uw("7.9"),null!==(u=h.pAds)&&void 0!==u&&u.enabled&&(h.preroll=!0),uw("7.10"),aw.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=dw[dw.length-1];aw.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){D.default(this,n);var a=dw[dw.length-1];aw.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var d=dw[dw.length-1];aw.send("gdfw.err",{message:"".concat(d,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}.bind(this))},mw=function(){var e=x.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();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 e.apply(this,arguments)}}(),Aw=function(){var e=x.default(R.default.mark((function e(){var t,n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();case 2:return n=e.sent,r=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),gw=function(){var e=x.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();case 2:return n=e.sent,e.next=5,mw();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 e.apply(this,arguments)}}(),vw=function(){var e=x.default(R.default.mark((function e(){var t,n,r,a,i,s,o,d;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();case 2:return o=e.sent,d=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:d?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:d?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==o||null===(s=o.extsc)||void 0===s||!s.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),bw=function(){var e=x.default(R.default.mark((function e(){var t,n,r,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vw();case 2:if((t=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return n=t.path,r=t.name,i=t.ref,e.prev=6,s={},e.next=10,a.getScript(n,r,{error_prefix:"Blocked:",exists:function(){return D.default(this,o),!!i&&!!window[i]}.bind(this),attrs:s});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",r,e.t0),a.dankLog("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return e.apply(this,arguments)}}(),yw=!1,_w=!1,ww=function(){return new Promise(function(){var e=x.default(R.default.mark((function e(t,n){var r,a,i,s,o,d=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!yw){e.next=4;break}return e.abrupt("return",t(_w));case 4:yw=!0;case 5:return e.next=7,vw();case 7:if((r=e.sent).enabled){e.next=10;break}return e.abrupt("return",t(!1));case 10:if(a=r.loadedFlag,!(i=r.loadedFlagCheck)||a){e.next=13;break}return e.abrupt("return",t(!1));case 13:if(i){e.next=16;break}return _w=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){D.default(this,d),s&&(s=!1,yw=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){D.default(this,d),s&&i&&window[a]?(s=!1,yw=!0,_w=!0,clearInterval(o),t(!0)):s||clearInterval(o)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}())},kw=Zi,Ew=hm,xw=re,Dw=yt,Sw=Xe,Rw=op,Tw=pg,Cw=mr,Iw=Ew&&Ew.prototype;if(kw({target:"Promise",proto:!0,real:!0,forced:!!Ew&&xw((function(){Iw.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Rw(this,Dw("Promise")),n=Sw(e);return this.then(n?function(n){return Tw(t,e()).then((function(){return n}))}:e,n?function(n){return Tw(t,e()).then((function(){throw n}))}:e)}}),Sw(Ew)){var Ow=Dw("Promise").prototype.finally;Iw.finally!==Ow&&Cw(Iw,"finally",Ow,{unsafe:!0})}var Pw="\t\n\v\f\r                 \u2028\u2029\ufeff",Bw=fe,Lw=ps,Uw=Pw,Mw=ue("".replace),Fw=RegExp("^["+Uw+"]+"),jw=RegExp("(^|[^"+Uw+"])["+Uw+"]+$"),Gw=function(e){return function(t){var n=Lw(Bw(t));return 1&e&&(n=Mw(n,Fw,"")),2&e&&(n=Mw(n,jw,"$1")),n}},Nw={start:Gw(1),end:Gw(2),trim:Gw(3)},qw=pn.PROPER,Hw=re,Qw=Pw,Vw=Nw.trim;Zi({target:"String",proto:!0,forced:function(e){return Hw((function(){return!!Qw[e]()||"​…᠎"!=="​…᠎"[e]()||qw&&Qw[e].name!==e}))}("trim")},{trim:function(){return Vw(this)}});var zw=Zi,Ww=Ca.find,Kw=Af,Yw="find",Jw=!0;Yw in[]&&Array(1)[Yw]((function(){Jw=!1})),zw({target:"Array",proto:!0,forced:Jw},{find:function(e){return Ww(this,e,arguments.length>1?arguments[1]:void 0)}}),Kw(Yw);var Zw=Xe,Xw=rt,$w=Ll,ek=$e.f,tk=et,nk=z,rk=ue,ak=Hi,ik=function(e,t,n){var r,a;return $w&&Zw(r=t.constructor)&&r!==n&&Xw(a=r.prototype)&&a!==n.prototype&&$w(e,a),e},sk=Rn,ok=ai.f,dk=_t,uk=nv,ck=ps,lk=xv,hk=gh,fk=function(e,t,n){n in e||ek(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},pk=mr,mk=re,Ak=be,gk=Wn.enforce,vk=Jf,bk=yh,yk=kh,_k=ze("match"),wk=nk.RegExp,kk=wk.prototype,Ek=nk.SyntaxError,xk=rk(kk.exec),Dk=rk("".charAt),Sk=rk("".replace),Rk=rk("".indexOf),Tk=rk("".slice),Ck=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ik=/a/g,Ok=/a/g,Pk=new wk(Ik)!==Ik,Bk=hk.MISSED_STICKY,Lk=hk.UNSUPPORTED_Y,Uk=tk&&(!Pk||Bk||bk||yk||mk((function(){return Ok[_k]=!1,wk(Ik)!=Ik||wk(Ok)==Ok||"/a/i"!=wk(Ik,"i")})));if(ak("RegExp",Uk)){for(var Mk=function(e,t){var n,r,a,i,s,o,d=dk(kk,this),u=uk(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===Mk)return e;if((u||dk(kk,e))&&(e=e.source,c&&(t=lk(h))),e=void 0===e?"":ck(e),t=void 0===t?"":ck(t),h=e,bk&&"dotAll"in Ik&&(r=!!t&&Rk(t,"s")>-1)&&(t=Sk(t,/s/g,"")),n=t,Bk&&"sticky"in Ik&&(a=!!t&&Rk(t,"y")>-1)&&Lk&&(t=Sk(t,/y/g,"")),yk&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=Dk(e,r)))t+=Dk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:xk(Ck,Tk(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||Ak(s,c))throw new Ek("Invalid capture group name");s[c]=!0,i[i.length]=[c,u],d=!1,c="";continue}d?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=ik(wk(e,t),d?this:kk,Mk),(r||a||l.length)&&(o=gk(s),r&&(o.dotAll=!0,o.raw=Mk(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=Dk(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+Dk(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{sk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Fk=ok(wk),jk=0;Fk.length>jk;)fk(Mk,wk,Fk[jk++]);kk.constructor=Mk,Mk.prototype=kk,pk(nk,"RegExp",Mk,{constructor:!0})}vk("RegExp");var Gk=Zi,Nk=Qr,qk=Ka,Hk=Oa,Qk=ue([].join);Gk({target:"Array",proto:!0,forced:Nk!=Object||!Hk("join",",")},{join:function(e){return Qk(qk(this),void 0===e?",":e)}});var Vk=Ca.map;Zi({target:"Array",proto:!0,forced:!Iu("map")},{map:function(e){return Vk(this,e,arguments.length>1?arguments[1]:void 0)}});var zk=et,Wk=ue,Kk=gt,Yk=re,Jk=es,Zk=ki,Xk=qa,$k=Ae,eE=Qr,tE=Object.assign,nE=Object.defineProperty,rE=Wk([].concat),aE=!tE||Yk((function(){if(zk&&1!==tE({b:1},tE(nE({},"a",{enumerable:!0,get:function(){nE(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!=tE({},e)[n]||Jk(tE({},t)).join("")!=r}))?function(e,t){for(var n=$k(e),r=arguments.length,a=1,i=Zk.f,s=Xk.f;r>a;)for(var o,d=eE(arguments[a++]),u=i?rE(Jk(d),i(d)):Jk(d),c=u.length,l=0;c>l;)o=u[l++],zk&&!Kk(s,d,o)||(n[o]=d[o]);return n}:tE,iE=aE;Zi({target:"Object",stat:!0,arity:2,forced:Object.assign!==iE},{assign:iE});var sE,oE=ue,dE=2147483647,uE=/[^\0-\u007E]/,cE=/[.\u3002\uFF0E\uFF61]/g,lE="Overflow: input needs wider integers to process",hE=RangeError,fE=oE(cE.exec),pE=Math.floor,mE=String.fromCharCode,AE=oE("".charCodeAt),gE=oE([].join),vE=oE([].push),bE=oE("".replace),yE=oE("".split),_E=oE("".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))},EE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=AE(e,n++);if(a>=55296&&a<=56319&&n<r){var i=AE(e,n++);56320==(64512&i)?vE(t,((1023&a)<<10)+(1023&i)+65536):(vE(t,a),n--)}else vE(t,a)}return t}(e);var n,r,a=e.length,i=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&vE(t,mE(r));var d=t.length,u=d;for(d&&vE(t,"-");u<a;){var c=dE;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=u+1;if(c-i>pE((dE-s)/l))throw hE(lE);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>dE)throw hE(lE);if(r==i){for(var h=s,f=36;;){var p=f<=o?1:f>=o+26?26:f-o;if(h<p)break;var m=h-p,A=36-p;vE(t,mE(wE(p+m%A))),h=pE(m/A),f+=36}vE(t,mE(wE(h))),o=kE(s,l,u==d),s=0,u++}}s++,i++}return gE(t,"")},xE=Zi,DE=et,SE=Zb,RE=z,TE=jr,CE=ue,IE=mr,OE=ro,PE=$f,BE=be,LE=aE,UE=Mc,ME=Ys,FE=tl.codeAt,jE=function(e){var t,n,r=[],a=yE(bE(_E(e),cE,"."),".");for(t=0;t<a.length;t++)n=a[t],vE(r,fE(uE,n)?"xn--"+EE(n):n);return gE(r,".")},GE=ps,NE=yo,qE=up,HE=v_,QE=Wn,VE=QE.set,zE=QE.getterFor("URL"),WE=HE.URLSearchParams,KE=HE.getState,YE=RE.URL,JE=RE.TypeError,ZE=RE.parseInt,XE=Math.floor,$E=Math.pow,ex=CE("".charAt),tx=CE(/./.exec),nx=CE([].join),rx=CE(1..toString),ax=CE([].pop),ix=CE([].push),sx=CE("".replace),ox=CE([].shift),dx=CE("".split),ux=CE("".slice),cx=CE("".toLowerCase),lx=CE([].unshift),hx="Invalid scheme",fx="Invalid host",px="Invalid port",mx=/[a-z]/i,Ax=/[\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 #/:<>?@[\\\]^|]/,Ex=/^[\u0000-\u0020]+/,xx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Dx=/[\t\n\r]/g,Sx=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)lx(t,e%256),e=XE(e/256);return nx(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=rx(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Rx={},Tx=LE({},Rx,{" ":1,'"':1,"<":1,">":1,"`":1}),Cx=LE({},Tx,{"#":1,"?":1,"{":1,"}":1}),Ix=LE({},Cx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ox=function(e,t){var n=FE(e,0);return n>32&&n<127&&!BE(t,e)?e:encodeURIComponent(e)},Px={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Bx=function(e,t){var n;return 2==e.length&&tx(mx,ex(e,0))&&(":"==(n=ex(e,1))||!t&&"|"==n)},Lx=function(e){var t;return e.length>1&&Bx(ux(e,0,2))&&(2==e.length||"/"===(t=ex(e,2))||"\\"===t||"?"===t||"#"===t)},Ux=function(e){return"."===e||"%2e"===cx(e)},Mx={},Fx={},jx={},Gx={},Nx={},qx={},Hx={},Qx={},Vx={},zx={},Wx={},Kx={},Yx={},Jx={},Zx={},Xx={},$x={},eD={},tD={},nD={},rD={},aD=function(e,t,n){var r,a,i,s=GE(e);if(t){if(a=this.parse(s))throw JE(a);this.searchParams=null}else{if(void 0!==n&&(r=new aD(n,!0)),a=this.parse(s,null,r))throw JE(a);(i=KE(new WE)).bindURL(this),this.searchParams=i}};aD.prototype={type:"URL",parse:function(e,t,n){var r,a,i,s,o,d=this,u=t||Mx,c=0,l="",h=!1,f=!1,p=!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=sx(e,Ex,""),e=sx(e,xx,"$1")),e=sx(e,Dx,""),r=UE(e);c<=r.length;){switch(a=r[c],u){case Mx:if(!a||!tx(mx,a)){if(t)return hx;u=jx;continue}l+=cx(a),u=Fx;break;case Fx:if(a&&(tx(Ax,a)||"+"==a||"-"==a||"."==a))l+=cx(a);else{if(":"!=a){if(t)return hx;l="",u=jx,c=0;continue}if(t&&(d.isSpecial()!=BE(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?u=Jx:d.isSpecial()&&n&&n.scheme==d.scheme?u=Gx:d.isSpecial()?u=Qx:"/"==r[c+1]?(u=Nx,c++):(d.cannotBeABaseURL=!0,ix(d.path,""),u=tD)}break;case jx:if(!n||n.cannotBeABaseURL&&"#"!=a)return hx;if(n.cannotBeABaseURL&&"#"==a){d.scheme=n.scheme,d.path=ME(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=rD;break}u="file"==n.scheme?Jx:qx;continue;case Gx:if("/"!=a||"/"!=r[c+1]){u=qx;continue}u=Vx,c++;break;case Nx:if("/"==a){u=zx;break}u=eD;continue;case qx:if(d.scheme=n.scheme,a==sE)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("/"==a||"\\"==a&&d.isSpecial())u=Hx;else if("?"==a)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=ME(n.path),d.query="",u=nD;else{if("#"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=ME(n.path),d.path.length--,u=eD;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="",u=rD}break;case Hx:if(!d.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=eD;continue}u=zx}else u=Vx;break;case Qx:if(u=Vx,"/"!=a||"/"!=ex(l,c+1))continue;c++;break;case Vx:if("/"!=a&&"\\"!=a){u=zx;continue}break;case zx:if("@"==a){h&&(l="%40"+l),h=!0,i=UE(l);for(var m=0;m<i.length;m++){var A=i[m];if(":"!=A||p){var g=Ox(A,Ix);p?d.password+=g:d.username+=g}else p=!0}l=""}else if(a==sE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(h&&""==l)return"Invalid authority";c-=UE(l).length+1,l="",u=Wx}else l+=a;break;case Wx:case Kx:if(t&&"file"==d.scheme){u=Xx;continue}if(":"!=a||f){if(a==sE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(d.isSpecial()&&""==l)return fx;if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",u=$x,t)return;continue}"["==a?f=!0:"]"==a&&(f=!1),l+=a}else{if(""==l)return fx;if(s=d.parseHost(l))return s;if(l="",u=Yx,t==Kx)return}break;case Yx:if(!tx(gx,a)){if(a==sE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()||t){if(""!=l){var v=ZE(l,10);if(v>65535)return px;d.port=d.isSpecial()&&v===Px[d.scheme]?null:v,l=""}if(t)return;u=$x;continue}return px}l+=a;break;case Jx:if(d.scheme="file","/"==a||"\\"==a)u=Zx;else{if(!n||"file"!=n.scheme){u=eD;continue}if(a==sE)d.host=n.host,d.path=ME(n.path),d.query=n.query;else if("?"==a)d.host=n.host,d.path=ME(n.path),d.query="",u=nD;else{if("#"!=a){Lx(nx(ME(r,c),""))||(d.host=n.host,d.path=ME(n.path),d.shortenPath()),u=eD;continue}d.host=n.host,d.path=ME(n.path),d.query=n.query,d.fragment="",u=rD}}break;case Zx:if("/"==a||"\\"==a){u=Xx;break}n&&"file"==n.scheme&&!Lx(nx(ME(r,c),""))&&(Bx(n.path[0],!0)?ix(d.path,n.path[0]):d.host=n.host),u=eD;continue;case Xx:if(a==sE||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&Bx(l))u=eD;else if(""==l){if(d.host="",t)return;u=$x}else{if(s=d.parseHost(l))return s;if("localhost"==d.host&&(d.host=""),t)return;l="",u=$x}continue}l+=a;break;case $x:if(d.isSpecial()){if(u=eD,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=sE&&(u=eD,"/"!=a))continue}else d.fragment="",u=rD;else d.query="",u=nD;break;case eD:if(a==sE||"/"==a||"\\"==a&&d.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(o=cx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==a||"\\"==a&&d.isSpecial()||ix(d.path,"")):Ux(l)?"/"==a||"\\"==a&&d.isSpecial()||ix(d.path,""):("file"==d.scheme&&!d.path.length&&Bx(l)&&(d.host&&(d.host=""),l=ex(l,0)+":"),ix(d.path,l)),l="","file"==d.scheme&&(a==sE||"?"==a||"#"==a))for(;d.path.length>1&&""===d.path[0];)ox(d.path);"?"==a?(d.query="",u=nD):"#"==a&&(d.fragment="",u=rD)}else l+=Ox(a,Cx);break;case tD:"?"==a?(d.query="",u=nD):"#"==a?(d.fragment="",u=rD):a!=sE&&(d.path[0]+=Ox(a,Rx));break;case nD:t||"#"!=a?a!=sE&&("'"==a&&d.isSpecial()?d.query+="%27":d.query+="#"==a?"%23":Ox(a,Rx)):(d.fragment="",u=rD);break;case rD:a!=sE&&(d.fragment+=Ox(a,Tx))}c++}},parseHost:function(e){var t,n,r;if("["==ex(e,0)){if("]"!=ex(e,e.length-1))return fx;if(t=function(e){var t,n,r,a,i,s,o,d=[0,0,0,0,0,0,0,0],u=0,c=null,l=0,h=function(){return ex(e,l)};if(":"==h()){if(":"!=ex(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&tx(_x,h());)t=16*t+ZE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!tx(gx,h()))return;for(;tx(gx,h());){if(i=ZE(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}d[u]=256*d[u]+a,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[u++]=t}else{if(null!==c)return;l++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)o=d[u],d[u--]=d[c+s-1],d[c+--s]=o;else if(8!=u)return;return d}(ux(e,1,-1)),!t)return fx;this.host=t}else if(this.isSpecial()){if(e=jE(e),tx(wx,e))return fx;if(t=function(e){var t,n,r,a,i,s,o,d=dx(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=d[r]))return e;if(i=10,a.length>1&&"0"==ex(a,0)&&(i=tx(vx,a)?16:8,a=ux(a,8==i?1:2)),""===a)s=0;else{if(!tx(10==i?yx:8==i?bx:_x,a))return e;s=ZE(a,i)}ix(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=$E(256,5-t))return null}else if(s>255)return null;for(o=ax(n),r=0;r<n.length;r++)o+=n[r]*$E(256,3-r);return o}(e),null===t)return fx;this.host=t}else{if(tx(kx,e))return fx;for(t="",n=UE(e),r=0;r<n.length;r++)t+=Ox(n[r],Rx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return BE(Px,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Bx(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,s=e.path,o=e.query,d=e.fragment,u=t+":";return null!==a?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=Sx(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+nx(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw JE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new iD(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+=Ox(t[n],Ix)}},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+=Ox(t[n],Ix)}},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,Yx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+nx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,$x))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=GE(e))?this.query=null:("?"==ex(e,0)&&(e=ux(e,1)),this.query="",this.parse(e,nD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=GE(e))?("#"==ex(e,0)&&(e=ux(e,1)),this.fragment="",this.parse(e,rD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var iD=function(e){var t=PE(this,sD),n=qE(arguments.length,1)>1?arguments[1]:void 0,r=VE(t,new aD(e,!1,n));DE||(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())},sD=iD.prototype,oD=function(e,t){return{get:function(){return zE(this)[e]()},set:t&&function(e){return zE(this)[t](e)},configurable:!0,enumerable:!0}};if(DE&&(OE(sD,"href",oD("serialize","setHref")),OE(sD,"origin",oD("getOrigin")),OE(sD,"protocol",oD("getProtocol","setProtocol")),OE(sD,"username",oD("getUsername","setUsername")),OE(sD,"password",oD("getPassword","setPassword")),OE(sD,"host",oD("getHost","setHost")),OE(sD,"hostname",oD("getHostname","setHostname")),OE(sD,"port",oD("getPort","setPort")),OE(sD,"pathname",oD("getPathname","setPathname")),OE(sD,"search",oD("getSearch","setSearch")),OE(sD,"searchParams",oD("getSearchParams")),OE(sD,"hash",oD("getHash","setHash"))),IE(sD,"toJSON",(function(){return zE(this).serialize()}),{enumerable:!0}),IE(sD,"toString",(function(){return zE(this).serialize()}),{enumerable:!0}),YE){var dD=YE.createObjectURL,uD=YE.revokeObjectURL;dD&&IE(iD,"createObjectURL",TE(dD,YE)),uD&&IE(iD,"revokeObjectURL",TE(uD,YE))}NE(iD,"URL"),xE({global:!0,constructor:!0,forced:!SE,sham:!DE},{URL:iD});var cD=function(){function e(t){C.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return T.default(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 t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new O.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return D.default(this,e),this.customParamKeys.some(function(e){return D.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),lD=function(){function e(t,n){C.default(this,e),this.adContainer=t,this.onResume=n}return T.default(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 t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){D.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}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}(),hD=function(){function e(t,n){C.default(this,e),this.adContainer=t,this.onResume=n}return T.default(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}(),fD=function(){function e(t,n,r){C.default(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return T.default(e,[{key:"show",value:function(){this.skipAd.style.display="block"}},{key:"hide",value:function(){this.skipAd.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.skipAd=t;var n=document.createElement("span");n.innerText="Skip Ad >>",this.addStyles(),t.classList.add("gd__skip__ad"),n.classList.add("gd__skip__span"),this.skipAd.appendChild(n),this.adContainer.appendChild(t),this.skipAd.addEventListener("click",function(){D.default(this,e),this.OnSkip()}.bind(this))}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__skip__ad__style",e,"\n .gd__skip__ad{\n background-color:black; \n width: 260px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n right: 0px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n padding: 10px;\n }\n .gd__skip__ad:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__skip__span{\n color: white;\n font-size: 22px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),pD=function(){function e(t){C.default(this,e),this.adContainer=t}return T.default(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}(),mD=function(){function e(t){C.default(this,e),this.adContainer=t}return T.default(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}(),AD=function(e){if(!e)return!1;var t=gD.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)},gD=Object.prototype.toString;function vD(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 bD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vD(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yD(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 _D,wD="13998",kD="_cc".concat(wD),ED=["https://tags.crwdcntrl.net/c/".concat(wD,"/cc.js?ns=").concat(kD)],xD=function(){return!!_D&&"function"==typeof _D.bcpf&&"function"==typeof _D.add},DD=function(e,t){try{if(!xD())return;_D.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},SD=function(e,t){try{if(!xD())return;_D.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},RD=function(e){var t=this;try{DD("act","play"),DD("med","game"),"complete"===document.readyState?_D.bcpf():_D.bcp(),e.tags.forEach(function(e){D.default(this,t),SD("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),SD("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},TD=function(){window.addEventListener("load",(function(){ow.once("game-data-ready",function(){var e=x.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=hb&&hb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,mw();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(n=t.lotm)&&void 0!==n&&n.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,a.getScript(ED[0],"LOTCC_".concat(wD),{alternates:ED});case 16:"object"===S.default(window[kD])&&(_D=window[kD]),xD()&&RD(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(t){return e.apply(this,arguments)}}())}))},CD=function(){SD("genp","ad video"),SD("act","ad impression")},ID=function(){SD("act","ad skipped")},OD=function(){SD("act","ad click")},PD=function(){SD("act","ad complete")},BD=new S_,LD={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},UD=function(e,t){var n=this,r=function(e,t){var n=BD.get("partner.url.value"),r=LD[t],a="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(a),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,t),a=Object.keys(r).map(function(e){return D.default(this,n),"".concat(e,"=").concat(r[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},MD=(new S_).get("partner.domain.value"),FD=["latimes.com"],jD={exist:function(e){var t=this;return"Softgames-Azerion"===e.dname&&FD.some(function(e){return D.default(this,t),e===MD}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return UD(n,e)}}[MD](e)}(e,t)}},GD=function(){var e=(new S_).get("partner.url.value"),t=new O.default(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,a="1"===r||"2"===r,i="1"===r;n={useTestAds:a,disableMidrolltimer:i,isRevisionTest:i||a}}return n},ND=function(){function e(){C.default(this,e),this.adContainer=window.document.body}return T.default(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 t=document.createElement("div");t.id="gd__spinner",t.setAttribute("title","Spinner"),t.classList.add("gd__spinner"),this.adSpinner=t;var n=document.createElement("div");n.id="gd__spinner__fail",n.setAttribute("title","Spinner"),n.classList.add("gd__spinner__fail"),n.innerHTML="No Ads Available!",this.adSpinnerFail=n;var r=document.createElement("div");r.id="gd__spinner__button",r.setAttribute("title","Spinner"),r.classList.add("gd__spinner__button"),r.onclick=function(){D.default(this,e),this.hide()}.bind(this);var a=document.createElement("p");a.innerText="OK!",r.appendChild(a),this.adSpinnerButton=r;var i=document.createElement("div");i.id="gd__spinner__logo",i.setAttribute("title","Spinner"),i.classList.add("gd__spinner__logo"),this.adSpinnerLogo=i;var s=document.createElement("div");s.id="gd__spinner__container",s.classList.add("gd__spinner__container"),s.appendChild(this.adSpinner),s.appendChild(this.adSpinnerFail),s.appendChild(this.adSpinnerButton),s.appendChild(this.adSpinnerLogo),this.adSpinnerContainer=s;var o=document.createElement("div");o.id="gd__spinner__overlay",o.classList.add("gd__spinner__overlay"),o.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=o,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 qD(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 HD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qD(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var QD=new m.EventEmitter,VD=null,zD=function(){function e(t,n,r){var i=this;if(C.default(this,e),VD)return VD;VD=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,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=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",this.rewardGuarantied=!1,this.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):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(){D.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){D.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,d,c,l,h,f,p,m,A,v,b,y,_,w,k,E,S,P,B,L,U;return T.default(e,[{key:"start",value:(U=x.default(R.default.mark((function e(){var t,n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_afg_script({});case 2:case"end":return e.stop()}}),e)}))));case 3:return t=e.sent,this.afgInitSuccess=t.success,e.next=7,this.adSystemInitialize(x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_hl_script();case 2:return e.next=4,a._init_ima_script();case 4:a._createPlayer(),a._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(n=e.sent,this.imaInitSuccess=n.success,r=[],this.afgInitSuccess||r.push(t.error),this.imaInitSuccess||r.push(n.error),!(r.length>0)){e.next=14;break}throw r[0];case 14:window.eventTest=function(e){D.default(this,a),this._broadcast(e,{message:"",status:"success"})}.bind(this),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(0),cs("gd-adflow error on ads.start",e.t0),new Error(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,17]])}))),function(){return U.apply(this,arguments)})},{key:"adSystemInitialize",value:(L=x.default(R.default.mark((function e(t){var n;return R.default.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 L.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:(B=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,r=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(i=a.adapterConfig)||void 0===i?void 0:i.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,r);case 6:return d=e.sent,s?(this.gameData,u=s[o]||s.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),c=100*d.floor_price,d.floor_price,l=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:c}}),h=l.url,f={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return B.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=x.default(R.default.mark((function r(i){var s,o,d,u,c,l,h,f,p=this;return R.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||GD().useTestAds)){r.next=6;break}return s=n.IMASampleTags[e],o=Math.floor(Math.random()*s.length),d=s[o],i({url:d,tnl_keys:{tnl_ad_pos:null==t?void 0:t.adTypeFound}}),r.abrupt("return");case 6:if("spil"!==t.adapter){r.next=8;break}return r.abrupt("return",i(n._getSpilUrl({adType:e,options:t})));case 8:if(void 0!==window.idhb.requestAds){r.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return r.prev=10,u=n.nextAdPosition(e),null!=t&&t.adTypeFound&&(u=null==t?void 0:t.adTypeFound),n._broadcast("AD_REQUEST",{message:u}),c=n.options,"preroll"===u&&g.isPlainObject(c.preroll)?c=c.preroll:"midroll"===u&&g.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===u&&g.isPlainObject(c.rewarded)&&(c=c.rewarded),l="","audio"===t.adapter||"audio"===t.giftType?(n.isAudioAd=!0,l="midrollaudio"):(n.isAudioAd=!1,l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),r.next=20,window.idhb.isLoaded();case 20:return r.next=22,n._create_dp_context(u,t);case 22:h=r.sent,us("gd-adflow, before idhb",u,l),f=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(HD(HD({},f),{},{adaptor_order:t.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.requestAds({slots:I.default({},l,{bidFloor:(null==h?void 0:h.floor_price)||void 0}),callback:function(e,t){var r=this;D.default(this,p),!h||null!=t&&t.bidFloorApplied||fetch(h.skip_url).catch(function(e){D.default(this,r)}.bind(this));var a={src:"hl",tnl_keys:HD(HD({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:h,hl:t};n._extend_hl_url(a),i(a)}.bind(this)}),r.next=34;break;case 31:throw r.prev=31,r.t0=r.catch(10),new Error(r.t0);case 34:case"end":return r.stop()}}),r,this,[[10,31]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.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===a.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===a.AdType.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===a.AdType.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,t){var n=this;return t=t||{},new Promise(function(r){var a=this;if(D.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s,o=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,t),c=HD(HD({},t),{},{adTag:u,tnl_ad_pos:o});this.adCounter[o]=this.adCounter[o]||0,this.adCounter[o]++;var l=e.dp,h=e.hl;this.current_dp=l,l&&!u.bidder&&(l.adtag_url=u.url);var f=this._isVMAP(o);(function(){D.default(this,a),t.shouldFail&&(l?(l.adtag_url="dp_original_broken",l.fallback_url="dp_fallback_broken"):u.url="original_broken",null==l||l.adtag_url,null==l||l.fallback_url,u.url)}).bind(this);var p=this._getExternalVast(null===(s=t)||void 0===s?void 0:s.adType);if(p)d.adTagUrl=p;else if(f){var m=function(e){for(var t=[],n="",r=Date.now(),a={ppos:1,lip:!0,vad_type:"linear"},i=0;i<e.length;i++){var s=new O.default(e[i].adtag.url,!0);s.query=bD(bD({},s.query),{},{ad_rule:0,vpos:e[i].positon,pod:1,correlator:0===i?r:++r,output:"xml_vast3"}),i<e.length-1&&(s.query=bD(bD({},s.query),a)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var u,c,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(yD({id:o++,adtag_url:t[d-1],error_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.error_url,impression_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.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:l,adtag:u,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));d.adsResponse=m}else if(l&&h.bidFloorApplied){l.adtag_url||(l.adtag_url=u.url);var A=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(l);d.adsResponse=A}else if(l&&l.fallback_url){var g=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()}(l);d.adsResponse=g}else d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(t.autoplayAllowed),d.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(d,c);try{this._broadcast("AD_SDK_REQUEST",{message:c})}catch(e){}r(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=jD.exist(this.gameData)&&jD.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:(P=x.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;D.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome"),F.default.video({inline:!0,muted:!1}).then(function(t){D.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return P.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(S=x.default(R.default.mark((function e(){var t;return R.default.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 S.apply(this,arguments)})},{key:"startAd",value:(E=x.default(R.default.mark((function e(t){var n,r,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.adType,i=t.params,this.adType_=r,this.isAudioAd=!1,this.adContext=HD(HD({},i),{},{adType:r}),null!==(n=this.gameData.adspn)&&void 0!==n&&n.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new ND,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==i?void 0:i.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(i,r));case 7:if("adsense"!==(null==i?void 0:i.adapter)){e.next=31;break}if(r!==a.AdType.Interstitial){e.next=24;break}if("preroll"!==(null==i?void 0:i.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 13:if("start"!==(null==i?void 0:i.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 17:if("next"!==(null==i?void 0:i.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 22:e.next=29;break;case 24:if(r!==a.AdType.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 28:throw new Error("Unsupported ad type");case 29:e.next=44;break;case 31:if(!["ima","spil","audio"].some(function(e){return D.default(this,s),e===(null==i?void 0:i.adapter)}.bind(this))){e.next=42;break}if(r!==a.AdType.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(i));case 37:if(r!==a.AdType.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(i));case 41:throw new Error("Unsupported ad type");case 42:["opus"].some(function(e){return D.default(this,s),e===(null==i?void 0:i.adapter)}.bind(this))&&this._startOpusAd(i);case 44:case"end":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:"_startOpusAd",value:(k=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,A,g=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.adTypeFound="rewarded"===t.adTypeFound?"reward":t.adTypeFound,r=t.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=9;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error",reason:"request-running"}),this._send_atom_event("opus-ad.already-running"),e.abrupt("return");case 9:if(a=null===(n=window.gdlocus)||void 0===n?void 0:n.adBreak){e.next=14;break}return this._send_atom_event("opus-ad.not-initialized"),this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error",reason:"opus-not-found"}),e.abrupt("return");case 14:this._send_atom_event("opus-ad.ready"),i=void function(){return D.default(this,g),!0}.bind(this),this.requestRunning=!0,s=this.gameData,o=s.gameId,d=s.slug,u=s.title,c={assetId:o,slug:d,title:u,debug:i},l=function(e){D.default(this,g),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),h=function(e){D.default(this,g),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),f=function(){D.default(this,g),this.opusEventReceived=!0}.bind(this),p=function(){D.default(this,g),this.opusEventReceived=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),m=function(e){D.default(this,g),this.opusEventReceived=!0,this.resetForNext();var t="".concat(r);this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):this._broadcast("AD_ERROR",{message:e.errorMessage,errorType:e.errorType,status:e.breakStatus,reason:"opus-error"})}.bind(this),console.log("opus-ad meta",c),A={type:r,meta:c,beforeAd:l,afterAd:h,adBreakDone:m},"reward"===r&&(A=HD(HD({},A),{},{adDismissed:f,adViewed:p})),this.opusEventReceived=!1,this._startTimeoutForOpus(),a&&a(A);case 31:case"end":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:"preloadAd",value:(w=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==a.AdType.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==a.AdType.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 w.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,t=function(){D.default(this,e),this.adsManager.resume()}.bind(this),n=function(){D.default(this,e),this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!1),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._hideSkipButton(),this.cancel()}.bind(this);try{this.adResume=new lD(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new hD(this.adContainer,t),this.rewardedLabel.add(),this.skipAdButton=new fD(this.adContainer,t,n),this.skipAdButton.add(),this.audioAdLabel=new pD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(_=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(r,i){var s,o,d,u,c,l,h,f,p,m=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{(o=t?t.containerId:null)||i("Container id is not specified"),d=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),u=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(u)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),d.appendChild(l)),(h=document.createElement("div")).id=u,h.classList.add("gd__banner"),d.appendChild(h)),n.atom_display=null,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:p,callback:function(e){D.default(this,m),JSON.stringify(e,null,2)}.bind(this)}),r()}catch(e){console.log("display_test error",e),i(e.message||e)}case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return _.apply(this,arguments)})},{key:"_startInterstitialAd",value:(y=x.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.default.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(D.default(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 r=e.sent,e.next=13,this._loadInterstitialAd(HD(HD({},r),t));case 13:if(a=e.sent,i=a.success,a.args,i){e.next=18;break}return e.abrupt("return");case 18:null!==(n=this.adContext)&&void 0!==n&&n.muteRequested?this.adsManager.setVolume(0):(r.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(s=this.gameData.advlm)||void 0===s?void 0:s.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return y.apply(this,arguments)})},{key:"_startPromo",value:(b=x.default(R.default.mark((function e(t,n){var r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return a=e.sent,e.next=11,this._loadPromo(HD(HD({},a),t),n);case 11:if(i=e.sent,s=i.success,i.args,s){e.next=16;break}return e.abrupt("return");case 16:null!==(r=this.adContext)&&void 0!==r&&r.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(o=this.gameData.advlm)||void 0===o?void 0:o.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return b.apply(this,arguments)})},{key:"_loadPromo",value:(v=x.default(R.default.mark((function e(t,n){var r,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,r=this.nextAdPosition(n),i=this._create_promo_context(r),this._requestPromo(i,HD({adType:a.AdType.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 v.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(A=x.default(R.default.mark((function e(t){var n;return R.default.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(a.AdType.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,HD({adType:a.AdType.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 A.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;D.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;D.default(this,r),setTimeout(function(){D.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;D.default(this,r),setTimeout(function(){D.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,a),this.eventBus.subscribe("AD_SDK_CANCELED",s,a),this.eventBus.subscribe("AD_ERROR",s,a)}.bind(this))}},{key:"_startRewardedAd",value:(m=x.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.default.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(D.default(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 r=e.sent,e.next=13,this._loadRewardedAd(HD(HD({},r),t));case 13:if(a=e.sent,i=a.success,a.args,i){e.next=18;break}return e.abrupt("return");case 18:null!==(n=this.adContext)&&void 0!==n&&n.muteRequested?this.adsManager.setVolume(0):(r.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(s=this.gameData.advlm)||void 0===s?void 0:s.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return m.apply(this,arguments)})},{key:"_loadRewardedAd",value:(p=x.default(R.default.mark((function e(t){var n;return R.default.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(a.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,HD({adType:a.AdType.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 p.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(f=x.default(R.default.mark((function e(){return R.default.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(a.AdType.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 f.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(h=x.default(R.default.mark((function e(){return R.default.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(a.AdType.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 h.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 t=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var n=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var r=this._adrequest_user_context.t4RResult?this._adrequest_user_context.t4RResult:this._isT4R(e);this._adrequest_user_context.t4RResult=r;var a=r.success,i=r.reason,s=this._getT4ROptions(e);if("loaded"===n){var o,d,u=(null===(o=this._adrequest_user_context)||void 0===o||null===(d=o.adTag)||void 0===d?void 0:d.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:u}),a||this._broadcast("AD_T4R_NONE",{reason:i}),this.activeAdContainer.style.opacity=a?.001:1,a&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new mD(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){var e;D.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(e=this.adContext)&&void 0!==e&&e.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==s?void 0:s.min)||1234)+Math.random()*((null==s?void 0:s.max)||3210))}else if("click"===n||"first_quartile"===n){var c;if(a&&"click"===n){var l,h=null===(l=this._adrequest_user_context)||void 0===l?void 0:l.tnl_ad_pos;this.clickCount[h]++,this._broadcast("AD_T4R_CLICK")}a||"click"!==n||this._broadcast("AD_CLICK"),this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(c=this.adContext)&&void 0!==c&&c.muteRequested?0:1)}}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=a.Layers.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 n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var i=function(){D.default(this,e);var t=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:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",i),window.document.addEventListener("DOMContentLoaded",i)}},{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 t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),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(){D.default(this,t),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 r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n,r,i,s=this,o=new Date,d=o.getHours(),u=o.getDate(),c=o.getMonth(),l=o.getFullYear(),h=a.getKeyByValue(google.ima.AdEvent.Type,e.type),f=!1,p=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",m=!p.startsWith("image")&&!p.startsWith("text"),A=null==e||null===(n=e.ad)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.title,g=null==e||null===(i=e.getAd())||void 0===i?void 0:i.data.skippable;this._sendIMAEventsToHB(e);var v=document.getElementById("game"),b="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:b="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:b="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(f=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,b="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:b="Fired when the ad is clicked.";var y=e.getAd().getContentType();this._show({mode:"click",contentType:y}),OD();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),f=this._is_completed(e.getAd()),b="Fired when the ad completes playing.",this.adType_!==a.AdType.Rewarded||this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0);break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(v.style.display="none"),this.contentPaused=!0,b="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"),b="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?f=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide(),this._clearTimeoutForSkipAddButton();break;case google.ima.AdEvent.Type.DURATION_CHANGE:b="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:b="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:b="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:b="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:b="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();b=w,this._show({mode:"loaded",contentType:w});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(b=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:b="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==A&&this.adResume.show(),b="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:b="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:b="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:f=this._is_completed(e.getAd()),b="Fired when the ad is skipped by the user.",ID(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var k;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===a.AdType.Rewarded)!g&&null!==(k=this.gameData.rwskp)&&void 0!==k&&k.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){D.default(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4)),this.rewardedLabel.show();this._hideAddResume(),b="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:b="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:f=this._is_completed(e.getAd()),b="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:b="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:b="Fired when the ad volume has been muted."}if(""!==h&&""!==b){var E=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,x=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;E||x||this.isAudioAd||this._broadcast(h,{name:h,message:b,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(d," d").concat(u," m").concat(c," y").concat(l)}})}if(f&&!this.adSuccess){this.adSuccess=!0;var S=e.getAd(),R="Rainbow"===(null==S?void 0:S.getAdSystem())&&(null==S?void 0:S.getWrapperAdIds().some(function(e){return D.default(this,s),"promo"===e}.bind(this)));null==S||S.getAdSystem(),null==S||S.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:R}),this.resetForNext(e)}}},{key:"_clearTimeoutForSkipAddButton",value:function(){this._skipAdButtonTimeout&&(clearTimeout(this._skipAdButtonTimeout),this._skipAdButtonTimeout=null)}},{key:"_run_atom_tag_aws_test",value:function(e){var t=this;try{var n,r,a,i,s;if(!((null===(n=this.gameData)||void 0===n||null===(r=n.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(a=this.gameData)||void 0===a||null===(i=a.aws_tst)||void 0===i||null===(s=i.ep)||void 0===s?void 0:s.atm)))return;var o=e.type,d=e.url;if("none"===o||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){D.default(this,t)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,t){var n=this,r={type:"none"};try{var a=this.current_dp,i=a.id,s=a.error_url,o=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!t)return r={type:"imp_err",url:s};var c=e.getWrapperAdIds().some(function(e){return D.default(this,n),e==="".concat(i)}.bind(this)),l=e.getWrapperAdIds().some(function(e){return D.default(this,n),"fallback"===e}.bind(this)),h=e.getWrapperAdIds().some(function(e){return D.default(this,n),"promo"===e}.bind(this));c&&t?r={type:"normal_imp",url:o}:c&&!t?r={type:"normal_err",url:s}:h&&t?r={type:"promo_imp",url:u}:l&&t&&(r={type:"fallbacj_imp",url:d})}catch(e){}return r}},{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(),a=this._getInnerErrorCode(n);QD.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}}),this._hideAddResume(),this._clearTimeoutForSkipAddButton()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideAdSpinner",value:function(){try{var e;null!==(e=this.gameData.adspn)&&void 0!==e&&e.enabled&&this.adFlowProcessSpinner&&this.adFlowProcessSpinner.hide()}catch(e){console.log("Error on hide adSpinner",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===a.AdType.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===a.AdType.Rewarded&&this.skipAdButton&&this.skipAdButton.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){D.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.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(AD(e.getInnerError)){var t=e.getInnerError();if(t)return AD(t.getErrorCode)&&AD(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,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(D.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];g.isPlainObject(i)&&(r.query[a]=j.default.stringify(i))}var s=new O.default(r.url,!0);return G.default(s.query,r.query||{}),HD({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new O.default(e.url,!0);if(i.query.cust_params){var s=j.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&g.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&g.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M.default(a),g.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=j.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return D.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,G.default(i,u),i.cust_params=j.default.stringify(i.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var t,n,r,a,i=(null===(t=this._adrequest_user_context)||void 0===t||null===(n=t.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:i}),this._adrequest_user_context,'bidder:"'.concat(i,'"');var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(t){return D.default(this,e),t===i}.bind(this)):s.length>0&&(d=s.some(function(t){return D.default(this,e),t===i}.bind(this))),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n,r,a=this._isExcludedBidderForT4R(),i=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,s=null!=i&&i.enabled?(null==i?void 0:i.rate)||.8:0,o=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx",d=Math.random();return a||"adx"!==o&&d<s}},{key:"_isT4R",value:function(e){var t,n,r,a,i,s,o;if(!this.gameData.publishedAt)return{success:!1,reason:"pdate-2"};var d=new Date(this.gameData.publishedAt);if(((new Date).getTime()-d.getTime())/864e5<=10)return{success:!1,reason:"pdate-1"};var u=this.gameData.meta,c=e.t4r.meta;if((null==u||null===(t=u.ast)||void 0===t?void 0:t.c)>=(null==c||null===(n=c.ast)||void 0===n?void 0:n.c)&&(null==u||null===(r=u.sit)||void 0===r?void 0:r.c)>=(null==c||null===(a=c.sit)||void 0===a?void 0:a.c))return{success:!1,reason:"meta"};var l=this._isExcludedBidderForT4RWithBidderExcRate();if(console.log("zxcv isExcludedBidderForT4R",l),l)return this.msgrt.send("bidder.ex",{message:"true"}),{success:!1,reason:"bidder"};this.msgrt.send("bidder.ex",{message:"false"});var h=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos;if(this.clickCount[h]>=(null===(s=e.t4r[h])||void 0===s?void 0:s.count))return{success:!1,reason:"click-count"};if(null!=e&&null!==(o=e.contentType)&&void 0!==o&&o.startsWith("image/")||"text"===(null==e?void 0:e.contentType)){var f,p=h&&(null===(f=e.t4r[h])||void 0===f?void 0:f.enabled);return{success:p,reason:p?null:"rule-check"}}if(null!=e&&e.contentType.startsWith("video/")){var m,A=(null===(m=e.t4r[h])||void 0===m?void 0:m.viper)||0;if(A>0){var g,v=Math.random()<A,b=h&&v&&(null===(g=e.t4r[h])||void 0===g?void 0:g.enabled);return{success:b,reason:b?null:"viper-check"}}return{success:!1,reason:"rule-check-viper"}}return{success:!1,reason:"media-format"}}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;if(!e)return!1;var A="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===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.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===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!A)return!1;var g=this._get_vmap_config(e),v=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?v>=(null==g?void 0:g.start):A}},{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,a=e.dp,i=r.count||2,s=[],o=1;o<=i;o++){var d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:a,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,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===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.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(t){var n=this;D.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new cD(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(u.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return D.default(this,n),e.json()}.bind(this)).then(function(e){if(D.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();var r=e.p/100;this.msgrt.send("dp.fp",{message:r}),t({params:{fp:r},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){D.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var t,n=this,r={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(r).map(function(e){return D.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(u.Base64.encode(JSON.stringify(r)));var i=null===(t=this.gameData.promo)||void 0===t?void 0:t.rainbow,s=null==i?void 0:i.enabled,o="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=s?o:void 0;return function(){D.default(this,n),ls.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=x.default(R.default.mark((function r(a){var i,s,o,d,c,l=this;return R.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new cD(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(u.Base64.encode(JSON.stringify(s))),null==t||t.adapterIndex,null==t||t.isLastAdapter,c=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,!1,null==c||c.enabled,null==t||t.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return D.default(this,l),e.json()}.bind(this)).then(function(e){if(D.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;n.msgrt.send("dp.fp",{message:t}),a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){D.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=20;break;case 16:r.prev=16,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 20:case"end":return r.stop()}}),r,this,[[0,16]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new O.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=j.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=j.default.stringify(a,!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 a,i=new O.default(e.url,!0);if(null===(a=i.query)||void 0===a||!a.cust_params)return;var s=j.default.parse(i.query.cust_params);s.bfa=r,s.adsense=0,i.query.cust_params=j.default.stringify(s,!1),e.url=i.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(l=x.default(R.default.mark((function e(t){var n,r,i,s,o,d,u,c,l=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],i=function(){return D.default(this,l),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:i},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||[],(s=new URL(r)).searchParams.append("referer",window.idhb.options.configUrl),r=s.href,e.next=13,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return D.default(this,l),window.idhb.requestAds}.bind(this)});case 13:o=a.getQueryString("ch",window.location.href),d=a.getQueryString("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},o&&(u.channel=o),d&&(u.ch_date=d),(c=a.getQueryString("hl_label",this.parentURL)||a.getQueryString("hl_label",window.location.href))&&(u.label=c),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;D.default(this,l);try{var n,r,a=e.slotId.split("@");a=1===a.length?a[0]:a[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){D.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(null!==(r=this.atom_display)&&void 0!==r&&r.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){D.default(this,t)}.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 l.apply(this,arguments)})},{key:"_init_ima_script",value:(c=x.default(R.default.mark((function e(t){var n,r,i=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["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"],r=this.options.debug?n[0]:n[1],e.next=4,a.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return D.default(this,i),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=x.default(R.default.mark((function e(t){var n,r,i,s,o=this;return R.default.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(s={}).crossorigin="anonymous",s["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",s["data-ad-frequency-hint"]="30s",s.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(s["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(s["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(s["data-adbreak-test"]="on"),e.next=15,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return D.default(this,o),!!window.adsbygoogle}.bind(this),attrs:s});case 15:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 17:case"end":return e.stop()}}),e,this)}))),function(e){return 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",a=n||!0,i=document.getElementsByClassName("adsbygoogle"),s=0;s<i.length;s++){var o,d=i[s],u=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);u&&"IFRAME"===u.tagName&&u.style.height!==r&&(u.style.height=r,a&&(u.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.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(D.default(this,c),ls.fictionalAdSenseError||t.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"),n=!1,r=function(){D.default(this,c),n=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){D.default(this,c),n=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),i=function(){D.default(this,c),n=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),s=function(){D.default(this,c),n=!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),o=function(e){D.default(this,c),n=!0,e()}.bind(this),d=function(e){D.default(this,c),n=!0,this.resetForNext();var t="rewarded";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"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),u=function(e){window.adsbygoogle.push(e)},setTimeout(function(){D.default(this,c),n||(us("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),u({type:"reward",name:"reward-in-game",beforeAd:r,afterAd:a,adDismissed:i,adViewed:s,beforeReward:o,adBreakDone:d}),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=x.default(R.default.mark((function e(t){var n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.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(D.default(this,a),ls.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),this.adPlacementEventReceived=!1,n=function(){D.default(this,a),this.adPlacementEventReceived=!0}.bind(this),r=function(e){D.default(this,a),this.adPlacementEventReceived=!0,this.resetForNext();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),i={type:"preroll",beforeAd:n,adBreakDone:r},window.adsbygoogle.push(i),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var i}),e,this,[[1,18]])}))),function(e){return s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(i=x.default(R.default.mark((function e(t){var n,r,a,i=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.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(D.default(this,i),ls.fictionalAdSenseError||t.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"),n=function(){D.default(this,i),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){D.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){D.default(this,i),this.adPlacementEventReceived=!0,this.resetForNext();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),s={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var s}),e,this,[[1,19]])}))),function(e){return i.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var t,n,r,a,i,s,o=this;if(null===(t=this.gameData)||void 0===t||null===(n=t.ad_blcks)||void 0===n||null===(r=n.adsenseTimeout)||void 0===r?void 0:r.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(i=a.ad_blcks)||void 0===i||null===(s=i.adsenseTimeout)||void 0===s||s.timeout;var d=setTimeout(function(){D.default(this,o),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(d)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,t=setTimeout(function(){D.default(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"opus-sdk-timeout",status:"error",reason:"forced-sdk-timeout"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(t)}.bind(this),8e3)}},{key:"_startAdsensePlacementNext",value:(r=x.default(R.default.mark((function e(t){var n,r,a,i=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.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(D.default(this,i),ls.fictionalAdSenseError||t.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"),n=function(){D.default(this,i),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){D.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){D.default(this,i),this.adPlacementEventReceived=!0,this.resetForNext();var t="midroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"midroll"}),s={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var s}),e,this,[[1,19]])}))),function(e){return r.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={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:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(i)))))}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 S_).get();return n=HD(HD({},n),r),n=t?HD(HD({},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===a.AdType.Rewarded)t="reward";else if(n===a.AdType.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,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return D.default(this,n),t===e}.bind(this))&&(r=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,HD(HD({},t),{},{skipForward:r,adPosition:a}))}},{key:"mute",value:(n=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adContext&&(this.adContext.muteRequested=!0),this.adsManager&&this.adsManager.setVolume(0);case 2:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"terminate",value:(t=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cancel();case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),WD=T.default((function e(t){var n=this;C.default(this,e),I.default(this,"load",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jg(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),I.default(this,"promo",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Kg(this.moduleName,this.moduleConfig)})),KD=T.default((function e(t){var n=this;C.default(this,e),I.default(this,"load",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jg(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),I.default(this,"splash",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Kg(this.moduleName,this.moduleConfig)})),YD=function(e,t){console.log(e,t)},JD={},ZD={},XD=null;function $D(){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 JD.version=r,JD.frame=e,JD.function=n,JD.version}function eS(e){var t=this;return XD||(XD=new Promise(function(n){function r(t,r){if(YD("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:JD,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}D.default(this,t),$D(),JD.frame?2===JD.version?(YD("TCF v2 CMP found. Fetching the consent."),JD.function?(YD("CMP API is directly accessible, calling it now..."),JD.function("addEventListener",JD.version,r)):(YD("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(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!==ZD[r.callId]&&ZD[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){D.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=I.default({},d,{command:e,parameter:s,callId:o,version:n});ZD[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,JD.version,n)}("addEventListener",JD.frame,r))):n({result:"cmpVersionNotV2",cmp:JD}):n({result:"cmpNotFound"})}.bind(this)),XD)}var tS=new(function(){function e(){C.default(this,e),this.productName="Game Distribution"}var t;return T.default(e,[{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:(t=x.default(R.default.mark((function e(t,n){var r,a,i,s,o,d,u;return R.default.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(i=null==t||null===(r=t.visitor)||void 0===r||null===(a=r.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(i),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,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),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,n){return t.apply(this,arguments)})}]),e}());function nS(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 rS(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 rS(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function rS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var aS=function(e){var t=this,n=e.src,r=e.attributes,a=e.target,i=e.isAsync;return new Promise(function(e,s){var o=this;D.default(this,t);try{var d=document.createElement("script");if(d.async=null==i||i,d.type="text/javascript",d.onload=function(){D.default(this,o),e()}.bind(this),d.onerror=function(){D.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),d.src=n,r){var u,c=nS(r);try{for(c.s();!(u=c.n()).done;){var l=u.value,h=l.key,f=l.value;d.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},iS="ffd4774b-99ae-4464-8f40-3afa12b4692e",sS=function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,aS({src:"https://cdn.cookielaw.org/consent/tcf.stub.js",attributes:[{key:"id",value:"gd-cookie-pro-tcf-stub"},{key:"charset",value:"UTF-8"}],isAsync:!1});case 3:return e.next=5,aS({src:"https://cdn.cookielaw.org/consent/".concat(iS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,aS({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:iS}],isAsync:!1});case 7:n=void 0,r=void 0,a=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(a=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(a),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,a}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),oS=new m.EventEmitter,dS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},uS=!1;function cS(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 t=this,n=e.data,r=e.origin,a=n.type;if(Object.keys(dS).some(function(e){return D.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=!n.type||!n.type.startsWith("gd-sdk")&&!("parent-data-response"===n.type)||"sg-game-event"===n.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 a="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)&&(uS=!0),a&&uS&&(uS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(n);var s=function(){D.default(this,t);try{var n,r;return null==e||null===(n=e.source)||void 0===n||null===(r=n.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&i){if("https://html5.gamedistribution.com"===r){var o=s();if(!o)return;var d=o&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return D.default(this,t),o.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return D.default(this,t),e===(null==n?void 0:n.type)}.bind(this));if(!d&&!u)return}var c=n.eventName,l=n.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==c&&"levelFinish"!==c||window.mpHelper.sendStat("level",l.level),"levelFinish"===c&&window.mpHelper.sendStat("score",l.score)),window.parent.postMessage(n,"*")}if(a){var h=dS[r][a];h&&oS.emit(h,n)}}}),!1);var lS="__msgr",hS=y.v4(),fS=function(e){var t=this;if(!window[lS]){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name=lS,document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:hS,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){AS(r)},setInterval(function(){D.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",AS(r)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){D.default(this,t);try{var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cS(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=hS,AS(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},pS=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=mS(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},mS=function e(t){try{var n,r,a=null==t?void 0:t.parent;if("game"===(null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return a;e(a)}catch(e){return t}},AS=function(e){try{window[lS]&&window[lS].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},gS=function(){function e(t){C.default(this,e),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=t.adRequest,this._gameData=t._gameData,this._msgrt=t._msgrt,this._adInstance=t._adInstance,this._eventBus=t._eventBus,this.blockedAdsMap=t._blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t._onResumeGame.bind(t),this._onPauseGame=t._onPauseGame.bind(t),this._onRewardedWatchComplete=t._onRewardedWatchComplete.bind(t),this._onAdError=t._onAdError.bind(t),this._promoShowSuccess=!1}var t,n,r;return T.default(e,[{key:"run",value:function(e){var t=e.duration,n=this;return new Promise(function(){var e=x.default(R.default.mark((function e(r,a){var i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.add();case 3:i=n.show(),setTimeout(function(){D.default(this,s);try{n.hide(),r({success:i})}catch(e){a(e)}}.bind(this),1e3*t),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(t,n){return e.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:(r=x.default(R.default.mark((function e(){var t,n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetch_promo();case 3:this.promo_data=e.sent,t=document.createElement("div"),this.promo=t,n=this.promo_data,this.promo.addEventListener("click",function(){var e=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(n),a.track_click(n.click_tracking),window.open(n.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(r=document.createElement("iframe")).src=this.promo_data.renderer_url,r.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),r.classList.add("gd__promo__iframe"),this.promo.appendChild(r),this.adContainer.appendChild(this.promo),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return r.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:(n=x.default(R.default.mark((function e(){var t,n=this;return R.default.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 D.default(this,n),e.json()}.bind(this));case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"track_click",value:(t=x.default(R.default.mark((function e(t){return R.default.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 t.apply(this,arguments)})}]),e}(),vS=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GD",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ObjectStore";C.default(this,e),this.dbName=t,this.storeName=n,this.db=null,this.init()}var t,n,r,a;return T.default(e,[{key:"init",value:function(){var e=this;return new Promise(function(t,n){var r=this;D.default(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){D.default(this,r),console.error("Database error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(e){D.default(this,r),this.db=e.target.result,t(this.db)}.bind(this),a.onupgradeneeded=function(e){D.default(this,r);var t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName,{keyPath:"key"})}.bind(this)}.bind(this))}},{key:"getItem",value:(a=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;D.default(this,n);var i=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(t);i.onerror=function(e){D.default(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){D.default(this,a),i.result?e(i.result.value):e(null)}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setItem",value:(r=x.default(R.default.mark((function e(t,n){var r=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,a){var i=this;D.default(this,r);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:t,value:n});s.onerror=function(e){D.default(this,i),console.error("Set item error:",e.target.error),a(e.target.error)}.bind(this),s.onsuccess=function(t){D.default(this,i),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"removeItem",value:(n=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;D.default(this,n);var i=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(t);i.onerror=function(e){D.default(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){D.default(this,a),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"clear",value:(t=x.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,n){var r=this;D.default(this,t);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){D.default(this,r),console.error("Clear store error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(t){D.default(this,r),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),bS=function(){function e(t){var n=t.mode;C.default(this,e),this.setItem=function(){var e=x.default(R.default.mark((function e(t,n){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.getItem=function(){var e=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),"indexed-db"===n?(this.indexedStore=new vS,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===n&&(this.setItem=function(){var e=x.default(R.default.mark((function e(t,n){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.Ls.set(t,n));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.getItem=function(){var e=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.Ls.getString(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}var t,n;return T.default(e,[{key:"set",value:(n=x.default(R.default.mark((function e(t,n){var r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=JSON.stringify(n),e.next=3,this.setItem(t,r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"get",value:(t=x.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItem(t);case 2:return n=e.sent,e.abrupt("return",n?JSON.parse(n):null);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}();function yS(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?yS(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wS,kS="_gd_vs";function ES(e){return xS.apply(this,arguments)}function xS(){return xS=x.default(R.default.mark((function e(t){var n,r,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,r=t.serverDate,s=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,RS({gameId:n,serverDate:r});case 6:i=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),cs("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(i||!a.Ls.available){e.next=24;break}return e.prev=14,e.next=17,DS({gameId:n,serverDate:r});case 17:i=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),cs("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",_S(_S({},i),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),xS.apply(this,arguments)}function DS(e){return SS.apply(this,arguments)}function SS(){return SS=x.default(R.default.mark((function e(t){var n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new bS({mode:a="local-storage"}),e.next=5,i.get(kS);case 5:return(s=e.sent)||(s={gids:{}}),s.gids[n]||(s.gids[n]={fv:r,vc:0}),(o=s.gids[n]).vc++,o.lv=r,e.next=13,i.set(kS,s);case 13:return e.abrupt("return",{visit:o,mode:a});case 14:case"end":return e.stop()}}),e)}))),SS.apply(this,arguments)}function RS(e){return TS.apply(this,arguments)}function TS(){return TS=x.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new bS({mode:a="indexed-db"}),e.next=5,i.get(n);case 5:return(s=e.sent)||(s={fv:r,vc:0}),s.vc++,s.lv=r,e.next=11,i.set(n,s);case 11:return e.abrupt("return",{visit:s,mode:a});case 12:case"end":return e.stop()}}),e)}))),TS.apply(this,arguments)}function CS(){return CS=x.default(R.default.mark((function e(t){var n,r,a,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.whichFrame,r=t.options,e.prev=1,a="gd-".concat(n),void 0,i=undefined,!("loader-frame"===n)){e.next=12;break}return e.next=9,IS({id:a,verbose:i,options:r});case 9:wS=e.sent,e.next=15;break;case 12:return e.next=14,PS({id:a,verbose:i,options:r});case 14:wS=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),cs("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),CS.apply(this,arguments)}function IS(e){return OS.apply(this,arguments)}function OS(){return OS=x.default(R.default.mark((function e(t){var n,r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.verbose,a=t.options,us("[GD-IS] create ISLoader"),e.next=4,q.default({id:n,verbose:r,router:!0});case 4:return(i=e.sent).on("connected",function(e){D.default(this,s),us("[GD-IS] connected",e)}.bind(this)),i.register({method:"whoami",handler:function(){return D.default(this,s),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return D.default(this,s),!0}.bind(this)}),i.register({method:"showAd",handler:function(){var e=x.default(R.default.mark((function e(t){var n,r,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.showAd?a.showAd:function(){var e=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r=t.adType,i=t.params,e.next=4,n(r,i);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),i.register({method:"registerOnEvents",handler:function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return us("[GD-IS] gd-game-frame registering for onEvents",{loc:window.location.href}),i.registerProxy({alias:"onEvent",method:"onEvent",service:"gd-game-frame"}),e.abrupt("return","[GD-IS] gd-game-frame registered for onEvents");case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=12,i.whoami();case 12:return e.sent,e.abrupt("return",i);case 15:case"end":return e.stop()}}),e,this)}))),OS.apply(this,arguments)}function PS(e){return BS.apply(this,arguments)}function BS(){return BS=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.verbose,a=t.options,us("[GD-IS] create ISGameFrame"),e.next=4,q.default({id:n,verbose:r,router:!1});case 4:return i=e.sent,s="gd-loader-frame",e.next=8,i.findRouter({where:{id:s}}).catch(function(e){D.default(this,c),cs("[GD-IS] Failed to find router",e)}.bind(this));case 8:if(o=e.sent){e.next=14;break}return cs("[GD-IS] Router not found for ".concat(s,"!")),e.abrupt("return");case 14:us("[GD-IS] Router found for ".concat(s));case 15:return e.next=17,i.connect(o).catch(function(e){D.default(this,c),cs("[GD-IS] Failed to connect to router",(null==e?void 0:e.message)||e)}.bind(this));case 17:return(d=e.sent)&&us("[GD-IS] connected",{result:d}),i.register({method:"whoami",handler:function(){return D.default(this,c),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"onEvent",handler:function(e){var t=this;D.default(this,c);var n=e.event;(a.onEvent||function(e){D.default(this,t)}.bind(this))(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return D.default(this,c),!1}.bind(this)}),i.registerProxy({alias:"whoIsLoader",method:"whoami"}),i.registerProxy({alias:"registerOnEvents",method:"registerOnEvents"}),i.registerProxy({alias:"showAd",method:"showAd"}),e.next=27,i.whoami();case 27:return e.sent,e.next=30,i.whoIsLoader();case 30:return e.sent,e.next=33,i.registerOnEvents();case 33:return u=e.sent,us(u),e.abrupt("return",i);case 38:case"end":return e.stop()}}),e,this)}))),BS.apply(this,arguments)}var LS=!1;function US(){var e=this;return new Promise(function(t,n){var r=this;D.default(this,e),(wS||LS)&&t(wS);var a=setInterval(function(){D.default(this,r),wS&&(LS=!0,clearInterval(a),t(wS))}.bind(this),100);setTimeout(function(){D.default(this,r),clearInterval(a),wS||(LS=!0,t("[GD-IS] No iSvcInstance found within ".concat(5," seconds")))}.bind(this),5e3)}.bind(this))}function MS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MS(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jS,GS,NS,qS=function(){var e=x.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js",t=["https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js"],e.next=4,a.getScript(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),HS=0,QS=!1,VS=function(){var e=x.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.args,r=t.onError,e.prev=1,!window.isForwarderFrame){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,US();case 7:if(!(a=e.sent)){e.next=18;break}return e.next=11,a.isLoader();case 11:if(!e.sent){e.next=16;break}a.register({method:"sendSocketEvent",handler:function(e){D.default(this,o),KS(e.topic,e.args)}.bind(this)}),e.next=18;break;case 16:return a.registerProxy({alias:"sendSocketEvent",method:"sendSocketEvent"}),e.abrupt("return");case 18:if(i=new O.default(window.location.href),!!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return D.default(this,o),e.toLowerCase()===i.host.toLowerCase()}.bind(this))){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,qS();case 26:GS=y.v4(),s={json:JSON.stringify(n)},"wss://ws.gamedistribution.com",(jS=io("wss://ws.gamedistribution.com",{query:s,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){D.default(this,o)}.bind(this)),jS.on("after-connect",function(){var e=x.default(R.default.mark((function e(t){var r,a,i,s,o,d;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return NS=NS||(null==t?void 0:t.serverDate),r=n.gameId,e.next=4,ES({gameId:r,serverDate:NS});case 4:a=e.sent,i=a.visit,s=a.mode,o=a.errors,n.visit=FS(FS({},i),{},{stm:s,errors:o}),d={json:JSON.stringify(n)},jS.emit("client-info",{clientId:GS,counter:HS++,serverDate:NS,query:d}),QS=!0;case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),jS.on("disconnect",function(e){D.default(this,o),QS=!1}.bind(this)),jS.connect(),e.next=39;break;case 36:e.prev=36,e.t0=e.catch(1),r&&r(e.t0);case 39:case"end":return e.stop()}}),e,this,[[1,36]])})));return function(t){return e.apply(this,arguments)}}(),zS=!1,WS=[];function KS(e,t){return YS.apply(this,arguments)}function YS(){return YS=x.default(R.default.mark((function e(t,n){var r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,US();case 2:if(!(r=e.sent)){e.next=11;break}return e.next=6,r.isLoader();case 6:if(e.sent){e.next=11;break}return e.next=10,r.sendSocketEvent({topic:t,args:n});case 10:return e.abrupt("return");case 11:if("play"!==t){e.next=15;break}if(!zS){e.next=14;break}return e.abrupt("return");case 14:zS=!0;case 15:a=function(e,t){D.default(this,s);try{var n={json:JSON.stringify(t||{})};jS.emit("socket-event",{topic:e,clientId:GS,counter:HS,serverDate:NS,query:n})}catch(e){cs("game-session: Error on sending socket-event",e.message)}}.bind(this),i=function(){D.default(this,s),a(t,n)}.bind(this),WS.push(i);case 19:case"end":return e.stop()}}),e,this)}))),YS.apply(this,arguments)}function JS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JS(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XS(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 $S(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 $S(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function $S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}setInterval((function(){if(0!==WS.length&&jS&&QS){for(var e=function(){var e=this,r=n[t];r(),WS=WS.filter(function(t){return D.default(this,e),t!==r}.bind(this))},t=0,n=N.default(WS);t<n.length;t++)e();WS.length}}),100);var eR,tR=function(){function e(t){var n=this;C.default(this,e),I.default(this,"_getAdTypeByAfgPosition",function(e){var t=this;D.default(this,n);var r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(r).find(function(n){var a=this;return D.default(this,t),r[n].some(function(t){return D.default(this,a),t===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),this._gameData=t._gameData,this._msgrt=t.msgrt,this._adInstance=t.adInstance,this._eventBus=t.eventBus,this.blockedAdsMap=t.blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t.onResumeGame.bind(t),this._onPauseGame=t.onPauseGame.bind(t),this._onRewardedWatchComplete=t.onRewardedWatchComplete.bind(t),this._onAdError=t.onAdError.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.bind(t),this._executeMidrollPlus=t._executeMidrollPlus.bind(t),this._runAutoResume=t._runAutoResume.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t),this.eventBus=new a.EventBus,this.isOpusReady=function(){return D.default(this,n),t.isOpusReady}.bind(this),this._muteRequested=!1,this._terminateRequested=!1}var t,n;return T.default(e,[{key:"runAdFlow",value:(n=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,A,g,v,b,y,_,w,k,E,x,S,T,C,O,P,B,L,U,M,F,j,G,N,q,H,Q,V,z,W,K,Y,J,Z,X,$,ee,te,ne,re,ae,ie=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,US();case 2:u=e.sent,c=u?u.isLoader():"loader-unknown",us("[GD-IS] runAdFlow",{isLoader:c,location:window.location.href}),this.adRequest=t,l=this._getAdTypeByAfgPosition(t),t.params.adTypeFound=l,t.params.position,(h=this._getAdFlow(l)).find(function(e){return D.default(this,ie),"opus"===e}.bind(this))&&!this.isOpusReady()&&(h=h.filter(function(e){return D.default(this,ie),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),f=this._gameData,p=f.afg_disabled,m=null===(n=t.params)||void 0===n?void 0:n.isGift,A=null===(r=t.params)||void 0===r?void 0:r.isMidrollPlus,null===(a=t.params)||void 0===a||a.position,g=null===(i=f.promo)||void 0===i?void 0:i.rainbow,v=(null==g?void 0:g.enabled)&&(null===(s=g.position)||void 0===s?void 0:s[l]),b=null==g?void 0:g.gift,y=v&&null!=g&&g.duration?null==g?void 0:g.duration:5,_=p?h.filter(function(e){return D.default(this,ie),"adsense"!==e}.bind(this)):h,w=this.get_ad_system_init_result(),k=w.afg,E=w.ima,x=null==f||null===(o=f.ad_blcks)||void 0===o||null===(d=o.removeOtherAdaptors)||void 0===d?void 0:d.enabled,this.anyAdBlocking=!k||!E,this.bothAdBlocking=!k&&!E,this.adsBlocked=x&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(us("gd-adflow adsBlocked so changing the flow"),_=[]):(k||(_=_.filter(function(e){return D.default(this,ie),"adsense"!==e}.bind(this))),E||(_=_.filter(function(e){return D.default(this,ie),"ima"!==e}.bind(this)))),S=!1,T=!1,C=[],O=0,P=!1,L={},U=XS(_),e.prev=38,U.s();case 40:if((M=U.n()).done){e.next=86;break}if(F=M.value,!this._terminateRequested){e.next=44;break}return e.abrupt("break",86);case 44:if(t.params.adapter=F,j=O===_.length-1,G=m&&b||!m,N=j&&v&&G,t.params=ZS(ZS({},t.params),{},{adapterIndex:O,isLastAdapter:j,shouldFail:!1,extraPromoRunOnFail:N,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==F){e.next=51;break}return e.abrupt("continue",84);case 51:return function(){D.default(this,ie),ls.firstSuccessOrder&&!isNaN(ls.firstSuccessOrder)&&(t.params.shouldFail=O<ls.firstSuccessOrder)}.bind(this),us("gd-adflow, before adInvoke",O,F,t.params.shouldFail),e.next=55,this.adInvoke(t);case 55:if(q=e.sent,H=q.success,Q=q.args,V=q.isSkipped,z=q.noVast,W=q.t4r,K=null==Q?void 0:Q.reason,Y=null==Q?void 0:Q.message,J=null==Q?void 0:Q.errorType,L[F]=L[F]||{req:0,imp:0,fail:0},L[F].req++,H?L[F].imp++:(L[F].fail++,L[F].failReason=K,L[F].failMessage=Y,L[F].failType=J),!H){e.next=75;break}return us("gd-adflow, adapter-result-success",O,F,Q,W),S=!0,T=!(null==Q||!Q.isPromoSuccess),B=W,e.abrupt("break",86);case 75:if(us("gd-adflow, adapter-result-failure",O,F,Q.message),O++,C.push(Q.message),!V){e.next=80;break}return e.abrupt("break",86);case 80:if(!z){e.next=83;break}return this._runAutoResume(),e.abrupt("break",86);case 83:P=N;case 84:e.next=40;break;case 86:e.next=91;break;case 88:e.prev=88,e.t0=e.catch(38),U.e(e.t0);case 91:return e.prev=91,U.f(),e.finish(91);case 94:if(!P){e.next=100;break}return e.next=97,new gS(this).run({duration:y});case 97:e.sent.success&&(T=!0);case 100:return function(){var e;D.default(this,ie),ls.disableGift&&null!==(e=f.gft)&&void 0!==e&&e[l].enabled&&(f.gft[l].enabled=!1)}.bind(this),Z=C.join(" /n"),S?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(l),"midroll"===l&&this._executeMidrollPlus()):(this._onResumeGame(Z,"warning"),this._giveGift(l),"midroll"===l&&this._executeMidrollPlus()),X="-1",$="none",S?(X="index_".concat(O),$=_[O]):T&&(X="promo",$="promo"),ee=this.get_session_id(),this.anyAdBlocking&&"-1"===X?(te="rewarded"===l?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[te]=this.blockedAdsMap[te]?this.blockedAdsMap[te]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(te)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!k,imaBlocked:!E,isGift:m,isMidrollPlus:A,adType:te,sessionId:ee,successAdapter:"none",adFlowIndex:X,adapterResults:L})):(ne={},I.default(ne,"adflow.all.index",{message:"".concat(X)}),I.default(ne,"adflow.all.success_adapter",{message:"".concat($)}),I.default(ne,"adflow.".concat(l,".index"),{message:"".concat(X)}),I.default(ne,"adflow.".concat(l,".success_adapter"),{message:"".concat($)}),re=ne,Object.keys(re).forEach(function(e){D.default(this,ie);var t=re[e];this._msgrt.send(e,t)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:X,successAdapter:$,adBlocker:!1,afgBlocked:!k,imaBlocked:!E,isGift:m,isMidrollPlus:A,adType:l,sessionId:ee,t4r:B,adapterResults:L}),KS("ad-session",{adSession:{adType:l,imp:"-1"!==X&&"promo"!==X,promo:"promo"===X,blocked:this.anyAdBlocking&&"-1"===X}})),ae={adType:l},this.eventBus.broadcast("AD_FLOW_COMPLETE",ae),e.abrupt("return",ae);case 115:case"end":return e.stop()}}),e,this,[[38,88,91,94]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",value:(t=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(r,a){var i,s,o,d,u=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),JSON.stringify(t),s={},o=function(e){D.default(this,u),JSON.stringify(t),n._eventBus.unsubscribeScope(i);var a="dismissed"===(null==e?void 0:e.message);r({success:!1,args:e,isSkipped:a,noVast:e.noVast})}.bind(this),d=function(e){D.default(this,u),JSON.stringify(t),n._eventBus.unsubscribeScope(i),r({success:!0,args:e,t4r:s})}.bind(this),n._eventBus.subscribe("AD_ERROR",o,i),n._eventBus.subscribe("AD_SDK_CANCELED",o,i),n._eventBus.subscribe("AD_SUCCESS",d,i),n._eventBus.subscribe("AD_T4R",function(){D.default(this,u),s.loaded=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_CLICK",function(){D.default(this,u),s.t4rClick=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_VIDEO",function(){D.default(this,u),s.t4rVideo=!0}.bind(this),i),n._eventBus.subscribe("AD_CLICK",function(){D.default(this,u),s.click=!0}.bind(this),i),n._eventBus.subscribe("AD_BIDDER",function(e){D.default(this,u),s.bidder=null==e?void 0:e.bidder}.bind(this),i),n._eventBus.subscribe("AD_T4R_NONE",function(e){D.default(this,u),s.fail_reason=null==e?void 0:e.reason}.bind(this),i),e.prev=14,e.next=17,n._adInstance.startAd(t);case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(14),cs("gd-adflow startAd error",e.t0),r({success:!1,err:e.t0});case 23:case"end":return e.stop()}}),e,this,[[14,19]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,d,u=this,c=void function(){if(D.default(this,u),ls.customAdFlow)return JSON.parse(ls.customAdFlow)}.bind(this),l=this._gameData.adflw;c&&(l=c);var h=null!==(t=l)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=l)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=l)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=l)||void 0===o||null===(d=o.adapters)||void 0===d?void 0:d[e]:h}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(t){D.default(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(t){D.default(this,e)}.bind(this)),this._setAdRequestTimer()}}]),e}(),nR=new m.EventEmitter,rR=["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 t=this,n=e.data,r=e.origin,a=e.source;if(rR.some(function(e){return D.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)eR=a,(window.parent||window).postMessage(n,"*"),nR.emit("aeria-event",n);else if(s){eR&&eR.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var aR="https://html5.gamedistribution.com",iR="parent-data-request",sR="parent-data-response",oR=function(){function e(){C.default(this,e)}var t;return T.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(D.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){D.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,a===aR&&s===iR){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:sR,value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=x.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;D.default(this,t);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===aR&&i===sR&&(e(s),a=!0)})),setTimeout(function(){D.default(this,r),a||e()}.bind(this),1e3);var i={type:iR};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),dR=new oR,uR={SDKExistsOnUpperFrame:!1};function cR(){return lR.apply(this,arguments)}function lR(){return(lR=x.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=["https://pm.azerioncircle.com/p/gd-blck-rmv/"],e.next=4,a.getScript(t[0],"blckrmv",{alternates:t});case 4:return n=window.GD_BLCK_RMV||{},console.log("new blocker",n),e.abrupt("return",n.AdBlockerPage);case 9:e.prev=9,e.t0=e.catch(0),console.log("new blcoker error => ",e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function hR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hR(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pR=function(){us("gtag: GA not initialized",arguments)};function mR(e){return AR.apply(this,arguments)}function AR(){return AR=x.default(R.default.mark((function e(t){var n,r,i,s,o,d,u,c,l,h,f,p,m=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.onError,r=t.args,s="gdSDKDataLayer",o="https://www.googletagmanager.com/gtag/js?id=".concat(i="G-PLRTBHGSEL","&l=").concat(s),d=[o],e.prev=5,e.next=8,a.getScript(d[0],"gdsdk_google_analytics",{alternates:d,error_prefix:"Blocked:",exists:function(){return D.default(this,m),window[s]}.bind(this)});case 8:return window[s]=window[s]||[],pR=function(){window[s].push(arguments)},pR("js",new Date),e.next=14,H.default();case 14:return u=e.sent,c=u.lookupIabConsent,l=u.getGoogleAdType,e.next=19,c();case 19:h=e.sent,f=l(h.consentData),p=fR(fR({},p=r||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:h.result,gdpr:"ok"===h.result?"object"===S.default(h.consentData)?!0===h.consentData.gdprApplies:"N/A":h.result,google_ads:null==f?void 0:f.type}),pR("config",i,p),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),cs("gtag: load GA error",e.t0),n&&n(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),AR.apply(this,arguments)}new O.default("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=3792570314314042&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&cust_params=hb_uuid%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_cache_id%3Dundefined%26tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26hb_cache_host%3Dprebid.adnxs.com%26hb_format%3Dvideo%26hb_size%3D0x0%26hb_pb%3D1.15%26hb_adid%3D259407b5792767%26hb_bidder%3Dimprovedigital%26hb_cache_host_improv%3Dprebid.adnxs.com%26hb_uuid_improvedigit%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_format_improvedig%3Dvideo%26hb_size_improvedigit%3D0x0%26hb_pb_improvedigital%3D1.15%26hb_adid_improvedigit%3D259407b5792767%26hb_bidder_improvedig%3Dimprovedigital%26tnl_wog%3D0%26gdGameId%3Daeac8455b2024f25abfa943ec96aa749%26tnl_content_category%3Dpuzzle%26adaptor_order%3D0%26pbct%3D2%26tnl_test%3Da%26fp%3D0.9%26fpt%3D99%26bfa%3D1%26adsense%3D0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&plcmt=1&vpmute=1&vpa=auto&sdkv=h.3.633.0&osd=2&frm=2&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=1&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&sdki=445&ptt=20&adk=2541783110&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&sid=E657451B-8F2F-4921-A55A-21D1A6F3C39E&nel=1&eid=44777649%2C44781409%2C44785452%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&ref=https%3A%2F%2Fwww.gry.pl%2F&top=https%3A%2F%2Fwww.gry.pl%2F&loc=https%3A%2F%2Fhtml5.gamedistribution.com%2Faeac8455b2024f25abfa943ec96aa749%2F%3Ftimestamp%3D1713336375%26countryCode%3Dpl%26siteid%3D88%26channelid%3D1%26siteLocale%3Dpl%26locale%3Dpl%26gd_sdk_referrer_url%3Dhttps%253A%252F%252Fwww.gry.pl%252Fgra%252Fkings-and-queens-match&dlt=1713336379046&idt=2621&dt=1713336390920&scor=3473667703821297&ged=ve4_td12_tt10_pd12_la2000_er0.0.156.300_vi0.0.600.510_vp100_eb24427",!0),new O.default("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=2275053868608838&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&vpa=auto&vpmute=0&plcmt=1&cust_params=tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26gd_opus%3D1%26fp%3D0.9%26gd_np%3D1%26bfa%3D1%26fpt%3D99%26tnl_wog%3D0&sdkv=h.3.633.0&osd=2&frm=0&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=0&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&sdki=445&ptt=20&adk=1748861338&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&media_url=blob%3Ahttps%253a%2F%2Fwww.gry.pl%2Ffa4fae4b-f435-43b4-9cee-af65696fe59e&sid=D3F4C4E1-4002-4BEE-A1F2-2638CD3B9197&a3p=EloKDWNyd2RjbnRybC5uZXQSQGE0MmZkMWJkNGI5MjgyOTY5NzUxNDUyYzVlNmUxNmQ1MzkzODYxY2E5Y2U2MGUzNjk3Y2ZlNTExMTQxYjFhZjgYucX8se4xSAASxgEKCHJ0YmhvdXNlEqwBWVNmZ3hFVno0OXBMOFI2c3ltSWtSdUFNdFg4d2Y0clBkdVMwTlVuLzZpUnhJZWh0cnRjVUtLSjFraHJDQWZERmp1N1pDNHJEc1lxMkduKzJFTFMxRmgzWlEzTUxaK0owbXZoTDR4UFlNc2JUbmlGNkczTWRaZjZQK3hEVVkwTU1FUlpkZzlKMjArcjlQNUtQOFBmWVhMaEkwRitGMUNhYUNwQS9aRVNNMVNnPRjBxfyx7jFIAFICCGoSGQoKdWlkYXBpLmNvbRjDz9ay7jFIAFICCGQSPgoFb3BlbngSLGV5SnBJam9pZEZoNU5XbDNSakZUT0ZjNVoxTlZRbFl5YWtRemR6MDlJbjA9GJ3I_LHuMUgA&nel=1&eid=44776494%2C44777649%2C44781409%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&top=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&loc=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&dt=1713336184147&cookie=ID%3Da17ef48e823e6627%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MY20KDMmAY5MP3sMYIZndoHFyvxhg&gpic=UID%3D00000d6b0028013d%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MZ7af9EvfEMcTpwOjK9LSfd-RfFCQ&scor=3968881391553945&ged=ve4_td21_tt0_pd21_la21000_er271.162.427.462_vi0.0.873.1064_vp100_eb24171",!0);var gR=function(e){var t=this,n=e.handler,r=e.timeout,a=e.interval,i=n||function(){return D.default(this,t),!0}.bind(this),s=r||1e3,o=a||10;return new Promise(function(e,r){var a=this;if(D.default(this,t),n())e(!0);else{var d=!1,u=setInterval(function(){D.default(this,a);try{i()&&(clearInterval(u),d=!0,e(!0))}catch(t){clearInterval(u),e(!1)}}.bind(this),o);setTimeout(function(){D.default(this,a),clearInterval(u),d||e(!1)}.bind(this),s)}}.bind(this))};function vR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vR(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yR(e){var t=e.gameData,n=e.msgrt,r=e.topDomain,a=e.parentDomain,i=e.parentURL;return{send_atom_event:function(e,s){if(function(e){var n=this,r=t.dbglg;return(null==r?void 0:r.enabled)&&r.topics&&r.topics.some(function(t){return D.default(this,n),t===e}.bind(this))}(e)){var o={gid:t.slug,md5:t.gameId,pid:0,pnm:t.pname,ctry:t.ctry,lcl:"en",hle:1,ads:1,args:s,href:window.location.href},d=(new S_).get();return o=bR(bR({},o),d),function(e,t){try{var s=n._layout,o=n._ua,d={tp:e,ct:0,vrs:ss.version,url:i,rfr:document.referrer,tdmn:r||a,dpth:0,args:t,ua:{brnm:o.browser.name,brvs:o.browser.version,osnm:o.os.name,osvs:o.os.version,dvmd:o.device.model,w:s.w,h:s.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(d)))))}catch(e){}}(e,o=s?bR(bR({},o),s):o)}}}}function _R(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 wR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_R(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kR=y.v4(),ER=null,xR=null,DR=function(){function e(t){var n,r,a,i,s=this;if(C.default(this,e),I.default(this,"_whichFrameV2",function(){var e=this;D.default(this,s);var t=O.default(window.location.href,!0),n=t.host,r=t.query,a="html5.gamedistribution.com"!==n,i=function(t){return D.default(this,e),"revision.gamedistribution.com"===t||"uncached-html5.gamedistribution.com"===t}.bind(this),o=i(n);null!=r&&r.gd_sdk_referrer_url&&(o=i(O.default(r.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||o?"loader-frame":"game-frame"}.bind(this)),ER)return ER;ER=this,this.isOpusReady=!1,this.isMidrollPlusExecuted=!1,this.blockedAdsMap={},this.blockingDetectedKey="d8d9b9b63e704668a29559970c1818be",this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new S_,this._location.print();var o=this._location.get(),d=(null==o||null===(n=o.top)||void 0===n||null===(r=n.domain)||void 0===r?void 0:r.value)||(null==o||null===(a=o.partner.domain)||void 0===a?void 0:a.value),u=null==o||null===(i=o.partner.url)||void 0===i?void 0:i.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||u,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||d,this._topDomain,this._parentURL,this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,function(e){CS.apply(this,arguments)}({whichFrame:this._whichFrameV2(),options:{showAd:this.showAd.bind(this),onEvent:this._onEvent.bind(this)}}),this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){D.default(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){D.default(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t,n,r,a=this;if((D.default(this,s),null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new yR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(n=this._gameData.lp)||void 0===n?void 0:n.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(r=this._gameData.evnts)&&void 0!==r&&r.enabled&&this._isLoaderGameURL()&&(fS(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){D.default(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),dR.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var t,n,r,i,s,o,d,c,l,h,f,p,m,A,g,v,b,y,_,w,k;return T.default(e,[{key:"_getVisitorId",value:(k=x.default(R.default.mark((function e(){var t,n,r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gR({handler:function(){return D.default(this,s),!!xR}.bind(this),timeout:1e3,interval:10});case 2:return a=e.sent,i=a?null===(t=xR)||void 0===t||null===(n=t.visitor)||void 0===n||null===(r=n.visitorData)||void 0===r?void 0:r.visitorId:"noVisitorId",e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)}))),function(){return k.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(w=x.default(R.default.mark((function e(){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m,A,g,v,b,y=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this._gameData)||void 0===t||null===(n=t.gs_trc)||void 0===n?void 0:n.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:r=e.sent,a=this._gameData,i=a.category,s=a.dname,o=a.pname,d=a.gameId,u=a.slug,c=a.title,l=a.ctry,h=this._topDomain||this._parentDomain,f=new S_,p=f.get(),m=this.msgrt._ua,A=document.referrer,g=this.msgrt._layout,v=ss.version,b={args:{rfr:A,category:i,dname:s,pname:o,gameId:d,slug:u,title:c,ctry:l,domain:h,loc:p,ua:m,layout:g,version:v,visitorId:r},onError:function(e){D.default(this,y),this._sendSDKError(e)}.bind(this)},VS(b);case 18:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(D.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(_=x.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=a.getMobilePlatform()||"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 _.apply(this,arguments)})},{key:"_loadCMP",value:(y=x.default(R.default.mark((function e(){var t,n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(r=new S_,0!==(null==(a=r.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(i=this._gameData)||void 0===i||null===(s=i.cmp)||void 0===s||!s.checkDepthOnly){e.next=9;break}return e.next=7,sS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,sS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"testConsent",value:function(){try{$D();x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eS({});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;oS.on("splash-hidden",function(t){D.default(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.default(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._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:(b=x.default(R.default.mark((function e(t,n){var r,a,i,s=this;return R.default.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===(r=this._gameData.disableAds)||void 0===r?void 0:r.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==(null===(a=this._gameData.diagnostic)||void 0===a?void 0:a.close_ads)&&!1!==(null===(i=this._gameData.diagnostic)||void 0===i?void 0:i.close_ads)||(this.videoAdReady=this._initializeVideoAd().then(function(){D.default(this,s),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"})),this._checkAdBlockerRemoval()}.bind(this)).catch(function(e){D.default(this,s);var t="".concat(e).startsWith("Error: Blocked:");us("gd-adflow adsBlocked",t,e);var n=this.get_ad_system_init_result(),r=n.ima,a=n.afg;if(this.adsBlocked=!r&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var i=r||a?r?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(i)})}this._sendSDKError(e),this._checkAdBlocker(),console.error(e.message||e)}.bind(this))),t(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"),n(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return b.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_checkAdBlockerRemoval",value:function(){a.Ls.getBoolean(this.blockingDetectedKey)&&(a.Ls.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(v=x.default(R.default.mark((function e(){var t,n,r,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.get_ad_system_init_result(),n=t.ima,r=t.afg,n&&r){e.next=12;break}if(a.Ls.set(this.blockingDetectedKey,!0),null===(i=this._gameData.rmblck)||void 0===i||!i.enabled){e.next=12;break}if(this.adBlockerPage){e.next=12;break}return e.next=9,cR();case 9:s=e.sent,this.adBlockerPage=new s(this._gameData),this.adBlockerPage.add();case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log(e.t0.message);case 17:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(){return v.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=M.default(e);this.options=t?a.extendDefaults(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:"_shouldSendTunnlEvent",value:function(e){return this.tunnlEventCounts||(this.tunnlEventCounts={}),this.tunnlEventCounts[e]||(this.tunnlEventCounts[e]=0),this.tunnlEventCounts[e]++,1===this.tunnlEventCounts[e]}},{key:"_sendTunnlEvent",value:function(e){var t=this;if(this._shouldSendTunnlEvent(e)){void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://hlana.gamedistribution.com/event?".concat(j.default.stringify(n))).catch(function(r){D.default(this,t),this._sendHLAnalyicsLog({query:wR(wR({},n),{},{error:null==r?void 0:r.message}),eventType:-e})}.bind(this)),this._sendHLAnalyicsLog({query:n,eventType:e}),this.adInstance._send_atom_event("hl.config",n),this._send_gametag_data("sdk_gameplay")}}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=e.query,r=e.eventType;if(1===r?t="hl.gameplay":2===r?t="hl.gameload":3===r?t="hl.adblock":-1===r?t="hl.gameplay.error":-2===r?t="hl.gameload.error":-3===r&&(t="hl.adblock.error"),t)try{this.dumper.send_atom_event(t,n)}catch(e){console.log("zxcv Error on sending dump!",e)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=a.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,a.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!a.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain?(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0)),a.Ls.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 a.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:a.getIframeDepth(),version:ss.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),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 t=[this._gameData.gmky.url];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;D.default(this,e),xR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&xR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),tS.track(xR,this._gameData)}.bind(this)).catch(function(t){D.default(this,e),this._sendSDKError(t)}.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=xR)||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 t=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){D.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadLocus",value:function(){var e=x.default(R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Aw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus/"],window.gdlocus=window.gdlocus||{cmd:[]},window.gdlocus.cmd.push(function(){D.default(this,n),this.isOpusReady=!0,window.gdlocus.iservice.register({method:"muteAdFlow",handler:this._muteFlowSound.bind(this)}),window.gdlocus.iservice.register({method:"terminateAdFlow",handler:this._terminateFlow.bind(this)})}.bind(this)),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){D.default(this,n),this._sendSDKError(e)}.bind(this)).then(function(){D.default(this,n)}.bind(this));case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_muteFlowSound",value:(g=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.mute();case 3:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"_terminateFlow",value:(A=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.terminate();case 3:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"_loadGoogleAnalytics",value:function(){var e=this;if(!this._bridge.isCoreSDKMode){var t=this._gameData,n=t.gameId,r=t.slug,a=t.title,i=new S_,s={provider:"gd-sdk",page_depth:i.get("depth.value"),partner_domain_from:i.get("partner.domain.from"),top_domain_from:i.get("top.domain.from"),top_domain:this._topDomain,parent_domain:this._parentDomain,parent_url:this._parentURL,game_id:n,game_slug:r,game_title:a};mR({onError:function(t){D.default(this,e),this._sendSDKError(t)}.bind(this),args:s})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new O.default(e,!0);t="".concat(n.protocol,"//").concat(n.hostname,"/").concat(n.pathname)}catch(e){}return t}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return D.default(this,e),this.eventBus.subscribe(t,function(e){return D.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return D.default(this,e),this.eventBus.subscribe(t,function(e){return D.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){D.default(this,e);var t=this._getDeveloperDomains(),n=t.developerDomain,r=t.gameApiDomain;if(n){fetch("https://".concat(r,"/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){}}PD()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return D.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;D.default(this,e),this.msgrt.send("ad.impression"),CD(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&tS.track(xR,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){D.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){D.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(D.default(this,e),t.message.startsWith("Blocked:")){var n=t.message.replace("Blocked:","").trim(),r=this._getCleanUrl(n),a="Blocked: ".concat(r);if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:a}),!this._hasBlocker)){this._hasBlocker=!0;this.msgrt.send("adblck.src",{message:a});var i=this.get_ad_system_init_result(),s=i.ima,o=i.afg;(!s||!o)&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){D.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){D.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return D.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Please check if your GAME ID is correct. Otherwise, no revenue will be reported.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain,t=ew().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:(m=x.default(R.default.mark((function e(){var t,n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,r=this._parentDomain.indexOf("gamedistribution.com")>=0,t=void 0===this._gameData.dmain||this._gameData.dmain,console.log("zxcv exclude, isAllowedDomain",r,t),t=t||r,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking();case 8:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new S_,a="html5.gamedistribution.com"!==O.default(document.referrer).host,i=n&&!uR.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&a;if(i&&(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:i}}},{key:"_redirectToBlocking",value:function(e){var t=this;this.msgrt.send("blocked");var n=this._gameData;setTimeout(x.default(R.default.mark((function r(){return R.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e){r.next=9;break}return r.prev=1,r.next=4,t.adInstance._send_atom_event("token-blocked");case 4:r.next=9;break;case 6:r.prev=6,r.t0=r.catch(1),console.log("Could not send dump.token-blocked",r.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(j.default.stringify({domain:t._parentDomain,id:n.gameId,img:t._get_game_thumbnail_url(),title:n.title,utm_source:t._parentDomain,utm_medium:(null==n?void 0:n.slug)||(null==n?void 0:n.title)||(null==n?void 0:n.gameId)||"unknown",utm_campaign:"block-and-redirect"}));case 10:case"end":return r.stop()}}),r,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var e=this,t=this._gameData;setTimeout(x.default(R.default.mark((function n(){var r,a,i,s;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.adInstance._send_atom_event("loader-redirect");case 3:n.next=8;break;case 5:n.prev=5,n.t0=n.catch(0),console.log("Could not send dump.loader-redirect",n.t0);case 8:r=O.default(location.href,!0),a=wR(wR({},r.query),{},{rd:"1"}),i=j.default.stringify(a),s="https://html5.gamedistribution.com/".concat(t.gameId,"/?").concat(i),window.location.href=s;case 13:case"end":return n.stop()}}),n,null,[[0,5]])}))),100)}},{key:"_checkGameDeleted",value:function(){var e=this;6!==this._gameData.status&&4!==this._gameData.activeStatus||(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){D.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;GD().disableMidrolltimer?e.midroll=0:a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var a,i=this._gameData,s=i.gdpr&&!0===i.gdpr.consent,o=i.loader,d=null===(t=i.promo)||void 0===t?void 0:t[null===(n=i.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=d&&d.enabled?this._createPromoBeforeSplash(i,s):o.enabled&&!0!==(null===(a=o.splash)||void 0===a?void 0:a.skip)?this._createSplash(i,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=d&&d.enabled?this._createPromoBeforeSplash(i,s):!1!==o.enabled&&this._createSplash(i,s):null!=d&&d.enabled&&this._createPromo(i,s))}},{key:"_initializeVideoAd",value:(p=x.default(R.default.mark((function e(){var t;return R.default.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=a.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new a.Macros({game:t,bridge:this._bridge}),this.adInstance=new zD(this.options.flashSettings.adContainerId,this.options.advertisementSettings,{parentURL:this._parentURL,parentDomain:this._parentDomain,topDomain:this._topDomain}),this.adInstance.gameId=t.gameId,this.adInstance.category=t.category,this.adInstance.tags=t.tags,this.adInstance.noPreroll=this._bridge.noPreroll,this.adInstance.macros=this.macros,this.adInstance.gameData=t,this.adInstance.msgrt=this.msgrt,this.adInstance.PackageJSON=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 p.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){a.dankLog("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){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"IscForwardOnEvent",value:(f=x.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,US();case 4:if(!(r=e.sent)){e.next=15;break}return e.next=8,r.isLoader();case 8:if(s=e.sent,!((null===(a=this._gameData)||void 0===a||null===(i=a.isv_fw)||void 0===i?void 0:i.enabled)&&s&&r.onEvent)){e.next=14;break}return n=!0,r.onEvent({event:t}),e.abrupt("return");case 14:null==t||t.name,window.location.href;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),cs("[GD-IS] error on onEvent forward",e.t0);case 20:return e.abrupt("return",n);case 21:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return f.apply(this,arguments)})},{key:"_onEvent",value:(h=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.IscForwardOnEvent(t);case 2:if(!e.sent){e.next=5;break}return e.abrupt("return");case 5:if(a.dankLog(t.name,t.message,t.status),!t.skipForward){e.next=8;break}return e.abrupt("return");case 8:try{this.options.onEvent({name:t.name,message:t.message,status:t.status,skipForward:t.skipForward,adPosition:t.adPosition})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}case 9:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"_getGameData",value:(l=x.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();case 2:return t=e.sent,this.msgrt.setGameData(t),a.setDankLog(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"_createSplash",value:(c=x.default(R.default.mark((function e(t,n){var r,i,s,o,d=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:return r=e.sent,i=new r(wR(wR({},this.options),{},{isConsentDomain:n,version:ss.version}),t,this._parentDomain),e.next=6,vw();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e,r,s,u=this;if(D.default(this,d),((null===(e=window.gdlocus)||void 0===e?void 0:e.firstUserAction)||x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("gd-adflow locus-first-user-action is not defined");case 1:case"end":return e.stop()}}),e)}))))({game_id:t.gameId}).catch(function(e){D.default(this,u),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),n){var c=new Date;c.setDate(c.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(c.toUTCString(),"; path=/")}if(this._hideCMPButton(),KS("play"),o)window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(e){D.default(this,u),i.hide()}.bind(this));else{var l={position:"preroll"};(function(){D.default(this,u),ls.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),l.adapter="adsense")}).bind(this),this.showAd(a.AdType.Interstitial,l).catch(function(e){D.default(this,u)}.bind(this))}null!==(r=this._gameData)&&void 0!==r&&null!==(s=r.evnts)&&void 0!==s&&s.enabled&&(pS({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(){D.default(this,d),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){D.default(this,d),i.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(d=x.default(R.default.mark((function e(t,n){var r,a,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(wR(wR({},this.options),{},{isConsentDomain:n,version:ss.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){D.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return d.apply(this,arguments)})},{key:"_createPromo",value:(o=x.default(R.default.mark((function e(t,n){var r,a,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(wR(wR({},this.options),{},{isConsentDomain:n,version:ss.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){D.default(this,o),s.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 o.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){D.default(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(s=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=arguments;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c.length>1&&void 0!==c[1]?c[1]:{},i={forwarded:r=!1,result:a},e.prev=3,null===(s=this._gameData)||void 0===s||null===(o=s.isv_fw)||void 0===o?void 0:o.enabled){e.next=7;break}return e.abrupt("return",i);case 7:return us("[GD-IS] forward enabled"),e.next=10,US();case 10:if(d=e.sent){e.next=13;break}return e.abrupt("return",i);case 13:return e.next=15,d.isLoader();case 15:if(u=e.sent){e.next=22;break}return us("[GD-IS] forwarding ad call",{location:window.location.href}),r=!0,e.next=21,d.showAd({adType:t,params:n});case 21:a=e.sent;case 22:us("[GD-IS] showAd",{isLoader:u,location:window.location.href}),e.next=28;break;case 25:e.prev=25,e.t0=e.catch(3),cs("[GD-IS] error on showAd forward",e.t0);case 28:return e.abrupt("return",{forwarded:r,result:a});case 29:case"end":return e.stop()}}),e,this,[[3,25]])}))),function(e){return s.apply(this,arguments)})},{key:"showAd",value:(i=x.default(R.default.mark((function e(t){var n,r=this,a=arguments;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(a,i){var s,o,d,u,c,l,h;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.IscForwardShowAd();case 3:if(o=e.sent,d=o.forwarded,u=o.result,!d){e.next=8;break}return e.abrupt("return",u);case 8:if(KS("play"),!r._autoResumeIfAdsAreDisabled(t||"interstitial")){e.next=13;break}return e.abrupt("return",a());case 13:return c={adType:t||"interstitial",params:n,adTimestamp:r.adRequestTimer},e.next=17,r.sdkReady;case 17:return l=e.sent,e.next=20,r.videoAdReady;case 20:if(null!==(s=r._gameData.lp)&&void 0!==s&&s.load||r._sendLoadedEvent(1),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:l,adRequest:c}),r._rejectAdIfAdDisabled({gameData:l,adRequest:c}),r._rejectAdIfUnsupportedType({adRequest:c}),"rewarded"===t&&r._setGameRewardedFlag(),null!=n&&n.isGift||r._rejectAdIfAdRateHits({gameData:l,adRequest:c}),n&&n.isGift&&n.isMidrollPlus||!r.adBlockerPage||(r._setAdRequestTimer(),r.adBlockerPage.show()),r.adInstance.attachAfgPosition(c),!r.adFlowRunning){e.next=31;break}return e.abrupt("return",a());case 31:return r.adFlowRunning=!0,h=new tR(r),r._adFlow=h,e.next=36,h.runAdFlow(c);case 36:r.adFlowRunning=!1,r._adFlow=null,a(),r._post_message({topic:"adrequest.instream"}),e.next=48;break;case 42:e.prev=42,e.t0=e.catch(0),r.adFlowRunning=!1,r._adFlow=null,r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 48:case"end":return e.stop()}}),e,null,[[0,42]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return i.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,a=this._gameData.disableAds[e],i=r||a;return this._gameData.diagnostic,this._gameData.disableAds,i&&(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,a,i,s,o,d,u,c,l,h,f,p,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===(a=r.gft)||void 0===a||null===(i=a[e].durations[this._giftCount[e]])||void 0===i?void 0:i.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===(u=d.gft)||void 0===u||null===(c=u[e].durations[this._giftCount[e]])||void 0===c?void 0:c.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===(f=this._gameData)||void 0===f||null===(p=f.gft)||void 0===p||null===(m=p[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!==a.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,d=e.gameData,u=e.adRequest,c=null;u.adType===a.AdType.Interstitial&&null!==(t=d.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=d.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=d.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=d.midroll;if(u.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(r,i){var s,o;return R.default.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.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[t]&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(t,"..."));case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:if(!n.adInstance){e.next=22;break}return e.next=19,n.adInstance.preloadAd(t);case 19:e.t0=e.sent,e.next=23;break;case 22:e.t0="gdsdk://preloaded";case 23:o=e.t0,r(o),e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),i(e.t1);case 30:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=x.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(n,r){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=x.default(R.default.mark((function n(r,a){var i;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(pS({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){a.dankLog("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()||(pS({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 a.ImplementationTest(this).start(),a.Ls.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 t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(D.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){D.default(this,t),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 t,n=this,r=new O.default(e),a=r.host;return r.href,((null===(t=this._gameData.urlBlockExc)||void 0===t?void 0:t.hosts)||[]).some(function(e){return D.default(this,n),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;D.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var i=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return D.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(i)}),!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.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:A,depth:a.getIframeDepth(),domainMatched:s===o,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.default(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.default(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.default(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.default(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.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new O.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new KD(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=x.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new WD(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new O.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(j.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O.default(e,!0);return n.query=wR(wR({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=x.default(R.default.mark((function t(n,r){var a;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.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)xR.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,t=this._gameData,n=t.assets.find(function(t){return D.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(e){var t=this;try{var n,r=null===(n=this._gameData)||void 0===n?void 0:n.gft[e],i=setInterval(x.default(R.default.mark((function n(){var r=this;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t.adInstance.requestRunning||t.adFlowRunning?console.log("Advertisement already running..."):(t.showAd(a.AdType.Interstitial,{position:e,isGift:!0}).catch(function(e){D.default(this,r)}.bind(this)),clearInterval(i),t._giftCount[e]++);case 1:case"end":return n.stop()}}),n,this)}))),1e3*r.durations[this._giftCount[e]].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 kR}},{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,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return D.default(this,e),t.get(n)}.bind(this)});return!t.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:t.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,t=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&!this.isMidrollPlusExecuted){var n;this.isMidrollPlusExecuted=!0;var r=this._gameData.midroll_plus.type||"midroll";if(null!==(n=this._gameData.midroll_plus)&&void 0!==n&&n.interval)var i=setInterval(function(){var e,n,s=this;(D.default(this,t),this.adFlowRunning)||(this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(e){D.default(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===(n=this._gameData.midroll_plus)||void 0===n?void 0:n.interval)&&clearInterval(i))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;D.default(this,t),this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(t){D.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),e}();function SR(){return(SR=x.default(R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Aw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus/"],console.log("locus loading"),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){D.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var RR=new m.EventEmitter,TR=function(e){var t=this;!function(){SR.apply(this,arguments)}();var n,r=function(e){var n=this;return D.default(this,t),new Promise(function(t,r){var a=this;D.default(this,n);var i=function(e){D.default(this,a),"SDK_GAME_START"===e.name&&(RR.off("sdk-event",i),t())}.bind(this);RR.on("sdk-event",i),p("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return D.default(this,t),n||(n=new DR(e)),n}.bind(this),i=function(e){return D.default(this,t),r(e)}.bind(this),s=function(e){return D.default(this,t),"gdsdk://preloaded"}.bind(this),o=function(e){return D.default(this,t),a().showDisplayAd(e)}.bind(this),d=function(){return D.default(this,t),p("cancelAd")}.bind(this),u=function(){return D.default(this,t),p("openConsole")}.bind(this),c=function(){return D.default(this,t),p("showBanner")}.bind(this),l=function(){return D.default(this,t),p("session")}.bind(this),h=function(e){return D.default(this,t),p("sendGenericEvent",{options:e})}.bind(this),f=function(){D.default(this,t),console.log("_sendSDKReady")}.bind(this),p=function(e,n){var r=this;return D.default(this,t),n||(n={}),new Promise(function(t,a){D.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,"*"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),m=function(){D.default(this,t);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&&g(r)}),!1)}.bind(this),A=function(){D.default(this,t),m(),p("init")}.bind(this),g=function(n){D.default(this,t);try{RR.emit("sdk-event",n),e.onEvent&&e.onEvent(n)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:c,showAd:i,preloadAd:s,showDisplayAd:o,cancelAd:d,openConsole:u,getSession:l,onEvent:g,init:A,_sendSDKReady:f,sendGenericEvent:h}},CR=function(e){var t=TR(e);return t.init(),t},IR=function(){var e=this,t=function(){D.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),n=function(){D.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),r=function(){D.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){D.default(this,e);var r="html5.gamedistribution.com"!==O.default(window.location.href).host;return t()&&!(n()||r)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:t,isTokenGameURL:n,isExtHostedGameURL:r,whichFrame:a}},OR="gd-sdk-frame-handshake-request",PR="gd-sdk-frame-handshake-response",BR=function(e){var t=this;return new Promise(function(e,n){var r=this;D.default(this,t);var a={type:OR},i=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,s=n.type;if(s===OR){var o={type:PR};a.postMessage(o,r)}else s===PR&&(i=!0,e({origin:r,source:a}))})),setTimeout(function(){D.default(this,r),i||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},LR=function(){var e=x.default(R.default.mark((function e(){var t,n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mw();case 2:return t=e.sent,e.next=6,BR();case 6:if(n=e.sent,uR.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return r=IR(),a=r.isMasterGameURL,r.isTokenGameURL,i=a(),e.next=14,gw();case 14:return s=e.sent,o=!1,o=s?!i&&!!n:!i,e.abrupt("return",o);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),UR=et,MR=ue,FR=es,jR=Ka,GR=MR(qa.f),NR=MR([].push),qR=function(e){return function(t){for(var n,r=jR(t),a=FR(r),i=a.length,s=0,o=[];i>s;)n=a[s++],UR&&!GR(r,n)||NR(o,e?[n,r[n]]:r[n]);return o}},HR={entries:qR(!0),values:qR(!1)}.values;Zi({target:"Object",stat:!0},{values:function(e){return HR(e)}});var QR,VR={},zR=function(e){try{if(e.skipForward)return;if(VR.source){var t={type:"gd-sdk-on-event",event:e};VR.source.postMessage(t,VR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},WR=function(){zR({name:"SDK_READY",status:"success",message:"Everything is ready."}),zR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),zR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},KR=function(e){window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,i=n.type,s=n.method,o=n.options;if("gd-sdk-self"!==i){if("gd-sdk"===i){if(!VR.source&&"init"===s)return function(e){var t=e.source,n=e.origin;VR={source:t,origin:n}}({source:a,origin:r}),void WR();var d=e[s];d&&x.default(R.default.mark((function t(){var n,r=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){D.default(this,r),"showAd"===s&&ls.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=d.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var u={type:"gd-sdk",method:s,options:o};window.postMessage(u,location.origin)}}),!1)},YR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){zR(e),t.apply(this,arguments)}}(e);var t=new DR(e);return KR(t),t},JR=function(){function e(){C.default(this,e),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},Kg(this.moduleName,this.moduleConfig)}var t,n;return T.default(e,[{key:"load",value:(n=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Jg(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 n.apply(this,arguments)})},{key:"runYMenu",value:(t=x.default(R.default.mark((function e(t){var n;return R.default.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 t.apply(this,arguments)})}]),e}(),ZR=function(){var e=x.default(R.default.mark((function e(){var t,n,r,i,s,o,d,u,c,l,h,f,p,m,A,g;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){var e,t=(e=new S_).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}}(),n=t.isAeriaDomain,r=t.isAeriaStagingDomain,!n){e.next=21;break}return o=function(){var e=(new S_).get("partner.url.value");return new O.default(e,!0)},d=function(){var e="ae-soft-323";try{var t=o(),n=t.pathname,r=n.split("/"),a=r[r.length-1];us("aeria-ylogin:loc",t,n,a),e=a}catch(e){cs("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:d,score:100},env:r?"staging":"production",system:"Softgames"},c=function(){var e=window.parent||window,t=u;e.postMessage(t,"*")},l=new a.EventBus,e.next=13,lw();case 13:h=e.sent,f=null==h||null===(i=h.aeria)||void 0===i?void 0:i.yMenuExcluded,p=null==h||null===(s=h.aeria)||void 0===s?void 0:s.yLoginExcluded,l.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(p||c())})),m=function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new JR).runYMenu({gameId:d});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=IR(),g=A.whichFrame,"game-frame"===g()&&(f||m());case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),XR=function(e){try{var t=Y_(e);e.gameId||t.send("nogameid",{message:"".concat(hb.parentURL)})}catch(e){}},$R=function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ZR();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 e.apply(this,arguments)}}(),eT={create:function(){var e=x.default(R.default.mark((function e(t){var n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,XR(t),cw(t),e.next=5,LR();case 5:return n=e.sent,e.next=8,$R();case 8:return window.isForwarderFrame=n,r=n?CR(t):YR(t),bw(),e.abrupt("return",r);case 14:return e.prev=14,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",YR(t));case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t){return e.apply(this,arguments)}}()};function tT(){return(tT=x.default(R.default.mark((function e(t,n){var r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ww();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,iT(t);case 9:e.t0=e.sent;case 10:return r=e.t0,e.abrupt("return",n(r));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var nT,rT,aT=!1;function iT(e){var t=this;return new Promise(function(n,r){var a=this;if(D.default(this,t),QR)return n(QR);if(aT)var i=setInterval(function(){D.default(this,a),QR&&(aT=!1,clearInterval(i),n(QR))}.bind(this),100);else aT=!0,eT.create(e).then(function(e){D.default(this,a),QR=e,e._sendSDKReady(),aT=!1,n(QR)}.bind(this))}.bind(this))}function sT(e){return iT(e),{invoke:function(t){return function(e,t){return tT.apply(this,arguments)}(e,t)}}}function oT(e,t){var n=this;return new Promise(function(r,i){var s,o=this;D.default(this,n);var d=function(e){var t="https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js";return e&&(t="https://pm.azerioncircle.com/@bygd/gd-sdk-wrp/".concat(e,"/dist/default/iife/index.js")),[t]}(null==t||null===(s=t.game)||void 0===s?void 0:s.version);dT({text:"sdk-wrapper-script-load"}),a.getScript(d[0],"gd-sdk-wrp",{alternates:d}).catch(function(e){D.default(this,o),dT({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),i(e)}.bind(this)).then(x.default(R.default.mark((function n(){var a,s;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,dT({text:"sdk-wrapper load success"}),a=window.GDSDKWRP.GDSDKWRP,s=new a,dT({text:"sdk-wrapper before gdSdkWrp.init"}),n.next=7,s.init(e,t);case 7:rT=n.sent,dT({text:"sdk-wrapper after gdSdkWrp.init"}),r(rT),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),dT({text:"sdk-wrapper load error 2",error:n.t0.message}),i(n.t0);case 16:case"end":return n.stop()}}),n,null,[[0,12]])}))))}.bind(this))}function dT(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(t))))),console.log(N.default(Object.values(e)))}catch(e){}}function uT(e){if(e){var t=e.name,n=e.message,r=e.status;try{dT({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!nT}),nT&&nT.onEvent({name:t,message:n,status:r})}catch(t){dT({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function cT(e){return lT.apply(this,arguments)}function lT(){return(lT=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return nT=t,cw(t),e.next=4,lw();case 4:if(i=e.sent,!rT){e.next=7;break}return e.abrupt("return",rT);case 7:if(s=null==i||null===(n=i.sdk_wrp)||void 0===n?void 0:n.enabled,o=null==i||null===(r=i.sdk_wrp)||void 0===r?void 0:r.version,d=null==i?void 0:i.gameId,u=null==i?void 0:i.title,fT("isWrapEnabled ".concat(s)),s){e.next=14;break}return e.abrupt("return");case 14:return c=null==i||null===(a=i.sdk_wrp)||void 0===a?void 0:a.wrapper,e.next=17,oT(c,{onEvent:uT,game:{gameId:d,title:u,version:o}});case 17:return rT=e.sent,e.abrupt("return",rT);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hT(){return hT=x.default(R.default.mark((function e(t){var n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,fT("beforeGetDeveloperSettings"),r=n(),fT("afterGetDeveloperSettings"),e.prev=4,e.next=7,cT(r);case 7:a=e.sent,fT("after get SDK wrapper: ".concat(!!a)),a&&(fT("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),fT("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),hT.apply(this,arguments)}function fT(e){window.sdkLog.push(e)}function pT(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":S.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===S.default(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.default(window.location.href,!0),r=n.host,a=n.query,i=r,s=null==a?void 0:a.gd_sdk_referrer_url;return s&&(s=s.startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),null!==(t=e=O.default(s,!0))&&void 0!==t&&t.host&&(i=e.host)),i}()?fT("skipped normal SDK init!"):(!function(){TD();var e=sT(pT());function t(){var t=this;this.AdType=a.AdType,this.preloadAd=function(t){var n=this;return e.invoke(function(e){return D.default(this,n),e.preloadAd(t)}.bind(this))},this.showAd=function(){var t=x.default(R.default.mark((function t(n,r){var i=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.invoke(function(e){var t=this;if(D.default(this,i),n===a.AdType.Display)return e.showDisplayAd(r);var s={};return function(){D.default(this,t),ls.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),s.adapter="adsense")}.bind(this),e.showAd(n,s)}.bind(this)));case 1:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),this.cancelAd=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.cancelAd()}.bind(this))},this.openConsole=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.openConsole()}.bind(this))},this.getSession=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.session()}.bind(this))},this.sendEvent=function(t){var n=this;return e.invoke(function(e){return D.default(this,n),e.sendGenericEvent(t)}.bind(this))},this.leaderboard={show:function(){D.default(this,t),Xg.showLeaderboard()}.bind(this),addScore:function(e){D.default(this,t),Xg.addScore(e)}.bind(this)}}t.prototype=new function(){this.showBanner=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new t,window.gdApi=window.gdsdk}(),fT("afterSDKInit")),function(e){hT.apply(this,arguments)}({_get_developer_sets:pT});
1
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/newArrowCheck"),n=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),a=require("@bygd/gd-sdk-era/dist/default"),i=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/classCallCheck"),o=require("@babel/runtime/helpers/defineProperty"),d=require("url-parse"),u=require("js-base64"),c=require("validator"),l=require("is-valid-domain"),h=require("get-value"),f=require("set-value"),p=require("lodash.clonedeep"),m=require("events"),A=require("can-autoplay"),g=require("is-plain-object"),v=require("querystringify"),b=require("lodash.merge"),y=require("uuid"),_=require("@babel/runtime/helpers/toConsumableArray"),w=require("@fnet/inter-service-js"),k=require("@flownet/lib-connect-to-tcf");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=E(e),D=E(t),S=E(n),R=E(r),T=E(i),C=E(s),I=E(o),O=E(d),P=E(c),B=E(l),L=E(h),U=E(f),M=E(p),F=E(A),j=E(v),G=E(b),N=E(_),q=E(w),H=E(k),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},V=function(e){return e&&e.Math==Math&&e},z=V("object"==typeof globalThis&&globalThis)||V("object"==typeof window&&window)||V("object"==typeof self&&self)||V("object"==typeof Q&&Q)||function(){return this}()||Function("return this")(),W={exports:{}},K=z,Y=Object.defineProperty,J=function(e,t){try{Y(K,e,{value:t,configurable:!0,writable:!0})}catch(n){K[e]=t}return t},Z=J,X="__core-js_shared__",$=z[X]||Z(X,{}),ee=$;(W.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}},ae=!re((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ie=ae,se=Function.prototype,oe=se.call,de=ie&&se.bind.bind(oe,oe),ue=ie?de:function(e){return function(){return oe.apply(e,arguments)}},ce=function(e){return null==e},le=ce,he=TypeError,fe=function(e){if(le(e))throw he("Can't call method on "+e);return e},pe=fe,me=Object,Ae=function(e){return me(pe(e))},ge=Ae,ve=ue({}.hasOwnProperty),be=Object.hasOwn||function(e,t){return ve(ge(e),t)},ye=ue,_e=0,we=Math.random(),ke=ye(1..toString),Ee=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ke(++_e+we,36)},xe="undefined"!=typeof navigator&&String(navigator.userAgent)||"",De=z,Se=xe,Re=De.process,Te=De.Deno,Ce=Re&&Re.versions||Te&&Te.version,Ie=Ce&&Ce.v8;Ie&&(ne=(te=Ie.split("."))[0]>0&&te[0]<4?1:+(te[0]+te[1])),!ne&&Se&&(!(te=Se.match(/Edge\/(\d+)/))||te[1]>=74)&&(te=Se.match(/Chrome\/(\d+)/))&&(ne=+te[1]);var Oe=ne,Pe=Oe,Be=re,Le=!!Object.getOwnPropertySymbols&&!Be((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Ue=Le&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Me=z,Fe=W.exports,je=be,Ge=Ee,Ne=Le,qe=Ue,He=Me.Symbol,Qe=Fe("wks"),Ve=qe?He.for||He:He&&He.withoutSetter||Ge,ze=function(e){return je(Qe,e)||(Qe[e]=Ne&&je(He,e)?He[e]:Ve("Symbol."+e)),Qe[e]},We={};We[ze("toStringTag")]="z";var Ke="[object z]"===String(We),Ye="object"==typeof document&&document.all,Je={all:Ye,IS_HTMLDDA:void 0===Ye&&void 0!==Ye},Ze=Je.all,Xe=Je.IS_HTMLDDA?function(e){return"function"==typeof e||e===Ze}:function(e){return"function"==typeof e},$e={},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)},at=rt,it=z.document,st=at(it)&&at(it.createElement),ot=function(e){return st?it.createElement(e):{}},dt=ot,ut=!et&&!re((function(){return 7!=Object.defineProperty(dt("div"),"a",{get:function(){return 7}}).a})),ct=et&&re((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),lt=rt,ht=String,ft=TypeError,pt=function(e){if(lt(e))return e;throw ft(ht(e)+" is not an object")},mt=ae,At=Function.prototype.call,gt=mt?At.bind(At):function(){return At.apply(At,arguments)},vt=z,bt=Xe,yt=function(e,t){return arguments.length<2?(n=vt[e],bt(n)?n:void 0):vt[e]&&vt[e][t];var n},_t=ue({}.isPrototypeOf),wt=yt,kt=Xe,Et=_t,xt=Object,Dt=Ue?function(e){return"symbol"==typeof e}:function(e){var t=wt("Symbol");return kt(t)&&Et(t.prototype,xt(e))},St=String,Rt=function(e){try{return St(e)}catch(e){return"Object"}},Tt=Xe,Ct=Rt,It=TypeError,Ot=function(e){if(Tt(e))return e;throw It(Ct(e)+" is not a function")},Pt=Ot,Bt=ce,Lt=function(e,t){var n=e[t];return Bt(n)?void 0:Pt(n)},Ut=gt,Mt=Xe,Ft=rt,jt=TypeError,Gt=gt,Nt=rt,qt=Dt,Ht=Lt,Qt=function(e,t){var n,r;if("string"===t&&Mt(n=e.toString)&&!Ft(r=Ut(n,e)))return r;if(Mt(n=e.valueOf)&&!Ft(r=Ut(n,e)))return r;if("string"!==t&&Mt(n=e.toString)&&!Ft(r=Ut(n,e)))return r;throw jt("Can't convert object to primitive value")},Vt=TypeError,zt=ze("toPrimitive"),Wt=function(e,t){if(!Nt(e)||qt(e))return e;var n,r=Ht(e,zt);if(r){if(void 0===t&&(t="default"),n=Gt(r,e,t),!Nt(n)||qt(n))return n;throw Vt("Can't convert object to primitive value")}return void 0===t&&(t="number"),Qt(e,t)},Kt=Dt,Yt=function(e){var t=Wt(e,"string");return Kt(t)?t:t+""},Jt=et,Zt=ut,Xt=ct,$t=pt,en=Yt,tn=TypeError,nn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,an="enumerable",sn="configurable",on="writable";$e.f=Jt?Xt?function(e,t,n){if($t(e),t=en(t),$t(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($t(e),t=en(t),$t(n),Zt)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:{}},un=et,cn=be,ln=Function.prototype,hn=un&&Object.getOwnPropertyDescriptor,fn=cn(ln,"name"),pn={EXISTS:fn,PROPER:fn&&"something"===function(){}.name,CONFIGURABLE:fn&&(!un||un&&hn(ln,"name").configurable)},mn=Xe,An=$,gn=ue(Function.toString);mn(An.inspectSource)||(An.inspectSource=function(e){return gn(e)});var vn,bn,yn,_n=An.inspectSource,wn=Xe,kn=z.WeakMap,En=wn(kn)&&/native code/.test(String(kn)),xn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Dn=$e,Sn=xn,Rn=et?function(e,t,n){return Dn.f(e,t,Sn(1,n))}:function(e,t,n){return e[t]=n,e},Tn=W.exports,Cn=Ee,In=Tn("keys"),On=function(e){return In[e]||(In[e]=Cn(e))},Pn={},Bn=En,Ln=z,Un=rt,Mn=Rn,Fn=be,jn=$,Gn=On,Nn=Pn,qn="Object already initialized",Hn=Ln.TypeError,Qn=Ln.WeakMap;if(Bn||jn.state){var Vn=jn.state||(jn.state=new Qn);Vn.get=Vn.get,Vn.has=Vn.has,Vn.set=Vn.set,vn=function(e,t){if(Vn.has(e))throw Hn(qn);return t.facade=e,Vn.set(e,t),t},bn=function(e){return Vn.get(e)||{}},yn=function(e){return Vn.has(e)}}else{var zn=Gn("state");Nn[zn]=!0,vn=function(e,t){if(Fn(e,zn))throw Hn(qn);return t.facade=e,Mn(e,zn,t),t},bn=function(e){return Fn(e,zn)?e[zn]:{}},yn=function(e){return Fn(e,zn)}}var Wn={set:vn,get:bn,has:yn,enforce:function(e){return yn(e)?bn(e):vn(e,{})},getterFor:function(e){return function(t){var n;if(!Un(t)||(n=bn(t)).type!==e)throw Hn("Incompatible receiver, "+e+" required");return n}}},Kn=ue,Yn=re,Jn=Xe,Zn=be,Xn=et,$n=pn.CONFIGURABLE,er=_n,tr=Wn.enforce,nr=Wn.get,rr=String,ar=Object.defineProperty,ir=Kn("".slice),sr=Kn("".replace),or=Kn([].join),dr=Xn&&!Yn((function(){return 8!==ar((function(){}),"length",{value:8}).length})),ur=String(String).split("String"),cr=dn.exports=function(e,t,n){"Symbol("===ir(rr(t),0,7)&&(t="["+sr(rr(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Zn(e,"name")||$n&&e.name!==t)&&(Xn?ar(e,"name",{value:t,configurable:!0}):e.name=t),dr&&n&&Zn(n,"arity")&&e.length!==n.arity&&ar(e,"length",{value:n.arity});try{n&&Zn(n,"constructor")&&n.constructor?Xn&&ar(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=tr(e);return Zn(r,"source")||(r.source=or(ur,"string"==typeof t?t:"")),e};Function.prototype.toString=cr((function(){return Jn(this)&&nr(this).source||er(this)}),"toString");var lr=Xe,hr=$e,fr=dn.exports,pr=J,mr=function(e,t,n,r){r||(r={});var a=r.enumerable,i=void 0!==r.name?r.name:t;if(lr(n)&&fr(n,i,r),r.global)a?e[t]=n:pr(t,n);else{try{r.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=n:hr.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Ar=ue,gr=Ar({}.toString),vr=Ar("".slice),br=function(e){return vr(gr(e),8,-1)},yr=Ke,_r=Xe,wr=br,kr=ze("toStringTag"),Er=Object,xr="Arguments"==wr(function(){return arguments}()),Dr=yr?wr: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),kr))?n:xr?wr(t):"Object"==(r=wr(t))&&_r(t.callee)?"Arguments":r},Sr=Dr,Rr=Ke?{}.toString:function(){return"[object "+Sr(this)+"]"};Ke||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},Cr=ot("span").classList,Ir=Cr&&Cr.constructor&&Cr.constructor.prototype,Or=Ir===Object.prototype?void 0:Ir,Pr=br,Br=ue,Lr=function(e){if("Function"===Pr(e))return Br(e)},Ur=Ot,Mr=ae,Fr=Lr(Lr.bind),jr=function(e,t){return Ur(e),void 0===t?e:Mr?Fr(e,t):function(){return e.apply(t,arguments)}},Gr=re,Nr=br,qr=Object,Hr=ue("".split),Qr=Gr((function(){return!qr("z").propertyIsEnumerable(0)}))?function(e){return"String"==Nr(e)?Hr(e,""):qr(e)}:qr,Vr=Math.ceil,zr=Math.floor,Wr=Math.trunc||function(e){var t=+e;return(t>0?zr:Vr)(t)},Kr=function(e){var t=+e;return t!=t||0===t?0:Wr(t)},Yr=Kr,Jr=Math.min,Zr=function(e){return e>0?Jr(Yr(e),9007199254740991):0},Xr=Zr,$r=function(e){return Xr(e.length)},ea=br,ta=Array.isArray||function(e){return"Array"==ea(e)},na=ue,ra=re,aa=Xe,ia=Dr,sa=_n,oa=function(){},da=[],ua=yt("Reflect","construct"),ca=/^\s*(?:class|function)\b/,la=na(ca.exec),ha=!ca.exec(oa),fa=function(e){if(!aa(e))return!1;try{return ua(oa,da,e),!0}catch(e){return!1}},pa=function(e){if(!aa(e))return!1;switch(ia(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ha||!!la(ca,sa(e))}catch(e){return!0}};pa.sham=!0;var ma=!ua||ra((function(){var e;return fa(fa.call)||!fa(Object)||!fa((function(){e=!0}))||e}))?pa:fa,Aa=ta,ga=ma,va=rt,ba=ze("species"),ya=Array,_a=function(e){var t;return Aa(e)&&(t=e.constructor,(ga(t)&&(t===ya||Aa(t.prototype))||va(t)&&null===(t=t[ba]))&&(t=void 0)),void 0===t?ya:t},wa=function(e,t){return new(_a(e))(0===t?0:t)},ka=jr,Ea=Qr,xa=Ae,Da=$r,Sa=wa,Ra=ue([].push),Ta=function(e){var t=1==e,n=2==e,r=3==e,a=4==e,i=6==e,s=7==e,o=5==e||i;return function(d,u,c,l){for(var h,f,p=xa(d),m=Ea(p),A=ka(u,c),g=Da(m),v=0,b=l||Sa,y=t?b(d,g):n||s?b(d,0):void 0;g>v;v++)if((o||v in m)&&(f=A(h=m[v],v,p),e))if(t)y[v]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:Ra(y,h)}else switch(e){case 4:return!1;case 7:Ra(y,h)}return i?-1:r||a?a:y}},Ca={forEach:Ta(0),map:Ta(1),filter:Ta(2),some:Ta(3),every:Ta(4),find:Ta(5),findIndex:Ta(6),filterReject:Ta(7)},Ia=re,Oa=function(e,t){var n=[][e];return!!n&&Ia((function(){n.call(null,t||function(){return 1},1)}))},Pa=Ca.forEach,Ba=z,La=Tr,Ua=Or,Ma=Oa("forEach")?[].forEach:function(e){return Pa(this,e,arguments.length>1?arguments[1]:void 0)},Fa=Rn,ja=function(e){if(e&&e.forEach!==Ma)try{Fa(e,"forEach",Ma)}catch(t){e.forEach=Ma}};for(var Ga in La)La[Ga]&&ja(Ba[Ga]&&Ba[Ga].prototype);ja(Ua);var Na={},qa={},Ha={}.propertyIsEnumerable,Qa=Object.getOwnPropertyDescriptor,Va=Qa&&!Ha.call({1:2},1);qa.f=Va?function(e){var t=Qa(this,e);return!!t&&t.enumerable}:Ha;var za=Qr,Wa=fe,Ka=function(e){return za(Wa(e))},Ya=et,Ja=gt,Za=qa,Xa=xn,$a=Ka,ei=Yt,ti=be,ni=ut,ri=Object.getOwnPropertyDescriptor;Na.f=Ya?ri:function(e,t){if(e=$a(e),t=ei(t),ni)try{return ri(e,t)}catch(e){}if(ti(e,t))return Xa(!Ja(Za.f,e,t),e[t])};var ai={},ii=Kr,si=Math.max,oi=Math.min,di=function(e,t){var n=ii(e);return n<0?si(n+t,0):oi(n,t)},ui=Ka,ci=di,li=$r,hi=function(e){return function(t,n,r){var a,i=ui(t),s=li(i),o=ci(r,s);if(e&&n!=n){for(;s>o;)if((a=i[o++])!=a)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},fi={includes:hi(!0),indexOf:hi(!1)},pi=be,mi=Ka,Ai=fi.indexOf,gi=Pn,vi=ue([].push),bi=function(e,t){var n,r=mi(e),a=0,i=[];for(n in r)!pi(gi,n)&&pi(r,n)&&vi(i,n);for(;t.length>a;)pi(r,n=t[a++])&&(~Ai(i,n)||vi(i,n));return i},yi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],_i=bi,wi=yi.concat("length","prototype");ai.f=Object.getOwnPropertyNames||function(e){return _i(e,wi)};var ki={};ki.f=Object.getOwnPropertySymbols;var Ei=yt,xi=ai,Di=ki,Si=pt,Ri=ue([].concat),Ti=Ei("Reflect","ownKeys")||function(e){var t=xi.f(Si(e)),n=Di.f;return n?Ri(t,n(e)):t},Ci=be,Ii=Ti,Oi=Na,Pi=$e,Bi=function(e,t,n){for(var r=Ii(t),a=Pi.f,i=Oi.f,s=0;s<r.length;s++){var o=r[s];Ci(e,o)||n&&Ci(n,o)||a(e,o,i(t,o))}},Li=re,Ui=Xe,Mi=/#|\.prototype\./,Fi=function(e,t){var n=Gi[ji(e)];return n==qi||n!=Ni&&(Ui(t)?Li(t):!!t)},ji=Fi.normalize=function(e){return String(e).replace(Mi,".").toLowerCase()},Gi=Fi.data={},Ni=Fi.NATIVE="N",qi=Fi.POLYFILL="P",Hi=Fi,Qi=z,Vi=Na.f,zi=Rn,Wi=mr,Ki=J,Yi=Bi,Ji=Hi,Zi=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?Qi:u?Qi[o]||Ki(o,{}):(Qi[o]||{}).prototype)for(r in t){if(i=t[r],a=e.dontCallGetSet?(s=Vi(n,r))&&s.value:n[r],!Ji(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Yi(i,a)}(e.sham||a&&a.sham)&&zi(i,"sham",!0),Wi(n,r,i,e)}},Xi=bi,$i=yi,es=Object.keys||function(e){return Xi(e,$i)},ts=Ae,ns=es;Zi({target:"Object",stat:!0,forced:re((function(){ns(1)}))},{keys:function(e){return ns(ts(e))}});var rs=Array.isArray,as=Object.prototype.toString,is=rs||function(e){return!!e&&"[object Array]"==as.call(e)},ss={name:"@bygd/gd-sdk-pes",version:"1.40.21",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap inline --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.6","@flownet/lib-connect-to-tcf":"^0.2.10","@fnet/inter-service-js":"^0.9.4",axios:"^0.26.1","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",uuid:"^8.3.2",validator:"^13.6.0"}},os=function(e){var t=ds("object"===S.default(e)?e:a.parseJSON(e));return t&&t.version?ss.version>=t.version?t:void 0:t},ds=function(e){var t=this;if(!is(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){D.default(this,t),e.weight=e.weight||1,n+=e.weight}.bind(this));var r=Math.floor(Math.random()*Math.floor(n));n=0;for(var a=0;a<e.length;a++){var i=e[a];if(r<(n+=i.weight))return i}},us=function(){var e;(e=console).log.apply(e,arguments)},cs=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=Dr,fs=String,ps=function(e){if("Symbol"===hs(e))throw TypeError("Cannot convert a Symbol value to a string");return fs(e)},ms={},As=et,gs=ct,vs=$e,bs=pt,ys=Ka,_s=es;ms.f=As&&!gs?Object.defineProperties:function(e,t){bs(e);for(var n,r=ys(t),a=_s(t),i=a.length,s=0;i>s;)vs.f(e,n=a[s++],r[n]);return e};var ws,ks=yt("document","documentElement"),Es=pt,xs=ms,Ds=yi,Ss=Pn,Rs=ks,Ts=ot,Cs="prototype",Is="script",Os=On("IE_PROTO"),Ps=function(){},Bs=function(e){return"<"+Is+">"+e+"</"+Is+">"},Ls=function(e){e.write(Bs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Us=function(){try{ws=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;Us="undefined"!=typeof document?document.domain&&ws?Ls(ws):(t=Ts("iframe"),n="java"+Is+":",t.style.display="none",Rs.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Bs("document.F=Object")),e.close(),e.F):Ls(ws);for(var r=Ds.length;r--;)delete Us[Cs][Ds[r]];return Us()};Ss[Os]=!0;var Ms=Object.create||function(e,t){var n;return null!==e?(Ps[Cs]=Es(e),n=new Ps,Ps[Cs]=null,n[Os]=e):n=Us(),void 0===t?n:xs.f(n,t)},Fs={},js=Yt,Gs=$e,Ns=xn,Hs=function(e,t,n){var r=js(t);r in e?Gs.f(e,r,Ns(0,n)):e[r]=n},Qs=di,Vs=$r,zs=Hs,Ws=Array,Ks=Math.max,Ys=function(e,t,n){for(var r=Vs(e),a=Qs(t,r),i=Qs(void 0===n?r:n,r),s=Ws(Ks(i-a,0)),o=0;a<i;a++,o++)zs(s,o,e[a]);return s.length=o,s},Js=br,Zs=Ka,Xs=ai.f,$s=Ys,eo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Fs.f=function(e){return eo&&"Window"==Js(e)?function(e){try{return Xs(e)}catch(e){return $s(eo)}}(e):Xs(Zs(e))};var to=dn.exports,no=$e,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)},ao={},so=ze;ao.f=so;var oo=z,uo=be,co=ao,lo=$e.f,ho=function(e){var t=oo.Symbol||(oo.Symbol={});uo(t,e)||lo(t,e,{value:co.f(e)})},fo=gt,po=yt,mo=ze,Ao=mr,go=$e.f,vo=be,bo=ze("toStringTag"),yo=function(e,t,n){e&&!n&&(e=e.prototype),e&&!vo(e,bo)&&go(e,bo,{configurable:!0,value:t})},_o=Zi,wo=z,ko=gt,Eo=ue,xo=et,Do=Le,So=re,Ro=be,To=_t,Co=pt,Io=Ka,Oo=Yt,Po=ps,Bo=xn,Lo=Ms,Uo=es,Mo=ai,Fo=Fs,jo=ki,Go=Na,No=$e,qo=ms,Ho=qa,Qo=mr,Vo=ro,zo=W.exports,Wo=Pn,Ko=Ee,Yo=ze,Jo=ao,Zo=ho,Xo=function(){var e=po("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=mo("toPrimitive");t&&!t[r]&&Ao(t,r,(function(e){return fo(n,this)}),{arity:1})},$o=yo,ed=Wn,td=Ca.forEach,nd=On("hidden"),rd="Symbol",ad="prototype",id=ed.set,sd=ed.getterFor(rd),od=Object[ad],dd=wo.Symbol,ud=dd&&dd[ad],cd=wo.TypeError,ld=wo.QObject,hd=Go.f,fd=No.f,pd=Fo.f,md=Ho.f,Ad=Eo([].push),gd=zo("symbols"),vd=zo("op-symbols"),bd=zo("wks"),yd=!ld||!ld[ad]||!ld[ad].findChild,_d=xo&&So((function(){return 7!=Lo(fd({},"a",{get:function(){return fd(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=hd(od,t);r&&delete od[t],fd(e,t,n),r&&e!==od&&fd(od,t,r)}:fd,wd=function(e,t){var n=gd[e]=Lo(ud);return id(n,{type:rd,tag:e,description:t}),xo||(n.description=t),n},kd=function(e,t,n){e===od&&kd(vd,t,n),Co(e);var r=Oo(t);return Co(n),Ro(gd,r)?(n.enumerable?(Ro(e,nd)&&e[nd][r]&&(e[nd][r]=!1),n=Lo(n,{enumerable:Bo(0,!1)})):(Ro(e,nd)||fd(e,nd,Bo(1,{})),e[nd][r]=!0),_d(e,r,n)):fd(e,r,n)},Ed=function(e,t){Co(e);var n=Io(t),r=Uo(n).concat(Rd(n));return td(r,(function(t){xo&&!ko(xd,n,t)||kd(e,t,n[t])})),e},xd=function(e){var t=Oo(e),n=ko(md,this,t);return!(this===od&&Ro(gd,t)&&!Ro(vd,t))&&(!(n||!Ro(this,t)||!Ro(gd,t)||Ro(this,nd)&&this[nd][t])||n)},Dd=function(e,t){var n=Io(e),r=Oo(t);if(n!==od||!Ro(gd,r)||Ro(vd,r)){var a=hd(n,r);return!a||!Ro(gd,r)||Ro(n,nd)&&n[nd][r]||(a.enumerable=!0),a}},Sd=function(e){var t=pd(Io(e)),n=[];return td(t,(function(e){Ro(gd,e)||Ro(Wo,e)||Ad(n,e)})),n},Rd=function(e){var t=e===od,n=pd(t?vd:Io(e)),r=[];return td(n,(function(e){!Ro(gd,e)||t&&!Ro(od,e)||Ad(r,gd[e])})),r};Do||(Qo(ud=(dd=function(){if(To(ud,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===od&&ko(n,vd,e),Ro(this,nd)&&Ro(this[nd],t)&&(this[nd][t]=!1),_d(this,t,Bo(1,e))};return xo&&yd&&_d(od,t,{configurable:!0,set:n}),wd(t,e)})[ad],"toString",(function(){return sd(this).tag})),Qo(dd,"withoutSetter",(function(e){return wd(Ko(e),e)})),Ho.f=xd,No.f=kd,qo.f=Ed,Go.f=Dd,Mo.f=Fo.f=Sd,jo.f=Rd,Jo.f=function(e){return wd(Yo(e),e)},xo&&(Vo(ud,"description",{configurable:!0,get:function(){return sd(this).description}}),Qo(od,"propertyIsEnumerable",xd,{unsafe:!0}))),_o({global:!0,constructor:!0,wrap:!0,forced:!Do,sham:!Do},{Symbol:dd}),td(Uo(bd),(function(e){Zo(e)})),_o({target:rd,stat:!0,forced:!Do},{useSetter:function(){yd=!0},useSimple:function(){yd=!1}}),_o({target:"Object",stat:!0,forced:!Do,sham:!xo},{create:function(e,t){return void 0===t?Lo(e):Ed(Lo(e),t)},defineProperty:kd,defineProperties:Ed,getOwnPropertyDescriptor:Dd}),_o({target:"Object",stat:!0,forced:!Do},{getOwnPropertyNames:Sd}),Xo(),$o(dd,rd),Wo[nd]=!0;var Td=Le&&!!Symbol.for&&!!Symbol.keyFor,Cd=Zi,Id=yt,Od=be,Pd=ps,Bd=W.exports,Ld=Td,Ud=Bd("string-to-symbol-registry"),Md=Bd("symbol-to-string-registry");Cd({target:"Symbol",stat:!0,forced:!Ld},{for:function(e){var t=Pd(e);if(Od(Ud,t))return Ud[t];var n=Id("Symbol")(t);return Ud[t]=n,Md[n]=t,n}});var Fd=Zi,jd=be,Gd=Dt,Nd=Rt,qd=Td,Hd=(0,W.exports)("symbol-to-string-registry");Fd({target:"Symbol",stat:!0,forced:!qd},{keyFor:function(e){if(!Gd(e))throw TypeError(Nd(e)+" is not a symbol");if(jd(Hd,e))return Hd[e]}});var Qd=ae,Vd=Function.prototype,zd=Vd.apply,Wd=Vd.call,Kd="object"==typeof Reflect&&Reflect.apply||(Qd?Wd.bind(zd):function(){return Wd.apply(zd,arguments)}),Yd=ue([].slice),Jd=ta,Zd=Xe,Xd=br,$d=ps,eu=ue([].push),tu=Zi,nu=yt,ru=Kd,au=gt,iu=ue,su=re,ou=Xe,du=Dt,uu=Yd,cu=function(e){if(Zd(e))return e;if(Jd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];"string"==typeof a?eu(n,a):"number"!=typeof a&&"Number"!=Xd(a)&&"String"!=Xd(a)||eu(n,$d(a))}var i=n.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Jd(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},lu=Le,hu=String,fu=nu("JSON","stringify"),pu=iu(/./.exec),mu=iu("".charAt),Au=iu("".charCodeAt),gu=iu("".replace),vu=iu(1..toString),bu=/[\uD800-\uDFFF]/g,yu=/^[\uD800-\uDBFF]$/,_u=/^[\uDC00-\uDFFF]$/,wu=!lu||su((function(){var e=nu("Symbol")();return"[null]"!=fu([e])||"{}"!=fu({a:e})||"{}"!=fu(Object(e))})),ku=su((function(){return'"\\udf06\\ud834"'!==fu("\udf06\ud834")||'"\\udead"'!==fu("\udead")})),Eu=function(e,t){var n=uu(arguments),r=cu(t);if(ou(r)||void 0!==e&&!du(e))return n[1]=function(e,t){if(ou(r)&&(t=au(r,this,hu(e),t)),!du(t))return t},ru(fu,null,n)},xu=function(e,t,n){var r=mu(n,t-1),a=mu(n,t+1);return pu(yu,e)&&!pu(_u,a)||pu(_u,e)&&!pu(yu,r)?"\\u"+vu(Au(e,0),16):e};fu&&tu({target:"JSON",stat:!0,arity:3,forced:wu||ku},{stringify:function(e,t,n){var r=uu(arguments),a=ru(wu?Eu:fu,null,r);return ku&&"string"==typeof a?gu(a,bu,xu):a}});var Du=ki,Su=Ae;Zi({target:"Object",stat:!0,forced:!Le||re((function(){Du.f(1)}))},{getOwnPropertySymbols:function(e){var t=Du.f;return t?t(Su(e)):[]}});var Ru=re,Tu=Oe,Cu=ze("species"),Iu=function(e){return Tu>=51||!Ru((function(){var t=[];return(t.constructor={})[Cu]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ou=Ca.filter;Zi({target:"Array",proto:!0,forced:!Iu("filter")},{filter:function(e){return Ou(this,e,arguments.length>1?arguments[1]:void 0)}});var Pu=Zi,Bu=re,Lu=Ka,Uu=Na.f,Mu=et;Pu({target:"Object",stat:!0,forced:!Mu||Bu((function(){Uu(1)})),sham:!Mu},{getOwnPropertyDescriptor:function(e,t){return Uu(Lu(e),t)}});var Fu=Ti,ju=Ka,Gu=Na,Nu=Hs;Zi({target:"Object",stat:!0,sham:!et},{getOwnPropertyDescriptors:function(e){for(var t,n,r=ju(e),a=Gu.f,i=Fu(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&Nu(s,t,n);return s}});var qu=Zi,Hu=ta,Qu=ma,Vu=rt,zu=di,Wu=$r,Ku=Ka,Yu=Hs,Ju=ze,Zu=Yd,Xu=Iu("slice"),$u=Ju("species"),ec=Array,tc=Math.max;qu({target:"Array",proto:!0,forced:!Xu},{slice:function(e,t){var n,r,a,i=Ku(this),s=Wu(i),o=zu(e,s),d=zu(void 0===t?s:t,s);if(Hu(i)&&(n=i.constructor,(Qu(n)&&(n===ec||Hu(n.prototype))||Vu(n)&&null===(n=n[$u]))&&(n=void 0),n===ec||void 0===n))return Zu(i,o,d);for(r=new(void 0===n?ec:n)(tc(d-o,0)),a=0;o<d;o++,a++)o in i&&Yu(r,a,i[o]);return r.length=a,r}});var nc=gt,rc=pt,ac=Lt,ic=function(e,t,n){var r,a;rc(e);try{if(!(r=ac(e,"return"))){if("throw"===t)throw n;return n}r=nc(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return rc(r),n},sc=pt,oc=ic,dc={},uc=dc,cc=ze("iterator"),lc=Array.prototype,hc=function(e){return void 0!==e&&(uc.Array===e||lc[cc]===e)},fc=Dr,pc=Lt,mc=ce,Ac=dc,gc=ze("iterator"),vc=function(e){if(!mc(e))return pc(e,gc)||pc(e,"@@iterator")||Ac[fc(e)]},bc=gt,yc=Ot,_c=pt,wc=Rt,kc=vc,Ec=TypeError,xc=function(e,t){var n=arguments.length<2?kc(e):t;if(yc(n))return _c(bc(n,e));throw Ec(wc(e)+" is not iterable")},Dc=jr,Sc=gt,Rc=Ae,Tc=function(e,t,n,r){try{return r?t(sc(n)[0],n[1]):t(n)}catch(t){oc(e,"throw",t)}},Cc=hc,Ic=ma,Oc=$r,Pc=Hs,Bc=xc,Lc=vc,Uc=Array,Mc=function(e){var t=Rc(e),n=Ic(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=Dc(a,r>2?arguments[2]:void 0));var s,o,d,u,c,l,h=Lc(t),f=0;if(!h||this===Uc&&Cc(h))for(s=Oc(t),o=n?new this(s):Uc(s);s>f;f++)l=i?a(t[f],f):t[f],Pc(o,f,l);else for(c=(u=Bc(t,h)).next,o=n?new this:[];!(d=Sc(c,u)).done;f++)l=i?Tc(u,a,[d.value,f],!0):d.value,Pc(o,f,l);return o.length=f,o},Fc=ze("iterator"),jc=!1;try{var Gc=0,Nc={next:function(){return{done:!!Gc++}},return:function(){jc=!0}};Nc[Fc]=function(){return this},Array.from(Nc,(function(){throw 2}))}catch(e){}var qc=function(e,t){if(!t&&!jc)return!1;var n=!1;try{var r={};r[Fc]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Hc=Mc;Zi({target:"Array",stat:!0,forced:!qc((function(e){Array.from(e)}))},{from:Hc});var Qc,Vc,zc,Wc=ue,Kc=Kr,Yc=ps,Jc=fe,Zc=Wc("".charAt),Xc=Wc("".charCodeAt),$c=Wc("".slice),el=function(e){return function(t,n){var r,a,i=Yc(Jc(t)),s=Kc(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=Xc(i,s))<55296||r>56319||s+1===o||(a=Xc(i,s+1))<56320||a>57343?e?Zc(i,s):r:e?$c(i,s,s+2):a-56320+(r-55296<<10)+65536}},tl={codeAt:el(!1),charAt:el(!0)},nl=!re((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),rl=be,al=Xe,il=Ae,sl=nl,ol=On("IE_PROTO"),dl=Object,ul=dl.prototype,cl=sl?dl.getPrototypeOf:function(e){var t=il(e);if(rl(t,ol))return t[ol];var n=t.constructor;return al(n)&&t instanceof n?n.prototype:t instanceof dl?ul:null},ll=re,hl=Xe,fl=rt,pl=cl,ml=mr,Al=ze("iterator"),gl=!1;[].keys&&("next"in(zc=[].keys())?(Vc=pl(pl(zc)))!==Object.prototype&&(Qc=Vc):gl=!0);var vl=!fl(Qc)||ll((function(){var e={};return Qc[Al].call(e)!==e}));vl&&(Qc={}),hl(Qc[Al])||ml(Qc,Al,(function(){return this}));var bl={IteratorPrototype:Qc,BUGGY_SAFARI_ITERATORS:gl},yl=bl.IteratorPrototype,_l=Ms,wl=xn,kl=yo,El=dc,xl=function(){return this},Dl=function(e,t,n,r){var a=t+" Iterator";return e.prototype=_l(yl,{next:wl(+!r,n)}),kl(e,a,!1),El[a]=xl,e},Sl=ue,Rl=Ot,Tl=Xe,Cl=String,Il=TypeError,Ol=function(e,t,n){try{return Sl(Rl(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},Pl=pt,Bl=function(e){if("object"==typeof e||Tl(e))return e;throw Il("Can't set "+Cl(e)+" as a prototype")},Ll=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ol(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Pl(n),Bl(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ul=Zi,Ml=gt,Fl=Xe,jl=Dl,Gl=cl,Nl=Ll,ql=yo,Hl=Rn,Ql=mr,Vl=dc,zl=pn.PROPER,Wl=pn.CONFIGURABLE,Kl=bl.IteratorPrototype,Yl=bl.BUGGY_SAFARI_ITERATORS,Jl=ze("iterator"),Zl="keys",Xl="values",$l="entries",eh=function(){return this},th=function(e,t,n,r,a,i,s){jl(n,t,r);var o,d,u,c=function(e){if(e===a&&m)return m;if(!Yl&&e in f)return f[e];switch(e){case Zl:case Xl:case $l:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[Jl]||f["@@iterator"]||a&&f[a],m=!Yl&&p||c(a),A="Array"==t&&f.entries||p;if(A&&(o=Gl(A.call(new e)))!==Object.prototype&&o.next&&(Gl(o)!==Kl&&(Nl?Nl(o,Kl):Fl(o[Jl])||Ql(o,Jl,eh)),ql(o,l,!0)),zl&&a==Xl&&p&&p.name!==Xl&&(Wl?Hl(f,"name",Xl):(h=!0,m=function(){return Ml(p,this)})),a)if(d={values:c(Xl),keys:i?m:c(Zl),entries:c($l)},s)for(u in d)(Yl||h||!(u in f))&&Ql(f,u,d[u]);else Ul({target:t,proto:!0,forced:Yl||h},d);return f[Jl]!==m&&Ql(f,Jl,m,{name:a}),Vl[t]=m,d},nh=function(e,t){return{value:e,done:t}},rh=tl.charAt,ah=ps,ih=Wn,sh=th,oh=nh,dh="String Iterator",uh=ih.set,ch=ih.getterFor(dh);sh(String,"String",(function(e){uh(this,{type:dh,string:ah(e),index:0})}),(function(){var e,t=ch(this),n=t.string,r=t.index;return r>=n.length?oh(void 0,!0):(e=rh(n,r),t.index+=e.length,oh(e,!1))}));var lh=pt,hh=function(){var e=lh(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},fh=re,ph=z.RegExp,mh=fh((function(){var e=ph("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ah=mh||fh((function(){return!ph("a","y").sticky})),gh={BROKEN_CARET:mh||fh((function(){var e=ph("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ah,UNSUPPORTED_Y:mh},vh=re,bh=z.RegExp,yh=vh((function(){var e=bh(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),_h=re,wh=z.RegExp,kh=_h((function(){var e=wh("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Eh=gt,xh=ue,Dh=ps,Sh=hh,Rh=gh,Th=W.exports,Ch=Ms,Ih=Wn.get,Oh=yh,Ph=kh,Bh=Th("native-string-replace",String.prototype.replace),Lh=RegExp.prototype.exec,Uh=Lh,Mh=xh("".charAt),Fh=xh("".indexOf),jh=xh("".replace),Gh=xh("".slice),Nh=function(){var e=/a/,t=/b*/g;return Eh(Lh,e,"a"),Eh(Lh,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),qh=Rh.BROKEN_CARET,Hh=void 0!==/()??/.exec("")[1];(Nh||Hh||qh||Oh||Ph)&&(Uh=function(e){var t,n,r,a,i,s,o,d=this,u=Ih(d),c=Dh(e),l=u.raw;if(l)return l.lastIndex=d.lastIndex,t=Eh(Uh,l,c),d.lastIndex=l.lastIndex,t;var h=u.groups,f=qh&&d.sticky,p=Eh(Sh,d),m=d.source,A=0,g=c;if(f&&(p=jh(p,"y",""),-1===Fh(p,"g")&&(p+="g"),g=Gh(c,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==Mh(c,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,A++),n=new RegExp("^(?:"+m+")",p)),Hh&&(n=new RegExp("^"+m+"$(?!\\s)",p)),Nh&&(r=d.lastIndex),a=Eh(Lh,f?n:d,g),f?a?(a.input=Gh(a.input,A),a[0]=Gh(a[0],A),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:Nh&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),Hh&&a&&a.length>1&&Eh(Bh,a[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&h)for(a.groups=s=Ch(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var Qh=Uh;Zi({target:"RegExp",proto:!0,forced:/./.exec!==Qh},{exec:Qh});var Vh=Zi,zh=et,Wh=ue,Kh=be,Yh=Xe,Jh=_t,Zh=ps,Xh=ro,$h=Bi,ef=z.Symbol,tf=ef&&ef.prototype;if(zh&&Yh(ef)&&(!("description"in tf)||void 0!==ef().description)){var nf={},rf=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Zh(arguments[0]),t=Jh(tf,this)?new ef(e):void 0===e?ef():ef(e);return""===e&&(nf[t]=!0),t};$h(rf,ef),rf.prototype=tf,tf.constructor=rf;var af="Symbol(test)"==String(ef("test")),sf=Wh(tf.valueOf),of=Wh(tf.toString),df=/^Symbol\((.*)\)[^)]+$/,uf=Wh("".replace),cf=Wh("".slice);Xh(tf,"description",{configurable:!0,get:function(){var e=sf(this);if(Kh(nf,e))return"";var t=of(e),n=af?cf(t,7,-1):uf(t,df,"$1");return""===n?void 0:n}}),Vh({global:!0,constructor:!0,forced:!0},{Symbol:rf})}ho("iterator");var lf=ze,hf=Ms,ff=$e.f,pf=lf("unscopables"),mf=Array.prototype;null==mf[pf]&&ff(mf,pf,{configurable:!0,value:hf(null)});var Af=function(e){mf[pf][e]=!0},gf=Ka,vf=Af,bf=dc,yf=Wn,_f=$e.f,wf=th,kf=nh,Ef=et,xf="Array Iterator",Df=yf.set,Sf=yf.getterFor(xf),Rf=wf(Array,"Array",(function(e,t){Df(this,{type:xf,target:gf(e),index:0,kind:t})}),(function(){var e=Sf(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,kf(void 0,!0)):kf("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),Tf=bf.Arguments=bf.Array;if(vf("keys"),vf("values"),vf("entries"),Ef&&"values"!==Tf.name)try{_f(Tf,"name",{value:"values"})}catch(e){}var Cf=z,If=Tr,Of=Or,Pf=Rf,Bf=Rn,Lf=ze,Uf=Lf("iterator"),Mf=Lf("toStringTag"),Ff=Pf.values,jf=function(e,t){if(e){if(e[Uf]!==Ff)try{Bf(e,Uf,Ff)}catch(t){e[Uf]=Ff}if(e[Mf]||Bf(e,Mf,t),If[t])for(var n in Pf)if(e[n]!==Pf[n])try{Bf(e,n,Pf[n])}catch(t){e[n]=Pf[n]}}};for(var Gf in If)jf(Cf[Gf]&&Cf[Gf].prototype,Gf);jf(Of,"DOMTokenList");var Nf,qf,Hf,Qf,Vf="undefined"!=typeof process&&"process"==br(process),zf=yt,Wf=ro,Kf=et,Yf=ze("species"),Jf=function(e){var t=zf(e);Kf&&t&&!t[Yf]&&Wf(t,Yf,{configurable:!0,get:function(){return this}})},Zf=_t,Xf=TypeError,$f=function(e,t){if(Zf(t,e))return e;throw Xf("Incorrect invocation")},ep=ma,tp=Rt,np=TypeError,rp=pt,ap=function(e){if(ep(e))return e;throw np(tp(e)+" is not a constructor")},ip=ce,sp=ze("species"),op=function(e,t){var n,r=rp(e).constructor;return void 0===r||ip(n=rp(r)[sp])?t:ap(n)},dp=TypeError,up=function(e,t){if(e<t)throw dp("Not enough arguments");return e},cp=/(?:ipad|iphone|ipod).*applewebkit/i.test(xe),lp=z,hp=Kd,fp=jr,pp=Xe,mp=be,Ap=re,gp=ks,vp=Yd,bp=ot,yp=up,_p=cp,wp=Vf,kp=lp.setImmediate,Ep=lp.clearImmediate,xp=lp.process,Dp=lp.Dispatch,Sp=lp.Function,Rp=lp.MessageChannel,Tp=lp.String,Cp=0,Ip={},Op="onreadystatechange";Ap((function(){Nf=lp.location}));var Pp=function(e){if(mp(Ip,e)){var t=Ip[e];delete Ip[e],t()}},Bp=function(e){return function(){Pp(e)}},Lp=function(e){Pp(e.data)},Up=function(e){lp.postMessage(Tp(e),Nf.protocol+"//"+Nf.host)};kp&&Ep||(kp=function(e){yp(arguments.length,1);var t=pp(e)?e:Sp(e),n=vp(arguments,1);return Ip[++Cp]=function(){hp(t,void 0,n)},qf(Cp),Cp},Ep=function(e){delete Ip[e]},wp?qf=function(e){xp.nextTick(Bp(e))}:Dp&&Dp.now?qf=function(e){Dp.now(Bp(e))}:Rp&&!_p?(Qf=(Hf=new Rp).port2,Hf.port1.onmessage=Lp,qf=fp(Qf.postMessage,Qf)):lp.addEventListener&&pp(lp.postMessage)&&!lp.importScripts&&Nf&&"file:"!==Nf.protocol&&!Ap(Up)?(qf=Up,lp.addEventListener("message",Lp,!1)):qf=Op in bp("script")?function(e){gp.appendChild(bp("script"))[Op]=function(){gp.removeChild(this),Pp(e)}}:function(e){setTimeout(Bp(e),0)});var Mp={set:kp,clear:Ep},Fp=function(){this.head=null,this.tail=null};Fp.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 jp,Gp,Np,qp,Hp,Qp=Fp,Vp=/ipad|iphone|ipod/i.test(xe)&&"undefined"!=typeof Pebble,zp=/web0s(?!.*chrome)/i.test(xe),Wp=z,Kp=jr,Yp=Na.f,Jp=Mp.set,Zp=Qp,Xp=cp,$p=Vp,em=zp,tm=Vf,nm=Wp.MutationObserver||Wp.WebKitMutationObserver,rm=Wp.document,am=Wp.process,im=Wp.Promise,sm=Yp(Wp,"queueMicrotask"),om=sm&&sm.value;if(!om){var dm=new Zp,um=function(){var e,t;for(tm&&(e=am.domain)&&e.exit();t=dm.get();)try{t()}catch(e){throw dm.head&&jp(),e}e&&e.enter()};Xp||tm||em||!nm||!rm?!$p&&im&&im.resolve?((qp=im.resolve(void 0)).constructor=im,Hp=Kp(qp.then,qp),jp=function(){Hp(um)}):tm?jp=function(){am.nextTick(um)}:(Jp=Kp(Jp,Wp),jp=function(){Jp(um)}):(Gp=!0,Np=rm.createTextNode(""),new nm(um).observe(Np,{characterData:!0}),jp=function(){Np.data=Gp=!Gp}),om=function(e){dm.head||jp(),dm.add(e)}}var cm=om,lm=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},hm=z.Promise,fm="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,pm=!fm&&!Vf&&"object"==typeof window&&"object"==typeof document,mm=z,Am=hm,gm=Xe,vm=Hi,bm=_n,ym=ze,_m=pm,wm=fm,km=Oe;Am&&Am.prototype;var Em=ym("species"),xm=!1,Dm=gm(mm.PromiseRejectionEvent),Sm=vm("Promise",(function(){var e=bm(Am),t=e!==String(Am);if(!t&&66===km)return!0;if(!km||km<51||!/native code/.test(e)){var n=new Am((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[Em]=r,!(xm=n.then((function(){}))instanceof r))return!0}return!t&&(_m||wm)&&!Dm})),Rm={CONSTRUCTOR:Sm,REJECTION_EVENT:Dm,SUBCLASSING:xm},Tm={},Cm=Ot,Im=TypeError,Om=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw Im("Bad Promise constructor");t=e,n=r})),this.resolve=Cm(t),this.reject=Cm(n)};Tm.f=function(e){return new Om(e)};var Pm,Bm,Lm,Um=Zi,Mm=Vf,Fm=z,jm=gt,Gm=mr,Nm=Ll,qm=yo,Hm=Jf,Qm=Ot,Vm=Xe,zm=rt,Wm=$f,Km=op,Ym=Mp.set,Jm=cm,Zm=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},Xm=lm,$m=Qp,eA=Wn,tA=hm,nA=Tm,rA="Promise",aA=Rm.CONSTRUCTOR,iA=Rm.REJECTION_EVENT,sA=Rm.SUBCLASSING,oA=eA.getterFor(rA),dA=eA.set,uA=tA&&tA.prototype,cA=tA,lA=uA,hA=Fm.TypeError,fA=Fm.document,pA=Fm.process,mA=nA.f,AA=mA,gA=!!(fA&&fA.createEvent&&Fm.dispatchEvent),vA="unhandledrejection",bA=function(e){var t;return!(!zm(e)||!Vm(t=e.then))&&t},yA=function(e,t){var n,r,a,i=t.value,s=1==t.state,o=s?e.ok:e.fail,d=e.resolve,u=e.reject,c=e.domain;try{o?(s||(2===t.rejection&&xA(t),t.rejection=1),!0===o?n=i:(c&&c.enter(),n=o(i),c&&(c.exit(),a=!0)),n===e.promise?u(hA("Promise-chain cycle")):(r=bA(n))?jm(r,n,d,u):d(n)):u(i)}catch(e){c&&!a&&c.exit(),u(e)}},_A=function(e,t){e.notified||(e.notified=!0,Jm((function(){for(var n,r=e.reactions;n=r.get();)yA(n,e);e.notified=!1,t&&!e.rejection&&kA(e)})))},wA=function(e,t,n){var r,a;gA?((r=fA.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Fm.dispatchEvent(r)):r={promise:t,reason:n},!iA&&(a=Fm["on"+e])?a(r):e===vA&&Zm("Unhandled promise rejection",n)},kA=function(e){jm(Ym,Fm,(function(){var t,n=e.facade,r=e.value;if(EA(e)&&(t=Xm((function(){Mm?pA.emit("unhandledRejection",r,n):wA(vA,n,r)})),e.rejection=Mm||EA(e)?2:1,t.error))throw t.value}))},EA=function(e){return 1!==e.rejection&&!e.parent},xA=function(e){jm(Ym,Fm,(function(){var t=e.facade;Mm?pA.emit("rejectionHandled",t):wA("rejectionhandled",t,e.value)}))},DA=function(e,t,n){return function(r){e(t,r,n)}},SA=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,_A(e,!0))},RA=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw hA("Promise can't be resolved itself");var r=bA(t);r?Jm((function(){var n={done:!1};try{jm(r,t,DA(RA,n,e),DA(SA,n,e))}catch(t){SA(n,t,e)}})):(e.value=t,e.state=1,_A(e,!1))}catch(t){SA({done:!1},t,e)}}};if(aA&&(lA=(cA=function(e){Wm(this,lA),Qm(e),jm(Pm,this);var t=oA(this);try{e(DA(RA,t),DA(SA,t))}catch(e){SA(t,e)}}).prototype,(Pm=function(e){dA(this,{type:rA,done:!1,notified:!1,parent:!1,reactions:new $m,rejection:!1,state:0,value:void 0})}).prototype=Gm(lA,"then",(function(e,t){var n=oA(this),r=mA(Km(this,cA));return n.parent=!0,r.ok=!Vm(e)||e,r.fail=Vm(t)&&t,r.domain=Mm?pA.domain:void 0,0==n.state?n.reactions.add(r):Jm((function(){yA(r,n)})),r.promise})),Bm=function(){var e=new Pm,t=oA(e);this.promise=e,this.resolve=DA(RA,t),this.reject=DA(SA,t)},nA.f=mA=function(e){return e===cA||undefined===e?new Bm(e):AA(e)},Vm(tA)&&uA!==Object.prototype)){Lm=uA.then,sA||Gm(uA,"then",(function(e,t){var n=this;return new cA((function(e,t){jm(Lm,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete uA.constructor}catch(e){}Nm&&Nm(uA,lA)}Um({global:!0,constructor:!0,wrap:!0,forced:aA},{Promise:cA}),qm(cA,rA,!1),Hm(rA);var TA=jr,CA=gt,IA=pt,OA=Rt,PA=hc,BA=$r,LA=_t,UA=xc,MA=vc,FA=ic,jA=TypeError,GA=function(e,t){this.stopped=e,this.result=t},NA=GA.prototype,qA=function(e,t,n){var r,a,i,s,o,d,u,c=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),m=TA(t,c),A=function(e){return r&&FA(r,"normal",e),new GA(!0,e)},g=function(e){return l?(IA(e),p?m(e[0],e[1],A):m(e[0],e[1])):p?m(e,A):m(e)};if(h)r=e.iterator;else if(f)r=e;else{if(!(a=MA(e)))throw jA(OA(e)+" is not iterable");if(PA(a)){for(i=0,s=BA(e);s>i;i++)if((o=g(e[i]))&&LA(NA,o))return o;return new GA(!1)}r=UA(e,a)}for(d=h?e.next:r.next;!(u=CA(d,r)).done;){try{o=g(u.value)}catch(e){FA(r,"throw",e)}if("object"==typeof o&&o&&LA(NA,o))return o}return new GA(!1)},HA=hm,QA=Rm.CONSTRUCTOR||!qc((function(e){HA.all(e).then(void 0,(function(){}))})),VA=gt,zA=Ot,WA=Tm,KA=lm,YA=qA;Zi({target:"Promise",stat:!0,forced:QA},{all:function(e){var t=this,n=WA.f(t),r=n.resolve,a=n.reject,i=KA((function(){var n=zA(t.resolve),i=[],s=0,o=1;YA(e,(function(e){var d=s++,u=!1;o++,VA(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise}});var JA=Zi,ZA=Rm.CONSTRUCTOR,XA=hm,$A=yt,eg=Xe,tg=mr,ng=XA&&XA.prototype;if(JA({target:"Promise",proto:!0,forced:ZA,real:!0},{catch:function(e){return this.then(void 0,e)}}),eg(XA)){var rg=$A("Promise").prototype.catch;ng.catch!==rg&&tg(ng,"catch",rg,{unsafe:!0})}var ag=gt,ig=Ot,sg=Tm,og=lm,dg=qA;Zi({target:"Promise",stat:!0,forced:QA},{race:function(e){var t=this,n=sg.f(t),r=n.reject,a=og((function(){var a=ig(t.resolve);dg(e,(function(e){ag(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var ug=gt,cg=Tm;Zi({target:"Promise",stat:!0,forced:Rm.CONSTRUCTOR},{reject:function(e){var t=cg.f(this);return ug(t.reject,void 0,e),t.promise}});var lg=pt,hg=rt,fg=Tm,pg=function(e,t){if(lg(e),hg(t)&&t.constructor===e)return t;var n=fg.f(e);return(0,n.resolve)(t),n.promise},mg=Zi,Ag=Rm.CONSTRUCTOR,gg=pg;yt("Promise"),mg({target:"Promise",stat:!0,forced:Ag},{resolve:function(e){return gg(this,e)}});var vg=TypeError,bg=Zi,yg=re,_g=ta,wg=rt,kg=Ae,Eg=$r,xg=function(e){if(e>9007199254740991)throw vg("Maximum allowed index exceeded");return e},Dg=Hs,Sg=wa,Rg=Iu,Tg=Oe,Cg=ze("isConcatSpreadable"),Ig=Tg>=51||!yg((function(){var e=[];return e[Cg]=!1,e.concat()[0]!==e})),Og=function(e){if(!wg(e))return!1;var t=e[Cg];return void 0!==t?!!t:_g(e)};bg({target:"Array",proto:!0,arity:1,forced:!Ig||!Rg("concat")},{concat:function(e){var t,n,r,a,i,s=kg(this),o=Sg(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(Og(i=-1===t?s:arguments[t]))for(a=Eg(i),xg(d+a),n=0;n<a;n++,d++)n in i&&Dg(o,d,i[n]);else xg(d+1),Dg(o,d++,i);return o.length=d,o}});var Pg=et,Bg=pn.EXISTS,Lg=ue,Ug=ro,Mg=Function.prototype,Fg=Lg(Mg.toString),jg=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Gg=Lg(jg.exec);function Ng(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 qg(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 qg(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function qg(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 Hg(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 Qg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hg(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Pg&&!Bg&&Ug(Mg,"name",{configurable:!0,get:function(){try{return Gg(jg,Fg(this))[1]}catch(e){return""}}});var Vg,zg={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"}},Wg={},Kg=function(e,t){Wg[e]=Qg(Qg({},t),{},{isLoading:!1})},Yg=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(D.default(this,t),document.getElementById(n))e();else{var i=document.createElement("script");i.onload=function(){e()},i.id=n,i.setAttribute("crossorigin",!0),i.src=r,document.head.appendChild(i)}}.bind(this))},Jg=function(){var e=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u;return R.default.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(!(r=Wg[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=Ng(r.dependencies),e.prev=8,a.s();case 10:if((i=a.n()).done){e.next=26;break}if(s=i.value,e.prev=12,o=zg[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Yg({id:s,src:zg[s].src});case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(12),d=s.id,u=s.src,console.log("Could not load external script ".concat(d," ").concat(u),e.t0);case 24:e.next=10;break;case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(8),a.e(e.t1);case 31:return e.prev=31,a.f(),e.finish(31);case 34:return e.prev=34,e.next=37,Yg({id:t,src:r.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(r.source,"."),e.t2);case 43:return r.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(t){return e.apply(this,arguments)}}(),Zg=T.default((function e(){var t=this;C.default(this,e),I.default(this,"load",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jg("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),I.default(this,"showLeaderboard",function(){var e=x.default(R.default.mark((function e(n){var r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.GD_OPTIONS.gameId,t.leaderboard){e.next=4;break}return e.next=4,t.load();case 4:t.leaderboard.showLeaderBoard(r,n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),I.default(this,"addScore",function(){var e=x.default(R.default.mark((function e(n){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.leaderboard){e.next=3;break}return e.next=3,t.load();case 3:t.leaderboard.addScore(n);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.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"]},Kg(this.moduleName,this.moduleConfig)})),Xg=new Zg,$g=rt,ev=br,tv=ze("match"),nv=function(e){var t;return $g(e)&&(void 0!==(t=e[tv])?!!t:"RegExp"==ev(e))},rv=nv,av=TypeError,iv=function(e){if(rv(e))throw av("The method doesn't accept regular expressions");return e},sv=ze("match"),ov=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[sv]=!1,"/./"[e](t)}catch(e){}}return!1},dv=Zi,uv=Lr,cv=Na.f,lv=Zr,hv=ps,fv=iv,pv=fe,mv=ov,Av=uv("".startsWith),gv=uv("".slice),vv=Math.min,bv=mv("startsWith");dv({target:"String",proto:!0,forced:!!(bv||(Vg=cv(String.prototype,"startsWith"),!Vg||Vg.writable))&&!bv},{startsWith:function(e){var t=hv(pv(this));fv(e);var n=lv(vv(arguments.length>1?arguments[1]:void 0,t.length)),r=hv(e);return Av?Av(t,r,n):gv(t,n,n+r.length)===r}});var yv=gt,_v=be,wv=_t,kv=hh,Ev=RegExp.prototype,xv=function(e){var t=e.flags;return void 0!==t||"flags"in Ev||_v(e,"flags")||!wv(Ev,e)?t:yv(kv,e)},Dv=pn.PROPER,Sv=mr,Rv=pt,Tv=ps,Cv=re,Iv=xv,Ov="toString",Pv=RegExp.prototype[Ov],Bv=Cv((function(){return"/a/b"!=Pv.call({source:"a",flags:"b"})})),Lv=Dv&&Pv.name!=Ov;(Bv||Lv)&&Sv(RegExp.prototype,Ov,(function(){var e=Rv(this);return"/"+Tv(e.source)+"/"+Tv(Iv(e))}),{unsafe:!0});var Uv=Lr,Mv=mr,Fv=Qh,jv=re,Gv=ze,Nv=Rn,qv=Gv("species"),Hv=RegExp.prototype,Qv=function(e,t,n,r){var a=Gv(e),i=!jv((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!jv((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[qv]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=Uv(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=Uv(e),d=t.exec;return d===Fv||d===Hv.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Mv(String.prototype,e,d[0]),Mv(Hv,a,d[1])}r&&Nv(Hv[a],"sham",!0)},Vv=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},zv=gt,Wv=pt,Kv=Xe,Yv=br,Jv=Qh,Zv=TypeError,Xv=function(e,t){var n=e.exec;if(Kv(n)){var r=zv(n,e,t);return null!==r&&Wv(r),r}if("RegExp"===Yv(e))return zv(Jv,e,t);throw Zv("RegExp#exec called on incompatible receiver")},$v=gt,eb=pt,tb=ce,nb=fe,rb=Vv,ab=ps,ib=Lt,sb=Xv;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){I.default(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}Qv("search",(function(e,t,n){return[function(t){var n=nb(this),r=tb(t)?void 0:ib(t,e);return r?$v(r,t,n):new RegExp(t)[e](ab(n))},function(e){var r=eb(this),a=ab(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;rb(s,0)||(r.lastIndex=0);var o=sb(r,a);return rb(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var ub,cb,lb=function(){function e(){C.default(this,e)}return T.default(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.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled;console.log("noMinijuegosSDK",p);var m=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:A,depth:a.getIframeDepth(),domainMatched:s===o,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.default(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.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new O.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new O.default(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.default(e,!0);return n.query=db(db({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}}]),e}(),hb=function(){try{return(new lb).getBridgeContext()}catch(e){return{}}}(),fb={userDeclinedTracking:document.location.search.indexOf("gdpr-tracking=0")>=0||document.cookie.indexOf("ogdpr_tracking=0")>=0,whitelabelPartner:(ub=!1,(cb=a.getQueryParams("xanthophyll")).hasOwnProperty("xanthophyll")&&"true"===cb.xanthophyll&&(ub=!0),ub)},pb=tl.charAt,mb=ue,Ab=Ae,gb=Math.floor,vb=mb("".charAt),bb=mb("".replace),yb=mb("".slice),_b=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,wb=/\$([$&'`]|\d{1,2})/g,kb=Kd,Eb=gt,xb=ue,Db=Qv,Sb=re,Rb=pt,Tb=Xe,Cb=ce,Ib=Kr,Ob=Zr,Pb=ps,Bb=fe,Lb=function(e,t,n){return t+(n?pb(e,t).length:1)},Ub=Lt,Mb=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=wb;return void 0!==a&&(a=Ab(a),d=_b),bb(i,d,(function(i,d){var u;switch(vb(d,0)){case"$":return"$";case"&":return e;case"`":return yb(t,0,n);case"'":return yb(t,s);case"<":u=a[yb(d,1,-1)];break;default:var c=+d;if(0===c)return i;if(c>o){var l=gb(c/10);return 0===l?i:l<=o?void 0===r[l-1]?vb(d,1):r[l-1]+vb(d,1):i}u=r[c-1]}return void 0===u?"":u}))},Fb=Xv,jb=ze("replace"),Gb=Math.max,Nb=Math.min,qb=xb([].concat),Hb=xb([].push),Qb=xb("".indexOf),Vb=xb("".slice),zb="$0"==="a".replace(/./,"$0"),Wb=!!/./[jb]&&""===/./[jb]("a","$0");Db("replace",(function(e,t,n){var r=Wb?"$":"$0";return[function(e,n){var r=Bb(this),a=Cb(e)?void 0:Ub(e,jb);return a?Eb(a,e,r,n):Eb(t,Pb(r),e,n)},function(e,a){var i=Rb(this),s=Pb(e);if("string"==typeof a&&-1===Qb(a,r)&&-1===Qb(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=Tb(a);d||(a=Pb(a));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var l=[];;){var h=Fb(i,s);if(null===h)break;if(Hb(l,h),!u)break;""===Pb(h[0])&&(i.lastIndex=Lb(s,Ob(i.lastIndex),c))}for(var f,p="",m=0,A=0;A<l.length;A++){for(var g=Pb((h=l[A])[0]),v=Gb(Nb(Ib(h.index),s.length),0),b=[],y=1;y<h.length;y++)Hb(b,void 0===(f=h[y])?f:String(f));var _=h.groups;if(d){var w=qb([g],b,v,s);void 0!==_&&Hb(w,_);var k=Pb(kb(a,void 0,w))}else k=Mb(g,s,v,b,_,a);v>=m&&(p+=Vb(s,m,v)+k,m=v+g.length)}return p+Vb(s,m)}]}),!!Sb((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!zb||Wb);var Kb=re,Yb=et,Jb=ze("iterator"),Zb=!Kb((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&&!Yb||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Jb]||"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})),Xb=mr,$b=Ys,ey=Math.floor,ty=function(e,t){var n=e.length,r=ey(n/2);return n<8?ny(e,t):ry(e,ty($b(e,0,r),t),ty($b(e,r),t),t)},ny=function(e,t){for(var n,r,a=e.length,i=1;i<a;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},ry=function(e,t,n,r){for(var a=t.length,i=n.length,s=0,o=0;s<a||o<i;)e[s+o]=s<a&&o<i?r(t[s],n[o])<=0?t[s++]:n[o++]:s<a?t[s++]:n[o++];return e},ay=Zi,iy=z,sy=gt,oy=ue,dy=et,uy=Zb,cy=mr,ly=ro,hy=function(e,t,n){for(var r in t)Xb(e,r,t[r],n);return e},fy=yo,py=Dl,my=Wn,Ay=$f,gy=Xe,vy=be,by=jr,yy=Dr,_y=pt,wy=rt,ky=ps,Ey=Ms,xy=xn,Dy=xc,Sy=vc,Ry=up,Ty=ty,Cy=ze("iterator"),Iy="URLSearchParams",Oy=Iy+"Iterator",Py=my.set,By=my.getterFor(Iy),Ly=my.getterFor(Oy),Uy=Object.getOwnPropertyDescriptor,My=function(e){if(!dy)return iy[e];var t=Uy(iy,e);return t&&t.value},Fy=My("fetch"),jy=My("Request"),Gy=My("Headers"),Ny=jy&&jy.prototype,qy=Gy&&Gy.prototype,Hy=iy.RegExp,Qy=iy.TypeError,Vy=iy.decodeURIComponent,zy=iy.encodeURIComponent,Wy=oy("".charAt),Ky=oy([].join),Yy=oy([].push),Jy=oy("".replace),Zy=oy([].shift),Xy=oy([].splice),$y=oy("".split),e_=oy("".slice),t_=/\+/g,n_=Array(4),r_=function(e){return n_[e-1]||(n_[e-1]=Hy("((?:%[\\da-f]{2}){"+e+"})","gi"))},a_=function(e){try{return Vy(e)}catch(t){return e}},i_=function(e){var t=Jy(e,t_," "),n=4;try{return Vy(t)}catch(e){for(;n;)t=Jy(t,r_(n--),a_);return t}},s_=/[!'()~]|%20/g,o_={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},d_=function(e){return o_[e]},u_=function(e){return Jy(zy(e),s_,d_)},c_=py((function(e,t){Py(this,{type:Oy,iterator:Dy(By(e).entries),kind:t})}),"Iterator",(function(){var e=Ly(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),l_=function(e){this.entries=[],this.url=null,void 0!==e&&(wy(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Wy(e,0)?e_(e,1):e:ky(e)))};l_.prototype={type:Iy,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,a,i,s,o,d=Sy(e);if(d)for(n=(t=Dy(e,d)).next;!(r=sy(n,t)).done;){if(i=(a=Dy(_y(r.value))).next,(s=sy(i,a)).done||(o=sy(i,a)).done||!sy(i,a).done)throw Qy("Expected sequence with length 2");Yy(this.entries,{key:ky(s.value),value:ky(o.value)})}else for(var u in e)vy(e,u)&&Yy(this.entries,{key:u,value:ky(e[u])})},parseQuery:function(e){if(e)for(var t,n,r=$y(e,"&"),a=0;a<r.length;)(t=r[a++]).length&&(n=$y(t,"="),Yy(this.entries,{key:i_(Zy(n)),value:i_(Ky(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Yy(n,u_(e.key)+"="+u_(e.value));return Ky(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var h_=function(){Ay(this,f_);var e=Py(this,new l_(arguments.length>0?arguments[0]:void 0));dy||(this.length=e.entries.length)},f_=h_.prototype;if(hy(f_,{append:function(e,t){Ry(arguments.length,2);var n=By(this);Yy(n.entries,{key:ky(e),value:ky(t)}),dy||this.length++,n.updateURL()},delete:function(e){Ry(arguments.length,1);for(var t=By(this),n=t.entries,r=ky(e),a=0;a<n.length;)n[a].key===r?Xy(n,a,1):a++;dy||(this.length=n.length),t.updateURL()},get:function(e){Ry(arguments.length,1);for(var t=By(this).entries,n=ky(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Ry(arguments.length,1);for(var t=By(this).entries,n=ky(e),r=[],a=0;a<t.length;a++)t[a].key===n&&Yy(r,t[a].value);return r},has:function(e){Ry(arguments.length,1);for(var t=By(this).entries,n=ky(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Ry(arguments.length,1);for(var n,r=By(this),a=r.entries,i=!1,s=ky(e),o=ky(t),d=0;d<a.length;d++)(n=a[d]).key===s&&(i?Xy(a,d--,1):(i=!0,n.value=o));i||Yy(a,{key:s,value:o}),dy||(this.length=a.length),r.updateURL()},sort:function(){var e=By(this);Ty(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=By(this).entries,r=by(e,arguments.length>1?arguments[1]:void 0),a=0;a<n.length;)r((t=n[a++]).value,t.key,this)},keys:function(){return new c_(this,"keys")},values:function(){return new c_(this,"values")},entries:function(){return new c_(this,"entries")}},{enumerable:!0}),cy(f_,Cy,f_.entries,{name:"entries"}),cy(f_,"toString",(function(){return By(this).serialize()}),{enumerable:!0}),dy&&ly(f_,"size",{get:function(){return By(this).entries.length},configurable:!0,enumerable:!0}),fy(h_,Iy),ay({global:!0,constructor:!0,forced:!uy},{URLSearchParams:h_}),!uy&&gy(Gy)){var p_=oy(qy.has),m_=oy(qy.set),A_=function(e){if(wy(e)){var t,n=e.body;if(yy(n)===Iy)return t=e.headers?new Gy(e.headers):new Gy,p_(t,"content-type")||m_(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ey(e,{body:xy(0,ky(n)),headers:xy(0,t)})}return e};if(gy(Fy)&&ay({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Fy(e,arguments.length>1?A_(arguments[1]):{})}}),gy(jy)){var g_=function(e){return Ay(this,Ny),new jy(e,arguments.length>1?A_(arguments[1]):{})};Ny.constructor=g_,g_.prototype=Ny,ay({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:g_})}}var v_={URLSearchParams:h_,getState:By},b_=fi.includes,y_=Af;Zi({target:"Array",proto:!0,forced:re((function(){return!Array(1).includes()}))},{includes:function(e){return b_(this,e,arguments.length>1?arguments[1]:void 0)}}),y_("includes");var __=Zi,w_=iv,k_=fe,E_=ps,x_=ov,D_=ue("".indexOf);function S_(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return L.default(n,e)}function d(e,t){return U.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new O.default(e,t)}catch(e){console.log(e)}}function c(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),P.default.isURL(o)))return o}}}return function(){var e;D.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=c();if(e)if(B.default(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=c(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?B.default(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}__({target:"String",proto:!0,forced:!x_("includes")},{includes:function(e){return!!~D_(E_(k_(this)),E_(w_(e)),arguments.length>1?arguments[1]:void 0)}});var R_="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==R_&&R_,T_={searchParams:"URLSearchParams"in R_,iterable:"Symbol"in R_&&"iterator"in Symbol,blob:"FileReader"in R_&&"Blob"in R_&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in R_,arrayBuffer:"ArrayBuffer"in R_};if(T_.arrayBuffer)var C_=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],I_=ArrayBuffer.isView||function(e){return e&&C_.indexOf(Object.prototype.toString.call(e))>-1};function O_(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 P_(e){return"string"!=typeof e&&(e=String(e)),e}function B_(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return T_.iterable&&(t[Symbol.iterator]=function(){return t}),t}function L_(e){this.map={},e instanceof L_?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 U_(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function M_(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function F_(e){var t=new FileReader,n=M_(t);return t.readAsArrayBuffer(e),n}function j_(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function G_(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:T_.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:T_.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:T_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():T_.arrayBuffer&&T_.blob&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=j_(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):T_.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||I_(e))?this._bodyArrayBuffer=j_(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):T_.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},T_.blob&&(this.blob=function(){var e=U_(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=U_(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(F_)}),this.text=function(){var e=U_(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=M_(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)},T_.formData&&(this.formData=function(){return this.text().then(H_)}),this.json=function(){return this.text().then(JSON.parse)},this}L_.prototype.append=function(e,t){e=O_(e),t=P_(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},L_.prototype.delete=function(e){delete this.map[O_(e)]},L_.prototype.get=function(e){return e=O_(e),this.has(e)?this.map[e]:null},L_.prototype.has=function(e){return this.map.hasOwnProperty(O_(e))},L_.prototype.set=function(e,t){this.map[O_(e)]=P_(t)},L_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},L_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),B_(e)},L_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),B_(e)},L_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),B_(e)},T_.iterable&&(L_.prototype[Symbol.iterator]=L_.prototype.entries);var N_=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function q_(e,t){if(!(this instanceof q_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof q_){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new L_(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 L_(t.headers)),this.method=function(e){var t=e.toUpperCase();return N_.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 H_(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(a))}})),t}function Q_(e,t){if(!(this instanceof Q_))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');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 L_(t.headers),this.url=t.url||"",this._initBody(e)}q_.prototype.clone=function(){return new q_(this,{body:this._bodyInit})},G_.call(q_.prototype),G_.call(Q_.prototype),Q_.prototype.clone=function(){return new Q_(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new L_(this.headers),url:this.url})},Q_.error=function(){var e=new Q_(null,{status:0,statusText:""});return e.type="error",e};var V_=[301,302,303,307,308];Q_.redirect=function(e,t){if(-1===V_.indexOf(t))throw new RangeError("Invalid status code");return new Q_(null,{status:t,headers:{location:e}})};var z_,W_=R_.DOMException;try{new W_}catch(e){W_=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},W_.prototype=Object.create(Error.prototype),W_.prototype.constructor=W_}function K_(e,t){return new Promise((function(n,r){var a=new q_(e,t);if(a.signal&&a.signal.aborted)return r(new W_("Aborted","AbortError"));var i=new XMLHttpRequest;function s(){i.abort()}i.onload=function(){var e,t,r={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new L_,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 a=n.join(":").trim();t.append(r,a)}})),t)};r.url="responseURL"in i?i.responseURL:r.headers.get("X-Request-URL");var a="response"in i?i.response:i.responseText;setTimeout((function(){n(new Q_(a,r))}),0)},i.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},i.onabort=function(){setTimeout((function(){r(new W_("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&R_.location.href?R_.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?i.withCredentials=!0:"omit"===a.credentials&&(i.withCredentials=!1),"responseType"in i&&(T_.blob?i.responseType="blob":T_.arrayBuffer&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(i.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof L_?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,P_(t.headers[e]))})),a.signal&&(a.signal.addEventListener("abort",s),i.onreadystatechange=function(){4===i.readyState&&a.signal.removeEventListener("abort",s)}),i.send(void 0===a._bodyInit?null:a._bodyInit)}))}K_.polyfill=!0,R_.fetch||(R_.fetch=K_,R_.Headers=L_,R_.Request=q_,R_.Response=Q_);var Y_=function(e){var t=this;if(!z_){var n={gameId:e.gameId,hours:(new Date).getHours(),topDomain:hb.topDomain,domain:hb.parentDomain,referrer:hb.parentURL,depth:a.getIframeDepth(),version:ss.version,byloader:hb.isTokenGameURL,isTokenGameURL:hb.isTokenGameURL,isMasterGameURL:hb.isMasterGameURL,isExtHostedGameURL:hb.isExtHostedGameURL,byloaderVersion:hb.version,tracking:fb.userDeclinedTracking,whitelabel:fb.whitelabelPartner,platform:a.getMobilePlatform()};z_=new a.MessageRouter(n)}return z_||{send:function(){D.default(this,t)}.bind(this)}},J_={getGameData:function(e){var t=this;try{var n=e.replace("game.api.gamedistribution.com","game-api.gamedistribution.com");fetch(n).then(function(e){D.default(this,t)}.bind(this)).catch(function(e){D.default(this,t)}.bind(this))}catch(e){}},getGameLoaderIndex:function(e){var t=this;try{var n="https://html5-prod-aws.gamedistribution.com/".concat(e,"/");fetch(n).then(function(e){D.default(this,t)}.bind(this)).catch(function(e){D.default(this,t)}.bind(this))}catch(e){}}},Z_={prod:["html5.gamedistribution.com","revision.gamedistribution.com"],acc:["html5-acc-real-aws.gamedistribution.com","acceptance-revision.gamedistribution.com"]},X_={gameAPI:"game.api.gamedistribution.com"},$_={gameAPI:"game-api-acc-real-aws.gamedistribution.com"},ew=function(){var e=this,t=Z_.acc.some(function(t){var n;return D.default(this,e),t===(null===(n=window.location.host)||void 0===n?void 0:n.toLowerCase())}.bind(this));return{env:t?"acc":"prod",config:t?$_:X_}},tw=function(e){var t=this,n=e.url;return new Promise(function(e,r){D.default(this,t);var a=new XMLHttpRequest;a.open("GET",n,!0),a.onreadystatechange=function(){if(4==a.readyState)if(200==a.status){var t=JSON.parse(a.responseText);e(t)}else r(Error("Error occured on request: ".concat(a.status,", ").concat(a.statusText)))},a.onerror=function(e){r(e)},a.send()}.bind(this))};function nw(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 rw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nw(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aw,iw,sw,ow=new m.EventEmitter,dw=[],uw=function(e){dw.push(e)},cw=function(e){aw=Y_(sw=e)},lw=function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(iw){e.next=6;break}return e.next=3,pw(sw);case 3:iw=e.sent,ow.emit("game-data-ready",iw),hw();case 6:return e.abrupt("return",iw);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),hw=function(){var e,t;if(null!==(e=iw)&&void 0!==e&&null!==(t=e.aws_tst)&&void 0!==t&&t.enabled){var n,r,a,i,s;if(fw(),null!==(n=iw)&&void 0!==n&&null!==(r=n.aws_tst)&&void 0!==r&&null!==(a=r.ep)&&void 0!==a&&a.api&&null!==(i=iw)&&void 0!==i&&i.url)J_.getGameData(null===(s=iw)||void 0===s?void 0:s.url);setInterval(x.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,pw(sw);case 3:iw=e.sent,null===(t=iw)||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)}},fw=function(){var e=window.fetch;window.fetch=x.default(R.default.mark((function t(){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,A,g,v,b,y,_=this,w=arguments;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(d=w.length,u=new Array(d),c=0;c<d;c++)u[c]=w[c];l=u[0],h=u[1],f=null===(n=iw)||void 0===n||null===(r=n.aws_tst)||void 0===r||null===(a=r.ep)||void 0===a?void 0:a.atm,p=null===(i=iw)||void 0===i||null===(s=i.aws_tst)||void 0===s||null===(o=s.ep)||void 0===o?void 0:o.msgrt,m=function(t,n){var r=this;D.default(this,_);var a=l.replace(t,n);e(a,h).then(function(){D.default(this,r)}.bind(this))}.bind(this);try{f&&l.indexOf("tag.atom")>0&&m("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),p&&l.indexOf("msgrt.gamedistribution.com")>0&&(null===(A=iw)||void 0===A||A.aws_tst,null===(g=iw)||void 0===g||null===(v=g.aws_tst)||void 0===v||null===(b=v.ep)||void 0===b||b.msgrt,m("msgrt.gamedistribution.com","msgrt-prod-aws.gamedistribution.com"))}catch(e){}return t.next=9,e(l,h);case 9:return y=t.sent,t.abrupt("return",y);case 11:case"end":return t.stop()}}),t,this)})))},pw=function(e){var t=this;aw.send("gdfw.loading",{message:"loading"}),dw=[],uw("1"),uw("2");var n=new S_;uw("3");var r=n.get("partner.domain.value");uw("4");var i=function(){return D.default(this,t),{gameId:e.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}.bind(this);uw("5");var s=function(){D.default(this,t);var n=o(),a=n?"&mode=".concat(n):"",i=ew().config;return"https://".concat(i.gameAPI,"/game/v4/get/").concat(e.gameId.replace(/-/g,""),"/?domain=").concat(r).concat(a,"&v=").concat(ss.version,"&localTime=").concat((new Date).getHours())}.bind(this);uw("6");var o=function(){var e=this;D.default(this,t);var n=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return D.default(this,e),t.get(n)}.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 uw("7"),new Promise(function(e){var n=this;D.default(this,t),uw("7.1");var r=i();try{uw("7.2");var o=s();uw("7.3"),fetch(o).then(function(){var e=x.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return uw("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,tw({url:o});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(t){return e.apply(this,arguments)}}()).then(function(t){var i=this;if(D.default(this,n),uw("7.5"),t.success){var s,d,u,c=t.result.game;uw("7.6");var l={company:c.company,gameId:c.gameMd5,slug:c.slug,pname:c.pname,dname:c.dname,status:c.status,activeStatus:c.activeStatus,description:c.description,disableAds:c.enableAds,preroll:c.preRoll,midroll:6e4*c.timeAds,rewardedAds:c.rewardedAds,title:c.title,publishedAt:c.publishedAt,tags:c.tags,category:c.category,assets:c.assets,disp_2nd_prer:c.disp_2nd_prer,ctry_vst:c.ctry_vst,ctry:c.ctry,crtv:c.crtv,dmain:c.dmain,aws_tst:c.aws_tst,meta:c.meta,adspn:os(c.adspn)||{},__t4r:os(c.__t4r)||{},block_exts:os(c.push_cuda),bloc_gard:os(c.bloc_gard),cookie:os(c.cookie),gdpr:os(c.gdpr),diagnostic:os(c.diagnostic),cmp:os(c.cmp),gft:os(c.gft)||{},sdk:os(c.sdk)||{},sdkfw:os(c.sdkfw)||{},loader:os(c.loader)||{},splash:os(c.splash)||{},promo:os(c.promo)||{},dAds:os(c.dads)||{},pAds:os(c.pads)||{},mAds:os(c.mads)||{},rAds:os(c.rads)||{},lp:os(c.lp)||{},extsc:os(c.extsc)||{},evnts:os(c.evnts)||{},dp:os(c.dp)||{},adflw:os(c.adflw)||{},afgszf:os(c.afgszf)||{},fllc:os(c.fllc)||{},lotm:os(c.lotm)||{},t4rc:os(c.t4rc)||{},midroll_plus:os(c.midroll_plus)||{},gmky:os(c.gmky)||{},urlBlockExc:os(c.url_blck_exc)||{},sdk_wrp:os(c.sdk_wrp)||{},dbglg:os(c.dbglg)||{},extHosting:os(c.ext_hosting)||{},directTokenUse:os(c.dtu)||{},aeria:os(c.aeria)||{},advlm:os(c.advlm)||{},ad_blcks:os(c.ad_blcks)||{},rmblck:os(c.rmblck)||{},gs_trc:os(c.gs_trc)||{},rwskp:os(c.rwskp)||{},isv_fw:os(c.isv_fw)||{}};uw("7.7");var h=a.extendDefaults(M.default(r),l);uw("7.8"),h.afg_disabled=!1===(null===(s=h.sdk)||void 0===s||null===(d=s.afg)||void 0===d?void 0:d.enabled),h.url=o,function(){D.default(this,i),void 0!==ls.afgEnabled&&(h.afg_disabled=!ls.afgEnabled),void 0!==ls.promoEnabled&&(h.promo=h.promo||{},h.promo=rw(rw({},h.promo),{},{rainbow:{enabled:ls.promoEnabled}}))}.bind(this),uw("7.9"),null!==(u=h.pAds)&&void 0!==u&&u.enabled&&(h.preroll=!0),uw("7.10"),aw.send("gdfw.success",{message:"success"}),e(h)}else{r.failed=!0;var f=dw[dw.length-1];aw.send("gdfw.err",{message:"".concat(f,": json error")}),e(r)}}.bind(this)).catch(function(t){D.default(this,n);var a=dw[dw.length-1];aw.send("gdfw.err",{message:"".concat(a,": ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}.bind(this))}catch(t){var d=dw[dw.length-1];aw.send("gdfw.err",{message:"".concat(d,": global ").concat(t.message?t.message:t)}),r.failed=!0,e(r)}}.bind(this))},mw=function(){var e=x.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();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 e.apply(this,arguments)}}(),Aw=function(){var e=x.default(R.default.mark((function e(){var t,n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();case 2:return n=e.sent,r=null==n||null===(t=n.diagnostic)||void 0===t||!t.close_ga,e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),gw=function(){var e=x.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();case 2:return n=e.sent,e.next=5,mw();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 e.apply(this,arguments)}}(),vw=function(){var e=x.default(R.default.mark((function e(){var t,n,r,a,i,s,o,d;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();case 2:return o=e.sent,d=!(null==o||null===(t=o.extsc)||void 0===t||!t.enabled),e.abrupt("return",{enabled:d,path:d?null==o||null===(n=o.extsc)||void 0===n?void 0:n.path:"",name:d?null==o||null===(r=o.extsc)||void 0===r?void 0:r.name:"",ref:d?null==o||null===(a=o.extsc)||void 0===a?void 0:a.ref:"",loadedFlag:d?null==o||null===(i=o.extsc)||void 0===i?void 0:i.loadedFlag:void 0,loadedFlagCheck:!!d&&!(null==o||null===(s=o.extsc)||void 0===s||!s.loadedFlagCheck)});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),bw=function(){var e=x.default(R.default.mark((function e(){var t,n,r,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vw();case 2:if((t=e.sent).enabled){e.next=5;break}return e.abrupt("return");case 5:return n=t.path,r=t.name,i=t.ref,e.prev=6,s={},e.next=10,a.getScript(n,r,{error_prefix:"Blocked:",exists:function(){return D.default(this,o),!!i&&!!window[i]}.bind(this),attrs:s});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",r,e.t0),a.dankLog("DEVELOPER_ERROR",e.t0,"warning");case 16:case"end":return e.stop()}}),e,this,[[6,12]])})));return function(){return e.apply(this,arguments)}}(),yw=!1,_w=!1,ww=function(){return new Promise(function(){var e=x.default(R.default.mark((function e(t,n){var r,a,i,s,o,d=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!yw){e.next=4;break}return e.abrupt("return",t(_w));case 4:yw=!0;case 5:return e.next=7,vw();case 7:if((r=e.sent).enabled){e.next=10;break}return e.abrupt("return",t(!1));case 10:if(a=r.loadedFlag,!(i=r.loadedFlagCheck)||a){e.next=13;break}return e.abrupt("return",t(!1));case 13:if(i){e.next=16;break}return _w=!0,e.abrupt("return",t(!0));case 16:s=!0,setTimeout(function(){D.default(this,d),s&&(s=!1,yw=!0,t(!1))}.bind(this),5e3),o=setInterval(function(){D.default(this,d),s&&i&&window[a]?(s=!1,yw=!0,_w=!0,clearInterval(o),t(!0)):s||clearInterval(o)}.bind(this),100);case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}())},kw=Zi,Ew=hm,xw=re,Dw=yt,Sw=Xe,Rw=op,Tw=pg,Cw=mr,Iw=Ew&&Ew.prototype;if(kw({target:"Promise",proto:!0,real:!0,forced:!!Ew&&xw((function(){Iw.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Rw(this,Dw("Promise")),n=Sw(e);return this.then(n?function(n){return Tw(t,e()).then((function(){return n}))}:e,n?function(n){return Tw(t,e()).then((function(){throw n}))}:e)}}),Sw(Ew)){var Ow=Dw("Promise").prototype.finally;Iw.finally!==Ow&&Cw(Iw,"finally",Ow,{unsafe:!0})}var Pw="\t\n\v\f\r                 \u2028\u2029\ufeff",Bw=fe,Lw=ps,Uw=Pw,Mw=ue("".replace),Fw=RegExp("^["+Uw+"]+"),jw=RegExp("(^|[^"+Uw+"])["+Uw+"]+$"),Gw=function(e){return function(t){var n=Lw(Bw(t));return 1&e&&(n=Mw(n,Fw,"")),2&e&&(n=Mw(n,jw,"$1")),n}},Nw={start:Gw(1),end:Gw(2),trim:Gw(3)},qw=pn.PROPER,Hw=re,Qw=Pw,Vw=Nw.trim;Zi({target:"String",proto:!0,forced:function(e){return Hw((function(){return!!Qw[e]()||"​…᠎"!=="​…᠎"[e]()||qw&&Qw[e].name!==e}))}("trim")},{trim:function(){return Vw(this)}});var zw=Zi,Ww=Ca.find,Kw=Af,Yw="find",Jw=!0;Yw in[]&&Array(1)[Yw]((function(){Jw=!1})),zw({target:"Array",proto:!0,forced:Jw},{find:function(e){return Ww(this,e,arguments.length>1?arguments[1]:void 0)}}),Kw(Yw);var Zw=Xe,Xw=rt,$w=Ll,ek=$e.f,tk=et,nk=z,rk=ue,ak=Hi,ik=function(e,t,n){var r,a;return $w&&Zw(r=t.constructor)&&r!==n&&Xw(a=r.prototype)&&a!==n.prototype&&$w(e,a),e},sk=Rn,ok=ai.f,dk=_t,uk=nv,ck=ps,lk=xv,hk=gh,fk=function(e,t,n){n in e||ek(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},pk=mr,mk=re,Ak=be,gk=Wn.enforce,vk=Jf,bk=yh,yk=kh,_k=ze("match"),wk=nk.RegExp,kk=wk.prototype,Ek=nk.SyntaxError,xk=rk(kk.exec),Dk=rk("".charAt),Sk=rk("".replace),Rk=rk("".indexOf),Tk=rk("".slice),Ck=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ik=/a/g,Ok=/a/g,Pk=new wk(Ik)!==Ik,Bk=hk.MISSED_STICKY,Lk=hk.UNSUPPORTED_Y,Uk=tk&&(!Pk||Bk||bk||yk||mk((function(){return Ok[_k]=!1,wk(Ik)!=Ik||wk(Ok)==Ok||"/a/i"!=wk(Ik,"i")})));if(ak("RegExp",Uk)){for(var Mk=function(e,t){var n,r,a,i,s,o,d=dk(kk,this),u=uk(e),c=void 0===t,l=[],h=e;if(!d&&u&&c&&e.constructor===Mk)return e;if((u||dk(kk,e))&&(e=e.source,c&&(t=lk(h))),e=void 0===e?"":ck(e),t=void 0===t?"":ck(t),h=e,bk&&"dotAll"in Ik&&(r=!!t&&Rk(t,"s")>-1)&&(t=Sk(t,/s/g,"")),n=t,Bk&&"sticky"in Ik&&(a=!!t&&Rk(t,"y")>-1)&&Lk&&(t=Sk(t,/y/g,"")),yk&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,c="";r<=n;r++){if("\\"===(t=Dk(e,r)))t+=Dk(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:xk(Ck,Tk(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===c||Ak(s,c))throw new Ek("Invalid capture group name");s[c]=!0,i[i.length]=[c,u],d=!1,c="";continue}d?c+=t:a+=t}return[a,i]}(e),e=i[0],l=i[1]),s=ik(wk(e,t),d?this:kk,Mk),(r||a||l.length)&&(o=gk(s),r&&(o.dotAll=!0,o.raw=Mk(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=Dk(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+Dk(e,++r);return a}(e),n)),a&&(o.sticky=!0),l.length&&(o.groups=l)),e!==h)try{sk(s,"source",""===h?"(?:)":h)}catch(e){}return s},Fk=ok(wk),jk=0;Fk.length>jk;)fk(Mk,wk,Fk[jk++]);kk.constructor=Mk,Mk.prototype=kk,pk(nk,"RegExp",Mk,{constructor:!0})}vk("RegExp");var Gk=Zi,Nk=Qr,qk=Ka,Hk=Oa,Qk=ue([].join);Gk({target:"Array",proto:!0,forced:Nk!=Object||!Hk("join",",")},{join:function(e){return Qk(qk(this),void 0===e?",":e)}});var Vk=Ca.map;Zi({target:"Array",proto:!0,forced:!Iu("map")},{map:function(e){return Vk(this,e,arguments.length>1?arguments[1]:void 0)}});var zk=et,Wk=ue,Kk=gt,Yk=re,Jk=es,Zk=ki,Xk=qa,$k=Ae,eE=Qr,tE=Object.assign,nE=Object.defineProperty,rE=Wk([].concat),aE=!tE||Yk((function(){if(zk&&1!==tE({b:1},tE(nE({},"a",{enumerable:!0,get:function(){nE(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!=tE({},e)[n]||Jk(tE({},t)).join("")!=r}))?function(e,t){for(var n=$k(e),r=arguments.length,a=1,i=Zk.f,s=Xk.f;r>a;)for(var o,d=eE(arguments[a++]),u=i?rE(Jk(d),i(d)):Jk(d),c=u.length,l=0;c>l;)o=u[l++],zk&&!Kk(s,d,o)||(n[o]=d[o]);return n}:tE,iE=aE;Zi({target:"Object",stat:!0,arity:2,forced:Object.assign!==iE},{assign:iE});var sE,oE=ue,dE=2147483647,uE=/[^\0-\u007E]/,cE=/[.\u3002\uFF0E\uFF61]/g,lE="Overflow: input needs wider integers to process",hE=RangeError,fE=oE(cE.exec),pE=Math.floor,mE=String.fromCharCode,AE=oE("".charCodeAt),gE=oE([].join),vE=oE([].push),bE=oE("".replace),yE=oE("".split),_E=oE("".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))},EE=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=AE(e,n++);if(a>=55296&&a<=56319&&n<r){var i=AE(e,n++);56320==(64512&i)?vE(t,((1023&a)<<10)+(1023&i)+65536):(vE(t,a),n--)}else vE(t,a)}return t}(e);var n,r,a=e.length,i=128,s=0,o=72;for(n=0;n<e.length;n++)(r=e[n])<128&&vE(t,mE(r));var d=t.length,u=d;for(d&&vE(t,"-");u<a;){var c=dE;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<c&&(c=r);var l=u+1;if(c-i>pE((dE-s)/l))throw hE(lE);for(s+=(c-i)*l,i=c,n=0;n<e.length;n++){if((r=e[n])<i&&++s>dE)throw hE(lE);if(r==i){for(var h=s,f=36;;){var p=f<=o?1:f>=o+26?26:f-o;if(h<p)break;var m=h-p,A=36-p;vE(t,mE(wE(p+m%A))),h=pE(m/A),f+=36}vE(t,mE(wE(h))),o=kE(s,l,u==d),s=0,u++}}s++,i++}return gE(t,"")},xE=Zi,DE=et,SE=Zb,RE=z,TE=jr,CE=ue,IE=mr,OE=ro,PE=$f,BE=be,LE=aE,UE=Mc,ME=Ys,FE=tl.codeAt,jE=function(e){var t,n,r=[],a=yE(bE(_E(e),cE,"."),".");for(t=0;t<a.length;t++)n=a[t],vE(r,fE(uE,n)?"xn--"+EE(n):n);return gE(r,".")},GE=ps,NE=yo,qE=up,HE=v_,QE=Wn,VE=QE.set,zE=QE.getterFor("URL"),WE=HE.URLSearchParams,KE=HE.getState,YE=RE.URL,JE=RE.TypeError,ZE=RE.parseInt,XE=Math.floor,$E=Math.pow,ex=CE("".charAt),tx=CE(/./.exec),nx=CE([].join),rx=CE(1..toString),ax=CE([].pop),ix=CE([].push),sx=CE("".replace),ox=CE([].shift),dx=CE("".split),ux=CE("".slice),cx=CE("".toLowerCase),lx=CE([].unshift),hx="Invalid scheme",fx="Invalid host",px="Invalid port",mx=/[a-z]/i,Ax=/[\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 #/:<>?@[\\\]^|]/,Ex=/^[\u0000-\u0020]+/,xx=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Dx=/[\t\n\r]/g,Sx=function(e){var t,n,r,a;if("number"==typeof e){for(t=[],n=0;n<4;n++)lx(t,e%256),e=XE(e/256);return nx(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,a=0,i=0;i<8;i++)0!==e[i]?(a>n&&(t=r,n=a),r=null,a=0):(null===r&&(r=i),++a);return a>n&&(t=r,n=a),t}(e),n=0;n<8;n++)a&&0===e[n]||(a&&(a=!1),r===n?(t+=n?":":"::",a=!0):(t+=rx(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},Rx={},Tx=LE({},Rx,{" ":1,'"':1,"<":1,">":1,"`":1}),Cx=LE({},Tx,{"#":1,"?":1,"{":1,"}":1}),Ix=LE({},Cx,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ox=function(e,t){var n=FE(e,0);return n>32&&n<127&&!BE(t,e)?e:encodeURIComponent(e)},Px={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Bx=function(e,t){var n;return 2==e.length&&tx(mx,ex(e,0))&&(":"==(n=ex(e,1))||!t&&"|"==n)},Lx=function(e){var t;return e.length>1&&Bx(ux(e,0,2))&&(2==e.length||"/"===(t=ex(e,2))||"\\"===t||"?"===t||"#"===t)},Ux=function(e){return"."===e||"%2e"===cx(e)},Mx={},Fx={},jx={},Gx={},Nx={},qx={},Hx={},Qx={},Vx={},zx={},Wx={},Kx={},Yx={},Jx={},Zx={},Xx={},$x={},eD={},tD={},nD={},rD={},aD=function(e,t,n){var r,a,i,s=GE(e);if(t){if(a=this.parse(s))throw JE(a);this.searchParams=null}else{if(void 0!==n&&(r=new aD(n,!0)),a=this.parse(s,null,r))throw JE(a);(i=KE(new WE)).bindURL(this),this.searchParams=i}};aD.prototype={type:"URL",parse:function(e,t,n){var r,a,i,s,o,d=this,u=t||Mx,c=0,l="",h=!1,f=!1,p=!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=sx(e,Ex,""),e=sx(e,xx,"$1")),e=sx(e,Dx,""),r=UE(e);c<=r.length;){switch(a=r[c],u){case Mx:if(!a||!tx(mx,a)){if(t)return hx;u=jx;continue}l+=cx(a),u=Fx;break;case Fx:if(a&&(tx(Ax,a)||"+"==a||"-"==a||"."==a))l+=cx(a);else{if(":"!=a){if(t)return hx;l="",u=jx,c=0;continue}if(t&&(d.isSpecial()!=BE(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?u=Jx:d.isSpecial()&&n&&n.scheme==d.scheme?u=Gx:d.isSpecial()?u=Qx:"/"==r[c+1]?(u=Nx,c++):(d.cannotBeABaseURL=!0,ix(d.path,""),u=tD)}break;case jx:if(!n||n.cannotBeABaseURL&&"#"!=a)return hx;if(n.cannotBeABaseURL&&"#"==a){d.scheme=n.scheme,d.path=ME(n.path),d.query=n.query,d.fragment="",d.cannotBeABaseURL=!0,u=rD;break}u="file"==n.scheme?Jx:qx;continue;case Gx:if("/"!=a||"/"!=r[c+1]){u=qx;continue}u=Vx,c++;break;case Nx:if("/"==a){u=zx;break}u=eD;continue;case qx:if(d.scheme=n.scheme,a==sE)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("/"==a||"\\"==a&&d.isSpecial())u=Hx;else if("?"==a)d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=ME(n.path),d.query="",u=nD;else{if("#"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,d.path=ME(n.path),d.path.length--,u=eD;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="",u=rD}break;case Hx:if(!d.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){d.username=n.username,d.password=n.password,d.host=n.host,d.port=n.port,u=eD;continue}u=zx}else u=Vx;break;case Qx:if(u=Vx,"/"!=a||"/"!=ex(l,c+1))continue;c++;break;case Vx:if("/"!=a&&"\\"!=a){u=zx;continue}break;case zx:if("@"==a){h&&(l="%40"+l),h=!0,i=UE(l);for(var m=0;m<i.length;m++){var A=i[m];if(":"!=A||p){var g=Ox(A,Ix);p?d.password+=g:d.username+=g}else p=!0}l=""}else if(a==sE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(h&&""==l)return"Invalid authority";c-=UE(l).length+1,l="",u=Wx}else l+=a;break;case Wx:case Kx:if(t&&"file"==d.scheme){u=Xx;continue}if(":"!=a||f){if(a==sE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()){if(d.isSpecial()&&""==l)return fx;if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(s=d.parseHost(l))return s;if(l="",u=$x,t)return;continue}"["==a?f=!0:"]"==a&&(f=!1),l+=a}else{if(""==l)return fx;if(s=d.parseHost(l))return s;if(l="",u=Yx,t==Kx)return}break;case Yx:if(!tx(gx,a)){if(a==sE||"/"==a||"?"==a||"#"==a||"\\"==a&&d.isSpecial()||t){if(""!=l){var v=ZE(l,10);if(v>65535)return px;d.port=d.isSpecial()&&v===Px[d.scheme]?null:v,l=""}if(t)return;u=$x;continue}return px}l+=a;break;case Jx:if(d.scheme="file","/"==a||"\\"==a)u=Zx;else{if(!n||"file"!=n.scheme){u=eD;continue}if(a==sE)d.host=n.host,d.path=ME(n.path),d.query=n.query;else if("?"==a)d.host=n.host,d.path=ME(n.path),d.query="",u=nD;else{if("#"!=a){Lx(nx(ME(r,c),""))||(d.host=n.host,d.path=ME(n.path),d.shortenPath()),u=eD;continue}d.host=n.host,d.path=ME(n.path),d.query=n.query,d.fragment="",u=rD}}break;case Zx:if("/"==a||"\\"==a){u=Xx;break}n&&"file"==n.scheme&&!Lx(nx(ME(r,c),""))&&(Bx(n.path[0],!0)?ix(d.path,n.path[0]):d.host=n.host),u=eD;continue;case Xx:if(a==sE||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&Bx(l))u=eD;else if(""==l){if(d.host="",t)return;u=$x}else{if(s=d.parseHost(l))return s;if("localhost"==d.host&&(d.host=""),t)return;l="",u=$x}continue}l+=a;break;case $x:if(d.isSpecial()){if(u=eD,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=sE&&(u=eD,"/"!=a))continue}else d.fragment="",u=rD;else d.query="",u=nD;break;case eD:if(a==sE||"/"==a||"\\"==a&&d.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(o=cx(o=l))||"%2e."===o||".%2e"===o||"%2e%2e"===o?(d.shortenPath(),"/"==a||"\\"==a&&d.isSpecial()||ix(d.path,"")):Ux(l)?"/"==a||"\\"==a&&d.isSpecial()||ix(d.path,""):("file"==d.scheme&&!d.path.length&&Bx(l)&&(d.host&&(d.host=""),l=ex(l,0)+":"),ix(d.path,l)),l="","file"==d.scheme&&(a==sE||"?"==a||"#"==a))for(;d.path.length>1&&""===d.path[0];)ox(d.path);"?"==a?(d.query="",u=nD):"#"==a&&(d.fragment="",u=rD)}else l+=Ox(a,Cx);break;case tD:"?"==a?(d.query="",u=nD):"#"==a?(d.fragment="",u=rD):a!=sE&&(d.path[0]+=Ox(a,Rx));break;case nD:t||"#"!=a?a!=sE&&("'"==a&&d.isSpecial()?d.query+="%27":d.query+="#"==a?"%23":Ox(a,Rx)):(d.fragment="",u=rD);break;case rD:a!=sE&&(d.fragment+=Ox(a,Tx))}c++}},parseHost:function(e){var t,n,r;if("["==ex(e,0)){if("]"!=ex(e,e.length-1))return fx;if(t=function(e){var t,n,r,a,i,s,o,d=[0,0,0,0,0,0,0,0],u=0,c=null,l=0,h=function(){return ex(e,l)};if(":"==h()){if(":"!=ex(e,1))return;l+=2,c=++u}for(;h();){if(8==u)return;if(":"!=h()){for(t=n=0;n<4&&tx(_x,h());)t=16*t+ZE(h(),16),l++,n++;if("."==h()){if(0==n)return;if(l-=n,u>6)return;for(r=0;h();){if(a=null,r>0){if(!("."==h()&&r<4))return;l++}if(!tx(gx,h()))return;for(;tx(gx,h());){if(i=ZE(h(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;l++}d[u]=256*d[u]+a,2!=++r&&4!=r||u++}if(4!=r)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[u++]=t}else{if(null!==c)return;l++,c=++u}}if(null!==c)for(s=u-c,u=7;0!=u&&s>0;)o=d[u],d[u--]=d[c+s-1],d[c+--s]=o;else if(8!=u)return;return d}(ux(e,1,-1)),!t)return fx;this.host=t}else if(this.isSpecial()){if(e=jE(e),tx(wx,e))return fx;if(t=function(e){var t,n,r,a,i,s,o,d=dx(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(a=d[r]))return e;if(i=10,a.length>1&&"0"==ex(a,0)&&(i=tx(vx,a)?16:8,a=ux(a,8==i?1:2)),""===a)s=0;else{if(!tx(10==i?yx:8==i?bx:_x,a))return e;s=ZE(a,i)}ix(n,s)}for(r=0;r<t;r++)if(s=n[r],r==t-1){if(s>=$E(256,5-t))return null}else if(s>255)return null;for(o=ax(n),r=0;r<n.length;r++)o+=n[r]*$E(256,3-r);return o}(e),null===t)return fx;this.host=t}else{if(tx(kx,e))return fx;for(t="",n=UE(e),r=0;r<n.length;r++)t+=Ox(n[r],Rx);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return BE(Px,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Bx(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,a=e.host,i=e.port,s=e.path,o=e.query,d=e.fragment,u=t+":";return null!==a?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=Sx(a),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+nx(s,"/"):"",null!==o&&(u+="?"+o),null!==d&&(u+="#"+d),u},setHref:function(e){var t=this.parse(e);if(t)throw JE(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new iD(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+=Ox(t[n],Ix)}},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+=Ox(t[n],Ix)}},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,Yx))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+nx(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,$x))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=GE(e))?this.query=null:("?"==ex(e,0)&&(e=ux(e,1)),this.query="",this.parse(e,nD)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=GE(e))?("#"==ex(e,0)&&(e=ux(e,1)),this.fragment="",this.parse(e,rD)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var iD=function(e){var t=PE(this,sD),n=qE(arguments.length,1)>1?arguments[1]:void 0,r=VE(t,new aD(e,!1,n));DE||(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())},sD=iD.prototype,oD=function(e,t){return{get:function(){return zE(this)[e]()},set:t&&function(e){return zE(this)[t](e)},configurable:!0,enumerable:!0}};if(DE&&(OE(sD,"href",oD("serialize","setHref")),OE(sD,"origin",oD("getOrigin")),OE(sD,"protocol",oD("getProtocol","setProtocol")),OE(sD,"username",oD("getUsername","setUsername")),OE(sD,"password",oD("getPassword","setPassword")),OE(sD,"host",oD("getHost","setHost")),OE(sD,"hostname",oD("getHostname","setHostname")),OE(sD,"port",oD("getPort","setPort")),OE(sD,"pathname",oD("getPathname","setPathname")),OE(sD,"search",oD("getSearch","setSearch")),OE(sD,"searchParams",oD("getSearchParams")),OE(sD,"hash",oD("getHash","setHash"))),IE(sD,"toJSON",(function(){return zE(this).serialize()}),{enumerable:!0}),IE(sD,"toString",(function(){return zE(this).serialize()}),{enumerable:!0}),YE){var dD=YE.createObjectURL,uD=YE.revokeObjectURL;dD&&IE(iD,"createObjectURL",TE(dD,YE)),uD&&IE(iD,"revokeObjectURL",TE(uD,YE))}NE(iD,"URL"),xE({global:!0,constructor:!0,forced:!SE,sham:!DE},{URL:iD});var cD=function(){function e(t){C.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return T.default(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 t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new O.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return D.default(this,e),this.customParamKeys.some(function(e){return D.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),lD=function(){function e(t,n){C.default(this,e),this.adContainer=t,this.onResume=n}return T.default(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 t=document.createElement("div");this.adResumeButton=t,t.id="gd__resume__button",t.setAttribute("title","Resume"),this.addStyles(),t.classList.add("gd__resume__button"),t.addEventListener("click",function(){D.default(this,e),this.onResume()}.bind(this)),this.adContainer.appendChild(t);var n=document.createElement("div");this.adResumeButtonOverlay=n,n.id="gd__resume__button__overlay",n.classList.add("gd__resume__button__overlay"),this.adContainer.appendChild(n)}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}(),hD=function(){function e(t,n){C.default(this,e),this.adContainer=t,this.onResume=n}return T.default(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}(),fD=function(){function e(t,n,r){C.default(this,e),this.adContainer=t,this.onResume=n,this.OnSkip=r}return T.default(e,[{key:"show",value:function(){this.skipAd.style.display="block"}},{key:"hide",value:function(){this.skipAd.style.display="none"}},{key:"add",value:function(){var e=this;try{var t=document.createElement("div");this.skipAd=t;var n=document.createElement("span");n.innerText="Skip Ad >>",this.addStyles(),t.classList.add("gd__skip__ad"),n.classList.add("gd__skip__span"),this.skipAd.appendChild(n),this.adContainer.appendChild(t),this.skipAd.addEventListener("click",function(){D.default(this,e),this.OnSkip()}.bind(this))}catch(e){console.log(e)}}},{key:"addStyles",value:function(){var e=document.body||document.getElementsByTagName("body")[0];this.addStylesheet("gd__skip__ad__style",e,"\n .gd__skip__ad{\n background-color:black; \n width: 260px;\n // height: 35px;\n position: absolute;\n display: none;\n z-index: 2000;\n cursor: pointer;\n bottom: 40px;\n right: 0px;\n margin: 0;\n border-radius: 5px;\n border: .5px solid gray;\n text-align: center;\n padding: 10px;\n }\n .gd__skip__ad:hover{\n filter: invert(100%) sepia(51%) saturate(0%) hue-rotate(346deg) brightness(104%) contrast(100%); \n }\n .gd__skip__span{\n color: white;\n font-size: 22px;\n padding-left: 5px;\n font-family: Verdana, Arial, Helvetica, sans-serif;\n text-align: center;\n }\n ")}},{key:"addStylesheet",value:function(e,t,n){if(!document.getElementById(e)){var r=document.createElement("style");r.type="text/css",r.id=e,r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),t.appendChild(r)}}}]),e}(),pD=function(){function e(t){C.default(this,e),this.adContainer=t}return T.default(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}(),mD=function(){function e(t){C.default(this,e),this.adContainer=t}return T.default(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}(),AD=function(e){if(!e)return!1;var t=gD.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)},gD=Object.prototype.toString;function vD(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 bD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vD(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yD(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 _D,wD="13998",kD="_cc".concat(wD),ED=["https://tags.crwdcntrl.net/c/".concat(wD,"/cc.js?ns=").concat(kD)],xD=function(){return!!_D&&"function"==typeof _D.bcpf&&"function"==typeof _D.add},DD=function(e,t){try{if(!xD())return;_D.add(e,t),"lotame add success ".concat(e," ").concat(t)}catch(e){err}},SD=function(e,t){try{if(!xD())return;_D.bcpw(e,t),"lotame send success ".concat(e," ").concat(t)}catch(e){}},RD=function(e){var t=this;try{DD("act","play"),DD("med","game"),"complete"===document.readyState?_D.bcpf():_D.bcp(),e.tags.forEach(function(e){D.default(this,t),SD("int","tags : ".concat(e.title.toLowerCase()))}.bind(this)),SD("int","category : ".concat(e.category.toLowerCase()))}catch(e){}},TD=function(){window.addEventListener("load",(function(){ow.once("game-data-ready",function(){var e=x.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=1,e.t0=null!=hb&&hb.noLotamePageView,!e.t0){e.next=7;break}return e.next=6,mw();case 6:e.t0=e.sent;case 7:if(!e.t0){e.next=10;break}return e.abrupt("return");case 10:if(null!==(n=t.lotm)&&void 0!==n&&n.enabled){e.next=13;break}return e.abrupt("return");case 13:return e.next=16,a.getScript(ED[0],"LOTCC_".concat(wD),{alternates:ED});case 16:"object"===S.default(window[kD])&&(_D=window[kD]),xD()&&RD(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(t){return e.apply(this,arguments)}}())}))},CD=function(){SD("genp","ad video"),SD("act","ad impression")},ID=function(){SD("act","ad skipped")},OD=function(){SD("act","ad click")},PD=function(){SD("act","ad complete")},BD=new S_,LD={preroll:"game-start-video",midroll:"mid-level-video",rewarded:"rewarded-video"},UD=function(e,t){var n=this,r=function(e,t){var n=BD.get("partner.url.value"),r=LD[t],a="".concat("web.latimes/games-puzzles-crossword","/").concat(e,"/").concat(r);return{env:"vp",iu:"/".concat("21787098806","/").concat(a),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,t),a=Object.keys(r).map(function(e){return D.default(this,n),"".concat(e,"=").concat(r[e])}.bind(this)).join("&");return"".concat("https://pubads.g.doubleclick.net/gampad/ads","?").concat(a)},MD=(new S_).get("partner.domain.value"),FD=["latimes.com"],jD={exist:function(e){var t=this;return"Softgames-Azerion"===e.dname&&FD.some(function(e){return D.default(this,t),e===MD}.bind(this))},get:function(e,t){return function(e,t){return{"latimes.com":function(){var n=t.slug;return UD(n,e)}}[MD](e)}(e,t)}},GD=function(){var e=(new S_).get("partner.url.value"),t=new O.default(e,!0),n={isRevisionTest:!1,useTestAds:!1,disableMidrolltimer:!1};if("revision.gamedistribution.com"===t.host){var r=t.query.test,a="1"===r||"2"===r,i="1"===r;n={useTestAds:a,disableMidrolltimer:i,isRevisionTest:i||a}}return n},ND=function(){function e(){C.default(this,e),this.adContainer=window.document.body}return T.default(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 t=document.createElement("div");t.id="gd__spinner",t.setAttribute("title","Spinner"),t.classList.add("gd__spinner"),this.adSpinner=t;var n=document.createElement("div");n.id="gd__spinner__fail",n.setAttribute("title","Spinner"),n.classList.add("gd__spinner__fail"),n.innerHTML="No Ads Available!",this.adSpinnerFail=n;var r=document.createElement("div");r.id="gd__spinner__button",r.setAttribute("title","Spinner"),r.classList.add("gd__spinner__button"),r.onclick=function(){D.default(this,e),this.hide()}.bind(this);var a=document.createElement("p");a.innerText="OK!",r.appendChild(a),this.adSpinnerButton=r;var i=document.createElement("div");i.id="gd__spinner__logo",i.setAttribute("title","Spinner"),i.classList.add("gd__spinner__logo"),this.adSpinnerLogo=i;var s=document.createElement("div");s.id="gd__spinner__container",s.classList.add("gd__spinner__container"),s.appendChild(this.adSpinner),s.appendChild(this.adSpinnerFail),s.appendChild(this.adSpinnerButton),s.appendChild(this.adSpinnerLogo),this.adSpinnerContainer=s;var o=document.createElement("div");o.id="gd__spinner__overlay",o.classList.add("gd__spinner__overlay"),o.appendChild(this.adSpinnerContainer),this.adSpinnerOverlay=o,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 qD(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 HD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qD(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var QD=new m.EventEmitter,VD=null,zD=function(){function e(t,n,r){var i=this;if(C.default(this,e),VD)return VD;VD=this;var s={debug:!1,width:640,height:360,locale:"en"};this.options=n?a.extendDefaults(s,n):s,this.prefix="gdsdk__",this.adsLoader=null,this.adsManager=null,this.adDisplayContainer=null,this.eventBus=new a.EventBus,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=r.parentDomain,this.topDomain=r.topDomain,this.parentURL=r.parentURL,this.adDisplayContainerInitialized=!1,this.IMASampleTags=a.getIMASampleTags(),this.atom_display,this.adType_="",this.rewardGuarantied=!1,this.clickCount={midroll:0,preroll:0,rewarded:0},this.userAllowedPersonalizedAds=document.location.search.indexOf("gdpr-targeting=0")>=0||document.cookie.indexOf("ogdpr_advertisement=0")>=0?"0":"1",this.parentDomain.includes("girlsgogames")&&(this.userAllowedPersonalizedAds=!1),this.thirdPartyContainer=""!==t?document.getElementById(t):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(){D.default(this,i),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){D.default(this,i),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,i,s,o,d,c,l,h,f,p,m,A,v,b,y,_,w,k,E,S,P,B,L,U;return T.default(e,[{key:"start",value:(U=x.default(R.default.mark((function e(){var t,n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.adSystemInitialize(x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_afg_script({});case 2:case"end":return e.stop()}}),e)}))));case 3:return t=e.sent,this.afgInitSuccess=t.success,e.next=7,this.adSystemInitialize(x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a._init_hl_script();case 2:return e.next=4,a._init_ima_script();case 4:a._createPlayer(),a._setUpIMA();case 6:case"end":return e.stop()}}),e)}))));case 7:if(n=e.sent,this.imaInitSuccess=n.success,r=[],this.afgInitSuccess||r.push(t.error),this.imaInitSuccess||r.push(n.error),!(r.length>0)){e.next=14;break}throw r[0];case 14:window.eventTest=function(e){D.default(this,a),this._broadcast(e,{message:"",status:"success"})}.bind(this),e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(0),cs("gd-adflow error on ads.start",e.t0),new Error(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,17]])}))),function(){return U.apply(this,arguments)})},{key:"adSystemInitialize",value:(L=x.default(R.default.mark((function e(t){var n;return R.default.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 L.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:(B=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.adType,r=t.options,e.prev=1,s=null===(a=this.gameData.adflw)||void 0===a||null===(i=a.adapterConfig)||void 0===i?void 0:i.spil,o=this.nextAdPosition(n),e.next=6,this._create_dp_context(o,r);case 6:return d=e.sent,s?(this.gameData,u=s[o]||s.default||this._getDefaultSpilAdapterConfig()):u=this._getDefaultSpilAdapterConfig(),c=100*d.floor_price,d.floor_price,l=this._createCustomAdVastUrl(u,{tnl_keys:{floor_price:c}}),h=l.url,f={url:h,dp:d,hl:{bidFloorApplied:!0}},e.abrupt("return",f);case 17:e.prev=17,e.t0=e.catch(1),console.log("spil-adaptor: Error on getting spil",e.t0);case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return B.apply(this,arguments)})},{key:"_getAdVast",value:function(e,t){var n=this;return new Promise(function(){var r=x.default(R.default.mark((function r(i){var s,o,d,u,c,l,h,f,p=this;return R.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&a.Ls.getBoolean("gd_tag")||GD().useTestAds)){r.next=6;break}return s=n.IMASampleTags[e],o=Math.floor(Math.random()*s.length),d=s[o],i({url:d,tnl_keys:{tnl_ad_pos:null==t?void 0:t.adTypeFound}}),r.abrupt("return");case 6:if("spil"!==t.adapter){r.next=8;break}return r.abrupt("return",i(n._getSpilUrl({adType:e,options:t})));case 8:if(void 0!==window.idhb.requestAds){r.next=10;break}throw new Error("Prebid.js wrapper script hit an error or didn't exist!");case 10:return r.prev=10,u=n.nextAdPosition(e),null!=t&&t.adTypeFound&&(u=null==t?void 0:t.adTypeFound),n._broadcast("AD_REQUEST",{message:u}),c=n.options,"preroll"===u&&g.isPlainObject(c.preroll)?c=c.preroll:"midroll"===u&&g.isPlainObject(c.midroll)?c=c.midroll:"rewarded"===u&&g.isPlainObject(c.rewarded)&&(c=c.rewarded),l="","audio"===t.adapter||"audio"===t.giftType?(n.isAudioAd=!0,l="midrollaudio"):(n.isAudioAd=!1,l="rewarded"===u?"rewardedVideo":"gdbanner"===u?"gd__banner":"midroll"===u?"midroll":"video1"),r.next=20,window.idhb.isLoaded();case 20:return r.next=22,n._create_dp_context(u,t);case 22:h=r.sent,us("gd-adflow, before idhb",u,l),f=window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.setAdserverTargeting(HD(HD({},f),{},{adaptor_order:t.adapterIndex})),window.idhb.getAdserverTargetingForAdSlot(l),window.idhb.requestAds({slots:I.default({},l,{bidFloor:(null==h?void 0:h.floor_price)||void 0}),callback:function(e,t){var r=this;D.default(this,p),!h||null!=t&&t.bidFloorApplied||fetch(h.skip_url).catch(function(e){D.default(this,r)}.bind(this));var a={src:"hl",tnl_keys:HD(HD({},window.idhb.getAdserverTargetingForAdSlot(l)),{},{tnl_ad_pos:u,tnl_asset_id:n.gameData.gameId}),url:e,dp:h,hl:t};n._extend_hl_url(a),i(a)}.bind(this)}),r.next=34;break;case 31:throw r.prev=31,r.t0=r.catch(10),new Error(r.t0);case 34:case"end":return r.stop()}}),r,this,[[10,31]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"nextAdPosition",value:function(e){if(e===a.AdType.Rewarded)return this.adRewardedCount++,"rewarded";if(e===a.AdType.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===a.AdType.Rewarded?"rewarded":e===a.AdType.Interstitial?!1===this.gameData.preroll||1===this.adPrerollCount||this.adMidrollCount>0?"midroll":"preroll":"midroll"}},{key:"getCurrentAdPosition",value:function(e){return e===a.AdType.Interstitial?1===this.adPrerollCount&&0===this.adMidrollCount?"preroll":"midroll":e===a.AdType.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,t){var n=this;return t=t||{},new Promise(function(r){var a=this;if(D.default(this,n),"undefined"==typeof google)throw new Error("Unable to load ad, google IMA SDK not defined.");try{var i,s,o=null==e||null===(i=e.tnl_keys)||void 0===i?void 0:i.tnl_ad_pos;this.adSuccess=!1,this.contentPaused=!1;var d=new google.ima.AdsRequest,u=this._transformVast(e,t),c=HD(HD({},t),{},{adTag:u,tnl_ad_pos:o});this.adCounter[o]=this.adCounter[o]||0,this.adCounter[o]++;var l=e.dp,h=e.hl;this.current_dp=l,l&&!u.bidder&&(l.adtag_url=u.url);var f=this._isVMAP(o);(function(){D.default(this,a),t.shouldFail&&(l?(l.adtag_url="dp_original_broken",l.fallback_url="dp_fallback_broken"):u.url="original_broken",null==l||l.adtag_url,null==l||l.fallback_url,u.url)}).bind(this);var p=this._getExternalVast(null===(s=t)||void 0===s?void 0:s.adType);if(p)d.adTagUrl=p;else if(f){var m=function(e){for(var t=[],n="",r=Date.now(),a={ppos:1,lip:!0,vad_type:"linear"},i=0;i<e.length;i++){var s=new O.default(e[i].adtag.url,!0);s.query=bD(bD({},s.query),{},{ad_rule:0,vpos:e[i].positon,pod:1,correlator:0===i?r:++r,output:"xml_vast3"}),i<e.length-1&&(s.query=bD(bD({},s.query),a)),t.push(s.toString())}for(var o=Date.now(),d=1;d<=t.length;d++){var u,c,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(yD({id:o++,adtag_url:t[d-1],error_url:null===(u=e[d-1].dp)||void 0===u?void 0:u.error_url,impression_url:null===(c=e[d-1].dp)||void 0===c?void 0:c.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:l,adtag:u,position:"preroll"===c.tnl_ad_pos?"preroll":"midroll",config:this._get_vmap_config(o)}));d.adsResponse=m}else if(l&&h.bidFloorApplied){l.adtag_url||(l.adtag_url=u.url);var A=function(e){return e.promo_url?e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="2" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="promo">\n <Wrapper>\n <AdSystem>Rainbow</AdSystem>\n <Impression><![CDATA[').concat(e.promo_imp_green_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.promo_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():e.fallback_url?'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper fallbackOnNoAd="true">\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="0" />\n </Extensions>\n </Wrapper>\n </Ad>\n <Ad id="fallback">\n <Wrapper>\n <AdSystem>ADS</AdSystem>\n <Impression><![CDATA[').concat(e.fallback_imp_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.fallback_url,']]></VASTAdTagURI>\n <Extensions>\n <Extension type="waterfall" fallback_index="1" />\n </Extensions>\n </Wrapper>\n </Ad>\n </VAST>').trim():'<?xml version="1.0" encoding="utf-8"?>\n <VAST version="3.0">\n <Ad id="'.concat(e.id,'">\n <Wrapper>\n <AdSystem>GDFP</AdSystem>\n <Error><![CDATA[').concat(e.error_url,"]]></Error>\n <Impression><![CDATA[").concat(e.impression_url,"]]></Impression>\n <VASTAdTagURI><![CDATA[").concat(e.adtag_url,"]]></VASTAdTagURI>\n </Wrapper>\n </Ad>\n </VAST>").trim()}(l);d.adsResponse=A}else if(l&&l.fallback_url){var g=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()}(l);d.adsResponse=g}else d.adTagUrl=u.url;d.linearAdSlotWidth=this.options.width,d.linearAdSlotHeight=this.options.height,d.nonLinearAdSlotWidth=this.options.width,d.nonLinearAdSlotHeight=this.options.height,d.forceNonLinearFullSlot=!0,this.options.vast_load_timeout&&(d.vastLoadTimeout=this.options.vast_load_timeout),d.setAdWillAutoPlay(t.autoplayAllowed),d.setAdWillPlayMuted(t.autoplayRequiresMute),this.adsLoader.requestAds(d,c);try{this._broadcast("AD_SDK_REQUEST",{message:c})}catch(e){}r(d)}catch(e){throw new Error(e)}}.bind(this))}},{key:"_getExternalVast",value:function(e){var t;try{var n=this.getCurrentAdPosition(e);t=jD.exist(this.gameData)&&jD.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:(P=x.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;D.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome"),F.default.video({inline:!0,muted:!1}).then(function(t){D.default(this,r);var n=t.result;t.error,e(!0===n?{autoplayAllowed:!0,autoplayRequiresMute:!1}:{autoplayAllowed:!0,autoplayRequiresMute:!0})}.bind(this))}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return P.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(S=x.default(R.default.mark((function e(){var t;return R.default.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 S.apply(this,arguments)})},{key:"startAd",value:(E=x.default(R.default.mark((function e(t){var n,r,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.adType,i=t.params,this.adType_=r,this.isAudioAd=!1,this.adContext=HD(HD({},i),{},{adType:r}),null!==(n=this.gameData.adspn)&&void 0!==n&&n.enabled&&(this.adFlowProcessSpinner||(this.adFlowProcessSpinner=new ND,this.adFlowProcessSpinner.add()),this.adFlowProcessSpinner.show(!0)),"promo"!==(null==i?void 0:i.adapter)){e.next=7;break}return e.abrupt("return",this._startPromo(i,r));case 7:if("adsense"!==(null==i?void 0:i.adapter)){e.next=31;break}if(r!==a.AdType.Interstitial){e.next=24;break}if("preroll"!==(null==i?void 0:i.position)){e.next=13;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 13:if("start"!==(null==i?void 0:i.position)){e.next=17;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 17:if("next"!==(null==i?void 0:i.position)){e.next=21;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 21:return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 22:e.next=29;break;case 24:if(r!==a.AdType.Rewarded){e.next=28;break}return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 28:throw new Error("Unsupported ad type");case 29:e.next=44;break;case 31:if(!["ima","spil","audio"].some(function(e){return D.default(this,s),e===(null==i?void 0:i.adapter)}.bind(this))){e.next=42;break}if(r!==a.AdType.Interstitial){e.next=37;break}return e.abrupt("return",this._startInterstitialAd(i));case 37:if(r!==a.AdType.Rewarded){e.next=41;break}return e.abrupt("return",this._startRewardedAd(i));case 41:throw new Error("Unsupported ad type");case 42:["opus"].some(function(e){return D.default(this,s),e===(null==i?void 0:i.adapter)}.bind(this))&&this._startOpusAd(i);case 44:case"end":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:"_startOpusAd",value:(k=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,A,g=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.adTypeFound="rewarded"===t.adTypeFound?"reward":t.adTypeFound,r=t.adTypeFound,this._send_atom_event("opus-ad.start"),!this.requestRunning){e.next=9;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),this._broadcast("AD_ERROR",{message:"Ad is already running",status:"error",reason:"request-running"}),this._send_atom_event("opus-ad.already-running"),e.abrupt("return");case 9:if(a=null===(n=window.gdlocus)||void 0===n?void 0:n.adBreak){e.next=14;break}return this._send_atom_event("opus-ad.not-initialized"),this._broadcast("AD_ERROR",{message:"Locus adBreak not found",status:"error",reason:"opus-not-found"}),e.abrupt("return");case 14:this._send_atom_event("opus-ad.ready"),i=void function(){return D.default(this,g),!0}.bind(this),this.requestRunning=!0,s=this.gameData,o=s.gameId,d=s.slug,u=s.title,c={assetId:o,slug:d,title:u,debug:i},l=function(e){D.default(this,g),this.opusEventReceived=!0,this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),h=function(e){D.default(this,g),this.opusEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),f=function(){D.default(this,g),this.opusEventReceived=!0}.bind(this),p=function(){D.default(this,g),this.opusEventReceived=!0,this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),m=function(e){D.default(this,g),this.opusEventReceived=!0,this.resetForNext();var t="".concat(r);this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}):this._broadcast("AD_ERROR",{message:e.errorMessage,errorType:e.errorType,status:e.breakStatus,reason:"opus-error"})}.bind(this),console.log("opus-ad meta",c),A={type:r,meta:c,beforeAd:l,afterAd:h,adBreakDone:m},"reward"===r&&(A=HD(HD({},A),{},{adDismissed:f,adViewed:p})),this.opusEventReceived=!1,this._startTimeoutForOpus(),a&&a(A);case 31:case"end":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:"preloadAd",value:(w=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==a.AdType.Interstitial){e.next=4;break}return e.abrupt("return","gdsdk://preloaded");case 4:if(t!==a.AdType.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 w.apply(this,arguments)})},{key:"addAdComponents",value:function(){var e=this,t=function(){D.default(this,e),this.adsManager.resume()}.bind(this),n=function(){D.default(this,e),this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!1),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._hideSkipButton(),this.cancel()}.bind(this);try{this.adResume=new lD(this.adContainer,t),this.adResume.add(),this.rewardedLabel=new hD(this.adContainer,t),this.rewardedLabel.add(),this.skipAdButton=new fD(this.adContainer,t,n),this.skipAdButton.add(),this.audioAdLabel=new pD(window.document.body),this.audioAdLabel.add(),this.audioAdLabel.hide()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(_=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(r,i){var s,o,d,u,c,l,h,f,p,m=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{(o=t?t.containerId:null)||i("Container id is not specified"),d=document.getElementById(o),document.getElementById(o)||i("No container is found with this id - ".concat(o)),void 0===window.idhb.requestAds&&i("Prebid.js wrapper script hit an error or didn't exist!"),u=t.slotId?t.slotId:"gd__banner@".concat(o),document.getElementById(u)||(c="\n .gd__banner{\n z-index: ".concat(a.Layers.DisplayContainer.zIndex,";\n height: 100%;\n display: flex !important;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n }"),document.getElementById("gd__banner__style")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=c:l.appendChild(document.createTextNode(c)),d.appendChild(l)),(h=document.createElement("div")).id=u,h.classList.add("gd__banner"),d.appendChild(h)),n.atom_display=null,null!==(s=n.atom_display)&&void 0!==s&&s.params&&window.idhb.setAdserverTargeting(null===(f=n.atom_display)||void 0===f?void 0:f.params),(p={})[u]={maxSize:[d.offsetWidth,d.offsetHeight]},window.idhb.requestAds({slots:p,callback:function(e){D.default(this,m),JSON.stringify(e,null,2)}.bind(this)}),r()}catch(e){console.log("display_test error",e),i(e.message||e)}case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return _.apply(this,arguments)})},{key:"_startInterstitialAd",value:(y=x.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.default.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(D.default(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 r=e.sent,e.next=13,this._loadInterstitialAd(HD(HD({},r),t));case 13:if(a=e.sent,i=a.success,a.args,i){e.next=18;break}return e.abrupt("return");case 18:null!==(n=this.adContext)&&void 0!==n&&n.muteRequested?this.adsManager.setVolume(0):(r.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(s=this.gameData.advlm)||void 0===s?void 0:s.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=28;break;case 23:throw e.prev=23,e.t0=e.catch(0),e.t0,this._onError(e.t0),e.t0;case 28:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return y.apply(this,arguments)})},{key:"_startPromo",value:(b=x.default(R.default.mark((function e(t,n){var r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.requestRunning){e.next=4;break}return this._broadcast("AD_IS_ALREADY_RUNNING",{status:"warning"}),e.abrupt("return");case 4:return this.requestRunning=!0,this.adSuccess=!1,e.next=8,this._initDisplayContainerWithAutoPlay();case 8:return a=e.sent,e.next=11,this._loadPromo(HD(HD({},a),t),n);case 11:if(i=e.sent,s=i.success,i.args,s){e.next=16;break}return e.abrupt("return");case 16:null!==(r=this.adContext)&&void 0!==r&&r.muteRequested?this.adsManager.setVolume(0):(a.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(o=this.gameData.advlm)||void 0===o?void 0:o.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),this.msgrt.send("promo.adsense",{message:"".concat(t.position," success")}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.msgrt.send("promo.adsense.err",{message:"".concat(t.position," failure,").concat(e.t0.message?e.t0.message:e.t0,", [").concat(this.parentURL,"]")}),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return b.apply(this,arguments)})},{key:"_loadPromo",value:(v=x.default(R.default.mark((function e(t,n){var r,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._resetAdsLoader(),e.prev=1,r=this.nextAdPosition(n),i=this._create_promo_context(r),this._requestPromo(i,HD({adType:a.AdType.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 v.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(A=x.default(R.default.mark((function e(t){var n;return R.default.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(a.AdType.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,HD({adType:a.AdType.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 A.apply(this,arguments)})},{key:"_waitOnAdLoad",value:function(){var e=this;return new Promise(function(t,n){var r=this;D.default(this,e);var a="videoad.preloadad";this.eventBus.unsubscribeScope(a);var i=function(e){var n=this;D.default(this,r),setTimeout(function(){D.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!0,args:e})}.bind(this),1)}.bind(this),s=function(e){var n=this;D.default(this,r),setTimeout(function(){D.default(this,n),this.eventBus.unsubscribeScope(a),t({success:!1,args:e})}.bind(this),1)}.bind(this);this.eventBus.subscribe("AD_SDK_MANAGER_READY",i,a),this.eventBus.subscribe("AD_SDK_CANCELED",s,a),this.eventBus.subscribe("AD_ERROR",s,a)}.bind(this))}},{key:"_startRewardedAd",value:(m=x.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.default.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(D.default(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 r=e.sent,e.next=13,this._loadRewardedAd(HD(HD({},r),t));case 13:if(a=e.sent,i=a.success,a.args,i){e.next=18;break}return e.abrupt("return");case 18:null!==(n=this.adContext)&&void 0!==n&&n.muteRequested?this.adsManager.setVolume(0):(r.autoplayRequiresMute&&this.adsManager.setVolume(0),!0===(null===(s=this.gameData.advlm)||void 0===s?void 0:s.mode)&&this.adsManager.setVolume(1)),this.adsManager.init(this.options.width,this.options.height,google.ima.ViewMode.NORMAL),this.adsManager.start(),e.next=27;break;case 23:throw e.prev=23,e.t0=e.catch(0),this._onError(e.t0),e.t0;case 27:case"end":return e.stop()}}),e,this,[[0,23]])}))),function(e){return m.apply(this,arguments)})},{key:"_loadRewardedAd",value:(p=x.default(R.default.mark((function e(t){var n;return R.default.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(a.AdType.Rewarded,t);case 6:e.t0=e.sent;case 7:return n=e.t0,delete this.preloadedRewardedAdVast,e.next=11,this._requestAd(n,HD({adType:a.AdType.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 p.apply(this,arguments)})},{key:"_preloadInterstitialAd",value:(f=x.default(R.default.mark((function e(){return R.default.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(a.AdType.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 f.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(h=x.default(R.default.mark((function e(){return R.default.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(a.AdType.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 h.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 t=this;if(this.activeAdContainer){this.isAudioAd||(this.activeAdContainer.style.visibility="visible");var n=null==e?void 0:e.mode;e.t4r=this.gameData.__t4r;var r=this._adrequest_user_context.t4RResult?this._adrequest_user_context.t4RResult:this._isT4R(e);this._adrequest_user_context.t4RResult=r;var a=r.success,i=r.reason,s=this._getT4ROptions(e);if("loaded"===n){var o,d,u=(null===(o=this._adrequest_user_context)||void 0===o||null===(d=o.adTag)||void 0===d?void 0:d.bidder)||"adx";this._broadcast("AD_BIDDER",{bidder:u}),a||this._broadcast("AD_T4R_NONE",{reason:i}),this.activeAdContainer.style.opacity=a?.001:1,a&&null!=e&&e.contentType.startsWith("video/")&&(this.t4rButton=new mD(this.adContainer),this.t4rButton.add(),this._broadcast("AD_T4R_VIDEO")),a&&this.adsManager.setVolume(0),a&&this._broadcast("AD_T4R"),a&&setTimeout(function(){var e;D.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(e=this.adContext)&&void 0!==e&&e.muteRequested?0:1),this.t4rButton&&this.t4rButton.hide()}.bind(this),((null==s?void 0:s.min)||1234)+Math.random()*((null==s?void 0:s.max)||3210))}else if("click"===n||"first_quartile"===n){var c;if(a&&"click"===n){var l,h=null===(l=this._adrequest_user_context)||void 0===l?void 0:l.tnl_ad_pos;this.clickCount[h]++,this._broadcast("AD_T4R_CLICK")}a||"click"!==n||this._broadcast("AD_CLICK"),this.t4rButton&&this.t4rButton.hide(),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(null!==(c=this.adContext)&&void 0!==c&&c.muteRequested?0:1)}}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=a.Layers.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 n=document.createElement("video");n.setAttribute("playsinline",!0),n.setAttribute("webkit-playsinline",!0),n.id="".concat(this.prefix,"advertisement_video"),n.style.position="absolute",n.style.backgroundColor="#000000",n.style.top="0",n.style.left="0",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px",this.video_ad_player=n,this.adContainer.appendChild(n);var r=document.createElement("div");r.id="".concat(this.prefix,"advertisement_slot"),r.style.position="absolute",r.style.top="0",r.style.left="0",r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",this.adContainerInner=r,this.activeAdContainer=this.adContainer,window.activeAdContainer=this.activeAdContainer,this.thirdPartyContainer?(this.adContainer.appendChild(r),this.thirdPartyContainer.appendChild(this.adContainer),this.activeAdContainer=this.thirdPartyContainer):(this.adContainer.appendChild(r),t.appendChild(this.adContainer)),this.addAdComponents(),this.activeAdContainer.style.visibility="hidden";var i=function(){D.default(this,e);var t=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:t,this.options.height=this.thirdPartyContainer?this.thirdPartyContainer.offsetHeight:a,r.style.width=this.options.width+"px",r.style.height=this.options.height+"px",n.style.width=this.options.width+"px",n.style.height=this.options.height+"px"}.bind(this);window.addEventListener("resize",i),window.document.addEventListener("DOMContentLoaded",i)}},{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 t=this,n=new google.ima.AdsRenderingSettings;n.autoAlign=!1,n.enablePreloading=!1,n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.useStyledNonLinearAds=!0,n.uiElements=[google.ima.UiElements.AD_ATTRIBUTION,google.ima.UiElements.COUNTDOWN],this.adsManager=e.getAdsManager(this.video_ad_player,n),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(){D.default(this,t),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 r=new Date,a=r.getHours(),i=r.getDate(),s=r.getMonth(),o=r.getFullYear(),d="AD_SDK_MANAGER_READY";this._broadcast(d,{name:d,message:"AD SDK is ready",status:"success",analytics:{category:d,action:this.parentDomain,label:"h".concat(a," d").concat(i," m").concat(s," y").concat(o)}}),this._adrequest_user_context=e.getUserRequestContext()}},{key:"_onAdEvent",value:function(e){var t,n,r,i,s=this,o=new Date,d=o.getHours(),u=o.getDate(),c=o.getMonth(),l=o.getFullYear(),h=a.getKeyByValue(google.ima.AdEvent.Type,e.type),f=!1,p=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",m=!p.startsWith("image")&&!p.startsWith("text"),A=null==e||null===(n=e.ad)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.title,g=null==e||null===(i=e.getAd())||void 0===i?void 0:i.data.skippable;this._sendIMAEventsToHB(e);var v=document.getElementById("game"),b="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:b="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:b="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.contentPaused&&(f=!0),this.isAudioAd&&(this.audioAdLabel.hide(),this.isAudioAd=!1),this.rewardGuarantied=!1,b="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:b="Fired when the ad is clicked.";var y=e.getAd().getContentType();this._show({mode:"click",contentType:y}),OD();break;case google.ima.AdEvent.Type.COMPLETE:e.getAd(),f=this._is_completed(e.getAd()),b="Fired when the ad completes playing.",this.adType_!==a.AdType.Rewarded||this.rewardGuarantied||(this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0);break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.gameData.fllc.enabled&&(v.style.display="none"),this.contentPaused=!0,b="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"),b="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",this.contentPaused?f=!0:(this.requestRunning=!1,this._broadcast("AD_ERROR",{message:"got resume without pause, possibly with VMAP",status:"error",skipForward:!0})),this._hideAddResume(),this._hideRewardedLabel(),this._hideSkipButton(),this.t4rButton&&this.t4rButton.hide(),this._clearTimeoutForSkipAddButton();break;case google.ima.AdEvent.Type.DURATION_CHANGE:b="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:b="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:b="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:b="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:b="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();b=w,this._show({mode:"loaded",contentType:w});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(b=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:b="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:m&&"VPAID"!==A&&this.adResume.show(),b="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:b="Fired when the ad is resumed.",m&&(this.adResume.hide(),this.rewardedLabel.hide());break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:b="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:f=this._is_completed(e.getAd()),b="Fired when the ad is skipped by the user.",ID(),this.t4rButton&&this.t4rButton.hide();break;case google.ima.AdEvent.Type.STARTED:var k;if(this.skipAdButton&&this.skipAdButton.hide(),this.rewardGuarantied=!1,this.adType_===a.AdType.Rewarded)!g&&null!==(k=this.gameData.rwskp)&&void 0!==k&&k.enabled&&(this._skipAdButtonTimeout=setTimeout(function(){D.default(this,s),this.skipAdButton.show(),this._broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this.rewardGuarantied=!0}.bind(this),3e4)),this.rewardedLabel.show();this._hideAddResume(),b="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:b="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:f=this._is_completed(e.getAd()),b="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:b="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:b="Fired when the ad volume has been muted."}if(""!==h&&""!==b){var E=!this.contentPaused&&e.type===google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,x=!this.contentPaused&&e.type===google.ima.AdEvent.Type.ALL_ADS_COMPLETED;E||x||this.isAudioAd||this._broadcast(h,{name:h,message:b,status:"success",analytics:{category:h,action:this.parentDomain,label:"h".concat(d," d").concat(u," m").concat(c," y").concat(l)}})}if(f&&!this.adSuccess){this.adSuccess=!0;var S=e.getAd(),R="Rainbow"===(null==S?void 0:S.getAdSystem())&&(null==S?void 0:S.getWrapperAdIds().some(function(e){return D.default(this,s),"promo"===e}.bind(this)));null==S||S.getAdSystem(),null==S||S.getWrapperAdIds(),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success",isPromoSuccess:R}),this.resetForNext(e)}}},{key:"_clearTimeoutForSkipAddButton",value:function(){this._skipAdButtonTimeout&&(clearTimeout(this._skipAdButtonTimeout),this._skipAdButtonTimeout=null)}},{key:"_run_atom_tag_aws_test",value:function(e){var t=this;try{var n,r,a,i,s;if(!((null===(n=this.gameData)||void 0===n||null===(r=n.aws_tst)||void 0===r?void 0:r.enabled)&&(null===(a=this.gameData)||void 0===a||null===(i=a.aws_tst)||void 0===i||null===(s=i.ep)||void 0===s?void 0:s.atm)))return;var o=e.type,d=e.url;if("none"===o||!d)return;d=d.replace("tag.atom.gamedistribution.com","atom-tag-prod-aws.gamedistribution.com"),fetch(d).then(function(){D.default(this,t)}.bind(this))}catch(e){}}},{key:"_findAtomTagUrl",value:function(e,t){var n=this,r={type:"none"};try{var a=this.current_dp,i=a.id,s=a.error_url,o=a.impression_url,d=a.fallback_imp_url,u=a.promo_imp_green_url;if(!e&&!t)return r={type:"imp_err",url:s};var c=e.getWrapperAdIds().some(function(e){return D.default(this,n),e==="".concat(i)}.bind(this)),l=e.getWrapperAdIds().some(function(e){return D.default(this,n),"fallback"===e}.bind(this)),h=e.getWrapperAdIds().some(function(e){return D.default(this,n),"promo"===e}.bind(this));c&&t?r={type:"normal_imp",url:o}:c&&!t?r={type:"normal_err",url:s}:h&&t?r={type:"promo_imp",url:u}:l&&t&&(r={type:"fallbacj_imp",url:d})}catch(e){}return r}},{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(),a=this._getInnerErrorCode(n);QD.emit("AD_ERROR",r),this._broadcast(t,{message:r,details:a,status:"warning",analytics:{category:t,action:a,label:r}}),this._hideAddResume(),this._clearTimeoutForSkipAddButton()}catch(e){}}},{key:"_hideAddResume",value:function(){try{this.adResume&&this.adResume.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideAdSpinner",value:function(){try{var e;null!==(e=this.gameData.adspn)&&void 0!==e&&e.enabled&&this.adFlowProcessSpinner&&this.adFlowProcessSpinner.hide()}catch(e){console.log("Error on hide adSpinner",e)}}},{key:"_hideRewardedLabel",value:function(){try{this.adType_===a.AdType.Rewarded&&this.rewardedLabel&&this.rewardedLabel.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_hideSkipButton",value:function(){try{this.adType_===a.AdType.Rewarded&&this.skipAdButton&&this.skipAdButton.hide()}catch(e){console.log("Error on hide adResume",e)}}},{key:"_sendIMAEventsToHB",value:function(e){if(window.idhb&&"function"==typeof window.idhb.onImaEvent)try{window.idhb.onImaEvent({event:e})}catch(e){}}},{key:"_resetAdsLoader",value:function(){this.adsManager&&(this.adsManager.destroy(),this.adsManager=null,this._adrequest_user_context=null),this.adsLoader&&this.adsLoader.contentComplete()}},{key:"_startSafetyTimer",value:function(e,t){var n=this;this.safetyTimer&&clearTimeout(this.safetyTimer),this.safetyTimer=window.setTimeout(function(){D.default(this,n),this.cancel(),this._clearSafetyTimer(t)}.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(AD(e.getInnerError)){var t=e.getInnerError();if(t)return AD(t.getErrorCode)&&AD(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,t){var n=this;if(e){var r=this.macros.transform(e,{get:function(e){if(D.default(this,n),t&&t.tnl_keys)return t.tnl_keys[e.toLowerCase()]}.bind(this)});for(var a in r.query||{}){var i=r.query[a];g.isPlainObject(i)&&(r.query[a]=j.default.stringify(i))}var s=new O.default(r.url,!0);return G.default(s.query,r.query||{}),HD({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new O.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new O.default(e.url,!0);if(i.query.cust_params){var s=j.default.parse(i.query.cust_params);n.bidder=s.hb_bidder,n.cust_params=s}n.url_parsed=i}catch(e){n.hasError=!0,n.message=e.message,n.bidder="error",console.log(e.message)}return n}},{key:"_transformQuery",value:function(e,t,n){var r=this;if(e&&t&&e.tnl_keys){var a=this.options.vast_query;if(t.retry_on_success&&this.options.retry_on_success&&g.isPlainObject(this.options.retry_on_success.vast_query)?a=this.options.retry_on_success.vast_query:t.retry_on_failure&&this.options.retry_on_failure&&g.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=M.default(a),g.isPlainObject(a)){var i=n.query;if(a.$$remove){for(var s in i){new RegExp(a.$$remove,"i").test(s)&&delete i[s]}delete a.$$remove}var o=j.default.parse(i.cust_params);if(a.cust_params&&a.cust_params.$$remove){for(var d in o){new RegExp(a.cust_params.$$remove,"i").test(d)&&delete o[d]}delete a.cust_params.$$remove}var u=this.macros.transform(a,{get:function(t){return D.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,G.default(i,u),i.cust_params=j.default.stringify(i.cust_params),!0}}}},{key:"_isExcludedBidderForT4R",value:function(){var e=this;try{var t,n,r,a,i=(null===(t=this._adrequest_user_context)||void 0===t||null===(n=t.adTag)||void 0===n?void 0:n.bidder)||"adx";this.msgrt.send("bidder",{message:i}),this._adrequest_user_context,'bidder:"'.concat(i,'"');var s=(null===(r=this.gameData.t4rc)||void 0===r?void 0:r.bidder_exc)||[],o=(null===(a=this.gameData.t4rc)||void 0===a?void 0:a.bidder_inc)||[],d=!1;return o.length>0?d=!o.some(function(t){return D.default(this,e),t===i}.bind(this)):s.length>0&&(d=s.some(function(t){return D.default(this,e),t===i}.bind(this))),d}catch(e){console.log("ex_bidder ERR",e)}}},{key:"_isExcludedBidderForT4RWithBidderExcRate",value:function(){var e,t,n,r,a=this._isExcludedBidderForT4R(),i=null===(e=this.gameData)||void 0===e||null===(t=e.t4rc)||void 0===t?void 0:t.bidder_exc_rate,s=null!=i&&i.enabled?(null==i?void 0:i.rate)||.8:0,o=(null===(n=this._adrequest_user_context)||void 0===n||null===(r=n.adTag)||void 0===r?void 0:r.bidder)||"adx",d=Math.random();return a||"adx"!==o&&d<s}},{key:"_isT4R",value:function(e){var t,n,r,a,i,s,o;if(!this.gameData.publishedAt)return{success:!1,reason:"pdate-2"};var d=new Date(this.gameData.publishedAt);if(((new Date).getTime()-d.getTime())/864e5<=10)return{success:!1,reason:"pdate-1"};var u=this.gameData.meta,c=e.t4r.meta;if((null==u||null===(t=u.ast)||void 0===t?void 0:t.c)>=(null==c||null===(n=c.ast)||void 0===n?void 0:n.c)&&(null==u||null===(r=u.sit)||void 0===r?void 0:r.c)>=(null==c||null===(a=c.sit)||void 0===a?void 0:a.c))return{success:!1,reason:"meta"};var l=this._isExcludedBidderForT4RWithBidderExcRate();if(console.log("zxcv isExcludedBidderForT4R",l),l)return this.msgrt.send("bidder.ex",{message:"true"}),{success:!1,reason:"bidder"};this.msgrt.send("bidder.ex",{message:"false"});var h=null===(i=this._adrequest_user_context)||void 0===i?void 0:i.tnl_ad_pos;if(this.clickCount[h]>=(null===(s=e.t4r[h])||void 0===s?void 0:s.count))return{success:!1,reason:"click-count"};if(null!=e&&null!==(o=e.contentType)&&void 0!==o&&o.startsWith("image/")||"text"===(null==e?void 0:e.contentType)){var f,p=h&&(null===(f=e.t4r[h])||void 0===f?void 0:f.enabled);return{success:p,reason:p?null:"rule-check"}}if(null!=e&&e.contentType.startsWith("video/")){var m,A=(null===(m=e.t4r[h])||void 0===m?void 0:m.viper)||0;if(A>0){var g,v=Math.random()<A,b=h&&v&&(null===(g=e.t4r[h])||void 0===g?void 0:g.enabled);return{success:b,reason:b?null:"viper-check"}}return{success:!1,reason:"rule-check-viper"}}return{success:!1,reason:"media-format"}}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m;if(!e)return!1;var A="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===(a=r.pAds)||void 0===a||null===(i=a.vmap)||void 0===i?void 0:i.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===(u=d.mAds)||void 0===u||null===(c=u.vmap)||void 0===c?void 0:c.enabled))||"rewarded"===e&&(!0===(null===(l=this.gameData)||void 0===l||null===(h=l.rAds)||void 0===h?void 0:h.vmap)||!0===(null===(f=this.gameData)||void 0===f||null===(p=f.rAds)||void 0===p||null===(m=p.vmap)||void 0===m?void 0:m.enabled));if(!A)return!1;var g=this._get_vmap_config(e),v=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?v>=(null==g?void 0:g.start):A}},{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,a=e.dp,i=r.count||2,s=[],o=1;o<=i;o++){var d={};d.adtag=this._createCustomAdVastUrl(r["vast_"+o])||t,d.position=n,d.dp=r["vast_"+o]?void 0:a,s.push(d)}return s}},{key:"_get_vmap_config",value:function(e){var t,n,r,a,i,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===(a=r.mAds)||void 0===a?void 0:a.vmap;case"rewarded":return null===(i=this.gameData)||void 0===i||null===(s=i.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(t){var n=this;D.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new cD(this.gameData).checkCustomParams();a&&(r.cp=a);var i=encodeURIComponent(u.Base64.encode(JSON.stringify(r)));fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(i)).then(function(e){return D.default(this,n),e.json()}.bind(this)).then(function(e){if(D.default(this,n),!e||!e.p)return this.msgrt.send("dp.na",{message:"atom"}),t();var r=e.p/100;this.msgrt.send("dp.fp",{message:r}),t({params:{fp:r},error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(i),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(i)})}.bind(this)).catch(function(e){D.default(this,n),this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}.bind(this))}catch(e){this.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),t()}}.bind(this))}},{key:"_create_promo_context",value:function(e){var t,n=this,r={id:this.topDomain||this.parentDomain,au:e||"unknown",ty:"video",aid:this.gameData.gameId,pgu:this.parentURL},a=Object.keys(r).map(function(e){return D.default(this,n),"".concat(e,"=").concat(encodeURIComponent(r[e]))}.bind(this)).join("&");encodeURIComponent(u.Base64.encode(JSON.stringify(r)));var i=null===(t=this.gameData.promo)||void 0===t?void 0:t.rainbow,s=null==i?void 0:i.enabled,o="https://tag.atom.gamedistribution.com/v1/rainbow/?".concat(a),d=s?o:void 0;return function(){D.default(this,n),ls.promoError&&(console.log("promo-test fictional promo error"),d=void 0)}.bind(this),{promo_url:d,promo_imp_blue_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:s?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0}}},{key:"_create_dp_context",value:function(e,t){var n=this;return new Promise(function(){var r=x.default(R.default.mark((function r(a){var i,s,o,d,c,l=this;return R.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,n._isDP(e)){r.next=5;break}return n.msgrt.send("dp.na",{message:"rule"}),r.abrupt("return",a());case 5:s={id:n.topDomain||n.parentDomain,au:e||"unknown",ty:"video",aid:n.gameData.gameId,pgu:n.parentURL},(o=new cD(n.gameData).checkCustomParams())&&(s.cp=o),d=encodeURIComponent(u.Base64.encode(JSON.stringify(s))),null==t||t.adapterIndex,null==t||t.isLastAdapter,c=null===(i=n.gameData.promo)||void 0===i?void 0:i.rainbow,!1,null==c||c.enabled,null==t||t.isLastAdapter,fetch("https://tag.atom.gamedistribution.com/v1/atm?ar=".concat(d)).then(function(e){return D.default(this,l),e.json()}.bind(this)).then(function(e){if(D.default(this,l),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;n.msgrt.send("dp.fp",{message:t}),a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:void 0,promo_imp_blue_url:void 0,promo_imp_green_url:void 0})}.bind(this)).catch(function(e){D.default(this,l),n.msgrt.send("dp.err",{message:(null==e?void 0:e.message)||e}),a()}.bind(this)),r.next=20;break;case 16:r.prev=16,r.t0=r.catch(0),n.msgrt.send("dp.err",{message:(null===r.t0||void 0===r.t0?void 0:r.t0.message)||r.t0}),a();case 20:case"end":return r.stop()}}),r,this,[[0,16]])})));return function(e){return r.apply(this,arguments)}}())}},{key:"_extend_dp_with_adsense",value:function(e,t){if(e&&t)try{var n,r=new O.default(t.vastUrl,!0);if(null===(n=r.query)||void 0===n||!n.cust_params)return;var a=j.default.parse(r.query.cust_params);if(!a.tnl_asset_id)return;a.adsense=1,r.query.cust_params=j.default.stringify(a,!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 a,i=new O.default(e.url,!0);if(null===(a=i.query)||void 0===a||!a.cust_params)return;var s=j.default.parse(i.query.cust_params);s.bfa=r,s.adsense=0,i.query.cust_params=j.default.stringify(s,!1),e.url=i.toString(),t.vastUrl=e.url}catch(e){}finally{this.msgrt.send("bfa",{message:r})}}},{key:"_init_hl_script",value:(l=x.default(R.default.mark((function e(t){var n,r,i,s,o,d,u,c,l=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._getPrebidScripts(),r=n[0],i=function(){return D.default(this,l),!1}.bind(this),window.idhb=window.idhb||{iabCmpExists:i},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||[],(s=new URL(r)).searchParams.append("referer",window.idhb.options.configUrl),r=s.href,e.next=13,a.getScript(r,"gdsdk_prebid",{alternates:n,error_prefix:"Blocked:",exists:function(){return D.default(this,l),window.idhb.requestAds}.bind(this)});case 13:o=a.getQueryString("ch",window.location.href),d=a.getQueryString("ch_date",window.location.href),u={tnl_content_category:this.category.toLowerCase()},o&&(u.channel=o),d&&(u.ch_date=d),(c=a.getQueryString("hl_label",this.parentURL)||a.getQueryString("hl_label",window.location.href))&&(u.label=c),window.idhb.setAdserverTargeting(u),window.idhb.allowPersonalizedAds(!!parseInt(this.userAllowedPersonalizedAds)),window.idhb.addEventListener("slotRenderEnded",function(e){var t=this;D.default(this,l);try{var n,r,a=e.slotId.split("@");a=1===a.length?a[0]:a[1],e.isEmpty?(null!==(n=this.atom_display)&&void 0!==n&&n.error_url&&(fetch(this.atom_display.error_url).catch(function(e){D.default(this,t)}.bind(this)),delete this.atom_display),this._broadcast("DISPLAYAD_ERROR",{message:a,status:"warning"})):(null!==(r=this.atom_display)&&void 0!==r&&r.impression_url&&(fetch(this.atom_display.impression_url).catch(function(e){D.default(this,t)}.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 l.apply(this,arguments)})},{key:"_init_ima_script",value:(c=x.default(R.default.mark((function e(t){var n,r,i=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=["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"],r=this.options.debug?n[0]:n[1],e.next=4,a.getScript(r,"gdsdk_ima",{alternates:n,error_prefix:"Blocked:",exists:function(){return D.default(this,i),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=x.default(R.default.mark((function e(t){var n,r,i,s,o=this;return R.default.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(s={}).crossorigin="anonymous",s["data-ad-client"]=(null==t||null===(n=t.adsense_client)||void 0===n?void 0:n.length)>0?t.adsense_client:"ca-pub-2316275586951220",s["data-ad-frequency-hint"]="30s",s.allow="autoplay",(null==t||null===(r=t.adsense_channel)||void 0===r?void 0:r.length)>0&&(s["data-ad-channel"]=t.adsense_channel),(null==t||null===(i=t.adsense_host)||void 0===i?void 0:i.length)>0&&(s["data-ad-host"]=t.adsense_host),!0===(null==t?void 0:t.adsense_adbreak_test)&&(s["data-adbreak-test"]="on"),e.next=15,a.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return D.default(this,o),!!window.adsbygoogle}.bind(this),attrs:s});case 15:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"on"});case 17:case"end":return e.stop()}}),e,this)}))),function(e){return 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",a=n||!0,i=document.getElementsByClassName("adsbygoogle"),s=0;s<i.length;s++){var o,d=i[s],u=d&&(null===(o=d.children[0])||void 0===o?void 0:o.children[0]);u&&"IFRAME"===u.tagName&&u.style.height!==r&&(u.style.height=r,a&&(u.parentElement.style.overflow="auto"))}}catch(e){"out-of-bounds error: ".concat(e.message)}}},{key:"clearSession",value:function(){this.requestRunning=!1}},{key:"_startAdsensePlacementRewardedAd",value:(o=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.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(D.default(this,c),ls.fictionalAdSenseError||t.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"),n=!1,r=function(){D.default(this,c),n=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),a=function(){D.default(this,c),n=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),i=function(){D.default(this,c),n=!0,this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),s=function(){D.default(this,c),n=!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),o=function(e){D.default(this,c),n=!0,e()}.bind(this),d=function(e){D.default(this,c),n=!0,this.resetForNext();var t="rewarded";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"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),u=function(e){window.adsbygoogle.push(e)},setTimeout(function(){D.default(this,c),n||(us("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),u({type:"reward",name:"reward-in-game",beforeAd:r,afterAd:a,adDismissed:i,adViewed:s,beforeReward:o,adBreakDone:d}),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=x.default(R.default.mark((function e(t){var n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.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(D.default(this,a),ls.fictionalAdSenseError||t.params.shouldFail)return this._broadcast("AD_ERROR",{message:"fictional adsense preroll error",status:"error"}),!0}.bind(this)){e.next=8;break}return e.abrupt("return");case 8:this.requestRunning=!0,this._send_atom_event("sg.ad.pr.requested"),this.adPlacementEventReceived=!1,n=function(){D.default(this,a),this.adPlacementEventReceived=!0}.bind(this),r=function(e){D.default(this,a),this.adPlacementEventReceived=!0,this.resetForNext();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"}),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"}),this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),i={type:"preroll",beforeAd:n,adBreakDone:r},window.adsbygoogle.push(i),e.next=22;break;case 18:throw e.prev=18,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 22:case"end":return e.stop()}var i}),e,this,[[1,18]])}))),function(e){return s.apply(this,arguments)})},{key:"_startAdsensePlacementStart",value:(i=x.default(R.default.mark((function e(t){var n,r,a,i=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.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(D.default(this,i),ls.fictionalAdSenseError||t.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"),n=function(){D.default(this,i),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){D.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){D.default(this,i),this.adPlacementEventReceived=!0,this.resetForNext();var t="preroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.pr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.pr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"preroll"}),s={type:"start",name:"start-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var s}),e,this,[[1,19]])}))),function(e){return i.apply(this,arguments)})},{key:"_startTimeoutForAdBreak",value:function(e){var t,n,r,a,i,s,o=this;if(null===(t=this.gameData)||void 0===t||null===(n=t.ad_blcks)||void 0===n||null===(r=n.adsenseTimeout)||void 0===r?void 0:r.enabled){null==e||e.adType,null===(a=this.gameData)||void 0===a||null===(i=a.ad_blcks)||void 0===i||null===(s=i.adsenseTimeout)||void 0===s||s.timeout;var d=setTimeout(function(){D.default(this,o),this.adPlacementEventReceived||(this._broadcast("AD_ERROR",{message:"timeout-_startTimeoutForAdBreak",status:"error"}),this.adPlacementEventReceived=!1,this.requestRunning=!1),clearTimeout(d)}.bind(this),5e3)}}},{key:"_startTimeoutForOpus",value:function(){var e=this,t=setTimeout(function(){D.default(this,e),this.opusEventReceived||(this._broadcast("AD_ERROR",{message:"opus-sdk-timeout",status:"error",reason:"forced-sdk-timeout"}),this.opusEventReceived=!1,this.requestRunning=!1),clearTimeout(t)}.bind(this),8e3)}},{key:"_startAdsensePlacementNext",value:(r=x.default(R.default.mark((function e(t){var n,r,a,i=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.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(D.default(this,i),ls.fictionalAdSenseError||t.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"),n=function(){D.default(this,i),this.adPlacementEventReceived=!0,this.fixOutOfBounds(),this._broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this._broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){D.default(this,i),this.adPlacementEventReceived=!0,this._broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),this.adPlacementEventReceived=!1,a=function(e){D.default(this,i),this.adPlacementEventReceived=!0,this.resetForNext();var t="midroll";this.adCounter[t]=this.adCounter[t]||0,this.adCounter[t]++,"viewed"===e.breakStatus?(this._send_atom_event("sg.ad.mr.viewed"),this._broadcast("COMPLETE",{message:"",status:"success"}),this._broadcast("AD_SUCCESS",{message:"Ad succeeded.",status:"success"})):(this._broadcast("AD_ERROR",{message:e.breakStatus,status:"error"}),this._send_atom_event("sg.dbg.mr",e))}.bind(this),this._startTimeoutForAdBreak({adType:"midroll"}),s={type:"next",name:"next-in-game",beforeAd:n,afterAd:r,adBreakDone:a},window.adsbygoogle.push(s),e.next=23;break;case 19:throw e.prev=19,e.t0=e.catch(1),this._onError(e.t0),e.t0;case 23:case"end":return e.stop()}var s}),e,this,[[1,19]])}))),function(e){return r.apply(this,arguments)})},{key:"_send",value:function(e,t){try{var n=this.msgrt,r=n._layout,a=n._ua,i={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:a.browser.name,brvs:a.browser.version,osnm:a.os.name,osvs:a.os.version,dvmd:a.device.model,w:r.w,h:r.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(i)))))}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 S_).get();return n=HD(HD({},n),r),n=t?HD(HD({},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===a.AdType.Rewarded)t="reward";else if(n===a.AdType.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,t){var n=this,r=!1;["AD_ERROR"].some(function(t){return D.default(this,n),t===e}.bind(this))&&(r=!this.adContext.isLastAdapter||this.adContext.extraPromoRunOnFail);var a=this.getCurrentAdPosition(this.adContext.adType);this.eventBus.broadcast(e,HD(HD({},t),{},{skipForward:r,adPosition:a}))}},{key:"mute",value:(n=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.adContext&&(this.adContext.muteRequested=!0),this.adsManager&&this.adsManager.setVolume(0);case 2:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"terminate",value:(t=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.cancel();case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),WD=T.default((function e(t){var n=this;C.default(this,e),I.default(this,"load",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jg(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),I.default(this,"promo",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-stone-dynamic",a=t.package_version||"1.1.1",i=t.template||"puzzle",s=t.dependencies||[];this.moduleName="GDPromoByOrbit",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Kg(this.moduleName,this.moduleConfig)})),KD=T.default((function e(t){var n=this;C.default(this,e),I.default(this,"load",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Jg(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),I.default(this,"splash",x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.module){e.next=3;break}return e.next=3,n.load();case 3:return e.abrupt("return",n.module[n.moduleDefault]);case 4:case"end":return e.stop()}}),e)}))));var r=t.package||"gd-sdk-air-dynamic",a=t.package_version||"1.2.0",i=t.template||"pluto",s=t.dependencies||[];this.moduleName="GDSplashDynamic",this.moduleDefault=i.charAt(0).toUpperCase()+i.slice(1),this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/".concat(r,"/").concat(a,"/dist/").concat(i.toLowerCase(),"/iife/index.js"),dependencies:s},Kg(this.moduleName,this.moduleConfig)})),YD=function(e,t){console.log(e,t)},JD={},ZD={},XD=null;function $D(){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 JD.version=r,JD.frame=e,JD.function=n,JD.version}function eS(e){var t=this;return XD||(XD=new Promise(function(n){function r(t,r){if(YD("Received a response from CMP",t),r){var a,i;if(!1!==t.gdprApplies)return"tcloaded"===t.eventStatus||"useractioncomplete"===t.eventStatus?(("boolean"!=typeof(i=(a=t)&&"boolean"==typeof a.gdprApplies?a.gdprApplies:e.defaultGdprScope)||!0===i&&"string"!=typeof a.tcString)&&n({result:"cmpUnexpectedResponse",cmp:JD,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}D.default(this,t),$D(),JD.frame?2===JD.version?(YD("TCF v2 CMP found. Fetching the consent."),JD.function?(YD("CMP API is directly accessible, calling it now..."),JD.function("addEventListener",JD.version,r)):(YD("CMP API is outside the current iframe, calling it now..."),function(e,t,n){var r=this,a="__tcfapi";function i(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!==ZD[r.callId]&&ZD[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){D.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=I.default({},d,{command:e,parameter:s,callId:o,version:n});ZD[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,JD.version,n)}("addEventListener",JD.frame,r))):n({result:"cmpVersionNotV2",cmp:JD}):n({result:"cmpNotFound"})}.bind(this)),XD)}var tS=new(function(){function e(){C.default(this,e),this.productName="Game Distribution"}var t;return T.default(e,[{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:(t=x.default(R.default.mark((function e(t,n){var r,a,i,s,o,d,u;return R.default.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(i=null==t||null===(r=t.visitor)||void 0===r||null===(a=r.visitorData)||void 0===a?void 0:a.visitorId){e.next=6;break}return e.abrupt("return");case 6:return s=encodeURIComponent(this.productName),o=encodeURIComponent(i),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,u="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(s,"/user_id/").concat(o),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,n){return t.apply(this,arguments)})}]),e}());function nS(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 rS(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 rS(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function rS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var aS=function(e){var t=this,n=e.src,r=e.attributes,a=e.target,i=e.isAsync;return new Promise(function(e,s){var o=this;D.default(this,t);try{var d=document.createElement("script");if(d.async=null==i||i,d.type="text/javascript",d.onload=function(){D.default(this,o),e()}.bind(this),d.onerror=function(){D.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),d.src=n,r){var u,c=nS(r);try{for(c.s();!(u=c.n()).done;){var l=u.value,h=l.key,f=l.value;d.setAttribute(h,f)}}catch(e){c.e(e)}finally{c.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var p="Error on script load catch, Error: ".concat(n);console.log(p,e),s(p)}}.bind(this))},iS="ffd4774b-99ae-4464-8f40-3afa12b4692e",sS=function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,aS({src:"https://cdn.cookielaw.org/consent/tcf.stub.js",attributes:[{key:"id",value:"gd-cookie-pro-tcf-stub"},{key:"charset",value:"UTF-8"}],isAsync:!1});case 3:return e.next=5,aS({src:"https://cdn.cookielaw.org/consent/".concat(iS,"/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,aS({src:"https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:iS}],isAsync:!1});case 7:n=void 0,r=void 0,a=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(a=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(a),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,a}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),oS=new m.EventEmitter,dS={"https://games.softgames.com":{"splash-hidden":"splash-hidden"},"https://sg.gamedistribution.com":{"splash-hidden":"splash-hidden"},"https://html5.gamedistribution.com":{key:"value"}},uS=!1;function cS(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 t=this,n=e.data,r=e.origin,a=n.type;if(Object.keys(dS).some(function(e){return D.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=!n.type||!n.type.startsWith("gd-sdk")&&!("parent-data-response"===n.type)||"sg-game-event"===n.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 a="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)&&(uS=!0),a&&uS&&(uS=!1,window.parent.postMessage({type:"sg-game-event",eventName:"levelFinish",data:{score:100}},"*"))}}(n);var s=function(){D.default(this,t);try{var n,r;return null==e||null===(n=e.source)||void 0===n||null===(r=n.location)||void 0===r?void 0:r.href}catch(e){}}.bind(this);if(window.parent&&i){if("https://html5.gamedistribution.com"===r){var o=s();if(!o)return;var d=o&&["9555f04e1900482aaaef710cd2f8c440"].some(function(e){return D.default(this,t),o.indexOf(e)>0}.bind(this)),u=["sg-game-event"].some(function(e){return D.default(this,t),e===(null==n?void 0:n.type)}.bind(this));if(!d&&!u)return}var c=n.eventName,l=n.data;window.mpHelper&&(console.log("SG_EVENTS sending to minijuegos!"),"levelStart"!==c&&"levelFinish"!==c||window.mpHelper.sendStat("level",l.level),"levelFinish"===c&&window.mpHelper.sendStat("score",l.score)),window.parent.postMessage(n,"*")}if(a){var h=dS[r][a];h&&oS.emit(h,n)}}}),!1);var lS="__msgr",hS=y.v4(),fS=function(e){var t=this;if(!window[lS]){var n=document.createElement("iframe");if(n.src="https://static.gamedistribution.com/message/index.html",n.style.display="none",n.name=lS,document.body.appendChild(n),window!==window.top){var r={gameId:e.gameId,target:e.evnts.domain,token:hS,event_name:"TokenGenerated",timestamp:Date.now()};n.onload=function(){AS(r)},setInterval(function(){D.default(this,t),r.timestamp=Date.now(),r.event_name="Heartbeat",AS(r)}.bind(this),1e3*e.evnts.heartbeatDuration)}}window.addEventListener("message",function(e){D.default(this,t);try{var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cS(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.data);if(!n.event_name)return;n.token=hS,AS(n)}catch(e){console.error("GD Messager Error",e.message)}}.bind(this),!1)},pS=function(e){try{var t={gameId:e.game.gameId,target:e.game.evnts.domain,event_name:e.event,timestamp:Date.now()},n=mS(window);n!==window.top&&(null==n||n.postMessage(t,"https://html5.gamedistribution.com"))}catch(e){}},mS=function e(t){try{var n,r,a=null==t?void 0:t.parent;if("game"===(null===(n=a.document)||void 0===n||null===(r=n.activeElement)||void 0===r?void 0:r.id))return a;e(a)}catch(e){return t}},AS=function(e){try{window[lS]&&window[lS].postMessage(e,"*")}catch(e){console.log("GD Messager initialization, please wait....")}},gS=function(){function e(t){C.default(this,e),this.adContainer=document.getElementById("gdsdk__advertisement"),this.adContainerInner=document.getElementById("gdsdk__advertisement_slot"),this._adRequest=t.adRequest,this._gameData=t._gameData,this._msgrt=t._msgrt,this._adInstance=t._adInstance,this._eventBus=t._eventBus,this.blockedAdsMap=t._blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t._onResumeGame.bind(t),this._onPauseGame=t._onPauseGame.bind(t),this._onRewardedWatchComplete=t._onRewardedWatchComplete.bind(t),this._onAdError=t._onAdError.bind(t),this._promoShowSuccess=!1}var t,n,r;return T.default(e,[{key:"run",value:function(e){var t=e.duration,n=this;return new Promise(function(){var e=x.default(R.default.mark((function e(r,a){var i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.add();case 3:i=n.show(),setTimeout(function(){D.default(this,s);try{n.hide(),r({success:i})}catch(e){a(e)}}.bind(this),1e3*t),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a(e.t0);case 10:case"end":return e.stop()}}),e,this,[[0,7]])})));return function(t,n){return e.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:(r=x.default(R.default.mark((function e(){var t,n,r,a=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.fetch_promo();case 3:this.promo_data=e.sent,t=document.createElement("div"),this.promo=t,n=this.promo_data,this.promo.addEventListener("click",function(){var e=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),console.log(n),a.track_click(n.click_tracking),window.open(n.click_through,"_blank");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(r=document.createElement("iframe")).src=this.promo_data.renderer_url,r.setAttribute("frameborder",0),this.addStyles(),this.promo.classList.add("gd__promo"),r.classList.add("gd__promo__iframe"),this.promo.appendChild(r),this.adContainer.appendChild(this.promo),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return r.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:(n=x.default(R.default.mark((function e(){var t,n=this;return R.default.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 D.default(this,n),e.json()}.bind(this));case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"track_click",value:(t=x.default(R.default.mark((function e(t){return R.default.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 t.apply(this,arguments)})}]),e}(),vS=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"GD",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ObjectStore";C.default(this,e),this.dbName=t,this.storeName=n,this.db=null,this.init()}var t,n,r,a;return T.default(e,[{key:"init",value:function(){var e=this;return new Promise(function(t,n){var r=this;D.default(this,e);var a=indexedDB.open(this.dbName,1);a.onerror=function(e){D.default(this,r),console.error("Database error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(e){D.default(this,r),this.db=e.target.result,t(this.db)}.bind(this),a.onupgradeneeded=function(e){D.default(this,r);var t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName,{keyPath:"key"})}.bind(this)}.bind(this))}},{key:"getItem",value:(a=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;D.default(this,n);var i=this.db.transaction([this.storeName],"readonly").objectStore(this.storeName).get(t);i.onerror=function(e){D.default(this,a),console.error("Get item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){D.default(this,a),i.result?e(i.result.value):e(null)}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"setItem",value:(r=x.default(R.default.mark((function e(t,n){var r=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,a){var i=this;D.default(this,r);var s=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).put({key:t,value:n});s.onerror=function(e){D.default(this,i),console.error("Set item error:",e.target.error),a(e.target.error)}.bind(this),s.onsuccess=function(t){D.default(this,i),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"removeItem",value:(n=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,r){var a=this;D.default(this,n);var i=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).delete(t);i.onerror=function(e){D.default(this,a),console.error("Remove item error:",e.target.error),r(e.target.error)}.bind(this),i.onsuccess=function(t){D.default(this,a),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"clear",value:(t=x.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.db){e.next=3;break}return e.next=3,this.init();case 3:return e.abrupt("return",new Promise(function(e,n){var r=this;D.default(this,t);var a=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).clear();a.onerror=function(e){D.default(this,r),console.error("Clear store error:",e.target.error),n(e.target.error)}.bind(this),a.onsuccess=function(t){D.default(this,r),e()}.bind(this)}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),bS=function(){function e(t){var n=t.mode;C.default(this,e),this.setItem=function(){var e=x.default(R.default.mark((function e(t,n){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.getItem=function(){var e=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),"indexed-db"===n?(this.indexedStore=new vS,this.setItem=this.indexedStore.setItem.bind(this.indexedStore),this.getItem=this.indexedStore.getItem.bind(this.indexedStore)):"local-storage"===n&&(this.setItem=function(){var e=x.default(R.default.mark((function e(t,n){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.Ls.set(t,n));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.getItem=function(){var e=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.Ls.getString(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}var t,n;return T.default(e,[{key:"set",value:(n=x.default(R.default.mark((function e(t,n){var r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=JSON.stringify(n),e.next=3,this.setItem(t,r);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"get",value:(t=x.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItem(t);case 2:return n=e.sent,e.abrupt("return",n?JSON.parse(n):null);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),e}();function yS(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?yS(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wS,kS="_gd_vs";function ES(e){return xS.apply(this,arguments)}function xS(){return xS=x.default(R.default.mark((function e(t){var n,r,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.gameId,r=t.serverDate,s=[],!window.indexedDB){e.next=13;break}return e.prev=3,e.next=6,RS({gameId:n,serverDate:r});case 6:i=e.sent,e.next=13;break;case 9:e.prev=9,e.t0=e.catch(3),cs("visit-update error, indexedDb",e.t0.message),s.push(e.t0.message);case 13:if(i||!a.Ls.available){e.next=24;break}return e.prev=14,e.next=17,DS({gameId:n,serverDate:r});case 17:i=e.sent,e.next=24;break;case 20:e.prev=20,e.t1=e.catch(14),cs("visit-update error, Ls",e.t1.message),s.push(e.t1.message);case 24:return e.abrupt("return",_S(_S({},i),{},{errors:s}));case 25:case"end":return e.stop()}}),e,null,[[3,9],[14,20]])}))),xS.apply(this,arguments)}function DS(e){return SS.apply(this,arguments)}function SS(){return SS=x.default(R.default.mark((function e(t){var n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new bS({mode:a="local-storage"}),e.next=5,i.get(kS);case 5:return(s=e.sent)||(s={gids:{}}),s.gids[n]||(s.gids[n]={fv:r,vc:0}),(o=s.gids[n]).vc++,o.lv=r,e.next=13,i.set(kS,s);case 13:return e.abrupt("return",{visit:o,mode:a});case 14:case"end":return e.stop()}}),e)}))),SS.apply(this,arguments)}function RS(e){return TS.apply(this,arguments)}function TS(){return TS=x.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.gameId,r=t.serverDate,i=new bS({mode:a="indexed-db"}),e.next=5,i.get(n);case 5:return(s=e.sent)||(s={fv:r,vc:0}),s.vc++,s.lv=r,e.next=11,i.set(n,s);case 11:return e.abrupt("return",{visit:s,mode:a});case 12:case"end":return e.stop()}}),e)}))),TS.apply(this,arguments)}function CS(){return CS=x.default(R.default.mark((function e(t){var n,r,a,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.whichFrame,r=t.options,e.prev=1,a="gd-".concat(n),void 0,i=undefined,!("loader-frame"===n)){e.next=12;break}return e.next=9,IS({id:a,verbose:i,options:r});case 9:wS=e.sent,e.next=15;break;case 12:return e.next=14,PS({id:a,verbose:i,options:r});case 14:wS=e.sent;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),cs("[GD-IS] GD interservice create error",e.t0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])}))),CS.apply(this,arguments)}function IS(e){return OS.apply(this,arguments)}function OS(){return OS=x.default(R.default.mark((function e(t){var n,r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.verbose,a=t.options,us("[GD-IS] create ISLoader"),e.next=4,q.default({id:n,verbose:r,router:!0});case 4:return(i=e.sent).on("connected",function(e){D.default(this,s),us("[GD-IS] connected",e)}.bind(this)),i.register({method:"whoami",handler:function(){return D.default(this,s),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return D.default(this,s),!0}.bind(this)}),i.register({method:"showAd",handler:function(){var e=x.default(R.default.mark((function e(t){var n,r,i;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.showAd?a.showAd:function(){var e=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!0);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r=t.adType,i=t.params,e.next=4,n(r,i);case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),i.register({method:"registerOnEvents",handler:function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return us("[GD-IS] gd-game-frame registering for onEvents",{loc:window.location.href}),i.registerProxy({alias:"onEvent",method:"onEvent",service:"gd-game-frame"}),e.abrupt("return","[GD-IS] gd-game-frame registered for onEvents");case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=12,i.whoami();case 12:return e.sent,e.abrupt("return",i);case 15:case"end":return e.stop()}}),e,this)}))),OS.apply(this,arguments)}function PS(e){return BS.apply(this,arguments)}function BS(){return BS=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,r=t.verbose,a=t.options,us("[GD-IS] create ISGameFrame"),e.next=4,q.default({id:n,verbose:r,router:!1});case 4:return i=e.sent,s="gd-loader-frame",e.next=8,i.findRouter({where:{id:s}}).catch(function(e){D.default(this,c),cs("[GD-IS] Failed to find router",e)}.bind(this));case 8:if(o=e.sent){e.next=14;break}return cs("[GD-IS] Router not found for ".concat(s,"!")),e.abrupt("return");case 14:us("[GD-IS] Router found for ".concat(s));case 15:return e.next=17,i.connect(o).catch(function(e){D.default(this,c),cs("[GD-IS] Failed to connect to router",(null==e?void 0:e.message)||e)}.bind(this));case 17:return(d=e.sent)&&us("[GD-IS] connected",{result:d}),i.register({method:"whoami",handler:function(){return D.default(this,c),"[GD-IS] I am ".concat(n)}.bind(this)}),i.register({method:"onEvent",handler:function(e){var t=this;D.default(this,c);var n=e.event;(a.onEvent||function(e){D.default(this,t)}.bind(this))(n)}.bind(this)}),i.register({method:"isLoader",handler:function(){return D.default(this,c),!1}.bind(this)}),i.registerProxy({alias:"whoIsLoader",method:"whoami"}),i.registerProxy({alias:"registerOnEvents",method:"registerOnEvents"}),i.registerProxy({alias:"showAd",method:"showAd"}),e.next=27,i.whoami();case 27:return e.sent,e.next=30,i.whoIsLoader();case 30:return e.sent,e.next=33,i.registerOnEvents();case 33:return u=e.sent,us(u),e.abrupt("return",i);case 38:case"end":return e.stop()}}),e,this)}))),BS.apply(this,arguments)}var LS=!1;function US(){var e=this;return new Promise(function(t,n){var r=this;if(D.default(this,e),wS||LS)t(wS);else{var a=setInterval(function(){D.default(this,r),wS&&(LS=!0,clearInterval(a),t(wS))}.bind(this),100);setTimeout(function(){D.default(this,r),clearInterval(a),wS||(LS=!0,us("[GD-IS] No iSvcInstance found within ".concat(5," seconds")),t(wS))}.bind(this),5e3)}}.bind(this))}function MS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MS(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jS,GS,NS,qS=function(){var e=x.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js",t=["https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.1/socket.io.js"],e.next=4,a.getScript(t[0],"soecket.io.js",{alternates:t});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),HS=0,QS=!1,VS=function(){var e=x.default(R.default.mark((function e(t){var n,r,a,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.args,r=t.onError,e.prev=1,!window.isForwarderFrame){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,US();case 7:if(!(a=e.sent)){e.next=18;break}return e.next=11,a.isLoader();case 11:if(!e.sent){e.next=16;break}a.register({method:"sendSocketEvent",handler:function(e){D.default(this,o),KS(e.topic,e.args)}.bind(this)}),e.next=18;break;case 16:return a.registerProxy({alias:"sendSocketEvent",method:"sendSocketEvent"}),e.abrupt("return");case 18:if(i=new O.default(window.location.href),!!["html5.gamedistribution.com","revision.gamedistribution.com"].some(function(e){return D.default(this,o),e.toLowerCase()===i.host.toLowerCase()}.bind(this))){e.next=24;break}return e.abrupt("return");case 24:return e.next=26,qS();case 26:GS=y.v4(),s={json:JSON.stringify(n)},"wss://ws.gamedistribution.com",(jS=io("wss://ws.gamedistribution.com",{query:s,upgrade:!1,transports:["websocket"],reconnectionDelay:6e4,autoConnect:!1})).on("connect",function(){D.default(this,o)}.bind(this)),jS.on("after-connect",function(){var e=x.default(R.default.mark((function e(t){var r,a,i,s,o,d;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return NS=NS||(null==t?void 0:t.serverDate),r=n.gameId,e.next=4,ES({gameId:r,serverDate:NS});case 4:a=e.sent,i=a.visit,s=a.mode,o=a.errors,n.visit=FS(FS({},i),{},{stm:s,errors:o}),d={json:JSON.stringify(n)},jS.emit("client-info",{clientId:GS,counter:HS++,serverDate:NS,query:d}),QS=!0;case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),jS.on("disconnect",function(e){D.default(this,o),QS=!1}.bind(this)),jS.connect(),e.next=39;break;case 36:e.prev=36,e.t0=e.catch(1),r&&r(e.t0);case 39:case"end":return e.stop()}}),e,this,[[1,36]])})));return function(t){return e.apply(this,arguments)}}(),zS=!1,WS=[];function KS(e,t){return YS.apply(this,arguments)}function YS(){return YS=x.default(R.default.mark((function e(t,n){var r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,US();case 2:if(!(r=e.sent)){e.next=11;break}return e.next=6,r.isLoader();case 6:if(e.sent){e.next=11;break}return e.next=10,r.sendSocketEvent({topic:t,args:n});case 10:return e.abrupt("return");case 11:if("play"!==t){e.next=15;break}if(!zS){e.next=14;break}return e.abrupt("return");case 14:zS=!0;case 15:a=function(e,t){D.default(this,s);try{var n={json:JSON.stringify(t||{})};jS.emit("socket-event",{topic:e,clientId:GS,counter:HS,serverDate:NS,query:n})}catch(e){cs("game-session: Error on sending socket-event",e.message)}}.bind(this),i=function(){D.default(this,s),a(t,n)}.bind(this),WS.push(i);case 19:case"end":return e.stop()}}),e,this)}))),YS.apply(this,arguments)}function JS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JS(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XS(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 $S(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 $S(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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 i,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,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw i}}}}function $S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}setInterval((function(){if(0!==WS.length&&jS&&QS){for(var e=function(){var e=this,r=n[t];r(),WS=WS.filter(function(t){return D.default(this,e),t!==r}.bind(this))},t=0,n=N.default(WS);t<n.length;t++)e();WS.length}}),100);var eR,tR=function(){function e(t){var n=this;C.default(this,e),I.default(this,"_getAdTypeByAfgPosition",function(e){var t=this;D.default(this,n);var r={preroll:["preroll","start"],midroll:["next"],rewarded:["reward"]},a=Object.keys(r).find(function(n){var a=this;return D.default(this,t),r[n].some(function(t){return D.default(this,a),t===e.params.position}.bind(this))}.bind(this));return a||"midroll"}.bind(this)),this._gameData=t._gameData,this._msgrt=t.msgrt,this._adInstance=t.adInstance,this._eventBus=t.eventBus,this.blockedAdsMap=t.blockedAdsMap,this._parentURL=t._parentURL,this._parentDomain=t._parentDomain,this._onResumeGame=t.onResumeGame.bind(t),this._onPauseGame=t.onPauseGame.bind(t),this._onRewardedWatchComplete=t.onRewardedWatchComplete.bind(t),this._onAdError=t.onAdError.bind(t),this._setAdRequestTimer=t._setAdRequestTimer.bind(t),this._giveGift=t._giveGift.bind(t),this._executeMidrollPlus=t._executeMidrollPlus.bind(t),this._runAutoResume=t._runAutoResume.bind(t),this.send_atom_event=t.send_atom_event.bind(t),this.get_session_id=t.get_session_id.bind(t),this.get_ad_system_init_result=t.get_ad_system_init_result.bind(t),this.eventBus=new a.EventBus,this.isOpusReady=function(){return D.default(this,n),t.isOpusReady}.bind(this),this._muteRequested=!1,this._terminateRequested=!1}var t,n;return T.default(e,[{key:"runAdFlow",value:(n=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c,l,h,f,p,m,A,g,v,b,y,_,w,k,E,x,S,T,C,O,P,B,L,U,M,F,j,G,N,q,H,Q,V,z,W,K,Y,J,Z,X,$,ee,te,ne,re,ae,ie=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,US();case 2:u=e.sent,c=u?u.isLoader():"loader-unknown",us("[GD-IS] runAdFlow",{isLoader:c,location:window.location.href}),this.adRequest=t,l=this._getAdTypeByAfgPosition(t),t.params.adTypeFound=l,t.params.position,(h=this._getAdFlow(l)).find(function(e){return D.default(this,ie),"opus"===e}.bind(this))&&!this.isOpusReady()&&(h=h.filter(function(e){return D.default(this,ie),"opus"!==e}.bind(this)),this._msgrt.send("opus.sdk",{message:"Not ready"})),f=this._gameData,p=f.afg_disabled,m=null===(n=t.params)||void 0===n?void 0:n.isGift,A=null===(r=t.params)||void 0===r?void 0:r.isMidrollPlus,null===(a=t.params)||void 0===a||a.position,g=null===(i=f.promo)||void 0===i?void 0:i.rainbow,v=(null==g?void 0:g.enabled)&&(null===(s=g.position)||void 0===s?void 0:s[l]),b=null==g?void 0:g.gift,y=v&&null!=g&&g.duration?null==g?void 0:g.duration:5,_=p?h.filter(function(e){return D.default(this,ie),"adsense"!==e}.bind(this)):h,w=this.get_ad_system_init_result(),k=w.afg,E=w.ima,x=null==f||null===(o=f.ad_blcks)||void 0===o||null===(d=o.removeOtherAdaptors)||void 0===d?void 0:d.enabled,this.anyAdBlocking=!k||!E,this.bothAdBlocking=!k&&!E,this.adsBlocked=x&&this.anyAdBlocking||this.bothAdBlocking,this.adsBlocked?(us("gd-adflow adsBlocked so changing the flow"),_=[]):(k||(_=_.filter(function(e){return D.default(this,ie),"adsense"!==e}.bind(this))),E||(_=_.filter(function(e){return D.default(this,ie),"ima"!==e}.bind(this)))),S=!1,T=!1,C=[],O=0,P=!1,L={},U=XS(_),e.prev=38,U.s();case 40:if((M=U.n()).done){e.next=86;break}if(F=M.value,!this._terminateRequested){e.next=44;break}return e.abrupt("break",86);case 44:if(t.params.adapter=F,j=O===_.length-1,G=m&&b||!m,N=j&&v&&G,t.params=ZS(ZS({},t.params),{},{adapterIndex:O,isLastAdapter:j,shouldFail:!1,extraPromoRunOnFail:N,muteRequested:this._muteRequested}),!this._muteRequested||"adsense"!==F){e.next=51;break}return e.abrupt("continue",84);case 51:return function(){D.default(this,ie),ls.firstSuccessOrder&&!isNaN(ls.firstSuccessOrder)&&(t.params.shouldFail=O<ls.firstSuccessOrder)}.bind(this),us("gd-adflow, before adInvoke",O,F,t.params.shouldFail),e.next=55,this.adInvoke(t);case 55:if(q=e.sent,H=q.success,Q=q.args,V=q.isSkipped,z=q.noVast,W=q.t4r,K=null==Q?void 0:Q.reason,Y=null==Q?void 0:Q.message,J=null==Q?void 0:Q.errorType,L[F]=L[F]||{req:0,imp:0,fail:0},L[F].req++,H?L[F].imp++:(L[F].fail++,L[F].failReason=K,L[F].failMessage=Y,L[F].failType=J),!H){e.next=75;break}return us("gd-adflow, adapter-result-success",O,F,Q,W),S=!0,T=!(null==Q||!Q.isPromoSuccess),B=W,e.abrupt("break",86);case 75:if(us("gd-adflow, adapter-result-failure",O,F,Q.message),O++,C.push(Q.message),!V){e.next=80;break}return e.abrupt("break",86);case 80:if(!z){e.next=83;break}return this._runAutoResume(),e.abrupt("break",86);case 83:P=N;case 84:e.next=40;break;case 86:e.next=91;break;case 88:e.prev=88,e.t0=e.catch(38),U.e(e.t0);case 91:return e.prev=91,U.f(),e.finish(91);case 94:if(!P){e.next=100;break}return e.next=97,new gS(this).run({duration:y});case 97:e.sent.success&&(T=!0);case 100:return function(){var e;D.default(this,ie),ls.disableGift&&null!==(e=f.gft)&&void 0!==e&&e[l].enabled&&(f.gft[l].enabled=!1)}.bind(this),Z=C.join(" /n"),S?(this._setAdRequestTimer(),this._onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),this._giveGift(l),"midroll"===l&&this._executeMidrollPlus()):(this._onResumeGame(Z,"warning"),this._giveGift(l),"midroll"===l&&this._executeMidrollPlus()),X="-1",$="none",S?(X="index_".concat(O),$=_[O]):T&&(X="promo",$="promo"),ee=this.get_session_id(),this.anyAdBlocking&&"-1"===X?(te="rewarded"===l?"rewarded":this.blockedAdsMap.preroll?"midroll":"preroll",this.blockedAdsMap[te]=this.blockedAdsMap[te]?this.blockedAdsMap[te]+1:1,JSON.stringify(this.blockedAdsMap),this._msgrt.send("adflow.blocked.pos",{message:"".concat(te)}),this.send_atom_event("gd.adflow",{adBlocker:!0,afgBlocked:!k,imaBlocked:!E,isGift:m,isMidrollPlus:A,adType:te,sessionId:ee,successAdapter:"none",adFlowIndex:X,adapterResults:L})):(ne={},I.default(ne,"adflow.all.index",{message:"".concat(X)}),I.default(ne,"adflow.all.success_adapter",{message:"".concat($)}),I.default(ne,"adflow.".concat(l,".index"),{message:"".concat(X)}),I.default(ne,"adflow.".concat(l,".success_adapter"),{message:"".concat($)}),re=ne,Object.keys(re).forEach(function(e){D.default(this,ie);var t=re[e];this._msgrt.send(e,t)}.bind(this)),this.send_atom_event("gd.adflow",{adFlowIndex:X,successAdapter:$,adBlocker:!1,afgBlocked:!k,imaBlocked:!E,isGift:m,isMidrollPlus:A,adType:l,sessionId:ee,t4r:B,adapterResults:L}),KS("ad-session",{adSession:{adType:l,imp:"-1"!==X&&"promo"!==X,promo:"promo"===X,blocked:this.anyAdBlocking&&"-1"===X}})),ae={adType:l},this.eventBus.broadcast("AD_FLOW_COMPLETE",ae),e.abrupt("return",ae);case 115:case"end":return e.stop()}}),e,this,[[38,88,91,94]])}))),function(e){return n.apply(this,arguments)})},{key:"adInvoke",value:(t=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(r,a){var i,s,o,d,u=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="main.showad.".concat(t.params.adapter,".").concat(t.params.adapterIndex),JSON.stringify(t),s={},o=function(e){D.default(this,u),JSON.stringify(t),n._eventBus.unsubscribeScope(i);var a="dismissed"===(null==e?void 0:e.message);r({success:!1,args:e,isSkipped:a,noVast:e.noVast})}.bind(this),d=function(e){D.default(this,u),JSON.stringify(t),n._eventBus.unsubscribeScope(i),r({success:!0,args:e,t4r:s})}.bind(this),n._eventBus.subscribe("AD_ERROR",o,i),n._eventBus.subscribe("AD_SDK_CANCELED",o,i),n._eventBus.subscribe("AD_SUCCESS",d,i),n._eventBus.subscribe("AD_T4R",function(){D.default(this,u),s.loaded=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_CLICK",function(){D.default(this,u),s.t4rClick=!0}.bind(this),i),n._eventBus.subscribe("AD_T4R_VIDEO",function(){D.default(this,u),s.t4rVideo=!0}.bind(this),i),n._eventBus.subscribe("AD_CLICK",function(){D.default(this,u),s.click=!0}.bind(this),i),n._eventBus.subscribe("AD_BIDDER",function(e){D.default(this,u),s.bidder=null==e?void 0:e.bidder}.bind(this),i),n._eventBus.subscribe("AD_T4R_NONE",function(e){D.default(this,u),s.fail_reason=null==e?void 0:e.reason}.bind(this),i),e.prev=14,e.next=17,n._adInstance.startAd(t);case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(14),cs("gd-adflow startAd error",e.t0),r({success:!1,err:e.t0});case 23:case"end":return e.stop()}}),e,this,[[14,19]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_getAdFlow",value:function(e){var t,n,r,a,i,s,o,d,u=this,c=void function(){if(D.default(this,u),ls.customAdFlow)return JSON.parse(ls.customAdFlow)}.bind(this),l=this._gameData.adflw;c&&(l=c);var h=null!==(t=l)&&void 0!==t&&null!==(n=t.adapters)&&void 0!==n&&n.default?null===(r=l)||void 0===r||null===(a=r.adapters)||void 0===a?void 0:a.default:["ima","adsense"];return h=null!==(i=l)&&void 0!==i&&null!==(s=i.adapters)&&void 0!==s&&s[e]?null===(o=l)||void 0===o||null===(d=o.adapters)||void 0===d?void 0:d[e]:h}},{key:"mute",value:function(){var e=this;this._muteRequested=!0,this._adInstance.mute().catch(function(t){D.default(this,e)}.bind(this))}},{key:"terminate",value:function(){var e=this;this._terminateRequested=!0,this._adInstance.terminate().catch(function(t){D.default(this,e)}.bind(this)),this._setAdRequestTimer()}}]),e}(),nR=new m.EventEmitter,rR=["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 t=this,n=e.data,r=e.origin,a=e.source;if(rR.some(function(e){return D.default(this,t),e===r}.bind(this))&&(null==n||!n.__tcfapiCall)){var i=n.system;n.action;var s="aeriaExternalHostsConnector"===i;if("Softgames"===i)eR=a,(window.parent||window).postMessage(n,"*"),nR.emit("aeria-event",n);else if(s){eR&&eR.postMessage(n,"*");var o=window.parent||window;o&&o.postMessage(n,"*")}}}),!1);var aR="https://html5.gamedistribution.com",iR="parent-data-request",sR="parent-data-response",oR=function(){function e(){C.default(this,e)}var t;return T.default(e,[{key:"init",value:function(e){var t=this;this._registerForDataRequests(e),this._askForParentFrameData().then(function(n){if(D.default(this,t),n){var r=n.adRequestTimer;e.adRequestTimer=r,e.adRequestTimer}}.bind(this))}},{key:"_registerForDataRequests",value:function(e){var t=this;window.addEventListener("message",function(n){D.default(this,t);var r=n.data,a=n.origin,i=n.source,s=r.type;if(r.value,a===aR&&s===iR){var o={adRequestTimer:e.adRequestTimer};i.postMessage({type:sR,value:o})}}.bind(this))}},{key:"_askForParentFrameData",value:(t=x.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;D.default(this,t);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===aR&&i===sR&&(e(s),a=!0)})),setTimeout(function(){D.default(this,r),a||e()}.bind(this),1e3);var i={type:iR};window.parent.postMessage(i,"*")}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),dR=new oR,uR={SDKExistsOnUpperFrame:!1};function cR(){return lR.apply(this,arguments)}function lR(){return(lR=x.default(R.default.mark((function e(){var t,n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=["https://pm.azerioncircle.com/p/gd-blck-rmv/"],e.next=4,a.getScript(t[0],"blckrmv",{alternates:t});case 4:return n=window.GD_BLCK_RMV||{},console.log("new blocker",n),e.abrupt("return",n.AdBlockerPage);case 9:e.prev=9,e.t0=e.catch(0),console.log("new blcoker error => ",e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function hR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hR(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pR=function(){us("gtag: GA not initialized",arguments)};function mR(e){return AR.apply(this,arguments)}function AR(){return AR=x.default(R.default.mark((function e(t){var n,r,i,s,o,d,u,c,l,h,f,p,m=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.onError,r=t.args,s="gdSDKDataLayer",o="https://www.googletagmanager.com/gtag/js?id=".concat(i="G-PLRTBHGSEL","&l=").concat(s),d=[o],e.prev=5,e.next=8,a.getScript(d[0],"gdsdk_google_analytics",{alternates:d,error_prefix:"Blocked:",exists:function(){return D.default(this,m),window[s]}.bind(this)});case 8:return window[s]=window[s]||[],pR=function(){window[s].push(arguments)},pR("js",new Date),e.next=14,H.default();case 14:return u=e.sent,c=u.lookupIabConsent,l=u.getGoogleAdType,e.next=19,c();case 19:h=e.sent,f=l(h.consentData),p=fR(fR({},p=r||{}),{},{cookie_flags:"SameSite=None;Secure",cmp:h.result,gdpr:"ok"===h.result?"object"===S.default(h.consentData)?!0===h.consentData.gdprApplies:"N/A":h.result,google_ads:null==f?void 0:f.type}),pR("config",i,p),e.next=31;break;case 27:e.prev=27,e.t0=e.catch(5),cs("gtag: load GA error",e.t0),n&&n(e.t0);case 31:case"end":return e.stop()}}),e,this,[[5,27]])}))),AR.apply(this,arguments)}new O.default("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=3792570314314042&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&cust_params=hb_uuid%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_cache_id%3Dundefined%26tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26hb_cache_host%3Dprebid.adnxs.com%26hb_format%3Dvideo%26hb_size%3D0x0%26hb_pb%3D1.15%26hb_adid%3D259407b5792767%26hb_bidder%3Dimprovedigital%26hb_cache_host_improv%3Dprebid.adnxs.com%26hb_uuid_improvedigit%3Dcefbef16-53a9-4f49-9d3b-13e47e1066ad%26hb_format_improvedig%3Dvideo%26hb_size_improvedigit%3D0x0%26hb_pb_improvedigital%3D1.15%26hb_adid_improvedigit%3D259407b5792767%26hb_bidder_improvedig%3Dimprovedigital%26tnl_wog%3D0%26gdGameId%3Daeac8455b2024f25abfa943ec96aa749%26tnl_content_category%3Dpuzzle%26adaptor_order%3D0%26pbct%3D2%26tnl_test%3Da%26fp%3D0.9%26fpt%3D99%26bfa%3D1%26adsense%3D0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&plcmt=1&vpmute=1&vpa=auto&sdkv=h.3.633.0&osd=2&frm=2&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=1&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&sdki=445&ptt=20&adk=2541783110&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&sid=E657451B-8F2F-4921-A55A-21D1A6F3C39E&nel=1&eid=44777649%2C44781409%2C44785452%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&ref=https%3A%2F%2Fwww.gry.pl%2F&top=https%3A%2F%2Fwww.gry.pl%2F&loc=https%3A%2F%2Fhtml5.gamedistribution.com%2Faeac8455b2024f25abfa943ec96aa749%2F%3Ftimestamp%3D1713336375%26countryCode%3Dpl%26siteid%3D88%26channelid%3D1%26siteLocale%3Dpl%26locale%3Dpl%26gd_sdk_referrer_url%3Dhttps%253A%252F%252Fwww.gry.pl%252Fgra%252Fkings-and-queens-match&dlt=1713336379046&idt=2621&dt=1713336390920&scor=3473667703821297&ged=ve4_td12_tt10_pd12_la2000_er0.0.156.300_vi0.0.600.510_vp100_eb24427",!0),new O.default("https://securepubads.g.doubleclick.net/gampad/ads?env=vp&gdfp_req=1&output=xml_vast4&unviewed_position_start=1&correlator=2275053868608838&sz=640x480&url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&iu=%2F1015413%2FTNL_NS-18101700058%2FTNL_T-17110972893&description_url=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&max_ad_duration=300000&vpa=auto&vpmute=0&plcmt=1&cust_params=tnl_paid%3D866%26tnl_pid%3DP-17110700559%26tnl_system%3D1%26tid%3DTNL_T-17110972893%26tnl_ad_type%3Dvideo_image%26tnl_asset_id%3Daeac8455b2024f25abfa943ec96aa749%26tnl_ad_pos%3Dpreroll%26nsid%3DTNL_NS-18101700058%26tnl_pt%3D22%26gd_opus%3D1%26fp%3D0.9%26gd_np%3D1%26bfa%3D1%26fpt%3D99%26tnl_wog%3D0&sdkv=h.3.633.0&osd=2&frm=0&vis=1&sdr=1&hl=en&afvsz=200x200%2C250x250%2C300x250%2C336x280%2C450x50%2C468x60%2C480x70&is_amp=0&uach=WyJtYWNPUyIsIjE0LjQuMSIsImFybSIsIiIsIjEyMy4wLjYzMTIuMTIyIixudWxsLDAsbnVsbCwiNjQiLFtbIkdvb2dsZSBDaHJvbWUiLCIxMjMuMC42MzEyLjEyMiJdLFsiTm90OkEtQnJhbmQiLCI4LjAuMC4wIl0sWyJDaHJvbWl1bSIsIjEyMy4wLjYzMTIuMTIyIl1dLDBd&u_so=p&ctv=0&gdpr=1&gdpr_consent=CP6lKcgP6lKcgAcABBENApEsAP_gAEPgAAYgg1NV_H__bX9j8Xr1aft0eY1H99j7rsQxBhfJk-4FyDvW_JwXn2EyNA26pqYKmRIEuzZBIQFkHIDURUigSogVrSDMYkGMgTNIJ6BkgFMRY2dYCFxvmQlDMQIY5vp9d3d52D-9_dv83dziz8FHvzU5PmckcICdA58tDfl9bRCb-5IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHs87_XU-9_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQaoJIACgAHgAkABcADUAHAAUwAtgBmAD4AH4AYAAygBmgDkAHcAP8Ag4BHQCRAElAKiAXMAvQBfQDPgHUAPaAfYBEwCVQExAJnAUgApoBUgCuQFswLcAt0Bf4DBIGRgZIAywBmYDRgGrgNvAboA3wBywDtgHcgPFgfaB90EqASpAlhBLMEtIJbglxBLoEuwJfQTABMECYYExQJjgTJgmYCZwE0gJqATYgm2CbkE3gTfCCgEGoA8EADAFyAMEAtIQCAAAEAA0ADgAPAAyACwAI4AUAArgBbAEWAJcAX0A1ADVAHOAPIAfIBAwCDgEcAJ2AT-AoYCigF2AM4AbwA9AB8gENgIvAR6AkUBJYCVgEywJsAm0BS4CnwFhQLEAsUBdQC7gF5AMCgYeBiADFoGQgZGAyYBlwDPwGhANGAaYA1MBroDaAG3AN0AcEA6gB2ADuoHkgeUA96B8gHyhIG4ACAAFwAUABUADgAHgAQAAwgBkAGoAPAAiABMACqAG8APQAhIBDAESAI4ASwAmgBhgDLAGyAO-AewB8QD7AP0AgEBFwEYAI0AUEAqABVwC5gGKANoAbgA4gCRAE7AKHAUeApEBbAC5AF3gLzAYMAw0BkgDJwGcwNYA1kBuoDkwHLgPHDAUAAAgAGAAcABQAEUAJwAsABhADwAPYAhACIAEcAJgAVAArwBbAFyAOYA8ACGAESAIsAS4ApABWgDOAGpANkA4ABxgDnAHkAPwAgABGACTAE6AKKAUuArwCvgF2AL8AZwA2wBvADjgHNAOoAdkA9QB-wEJAIbARUAi8BHUCRAJFASXAloCXgE2AJ2AUJApECkgFigLRAXIAugBdwC9AGBAMPAYyAx6BkYGSAMnAZyAzwBoQDTAGtANdAboA6gB3AD3hAE8AAIABgAHAAUABFACcALAAYQA8AD2AIQAiABHACYAFcALcAcwB3AEMAIkARYAlwBSACtAGcANSAbIBwADjAHOAPIAfIA_ACAAEYAJNAToBOwCigFLgK8Ar4BdgC_AGcANQAbYA3gBxwDmgHZAPUAfIA_YCEgENgIvAR3AkQCRQElwJaAl4BNgCdgFCAKSgWIBYoC0QFyALoAXcAvQBgQDDwGMgMeAZIAycBnIDQgGmANaAa6A3QB1ADuAHvCgEYAIoAVABYAEIAJgAXAA8ACOAFIANQAcABHACiwFeAV8AuwBnADeAHNAOyAfsBHoCRQEvAJsAWKAtEBbAC7gF6AMPAZyAzwBoQDWoGuga8A94YAgABFACoALAAhABMAEcAKQAagA4ACOAFFgK8Ar4BdgDOAG8AOaAdkA_YCPQEvAJsAWiAtgBdwC9AGHgM5AZ4A0IBrQDXQHvAPiHAXoADAARAA4ADwALgAZABYADmAHwAfgBHACaAFAAKYAVwAtgBfADQAIQARYAjgBLgCkAFkAL4AYUAzQDOAGoAOcAdwA8gB8wEAAQOAg4CEAERAI4ATgAncBPgE_AKKAUsAqABWQC7AF6AM4AbwA44B0gD0AHyAQ2AiIBFQCPQEigJLASsAmIBMsCbAJtAUgApMBS4CqgFiALUAWzAugC6gF3AL6AYFAxADEwGLAMhAZNAy4DLwGfgNCAaNA0wDTQGpwNdA2ABtADbgHHgOWAc-A7AB3EDyQPKAekA94B8QD5QH2gPxHQRQAFwAUABUADgAIAAXQAwADUAHgARAAmABVgC4ALoAYgAzABvAD1AIYAiQBLACaAFGAMMAZQA0QBsgDvAHtAPsA_QB_wEWARgAoIBVwCxAFzALyAYoA2gBuADiAHUAReAkQBMgCdgFDgKPAU0AsUBbAC4AFyALtAXeAvMBgwDDQGPAMkAZOAyoBlgDOQGiANVAawA3UBxYDkwHLgPHAfWQAXAAIAAyACwAJoAXwA0ACkAFlALkAvgBnADUAHOARwAnABPoChgKKAUsArIBYgC0gF2AN4Ac0A7IB6AEewJsAm0BSYCxAFtALuAXkAwIBiUDPAM_AaEA1MBroDYAG3AOfAdGA7CB5IHlAPeAfEQgPAALAAoAC4AGIATAAqgBcADEAG8APQAjgB3gD_AJSAUEAq4BcwDFAG0AOoApoBYoC0QFwALkAZOAzkBogDVQHjkgF4ABgAHAAXAAyACwAHIARwAmgBUAC-AGQANoAeABCACkAFkAM6AagBqgDuAIAARyApoCoAFZALSAXYA3gB8gEVAI6AR6AkUBKwCWoE2ATaApMBVICxAF3AMWAZZAzwDPwGhANdAbAA7AB5QD3iUB0ABAACwAKAAcgBgAGIAPAAiABMACqAFwAMUAhgCJAEcAKMAbIA7wB-AFXAMUAdQBF4CRAFHgLFAWwAvMBk4DOQGsFIFwAC4AKAAqABwAEEAMAA1AB4AEQAJgAUgAqgBiADNAIYAiQBRgDKAGiANkAd8A_AD9AIsARgAoIBVwC5gF5AMUAbQA3ACLwEiAJ2AUOAsUBbAC4AFyALtAXmAw0BkgDJwGcwNYA1kBuoDkwHjlAIgAFwAMgAsAByAEcAJoAVAAvgBkADaAHgAQgAiwBHACZAFIALIAXwAwgBnQDUANUAc4A7oB8gH2AQAAjgBIgCdgFDAKXAVkBWwCxQF1AXYA14BvADtgHoAP-AjoBHoCRQElgJigTYBNoCkAFPgLEAXQAu4BeQC-gGBAMWAZMAy6BngGfgNCAaJA1IDU4GugbAA4IB0wDsAHcAPKAe8A-IB8oA.f_wACHwAAAAA&sdki=445&ptt=20&adk=1748861338&sdk_apis=2%2C7%2C8&omid_p=Google1%2Fh.3.633.0&media_url=blob%3Ahttps%253a%2F%2Fwww.gry.pl%2Ffa4fae4b-f435-43b4-9cee-af65696fe59e&sid=D3F4C4E1-4002-4BEE-A1F2-2638CD3B9197&a3p=EloKDWNyd2RjbnRybC5uZXQSQGE0MmZkMWJkNGI5MjgyOTY5NzUxNDUyYzVlNmUxNmQ1MzkzODYxY2E5Y2U2MGUzNjk3Y2ZlNTExMTQxYjFhZjgYucX8se4xSAASxgEKCHJ0YmhvdXNlEqwBWVNmZ3hFVno0OXBMOFI2c3ltSWtSdUFNdFg4d2Y0clBkdVMwTlVuLzZpUnhJZWh0cnRjVUtLSjFraHJDQWZERmp1N1pDNHJEc1lxMkduKzJFTFMxRmgzWlEzTUxaK0owbXZoTDR4UFlNc2JUbmlGNkczTWRaZjZQK3hEVVkwTU1FUlpkZzlKMjArcjlQNUtQOFBmWVhMaEkwRitGMUNhYUNwQS9aRVNNMVNnPRjBxfyx7jFIAFICCGoSGQoKdWlkYXBpLmNvbRjDz9ay7jFIAFICCGQSPgoFb3BlbngSLGV5SnBJam9pZEZoNU5XbDNSakZUT0ZjNVoxTlZRbFl5YWtRemR6MDlJbjA9GJ3I_LHuMUgA&nel=1&eid=44776494%2C44777649%2C44781409%2C95321947%2C95322027%2C95323893%2C95324128%2C95324210%2C95326337&top=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&loc=https%3A%2F%2Fwww.gry.pl%2Fgra%2Fkings-and-queens-match&dt=1713336184147&cookie=ID%3Da17ef48e823e6627%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MY20KDMmAY5MP3sMYIZndoHFyvxhg&gpic=UID%3D00000d6b0028013d%3AT%3D1709727355%3ART%3D1713335981%3AS%3DALNI_MZ7af9EvfEMcTpwOjK9LSfd-RfFCQ&scor=3968881391553945&ged=ve4_td21_tt0_pd21_la21000_er271.162.427.462_vi0.0.873.1064_vp100_eb24171",!0);var gR=function(e){var t=this,n=e.handler,r=e.timeout,a=e.interval,i=n||function(){return D.default(this,t),!0}.bind(this),s=r||1e3,o=a||10;return new Promise(function(e,r){var a=this;if(D.default(this,t),n())e(!0);else{var d=!1,u=setInterval(function(){D.default(this,a);try{i()&&(clearInterval(u),d=!0,e(!0))}catch(t){clearInterval(u),e(!1)}}.bind(this),o);setTimeout(function(){D.default(this,a),clearInterval(u),d||e(!1)}.bind(this),s)}}.bind(this))};function vR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vR(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vR(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yR(e){var t=e.gameData,n=e.msgrt,r=e.topDomain,a=e.parentDomain,i=e.parentURL;return{send_atom_event:function(e,s){if(function(e){var n=this,r=t.dbglg;return(null==r?void 0:r.enabled)&&r.topics&&r.topics.some(function(t){return D.default(this,n),t===e}.bind(this))}(e)){var o={gid:t.slug,md5:t.gameId,pid:0,pnm:t.pname,ctry:t.ctry,lcl:"en",hle:1,ads:1,args:s,href:window.location.href},d=(new S_).get();return o=bR(bR({},o),d),function(e,t){try{var s=n._layout,o=n._ua,d={tp:e,ct:0,vrs:ss.version,url:i,rfr:document.referrer,tdmn:r||a,dpth:0,args:t,ua:{brnm:o.browser.name,brvs:o.browser.version,osnm:o.os.name,osvs:o.os.version,dvmd:o.device.model,w:s.w,h:s.h}};return fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(d)))))}catch(e){}}(e,o=s?bR(bR({},o),s):o)}}}}function _R(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 wR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_R(Object(n),!0).forEach((function(t){I.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kR=y.v4(),ER=null,xR=null,DR=function(){function e(t){var n,r,a,i,s=this;if(C.default(this,e),I.default(this,"_whichFrameV2",function(){var e=this;D.default(this,s);var t=O.default(window.location.href,!0),n=t.host,r=t.query,a="html5.gamedistribution.com"!==n,i=function(t){return D.default(this,e),"revision.gamedistribution.com"===t||"uncached-html5.gamedistribution.com"===t}.bind(this),o=i(n);null!=r&&r.gd_sdk_referrer_url&&(o=i(O.default(r.gd_sdk_referrer_url).host));return this._isMasterGameURL()&&!(this._isTokenGameURL()||a)||o?"loader-frame":"game-frame"}.bind(this)),ER)return ER;ER=this,this.isOpusReady=!1,this.isMidrollPlusExecuted=!1,this.blockedAdsMap={},this.blockingDetectedKey="d8d9b9b63e704668a29559970c1818be",this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new S_,this._location.print();var o=this._location.get(),d=(null==o||null===(n=o.top)||void 0===n||null===(r=n.domain)||void 0===r?void 0:r.value)||(null==o||null===(a=o.partner.domain)||void 0===a?void 0:a.value),u=null==o||null===(i=o.partner.url)||void 0===i?void 0:i.value;this._parentURL=0===this._bridge.depth?encodeURIComponent(this._bridge.parentURL):this._bridge.parentURL,this._parentURL=this._parentURL||u,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._topDomain=this._topDomain||d,this._topDomain,this._parentURL,this._isFullScreen=!1,this._giftCount={preroll:0,midroll:0,rewarded:0},this._mplus_count=0,function(e){CS.apply(this,arguments)}({whichFrame:this._whichFrameV2(),options:{showAd:this.showAd.bind(this),onEvent:this._onEvent.bind(this)}}),this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){D.default(this,s),this._sdk_ready=!0}.bind(this)).catch(function(e){D.default(this,s),this._sdk_ready=!1}.bind(this)).finally(function(){var e,t,n,r,a=this;if((D.default(this,s),null===(e=this._gameData)||void 0===e||null===(t=e.directTokenUse)||void 0===t?void 0:t.enabled)&&this._blockDirectTokenURLEmbedding().blocked)return;this.dumper=new yR({msgrt:this.msgrt,gameData:this._gameData,parentDomain:this._parentDomain,parentURL:this._parentURL,topDomain:this._parentURL}),this.dumper,this._initGameSessionTracking(),this._sendLoadedEvent(2),!0===(null===(n=this._gameData.lp)||void 0===n?void 0:n.load)&&this._sendLoadedEvent(1),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),this._initUnityHandler(),this._checkFullscreen(),null!==(r=this._gameData.evnts)&&void 0!==r&&r.enabled&&this._isLoaderGameURL()&&(fS(this._gameData),this._gameData.evnts.gameId===this.options.gameId&&setInterval(function(){D.default(this,a),this._send_gametag_data("heartbeat")}.bind(this),1e3*this._gameData.evnts.heartbeatDuration)),dR.init(this),this._send_gametag_data("sdk_init")}.bind(this)),this._registerSGBridge(),this._whichFrame(),this._loadLocus()}var t,n,r,i,s,o,d,c,l,h,f,p,m,A,g,v,b,y,_,w,k;return T.default(e,[{key:"_getVisitorId",value:(k=x.default(R.default.mark((function e(){var t,n,r,a,i,s=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,gR({handler:function(){return D.default(this,s),!!xR}.bind(this),timeout:1e3,interval:10});case 2:return a=e.sent,i=a?null===(t=xR)||void 0===t||null===(n=t.visitor)||void 0===n||null===(r=n.visitorData)||void 0===r?void 0:r.visitorId:"noVisitorId",e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)}))),function(){return k.apply(this,arguments)})},{key:"_initGameSessionTracking",value:(w=x.default(R.default.mark((function e(){var t,n,r,a,i,s,o,d,u,c,l,h,f,p,m,A,g,v,b,y=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this._gameData)||void 0===t||null===(n=t.gs_trc)||void 0===n?void 0:n.enabled){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,this._getVisitorId();case 5:r=e.sent,a=this._gameData,i=a.category,s=a.dname,o=a.pname,d=a.gameId,u=a.slug,c=a.title,l=a.ctry,h=this._topDomain||this._parentDomain,f=new S_,p=f.get(),m=this.msgrt._ua,A=document.referrer,g=this.msgrt._layout,v=ss.version,b={args:{rfr:A,category:i,dname:s,pname:o,gameId:d,slug:u,title:c,ctry:l,domain:h,loc:p,ua:m,layout:g,version:v,visitorId:r},onError:function(e){D.default(this,y),this._sendSDKError(e)}.bind(this)},VS(b);case 18:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"_initUnityHandler",value:function(){var e=this;window.addEventListener("DOMNodeInserted",function(){if(D.default(this,e),this._gameData.block_exts&&this._removeExternalsInHtml({enabled:!1}),document.getElementsByClassName("webgl-content")[0]){var t=document.getElementsByClassName("webgl-content")[0].getElementsByClassName("footer")[0];t&&t.setAttribute("style","display:none")}}.bind(this))}},{key:"_send_gametag_data",value:(_=x.default(R.default.mark((function e(t){var n;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._getGdModeIfExist()&&(n=a.getMobilePlatform()||"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 _.apply(this,arguments)})},{key:"_loadCMP",value:(y=x.default(R.default.mark((function e(){var t,n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=12;break}if(r=new S_,0!==(null==(a=r.get("depth"))?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=12;break}if(null===(i=this._gameData)||void 0===i||null===(s=i.cmp)||void 0===s||!s.checkDepthOnly){e.next=9;break}return e.next=7,sS();case 7:e.next=12;break;case 9:if("html5.gamedistribution.com"!==this._topDomain){e.next=12;break}return e.next=12,sS();case 12:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"testConsent",value:function(){try{$D();x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eS({});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;oS.on("splash-hidden",function(t){D.default(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.default(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._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:(b=x.default(R.default.mark((function e(t,n){var r,a,i,s=this;return R.default.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===(r=this._gameData.disableAds)||void 0===r?void 0:r.default)||!1,this._safeInit(),this._checkGameId(),this._checkGameDeleted(),this._checkBlocking(),this._changeMidrollInDebugMode(),void 0!==this._gameData.diagnostic&&void 0!==(null===(a=this._gameData.diagnostic)||void 0===a?void 0:a.close_ads)&&!1!==(null===(i=this._gameData.diagnostic)||void 0===i?void 0:i.close_ads)||(this.videoAdReady=this._initializeVideoAd().then(function(){D.default(this,s),(this._isMasterGameURL()||this._isExtHostedGameURL())&&(this.msgrt.send("adblocker.flw",{message:"ok"}),this.msgrt.send("adblocker.adapters",{message:"none"})),this._checkAdBlockerRemoval()}.bind(this)).catch(function(e){D.default(this,s);var t="".concat(e).startsWith("Error: Blocked:");us("gd-adflow adsBlocked",t,e);var n=this.get_ad_system_init_result(),r=n.ima,a=n.afg;if(this.adsBlocked=!r&&!a,this._isMasterGameURL()||this._isExtHostedGameURL()){this.msgrt.send("adblocker.flw",{message:"".concat(this.adsBlocked?"blocked":"ok")});var i=r||a?r?a?"none":"adsense":"ima":"all";this.msgrt.send("adblocker.adapters",{message:"".concat(i)})}this._sendSDKError(e),this._checkAdBlocker(),console.error(e.message||e)}.bind(this))),t(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"),n(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return b.apply(this,arguments)})},{key:"_getDefaultOptions",value:function(){return{debug:!1,testing:!1,gameId:"4f3d7d38d24b740c95da2b03dc3a2333",prefix:"gdsdk__",onEvent:function(e){},onLoaderEvent:function(e){},flashSettings:{adContainerId:"",splashContainerId:""},advertisementSettings:{},resumeGame:function(){},pauseGame:function(){},onInit:function(e){},onError:function(e){},loader:{}}}},{key:"_checkAdBlockerRemoval",value:function(){a.Ls.getBoolean(this.blockingDetectedKey)&&(a.Ls.set(this.blockingDetectedKey,!1),this.send_atom_event("ad-blocker-removed"))}},{key:"_checkAdBlocker",value:(v=x.default(R.default.mark((function e(){var t,n,r,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=this.get_ad_system_init_result(),n=t.ima,r=t.afg,n&&r){e.next=12;break}if(a.Ls.set(this.blockingDetectedKey,!0),null===(i=this._gameData.rmblck)||void 0===i||!i.enabled){e.next=12;break}if(this.adBlockerPage){e.next=12;break}return e.next=9,cR();case 9:s=e.sent,this.adBlockerPage=new s(this._gameData),this.adBlockerPage.add();case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log(e.t0.message);case 17:case"end":return e.stop()}}),e,this,[[0,14]])}))),function(){return v.apply(this,arguments)})},{key:"_extendDefaultOptions",value:function(e,t){var n=M.default(e);this.options=t?a.extendDefaults(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:"_shouldSendTunnlEvent",value:function(e){return this.tunnlEventCounts||(this.tunnlEventCounts={}),this.tunnlEventCounts[e]||(this.tunnlEventCounts[e]=0),this.tunnlEventCounts[e]++,1===this.tunnlEventCounts[e]}},{key:"_sendTunnlEvent",value:function(e){var t=this;if(this._shouldSendTunnlEvent(e)){void 0!==this._topDomain&&"undefined"!==this._topDomain||(this._topDomain=void 0);var n={page_url:this._topDomain||this._parentDomain,game_id:this.options.gameId,eventtype:e,ts:Date.now()};fetch("https://hlana.gamedistribution.com/event?".concat(j.default.stringify(n))).catch(function(r){D.default(this,t),this._sendHLAnalyicsLog({query:wR(wR({},n),{},{error:null==r?void 0:r.message}),eventType:-e})}.bind(this)),this._sendHLAnalyicsLog({query:n,eventType:e}),this.adInstance._send_atom_event("hl.config",n),this._send_gametag_data("sdk_gameplay")}}},{key:"_sendHLAnalyicsLog",value:function(e){var t,n=e.query,r=e.eventType;if(1===r?t="hl.gameplay":2===r?t="hl.gameload":3===r?t="hl.adblock":-1===r?t="hl.gameplay.error":-2===r?t="hl.gameload.error":-3===r&&(t="hl.adblock.error"),t)try{this.dumper.send_atom_event(t,n)}catch(e){console.log("zxcv Error on sending dump!",e)}}},{key:"_sendAdRequestContext",value:function(e){this.msgrt.send("adctx",{message:e.adTag.bidder})}},{key:"_checkWhitelabelPartner",value:function(){this._whitelabelPartner=!1;var e=a.getQueryParams("xanthophyll");e.hasOwnProperty("xanthophyll")&&"true"===e.xanthophyll&&(this._whitelabelPartner=!0,a.dankLog("White label publisher","".concat(this._whitelabelPartner),"success"))}},{key:"_checkConsole",value:function(){try{if(!a.Ls.available)return;"developer.gamedistribution.com"===this._parentDomain||"developer.gamedistribution.com"===this._topDomain?(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0),a.Ls.set("gd_tag",!0)):"localhost:3000"===this._parentDomain&&(a.Ls.set("gd_debug_ex",!0),a.Ls.set("gd_disable_midroll_timer",!0)),a.Ls.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 a.MessageRouter({gameId:this.options.gameId,hours:(new Date).getHours(),topDomain:this._topDomain,domain:this._parentDomain,referrer:this._parentURL,depth:a.getIframeDepth(),version:ss.version,tracking:this._userDeclinedTracking,whitelabel:this._whitelabelPartner,platform:a.getMobilePlatform(),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 t=[this._gameData.gmky.url];a.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;D.default(this,e),xR=this._initGamedockTracker(window.GamedockSDK),this._sendGamedockEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&xR.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"},this._gameData.diagnostic.gameDock.heartbeatConfig),tS.track(xR,this._gameData)}.bind(this)).catch(function(t){D.default(this,e),this._sendSDKError(t)}.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=xR)||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 t=["https://ext.minijuegosgratis.com/external-host/main.js"];console.log("noMinijuegosSDK loading"),a.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){D.default(this,e),this._sendSDKError(t)}.bind(this))}},{key:"_loadLocus",value:function(){var e=x.default(R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Aw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus/"],window.gdlocus=window.gdlocus||{cmd:[]},window.gdlocus.cmd.push(function(){D.default(this,n),this.isOpusReady=!0,window.gdlocus.iservice.register({method:"muteAdFlow",handler:this._muteFlowSound.bind(this)}),window.gdlocus.iservice.register({method:"terminateAdFlow",handler:this._terminateFlow.bind(this)})}.bind(this)),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){D.default(this,n),this._sendSDKError(e)}.bind(this)).then(function(){D.default(this,n)}.bind(this));case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_muteFlowSound",value:(g=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.mute();case 3:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"_terminateFlow",value:(A=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._adFlow){e.next=2;break}return e.abrupt("return");case 2:this._adFlow.terminate();case 3:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"_loadGoogleAnalytics",value:function(){var e=this;if(!this._bridge.isCoreSDKMode){var t=this._gameData,n=t.gameId,r=t.slug,a=t.title,i=new S_,s={provider:"gd-sdk",page_depth:i.get("depth.value"),partner_domain_from:i.get("partner.domain.from"),top_domain_from:i.get("top.domain.from"),top_domain:this._topDomain,parent_domain:this._parentDomain,parent_url:this._parentURL,game_id:n,game_slug:r,game_title:a};mR({onError:function(t){D.default(this,e),this._sendSDKError(t)}.bind(this),args:s})}}},{key:"_getCleanUrl",value:function(e){var t=e;try{var n=new O.default(e,!0);t="".concat(n.protocol,"//").concat(n.hostname,"/").concat(n.pathname)}catch(e){}return t}},{key:"_subscribeToEvents",value:function(){var e=this;this.eventBus=new a.EventBus,a.SDKEvents.forEach(function(t){var n=this;return D.default(this,e),this.eventBus.subscribe(t,function(e){return D.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),a.IMAEvents.forEach(function(t){var n=this;return D.default(this,e),this.eventBus.subscribe(t,function(e){return D.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){D.default(this,e);var t=this._getDeveloperDomains(),n=t.developerDomain,r=t.gameApiDomain;if(n){fetch("https://".concat(r,"/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){}}PD()}.bind(this),"ima"),this.eventBus.subscribe("CONTENT_PAUSE_REQUESTED",function(){return D.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;D.default(this,e),this.msgrt.send("ad.impression"),CD(),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&tS.track(xR,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){D.default(this,e),this.msgrt.send("ad.error",{message:t.message,details:t.details})}.bind(this),"ima"),this.eventBus.subscribe("AD_SDK_REQUEST",function(t){D.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){if(D.default(this,e),t.message.startsWith("Blocked:")){var n=t.message.replace("Blocked:","").trim(),r=this._getCleanUrl(n),a="Blocked: ".concat(r);if(!this._bridge.noBlockerEvent&&(this.msgrt.send("error",{message:a}),!this._hasBlocker)){this._hasBlocker=!0;this.msgrt.send("adblck.src",{message:a});var i=this.get_ad_system_init_result(),s=i.ima,o=i.afg;(!s||!o)&&this._sendTunnlEvent(3)}}else this.msgrt.send("error",{message:t.message})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_EMPTY",function(t){D.default(this,e),this.msgrt.send("tunnl.keys.empty",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_REQUEST_KEYS_FALLBACK",function(t){D.default(this,e),this.msgrt.send("tunnl.keys.fallback",{message:t.message,details:t.details})}.bind(this),"sdk"),this.eventBus.subscribe("AD_T4R",function(t){return D.default(this,e),this.msgrt.send("adt4r")}.bind(this),"sdk")}},{key:"_checkGameId",value:function(){this.options.gameId===this._defaults.gameId&&this._sendSDKError("Please check if your GAME ID is correct. Otherwise, no revenue will be reported.")}},{key:"_getDefaultGameData",value:function(){return{gameId:this.options.gameId,disableAds:{},preroll:!0,midroll:12e4,rewardedAds:!1,title:"",tags:[],category:"",assets:[],dmain:!0,sdk:{},loader:{},splash:{},promo:{},dAds:{},pAds:{},mAds:{},rAds:{}}}},{key:"_getGameDataUrl",value:function(){var e=void 0!==this._topDomain&&"undefined"!==this._topDomain?this._topDomain:this._parentDomain,t=ew().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:(m=x.default(R.default.mark((function e(){var t,n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=!0,n=this._gameData,r=this._parentDomain.indexOf("gamedistribution.com")>=0,t=void 0===this._gameData.dmain||this._gameData.dmain,console.log("zxcv exclude, isAllowedDomain",r,t),t=t||r,(n.bloc_gard&&!0===n.bloc_gard.enabled||!t)&&this._redirectToBlocking();case 8:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"_blockDirectTokenURLEmbedding",value:function(){var e,t,n=this._checkTokenGameUrl(),r=new S_,a="html5.gamedistribution.com"!==O.default(document.referrer).host,i=n&&!uR.SDKExistsOnUpperFrame&&r.get("depth.value")>0&&a;if(i&&(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:i}}},{key:"_redirectToBlocking",value:function(e){var t=this;this.msgrt.send("blocked");var n=this._gameData;setTimeout(x.default(R.default.mark((function r(){return R.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e){r.next=9;break}return r.prev=1,r.next=4,t.adInstance._send_atom_event("token-blocked");case 4:r.next=9;break;case 6:r.prev=6,r.t0=r.catch(1),console.log("Could not send dump.token-blocked",r.t0);case 9:window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(j.default.stringify({domain:t._parentDomain,id:n.gameId,img:t._get_game_thumbnail_url(),title:n.title,utm_source:t._parentDomain,utm_medium:(null==n?void 0:n.slug)||(null==n?void 0:n.title)||(null==n?void 0:n.gameId)||"unknown",utm_campaign:"block-and-redirect"}));case 10:case"end":return r.stop()}}),r,null,[[1,6]])}))),100)}},{key:"_redirectToLoaderFrame",value:function(){var e=this,t=this._gameData;setTimeout(x.default(R.default.mark((function n(){var r,a,i,s;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e.adInstance._send_atom_event("loader-redirect");case 3:n.next=8;break;case 5:n.prev=5,n.t0=n.catch(0),console.log("Could not send dump.loader-redirect",n.t0);case 8:r=O.default(location.href,!0),a=wR(wR({},r.query),{},{rd:"1"}),i=j.default.stringify(a),s="https://html5.gamedistribution.com/".concat(t.gameId,"/?").concat(i),window.location.href=s;case 13:case"end":return n.stop()}}),n,null,[[0,5]])}))),100)}},{key:"_checkGameDeleted",value:function(){var e=this;6!==this._gameData.status&&4!==this._gameData.activeStatus||(console.log("%c %c %c This game was deleted, please remove it in your website... ","background: #F2181A","background: #F23818","color: #fff; background: #F23818;","background: #F55E60","background: #F55E60","background: #c4161e; color: #fff;"),setTimeout(function(){D.default(this,e),document.location="https://html5.api.gamedistribution.com/deleted.html"}.bind(this),100))}},{key:"_changeMidrollInDebugMode",value:function(){var e=this._gameData;GD().disableMidrolltimer?e.midroll=0:a.Ls.available&&a.Ls.getBoolean("gd_debug_ex")&&(a.Ls.getBoolean("gd_disable_midroll_timer")?e.midroll=0:e.midroll=this._getDefaultGameData().midroll)}},{key:"_checkSplashAndPromoScreens",value:function(){var e,t,n,r;!1===(null===(e=this._gameData.loader)||void 0===e?void 0:e.mobile)&&this._getisMobile()&&(this._gameData.loader.enabled=!1);var a,i=this._gameData,s=i.gdpr&&!0===i.gdpr.consent,o=i.loader,d=null===(t=i.promo)||void 0===t?void 0:t[null===(n=i.promo)||void 0===n||null===(r=n.template)||void 0===r?void 0:r.preroll];(i.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=d&&d.enabled?this._createPromoBeforeSplash(i,s):o.enabled&&!0!==(null===(a=o.splash)||void 0===a?void 0:a.skip)?this._createSplash(i,s):this.onResumeGame("Skipped splash.","success"):o.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||s?null!=d&&d.enabled?this._createPromoBeforeSplash(i,s):!1!==o.enabled&&this._createSplash(i,s):null!=d&&d.enabled&&this._createPromo(i,s))}},{key:"_initializeVideoAd",value:(p=x.default(R.default.mark((function e(){var t;return R.default.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=a.extendDefaults(this.options.advertisementSettings,t.sdk)),this.macros=new a.Macros({game:t,bridge:this._bridge}),this.adInstance=new zD(this.options.flashSettings.adContainerId,this.options.advertisementSettings,{parentURL:this._parentURL,parentDomain:this._parentDomain,topDomain:this._topDomain}),this.adInstance.gameId=t.gameId,this.adInstance.category=t.category,this.adInstance.tags=t.tags,this.adInstance.noPreroll=this._bridge.noPreroll,this.adInstance.macros=this.macros,this.adInstance.gameData=t,this.adInstance.msgrt=this.msgrt,this.adInstance.PackageJSON=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 p.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){a.dankLog("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){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}}},{key:"IscForwardOnEvent",value:(f=x.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!1,e.prev=1,e.next=4,US();case 4:if(!(r=e.sent)){e.next=15;break}return e.next=8,r.isLoader();case 8:if(s=e.sent,!((null===(a=this._gameData)||void 0===a||null===(i=a.isv_fw)||void 0===i?void 0:i.enabled)&&s&&r.onEvent)){e.next=14;break}return n=!0,r.onEvent({event:t}),e.abrupt("return");case 14:null==t||t.name,window.location.href;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),cs("[GD-IS] error on onEvent forward",e.t0);case 20:return e.abrupt("return",n);case 21:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(e){return f.apply(this,arguments)})},{key:"_onEvent",value:(h=x.default(R.default.mark((function e(t){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.IscForwardOnEvent(t);case 2:if(!e.sent){e.next=5;break}return e.abrupt("return");case 5:if(a.dankLog(t.name,t.message,t.status),!t.skipForward){e.next=8;break}return e.abrupt("return");case 8:try{this.options.onEvent({name:t.name,message:t.message,status:t.status,skipForward:t.skipForward,adPosition:t.adPosition})}catch(e){a.dankLog("DEVELOPER_ERROR",e.message,"warning")}case 9:case"end":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:"_getGameData",value:(l=x.default(R.default.mark((function e(){var t;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lw();case 2:return t=e.sent,this.msgrt.setGameData(t),a.setDankLog(t.diagnostic),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"_createSplash",value:(c=x.default(R.default.mark((function e(t,n){var r,i,s,o,d=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getSplashTemplate(t);case 2:return r=e.sent,i=new r(wR(wR({},this.options),{},{isConsentDomain:n,version:ss.version}),t,this._parentDomain),e.next=6,vw();case 6:s=e.sent,o=s.enabled,i.on("playClick",function(){var e,r,s,u=this;if(D.default(this,d),((null===(e=window.gdlocus)||void 0===e?void 0:e.firstUserAction)||x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("gd-adflow locus-first-user-action is not defined");case 1:case"end":return e.stop()}}),e)}))))({game_id:t.gameId}).catch(function(e){D.default(this,u),console.log("gd-adflow locus-first-user-action error",e)}.bind(this)),n){var c=new Date;c.setDate(c.getDate()+90),document.cookie="ogdpr_tracking=1; expires=".concat(c.toUTCString(),"; path=/")}if(this._hideCMPButton(),KS("play"),o)window.gdsdk.showAd(a.AdType.Interstitial,{position:"preroll"}).catch(function(e){D.default(this,u),i.hide()}.bind(this));else{var l={position:"preroll"};(function(){D.default(this,u),ls.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 1"),l.adapter="adsense")}).bind(this),this.showAd(a.AdType.Interstitial,l).catch(function(e){D.default(this,u)}.bind(this))}null!==(r=this._gameData)&&void 0!==r&&null!==(s=r.evnts)&&void 0!==s&&s.enabled&&(pS({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(){D.default(this,d),i.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){D.default(this,d),i.hide()}.bind(this));case 12:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"_createPromoBeforeSplash",value:(d=x.default(R.default.mark((function e(t,n){var r,a,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(wR(wR({},this.options),{},{isConsentDomain:n,version:ss.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){D.default(this,o),s.hide(),this._createSplash(t,n)}.bind(this)),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0),this._createSplash(t,n);case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(e,t){return d.apply(this,arguments)})},{key:"_createPromo",value:(o=x.default(R.default.mark((function e(t,n){var r,a,i,s,o=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._createPrerollPromoTemplate(t);case 3:i=e.sent,(s=new i(wR(wR({},this.options),{},{isConsentDomain:n,version:ss.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){D.default(this,o),s.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 o.apply(this,arguments)})},{key:"showBanner",value:function(){var e=this;this.showAd(a.AdType.Interstitial).catch(function(){D.default(this,e)}.bind(this))}},{key:"IscForwardShowAd",value:(s=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c=arguments;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c.length>1&&void 0!==c[1]?c[1]:{},i={forwarded:r=!1,result:a},e.prev=3,null===(s=this._gameData)||void 0===s||null===(o=s.isv_fw)||void 0===o?void 0:o.enabled){e.next=7;break}return e.abrupt("return",i);case 7:return us("[GD-IS] forward enabled"),e.next=10,US();case 10:if(d=e.sent){e.next=13;break}return e.abrupt("return",i);case 13:return e.next=15,d.isLoader();case 15:if(u=e.sent){e.next=22;break}return us("[GD-IS] forwarding ad call",{location:window.location.href}),r=!0,e.next=21,d.showAd({adType:t,params:n});case 21:a=e.sent;case 22:us("[GD-IS] showAd",{isLoader:u,location:window.location.href}),e.next=28;break;case 25:e.prev=25,e.t0=e.catch(3),cs("[GD-IS] error on showAd forward",e.t0);case 28:return e.abrupt("return",{forwarded:r,result:a});case 29:case"end":return e.stop()}}),e,this,[[3,25]])}))),function(e){return s.apply(this,arguments)})},{key:"showAd",value:(i=x.default(R.default.mark((function e(t){var n,r=this,a=arguments;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(a,i){var s,o,d,u,c,l,h;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.IscForwardShowAd();case 3:if(o=e.sent,d=o.forwarded,u=o.result,!d){e.next=8;break}return e.abrupt("return",u);case 8:if(KS("play"),!r._autoResumeIfAdsAreDisabled(t||"interstitial")){e.next=13;break}return e.abrupt("return",a());case 13:return c={adType:t||"interstitial",params:n,adTimestamp:r.adRequestTimer},e.next=17,r.sdkReady;case 17:return l=e.sent,e.next=20,r.videoAdReady;case 20:if(null!==(s=r._gameData.lp)&&void 0!==s&&s.load||r._sendLoadedEvent(1),r._sendGamedockGamePlay(),r._rejectAdIfGameBlocked({gameData:l,adRequest:c}),r._rejectAdIfAdDisabled({gameData:l,adRequest:c}),r._rejectAdIfUnsupportedType({adRequest:c}),"rewarded"===t&&r._setGameRewardedFlag(),null!=n&&n.isGift||r._rejectAdIfAdRateHits({gameData:l,adRequest:c}),n&&n.isGift&&n.isMidrollPlus||!r.adBlockerPage||(r._setAdRequestTimer(),r.adBlockerPage.show()),r.adInstance.attachAfgPosition(c),!r.adFlowRunning){e.next=31;break}return e.abrupt("return",a());case 31:return r.adFlowRunning=!0,h=new tR(r),r._adFlow=h,e.next=36,h.runAdFlow(c);case 36:r.adFlowRunning=!1,r._adFlow=null,a(),r._post_message({topic:"adrequest.instream"}),e.next=48;break;case 42:e.prev=42,e.t0=e.catch(0),r.adFlowRunning=!1,r._adFlow=null,r.onResumeGame(e.t0.message,"warning"),i(e.t0.message);case 48:case"end":return e.stop()}}),e,null,[[0,42]])})));return function(t,n){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e){return i.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,a=this._gameData.disableAds[e],i=r||a;return this._gameData.diagnostic,this._gameData.disableAds,i&&(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,a,i,s,o,d,u,c,l,h,f,p,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===(a=r.gft)||void 0===a||null===(i=a[e].durations[this._giftCount[e]])||void 0===i?void 0:i.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===(u=d.gft)||void 0===u||null===(c=u[e].durations[this._giftCount[e]])||void 0===c?void 0:c.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===(f=this._gameData)||void 0===f||null===(p=f.gft)||void 0===p||null===(m=p[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!==a.AdType.Interstitial&&t.adType!==a.AdType.Rewarded)throw new Error("Unsupported an advertisement type: ",t.adType)}else t.adType=a.AdType.Interstitial}},{key:"_rejectAdIfRewardedDisabled",value:function(e){var t=e.gameData;if(e.adRequest.adType===a.AdType.Rewarded&&!t.rewardedAds)throw new Error("Rewarded ads are disabled.")}},{key:"_rejectAdIfAdRateHits",value:function(e){var t,n,r,i,s,o,d=e.gameData,u=e.adRequest,c=null;u.adType===a.AdType.Interstitial&&null!==(t=d.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=d.diagnostic)||void 0===r||null===(i=r.useMidrollIndex)||void 0===i?void 0:i.indexes.length)-1||(c=6e4*(null===(s=d.diagnostic)||void 0===s||null===(o=s.useMidrollIndex)||void 0===o?void 0:o.indexes[this.adInstance.adMidrollCount])):c=d.midroll;if(u.adType===a.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<c)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=x.default(R.default.mark((function e(t){var n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(r,i){var s,o;return R.default.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.bloc_gard||!0!==s.bloc_gard.enabled){e.next=8;break}throw new Error("Game or domain is blocked.");case 8:if(!s.disableAds[t]&&!n._whitelabelPartner){e.next=10;break}throw new Error("Advertisements are disabled for this ad type => ".concat(t,"..."));case 10:if(t){e.next=14;break}t=a.AdType.Rewarded,e.next=16;break;case 14:if(t===a.AdType.Interstitial||t===a.AdType.Rewarded){e.next=16;break}throw new Error("Unsupported an advertisement type:"+t);case 16:if(!n.adInstance){e.next=22;break}return e.next=19,n.adInstance.preloadAd(t);case 19:e.t0=e.sent,e.next=23;break;case 22:e.t0="gdsdk://preloaded";case 23:o=e.t0,r(o),e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),i(e.t1);case 30:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"cancelAd",value:(n=x.default(R.default.mark((function e(){var t=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=x.default(R.default.mark((function e(n,r){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{t.adInstance.cancel(),t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),r()}catch(e){t.onResumeGame("Advertisement(s) are cancelled. Start / resume the game.","success"),n(e.message)}case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})},{key:"showDisplayAd",value:function(e){var t=this;return new Promise(function(){var n=x.default(R.default.mark((function n(r,a){var i;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.sdkReady;case 3:return i=n.sent,n.next=6,t.videoAdReady;case 6:if(!i.dAds.enabled){n.next=13;break}return n.next=9,t.adInstance.loadDisplayAd(e);case 9:t._post_message({topic:"adrequest.display"}),r(),n.next=14;break;case 13:a("Display-Ads are disabled.");case 14:n.next=19;break;case 16:n.prev=16,n.t0=n.catch(0),a(n.t0.message||n.t0);case 19:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(e,t){return n.apply(this,arguments)}}())}},{key:"onResumeGame",value:function(e,t){var n;try{this._allowExternals({enabled:!1}),this.options.resumeGame()}catch(e){console.log("gd-adflow error onResumeGame",e),a.dankLog("DEVELOPER_ERROR",e.message,"warning")}var r="SDK_GAME_START";this.eventBus.broadcast(r,{name:r,message:e,status:t,analytics:{category:"SDK",action:r,label:this.options.gameId+""}}),this.adInstance&&this.adInstance._hideAddResume(),this.adInstance&&this.adInstance._hideAdSpinner(),this.adInstance&&this.adInstance._clearTimeoutForSkipAddButton(),null===(n=this._gameData.evnts)||void 0===n||!n.enabled||this._isMasterGameURL()&&!this._isExtHostedGameURL()||(pS({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){a.dankLog("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()||(pS({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 a.ImplementationTest(this).start(),a.Ls.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 t=this._gameData;t.sdk.fullscreen&&"auto"===t.sdk.fullscreen&&document.addEventListener("click",function(){if(D.default(this,e),!this._isFullScreen){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(n)n.call(t);else if(void 0!==window.ActiveXObject){var r=new ActiveXObject("WScript.Shell");null!==r&&r.SendKeys("{F11}")}this._isFullScreen=!0}}.bind(this))}catch(e){console.log("Fullscreen error handled...",e)}}},{key:"_allowExternals",value:function(e){var t=this;void 0!==this.window_open&&(!1===e.enabled?window.open=function(e){D.default(this,t),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 t,n=this,r=new O.default(e),a=r.host;return r.href,((null===(t=this._gameData.urlBlockExc)||void 0===t?void 0:t.hosts)||[]).some(function(e){return D.default(this,n),e===a}.bind(this))}},{key:"_removeExternalsInHtml",value:function(e){var t=this;!1===e.enabled&&window.document.querySelectorAll("a").forEach(function(e){var n=this;D.default(this,t);var r=!!(e.innerText.toLowerCase().includes("start")||e.innerText.toLowerCase().includes("play")||e.innerText.toLowerCase().includes("continue")),a=e.getAttribute("href");if(!this._shouldAllowExternalUrl(a)){var i=e.getAttribute("href");e.removeAttribute("href"),r||(e.onclick=function(e){return D.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(i)}),!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.getParentUrl()),s=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:a.getParentDomain()),o=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===a.getIframeDepth()?s:a.getTopDomain()),d=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,A=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:d,noLoadedEvent:u,noBlockerEvent:c,noPreroll:m,parentURL:i,parentDomain:s,topDomain:o&&o.length?o:s,noGAPageView:l,noLotamePageView:h,noGamedockSDK:f,noMinijuegosSDK:p,version:r.version,pauseGameOnStartup:A,depth:a.getIframeDepth(),domainMatched:s===o,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.default(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.default(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.default(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.default(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.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new O.default(location.href,!0);if(!a.query.gd_zone_config)return;e=a.query.gd_zone_config}return JSON.parse(u.Base64.decode(decodeURIComponent(e)))}catch(e){}}},{key:"_getSplashTemplate",value:function(e){var t=e.splash;return new KD(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=x.default(R.default.mark((function e(t){var n,r,a,i,s;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(n=t.promo)||void 0===n?void 0:n[null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll],s=new WD(i),e.abrupt("return",s.promo());case 3:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"_formatTokenURLSearch",value:function(e){var t="";try{t=encodeURIComponent(u.Base64.encode(JSON.stringify(e)))}catch(e){}try{var n=new O.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(j.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new O.default(e,!0);return n.query=wR(wR({},n.query),t),n.toString()}},{key:"_base64_encode",value:function(e){return u.Base64.encode(JSON.stringify(e))}},{key:"session",value:function(){var e=this;return new Promise(function(){var t=x.default(R.default.mark((function t(n,r){var a;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.sdkReady;case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:a=e._gameData,n({ads:{display:{enabled:a.dAds.enabled},rewarded:{enabled:a.rewardedAds}},location:{parentDomain:e._bridge.parentDomain,topDomain:e._bridge.topDomain,parentURL:e._bridge.parentURL,depth:e._bridge.depth,loadedByGameZone:e._bridge.isTokenGameURL}});case 9:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e,n){return t.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)xR.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,t=this._gameData,n=t.assets.find(function(t){return D.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(e){var t=this;try{var n,r=null===(n=this._gameData)||void 0===n?void 0:n.gft[e],i=setInterval(x.default(R.default.mark((function n(){var r=this;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t.adInstance.requestRunning||t.adFlowRunning?console.log("Advertisement already running..."):(t.showAd(a.AdType.Interstitial,{position:e,isGift:!0}).catch(function(e){D.default(this,r)}.bind(this)),clearInterval(i),t._giftCount[e]++);case 1:case"end":return n.stop()}}),n,this)}))),1e3*r.durations[this._giftCount[e]].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 kR}},{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,t=new Proxy(new URLSearchParams(window.location.search),{get:function(t,n){return D.default(this,e),t.get(n)}.bind(this)});return!t.gd_mode&&window.location.search.includes("gd_mode")?window.location.search.split("gd_mode=")[1]:t.gd_mode}},{key:"_executeMidrollPlus",value:function(){var e,t=this;if(null!==(e=this._gameData.midroll_plus)&&void 0!==e&&e.enabled&&!this.isMidrollPlusExecuted){var n;this.isMidrollPlusExecuted=!0;var r=this._gameData.midroll_plus.type||"midroll";if(null!==(n=this._gameData.midroll_plus)&&void 0!==n&&n.interval)var i=setInterval(function(){var e,n,s=this;(D.default(this,t),this.adFlowRunning)||(this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(e){D.default(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===(n=this._gameData.midroll_plus)||void 0===n?void 0:n.interval)&&clearInterval(i))}.bind(this),6e4*this._gameData.midroll_plus.timer);else setTimeout(function(){var e=this;D.default(this,t),this.showAd(a.AdType.Interstitial,{position:"midroll",giftType:r,isMidrollPlus:!0}).catch(function(t){D.default(this,e)}.bind(this))}.bind(this),this._gameData.midroll)}}}]),e}();function SR(){return(SR=x.default(R.default.mark((function e(){var t,n=this;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Aw();case 2:if(e.sent){e.next=6;break}return console.log("locus-disabled on proxy level"),e.abrupt("return");case 6:t=["https://pm.azerioncircle.com/p/locus/"],console.log("locus loading"),a.getScript(t[0],"locus",{alternates:t}).catch(function(e){D.default(this,n),this._sendSDKError(e)}.bind(this));case 9:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}var RR=new m.EventEmitter,TR=function(e){var t=this;!function(){SR.apply(this,arguments)}();var n,r=function(e){var n=this;return D.default(this,t),new Promise(function(t,r){var a=this;D.default(this,n);var i=function(e){D.default(this,a),"SDK_GAME_START"===e.name&&(RR.off("sdk-event",i),t())}.bind(this);RR.on("sdk-event",i),p("showAd",{adType:e})}.bind(this))}.bind(this),a=function(){return D.default(this,t),n||(n=new DR(e)),n}.bind(this),i=function(e){return D.default(this,t),r(e)}.bind(this),s=function(e){return D.default(this,t),"gdsdk://preloaded"}.bind(this),o=function(e){return D.default(this,t),a().showDisplayAd(e)}.bind(this),d=function(){return D.default(this,t),p("cancelAd")}.bind(this),u=function(){return D.default(this,t),p("openConsole")}.bind(this),c=function(){return D.default(this,t),p("showBanner")}.bind(this),l=function(){return D.default(this,t),p("session")}.bind(this),h=function(e){return D.default(this,t),p("sendGenericEvent",{options:e})}.bind(this),f=function(){D.default(this,t),console.log("_sendSDKReady")}.bind(this),p=function(e,n){var r=this;return D.default(this,t),n||(n={}),new Promise(function(t,a){D.default(this,r);try{var i={type:"gd-sdk",method:e,options:n};window.parent.postMessage(i,"*"),t()}catch(e){console.log("gd:adp:m:s:error",e),t()}}.bind(this))}.bind(this),m=function(){D.default(this,t);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&&g(r)}),!1)}.bind(this),A=function(){D.default(this,t),m(),p("init")}.bind(this),g=function(n){D.default(this,t);try{RR.emit("sdk-event",n),e.onEvent&&e.onEvent(n)}catch(e){console.log("DEVELOPER ERROR on forwarder-sdk")}}.bind(this);return{showBanner:c,showAd:i,preloadAd:s,showDisplayAd:o,cancelAd:d,openConsole:u,getSession:l,onEvent:g,init:A,_sendSDKReady:f,sendGenericEvent:h}},CR=function(e){var t=TR(e);return t.init(),t},IR=function(){var e=this,t=function(){D.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Fa-f0-9]{32})(.*)$/i.test(location.href)}.bind(this),n=function(){D.default(this,e);return/http[s]?:\/\/(html5\.gamedistribution\.com\/[A-Za-z0-9]{8})\/(.*)$/i.test(location.href)}.bind(this),r=function(){D.default(this,e);return/^http[s]?:\/\/.*?gd_sdk_referrer_url=.*$/i.test(location.href)}.bind(this),a=function(){D.default(this,e);var r="html5.gamedistribution.com"!==O.default(window.location.href).host;return t()&&!(n()||r)?"loader-frame":"game-frame"}.bind(this);return{isMasterGameURL:t,isTokenGameURL:n,isExtHostedGameURL:r,whichFrame:a}},OR="gd-sdk-frame-handshake-request",PR="gd-sdk-frame-handshake-response",BR=function(e){var t=this;return new Promise(function(e,n){var r=this;D.default(this,t);var a={type:OR},i=!1;window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,s=n.type;if(s===OR){var o={type:PR};a.postMessage(o,r)}else s===PR&&(i=!0,e({origin:r,source:a}))})),setTimeout(function(){D.default(this,r),i||e()}.bind(this),200),window.parent!==window?window.parent.postMessage(a,"*"):e()}.bind(this))},LR=function(){var e=x.default(R.default.mark((function e(){var t,n,r,a,i,s,o;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,mw();case 2:return t=e.sent,e.next=6,BR();case 6:if(n=e.sent,uR.SDKExistsOnUpperFrame=!!n,t){e.next=10;break}return e.abrupt("return",!1);case 10:return r=IR(),a=r.isMasterGameURL,r.isTokenGameURL,i=a(),e.next=14,gw();case 14:return s=e.sent,o=!1,o=s?!i&&!!n:!i,e.abrupt("return",o);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),UR=et,MR=ue,FR=es,jR=Ka,GR=MR(qa.f),NR=MR([].push),qR=function(e){return function(t){for(var n,r=jR(t),a=FR(r),i=a.length,s=0,o=[];i>s;)n=a[s++],UR&&!GR(r,n)||NR(o,e?[n,r[n]]:r[n]);return o}},HR={entries:qR(!0),values:qR(!1)}.values;Zi({target:"Object",stat:!0},{values:function(e){return HR(e)}});var QR,VR={},zR=function(e){try{if(e.skipForward)return;if(VR.source){var t={type:"gd-sdk-on-event",event:e};VR.source.postMessage(t,VR.origin)}}catch(e){console.log("gd-sdk forwardEvent err",e)}},WR=function(){zR({name:"SDK_READY",status:"success",message:"Everything is ready."}),zR({name:"SDK_GAME_START",status:"success",message:"Advertisement(s) are done. Start / resume the game."}),zR({name:"CONTENT_RESUME_REQUESTED",status:"success",message:"Fired when content should be resumed. This usually happens when an ad finishes or collapses."})},KR=function(e){window.addEventListener("message",(function(t){var n=t.data,r=t.origin,a=t.source,i=n.type,s=n.method,o=n.options;if("gd-sdk-self"!==i){if("gd-sdk"===i){if(!VR.source&&"init"===s)return function(e){var t=e.source,n=e.origin;VR={source:t,origin:n}}({source:a,origin:r}),void WR();var d=e[s];d&&x.default(R.default.mark((function t(){var n,r=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,function(){D.default(this,r),"showAd"===s&&ls.firstAdapterModeAdsense&&"rewarded"!==o.adType&&(console.log("promo-test, set first adapter to adssense 3"),o.params=o.params?o.params:{},o.params.adapter="adsense")}.bind(this),!(n=d.apply(e,Object.values(o)))||!n.then){t.next=6;break}return t.next=6,n;case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),console.log("gd:adp:m:r onFrameMessage error",t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})))()}}else{var u={type:"gd-sdk",method:s,options:o};window.postMessage(u,location.origin)}}),!1)},YR=function(e){!function(e){var t=e.onEvent;e.onEvent=function(e){zR(e),t.apply(this,arguments)}}(e);var t=new DR(e);return KR(t),t},JR=function(){function e(){C.default(this,e),this.moduleName="GDAeria",this.moduleConfig={source:"https://pm.azerioncircle.com/@bygd/gd-sdk-aeria/1.0.1/dist/default/iife/index.js",dependencies:[]},Kg(this.moduleName,this.moduleConfig)}var t,n;return T.default(e,[{key:"load",value:(n=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Jg(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 n.apply(this,arguments)})},{key:"runYMenu",value:(t=x.default(R.default.mark((function e(t){var n;return R.default.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 t.apply(this,arguments)})}]),e}(),ZR=function(){var e=x.default(R.default.mark((function e(){var t,n,r,i,s,o,d,u,c,l,h,f,p,m,A,g;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=function(){var e,t=(e=new S_).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}}(),n=t.isAeriaDomain,r=t.isAeriaStagingDomain,!n){e.next=21;break}return o=function(){var e=(new S_).get("partner.url.value");return new O.default(e,!0)},d=function(){var e="ae-soft-323";try{var t=o(),n=t.pathname,r=n.split("/"),a=r[r.length-1];us("aeria-ylogin:loc",t,n,a),e=a}catch(e){cs("Error on getting aeria game id",e)}return e}(),u={action:"score",data:{gameId:d,score:100},env:r?"staging":"production",system:"Softgames"},c=function(){var e=window.parent||window,t=u;e.postMessage(t,"*")},l=new a.EventBus,e.next=13,lw();case 13:h=e.sent,f=null==h||null===(i=h.aeria)||void 0===i?void 0:i.yMenuExcluded,p=null==h||null===(s=h.aeria)||void 0===s?void 0:s.yLoginExcluded,l.subscribe("AD_FLOW_COMPLETE",(function(e){"midroll"===e.adType&&(p||c())})),m=function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(new JR).runYMenu({gameId:d});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=IR(),g=A.whichFrame,"game-frame"===g()&&(f||m());case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),XR=function(e){try{var t=Y_(e);e.gameId||t.send("nogameid",{message:"".concat(hb.parentURL)})}catch(e){}},$R=function(){var e=x.default(R.default.mark((function e(){return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ZR();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 e.apply(this,arguments)}}(),eT={create:function(){var e=x.default(R.default.mark((function e(t){var n,r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,XR(t),cw(t),e.next=5,LR();case 5:return n=e.sent,e.next=8,$R();case 8:return window.isForwarderFrame=n,r=n?CR(t):YR(t),bw(),e.abrupt("return",r);case 14:return e.prev=14,e.t0=e.catch(0),console.log("gd:adp: sdk adaptor create failed, fallback to default adapter",e.t0),e.abrupt("return",YR(t));case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t){return e.apply(this,arguments)}}()};function tT(){return(tT=x.default(R.default.mark((function e(t,n){var r;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ww();case 2:if(!e.sent){e.next=7;break}e.t0=window.gdsdk,e.next=10;break;case 7:return e.next=9,iT(t);case 9:e.t0=e.sent;case 10:return r=e.t0,e.abrupt("return",n(r));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var nT,rT,aT=!1;function iT(e){var t=this;return new Promise(function(n,r){var a=this;if(D.default(this,t),QR)return n(QR);if(aT)var i=setInterval(function(){D.default(this,a),QR&&(aT=!1,clearInterval(i),n(QR))}.bind(this),100);else aT=!0,eT.create(e).then(function(e){D.default(this,a),QR=e,e._sendSDKReady(),aT=!1,n(QR)}.bind(this))}.bind(this))}function sT(e){return iT(e),{invoke:function(t){return function(e,t){return tT.apply(this,arguments)}(e,t)}}}function oT(e,t){var n=this;return new Promise(function(r,i){var s,o=this;D.default(this,n);var d=function(e){var t="https://pm.azerioncircle.com/pkg/@bygd/gd-sdk-wrp/dist/default/iife/index.js";return e&&(t="https://pm.azerioncircle.com/@bygd/gd-sdk-wrp/".concat(e,"/dist/default/iife/index.js")),[t]}(null==t||null===(s=t.game)||void 0===s?void 0:s.version);dT({text:"sdk-wrapper-script-load"}),a.getScript(d[0],"gd-sdk-wrp",{alternates:d}).catch(function(e){D.default(this,o),dT({text:"sdk-wrapper load error",error:e.message}),this._sendSDKError(e),i(e)}.bind(this)).then(x.default(R.default.mark((function n(){var a,s;return R.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,dT({text:"sdk-wrapper load success"}),a=window.GDSDKWRP.GDSDKWRP,s=new a,dT({text:"sdk-wrapper before gdSdkWrp.init"}),n.next=7,s.init(e,t);case 7:rT=n.sent,dT({text:"sdk-wrapper after gdSdkWrp.init"}),r(rT),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),dT({text:"sdk-wrapper load error 2",error:n.t0.message}),i(n.t0);case 16:case"end":return n.stop()}}),n,null,[[0,12]])}))))}.bind(this))}function dT(e){try{var t={tp:"gd.wrp",args:e};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(u.Base64.encode(JSON.stringify(t))))),console.log(N.default(Object.values(e)))}catch(e){}}function uT(e){if(e){var t=e.name,n=e.message,r=e.status;try{dT({text:"samsung-wrp send-game-event",evt:e,hasOptions:!!nT}),nT&&nT.onEvent({name:t,message:n,status:r})}catch(t){dT({text:"samsung-wrp DEVELOPER-ERROR",evt:e,err:t})}}}function cT(e){return lT.apply(this,arguments)}function lT(){return(lT=x.default(R.default.mark((function e(t){var n,r,a,i,s,o,d,u,c;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return nT=t,cw(t),e.next=4,lw();case 4:if(i=e.sent,!rT){e.next=7;break}return e.abrupt("return",rT);case 7:if(s=null==i||null===(n=i.sdk_wrp)||void 0===n?void 0:n.enabled,o=null==i||null===(r=i.sdk_wrp)||void 0===r?void 0:r.version,d=null==i?void 0:i.gameId,u=null==i?void 0:i.title,fT("isWrapEnabled ".concat(s)),s){e.next=14;break}return e.abrupt("return");case 14:return c=null==i||null===(a=i.sdk_wrp)||void 0===a?void 0:a.wrapper,e.next=17,oT(c,{onEvent:uT,game:{gameId:d,title:u,version:o}});case 17:return rT=e.sent,e.abrupt("return",rT);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hT(){return hT=x.default(R.default.mark((function e(t){var n,r,a;return R.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t._get_developer_sets,fT("beforeGetDeveloperSettings"),r=n(),fT("afterGetDeveloperSettings"),e.prev=4,e.next=7,cT(r);case 7:a=e.sent,fT("after get SDK wrapper: ".concat(!!a)),a&&(fT("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),fT("Error on SDK wrapper init: ".concat(e.t0.message));case 16:case"end":return e.stop()}}),e,null,[[4,12]])}))),hT.apply(this,arguments)}function fT(e){window.sdkLog.push(e)}function pT(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":S.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===S.default(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.default(window.location.href,!0),r=n.host,a=n.query,i=r,s=null==a?void 0:a.gd_sdk_referrer_url;return s&&(s=s.startsWith("https://")||s.startsWith("http://")?s:"https://".concat(s),null!==(t=e=O.default(s,!0))&&void 0!==t&&t.host&&(i=e.host)),i}()?fT("skipped normal SDK init!"):(!function(){TD();var e=sT(pT());function t(){var t=this;this.AdType=a.AdType,this.preloadAd=function(t){var n=this;return e.invoke(function(e){return D.default(this,n),e.preloadAd(t)}.bind(this))},this.showAd=function(){var t=x.default(R.default.mark((function t(n,r){var i=this;return R.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.invoke(function(e){var t=this;if(D.default(this,i),n===a.AdType.Display)return e.showDisplayAd(r);var s={};return function(){D.default(this,t),ls.firstAdapterModeAdsense&&(console.log("promo-test, set first adapter to adssense 2"),s.adapter="adsense")}.bind(this),e.showAd(n,s)}.bind(this)));case 1:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),this.cancelAd=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.cancelAd()}.bind(this))},this.openConsole=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.openConsole()}.bind(this))},this.getSession=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.session()}.bind(this))},this.sendEvent=function(t){var n=this;return e.invoke(function(e){return D.default(this,n),e.sendGenericEvent(t)}.bind(this))},this.leaderboard={show:function(){D.default(this,t),Xg.showLeaderboard()}.bind(this),addScore:function(e){D.default(this,t),Xg.addScore(e)}.bind(this)}}t.prototype=new function(){this.showBanner=function(){var t=this;return e.invoke(function(e){return D.default(this,t),e.showBanner()}.bind(this))},this.play=function(){},this.customLog=function(){}},window.gdsdk=new t,window.gdApi=window.gdsdk}(),fT("afterSDKInit")),function(e){hT.apply(this,arguments)}({_get_developer_sets:pT});