-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathSpringRoll-Container-umd.js
2 lines (2 loc) · 137 KB
/
SpringRoll-Container-umd.js
1
2
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).springroll=t.springroll||{})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==e&&e,n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(t){return!1}}(),i="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function c(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function v(t){var e=new FileReader,n=p(e);return e.readAsArrayBuffer(t),n}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&o&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=f(this);if(t)return t;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 t=f(this);return t||(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(v)}),this.text=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,n=p(e);return e.readAsText(t),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=l(t),e=c(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},h.prototype.delete=function(t){delete this.map[l(t)]},h.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},h.prototype.set=function(t,e){this.map[l(t)]=c(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),d(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),d(t)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(t,e){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=function(t){var e=t.toUpperCase();return m.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.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"!==e.cache&&"no-cache"!==e.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 S(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}})),e}function w(t,e){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},g.call(b.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var k=[301,302,303,307,308];w.redirect=function(t,e){if(-1===k.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})};var E=e.DOMException;try{new E}catch(t){(E=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),E.prototype.constructor=E}function B(t,n){return new Promise((function(r,i){var a=new b(t,n);if(a.signal&&a.signal.aborted)return i(new E("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var t,e,n={status:u.status,statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}})),e)};n.url="responseURL"in u?u.responseURL:n.headers.get("X-Request-URL");var o="response"in u?u.response:u.responseText;setTimeout((function(){r(new w(o,n))}),0)},u.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){i(new E("Aborted","AbortError"))}),0)},u.open(a.method,function(t){try{return""===t&&e.location.href?e.location.href:t}catch(e){return t}}(a.url),!0),"include"===a.credentials?u.withCredentials=!0:"omit"===a.credentials&&(u.withCredentials=!1),"responseType"in u&&(o?u.responseType="blob":s&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof h?a.headers.forEach((function(t,e){u.setRequestHeader(e,t)})):Object.getOwnPropertyNames(n.headers).forEach((function(t){u.setRequestHeader(t,c(n.headers[t]))})),a.signal&&(a.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&a.signal.removeEventListener("abort",l)}),u.send(void 0===a._bodyInit?null:a._bodyInit)}))}B.polyfill=!0,e.fetch||(e.fetch=B,e.Headers=h,e.Request=b,e.Response=w);var x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},P=function(t){return t&&t.Math==Math&&t},L=P("object"==typeof globalThis&&globalThis)||P("object"==typeof window&&window)||P("object"==typeof self&&self)||P("object"==typeof x&&x)||function(){return this}()||Function("return this")(),_={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},O="object"==typeof document&&document.all,A={all:O,IS_HTMLDDA:void 0===O&&void 0!==O},C=A.all,V=A.IS_HTMLDDA?function(t){return"function"==typeof t||t===C}:function(t){return"function"==typeof t},D=V,M=A.all,T=A.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:D(t)||t===M}:function(t){return"object"==typeof t?null!==t:D(t)},I=T,R=L.document,j=I(R)&&I(R.createElement),N=function(t){return j?R.createElement(t):{}},K=N("span").classList,F=K&&K.constructor&&K.constructor.prototype,G=F===Object.prototype?void 0:F,U=function(t){try{return!!t()}catch(t){return!0}},H=!U((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),z=H,q=Function.prototype,W=q.call,X=z&&q.bind.bind(W,W),Y=z?X:function(t){return function(){return W.apply(t,arguments)}},J=Y,$=J({}.toString),Q=J("".slice),Z=function(t){return Q($(t),8,-1)},tt=Z,et=Y,nt=function(t){if("Function"===tt(t))return et(t)},rt=String,ot=function(t){try{return rt(t)}catch(t){return"Object"}},it=V,st=ot,at=TypeError,ut=function(t){if(it(t))return t;throw at(st(t)+" is not a function")},lt=ut,ct=H,dt=nt(nt.bind),ht=function(t,e){return lt(t),void 0===e?t:ct?dt(t,e):function(){return t.apply(e,arguments)}},ft=U,pt=Z,vt=Object,yt=Y("".split),gt=ft((function(){return!vt("z").propertyIsEnumerable(0)}))?function(t){return"String"==pt(t)?yt(t,""):vt(t)}:vt,mt=function(t){return null==t},bt=mt,St=TypeError,wt=function(t){if(bt(t))throw St("Can't call method on "+t);return t},kt=wt,Et=Object,Bt=function(t){return Et(kt(t))},xt=Math.ceil,Pt=Math.floor,Lt=Math.trunc||function(t){var e=+t;return(e>0?Pt:xt)(e)},_t=Lt,Ot=function(t){var e=+t;return e!=e||0===e?0:_t(e)},At=Ot,Ct=Math.min,Vt=function(t){return t>0?Ct(At(t),9007199254740991):0},Dt=function(t){return Vt(t.length)},Mt=Z,Tt=Array.isArray||function(t){return"Array"==Mt(t)},It={exports:{}},Rt=L,jt=Object.defineProperty,Nt=function(t,e){try{jt(Rt,t,{value:e,configurable:!0,writable:!0})}catch(n){Rt[t]=e}return e},Kt=Nt,Ft="__core-js_shared__",Gt=L[Ft]||Kt(Ft,{}),Ut=Gt;(It.exports=function(t,e){return Ut[t]||(Ut[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.28.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.28.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ht,zt,qt=It.exports,Wt=Bt,Xt=Y({}.hasOwnProperty),Yt=Object.hasOwn||function(t,e){return Xt(Wt(t),e)},Jt=Y,$t=0,Qt=Math.random(),Zt=Jt(1..toString),te=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Zt(++$t+Qt,36)},ee="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ne=L,re=ee,oe=ne.process,ie=ne.Deno,se=oe&&oe.versions||ie&&ie.version,ae=se&&se.v8;ae&&(zt=(Ht=ae.split("."))[0]>0&&Ht[0]<4?1:+(Ht[0]+Ht[1])),!zt&&re&&(!(Ht=re.match(/Edge\/(\d+)/))||Ht[1]>=74)&&(Ht=re.match(/Chrome\/(\d+)/))&&(zt=+Ht[1]);var ue=zt,le=ue,ce=U,de=!!Object.getOwnPropertySymbols&&!ce((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&le&&le<41})),he=de&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fe=qt,pe=Yt,ve=te,ye=de,ge=he,me=L.Symbol,be=fe("wks"),Se=ge?me.for||me:me&&me.withoutSetter||ve,we=function(t){return pe(be,t)||(be[t]=ye&&pe(me,t)?me[t]:Se("Symbol."+t)),be[t]},ke={};ke[we("toStringTag")]="z";var Ee="[object z]"===String(ke),Be=Ee,xe=V,Pe=Z,Le=we("toStringTag"),_e=Object,Oe="Arguments"==Pe(function(){return arguments}()),Ae=Be?Pe:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=_e(t),Le))?n:Oe?Pe(e):"Object"==(r=Pe(e))&&xe(e.callee)?"Arguments":r},Ce=L,Ve=V,De=function(t,e){return arguments.length<2?(n=Ce[t],Ve(n)?n:void 0):Ce[t]&&Ce[t][e];var n},Me=V,Te=Gt,Ie=Y(Function.toString);Me(Te.inspectSource)||(Te.inspectSource=function(t){return Ie(t)});var Re=Te.inspectSource,je=Y,Ne=U,Ke=V,Fe=Ae,Ge=Re,Ue=function(){},He=[],ze=De("Reflect","construct"),qe=/^\s*(?:class|function)\b/,We=je(qe.exec),Xe=!qe.exec(Ue),Ye=function(t){if(!Ke(t))return!1;try{return ze(Ue,He,t),!0}catch(t){return!1}},Je=function(t){if(!Ke(t))return!1;switch(Fe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Xe||!!We(qe,Ge(t))}catch(t){return!0}};Je.sham=!0;var $e=!ze||Ne((function(){var t;return Ye(Ye.call)||!Ye(Object)||!Ye((function(){t=!0}))||t}))?Je:Ye,Qe=Tt,Ze=$e,tn=T,en=we("species"),nn=Array,rn=function(t){var e;return Qe(t)&&(e=t.constructor,(Ze(e)&&(e===nn||Qe(e.prototype))||tn(e)&&null===(e=e[en]))&&(e=void 0)),void 0===e?nn:e},on=function(t,e){return new(rn(t))(0===e?0:e)},sn=ht,an=gt,un=Bt,ln=Dt,cn=on,dn=Y([].push),hn=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,s=7==t,a=5==t||i;return function(u,l,c,d){for(var h,f,p=un(u),v=an(p),y=sn(l,c),g=ln(v),m=0,b=d||cn,S=e?b(u,g):n||s?b(u,0):void 0;g>m;m++)if((a||m in v)&&(f=y(h=v[m],m,p),t))if(e)S[m]=f;else if(f)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:dn(S,h)}else switch(t){case 4:return!1;case 7:dn(S,h)}return i?-1:r||o?o:S}},fn={forEach:hn(0),map:hn(1),filter:hn(2),some:hn(3),every:hn(4),find:hn(5),findIndex:hn(6),filterReject:hn(7)},pn=U,vn=function(t,e){var n=[][t];return!!n&&pn((function(){n.call(null,e||function(){return 1},1)}))},yn=fn.forEach,gn=vn("forEach")?[].forEach:function(t){return yn(this,t,arguments.length>1?arguments[1]:void 0)},mn=!U((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),bn={},Sn=N,wn=!mn&&!U((function(){return 7!=Object.defineProperty(Sn("div"),"a",{get:function(){return 7}}).a})),kn=mn&&U((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),En=T,Bn=String,xn=TypeError,Pn=function(t){if(En(t))return t;throw xn(Bn(t)+" is not an object")},Ln=H,_n=Function.prototype.call,On=Ln?_n.bind(_n):function(){return _n.apply(_n,arguments)},An=Y({}.isPrototypeOf),Cn=De,Vn=V,Dn=An,Mn=Object,Tn=he?function(t){return"symbol"==typeof t}:function(t){var e=Cn("Symbol");return Vn(e)&&Dn(e.prototype,Mn(t))},In=ut,Rn=mt,jn=function(t,e){var n=t[e];return Rn(n)?void 0:In(n)},Nn=On,Kn=V,Fn=T,Gn=TypeError,Un=On,Hn=T,zn=Tn,qn=jn,Wn=function(t,e){var n,r;if("string"===e&&Kn(n=t.toString)&&!Fn(r=Nn(n,t)))return r;if(Kn(n=t.valueOf)&&!Fn(r=Nn(n,t)))return r;if("string"!==e&&Kn(n=t.toString)&&!Fn(r=Nn(n,t)))return r;throw Gn("Can't convert object to primitive value")},Xn=TypeError,Yn=we("toPrimitive"),Jn=function(t,e){if(!Hn(t)||zn(t))return t;var n,r=qn(t,Yn);if(r){if(void 0===e&&(e="default"),n=Un(r,t,e),!Hn(n)||zn(n))return n;throw Xn("Can't convert object to primitive value")}return void 0===e&&(e="number"),Wn(t,e)},$n=Jn,Qn=Tn,Zn=function(t){var e=$n(t,"string");return Qn(e)?e:e+""},tr=mn,er=wn,nr=kn,rr=Pn,or=Zn,ir=TypeError,sr=Object.defineProperty,ar=Object.getOwnPropertyDescriptor,ur="enumerable",lr="configurable",cr="writable";bn.f=tr?nr?function(t,e,n){if(rr(t),e=or(e),rr(n),"function"==typeof t&&"prototype"===e&&"value"in n&&cr in n&&!n[cr]){var r=ar(t,e);r&&r[cr]&&(t[e]=n.value,n={configurable:lr in n?n[lr]:r[lr],enumerable:ur in n?n[ur]:r[ur],writable:!1})}return sr(t,e,n)}:sr:function(t,e,n){if(rr(t),e=or(e),rr(n),er)try{return sr(t,e,n)}catch(t){}if("get"in n||"set"in n)throw ir("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var dr=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},hr=bn,fr=dr,pr=mn?function(t,e,n){return hr.f(t,e,fr(1,n))}:function(t,e,n){return t[e]=n,t},vr=L,yr=_,gr=G,mr=gn,br=pr,Sr=function(t){if(t&&t.forEach!==mr)try{br(t,"forEach",mr)}catch(e){t.forEach=mr}};for(var wr in yr)yr[wr]&&Sr(vr[wr]&&vr[wr].prototype);Sr(gr);var kr=gt,Er=wt,Br=function(t){return kr(Er(t))},xr={},Pr=Ot,Lr=Math.max,_r=Math.min,Or=function(t,e){var n=Pr(t);return n<0?Lr(n+e,0):_r(n,e)},Ar=Br,Cr=Or,Vr=Dt,Dr=function(t){return function(e,n,r){var o,i=Ar(e),s=Vr(i),a=Cr(r,s);if(t&&n!=n){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},Mr={includes:Dr(!0),indexOf:Dr(!1)},Tr={},Ir=Yt,Rr=Br,jr=Mr.indexOf,Nr=Tr,Kr=Y([].push),Fr=function(t,e){var n,r=Rr(t),o=0,i=[];for(n in r)!Ir(Nr,n)&&Ir(r,n)&&Kr(i,n);for(;e.length>o;)Ir(r,n=e[o++])&&(~jr(i,n)||Kr(i,n));return i},Gr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ur=Fr,Hr=Gr,zr=Object.keys||function(t){return Ur(t,Hr)},qr=mn,Wr=kn,Xr=bn,Yr=Pn,Jr=Br,$r=zr;xr.f=qr&&!Wr?Object.defineProperties:function(t,e){Yr(t);for(var n,r=Jr(e),o=$r(e),i=o.length,s=0;i>s;)Xr.f(t,n=o[s++],r[n]);return t};var Qr,Zr=De("document","documentElement"),to=te,eo=qt("keys"),no=function(t){return eo[t]||(eo[t]=to(t))},ro=Pn,oo=xr,io=Gr,so=Tr,ao=Zr,uo=N,lo="prototype",co="script",ho=no("IE_PROTO"),fo=function(){},po=function(t){return"<"+co+">"+t+"</"+co+">"},vo=function(t){t.write(po("")),t.close();var e=t.parentWindow.Object;return t=null,e},yo=function(){try{Qr=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;yo="undefined"!=typeof document?document.domain&&Qr?vo(Qr):(e=uo("iframe"),n="java"+co+":",e.style.display="none",ao.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(po("document.F=Object")),t.close(),t.F):vo(Qr);for(var r=io.length;r--;)delete yo[lo][io[r]];return yo()};so[ho]=!0;var go=Object.create||function(t,e){var n;return null!==t?(fo[lo]=ro(t),n=new fo,fo[lo]=null,n[ho]=t):n=yo(),void 0===e?n:oo.f(n,e)},mo=we,bo=go,So=bn.f,wo=mo("unscopables"),ko=Array.prototype;null==ko[wo]&&So(ko,wo,{configurable:!0,value:bo(null)});var Eo,Bo,xo,Po=function(t){ko[wo][t]=!0},Lo={},_o=V,Oo=L.WeakMap,Ao=_o(Oo)&&/native code/.test(String(Oo)),Co=L,Vo=T,Do=pr,Mo=Yt,To=Gt,Io=no,Ro=Tr,jo="Object already initialized",No=Co.TypeError,Ko=Co.WeakMap;if(Ao||To.state){var Fo=To.state||(To.state=new Ko);Fo.get=Fo.get,Fo.has=Fo.has,Fo.set=Fo.set,Eo=function(t,e){if(Fo.has(t))throw No(jo);return e.facade=t,Fo.set(t,e),e},Bo=function(t){return Fo.get(t)||{}},xo=function(t){return Fo.has(t)}}else{var Go=Io("state");Ro[Go]=!0,Eo=function(t,e){if(Mo(t,Go))throw No(jo);return e.facade=t,Do(t,Go,e),e},Bo=function(t){return Mo(t,Go)?t[Go]:{}},xo=function(t){return Mo(t,Go)}}var Uo={set:Eo,get:Bo,has:xo,enforce:function(t){return xo(t)?Bo(t):Eo(t,{})},getterFor:function(t){return function(e){var n;if(!Vo(e)||(n=Bo(e)).type!==t)throw No("Incompatible receiver, "+t+" required");return n}}},Ho={},zo={},qo={}.propertyIsEnumerable,Wo=Object.getOwnPropertyDescriptor,Xo=Wo&&!qo.call({1:2},1);zo.f=Xo?function(t){var e=Wo(this,t);return!!e&&e.enumerable}:qo;var Yo=mn,Jo=On,$o=zo,Qo=dr,Zo=Br,ti=Zn,ei=Yt,ni=wn,ri=Object.getOwnPropertyDescriptor;Ho.f=Yo?ri:function(t,e){if(t=Zo(t),e=ti(e),ni)try{return ri(t,e)}catch(t){}if(ei(t,e))return Qo(!Jo($o.f,t,e),t[e])};var oi={exports:{}},ii=mn,si=Yt,ai=Function.prototype,ui=ii&&Object.getOwnPropertyDescriptor,li=si(ai,"name"),ci={EXISTS:li,PROPER:li&&"something"===function(){}.name,CONFIGURABLE:li&&(!ii||ii&&ui(ai,"name").configurable)},di=Y,hi=U,fi=V,pi=Yt,vi=mn,yi=ci.CONFIGURABLE,gi=Re,mi=Uo.enforce,bi=Uo.get,Si=String,wi=Object.defineProperty,ki=di("".slice),Ei=di("".replace),Bi=di([].join),xi=vi&&!hi((function(){return 8!==wi((function(){}),"length",{value:8}).length})),Pi=String(String).split("String"),Li=oi.exports=function(t,e,n){"Symbol("===ki(Si(e),0,7)&&(e="["+Ei(Si(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!pi(t,"name")||yi&&t.name!==e)&&(vi?wi(t,"name",{value:e,configurable:!0}):t.name=e),xi&&n&&pi(n,"arity")&&t.length!==n.arity&&wi(t,"length",{value:n.arity});try{n&&pi(n,"constructor")&&n.constructor?vi&&wi(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=mi(t);return pi(r,"source")||(r.source=Bi(Pi,"string"==typeof e?e:"")),t};Function.prototype.toString=Li((function(){return fi(this)&&bi(this).source||gi(this)}),"toString");var _i=oi.exports,Oi=V,Ai=bn,Ci=_i,Vi=Nt,Di=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(Oi(n)&&Ci(n,i,r),r.global)o?t[e]=n:Vi(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Ai.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Mi={},Ti=Fr,Ii=Gr.concat("length","prototype");Mi.f=Object.getOwnPropertyNames||function(t){return Ti(t,Ii)};var Ri={};Ri.f=Object.getOwnPropertySymbols;var ji,Ni,Ki,Fi=De,Gi=Mi,Ui=Ri,Hi=Pn,zi=Y([].concat),qi=Fi("Reflect","ownKeys")||function(t){var e=Gi.f(Hi(t)),n=Ui.f;return n?zi(e,n(t)):e},Wi=Yt,Xi=qi,Yi=Ho,Ji=bn,$i=U,Qi=V,Zi=/#|\.prototype\./,ts=function(t,e){var n=ns[es(t)];return n==os||n!=rs&&(Qi(e)?$i(e):!!e)},es=ts.normalize=function(t){return String(t).replace(Zi,".").toLowerCase()},ns=ts.data={},rs=ts.NATIVE="N",os=ts.POLYFILL="P",is=ts,ss=L,as=Ho.f,us=pr,ls=Di,cs=Nt,ds=function(t,e,n){for(var r=Xi(e),o=Ji.f,i=Yi.f,s=0;s<r.length;s++){var a=r[s];Wi(t,a)||n&&Wi(n,a)||o(t,a,i(e,a))}},hs=is,fs=function(t,e){var n,r,o,i,s,a=t.target,u=t.global,l=t.stat;if(n=u?ss:l?ss[a]||cs(a,{}):(ss[a]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(s=as(n,r))&&s.value:n[r],!hs(u?r:a+(l?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;ds(i,o)}(t.sham||o&&o.sham)&&us(i,"sham",!0),ls(n,r,i,t)}},ps=!U((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),vs=Yt,ys=V,gs=Bt,ms=ps,bs=no("IE_PROTO"),Ss=Object,ws=Ss.prototype,ks=ms?Ss.getPrototypeOf:function(t){var e=gs(t);if(vs(e,bs))return e[bs];var n=e.constructor;return ys(n)&&e instanceof n?n.prototype:e instanceof Ss?ws:null},Es=U,Bs=V,xs=T,Ps=ks,Ls=Di,_s=we("iterator"),Os=!1;[].keys&&("next"in(Ki=[].keys())?(Ni=Ps(Ps(Ki)))!==Object.prototype&&(ji=Ni):Os=!0);var As=!xs(ji)||Es((function(){var t={};return ji[_s].call(t)!==t}));As&&(ji={}),Bs(ji[_s])||Ls(ji,_s,(function(){return this}));var Cs={IteratorPrototype:ji,BUGGY_SAFARI_ITERATORS:Os},Vs=bn.f,Ds=Yt,Ms=we("toStringTag"),Ts=function(t,e,n){t&&!n&&(t=t.prototype),t&&!Ds(t,Ms)&&Vs(t,Ms,{configurable:!0,value:e})},Is=Cs.IteratorPrototype,Rs=go,js=dr,Ns=Ts,Ks=Lo,Fs=function(){return this},Gs=Y,Us=ut,Hs=V,zs=String,qs=TypeError,Ws=function(t,e,n){try{return Gs(Us(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}},Xs=Pn,Ys=function(t){if("object"==typeof t||Hs(t))return t;throw qs("Can't set "+zs(t)+" as a prototype")},Js=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Ws(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Xs(n),Ys(r),e?t(n,r):n.__proto__=r,n}}():void 0),$s=fs,Qs=On,Zs=V,ta=function(t,e,n,r){var o=e+" Iterator";return t.prototype=Rs(Is,{next:js(+!r,n)}),Ns(t,o,!1),Ks[o]=Fs,t},ea=ks,na=Js,ra=Ts,oa=pr,ia=Di,sa=Lo,aa=ci.PROPER,ua=ci.CONFIGURABLE,la=Cs.IteratorPrototype,ca=Cs.BUGGY_SAFARI_ITERATORS,da=we("iterator"),ha="keys",fa="values",pa="entries",va=function(){return this},ya=function(t,e,n,r,o,i,s){ta(n,e,r);var a,u,l,c=function(t){if(t===o&&v)return v;if(!ca&&t in f)return f[t];switch(t){case ha:case fa:case pa:return function(){return new n(this,t)}}return function(){return new n(this)}},d=e+" Iterator",h=!1,f=t.prototype,p=f[da]||f["@@iterator"]||o&&f[o],v=!ca&&p||c(o),y="Array"==e&&f.entries||p;if(y&&(a=ea(y.call(new t)))!==Object.prototype&&a.next&&(ea(a)!==la&&(na?na(a,la):Zs(a[da])||ia(a,da,va)),ra(a,d,!0)),aa&&o==fa&&p&&p.name!==fa&&(ua?oa(f,"name",fa):(h=!0,v=function(){return Qs(p,this)})),o)if(u={values:c(fa),keys:i?v:c(ha),entries:c(pa)},s)for(l in u)(ca||h||!(l in f))&&ia(f,l,u[l]);else $s({target:e,proto:!0,forced:ca||h},u);return f[da]!==v&&ia(f,da,v,{name:o}),sa[e]=v,u},ga=function(t,e){return{value:t,done:e}},ma=Br,ba=Po,Sa=Lo,wa=Uo,ka=bn.f,Ea=ya,Ba=ga,xa=mn,Pa="Array Iterator",La=wa.set,_a=wa.getterFor(Pa),Oa=Ea(Array,"Array",(function(t,e){La(this,{type:Pa,target:ma(t),index:0,kind:e})}),(function(){var t=_a(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,Ba(void 0,!0)):Ba("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),Aa=Sa.Arguments=Sa.Array;if(ba("keys"),ba("values"),ba("entries"),xa&&"values"!==Aa.name)try{ka(Aa,"name",{value:"values"})}catch(t){}var Ca=L,Va=_,Da=G,Ma=Oa,Ta=pr,Ia=we,Ra=Ia("iterator"),ja=Ia("toStringTag"),Na=Ma.values,Ka=function(t,e){if(t){if(t[Ra]!==Na)try{Ta(t,Ra,Na)}catch(e){t[Ra]=Na}if(t[ja]||Ta(t,ja,e),Va[e])for(var n in Ma)if(t[n]!==Ma[n])try{Ta(t,n,Ma[n])}catch(e){t[n]=Ma[n]}}};for(var Fa in Va)Ka(Ca[Fa]&&Ca[Fa].prototype,Fa);Ka(Da,"DOMTokenList");var Ga=L;function Ua(){Ua=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof h?e:h,s=Object.create(i.prototype),a=new x(o||[]);return r(s,"_invoke",{value:w(t,n,a)}),s}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var d={};function h(){}function f(){}function p(){}var v={};u(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(P([])));g&&g!==e&&n.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function o(r,i,s,a){var u=c(t[r],t,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,s,a)}),(function(t){o("throw",t,s,a)})):e.resolve(d).then((function(t){l.value=t,s(l)}),(function(t){return o("throw",t,s,a)}))}a(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return L()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=k(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=c(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function B(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=p,r(m,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:f,configurable:!0}),f.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(S.prototype),u(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new S(l(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(m),u(m,a,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=P,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(B),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),B(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;B(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function Ha(t){return Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(t)}function za(t,e,n,r,o,i,s){try{var a=t[i](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}function qa(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){za(i,r,o,s,a,"next",t)}function a(t){za(i,r,o,s,a,"throw",t)}s(void 0)}))}}function Wa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=r.key,i=void 0,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"))?i:String(i)),r)}var o,i}function Ya(t,e,n){return e&&Xa(t.prototype,e),n&&Xa(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ja(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qa(t,e)}function $a(t){return $a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$a(t)}function Qa(t,e){return Qa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qa(t,e)}function Za(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tu(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Za(t)}function eu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=$a(t);if(e){var o=$a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tu(this,n)}}function nu(t){return function(t){if(Array.isArray(t))return ou(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ru(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ru(t,e){if(t){if("string"==typeof t)return ou(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ou(t,e):void 0}}function ou(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function iu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ru(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}var su=fs,au=Mr.indexOf,uu=vn,lu=nt([].indexOf),cu=!!lu&&1/lu([1],1,-0)<0;su({target:"Array",proto:!0,forced:cu||!uu("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return cu?lu(this,t,e)||0:au(this,t,e)}});var du=TypeError,hu=Zn,fu=bn,pu=dr,vu=function(t,e,n){var r=hu(e);r in t?fu.f(t,r,pu(0,n)):t[r]=n},yu=U,gu=ue,mu=we("species"),bu=function(t){return gu>=51||!yu((function(){var e=[];return(e.constructor={})[mu]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Su=fs,wu=U,ku=Tt,Eu=T,Bu=Bt,xu=Dt,Pu=function(t){if(t>9007199254740991)throw du("Maximum allowed index exceeded");return t},Lu=vu,_u=on,Ou=bu,Au=ue,Cu=we("isConcatSpreadable"),Vu=Au>=51||!wu((function(){var t=[];return t[Cu]=!1,t.concat()[0]!==t})),Du=function(t){if(!Eu(t))return!1;var e=t[Cu];return void 0!==e?!!e:ku(t)};Su({target:"Array",proto:!0,arity:1,forced:!Vu||!Ou("concat")},{concat:function(t){var e,n,r,o,i,s=Bu(this),a=_u(s,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Du(i=-1===e?s:arguments[e]))for(o=xu(i),Pu(u+o),n=0;n<o;n++,u++)n in i&&Lu(a,u,i[n]);else Pu(u+1),Lu(a,u++,i);return a.length=u,a}});var Mu=mn,Tu=Y,Iu=On,Ru=U,ju=zr,Nu=Ri,Ku=zo,Fu=Bt,Gu=gt,Uu=Object.assign,Hu=Object.defineProperty,zu=Tu([].concat),qu=!Uu||Ru((function(){if(Mu&&1!==Uu({b:1},Uu(Hu({},"a",{enumerable:!0,get:function(){Hu(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Uu({},t)[n]||ju(Uu({},e)).join("")!=r}))?function(t,e){for(var n=Fu(t),r=arguments.length,o=1,i=Nu.f,s=Ku.f;r>o;)for(var a,u=Gu(arguments[o++]),l=i?zu(ju(u),i(u)):ju(u),c=l.length,d=0;c>d;)a=l[d++],Mu&&!Iu(s,u,a)||(n[a]=u[a]);return n}:Uu,Wu=qu;fs({target:"Object",stat:!0,arity:2,forced:Object.assign!==Wu},{assign:Wu});var Xu=Ae,Yu=Ee?{}.toString:function(){return"[object "+Xu(this)+"]"};Ee||Di(Object.prototype,"toString",Yu,{unsafe:!0});var Ju,$u,Qu,Zu,tl="undefined"!=typeof process&&"process"==Z(process),el=_i,nl=bn,rl=function(t,e,n){return n.get&&el(n.get,e,{getter:!0}),n.set&&el(n.set,e,{setter:!0}),nl.f(t,e,n)},ol=De,il=rl,sl=mn,al=we("species"),ul=function(t){var e=ol(t);sl&&e&&!e[al]&&il(e,al,{configurable:!0,get:function(){return this}})},ll=An,cl=TypeError,dl=function(t,e){if(ll(e,t))return t;throw cl("Incorrect invocation")},hl=$e,fl=ot,pl=TypeError,vl=Pn,yl=function(t){if(hl(t))return t;throw pl(fl(t)+" is not a constructor")},gl=mt,ml=we("species"),bl=H,Sl=Function.prototype,wl=Sl.apply,kl=Sl.call,El="object"==typeof Reflect&&Reflect.apply||(bl?kl.bind(wl):function(){return kl.apply(wl,arguments)}),Bl=Y([].slice),xl=TypeError,Pl=/(?:ipad|iphone|ipod).*applewebkit/i.test(ee),Ll=L,_l=El,Ol=ht,Al=V,Cl=Yt,Vl=U,Dl=Zr,Ml=Bl,Tl=N,Il=function(t,e){if(t<e)throw xl("Not enough arguments");return t},Rl=Pl,jl=tl,Nl=Ll.setImmediate,Kl=Ll.clearImmediate,Fl=Ll.process,Gl=Ll.Dispatch,Ul=Ll.Function,Hl=Ll.MessageChannel,zl=Ll.String,ql=0,Wl={},Xl="onreadystatechange";Vl((function(){Ju=Ll.location}));var Yl=function(t){if(Cl(Wl,t)){var e=Wl[t];delete Wl[t],e()}},Jl=function(t){return function(){Yl(t)}},$l=function(t){Yl(t.data)},Ql=function(t){Ll.postMessage(zl(t),Ju.protocol+"//"+Ju.host)};Nl&&Kl||(Nl=function(t){Il(arguments.length,1);var e=Al(t)?t:Ul(t),n=Ml(arguments,1);return Wl[++ql]=function(){_l(e,void 0,n)},$u(ql),ql},Kl=function(t){delete Wl[t]},jl?$u=function(t){Fl.nextTick(Jl(t))}:Gl&&Gl.now?$u=function(t){Gl.now(Jl(t))}:Hl&&!Rl?(Zu=(Qu=new Hl).port2,Qu.port1.onmessage=$l,$u=Ol(Zu.postMessage,Zu)):Ll.addEventListener&&Al(Ll.postMessage)&&!Ll.importScripts&&Ju&&"file:"!==Ju.protocol&&!Vl(Ql)?($u=Ql,Ll.addEventListener("message",$l,!1)):$u=Xl in Tl("script")?function(t){Dl.appendChild(Tl("script"))[Xl]=function(){Dl.removeChild(this),Yl(t)}}:function(t){setTimeout(Jl(t),0)});var Zl={set:Nl,clear:Kl},tc=function(){this.head=null,this.tail=null};tc.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var ec,nc,rc,oc,ic,sc=tc,ac=/ipad|iphone|ipod/i.test(ee)&&"undefined"!=typeof Pebble,uc=/web0s(?!.*chrome)/i.test(ee),lc=L,cc=ht,dc=Ho.f,hc=Zl.set,fc=sc,pc=Pl,vc=ac,yc=uc,gc=tl,mc=lc.MutationObserver||lc.WebKitMutationObserver,bc=lc.document,Sc=lc.process,wc=lc.Promise,kc=dc(lc,"queueMicrotask"),Ec=kc&&kc.value;if(!Ec){var Bc=new fc,xc=function(){var t,e;for(gc&&(t=Sc.domain)&&t.exit();e=Bc.get();)try{e()}catch(t){throw Bc.head&&ec(),t}t&&t.enter()};pc||gc||yc||!mc||!bc?!vc&&wc&&wc.resolve?((oc=wc.resolve(void 0)).constructor=wc,ic=cc(oc.then,oc),ec=function(){ic(xc)}):gc?ec=function(){Sc.nextTick(xc)}:(hc=cc(hc,lc),ec=function(){hc(xc)}):(nc=!0,rc=bc.createTextNode(""),new mc(xc).observe(rc,{characterData:!0}),ec=function(){rc.data=nc=!nc}),Ec=function(t){Bc.head||ec(),Bc.add(t)}}var Pc=Ec,Lc=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},_c=L.Promise,Oc="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Ac=!Oc&&!tl&&"object"==typeof window&&"object"==typeof document,Cc=L,Vc=_c,Dc=V,Mc=is,Tc=Re,Ic=we,Rc=Ac,jc=Oc,Nc=ue;Vc&&Vc.prototype;var Kc=Ic("species"),Fc=!1,Gc=Dc(Cc.PromiseRejectionEvent),Uc=Mc("Promise",(function(){var t=Tc(Vc),e=t!==String(Vc);if(!e&&66===Nc)return!0;if(!Nc||Nc<51||!/native code/.test(t)){var n=new Vc((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Kc]=r,!(Fc=n.then((function(){}))instanceof r))return!0}return!e&&(Rc||jc)&&!Gc})),Hc={CONSTRUCTOR:Uc,REJECTION_EVENT:Gc,SUBCLASSING:Fc},zc={},qc=ut,Wc=TypeError,Xc=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw Wc("Bad Promise constructor");e=t,n=r})),this.resolve=qc(e),this.reject=qc(n)};zc.f=function(t){return new Xc(t)};var Yc,Jc,$c,Qc=fs,Zc=tl,td=L,ed=On,nd=Di,rd=Js,od=Ts,id=ul,sd=ut,ad=V,ud=T,ld=dl,cd=function(t,e){var n,r=vl(t).constructor;return void 0===r||gl(n=vl(r)[ml])?e:yl(n)},dd=Zl.set,hd=Pc,fd=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}},pd=Lc,vd=sc,yd=Uo,gd=_c,md=zc,bd="Promise",Sd=Hc.CONSTRUCTOR,wd=Hc.REJECTION_EVENT,kd=Hc.SUBCLASSING,Ed=yd.getterFor(bd),Bd=yd.set,xd=gd&&gd.prototype,Pd=gd,Ld=xd,_d=td.TypeError,Od=td.document,Ad=td.process,Cd=md.f,Vd=Cd,Dd=!!(Od&&Od.createEvent&&td.dispatchEvent),Md="unhandledrejection",Td=function(t){var e;return!(!ud(t)||!ad(e=t.then))&&e},Id=function(t,e){var n,r,o,i=e.value,s=1==e.state,a=s?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{a?(s||(2===e.rejection&&Fd(e),e.rejection=1),!0===a?n=i:(c&&c.enter(),n=a(i),c&&(c.exit(),o=!0)),n===t.promise?l(_d("Promise-chain cycle")):(r=Td(n))?ed(r,n,u,l):u(n)):l(i)}catch(t){c&&!o&&c.exit(),l(t)}},Rd=function(t,e){t.notified||(t.notified=!0,hd((function(){for(var n,r=t.reactions;n=r.get();)Id(n,t);t.notified=!1,e&&!t.rejection&&Nd(t)})))},jd=function(t,e,n){var r,o;Dd?((r=Od.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),td.dispatchEvent(r)):r={promise:e,reason:n},!wd&&(o=td["on"+t])?o(r):t===Md&&fd("Unhandled promise rejection",n)},Nd=function(t){ed(dd,td,(function(){var e,n=t.facade,r=t.value;if(Kd(t)&&(e=pd((function(){Zc?Ad.emit("unhandledRejection",r,n):jd(Md,n,r)})),t.rejection=Zc||Kd(t)?2:1,e.error))throw e.value}))},Kd=function(t){return 1!==t.rejection&&!t.parent},Fd=function(t){ed(dd,td,(function(){var e=t.facade;Zc?Ad.emit("rejectionHandled",e):jd("rejectionhandled",e,t.value)}))},Gd=function(t,e,n){return function(r){t(e,r,n)}},Ud=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Rd(t,!0))},Hd=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw _d("Promise can't be resolved itself");var r=Td(e);r?hd((function(){var n={done:!1};try{ed(r,e,Gd(Hd,n,t),Gd(Ud,n,t))}catch(e){Ud(n,e,t)}})):(t.value=e,t.state=1,Rd(t,!1))}catch(e){Ud({done:!1},e,t)}}};if(Sd&&(Ld=(Pd=function(t){ld(this,Ld),sd(t),ed(Yc,this);var e=Ed(this);try{t(Gd(Hd,e),Gd(Ud,e))}catch(t){Ud(e,t)}}).prototype,(Yc=function(t){Bd(this,{type:bd,done:!1,notified:!1,parent:!1,reactions:new vd,rejection:!1,state:0,value:void 0})}).prototype=nd(Ld,"then",(function(t,e){var n=Ed(this),r=Cd(cd(this,Pd));return n.parent=!0,r.ok=!ad(t)||t,r.fail=ad(e)&&e,r.domain=Zc?Ad.domain:void 0,0==n.state?n.reactions.add(r):hd((function(){Id(r,n)})),r.promise})),Jc=function(){var t=new Yc,e=Ed(t);this.promise=t,this.resolve=Gd(Hd,e),this.reject=Gd(Ud,e)},md.f=Cd=function(t){return t===Pd||undefined===t?new Jc(t):Vd(t)},ad(gd)&&xd!==Object.prototype)){$c=xd.then,kd||nd(xd,"then",(function(t,e){var n=this;return new Pd((function(t,e){ed($c,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete xd.constructor}catch(t){}rd&&rd(xd,Ld)}Qc({global:!0,constructor:!0,wrap:!0,forced:Sd},{Promise:Pd}),od(Pd,bd,!1),id(bd);var zd=Lo,qd=we("iterator"),Wd=Array.prototype,Xd=Ae,Yd=jn,Jd=mt,$d=Lo,Qd=we("iterator"),Zd=function(t){if(!Jd(t))return Yd(t,Qd)||Yd(t,"@@iterator")||$d[Xd(t)]},th=On,eh=ut,nh=Pn,rh=ot,oh=Zd,ih=TypeError,sh=On,ah=Pn,uh=jn,lh=ht,ch=On,dh=Pn,hh=ot,fh=function(t){return void 0!==t&&(zd.Array===t||Wd[qd]===t)},ph=Dt,vh=An,yh=function(t,e){var n=arguments.length<2?oh(t):e;if(eh(n))return nh(th(n,t));throw ih(rh(t)+" is not iterable")},gh=Zd,mh=function(t,e,n){var r,o;ah(t);try{if(!(r=uh(t,"return"))){if("throw"===e)throw n;return n}r=sh(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return ah(r),n},bh=TypeError,Sh=function(t,e){this.stopped=t,this.result=e},wh=Sh.prototype,kh=function(t,e,n){var r,o,i,s,a,u,l,c=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=lh(e,c),y=function(t){return r&&mh(r,"normal",t),new Sh(!0,t)},g=function(t){return d?(dh(t),p?v(t[0],t[1],y):v(t[0],t[1])):p?v(t,y):v(t)};if(h)r=t.iterator;else if(f)r=t;else{if(!(o=gh(t)))throw bh(hh(t)+" is not iterable");if(fh(o)){for(i=0,s=ph(t);s>i;i++)if((a=g(t[i]))&&vh(wh,a))return a;return new Sh(!1)}r=yh(t,o)}for(u=h?t.next:r.next;!(l=ch(u,r)).done;){try{a=g(l.value)}catch(t){mh(r,"throw",t)}if("object"==typeof a&&a&&vh(wh,a))return a}return new Sh(!1)},Eh=we("iterator"),Bh=!1;try{var xh=0,Ph={next:function(){return{done:!!xh++}},return:function(){Bh=!0}};Ph[Eh]=function(){return this},Array.from(Ph,(function(){throw 2}))}catch(t){}var Lh=function(t,e){if(!e&&!Bh)return!1;var n=!1;try{var r={};r[Eh]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},_h=_c,Oh=Hc.CONSTRUCTOR||!Lh((function(t){_h.all(t).then(void 0,(function(){}))})),Ah=On,Ch=ut,Vh=zc,Dh=Lc,Mh=kh;fs({target:"Promise",stat:!0,forced:Oh},{all:function(t){var e=this,n=Vh.f(e),r=n.resolve,o=n.reject,i=Dh((function(){var n=Ch(e.resolve),i=[],s=0,a=1;Mh(t,(function(t){var u=s++,l=!1;a++,Ah(n,e,t).then((function(t){l||(l=!0,i[u]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise}});var Th=fs,Ih=Hc.CONSTRUCTOR,Rh=_c,jh=De,Nh=V,Kh=Di,Fh=Rh&&Rh.prototype;if(Th({target:"Promise",proto:!0,forced:Ih,real:!0},{catch:function(t){return this.then(void 0,t)}}),Nh(Rh)){var Gh=jh("Promise").prototype.catch;Fh.catch!==Gh&&Kh(Fh,"catch",Gh,{unsafe:!0})}var Uh=On,Hh=ut,zh=zc,qh=Lc,Wh=kh;fs({target:"Promise",stat:!0,forced:Oh},{race:function(t){var e=this,n=zh.f(e),r=n.reject,o=qh((function(){var o=Hh(e.resolve);Wh(t,(function(t){Uh(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var Xh=On,Yh=zc;fs({target:"Promise",stat:!0,forced:Hc.CONSTRUCTOR},{reject:function(t){var e=Yh.f(this);return Xh(e.reject,void 0,t),e.promise}});var Jh=Pn,$h=T,Qh=zc,Zh=fs,tf=Hc.CONSTRUCTOR,ef=function(t,e){if(Jh(t),$h(e)&&e.constructor===t)return e;var n=Qh.f(t);return(0,n.resolve)(e),n.promise};De("Promise"),Zh({target:"Promise",stat:!0,forced:tf},{resolve:function(t){return ef(this,t)}});var nf,rf,of=Ae,sf=String,af=function(t){if("Symbol"===of(t))throw TypeError("Cannot convert a Symbol value to a string");return sf(t)},uf=Pn,lf=function(){var t=uf(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},cf=U,df=L.RegExp,hf=cf((function(){var t=df("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),ff=hf||cf((function(){return!df("a","y").sticky})),pf={BROKEN_CARET:hf||cf((function(){var t=df("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:ff,UNSUPPORTED_Y:hf},vf=U,yf=L.RegExp,gf=vf((function(){var t=yf(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),mf=U,bf=L.RegExp,Sf=mf((function(){var t=bf("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),wf=On,kf=Y,Ef=af,Bf=lf,xf=pf,Pf=go,Lf=Uo.get,_f=gf,Of=Sf,Af=qt("native-string-replace",String.prototype.replace),Cf=RegExp.prototype.exec,Vf=Cf,Df=kf("".charAt),Mf=kf("".indexOf),Tf=kf("".replace),If=kf("".slice),Rf=(rf=/b*/g,wf(Cf,nf=/a/,"a"),wf(Cf,rf,"a"),0!==nf.lastIndex||0!==rf.lastIndex),jf=xf.BROKEN_CARET,Nf=void 0!==/()??/.exec("")[1];(Rf||Nf||jf||_f||Of)&&(Vf=function(t){var e,n,r,o,i,s,a,u=this,l=Lf(u),c=Ef(t),d=l.raw;if(d)return d.lastIndex=u.lastIndex,e=wf(Vf,d,c),u.lastIndex=d.lastIndex,e;var h=l.groups,f=jf&&u.sticky,p=wf(Bf,u),v=u.source,y=0,g=c;if(f&&(p=Tf(p,"y",""),-1===Mf(p,"g")&&(p+="g"),g=If(c,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Df(c,u.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),n=new RegExp("^(?:"+v+")",p)),Nf&&(n=new RegExp("^"+v+"$(?!\\s)",p)),Rf&&(r=u.lastIndex),o=wf(Cf,f?n:u,g),f?o?(o.input=If(o.input,y),o[0]=If(o[0],y),o.index=u.lastIndex,u.lastIndex+=o[0].length):u.lastIndex=0:Rf&&o&&(u.lastIndex=u.global?o.index+o[0].length:r),Nf&&o&&o.length>1&&wf(Af,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&h)for(o.groups=s=Pf(null),i=0;i<h.length;i++)s[(a=h[i])[0]]=o[a[1]];return o});fs({target:"RegExp",proto:!0,forced:/./.exec!==Vf},{exec:Vf});var Kf=function(){function t(){Wa(this,t)}return Ya(t,null,[{key:"webgl",get:function(){var t=document.createElement("canvas");return!(!t||!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}},{key:"canvas",get:function(){var t=document.createElement("canvas");return!(null===t||!t.getContext||!t.getContext("2d"))}},{key:"webaudio",get:function(){return"webkitAudioContext"in window||"AudioContext"in window}},{key:"htmlAudio",get:function(){return"HTMLAudioElement"in window}},{key:"websockets",get:function(){return"WebSocket"in window||"MozWebSocket"in window}},{key:"geolocation",get:function(){return"geolocation"in navigator}},{key:"webworkers",get:function(){return"function"==typeof Worker}},{key:"touch",get:function(){return!!("ontouchstart"in window||navigator.msPointerEnabled&&navigator.msMaxTouchPoints>0||navigator.pointerEnabled&&navigator.maxTouchPoints>0)}},{key:"basic",value:function(){return t.canvas?t.webaudio||t.htmlAudio?null:"Browser does not support WebAudio or HTMLAudio":"Browser does not support canvas"}},{key:"test",value:function(e){var n=this.basic();if(n)return n;var r=e.features,o=e.ui,i=e.sizes;for(var s in r)if(!0===r[s]&&!t[s])return"Browser does not support "+s;if(!o.touch&&t.touch)return"Game does not support touch input";var a=Math.max(window.screen.width,window.screen.height);return!i.xsmall&&a<480?"Game doesn't support extra small screens":!i.small&&a<768?"Game doesn't support small screens":!i.medium&&a<992?"Game doesn't support medium screens":!i.large&&a<1200?"Game doesn't support large screens":!i.xlarge&&a>=1200?"Game doesn't support extra large screens":null}},{key:"info",get:function(){return"Browser Feature Detection\n\t\t\t\tCanvas support ".concat(t.canvas?"✓":"×","\n\t\t\t\tWebGL support ").concat(t.webgl?"✓":"×","\n\t\t\t\tWebAudio support ").concat(t.webAudio?"✓":"×")}}]),t}(),Ff=Y,Gf=Ot,Uf=af,Hf=wt,zf=Ff("".charAt),qf=Ff("".charCodeAt),Wf=Ff("".slice),Xf=function(t){return function(e,n){var r,o,i=Uf(Hf(e)),s=Gf(n),a=i.length;return s<0||s>=a?t?"":void 0:(r=qf(i,s))<55296||r>56319||s+1===a||(o=qf(i,s+1))<56320||o>57343?t?zf(i,s):r:t?Wf(i,s,s+2):o-56320+(r-55296<<10)+65536}},Yf={codeAt:Xf(!1),charAt:Xf(!0)}.charAt,Jf=af,$f=Uo,Qf=ya,Zf=ga,tp="String Iterator",ep=$f.set,np=$f.getterFor(tp);Qf(String,"String",(function(t){ep(this,{type:tp,string:Jf(t),index:0})}),(function(){var t,e=np(this),n=e.string,r=e.index;return r>=n.length?Zf(void 0,!0):(t=Yf(n,r),e.index+=t.length,Zf(t,!1))}));var rp=fn.filter;fs({target:"Array",proto:!0,forced:!bu("filter")},{filter:function(t){return rp(this,t,arguments.length>1?arguments[1]:void 0)}});var op=fs,ip=fn.find,sp=Po,ap="find",up=!0;function lp(t,e){return t(e={exports:{}},e.exports),e.exports}ap in[]&&Array(1)[ap]((function(){up=!1})),op({target:"Array",proto:!0,forced:up},{find:function(t){return ip(this,t,arguments.length>1?arguments[1]:void 0)}}),sp(ap);var cp=lp((function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(r){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n})),dp=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function hp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var fp=function(t,e,n){return e&&hp(t.prototype,e),n&&hp(t,n),t},pp=function(){function t(){dp(this,t),this._listeners={}}return fp(t,[{key:"on",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._listeners[t]||(this._listeners[t]=[]),e._priority=parseInt(n)||0,-1===this._listeners[t].indexOf(e)&&(this._listeners[t].push(e),this._listeners[t].length>1&&this._listeners[t].sort(this.listenerSorter))}},{key:"listenerSorter",value:function(t,e){return t._priority-e._priority}},{key:"off",value:function(t,e){if(void 0!==this._listeners[t])if(void 0!==e){var n=this._listeners[t].indexOf(e);-1<n&&this._listeners[t].splice(n,1)}else delete this._listeners[t]}},{key:"trigger",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t&&(t={type:t,data:"object"===cp(e)&&null!==e?e:{}}),void 0!==this._listeners[t.type])for(var n=this._listeners[t.type].length-1;n>=0;n--)this._listeners[t.type][n](t)}},{key:"destroy",value:function(){this._listeners={}}}]),t}(),vp=lp((function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(t,e,n,r){var o=e&&e.prototype instanceof v?e:v,i=Object.create(o.prototype),s=new L(r||[]);return i._invoke=function(t,e,n){var r=c;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=B(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===c)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?f:d,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=f,n.method="throw",n.arg=u.arg)}}}(t,n,s),i}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c="suspendedStart",d="suspendedYield",h="executing",f="completed",p={};function v(){}function y(){}function g(){}var m={};m[i]=function(){return this};var b=Object.getPrototypeOf,S=b&&b(b(_([])));S&&S!==n&&r.call(S,i)&&(m=S);var w=g.prototype=v.prototype=Object.create(m);function k(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function E(t){function e(n,o,i,s){var a=l(t[n],t,o);if("throw"!==a.type){var u=a.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(t){e("next",t,i,s)}),(function(t){e("throw",t,i,s)})):Promise.resolve(c).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,s)}))}s(a.arg)}var n;this._invoke=function(t,r){function o(){return new Promise((function(n,o){e(t,r,n,o)}))}return n=n?n.then(o,o):o()}}function B(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,B(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,p;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function _(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return s.next=s}}return{next:O}}function O(){return{value:e,done:!0}}return y.prototype=w.constructor=g,g.constructor=y,g[a]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},k(E.prototype),E.prototype[s]=function(){return this},t.AsyncIterator=E,t.async=function(e,n,r,o){var i=new E(u(e,n,r,o));return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(w),w[a]="Generator",w[i]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return a.type="throw",a.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var u=r.call(s,"catchLoc"),l=r.call(s,"finallyLoc");if(u&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:_(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}})),yp=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},gp=function(t,e){return!e||"object"!==cp(e)&&"function"!=typeof e?yp(t):e},mp=lp((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),bp=lp((function(t){function e(n,r,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=e=Reflect.get:t.exports=e=function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=mp(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}},e(n,r,o||n)}t.exports=e})),Sp=lp((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e})),wp=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100*Math.random()|0;return dp(this,e),(t=gp(this,mp(e).call(this))).id="BELLHOP:".concat(n),t.connected=!1,t.isChild=!0,t.connecting=!1,t.debug=!1,t.origin="*",t._sendLater=[],t.iframe=null,t.receive=t.receive.bind(yp(t)),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sp(t,e)}(e,pp),fp(e,[{key:"receive",value:function(t){if(this.target===t.source)if(this.logDebugMessage(!0,t),"connected"===t.data)this.onConnectionReceived(t.data);else{var e=t.data;if("string"==typeof e)try{e=JSON.parse(e)}catch(t){console.warn("Bellhop error: ",t)}this.connected&&"object"===cp(e)&&e.type&&this.trigger(e)}}},{key:"onConnectionReceived",value:function(t){if(this.connecting=!1,this.connected=!0,!this.isChild){if(!this.target)return;this.target.postMessage(t,this.origin)}for(var e=0;e<this._sendLater.length;e++){var n=this._sendLater[e],r=n.type,o=n.data;this.send(r,o)}this._sendLater.length=0,this.trigger("connected")}},{key:"connect",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";this.connecting||(this.disconnect(),this.connecting=!0,t instanceof HTMLIFrameElement&&(this.iframe=t),this.isChild=void 0===t,this.supported=!0,this.isChild&&(this.supported=window!=t),this.origin=e,window.addEventListener("message",this.receive),this.isChild&&(window===this.target?this.trigger("failed"):this.target.postMessage("connected",this.origin)))}},{key:"disconnect",value:function(){this.connected=!1,this.connecting=!1,this.origin=null,this.iframe=null,this.isChild=!0,this._sendLater.length=0,window.removeEventListener("message",this.receive)}},{key:"send",value:function(t){if("string"!=typeof t)throw"The event type must be a string";var e={type:t,data:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}};this.logDebugMessage(!1,e),this.connecting?this._sendLater.push(e):this.target.postMessage(JSON.stringify(e),this.origin)}},{key:"fetch",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.connecting&&!this.connected)throw"No connection, please call connect() first";this.on(t,(function t(r){o&&n.off(r.type,t),e(r)})),this.send(t,r)}},{key:"respond",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this;this.on(t,(function t(o){return vp.async((function(i){for(;;)switch(i.prev=i.next){case 0:if(n&&r.off(o,t),"function"!=typeof e){i.next=10;break}return i.t0=r,i.t1=o.type,i.next=6,vp.awrap(e());case 6:i.t2=i.sent,i.t0.send.call(i.t0,i.t1,i.t2),i.next=11;break;case 10:r.send(o.type,e);case 11:case"end":return i.stop()}}))}))}},{key:"logDebugMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0;this.debug&&"function"==typeof this.debug?this.debug({isChild:this.isChild,received:t,message:e}):this.debug&&console.log("Bellhop Instance (".concat(this.isChild?"Child":"Parent",") ").concat(t?"Receieved":"Sent"),e)}},{key:"destroy",value:function(){bp(mp(e.prototype),"destroy",this).call(this),this.disconnect(),this._sendLater.length=0}},{key:"target",get:function(){return this.isChild?window.parent:this.iframe.contentWindow}}]),e}(),kp=function(){function t(e){var n=e.plugins,r=void 0===n?[]:n;Wa(this,t),this.client=new wp,this.preloading=!0,this.client.hidden=this.client.receive.bind(this.client),this.client.hiddenSend=this.client.send.bind(this.client),this.client.receive=function(t){this.hidden(t)}.bind(this.client),this.client.send=function(t,e){this.hiddenSend(t,e)}.bind(this.client),this.plugins=r}return Ya(t,[{key:"setupPlugins",value:function(){for(var t=this,e=[],n=function(n){if(!t.plugins[n].preload)return"continue";e.push(t.plugins[n].preload(t).catch(function(t){this.plugins[n].preloadFailed=!0,console.warn(this.plugins[n].name,"Preload Failed:",t)}.bind(t)))},r=0,o=this.plugins.length;r<o;r++)n(r);return Promise.all(e).then((function(){t.plugins=t.plugins.filter((function(t){return!0!==t.preloadFailed})),t.preloading=!1,t.client.trigger("preloadsFinished"),t.plugins.forEach((function(e){e.init&&e.init(t)})),t.plugins.forEach((function(e){e.start&&e.start(t)}))}))}},{key:"uses",value:function(t){this.plugins.push(t)}},{key:"getPlugin",value:function(t){return this.plugins.find((function(e){return e.name===t}))}}]),t}(),Ep=function(t){Ja(r,t);var e,n=eu(r);function r(t){var e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.plugins,s=o.context,a=void 0===s?{}:s;if(Wa(this,r),(e=n.call(this,{plugins:i})).iframe=t instanceof HTMLIFrameElement?t:document.querySelector(t),e.iframe.style.backgroundColor="black",null===e.iframe)throw new Error("No iframe was found with the provided selector");return e.loaded=!1,e.loading=!1,e.release=null,e._context=a,e.onLoading=e.onLoading.bind(Za(e)),e.onLoadDone=e.onLoadDone.bind(Za(e)),e.onLoadDone=e.onLoadDone.bind(Za(e)),e.onEndGame=e.onEndGame.bind(Za(e)),e.onLocalError=e.onLocalError.bind(Za(e)),e.initClient(),e.setupPlugins(),e}return Ya(r,[{key:"onLoading",value:function(){this.client.trigger("opening")}},{key:"onLoadDone",value:function(){this.loading=!1,this.loaded=!0,this.iframe.classList.remove("loading"),this.client.trigger("opened")}},{key:"onEndGame",value:function(){this.reset()}},{key:"onLocalError",value:function(t){console.error("SpringRoll Container error: ",t,(new Error).stack)}},{key:"reset",value:function(){(this.loaded||this.loading)&&this.client.trigger("closed"),this.loaded=!1,this.loading=!1,this.iframe.setAttribute("src",""),this.iframe.classList.remove("loading")}},{key:"initClient",value:function(){this.client.on("loading",this.onLoading),this.client.on("loaded",this.onLoadDone),this.client.on("loadDone",this.onLoadDone),this.client.on("endGame",this.onEndGame),this.client.on("localError",this.onLocalError),this.client.connect(this.iframe)}},{key:"_onCloseFailed",value:function(){this.reset()}},{key:"_internalOpen",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.singlePlay,o=void 0!==r&&r,i=n.playOptions,s=void 0===i?null:i;if(this.preloading)this.client.on("preloadsFinished",(function(){e._internalOpen(t,{singlePlay:o,playOptions:s})}));else{var a={singlePlay:o,playOptions:s};this.reset(),this.loading=!0,this.initClient();var u=Kf.basic();u&&(console.error("ERROR:",u),this.client.trigger("unsupported"));var l=t;if(null!==a.playOptions){var c="playOptions="+encodeURIComponent(JSON.stringify(a.playOptions));l=-1===t.indexOf("?")?"".concat(t,"?").concat(c):"".concat(t,"&").concat(c)}this.iframe.classList.add("loading"),this.iframe.setAttribute("src",l),this.client.respond("singlePlay",o),this.client.respond("playOptions",s),this.client.trigger("open")}}},{key:"openPath",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"!==Ha(e)&&(console.warn("SpringRoll Container.openPath was passed a invalid options parameter. Using default parameters instead"),e={}),this._internalOpen(t,Object.assign({singlePlay:!1,playOptions:{}},e))}},{key:"openRemote",value:(e=qa(Ua().mark((function t(e){var n,r,o,i,s,a,u,l,c,d,h,f=arguments;return Ua().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(n=f.length>1&&void 0!==f[1]?f[1]:{}).query,o=void 0===r?"":r,i=n.singlePlay,s=void 0!==i&&i,a=n.playOptions,u=void 0===a?null:a,this.release=null,t.next=4,fetch(e,{headers:{"Content-Type":"application/json"}});case 4:return l=t.sent,t.next=7,l.json();case 7:if((c=t.sent).success){t.next=10;break}throw new Error(c.error);case 10:if(d=c.data,!(h=Kf.test(d.capabilities))){t.next=15;break}throw this.client.trigger("unsupported",{error:h}),new Error(h);case 15:this.release=d,this._internalOpen(d.url+o,{singlePlay:s,playOptions:u});case 17:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"destroy",value:function(){this.reset(),this.iframe=null,this.options=null,this.release=null}},{key:"close",value:function(){this.loading||this.loaded?(this.client.trigger("close"),this.client.send("close")):this.reset()}},{key:"context",get:function(){return this._context},set:function(t){"object"===Ha(t)?this._context=t:console.error("[SpringRollContainer] Context: new context provided is not an object")}}],[{key:"version",get:function(){return"2.5.2"}}]),r}(kp),Bp=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};Wa(this,t),this._onFocus=e,this._onBlur=n,this.onFocus=function(t){this.enabled&&this._onFocus(t)}.bind(this),this.onBlur=function(t){this.enabled&&this._onBlur(t)}.bind(this),this._enabled=!1,this.enabled=!0,this.onToggle=this.onToggle.bind(this)}return Ya(t,[{key:"destroy",value:function(){this.enabled=!1,this.onToggle=null,this.onFocus=null,this.onBlur=null}},{key:"onToggle",value:function(t){this.enabled&&(document.hidden?this.onBlur(t):this.onFocus(t))}},{key:"enabled",get:function(){return this._enabled},set:function(t){this._enabled=t,document.removeEventListener("visibilitychange",this.onToggle,!1),window.removeEventListener("blur",this.onBlur,!1),window.removeEventListener("focus",this.onFocus,!1),window.removeEventListener("pagehide",this.onBlur,!1),window.removeEventListener("pageshow",this.onFocus,!1),window.removeEventListener("visibilitychange",this.onToggle,!1),this._enabled&&(document.addEventListener("visibilitychange",this.onToggle,!1),window.addEventListener("blur",this.onBlur,!1),window.addEventListener("focus",this.onFocus,!1),window.addEventListener("pagehide",this.onBlur,!1),window.addEventListener("pageshow",this.onFocus,!1),window.addEventListener("visibilitychange",this.onToggle,!1))}}]),t}(),xp=Mr.includes,Pp=Po;fs({target:"Array",proto:!0,forced:U((function(){return!Array(1).includes()}))},{includes:function(t){return xp(this,t,arguments.length>1?arguments[1]:void 0)}}),Pp("includes");var Lp="\t\n\v\f\r \u2028\u2029\ufeff",_p=wt,Op=af,Ap=Lp,Cp=Y("".replace),Vp=RegExp("^["+Ap+"]+"),Dp=RegExp("(^|[^"+Ap+"])["+Ap+"]+$"),Mp=function(t){return function(e){var n=Op(_p(e));return 1&t&&(n=Cp(n,Vp,"")),2&t&&(n=Cp(n,Dp,"$1")),n}},Tp={start:Mp(1),end:Mp(2),trim:Mp(3)},Ip=ci.PROPER,Rp=U,jp=Lp,Np=Tp.trim;fs({target:"String",proto:!0,forced:function(t){return Rp((function(){return!!jp[t]()||"
"!=="
"[t]()||Ip&&jp[t].name!==t}))}("trim")},{trim:function(){return Np(this)}});var Kp=On,Fp=Yt,Gp=An,Up=lf,Hp=RegExp.prototype,zp=ci.PROPER,qp=Di,Wp=Pn,Xp=af,Yp=U,Jp=function(t){var e=t.flags;return void 0!==e||"flags"in Hp||Fp(t,"flags")||!Gp(Hp,t)?e:Kp(Up,t)},$p="toString",Qp=RegExp.prototype[$p],Zp=Yp((function(){return"/a/b"!=Qp.call({source:"a",flags:"b"})})),tv=zp&&Qp.name!=$p;(Zp||tv)&&qp(RegExp.prototype,$p,(function(){var t=Wp(this);return"/"+Xp(t.source)+"/"+Xp(Jp(t))}),{unsafe:!0});var ev=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Wa(this,t),this.db=null,this.dbName=e}return Ya(t,[{key:"IDBOpen",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0,s=n?indexedDB.open(t,n):indexedDB.open(t);s.onsuccess=function(t){e.db=t.target.result,e.db.version==n|null==n&&i({result:"Success: IDBOpen",success:!0})},s.onerror=function(){i({result:s.error.toString(),success:!1})},s.onupgradeneeded=function(t){e.db=t.target.result,null!=r&&(r.stores&&r.stores.forEach((function(t){e.db.createObjectStore(t.storeName,t.options)})),null!=r.indexes&&r.indexes.forEach((function(t){s.transaction.objectStore(t.storeName).createIndex(t.indexName,t.keyPath,t.options)}))),null!=o&&(null!=o.indexes&&o.indexes.forEach((function(t){s.transaction.objectStore(t.storeName).deleteIndex(t.indexName)})),o.stores&&o.stores.forEach((function(t){e.db.deleteObjectStore(t.storeName)}))),i({result:"Success: IDBOpen onupgradeneeded ran",success:!0})}}},{key:"IDBDeleteDB",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null!=e?indexedDB.deleteDatabase(t,e):indexedDB.deleteDatabase(t);r.onsuccess=function(t){n({result:"Success: Database Deleted, returned: "+t.result,success:!0})},r.onerror=function(){n({result:r.error.toString(),success:!1})}}},{key:"IDBAdd",value:function(t,e,n,r){this.db||""==this.dbName||this.IDBOpen(this.dbName);var o=this.db.transaction(t,"readwrite");o.onerror=function(){return r({result:null!=o.error?o.error.toString():"Aborted: No error given, was the record already added?",success:!1})},o.onabort=function(){return r({result:null!=o.error?o.error.toString():"Aborted: No error given, was the record already added?",success:!1})},o.oncomplete=function(){return r({result:"Success: Record Added",success:!0})},o.objectStore(t).add(e,n)}},{key:"IDBUpdate",value:function(t,e,n,r){this.db||""==this.dbName||this.IDBOpen(this.dbName);var o=this.db.transaction(t,"readwrite").objectStore(t).put(n,e);o.onsuccess=function(){r({result:"Success: Record Updated",success:!0})},o.onerror=function(){return r({result:o.error.toString(),success:!1})}}},{key:"IDBRemove",value:function(t,e,n){var r=this;this.db||""==this.dbName||this.IDBOpen(this.dbName);var o=this.db.transaction(t,"readwrite");o.onerror=function(){return n({result:r.db.error.toString(),success:!1})},o.objectStore(t).delete(e),o.oncomplete=function(){return n({result:"Removed Successfully",success:!0})}}},{key:"IDBRead",value:function(t,e,n){var r=this,o=this.db.transaction(t,"readonly"),i=o.objectStore(t);o.onerror=function(){return n({result:r.db.error.toString(),success:!1})};var s=i.get(e);s.onsuccess=function(){n({result:s.result,success:null!=s.result})}}},{key:"IDBGetIndexKeys",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=this.db.transaction(t,"readonly"),a=s.objectStore(t);s.onerror=function(){return i({result:n.db.error.toString(),success:!1})},(r&&o?a.index(e,r,o):r?a.index(e,r):a.index(e)).getAllKeys().onsuccess=function(t){i({result:t.result,success:!0})}}},{key:"IDBReadAll",value:function(t,e,n){var r=this.db.transaction(t,"readonly"),o=r.objectStore(t),i=null!=e?o.getAll(null,e):o.getAll();r.onerror=function(){return n({result:r.error.toString(),success:!1})},i.onsuccess=function(){n({result:i.result,success:null!=i.result})}}},{key:"IDBGetVersion",value:function(t,e){var n=window.indexedDB.open(t);n.onerror=function(){e({result:n.error.toString(),success:!1})},n.onsuccess=function(){var t=n.result;e({result:t.version,success:!0})}}},{key:"IDBClose",value:function(t){this.db&&(this.db.close(),t({result:"Success: Closed Database Connection",success:!0}))}}],[{key:"remove",value:function(t){localStorage.removeItem(t),sessionStorage.removeItem(t)}},{key:"write",value:function(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?sessionStorage.setItem(t,JSON.stringify("function"==typeof e?e():e)):localStorage.setItem(t,JSON.stringify("function"==typeof e?e():e))}},{key:"read",value:function(t){var e=localStorage.getItem(t)||sessionStorage.getItem(t);if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(t){return e}}}]),t}(),nv=function(){function t(e){Wa(this,t),this.name=e,this.client=null}var e;return Ya(t,[{key:"preload",value:(e=qa(Ua().mark((function t(e){var n;return Ua().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.client,this.client=n;case 2:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"start",value:function(){this.client.on("loaded",this.sendAllProperties),this.client.on("loadDone",this.sendAllProperties)}},{key:"init",value:function(t){}},{key:"sendProperty",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];ev.write(t,e),n||this.client.send(t,e)}},{key:"sendAllProperties",value:function(t){}},{key:"warn",value:function(t){console.warn("[SpringRollContainer] ".concat(this.name,": ").concat(t))}}]),t}(),rv=function(t){Ja(n,t);var e=eu(n);function n(t){var r;return Wa(this,n),(r=e.call(this,t)).sendMutes=!1,r}return Ya(n,[{key:"init",value:function(t){this.sendMutes=!0}},{key:"_disableButton",value:function(t){t instanceof HTMLButtonElement&&(t.classList.remove("enabled"),t.classList.add("disabled"))}},{key:"reset",value:function(){this.sendMutes=!1}},{key:"_setMuteProp",value:function(t,e,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];console.log("_setmuteprop",t,n,o),Array.isArray(e)?e.forEach((function(t){return r.changeMutedState(t,n)})):this.changeMutedState(e,n),this.sendProperty(t,n,o)}},{key:"changeMutedState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.button?t.button:t;n instanceof HTMLElement&&(n.classList.remove("unmuted"),n.classList.remove("muted"),n.classList.add(e?"muted":"unmuted"))}}]),n}(nv),ov=T,iv=Z,sv=we("match"),av=function(t){var e;return ov(t)&&(void 0!==(e=t[sv])?!!e:"RegExp"==iv(t))},uv=TypeError,lv=we("match"),cv=fs,dv=function(t){if(av(t))throw uv("The method doesn't accept regular expressions");return t},hv=wt,fv=af,pv=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[lv]=!1,"/./"[t](e)}catch(t){}}return!1},vv=Y("".indexOf);cv({target:"String",proto:!0,forced:!pv("includes")},{includes:function(t){return!!~vv(fv(hv(this)),fv(dv(t)),arguments.length>1?arguments[1]:void 0)}});var yv={exports:{}},gv={},mv=Or,bv=Dt,Sv=vu,wv=Array,kv=Math.max,Ev=Z,Bv=Br,xv=Mi.f,Pv=function(t,e,n){for(var r=bv(t),o=mv(e,r),i=mv(void 0===n?r:n,r),s=wv(kv(i-o,0)),a=0;o<i;o++,a++)Sv(s,a,t[o]);return s.length=a,s},Lv="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];gv.f=function(t){return Lv&&"Window"==Ev(t)?function(t){try{return xv(t)}catch(t){return Pv(Lv)}}(t):xv(Bv(t))};var _v=U((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Ov=U,Av=T,Cv=Z,Vv=_v,Dv=Object.isExtensible,Mv=Ov((function(){Dv(1)}))||Vv?function(t){return!!Av(t)&&((!Vv||"ArrayBuffer"!=Cv(t))&&(!Dv||Dv(t)))}:Dv,Tv=!U((function(){return Object.isExtensible(Object.preventExtensions({}))})),Iv=fs,Rv=Y,jv=Tr,Nv=T,Kv=Yt,Fv=bn.f,Gv=Mi,Uv=gv,Hv=Mv,zv=Tv,qv=!1,Wv=te("meta"),Xv=0,Yv=function(t){Fv(t,Wv,{value:{objectID:"O"+Xv++,weakData:{}}})},Jv=yv.exports={enable:function(){Jv.enable=function(){},qv=!0;var t=Gv.f,e=Rv([].splice),n={};n[Wv]=1,t(n).length&&(Gv.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===Wv){e(r,o,1);break}return r},Iv({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Uv.f}))},fastKey:function(t,e){if(!Nv(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Kv(t,Wv)){if(!Hv(t))return"F";if(!e)return"E";Yv(t)}return t[Wv].objectID},getWeakData:function(t,e){if(!Kv(t,Wv)){if(!Hv(t))return!0;if(!e)return!1;Yv(t)}return t[Wv].weakData},onFreeze:function(t){return zv&&qv&&Hv(t)&&!Kv(t,Wv)&&Yv(t),t}};jv[Wv]=!0;var $v=yv.exports,Qv=V,Zv=T,ty=Js,ey=function(t,e,n){var r,o;return ty&&Qv(r=e.constructor)&&r!==n&&Zv(o=r.prototype)&&o!==n.prototype&&ty(t,o),t},ny=fs,ry=L,oy=Y,iy=is,sy=Di,ay=$v,uy=kh,ly=dl,cy=V,dy=mt,hy=T,fy=U,py=Lh,vy=Ts,yy=ey,gy=Di,my=go,by=rl,Sy=function(t,e,n){for(var r in e)gy(t,r,e[r],n);return t},wy=ht,ky=dl,Ey=mt,By=kh,xy=ya,Py=ga,Ly=ul,_y=mn,Oy=$v.fastKey,Ay=Uo.set,Cy=Uo.getterFor,Vy={getConstructor:function(t,e,n,r){var o=t((function(t,o){ky(t,i),Ay(t,{type:e,index:my(null),first:void 0,last:void 0,size:0}),_y||(t.size=0),Ey(o)||By(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,s=Cy(e),a=function(t,e,n){var r,o,i=s(t),a=u(t,e);return a?a.value=n:(i.last=a={index:o=Oy(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),_y?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},u=function(t,e){var n,r=s(t),o=Oy(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return Sy(i,{clear:function(){for(var t=s(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,_y?t.size=0:this.size=0},delete:function(t){var e=this,n=s(e),r=u(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),_y?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=s(this),r=wy(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),Sy(i,n?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),_y&&by(i,"size",{configurable:!0,get:function(){return s(this).size}}),o},setStrong:function(t,e,n){var r=e+" Iterator",o=Cy(e),i=Cy(r);xy(t,e,(function(t,e){Ay(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?Py("keys"==e?n.key:"values"==e?n.value:[n.key,n.value],!1):(t.target=void 0,Py(void 0,!0))}),n?"entries":"values",!n,!0),Ly(e)}};(function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",s=ry[t],a=s&&s.prototype,u=s,l={},c=function(t){var e=oy(a[t]);sy(a,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!hy(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return o&&!hy(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!hy(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(iy(t,!cy(s)||!(o||a.forEach&&!fy((function(){(new s).entries().next()})))))u=n.getConstructor(e,t,r,i),ay.enable();else if(iy(t,!0)){var d=new u,h=d[i](o?{}:-0,1)!=d,f=fy((function(){d.has(1)})),p=py((function(t){new s(t)})),v=!o&&fy((function(){for(var t=new s,e=5;e--;)t[i](e,e);return!t.has(-0)}));p||((u=e((function(t,e){ly(t,a);var n=yy(new s,t,u);return dy(e)||uy(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=u),(f||v)&&(c("delete"),c("has"),r&&c("get")),(v||h)&&c(i),o&&a.clear&&delete a.clear}l[t]=u,ny({global:!0,constructor:!0,forced:u!=s},l),vy(u,t),o||n.setStrong(u,t,r)})("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Vy);var Dy=Bt,My=zr;fs({target:"Object",stat:!0,forced:U((function(){My(1)}))},{keys:function(t){return My(Dy(t))}});var Ty=fn.map;fs({target:"Array",proto:!0,forced:!bu("map")},{map:function(t){return Ty(this,t,arguments.length>1?arguments[1]:void 0)}});var Iy=mn,Ry=Y,jy=zr,Ny=Br,Ky=Ry(zo.f),Fy=Ry([].push),Gy=function(t){return function(e){for(var n,r=Ny(e),o=jy(r),i=o.length,s=0,a=[];i>s;)n=o[s++],Iy&&!Ky(r,n)||Fy(a,t?[n,r[n]]:r[n]);return a}},Uy={entries:Gy(!0),values:Gy(!1)}.values;fs({target:"Object",stat:!0},{values:function(t){return Uy(t)}});var Hy=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=t.selector,i=t.controlName,s=t.featureName,a=void 0===s?"captionStyles":s,u=t.defaultValue,l=t.pluginName;return Wa(this,n),(r=e.call(this,l)).controlName=i,r.featureName=a,r.radioElements=document.querySelectorAll(o),r.defaultValue=u,r.radioGroup={},r.radioElements.length<=0?(r.warn("".concat(r.controlName," RadioGroup found no HTMLElements with selector: ").concat(o)),tu(r)):(r.radioElements.forEach((function(t){"radio"===t.type?(t.value=t.value.toLowerCase(),r.radioGroup[t.value]=t):r.warn("".concat(r.controlName," was provided a non Radio Button element with selector: ").concat(o))})),r.radioGroup[r.defaultValue]||(r.warn("".concat(r.controlName," RadioGroup for selector: ").concat(o," does not have a radio button with value ").concat(r.defaultValue," to use as default value. Using first element as default")),r.defaultValue=r.radioElements[0].value.toLowerCase()),r.radioGroup[r.defaultValue].checked=!0,r)}return Ya(n,[{key:"hasOnly",value:function(t){for(var e in this.radioGroup)if(!t.includes(this.radioGroup[e].value))return this.warn("".concat(this.controlName," radio button value: ").concat(this.radioGroup[e].value," is not an accepted value. Skipping radio group")),!1;return!0}},{key:"hasDuplicateValues",value:function(){return this.values.length!==nu(new Set(this.values)).length}},{key:"enableRadioEvents",value:function(t){if(!(!this.radioGroup.length<=0)){var e=t;for(var n in this.radioGroup)this.radioGroup[n].addEventListener("change",e)}}},{key:"disableRadioEvents",value:function(t){if(!(!this.radioGroup.length<=0))for(var e in this.radioGroup)this.radioGroup[e].removeEventListener("change",t)}},{key:"displayRadios",value:function(t){if(this.radioGroup.length<=0&&t[this.featureName])this.warn("".concat(this.controlName," was not provided a valid input element or selector but '").concat(this.featureName,"' was included as a game feature"));else if(!(this.radioGroup.length<=0||t[this.featureName]))for(var e in this.radioGroup)this.radioGroup[e].style.display="none"}},{key:"resetState",value:function(){this.radioGroup[this.defaultValue].checked=!0}},{key:"length",get:function(){return Object.keys(this.radioGroup).length}},{key:"values",get:function(){return Object.values(this.radioGroup).map((function(t){return t.value}))}}]),n}(nv),zy=function(t){Ja(n,t);var e=eu(n);function n(t,r,o){var i,s=o.supportedValues,a=o.initialValue,u=o.controlName,l=o.featureName,c=o.radioCount;return Wa(this,n),(i=e.call(this,r)).selectors=t?t.split(","):[],i.supportedValues=s,i.initialValue=s.includes(a)?a:s[0],i.controlName=u,i.featureName=l,i.radioCount=c,i.sendAllProperties=i.sendAllProperties.bind(Za(i)),i._currentValue=i.initialValue,i.radioGroups=i.setUpRadios(i.selectors),i.radioGroupsLength=i.radioGroups.length,i}return Ya(n,[{key:"setUpRadios",value:function(t){var e=this,n=[];return t.forEach((function(t){var r=new Hy({selector:t.trim(),controlName:e.controlName,defaultValue:e.initialValue,pluginName:e.name,featureName:e.featureName});r.length===e.radioCount?r.hasOnly(e.supportedValues)&&(r.hasDuplicateValues()?e.warn("Duplicate radio button values detected (values: ".concat(r.values," ). Skipping radio group")):n.push(r)):e.warn('Selector "'.concat(t,'" did not find exactly ').concat(e.radioCount," radio buttons for ").concat(e.controlName,". Skipping selector"))})),n}},{key:"start",value:function(){this.client.on("loaded",this.sendAllProperties),this.client.on("loadDone",this.sendAllProperties)}},{key:"sendAllProperties",value:function(){this.sendProperty(this.featureName,this.property)}},{key:"currentValue",get:function(){return this._currentValue},set:function(t){if(this.supportedValues.includes(t)){this._currentValue=t;for(var e=0,n=this.radioGroups.length;e<n;e++)this.radioGroups[e].radioGroup[t].checked=!0}}}]),n}(nv),qy=Y(1..valueOf),Wy=fs,Xy=mn,Yy=L,Jy=Ga,$y=Y,Qy=is,Zy=Yt,tg=ey,eg=An,ng=Tn,rg=Jn,og=U,ig=Mi.f,sg=Ho.f,ag=bn.f,ug=qy,lg=Tp.trim,cg="Number",dg=Yy[cg];Jy[cg];var hg=dg.prototype,fg=Yy.TypeError,pg=$y("".slice),vg=$y("".charCodeAt),yg=function(t){var e,n,r,o,i,s,a,u,l=rg(t,"number");if(ng(l))throw fg("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=lg(l),43===(e=vg(l,0))||45===e){if(88===(n=vg(l,2))||120===n)return NaN}else if(48===e){switch(vg(l,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+l}for(s=(i=pg(l,2)).length,a=0;a<s;a++)if((u=vg(i,a))<48||u>o)return NaN;return parseInt(i,r)}return+l},gg=Qy(cg,!dg(" 0o1")||!dg("0b1")||dg("+0x1")),mg=function(t){var e,n=arguments.length<1?0:dg(function(t){var e=rg(t,"number");return"bigint"==typeof e?e:yg(e)}(t));return eg(hg,e=this)&&og((function(){ug(e)}))?tg(Object(n),this,mg):n};mg.prototype=hg,gg&&(hg.constructor=mg),Wy({global:!0,constructor:!0,wrap:!0,forced:gg},{Number:mg});gg&&function(t,e){for(var n,r=Xy?ig(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;r.length>o;o++)Zy(e,n=r[o])&&!Zy(t,n)&&ag(t,n,sg(e,n))}(Jy[cg],dg);var bg=function(){function t(e){var n=e.slider,r=e.control,o=e.min,i=void 0===o?0:o,s=e.max,a=void 0===s?1:s,u=e.step,l=void 0===u?.1:u,c=e.defaultValue,d=void 0===c?1:c;Wa(this,t),this.min=i,this.max=a,this.step=l,this.sliderValue=d,this.control=r,this.slider=this.setUpSlider(n,r)}return Ya(t,[{key:"setUpSlider",value:function(t,e){if("string"==typeof t&&(t=document.querySelector(t)),!t||"range"!==t.type)return null;var n=ev.read(e);return t.min=this.min,t.max=this.max,t.step=this.step,(n||0===n)&&n.toString().trim().length>0?(t.value=n,this.sliderValue=n):t.value=this.sliderValue,t}},{key:"sliderRange",value:function(t){return t<this.min?this.min:t>this.max?this.max:t}},{key:"enableSliderEvents",value:function(t){if(this.slider){var e=t;this.slider.addEventListener("change",e),this.slider.addEventListener("input",e)}}},{key:"disableSliderEvents",value:function(t){if(this.slider){var e=t;this.slider.removeEventListener("change",e),this.slider.removeEventListener("input",e)}}},{key:"displaySlider",value:function(t){!this.slider&&t[this.control]&&console.warn("".concat(this.control," was not provided a valid input element or selector but was included as a game feature")),this.slider&&(this.slider.style.display=t[this.control]?"":"none")}},{key:"dispatchEvent",value:function(t){this.slider.dispatchEvent(t)}},{key:"value",get:function(){return this.slider.value},set:function(t){this.slider.value=t}}]),t}(),Sg=function(){function t(e){var n=e.button,r=e.onClick,o=e.channel;Wa(this,t),this.button=n instanceof HTMLElement?n:document.querySelector(n),this.onClick=r,this.channel=o,this.button&&this.button.addEventListener("click",r)}return Ya(t,[{key:"displayButton",value:function(t){this.button instanceof HTMLElement&&(this.button.style.display=t[this.channel]||"pause"===this.channel||"hints"===this.channel?"":"none")}},{key:"enableButton",value:function(){this.button&&this.button.classList.remove("disabled")}},{key:"addClass",value:function(t){this.button.className=this.button.className?this.button.className+" ".concat(t):" ".concat(t)}}]),t}(),wg=function(t){Ja(n,t);var e=eu(n);function n(t,r,o){var i,s=o.defaultValue,a=void 0===s?"0.5":s,u=o.minValue,l=void 0===u?"0":u,c=o.maxValue,d=void 0===c?"1":c,h=o.featureName;return Wa(this,n),(i=e.call(this,r)).featureName=h,i.minValue=l,i.defaultValue=a,i.maxValue=d,i._currentValue=a,i.sliders=i.setUpSliders(t),i.slidersLength=i.sliders.length,i.sendAllProperties=i.sendAllProperties.bind(Za(i)),0>=i.slidersLength?(i.warn("Plugin was not provided any valid HTML Elements"),tu(i)):i}return Ya(n,[{key:"setUpSliders",value:function(t){var e=this,n=[];return t instanceof HTMLElement?n.push(new bg({slider:t,control:this.featureName,defaultValue:this.defaultValue,minValue:this.minValue,maxValue:this.maxValue})):document.querySelectorAll(t).forEach((function(t){n.push(new bg({slider:t,control:e.featureName,defaultValue:e.defaultValue,minValue:e.minValue,maxValue:e.maxValue}))})),n}},{key:"init",value:function(){this.client.on("features",function(t){if(t.data)for(var e=0;e<this.slidersLength;e++)this.sliders[e].displaySlider(t.data)}.bind(this))}},{key:"start",value:function(){this._currentValue=this.sliders[0].value,this.client.on("loaded",this.sendAllProperties),this.client.on("loadDone",this.sendAllProperties)}},{key:"sendAllProperties",value:function(){this.sendProperty(this.featureName,this.currentValue)}},{key:"currentValue",get:function(){return this._currentValue},set:function(t){this._currentValue=this.sliders[0].sliderRange(Number(t));for(var e=0;e<this.slidersLength;e++)this.sliders[e].value=t}}]),n}(nv),kg={size:"medium",background:"black",color:"white",edge:"none",font:"arial",align:"top"},Eg={color:"white",background:"black"},Bg={color:"black",background:"white"},xg=["small","medium","large"],Pg=["default","inverted"],Lg=["top","bottom"],_g=function(t){Ja(n,t);var e=eu(n);function n(t,r,o){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=s.defaultFontSize,u=void 0===a?"medium":a,l=s.defaultColor,c=void 0===l?"default":l,d=s.defaultAlignment,h=void 0===d?"top":d;if(Wa(this,n),(i=e.call(this,"Caption-Style-Plugin")).sendAllProperties=i.sendAllProperties.bind(Za(i)),i.captionsStyles=Object.assign({},kg,ev.read(n.captionStyleKey)||{}),i.fontSizeSelectors=t?t.split(","):[],i.colorSelectors=r?r.split(","):[],i.alignmentSelectors=o?o.split(","):[],i.defaultFontSize=xg.includes(u)?u:xg[0],i.defaultColor=Pg.includes(c)?c:Pg[0],i.defaultAlignment=Lg.includes(h)?h:Lg[0],i.fontSizeRadios=[],i.colorRadios=[],i.alignmentRadios=[],i.fontSizeRadios=i.setUpFontSizeRadios(i.fontSizeSelectors),i.colorRadios=i.setUpColorRadios(i.colorSelectors),i.alignmentRadios=i.setUpAlignmentRadios(i.alignmentSelectors),i._captionsMuted=!1,i.alignmentRadiosLength=i.alignmentRadios.length,i.fontSizeRadiosLength=i.fontSizeRadios.length,i.colorRadiosLength=i.colorRadios.length,0>=i.alignmentRadiosLength+i.fontSizeRadiosLength+i.colorRadiosLength)return i.warn("Plugin was not provided any input elements"),tu(i);for(var f=0;f<i.colorRadiosLength;f++)i.colorRadios[f].enableRadioEvents(i.onColorChange.bind(Za(i)));for(var p=0;p<i.alignmentRadiosLength;p++)i.alignmentRadios[p].enableRadioEvents(i.onAlignmentChange.bind(Za(i)));for(var v=0;v<i.fontSizeRadiosLength;v++)i.fontSizeRadios[v].enableRadioEvents(i.onFontSizeChange.bind(Za(i)));return i}return Ya(n,[{key:"setUpFontSizeRadios",value:function(t){var e=this,n=[];return t.forEach((function(t){var r=new Hy({selector:t.trim(),controlName:"Font Size",defaultValue:e.defaultFontSize,pluginName:"Caption-Button-Plugin"});3===r.length?r.hasOnly(xg)&&(r.hasDuplicateValues()?e.warn("Duplicate radio button values detected (values: ".concat(r.values," ). Skipping radio group")):n.push(r)):e.warn('Selector "'.concat(t,'" did not find exactly three(3) radio buttons for caption font size. Skipping selector'))})),n}},{key:"setUpColorRadios",value:function(t){var e=this,n=[];return t.forEach((function(t){var r=new Hy({selector:t.trim(),controlName:"Color",defaultValue:e.defaultColor,pluginName:"Caption-Button-Plugin"});2===r.length?r.hasOnly(Pg)&&(r.hasDuplicateValues()?e.warn("Duplicate radio button values detected (values: ".concat(r.values," ). Skipping radio group")):n.push(r)):e.warn('Selector "'.concat(t,'" did not find exactly two(2) radio buttons for caption colors. Skipping selector'))})),n}},{key:"setUpAlignmentRadios",value:function(t){var e=this,n=[];return t.forEach((function(t){var r=new Hy({selector:t.trim(),controlName:"Alignment",defaultValue:e.defaultAlignment,pluginName:"Caption-Button-Plugin"});2===r.length?r.hasOnly(Lg)&&(r.hasDuplicateValues()?e.warn("Duplicate radio button values detected (values: ".concat(r.values," ). Skipping radio group")):n.push(r)):e.warn('Selector "'.concat(t,'" did not find exactly two(2) radio buttons for caption alignment. Skipping selector'))})),n}},{key:"init",value:function(){this.client.on("features",function(t){var e,n=iu(this.radios);try{for(n.s();!(e=n.n()).done;){e.value.displayRadios(t.data)}}catch(t){n.e(t)}finally{n.f()}}.bind(this)),this.client.on("caption-set-style",function(t){this.setCaptionsStyles(t.data||{})}.bind(this))}},{key:"start",value:function(){this.setCaptionsStyles(ev.read(n.captionStyleKey)),this.client.on("loaded",this.sendAllProperties),this.client.on("loadDone",this.sendAllProperties)}},{key:"sendAllProperties",value:function(){this.sendProperty(n.captionStyleKey,this.captionsStyles)}},{key:"onFontSizeChange",value:function(t){this.setCaptionsStyles("size",t.target.value)}},{key:"onAlignmentChange",value:function(t){this.setCaptionsStyles("align",t.target.value)}},{key:"onColorChange",value:function(t){var e="default"===t.target.value?Eg:Bg;this.setCaptionsStyles(e)}},{key:"clearCaptionsStyles",value:function(){this.captionsStyles=Object.assign({},kg),this.setCaptionsStyles();var t,e=iu(this.radios);try{for(e.s();!(t=e.n()).done;){t.value.resetState()}}catch(t){e.e(t)}finally{e.f()}}},{key:"getCaptionsStyles",value:function(t){return t?this.captionsStyles[t]:this.captionsStyles}},{key:"setCaptionsStyles",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kg,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";"object"===Ha(e)?Object.assign(this.captionsStyles,e):"string"==typeof e&&(this.captionsStyles[e]=r),this.colorRadios.forEach((function(e){var n="white"===t.captionsStyles.color?"default":"inverted";e.radioGroup[n].checked=!0})),this.alignmentRadios.forEach((function(e){e.radioGroup[t.captionsStyles.align].checked=!0})),this.fontSizeRadios.forEach((function(e){e.radioGroup[t.captionsStyles.size].checked=!0})),ev.write(n.captionStyleKey,this.captionsStyles),this.client&&this.client.send(n.captionStyleKey,this.captionsStyles)}},{key:"radios",get:function(){return this.colorRadios.concat(this.alignmentRadios).concat(this.fontSizeRadios)}}],[{key:"captionStyleKey",get:function(){return"captionsStyles"}}]),n}(rv),Og=function(t){Ja(n,t);var e=eu(n);function n(t){var r;return Wa(this,n),(r=e.call(this,"Caption-Button-Plugin")).sendAllProperties=r.sendAllProperties.bind(Za(r)),r._captionsButtons=[],t instanceof HTMLElement?r._captionsButtons[0]=new Sg({button:t,onClick:r.captionsButtonClick.bind(Za(r)),channel:"captions"}):document.querySelectorAll(t).forEach((function(t){r._captionsButtons.push(new Sg({button:t,onClick:r.captionsButtonClick.bind(Za(r)),channel:"captions"}))})),r._captionsMuted=!1,r.captionsButtonLength=r._captionsButtons.length,0>=r.captionsButtonLength?(r.warn("Plugin was not provided any valid button or input elements"),tu(r)):r}return Ya(n,[{key:"init",value:function(){this.client.on("features",function(t){for(var e=0;e<this.captionsButtonLength;e++)this._captionsButtons[e].displayButton(t.data);null!==ev.read(n.captionsToggleKey)&&(this._captionsMuted=!!ev.read(n.captionsToggleKey),this._setMuteProp("captionsMuted",this._captionsButtons,this._captionsMuted,!0))}.bind(this))}},{key:"start",value:function(){for(var t=0;t<this.captionsButtonsLength;t++)this.captionsButtons[t].enableButton();this.client.on("loaded",this.sendAllProperties),this.client.on("loadDone",this.sendAllProperties)}},{key:"sendAllProperties",value:function(){this.sendProperty(n.captionsToggleKey,this.captionsMuted)}},{key:"captionsButtonClick",value:function(){this.captionsMuted=!this.captionsMuted}},{key:"captionsMuted",get:function(){return this._captionsMuted},set:function(t){this._captionsMuted=t,this._setMuteProp("captionsMuted",this._captionsButtons,this._captionsMuted)}}],[{key:"captionsToggleKey",get:function(){return"captionsMuted"}}]),n}(rv),Ag=function(t){Ja(n,t);var e=eu(n);function n(t){var r;return Wa(this,n),(r=e.call(this,"Help-Button-Plugin"))._helpButtons=[],t instanceof HTMLElement?r._helpButtons[0]=new Sg({button:t,onClick:r.helpButtonClick.bind(Za(r)),channel:"hints"}):document.querySelectorAll(t).forEach((function(t){r._helpButtons.push(new Sg({button:t,onClick:r.helpButtonClick.bind(Za(r)),channel:"hints"}))})),r.paused=!1,r._helpEnabled=!1,r.onPause=r.onPause.bind(Za(r)),r.helpButtonsLength=r._helpButtons.length,r.helpButtonsLength<=0&&r.warn("Plugin was not provided any valid button elements"),r}return Ya(n,[{key:"onPause",value:function(t){if(this.paused=t.data.paused,this.paused&&this.helpEnabled){for(var e=0;e<this.helpButtonsLength;e++)this._helpButtons[e].button.setAttribute("data-paused","true");this.helpEnabled=!1}else for(var n=0;n<this.helpButtonsLength;n++)this._helpButtons[n].button.getAttribute("data-paused")&&(this._helpButtons[n].button.setAttribute("data-paused",""),this.helpEnabled=!0)}},{key:"helpButtonClick",value:function(){!this.paused&&this.helpEnabled&&this.client.send("playHelp")}},{key:"init",value:function(){this.client.on("paused",this.onPause),this.client.on("features",function(t){this.helpEnabled=t.data.hints;for(var e=0;e<this.helpButtonsLength;e++)this._helpButtons[e].displayButton(t.data)}.bind(this)),this.client.on("helpEnabled",function(t){this._helpEnabled=!!t.data}.bind(this))}},{key:"helpEnabled",get:function(){return this._helpEnabled},set:function(t){this._helpEnabled=t;for(var e=0;e<this.helpButtonsLength;e++)this._helpButtons[e].button.classList.remove("disabled"),this._helpButtons[e].button.classList.remove("enabled"),this._helpButtons[e].button.classList.add(t?"enabled":"disabled");this.client.trigger("helpEnabled")}}],[{key:"helpKey",get:function(){return"help"}}]),n}(rv),Cg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Wa(this,n),(r=e.call(this,"Pause-Button-plugin"))._manageOwnVisibility=o,r._appBlurred=!1,r._containerBlurred=!1,r._focusTimer=null,r._isManualPause=!1,r._keepFocus=!1,r._paused=!1,r.iframe=null,r.focusApp=r.focusApp.bind(Za(r)),r.manageFocus=r.manageFocus.bind(Za(r)),r.onKeepFocus=r.onKeepFocus.bind(Za(r)),r.onFocus=r.onFocus.bind(Za(r));var i=r.onPauseToggle.bind(Za(r));return r.pauseDisabled=!1,r._pauseButton=[],r.pageVisibility=new Bp(r.onContainerFocus.bind(Za(r)),r.onContainerBlur.bind(Za(r))),r.pageVisibility.enabled=r.manageOwnVisibility,t instanceof HTMLElement?r._pauseButton[0]=new Sg({button:t,onClick:i,channel:n.pauseKey}):document.querySelectorAll(t).forEach((function(t){r._pauseButton.push(new Sg({button:t,onClick:i,channel:n.pauseKey}))})),r}return Ya(n,[{key:"pause",get:function(){return this._paused},set:function(t){if(t=!!t,!this.pauseDisabled){this._paused=t,this.client.send(n.pauseKey,t),this.client.trigger(t?"paused":"resumed",{paused:t});for(var e=0,r=this._pauseButton.length;e<r;e++)this._pauseButton[e].button.classList.remove("unpaused"),this._pauseButton[e].button.classList.remove("paused"),this._pauseButton[e].button.classList.add(t?"paused":"unpaused")}}},{key:"manageOwnVisibility",get:function(){return this._manageOwnVisibility},set:function(t){this._manageOwnVisibility=t,this.pageVisibility.enabled=this._manageOwnVisibility}},{key:"focusApp",value:function(){this.hasDom&&this.iframe.contentWindow.focus()}},{key:"blurApp",value:function(){this.hasDom&&this.iframe.contentWindow.blur()}},{key:"manageFocus",value:function(){this.manageOwnVisibility&&(this._keepFocus&&this.blurApp(),this._focusTimer&&clearTimeout(this._focusTimer),this._focusTimer=setTimeout(function(){this._focusTimer=null,this._isManualPause||(this.pause=Boolean(this._containerBlurred&&this._appBlurred),this._keepFocus&&!this._containerBlurred&&this._appBlurred&&this.focusApp())}.bind(this),100))}},{key:"onKeepFocus",value:function(t){this._keepFocus=!!t.data,this.manageFocus()}},{key:"onFocus",value:function(t){this._appBlurred=!t.data,this.manageFocus()}},{key:"onContainerFocus",value:function(){this._containerBlurred=!1,this.manageFocus()}},{key:"onContainerBlur",value:function(){this._containerBlurred=this._appBlurred=!0,this.manageFocus()}},{key:"onPauseToggle",value:function(){this._isManualPause=!this._isManualPause,this.pause=!this.pause}},{key:"init",value:function(t){var e=t.iframe;this.iframe=e,this.client.on("features",function(t){t.disablePause&&(this.pauseDisabled=!0);for(var e=0,n=this._pauseButton.length;e<n;e++)this._pauseButton[e].displayButton(t.data)}.bind(this)),this.client.on("focus",this.onFocus),this.client.on("keepFocus",this.onKeepFocus),this.pause=this._paused}},{key:"hasDom",get:function(){return Boolean(null!==this.iframe&&this.iframe.contentWindow)}},{key:"pauseButton",get:function(){for(var t=[],e=0,n=this._pauseButton.length;e<n;e++)t.push(this._pauseButton[e].button);return t}}],[{key:"pauseKey",get:function(){return"pause"}}]),n}(rv),Vg=function(t){Ja(r,t);var e,n=eu(r);function r(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=e.soundButtons,i=e.musicButtons,s=e.sfxButtons,a=e.voButtons,u=e.soundSliders,l=e.musicSliders,c=e.sfxSliders,d=e.voSliders;Wa(this,r),t=n.call(this,"Sound-Button-Plugin");var h=ev.read(r.soundMutedKey);if(t.sendAllProperties=t.sendAllProperties.bind(Za(t)),t._soundMuted=h||!1,t._musicMuted=!1,t._voMuted=!1,t._sfxMuted=!1,t._musicMutedByUser=!1,t._soundMutedByUser=!1,t._sfxMutedByUser=!1,t._voMutedByUser=!1,t.soundMutedEnabled=!1,t.musicMutedEnabled=!1,t.sfxMutedEnabled=!1,t.voMutedEnabled=!1,t.soundVolume=1,t.musicVolume=1,t.sfxVolume=1,t.voVolume=1,t.soundSliders=[],t.musicSliders=[],t.sfxSliders=[],t.voSliders=[],t.soundButtons=[],t.musicButtons=[],t.sfxButtons=[],t.voButtons=[],u instanceof HTMLElement?t.soundSliders[0]=new bg({slider:u,control:r.soundVolumeKey,defaultValue:t.soundVolume}):document.querySelectorAll(u).forEach((function(e){var n=new bg({slider:e,control:r.soundVolumeKey,defaultValue:t.soundVolume});n.slider&&t.soundSliders.push(n)})),l instanceof HTMLElement?t.musicSliders[0]=new bg({slider:l,control:r.musicVolumeKey,defaultValue:t.musicVolume}):document.querySelectorAll(l).forEach((function(e){var n=new bg({slider:e,control:r.musicVolumeKey,defaultValue:t.musicVolume});n.slider&&t.musicSliders.push(n)})),c instanceof HTMLElement?t.sfxSliders[0]=new bg({slider:c,control:r.sfxVolumeKey,defaultValue:t.sfxVolume}):document.querySelectorAll(c).forEach((function(e){var n=new bg({slider:e,control:r.sfxVolumeKey,defaultValue:t.sfxVolume});n.slider&&t.sfxSliders.push(n)})),d instanceof HTMLElement?t.voSliders[0]=new bg({slider:d,control:r.voVolumeKey,defaultValue:t.voVolume}):document.querySelectorAll(d).forEach((function(e){var n=new bg({slider:e,control:r.voVolumeKey,defaultValue:t.voVolume});n.slider&&t.voSliders.push(n)})),o instanceof HTMLElement?t.soundButtons[0]=new Sg({button:o,onClick:t.onSoundToggle.bind(Za(t)),channel:r.soundKey}):document.querySelectorAll(o).forEach((function(e){t.soundButtons.push(new Sg({button:e,onClick:t.onSoundToggle.bind(Za(t)),channel:r.soundKey}))})),i instanceof HTMLElement?t.musicButtons[0]=new Sg({button:i,onClick:t.onMusicToggle.bind(Za(t)),channel:"music"}):document.querySelectorAll(i).forEach((function(e){t.musicButtons.push(new Sg({button:e,onClick:t.onMusicToggle.bind(Za(t)),channel:"music"}))})),s instanceof HTMLElement?t.sfxButtons[0]=new Sg({button:s,onClick:t.onSFXToggle.bind(Za(t)),channel:"sfx"}):document.querySelectorAll(s).forEach((function(e){t.sfxButtons.push(new Sg({button:e,onClick:t.onSFXToggle.bind(Za(t)),channel:"sfx"}))})),a instanceof HTMLElement?t.voButtons[0]=new Sg({button:a,onClick:t.onVOToggle.bind(Za(t)),channel:"vo"}):document.querySelectorAll(a).forEach((function(e){t.voButtons.push(new Sg({button:e,onClick:t.onVOToggle.bind(Za(t)),channel:"vo"}))})),t.soundSlidersLength=t.soundSliders.length,t.musicSlidersLength=t.musicSliders.length,t.sfxSlidersLength=t.sfxSliders.length,t.voSlidersLength=t.voSliders.length,t.soundButtonsLength=t.soundButtons.length,t.musicButtonsLength=t.musicButtons.length,t.sfxButtonsLength=t.sfxButtons.length,t.voButtonsLength=t.voButtons.length,0>=t.soundSlidersLength+t.musicSlidersLength+t.sfxSlidersLength+t.voSlidersLength+t.soundButtonsLength+t.musicButtonsLength+t.sfxButtonsLength+t.voButtonsLength)return t.warn("Plugin was not provided any valid HTML Elements"),tu(t);for(var f=0;f<t.soundSlidersLength;f++)t.soundSliders[f].enableSliderEvents(t.onSoundVolumeChange.bind(Za(t)));for(var p=0;p<t.musicSlidersLength;p++)t.musicSliders[p].enableSliderEvents(t.onMusicVolumeChange.bind(Za(t)));for(var v=0;v<t.sfxSlidersLength;v++)t.sfxSliders[v].enableSliderEvents(t.onSFXVolumeChange.bind(Za(t)));for(var y=0;y<t.voSlidersLength;y++)t.voSliders[y].enableSliderEvents(t.onVOVolumeChange.bind(Za(t)));return t.soundSliders[0]&&t.soundSliders[0].slider&&(t.soundVolume=t.soundSliders[0].value),t.musicSliders[0]&&t.musicSliders[0].slider&&(t.musicVolume=t.musicSliders[0].value),t.sfxSliders[0]&&t.sfxSliders[0].slider&&(t.sfxVolume=t.sfxSliders[0].value),t.voSliders[0]&&t.voSliders[0].slider&&(t.voVolume=t.voSliders[0].value),t}return Ya(r,[{key:"onSoundVolumeChange",value:function(t){if(this.soundSlidersLength<=0)this.soundVolume=t.target.value;else{this.soundVolume=this.soundSliders[0].sliderRange(Number(t.target.value)),this.soundMuted=!this.soundVolume,this._musicMutedByUser||(this.musicMuted=this.soundMuted),this._sfxMutedByUser||(this.sfxMuted=this.soundMuted),this._voMutedByUser||(this.voMuted=this.soundMuted),this.sendProperty(r.soundVolumeKey,this.soundVolume);for(var e=0;e<this.soundSlidersLength;e++)this.soundSliders[e].value=this.soundVolume}}},{key:"onMusicVolumeChange",value:function(t){if(this.musicSlidersLength<=0)this.musicVolume=t.target.value;else{this.musicVolume=this.musicSliders[0].sliderRange(Number(t.target.value)),this.musicMuted=!this.musicVolume,this.musicMuted||(this._musicMutedByUser=!1),this._checkSoundMute(),this.sendProperty(r.musicVolumeKey,this.musicVolume);for(var e=0;e<this.musicSlidersLength;e++)this.musicSliders[e].value=this.musicVolume}}},{key:"onVOVolumeChange",value:function(t){if(this.voSlidersLength<=0)this.voVolume=t.target.value;else{this.voVolume=this.voSliders[0].sliderRange(Number(t.target.value)),this.voMuted||(this._voMutedByUser=!1),this.voMuted=!this.voVolume,this._checkSoundMute(),this.sendProperty(r.voVolumeKey,this.voVolume);for(var e=0;e<this.voSlidersLength;e++)this.voSliders[e].value=this.voVolume}}},{key:"onSFXVolumeChange",value:function(t){if(this.sfxSlidersLength<=0)this.sfxVolume=t.target.value;else{this.sfxVolume=this.sfxSliders[0].sliderRange(Number(t.target.value)),this.sfxMuted||(this._sfxMutedByUser=!1),this.sfxMuted=!this.sfxVolume,this._checkSoundMute(),this.sendProperty(r.sfxVolumeKey,this.sfxVolume);for(var e=0;e<this.sfxSlidersLength;e++)this.sfxSliders[e].value=this.sfxVolume}}},{key:"onSoundToggle",value:function(){var t=!this.soundMuted;this.soundMuted=t,this._musicMutedByUser&&!t||(this.musicMuted=t),this._sfxMutedByUser&&!t||(this.sfxMuted=t),this._voMutedByUser&&!t||(this.voMuted=t)}},{key:"onMusicToggle",value:function(){this.musicMuted=!this.musicMuted,this._musicMutedByUser=this.musicMuted,this._checkSoundMute()}},{key:"onVOToggle",value:function(){this.voMuted=!this.voMuted,this._voMutedByUser=this.voMuted,this._checkSoundMute()}},{key:"onSFXToggle",value:function(){this.sfxMuted=!this.sfxMuted,this._sfxMutedByUser=this.sfxMuted,this._checkSoundMute()}},{key:"_checkSoundMute",value:function(){this.soundMuted=this.sfxMuted&&this.voMuted&&this.musicMuted}},{key:"setMuteProp",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this["_"+t]=e,this._setMuteProp(t,n,e,r)}},{key:"preload",value:(e=qa(Ua().mark((function t(e){var n;return Ua().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.client,this.client=n,this.client.on("features",function(t){if(t.data){this.soundMutedEnabled=!!t.data.sound,this.musicMutedEnabled=!!t.data.music,this.sfxMutedEnabled=!!t.data.sfx,this.voMutedEnabled=!!t.data.vo,this.soundVolumeEnabled=!!t.data.soundVolume,this.musicVolumeEnabled=!!t.data.musicVolume,this.sfxVolumeEnabled=!!t.data.sfxVolume,this.voVolumeEnabled=!!t.data.voVolume;for(var e=0;e<this.soundButtonsLength;e++)this.soundButtons[e].displayButton(t.data);for(var n=0;n<this.musicButtonsLength;n++)this.musicButtons[n].displayButton(t.data);for(var o=0;o<this.sfxButtonsLength;o++)this.sfxButtons[o].displayButton(t.data);for(var i=0;i<this.voButtonsLength;i++)this.voButtons[i].displayButton(t.data);for(var s=0;s<this.soundSlidersLength;s++)this.soundSliders[s].displaySlider(t.data);for(var a=0;a<this.musicSlidersLength;a++)this.musicSliders[a].displaySlider(t.data);for(var u=0;u<this.sfxSlidersLength;u++)this.sfxSliders[u].displaySlider(t.data);for(var l=0;l<this.voSlidersLength;l++)this.voSliders[l].displaySlider(t.data);var c=!!ev.read(r.soundMutedKey),d=!!ev.read(r.musicMutedKey),h=!!ev.read(r.sfxMutedKey),f=!!ev.read(r.voMutedKey);this.setMuteProp("soundMuted",c,this.soundButtons,!0),this.setMuteProp("musicMuted",d,this.musicButtons,!0),this.setMuteProp("sfxMuted",h,this.sfxButtons,!0),this.setMuteProp("voMuted",f,this.voButtons,!0)}}.bind(this));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"start",value:function(){for(var t=0;t<this.soundButtonsLength;t++)this.soundButtons[t].enableButton();for(var e=0;e<this.musicButtonsLength;e++)this.musicButtons[e].enableButton();for(var n=0;n<this.sfxButtonsLength;n++)this.sfxButtons[n].enableButton();for(var r=0;r<this.voButtonsLength;r++)this.voButtons[r].enableButton();this.client.on("loaded",this.sendAllProperties),this.client.on("loadDone",this.sendAllProperties)}},{key:"sendAllProperties",value:function(){this.soundVolumeEnabled&&this.soundSlidersLength>0&&this.sendProperty(r.soundVolumeKey,this.soundVolume),this.musicVolumeEnabled&&this.musicSlidersLength>0&&this.sendProperty(r.musicVolumeKey,this.musicVolume),this.voVolumeEnabled&&this.voSlidersLength>0&&this.sendProperty(r.voVolumeKey,this.voVolume),this.sfxVolumeEnabled&&this.sfxSlidersLength>0&&this.sendProperty(r.sfxVolumeKey,this.sfxVolume),this.soundButtonsLength>0&&this.soundMutedEnabled&&(this.soundMuted||!this.soundVolumeEnabled)&&this.sendProperty(r.soundMutedKey,this.soundMuted),this.musicButtonsLength>0&&this.musicMutedEnabled&&(this.musicMuted||!this.musicVolumeEnabled)&&this.sendProperty(r.musicMutedKey,this.musicMuted),this.voButtonsLength>0&&this.voMutedEnabled&&(this.voMuted||!this.voVolumeEnabled)&&this.sendProperty(r.voMutedKey,this.voMuted),this.sfxButtonsLength>0&&this.sfxMutedEnabled&&(this.sfxMuted||!this.sfxVolumeEnabled)&&this.sendProperty(r.sfxMutedKey,this.sfxMuted)}},{key:"soundMuted",get:function(){return this._soundMuted},set:function(t){if(t!==this.soundMuted){var e=!1;this.soundVolumeEnabled&&!t&&(this.sendProperty(r.soundVolumeKey,this.soundVolume),e=!0),this.setMuteProp("soundMuted",t,this.soundButtons,e)}else this.setMuteProp("soundMuted",t,this.soundButtons,!0)}},{key:"voMuted",get:function(){return this._voMuted},set:function(t){var e=!1;this.voMuted!==t?(this.voVolumeEnabled&&!t&&(this.sendProperty(r.voVolumeKey,this.voVolume),e=!0),this.setMuteProp("voMuted",t,this.voButtons,e)):this.setMuteProp("voMuted",t,this.voButtons,!0)}},{key:"musicMuted",get:function(){return this._musicMuted},set:function(t){if(this.musicMuted!==t){var e=!1;this.musicVolumeEnabled&&!t&&(this.sendProperty(r.musicVolumeKey,this.musicVolume),e=!0),this.setMuteProp("musicMuted",t,this.musicButtons,e)}else this.setMuteProp("musicMuted",t,this.musicButtons,!0)}},{key:"sfxMuted",get:function(){return this._sfxMuted},set:function(t){if(this.sfxMuted!==t){var e=!1;this.sfxVolumeEnabled&&!t&&(this.sendProperty(r.sfxVolumeKey,this.sfxVolume),e=!0),this.setMuteProp("sfxMuted",t,this.sfxButtons,e)}else this.setMuteProp("sfxMuted",t,this.sfxButtons,!0)}},{key:"soundButton",get:function(){return this._soundButton.button}},{key:"musicButton",get:function(){return this._musicButton.button}},{key:"sfxButton",get:function(){return this._sfxButton.button}},{key:"voButton",get:function(){return this._voButton.button}}],[{key:"soundMutedKey",get:function(){return"soundMuted"}},{key:"voMutedKey",get:function(){return"voMuted"}},{key:"musicMutedKey",get:function(){return"musicMuted"}},{key:"sfxMutedKey",get:function(){return"sfxMuted"}},{key:"soundVolumeKey",get:function(){return"soundVolume"}},{key:"sfxVolumeKey",get:function(){return"sfxVolume"}},{key:"voVolumeKey",get:function(){return"voVolume"}},{key:"musicVolumeKey",get:function(){return"musicVolume"}},{key:"soundKey",get:function(){return"sound"}}]),r}(rv),Dg=function(){function t(){Wa(this,t),this.dbName,this.savedData}return Ya(t,[{key:"IDBOpen",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;this.savedData=new ev,this.savedData.IDBOpen(t,e,n,r,o)}},{key:"IDBAdd",value:function(t,e,n,r){this.savedData.IDBAdd(t,e,n,r)}},{key:"IDBUpdate",value:function(t,e,n,r){this.savedData.IDBUpdate(t,e,n,r)}},{key:"IDBRemove",value:function(t,e,n){this.savedData.IDBRemove(t,e,n)}},{key:"IDBRead",value:function(t,e,n){this.savedData.IDBRead(t,e,n)}},{key:"IDBReadAll",value:function(t,e,n){this.savedData.IDBReadAll(t,e,n)}},{key:"IDBGetVersion",value:function(t,e){new ev(t).IDBGetVersion(t,e)}},{key:"IDBClose",value:function(t){this.savedData.IDBClose(t)}},{key:"IDBDeleteDB",value:function(t,e,n){new ev(t).IDBDeleteDB(t,e,n)}}],[{key:"remove",value:function(t,e){ev.remove(t),e()}},{key:"write",value:function(t,e,n){ev.write(t,e),n()}},{key:"read",value:function(t,e){e(ev.read(t))}}]),t}(),Mg=function(t){Ja(n,t);var e=eu(n);function n(){var t;return Wa(this,n),(t=e.call(this,"UserData-Plugin")).onUserDataRemove=t.onUserDataRemove.bind(Za(t)),t.onUserDataRead=t.onUserDataRead.bind(Za(t)),t.onUserDataWrite=t.onUserDataWrite.bind(Za(t)),t.onIDBAdd=t.onIDBAdd.bind(Za(t)),t.onIDBOpen=t.onIDBOpen.bind(Za(t)),t.onIDBRead=t.onIDBRead.bind(Za(t)),t.onIDBReadAll=t.onIDBReadAll.bind(Za(t)),t.onIDBRemove=t.onIDBRemove.bind(Za(t)),t.onIDBUpdate=t.onIDBUpdate.bind(Za(t)),t.onIDBUpdate=t.onIDBUpdate.bind(Za(t)),t.onIDBClose=t.onIDBClose.bind(Za(t)),t.IDBReadAll=t.onIDBReadAll.bind(Za(t)),t.onIDBGetVersion=t.onIDBGetVersion.bind(Za(t)),t.onIDBDeleteDB=t.onIDBDeleteDB.bind(Za(t)),t.savedDataHandler=null,t}return Ya(n,[{key:"init",value:function(){this.client.on("userDataRemove",this.onUserDataRemove),this.client.on("userDataRead",this.onUserDataRead),this.client.on("userDataWrite",this.onUserDataWrite),this.client.on("IDBOpen",this.onIDBOpen),this.client.on("IDBRead",this.onIDBRead),this.client.on("IDBReadAll",this.onIDBReadAll),this.client.on("IDBAdd",this.onIDBAdd),this.client.on("IDBRemove",this.onIDBRemove),this.client.on("IDBUpdate",this.onIDBUpdate),this.client.on("IDBClose",this.onIDBClose),this.client.on("IDBGetVersion",this.onIDBGetVersion),this.client.on("IDBDeleteDB",this.onIDBDeleteDB)}},{key:"onUserDataRemove",value:function(t){var e=this,n=t.data,r=t.type;Dg.remove(n,(function(){e.client.send(r)}))}},{key:"onUserDataRead",value:function(t){var e=this,n=t.data,r=t.type;Dg.read(n,(function(t){return e.client.send(r,t)}))}},{key:"onUserDataWrite",value:function(t){var e=this,n=t.type,r=t.data,o=r.name,i=r.value;Dg.write(o,i,(function(){return e.client.send(n)}))}},{key:"onIDBOpen",value:function(t){var e=this,n=t.type,r=t.data,o=r.dbName,i=r.dbVersion,s=void 0===i?null:i,a=r.additions,u=void 0===a?{}:a,l=r.deletions,c=void 0===l?{}:l;this.savedDataHandler=new Dg,this.savedDataHandler.IDBOpen(o,s,u,c,(function(t){return e.client.send(n,t)}))}},{key:"onIDBAdd",value:function(t){var e=this,n=t.type,r=t.data,o=r.storeName,i=r.value,s=r.key;this.savedDataHandler.IDBAdd(o,i,s,(function(t){return e.client.send(n,t)}))}},{key:"onIDBUpdate",value:function(t){var e=this,n=t.type,r=t.data,o=r.storeName,i=r.key,s=r.value;this.savedDataHandler.IDBUpdate(o,i,s,(function(t){return e.client.send(n,t)}))}},{key:"onIDBRemove",value:function(t){var e=this,n=t.type,r=t.data,o=r.storeName,i=r.key;this.savedDataHandler.IDBRemove(o,i,(function(t){return e.client.send(n,t)}))}},{key:"onIDBRead",value:function(t){var e=this,n=t.type,r=t.data,o=r.storeName,i=r.key;this.savedDataHandler.IDBRead(o,i,(function(t){return e.client.send(n,t)}))}},{key:"onIDBReadAll",value:function(t){var e=this,n=t.type,r=t.data,o=r.storeName,i=r.count;this.savedDataHandler.IDBReadAll(o,i,(function(t){return e.client.send(n,t)}))}},{key:"onIDBGetVersion",value:function(t){var e=this,n=t.type,r=t.data.dbName;(new Dg).IDBGetVersion(r,(function(t){return e.client.send(n,t)}))}},{key:"onIDBClose",value:function(t){var e=this,n=t.type;this.savedDataHandler.IDBClose((function(t){return e.client.send(n,t)}))}},{key:"onIDBDeleteDB",value:function(t){var e=this,n=t.type,r=t.data,o=r.dbName,i=r.options;(new Dg).IDBDeleteDB(o,i,(function(t){return e.client.send(n,t)}))}}]),n}(nv),Tg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultPointerSize,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"UISize-Pointer-Plugin",{defaultValue:i,featureName:n.pointerSizeKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onPointerSizeChange.bind(Za(r)));return r}return Ya(n,[{key:"onPointerSizeChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.pointerSizeKey,this.currentValue)}}],[{key:"pointerSizeKey",get:function(){return"pointerSize"}}]),n}(wg),Ig=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultButtonSize,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"UISize-Button-Plugin",{defaultValue:i,featureName:n.buttonSizeKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onButtonSizeChange.bind(Za(r)));return r}return Ya(n,[{key:"onButtonSizeChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.buttonSizeKey,this.currentValue)}}],[{key:"buttonSizeKey",get:function(){return"buttonSize"}}]),n}(wg),Rg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultSensitivity,i=void 0===o?.5:o;Wa(this,n),(r=e.call(this,t,"Control-Sensitivity-Plugin",{defaultValue:i,featureName:n.controlSensitivityKey})).sendAllProperties=r.sendAllProperties.bind(Za(r));for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onControlSensitivityChange.bind(Za(r)));return r}return Ya(n,[{key:"onControlSensitivityChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.controlSensitivityKey,this.currentValue)}}],[{key:"controlSensitivityKey",get:function(){return"controlSensitivity"}}]),n}(wg),jg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).customClassName,i=void 0===o?"springrollContainerKeyBinding__button":o;return Wa(this,n),(r=e.call(this,"Keyboard-Map-Plugin")).sendAllProperties=r.sendAllProperties.bind(Za(r)),r.bindKey=r.bindKey.bind(Za(r)),r.onKeyButtonClick=r.onKeyButtonClick.bind(Za(r)),r.className=i,r.keyContainers=t instanceof HTMLElement?[t]:document.querySelectorAll(t),r.keyBindings={},r.buttons=[],r.activekeyButton,r.sendAfterFetch=!1,r.canEmit=!1,r.keyContainersLength=r.keyContainers.length,r.keyContainersLength<=0?(r.warn("plugin was not provided any valid key binding container elements"),tu(r)):r}return Ya(n,[{key:"onKeyButtonClick",value:function(t){for(var e=0,n=this.buttons.length;e<n;e++)for(var r=0;r<this.buttons[e].length;r++)this.buttons[e][r].removeEventListener("click",this.onKeyButtonClick);this.activekeyButton=t.target,this.activekeyButton.textContent="Press Key to Map",document.addEventListener("keyup",this.bindKey)}},{key:"bindKey",value:function(t){for(var e in t.preventDefault(),this.keyBindings)if(this.keyBindings[e].currentKey===t.key.toLowerCase())return void this.warn("".concat(t.key," is already bound"));this.activekeyButton.textContent=" "===t.key?"space":t.key;for(var r=0;r<this.buttons.length;r++)for(var o=0;o<this.buttons[r].length;o++)this.buttons[r][o].value===this.activekeyButton.value&&(this.buttons[r][o].textContent=this.activekeyButton.textContent);this.keyBindings[this.activekeyButton.value].currentKey=t.key,document.removeEventListener("keyup",this.bindKey);for(var i=0,s=this.buttons.length;i<s;i++)for(var a=0;a<this.buttons[i].length;a++)this.buttons[i][a].addEventListener("click",this.onKeyButtonClick);this.sendProperty(n.keyBindingKey,this.keyBindings)}},{key:"init",value:function(){this.client.on("features",function(t){var e=this;if(t.data&&t.data.keyBinding){var r=ev.read(n.keyBindingKey);this.client.fetch("keyBindings",(function(t){for(var n=0;n<e.keyContainersLength;n++){e.buttons[n]=[];for(var o=0,i=t.data.length;o<i;o++){var s=t.data[o].defaultKey.toLowerCase();r&&r[t.data[o].actionName]&&(s=r[t.data[o].actionName].currentKey),0===n&&(e.keyBindings[t.data[o].actionName]={defaultKey:t.data[o].defaultKey.toLowerCase(),currentKey:s}),e.buttons[n][o]=document.createElement("button"),e.buttons[n][o].classList.add(e.className),e.buttons[n][o].id="keyBoardMapPlugin-".concat(t.data[o].actionName),e.buttons[n][o].value=t.data[o].actionName,e.buttons[n][o].textContent=t.data[o].defaultKey,e.buttons[n][o].addEventListener("click",e.onKeyButtonClick),e.label=document.createElement("label"),e.label.htmlFor="keyBoardMapPlugin-".concat(t.data[o].actionName),e.label.textContent=t.data[o].actionName,e.keyContainers[n].appendChild(e.label),e.keyContainers[n].appendChild(e.buttons[n][o])}}e.canEmit=!0,e.sendAfterFetch&&e.sendAllProperties()}))}}.bind(this))}},{key:"sendAllProperties",value:function(){this.canEmit?this.sendProperty(n.keyBindingKey,this.keyBindings):this.sendAfterFetch=!0}}],[{key:"keyBindingKey",get:function(){return"keyBinding"}}]),n}(nv),Ng=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultValue,i=void 0===o?0:o;Wa(this,n),r=e.call(this,t,"Layer-Plugin",{defaultValue:i,featureName:n.layersSliderKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onLayerValueChange.bind(Za(r)));return r}return Ya(n,[{key:"onLayerValueChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.layersSliderKey,this.currentValue)}}],[{key:"layersSliderKey",get:function(){return"removableLayers"}}]),n}(wg),Kg=["top","bottom","left","right"],Fg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultValue,i=void 0===o?Kg[0]:o;Wa(this,n),(r=e.call(this,t,"HUD-Layout-Plugin",{supportedValues:Kg,initialValue:i,controlName:"Hud Selector",featureName:n.hudPositionKey,radioCount:Kg.length})).sendAllProperties=r.sendAllProperties.bind(Za(r)),r.sendAfterFetch=!1,r.canEmit=!1,r.positions=[],r.radioGroupsLength<=0&&r.warn("Plugin was not provided any valid HTML elements");for(var s=0;s<r.radioGroupsLength;s++)r.radioGroups[s].enableRadioEvents(r.onHUDSelect.bind(Za(r)));return r}return Ya(n,[{key:"onHUDSelect",value:function(t){if(this.positions.includes(t.target.value))this.currentValue=t.target.value,this.sendProperty(n.hudPositionKey,this.currentValue);else for(var e=0;e<this.radioGroupsLength;e++)this.radioGroups[e].radioGroup[this.currentValue].checked=!0}},{key:"init",value:function(){this.client.on("features",function(t){var e=this;t.data&&t.data.hudPosition&&(this.radioGroupsLength<=0||this.client.fetch("hudPositions",(function(t){for(var n=0,r=t.data.length;n<r;n++)Kg.includes(t.data[n].toLowerCase())?e.positions.push(t.data[n].toLowerCase()):e.warn("".concat(t.data[n]," is an invalid position name"));for(var o=0;o<e.radioGroupsLength;o++)for(var i in e.radioGroups[o].radioGroup)e.radioGroups[o].radioGroup[i].style.display=e.positions.includes(e.radioGroups[o].radioGroup[i].value)?"":"none";e.canEmit=!0,e.sendAfterFetch&&e.sendAllProperties()})))}.bind(this))}},{key:"start",value:function(){var t=ev.read(n.hudPositionKey);Kg.includes(t)&&(this.currentValue=t),this.client.on("loaded",this.sendAllProperties),this.client.on("loadDone",this.sendAllProperties)}},{key:"sendAllProperties",value:function(){this.canEmit?this.sendProperty(n.hudPositionKey,this.currentValue):this.sendAfterFetch=!0}}],[{key:"hudPositionKey",get:function(){return"hudPosition"}}]),n}(zy),Gg=["none","protanopia","deuteranopia","tritanopia","achromatopsia"],Ug=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultValue,i=void 0===o?Gg[0]:o;if(Wa(this,n),(r=e.call(this,t,"Color-Filter-Plugin",{supportedValues:Gg,initialValue:i,controlName:"Color Vision Selector",featureName:n.colorVisionKey,radioCount:Gg.length})).sendAllProperties=r.sendAllProperties.bind(Za(r)),r.sendAfterFetch=!1,r.canEmit=!1,r.colors=[],r.radioGroupsLength<=0)return r.warn("Plugin was not provided any valid HTML elements"),tu(r);for(var s=0;s<r.radioGroupsLength;s++)r.radioGroups[s].enableRadioEvents(r.onColorChange.bind(Za(r)));return r}return Ya(n,[{key:"onColorChange",value:function(t){if(this.colors.includes(t.target.value))this.currentValue=t.target.value,this.sendProperty(n.colorVisionKey,this.currentValue);else for(var e=0;e<this.radioGroupsLength;e++)this.radioGroups[e].radioGroup[this.currentValue].checked=!0}},{key:"init",value:function(){this.client.on("features",function(t){var e=this;t.data&&t.data.colorVision&&(this.colorDropdownsLength<=0||this.client.fetch("colorFilters",(function(t){for(var n=0,r=t.data.length;n<r;n++)Gg.includes(t.data[n].toLowerCase())?e.colors.push(t.data[n].toLowerCase()):e.warn("".concat(t.data[n]," is an invalid color vision name"));e.defaultValue=e.colors[0];for(var o=0;o<e.radioGroupsLength;o++)for(var i in e.radioGroups[o].radioGroup)e.radioGroups[o].radioGroup[i].style.display=e.colors.includes(e.radioGroups[o].radioGroup[i].value.toLowerCase())?"":"none";e.canEmit=!0,e.sendAfterFetch&&e.sendAllProperties()})))}.bind(this))}},{key:"start",value:function(){var t=ev.read(n.colorVisionKey);Gg.includes(t)&&(this.currentValue=t),this.client.on("loaded",this.sendAllProperties),this.client.on("loadDone",this.sendAllProperties)}},{key:"sendAllProperties",value:function(){this.canEmit?this.sendProperty(n.colorVisionKey,this.currentValue):this.sendAfterFetch=!0}}],[{key:"colorVisionKey",get:function(){return"colorVision"}}]),n}(zy),Hg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultHitAreaScale,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"Hit-Area-Scale-Plugin",{defaultValue:i,featureName:n.hitAreaScaleKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onHitAreaScaleChange.bind(Za(r)));return r}return Ya(n,[{key:"onHitAreaScaleChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.hitAreaScaleKey,this.currentValue)}}],[{key:"hitAreaScaleKey",get:function(){return"hitAreaScale"}}]),n}(wg),zg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultDragThresholdScale,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"Drag-Threshold-Scale-Plugin",{defaultValue:i,featureName:n.dragThresholdScaleKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onDragThresholdScaleChange.bind(Za(r)));return r}return Ya(n,[{key:"onDragThresholdScaleChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.dragThresholdScaleKey,this.currentValue)}}],[{key:"dragThresholdScaleKey",get:function(){return"dragThresholdScale"}}]),n}(wg),qg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultHealth,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"Health-Scale-Plugin",{defaultValue:i,featureName:n.healthKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onHealthChange.bind(Za(r)));return r}return Ya(n,[{key:"onHealthChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.healthKey,this.currentValue)}}],[{key:"healthKey",get:function(){return"health"}}]),n}(wg),Wg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultObjectCount,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"Object-Count-Plugin",{defaultValue:i,featureName:n.objectCountKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onObjectCountChange.bind(Za(r)));return r}return Ya(n,[{key:"onObjectCountChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.objectCountKey,this.currentValue)}}],[{key:"objectCountKey",get:function(){return"objectCount"}}]),n}(wg),Xg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultCompletionPercentage,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"Completion-Percentage-Plugin",{defaultValue:i,featureName:n.completionPercentageKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onCompletionPercentageChange.bind(Za(r)));return r}return Ya(n,[{key:"onCompletionPercentageChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.completionPercentageKey,this.currentValue)}}],[{key:"completionPercentageKey",get:function(){return"completionPercentage"}}]),n}(wg),Yg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultSpeedScale,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"Speed-Scale-Plugin",{defaultValue:i,featureName:n.speedScaleKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onSpeedScaleChange.bind(Za(r)));return r}return Ya(n,[{key:"onSpeedScaleChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.speedScaleKey,this.currentValue)}}],[{key:"speedScaleKey",get:function(){return"speedScale"}}]),n}(wg),Jg=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultTimersScale,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"Timers-Scale-Plugin",{defaultValue:i,featureName:n.timersScaleKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onTimersScaleChange.bind(Za(r)));return r}return Ya(n,[{key:"onTimersScaleChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.timersScaleKey,this.currentValue)}}],[{key:"timersScaleKey",get:function(){return"timersScale"}}]),n}(wg),$g=function(t){Ja(n,t);var e=eu(n);function n(t){var r,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).defaultInputCount,i=void 0===o?.5:o;Wa(this,n),r=e.call(this,t,"Input-Count-Plugin",{defaultValue:i,featureName:n.inputCountKey});for(var s=0;s<r.slidersLength;s++)r.sliders[s].enableSliderEvents(r.onInputCountChange.bind(Za(r)));return r}return Ya(n,[{key:"onInputCountChange",value:function(t){this.currentValue=t.target.value,this.sendProperty(n.inputCountKey,this.currentValue)}}],[{key:"inputCountKey",get:function(){return"inputCount"}}]),n}(wg),Qg=function(t){Ja(n,t);var e=eu(n);function n(t){var r;return Wa(this,n),(r=e.call(this,{name:n.fullscreenKey}))._toggleButtons=[],r.iFrame=null,r.sendAllProperties=r.sendAllProperties.bind(Za(r)),Array.isArray(t)&&(t=t.join(", ")),console.log(t),r.toggleButton=document.querySelectorAll(t),r.toggleButton.forEach((function(t){r._toggleButtons.push(new Sg({button:t,onClick:r.toggleFullScreen.bind(Za(r)),channel:n.fullscreenKey}))})),document.addEventListener("fullscreenchange",(function(){r.sendAllProperties(),r._toggleButtons.forEach((function(t){t.button.classList.toggle("--fullScreen")}))})),r}return Ya(n,[{key:"init",value:function(t){var e=t.iframe;this.iFrame=e,this.client.on("features",function(t){for(var e=0;e<this.fullscreenElement;e++)this._toggleButtons[e].displayButton(t.data)}.bind(this))}},{key:"start",value:function(){this.client.on("loaded",this.sendAllProperties),this.client.on("loadDone",this.sendAllProperties)}},{key:"sendAllProperties",value:function(){this.sendProperty(n.fullscreenKey,null!=document.fullscreenElement?"true":"false")}},{key:"toggleFullScreen",value:function(){var t=this;document.fullscreenElement?(document.exitFullscreen(),this.sendAllProperties()):this.iFrame.requestFullscreen().then((function(){t.sendAllProperties()})).catch((function(t){console.log(t)}))}},{key:"isFullScreen",get:function(){return 1!=(document.fullscreenElement||document.webkitIsFullscreen||document.mozFullScreen)}}],[{key:"fullscreenKey",get:function(){return"fullScreen"}}]),n}(rv);t.BasePlugin=nv,t.Button=Sg,t.ButtonPlugin=rv,t.ButtonSizePlugin=Ig,t.CaptionsStylePlugin=_g,t.CaptionsTogglePlugin=Og,t.ColorVisionPlugin=Ug,t.CompletionPercentagePlugin=Xg,t.Container=Ep,t.ControlSensitivityPlugin=Rg,t.DragThresholdScalePlugin=zg,t.Features=Kf,t.FullScreenPlugin=Qg,t.HUDPlugin=Fg,t.HealthPlugin=qg,t.HelpPlugin=Ag,t.HitAreaScalePlugin=Hg,t.InputCountPlugin=$g,t.KeyboardMapPlugin=jg,t.LayersPlugin=Ng,t.ObjectCountPlugin=Wg,t.PageVisibility=Bp,t.PausePlugin=Cg,t.PointerSizePlugin=Tg,t.RadioGroup=Hy,t.RadioGroupPlugin=zy,t.SavedData=ev,t.SavedDataHandler=Dg,t.Slider=bg,t.SliderPlugin=wg,t.SoundPlugin=Vg,t.SpeedScalePlugin=Yg,t.TimersScalePlugin=Jg,t.UserDataPlugin=Mg}));
//# sourceMappingURL=SpringRoll-Container-umd.js.map