@hackler/react-sdk 11.27.0 → 11.27.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).hackleReactSDK={})}(this,function(D){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function L(r){if(r.__esModule)return r;var n=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})}),n}var F,l={},j=new Uint8Array(16);function V(){if(F=F||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return F(j);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}var H=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function z(e){return"string"==typeof e&&H.test(e)}for(var B,G,K=[],J=0;J<256;++J)K.push((J+256).toString(16).substr(1));function Y(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,e=(K[e[t+0]]+K[e[t+1]]+K[e[t+2]]+K[e[t+3]]+"-"+K[e[t+4]]+K[e[t+5]]+"-"+K[e[t+6]]+K[e[t+7]]+"-"+K[e[t+8]]+K[e[t+9]]+"-"+K[e[t+10]]+K[e[t+11]]+K[e[t+12]]+K[e[t+13]]+K[e[t+14]]+K[e[t+15]]).toLowerCase();if(z(e))return e;throw TypeError("Stringified UUID is invalid")}var q=0,$=0;function X(e){if(!z(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function W(e,s,a){function t(e,t,r,n){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),16!==(t="string"==typeof t?X(t):t).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(t),i.set(e,t.length),(i=a(i))[6]=15&i[6]|s,i[8]=63&i[8]|128,r){n=n||0;for(var o=0;o<16;++o)r[n+o]=i[o];return r}return Y(i)}try{t.name=e}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}function Z(e){return 14+(e+64>>>9<<4)+1}function Q(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ee(e,t,r,n,i,o){return Q((t=Q(Q(t,e),Q(n,o)))<<i|t>>>32-i,r)}function te(e,t,r,n,i,o,s){return ee(t&r|~t&n,e,t,i,o,s)}function re(e,t,r,n,i,o,s){return ee(t&n|r&~n,e,t,i,o,s)}function ne(e,t,r,n,i,o,s){return ee(t^r^n,e,t,i,o,s)}function ie(e,t,r,n,i,o,s){return ee(r^(t|~n),e,t,i,o,s)}var t=W("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}for(var n=function(e,t){e[t>>5]|=128<<t%32,e[Z(t)-1]=t;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=r,u=n,c=i,l=o;r=te(r,n,i,o,e[s],7,-680876936),o=te(o,r,n,i,e[s+1],12,-389564586),i=te(i,o,r,n,e[s+2],17,606105819),n=te(n,i,o,r,e[s+3],22,-1044525330),r=te(r,n,i,o,e[s+4],7,-176418897),o=te(o,r,n,i,e[s+5],12,1200080426),i=te(i,o,r,n,e[s+6],17,-1473231341),n=te(n,i,o,r,e[s+7],22,-45705983),r=te(r,n,i,o,e[s+8],7,1770035416),o=te(o,r,n,i,e[s+9],12,-1958414417),i=te(i,o,r,n,e[s+10],17,-42063),n=te(n,i,o,r,e[s+11],22,-1990404162),r=te(r,n,i,o,e[s+12],7,1804603682),o=te(o,r,n,i,e[s+13],12,-40341101),i=te(i,o,r,n,e[s+14],17,-1502002290),n=te(n,i,o,r,e[s+15],22,1236535329),r=re(r,n,i,o,e[s+1],5,-165796510),o=re(o,r,n,i,e[s+6],9,-1069501632),i=re(i,o,r,n,e[s+11],14,643717713),n=re(n,i,o,r,e[s],20,-373897302),r=re(r,n,i,o,e[s+5],5,-701558691),o=re(o,r,n,i,e[s+10],9,38016083),i=re(i,o,r,n,e[s+15],14,-660478335),n=re(n,i,o,r,e[s+4],20,-405537848),r=re(r,n,i,o,e[s+9],5,568446438),o=re(o,r,n,i,e[s+14],9,-1019803690),i=re(i,o,r,n,e[s+3],14,-187363961),n=re(n,i,o,r,e[s+8],20,1163531501),r=re(r,n,i,o,e[s+13],5,-1444681467),o=re(o,r,n,i,e[s+2],9,-51403784),i=re(i,o,r,n,e[s+7],14,1735328473),n=re(n,i,o,r,e[s+12],20,-1926607734),r=ne(r,n,i,o,e[s+5],4,-378558),o=ne(o,r,n,i,e[s+8],11,-2022574463),i=ne(i,o,r,n,e[s+11],16,1839030562),n=ne(n,i,o,r,e[s+14],23,-35309556),r=ne(r,n,i,o,e[s+1],4,-1530992060),o=ne(o,r,n,i,e[s+4],11,1272893353),i=ne(i,o,r,n,e[s+7],16,-155497632),n=ne(n,i,o,r,e[s+10],23,-1094730640),r=ne(r,n,i,o,e[s+13],4,681279174),o=ne(o,r,n,i,e[s],11,-358537222),i=ne(i,o,r,n,e[s+3],16,-722521979),n=ne(n,i,o,r,e[s+6],23,76029189),r=ne(r,n,i,o,e[s+9],4,-640364487),o=ne(o,r,n,i,e[s+12],11,-421815835),i=ne(i,o,r,n,e[s+15],16,530742520),n=ne(n,i,o,r,e[s+2],23,-995338651),r=ie(r,n,i,o,e[s],6,-198630844),o=ie(o,r,n,i,e[s+7],10,1126891415),i=ie(i,o,r,n,e[s+14],15,-1416354905),n=ie(n,i,o,r,e[s+5],21,-57434055),r=ie(r,n,i,o,e[s+12],6,1700485571),o=ie(o,r,n,i,e[s+3],10,-1894986606),i=ie(i,o,r,n,e[s+10],15,-1051523),n=ie(n,i,o,r,e[s+1],21,-2054922799),r=ie(r,n,i,o,e[s+8],6,1873313359),o=ie(o,r,n,i,e[s+15],10,-30611744),i=ie(i,o,r,n,e[s+6],15,-1560198380),n=ie(n,i,o,r,e[s+13],21,1309151649),r=ie(r,n,i,o,e[s+4],6,-145523070),o=ie(o,r,n,i,e[s+11],10,-1120210379),i=ie(i,o,r,n,e[s+2],15,718787259),n=ie(n,i,o,r,e[s+9],21,-343485551),r=Q(r,a),n=Q(n,u),i=Q(i,c),o=Q(o,l)}return[r,n,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,r=new Uint32Array(Z(t)),n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length),i=[],o=32*n.length,s="0123456789abcdef",a=0;a<o;a+=8){var u=n[a>>5]>>>a%32&255,u=parseInt(s.charAt(u>>>4&15)+s.charAt(15&u),16);i.push(u)}return i});function oe(e,t){return e<<t|e>>>32-t}var r=W("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i<n.length;++i)e.push(n.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=e[64*u+4*l]<<24|e[64*u+4*l+1]<<16|e[64*u+4*l+2]<<8|e[64*u+4*l+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var p=0;p<s;++p){for(var f=new Uint32Array(80),d=0;d<16;++d)f[d]=a[p][d];for(var h=16;h<80;++h)f[h]=oe(f[h-3]^f[h-8]^f[h-14]^f[h-16],1);for(var y=r[0],v=r[1],m=r[2],g=r[3],E=r[4],w=0;w<80;++w)var b=Math.floor(w/20),b=oe(y,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}(b,v,m,g)+E+t[b]+f[w]>>>0,E=g,g=m,m=oe(v,30)>>>0,v=y,y=b;r[0]=r[0]+y>>>0,r[1]=r[1]+v>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+g>>>0,r[4]=r[4]+E>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]});var se,ae,ue,ce,le,pe,fe,de,he,ye,ve,me,ge,Ee,we,be,Te,_e,Ie,Ae,Oe,Ne,Re,Se,Ce,xe,ke,Me,Ue,Pe,t=L(Object.freeze({__proto__:null,v1:function(e,t,r){var n=t&&r||0,i=t||new Array(16),o=(e=e||{}).node||B,r=void 0!==e.clockseq?e.clockseq:G,s=(null!=o&&null!=r||(s=e.random||(e.rng||V)(),null==o&&(o=B=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==r&&(r=G=16383&(s[6]<<8|s[7]))),void 0!==e.msecs?e.msecs:Date.now()),a=void 0!==e.nsecs?e.nsecs:$+1,u=s-q+(a-$)/1e4;if(u<0&&void 0===e.clockseq&&(r=r+1&16383),1e4<=(a=(u<0||q<s)&&void 0===e.nsecs?0:a))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");q=s,G=r,u=(1e4*(268435455&(s+=122192928e5))+($=a))%4294967296,i[n++]=u>>>24&255,i[n++]=u>>>16&255,i[n++]=u>>>8&255,i[n++]=255&u,e=s/4294967296*1e4&268435455,i[n++]=e>>>8&255,i[n++]=255&e,i[n++]=e>>>24&15|16,i[n++]=e>>>16&255,i[n++]=r>>>8|128,i[n++]=255&r;for(var c=0;c<6;++c)i[n+c]=o[c];return t||Y(i)},v3:t,v4:function(e,t,r){var n=(e=e||{}).random||(e.rng||V)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return Y(n)},v5:r,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(z(e))return parseInt(e.substr(14,1),16);throw TypeError("Invalid UUID")},validate:z,stringify:Y,parse:X})),r={exports:{}},n=(r.exports=(0,g="function"==typeof atob,y="function"==typeof btoa,h="function"==typeof Buffer,se="function"==typeof TextDecoder?new TextDecoder:void 0,ae="function"==typeof TextEncoder?new TextEncoder:void 0,ue=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ce=function(){var r={};return ue.forEach(function(e,t){return r[e]=t}),r}(),le=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,pe=String.fromCharCode.bind(String),fe="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},de=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})},he=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},So=function(e){for(var t,r,n,i="",o=e.length%3,s=0;s<e.length;){if(255<(t=e.charCodeAt(s++))||255<(r=e.charCodeAt(s++))||255<(n=e.charCodeAt(s++)))throw new TypeError("invalid character found");i+=ue[(t=t<<16|r<<8|n)>>18&63]+ue[t>>12&63]+ue[t>>6&63]+ue[63&t]}return o?i.slice(0,o-3)+"===".substring(o):i},ve=h?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],r=0,n=e.length;r<n;r+=4096)t.push(pe.apply(null,e.subarray(r,r+4096)));return ye(t.join(""))},ge=function(e){var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?pe(192|t>>>6)+pe(128|63&t):pe(224|t>>>12&15)+pe(128|t>>>6&63)+pe(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),pe(240|t>>>18&7)+pe(128|t>>>12&63)+pe(128|t>>>6&63)+pe(128|63&t))},Ee=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,be=h?function(e){return Buffer.from(e,"utf8").toString("base64")}:ae?function(e){return ve(ae.encode(e))}:function(e){return ye(we(e))},_e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ie=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return pe(55296+(t>>>10))+pe(56320+(1023&t));case 3:return pe((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return pe((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},vt=function(e){if(e=e.replace(/\s+/g,""),!le.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,r,n,i="",o=0;o<e.length;)t=ce[e.charAt(o++)]<<18|ce[e.charAt(o++)]<<12|(r=ce[e.charAt(o++)])<<6|(n=ce[e.charAt(o++)]),i+=64===r?pe(t>>16&255):64===n?pe(t>>16&255,t>>8&255):pe(t>>16&255,t>>8&255,255&t);return i},Ne=h?function(e){return fe(Buffer.from(e,"base64"))}:function(e){return fe(Oe(e).split("").map(function(e){return e.charCodeAt(0)}))},Se=h?function(e){return Buffer.from(e,"base64").toString("utf8")}:se?function(e){return se.decode(Ne(e))}:function(e){return Ae(Oe(e))},Ce=function(e){return he(e.replace(/[-_]/g,function(e){return"-"==e?"+":"/"}))},ke=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},Pe={version:"3.7.5",VERSION:"3.7.5",atob:Oe=g?function(e){return atob(he(e))}:h?function(e){return Buffer.from(e,"base64").toString("binary")}:vt,atobPolyfill:vt,btoa:ye=y?function(e){return btoa(e)}:h?function(e){return Buffer.from(e,"binary").toString("base64")}:So,btoaPolyfill:So,fromBase64:xe=function(e){return Se(Ce(e))},toBase64:Te=function(e,t){return(t=void 0===t?!1:t)?de(be(e)):be(e)},encode:Te,encodeURI:g=function(e){return Te(e,!0)},encodeURL:g,utob:we=function(e){return e.replace(Ee,ge)},btou:Ae=function(e){return e.replace(_e,Ie)},decode:xe,isValid:function(e){if("string"!=typeof e)return!1;e=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:me=function(e,t){return(t=void 0===t?!1:t)?de(ve(e)):ve(e)},toUint8Array:Re=function(e){return Ne(Ce(e))},extendString:Me=function(){function e(e,t){Object.defineProperty(String.prototype,e,ke(t))}e("fromBase64",function(){return xe(this)}),e("toBase64",function(e){return Te(this,e)}),e("toBase64URI",function(){return Te(this,!0)}),e("toBase64URL",function(){return Te(this,!0)}),e("toUint8Array",function(){return Re(this)})},extendUint8Array:Ue=function(){function e(e,t){Object.defineProperty(Uint8Array.prototype,e,ke(t))}e("toBase64",function(e){return me(this,e)}),e("toBase64URI",function(){return me(this,!0)}),e("toBase64URL",function(){return me(this,!0)})},extendBuiltins:function(){Me(),Ue()},Base64:{}},Object.keys(Pe).forEach(function(e){return Pe.Base64[e]=Pe[e]}),Pe),l),De=(Object.defineProperty(n,"__esModule",{value:!0}),t),Le=r.exports,a=(Ge.isNotNullOrUndefined=function(e){return null!=e},Ge.isNullOrUndefined=function(e){return null==e},Ge.requiredNotNullOrUndefined=function(e,t){if(void 0===t&&(t=function(){return"Required value is null or undefined"}),this.isNullOrUndefined(e))throw new Error(t());return e},Ge.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r},Ge),p=(Be.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);a.isNotNullOrUndefined(o)&&r.push(o)}return r},Be.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r},Be.associateTo=function(e,t,r){for(var n=0,i=e;n<i.length;n++){var o=r(i[n]);t.set(o[0],o[1])}return t},Be.associate=function(e,t){return this.associateTo(e,new Map,t)},Be.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},Be.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},Be),Fe={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},i=(ze.setLogLevel=function(e){this.logLevel=e=void 0===e?Fe.INFO:e},ze.initCounter=function(t){this.counters=p.associate(Object.keys(Fe),function(e){return[e,t(e)]})},ze._log=function(e,t){var r;switch(e){case"WARN":r="orange";break;case"ERROR":r="red";break;default:r="#AAAAAA"}if(t instanceof Error)je.log(e,r,t.message,t);else try{je.log(e,r,t)}catch(e){}},ze.increment=function(e){var t;null!=(t=null==(t=ze.counters)?void 0:t.get(e))&&t.increment()},ze.logLevel=Fe.INFO,ze.log={error:function(e){Fe.ERROR<=ze.logLevel&&(ze._log("ERROR",e),ze.increment("ERROR"))},warn:function(e){Fe.WARN<=ze.logLevel&&(ze._log("WARN",e),ze.increment("WARN"))},info:function(e){Fe.INFO<=ze.logLevel&&(ze._log("INFO",e),ze.increment("INFO"))},debug:function(e){Fe.DEBUG<=ze.logLevel&&(ze._log("DEBUG",e),ze.increment("DEBUG"))}},ze),je=(He.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}},He),Ve=function(e,t){return(Ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function He(){}function ze(){}function Be(){}function Ge(){}function Ke(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ve(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}o((u=u.apply(e,s||[])).next())})}function s(n,i){var o,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((a=0<(a=u.trys).length&&a[a.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=i.call(n,u)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Je(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var Ye=i.log,qe=(at.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},at.isEquals=function(t,r){if(null==r)return!1;var e=Object.keys(t);return e.length===Object.keys(r).length&&e.every(function(e){return t[e]===r[e]})},at.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i=n[r],o=i[0],i=i[1];this.isValidType(o)?(i=this.sanitizeValue(i),a.isNullOrUndefined(i)?Ye.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Ye.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}return t},at.isValidType=function(e){return!a.isNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH},at.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},at.MAX_IDENTIFIER_TYPE_LENGTH=128,at.MAX_IDENTIFIER_VALUE_LENGTH=512,at),$e=i.log,Xe=(st.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i,o=n[r],s=o[0],o=o[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){$e.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),a.isNullOrUndefined(i)?$e.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):$e.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},st.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},st.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},st.sanitizeValue=function(e,t){var r=this;return"string"==typeof e&&e.startsWith(this.SYSTEM_PROPERTY_KEY_PREFIX)?t:this.isValidValue(t)?Array.isArray(t)?t.filter(function(e){return r.isValidElement(e)}):t:null},st.isValidValue=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e?!isNaN(e)&&isFinite(e):"boolean"==typeof e||Array.isArray(e))},st.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},st.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},st.SYSTEM_PROPERTY_KEY_PREFIX="$",st.MAX_PROPERTIES_COUNT=128,st.MAX_PROPERTY_KEY_LENGTH=128,st.MAX_PROPERTY_VALUE_LENGTH=1024,st),We=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],Ze=(u.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(u.C1/u.C0);case"milliseconds":return e/(u.C2/u.C0);case"seconds":return e/(u.C3/u.C0);case"minutes":return e/(u.C4/u.C0);case"hours":return e/(u.C5/u.C0);case"days":return e/(u.C6/u.C0)}},u.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C1/u.C0);case"milliseconds":return e/(u.C2/u.C1);case"microseconds":return e;case"seconds":return e/(u.C3/u.C1);case"minutes":return e/(u.C4/u.C1);case"hours":return e/(u.C5/u.C1);case"days":return e/(u.C6/u.C1)}},u.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C2/u.C0);case"microseconds":return e*(u.C2/u.C1);case"milliseconds":return e;case"seconds":return e/(u.C3/u.C2);case"minutes":return e/(u.C4/u.C2);case"hours":return e/(u.C5/u.C2);case"days":return e/(u.C6/u.C2)}},u.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C3/u.C0);case"microseconds":return e*(u.C3/u.C1);case"milliseconds":return e*(u.C3/u.C2);case"seconds":return e;case"minutes":return e/(u.C4/u.C3);case"hours":return e/(u.C5/u.C3);case"days":return e/(u.C6/u.C3)}},u.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C4/u.C0);case"microseconds":return e*(u.C4/u.C1);case"milliseconds":return e*(u.C4/u.C2);case"seconds":return e*(u.C4/u.C3);case"minutes":return e;case"hours":return e/(u.C5/u.C4);case"days":return e/(u.C6/u.C4)}},u.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C5/u.C0);case"microseconds":return e*(u.C5/u.C1);case"milliseconds":return e*(u.C5/u.C2);case"seconds":return e*(u.C5/u.C3);case"minutes":return e*(u.C5/u.C4);case"hours":return e;case"days":return e/(u.C6/u.C5)}},u.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(u.C6/u.C0);case"microseconds":return e*(u.C6/u.C1);case"milliseconds":return e*(u.C6/u.C2);case"seconds":return e*(u.C6/u.C3);case"minutes":return e*(u.C6/u.C4);case"hours":return e*(u.C6/u.C5);case"days":return e}},u.C6=24*(u.C5=60*(u.C4=60*(u.C3=1e3*(u.C2=1e3*(u.C1=1e3*(u.C0=1)))))),u.converter={nanoseconds:u.nanosToUnit,microseconds:u.microsToUnit,milliseconds:u.millisToUnit,seconds:u.secondsToUnit,minutes:u.minutesToUnit,hours:u.hoursToUnit,days:u.daysToUnit},u),Qe=(ot.prototype.tick=function(){return 1e3*Date.now()},ot.prototype.currentMillis=function(){return Date.now()},ot.instance=new ot,ot),et=(it.prototype.get=function(e,t){return t},it),tt=(nt.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t},nt),rt=i.log;function nt(e){this.parameters=e}function it(){}function ot(){}function u(){}function st(){}function at(){}function ut(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||rt.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function ct(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=ut(e,i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r}}function lt(e){var t=new It;return t.addIdentifiers(e.identifiers||{}),t.add(_t.ID,e.id),t.add(_t.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(_t.USER,e.userId),t.build()}function pt(e){var t,r={};return r.id=null!=(t=qe.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=qe.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=qe.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Xe.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=qe.sanitize(e.identifiers)),Boolean(r.id||r.userId||r.deviceId||r.identifiers&&0<Object.keys(r.identifiers).length)?r:null}sr.of=function(e,t){return new sr(e,t)};var ft=sr,dt=(or.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},or.of=function(e,t,r){return new or(t,r,e)},or),ht=(ir.of=function(e,t,r){return new ir(e,t,r=void 0===r?new et:r)},ir.prototype.get=function(e,t){return this.config.get(e,t)},ir),yt=(nr.on=function(e,t){return new nr(!0,e,t=void 0===t?new et:t)},nr.off=function(e,t){return new nr(!1,e,t=void 0===t?new et:t)},nr.prototype.get=function(e,t){return this.config.get(e,t)},nr),vt=(rr.prototype.get=function(e,t){return t},rr),mt=(tr.fromJson=function(e){return new tr(e.id,new tt(p.associate(e.parameters,function(e){return[e.key,e.value]})))},tr.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}},tr),f=(d.SDK_NOT_READY="SDK_NOT_READY",d.EXCEPTION="EXCEPTION",d.INVALID_INPUT="INVALID_INPUT",d.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",d.TYPE_MISMATCH="TYPE_MISMATCH",d.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",d.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",d.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",d.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",d.OVERRIDDEN="OVERRIDDEN",d.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",d.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",d.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",d.VARIATION_DROPPED="VARIATION_DROPPED",d.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",d.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",d.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",d.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",d.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",d.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",d.TARGET_RULE_MATCH="TARGET_RULE_MATCH",d.DEFAULT_RULE="DEFAULT_RULE",d.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",d.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",d.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",d.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",d.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",d.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",d.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",d.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET",d),gt=(er.fromJson=function(e,t){var r=er.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new Et(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),i=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),o=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return Ct.fromJson(e,mr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return At.fromJson(e,mr.PROPERTY)}),a=vn.fromJson(t.execution.targetUrls),u=er.experimentImplementationTypeOrNull(t.implementationType),c=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return Ct.fromJson(e,mr.PROPERTY)}),l=St.fromJson(t.execution.defaultRule);return r&&u&&l&&new er(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,i,o,s,a,c,l,t.containerId,u,t.winnerVariationId)},er.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void rt.debug("Unsupported status [".concat(e,"]"))}},er.experimentImplementationTypeOrNull=function(e){switch(e){case"DEFAULT":return"DEFAULT";case"SPLIT_URL":return"SPLIT_URL";default:return void rt.debug("Unsupported implementationType [".concat(e,"]"))}},er.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},er.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},er.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},er),Et=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},wt=(Qt.fromJson=function(e){return new Qt(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new bt(t,r,e)}))},Qt),bt=(Zt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive},Zt),Tt=(Wt.fromJson=function(e){return new Wt(e.id,e.key)},Wt),_t=(Xt.ID="$id",Xt.USER="$userId",Xt.DEVICE="$deviceId",Xt.SESSION="$sessionId",Xt.HACKLE_DEVICE="$hackleDeviceId",Xt),It=($t.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},$t.prototype.add=function(e,t){var r=qe.sanitizeValue(t);return qe.isValidType(e)&&r?this.identifiers[e]=t:rt.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},$t.prototype.build=function(){return this.identifiers},$t),At=(qt.fromJson=function(e,t){return new qt(p.mapNotNullOrUndefined(e.conditions,function(e){return Ot.fromJson(e,t)}))},qt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}},qt),Ot=(Yt.fromJson=function(e,t){var r=Nt.fromJson(e.key);if(r&&t.supports(r.type))return(t=Rt.fromJson(e.match))&&new Yt(r,t)},Yt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}},Yt),Nt=(Jt.fromJson=function(e){var t=ut(yr,e.type);return t&&new Jt(t,e.name)},Jt.prototype.toJson=function(){return{type:this.type,name:this.name}},Jt),Rt=(Kt.fromJson=function(e){var t=ut(pr,e.type),r=ut(dr,e.operator),n=ut(fr,e.valueType);return t&&r&&n&&new Kt(t,r,n,e.values)},Kt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}},Kt),St=(Gt.fromJson=function(e){var t=ut(hr,e.type);return t&&new Gt(t,e.variationId,e.bucketId)},Gt),Ct=(Bt.fromJson=function(e,t){t=At.fromJson(e.target,t),e=St.fromJson(e.action);return t&&e&&new Bt(t,e)},Bt),xt=(zt.fromJson=function(e){var t=ut(vr,e.type);return t&&new zt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return At.fromJson(e,mr.SEGMENT)}))},zt),kt=(Ht.fromJson=function(e){return new Ht(e.id,e.bucketId,e.groups.map(function(e){return Mt.fromJson(e)}))},Ht.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})},Ht),Mt=(Vt.fromJson=function(e){return new Vt(e.id,e.experiments)},Vt),Ut=(jt.fromJson=function(e){var t=ut(fr,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return Pt.fromJson(e,mr.PROPERTY)}),n=Dt.fromJson(e.defaultValue);return t&&new jt(e.id,e.key,t,e.identifierType,r,n)},jt),Pt=(Ft.fromJson=function(e,t){t=At.fromJson(e.target,t);return t&&new Ft(e.key,e.name,t,e.bucketId,Dt.fromJson(e.value))},Ft),Dt=(Lt.fromJson=function(e){return new Lt(e.id,e.value)},Lt);function Lt(e,t){this.id=e,this.rawValue=t}function Ft(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}function jt(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}function Vt(e,t){this.id=e,this.experiments=t}function Ht(e,t,r){this.id=e,this.bucketId=t,this.groups=r}function zt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}function Bt(e,t){this.target=e,this.action=t}function Gt(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}function Kt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}function Jt(e,t){this.type=e,this.name=t}function Yt(e,t){this.key=e,this.match=t}function qt(e){this.conditions=e}function $t(){this.identifiers={}}function Xt(){}function Wt(e,t){this.id=e,this.key=t}function Zt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}function Qt(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}function er(e,t,r,n,i,o,s,a,u,c,l,p,f,d,h,y,v){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=i,this.version=o,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.splitUrlTargets=p,this.targetRules=f,this.defaultRule=d,this.containerId=h,this.implementationType=y,this.winnerVariationId=v}function d(){}function tr(e,t){this.id=e,this.config=t}function rr(){}function nr(e,t,r){this.isOn=e,this.reason=t,this.config=r}function ir(e,t,r){this.variation=e,this.reason=t,this.config=r}function or(e,t,r){this.inAppMessage=e,this.message=t,this.reason=r}function sr(e,t){this.value=e,this.reason=t}function ar(e){this.id=e}hn.tryParse=function(e){var t,r,n,i,e=hn.regExp.exec(e);if(e)return e[0],t=e[1],r=void 0===(r=e[2])?"0":r,n=void 0===(n=e[3])?"0":n,i=e[4],e=e[5],new hn(new cr(parseInt(t,10),parseInt(r,10),parseInt(n,10)),lr.parse(i),lr.parse(e))},hn.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},hn.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},hn.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},hn.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},hn.prototype.isLessThan=function(e){return this.compareTo(e)<0},hn.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},hn.regExp=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;var ur=hn,cr=(dn.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch},dn),lr=(fn.parse=function(e){return e?new fn(e.split(".")):fn.EMPTY},fn.prototype.isEmpty=function(){return 0===this.identifiers.length},fn.prototype.isNotEmpty=function(){return!this.isEmpty()},fn.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},fn.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=fn.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},fn.compareIdentifiers=function(e,t){return fn.numericIdentifierRegExp.test(e)&&fn.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},fn.EMPTY=new fn([]),fn.numericIdentifierRegExp=/^(0|[1-9]\d*)$/,fn),pr=["MATCH","NOT_MATCH"],fr=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],dr=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],hr=["VARIATION","BUCKET"],yr=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"],vr=["USER_ID","USER_PROPERTY"],mr=(pn.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},pn.IDENTIFIER=new pn("SEGMENT"),pn.PROPERTY=new pn("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),pn.SEGMENT=new pn("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),pn),gr=["ACTIVE","DRAFT","PAUSE"],Er=["WEB","ANDROID","IOS"],wr=["IMMEDIATE","CUSTOM"],br=["MODAL"],Tr=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY"],_r=["VERTICAL","HORIZONTAL"],Ir=["CLICK"],Ar=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Or=(ln.fromJson=function(e){var t,r=ut(gr,e.status);if(!a.isNullOrUndefined(r)){switch(ut(wr,e.timeUnit)){case"IMMEDIATE":t=new Nr;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new Rr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=Dr.fromJson(e.messageContext);if(!a.isNullOrUndefined(o))return n=e.eventTriggerRules.map(Cr.fromJson),i=xr.fromJson(e.eventFrequencyCap),new ln(e.id,e.key,r,t,new Sr(n,i),Ur.fromJson(e.targetContext),o)}},ln.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},ln),Nr=(cn.prototype.within=function(e){return!0},cn),Rr=(un.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive},un),Sr=function(e,t){this.rules=e,this.frequencyCap=t},Cr=(an.fromJson=function(e){return new an(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return At.fromJson(e,mr.PROPERTY)}))},an),xr=(sn.fromJson=function(e){return e?new sn(e.identifiers.map(kr.fromJson),Mr.fromJson(e.duration)):null},sn),kr=(on.fromJson=function(e){return new on(e.identifierType,e.countPerIdentifier)},on),Mr=(nn.fromJson=function(e){if(!e)return null;var t=ut(We,e.durationUnit.timeUnit);return t?new nn(Ze.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null},nn),Ur=(rn.fromJson=function(e){return new rn(e.overrides.map(Pr.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return At.fromJson(e,mr.PROPERTY)}))},rn),Pr=(tn.fromJson=function(e){return new tn(e.identifierType,e.identifiers)},tn),Dr=(en.fromJson=function(e){var t=ct(Er,e.platformTypes);if(!a.isNullOrUndefined(t)){var r=ct(_r,e.orientations);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.messages,Lr.fromJson);if(!a.isNullOrUndefined(n))return new en(e.defaultLang,t,r,n)}}},en),Lr=(Qr.fromJson=function(e){var t=Fr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=p.mapOrUndefined(e.images,jr.fromJson);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.buttons,Br.fromJson);if(!a.isNullOrUndefined(n)){var i=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(i=Br.fromJson2(e.closeButton),!a.isNullOrUndefined(i)))return new Qr(e.lang,t,r,e.text?Vr.fromJson(e.text):void 0,n,i,new Kr(e.background.color))}}}},Qr.prototype.toJson=function(){var e;return{lang:this.lang,layout:{layoutType:this.layout.layoutType,displayType:this.layout.displayType},images:this.images.map(function(e){return e.toJson()}),text:null!=(e=null==(e=this.text)?void 0:e.toJson())?e:null,closeButton:null!=(e=null==(e=this.closeButton)?void 0:e.toCloseButtonJson())?e:null,buttons:this.buttons.map(function(e){return e.toJson()}),background:{color:this.background.color}}},Qr),Fr=(Zr.fromJson=function(e){var t=ut(Tr,e.layoutType),e=ut(br,e.displayType);if(!a.isNullOrUndefined(e)&&!a.isNullOrUndefined(t))return new Zr(e,t)},Zr),jr=(Wr.fromJson=function(e){var t=ut(_r,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=Jr.fromJson(e.action),!a.isNullOrUndefined(r)))return new Wr(t,e.imagePath,r)}},Wr.prototype.toJson=function(){var e;return{orientation:this.orientation,imagePath:this.imagePath,action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null}},Wr),Vr=(Xr.fromJson=function(e){return new Xr(Hr.fromJson(e.title),Hr.fromJson(e.body))},Xr.prototype.toJson=function(){return{title:{text:this.title.text,style:{textColor:this.title.style.color}},body:{text:this.body.text,style:{textColor:this.body.style.color}}}},Xr),Hr=($r.fromJson=function(e){return new $r(e.text,new zr(e.style.textColor))},$r),zr=function(e){this.color=e},Br=(qr.fromJson=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new qr(e.text,new Gr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},qr.fromJson2=function(e){var t=Jr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new qr("✕",new Gr(e.style.color,"#FFFFFF","#FFFFFF"),t)},qr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.backgroundColor}}},qr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},qr),Gr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Kr=function(e){this.color=e},Jr=(Yr.fromJson=function(e){var t=ut(Ir,e.behavior);if(!a.isNullOrUndefined(t)){var r=ut(Ar,e.type);if(!a.isNullOrUndefined(r))return new Yr(t,r,null!=(t=e.value)?t:void 0)}},Yr.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Yr);function Yr(e,t,r){this.behavior=e,this.type=t,this.value=r}function qr(e,t,r){this.text=e,this.style=t,this.action=r}function $r(e,t){this.text=e,this.style=t}function Xr(e,t){this.title=e,this.body=t}function Wr(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}function Zr(e,t){this.displayType=e,this.layoutType=t}function Qr(e,t,r,n,i,o,s){this.lang=e,this.layout=t,this.images=r,this.text=n,this.buttons=i,this.closeButton=o,this.background=s}function en(e,t,r,n){this.defaultLang=e,this.platformTypes=t,this.orientations=r,this.messages=n}function tn(e,t){this.identifierType=e,this.identifiers=t}function rn(e,t){this.overrides=e,this.targets=t}function nn(e,t){this.durationMillis=e,this.count=t}function on(e,t){this.identifierType=e,this.count=t}function sn(e,t){this.identifierCaps=e,this.durationCap=t}function an(e,t){this.eventKey=e,this.targets=t}function un(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}function cn(){this.type="IMMEDIATE"}function ln(e,t,r,n,i,o,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s}function pn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}function fn(e){this.identifiers=e}function dn(e,t,r){this.major=e,this.minor=t,this.patch=r}function hn(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Tn.fromDto=function(e){var t;return new Tn(e.needRedirect,(t=e.properties.type,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null),e.properties.value)};var yn=Tn,vn=(bn.fromJson=function(e){if(null!==e)return new bn(p.mapNotNullOrUndefined(e.match,function(e){return At.fromJson(e,mr.PROPERTY)}),p.mapNotNullOrUndefined(e.notMatch,function(e){return At.fromJson(e,mr.PROPERTY)}))},bn),mn=(wn.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},wn.prototype.tag=function(e,t){return this._tags[e]=t,this},wn.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},wn),gn=(En.start=function(e){return new En(e=void 0===e?En.defaultClock:e)},En.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},En.defaultClock=new Qe,En);function En(e){this._clock=e,this.startTime=this._clock.tick()}function wn(e){this.name=e,this._tags={},this.name=e}function bn(e,t){this.includeTargets=e,this.excludeTargets=t}function Tn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}In.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},In.prototype.tag=function(e,t){return this._tags[e]=t,this},In.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var _n=In;function In(e){this.name=e,this._tags={}}Object.defineProperty(On.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var An=On;function On(e,t){this.valueSupplier=t,this.field=e}function Nn(e,t){return e.name===t.name&&qe.isEquals(e.tags,t.tags)}Dn.prototype.count=function(){return this.counterValue},Dn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},Dn.prototype.measure=function(){return[new An("count",this.count.bind(this))]};var Rn,Sn=Dn,Cn=(Pn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new Sn(this.id),e},Pn.prototype.count=function(){return this.currentCounter.count()},Pn.prototype.increment=function(e){this.currentCounter.increment(e)},Pn.prototype.measure=function(){return[new An("count",this.count.bind(this))]},Pn),xn=(Un.prototype.values=function(){return Array.from(this.data.values())},Un.prototype.keys=function(){return Array.from(this.data.keys())},Un.prototype.get=function(t){var r=this,e=this.keys().find(function(e){return r.compareFn(e,t)});return e?this.data.get(e):void 0},Un.prototype.has=function(e){return void 0!==this.get(e)},Un.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},Un.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},Un.prototype.forEach=function(e){this.data.forEach(e)},Un.prototype.filter=function(e){for(var t=new Un(this.compareFn),r=0,n=this.entries();r<n.length;r++){var i=n[r];e(i[0],i[1])&&t.add(i[0],i[1])}return t},Un.prototype.entries=function(){return Array.from(this.data.entries())},Un);Object.defineProperty(Mn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Mn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Mn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Mn.prototype.counter=function(e,t){return void 0===t&&(t={}),new _n(e).tags(t).register(this)},Mn.prototype.timer=function(e,t){return void 0===t&&(t={}),new mn(e).tags(t).register(this)},Mn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Mn.prototype.getOrCreateMetric=function(e,t){var r,n=this._metrics.get(e);return n?r=n:(r=t(e),this._metrics.add(e,r)),r},Mn.prototype.close=function(){};Ke(kn,Rn=y=Mn),kn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),i.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},kn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),i.log.debug("PushMetricRegistry stopped.")},kn.prototype.close=function(){this.stop()};var h=kn;function kn(e,t){var r=Rn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}function Mn(){this.id=De.v4(),this.name="MetricRegistry",this._metrics=new xn(Nn)}function Un(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}function Pn(e){this.id=e,this.currentCounter=new Sn(e)}function Dn(e){this.counterValue=0,this.id=e}Jn.prototype.count=function(){return this._count},Jn.prototype.totalTime=function(e){return Ze.nanosToUnit(this._total,e)},Jn.prototype.max=function(e){return Ze.nanosToUnit(this._max,e)},Jn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Jn.prototype.record=function(e,t){e<0||(t=Ze.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},Jn.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]};var Ln,Fn=Jn,jn=(Kn.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Fn(this.id),e},Kn.prototype.count=function(){return this.currentTimer.count()},Kn.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},Kn.prototype.max=function(e){return this.currentTimer.max(e)},Kn.prototype.record=function(e,t){this.currentTimer.record(e,t)},Kn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Kn.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]},Kn),h=(Ke(Gn,Ln=h),Gn.prototype.createCounter=function(e){return new Cn(e)},Gn.prototype.createTimer=function(e){return new jn(e)},Gn.prototype.publish=function(e){void 0===e&&(e=!1);var t=this.metrics.reduce(function(e,t){return void 0!==t.flush&&"function"==typeof t.flush?e.concat(t.flush()):e},[]);this.flushMetrics(t,e)},Gn.prototype.close=function(){Ln.prototype.close.call(this)},Gn),Vn=(Bn.prototype.count=function(){return 0},Bn.prototype.increment=function(e){},Bn.prototype.measure=function(){return[new An("count",this.count.bind(this))]},Bn),Hn=(Object.defineProperty(zn.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),zn.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},zn.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},zn.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},zn.prototype.measure=function(){return[new An("count",this.count.bind(this))]},zn);function zn(e){this._counters=new xn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new Vn(e)}function Bn(e){this.id=e}function Gn(e,t){return Ln.call(this,e,t)||this}function Kn(e){this.id=e,this.currentTimer=new Fn(e)}function Jn(e){this._count=0,this._total=0,this._max=0,this.id=e}Ni.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]},Ni.prototype.count=function(){return 0},Ni.prototype.totalTime=function(e){return 0},Ni.prototype.max=function(e){return 0},Ni.prototype.mean=function(e){return 0},Ni.prototype.record=function(e,t){};var Yn,qn,$n,Xn=Ni,Wn=(Object.defineProperty(Oi.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),Oi.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},Oi.prototype.max=function(e){return this.firstTimer.max(e)},Oi.prototype.mean=function(e){return this.firstTimer.mean(e)},Oi.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(Oi.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),Oi.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},Oi.prototype.count=function(){return this.firstTimer.count()},Oi.prototype.measure=function(){var e=this;return[new An("count",this.count.bind(this)),new An("total",function(){return e.totalTime("milliseconds")}),new An("max",function(){return e.max("milliseconds")}),new An("mean",function(){return e.mean("milliseconds")})]},Oi),y=(Ke(Ai,$n=y),Ai.prototype.createCounter=function(e){e=new Hn(e);return this.addRegistry(e),e},Ai.prototype.createTimer=function(e){e=new Wn(e);return this.addRegistry(e),e},Ai.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},Ai.prototype.add=function(t){t instanceof Ai||this.registries.has(t)||(this.registries.add(t),this.metrics.forEach(function(e){void 0!==e.add&&"function"==typeof e.add&&e.add(t)}))},Ai.prototype.close=function(){this.registries.forEach(function(e){e.close()})},Ai),Zn=(Ii.counter=function(e,t){return Ii.globalRegistry.counter(e,t)},Ii.timer=function(e,t){return Ii.globalRegistry.timer(e,t)},Ii.addRegistry=function(e){Ii.globalRegistry.add(e),i.log.debug("MetricRegistry added ".concat(e.name))},Ii.globalRegistry=new y,Ii),Qn=(_i.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},_i),ei=(Ti.builder=function(){return new ti},Ti.get=function(e){return Ti.builder().url(e).build()},Ti.prototype.toBuilder=function(){return new ti(this)},Ti),ti=(bi.prototype.url=function(e){return this._url=e,this},bi.prototype.method=function(e){return this._method=e,this},bi.prototype.body=function(e){return this._body=e,this},bi.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},bi.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},bi.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new ei(this._url,this._method,this._body,this._headers.build(),e)},bi),ri=(wi.ok=function(e,t){return wi.of(200,e,t)},wi.of=function(e,t,r){return new wi(e,null!=t?t:null,null!=r?r:ni.empty())},wi.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},wi.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},wi.prototype.isNotModified=function(){return 304===this.statusCode},wi),ni=(Ei.empty=function(){return new Ei(new Map)},Ei.builder=function(){return new ii(new Map)},Ei.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],i=n[0],n=n[1];if(Qn.equalsIgnoreCase(i,e))return n}return null},Ei.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Ei.prototype.raw=function(){return Array.from(this.headers.entries()).reduce(function(e,t){var r=t[0],t=t[1];return e[r]=t,e},{})},Ei.prototype.toBuilder=function(){return new ii(this.headers)},Ei.IF_MODIFIED_SINCE="If-Modified-Since",Ei.LAST_MODIFIED="Last-Modified",Ei),ii=(gi.prototype.add=function(e,t){return this.headers.set(e,t),this},gi.prototype.build=function(){return new ni(this.headers)},gi),oi=(Ke(mi,qn=h),mi.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),100).forEach(function(e){r.dispatch(e,t)})},mi.prototype.isDispatchTarget=function(e){return!("COUNTER"!==e.id.type&&"TIMER"!==e.id.type)&&0<e.count()},mi.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return i.log.debug("Failed to flushing metrics: ".concat(e))})},mi.prototype.createRequest=function(e){return ei.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},mi.prototype.execute=function(e,t){return(t?this.shutdownTransport:this.transport).send(e)},mi.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:a.fromMap(p.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},mi.prototype.createCounter=function(e){return new Cn(e)},mi.prototype.createTimer=function(e){return new jn(e)},mi.prototype.close=function(){qn.prototype.close.call(this)},mi),si=(vi.experiment=function(e,t,r){t=Zn.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},vi.featureFlag=function(e,t,r){t=Zn.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},vi.remoteConfig=function(e,t,r){t=Zn.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},vi.inAppMessage=function(e,t,r){t=Zn.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)},vi),ai=(yi.record=function(e,t,r){e=Zn.timer("api.call",{operation:e,success:yi.success(r)});t.stop(e)},yi.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())},yi),ui=(hi.decide=function(e,t,r,n){if(a.isNullOrUndefined(r))return this.decision(e,t,"NULL",r,n);switch(typeof r){case"string":return this.decision(e,t,"STRING",r,n);case"number":return this.decision(e,t,"NUMBER",r,n);case"boolean":return this.decision(e,t,"BOOLEAN",r,n);default:return this.decision(e,t,"UNKNOWN",r,n)}},hi.decision=function(e,t,r,n,i){return a.isNullOrUndefined(t)?ft.of(n,f.INVALID_INPUT):e.remoteConfig(t,i,r,n)},hi),ci=i.log,li=(di.prototype.get=function(e,t){var r,n=gn.start();try{r=this.decide(e,t)}catch(n){ci.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(n)),r=ft.of(t,f.EXCEPTION)}return si.remoteConfig(n,e,r),r.value},di.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return ui.decide(this.core,e,t,r)},di),pi=(fi.prototype.contains=function(e){return this._properties.has(e)},fi.prototype.remove=function(e){var r=this;return e instanceof Map&&e.forEach(function(e,t){r.remove(t)}),"string"==typeof e&&this._properties.delete(e),this},fi.prototype.compute=function(e,t){var r=this._properties.get(e),t=t(r);null!==t?this.add(e,t):null===r&&!this.contains(e)||this.remove(e)},fi.prototype.add=function(e,t,r){if((r=void 0===r?!1:r)&&this.contains(e))return this;if(this._properties.size>=this.MAX_PROPERTIES_COUNT)return this;if("string"==typeof e&&e.length>this.MAX_PROPERTY_KEY_LENGTH)return this;r=Xe.sanitizeValue(e,t);return a.isNullOrUndefined(r)||this._properties.set(e,r),this},fi.prototype.addProperties=function(e,r){var n=this;return void 0===r&&(r=!1),e.forEach(function(e,t){n.add(t,e,r)}),this},fi.prototype.build=function(){return this._properties},fi);function fi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}function di(e,t,r){this.core=e,this.userManager=t,this.user=r}function hi(){}function yi(){}function vi(){}function mi(e,t,r,n,i){n=qn.call(this,n,i)||this;return n.url=e,n.transport=t,n.shutdownTransport=r,n.start(),n}function gi(e){this.headers=e}function Ei(e){this.headers=e}function wi(e,t,r){this.statusCode=e,this.body=t,this.headers=r}function bi(e){var t;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(t=null==e?void 0:e.method)?t:"GET",this._body=null!=(t=null==e?void 0:e.body)?t:null,this._headers=null!=(t=null==(t=null==e?void 0:e.headers)?void 0:t.toBuilder())?t:ni.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}function Ti(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}function _i(){}function Ii(){}function Ai(){var e=null!==$n&&$n.apply(this,arguments)||this;return e.registries=new xn(function(e,t){return e.id===t.id}),e}function Oi(e){this._timers=new xn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new Xn(e)}function Ni(e){this.id=e}(y=Yn=Yn||{}).SET="$set",y.SET_ONCE="$setOnce",y.UNSET="$unset",y.INCREMENT="$increment",y.APPEND="$append",y.APPEND_ONCE="$appendOnce",y.PREPEND="$prepend",y.PREPEND_ONCE="$prependOnce",y.REMOVE="$remove",y.CLEAR_ALL="$clearAll",Eo.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new pi).addProperties(e).addProperties(t).build()};var Ri,Si,Ci,xi,ki,Mi=Eo,Ui=(go.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new pi).addProperties(e).addProperties(t,!0).build()},go),Pi=(mo.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new pi).addProperties(e).remove(t).build()},mo),Di=(vo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new pi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},vo.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t},vo);yo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new pi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},yo.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},yo.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},yo.prototype.contains=function(e,t){return e.includes(t)},yo.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Je([e],t,!0)},yo.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Je(Je([],e,!0),[t],!1)};Ke(ho,ki=h=yo),ho.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var Li=ho,Fi=(Ke(fo,xi=h),fo.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},fo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},fo),ji=(Ke(po,Ci=h),po.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)},po),Vi=(Ke(lo,Si=h),lo.prototype.operateArray=function(e,t){var r=this;return t.reduce(this.appendOnce.bind(this),[]).reduceRight(function(e,t){return r.prependOnce.bind(r)(t,e)},e)},lo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},lo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)},lo),Hi=(Ke(co,Ri=h),co.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},co.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})},co),zi=(uo.prototype.operate=function(e,t){return new Map},uo),Bi=(ao.get=function(e){switch(e){case Yn.SET:return new Mi;case Yn.SET_ONCE:return new Ui;case Yn.UNSET:return new Pi;case Yn.INCREMENT:return new Di;case Yn.APPEND:return new Li;case Yn.APPEND_ONCE:return new Fi;case Yn.PREPEND:return new ji;case Yn.PREPEND_ONCE:return new Vi;case Yn.CLEAR_ALL:return new zi;case Yn.REMOVE:return new Hi}},ao),Gi=(so.prototype.set=function(e,t){return this.add(Yn.SET,e,t)},so.prototype.setOnce=function(e,t){return this.add(Yn.SET_ONCE,e,t)},so.prototype.unset=function(e){return this.add(Yn.UNSET,e,"-")},so.prototype.increment=function(e,t){return this.add(Yn.INCREMENT,e,t)},so.prototype.append=function(e,t){return this.add(Yn.APPEND,e,t)},so.prototype.appendOnce=function(e,t){return this.add(Yn.APPEND_ONCE,e,t)},so.prototype.prepend=function(e,t){return this.add(Yn.PREPEND,e,t)},so.prototype.prependOnce=function(e,t){return this.add(Yn.PREPEND_ONCE,e,t)},so.prototype.remove=function(e,t){return this.add(Yn.REMOVE,e,t)},so.prototype.clearAll=function(){return this.add(Yn.CLEAR_ALL,"clearAll","-")},so.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new Ki(new Map(e))},so.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},so.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new pi);e=this.operations.get(e);return null!=e&&e.add(t,r),this},so),Ki=(oo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Bi.get(t).operate(r,e)}),r},oo.prototype.toEvent=function(){var i={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),Xe.sanitize(a.fromMap(e))),r))}),i},oo.prototype.toRecord=function(){var n={};return this.operations.forEach(function(e,t){var r={};e.forEach(function(e,t){r[t]=e}),n[t]=r}),n},oo),Ji=(io.timeout=function(r,n){return new Promise(function(e,t){setTimeout(function(){return t(new Error("timeout (".concat(n,"ms)")))},n),r.then(e,t)})},io),Yi=i.log,qi=(v.prototype.initialize=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Yi.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Yi.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Yi.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},v.prototype.getSessionId=function(){return this.sessionManager.sessionId},v.prototype.getUser=function(){return this.userManager.currentUser},v.prototype.setUser=function(e){try{var t=pt(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(Yi.warn("invalid user"),Promise.resolve())}catch(e){return Yi.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},v.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=qe.sanitizeValue(e);if(!t)return Yi.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return Yi.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},v.prototype.setDeviceId=function(e){try{var t=qe.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(Yi.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return Yi.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},v.prototype.setUserProperty=function(e,t){e=(new Gi).set(e,t).build();return this.updateUserProperties(e)},v.prototype.setUserProperties=function(e){try{var t=Xe.sanitize(e),r=new Gi;return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){return Yi.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},v.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),Promise.resolve()}catch(e){return Yi.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},v.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new Gi).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return Yi.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},v.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},v.prototype.variationDetail=function(r,n,e){var i=e||"A",e=gn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return Yi.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),ht.of(i,f.EXCEPTION)}}(this);return si.experiment(e,r,t),t},v.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},v.prototype.featureFlagDetail=function(r,n){var e=gn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Yi.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),yt.off(f.EXCEPTION)}}(this);return si.featureFlag(e,r,t),t},v.prototype.track=function(e,t){try{Yi.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Yi.error("Unexpected exception while tracking event: ".concat(e))}},v.prototype.trackPageView=function(e){Yi.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},v.prototype.remoteConfig=function(e){return new li(this.core,this.userManager,e)},v.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},v.prototype.onInitialized=function(r){var n;return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:if(this.initialized)return[2,{success:!0}];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Ji.timeout(this.initialization,null!=(n=null==r?void 0:r.timeout)?n:3e3)];case 2:return e.sent(),[2,{success:!0}];case 3:return t=e.sent(),Yi.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},v.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},v.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Yi.debug("UserExplorer opened."),Zn.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Yi.error("UserExplorer is not provided")},v.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Yi.warn("There is no active HackleDevtools.")},v.prototype.close=function(){Yi.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},v),$i=i.log,Xi=(no.prototype.get=function(e,t){var r=typeof t;try{var n={command:"remoteConfig",parameters:{defaultValue:t,key:e,valueType:r,user:this.user}},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(r){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(r){return $i.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(r)),t}},no),Wi=(ro.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},ro.prototype.resolve=function(e){e=JSON.parse(null!=e?e:"");if(!this.isInvocatorResponse(e))throw new Error("invalid invocator response data");if(e.success)return{message:e.message,success:e.success,data:e.data};throw new Error("failed response")},ro),Zi=(to.extractDomain=function(e){var t=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i),e.match(t));return r?r[0]:""},to.prototype.getItem=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},to.prototype.getAllItem=function(e){var t=document.cookie.split("; ").map(function(e){return e.split("=")}),r=null==e?void 0:e.keyPrefix;return r?t.filter(function(e){var t=e[0];return e[1],t.startsWith(r)}):t},to.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=to.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),i="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(o+="; secure"),e+"="+encodeURIComponent(t)+i+"; path=/"+n+s+o);return document.cookie=a},to.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},to.prototype.getOptions=function(){return this.options},to.getInstance=function(e){return void 0===e&&(e={days:3650,isCrossSubdomain:!0}),to.storage=to.storage?to.storage:new to(e)},to),Qi=(eo.initialize=function(){Zi.getInstance().getItem("_hackle_hid")||_o()},eo);function eo(){}function to(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}function ro(){}function no(e,t){this.invocationProcessor=e,this.user=t}function v(e,t,r,n,i){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.devTools=i,this.initialized=!1,this.initialize=this.initialize.bind(this),this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.close=this.close.bind(this),this.initialization=this.initialize()}function io(){}function oo(e){this.operations=null!=e?e:new Map}function so(){this.operations=new Map}function ao(){}function uo(){}function co(){return null!==Ri&&Ri.apply(this,arguments)||this}function lo(){return null!==Si&&Si.apply(this,arguments)||this}function po(){return null!==Ci&&Ci.apply(this,arguments)||this}function fo(){return null!==xi&&xi.apply(this,arguments)||this}function ho(){return null!==ki&&ki.apply(this,arguments)||this}function yo(){}function vo(){}function mo(){}function go(){}function Eo(){}function wo(){var e=Zi.getInstance(),t=e.getItem("_hackle_id");return t||e.getItem("_hackle_hid")||_o()}function bo(e){Zi.getInstance().setItem("_hackle_id",e)}function To(){Zi.getInstance().removeItem("_hackle_id")}function _o(){var e=De.v4();return Zi.getInstance().setItem("_hackle_hid",e),e}Oo.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},Oo.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var Io=Oo,Ao=i.log;function Oo(e){this.invocator=e}function No(e){return e&&e.Math==Math&&e}function m(e){try{return!!e()}catch(e){return!0}}w.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:wo()}catch(e){return Ao.error("Unexpected exception while get sessionId: ".concat(e)),wo()}},w.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=pt(t))?e:this.defaultUser()}catch(e){return Ao.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},w.prototype.setUser=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{if(!(t=pt(n)))return Ao.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while set user: ".concat(e))}return[2]})})},w.prototype.setUserId=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return Ao.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},w.prototype.setDeviceId=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{if(!(t=qe.sanitizeValue(n)))return Ao.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},w.prototype.setUserProperty=function(r,n){return o(this,void 0,void 0,function(){var t;return s(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){Ao.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},w.prototype.setUserProperties=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){try{t=Xe.sanitize(n),r=new Gi,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){Ao.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},w.prototype.updateUserProperties=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){Ao.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},w.prototype.resetUser=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){Ao.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},w.prototype.variation=function(e,t,r){void 0===r&&(r="A");try{var n={command:"variation",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)}},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(t){return Ao.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(r,"] : ").concat(t)),r}},w.prototype.variationDetail=function(e,t,r){var n;void 0===r&&(r="A");try{var i={command:"variationDetail",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)}},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return ht.of(o.variation,o.reason,new tt(new Map(Object.entries(null!=(n=o.config.parameters)?n:{}))))}catch(t){return Ao.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(r,"] : ").concat(t)),ht.of(r,f.EXCEPTION)}},w.prototype.isFeatureOn=function(e,t){try{var r={command:"isFeatureOn",parameters:{featureKey:e,user:this.convertUser(t)}},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(t){return Ao.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),!1}},w.prototype.featureFlagDetail=function(e,t){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:e,user:this.convertUser(t)}},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new yt(i.isOn,i.reason,new tt(new Map(Object.entries(null!=(r=i.config.parameters)?r:{}))))}catch(t){return Ao.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),yt.off(f.EXCEPTION)}},w.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)}};this.invocationProcessor.process(r)}catch(e){Ao.error("Unexpected exception while tracking event: ".concat(e))}},w.prototype.trackPageView=function(e){Ao.info("Web to app integration feature is not support 'trackPageView' method")},w.prototype.remoteConfig=function(e){return new Xi(this.invocationProcessor,this.convertUser(e))},w.prototype.onReady=function(e,t){e()},w.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){Ao.error("Unexpected exception while show userExplorer: ".concat(e))}},w.prototype.hideUserExplorer=function(){Ao.info("Web to app integration feature is not support 'hideUserExplorer' method")},w.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},w.prototype.close=function(){Ao.info("Web to app integration feature is not support 'close' method")},w.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},w.prototype.convertUser=function(e){return"string"==typeof e?e:e&&null!=(e=pt(e))?e:void 0},w.prototype.defaultUser=function(){return{deviceId:wo()}};var Ro=w,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},h=No("object"==typeof globalThis&&globalThis)||No("object"==typeof window&&window)||No("object"==typeof self&&self)||No("object"==typeof y&&y)||function(){return this}()||Function("return this")(),y={},So=!m(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),g=!m(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Co=Function.prototype.call,t=g?Co.bind(Co):function(){return Co.apply(Co,arguments)},r={},e={}.propertyIsEnumerable,xo=Object.getOwnPropertyDescriptor,E=xo&&!e.call({1:2},1);function w(e){this.invocationProcessor=e,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.close=this.close.bind(this)}function ko(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function Mo(e){return Qo(Zo(e),8,-1)}function Uo(e){if(null==e)throw ns("Can't call method on "+e);return e}function Po(e){return is(os(e))}function Do(e){return"function"==typeof e}function Lo(e){return"object"==typeof e?null!==e:ss(e)}function Fo(e,t){return arguments.length<2?(r=as[e],us(r)?r:void 0):as[e]&&as[e][t];var r}function jo(e){try{return ms(e)}catch(e){return"Object"}}function Vo(e){if(gs(e))return e;throw ws(Es(e)+" is not a function")}function Ho(e,t){return null==(e=e[t])?void 0:bs(e)}function zo(t,r){try{Ns(Os,t,{value:r,configurable:!0,writable:!0})}catch(e){Os[t]=r}return r}function Bo(e){return xs(Cs(e))}function Go(e){return"Symbol("+(void 0===e?"":e)+")_"+Ds(++Us+Ps,36)}function Ko(e){var t;return Fs(zs,e)&&(Vs||"string"==typeof zs[e])||(t="Symbol."+e,Vs&&Fs(Bs,e)?zs[e]=Bs[e]:zs[e]=(Hs&&Gs?Gs:Ks)(t)),zs[e]}function Jo(e){return e=function(e,t){if(!Ys(e)||qs(e))return e;var r=$s(e,Zs);if(r){if(r=Js(r,e,t=void 0===t?"default":t),!Ys(r)||qs(r))return r;throw Ws("Can't convert object to primitive value")}return Xs(e,t=void 0===t?"number":t)}(e,"string"),Qs(e)?e:e+""}function Yo(e){return ta?ea.createElement(e):{}}function qo(e){if(pa(e))return e;throw da(fa(e)+" is not an object")}r.f=E?function(e){e=xo(this,e);return!!e&&e.enumerable}:e;var E=g,$o=(e=Function.prototype).bind,Xo=e.call,Wo=E&&$o.bind(Xo,Xo),Zo=($o=e=E?function(e){return e&&Wo(e)}:function(e){return e&&function(){return Xo.apply(e,arguments)}})({}.toString),Qo=$o("".slice),E=m,es=Mo,ts=Object,rs=e("".split),$o=E(function(){return!ts("z").propertyIsEnumerable(0)})?function(e){return"String"==es(e)?rs(e,""):ts(e)}:ts,ns=TypeError,is=$o,os=Uo,ss=Do,as=h,us=Do,E=e({}.isPrototypeOf),cs=M=Fo("navigator","userAgent")||"",ls=h.process,b=h.Deno,b=(ls=ls&&ls.versions||b&&b.version)&&ls.v8,ps=ls=vs=!(vs=b?0<(T=b.split("."))[0]&&T[0]<4?1:+(T[0]+T[1]):vs)&&cs&&(!(T=cs.match(/Edge\/(\d+)/))||74<=T[1])&&(T=cs.match(/Chrome\/(\d+)/))?+T[1]:vs,b=m,T=(cs=!!Object.getOwnPropertySymbols&&!b(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ps&&ps<41}))&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fs=Fo,ds=Do,hs=E,ys=Object,vs=T?function(e){return"symbol"==typeof e}:function(e){var t=fs("Symbol");return ds(t)&&hs(t.prototype,ys(e))},ms=String,gs=Do,Es=jo,ws=TypeError,bs=Vo,Ts=t,_s=Do,Is=Lo,As=TypeError,b={exports:{}},Os=h,Ns=Object.defineProperty,Rs=zo,Ss=Rs=h["__core-js_shared__"]||Rs("__core-js_shared__",{}),Cs=((b.exports=function(e,t){return Ss[e]||(Ss[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),Uo),xs=Object,ks=Bo,Ms=e({}.hasOwnProperty),_=Object.hasOwn||function(e,t){return Ms(ks(e),t)},I=e,Us=0,Ps=Math.random(),Ds=I(1..toString),I=h,Ls=b.exports,Fs=_,js=Go,Vs=cs,Hs=T,zs=Ls("wks"),Bs=I.Symbol,Gs=Bs&&Bs.for,Ks=Hs?Bs:Bs&&Bs.withoutSetter||js,Js=t,Ys=Lo,qs=vs,$s=Ho,Xs=function(e,t){var r,n;if("string"===t&&_s(r=e.toString)&&!Is(n=Ts(r,e)))return n;if(_s(r=e.valueOf)&&!Is(n=Ts(r,e)))return n;if("string"!==t&&_s(r=e.toString)&&!Is(n=Ts(r,e)))return n;throw As("Can't convert object to primitive value")},Ws=TypeError,Zs=Ko("toPrimitive"),Qs=vs,cs=Lo,ea=h.document,ta=cs(ea)&&cs(ea.createElement),ra=Yo,T=!So&&!m(function(){return 7!=Object.defineProperty(ra("div"),"a",{get:function(){return 7}}).a}),na=t,ia=r,oa=ko,sa=Po,aa=Jo,ua=_,ca=T,la=Object.getOwnPropertyDescriptor,Ls=(y.f=So?la:function(e,t){if(e=sa(e),t=aa(t),ca)try{return la(e,t)}catch(e){}if(ua(e,t))return oa(!na(ia.f,e,t),e[t])},{}),I=So&&m(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),pa=Lo,fa=String,da=TypeError,ha=T,ya=qo,va=Jo,ma=TypeError,ga=Object.defineProperty,Ea=Object.getOwnPropertyDescriptor,wa=(Ls.f=So?I?function(e,t,r){var n;return ya(e),t=va(t),ya(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable&&(n=Ea(e,t))&&n.writable&&(e[t]=r.value,r={configurable:("configurable"in r?r:n).configurable,enumerable:("enumerable"in r?r:n).enumerable,writable:!1}),ga(e,t,r)}:ga:function(e,t,r){if(ya(e),t=va(t),ya(r),ha)try{return ga(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ma("Accessors not supported");return"value"in r&&(e[t]=r.value),e},Ls),ba=ko,js=So?function(e,t,r){return wa.f(e,t,ba(1,r))}:function(e,t,r){return e[t]=r,e},vs={exports:{}},cs=So,r=_,T=Function.prototype,Ta=cs&&Object.getOwnPropertyDescriptor,r={EXISTS:r=r(T,"name"),PROPER:r&&"something"===function(){}.name,CONFIGURABLE:r&&(!cs||Ta(T,"name").configurable)},cs=Do,Ta=Rs,_a=e(Function.toString);function Ia(e){return za[e]||(za[e]=Ha(e))}function Aa(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(ou(r)&&au(r,o,n),n.global)i?e[t]=r:uu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:su.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Oa(e){return(e=+e)!=e||0==e?0:pu(e)}function Na(e,t){return(e=fu(e))<0?du(e+t,0):hu(e,t)}function A(e){return 0<(e=e.length)?vu(yu(e),9007199254740991):0}function Ra(a){return function(e,t,r){var n,i=mu(e),o=Eu(i),s=gu(r,o);if(a&&t!=t){for(;s<o;)if((n=i[s++])!=n)return!0}else for(;s<o;s++)if((a||s in i)&&i[s]===t)return a||s||0;return!a&&-1}}function Sa(e,t){var r,n=bu(e),i=0,o=[];for(r in n)!wu(_u,r)&&wu(n,r)&&Iu(o,r);for(;t.length>i;)!wu(n,r=t[i++])||~Tu(o,r)||Iu(o,r);return o}function Ca(e,t,r){for(var n=ku(t),i=Uu.f,o=Mu.f,s=0;s<n.length;s++){var a=n[s];xu(e,a)||r&&xu(r,a)||i(e,a,o(t,a))}}function xa(e,t){return(e=ju[Fu(e)])==Hu||e!=Vu&&(Du(t)?Pu(t):!!t)}function O(e,t){var r,n,i,o,s=e.target,a=e.global,u=e.stat;if(r=a?zu:u?zu[s]||Ju(s,{}):(zu[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(o=Bu(r,n))&&o.value:r[n],!qu(a?n:s+(u?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Yu(i,o)}(e.sham||o&&o.sham)&&Gu(i,"sham",!0),Ku(r,n,i,e)}}cs(Ta.inspectSource)||(Ta.inspectSource=function(e){return _a(e)});var ka,Ma,Ua,Pa,Da,La,Fa,ja,T=Ta.inspectSource,cs=Do,Ta=T,Va=h.WeakMap,cs=cs(Va)&&/native code/.test(Ta(Va)),Ta=b.exports,Ha=Go,za=Ta("keys"),b=e,Ba=Lo,Ga=js,Ka=_,Ta=Rs,N=Ia,Ja=Va={},Ya=h.TypeError,qa=h.WeakMap,cs=(Fa=cs||Ta.state?(ka=Ta.state||(Ta.state=new qa),Ma=b(ka.get),Ua=b(ka.has),Pa=b(ka.set),Da=function(e,t){if(Ua(ka,e))throw new Ya("Object already initialized");return t.facade=e,Pa(ka,e,t),t},La=function(e){return Ma(ka,e)||{}},function(e){return Ua(ka,e)}):(Ja[ja=N("state")]=!0,Da=function(e,t){if(Ka(e,ja))throw new Ya("Object already initialized");return t.facade=e,Ga(e,ja,t),t},La=function(e){return Ka(e,ja)?e[ja]:{}},function(e){return Ka(e,ja)}),{set:Da,get:La,has:Fa,enforce:function(e){return Fa(e)?La(e):Da(e,{})},getterFor:function(t){return function(e){if(Ba(e)&&(e=La(e)).type===t)return e;throw Ya("Incompatible receiver, "+t+" required")}}}),Ta=m,$a=Do,Xa=_,Wa=So,Za=r.CONFIGURABLE,Qa=T,eu=cs.enforce,tu=cs.get,ru=Object.defineProperty,nu=Wa&&!Ta(function(){return 8!==ru(function(){},"length",{value:8}).length}),iu=String(String).split("String"),qa=vs.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Xa(e,"name")||Za&&e.name!==t)&&(Wa?ru(e,"name",{value:t,configurable:!0}):e.name=t),nu&&r&&Xa(r,"arity")&&e.length!==r.arity&&ru(e,"length",{value:r.arity});try{r&&Xa(r,"constructor")&&r.constructor?Wa&&ru(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=eu(e);return Xa(r,"source")||(r.source=iu.join("string"==typeof t?t:"")),e},ou=(Function.prototype.toString=qa(function(){return $a(this)&&tu(this).source||Qa(this)},"toString"),Do),su=Ls,au=vs.exports,uu=zo,b={},cu=Math.ceil,lu=Math.floor,pu=Math.trunc||function(e){e=+e;return(0<e?lu:cu)(e)},fu=Oa,du=Math.max,hu=Math.min,yu=Oa,vu=Math.min,mu=Po,gu=Na,Eu=A,Ja={includes:Ra(!0),indexOf:Ra(!1)},wu=_,bu=Po,Tu=Ja.indexOf,_u=Va,Iu=e([].push),Au=Sa,Ou=(N=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]).concat("length","prototype");b.f=Object.getOwnPropertyNames||function(e){return Au(e,Ou)};(Ta={}).f=Object.getOwnPropertySymbols;var qa=Fo,Nu=b,Ru=Ta,Su=qo,Cu=e([].concat),Ta=qa("Reflect","ownKeys")||function(e){var t=Nu.f(Su(e)),r=Ru.f;return r?Cu(t,r(e)):t},xu=_,ku=Ta,Mu=y,Uu=Ls,Pu=m,Du=Do,Lu=/#|\.prototype\./,Fu=xa.normalize=function(e){return String(e).replace(Lu,".").toLowerCase()},ju=xa.data={},Vu=xa.NATIVE="N",Hu=xa.POLYFILL="P",qa=xa,zu=h,Bu=y.f,Gu=js,Ku=Aa,Ju=zo,Yu=Ca,qu=qa,Ta=!m(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),$u=_,Xu=Do,Wu=Bo,Zu=Ia("IE_PROTO"),Qu=Object,ec=Qu.prototype,Ta=Ta?Qu.getPrototypeOf:function(e){e=Wu(e);if($u(e,Zu))return e[Zu];var t=e.constructor;return Xu(t)&&e instanceof t?t.prototype:e instanceof Qu?ec:null},tc=Do,rc=String,nc=TypeError,ic=e,oc=qo,sc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=ic(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(r){}return function(e,t){return oc(e),function(e){if("object"==typeof e||tc(e))return;throw nc("Can't set "+rc(e)+" as a prototype")}(t),n?r(e,t):e.__proto__=t,e}}():void 0),ac={},uc=Sa,cc=N,R=Object.keys||function(e){return uc(e,cc)},lc=Ls,pc=qo,fc=Po,dc=R;function hc(){}function yc(e){e.write(kc("")),e.close();var t=e.parentWindow.Object;return e=null,t}function vc(e,t){return Vc(e),void 0===t?e:Hc?zc(e,t):function(){return e.apply(t,arguments)}}function mc(e){return void 0!==e&&(Bc.Array===e||Kc[Gc]===e)}function gc(e){if(null!=e)return Zc(e,el)||Zc(e,"@@iterator")||Qc[Wc(e)]}function Ec(e,t){if(t=arguments.length<2?ol(e):t,rl(t))return nl(tl(t,e));throw sl(il(e)+" is not iterable")}function wc(e,t,r){var n,i;ul(e);try{if(!(n=cl(e,"return"))){if("throw"===t)throw r;return r}n=al(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return ul(n),r}function bc(e,t){this.stopped=e,this.result=t}function Tc(e,t,r){function n(e){return o&&El(o,"normal",e),new bc(!0,e)}function i(e){return f?(fl(e),y?v(e[0],e[1],n):v(e[0],e[1])):y?v(e,n):v(e)}var o,s,a,u,c,l,p=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),v=ll(t,p);if(d)o=e.iterator;else if(h)o=e;else{if(!(r=gl(e)))throw wl(dl(e)+" is not iterable");if(hl(r)){for(s=0,a=yl(e);s<a;s++)if((u=i(e[s]))&&vl(bl,u))return u;return new bc(!1)}o=ml(e,r)}for(c=(d?e:o).next;!(l=pl(c,o)).done;){try{u=i(l.value)}catch(e){El(o,"throw",e)}if("object"==typeof u&&u&&vl(bl,u))return u}return new bc(!1)}function _c(e){if("Symbol"===Tl(e))throw TypeError("Cannot convert a Symbol value to a string");return _l(e)}function Ic(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=Nl(Fl,this);return Sl?r=Sl(new Dl,i?Rl(this):Fl):(r=i?this:xl(Fl),kl(r,Pl,"Error")),void 0!==t&&kl(r,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Il(e)}(t)),Ul&&kl(r,"stack",function(e,t){if(Lc&&"string"==typeof e&&!Uc.prepareStackTrace)for(;t--;)e=Pc(e,Dc,"");return e}(r.stack,1)),i=r,Fc(t=n)&&"cause"in t&&jc(i,"cause",t.cause),Ml(e,Ll,{that:n=[]}),kl(r,"errors",n),r}ac.f=So&&!I?Object.defineProperties:function(e,t){pc(e);for(var r,n=fc(t),i=dc(t),o=i.length,s=0;s<o;)lc.f(e,r=i[s++],n[r]);return e};var Ac,R=Fo("document","documentElement"),Oc=qo,Nc=ac,Rc=N,I=Va,Sc=R,Cc=Yo,xc=Ia("IE_PROTO"),kc=function(e){return"<script>"+e+"<\/script>"},Mc=function(){try{Ac=new ActiveXObject("htmlfile")}catch(e){}var e,t;Mc="undefined"==typeof document||document.domain&&Ac?yc(Ac):((t=Cc("iframe")).style.display="none",Sc.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(kc("document.F=Object")),e.close(),e.F);for(var r=Rc.length;r--;)delete Mc.prototype[Rc[r]];return Mc()},ac=(I[xc]=!0,Object.create||function(e,t){var r;return null!==e?(hc.prototype=Oc(e),r=new hc,hc.prototype=null,r[xc]=e):r=Mc(),void 0===t?r:Nc.f(r,t)}),Uc=Error,Pc=e("".replace),N=String(Uc("zxcasd").stack),Dc=/\n\s*at [^:]*:[^\n]*/,Lc=Dc.test(N),Fc=Lo,jc=js,Vc=Vo,Hc=g,zc=e(e.bind),Bc=I={},Gc=Ko("iterator"),Kc=Array.prototype;(N={})[Ko("toStringTag")]="z";var S=N="[object z]"===String(N),Jc=Do,Yc=Mo,qc=Ko("toStringTag"),$c=Object,Xc="Arguments"==Yc(function(){return arguments}()),Wc=S=S?Yc:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=$c(e),qc))?t:Xc?Yc(e):"Object"==(t=Yc(e))&&Jc(e.callee)?"Arguments":t},Zc=Ho,Qc=I,el=Ko("iterator"),tl=t,rl=Vo,nl=qo,il=jo,ol=gc,sl=TypeError,al=t,ul=qo,cl=Ho,ll=vc,pl=t,fl=qo,dl=jo,hl=mc,yl=A,vl=E,ml=Ec,gl=gc,El=wc,wl=TypeError,bl=bc.prototype,Tl=S,_l=String,Il=_c,Al=ko,C=!m(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Al(1,7)),7!==e.stack)}),Ol=O,Nl=E,Rl=Ta,Sl=sc,Cl=Ca,xl=ac,kl=js,x=ko,Ml=Tc,Ul=C,Pl=Ko("toStringTag"),Dl=Error,Ll=[].push,Fl=(Sl?Sl(Ic,Dl):Cl(Ic,Dl,{name:!0}),Ic.prototype=xl(Dl.prototype,{constructor:x(1,Ic),message:x(1,""),name:x(1,"AggregateError")})),C=(Ol({global:!0,constructor:!0,arity:2},{AggregateError:Ic}),Ko),Cl=ac,x=Ls.f,jl=C("unscopables"),Vl=Array.prototype;function Hl(e){Vl[jl][e]=!0}null==Vl[jl]&&x(Vl,jl,{configurable:!0,value:Cl(null)});var zl,Ol=m,C=Do,x=Ta,Cl=Aa,Bl=Ko("iterator"),k=!1;function Gl(e,t,r){(e=e&&!r?e.prototype:e)&&!$l(e,Xl)&&ql(e,Xl,{configurable:!0,value:t})}function Kl(){return this}function Jl(e,t,r,n,i,o,s){var a=r,u=t,c=void 0;function l(e){if(e===i&&v)return v;if(!yp&&e in h)return h[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}}u+=" Iterator",a.prototype=Zl(Wl,{next:Ql(+!c,n)}),ep(a,u,!1),tp[u]=rp;var p,f,c=t+" Iterator",d=!1,h=e.prototype,y=h[vp]||h["@@iterator"]||i&&h[i],v=!yp&&y||l(i);if((n="Array"==t&&h.entries||y)&&(a=sp(n.call(new e)))!==Object.prototype&&a.next&&(sp(a)!==hp&&(ap?ap(a,hp):op(a[vp])||lp(a,vp,Kl)),up(a,c,!0)),fp&&"values"==i&&y&&"values"!==y.name&&(dp?cp(h,"name","values"):(d=!0,v=function(){return ip(y,this)})),i)if(p={values:l("values"),keys:o?v:l("keys"),entries:l("entries")},s)for(f in p)!yp&&!d&&f in h||lp(h,f,p[f]);else np({target:t,proto:!0,forced:yp||d},p);return h[vp]!==v&&lp(h,vp,v,{name:i}),pp[t]=v,p}[].keys&&("next"in(Yl=[].keys())?(x=x(x(Yl)))!==Object.prototype&&(zl=x):k=!0),C((zl=null==zl||Ol(function(){var e={};return zl[Bl].call(e)!==e})?{}:zl)[Bl])||Cl(zl,Bl,function(){return this});var Yl={IteratorPrototype:zl,BUGGY_SAFARI_ITERATORS:k},ql=Ls.f,$l=_,Xl=Ko("toStringTag"),Wl=Yl.IteratorPrototype,Zl=ac,Ql=ko,ep=Gl,tp=I,rp=function(){return this},np=O,ip=t,op=Do,sp=Ta,ap=sc,up=Gl,cp=js,lp=Aa,pp=I,fp=r.PROPER,dp=r.CONFIGURABLE,hp=Yl.IteratorPrototype,yp=Yl.BUGGY_SAFARI_ITERATORS,vp=Ko("iterator"),mp=Po,x=Hl,C=I,Ol=cs,Cl=Ls.f,k=Jl,r=So,gp=Ol.set,Ep=Ol.getterFor("Array Iterator"),Yl=k(Array,"Array",function(e,t){gp(this,{type:"Array Iterator",target:mp(e),index:0,kind:t})},function(){var e=Ep(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),I=C.Arguments=C.Array;if(x("keys"),x("values"),x("entries"),r&&"values"!==I.name)try{Cl(I,"name",{value:"values"})}catch(De){}function wp(e){var e=Op(e),t=Np.f;Rp&&e&&!e[Sp]&&t(e,Sp,{configurable:!0,get:function(){return this}})}function bp(e,t){if(Cp(t,e))return e;throw xp("Incorrect invocation")}function Tp(){}function _p(e){if(!kp(e))return!1;try{return Dp(Tp,Pp,e),!0}catch(e){return!1}}function Ip(e){if(!kp(e))return!1;switch(Mp(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return jp||!!Fp(Lp,Up(e))}catch(e){return!0}}var Ap=S,Ol=(N||Aa(Object.prototype,"toString",N?{}.toString:function(){return"[object "+Ap(this)+"]"},{unsafe:!0}),"process"==Mo(h.process)),Op=Fo,Np=Ls,Rp=So,Sp=Ko("species"),Cp=E,xp=TypeError,k=e,C=m,kp=Do,Mp=S,Up=T,Pp=[],Dp=Fo("Reflect","construct"),Lp=/^\s*(?:class|function)\b/,Fp=k(Lp.exec),jp=!Lp.exec(Tp);function Vp(e,t){var r,e=Jp(e).constructor;if(void 0===e||null==(r=Jp(e)[Yp]))return t;if(Bp(e=r))return e;throw Kp(Gp(e)+" is not a constructor")}Ip.sham=!0;var Hp,zp,Bp=x=!Dp||C(function(){var e;return _p(_p.call)||!_p(Object)||!_p(function(){e=!0})||e})?Ip:_p,Gp=jo,Kp=TypeError,Jp=qo,Yp=Ko("species"),qp=(r=Function.prototype).apply,$p=r.call,Cl="object"==typeof Reflect&&Reflect.apply||(g?$p.bind(qp):function(){return $p.apply(qp,arguments)}),I=e([].slice),Xp=TypeError,N=/(?:ipad|iphone|ipod).*applewebkit/i.test(M),Wp=h,Zp=Cl,E=vc,Qp=Do,ef=_,S=m,tf=R,rf=I,nf=Yo,k=N,C=Ol,r=Wp.setImmediate,g=Wp.clearImmediate,of=Wp.process,sf=Wp.Dispatch,af=Wp.Function,R=Wp.MessageChannel,uf=Wp.String,cf=0,lf={};try{Hp=Wp.location}catch(De){}function pf(e){return function(){hf(e)}}function ff(e){hf(e.data)}function df(e){Wp.postMessage(uf(e),Hp.protocol+"//"+Hp.host)}var hf=function(e){var t;ef(lf,e)&&(t=lf[e],delete lf[e],t())};function yf(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function vf(){this.head=null,this.tail=null}function mf(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=e,n=t}),this.resolve=Ff(r),this.reject=Ff(n)}r&&g||(r=function(e){var t=arguments.length,r=1;if(t<r)throw Xp("Not enough arguments");var n=Qp(e)?e:af(e),i=rf(arguments,1);return lf[++cf]=function(){Zp(n,void 0,i)},zp(cf),cf},g=function(e){delete lf[e]},C?zp=function(e){of.nextTick(pf(e))}:sf&&sf.now?zp=function(e){sf.now(pf(e))}:R&&!k?(k=(C=new R).port2,C.port1.onmessage=ff,zp=E(k.postMessage,k)):Wp.addEventListener&&Qp(Wp.postMessage)&&!Wp.importScripts&&Hp&&"file:"!==Hp.protocol&&!S(df)?(zp=df,Wp.addEventListener("message",ff,!1)):zp="onreadystatechange"in nf("script")?function(e){tf.appendChild(nf("script")).onreadystatechange=function(){tf.removeChild(this),hf(e)}}:function(e){setTimeout(pf(e),0)});var gf,Ef,wf,bf,Tf,_f,If,R={set:r,clear:g},C=h,E=/ipad|iphone|ipod/i.test(M)&&void 0!==C.Pebble,k=/web0s(?!.*chrome)/i.test(M),S=h,r=vc,g=y.f,Af=R.set,C=N,y=E,N=k,Of=Ol,E=S.MutationObserver||S.WebKitMutationObserver,k=S.document,Nf=S.process,Rf=S.Promise,N=((g=(g=g(S,"queueMicrotask"))&&g.value)||(gf=function(){var e,t;for(Of&&(e=Nf.domain)&&e.exit();Ef;){t=Ef.fn,Ef=Ef.next;try{t()}catch(e){throw Ef?bf():wf=void 0,e}}wf=void 0,e&&e.enter()},bf=C||Of||N||!E||!k?!y&&Rf&&Rf.resolve?((C=Rf.resolve(void 0)).constructor=Rf,If=r(C.then,C),function(){If(gf)}):Of?function(){Nf.nextTick(gf)}:(Af=r(Af,S),function(){Af(gf)}):(Tf=!0,_f=k.createTextNode(""),new E(gf).observe(_f,{characterData:!0}),function(){_f.data=Tf=!Tf})),g||function(e){e={fn:e,next:void 0};wf&&(wf.next=e),Ef||(Ef=e,bf()),wf=e}),Sf=h,y=(vf.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},vf),Rf=h.Promise,r=!(C="object"==typeof Deno&&Deno&&"object"==typeof Deno.version)&&!Ol&&"object"==typeof window&&"object"==typeof document,S=h,Cf=Rf,k=Do,E=qa,xf=T,g=Ko,kf=r,Mf=C,Uf=ls,Pf=(Cf&&Cf.prototype,g("species")),Df=!1,Lf=k(S.PromiseRejectionEvent),T={CONSTRUCTOR:E("Promise",function(){var e=xf(Cf),t=e!==String(Cf);if(!t&&66===Uf)return!0;if(!Uf||Uf<51||!/native code/.test(e)){var e=new Cf(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Pf]=r,!(Df=e.then(function(){})instanceof r))return!0}return!t&&(kf||Mf)&&!Lf}),REJECTION_EVENT:Lf,SUBCLASSING:Df},Ff=Vo;function jf(e,t){var r,n,i,o,s=t.value,a=1==t.state,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(2===t.rejection&&(o=t,Kf(Wf,Gf,function(){var e=o.facade;Bf?ld.emit("rejectionHandled",e):vd("rejectionhandled",e,o.value)})),t.rejection=1),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(ud("Promise-chain cycle")):(n=hd(r))?Kf(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var Vf,Hf,zf,C=O,Bf=Ol,Gf=h,Kf=t,g=Aa,k=sc,S=Gl,E=wp,Jf=Vo,Yf=Do,qf=Lo,$f=bp,Xf=Vp,Wf=R.set,Zf=N,Qf=yf,ed=y,R=cs,N=Rf,y=r={f:function(e){return new mf(e)}},td=T.CONSTRUCTOR,rd=T.REJECTION_EVENT,nd=T.SUBCLASSING,id=R.getterFor("Promise"),od=R.set,R=N&&N.prototype,sd=N,ad=R,ud=Gf.TypeError,cd=Gf.document,ld=Gf.process,pd=y.f,fd=pd,dd=!!(cd&&cd.createEvent&&Gf.dispatchEvent),hd=function(e){var t;return!(!qf(e)||!Yf(t=e.then))&&t},yd=function(r,i){r.notified||(r.notified=!0,Zf(function(){for(var e,n,t=r.reactions;e=t.get();)jf(e,r);r.notified=!1,i&&!r.rejection&&(n=r,Kf(Wf,Gf,function(){var e,t=n.facade,r=n.value;if(md(n)&&(e=Qf(function(){Bf?ld.emit("unhandledRejection",r,t):vd("unhandledrejection",t,r)}),n.rejection=Bf||md(n)?2:1,e.error))throw e.value}))}))},vd=function(e,t,r){var n;dd?((n=cd.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Gf.dispatchEvent(n)):n={promise:t,reason:r},!rd&&(t=Gf["on"+e])?t(n):"unhandledrejection"===e&&function(e,t){var r=Sf.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},md=function(e){return 1!==e.rejection&&!e.parent},gd=function(t,r,n){return function(e){t(r,e,n)}},Ed=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=2,yd(e,!0))},wd=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw ud("Promise can't be resolved itself");var n=hd(e);n?Zf(function(){var t={done:!1};try{Kf(n,e,gd(wd,t,r),gd(Ed,t,r))}catch(e){Ed(t,e,r)}}):(r.value=e,r.state=1,yd(r,!1))}catch(e){Ed({done:!1},e,r)}}};if(td&&(ad=(sd=function(e){$f(this,ad),Jf(e),Kf(Vf,this);var t=id(this);try{e(gd(wd,t),gd(Ed,t))}catch(e){Ed(t,e)}}).prototype,(Vf=function(e){od(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new ed,rejection:!1,state:0,value:void 0})}).prototype=g(ad,"then",function(e,t){var r=id(this),n=pd(Xf(this,sd));return r.parent=!0,n.ok=!Yf(e)||e,n.fail=Yf(t)&&t,n.domain=Bf?ld.domain:void 0,0==r.state?r.reactions.add(n):Zf(function(){jf(n,r)}),n.promise}),Hf=function(){var e=new Vf,t=id(e);this.promise=e,this.resolve=gd(wd,t),this.reject=gd(Ed,t)},y.f=pd=function(e){return e===sd||void 0===e?new Hf:fd(e)},Yf(N)&&R!==Object.prototype)){zf=R.then,nd||g(R,"then",function(e,t){var r=this;return new sd(function(e,t){Kf(zf,r,e,t)}).then(e,t)},{unsafe:!0});try{delete R.constructor}catch(De){}k&&k(R,ad)}C({global:!0,constructor:!0,wrap:!0,forced:td},{Promise:sd}),S(sd,"Promise",!1),E("Promise");var bd=Ko("iterator"),Td=!1;try{var _d=0,Id={next:function(){return{done:!!_d++}},return:function(){Td=!0}};Id[bd]=function(){return this},Array.from(Id,function(){throw 2})}catch(De){}function Ad(e,t){if(!t&&!Td)return!1;var r=!1;try{var n={};n[bd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}function Od(e,t){return Bd(e),Gd(t)&&t.constructor===e?t:((0,(e=Kd.f(e)).resolve)(t),e.promise)}function Nd(i){return function(e,t){var r,e=lh(ph(e)),t=ch(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=dh(e,t))<55296||56319<r||t+1===n||(n=dh(e,t+1))<56320||57343<n?i?fh(e,t):r:i?hh(e,t,t+2):n-56320+(r-55296<<10)+65536}}function Rd(e,t){if(e){if(e[_h]!==Ah)try{Th(e,_h,Ah)}catch(t){e[_h]=Ah}if(e[Ih]||Th(e,Ih,t),wh[t])for(var r in bh)if(e[r]!==bh[r])try{Th(e,r,bh[r])}catch(t){e[r]=bh[r]}}}var Sd,Cd=Rf,y=T.CONSTRUCTOR||!Ad(function(e){Cd.all(e).then(void 0,function(){})}),xd=t,kd=Vo,Md=r,Ud=yf,Pd=Tc,N=(O({target:"Promise",stat:!0,forced:y},{all:function(e){var a=this,t=Md.f(a),u=t.resolve,c=t.reject,r=Ud(function(){var n=kd(a.resolve),i=[],o=0,s=1;Pd(e,function(e){var t=o++,r=!1;s++,xd(n,a,e).then(function(e){r||(r=!0,i[t]=e,--s||u(i))},c)}),--s||u(i)});return r.error&&c(r.value),t.promise}}),O),g=Fo,k=Do,R=Aa,C=(nd=Rf)&&nd.prototype,Dd=(N({target:"Promise",proto:!0,forced:T.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),k(nd)&&(td=g("Promise").prototype.catch,C.catch!==td&&R(C,"catch",td,{unsafe:!0})),t),Ld=Vo,Fd=r,jd=yf,Vd=Tc,Hd=(O({target:"Promise",stat:!0,forced:y},{race:function(e){var r=this,n=Fd.f(r),i=n.reject,t=jd(function(){var t=Ld(r.resolve);Vd(e,function(e){Dd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}}),t),zd=r,Bd=(O({target:"Promise",stat:!0,forced:T.CONSTRUCTOR},{reject:function(e){var t=zd.f(this);return Hd(t.reject,void 0,e),t.promise}}),qo),Gd=Lo,Kd=r,S=O,E=T.CONSTRUCTOR,Jd=Od,Yd=(Fo("Promise"),S({target:"Promise",stat:!0,forced:E},{resolve:function(e){return Jd(this,e)}}),t),qd=Vo,$d=r,Xd=yf,Wd=Tc,Zd=(O({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=$d.f(a),u=t.resolve,r=t.reject,n=Xd(function(){var n=qd(a.resolve),i=[],o=0,s=1;Wd(e,function(e){var t=o++,r=!1;s++,Yd(n,a,e).then(function(e){r||(r=!0,i[t]={status:"fulfilled",value:e},--s||u(i))},function(e){r||(r=!0,i[t]={status:"rejected",reason:e},--s||u(i))})}),--s||u(i)});return n.error&&r(n.value),t.promise}}),t),Qd=Vo,eh=Fo,th=r,rh=yf,nh=Tc,Id=(O({target:"Promise",stat:!0},{any:function(e){var u=this,c=eh("AggregateError"),t=th.f(u),l=t.resolve,p=t.reject,r=rh(function(){var n=Qd(u.resolve),i=[],o=0,s=1,a=!1;nh(e,function(e){var t=o++,r=!1;s++,Zd(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,i[t]=e,--s||p(new c(i,"No one promise resolved")))})}),--s||p(new c(i,"No one promise resolved"))});return r.error&&p(r.value),t.promise}}),O),k=m,ih=Fo,oh=Do,sh=Vp,ah=Od,nd=Aa,uh=(N=Rf)&&N.prototype;Id({target:"Promise",proto:!0,real:!0,forced:!!N&&k(function(){uh.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=sh(this,ih("Promise")),e=oh(t);return this.then(e?function(e){return ah(r,t()).then(function(){return e})}:t,e?function(e){return ah(r,t()).then(function(){throw e})}:t)}}),oh(N)&&(g=ih("Promise").prototype.finally,uh.finally!==g&&nd(uh,"finally",g,{unsafe:!0}));var ch=Oa,lh=_c,ph=Uo,fh=(R=e)("".charAt),dh=R("".charCodeAt),hh=R("".slice),yh=(Nd(!1),Nd(!0)),vh=_c,td=Jl,mh=(C=cs).set,gh=C.getterFor("String Iterator");td(String,"String",function(e){mh(this,{type:"String Iterator",string:vh(e),index:0})},function(){var e=gh(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=yh(t,r),e.index+=t.length,{value:t,done:!1})});(y=h).Promise;var T=Yo("span").classList,E=(S=T&&T.constructor&&T.constructor.prototype)===Object.prototype?void 0:S,Eh=h,wh={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},Rf=E,bh=Yl,Th=js,_h=(Id=Ko)("iterator"),Ih=Id("toStringTag"),Ah=bh.values;for(Sd in wh)Rd(Eh[Sd]&&Eh[Sd].prototype,Sd);function Oh(e,t,r){(t=Wh(t))in e?Zh.f(e,t,Qh(0,r)):e[t]=r}function Nh(e){if(9007199254740991<e)throw my("Maximum allowed index exceeded");return e}function Rh(e,t){return gy(e=e)&&(r=e.constructor,(Ey(r)&&(r===Ty||gy(r.prototype))||wy(r)&&null===(r=r[by]))&&(r=void 0)),new(void 0===r?Ty:r)(0===t?0:t);var r}function Sh(t){return 51<=Iy||!_y(function(){var e=[];return(e.constructor={})[Ay]=function(){return{foo:1}},1!==e[t](Boolean).foo})}function Ch(e,t){if(!delete e[t])throw Py("Cannot delete property "+Uy(t)+" of "+Uy(e))}function xh(f){var d=1==f,h=2==f,y=3==f,v=4==f,m=6==f,g=7==f,E=5==f||m;return function(e,t,r,n){for(var i,o,s=By(e),a=zy(s),u=Hy(t,r),c=Gy(a),l=0,t=n||Ky,p=d?t(e,c):h||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(o=u(i=a[l],l,s),f))if(d)p[l]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return l;case 2:Jy(p,i)}else switch(f){case 4:return!1;case 7:Jy(p,i)}return m?-1:y||v?v:p}}function kh(e,t){var r=[][e];return!!r&&Yy(function(){r.call(null,t||function(){return 1},1)})}function Mh(u){var c=1==u;return function(e,t,r){for(var n,i=ov(e),o=iv(i),s=nv(t,r),a=sv(o);0<a--;)if(s(n=o[a],a,i))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}}function Uh(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&fv(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&cv(u)?(c=lv(u),l=Uh(e,t,u,c,l,o-1)-1):(pv(l+1),e[l]=u),l++),p++;return l}function Ph(c){return function(e,t,r,n){Hv(t);var i=zv(e),o=Bv(i),s=Gv(i),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in o){n=o[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw Kv("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in o&&(n=t(n,o[a],a,i));return n}}function Dh(e,t,r){for(var n=cm(e),i=um(t,n),o=um(void 0===r?n:r,n),s=pm(fm(o-i,0)),a=0;i<o;i++,a++)lm(s,a,e[i]);return s.length=a,s}function Lh(e,t){var r=e.length,n=hm(r/2);if(r<8){for(var i,o,s=e,a=t,u=s.length,c=1;c<u;){for(i=s[o=c];o&&0<a(s[o-1],i);)s[o]=s[--o];o!==c++&&(s[o]=i)}return s}for(var l=e,p=Lh(dm(e,0,n),t),f=Lh(dm(e,n),t),d=t,h=p.length,y=f.length,v=0,m=0;v<h||m<y;)l[v+m]=v<h&&m<y?d(p[v],f[m])<=0?p[v++]:f[m++]:v<h?p[v++]:f[m++];return l}function Fh(e){rg(e,ug,{value:{objectID:"O"+cg++,weakData:{}}})}function jh(e,t,r){for(var n in t)Eg(e,n,t[n],r);return e}Rd(Rf,"DOMTokenList");var Vh,Hh,zh,Bh,Gh,Kh,Jh,Yh=r,qh=yf,$h=(O({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Yh.f(this),e=qh(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),qo),Xh=wc,Wh=Jo,Zh=Ls,Qh=ko,ey=vc,ty=t,ry=Bo,ny=mc,iy=x,oy=A,sy=Oh,ay=Ec,uy=gc,cy=Array,ly=(O({target:"Array",stat:!0,forced:!Ad(function(e){Array.from(e)})},{from:function(e){var t=ry(e),e=iy(this),r=arguments.length,n=1<r?arguments[1]:void 0,i=void 0!==n;i&&(n=ey(n,2<r?arguments[2]:void 0));var o,s,a,u,c,l,r=uy(t),p=0;if(!r||this===cy&&ny(r))for(o=oy(t),s=e?new this(o):cy(o);p<o;p++)l=i?n(t[p],p):t[p],sy(s,p,l);else for(c=(u=ay(t,r)).next,s=e?new this:[];!(a=ty(c,u)).done;p++)l=i?function(e,t,r,n){try{return n?t($h(r)[0],r[1]):t(r)}catch(t){Xh(e,"throw",t)}}(u,n,[a.value,p],!0):a.value,sy(s,p,l);return s.length=p,s}}),Mo),k=Array.isArray||function(e){return"Array"==ly(e)},py=(O({target:"Array",stat:!0},{isArray:k}),x),fy=Oh,dy=Array,hy=(O({target:"Array",stat:!0,forced:m(function(){function e(){}return!(dy.of.call(e)instanceof e)})},{of:function(){for(var e=0,t=arguments.length,r=new(py(this)?this:dy)(t);e<t;)fy(r,e,arguments[e++]);return r.length=t,r}}),Bo),yy=A,vy=Oa,N=Hl,my=(O({target:"Array",proto:!0},{at:function(e){var t=hy(this),r=yy(t),e=vy(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),N("at"),TypeError),gy=k,Ey=x,wy=Lo,by=Ko("species"),Ty=Array,_y=m,Iy=ls,Ay=Ko("species"),nd=O,g=m,Oy=k,Ny=Lo,Ry=Bo,Sy=A,Cy=Nh,xy=Oh,ky=Rh,R=Sh,C=ls,My=Ko("isConcatSpreadable"),td=51<=C||!g(function(){var e=[];return e[My]=!1,e.concat()[0]!==e}),T=R("concat"),Uy=(nd({target:"Array",proto:!0,arity:1,forced:!td||!T},{concat:function(e){for(var t,r,n,i=Ry(this),o=ky(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!Ny(e))return!1;var t=e[My];return void 0!==t?!!t:Oy(e)}(n=-1===a?i:arguments[a]))for(r=Sy(n),Cy(s+r),t=0;t<r;t++,s++)t in n&&xy(o,s,n[t]);else Cy(s+1),xy(o,s++,n);return o.length=s,o}}),jo),Py=TypeError,Dy=Bo,Ly=Na,Fy=A,jy=Ch,Vy=Math.min,S=Hl,Hy=(O({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=Dy(this),n=Fy(r),i=Ly(e,n),o=Ly(t,n),e=2<arguments.length?arguments[2]:void 0,s=Vy((void 0===e?n:Ly(e,n))-o,n-i),a=1;for(o<i&&i<o+s&&(a=-1,o+=s-1,i+=s-1);0<s--;)o in r?r[i]=r[o]:jy(r,i),i+=a,o+=a;return r}}),S("copyWithin"),vc),zy=$o,By=Bo,Gy=A,Ky=Rh,Jy=e([].push),E={forEach:xh(0),map:xh(1),filter:xh(2),some:xh(3),every:xh(4),find:xh(5),findIndex:xh(6),filterReject:xh(7)},Yy=m,qy=E.every,$y=(O({target:"Array",proto:!0,forced:!kh("every")},{every:function(e){return qy(this,e,1<arguments.length?arguments[1]:void 0)}}),Bo),Xy=Na,Wy=A,Yl=Hl,Zy=(O({target:"Array",proto:!0},{fill:function(e){for(var t=$y(this),r=Wy(t),n=arguments.length,i=Xy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:Xy(n,r);i<o;)t[i++]=e;return t}}),Yl("fill"),E.filter),js=(O({target:"Array",proto:!0,forced:!Sh("filter")},{filter:function(e){return Zy(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Qy=E.find,Id=Hl,ev=!0,Rf=("find"in[]&&Array(1).find(function(){ev=!1}),js({target:"Array",proto:!0,forced:ev},{find:function(e){return Qy(this,e,1<arguments.length?arguments[1]:void 0)}}),Id("find"),O),tv=E.findIndex,r=Hl,rv=!0,nv=("findIndex"in[]&&Array(1).findIndex(function(){rv=!1}),Rf({target:"Array",proto:!0,forced:rv},{findIndex:function(e){return tv(this,e,1<arguments.length?arguments[1]:void 0)}}),r("findIndex"),vc),iv=$o,ov=Bo,sv=A,av=(N={findLast:Mh(0),findLastIndex:Mh(1)}).findLast,C=Hl,uv=(O({target:"Array",proto:!0},{findLast:function(e){return av(this,e,1<arguments.length?arguments[1]:void 0)}}),C("findLast"),N.findLastIndex),g=Hl,cv=(O({target:"Array",proto:!0},{findLastIndex:function(e){return uv(this,e,1<arguments.length?arguments[1]:void 0)}}),g("findLastIndex"),k),lv=A,pv=Nh,fv=vc,dv=R=Uh,hv=Bo,yv=A,vv=Oa,mv=Rh,gv=(O({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=hv(this),r=yv(t),n=mv(t,0);return n.length=dv(n,t,t,r,0,void 0===e?1:vv(e)),n}}),R),Ev=Vo,wv=Bo,bv=A,Tv=Rh,_v=(O({target:"Array",proto:!0},{flatMap:function(e){var t,r=wv(this),n=bv(r);return Ev(e),(t=Tv(r,0)).length=gv(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),E.forEach),nd=kh("forEach")?[].forEach:function(e){return _v(this,e,1<arguments.length?arguments[1]:void 0)},Iv=(O({target:"Array",proto:!0,forced:[].forEach!=nd},{forEach:nd}),Ja.includes),td=Hl,T=(O({target:"Array",proto:!0,forced:m(function(){return!Array(1).includes()})},{includes:function(e){return Iv(this,e,1<arguments.length?arguments[1]:void 0)}}),td("includes"),O),Av=Ja.indexOf,S=kh,Ov=e([].indexOf),Nv=!!Ov&&1/Ov([1],1,-0)<0,Yl=S("indexOf"),js=(T({target:"Array",proto:!0,forced:Nv||!Yl},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Nv?Ov(this,e,t)||0:Av(this,e,t)}}),O),Id=$o,Rv=Po,Rf=kh,Sv=e([].join),r=Id!=Object,C=Rf("join",","),Cv=(js({target:"Array",proto:!0,forced:r||!C},{join:function(e){return Sv(Rv(this),void 0===e?",":e)}}),Cl),xv=Po,kv=Oa,Mv=A,N=kh,Uv=Math.min,Pv=[].lastIndexOf,Dv=!!Pv&&1/[1].lastIndexOf(1,-0)<0,g=N("lastIndexOf"),Lv=(O({target:"Array",proto:!0,forced:(R=Dv||!g?function(e){if(Dv)return Cv(Pv,this,arguments)||0;var t=xv(this),r=Mv(t),n=r-1;for((n=1<arguments.length?Uv(n,kv(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:Pv)!==[].lastIndexOf},{lastIndexOf:R}),E.map),nd=(O({target:"Array",proto:!0,forced:!Sh("map")},{map:function(e){return Lv(this,e,1<arguments.length?arguments[1]:void 0)}}),O),Fv=Bo,jv=A,Vv=Nh,td=m(function(){return 4294967297!==[].push.call({length:4294967296},1)}),Ja=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),Hv=(nd({target:"Array",proto:!0,arity:1,forced:td||Ja},{push:function(e){var t=Fv(this),r=jv(t),n=arguments.length;Vv(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),Vo),zv=Bo,Bv=$o,Gv=A,Kv=TypeError,Jv=(S={left:Ph(!1),right:Ph(!0)}).left,T=ls,Yl=Ol,Yv=(O({target:"Array",proto:!0,forced:!kh("reduce")||!Yl&&79<T&&T<83},{reduce:function(e){var t=arguments.length;return Jv(this,e,t,1<t?arguments[1]:void 0)}}),S.right),Id=ls,Rf=Ol,js=(O({target:"Array",proto:!0,forced:!kh("reduceRight")||!Rf&&79<Id&&Id<83},{reduceRight:function(e){return Yv(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),O),qv=k,$v=e([].reverse),r=[1,2],C=(js({target:"Array",proto:!0,forced:String(r)===String(r.reverse())},{reverse:function(){return qv(this)&&(this.length=this.length),$v(this)}}),O),Xv=k,Wv=x,Zv=Lo,Qv=Na,em=A,tm=Po,rm=Oh,Cl=Ko,nm=I,N=Sh("slice"),im=Cl("species"),om=Array,sm=Math.max,am=(C({target:"Array",proto:!0,forced:!N},{slice:function(e,t){var r,n,i,o=tm(this),s=em(o),a=Qv(e,s),u=Qv(void 0===t?s:t,s);if(Xv(o)&&(r=o.constructor,(r=Wv(r)&&(r===om||Xv(r.prototype))||Zv(r)&&null===(r=r[im])?void 0:r)===om||void 0===r))return nm(o,a,u);for(n=new(void 0===r?om:r)(sm(u-a,0)),i=0;a<u;a++,i++)a in o&&rm(n,i,o[a]);return n.length=i,n}}),E.some),um=(O({target:"Array",proto:!0,forced:!kh("some")},{some:function(e){return am(this,e,1<arguments.length?arguments[1]:void 0)}}),Na),cm=A,lm=Oh,pm=Array,fm=Math.max,dm=Dh,hm=Math.floor,g=Lh,nd=!!(R=M.match(/firefox\/(\d+)/i))&&+R[1],td=/MSIE|Trident/.test(M),Yl=!!(Ja=M.match(/AppleWebKit\/(\d+)\./))&&+Ja[1],T=O,ym=Vo,vm=Bo,mm=A,gm=Ch,Em=_c,Ol=m,wm=g,Rf=kh,bm=nd,Tm=td,_m=ls,Im=Yl,Am=[],Om=(S=e)(Am.sort),Nm=S(Am.push),Id=Ol(function(){Am.sort(void 0)}),js=Ol(function(){Am.sort(null)}),r=Rf("sort"),Rm=!Ol(function(){if(_m)return _m<70;if(!(bm&&3<bm)){if(Tm)return!0;if(Im)return Im<603;for(var e,t,r,n="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)Am.push({k:e+r,v:t})}for(Am.sort(function(e,t){return t.v-e.v}),r=0;r<Am.length;r++)e=Am[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}}),I=(T({target:"Array",proto:!0,forced:Id||!js||!r||!Rm},{sort:function(e){void 0!==e&&ym(e);var t=vm(this);if(Rm)return void 0===e?Om(t):Om(t,e);for(var r,n,i=[],o=mm(t),s=0;s<o;s++)s in t&&Nm(i,t[s]);for(wm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Em(e)>Em(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)gm(t,s++);return t}}),wp("Array"),O),Sm=Bo,Cm=Na,xm=Oa,km=A,Mm=Nh,Um=Rh,Pm=Oh,Dm=Ch,Cl=Sh("splice"),Lm=Math.max,Fm=Math.min,C=(I({target:"Array",proto:!0,forced:!Cl},{splice:function(e,t){var r,n,i,o,s,a,u=Sm(this),c=km(u),l=Cm(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,Fm(Lm(xm(t),0),c-l)),Mm(c+r-n),i=Um(u,n),o=0;o<n;o++)(s=l+o)in u&&Pm(i,o,u[s]);if(r<(i.length=n)){for(o=l;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:Dm(u,a);for(o=c;c-n+r<o;o--)Dm(u,o-1)}else if(n<r)for(o=c-n;l<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:Dm(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),Hl("flat"),Hl("flatMap"),O),jm=Bo,Vm=A,Hm=Ch,zm=Nh,N=1!==[].unshift(0),R=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}(),M=(C({target:"Array",proto:!0,arity:1,forced:N||R},{unshift:function(e){var t=jm(this),r=Vm(t),n=arguments.length;if(n){zm(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:Hm(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}}),y.Array,{exports:{}}),Ja={},Bm=Mo,Gm=Po,Km=b.f,Jm=Dh,Ym="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],g=(Ja.f=function(e){if(!Ym||"Window"!=Bm(e))return Km(Gm(e));var t=e;try{return Km(t)}catch(t){return Jm(Ym)}},m(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))})),nd=m,qm=Lo,$m=Mo,Xm=g,Wm=Object.isExtensible,td=nd(function(){Wm(1)})||Xm?function(e){return!!qm(e)&&(!Xm||"ArrayBuffer"!=$m(e))&&(!Wm||Wm(e))}:Wm,ls=!m(function(){return Object.isExtensible(Object.preventExtensions({}))}),Zm=O,Qm=e,Yl=Va,eg=Lo,tg=_,rg=Ls.f,ng=b,ig=Ja,og=td,sg=ls,ag=!1,ug=Go("meta"),cg=0,lg=M.exports={enable:function(){lg.enable=function(){},ag=!0;var i=ng.f,o=Qm([].splice),e={};e[ug]=1,i(e).length&&(ng.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===ug){o(t,r,1);break}return t},Zm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ig.f}))},fastKey:function(e,t){if(!eg(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!tg(e,ug)){if(!og(e))return"F";if(!t)return"E";Fh(e)}return e[ug].objectID},getWeakData:function(e,t){if(!tg(e,ug)){if(!og(e))return!0;if(!t)return!1;Fh(e)}return e[ug].weakData},onFreeze:function(e){return sg&&ag&&og(e)&&!tg(e,ug)&&Fh(e),e}},pg=(Yl[ug]=!0,Do),fg=Lo,dg=sc,S=O,Rf=h,hg=e,Ol=qa,yg=Aa,T=M.exports,vg=Tc,mg=bp,Id=Do,gg=Lo,js=m,r=Ad,I=Gl,Eg=Aa,wg=Ls.f,bg=ac,Tg=jh,_g=vc,Ig=bp,Ag=Tc,Og=Jl,Ng=wp,Rg=So,Sg=M.exports.fastKey,Cg=cs.set,xg=cs.getterFor;function kg(e){var r=hg(Kh[e]);yg(Kh,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(zh&&!gg(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return zh&&!gg(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(zh&&!gg(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}function Mg(e,t){for(var r=0,n=Lg(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Ug(e,t,r,n){for(var i,o,s,a=Vg(e),u=jg(a),c=Fg(t,r),l=Bg(null),p=zg(u),f=0;f<p;f++)s=u[f],(o=Hg(c(s,f,a)))in l?Jg(l[o],s):l[o]=[s];if(n&&(i=n(a))!==Kg)for(o in l)l[o]=Gg(i,l[o]);return l}function Pg(e){for(var t,r,n=Wg(this),i=Xg(n),o=$g(e,1<arguments.length?arguments[1]:void 0),s=new Qg,a=Zg(i),u=0;u<a;u++)t=o(r=i[u],u,n),t0(s,t)?n0(e0(s,t),r):r0(s,t,[r]);return s}function Dg(e){return a0[e].prototype}Cl=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},C={getConstructor:function(e,r,n,i){function o(e,t,r){var n,i=u(e),o=s(e,t);return o?o.value=r:(i.last=o={index:n=Sg(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),Rg?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=Sg(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key==t)return r}var e=e(function(e,t){Ig(e,a),Cg(e,{type:r,index:bg(null),first:void 0,last:void 0,size:0}),Rg||(e.size=0),null!=t&&Ag(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=xg(r);return Tg(a,{clear:function(){for(var e=u(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,Rg?e.size=0:this.size=0},delete:function(e){var t,r,n=u(this),e=s(this,e);return e&&(t=e.next,r=e.previous,delete n.index[e.index],e.removed=!0,r&&(r.next=t),t&&(t.previous=r),n.first==e&&(n.first=t),n.last==e&&(n.last=r),Rg?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=_g(e,1<arguments.length?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),Tg(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),Rg&&wg(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=xg(t),o=xg(n);Og(e,t,function(e,t){Cg(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),Ng(t)}},Hh=-1!==(N="Map").indexOf("Map"),zh=-1!==N.indexOf("Weak"),Bh=Hh?"set":"add",Gh=Rf.Map,Kh=Gh&&Gh.prototype,R={},Ol(N,!Id(Jh=Gh)||!(zh||Kh.forEach&&!js(function(){(new Gh).entries().next()})))?(Jh=C.getConstructor(Cl,N,Hh,Bh),T.enable()):Ol(N,!0)&&(y=(Vh=new Jh)[Bh](zh?{}:-0,1)!=Vh,g=js(function(){Vh.has(1)}),nd=r(function(e){new Gh(e)}),Va=!zh&&js(function(){for(var e=new Gh,t=5;t--;)e[Bh](t,t);return!e.has(-0)}),nd||(((Jh=Cl(function(e,t){mg(e,Kh);r=new Gh,e=e,n=Jh,dg&&pg(e=e.constructor)&&e!==n&&fg(e=e.prototype)&&e!==n.prototype&&dg(r,e);var r,n=r;return null!=t&&vg(t,n[Bh],{that:n,AS_ENTRIES:Hh}),n})).prototype=Kh).constructor=Jh),(g||Va)&&(kg("delete"),kg("has"),Hh&&kg("get")),(Va||y)&&kg(Bh),zh&&Kh.clear&&delete Kh.clear),R.Map=Jh,S({global:!0,constructor:!0,forced:Jh!=Gh},R),I(Jh,N),zh||C.setStrong(Jh,N,Hh);var Lg=A,Fg=vc,jg=$o,Vg=Bo,Hg=Jo,zg=A,Bg=ac,Gg=Mg,Kg=Array,Jg=e([].push),Yg=Ug,_=Hl,qg=(O({target:"Array",proto:!0},{group:function(e){return Yg(this,e,1<arguments.length?arguments[1]:void 0)}}),_("group"),Ug),b=Hl,$g=(O({target:"Array",proto:!0,forced:!kh("groupBy")},{groupBy:function(e){return qg(this,e,1<arguments.length?arguments[1]:void 0)}}),b("groupBy"),vc),Ja=e,Xg=$o,Wg=Bo,Zg=A,Qg=Fo("Map"),td=Qg.prototype,e0=Ja(td.get),t0=Ja(td.has),r0=Ja(td.set),n0=Ja([].push),ls=Hl,Yl=Pg,sc=(O({target:"Array",proto:!0,name:"groupToMap",forced:!kh("groupByToMap")},{groupByToMap:Yl}),ls("groupByToMap"),Hl),i0=(O({target:"Array",proto:!0},{groupToMap:Pg}),sc("groupToMap"),A),o0=Po,qa=Hl,s0=Array,a0=(O({target:"Array",proto:!0},{toReversed:function(){for(var e=o0(this),t=s0,r=i0(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n}}),qa("toReversed"),h),M=O,u0=Vo,c0=Po,l0=Mg,Rf=Hl,p0=Array,f0=e(Dg("Array").sort),Ol=(M({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&u0(e);var t=c0(this),t=l0(p0,t);return f0(t,e)}}),Rf("toSorted"),O),r=Hl,d0=Nh,h0=A,y0=Na,v0=Po,m0=Oa,g0=Array,E0=Math.max,w0=Math.min,b0=(Ol({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=v0(this),a=h0(s),u=y0(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,w0(E0(m0(t),0),a-u)),i=d0(a+r-n),o=g0(i);c<u;c++)o[c]=s[c];for(;c<u+r;c++)o[c]=arguments[c-u+2];for(;c<i;c++)o[c]=s[c+n-r];return o}}),r("toSpliced"),A),T0=Oa,_0=RangeError,I0=Po,A0=Array;if(O({target:"Array",proto:!0},{with:function(e,t){var r=I0(this),n=A0,i=t,o=b0(r),s=(e=T0(e))<0?o+e:e;if(o<=s||s<0)throw _0("Incorrect index");for(var a=new n(o),u=0;u<o;u++)a[u]=u===s?i:r[u];return a}}),js=h,nd=Rs,Cl=Do,g=Ta,Va=Aa,y=Ko("asyncIterator"),S=js.AsyncIterator,R=nd.AsyncIteratorPrototype)gw=R;else if(Cl(S))gw=S.prototype;else if(nd.USE_FUNCTION_CONSTRUCTOR||js.USE_FUNCTION_CONSTRUCTOR)try{pw=g(g(g(Function("return async function*(){}()")()))),g(pw)===Object.prototype&&(gw=pw)}catch(De){}function O0(e,t,r){var n=e.done;P0.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function N0(e){D0(this,{type:"AsyncFromSyncIterator",iterator:M0(e),next:e.next})}function R0(e,t,r,n){try{var i=q0(e,"return");if(i)return Y0("Promise").resolve(J0(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)}function S0(e){var f=0==e,d=1==e,h=2==e,y=3==e;return function(e,s,a){var e={iterator:e,next:G0(K0(e).next)},u=Q0("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||X0(s),new u(function(r,n){var i=function(e){R0(c,n,e,n)},o=function(){try{if(f&&p)try{Z0(l)}catch(e){i(e)}u.resolve(W0($0(t,c))).then(function(e){try{if(W0(e).done)f?(a.length=l,r(a)):r(!y&&(h||void 0));else{var t=e.value;try{p?u.resolve(f?s(t,l):s(t)).then(function(e){if(d)o();else if(h)e?o():R0(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?R0(c,r,y||t,n):o()},i):(a[l++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function C0(e,t){if(!hE||!dE(e)||!hE(e))return!1;for(var r,n=0,i=e.length;n<i;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==i}function x0(e,t,r){r.get&&yE(r.get,t,{getter:!0}),r.set&&yE(r.set,t,{setter:!0}),vE.f(e,t,r)}Cl((gw=gw||{})[y])||Va(gw,y,function(){return this});var k0=t,M0=qo,I=ac,U0=Ho,C=jh,N=cs,_=gw,P0=Fo("Promise"),D0=N.set,L0=N.getterFor("AsyncFromSyncIterator");N0.prototype=C(I(_),{next:function(){var n=L0(this);return new P0(function(e,t){var r=M0(k0(n.next,n.iterator));O0(r,e,t)})},return:function(){var n=L0(this).iterator;return new P0(function(e,t){var r=U0(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=M0(k0(r,n));O0(r,e,t)})}});var F0=t,j0=b=N0,V0=qo,H0=Ec,z0=Ho,B0=Ko("asyncIterator"),G0=Vo,K0=qo,J0=t,Y0=Fo,q0=Ho,$0=t,X0=Vo,W0=qo,Z0=Nh,Q0=Fo,$o={toArray:S0(0),forEach:S0(1),every:S0(2),some:S0(3),find:S0(4)},eE=vc,tE=Bo,rE=x,nE=Ec,iE=gc,oE=Ho,td=Dg,sE=Fo,aE=b,uE=$o.toArray,cE=Ko("asyncIterator"),lE=td("Array").values,pE=(O({target:"Array",stat:!0,forced:!0},{fromAsync:function(o){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(sE("Promise"))(function(e){var t=tE(o),r=(void 0!==a&&(a=eE(a,u)),oE(t,cE)),n=r?void 0:iE(t)||lE,i=rE(s)?new s:[],r=r?function(e,t){t=arguments.length<2?z0(e,B0):t;return t?V0(F0(t,e)):new j0(H0(e))}(t,r):new aE(nE(t,n));e(uE(r,a,i))})}}),E.filterReject),Ja=Hl,fE=(O({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return pE(this,e,1<arguments.length?arguments[1]:void 0)}}),Ja("filterOut"),E.filterReject),Yl=Hl,ls=(O({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return fE(this,e,1<arguments.length?arguments[1]:void 0)}}),Yl("filterReject"),O),dE=k,hE=Object.isFrozen,yE=(ls({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!C0(e,!0))return!1;var t=e.raw;return t.length===e.length&&C0(t,!1)}}),vs.exports),vE=Ls,sc=Hl,mE=Bo,gE=A,qa=(So&&(x0(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=mE(this),t=gE(e);return 0==t?void 0:e[t-1]},set:function(e){var t=mE(this),r=gE(t);return t[0==r?0:r-1]=e}}),sc("lastItem")),Hl),EE=Bo,wE=A,M=(So&&(x0(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=EE(this),e=wE(e);return 0==e?0:e-1}}),qa("lastIndex")),e),bE=Vo,TE=A,_E=Bo,IE=Rh,AE=Fo("Map"),Rf=AE.prototype,OE=M(Rf.forEach),NE=M(Rf.has),RE=M(Rf.set),SE=M([].push),Ol=Hl;O({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=_E(this),i=TE(n),o=IE(n,0),s=new AE,a=null!=e?bE(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),NE(s,r)||RE(s,r,t);return OE(s,function(e){SE(o,e)}),o}}),Ol("uniqueBy"),$T.exposure=function(e,t,r,n){return new VE(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},$T.track=function(e,t,r,n){return new HE(n,r,e,t)},$T.remoteConfig=function(e,t,r,n){return new zE(n,e,t.parameter,t.valueId,t.reason,r)},$T.isExposureEvent=function(e){return void 0!==e.experiment},$T.isTrackEvent=function(e){return void 0!==e.eventType},$T.isRemoteConfigEvent=function(e){return void 0!==e.parameter},$T.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},$T.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},$T.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},$T.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[_t.ID],identifiers:this.user.identifiers,userProperties:Xe.sanitize(this.user.properties),hackleProperties:Xe.sanitize(this.user.hackleProperties)}};var CE,xE,kE,ME,UE,PE,DE,LE,FE,jE=$T,VE=(Ke(qT,FE=jE),qT.prototype.copyWithUser=function(e){return new qT(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},qT.prototype.toDto=function(){return c(c({},FE.prototype.toDto.call(this)),{experimentId:this.experiment.id,experimentKey:this.experiment.key,experimentType:this.experiment.type,experimentVersion:this.experiment.version,variationId:this.variationId,variationKey:this.variationKey,decisionReason:this.decisionReason.toString(),properties:this.properties})},qT),HE=(Ke(YT,LE=jE),YT.prototype.copyWithUser=function(e){return new YT(this.timestamp,e,this.eventType,this.event,this.insertId)},YT.prototype.toDto=function(){return c(c({},LE.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Xe.sanitize(this.event.properties)})},YT),zE=(Ke(JT,DE=jE),JT.prototype.copyWithUser=function(e){return new JT(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},JT.prototype.toDto=function(){return c(c({},DE.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Xe.sanitize(this.properties)})},JT),BE=(KT.isSessionEvent=function(e){return!!jE.isTrackEvent(e)&&(e.event.key===KT.SESSION_START_EVENT_NAME||e.event.key===KT.SESSION_END_EVENT_NAME)},KT.prototype.onSessionStarted=function(e,t,r){this.track(KT.SESSION_START_EVENT_NAME,e,t,r)},KT.prototype.onSessionEnded=function(e,t,r){this.track(KT.SESSION_END_EVENT_NAME,e,t,r)},KT.prototype.track=function(e,t,r,n){e={key:e},r=this.userManager.toHackleUser(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},KT.prototype.decorateSession=function(e,t){t=(new It).add(_t.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},KT.SESSION_START_EVENT_NAME="$session_start",KT.SESSION_END_EVENT_NAME="$session_end",KT),GE=(GT.prototype.process=function(e){var t;BE.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.exposureEventDedupDeterminer.isDedupTarget(e)||(e=e,t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[_t.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[_t.SESSION]=t.sessionId,e))})),this.delegate.process(t))},GT.prototype.flush=function(e){this.delegate.flush(e)},GT.prototype.close=function(){this.delegate.close()},GT),KE=(BT.prototype.isDedupTarget=function(e){if(-1===this.exposureEventDedupIntervalMillis)return!1;if(!jE.isExposureEvent(e))return!1;qe.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache=new Map);var t=[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-"),e=(new Date).getTime(),r=this.cache.get(t);return void 0!==r&&e-r<=this.exposureEventDedupIntervalMillis||(this.cache.set(t,e),!1)},BT),JE=(zT.toEvent=function(e){var t;return{key:zT.EVENT_KEY,properties:{level:zT.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:zT._stacktrace(e)}}},zT._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,zT.STACK_TRACK_LIMIT).join("\n")},zT.EVENT_KEY="$trace",zT.LEVEL_ERROR="error",zT.STACK_TRACK_LIMIT=30,zT),r=(HT.prototype.evaluate=function(e,t){if(!this.supports(e))throw new Error("Unsupported EvaluatorRequest ".concat(e.toString()));var r;if(t.contains(e))throw r=t.stack.map(function(e){return e.toString()}).join(" - "),new Error("Circular evaluation has occurred [".concat(r," - ").concat(e.toString(),"]"));t.addRequest(e);try{return this.evaluateInternal(e,t)}finally{t.removeRequest(e)}},HT),YE=(VT.prototype.with=function(e){return new VT(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},VT.of=function(e,t,r,n){var i=this.config(e.workspace,r);return new VT(n,t.targetEvaluations,e.experiment,r.id,r.key,i)},VT.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new VT(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},VT.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})},VT),qE=(Ke(jT,PE=r),jT.prototype.supports=function(e){return void 0!==e.experiment},jT.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:YE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},jT),$E=(FT.of=function(e,t,r,n,i,o){return o.returnValue=Xe.truncateStringValue(n),new FT(i,t.targetEvaluations,e.parameter,r,n,o)},FT.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)},FT),XE=(Ke(LT,UE=r),LT.prototype.supports=function(e){return void 0!==e.parameter},LT.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=Xe.truncateStringValue(e.defaultValue),a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return $E.ofDefault(e,t,f.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return a.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,f.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,f.DEFAULT_RULE,r)},LT.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?$E.ofDefault(e,t,f.TYPE_MISMATCH,i):$E.of(e,t,r.id,r.rawValue,n,i)},LT),WE=(DT.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id},DT),ZE=(PT.create=function(){return new PT},Object.defineProperty(PT.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(PT.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),PT.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},PT.prototype.addRequest=function(e){this._stack.push(e)},PT.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},PT.prototype.get=function(t){return this._targetEvaluations.find(function(e){return e instanceof YE&&e.experiment.id===t.id})},PT.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},PT),QE=(UT.of=function(e,t,r,n){return new UT(e,t,r,n)},UT.by=function(e,t){return new UT(e.workspace,e.user,t,"A")},UT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")},UT),ew=(MT.of=function(e,t,r,n,i){return new MT(e,t,r,n,i)},MT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")},MT),tw=(kT.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},kT.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},kT.asActualNumber=function(e){return!isNaN(e)&&isFinite(e)?e:void 0},kT),rw=(xT.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var i=n[r].getVariation(e,t);if(void 0!==i)return i}},xT),nw=(CT.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},CT.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return tw.asNumber(e)},CT.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=tw.asNumber(t),e=tw.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},CT.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},CT.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},CT.prototype.clear=function(){this.listStorage.clear()},CT),iw=(ST.prototype.add=function(e){this.evaluators.push(e)},ST.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(a.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)},ST),ow=(RT.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},RT.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},RT.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)},RT),sw=(NT.prototype.decorate=function(e){return e},NT),aw=(OT.prototype.decorate=function(e){return"string"==typeof e?decodeURI(e):e},OT),uw=(AT.prototype.matches=function(e,t,r){void 0===r&&(r=new sw);var n=this.valueMatcherFactory.getMatcher(t.valueType),i=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,n,i,r);return this.typeMatches(t.type,e)},AT.prototype.userValueMatches=function(e,t,r,n,i){return Array.isArray(e)?this.arrayMatches(e,t,r,n,i):this.singleMatches(e,t,r,n,i)},AT.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},AT.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},AT.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}},AT),cw=(IT.tryParse=function(e){try{return new URL(e)}catch(e){return}},IT.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:IT.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},IT),h=(_T.prototype.booleanMatches=function(e,t){return e===t},_T.prototype.numberMatches=function(e,t){return e===t},_T.prototype.stringMatches=function(e,t){return e===t},_T.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},_T.prototype.urlMatches=function(e,t){return decodeURI(cw.removePathnameTrailingSlash(e))===decodeURI(cw.removePathnameTrailingSlash(t))},_T),Rs=(TT.prototype.booleanMatches=function(e,t){return!1},TT.prototype.numberMatches=function(e,t){return!1},TT.prototype.stringMatches=function(e,t){return e.includes(t)},TT.prototype.versionMatches=function(e,t){return!1},TT.prototype.urlMatches=function(e,t){return decodeURI(e.href).includes(t)},TT),Ta=(bT.prototype.booleanMatches=function(e,t){return!1},bT.prototype.numberMatches=function(e,t){return!1},bT.prototype.stringMatches=function(e,t){return e.startsWith(t)},bT.prototype.versionMatches=function(e,t){return!1},bT.prototype.urlMatches=function(e,t){return decodeURI(e.href).startsWith(t)},bT),R=(wT.prototype.booleanMatches=function(e,t){return!1},wT.prototype.numberMatches=function(e,t){return!1},wT.prototype.stringMatches=function(e,t){return e.endsWith(t)},wT.prototype.versionMatches=function(e,t){return!1},wT.prototype.urlMatches=function(e,t){return!1},wT),S=(ET.prototype.booleanMatches=function(e,t){return!1},ET.prototype.numberMatches=function(e,t){return t<e},ET.prototype.stringMatches=function(e,t){return t<e},ET.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},ET.prototype.urlMatches=function(e,t){return!1},ET),nd=(gT.prototype.booleanMatches=function(e,t){return!1},gT.prototype.numberMatches=function(e,t){return t<=e},gT.prototype.stringMatches=function(e,t){return t<=e},gT.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},gT.prototype.urlMatches=function(e,t){return!1},gT),js=(mT.prototype.booleanMatches=function(e,t){return!1},mT.prototype.numberMatches=function(e,t){return e<t},mT.prototype.stringMatches=function(e,t){return e<t},mT.prototype.versionMatches=function(e,t){return e.isLessThan(t)},mT.prototype.urlMatches=function(e,t){return!1},mT),g=(vT.prototype.booleanMatches=function(e,t){return!1},vT.prototype.numberMatches=function(e,t){return e<=t},vT.prototype.stringMatches=function(e,t){return e<=t},vT.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},vT.prototype.urlMatches=function(e,t){return!1},vT),lw=(yT.prototype.getMatcher=function(e){switch(e){case"IN":return yT.IN_MATCHER;case"CONTAINS":return yT.CONTAINS_MATCHER;case"STARTS_WITH":return yT.STARTS_WITH_MATCHER;case"ENDS_WITH":return yT.ENDS_WITH_MATCHER;case"GT":return yT.GT_MATCHER;case"GTE":return yT.GTE_MATCHER;case"LT":return yT.LT_MATCHER;case"LTE":return yT.LTE_MATCHER}},yT.IN_MATCHER=new h,yT.CONTAINS_MATCHER=new Rs,yT.STARTS_WITH_MATCHER=new Ta,yT.ENDS_WITH_MATCHER=new R,yT.GT_MATCHER=new S,yT.GTE_MATCHER=new nd,yT.LT_MATCHER=new js,yT.LTE_MATCHER=new g,yT),pw=(hT.prototype.matches=function(e,t,r){t=tw.asString(t),r=tw.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)},hT),Cl=(dT.prototype.matches=function(e,t,r){t=tw.asNumber(t),r=tw.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)},dT),Va=(fT.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)},fT),y=(pT.prototype.matches=function(e,t,r){t=ur.tryParse(t),r=ur.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)},pT),ac=(lT.prototype.matches=function(e,t,r){t=cw.tryParse(t),r=tw.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.urlMatches(t,r)},lT),cs=(cT.prototype.matches=function(e,t,r){return!1},cT),fw=(uT.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return uT.STRING_MATCHER;case"NUMBER":return uT.NUMBER_MATCHER;case"BOOLEAN":return uT.BOOLEAN_MATCHER;case"VERSION":return uT.VERSION_MATCHER;case"URL":return uT.URL_MATCHER;case"NULL":case"UNKNOWN":return uT.NULL_MATCHER}},uT.STRING_MATCHER=new pw,uT.NUMBER_MATCHER=new Cl,uT.BOOLEAN_MATCHER=new Va,uT.VERSION_MATCHER=new y,uT.URL_MATCHER=new ac,uT.NULL_MATCHER=new cs,uT),dw=(aT.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);if(a.isNullOrUndefined(e))return!1;var n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},aT.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?aw:sw)},aT),hw=(sT.prototype.resolveOrNull=function(e,t){switch(t.type){case"USER_ID":return e.identifiers[t.name];case"USER_PROPERTY":return e.properties[t.name];case"HACKLE_PROPERTY":return e.hackleProperties[t.name];case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"EVENT_PROPERTY":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},sT),yw=(oT.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var i=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return i;case"NOT_MATCH":return!i}},oT.prototype._matches=function(e,t,r){if("string"!=typeof r)throw new Error("SegmentKey[".concat(r,"]"));var n=e.workspace.getSegmentOrNull(r);if(n)return this.segmentMatcher.matches(e,t,n);throw new Error("Segment[".concat(r,"]"))},oT),vw=(iT.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},iT.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})},iT),mw=(nT.prototype.matches=function(e,t,r){switch(r.key.type){case"AB_TEST":return this.abTestMatcher.matches(e,t,r);case"FEATURE_FLAG":return this.featureFlagMatcher.matches(e,t,r);case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"EVENT_PROPERTY":case"SEGMENT":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}},nT),gw=(rT.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(tw.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var i=null!=(i=t.get(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},rT.prototype.evaluate=function(e,t,r){r=QE.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e},rT),Ew=(Ke(tT,ME=gw),tT.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},tT.prototype.resolve=function(e,t){return e instanceof QE&&t.reason===f.TRAFFIC_ALLOCATED?t.with(f.TRAFFIC_ALLOCATED_BY_TARGETING):t},tT.prototype.evaluationMatches=function(e,t){return!!tT.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},tT.AB_TEST_MATCHED_REASONS=[f.OVERRIDDEN,f.TRAFFIC_ALLOCATED,f.EXPERIMENT_COMPLETED,f.TRAFFIC_ALLOCATED_BY_TARGETING],tT),ww=(Ke(eT,kE=gw),eT.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},eT.prototype.resolve=function(e,t){return t},eT.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)},eT),bw=(Qb.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},Qb.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event},Qb),Tw=(Zb.prototype.resolveOrNull=function(e,t){var r;switch(t.type){case"EVENT_PROPERTY":return null==(r=this.properties(e))?void 0:r[t.name];case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},Zb.prototype.properties=function(e){return jE.isTrackEvent(e)?e.event.properties:jE.isExposureEvent(e)||jE.isRemoteConfigEvent(e)?e.properties:void 0},Zb),_w=(Wb.prototype.matches=function(e,t,r){var n=this;if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));return!!e.user.cohorts&&e.user.cohorts.some(function(e){return n.valueOperatorMatcher.matches(e.id,r.match)})},Wb),Iw=(Xb.prototype.getMatcher=function(e){switch(e){case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":return this.userConditionMatcher;case"EVENT_PROPERTY":return this.eventConditionMatcher;case"SEGMENT":return this.segmentConditionMatcher;case"AB_TEST":case"FEATURE_FLAG":return this.experimentConditionMatcher;case"COHORT":return this.cohortConditionMatcher}},Xb),Aw=($b.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},$b.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},$b.prototype.resolveBucket=function(e,t){var t=e.workspace.getBucketOrNull(t.bucketId),r=e.user.identifiers[e.experiment.identifierType];if(r){t=this.bucketer.bucketing(t,r);if(t)return e.experiment._getVariationByIdOrNull(t.variationId)}},$b),Ow={murmurhash3_x86_32:function(e,t,r,n){for(var i,o=-4&(n=void 0===n?e.length:n),s=t,a=0;a<o;a+=4)i=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,i=(131071&(i=this.mul32(i,3432918353)))<<15|i>>>17,s=5*((524287&(s^=i=this.mul32(i,461845907)))<<13|s>>>19)+3864292196|0;switch(i=0,n%4){case 3:i=(255&e.charCodeAt(2+o))<<16;case 2:i|=(255&e.charCodeAt(1+o))<<8;case 1:i|=255&e.charCodeAt(o),i=(131071&(i=this.mul32(i,3432918353)))<<15|i>>>17,s^=i=this.mul32(i,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),(s=this.mul32(s^=s>>>13,3266489909))^s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},Nw=(qb.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},qb.prototype.calculateSlotNumber=function(e,t,r){r=Ow.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},qb),Rw=(Yb.prototype.evaluate=function(e,t){return this.flowEvaluator&&this.nextFlow?this.flowEvaluator.evaluate(e,t,this.nextFlow):void 0},Yb.end=function(){return new Yb(void 0,void 0)},Yb.decision=function(e,t){return new Yb(e,t)},Yb.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,i=e.reverse();n<i.length;n++)var o=i[n],r=this.decision(o,r);return r},Yb),Sw=(Jb.prototype.evaluate=function(e,t,r){var n=this.overrideResolver.resolveOrNull(e,t);if(!n)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return YE.of(e,t,n,f.OVERRIDDEN);case"FEATURE_FLAG":return YE.of(e,t,n,f.INDIVIDUAL_TARGET_MATCH)}},Jb),Cw=(Kb.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?YE.ofDefault(e,t,f.EXPERIMENT_DRAFT):r.evaluate(e,t)},Kb),xw=(Gb.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return YE.ofDefault(e,t,f.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return YE.ofDefault(e,t,f.FEATURE_FLAG_INACTIVE)}},Gb),kw=(Bb.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return YE.of(e,t,r,f.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))},Bb),Mw=(zb.prototype.evaluate=function(e,t,r){if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));return this.experimentTargetDeterminer.isUserInExperimentTarget(e,t)?r.evaluate(e,t):YE.ofDefault(e,t,f.NOT_IN_EXPERIMENT_TARGET)},zb),Uw=(Hb.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);return n?n.isDropped?YE.ofDefault(e,t,f.VARIATION_DROPPED):YE.of(e,t,n,f.TRAFFIC_ALLOCATED):YE.ofDefault(e,t,f.TRAFFIC_NOT_ALLOCATED)},Hb),Pw=(Vb.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return r.evaluate(e,t);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);if(!n)return r.evaluate(e,t);r=this.actionResolver.resolveOrNull(e,t,n.action);if(r)return YE.of(e,t,r,f.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},Vb),Dw=(jb.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return YE.ofDefault(e,t,f.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return YE.of(e,t,n,f.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))},jb),Lw=(Fb.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var i=e.workspace.getContainerOrNull(n);if(i)return this.containerResolver.isUserInContainerGroup(e,t,i)?r.evaluate(e,t):YE.ofDefault(e,t,f.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))},Fb),Fw=(Lb.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):YE.ofDefault(e,t,f.IDENTIFIER_NOT_FOUND)},Lb),jw=(Db.prototype.isUserInExperimentTarget=function(t,r){var n=this;return 0===t.experiment.targetAudiences.length||t.experiment.targetAudiences.some(function(e){return n.targetMatcher.matches(t,r,e)})},Db),Vw=(Pb.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})},Pb),Hw=(Ub.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},Ub.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},Ub.prototype._resolveUserOverride=function(e){var t=e.experiment,e=e.user.identifiers[t.identifierType];if(e){e=t.userOverrides.get(e);if(e)return t._getVariationByIdOrNull(e)}},Ub.prototype._resolveSegmentOverride=function(t,r){var n=this,e=t.experiment.segmentOverrides.find(function(e){return n.targetMatcher.matches(t,r,e.target)});if(e)return this.actionResolver.resolveOrNull(t,r,e.action)},Ub),zw=(Mb.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(a.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)},Mb),Bw=(kb.of=function(e,t,r,n){return new kb(r,t.targetEvaluations,e.inAppMessage,n)},kb),Gw=(xb.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):Bw.of(e,t,f.UNSUPPORTED_PLATFORM)},xb),Kw=(Cb.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Bw.of(e,t,f.OVERRIDDEN,n)):r.evaluate(e,t)},Cb),Jw=(Sb.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?Bw.of(e,t,f.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)},Sb),Yw=(Rb.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?Bw.of(e,t,f.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)},Rb),qw=(Nb.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):Bw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_PERIOD)},Nb),$w=(Ob.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?Bw.of(e,t,f.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)},Ob),Xw=(Ab.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),Bw.of(e,t,f.IN_APP_MESSAGE_TARGET,n)):Bw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},Ab),Ww=(Ib.prototype.resolve=function(e,t){var e=e.inAppMessage,r=e.messageContext.defaultLang,n=e.messageContext.messages.find(function(e){return e.lang===r});if(a.isNullOrUndefined(n))throw new Error("InAppMessage must be decided [".concat(e.id,"]"));return n},Ib),Zw=(_b.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},_b.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)},_b),Qw=(Tb.prototype.matches=function(t,r){var n=this,e=t.inAppMessage.targetContext.targets;return 0===e.length||e.some(function(e){return n.targetMatcher.matches(t,r,e)})},Tb),eb=(bb.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)},bb),tb=(wb.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},wb.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(a.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return a.isNotNullOrUndefined(this.bucketer.bucketing(e,t))},wb),rb=(Eb.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},Eb.getOrNull=function(e){return Eb.instances.get(e)},Eb.register=function(e,t){return Eb.instances.set(e,t),t},Eb.instances=new Map,Eb),nb=(gb.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},gb.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow},gb),ib=(mb.prototype.create=function(r,e){var n=this,i=this.clock.currentMillis(),o=new Array,t=this.createEvent(r,e,i,{});return o.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[mb.ROOT_TYPE]=r.key.type,t[mb.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);o.push(e)}),o},mb.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof YE)return n[mb.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[mb.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[mb.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,jE.exposure(e.user,t,n,r);if(t instanceof $E)return jE.remoteConfig(e.user,t,c(c({},n),t.properties),r);throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},mb.ROOT_TYPE="$targetingRootType",mb.ROOT_ID="$targetingRootId",mb.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",mb.EXPERIMENT_VERSION_KEY="$experiment_version",mb.EXECUTION_VERSION_KEY="$execution_version",mb),ob=(Ke(vb,xE=r),vb.prototype.supports=function(e){return void 0!==e.inAppMessage},vb.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:Bw.of(e,t,f.NOT_IN_IN_APP_MESSAGE_TARGET)},vb),sb=(yb.of=function(e,t,r,n){return new yb(e,t,r,n)},yb.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")},yb),ab=i.log,ub=(hb.create=function(e,t,r,n){var i=new iw,r=new rw(r),r=new nb(i,r,n),n=new qE(r),o=new XE(r.remoteConfigParameterTargetRuleDeterminer),r=new ob(r);return i.add(n),i.add(o),new hb(n,o,r,e,new ib(Qe.instance),t,new cb,Qe.instance)},hb.prototype.experiment=function(e,t,r){var n=this;if(!e)return ab.error("experimentKey must not be empty"),ht.of(r,f.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return ab.warn("SDK not ready."),ht.of(r,f.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return ab.warn("Experiment does not exist."),ht.of(r,f.EXPERIMENT_NOT_FOUND);i=QE.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},hb.prototype.experiments=function(r){var n=this,i=new xn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=QE.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},hb.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,ZE.create()),t=null!=(t=e.config)?t:new et;return[e,ht.of(e.variationKey,e.reason,t)]},hb.prototype.featureFlag=function(e,t){var r=this;if(!e)return ab.error("featureKey must not be empty"),yt.off(f.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return ab.warn("SDK not ready."),yt.off(f.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return ab.warn("FeatureFlag does not exist."),yt.off(f.FEATURE_FLAG_NOT_FOUND);n=QE.of(n,t,e,"A"),t=this.featureFlagInternal(n),e=t[0],t=t[1];return this.eventFactory.create(n,e).forEach(function(e){return r.eventProcessor.process(e)}),t},hb.prototype.featureFlags=function(r){var n=this,i=new xn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=QE.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},hb.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,ZE.create()),t=null!=(t=e.config)?t:new et;return[e,"A"===e.variationKey?yt.off(e.reason,t):yt.on(e.reason,t)]},hb.prototype.inAppMessage=function(e,t){var r=this.workspaceFetcher.get();if(!r)return ab.warn("SDK not ready."),dt.of(f.SDK_NOT_READY);e=r.getInAppMessageOrNull(e);if(!e)return ab.warn("In app message does not exist."),dt.of(f.IN_APP_MESSAGE_NOT_FOUND);r=sb.of(r,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(r,ZE.create());return dt.of(t.reason,t.inAppMessage,t.message)},hb.prototype.tryInAppMessage=function(e,t){var r,n=gn.start();try{r=this.inAppMessage(e,t)}catch(t){ab.error("Unexpected error while deciding in app message [".concat(e,"]: ").concat(t)),r=dt.of(f.EXCEPTION)}return si.inAppMessage(n,e,r),r},hb.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"==typeof e?"object"!=typeof e||e.key&&"string"==typeof e.key?(n=(null==(n=this.workspaceFetcher.get())?void 0:n.getEventTypeOrNull(e.key))||new Tt(0,e.key),this.eventProcessor.process(jE.track(n,e,t,r))):ab.warn("Event key must be not null. or event key must be string type."):ab.warn("Event must be event type."):ab.warn("event must not be null.")},hb.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=JE.toEvent(e),this.flush(),this.track(e,t),this.flush())},hb.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},hb.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(a.isNullOrUndefined(o))return ab.warn("SDK not ready."),ft.of(n,f.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return ab.warn("Remote config parameter does not exist."),ft.of(n,f.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=ew.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,ZE.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),ft.of(t.value,t.reason)},hb.prototype.close=function(){this.eventProcessor.close()},hb),cb=(db.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},db.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&e.name===t.name&&e.message===t.message&&e.stack===t.stack},db),lb=(fb.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},fb.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))},fb),pb=null;function fb(){this._installed=[],this._installations={onerror:XT,onunhandledrejection:WT}}function db(){}function hb(e,t,r,n,i,o,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=i,this.eventProcessor=o,this.errorDedupDeterminer=s,this.clock=a}function yb(e,t,r,n){this.key=new WE("IN_APP_MESSAGE",r.key),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}function vb(e){var t=xE.call(this)||this;return t.evaluationFlowFactory=e,t}function mb(e){this.clock=e}function gb(e,t,r){var n=new Nw,e=rb.register("targetMatcher",new ow(new Iw(e))),i=new Aw(n),t=new Hw(t,e,i),o=new zw(n),o=(this.abTestFlow=Rw.of(new Sw(t),new Fw,new Lw(o),new Mw(new jw(e)),new Cw,new xw,new kw,new Uw(i)),this.featureFlagFlow=Rw.of(new Cw,new xw,new kw,new Sw(t),new Fw,new Pw(new Vw(e),i),new Dw(i)),new Ww);this.inAppMessageFlow=Rw.of(new Gw,new Kw(new Zw,o),new Jw,new Yw,new qw,new $w(new eb(r)),new Xw(new Qw(e),o)),this.remoteConfigParameterTargetRuleDeterminer=new tb(e,n)}function Eb(){}function wb(e,t){this.targetMatcher=e,this.bucketer=t}function bb(e){this.storage=e}function Tb(e){this.targetMatcher=e}function _b(){}function Ib(){}function Ab(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}function Ob(e){this.hiddenMatcher=e}function Nb(){}function Rb(){}function Sb(){}function Cb(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}function xb(){}function kb(e,t,r,n){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n}function Mb(e){this.bucketer=e}function Ub(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}function Pb(e){this.targetMatcher=e}function Db(e){this.targetMatcher=e}function Lb(){}function Fb(e){this.containerResolver=e}function jb(e){this.actionResolver=e}function Vb(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}function Hb(e){this.actionResolver=e}function zb(e){this.experimentTargetDeterminer=e}function Bb(){}function Gb(){}function Kb(){}function Jb(e){this.overrideResolver=e}function Yb(e,t){this.flowEvaluator=e,this.nextFlow=t}function qb(){}function $b(e){this.bucketer=e}function Xb(e){var t=new uw(new fw,new lw);this.userConditionMatcher=new dw(new hw,t),this.eventConditionMatcher=new bw(new Tw,t),this.segmentConditionMatcher=new yw(new vw(this.userConditionMatcher)),this.experimentConditionMatcher=new mw(new Ew(e,t),new ww(e,t)),this.cohortConditionMatcher=new _w(t)}function Wb(e){this.valueOperatorMatcher=e}function Zb(){}function Qb(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}function eT(e,t){return kE.call(this,e,t)||this}function tT(e,t){return ME.call(this,e,t)||this}function rT(e,t){this.evaluator=e,this.valueOperatorMatcher=t}function nT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}function iT(e){this.userConditionMatcher=e}function oT(e){this.segmentMatcher=e}function sT(){}function aT(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}function uT(){}function cT(){}function lT(){}function pT(){}function fT(){}function dT(){}function hT(){}function yT(){}function vT(){}function mT(){}function gT(){}function ET(){}function wT(){}function bT(){}function TT(){}function _T(){}function IT(){}function AT(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}function OT(){}function NT(){}function RT(e){this.conditionMatcherFactory=e}function ST(){this.evaluators=new Array}function CT(e){this.listStorage=e}function xT(e){this.storages=e}function kT(){}function MT(e,t,r,n,i){this.key=new WE("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}function UT(e,t,r,n){this.key=new WE("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}function PT(){this._stack=[],this._targetEvaluations=[]}function DT(e,t){this.type=e,this.id=t}function LT(e){var t=UE.call(this)||this;return t.targetRuleDeterminer=e,t}function FT(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}function jT(e){var t=PE.call(this)||this;return t.evaluationFlowFactory=e,t}function VT(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}function HT(){}function zT(){}function BT(e){this.cache=new Map,this.exposureEventDedupIntervalMillis=e}function GT(e,t,r,n){this.delegate=e,this.exposureEventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}function KT(e,t){this.userManager=e,this.core=t}function JT(e,t,r,n,i,o,s){e=DE.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}function YT(e,t,r,n,i){e=LE.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}function qT(e,t,r,n,i,o,s,a){e=FE.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}function $T(e,t,r){void 0===r&&(r=De.v4()),this.timestamp=e,this.user=t,this.insertId=r}function XT(o,s){pb=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),pb&&pb.apply(this,arguments)}}function WT(r,n){CE=window.onunhandledrejection,window.onunhandledrejection=function(e){var t;try{"reason"in e?t=e.reason:"detail"in e&&"reason"in e.detail&&(t=e.detail.reason)}catch(e){}t instanceof Error&&r.trackException(t,n.resolve()),CE&&CE.apply(this,arguments)}}function ZT(e,t){return null!==e&&e.userId===t.userId&&e.deviceId===t.deviceId}function QT(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n}function e_(t,r){return Object.keys(Q_).every(function(e){return t[e]===r[e]})}HI.prototype.read=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},HI.prototype.save=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},HI.prototype.add=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),[4,this.save(t.concat(r).slice(-this.maxSize))];case 2:return e.sent(),[2]}})})},HI.prototype.delete=function(n){return o(this,void 0,void 0,function(){var t,r=this;return s(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),t=t.filter(function(e){return!r.isDeleteTarget(e,n)}),[4,this.save(t)];case 2:return e.sent(),[2]}})})},HI.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},HI.prototype.clear=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var t_=HI,r_=(VI.builder=function(){return new n_},VI.empty=function(){return VI.builder().build()},VI.from=function(e){return new VI(e)},VI.fromDto=function(e){for(var t=VI.builder(),r=0,n=e.cohorts;r<n.length;r++){var i=n[r];t.put({identifier:i.identifier,cohorts:i.cohorts.map(function(e){return new ar(e)})})}return t.build()},Object.defineProperty(VI.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),VI.prototype.get=function(e){return this.cohorts.get(e)},VI.prototype.filterBy=function(e){var r=lt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return VI.from(e)},VI.prototype.asArray=function(){return this.cohorts.values()},VI.prototype.asComparable=function(){return this.cohorts},VI.prototype.toBuilder=function(){return new n_(this)},VI),n_=(jI.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},jI.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},jI.prototype.build=function(){return new r_(this.cohorts)},jI),N="model",C="name",I="type",_="vendor",t="version",x="mobile",b="tablet",i_=(U.parse=function(e){return{browser:U.getBrowser(e),cpu:U.getCPU(e),device:U.getDevice(e),engine:U.getEngine(e),os:U.getOS(e)}},U.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return U.mapper.rgx.call(t,e,U.regexes.browser),t.major=U.util.major(t.version),t},U.getCPU=function(e){var t={architecture:void 0};return U.mapper.rgx.call(t,e,U.regexes.cpu),t},U.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return U.mapper.rgx.call(t,e,U.regexes.device),t},U.getEngine=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.getOS=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.util={extend:function(e,t){var r,n={};for(r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},U.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[C,t],[/(opios)[\/\s]+([\w\.]+)/i],[[C,"Opera Mini"],t],[/\s(opr)\/([\w\.]+)/i],[[C,"Opera"],t],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[C,t],[/(konqueror)\/([\w\.]+)/i],[[C,"Konqueror"],t],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[C,"IE"],t],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[C,"Edge"],t],[/(yabrowser)\/([\w\.]+)/i],[[C,"Yandex"],t],[/(Avast)\/([\w\.]+)/i],[[C,"Avast Secure Browser"],t],[/(AVG)\/([\w\.]+)/i],[[C,"AVG Secure Browser"],t],[/(puffin)\/([\w\.]+)/i],[[C,"Puffin"],t],[/(focus)\/([\w\.]+)/i],[[C,"Firefox Focus"],t],[/(opt)\/([\w\.]+)/i],[[C,"Opera Touch"],t],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[C,"UCBrowser"],t],[/(comodo_dragon)\/([\w\.]+)/i],[[C,/_/g," "],t],[/(windowswechat qbcore)\/([\w\.]+)/i],[[C,"WeChat(Win) Desktop"],t],[/(micromessenger)\/([\w\.]+)/i],[[C,"WeChat"],t],[/(brave)\/([\w\.]+)/i],[[C,"Brave"],t],[/(whale)\/([\w\.]+)/i],[[C,"Whale"],t],[/(qqbrowserlite)\/([\w\.]+)/i],[C,t],[/(QQ)\/([\d\.]+)/i],[C,t],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[C,t],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[C,t],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[C,t],[/(MetaSr)[\/\s]?([\w\.]+)/i],[C],[/(LBBROWSER)/i],[C],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[t,[C,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[t,[C,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[C,t],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[t,[C,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[C,/(.+)/,"$1 WebView"],t],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[C,/(.+(?:g|us))(.+)/,"$1 $2"],t],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[C,"Chrome Mobile"],t],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[t,[C,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[C,"Sailfish Browser"],t],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[C,t],[/(dolfin)\/([\w\.]+)/i],[[C,"Dolphin"],t],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[C,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[C,"Opera Coast"],t],[/fxios\/([\w\.-]+)/i],[t,[C,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[t,[C,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[t,C],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[C,"GSA"],t],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[C,[t,(U.mapper={rgx:function(e,t){for(var r,n,i,o,s,a=0;a<t.length&&!o;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!o;)if(o=u[l++].exec(e))for(n=0;n<c.length;n++)s=o[++r],"object"==typeof(i=c[n])&&0<i.length?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(U.util.has(t[r][n],e))return"?"===r?void 0:r}else if(U.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(U.maps={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}}).browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[C,t],[/(navigator|netscape)\/([\w\.-]+)/i],[[C,"Netscape"],t],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[C,t]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",U.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",U.util.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",U.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[N,_,[I,b]],[/applecoremedia\/[\w\.]+ \((ipad)/],[N,[_,"Apple"],[I,b]],[/(apple\s{0,1}tv)/i],[[N,"Apple TV"],[_,"Apple"],[I,"smarttv"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[_,N,[I,b]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[N,[_,"Amazon"],[I,b]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[N,U.mapper.str,U.maps.device.amazon.model],[_,"Amazon"],[I,x]],[/android.+aft([bms])\sbuild/i],[N,[_,"Amazon"],[I,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[N,_,[I,x]],[/\((ip[honed|\s\w*]+);/i],[N,[_,"Apple"],[I,x]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[_,N,[I,x]],[/\(bb10;\s(\w+)/i],[N,[_,"BlackBerry"],[I,x]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[N,[_,"Asus"],[I,b]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[_,"Sony"],[N,"Xperia Tablet"],[I,b]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[N,[_,"Sony"],[I,x]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[_,N,[I,"console"]],[/android.+;\s(shield)\sbuild/i],[N,[_,"Nvidia"],[I,"console"]],[/(playstation\s[34portablevi]+)/i],[N,[_,"Sony"],[I,"console"]],[/(sprint\s(\w+))/i],[[_,U.mapper.str,U.maps.device.sprint.vendor],[N,U.mapper.str,U.maps.device.sprint.model],[I,x]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[_,[N,/_/g," "],[I,x]],[/(nexus\s9)/i],[N,[_,"HTC"],[I,b]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[N,[_,"Huawei"],[I,x]],[/android.+(bah2?-a?[lw]\d{2})/i],[N,[_,"Huawei"],[I,b]],[/(microsoft);\s(lumia[\s\w]+)/i],[_,N,[I,x]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[N,[_,"Microsoft"],[I,"console"]],[/(kin\.[onetw]{3})/i],[[N,/\./g," "],[_,"Microsoft"],[I,x]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[N,[_,"Motorola"],[I,x]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[N,[_,"Motorola"],[I,b]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[_,U.util.trim],[N,U.util.trim],[I,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[N,/^/,"SmartTV"],[_,"Samsung"],[I,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[N,[_,"Sharp"],[I,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[_,"Samsung"],N,[I,b]],[/smart-tv.+(samsung)/i],[_,[I,"smarttv"],N],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[_,"Samsung"],N,[I,x]],[/sie-(\w*)/i],[N,[_,"Siemens"],[I,x]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[_,"Nokia"],N,[I,x]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[N,[_,"Acer"],[I,b]],[/android.+([vl]k\-?\d{3})\s+build/i],[N,[_,"LG"],[I,b]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[_,"LG"],N,[I,b]],[/(lg) netcast\.tv/i],[_,N,[I,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[N,[_,"LG"],[I,x]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[_,N,[I,b]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[N,[_,"Lenovo"],[I,b]],[/(lenovo)[_\s-]?([\w-]+)/i],[_,N,[I,x]],[/linux;.+((jolla));/i],[_,N,[I,x]],[/((pebble))app\/[\d\.]+\s/i],[_,N,[I,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[_,N,[I,x]],[/crkey/i],[[N,"Chromecast"],[_,"Google"],[I,"smarttv"]],[/android.+;\s(glass)\s\d/i],[N,[_,"Google"],[I,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[N,[_,"Google"],[I,b]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[N,[_,"Google"],[I,x]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[N,/_/g," "],[_,"Xiaomi"],[I,x]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[N,/_/g," "],[_,"Xiaomi"],[I,b]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[N,[_,"Meizu"],[I,x]],[/(mz)-([\w-]{2,})/i],[[_,"Meizu"],N,[I,x]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[N,[_,"OnePlus"],[I,x]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[N,[_,"RCA"],[I,b]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[N,[_,"Dell"],[I,b]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[N,[_,"Verizon"],[I,b]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[_,"Barnes & Noble"],N,[I,b]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[N,[_,"NuVision"],[I,b]],[/android.+;\s(k88)\sbuild/i],[N,[_,"ZTE"],[I,b]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[N,[_,"Swiss"],[I,x]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[N,[_,"Swiss"],[I,b]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[N,[_,"Zeki"],[I,b]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[_,"Dragon Touch"],N,[I,b]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[N,[_,"Insignia"],[I,b]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[N,[_,"NextBook"],[I,b]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[_,"Voice"],N,[I,x]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[_,"LvTel"],N,[I,x]],[/android.+;\s(PH-1)\s/i],[N,[_,"Essential"],[I,x]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[N,[_,"Envizen"],[I,b]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[_,N,[I,b]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[N,[_,"MachSpeed"],[I,b]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[_,N,[I,b]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[N,[_,"Rotor"],[I,b]],[/android.+(KS(.+))\s+build/i],[N,[_,"Amazon"],[I,b]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[_,N,[I,b]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[I,U.util.lowerize],_,N],[/[\s\/\(](smart-?tv)[;\)]/i],[[I,"smarttv"]],[/(android[\w\.\s\-]{0,9});.+build/i],[N,[_,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[t,[C,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[t,[C,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[C,t],[/rv\:([\w\.]{1,9}).+(gecko)/i],[t,C]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[C,t],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[C,U.mapper.str,U.maps.os.windows],[t,U.mapper.str,U.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[C,"Windows"],[t,U.mapper.str,U.maps.os.windows.version]],[/\((bb)(10);/i],[[C,"BlackBerry"],t],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[C,t],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[C,"Symbian"],t],[/\((series40);/i],[C],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[C,"Firefox OS"],t],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[[C,"Linux"],t],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[C,"Chromium OS"],t],[/(sunos)\s?([\w\.\d]*)/i],[[C,"Solaris"],t],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[C,"Linux"],t],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[C,"iPhone"],[t,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[C,"iPad"],[t,/_/g,"."]],[/(haiku)\s(\w+)/i],[C,t],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[t,/_/g,"."],[C,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[C,"Mac"],[t,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[C,t]]},U),o_=(FI.generate=function(e){o=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:o={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:o,screen:{width:"",height:""}}:e;var t,r,n,i,o,s=i_.parse(o.navigator.userAgent),a=s.browser,u=s.os,s=s.device,c=(o.location.protocol||"").replace(":",""),l=o.screen,p=(null==(p=o.navigator.languages)?void 0:p[0])||"",f=p.split("-")[0],d=(null!=(d=s.type)?d:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),h=u.name||"",y="",v="";try{h=null!=(r=null==(t=h.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:h,y=null!=(i=null==(n=l.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",v=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:a.name||"",browserMajorVersion:a.major||"",browserVersion:a.version||"",osName:h,osVersion:u.version||"",deviceModel:s.model||"",deviceType:d,deviceVendor:s.vendor||"",deviceBrand:s.vendor||"",locale:p,language:f,orientation:y,userAgent:o.navigator.userAgent||"",pagePath:o.location.pathname||"",pageTitle:o.document.title||"",host:o.location.host||"",url:o.location.href||"",protocol:c,referrer:o.document.referrer||"",queryParameter:o.location.search||"",screenWidth:l.width||"",screenHeight:l.height||"",timeZone:v}},FI),s_=(LI.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return u_.of(c_(e,this.hackleDeviceId),r_.empty())},LI.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(LI.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),LI.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},LI.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},LI.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},LI.prototype.hackleUser=function(e){var t=(new It).addIdentifiers(e.user.identifiers||{}).add(_t.ID,e.user.id||this.hackleDeviceId).add(_t.DEVICE,e.user.deviceId||this.hackleDeviceId).add(_t.HACKLE_DEVICE,this.hackleDeviceId);return a.isNotNullOrUndefined(e.user.userId)&&t.add(_t.USER,e.user.userId),{identifiers:t.build(),properties:e.user.properties||{},hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},LI.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?o_.generate(window):e)||{}},LI.prototype.setUser=function(e){return this.updateUser(e).user},LI.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},LI.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},LI.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},LI.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},LI.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},LI.prototype.saveUser=function(e){this.storage.saveUser(e)},LI.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,ZT(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},LI.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=c_(r,n.hackleDeviceId),ZT(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},LI.prototype.operateProperties=function(r){return this.updateContext(function(e){var t=null!=(t=e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return c(c({},e),{properties:a.fromMap(t)})})},LI.prototype.sync=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.cohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t),[3,3];case 2:return t=e.sent(),i.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},LI.prototype.close=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return[2]})})},LI),a_=(DI.prototype.getUser=function(){var e=this.deviceId||void 0,t=this.userId||void 0;return void 0!==e||void 0!==t?{deviceId:e,userId:t}:null},DI.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(DI.prototype,"deviceId",{get:function(){return this.storage.getItem("_hackle_did")},enumerable:!1,configurable:!0}),Object.defineProperty(DI.prototype,"userId",{get:function(){return this.storage.getItem("_hackle_uid")},enumerable:!1,configurable:!0}),DI.prototype.setDeviceId=function(e){this.setId("_hackle_did",e)},DI.prototype.setUserId=function(e){this.setId("_hackle_uid",e)},DI.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)},DI),u_=(PI.of=function(e,t){return new PI(e,t.filterBy(e))},PI.prototype.with=function(e){return PI.of(e,this.cohorts.filterBy(e))},PI.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return PI.of(this.user,e)},PI),c_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},l_=(Object.defineProperty(UI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(UI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:UI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(UI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),UI.prototype.addListener=function(e){this.sessionListeners.push(e)},UI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},UI.prototype.startNewSessionIfNeeded=function(e,t){var r=this._lastEventTime;return null!==r&&null!==this._currentSessionId&&t-r<this.sessionTimeoutMillis?(this.updateLastEventTime(t),this._currentSessionId):this.startNewSession(e,e,t)},UI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem("_hackle_last_event_ts","".concat(e))},UI.prototype.endSession=function(t){var r=this._currentSessionId,n=this._lastEventTime;null!==r&&null!==n&&this.sessionListeners.forEach(function(e){return e.onSessionEnded(r,t,n)})},UI.prototype.newSession=function(t,r){var n="".concat(r,".").concat(De.v4().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},UI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem("_hackle_session_id",e)},UI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem("_hackle_session_id")},UI.prototype.loadLastEventTime=function(){var e=this.storage.getItem("_hackle_last_event_ts");null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},UI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},UI.EMPTY_SESSION_ID="0.ffffffff",UI),p_=(MI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},MI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},MI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},MI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()},MI),f_=(kI.postfix=function(e,t){return new kI(e,function(e){return"".concat(e).concat(t)})},kI.prefix=function(e,t){return new kI(e,function(e){return"".concat(t).concat(e)})},kI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},kI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},kI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)},kI),d_=(xI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},xI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},xI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},xI.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),i=0;return n.findIndex(function(e){return(i+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},xI.prototype.getList=function(){try{var e=this.delegate.getItem(this.listKey);if(!e)return[];var t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}},xI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},xI.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),i=((r={})[e]=t,r);if(!this.isAddableItem(i)){var o=this.getVictimIndex(i);if(o<0)return;n=n.slice(o+1)}var s=JSON.stringify(n.concat(i));this.delegate.setItem(this.listKey,s)}catch(e){}},xI.prototype.getItem=function(t){var r=this,e=this.getList().find(function(e){return r.isEqualItem(e,t)});if(e&&e[t])return e[t]},xI.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),i=JSON.stringify(n);this.delegate.setItem(this.listKey,i)}catch(t){}},xI.prototype.clear=function(){this.delegate.removeItem(this.listKey)},xI),h_=(CI.prototype.currentUser=function(){return this.userManager.resolve()},CI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},CI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},CI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},CI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},CI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},CI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},CI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},CI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},CI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},CI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},CI.prototype.increment=function(e,t){Zn.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()},CI),y_=(SI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},SI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},SI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},SI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},SI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},SI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},SI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},SI.monitoring=function(e){return"".concat(e,"/metrics")},SI),v_=(RI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(a.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},RI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},RI.prototype.key=function(e){return"".concat(e.key)},RI),m_=(NI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},NI),g_=(OI.prototype.handle=function(e,t){e.close()},OI.prototype.supports=function(e){return"CLOSE"===e.type},OI),E_=(AI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},AI.prototype.supports=function(e){return"WEB_LINK"===e.type},AI),w_=(II.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},II.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type},II),b_=(_I.prototype.handle=function(e,t){var r=this.clock.currentMillis()+_I.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},_I.prototype.supports=function(e){return"HIDDEN"===e.type},_I.HIDE_EXPIRATION=864e5,_I),T_=(TI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},TI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type},TI),__=(bI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},bI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type},bI),I_=(wI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},wI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type},wI),A_=(EI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){i.log.error("Invalid url: ".concat(t.value))}},EI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type},EI),O_=(gI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},gI.prototype.createTrackEvent=function(e,t){var r;switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c({in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,title_text:null==(r=null==(r=t.message.text)?void 0:r.title)?void 0:r.text,body_text:null==(r=null==(r=t.message.text)?void 0:r.body)?void 0:r.text,button_text:t.message.buttons.map(function(e){return e.text}),image_url:t.message.images.map(function(e){return e.imagePath})},t.properties)};case"CLOSE":return{key:"$in_app_close",properties:{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key}};case"ACTION":return{key:"$in_app_action",properties:{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,action_type:e.action.type,action_area:e.area,action_value:e.action.value,button_text:e.text}}}},gI),N_=(mI.prototype.present=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:if(this.currentMessageView)return[2];if(this.opening)return[2];this.opening=!0,t=null,e.label=1;case 1:return e.trys.push([1,3,4,5]),t=this.messageViewFactory.create(r,this),[4,(this.currentMessageView=t).open()];case 2:return e.sent(),[3,5];case 3:return e.sent(),null!=t&&t.close(),[3,5];case 4:return this.opening=!1,[7];case 5:return[2]}})})},mI),R_=(vI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},vI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},vI),S_=(yI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var i=n[r];if(this.eventMatcher.matches(t,i,e)){i=this.context(i,e);if(i)return i}}},yI.prototype.context=function(e,t){e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return new QT(e.inAppMessage,e.message,t.user,Xe.sanitize({decision_reason:e.reason}))},yI),C_=(hI.prototype.open=function(){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(hI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),[4,this.scriptLoader.load()];case 1:return e.sent(),(t=this.addContainer()).style.display="none",t.classList.add("".concat(hI.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson()})];case 2:return e.sent(),t.classList.remove("".concat(hI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleEvent({type:"IMPRESSION"}),[3,4];case 3:return e.sent(),this.close(),[3,4];case 4:return[2]}})})},hI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(hI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},hI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(hI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},hI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},hI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},hI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},hI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",hI.CONTAINER_CLASS_NAME="hackle-iam",hI),x_=(dI.prototype.create=function(e,t){return new C_(this.scriptLoader,e,t)},dI),k_=(fI.prototype.load=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return window.HackleInAppMessageRenderer?[2]:(t=this.createScript(),document.head.appendChild(t),[4,this.waitForLoad(t)]);case 1:return[2,e.sent()]}})})},fI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},fI.prototype.waitForLoad=function(o){return new Promise(function(e,t){function r(){o.removeEventListener("error",i),o.removeEventListener("load",n)}var n=function(){r(),e(o)},i=function(e){r(),t(e.message)};o.addEventListener("load",n),o.addEventListener("error",i)})},fI),M_=(pI.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},pI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=U_.of(e,t,r);return this.targetMatcher.anyMatches(e,ZE.create(),n.targets)},pI),U_=(lI.of=function(e,t,r){return new lI(new WE("IN_APP_MESSAGE",r.key),e,t.user,t)},lI),P_=(cI.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var i=0,o=this.storage.get(t);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},cI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new D_(new L_(i)))}return e.durationCap&&t.push(new D_(new F_(e.durationCap))),t},cI),D_=(uI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount},uI),L_=(Object.defineProperty(aI.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),aI.prototype.matches=function(e,t){e=e.user.identifiers[this.identifierCap.identifierType];if(a.isNullOrUndefined(e))return!1;t=t.identifiers[this.identifierCap.identifierType];return!a.isNullOrUndefined(t)&&e===t},aI),F_=(Object.defineProperty(sI.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),sI.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis},sI),j_=(oI.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},oI.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))},oI),V_=(iI.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})},iI),H_=(nI.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},nI.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>nI.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-nI.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},nI.prototype.supports=function(e){return"IMPRESSION"===e.type},nI.IMPRESSION_MAX_SIZE=100,nI),z_=(rI.prototype.process=function(e,t,r){},rI.prototype.supports=function(e){return"CLOSE"===e.type},rI),B_=(tI.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},tI.prototype.supports=function(e){return"ACTION"===e.type},tI),G_=(eI.prototype.handle=function(e,t){var r=this.clock.currentMillis(),n=(this.eventTracker.track(e.context,t,r),this.eventProcessorFactory.get(t));n&&n.process(e,t,r)},eI),K_=(Q1.prototype.matches=function(e,t,r){return!!jE.isTrackEvent(r)&&!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r)},Q1),J_=(Z1.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})},Z1),Y_=(W1.prototype.handle=function(e,t){e.close()},W1.prototype.supports=function(e){return"CLOSE"===e.type},W1),q_=(X1.prototype.handle=function(e,t){var r=Jr.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},X1.prototype.supports=function(e){return"ACTION"===e.type},X1),$_=($1.prototype.open=function(e){window.location.href=e.href},$1),X_=(q1.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")},q1),W_=(Y1.prototype.open=function(e){window.open(e.href)},Y1),Z_=(J1.prototype.open=function(e){window.location.replace(e)},J1),Q_={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,gclid:void 0,fbclid:void 0},e1={current:void 0,referrer:void 0},t1=(K1.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},Q_),t),n=new Gi,i=0,o=Object.entries(t);i<o.length;i++){var s=o[i],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userManager.toHackleUser(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},K1.prototype.startNewCampaignIfNeeded=function(e,t){var r,n=this.storage.get(),i=this.parser.parse(),o=this.parser.parseDomain();r=i,o=o,null!==(n=n)&&(e_(r,Q_)&&o.current===o.referrer||e_(n,r))||(this.storage.set(i),this.startNewCampaign(e,i,t))},K1.prototype.onSessionEnded=function(e,t,r){},K1.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},K1),r1=(G1.prototype.get=function(){var e=this.storage.getItem("_hackle_mkt");return e?JSON.parse(e):null},G1.prototype.set=function(e){this.storage.setItem("_hackle_mkt",JSON.stringify(e))},G1),n1=(B1.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},B1.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var i=n[r].split("="),o=i[0],i=i[1];e&&!e(o,i)||(t[o]=decodeURIComponent(i))}return t},B1.getQueryParams=function(){return"undefined"==typeof window?{}:new B1(window.location.search).getQueryParams()},B1),i1=(z1.extractDomain=function(e){var t=this.DOMAIN_MATCH_REGEX,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=this.SIMPLE_DOMAIN_MATCH_REGEX),e.match(t));return r?r[0]:e},z1.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,z1.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,z1),o1=(H1.prototype.parse=function(){var e=n1.getQueryParams();return{utm_campaign:e[s1],utm_content:e[a1],utm_id:e[u1],utm_medium:e[c1],utm_source:e[l1],utm_term:e[p1],gclid:e[f1],fbclid:e[d1]}},H1.prototype.parseDomain=function(){return"undefined"==typeof window?e1:{current:i1.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,i1.extractDomain(e)}()}},H1),s1="utm_campaign",a1="utm_content",u1="utm_id",c1="utm_medium",l1="utm_source",p1="utm_term",f1="gclid",d1="fbclid",h1=(V1.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},V1.prototype.send=function(e){var t=e.experiment.key,r=e.variationKey,t="HACKLE-EXPERIMENT_".concat(t,"_V").concat(e.experiment.version,"-").concat(r);try{window.gtag("event","experience_impression",{exp_variant_string:t})}catch(e){i.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},V1),y1=(j1.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!(t&&t.getAttributes().integration_ga_experiment&&jE.isExposureEvent(e))||"RUNNING"!==e.experiment.status||e.decisionReason!==f.TRAFFIC_ALLOCATED?null:e},j1),v1={user:void 0,debug:!1,log_disabled:!1,auto_track_page_view:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://client-sdk.hackle.io",eventUrl:"https://event.hackle.io",monitoringUrl:"https://monitoring.hackle.io",cdnUrl:"https://static.hackle.io",sameSiteCookie:"LAX",secureCookie:!1,SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.27.0",IAM_RENDERER_VERSION_HEADER:"0.0.3"},m1=(F1.config=function(e){return c(c({},v1),e)},F1.logging=function(e){i.initCounter(function(e){return Zn.counter("log",{level:e})}),i.setLogLevel(Fe.INFO),e.log_disabled?i.setLogLevel(Fe.DISABLE):e.debug&&i.setLogLevel(Fe.DEBUG)},F1.sdk=function(e,t){return i.log.debug("SDK key: ".concat(e)),e||i.log.error("invalid sdk key: '".concat(e,"' (expected: not null, not undefined and not empty string)")),{key:e,name:t.SDK_NAME_HEADER,version:t.SDK_VERSION_HEADER}},F1.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&i.log.debug("support sendBeacon API"),e},F1.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},F1.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(i.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},F1),g1=(L1.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},L1.prototype.sync=function(){return o(this,void 0,void 0,function(){var t=this;return s(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.sync())}))];case 1:return e.sent(),[2]}})})},L1.prototype.syncOnly=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:if(t=this.synchronizations.find(function(e){return e.type===r}))return[4,t.synchronizer.sync()];throw new Error("Unsupported SynchronizerType [".concat(r,"]"));case 1:return e.sent(),[2]}})})},L1.prototype.close=function(){return o(this,void 0,void 0,function(){var t=this;return s(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.close())}))];case 1:return e.sent(),[2]}})})},L1.prototype.safe=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),i.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},L1),E1=(D1.prototype.sync=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.sync()];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),i.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},D1.prototype.syncOnly=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.syncOnly(r)];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),i.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},D1.prototype.start=function(){var e=this;-1!==this.intervalMillis&&null===this.pollingJob&&(this.pollingJob=this.scheduler.schedulePeriodically(this.intervalMillis,this.intervalMillis,function(){return e.sync()}))},D1.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},D1.prototype.close=function(){return o(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})},D1),w1=(P1.prototype.schedule=function(e,t){e=new b1(e,t);return e.start(),e},P1.prototype.schedulePeriodically=function(e,t,r){e=new T1(e,t,r);return e.start(),e},P1),b1=(U1.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},U1.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},U1),T1=(M1.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},M1.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},M1.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},M1),_1=(k1.prototype.fetchIfModified=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},k1.prototype.createRequest=function(e){var t=ei.builder().url(this.url).method("GET");return null!==e&&t.addHeader(ni.IF_MODIFIED_SINCE,e),t.build()},k1.prototype.execute=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:t=gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ai.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),ai.record("get.workspace",t,null),r;case 4:return[2]}})})},k1.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is empty");return{config:JSON.parse(e.body),lastModified:e.headers.get(ni.LAST_MODIFIED)}},k1),I1=(x1.prototype.fetch=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},x1.prototype.createRequest=function(e){e={identifiers:lt(e)},e=Le.Base64.encodeURL(JSON.stringify(e));return ei.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},x1.prototype.execute=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:t=gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ai.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),ai.record("get.cohorts",t,null),r;case 4:return[2]}})})},x1.prototype.handleResponse=function(e){if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is null");e=JSON.parse(e.body);return r_.fromDto(e)},x1),A1=(C1.prototype.getExperiments=function(){return Array.from(this.experiments.values())},C1.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},C1.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},C1.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},C1.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},C1.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},C1.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},C1.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},C1.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},C1.prototype.getContainerOrNull=function(e){return this.containers.get(e)},C1.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},C1.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},C1.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},C1.prototype.getAttributes=function(){return this.attributes},C1.from=function(e){return new C1(p.mapNotNullOrUndefined(e.experiments,function(e){return gt.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.experiments,function(e){return gt.fromJson("AB_TEST",e)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return gt.fromJson("FEATURE_FLAG",e)}),e.buckets.map(wt.fromJson),e.events.map(Tt.fromJson),p.mapNotNullOrUndefined(e.segments,xt.fromJson),e.containers.map(kt.fromJson),e.parameterConfigurations.map(mt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Ut.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,Or.fromJson),e.workspace.attributes)},C1),O1=(S1.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},S1.prototype.setWorkspace=function(e){try{this.workspace=A1.from(e.config)}catch(e){i.log.error("Failed to set workspace: ".concat(e))}},S1.prototype.get=function(){return this.workspace},S1.prototype.sync=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.workspaceFetcher.fetchIfModified(this.lastModified)];case 1:return(t=e.sent())&&(this.setConfig(t),this.workspaceConfigStorage.set(t)),[3,3];case 2:return t=e.sent(),i.log.error("Failed to sync workspace: ".concat(t)),[3,3];case 3:return[2]}})})},S1.prototype.close=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return[2]})})},S1),N1=(R1.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.shutdownDispatch(e):this.normalDispatch(e)},R1.prototype.shutdownDispatch=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return[4,this.retryManager.add(r)];case 1:return e.sent(),[4,this.shutdownTransport.send(r)];case 2:return(t=e.sent()).isSuccessful()||t.isClientError()?[4,this.retryManager.delete(r)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},R1.prototype.normalDispatch=function(r){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return[4,this.transport.send(r)];case 1:return(t=e.sent()).isSuccessful()||t.isClientError()?[2]:[4,this.retryManager.add(r)];case 2:return e.sent(),[2]}})})},R1);function R1(e,t,r){this.transport=e,this.shutdownTransport=t,this.retryManager=r}function S1(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}function C1(e,t,r,n,i,o,s,a,u,c,l){this.experiments=p.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=p.associateBy(t,function(e){return e.key}),this.featureFlags=p.associateBy(r,function(e){return e.key}),this.buckets=p.associateBy(n,function(e){return e.id}),this.eventTypes=p.associateBy(i,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(s,function(e){return e.id}),this.parameterConfigurations=p.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(u,function(e){return e.key}),this.inAppMessages=p.associateBy(c,function(e){return e.key}),this.attributes=l}function x1(e,t){this.url=e,this.transport=t}function k1(e,t){this.url=e,this.transport=t}function M1(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}function U1(e,t){this.delayMillis=e,this.task=t,this.timeout=null}function P1(){}function D1(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}function L1(){this.synchronizations=[]}function F1(){}function j1(e){this.workspaceFetcher=e}function V1(e,t){var r=this;this.userEventEmitter=e,this.determiner=t,this.onEvent=function(e){e=r.determiner.determineTargetExposureOrNull(e);e&&r.send(e)},this.initialize()}function H1(){}function z1(){}function B1(e){this.search=e}function G1(e){this.storage=e}function K1(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}function J1(){}function Y1(){}function q1(){}function $1(){}function X1(e){this.eventHandler=e}function W1(){}function Z1(e){this.handlers=e}function Q1(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}function eI(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}function tI(e){this.actionHandlerFactory=e}function rI(){}function nI(e){this.impressionStorage=e}function iI(e){this.processors=e}function oI(e){this.storage=e}function sI(e){this.durationCap=e}function aI(e){this.identifierCap=e}function uI(e){this.matchCount=0,this.predicate=e}function cI(e){this.storage=e}function lI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}function pI(e){this.targetMatcher=e}function fI(e){this.scriptUrl=e}function dI(e){this.scriptLoader=e}function hI(e,t,r){var n=this;this.scriptLoader=e,this.context=t,this.ui=r,this.container=null,this.renderer=null,this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===hI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}function yI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}function vI(e,t,r){var n=this;this.userEventEmitter=e,this.determiner=t,this.presenter=r,this.onEvent=function(e){e=n.determiner.determineOrNull(e);e&&n.presenter.present(e)},this.initialize()}function mI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}function gI(e){this.core=e}function EI(e){this.urlHandler=e}function wI(e){this.urlHandler=e}function bI(e){this.urlHandler=e}function TI(e){this.urlHandler=e}function _I(e,t){this.storage=e,this.clock=t}function II(e){this.urlHandler=e}function AI(e){this.urlHandler=e}function OI(){}function NI(e){this.handlers=e}function RI(e){this.storage=e}function SI(){}function CI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}function xI(e,t,r){void 0===r&&(r=4096);var n=this;this.delegate=e,this.listKey=t,this.encodedListCharLen=6,this.resolveMaxLength=function(e){e-=n.encodedListCharLen;return e<0?0:e},this.maxLength=this.resolveMaxLength(r)}function kI(e,t){this.delegate=e,this.transform=t}function MI(){this.storage=window.localStorage}function UI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}function PI(e,t){this.user=e,this.cohorts=t}function DI(e){this.storage=e}function LI(e,t,r,n,i,o){this.hackleDeviceId=e,this.storage=t,this.cohortFetcher=r,this.clock=n,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(i,o),this.storage.saveUser(this.context.user)}function FI(){}function U(){}function jI(e){this.cohorts=new xn(qe.isEqual),e&&this.putAll(e)}function VI(e){this.cohorts=e}function HI(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}nA.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},nA.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof jE?jE.isExposureEvent(e)?t.push(e.toDto()):jE.isTrackEvent(e)?r.push(e.toDto()):jE.isRemoteConfigEvent(e)&&n.push(e.toDto()):jE.isExposureEventDto(e)?t.push(e):jE.isTrackEventDto(e)?r.push(e):jE.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return ei.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},nA.prototype.execute=function(n){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:t=gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ai.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),ai.record("post.events",t,null),r;case 4:return[2]}})})};var zI,BI,GI=nA,KI=(rA.prototype.add=function(e){return this.repository.add(e)},rA.prototype.delete=function(e){return this.repository.delete(e)},rA.prototype.flush=function(){return o(this,void 0,void 0,function(){var t,r;return s(this,function(e){switch(e.label){case 0:return[4,this.repository.read()];case 1:return 0===(t=e.sent()).length?[2]:[4,this.transport.send(t)];case 2:return(r=e.sent()).isSuccessful()||r.isClientError()?[4,this.delete(t)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},rA),JI=(tA.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},tA.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},tA.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})},Ke(eA,BI=tA),Ke(QI,zI=eA),QI.prototype.process=function(e){this.isEnqueueTarget(e)&&this.enqueue(e),this.emit("event",e)},QI.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},QI.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},QI.prototype.isPageViewEvent=function(e){return jE.isTrackEvent(e)&&"$page_view"===e.event.key},QI.prototype.isEnqueueTarget=function(e){return!(this.isPageViewEvent(e)&&!this.autoTrackPageView)},QI.prototype.flush=function(e){var t;void 0===e&&(e=!1),null!=(t=this.flushingJob)&&t.cancel(),0!==this.queue.length&&(this.eventDispatcher.dispatch(this.queue,e).catch(function(e){return i.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},QI.prototype.close=function(){this.flush(!0)},QI),YI=(ZI.prototype.send=function(e){e=e.toBuilder().addHeader("X-HACKLE-SDK-KEY",this.sdk.key).addHeader("X-HACKLE-SDK-NAME",this.sdk.name).addHeader("X-HACKLE-SDK-VERSION",this.sdk.version).addHeader("X-HACKLE-SDK-TIME",this.clock.currentMillis().toString()).build();return this.delegate.send(e)},ZI),qI=(WI.intercept=function(e,t){return t instanceof YI?t:new YI(e,Qe.instance,t)},WI),$I=(XI.create=function(){return new XI},XI.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,i=(s.options.timeoutMillis&&(n.timeout=s.options.timeoutMillis),n.open(s.method,s.url),n.onreadystatechange=function(){var e;n.readyState===n.DONE&&(0!==n.status?(e=new ri(n.status,n.responseText,function(e){var t=ni.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var i,o=n[r],s=o.indexOf(": ");0<s&&(i=o.slice(0,s),o=o.slice(s+2),t.add(i,o))}return t.build()}(n)),t(e)):r(new Error("Request Error")))},n),o=s.headers.raw();for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e]);n.send(s.body)})},XI);function XI(){}function WI(){}function ZI(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}function QI(e,t,r,n,i){var o=zI.call(this)||this;return o.eventDispatcher=e,o.eventDispatchMaxSize=t,o.flushScheduler=r,o.flushIntervalMillis=n,o.autoTrackPageView=i,o.queue=[],o.flushingJob=null,o}function eA(){return null!==BI&&BI.apply(this,arguments)||this}function tA(){this.listeners={}}function rA(e,t){this.repository=e,this.transport=t}function nA(e,t){this.url=e,this.transport=t}lA.create=function(){return new lA},lA.prototype.send=function(n){var i=this;return new Promise(function(e,t){var r=!1;if(!(r="undefined"!=typeof window?window&&window.navigator&&!!window.navigator.sendBeacon&&!0:r))throw new Error("BeaconTransport not supported.");r=i.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(ri.ok())})},lA.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get("X-HACKLE-SDK-KEY");return r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault("X-HACKLE-SDK-NAME","unknown")),t.append("sdkVersion",e.headers.getOrDefault("X-HACKLE-SDK-VERSION","unknown")),e.body&&t.append("data",e.body),t};var iA,oA=lA,sA=(cA.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)},cA),aA=(uA.prototype.invoke=function(e){if(null==(t=window._hackleApp)||!t.invoke)throw new Error("window._hackleApp.invoke is not implemented");var t=window._hackleApp.invoke(JSON.stringify(e));return this.invocationResponseResolver.resolve(t)},uA);function uA(e){this.invocationResponseResolver=e}function cA(e){this.invocationResponseResolver=e}function lA(){}function pA(e,t,r){this.workspace=e,this.experiment=t,this.decision=r}($o=iA=iA||{}).prompt="prompt",$o.function="function",MA.prototype.getInvocator=function(e,t){return e===iA.prompt?new sA(t):e===iA.function?new aA(t):null};var fA=MA,dA=(kA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},kA.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)},kA),hA=(xA.prototype.determineOrNull=function(e){if(!jE.isTrackEvent(e))return null;if("$page_view"!==e.event.key)return null;if(this.splitUrlRedirectedCookieStorage.alreadyRedirected())return this.splitUrlRedirectedCookieStorage.clear(),null;var t=this.workspaceFetcher.get();if(!t)return null;for(var r=0,n=t.getSplitUrlExperiments();r<n.length;r++){var i,o=n[r];if(this.splitUrlMatcher.matches(t,o,e))return i=this.core.experiment(o.key,e.user,"A"),new pA(t,o,i)}return null},xA),yA=(CA.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=vA.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,ZE.create(),t.excludeTargets))&&0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,ZE.create(),t.includeTargets)},CA),vA=(SA.of=function(e,t){return new SA(new WE("SPLIT_URL",t.insertId),t.user,e)},SA),mA=(RA.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))},RA),gA=(NA.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(NA.SPLIT_URL_CONFIG_KEY,"")),r=yn.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl):null}catch(e){return null}},NA.prototype.resolveByRedirectType=function(e,t){return t&&e===n.SplitUrlRedirectType.MANUAL?this.resolveManualRedirectUrl(t):null},NA.prototype.resolveManualRedirectUrl=function(e){return null!=(e=cw.tryParse(e))?e:null},NA.SPLIT_URL_CONFIG_KEY="redirectUrl",NA),EA=(OA.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return!a.isNullOrUndefined(e)&&Boolean(JSON.parse(e))}catch(e){return!1}},OA.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},OA.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)},OA),wA=(AA.prototype.setNeedDispatch=function(e){this.needDispatch=e},AA.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(AA.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},AA.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done",AA),bA=(IA.prototype.get=function(){var e=this.storage.getItem("hackle-workspace-config");if(a.isNullOrUndefined(e))return null;try{var t=JSON.parse(e);return this.sdk.version!==t.version?(this.clear(),null):t}catch(e){return this.clear(),null}},IA.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem("hackle-workspace-config",JSON.stringify(e))},IA.prototype.clear=function(){this.storage.removeItem("hackle-workspace-config")},IA),TA=i.log,_A=null;function IA(e,t){this.sdk=e,this.storage=t}function AA(){this.needDispatch=!0}function OA(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}function NA(){}function RA(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}function SA(e,t,r){this.key=e,this.user=t,this.workspace=r}function CA(e){this.targetMatcher=e}function xA(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}function kA(e,t,r,n){var i=this;this.userEventEmitter=e,this.determiner=t,this.redirector=r,this.core=n,this.onEvent=function(e){e=i.determiner.determineOrNull(e);e&&(i.core.flush(!0),i.redirector.redirect(e))},this.initialize()}function MA(){}function UA(e,t){t=m1.config(t);m1.logging(t);try{if((n=window)&&"_hackleApp"in n&&null!==n._hackleApp&&"object"==typeof n._hackleApp&&"getAppSdkKey"in n._hackleApp&&"function"==typeof n._hackleApp.getAppSdkKey&&"getInvocationType"in n._hackleApp&&"function"==typeof n._hackleApp.getInvocationType&&e===window._hackleApp.getAppSdkKey()){i=window._hackleApp.getInvocationType();var r=null===(o=(new fA).getInvocator(i,new Wi))?(Ao.error("Failed to get invocator with invocationType:".concat(i)),null):new Ro(new Io(o));if(r)return r}}catch(e){TA.error("Unexpected exception while check WebApp client: ".concat(e))}var n=m1.sdk(e,t);if(_A)return TA.debug("use already exists hackleClient"),_A;Qi.initialize();var i=new p_,o=Zi.getInstance({days:3650,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),r=m1.isBeaconSupported(),s=qI.intercept(n,$I.create()),a=qI.intercept(n,oA.create()),u=s,c=(r&&(u=a),new g1),l=new E1(c,new w1,m1.pollingIntervalMillis(t)),p=new bA(n,f_.postfix(i,"_".concat(e.slice(0,8)))),f=new _1(y_.clientFetch(t.sdkUrl,n.key),s),p=new O1(p,f),f=(c.add("workspace",p),new I1(y_.userCohorts(t.sdkUrl),s)),d=new a_(f_.postfix(o,"_".concat(e))),h=d.getUser(),y=t.user||null,v=new s_(wo(),d,f,Qe.instance,h,y),m=(c.add("cohort",v),new l_(t.sessionTimeoutMillis,f_.postfix(o,"_".concat(e.slice(8))))),d=(v.addListener(m),new t_(i,"".concat("hackle-repository-storage","_").concat(e),100)),f=new GI(y_.clientDispatch(t.eventUrl),s),y=f,g=(r&&(y=new GI(y_.beaconDispatch(t.eventUrl,n.key),a)),new KI(d,f)),c=new N1(f,y,g),r=new KE(m1.dedupIntervalMillis(t)),n=new JI(c,100,new w1,500,t.auto_track_page_view),a=new GE(n,r,m,v),E=new wA,d=new nw(new d_(o,"".concat("hackle-manual-override_ab","_").concat(e.slice(0,8)))),f=new nw(new d_(o,"".concat("hackle-manual-override_ff","_").concat(e.slice(0,8)))),y=new v_(f_.prefix(i,"".concat("hackle-iam-hide","_").concat(e.slice(0,8),"_"))),c=new j_(f_.prefix(i,"".concat("hackle-iam-impression","_").concat(e.slice(0,8),"_"))),w=ub.create(p,a,[d,f],y),r=new t1(new r1(f_.postfix(o,"_".concat(e.slice(0,8)))),new o1,w,v),i=new BE(v,w),a=(m.addListener(r),m.addListener(i),new O_(w)),i=new m_([new g_,new E_(new $_),new w_(new $_),new b_(y,Qe.instance),new T_(new X_),new __(new X_),new I_(new W_),new A_(new W_)]),y=new V_([new H_(c),new B_(i),new z_]),i=new G_(Qe.instance,a,y),a=new J_([new Y_,new q_(i)]),y=new k_(y_.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),y=new N_(new x_(y),i,a),i=new K_(new M_(rb.get("targetMatcher")),new P_(c)),a=new S_(p,i,w),c=(new R_(n,a,y),new y1(p)),i=(new h1(n,c),new yA(rb.get("targetMatcher"))),a=new EA(o,"hackle-split-url-redirected",{days:3472222222222222e-20}),y=new hA(p,i,a,w),c=new mA(new gA,new Z_,a,E),o=(new dA(n,y,c,w),new h_(w,v,d,f)),a=(null==(p=t.devTool)?void 0:p.userExplorer)&&"function"==typeof(null==(i=t.devTool)?void 0:i.userExplorer),n=t.devTool&&a?{manager:t.devTool,userExplorer:o}:void 0,y=new oi(y_.monitoring(t.monitoringUrl),s,u,new w1,6e4),b=(Zn.addRegistry(y),l.start(),new qi(w,l,m,v,n));_A=b;function T(){g.flush().catch(function(e){return TA.warn("Failed to flush retry events: ".concat(e))})}return window.addEventListener("onpagehide"in window?"pagehide":"unload",function(){To(),m.updateLastEventTime((new Date).getTime()),b.close(),Zn.globalRegistry.close()}),window.addEventListener("pageshow",T),document.addEventListener("visibilitychange",function(){document.hidden||T()}),t.autoOpenDevTool&&(t.devTool?b.showUserExplorer():TA.error("DevTool is not provided")),c=Date.now(),d=v.currentUser,f=m.currentSessionId,(ZT(h,d)?m.startNewSessionIfNeeded(d,c):m.startNewSession(h,d,c))===f&&r.startNewCampaignIfNeeded(d,c),b.onReady(function(){(new lb).install(w,v);var t,r,e=b;function n(e){if("function"==typeof window.Event)return new Event(e);var t=!1,r=!1,n=void 0,i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t,r,n),i}try{history.pushState=(r=history.pushState,function(){try{var e=r.apply(this,arguments);return window.dispatchEvent(n("locationchange")),e}catch(e){if(e instanceof Error)TA.error(e);else try{TA.error(e)}catch(e){}}}),history.replaceState=(t=history.replaceState,function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(n("locationchange")),e}catch(e){if(e instanceof Error)TA.error(e);else try{TA.error(e)}catch(e){}}}),window.addEventListener("popstate",function(){try{window.dispatchEvent(n("locationchange"))}catch(e){if(e instanceof Error)TA.error(e);else try{TA.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)TA.error(e);else try{TA.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)TA.error(e);else try{TA.error(e)}catch(e){}}b.trackPageView(),E.dispatchDoneEventIfNeeded()}),b}td={createInstance:UA,getUserId:wo,setUserId:bo,removeUserId:To,Logger:i},n.Bucket=wt,n.Cohort=ar,n.Container=kt,n.ContainerGroup=Mt,n.CoreVersion=cr,n.Decision=ht,n.DecisionReason=f,n.EmptyHackleRemoteConfig=vt,n.EmptyParameterConfig=et,n.EventType=Tt,n.Experiment=gt,n.FeatureFlagDecision=yt,n.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],n.IAM_ACTION_TYPE=Ar,n.IAM_BEHAVIOR=Ir,n.IAM_DISPLAY_TYPE=br,n.IAM_LAYOUT_TYPE=Tr,n.IAM_ORIENTATION=_r,n.IAM_PLATFORM_TYPE=Er,n.IAM_STATUS=gr,n.IAM_TIMEUNIT=wr,n.IdentifierType=_t,n.IdentifiersBuilder=It,n.InAppMessage=Or,n.InAppMessageAction=Jr,n.InAppMessageBackground=Kr,n.InAppMessageButton=Br,n.InAppMessageButtonStyle=Gr,n.InAppMessageContext=Dr,n.InAppMessageContextLayout=Fr,n.InAppMessageContextMessage=Lr,n.InAppMessageDecision=dt,n.InAppMessageDurationCap=Mr,n.InAppMessageEventFrequencyCap=xr,n.InAppMessageEventTrigger=Sr,n.InAppMessageEventTriggerRule=Cr,n.InAppMessageIdentifierCap=kr,n.InAppMessageImage=jr,n.InAppMessagePeriodAlways=Nr,n.InAppMessagePeriodCustom=Rr,n.InAppMessageTargetContext=Ur,n.InAppMessageText=Vr,n.InAppMessageTextAttribute=Hr,n.InAppMessageTextStyle=zr,n.InAppMessageUserOverride=Pr,n.Logger=i,n.MATCH_OPERATORS=dr,n.MATCH_TYPES=pr,n.MATCH_VALUE_TYPES=fr,n.MetaVersion=lr,n.ParameterConfiguration=mt,n.PropertyOperations=Ki,n.PropertyOperationsBuilder=Gi,n.RemoteConfigDecision=ft,n.RemoteConfigParameter=Ut,n.RemoteConfigParameterValue=Dt,n.RemoteConfigTargetRule=Pt,n.SEGMENT_TYPES=vr,n.Segment=xt,n.Slot=bt,n.SplitUrlConfig=yn,n.SplitUrlTargets=vn,n.TARGET_ACTION_TYPES=hr,n.TARGET_KEY_TYPES=yr,n.Target=At,n.TargetAction=St,n.TargetCondition=Ot,n.TargetKey=Nt,n.TargetMatch=Rt,n.TargetRule=Ct,n.TargetingType=mr,n.Variation=Et,n.Version=ur,n.createInstance=UA,n.default=td,n.getUserId=wo,n.removeUserId=To,n.resolveIdentifiers=lt,n.sanitizeUser=pt,n.setUserId=bo;var PA=function(e,t){return(PA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};var DA=function(){return(DA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function LA(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}FA.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},FA.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},FA.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ja=FA;function FA(){this.listeners={}}VA.arePropertiesEqual=function(e,t){var r=VA.coerceUnknownToProperties(e),n=VA.coerceUnknownToProperties(t),e=Object.keys(r),t=Object.keys(n);return e.length===t.length&&e.every(function(e){return e in n&&r[e]===n[e]})},VA.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var jA=VA;function VA(){}zA.isUserEqual=function(e,t){return(null==e?void 0:e.id)===(null==t?void 0:t.id)&&(null==e?void 0:e.deviceId)===(null==t?void 0:t.deviceId)&&(null==e?void 0:e.userId)===(null==t?void 0:t.userId)&&jA.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&jA.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var HA=zA;function zA(){}var BA=function(n){var e=i,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function i(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=l.createInstance(e,DA(DA({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.27.0"})),r.getUser=r.getUser.bind(r),r.setUser=r.setUser.bind(r),r.setUserId=r.setUserId.bind(r),r.setDeviceId=r.setDeviceId.bind(r),r.setUserProperty=r.setUserProperty.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.resetUser=r.resetUser.bind(r),r.variation=r.variation.bind(r),r.variationDetail=r.variationDetail.bind(r),r.isFeatureOn=r.isFeatureOn.bind(r),r.featureFlagDetail=r.featureFlagDetail.bind(r),r.track=r.track.bind(r),r.trackPageView=r.trackPageView.bind(r),r.remoteConfig=r.remoteConfig.bind(r),r.onReady=r.onReady.bind(r),r.onInitialized=r.onInitialized.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return PA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},i.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},i.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},i.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},i.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},i.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},i.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},i.prototype.track=function(e,t){this.client.track(e,t||void 0)},i.prototype.trackPageView=function(e){this.client.trackPageView(DA(DA({},e),{user:(null==e?void 0:e.user)||void 0}))},i.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},i.prototype.onReady=function(e,t){this.client.onReady(e,t)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){HA.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},i.prototype.showUserExplorer=function(){this.client.showUserExplorer()},i.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},i}(Ja);var P={exports:{}},E={},GA=Object.getOwnPropertySymbols,KA=Object.prototype.hasOwnProperty,JA=Object.prototype.propertyIsEnumerable;var Yl=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var o in r=Object(arguments[i]))KA.call(r,o)&&(n[o]=r[o]);if(GA)for(var s=GA(r),a=0;a<s.length;a++)JA.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},YA=Yl,k="function"==typeof Symbol&&Symbol.for,qA=k?Symbol.for("react.element"):60103,$A=k?Symbol.for("react.portal"):60106,ls=k?Symbol.for("react.fragment"):60107,vs=k?Symbol.for("react.strict_mode"):60108,Ls=k?Symbol.for("react.profiler"):60114,XA=k?Symbol.for("react.provider"):60109,WA=k?Symbol.for("react.context"):60110,ZA=k?Symbol.for("react.forward_ref"):60112,sc=k?Symbol.for("react.suspense"):60113,QA=k?Symbol.for("react.memo"):60115,eO=k?Symbol.for("react.lazy"):60116,tO="function"==typeof Symbol&&Symbol.iterator;function rO(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var nO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iO={};function oO(e,t,r){this.props=e,this.context=t,this.refs=iO,this.updater=r||nO}function sO(){}function aO(e,t,r){this.props=e,this.context=t,this.refs=iO,this.updater=r||nO}oO.prototype.isReactComponent={},oO.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(rO(85));this.updater.enqueueSetState(this,e,t,"setState")},oO.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},sO.prototype=oO.prototype;var So=aO.prototype=new sO,uO=(So.constructor=aO,YA(So,oO.prototype),So.isPureReactComponent=!0,{current:null}),cO=Object.prototype.hasOwnProperty,lO={key:!0,ref:!0,__self:!0,__source:!0};function pO(e,t,r){var n,i={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)cO.call(t,n)&&!lO.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(1===a)i.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===i[n]&&(i[n]=a[n]);return{$$typeof:qA,type:e,key:o,ref:s,props:i,_owner:uO.current}}function fO(e){return"object"==typeof e&&null!==e&&e.$$typeof===qA}var dO=/\/+/g,hO=[];function yO(e,t,r,n){var i;return hO.length?((i=hO.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function vO(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,hO.length<10&&hO.push(e)}function mO(e,t,r){return null==e?0:function e(t,r,n,i){var o=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case qA:case $A:o=!0}}if(o)return n(i,t,""===r?"."+gO(t,0):r),1;if(o=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+gO(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=tO&&t[tO]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+gO(a,s++),n,i);else if("object"===a)throw n=""+t,Error(rO(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function gO(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function EO(e,t){e.func.call(e.context,t,e.count++)}function wO(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?bO(e,n,r,function(e){return e}):null!=e&&(fO(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(dO,"$&/")+"/")+r,e={$$typeof:qA,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function bO(e,t,r,n,i){var o="";mO(e,wO,t=yO(t,o=null!=r?(""+r).replace(dO,"$&/")+"/":o,n,i)),vO(t)}var TO={current:null};function _O(){var e=TO.current;if(null===e)throw Error(rO(321));return e}var IO,AO,OO,qa={ReactCurrentDispatcher:TO,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:uO,IsSomeRendererActing:{current:!1},assign:YA},e=(E.Children={map:function(e,t,r){if(null==e)return e;var n=[];return bO(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;mO(e,EO,t=yO(null,null,t,r)),vO(t)},count:function(e){return mO(e,function(){return null},null)},toArray:function(e){var t=[];return bO(e,t,null,function(e){return e}),t},only:function(e){if(fO(e))return e;throw Error(rO(143))}},E.Component=oO,E.Fragment=ls,E.Profiler=Ls,E.PureComponent=aO,E.StrictMode=vs,E.Suspense=sc,E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qa,E.cloneElement=function(e,t,r){if(null==e)throw Error(rO(267,e));var n=YA({},e.props),i=e.key,o=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(o=t.ref,s=uO.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)cO.call(t,a)&&!lO.hasOwnProperty(a)&&(n[a]=(void 0===t[a]&&void 0!==u?u:t)[a]);var a=arguments.length-2;if(1===a)n.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];n.children=u}return{$$typeof:qA,type:e.type,key:i,ref:o,props:n,_owner:s}},E.createContext=function(e,t){return(e={$$typeof:WA,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:XA,_context:e},e.Consumer=e},E.createElement=pO,E.createFactory=function(e){var t=pO.bind(null,e);return t.type=e,t},E.createRef=function(){return{current:null}},E.forwardRef=function(e){return{$$typeof:ZA,render:e}},E.isValidElement=fO,E.lazy=function(e){return{$$typeof:eO,_ctor:e,_status:-1,_result:null}},E.memo=function(e,t){return{$$typeof:QA,type:e,compare:void 0===t?null:t}},E.useCallback=function(e,t){return _O().useCallback(e,t)},E.useContext=function(e,t){return _O().useContext(e,t)},E.useDebugValue=function(){},E.useEffect=function(e,t){return _O().useEffect(e,t)},E.useImperativeHandle=function(e,t,r){return _O().useImperativeHandle(e,t,r)},E.useLayoutEffect=function(e,t){return _O().useLayoutEffect(e,t)},E.useMemo=function(e,t){return _O().useMemo(e,t)},E.useReducer=function(e,t,r){return _O().useReducer(e,t,r)},E.useRef=function(e){return _O().useRef(e)},E.useState=function(e){return _O().useState(e)},E.version="16.14.0",{}),Rf=Function.call.bind(Object.prototype.hasOwnProperty),NO=function(){};function RO(e,t,r,n,i){if("production"!==production)for(var o in e)if(OO(e,o)){var s,a;try{if("function"!=typeof e[o])throw(a=Error((n||"React class")+": "+r+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[o](t,o,n,r,null,IO)}catch(e){s=e}!s||s instanceof Error||NO((n||"React class")+": type specification of "+r+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in AO)&&(AO[s.message]=!0,o=i?i():"",NO("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(IO="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",AO={},OO=Rf,NO=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),RO.resetWarningCache=function(){"production"!==production&&(AO={})},"production"!==production){var SO=Yl,CO=RO,M="function"==typeof Symbol&&Symbol.for,xO=M?Symbol.for("react.element"):60103,kO=M?Symbol.for("react.portal"):60106,MO=M?Symbol.for("react.fragment"):60107,UO=M?Symbol.for("react.strict_mode"):60108,PO=M?Symbol.for("react.profiler"):60114,DO=M?Symbol.for("react.provider"):60109,LO=M?Symbol.for("react.context"):60110,FO=M?Symbol.for("react.concurrent_mode"):60111,jO=M?Symbol.for("react.forward_ref"):60112,VO=M?Symbol.for("react.suspense"):60113,HO=M?Symbol.for("react.suspense_list"):60120,zO=M?Symbol.for("react.memo"):60115,BO=M?Symbol.for("react.lazy"):60116,GO=M?Symbol.for("react.block"):60121,KO=M?Symbol.for("react.fundamental"):60117,JO=M?Symbol.for("react.responder"):60118,YO=M?Symbol.for("react.scope"):60119,qO="function"==typeof Symbol&&Symbol.iterator,$O="@@iterator";function XO(e){if(null===e||"object"!=typeof e)return null;e=qO&&e[qO]||e[$O];return"function"==typeof e?e:null}var WO={current:null},ZO={current:null},QO=/^(.*)[\\\/]/,eN=1;function tN(e){if(null==e)return null;if("number"==typeof e.tag&&aN("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case MO:return"Fragment";case kO:return"Portal";case PO:return"Profiler";case UO:return"StrictMode";case VO:return"Suspense";case HO:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case LO:return"Context.Consumer";case DO:return"Context.Provider";case jO:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case zO:return tN(e.type);case GO:return tN(e.render);case BO:r=(t=e)._status===eN?t._result:null;if(r)return tN(r)}var t,r;return null}var rN={},nN=null;function iN(e){nN=e}rN.getCurrentStack=null,rN.getStackAddendum=function(){var e,t,r,n,i,o="",s=(nN&&(e=tN(nN.type),r=nN._owner,o+=(e=e,t=nN._source,r=r&&tN(r.type),i="",t?(n=(s=t.fileName).replace(QO,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(QO))&&(s=s[1])?s.replace(QO,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),rN.getCurrentStack);return s&&(o+=s()||""),o};var oN={ReactCurrentDispatcher:WO,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:ZO,IsSomeRendererActing:{current:!1},assign:SO};function sN(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];uN("warn",e,r)}function aN(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];uN("error",e,r)}function uN(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=oN.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var i=0,o="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(o)}catch(e){}}SO(oN,{ReactDebugCurrentFrame:rN,ReactComponentTreeHook:{}});var cN={};function lN(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;cN[r]||(aN("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),cN[r]=!0)}var pN={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){lN(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){lN(e,"replaceState")},enqueueSetState:function(e,t,r,n){lN(e,"setState")}},fN={};function dN(e,t,r){this.props=e,this.context=t,this.refs=fN,this.updater=r||pN}Object.freeze(fN),dN.prototype.isReactComponent={},dN.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},dN.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var hN,yN={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(hN in yN)yN.hasOwnProperty(hN)&&!function(e,t){Object.defineProperty(dN.prototype,e,{get:function(){sN("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(hN,yN[hN]);function vN(){}function mN(e,t,r){this.props=e,this.context=t,this.refs=fN,this.updater=r||pN}vN.prototype=dN.prototype,(M=mN.prototype=new vN).constructor=mN,SO(M,dN.prototype),M.isPureReactComponent=!0;var gN,EN,wN=Object.prototype.hasOwnProperty,bN={key:!0,ref:!0,__self:!0,__source:!0};function TN(e){if(wN.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function _N(e){if(wN.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var IN={},AN=function(e,t,r,n,i,o,s){e={$$typeof:xO,type:e,key:t,ref:r,props:s,_owner:o,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function ON(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in TN(t)&&(s=t.ref,"string"==typeof(c=t).ref&&ZO.current&&c.__self&&ZO.current.stateNode!==c.__self&&(p=tN(ZO.current.type),IN[p]||(aN('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',tN(ZO.current.type),c.ref),IN[p]=!0))),_N(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)wN.call(t,n)&&!bN.hasOwnProperty(n)&&(i[n]=t[n]);var c,l,p,f,d=arguments.length-2;if(1==d)i.children=r;else if(1<d){for(var h=Array(d),y=0;y<d;y++)h[y]=arguments[y+2];Object.freeze&&Object.freeze(h),i.children=h}if(e&&e.defaultProps){var v=e.defaultProps;for(n in v)void 0===i[n]&&(i[n]=v[n])}function m(){EN||(EN=!0,aN("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",l))}function g(){gN||(gN=!0,aN("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(o||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,o&&(p=i,f=c,g.isReactWarning=!0,Object.defineProperty(p,"key",{get:g,configurable:!0})),s&&(r=i,l=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),AN(e,o,s,a,u,ZO.current,i)}function NN(e){return"object"==typeof e&&null!==e&&e.$$typeof===xO}var RN=".",SN=":",CN=!1,xN=/\/+/g;function kN(e){return(""+e).replace(xN,"$&/")}var MN=10,UN=[];function PN(e,t,r,n){var i;return UN.length?((i=UN.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function DN(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,UN.length<MN&&UN.push(e)}function LN(e,t,r){return null==e?0:function e(t,r,n,i){var o,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case xO:case kO:a=!0}}if(a)return n(i,t,""===r?RN+FN(t,0):r),1;var u=0,c=""===r?RN:r+SN;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+FN(o,l),n,i);else if("function"==typeof(r=XO(t))){r===t.entries&&(CN||sN("Using Maps as children is deprecated and will be removed in a future major release. Consider converting children to an array of keyed ReactElements instead."),CN=!0);for(var p,f=r.call(t),d=0;!(p=f.next()).done;)u+=e(o=p.value,c+FN(o,d++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+rN.getStackAddendum(),s=""+t,Error("Objects are not valid as a React child (found: "+("[object Object]"==s?"object with keys {"+Object.keys(t).join(", ")+"}":s)+")."+r);return u}(e,"",t,r)}function FN(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function jN(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function VN(e,t,r){var n=e.result,i=e.keyPrefix,o=e.func,s=e.context,o=o.call(s,t,e.count++);Array.isArray(o)?HN(o,n,r,function(e){return e}):null!=o&&(NN(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":kN(o.key)+"/")+r,o=AN(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function HN(e,t,r,n,i){var o="",t=PN(t,o=null!=r?kN(r)+"/":o,n,i);LN(e,VN,t),DN(t)}function zN(e){return"string"==typeof e||"function"==typeof e||e===MO||e===FO||e===PO||e===UO||e===VO||e===HO||"object"==typeof e&&null!==e&&(e.$$typeof===BO||e.$$typeof===zO||e.$$typeof===DO||e.$$typeof===LO||e.$$typeof===jO||e.$$typeof===KO||e.$$typeof===JO||e.$$typeof===YO||e.$$typeof===GO)}function BN(){var e=WO.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");return e}function GN(){if(ZO.current){var e=tN(ZO.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var KN=!1,JN={};function YN(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=GN())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),JN[t=r]||(JN[t]=!0,r="",e&&e._owner&&e._owner!==ZO.current&&(r=" It was passed a child from "+tN(e._owner.type)+"."),iN(e),aN('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',t,r),iN(null)))}function qN(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];NN(n)&&YN(n,t)}else if(NN(e))e._store&&(e._store.validated=!0);else if(e){var i=XO(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)NN(o.value)&&YN(o.value,t)}}function $N(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=tN(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==jO&&t.$$typeof!==zO)return;r=t.propTypes}r?(iN(e),CO(r,e.props,"prop",n,rN.getStackAddendum),iN(null)):void 0===t.PropTypes||KN||(KN=!0,aN("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||aN("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function XN(e,t,r){var n,i=zN(e),t=(i||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||GN(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===xO?(s="<"+(tN(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,aN("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,n)),ON.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)qN(arguments[o],e);if(e===MO){var s=t;iN(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){aN("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&aN("Invalid attribute `ref` supplied to `React.Fragment`."),iN(null)}else $N(t);return t}var WN=!1;try{var ZN=Object.freeze({}),QN=new Map([[ZN,null]]),eR=new Set([ZN]);QN.set(0,0),eR.add(0)}catch(e){}function tR(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,i,o=SO({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in TN(t)&&(a=t.ref,l=ZO.current),_N(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)wN.call(t,n)&&!bN.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var p=arguments.length-2;if(1==p)o.children=r;else if(1<p){for(var f=Array(p),d=0;d<p;d++)f[d]=arguments[d+2];o.children=f}return AN(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)qN(arguments[i],n.type);return $N(n),n}function rR(e){var t=XN.bind(null,e);return t.type=e,WN||(WN=!0,sN("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return sN("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}M=XN,e.Children={map:function(e,t,r){if(null==e)return e;var n=[];return HN(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=PN(null,null,t,r),LN(e,jN,t),DN(t)},count:function(e){return LN(e,function(){return null},null)},toArray:function(e){var t=[];return HN(e,t,null,function(e){return e}),t},only:function(e){if(NN(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},e.Component=dN,e.Fragment=MO,e.Profiler=PO,e.PureComponent=mN,e.StrictMode=UO,e.Suspense=VO,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oN,e.cloneElement=tR,e.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&aN("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:LO,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:DO,_context:r}),i=!1,t={$$typeof:LO,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,aN("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(e){r.Provider=e}},_currentValue:{get:function(){return r._currentValue},set:function(e){r._currentValue=e}},_currentValue2:{get:function(){return r._currentValue2},set:function(e){r._currentValue2=e}},_threadCount:{get:function(){return r._threadCount},set:function(e){r._threadCount=e}},Consumer:{get:function(){return n||(n=!0,aN("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}}}),r.Consumer=t,r._currentRenderer=null,r._currentRenderer2=null,r},e.createElement=M,e.createFactory=rR,e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){return null!=e&&e.$$typeof===zO?aN("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?aN("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&aN("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null==e||null==e.defaultProps&&null==e.propTypes||aN("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:jO,render:e}},e.isValidElement=NN,e.lazy=function(e){var t,r,n={$$typeof:BO,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){aN("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){aN("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},e.memo=function(e,t){return zN(e)||aN("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:zO,type:e,compare:void 0===t?null:t}},e.useCallback=function(e,t){return BN().useCallback(e,t)},e.useContext=function(e,t){var r,n=BN();return void 0!==t&&aN("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==e._context&&((r=e._context).Consumer===e?aN("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&aN("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},e.useDebugValue=function(e,t){return BN().useDebugValue(e,t)},e.useEffect=function(e,t){return BN().useEffect(e,t)},e.useImperativeHandle=function(e,t,r){return BN().useImperativeHandle(e,t,r)},e.useLayoutEffect=function(e,t){return BN().useLayoutEffect(e,t)},e.useMemo=function(e,t){return BN().useMemo(e,t)},e.useReducer=function(e,t,r){return BN().useReducer(e,t,r)},e.useRef=function(e){return BN().useRef(e)},e.useState=function(e){return BN().useState(e)},e.version="16.14.0"}"production"===production?P.exports=E:P.exports=e;var nR=P.exports,iR=P.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),Ol=iR.Consumer,oR=iR.Provider;var sR=l.Logger.log;function aR(e,t){e=uR(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function uR(e,t){void 0===t&&(t="A");var r=P.exports.useContext(iR),n=r.hackle,i=r.userVersion,o=r.initialized,s=P.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||l.Decision.of(t,l.DecisionReason.EXCEPTION):l.Decision.of(t,l.DecisionReason.SDK_NOT_READY)},[t,e,n,o]),r=LA(P.exports.useState(function(){return n?s():(sR.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=LA(P.exports.useState(i),2),c=u[0],u=u[1];return pR(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function cR(e){e=lR(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function lR(e){var t=P.exports.useContext(iR),r=t.hackle,n=t.userVersion,i=t.initialized,o=P.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION):l.FeatureFlagDecision.off(l.DecisionReason.SDK_NOT_READY)},[e,r,i]),t=LA(P.exports.useState(function(){return r?o():(sR.error("HackleClient is not existed"),l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=LA(P.exports.useState(n),2),u=a[0],a=a[1];return pR(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function pR(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function fR(e){var t,r=e.experimentKey,e=e.children,n=(r=aR(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(P.exports.Children.forEach(e,function(e){P.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?P.exports.cloneElement(t,{variation:i}):null)}function dR(e){return e.variation,e=e.children,P.exports.createElement(P.exports.Fragment,null,e)}function hR(e){var t=(r=cR(e.featureKey)).isLoading,r=r.isOn;return t?null:nR.createElement(nR.Fragment,null,e.children(r))}D.HackleContext=iR,D.HackleContextConsumer=Ol,D.HackleContextProvider=oR,D.HackleExperiment=fR,D.HackleFeature=hR,D.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(i=e.timeout)?3e3:i,i=void 0!==(i=e.supportSSR)&&i,e=e.children,o=LA(P.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return P.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),P.exports.useEffect(function(){function e(){a(function(e){return DA(DA({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),P.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return DA(DA({},e),{initialized:!0})})},function(){a(function(e){return DA(DA({},e),{initialized:!0})})}).catch(function(){a(function(e){return DA(DA({},e),{initialized:!0})})})},[t]),i||s.initialized?nR.createElement(oR,{value:s},e):null},D.HackleVariation=dR,D.createInstance=function(e,t){return new BA(e,t)},D.useFeature=function(e){var t=(n=P.exports.useContext(iR)).hackle,r=n.userVersion,n=n.initialized,i=P.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=LA(P.exports.useState(function(){return t?i():("undefined"!=typeof window&&sR.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=LA(P.exports.useState(r),2))[0],n=n[1];return pR(a,r)||(n(r),s(i())),o},D.useFeatureFlagDetail=function(e){var t=(n=P.exports.useContext(iR)).hackle,r=n.userVersion,n=n.initialized,i=P.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION)},[e,t,n]),o=(s=LA(P.exports.useState(function(){return t?i():("undefined"!=typeof window&&sR.error("HackleClient is not existed"),l.FeatureFlagDecision.off(l.DecisionReason.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=LA(P.exports.useState(r),2))[0],n=n[1];return pR(a,r)||(n(r),s(i())),o},D.useLoadableFeature=cR,D.useLoadableFeatureDetail=lR,D.useLoadableRemoteConfig=function(){var e=(o=P.exports.useContext(iR)).hackle,t=o.userVersion,r=o.initialized,n=P.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),i=(o=LA(P.exports.useState(function(){return e||sR.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=LA(P.exports.useState(t),2))[0],a=a[1];return pR(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},D.useLoadableVariation=aR,D.useLoadableVariationDetail=uR,D.useRemoteConfig=function(){var e=(r=P.exports.useContext(iR)).hackle,t=r.userVersion,r=r.initialized,n=P.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new l.EmptyHackleRemoteConfig},[e,r]),i=(o=LA(P.exports.useState(function(){return e||sR.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=LA(P.exports.useState(t),2))[0],r=r[1];return pR(s,t)||(r(t),o(n())),i},D.useTrack=function(){var t=P.exports.useContext(iR).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(sR.error("HackleClient is not existed"),function(){})},D.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=P.exports.useContext(iR)).hackle,n=a.userVersion,i=a.initialized,o=P.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=LA(P.exports.useState(function(){return r?o():("undefined"!=typeof window&&sR.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=LA(P.exports.useState(n),2))[0],c=c[1];return pR(u,n)||(c(n),a(o())),s},D.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=P.exports.useContext(iR)).hackle,n=i.userVersion,i=i.initialized,o=P.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||l.Decision.of(t,l.DecisionReason.EXCEPTION)},[t,e,r,i]),s=(a=LA(P.exports.useState(function(){return r?o():("undefined"!=typeof window&&sR.error("HackleClient is not existed"),l.Decision.of(t,l.DecisionReason.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=LA(P.exports.useState(n),2))[0],i=i[1];return pR(u,n)||(i(n),a(o())),s},Object.defineProperty(D,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).hackleReactSDK={})}(this,function(n){"use strict";var D,L=new Uint8Array(16);var F=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var j=[],V=0;V<256;++V)j.push((V+256).toString(16).substr(1));function z(e,t){var t=1<arguments.length&&void 0!==t?t:0,e=(j[e[t+0]]+j[e[t+1]]+j[e[t+2]]+j[e[t+3]]+"-"+j[e[t+4]]+j[e[t+5]]+"-"+j[e[t+6]]+j[e[t+7]]+"-"+j[e[t+8]]+j[e[t+9]]+"-"+j[e[t+10]]+j[e[t+11]]+j[e[t+12]]+j[e[t+13]]+j[e[t+14]]+j[e[t+15]]).toLowerCase();if("string"==typeof(t=e)&&F.test(t))return e;throw TypeError("Stringified UUID is invalid")}function H(e,t,r){var n=(e=e||{}).random||(e.rng||function(){if(D=D||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return D(L);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")})();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return z(n)}var B="3.7.5",e="function"==typeof atob,t="function"==typeof btoa,r="function"==typeof Buffer;const G="function"==typeof TextDecoder?new TextDecoder:void 0,K="function"==typeof TextEncoder?new TextEncoder:void 0;const J=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Y=(e=>{let r={};return e.forEach((e,t)=>r[e]=t),r})(J),$=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,q=String.fromCharCode.bind(String),X="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),W=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Z=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var i=t=>{let r,n,i,o,s="";var e=t.length%3;for(let e=0;e<t.length;){if(255<(n=t.charCodeAt(e++))||255<(i=t.charCodeAt(e++))||255<(o=t.charCodeAt(e++)))throw new TypeError("invalid character found");r=n<<16|i<<8|o,s+=J[r>>18&63]+J[r>>12&63]+J[r>>6&63]+J[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const Q=t?e=>btoa(e):r?e=>Buffer.from(e,"binary").toString("base64"):i,ee=r?e=>Buffer.from(e).toString("base64"):r=>{let n=[];for(let e=0,t=r.length;e<t;e+=4096)n.push(q.apply(null,r.subarray(e,e+4096)));return Q(n.join(""))},te=(e,t=!1)=>t?W(ee(e)):ee(e),re=e=>{var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?q(192|t>>>6)+q(128|63&t):q(224|t>>>12&15)+q(128|t>>>6&63)+q(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),q(240|t>>>18&7)+q(128|t>>>12&63)+q(128|t>>>6&63)+q(128|63&t))},ne=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ie=e=>e.replace(ne,re),oe=r?e=>Buffer.from(e,"utf8").toString("base64"):K?e=>ee(K.encode(e)):e=>Q(ie(e)),se=(e,t=!1)=>t?W(oe(e)):oe(e);t=e=>se(e,!0);const ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return q(55296+(t>>>10))+q(56320+(1023&t));case 3:return q((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return q((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ce=e=>e.replace(ae,ue);var o=t=>{if(t=t.replace(/\s+/g,""),!$.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let r,n="",i,o;for(let e=0;e<t.length;)r=Y[t.charAt(e++)]<<18|Y[t.charAt(e++)]<<12|(i=Y[t.charAt(e++)])<<6|(o=Y[t.charAt(e++)]),n+=64===i?q(r>>16&255):64===o?q(r>>16&255,r>>8&255):q(r>>16&255,r>>8&255,255&r);return n};const le=e?e=>atob(Z(e)):r?e=>Buffer.from(e,"base64").toString("binary"):o,pe=r?e=>X(Buffer.from(e,"base64")):e=>X(le(e).split("").map(e=>e.charCodeAt(0))),fe=e=>pe(he(e)),de=r?e=>Buffer.from(e,"base64").toString("utf8"):G?e=>G.decode(pe(e)):e=>ce(le(e)),he=e=>Z(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ve=e=>de(he(e));function ye(){var e=(e,t)=>Object.defineProperty(String.prototype,e,ge(t));e("fromBase64",function(){return ve(this)}),e("toBase64",function(e){return se(this,e)}),e("toBase64URI",function(){return se(this,!0)}),e("toBase64URL",function(){return se(this,!0)}),e("toUint8Array",function(){return fe(this)})}function me(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,ge(t));e("toBase64",function(e){return te(this,e)}),e("toBase64URI",function(){return te(this,!0)}),e("toBase64URL",function(){return te(this,!0)})}const ge=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const Ee={version:B,VERSION:"3.7.5",atob:le,atobPolyfill:o,btoa:Q,btoaPolyfill:i,fromBase64:ve,toBase64:se,encode:se,encodeURI:t,encodeURL:t,utob:ie,btou:ce,decode:ve,isValid:e=>{if("string"!=typeof e)return!1;e=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:te,toUint8Array:fe,extendString:ye,extendUint8Array:me,extendBuiltins:()=>{ye(),me()}};we.isNotNullOrUndefined=function(e){return null!=e},we.isNullOrUndefined=function(e){return null==e},we.requiredNotNullOrUndefined=function(e,t){if(void 0===t&&(t=function(){return"Required value is null or undefined"}),this.isNullOrUndefined(e))throw new Error(t());return e},we.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var a=we;function we(){}be.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);a.isNotNullOrUndefined(o)&&r.push(o)}return r},be.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r},be.associateTo=function(e,t,r){for(var n=0,i=e;n<i.length;n++){var o=r(i[n]);t.set(o[0],o[1])}return t},be.associate=function(e,t){return this.associateTo(e,new Map,t)},be.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},be.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r};var p=be;function be(){}var Te={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},s=(_e.setLogLevel=function(e){this.logLevel=e=void 0===e?Te.INFO:e},_e.initCounter=function(t){this.counters=p.associate(Object.keys(Te),function(e){return[e,t(e)]})},_e._log=function(e,t){var r;switch(e){case"WARN":r="orange";break;case"ERROR":r="red";break;default:r="#AAAAAA"}if(t instanceof Error)Ie.log(e,r,t.message,t);else try{Ie.log(e,r,t)}catch(e){}},_e.increment=function(e){var t;null!=(t=null==(t=_e.counters)?void 0:t.get(e))&&t.increment()},_e.logLevel=Te.INFO,_e.log={error:function(e){Te.ERROR<=_e.logLevel&&(_e._log("ERROR",e),_e.increment("ERROR"))},warn:function(e){Te.WARN<=_e.logLevel&&(_e._log("WARN",e),_e.increment("WARN"))},info:function(e){Te.INFO<=_e.logLevel&&(_e._log("INFO",e),_e.increment("INFO"))},debug:function(e){Te.DEBUG<=_e.logLevel&&(_e._log("DEBUG",e),_e.increment("DEBUG"))}},_e);function _e(){}Ae.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Ie=Ae;function Ae(){}var Oe=function(e,t){return(Oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Ne(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Oe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}o((u=u.apply(e,s||[])).next())})}function l(n,i){var o,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){u.label=t[1];break}if(6===t[0]&&u.label<a[1]){u.label=a[1],a=t;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(t);break}a[2]&&u.ops.pop(),u.trys.pop();continue}t=i.call(n,u)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Re(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var Se=s.log,Ce=(xe.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},xe.isEquals=function(t,r){if(null==r)return!1;var e=Object.keys(t);return e.length===Object.keys(r).length&&e.every(function(e){return t[e]===r[e]})},xe.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i=n[r],o=i[0],i=i[1];this.isValidType(o)?(i=this.sanitizeValue(i),a.isNullOrUndefined(i)?Se.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Se.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}return t},xe.isValidType=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH)},xe.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},xe.MAX_IDENTIFIER_TYPE_LENGTH=128,xe.MAX_IDENTIFIER_VALUE_LENGTH=512,xe);function xe(){}var ke=s.log,Me=(Pe.sanitize=function(e){var t={};if(a.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i,o=n[r],s=o[0],o=o[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){ke.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),a.isNullOrUndefined(i)?ke.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):ke.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},Pe.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},Pe.isValidKey=function(e){return a.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},Pe.sanitizeValue=function(e,t){var r=this;return"string"==typeof e&&e.startsWith(this.SYSTEM_PROPERTY_KEY_PREFIX)?t:this.isValidValue(t)?Array.isArray(t)?t.filter(function(e){return r.isValidElement(e)}):t:null},Pe.isValidValue=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e?!isNaN(e)&&isFinite(e):"boolean"==typeof e||Array.isArray(e))},Pe.isValidElement=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},Pe.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},Pe.SYSTEM_PROPERTY_KEY_PREFIX="$",Pe.MAX_PROPERTIES_COUNT=128,Pe.MAX_PROPERTY_KEY_LENGTH=128,Pe.MAX_PROPERTY_VALUE_LENGTH=1024,Pe);function Pe(){}var Ue=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],De=(f.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C0);case"seconds":return e/(f.C3/f.C0);case"minutes":return e/(f.C4/f.C0);case"hours":return e/(f.C5/f.C0);case"days":return e/(f.C6/f.C0)}},f.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C1/f.C0);case"milliseconds":return e/(f.C2/f.C1);case"microseconds":return e;case"seconds":return e/(f.C3/f.C1);case"minutes":return e/(f.C4/f.C1);case"hours":return e/(f.C5/f.C1);case"days":return e/(f.C6/f.C1)}},f.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C2/f.C0);case"microseconds":return e*(f.C2/f.C1);case"milliseconds":return e;case"seconds":return e/(f.C3/f.C2);case"minutes":return e/(f.C4/f.C2);case"hours":return e/(f.C5/f.C2);case"days":return e/(f.C6/f.C2)}},f.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C3/f.C0);case"microseconds":return e*(f.C3/f.C1);case"milliseconds":return e*(f.C3/f.C2);case"seconds":return e;case"minutes":return e/(f.C4/f.C3);case"hours":return e/(f.C5/f.C3);case"days":return e/(f.C6/f.C3)}},f.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C4/f.C0);case"microseconds":return e*(f.C4/f.C1);case"milliseconds":return e*(f.C4/f.C2);case"seconds":return e*(f.C4/f.C3);case"minutes":return e;case"hours":return e/(f.C5/f.C4);case"days":return e/(f.C6/f.C4)}},f.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C5/f.C0);case"microseconds":return e*(f.C5/f.C1);case"milliseconds":return e*(f.C5/f.C2);case"seconds":return e*(f.C5/f.C3);case"minutes":return e*(f.C5/f.C4);case"hours":return e;case"days":return e/(f.C6/f.C5)}},f.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(f.C6/f.C0);case"microseconds":return e*(f.C6/f.C1);case"milliseconds":return e*(f.C6/f.C2);case"seconds":return e*(f.C6/f.C3);case"minutes":return e*(f.C6/f.C4);case"hours":return e*(f.C6/f.C5);case"days":return e}},f.C6=24*(f.C5=60*(f.C4=60*(f.C3=1e3*(f.C2=1e3*(f.C1=1e3*(f.C0=1)))))),f.converter={nanoseconds:f.nanosToUnit,microseconds:f.microsToUnit,milliseconds:f.millisToUnit,seconds:f.secondsToUnit,minutes:f.minutesToUnit,hours:f.hoursToUnit,days:f.daysToUnit},f);function f(){}Fe.prototype.tick=function(){return 1e3*Date.now()},Fe.prototype.currentMillis=function(){return Date.now()},Fe.instance=new Fe;var Le=Fe;function Fe(){}Ve.prototype.get=function(e,t){return t};var je=Ve;function Ve(){}He.prototype.get=function(e,t){e=this.parameters.get(e);return!a.isNullOrUndefined(e)&&(a.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var ze=He;function He(e){this.parameters=e}var Be=s.log;function Ge(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||Be.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function Ke(e,t){if(!a.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=Ge(e,i[n]);if(a.isNullOrUndefined(o))return;r.push(o)}return r}}Ye.of=function(e,t){return new Ye(e,t)};var Je=Ye;function Ye(e,t){this.value=e,this.reason=t}qe.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},qe.of=function(e,t,r){return new qe(t,r,e)};var $e=qe;function qe(e,t,r){this.inAppMessage=e,this.message=t,this.reason=r}We.of=function(e,t,r){return new We(e,t,r=void 0===r?new je:r)},We.prototype.get=function(e,t){return this.config.get(e,t)};var Xe=We;function We(e,t,r){this.variation=e,this.reason=t,this.config=r}Qe.on=function(e,t){return new Qe(!0,e,t=void 0===t?new je:t)},Qe.off=function(e,t){return new Qe(!1,e,t=void 0===t?new je:t)},Qe.prototype.get=function(e,t){return this.config.get(e,t)};var Ze=Qe;function Qe(e,t,r){this.isOn=e,this.reason=t,this.config=r}tt.prototype.get=function(e,t){return t};var et=tt;function tt(){}nt.fromJson=function(e){return new nt(e.id,new ze(p.associate(e.parameters,function(e){return[e.key,e.value]})))},nt.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}};var rt=nt;function nt(e,t){this.id=e,this.config=t}h.SDK_NOT_READY="SDK_NOT_READY",h.EXCEPTION="EXCEPTION",h.INVALID_INPUT="INVALID_INPUT",h.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",h.TYPE_MISMATCH="TYPE_MISMATCH",h.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",h.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",h.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",h.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",h.OVERRIDDEN="OVERRIDDEN",h.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",h.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",h.VARIATION_DROPPED="VARIATION_DROPPED",h.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",h.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",h.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",h.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",h.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",h.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",h.TARGET_RULE_MATCH="TARGET_RULE_MATCH",h.DEFAULT_RULE="DEFAULT_RULE",h.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",h.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",h.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",h.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",h.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",h.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",h.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",h.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET";var d=h;function h(){}ot.fromJson=function(e,t){var r=ot.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new st(e.id,e.key,"DROPPED"===e.status,e.parameterConfigurationId)}),i=p.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),o=p.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return St.fromJson(e,tr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return Et.fromJson(e,tr.PROPERTY)}),a=Zr.fromJson(t.execution.targetUrls),u=ot.experimentImplementationTypeOrNull(t.implementationType),c=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return St.fromJson(e,tr.PROPERTY)}),l=Nt.fromJson(t.execution.defaultRule);return r&&u&&l&&new ot(t.id,t.key,e,t.identifierType,r,t.version,t.execution.version,n,i,o,s,a,c,l,t.containerId,u,t.winnerVariationId)},ot.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void Be.debug("Unsupported status [".concat(e,"]"))}},ot.experimentImplementationTypeOrNull=function(e){switch(e){case"DEFAULT":return"DEFAULT";case"SPLIT_URL":return"SPLIT_URL";default:return void Be.debug("Unsupported implementationType [".concat(e,"]"))}},ot.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},ot.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},ot.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})};var it=ot;function ot(e,t,r,n,i,o,s,a,u,c,l,p,f,d,h,v,y){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=i,this.version=o,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.splitUrlTargets=p,this.targetRules=f,this.defaultRule=d,this.containerId=h,this.implementationType=v,this.winnerVariationId=y}var st=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},at=(ut.fromJson=function(e){return new ut(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new ct(t,r,e)}))},ut);function ut(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}lt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var ct=lt;function lt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}ft.fromJson=function(e){return new ft(e.id,e.key)};var pt=ft;function ft(e,t){this.id=e,this.key=t}ht.ID="$id",ht.USER="$userId",ht.DEVICE="$deviceId",ht.SESSION="$sessionId",ht.HACKLE_DEVICE="$hackleDeviceId";var dt=ht;function ht(){}function vt(e){var t=new yt;return t.addIdentifiers(e.identifiers||{}),t.add(dt.ID,e.id),t.add(dt.DEVICE,e.deviceId),a.isNotNullOrUndefined(e.userId)&&t.add(dt.USER,e.userId),t.build()}mt.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},mt.prototype.add=function(e,t){var r=Ce.sanitizeValue(t);return Ce.isValidType(e)&&r?this.identifiers[e]=t:Be.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},mt.prototype.build=function(){return this.identifiers};var yt=mt;function mt(){this.identifiers={}}function gt(e){var t,r={};return r.id=null!=(t=Ce.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=Ce.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=Ce.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Me.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=Ce.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}wt.fromJson=function(e,t){return new wt(p.mapNotNullOrUndefined(e.conditions,function(e){return bt.fromJson(e,t)}))},wt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var Et=wt;function wt(e){this.conditions=e}Tt.fromJson=function(e,t){var r=_t.fromJson(e.key);if(r&&t.supports(r.type))return(t=At.fromJson(e.match))&&new Tt(r,t)},Tt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var bt=Tt;function Tt(e,t){this.key=e,this.match=t}It.fromJson=function(e){var t=Ge(Qt,e.type);return t&&new It(t,e.name)},It.prototype.toJson=function(){return{type:this.type,name:this.name}};var _t=It;function It(e,t){this.type=e,this.name=t}Ot.fromJson=function(e){var t=Ge(qt,e.type),r=Ge(Wt,e.operator),n=Ge(Xt,e.valueType);return t&&r&&n&&new Ot(t,r,n,e.values)},Ot.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var At=Ot;function Ot(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}Rt.fromJson=function(e){var t=Ge(Zt,e.type);return t&&new Rt(t,e.variationId,e.bucketId)};var Nt=Rt;function Rt(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}Ct.fromJson=function(e,t){t=Et.fromJson(e.target,t),e=Nt.fromJson(e.action);return t&&e&&new Ct(t,e)};var St=Ct;function Ct(e,t){this.target=e,this.action=t}kt.fromJson=function(e){var t=Ge(er,e.type);return t&&new kt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return Et.fromJson(e,tr.SEGMENT)}))};var xt=kt;function kt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}Pt.fromJson=function(e){return new Pt(e.id,e.bucketId,e.groups.map(function(e){return Ut.fromJson(e)}))},Pt.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var Mt=Pt;function Pt(e,t,r){this.id=e,this.bucketId=t,this.groups=r}Dt.fromJson=function(e){return new Dt(e.id,e.experiments)};var Ut=Dt;function Dt(e,t){this.id=e,this.experiments=t}Ft.fromJson=function(e){var t=Ge(Xt,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return jt.fromJson(e,tr.PROPERTY)}),n=zt.fromJson(e.defaultValue);return t&&new Ft(e.id,e.key,t,e.identifierType,r,n)};var Lt=Ft;function Ft(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}Vt.fromJson=function(e,t){t=Et.fromJson(e.target,t);return t&&new Vt(e.key,e.name,t,e.bucketId,zt.fromJson(e.value))};var jt=Vt;function Vt(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}Ht.fromJson=function(e){return new Ht(e.id,e.value)};var zt=Ht;function Ht(e,t){this.id=e,this.rawValue=t}Gt.tryParse=function(e){var t,r,n,i,e=Gt.regExp.exec(e);if(e)return e[0],t=e[1],r=e[2],r=void 0===r?"0":r,n=e[3],n=void 0===n?"0":n,i=e[4],e=e[5],new Gt(new Kt(parseInt(t,10),parseInt(r,10),parseInt(n,10)),Yt.parse(i),Yt.parse(e))},Gt.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},Gt.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},Gt.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},Gt.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},Gt.prototype.isLessThan=function(e){return this.compareTo(e)<0},Gt.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},Gt.regExp=/^(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;var Bt=Gt;function Gt(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}Jt.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var Kt=Jt;function Jt(e,t,r){this.major=e,this.minor=t,this.patch=r}$t.parse=function(e){return e?new $t(e.split(".")):$t.EMPTY},$t.prototype.isEmpty=function(){return 0===this.identifiers.length},$t.prototype.isNotEmpty=function(){return!this.isEmpty()},$t.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},$t.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=$t.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},$t.compareIdentifiers=function(e,t){return $t.numericIdentifierRegExp.test(e)&&$t.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},$t.EMPTY=new $t([]),$t.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var Yt=$t;function $t(e){this.identifiers=e}var qt=["MATCH","NOT_MATCH"],Xt=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Wt=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],Zt=["VARIATION","BUCKET"],Qt=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"],er=["USER_ID","USER_PROPERTY"],tr=(rr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},rr.IDENTIFIER=new rr("SEGMENT"),rr.PROPERTY=new rr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),rr.SEGMENT=new rr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),rr);function rr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var nr=["ACTIVE","DRAFT","PAUSE"],ir=["WEB","ANDROID","IOS"],or=["IMMEDIATE","CUSTOM"],sr=["MODAL"],ar=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY"],ur=["VERTICAL","HORIZONTAL"],cr=["CLICK"],lr=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],pr=(fr.fromJson=function(e){var t,r=Ge(nr,e.status);if(!a.isNullOrUndefined(r)){switch(Ge(or,e.timeUnit)){case"IMMEDIATE":t=new dr;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new vr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=Cr.fromJson(e.messageContext);if(!a.isNullOrUndefined(o))return n=e.eventTriggerRules.map(gr.fromJson),i=wr.fromJson(e.eventFrequencyCap),new fr(e.id,e.key,r,t,new mr(n,i),Or.fromJson(e.targetContext),o)}},fr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},fr);function fr(e,t,r,n,i,o,s){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s}hr.prototype.within=function(e){return!0};var dr=hr;function hr(){this.type="IMMEDIATE"}yr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var vr=yr;function yr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var mr=function(e,t){this.rules=e,this.frequencyCap=t},gr=(Er.fromJson=function(e){return new Er(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return Et.fromJson(e,tr.PROPERTY)}))},Er);function Er(e,t){this.eventKey=e,this.targets=t}br.fromJson=function(e){return e?new br(e.identifiers.map(Tr.fromJson),Ir.fromJson(e.duration)):null};var wr=br;function br(e,t){this.identifierCaps=e,this.durationCap=t}_r.fromJson=function(e){return new _r(e.identifierType,e.countPerIdentifier)};var Tr=_r;function _r(e,t){this.identifierType=e,this.count=t}Ar.fromJson=function(e){if(!e)return null;var t=Ge(Ue,e.durationUnit.timeUnit);return t?new Ar(De.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Ir=Ar;function Ar(e,t){this.durationMillis=e,this.count=t}Nr.fromJson=function(e){return new Nr(e.overrides.map(Rr.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return Et.fromJson(e,tr.PROPERTY)}))};var Or=Nr;function Nr(e,t){this.overrides=e,this.targets=t}Sr.fromJson=function(e){return new Sr(e.identifierType,e.identifiers)};var Rr=Sr;function Sr(e,t){this.identifierType=e,this.identifiers=t}xr.fromJson=function(e){var t=Ke(ir,e.platformTypes);if(!a.isNullOrUndefined(t)){var r=Ke(ur,e.orientations);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.messages,kr.fromJson);if(!a.isNullOrUndefined(n))return new xr(e.defaultLang,t,r,n)}}};var Cr=xr;function xr(e,t,r,n){this.defaultLang=e,this.platformTypes=t,this.orientations=r,this.messages=n}Mr.fromJson=function(e){var t=Pr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=p.mapOrUndefined(e.images,Dr.fromJson);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.buttons,Br.fromJson);if(!a.isNullOrUndefined(n)){var i=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(i=Br.fromJson2(e.closeButton),!a.isNullOrUndefined(i)))return new Mr(e.lang,t,r,e.text?Fr.fromJson(e.text):void 0,n,i,new Jr(e.background.color))}}}},Mr.prototype.toJson=function(){var e;return{lang:this.lang,layout:{layoutType:this.layout.layoutType,displayType:this.layout.displayType},images:this.images.map(function(e){return e.toJson()}),text:null!=(e=null==(e=this.text)?void 0:e.toJson())?e:null,closeButton:null!=(e=null==(e=this.closeButton)?void 0:e.toCloseButtonJson())?e:null,buttons:this.buttons.map(function(e){return e.toJson()}),background:{color:this.background.color}}};var kr=Mr;function Mr(e,t,r,n,i,o,s){this.lang=e,this.layout=t,this.images=r,this.text=n,this.buttons=i,this.closeButton=o,this.background=s}Ur.fromJson=function(e){var t=Ge(ar,e.layoutType),e=Ge(sr,e.displayType);if(!a.isNullOrUndefined(e)&&!a.isNullOrUndefined(t))return new Ur(e,t)};var Pr=Ur;function Ur(e,t){this.displayType=e,this.layoutType=t}Lr.fromJson=function(e){var t=Ge(ur,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=Yr.fromJson(e.action),!a.isNullOrUndefined(r)))return new Lr(t,e.imagePath,r)}},Lr.prototype.toJson=function(){var e;return{orientation:this.orientation,imagePath:this.imagePath,action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null}};var Dr=Lr;function Lr(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}jr.fromJson=function(e){return new jr(Vr.fromJson(e.title),Vr.fromJson(e.body))},jr.prototype.toJson=function(){return{title:{text:this.title.text,style:{textColor:this.title.style.color}},body:{text:this.body.text,style:{textColor:this.body.style.color}}}};var Fr=jr;function jr(e,t){this.title=e,this.body=t}zr.fromJson=function(e){return new zr(e.text,new Hr(e.style.textColor))};var Vr=zr;function zr(e,t){this.text=e,this.style=t}var Hr=function(e){this.color=e},Br=(Gr.fromJson=function(e){var t=Yr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Gr(e.text,new Kr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Gr.fromJson2=function(e){var t=Yr.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Gr("✕",new Kr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Gr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},Gr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Gr);function Gr(e,t,r){this.text=e,this.style=t,this.action=r}var Kr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Jr=function(e){this.color=e},Yr=($r.fromJson=function(e){var t=Ge(cr,e.behavior);if(!a.isNullOrUndefined(t)){var r=Ge(lr,e.type);if(!a.isNullOrUndefined(r))return new $r(t,r,null!=(t=e.value)?t:void 0)}},$r.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},$r);function $r(e,t,r){this.behavior=e,this.type=t,this.value=r}var qr=function(e){this.id=e},Xr=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Wr.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new Wr(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},Wr);function Wr(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}Qr.fromJson=function(e){if(null!==e)return new Qr(p.mapNotNullOrUndefined(e.match,function(e){return Et.fromJson(e,tr.PROPERTY)}),p.mapNotNullOrUndefined(e.notMatch,function(e){return Et.fromJson(e,tr.PROPERTY)}))};var Zr=Qr;function Qr(e,t){this.includeTargets=e,this.excludeTargets=t}var en="X-HACKLE-SDK-KEY",tn="X-HACKLE-SDK-NAME",rn="X-HACKLE-SDK-VERSION",nn=100,on=6e4,sn=500,an=3650,un="_hackle_hid",cn="_hackle_id",ln="hackle-repository-storage",pn="_hackle_session_id",fn="_hackle_last_event_ts",dn="_hackle_uid",hn="_hackle_did",vn="_hackle_mkt",yn="hackle-manual-override_ab",mn="hackle-manual-override_ff",gn="hackle-iam-hide",En="hackle-iam-impression",wn="hackle-split-url-redirected",bn=1/86400*3,Tn="hackle-workspace-config",_n=(In.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},In.prototype.tag=function(e,t){return this._tags[e]=t,this},In.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},In);function In(e){this.name=e,this._tags={},this.name=e}On.start=function(e){return new On(e=void 0===e?On.defaultClock:e)},On.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},On.defaultClock=new Le;var An=On;function On(e){this._clock=e,this.startTime=this._clock.tick()}Rn.prototype.tags=function(e){var r=this;return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r._tags[t]=e}),this},Rn.prototype.tag=function(e,t){return this._tags[e]=t,this},Rn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Nn=Rn;function Rn(e){this.name=e,this._tags={}}Object.defineProperty(Cn.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var Sn=Cn;function Cn(e,t){this.valueSupplier=t,this.field=e}function xn(e,t){return e.name===t.name&&Ce.isEquals(e.tags,t.tags)}Mn.prototype.count=function(){return this.counterValue},Mn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},Mn.prototype.measure=function(){return[new Sn("count",this.count.bind(this))]};var kn=Mn;function Mn(e){this.counterValue=0,this.id=e}Un.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new kn(this.id),e},Un.prototype.count=function(){return this.currentCounter.count()},Un.prototype.increment=function(e){this.currentCounter.increment(e)},Un.prototype.measure=function(){return[new Sn("count",this.count.bind(this))]};var Pn=Un;function Un(e){this.id=e,this.currentCounter=new kn(e)}Ln.prototype.values=function(){return Array.from(this.data.values())},Ln.prototype.keys=function(){return Array.from(this.data.keys())},Ln.prototype.get=function(t){var r=this,e=this.keys().find(function(e){return r.compareFn(e,t)});return e?this.data.get(e):void 0},Ln.prototype.has=function(e){return void 0!==this.get(e)},Ln.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},Ln.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},Ln.prototype.forEach=function(e){this.data.forEach(e)},Ln.prototype.filter=function(e){for(var t=new Ln(this.compareFn),r=0,n=this.entries();r<n.length;r++){var i=n[r];e(i[0],i[1])&&t.add(i[0],i[1])}return t},Ln.prototype.entries=function(){return Array.from(this.data.entries())};var Dn=Ln;function Ln(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(Fn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Fn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Fn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Fn.prototype.counter=function(e,t){return void 0===t&&(t={}),new Nn(e).tags(t).register(this)},Fn.prototype.timer=function(e,t){return void 0===t&&(t={}),new _n(e).tags(t).register(this)},Fn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Fn.prototype.getOrCreateMetric=function(e,t){var r,n=this._metrics.get(e);return n?r=n:(r=t(e),this._metrics.add(e,r)),r},Fn.prototype.close=function(){};e=Fn;function Fn(){this.id=H(),this.name="MetricRegistry",this._metrics=new Dn(xn)}Ne(Vn,jn=e),Vn.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),s.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},Vn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},Vn.prototype.close=function(){this.stop()};var jn,r=Vn;function Vn(e,t){var r=jn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}Hn.prototype.count=function(){return this._count},Hn.prototype.totalTime=function(e){return De.nanosToUnit(this._total,e)},Hn.prototype.max=function(e){return De.nanosToUnit(this._max,e)},Hn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Hn.prototype.record=function(e,t){e<0||(t=De.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},Hn.prototype.measure=function(){var e=this;return[new Sn("count",this.count.bind(this)),new Sn("total",function(){return e.totalTime("milliseconds")}),new Sn("max",function(){return e.max("milliseconds")}),new Sn("mean",function(){return e.mean("milliseconds")})]};var zn=Hn;function Hn(e){this._count=0,this._total=0,this._max=0,this.id=e}Gn.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new zn(this.id),e},Gn.prototype.count=function(){return this.currentTimer.count()},Gn.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},Gn.prototype.max=function(e){return this.currentTimer.max(e)},Gn.prototype.record=function(e,t){this.currentTimer.record(e,t)},Gn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},Gn.prototype.measure=function(){var e=this;return[new Sn("count",this.count.bind(this)),new Sn("total",function(){return e.totalTime("milliseconds")}),new Sn("max",function(){return e.max("milliseconds")}),new Sn("mean",function(){return e.mean("milliseconds")})]};var Bn=Gn;function Gn(e){this.id=e,this.currentTimer=new zn(e)}Ne(Jn,Kn=r),Jn.prototype.createCounter=function(e){return new Pn(e)},Jn.prototype.createTimer=function(e){return new Bn(e)},Jn.prototype.publish=function(e){void 0===e&&(e=!1);var t=this.metrics.reduce(function(e,t){return void 0===(r=t).flush||"function"!=typeof r.flush?e:e.concat(t.flush());var r},[]);this.flushMetrics(t,e)},Jn.prototype.close=function(){Kn.prototype.close.call(this)};var Kn,B=Jn;function Jn(e,t){return Kn.call(this,e,t)||this}$n.prototype.count=function(){return 0},$n.prototype.increment=function(e){},$n.prototype.measure=function(){return[new Sn("count",this.count.bind(this))]};var Yn=$n;function $n(e){this.id=e}Object.defineProperty(Xn.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),Xn.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},Xn.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},Xn.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},Xn.prototype.measure=function(){return[new Sn("count",this.count.bind(this))]};var qn=Xn;function Xn(e){this._counters=new Dn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new Yn(e)}Zn.prototype.measure=function(){var e=this;return[new Sn("count",this.count.bind(this)),new Sn("total",function(){return e.totalTime("milliseconds")}),new Sn("max",function(){return e.max("milliseconds")}),new Sn("mean",function(){return e.mean("milliseconds")})]},Zn.prototype.count=function(){return 0},Zn.prototype.totalTime=function(e){return 0},Zn.prototype.max=function(e){return 0},Zn.prototype.mean=function(e){return 0},Zn.prototype.record=function(e,t){};var Wn=Zn;function Zn(e){this.id=e}Object.defineProperty(ei.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),ei.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},ei.prototype.max=function(e){return this.firstTimer.max(e)},ei.prototype.mean=function(e){return this.firstTimer.mean(e)},ei.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(ei.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),ei.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},ei.prototype.count=function(){return this.firstTimer.count()},ei.prototype.measure=function(){var e=this;return[new Sn("count",this.count.bind(this)),new Sn("total",function(){return e.totalTime("milliseconds")}),new Sn("max",function(){return e.max("milliseconds")}),new Sn("mean",function(){return e.mean("milliseconds")})]};var Qn=ei;function ei(e){this._timers=new Dn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new Wn(e)}Ne(ri,ti=e),ri.prototype.createCounter=function(e){e=new qn(e);return this.addRegistry(e),e},ri.prototype.createTimer=function(e){e=new Qn(e);return this.addRegistry(e),e},ri.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},ri.prototype.add=function(r){r instanceof ri||this.registries.has(r)||(this.registries.add(r),this.metrics.forEach(function(e){var t;void 0!==(t=e).add&&"function"==typeof t.add&&e.add(r)}))},ri.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var ti,o=ri;function ri(){var e=null!==ti&&ti.apply(this,arguments)||this;return e.registries=new Dn(function(e,t){return e.id===t.id}),e}ii.counter=function(e,t){return ii.globalRegistry.counter(e,t)},ii.timer=function(e,t){return ii.globalRegistry.timer(e,t)},ii.addRegistry=function(e){ii.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},ii.globalRegistry=new o;var ni=ii;function ii(){}si.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()};var oi=si;function si(){}ui.builder=function(){return new ci},ui.get=function(e){return ui.builder().url(e).build()},ui.prototype.toBuilder=function(){return new ci(this)};var ai=ui;function ui(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}li.prototype.url=function(e){return this._url=e,this},li.prototype.method=function(e){return this._method=e,this},li.prototype.body=function(e){return this._body=e,this},li.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},li.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},li.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new ai(this._url,this._method,this._body,this._headers.build(),e)};var ci=li;function li(e){var t;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(t=null==e?void 0:e.method)?t:"GET",this._body=null!=(t=null==e?void 0:e.body)?t:null,this._headers=null!=(t=null==(t=null==e?void 0:e.headers)?void 0:t.toBuilder())?t:di.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}fi.ok=function(e,t){return fi.of(200,e,t)},fi.of=function(e,t,r){return new fi(e,null!=t?t:null,null!=r?r:di.empty())},fi.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},fi.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},fi.prototype.isNotModified=function(){return 304===this.statusCode};var pi=fi;function fi(e,t,r){this.statusCode=e,this.body=t,this.headers=r}hi.empty=function(){return new hi(new Map)},hi.builder=function(){return new vi(new Map)},hi.prototype.get=function(e){for(var t=0,r=Array.from(this.headers.entries());t<r.length;t++){var n=r[t],i=n[0],n=n[1];if(oi.equalsIgnoreCase(i,e))return n}return null},hi.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},hi.prototype.raw=function(){return Array.from(this.headers.entries()).reduce(function(e,t){var r=t[0],t=t[1];return e[r]=t,e},{})},hi.prototype.toBuilder=function(){return new vi(this.headers)},hi.IF_MODIFIED_SINCE="If-Modified-Since",hi.LAST_MODIFIED="Last-Modified";var di=hi;function hi(e){this.headers=e}yi.prototype.add=function(e,t){return this.headers.set(e,t),this},yi.prototype.build=function(){return new di(this.headers)};var vi=yi;function yi(e){this.headers=e}Ne(Ei,mi=B),Ei.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),nn).forEach(function(e){r.dispatch(e,t)})},Ei.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Ei.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return s.log.debug("Failed to flushing metrics: ".concat(e))})},Ei.prototype.createRequest=function(e){return ai.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Ei.prototype.execute=function(e,t){return(t?this.shutdownTransport:this.transport).send(e)},Ei.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:a.fromMap(p.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Ei.prototype.createCounter=function(e){return new Pn(e)},Ei.prototype.createTimer=function(e){return new Bn(e)},Ei.prototype.close=function(){mi.prototype.close.call(this)};var mi,gi=Ei;function Ei(e,t,r,n,i){n=mi.call(this,n,i)||this;return n.url=e,n.transport=t,n.shutdownTransport=r,n.start(),n}bi.experiment=function(e,t,r){t=ni.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},bi.featureFlag=function(e,t,r){t=ni.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},bi.remoteConfig=function(e,t,r){t=ni.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},bi.inAppMessage=function(e,t,r){t=ni.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)};var wi=bi;function bi(){}_i.record=function(e,t,r){e=ni.timer("api.call",{operation:e,success:_i.success(r)});t.stop(e)},_i.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var Ti=_i;function _i(){}Ai.decide=function(e,t,r,n){if(a.isNullOrUndefined(r))return this.decision(e,t,"NULL",r,n);switch(typeof r){case"string":return this.decision(e,t,"STRING",r,n);case"number":return this.decision(e,t,"NUMBER",r,n);case"boolean":return this.decision(e,t,"BOOLEAN",r,n);default:return this.decision(e,t,"UNKNOWN",r,n)}},Ai.decision=function(e,t,r,n,i){return a.isNullOrUndefined(t)?Je.of(n,d.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Ii=Ai;function Ai(){}var Oi=s.log,Ni=(Ri.prototype.get=function(t,r){var n,e=An.start();try{n=this.decide(t,r)}catch(e){Oi.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=Je.of(r,d.EXCEPTION)}return wi.remoteConfig(e,t,n),n.value},Ri.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Ii.decide(this.core,e,t,r)},Ri);function Ri(e,t,r){this.core=e,this.userManager=t,this.user=r}xi.prototype.contains=function(e){return this._properties.has(e)},xi.prototype.remove=function(e){var r=this;return e instanceof Map&&e.forEach(function(e,t){r.remove(t)}),"string"==typeof e&&this._properties.delete(e),this},xi.prototype.compute=function(e,t){var r=this._properties.get(e),t=t(r);null!==t?this.add(e,t):null===r&&!this.contains(e)||this.remove(e)},xi.prototype.add=function(e,t,r){if((r=void 0===r?!1:r)&&this.contains(e))return this;if(this._properties.size>=this.MAX_PROPERTIES_COUNT)return this;if("string"==typeof e&&e.length>this.MAX_PROPERTY_KEY_LENGTH)return this;r=Me.sanitizeValue(e,t);return a.isNullOrUndefined(r)||this._properties.set(e,r),this},xi.prototype.addProperties=function(e,r){var n=this;return void 0===r&&(r=!1),e.forEach(function(e,t){n.add(t,e,r)}),this},xi.prototype.build=function(){return this._properties};var Si,Ci=xi;function xi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(i=Si=Si||{}).SET="$set",i.SET_ONCE="$setOnce",i.UNSET="$unset",i.INCREMENT="$increment",i.APPEND="$append",i.APPEND_ONCE="$appendOnce",i.PREPEND="$prepend",i.PREPEND_ONCE="$prependOnce",i.REMOVE="$remove",i.CLEAR_ALL="$clearAll";Mi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Ci).addProperties(e).addProperties(t).build()};var ki=Mi;function Mi(){}Ui.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Ci).addProperties(e).addProperties(t,!0).build()};var Pi=Ui;function Ui(){}Li.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new Ci).addProperties(e).remove(t).build()};var Di=Li;function Li(){}ji.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new Ci;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},ji.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var Fi=ji;function ji(){}Vi.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new Ci;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},Vi.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},Vi.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},Vi.prototype.contains=function(e,t){return e.includes(t)},Vi.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Re([e],t,!0)},Vi.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Re(Re([],e,!0),[t],!1)};t=Vi;function Vi(){}Ne(Bi,zi=t),Bi.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var zi,Hi=Bi;function Bi(){return null!==zi&&zi.apply(this,arguments)||this}Ne(Ji,Gi=t),Ji.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},Ji.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var Gi,Ki=Ji;function Ji(){return null!==Gi&&Gi.apply(this,arguments)||this}Ne(qi,Yi=t),qi.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var Yi,$i=qi;function qi(){return null!==Yi&&Yi.apply(this,arguments)||this}Ne(Zi,Xi=t),Zi.prototype.operateArray=function(e,t){var r=this;return t.reduce(this.appendOnce.bind(this),[]).reduceRight(function(e,t){return r.prependOnce.bind(r)(t,e)},e)},Zi.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},Zi.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var Xi,Wi=Zi;function Zi(){return null!==Xi&&Xi.apply(this,arguments)||this}Ne(to,Qi=t),to.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},to.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var Qi,eo=to;function to(){return null!==Qi&&Qi.apply(this,arguments)||this}no.prototype.operate=function(e,t){return new Map};var ro=no;function no(){}oo.get=function(e){switch(e){case Si.SET:return new ki;case Si.SET_ONCE:return new Pi;case Si.UNSET:return new Di;case Si.INCREMENT:return new Fi;case Si.APPEND:return new Hi;case Si.APPEND_ONCE:return new Ki;case Si.PREPEND:return new $i;case Si.PREPEND_ONCE:return new Wi;case Si.CLEAR_ALL:return new ro;case Si.REMOVE:return new eo}};var io=oo;function oo(){}ao.prototype.set=function(e,t){return this.add(Si.SET,e,t)},ao.prototype.setOnce=function(e,t){return this.add(Si.SET_ONCE,e,t)},ao.prototype.unset=function(e){return this.add(Si.UNSET,e,"-")},ao.prototype.increment=function(e,t){return this.add(Si.INCREMENT,e,t)},ao.prototype.append=function(e,t){return this.add(Si.APPEND,e,t)},ao.prototype.appendOnce=function(e,t){return this.add(Si.APPEND_ONCE,e,t)},ao.prototype.prepend=function(e,t){return this.add(Si.PREPEND,e,t)},ao.prototype.prependOnce=function(e,t){return this.add(Si.PREPEND_ONCE,e,t)},ao.prototype.remove=function(e,t){return this.add(Si.REMOVE,e,t)},ao.prototype.clearAll=function(){return this.add(Si.CLEAR_ALL,"clearAll","-")},ao.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new uo(new Map(e))},ao.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},ao.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new Ci);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var so=ao;function ao(){this.operations=new Map}co.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=io.get(t).operate(r,e)}),r},co.prototype.toEvent=function(){var i={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),Me.sanitize(a.fromMap(e))),r))}),i},co.prototype.toRecord=function(){var n={};return this.operations.forEach(function(e,t){var r={};e.forEach(function(e,t){r[t]=e}),n[t]=r}),n};var uo=co;function co(e){this.operations=null!=e?e:new Map}po.timeout=function(r,n){return new Promise(function(e,t){setTimeout(function(){return t(new Error("timeout (".concat(n,"ms)")))},n),r.then(e,t)})};var lo=po;function po(){}var fo=s.log,ho=(vo.prototype.initialize=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),fo.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),fo.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),fo.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},vo.prototype.getSessionId=function(){return this.sessionManager.sessionId},vo.prototype.getUser=function(){return this.userManager.currentUser},vo.prototype.setUser=function(e){try{var t=gt(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(fo.warn("invalid user"),Promise.resolve())}catch(e){return fo.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},vo.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=Ce.sanitizeValue(e);if(!t)return fo.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return fo.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},vo.prototype.setDeviceId=function(e){try{var t=Ce.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(fo.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return fo.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},vo.prototype.setUserProperty=function(e,t){e=(new so).set(e,t).build();return this.updateUserProperties(e)},vo.prototype.setUserProperties=function(e){try{var t=Me.sanitize(e),r=new so;return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){return fo.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},vo.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),Promise.resolve()}catch(e){return fo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},vo.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new so).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return fo.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},vo.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},vo.prototype.variationDetail=function(r,n,e){var i=e||"A",e=An.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return fo.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),Xe.of(i,d.EXCEPTION)}}(this);return wi.experiment(e,r,t),t},vo.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},vo.prototype.featureFlagDetail=function(r,n){var e=An.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return fo.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),Ze.off(d.EXCEPTION)}}(this);return wi.featureFlag(e,r,t),t},vo.prototype.track=function(e,t){try{fo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){fo.error("Unexpected exception while tracking event: ".concat(e))}},vo.prototype.trackPageView=function(e){fo.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},vo.prototype.remoteConfig=function(e){return new Ni(this.core,this.userManager,e)},vo.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},vo.prototype.onInitialized=function(r){var n;return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(this.initialized)return[2,{success:!0}];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,lo.timeout(this.initialization,null!=(n=null==r?void 0:r.timeout)?n:3e3)];case 2:return e.sent(),[2,{success:!0}];case 3:return t=e.sent(),fo.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},vo.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},vo.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(fo.debug("UserExplorer opened."),ni.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):fo.error("UserExplorer is not provided")},vo.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():fo.warn("There is no active HackleDevtools.")},vo.prototype.close=function(){fo.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},vo);function vo(e,t,r,n,i){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.devTools=i,this.initialized=!1,this.initialize=this.initialize.bind(this),this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.close=this.close.bind(this),this.initialization=this.initialize()}var yo=s.log,mo=(go.prototype.get=function(t,r){var e=typeof r;try{var n={command:"remoteConfig",parameters:{defaultValue:r,key:t,valueType:e,user:this.user}},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(e){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(e){return yo.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},go);function go(e,t){this.invocationProcessor=e,this.user=t}wo.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},wo.prototype.resolve=function(e){e=JSON.parse(null!=e?e:"");if(!this.isInvocatorResponse(e))throw new Error("invalid invocator response data");if(e.success)return{message:e.message,success:e.success,data:e.data};throw new Error("failed response")};var Eo=wo;function wo(){}To.extractDomain=function(e){var t=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i),e.match(t));return r?r[0]:""},To.prototype.getItem=function(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},To.prototype.getAllItem=function(e){var t=document.cookie.split("; ").map(function(e){return e.split("=")}),r=null==e?void 0:e.keyPrefix;return r?t.filter(function(e){var t=e[0];return e[1],t.startsWith(r)}):t},To.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=To.extractDomain(document.location.hostname))?"; domain=."+a:""),r.days&&((a=new Date).setTime(a.getTime()+24*r.days*60*60*1e3),i="; expires="+a.toUTCString()),r.sameSite&&(s="; SameSite=".concat(r.sameSite)),r.isSecure&&(o+="; secure"),e+"="+encodeURIComponent(t)+i+"; path=/"+n+s+o);return document.cookie=a},To.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},To.prototype.getOptions=function(){return this.options},To.getInstance=function(e){return void 0===e&&(e={days:an,isCrossSubdomain:!0}),To.storage=To.storage?To.storage:new To(e)};var bo=To;function To(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Io.initialize=function(){bo.getInstance().getItem(un)||No()};var _o=Io;function Io(){}function Ao(){var e=bo.getInstance(),t=e.getItem(cn);if(t)return t;t=e.getItem(un);return t||No()}function Oo(){bo.getInstance().removeItem(cn)}function No(){var e=H();return bo.getInstance().setItem(un,e),e}So.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},So.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var Ro=So;function So(e){this.invocator=e}var Co=s.log;v.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:Ao()}catch(e){return Co.error("Unexpected exception while get sessionId: ".concat(e)),Ao()}},v.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=gt(t))?e:this.defaultUser()}catch(e){return Co.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},v.prototype.setUser=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=gt(n)))return Co.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){Co.error("Unexpected exception while set user: ".concat(e))}return[2]})})},v.prototype.setUserId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Ce.sanitizeValue(n)))return Co.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){Co.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},v.prototype.setDeviceId=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Ce.sanitizeValue(n)))return Co.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){Co.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},v.prototype.setUserProperty=function(r,n){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){Co.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},v.prototype.setUserProperties=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{t=Me.sanitize(n),r=new so,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){Co.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},v.prototype.updateUserProperties=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){Co.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},v.prototype.resetUser=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){Co.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},v.prototype.variation=function(t,e,r){void 0===r&&(r="A");try{var n={command:"variation",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(e){return Co.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),r}},v.prototype.variationDetail=function(t,e,r){var n;void 0===r&&(r="A");try{var i={command:"variationDetail",parameters:{experimentKey:t,defaultVariation:r,user:this.convertUser(e)}},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return Xe.of(o.variation,o.reason,new ze(new Map(Object.entries(null!=(n=o.config.parameters)?n:{}))))}catch(e){return Co.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),Xe.of(r,d.EXCEPTION)}},v.prototype.isFeatureOn=function(t,e){try{var r={command:"isFeatureOn",parameters:{featureKey:t,user:this.convertUser(e)}},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(e){return Co.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),!1}},v.prototype.featureFlagDetail=function(t,e){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:t,user:this.convertUser(e)}},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new Ze(i.isOn,i.reason,new ze(new Map(Object.entries(null!=(r=i.config.parameters)?r:{}))))}catch(e){return Co.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),Ze.off(d.EXCEPTION)}},v.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)}};this.invocationProcessor.process(r)}catch(e){Co.error("Unexpected exception while tracking event: ".concat(e))}},v.prototype.trackPageView=function(e){Co.info("Web to app integration feature is not support 'trackPageView' method")},v.prototype.remoteConfig=function(e){return new mo(this.invocationProcessor,this.convertUser(e))},v.prototype.onReady=function(e,t){e()},v.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){Co.error("Unexpected exception while show userExplorer: ".concat(e))}},v.prototype.hideUserExplorer=function(){Co.info("Web to app integration feature is not support 'hideUserExplorer' method")},v.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},v.prototype.close=function(){Co.info("Web to app integration feature is not support 'close' method")},v.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},v.prototype.convertUser=function(e){return"string"==typeof e||e&&null!=(e=gt(e))?e:void 0},v.prototype.defaultUser=function(){return{deviceId:Ao()}};var xo=v;function v(e){this.invocationProcessor=e,this.getSessionId=this.getSessionId.bind(this),this.getUser=this.getUser.bind(this),this.setUser=this.setUser.bind(this),this.setUserId=this.setUserId.bind(this),this.setDeviceId=this.setDeviceId.bind(this),this.setUserProperty=this.setUserProperty.bind(this),this.setUserProperties=this.setUserProperties.bind(this),this.updateUserProperties=this.updateUserProperties.bind(this),this.resetUser=this.resetUser.bind(this),this.variation=this.variation.bind(this),this.variationDetail=this.variationDetail.bind(this),this.isFeatureOn=this.isFeatureOn.bind(this),this.featureFlagDetail=this.featureFlagDetail.bind(this),this.track=this.track.bind(this),this.trackPageView=this.trackPageView.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.close=this.close.bind(this)}function ko(e){return e&&e.Math==Math&&e}function Mo(e){try{return!!e()}catch(e){return!0}}function Po(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function Uo(e){return gs(ms(e),8,-1)}function Do(e){if(null==e)throw Ts("Can't call method on "+e);return e}function Lo(e){return _s(Is(e))}function Fo(e){return"function"==typeof e}function jo(e){return"object"==typeof e?null!==e:As(e)}function Vo(e,t){return arguments.length<2?(r=Os[e],Ns(r)?r:void 0):Os[e]&&Os[e][t];var r}function zo(e){try{return Ls(e)}catch(e){return"Object"}}function Ho(e){if(Fs(e))return e;throw Vs(js(e)+" is not a function")}function Bo(e,t){return null==(e=e[t])?void 0:zs(e)}function Go(t,r){try{Ys(Js,t,{value:r,configurable:!0,writable:!0})}catch(e){Js[t]=r}return r}function Ko(e){return Zs(Ws(e))}function Jo(e){return"Symbol("+(void 0===e?"":e)+")_"+ia(++ra+na,36)}function Yo(e){var t;return sa(ca,e)&&(aa||"string"==typeof ca[e])||(t="Symbol."+e,aa&&sa(la,e)?ca[e]=la[e]:ca[e]=(ua&&pa?pa:fa)(t)),ca[e]}function $o(e){return e=wa(e,"string"),ba(e)?e:e+""}function qo(e){return _a?Ta.createElement(e):{}}function Xo(e){if(Ma(e))return e;throw Ua(Pa(e)+" is not an object")}function Wo(e){return Xa[e]||(Xa[e]=qa(e))}function Zo(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(vu(r)&&mu(r,o,n),n.global)i?e[t]=r:gu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:yu.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Qo(e){return(e=+e)!=e||0==e?0:bu(e)}function es(e,t){return(e=Tu(e))<0?_u(e+t,0):Iu(e,t)}function y(e){return Nu(e.length)}function ts(a){return function(e,t,r){var n,i=Ru(e),o=Cu(i),s=Su(r,o);if(a&&t!=t){for(;s<o;)if((n=i[s++])!=n)return!0}else for(;s<o;s++)if((a||s in i)&&i[s]===t)return a||s||0;return!a&&-1}}function rs(e,t){var r,n=ku(e),i=0,o=[];for(r in n)!xu(Pu,r)&&xu(n,r)&&Uu(o,r);for(;t.length>i;)!xu(n,r=t[i++])||~Mu(o,r)||Uu(o,r);return o}function ns(e,t,r){for(var n=Bu(t),i=Ku.f,o=Gu.f,s=0;s<n.length;s++){var a=n[s];Hu(e,a)||r&&Hu(r,a)||i(e,a,o(t,a))}}function is(e,t){return(e=Xu[qu(e)])==Zu||e!=Wu&&(Yu(t)?Ju(t):!!t)}function m(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?Qu:a?Qu[o]||nc(o,{}):(Qu[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=ec(u,r))&&i.value:u[r],!oc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;ic(n,i)}(e.sham||i&&i.sham)&&tc(n,"sham",!0),rc(u,r,n,e)}}var os,ss,as,us,cs,ls,ps,fs,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=ko("object"==typeof globalThis&&globalThis)||ko("object"==typeof window&&window)||ko("object"==typeof self&&self)||ko("object"==typeof r&&r)||function(){return this}()||Function("return this")(),o={},B=!Mo(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),i=!Mo(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),ds=Function.prototype.call,t=i?ds.bind(ds):function(){return ds.apply(ds,arguments)},r={},g={}.propertyIsEnumerable,hs=Object.getOwnPropertyDescriptor,E=hs&&!g.call({1:2},1),E=(r.f=E?function(e){e=hs(this,e);return!!e&&e.enumerable}:g,i),g=Function.prototype,w=g.bind,vs=g.call,ys=E&&w.bind(vs,vs),g=E?function(e){return e&&ys(e)}:function(e){return e&&function(){return vs.apply(e,arguments)}},w=g,ms=w({}.toString),gs=w("".slice),E=Mo,Es=Uo,ws=Object,bs=g("".split),w=E(function(){return!ws("z").propertyIsEnumerable(0)})?function(e){return"String"==Es(e)?bs(e,""):ws(e)}:ws,Ts=TypeError,_s=w,Is=Do,As=Fo,Os=e,Ns=Fo,E=g({}.isPrototypeOf),Rs=Vo("navigator","userAgent")||"",Ss=Rs,Cs=e.process,xs=e.Deno,Cs=Cs&&Cs.versions||xs&&xs.version,xs=Cs&&Cs.v8,Cs=T=!(T=xs?0<(b=xs.split("."))[0]&&b[0]<4?1:+(b[0]+b[1]):T)&&Ss&&(!(b=Ss.match(/Edge\/(\d+)/))||74<=b[1])&&(b=Ss.match(/Chrome\/(\d+)/))?+b[1]:T,ks=Cs,xs=Mo,Ss=!!Object.getOwnPropertySymbols&&!xs(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ks&&ks<41}),b=Ss&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ms=Vo,Ps=Fo,Us=E,Ds=Object,T=b?function(e){return"symbol"==typeof e}:function(e){var t=Ms("Symbol");return Ps(t)&&Us(t.prototype,Ds(e))},Ls=String,Fs=Fo,js=zo,Vs=TypeError,zs=Ho,Hs=t,Bs=Fo,Gs=jo,Ks=TypeError,xs={exports:{}},Js=e,Ys=Object.defineProperty,$s=Go,qs="__core-js_shared__",$s=e[qs]||$s(qs,{}),Xs=$s,Ws=((xs.exports=function(e,t){return Xs[e]||(Xs[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),Do),Zs=Object,Qs=Ko,ea=g({}.hasOwnProperty),qs=Object.hasOwn||function(e,t){return ea(Qs(e),t)},ta=g,ra=0,na=Math.random(),ia=ta(1..toString),ta=e,oa=xs.exports,sa=qs,_=Jo,aa=Ss,ua=b,ca=oa("wks"),la=ta.Symbol,pa=la&&la.for,fa=ua?la:la&&la.withoutSetter||_,da=t,ha=jo,va=T,ya=Bo,ma=function(e,t){var r,n;if("string"===t&&Bs(r=e.toString)&&!Gs(n=Hs(r,e)))return n;if(Bs(r=e.valueOf)&&!Gs(n=Hs(r,e)))return n;if("string"!==t&&Bs(r=e.toString)&&!Gs(n=Hs(r,e)))return n;throw Ks("Can't convert object to primitive value")},ga=TypeError,Ea=Yo("toPrimitive"),wa=function(e,t){if(!ha(e)||va(e))return e;var r=ya(e,Ea);if(r){if(r=da(r,e,t=void 0===t?"default":t),!ha(r)||va(r))return r;throw ga("Can't convert object to primitive value")}return ma(e,t=void 0===t?"number":t)},ba=T,Ss=jo,Ta=e.document,_a=Ss(Ta)&&Ss(Ta.createElement),Ia=qo,b=!B&&!Mo(function(){return 7!=Object.defineProperty(Ia("div"),"a",{get:function(){return 7}}).a}),Aa=t,Oa=r,Na=Po,Ra=Lo,Sa=$o,Ca=qs,xa=b,ka=Object.getOwnPropertyDescriptor,oa=(o.f=B?ka:function(e,t){if(e=Ra(e),t=Sa(t),xa)try{return ka(e,t)}catch(e){}if(Ca(e,t))return Na(!Aa(Oa.f,e,t),e[t])},{}),ta=B&&Mo(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Ma=jo,Pa=String,Ua=TypeError,Da=b,La=Xo,Fa=$o,ja=TypeError,Va=Object.defineProperty,za=Object.getOwnPropertyDescriptor,Ha="enumerable",Ba="configurable",Ga="writable",_=(oa.f=B?ta?function(e,t,r){var n;return La(e),t=Fa(t),La(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Ga in r&&!r[Ga]&&((n=za(e,t))&&n[Ga]&&(e[t]=r.value,r={configurable:(Ba in r?r:n)[Ba],enumerable:(Ha in r?r:n)[Ha],writable:!1})),Va(e,t,r)}:Va:function(e,t,r){if(La(e),t=Fa(t),La(r),Da)try{return Va(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ja("Accessors not supported");return"value"in r&&(e[t]=r.value),e},B),Ka=oa,Ja=Po,T=_?function(e,t,r){return Ka.f(e,t,Ja(1,r))}:function(e,t,r){return e[t]=r,e},Ss={exports:{}},r=B,b=qs,_=Function.prototype,I=r&&Object.getOwnPropertyDescriptor,b=b(_,"name"),b={EXISTS:b,PROPER:b&&"something"===function(){}.name,CONFIGURABLE:b&&(!r||I(_,"name").configurable)},r=Fo,I=$s,Ya=g(Function.toString),_=(r(I.inspectSource)||(I.inspectSource=function(e){return Ya(e)}),I.inspectSource),r=Fo,I=_,$a=e.WeakMap,r=r($a)&&/native code/.test(I($a)),I=xs.exports,qa=Jo,Xa=I("keys"),$a={},xs=g,Wa=jo,Za=T,Qa=qs,I=$s,eu=Wo,tu=$a,ru="Object already initialized",nu=e.TypeError,iu=e.WeakMap,r=(ps=r||I.state?(os=I.state||(I.state=new iu),ss=xs(os.get),as=xs(os.has),us=xs(os.set),cs=function(e,t){if(as(os,e))throw new nu(ru);return t.facade=e,us(os,e,t),t},ls=function(e){return ss(os,e)||{}},function(e){return as(os,e)}):(tu[fs=eu("state")]=!0,cs=function(e,t){if(Qa(e,fs))throw new nu(ru);return t.facade=e,Za(e,fs,t),t},ls=function(e){return Qa(e,fs)?e[fs]:{}},function(e){return Qa(e,fs)}),{set:cs,get:ls,has:ps,enforce:function(e){return ps(e)?ls(e):cs(e,{})},getterFor:function(t){return function(e){if(Wa(e)&&(e=ls(e)).type===t)return e;throw nu("Incompatible receiver, "+t+" required")}}}),I=Mo,ou=Fo,su=qs,au=B,uu=b.CONFIGURABLE,cu=_,lu=r.enforce,pu=r.get,fu=Object.defineProperty,du=au&&!I(function(){return 8!==fu(function(){},"length",{value:8}).length}),hu=String(String).split("String"),iu=Ss.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!su(e,"name")||uu&&e.name!==t)&&(au?fu(e,"name",{value:t,configurable:!0}):e.name=t),du&&r&&su(r,"arity")&&e.length!==r.arity&&fu(e,"length",{value:r.arity});try{r&&su(r,"constructor")&&r.constructor?au&&fu(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=lu(e);return su(r,"source")||(r.source=hu.join("string"==typeof t?t:"")),e},vu=(Function.prototype.toString=iu(function(){return ou(this)&&pu(this).source||cu(this)},"toString"),Fo),yu=oa,mu=Ss.exports,gu=Go,xs={},Eu=Math.ceil,wu=Math.floor,bu=Math.trunc||function(e){e=+e;return(0<e?wu:Eu)(e)},Tu=Qo,_u=Math.max,Iu=Math.min,Au=Qo,Ou=Math.min,Nu=function(e){return 0<e?Ou(Au(e),9007199254740991):0},Ru=Lo,Su=es,Cu=y,tu={includes:ts(!0),indexOf:ts(!1)},eu=g,xu=qs,ku=Lo,Mu=tu.indexOf,Pu=$a,Uu=eu([].push),I=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Du=rs,Lu=I.concat("length","prototype"),iu=(xs.f=Object.getOwnPropertyNames||function(e){return Du(e,Lu)},{}),eu=(iu.f=Object.getOwnPropertySymbols,Vo),Fu=xs,ju=iu,Vu=Xo,zu=g([].concat),iu=eu("Reflect","ownKeys")||function(e){var t=Fu.f(Vu(e)),r=ju.f;return r?zu(t,r(e)):t},Hu=qs,Bu=iu,Gu=o,Ku=oa,Ju=Mo,Yu=Fo,$u=/#|\.prototype\./,qu=is.normalize=function(e){return String(e).replace($u,".").toLowerCase()},Xu=is.data={},Wu=is.NATIVE="N",Zu=is.POLYFILL="P",eu=is,Qu=e,ec=o.f,tc=T,rc=Zo,nc=Go,ic=ns,oc=eu,iu=!Mo(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),sc=qs,ac=Fo,uc=Ko,cc=Wo("IE_PROTO"),lc=Object,pc=lc.prototype,iu=iu?lc.getPrototypeOf:function(e){e=uc(e);if(sc(e,cc))return e[cc];var t=e.constructor;return ac(t)&&e instanceof t?t.prototype:e instanceof lc?pc:null},fc=Fo,dc=String,hc=TypeError,vc=g,yc=Xo,mc=function(e){if("object"==typeof e||fc(e))return e;throw hc("Can't set "+dc(e)+" as a prototype")},A=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=vc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return yc(e),mc(t),n?r(e,t):e.__proto__=t,e}}():void 0),gc={},Ec=rs,wc=I,O=Object.keys||function(e){return Ec(e,wc)},bc=oa,Tc=Xo,_c=Lo,Ic=O;gc.f=B&&!ta?Object.defineProperties:function(e,t){Tc(e);for(var r,n=_c(t),i=Ic(t),o=i.length,s=0;s<o;)bc.f(e,r=i[s++],n[r]);return e};function Ac(){}function Oc(e){e.write(Yc("")),e.close();var t=e.parentWindow.Object;return e=null,t}function Nc(e,t){return tl(e),void 0===t?e:rl?nl(e,t):function(){return e.apply(t,arguments)}}function Rc(e){return void 0!==e&&(il.Array===e||sl[ol]===e)}function Sc(e){if(null!=e)return dl(e,vl)||dl(e,"@@iterator")||hl[fl(e)]}function Cc(e,t){if(t=arguments.length<2?wl(e):t,ml(t))return gl(yl(t,e));throw bl(El(e)+" is not iterable")}function xc(e,t,r){var n,i;_l(e);try{if(!(n=Il(e,"return"))){if("throw"===t)throw r;return r}n=Tl(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return _l(n),r}function kc(e,t){this.stopped=e,this.result=t}function Mc(e,t,r){function n(e){return o&&Pl(o,"normal",e),new kc(!0,e)}function i(e){return f?(Nl(e),v?y(e[0],e[1],n):y(e[0],e[1])):v?y(e,n):y(e)}var o,s,a,u,c,l,p=r&&r.that,f=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Al(t,p);if(d)o=e.iterator;else if(h)o=e;else{if(!(r=Ml(e)))throw Ul(Rl(e)+" is not iterable");if(Sl(r)){for(s=0,a=Cl(e);s<a;s++)if((u=i(e[s]))&&xl(Dl,u))return u;return new kc(!1)}o=kl(e,r)}for(c=(d?e:o).next;!(l=Ol(c,o)).done;){try{u=i(l.value)}catch(e){Pl(o,"throw",e)}if("object"==typeof u&&u&&xl(Dl,u))return u}return new kc(!1)}function Pc(e){if("Symbol"===Ll(e))throw TypeError("Cannot convert a Symbol value to a string");return Fl(e)}function Uc(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=zl(tp,this);return Bl?r=Bl(new Ql,i?Hl(this):tp):(r=i?this:Gl(tp),Kl(r,Zl,"Error")),void 0!==t&&Kl(r,"message",Xl(t)),Wl&&Kl(r,"stack",Yl(r.stack,1)),$l(r,n),ql(e,ep,{that:i=[]}),Kl(r,"errors",i),r}function Dc(e){np[rp][e]=!0}var Lc,Fc,O=Vo("document","documentElement"),jc=Xo,Vc=gc,zc=I,ta=$a,Hc=O,Bc=qo,Gc="prototype",Kc="script",Jc=Wo("IE_PROTO"),Yc=function(e){return"<"+Kc+">"+e+"</"+Kc+">"},$c=function(){try{Lc=new ActiveXObject("htmlfile")}catch(e){}$c="undefined"==typeof document||document.domain&&Lc?Oc(Lc):(e=Bc("iframe"),t="java"+Kc+":",e.style.display="none",Hc.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(Yc("document.F=Object")),t.close(),t.F);for(var e,t,r=zc.length;r--;)delete $c[Gc][zc[r]];return $c()},gc=(ta[Jc]=!0,Object.create||function(e,t){var r;return null!==e?(Ac[Gc]=jc(e),r=new Ac,Ac[Gc]=null,r[Jc]=e):r=$c(),void 0===t?r:Vc.f(r,t)}),qc=Error,Xc=g("".replace),I=String(qc("zxcasd").stack),Wc=/\n\s*at [^:]*:[^\n]*/,Zc=Wc.test(I),Qc=jo,el=T,tl=Ho,rl=i,nl=g(g.bind),ta={},il=ta,ol=Yo("iterator"),sl=Array.prototype,I={},I=(I[Yo("toStringTag")]="z","[object z]"===String(I)),N=I,al=Fo,ul=Uo,cl=Yo("toStringTag"),ll=Object,pl="Arguments"==ul(function(){return arguments}()),N=N?ul:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=ll(e),cl))?t:pl?ul(e):"Object"==(t=ul(e))&&al(e.callee)?"Arguments":t},fl=N,dl=Bo,hl=ta,vl=Yo("iterator"),yl=t,ml=Ho,gl=Xo,El=zo,wl=Sc,bl=TypeError,Tl=t,_l=Xo,Il=Bo,Al=Nc,Ol=t,Nl=Xo,Rl=zo,Sl=Rc,Cl=y,xl=E,kl=Cc,Ml=Sc,Pl=xc,Ul=TypeError,Dl=kc.prototype,Ll=N,Fl=String,jl=Pc,Vl=Po,R=!Mo(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Vl(1,7)),7!==e.stack)}),S=m,zl=E,Hl=iu,Bl=A,C=ns,Gl=gc,Kl=T,Jl=Po,Yl=function(e,t){if(Zc&&"string"==typeof e&&!qc.prepareStackTrace)for(;t--;)e=Xc(e,Wc,"");return e},$l=function(e,t){Qc(t)&&"cause"in t&&el(e,"cause",t.cause)},ql=Mc,Xl=function(e,t){return void 0===e?arguments.length<2?"":t:jl(e)},Wl=R,Zl=Yo("toStringTag"),Ql=Error,ep=[].push,tp=(Bl?Bl(Uc,Ql):C(Uc,Ql,{name:!0}),Uc.prototype=Gl(Ql.prototype,{constructor:Jl(1,Uc),message:Jl(1,""),name:Jl(1,"AggregateError")})),R=(S({global:!0,constructor:!0,arity:2},{AggregateError:Uc}),Yo),C=gc,Jl=oa.f,rp=R("unscopables"),np=Array.prototype,S=(null==np[rp]&&Jl(np,rp,{configurable:!0,value:C(null)}),Mo),R=Fo,Jl=iu,C=Zo,ip=Yo("iterator"),op=!1;[].keys&&("next"in(x=[].keys())?(Jl=Jl(Jl(x)))!==Object.prototype&&(Fc=Jl):op=!0);function sp(e,t,r){(e=e&&!r?e.prototype:e)&&!pp(e,fp)&&lp(e,fp,{configurable:!0,value:t})}function ap(){return this}function up(){return this}function cp(e,t,r,n,i,o,s){function a(e){if(e===i&&d)return d;if(!xp&&e in p)return p[e];switch(e){case"keys":case Mp:case Pp:return function(){return new r(this,e)}}return function(){return new r(this)}}bp(r,t,n);var u,c,n=t+" Iterator",l=!1,p=e.prototype,f=p[kp]||p["@@iterator"]||i&&p[i],d=!xp&&f||a(i),h="Array"==t&&p.entries||f;if(h&&(h=Tp(h.call(new e)))!==Object.prototype&&h.next&&(Tp(h)!==Cp&&(_p?_p(h,Cp):wp(h[kp])||Op(h,kp,up)),Ip(h,n,!0)),Rp&&i==Mp&&f&&f.name!==Mp&&(Sp?Ap(p,"name",Mp):(l=!0,d=function(){return Ep(f,this)})),i)if(u={values:a(Mp),keys:o?d:a("keys"),entries:a(Pp)},s)for(c in u)!xp&&!l&&c in p||Op(p,c,u[c]);else gp({target:t,proto:!0,forced:xp||l},u);return p[kp]!==d&&Op(p,kp,d,{name:i}),Np[t]=d,u}R((Fc=null==Fc||S(function(){var e={};return Fc[ip].call(e)!==e})?{}:Fc)[ip])||C(Fc,ip,function(){return this});var x={IteratorPrototype:Fc,BUGGY_SAFARI_ITERATORS:op},lp=oa.f,pp=qs,fp=Yo("toStringTag"),dp=x.IteratorPrototype,hp=gc,vp=Po,yp=sp,mp=ta,gp=m,Ep=t,wp=Fo,bp=function(e,t,r,n){t+=" Iterator";return e.prototype=hp(dp,{next:vp(+!n,r)}),yp(e,t,!1),mp[t]=ap,e},Tp=iu,_p=A,Ip=sp,Ap=T,Op=Zo,Jl=Yo,Np=ta,Rp=b.PROPER,Sp=b.CONFIGURABLE,Cp=x.IteratorPrototype,xp=x.BUGGY_SAFARI_ITERATORS,kp=Jl("iterator"),Mp="values",Pp="entries",Up=Lo,R=Dc,S=ta,C=r,op=oa.f,b=cp,x=B,Dp="Array Iterator",Lp=C.set,Fp=C.getterFor(Dp),Jl=b(Array,"Array",function(e,t){Lp(this,{type:Dp,target:Up(e),index:0,kind:t})},function(){var e=Fp(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),ta=S.Arguments=S.Array;if(R("keys"),R("values"),R("entries"),x&&"values"!==ta.name)try{op(ta,"name",{value:"values"})}catch(e){}var jp=N;I||Zo(Object.prototype,"toString",I?{}.toString:function(){return"[object "+jp(this)+"]"},{unsafe:!0});function Vp(e){var e=$p(e),t=qp.f;Xp&&e&&!e[Wp]&&t(e,Wp,{configurable:!0,get:function(){return this}})}function zp(e,t){if(Zp(t,e))return e;throw Qp("Incorrect invocation")}function Hp(){}function Bp(e){if(!ef(e))return!1;try{return of(Hp,nf,e),!0}catch(e){return!1}}function Gp(e){if(!ef(e))return!1;switch(tf(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return uf||!!af(sf,rf(e))}catch(e){return!0}}function Kp(e,t){return void 0===(e=ff(e).constructor)||null==(e=ff(e)[hf])?t:df(e)}var Jp,Yp,C="process"==Uo(e.process),$p=Vo,qp=oa,Xp=B,Wp=Yo("species"),Zp=E,Qp=TypeError,b=g,S=Mo,ef=Fo,tf=N,rf=_,nf=[],of=Vo("Reflect","construct"),sf=/^\s*(?:class|function)\b/,af=b(sf.exec),uf=!sf.exec(Hp),R=(Gp.sham=!0,!of||S(function(){var e;return Bp(Bp.call)||!Bp(Object)||!Bp(function(){e=!0})||e})?Gp:Bp),cf=R,lf=zo,pf=TypeError,ff=Xo,df=function(e){if(cf(e))return e;throw pf(lf(e)+" is not a constructor")},hf=Yo("species"),x=Function.prototype,vf=x.apply,yf=x.call,op="object"==typeof Reflect&&Reflect.apply||(i?yf.bind(vf):function(){return yf.apply(vf,arguments)}),ta=g([].slice),mf=TypeError,I=/(?:ipad|iphone|ipod).*applewebkit/i.test(Rs),gf=e,Ef=op,E=Nc,wf=Fo,bf=qs,N=Mo,Tf=O,_f=ta,If=qo,Af=function(e,t){if(e<t)throw mf("Not enough arguments");return e},b=I,S=C,x=gf.setImmediate,i=gf.clearImmediate,Of=gf.process,Nf=gf.Dispatch,Rf=gf.Function,O=gf.MessageChannel,Sf=gf.String,Cf=0,xf={},kf="onreadystatechange";try{Jp=gf.location}catch(e){}function Mf(e){return function(){Xf(e)}}function Pf(e){Xf(e.data)}function Uf(e){gf.postMessage(Sf(e),Jp.protocol+"//"+Jp.host)}function Df(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function Lf(){this.head=null,this.tail=null}function Ff(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=e,n=t}),this.resolve=cd(r),this.reject=cd(n)}function jf(e,t){var r,n,i,o,s=t.value,a=t.state==Fd,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(t.rejection===zd&&(o=t,fd(gd,pd,function(){var e=o.facade;ld?kd.emit("rejectionHandled",e):Gd(Ld,e,o.value)})),t.rejection=Vd),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(Cd("Promise-chain cycle")):(n=Hd(r))?fd(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var Vf,zf,Hf,Bf,Gf,Kf,Jf,Yf,$f,qf,Xf=function(e){var t;bf(xf,e)&&(t=xf[e],delete xf[e],t())},O=(x&&i||(x=function(e){Af(arguments.length,1);var t=wf(e)?e:Rf(e),r=_f(arguments,1);return xf[++Cf]=function(){Ef(t,void 0,r)},Yp(Cf),Cf},i=function(e){delete xf[e]},S?Yp=function(e){Of.nextTick(Mf(e))}:Nf&&Nf.now?Yp=function(e){Nf.now(Mf(e))}:O&&!b?(b=(S=new O).port2,S.port1.onmessage=Pf,Yp=E(b.postMessage,b)):gf.addEventListener&&wf(gf.postMessage)&&!gf.importScripts&&Jp&&"file:"!==Jp.protocol&&!N(Uf)?(Yp=Uf,gf.addEventListener("message",Pf,!1)):Yp=kf in If("script")?function(e){Tf.appendChild(If("script"))[kf]=function(){Tf.removeChild(this),Xf(e)}}:function(e){setTimeout(Mf(e),0)}),{set:x,clear:i}),S=e,E=/ipad|iphone|ipod/i.test(Rs)&&void 0!==S.Pebble,b=/web0s(?!.*chrome)/i.test(Rs),N=e,x=Nc,i=o.f,Wf=O.set,S=I,o=E,I=b,Zf=C,E=N.MutationObserver||N.WebKitMutationObserver,b=N.document,Qf=N.process,k=N.Promise,i=i(N,"queueMicrotask"),i=i&&i.value,I=(i||(Vf=function(){var e,t;for(Zf&&(e=Qf.domain)&&e.exit();zf;){t=zf.fn,zf=zf.next;try{t()}catch(e){throw zf?Bf():Hf=void 0,e}}Hf=void 0,e&&e.enter()},Bf=S||Zf||I||!E||!b?!o&&k&&k.resolve?((S=k.resolve(void 0)).constructor=k,Jf=x(S.then,S),function(){Jf(Vf)}):Zf?function(){Qf.nextTick(Vf)}:(Wf=x(Wf,N),function(){Wf(Vf)}):(Gf=!0,Kf=b.createTextNode(""),new E(Vf).observe(Kf,{characterData:!0}),function(){Kf.data=Gf=!Gf})),i||function(e){e={fn:e,next:void 0};Hf&&(Hf.next=e),zf||(zf=e,Bf()),Hf=e}),ed=e,o=(Lf.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},Lf),k=e.Promise,S="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,x=!S&&!C&&"object"==typeof window&&"object"==typeof document,N=e,td=k,b=Fo,E=eu,rd=_,i=Yo,nd=x,id=S,od=Cs,sd=(td&&td.prototype,i("species")),ad=!1,ud=b(N.PromiseRejectionEvent),_={CONSTRUCTOR:E("Promise",function(){var e=rd(td),t=e!==String(td);if(!t&&66===od)return!0;if(!od||od<51||!/native code/.test(e)){var e=new td(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[sd]=r,!(ad=e.then(function(){})instanceof r))return!0}return!t&&(nd||id)&&!ud}),REJECTION_EVENT:ud,SUBCLASSING:ad},x={},cd=Ho,S=(x.f=function(e){return new Ff(e)},m),ld=C,pd=e,fd=t,i=Zo,b=A,N=sp,E=Vp,dd=Ho,hd=Fo,vd=jo,yd=zp,md=Kp,gd=O.set,Ed=I,wd=function(e,t){var r=ed.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},bd=Df,Td=o,O=r,I=k,o=x,_d="Promise",Id=_.CONSTRUCTOR,Ad=_.REJECTION_EVENT,M=_.SUBCLASSING,Od=O.getterFor(_d),Nd=O.set,O=I&&I.prototype,Rd=I,Sd=O,Cd=pd.TypeError,xd=pd.document,kd=pd.process,Md=o.f,Pd=Md,Ud=!!(xd&&xd.createEvent&&pd.dispatchEvent),Dd="unhandledrejection",Ld="rejectionhandled",Fd=1,jd=2,Vd=1,zd=2,Hd=function(e){var t;return!(!vd(e)||!hd(t=e.then))&&t},Bd=function(r,i){r.notified||(r.notified=!0,Ed(function(){for(var e,n,t=r.reactions;e=t.get();)jf(e,r);r.notified=!1,i&&!r.rejection&&(n=r,fd(gd,pd,function(){var e=n.facade,t=n.value,r=Kd(n);if(r&&(r=bd(function(){ld?kd.emit("unhandledRejection",t,e):Gd(Dd,e,t)}),n.rejection=ld||Kd(n)?zd:Vd,r.error))throw r.value}))}))},Gd=function(e,t,r){var n;Ud?((n=xd.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),pd.dispatchEvent(n)):n={promise:t,reason:r},!Ad&&(t=pd["on"+e])?t(n):e===Dd&&wd("Unhandled promise rejection",r)},Kd=function(e){return e.rejection!==Vd&&!e.parent},Jd=function(t,r,n){return function(e){t(r,e,n)}},Yd=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=jd,Bd(e,!0))},$d=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Cd("Promise can't be resolved itself");var n=Hd(e);n?Ed(function(){var t={done:!1};try{fd(n,e,Jd($d,t,r),Jd(Yd,t,r))}catch(e){Yd(t,e,r)}}):(r.value=e,r.state=Fd,Bd(r,!1))}catch(e){Yd({done:!1},e,r)}}};if(Id&&(Sd=(Rd=function(e){yd(this,Sd),dd(e),fd(Yf,this);var t=Od(this);try{e(Jd($d,t),Jd(Yd,t))}catch(e){Yd(t,e)}}).prototype,(Yf=function(e){Nd(this,{type:_d,done:!1,notified:!1,parent:!1,reactions:new Td,rejection:!1,state:0,value:void 0})}).prototype=i(Sd,"then",function(e,t){var r=Od(this),n=Md(md(this,Rd));return r.parent=!0,n.ok=!hd(e)||e,n.fail=hd(t)&&t,n.domain=ld?kd.domain:void 0,0==r.state?r.reactions.add(n):Ed(function(){jf(n,r)}),n.promise}),$f=function(){var e=new Yf,t=Od(e);this.promise=e,this.resolve=Jd($d,t),this.reject=Jd(Yd,t)},o.f=Md=function(e){return e===Rd||void 0===e?new $f:Pd(e)},hd(I)&&O!==Object.prototype)){qf=O.then,M||i(O,"then",function(e,t){var r=this;return new Rd(function(e,t){fd(qf,r,e,t)}).then(e,t)},{unsafe:!0});try{delete O.constructor}catch(e){}b&&b(O,Sd)}S({global:!0,constructor:!0,wrap:!0,forced:Id},{Promise:Rd}),N(Rd,_d,!1),E(_d);var qd=Yo("iterator"),Xd=!1;try{var Wd=0,Zd={next:function(){return{done:!!Wd++}},return:function(){Xd=!0}};Zd[qd]=function(){return this},Array.from(Zd,function(){throw 2})}catch(e){}function Qd(e,t){if(!t&&!Xd)return!1;var r=!1;try{var n={};n[qd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var eh=k,o=Qd,I=_.CONSTRUCTOR||!o(function(e){eh.all(e).then(void 0,function(){})}),th=t,rh=Ho,nh=x,ih=Df,oh=Mc,M=(m({target:"Promise",stat:!0,forced:I},{all:function(e){var a=this,t=nh.f(a),u=t.resolve,c=t.reject,r=ih(function(){var n=rh(a.resolve),i=[],o=0,s=1;oh(e,function(e){var t=o++,r=!1;s++,th(n,a,e).then(function(e){r||(r=!0,i[t]=e,--s||u(i))},c)}),--s||u(i)});return r.error&&c(r.value),t.promise}}),m),i=k,b=Vo,O=Fo,S=Zo,Id=i&&i.prototype;M({target:"Promise",proto:!0,forced:_.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),O(i)&&(N=b("Promise").prototype.catch,Id.catch!==N&&S(Id,"catch",N,{unsafe:!0}));var sh=t,ah=Ho,uh=x,ch=Df,lh=Mc;m({target:"Promise",stat:!0,forced:I},{race:function(e){var r=this,n=uh.f(r),i=n.reject,t=ch(function(){var t=ah(r.resolve);lh(e,function(e){sh(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function ph(e,t){return hh(e),vh(t)&&t.constructor===e?t:((0,(e=yh.f(e)).resolve)(t),e.promise)}var fh=t,dh=x,hh=(m({target:"Promise",stat:!0,forced:_.CONSTRUCTOR},{reject:function(e){var t=dh.f(this);return fh(t.reject,void 0,e),t.promise}}),Xo),vh=jo,yh=x,E=m,Zd=Vo,o=_.CONSTRUCTOR,mh=ph;Zd("Promise"),E({target:"Promise",stat:!0,forced:o},{resolve:function(e){return mh(this,e)}});var gh=t,Eh=Ho,wh=x,bh=Df,Th=Mc;m({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=wh.f(a),u=t.resolve,r=t.reject,n=bh(function(){var n=Eh(a.resolve),i=[],o=0,s=1;Th(e,function(e){var t=o++,r=!1;s++,gh(n,a,e).then(function(e){r||(r=!0,i[t]={status:"fulfilled",value:e},--s||u(i))},function(e){r||(r=!0,i[t]={status:"rejected",reason:e},--s||u(i))})}),--s||u(i)});return n.error&&r(n.value),t.promise}});function _h(i){return function(e,t){var r,e=Lh(Fh(e)),t=Dh(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=Vh(e,t))<55296||56319<r||t+1===n||(n=Vh(e,t+1))<56320||57343<n?i?jh(e,t):r:i?zh(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Ih=t,Ah=Ho,Oh=Vo,Nh=x,Rh=Df,Sh=Mc,Ch="No one promise resolved",M=(m({target:"Promise",stat:!0},{any:function(e){var u=this,c=Oh("AggregateError"),t=Nh.f(u),l=t.resolve,p=t.reject,r=Rh(function(){var n=Ah(u.resolve),i=[],o=0,s=1,a=!1;Sh(e,function(e){var t=o++,r=!1;s++,Ih(n,u,e).then(function(e){r||a||(a=!0,l(e))},function(e){r||a||(r=!0,i[t]=e,--s||p(new c(i,Ch)))})}),--s||p(new c(i,Ch))});return r.error&&p(r.value),t.promise}}),m),O=k,i=Mo,xh=Vo,kh=Fo,Mh=Kp,Ph=ph,b=Zo,Uh=O&&O.prototype,Id=(M({target:"Promise",proto:!0,real:!0,forced:!!O&&i(function(){Uh.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=Mh(this,xh("Promise")),e=kh(t);return this.then(e?function(e){return Ph(r,t()).then(function(){return e})}:t,e?function(e){return Ph(r,t()).then(function(){throw e})}:t)}}),kh(O)&&(S=xh("Promise").prototype.finally,Uh.finally!==S&&b(Uh,"finally",S,{unsafe:!0})),g),Dh=Qo,Lh=Pc,Fh=Do,jh=Id("".charAt),Vh=Id("".charCodeAt),zh=Id("".slice),Hh={codeAt:_h(!1),charAt:_h(!0)}.charAt,Bh=Pc,N=r,I=cp,Gh="String Iterator",Kh=N.set,Jh=N.getterFor(Gh);I(String,"String",function(e){Kh(this,{type:Gh,string:Bh(e),index:0})},function(){var e=Jh(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=Hh(t,r),e.index+=t.length,{value:t,done:!1})});function Yh(t,e){if(t){if(t[Qh]!==tv)try{Zh(t,Qh,tv)}catch(e){t[Qh]=tv}if(t[ev]||Zh(t,ev,e),Xh[e])for(var r in Wh)if(t[r]!==Wh[r])try{Zh(t,r,Wh[r])}catch(e){t[r]=Wh[r]}}}var $h,_=e,Zd=_.Promise,E=qo("span").classList,o=E&&E.constructor&&E.constructor.prototype,k=o===Object.prototype?void 0:o,qh=e,Xh={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},M=k,Wh=Jl,Zh=T,i=Yo,Qh=i("iterator"),ev=i("toStringTag"),tv=Wh.values;for($h in Xh)Yh(qh[$h]&&qh[$h].prototype,$h);Yh(M,"DOMTokenList");var O,b,S=b=O=Zd,Id,rv=x,nv=Df,iv=((Id=m)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=rv.f(this),e=nv(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),Xo),ov=xc,sv=$o,av=oa,uv=Po,N,cv=Nc,lv=t,pv=Ko,fv=function(t,e,r,n){try{return n?e(iv(r)[0],r[1]):e(r)}catch(e){ov(t,"throw",e)}},dv=Rc,hv=R,vv=y,yv=N=function(e,t,r){t=sv(t);t in e?av.f(e,t,uv(0,r)):e[t]=r},mv=Cc,gv=Sc,Ev=Array,I,E=function(e){var t,r,n,i,o,s,a=pv(e),e=hv(this),u=arguments.length,c=1<u?arguments[1]:void 0,l=void 0!==c,u=(l&&(c=cv(c,2<u?arguments[2]:void 0)),gv(a)),p=0;if(!u||this===Ev&&dv(u))for(t=vv(a),r=e?new this(t):Ev(t);p<t;p++)s=l?c(a[p],p):a[p],yv(r,p,s);else for(o=(i=mv(a,u)).next,r=e?new this:[];!(n=lv(o,i)).done;p++)s=l?fv(i,c,[n.value,p],!0):n.value,yv(r,p,s);return r.length=p,r},o,k,wv=((I=m)({target:"Array",stat:!0,forced:k=!(o=Qd)(function(e){Array.from(e)})},{from:E}),Uo),Jl=Array.isArray||function(e){return"Array"==wv(e)},T,i,M=((T=m)({target:"Array",stat:!0},{isArray:i=Jl}),m),Zd=Mo,bv=R,Tv=N,_v=Array,O=Zd(function(){function e(){}return!(_v.of.call(e)instanceof e)}),Iv=(M({target:"Array",stat:!0,forced:O},{of:function(){for(var e=0,t=arguments.length,r=new(bv(this)?this:_v)(t);e<t;)Tv(r,e,arguments[e++]);return r.length=t,r}}),Ko),Av=y,Ov=Qo,b=Dc,Nv=(m({target:"Array",proto:!0},{at:function(e){var t=Iv(this),r=Av(t),e=Ov(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),b("at"),TypeError),S=function(e){if(9007199254740991<e)throw Nv("Maximum allowed index exceeded");return e},Rv=Jl,Sv=R,Cv=jo,xv=Yo("species"),kv=Array,Mv=function(e){var t;return Rv(e)&&(t=e.constructor,(Sv(t)&&(t===kv||Rv(t.prototype))||Cv(t)&&null===(t=t[xv]))&&(t=void 0)),void 0===t?kv:t},x=function(e,t){return new(Mv(e))(0===t?0:t)},Pv=Mo,Uv=Cs,Dv=Yo("species"),Id,o=m,I=Mo,Lv=Jl,Fv=jo,jv=Ko,Vv=y,zv=S,Hv=N,Bv=x,k=Id=function(t){return 51<=Uv||!Pv(function(){var e=[];return(e.constructor={})[Dv]=function(){return{foo:1}},1!==e[t](Boolean).foo})},E=Cs,Gv=Yo("isConcatSpreadable"),T=51<=E||!I(function(){var e=[];return e[Gv]=!1,e.concat()[0]!==e}),i=k("concat"),Kv=(o({target:"Array",proto:!0,arity:1,forced:!T||!i},{concat:function(e){for(var t,r,n,i=jv(this),o=Bv(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!Fv(e))return!1;var t=e[Gv];return void 0!==t?!!t:Lv(e)}(n=-1===a?i:arguments[a]))for(r=Vv(n),zv(s+r),t=0;t<r;t++,s++)t in n&&Hv(o,s,n[t]);else zv(s+1),Hv(o,s++,n);return o.length=s,o}}),zo),Jv=TypeError,Zd,Yv=Ko,$v=es,qv=y,Xv=Zd=function(e,t){if(!delete e[t])throw Jv("Cannot delete property "+Kv(t)+" of "+Kv(e))},Wv=Math.min,M=Dc,Zv=(m({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=Yv(this),n=qv(r),i=$v(e,n),o=$v(t,n),e=2<arguments.length?arguments[2]:void 0,s=Wv((void 0===e?n:$v(e,n))-o,n-i),a=1;for(o<i&&i<o+s&&(a=-1,o+=s-1,i+=s-1);0<s--;)o in r?r[i]=r[o]:Xv(r,i),i+=a,o+=a;return r}}),M("copyWithin"),Nc),Qv=w,ey=Ko,ty=y,ry=x,ny=g([].push),O,b={forEach:(O=function(f){var d=1==f,h=2==f,v=3==f,y=4==f,m=6==f,g=7==f,E=5==f||m;return function(e,t,r,n){for(var i,o,s=ey(e),a=Qv(s),u=Zv(t,r),c=ty(a),l=0,t=n||ry,p=d?t(e,c):h||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(o=u(i=a[l],l,s),f))if(d)p[l]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return l;case 2:ny(p,i)}else switch(f){case 4:return!1;case 7:ny(p,i)}return m?-1:v||y?y:p}})(0),map:O(1),filter:O(2),some:O(3),every:O(4),find:O(5),findIndex:O(6),filterReject:O(7)},iy=Mo,E=function(e,t){var r=[][e];return!!r&&iy(function(){r.call(null,t||function(){return 1},1)})},I=m,oy=b.every,sy=(I({target:"Array",proto:!0,forced:!E("every")},{every:function(e){return oy(this,e,1<arguments.length?arguments[1]:void 0)}}),Ko),ay=es,uy=y,k=Dc,o=(m({target:"Array",proto:!0},{fill:function(e){for(var t=sy(this),r=uy(t),n=arguments.length,i=ay(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:ay(n,r);i<o;)t[i++]=e;return t}}),k("fill"),m),cy=b.filter,T=(o({target:"Array",proto:!0,forced:!Id("filter")},{filter:function(e){return cy(this,e,1<arguments.length?arguments[1]:void 0)}}),m),ly=b.find,i=Dc,M,py=!0,O=((M="find")in[]&&Array(1)[M](function(){py=!1}),T({target:"Array",proto:!0,forced:py},{find:function(e){return ly(this,e,1<arguments.length?arguments[1]:void 0)}}),i(M),m),fy=b.findIndex,I=Dc,k,dy=!0,hy=((k="findIndex")in[]&&Array(1)[k](function(){dy=!1}),O({target:"Array",proto:!0,forced:dy},{findIndex:function(e){return fy(this,e,1<arguments.length?arguments[1]:void 0)}}),I(k),Nc),vy=w,yy=Ko,my=y,o,T={findLast:(o=function(u){var c=1==u;return function(e,t,r){for(var n,i=yy(e),o=vy(i),s=hy(t,r),a=my(o);0<a--;)if(s(n=o[a],a,i))switch(u){case 0:return n;case 1:return a}return c?-1:void 0}})(0),findLastIndex:o(1)},i=m,gy=T.findLast,M=Dc,O=(i({target:"Array",proto:!0},{findLast:function(e){return gy(this,e,1<arguments.length?arguments[1]:void 0)}}),M("findLast"),m),Ey=T.findLastIndex,I=Dc,wy=(O({target:"Array",proto:!0},{findLastIndex:function(e){return Ey(this,e,1<arguments.length?arguments[1]:void 0)}}),I("findLastIndex"),Jl),by=y,Ty=S,_y=Nc,Iy=function(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&_y(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&wy(u)?(c=by(u),l=Iy(e,t,u,c,l,o-1)-1):(Ty(l+1),e[l]=u),l++),p++;return l},k,Ay=k=Iy,Oy=Ko,Ny=y,Ry=Qo,Sy=x;m({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Oy(this),r=Ny(t),n=Sy(t,0);return n.length=Ay(n,t,t,r,0,void 0===e?1:Ry(e)),n}});function Cy(c){return function(e,t,r,n){rm(t);var i=nm(e),o=im(i),s=om(i),a=c?s-1:0,u=c?-1:1;if(r<2)for(;;){if(a in o){n=o[a],a+=u;break}if(a+=u,c?a<0:s<=a)throw sm("Reduce of empty array with no initial value")}for(;c?0<=a:a<s;a+=u)a in o&&(n=t(n,o[a],a,i));return n}}function xy(e,t,r){for(var n=Im(e),i=_m(t,n),o=_m(void 0===r?n:r,n),s=Om(Nm(o-i,0)),a=0;i<o;i++,a++)Am(s,a,e[i]);return s.length=a,s}function ky(e,t){var r=e.length,n=Sm(r/2);if(r<8){for(var i,o,s=e,a=t,u=s.length,c=1;c<u;){for(i=s[o=c];o&&0<a(s[o-1],i);)s[o]=s[--o];o!==c++&&(s[o]=i)}return s}for(var l=e,p=ky(Rm(e,0,n),t),f=ky(Rm(e,n),t),d=t,h=p.length,v=f.length,y=0,m=0;y<h||m<v;)l[y+m]=y<h&&m<v?d(p[y],f[m])<=0?p[y++]:f[m++]:y<h?p[y++]:f[m++];return l}var My=k,Py=Ho,Uy=Ko,Dy=y,Ly=x,Fy=(m({target:"Array",proto:!0},{flatMap:function(e){var t,r=Uy(this),n=Dy(r);return Py(e),(t=Ly(r,0)).length=My(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),b.forEach),o=E("forEach")?[].forEach:function(e){return Fy(this,e,1<arguments.length?arguments[1]:void 0)},i=(m({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o}),m),jy=tu.includes,M=Dc,T=(i({target:"Array",proto:!0,forced:Mo(function(){return!Array(1).includes()})},{includes:function(e){return jy(this,e,1<arguments.length?arguments[1]:void 0)}}),M("includes"),m),O=g,Vy=tu.indexOf,I=E,zy=O([].indexOf),Hy=!!zy&&1/zy([1],1,-0)<0,k=I("indexOf"),o=(T({target:"Array",proto:!0,forced:Hy||!k},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Hy?zy(this,e,t)||0:Vy(this,e,t)}}),m),i=w,By=Lo,M=E,Gy=g([].join),tu=i!=Object,O=M("join",","),Ky=(o({target:"Array",proto:!0,forced:tu||!O},{join:function(e){return Gy(By(this),void 0===e?",":e)}}),op),Jy=Lo,Yy=Qo,$y=y,I=E,qy=Math.min,Xy=[].lastIndexOf,Wy=!!Xy&&1/[1].lastIndexOf(1,-0)<0,T=I("lastIndexOf"),k=Wy||!T?function(e){if(Wy)return Ky(Xy,this,arguments)||0;var t=Jy(this),r=$y(t),n=r-1;for((n=1<arguments.length?qy(n,Yy(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:Xy,i=(m({target:"Array",proto:!0,forced:k!==[].lastIndexOf},{lastIndexOf:k}),m),Zy=b.map,M=(i({target:"Array",proto:!0,forced:!Id("map")},{map:function(e){return Zy(this,e,1<arguments.length?arguments[1]:void 0)}}),m),Qy=Ko,em=y,tm=S,o=Mo(function(){return 4294967297!==[].push.call({length:4294967296},1)}),tu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),rm=(M({target:"Array",proto:!0,arity:1,forced:o||tu},{push:function(e){var t=Qy(this),r=em(t),n=arguments.length;tm(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),Ho),nm=Ko,im=w,om=y,sm=TypeError,O={left:Cy(!1),right:Cy(!0)},op=m,am=O.left,I=Cs,T=C,k=(op({target:"Array",proto:!0,forced:!E("reduce")||!T&&79<I&&I<83},{reduce:function(e){var t=arguments.length;return am(this,e,t,1<t?arguments[1]:void 0)}}),m),um=O.right,i=Cs,M=C,o=(k({target:"Array",proto:!0,forced:!E("reduceRight")||!M&&79<i&&i<83},{reduceRight:function(e){return um(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),m),cm=Jl,lm=g([].reverse),tu=[1,2],op=(o({target:"Array",proto:!0,forced:String(tu)===String(tu.reverse())},{reverse:function(){return cm(this)&&(this.length=this.length),lm(this)}}),m),pm=Jl,fm=R,dm=jo,hm=es,vm=y,ym=Lo,mm=N,T=Yo,gm=ta,I=Id("slice"),Em=T("species"),wm=Array,bm=Math.max,O=(op({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,n,i,o=ym(this),s=vm(o),a=hm(e,s),u=hm(void 0===t?s:t,s);if(pm(o)&&(r=o.constructor,(r=fm(r)&&(r===wm||pm(r.prototype))||dm(r)&&null===(r=r[Em])?void 0:r)===wm||void 0===r))return gm(o,a,u);for(n=new(void 0===r?wm:r)(bm(u-a,0)),i=0;a<u;a++,i++)a in o&&mm(n,i,o[a]);return n.length=i,n}}),m),Tm=b.some,_m=(O({target:"Array",proto:!0,forced:!E("some")},{some:function(e){return Tm(this,e,1<arguments.length?arguments[1]:void 0)}}),es),Im=y,Am=N,Om=Array,Nm=Math.max,Rm=xy,Sm=Math.floor,C=ky,k=Rs.match(/firefox\/(\d+)/i),M=!!k&&+k[1],i=/MSIE|Trident/.test(Rs),o=Rs.match(/AppleWebKit\/(\d+)\./),tu=!!o&&+o[1],ta=m,T=g,Cm=Ho,xm=Ko,km=y,Mm=Zd,Pm=Pc,op=Mo,Um=C,I=E,Dm=M,Lm=i,Fm=Cs,jm=tu,Vm=[],zm=T(Vm.sort),Hm=T(Vm.push),O=op(function(){Vm.sort(void 0)}),k=op(function(){Vm.sort(null)}),Rs=I("sort"),Bm=!op(function(){if(Fm)return Fm<70;if(!(Dm&&3<Dm)){if(Lm)return!0;if(jm)return jm<603;for(var e,t,r,n="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)Vm.push({k:e+r,v:t})}for(Vm.sort(function(e,t){return t.v-e.v}),r=0;r<Vm.length;r++)e=Vm[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});ta({target:"Array",proto:!0,forced:O||!k||!Rs||!Bm},{sort:function(e){void 0!==e&&Cm(e);var t=xm(this);if(Bm)return void 0===e?zm(t):zm(t,e);for(var r,n,i=[],o=km(t),s=0;s<o;s++)s in t&&Hm(i,t[s]);for(Um(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Pm(e)>Pm(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)Mm(t,s++);return t}});Vp("Array");var o=m,Gm=Ko,Km=es,Jm=Qo,Ym=y,$m=S,qm=x,Xm=N,Wm=Zd,C=Id("splice"),Zm=Math.max,Qm=Math.min;o({target:"Array",proto:!0,forced:!C},{splice:function(e,t){var r,n,i,o,s,a,u=Gm(this),c=Ym(u),l=Km(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,Qm(Zm(Jm(t),0),c-l)),$m(c+r-n),i=qm(u,n),o=0;o<n;o++)(s=l+o)in u&&Xm(i,o,u[s]);if(r<(i.length=n)){for(o=l;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:Wm(u,a);for(o=c;c-n+r<o;o--)Wm(u,o-1)}else if(n<r)for(o=c-n;l<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:Wm(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),Dc("flat");Dc("flatMap");var M=m,eg=Ko,tg=y,rg=Zd,ng=S,i=1!==[].unshift(0),Cs=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();M({target:"Array",proto:!0,arity:1,forced:i||Cs},{unshift:function(e){var t=eg(this),r=tg(t),n=arguments.length;if(n){ng(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:rg(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});_.Array;var tu={exports:{}},T={},ig=Uo,og=Lo,sg=xs.f,ag=xy,ug="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];T.f=function(e){if(!ug||"Window"!=ig(e))return sg(og(e));try{return sg(e)}catch(e){return ag(ug)}};function cg(e){bg(e,Ng,{value:{objectID:"O"+Rg++,weakData:{}}})}function lg(e,t,r){for(var n in t)Yg(e,n,t[n],r);return e}function pg(e,t){for(var r=0,n=sE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function fg(e,t,r,n){for(var i,o,s,a=cE(e),u=uE(a),c=aE(t,r),l=fE(null),p=pE(u),f=0;f<p;f++)s=u[f],(o=lE(c(s,f,a)))in l?vE(l[o],s):l[o]=[s];if(n&&(i=n(a))!==hE)for(o in l)l[o]=dE(i,l[o]);return l}var I=Mo(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),op=Mo,dg=jo,hg=Uo,vg=I,yg=Object.isExtensible,ta=op(function(){yg(1)})||vg?function(e){return!!dg(e)&&((!vg||"ArrayBuffer"!=hg(e))&&(!yg||yg(e)))}:yg,O=!Mo(function(){return Object.isExtensible(Object.preventExtensions({}))}),mg=m,gg=g,k=$a,Eg=jo,wg=qs,bg=oa.f,Tg=xs,_g=T,Ig=ta,Ag=O,Og=!1,Ng=Jo("meta"),Rg=0,Sg=tu.exports={enable:function(){Sg.enable=function(){},Og=!0;var i=Tg.f,o=gg([].splice),e={};e[Ng]=1,i(e).length&&(Tg.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===Ng){o(t,r,1);break}return t},mg({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:_g.f}))},fastKey:function(e,t){if(!Eg(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!wg(e,Ng)){if(!Ig(e))return"F";if(!t)return"E";cg(e)}return e[Ng].objectID},getWeakData:function(e,t){if(!wg(e,Ng)){if(!Ig(e))return!0;if(!t)return!1;cg(e)}return e[Ng].weakData},onFreeze:function(e){return Ag&&Og&&Ig(e)&&!wg(e,Ng)&&cg(e),e}},Cg=(k[Ng]=!0,Fo),xg=jo,kg=A,Mg=m,Pg=e,Ug=g,Dg=eu,Lg=Zo,Fg=tu.exports,jg=Mc,Vg=zp,zg=Fo,Hg=jo,Bg=Mo,Gg=Qd,Kg=sp,Jg=function(e,t,r){return kg&&Cg(t=t.constructor)&&t!==r&&xg(t=t.prototype)&&t!==r.prototype&&kg(e,t),e},Yg=Zo,$g=oa.f,qg=gc,Xg=lg,Wg=Nc,Zg=zp,Qg=Mc,eE=cp,tE=Vp,rE=B,nE=tu.exports.fastKey,iE=r.set,oE=r.getterFor,sE=(function(e,t,r){function n(e){var r=Ug(d[e]);Lg(d,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(l&&!Hg(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return l&&!Hg(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(l&&!Hg(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}var i,o,s,a,u,c=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),p=c?"set":"add",f=Pg[e],d=f&&f.prototype,h=f,v={};return Dg(e,!zg(f)||!(l||d.forEach&&!Bg(function(){(new f).entries().next()})))?(h=r.getConstructor(t,e,c,p),Fg.enable()):Dg(e,!0)&&(o=(i=new h)[p](l?{}:-0,1)!=i,s=Bg(function(){i.has(1)}),a=Gg(function(e){new f(e)}),u=!l&&Bg(function(){for(var e=new f,t=5;t--;)e[p](t,t);return!e.has(-0)}),a||(((h=t(function(e,t){Vg(e,d);e=Jg(new f,e,h);return null!=t&&jg(t,e[p],{that:e,AS_ENTRIES:c}),e})).prototype=d).constructor=h),(s||u)&&(n("delete"),n("has"),c&&n("get")),(u||o)&&n(p),l&&d.clear&&delete d.clear),v[e]=h,Mg({global:!0,constructor:!0,forced:h!=f},v),Kg(h,e),l||r.setStrong(h,e,c),h}("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,r,n,i){function o(e,t,r){var n,i=u(e),o=s(e,t);return o?o.value=r:(i.last=o={index:n=nE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),rE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=nE(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key==t)return r}var e=e(function(e,t){Zg(e,a),iE(e,{type:r,index:qg(null),first:void 0,last:void 0,size:0}),rE||(e.size=0),null!=t&&Qg(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=oE(r);return Xg(a,{clear:function(){for(var e=u(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,rE?e.size=0:this.size=0},delete:function(e){var t,r,n=u(this),e=s(this,e);return e&&(t=e.next,r=e.previous,delete n.index[e.index],e.removed=!0,r&&(r.next=t),t&&(t.previous=r),n.first==e&&(n.first=t),n.last==e&&(n.last=r),rE?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=Wg(e,1<arguments.length?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),Xg(a,n?{get:function(e){e=s(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),rE&&$g(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=oE(t),o=oE(n);eE(e,t,function(e,t){iE(this,{type:n,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:{value:e.target=void 0,done:!0}},r?"entries":"values",!r,!0),tE(t)}}),y),aE=Nc,uE=w,cE=Ko,lE=$o,pE=y,fE=gc,dE=pg,hE=Array,vE=g([].push),yE=fg,Rs=Dc;m({target:"Array",proto:!0},{group:function(e){return yE(this,e,1<arguments.length?arguments[1]:void 0)}}),Rs("group");var mE=fg,N=Dc;m({target:"Array",proto:!0,forced:!E("groupBy")},{groupBy:function(e){return mE(this,e,1<arguments.length?arguments[1]:void 0)}}),N("groupBy");function gE(e){for(var t,r,n=bE(this),i=wE(n),o=EE(e,1<arguments.length?arguments[1]:void 0),s=new _E,a=TE(i),u=0;u<a;u++)t=o(r=i[u],u,n),AE(s,t)?NE(IE(s,t),r):OE(s,t,[r]);return s}var EE=Nc,Id=g,wE=w,bE=Ko,TE=y,_E=Vo("Map"),o=_E.prototype,IE=Id(o.get),AE=Id(o.has),OE=Id(o.set),NE=Id([].push),C=Dc,Zd=gE;m({target:"Array",proto:!0,name:"groupToMap",forced:!E("groupByToMap")},{groupByToMap:Zd}),C("groupByToMap");function RE(e){return ME[e].prototype}var M=Dc,SE=(m({target:"Array",proto:!0},{groupToMap:gE}),M("groupToMap"),y),CE=function(e,t){for(var r=SE(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},xE=Lo,i=Dc,kE=Array,ME=(m({target:"Array",proto:!0},{toReversed:function(){return CE(xE(this),kE)}}),i("toReversed"),e),Cs=m,PE=Ho,UE=Lo,DE=pg,_=Dc,LE=Array,FE=g(RE("Array").sort),I=(Cs({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&PE(e);var t=UE(this),t=DE(LE,t);return FE(t,e)}}),_("toSorted"),m),op=Dc,jE=S,VE=y,zE=es,HE=Lo,BE=Qo,GE=Array,KE=Math.max,JE=Math.min,YE=(I({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=HE(this),a=VE(s),u=zE(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,JE(KE(BE(t),0),a-u)),i=jE(a+r-n),o=GE(i);c<u;c++)o[c]=s[c];for(;c<u+r;c++)o[c]=arguments[c-u+2];for(;c<i;c++)o[c]=s[c+n-r];return o}}),op("toSpliced"),y),$E=Qo,qE=RangeError,XE=function(e,t,r,n){var i=YE(e),r=$E(r),o=r<0?i+r:r;if(i<=o||o<0)throw qE("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},WE=Lo,ZE=Array;m({target:"Array",proto:!0},{with:function(e,t){return XE(WE(this),ZE,e,t)}});$a=e,qs=$s,xs=Fo,T=iu,ta=Zo,O="USE_FUNCTION_CONSTRUCTOR",k=Yo("asyncIterator"),A=$a.AsyncIterator,eu=qs.AsyncIteratorPrototype;if(eu)Tb=eu;else if(xs(A))Tb=A.prototype;else if(qs[O]||$a[O])try{db=T(T(T(Function("return async function*(){}()")()))),T(db)===Object.prototype&&(Tb=db)}catch(e){}xs((Tb=Tb||{})[k])||ta(Tb,k,function(){return this});function QE(e,t,r){var n=e.done;aw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function ew(e){cw(this,{type:uw,iterator:ow(e),next:e.next})}function tw(e){var f=0==e,d=1==e,h=2==e,v=3==e;return function(e,s,a){var e=Nw(e),u=Ow("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||_w(s),new u(function(r,n){var i=function(e){Rw(c,n,e,n)},o=function(){try{if(f&&p)try{Aw(l)}catch(e){i(e)}u.resolve(Iw(Tw(t,c))).then(function(e){try{if(Iw(e).done)f?(a.length=l,r(a)):r(!v&&(h||void 0));else{var t=e.value;try{p?u.resolve(f?s(t,l):s(t)).then(function(e){if(d)o();else if(h)e?o():Rw(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?Rw(c,r,v||t,n):o()},i):(a[l++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function rw(e,t){if(!Gw||!Bw(e)||!Gw(e))return!1;for(var r,n=0,i=e.length;n<i;)if(!("string"==typeof(r=e[n++])||t&&void 0===r))return!1;return 0!==i}function nw(e,t,r){return r.get&&Kw(r.get,t,{getter:!0}),r.set&&Kw(r.set,t,{setter:!0}),Jw.f(e,t,r)}var iw=t,ow=Xo,tu=gc,sw=Bo,Rs=lg,N=r,w=Tb,aw=Vo("Promise"),uw="AsyncFromSyncIterator",cw=N.set,lw=N.getterFor(uw),o=(ew.prototype=Rs(tu(w),{next:function(){var n=lw(this);return new aw(function(e,t){var r=ow(iw(n.next,n.iterator));QE(r,e,t)})},return:function(){var n=lw(this).iterator;return new aw(function(e,t){var r=sw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=ow(iw(r,n));QE(r,e,t)})}}),ew),pw=t,fw=o,dw=Xo,hw=Cc,vw=Bo,yw=Yo("asyncIterator"),mw=Ho,gw=Xo,Ew=t,ww=Vo,bw=Bo,Tw=t,_w=Ho,Iw=Xo,Aw=S,Ow=Vo,Nw=function(e){return{iterator:e,next:mw(gw(e).next)}},Rw=function(e,t,r,n){try{var i=bw(e,"return");if(i)return ww("Promise").resolve(Ew(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},Id={toArray:tw(0),forEach:tw(1),every:tw(2),some:tw(3),find:tw(4)},Sw=Nc,Cw=Ko,xw=R,kw=function(e,t){t=arguments.length<2?vw(e,yw):t;return t?dw(pw(t,e)):new fw(hw(e))},Mw=Cc,Pw=Sc,Uw=Bo,E=RE,Dw=Vo,Zd=Yo,Lw=o,Fw=Id.toArray,jw=Zd("asyncIterator"),Vw=E("Array").values,C=(m({target:"Array",stat:!0,forced:!0},{fromAsync:function(o){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(Dw("Promise"))(function(e){var t=Cw(o),r=(void 0!==a&&(a=Sw(a,u)),Uw(t,jw)),n=r?void 0:Pw(t)||Vw,i=xw(s)?new s:[],r=r?kw(t,r):new Lw(Mw(t,n));e(Fw(r,a,i))})}}),m),zw=b.filterReject,M=Dc,i=(C({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return zw(this,e,1<arguments.length?arguments[1]:void 0)}}),M("filterOut"),m),Hw=b.filterReject,Cs=Dc,_=(i({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return Hw(this,e,1<arguments.length?arguments[1]:void 0)}}),Cs("filterReject"),m),Bw=Jl,Gw=Object.isFrozen,Kw=(_({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!rw(e,!0))return!1;var t=e.raw;return t.length===e.length&&rw(t,!1)}}),Ss.exports),Jw=oa,I=Dc,Yw=Ko,$w=y;B&&(nw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=Yw(this),t=$w(e);return 0==t?void 0:e[t-1]},set:function(e){var t=Yw(this),r=$w(t);return t[0==r?0:r-1]=e}}),I("lastItem"));var op=Dc,qw=Ko,Xw=y;B&&(nw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=qw(this),e=Xw(e);return 0==e?0:e-1}}),op("lastIndex"));var e=g,Ww=Ho,Zw=y,Qw=Ko,e0=x,t0=Vo("Map"),$s=t0.prototype,r0=e($s.forEach),n0=e($s.has),i0=e($s.set),o0=e([].push),iu=Dc;m({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=Qw(this),i=Zw(n),o=e0(n,0),s=new t0,a=null!=e?Ww(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),n0(s,r)||i0(s,r,t);return r0(s,function(e){o0(o,e)}),o}}),iu("uniqueBy");a0.exposure=function(e,t,r,n){return new c0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},a0.track=function(e,t,r,n){return new f0(n,r,e,t)},a0.remoteConfig=function(e,t,r,n){return new v0(n,e,t.parameter,t.valueId,t.reason,r)},a0.isExposureEvent=function(e){return void 0!==e.experiment},a0.isTrackEvent=function(e){return void 0!==e.eventType},a0.isRemoteConfigEvent=function(e){return void 0!==e.parameter},a0.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},a0.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},a0.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},a0.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[dt.ID],identifiers:this.user.identifiers,userProperties:Me.sanitize(this.user.properties),hackleProperties:Me.sanitize(this.user.hackleProperties)}};var s0=a0;function a0(e,t,r){void 0===r&&(r=H()),this.timestamp=e,this.user=t,this.insertId=r}Ne(l0,u0=s0),l0.prototype.copyWithUser=function(e){return new l0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},l0.prototype.toDto=function(){return c(c({},u0.prototype.toDto.call(this)),{experimentId:this.experiment.id,experimentKey:this.experiment.key,experimentType:this.experiment.type,experimentVersion:this.experiment.version,variationId:this.variationId,variationKey:this.variationKey,decisionReason:this.decisionReason.toString(),properties:this.properties})};var u0,c0=l0;function l0(e,t,r,n,i,o,s,a){e=u0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}Ne(d0,p0=s0),d0.prototype.copyWithUser=function(e){return new d0(this.timestamp,e,this.eventType,this.event,this.insertId)},d0.prototype.toDto=function(){return c(c({},p0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Me.sanitize(this.event.properties)})};var p0,f0=d0;function d0(e,t,r,n,i){e=p0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}Ne(y0,h0=s0),y0.prototype.copyWithUser=function(e){return new y0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},y0.prototype.toDto=function(){return c(c({},h0.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Me.sanitize(this.properties)})};var h0,v0=y0;function y0(e,t,r,n,i,o,s){e=h0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}g0.isSessionEvent=function(e){return!!s0.isTrackEvent(e)&&(e.event.key===g0.SESSION_START_EVENT_NAME||e.event.key===g0.SESSION_END_EVENT_NAME)},g0.prototype.onSessionStarted=function(e,t,r){this.track(g0.SESSION_START_EVENT_NAME,e,t,r)},g0.prototype.onSessionEnded=function(e,t,r){this.track(g0.SESSION_END_EVENT_NAME,e,t,r)},g0.prototype.track=function(e,t,r,n){e={key:e},r=this.userManager.toHackleUser(r),r=this.decorateSession(r,t);this.core.track(e,r,n)},g0.prototype.decorateSession=function(e,t){t=(new yt).add(dt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},g0.SESSION_START_EVENT_NAME="$session_start",g0.SESSION_END_EVENT_NAME="$session_end";var m0=g0;function g0(e,t){this.userManager=e,this.core=t}w0.prototype.process=function(e){var t;m0.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.exposureEventDedupDeterminer.isDedupTarget(e)||(e=e,t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[dt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[dt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},w0.prototype.flush=function(e){this.delegate.flush(e)},w0.prototype.close=function(){this.delegate.close()};var E0=w0;function w0(e,t,r,n){this.delegate=e,this.exposureEventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}T0.prototype.isDedupTarget=function(e){if(-1===this.exposureEventDedupIntervalMillis)return!1;if(!s0.isExposureEvent(e))return!1;Ce.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache=new Map);var t=[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-"),e=(new Date).getTime(),r=this.cache.get(t);return void 0!==r&&e-r<=this.exposureEventDedupIntervalMillis||(this.cache.set(t,e),!1)};var b0=T0;function T0(e){this.cache=new Map,this.exposureEventDedupIntervalMillis=e}I0.toEvent=function(e){var t;return{key:I0.EVENT_KEY,properties:{level:I0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:I0._stacktrace(e)}}},I0._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,I0.STACK_TRACK_LIMIT).join("\n")},I0.EVENT_KEY="$trace",I0.LEVEL_ERROR="error",I0.STACK_TRACK_LIMIT=30;var _0=I0;function I0(){}A0.prototype.evaluate=function(e,t){if(!this.supports(e))throw new Error("Unsupported EvaluatorRequest ".concat(e.toString()));var r;if(t.contains(e))throw r=t.stack.map(function(e){return e.toString()}).join(" - "),new Error("Circular evaluation has occurred [".concat(r," - ").concat(e.toString(),"]"));t.addRequest(e);try{return this.evaluateInternal(e,t)}finally{t.removeRequest(e)}};eu=A0;function A0(){}N0.prototype.with=function(e){return new N0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},N0.of=function(e,t,r,n){var i=this.config(e.workspace,r);return new N0(n,t.targetEvaluations,e.experiment,r.id,r.key,i)},N0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new N0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},N0.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})};var O0=N0;function N0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}Ne(C0,R0=eu),C0.prototype.supports=function(e){return void 0!==e.experiment},C0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:O0.ofDefault(e,t,d.TRAFFIC_NOT_ALLOCATED)};var R0,S0=C0;function C0(e){var t=R0.call(this)||this;return t.evaluationFlowFactory=e,t}k0.of=function(e,t,r,n,i,o){return o.returnValue=Me.truncateStringValue(n),new k0(i,t.targetEvaluations,e.parameter,r,n,o)},k0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var x0=k0;function k0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}Ne(U0,M0=eu),U0.prototype.supports=function(e){return void 0!==e.parameter},U0.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=Me.truncateStringValue(e.defaultValue),a.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return x0.ofDefault(e,t,d.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return a.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,d.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,d.DEFAULT_RULE,r)},U0.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?x0.ofDefault(e,t,d.TYPE_MISMATCH,i):x0.of(e,t,r.id,r.rawValue,n,i)};var M0,P0=U0;function U0(e){var t=M0.call(this)||this;return t.targetRuleDeterminer=e,t}L0.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var D0=L0;function L0(e,t){this.type=e,this.id=t}j0.create=function(){return new j0},Object.defineProperty(j0.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(j0.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),j0.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},j0.prototype.addRequest=function(e){this._stack.push(e)},j0.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},j0.prototype.get=function(t){return this._targetEvaluations.find(function(e){return e instanceof O0&&e.experiment.id===t.id})},j0.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)};var F0=j0;function j0(){this._stack=[],this._targetEvaluations=[]}z0.of=function(e,t,r,n){return new z0(e,t,r,n)},z0.by=function(e,t){return new z0(e.workspace,e.user,t,"A")},z0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var V0=z0;function z0(e,t,r,n){this.key=new D0("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}B0.of=function(e,t,r,n,i){return new B0(e,t,r,n,i)},B0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var H0=B0;function B0(e,t,r,n,i){this.key=new D0("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}K0.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},K0.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},K0.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var G0=K0;function K0(){}Y0.prototype.getVariation=function(e,t){if(0!==this.storages.length)for(var r=0,n=this.storages;r<n.length;r++){var i=n[r].getVariation(e,t);if(void 0!==i)return i}};var J0=Y0;function Y0(e){this.storages=e}q0.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},q0.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return G0.asNumber(e)},q0.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=G0.asNumber(t),e=G0.asNumber(e);a.isNullOrUndefined(t)||t<0||a.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},q0.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},q0.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},q0.prototype.clear=function(){this.listStorage.clear()};var $0=q0;function q0(e){this.listStorage=e}W0.prototype.add=function(e){this.evaluators.push(e)},W0.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(a.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)};var X0=W0;function W0(){this.evaluators=new Array}Q0.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},Q0.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},Q0.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var Z0=Q0;function Q0(e){this.conditionMatcherFactory=e}tb.prototype.decorate=function(e){return e};var eb=tb;function tb(){}nb.prototype.decorate=function(e){return"string"==typeof e?decodeURI(e):e};var rb=nb;function nb(){}ob.prototype.matches=function(e,t,r){void 0===r&&(r=new eb);var n=this.valueMatcherFactory.getMatcher(t.valueType),i=this.operatorMatcherFactory.getMatcher(t.operator),e=this.userValueMatches(e,t,n,i,r);return this.typeMatches(t.type,e)},ob.prototype.userValueMatches=function(e,t,r,n,i){return Array.isArray(e)?this.arrayMatches(e,t,r,n,i):this.singleMatches(e,t,r,n,i)},ob.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},ob.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},ob.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var ib=ob;function ob(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}ab.tryParse=function(e){try{return new URL(e)}catch(e){return}},ab.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:ab.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)};var sb=ab;function ab(){}ub.prototype.booleanMatches=function(e,t){return e===t},ub.prototype.numberMatches=function(e,t){return e===t},ub.prototype.stringMatches=function(e,t){return e===t},ub.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},ub.prototype.urlMatches=function(e,t){return decodeURI(sb.removePathnameTrailingSlash(e))===decodeURI(sb.removePathnameTrailingSlash(t))};A=ub;function ub(){}cb.prototype.booleanMatches=function(e,t){return!1},cb.prototype.numberMatches=function(e,t){return!1},cb.prototype.stringMatches=function(e,t){return e.includes(t)},cb.prototype.versionMatches=function(e,t){return!1},cb.prototype.urlMatches=function(e,t){return decodeURI(e.href).includes(t)};qs=cb;function cb(){}lb.prototype.booleanMatches=function(e,t){return!1},lb.prototype.numberMatches=function(e,t){return!1},lb.prototype.stringMatches=function(e,t){return e.startsWith(t)},lb.prototype.versionMatches=function(e,t){return!1},lb.prototype.urlMatches=function(e,t){return decodeURI(e.href).startsWith(t)};$a=lb;function lb(){}pb.prototype.booleanMatches=function(e,t){return!1},pb.prototype.numberMatches=function(e,t){return!1},pb.prototype.stringMatches=function(e,t){return e.endsWith(t)},pb.prototype.versionMatches=function(e,t){return!1},pb.prototype.urlMatches=function(e,t){return!1};O=pb;function pb(){}fb.prototype.booleanMatches=function(e,t){return!1},fb.prototype.numberMatches=function(e,t){return t<e},fb.prototype.stringMatches=function(e,t){return t<e},fb.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},fb.prototype.urlMatches=function(e,t){return!1};T=fb;function fb(){}hb.prototype.booleanMatches=function(e,t){return!1},hb.prototype.numberMatches=function(e,t){return t<=e},hb.prototype.stringMatches=function(e,t){return t<=e},hb.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},hb.prototype.urlMatches=function(e,t){return!1};var db=hb;function hb(){}vb.prototype.booleanMatches=function(e,t){return!1},vb.prototype.numberMatches=function(e,t){return e<t},vb.prototype.stringMatches=function(e,t){return e<t},vb.prototype.versionMatches=function(e,t){return e.isLessThan(t)},vb.prototype.urlMatches=function(e,t){return!1};xs=vb;function vb(){}yb.prototype.booleanMatches=function(e,t){return!1},yb.prototype.numberMatches=function(e,t){return e<=t},yb.prototype.stringMatches=function(e,t){return e<=t},yb.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},yb.prototype.urlMatches=function(e,t){return!1};ta=yb;function yb(){}gb.prototype.getMatcher=function(e){switch(e){case"IN":return gb.IN_MATCHER;case"CONTAINS":return gb.CONTAINS_MATCHER;case"STARTS_WITH":return gb.STARTS_WITH_MATCHER;case"ENDS_WITH":return gb.ENDS_WITH_MATCHER;case"GT":return gb.GT_MATCHER;case"GTE":return gb.GTE_MATCHER;case"LT":return gb.LT_MATCHER;case"LTE":return gb.LTE_MATCHER}},gb.IN_MATCHER=new A,gb.CONTAINS_MATCHER=new qs,gb.STARTS_WITH_MATCHER=new $a,gb.ENDS_WITH_MATCHER=new O,gb.GT_MATCHER=new T,gb.GTE_MATCHER=new db,gb.LT_MATCHER=new xs,gb.LTE_MATCHER=new ta;var mb=gb;function gb(){}Eb.prototype.matches=function(e,t,r){t=G0.asString(t),r=G0.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)};k=Eb;function Eb(){}wb.prototype.matches=function(e,t,r){t=G0.asNumber(t),r=G0.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)};gc=wb;function wb(){}bb.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)};r=bb;function bb(){}_b.prototype.matches=function(e,t,r){t=Bt.tryParse(t),r=Bt.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)};var Tb=_b;function _b(){}Ib.prototype.matches=function(e,t,r){t=sb.tryParse(t),r=G0.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.urlMatches(t,r)};N=Ib;function Ib(){}Ab.prototype.matches=function(e,t,r){return!1};Rs=Ab;function Ab(){}Nb.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return Nb.STRING_MATCHER;case"NUMBER":return Nb.NUMBER_MATCHER;case"BOOLEAN":return Nb.BOOLEAN_MATCHER;case"VERSION":return Nb.VERSION_MATCHER;case"URL":return Nb.URL_MATCHER;case"NULL":case"UNKNOWN":return Nb.NULL_MATCHER}},Nb.STRING_MATCHER=new k,Nb.NUMBER_MATCHER=new gc,Nb.BOOLEAN_MATCHER=new r,Nb.VERSION_MATCHER=new Tb,Nb.URL_MATCHER=new N,Nb.NULL_MATCHER=new Rs;var Ob=Nb;function Nb(){}Sb.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);if(a.isNullOrUndefined(e))return!1;var n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},Sb.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?rb:eb)};var Rb=Sb;function Sb(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}xb.prototype.resolveOrNull=function(e,t){switch(t.type){case"USER_ID":return e.identifiers[t.name];case"USER_PROPERTY":return e.properties[t.name];case"HACKLE_PROPERTY":return e.hackleProperties[t.name];case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"EVENT_PROPERTY":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}};var Cb=xb;function xb(){}Mb.prototype.matches=function(t,r,e){var n=this;if("SEGMENT"!=e.key.type)throw new Error("Unsupported TargetKeyType [".concat(e.key.type,"]"));var i=e.match.values.some(function(e){return n._matches(t,r,e)});switch(e.match.type){case"MATCH":return i;case"NOT_MATCH":return!i}},Mb.prototype._matches=function(e,t,r){if("string"!=typeof r)throw new Error("SegmentKey[".concat(r,"]"));var n=e.workspace.getSegmentOrNull(r);if(n)return this.segmentMatcher.matches(e,t,n);throw new Error("Segment[".concat(r,"]"))};var kb=Mb;function Mb(e){this.segmentMatcher=e}Ub.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},Ub.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var Pb=Ub;function Ub(e){this.userConditionMatcher=e}Lb.prototype.matches=function(e,t,r){switch(r.key.type){case"AB_TEST":return this.abTestMatcher.matches(e,t,r);case"FEATURE_FLAG":return this.featureFlagMatcher.matches(e,t,r);case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"EVENT_PROPERTY":case"SEGMENT":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}};var Db=Lb;function Lb(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}Fb.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(G0.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(a.isNullOrUndefined(n))return!1;var i=null!=(i=t.get(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},Fb.prototype.evaluate=function(e,t,r){r=V0.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e};tu=Fb;function Fb(e,t){this.evaluator=e,this.valueOperatorMatcher=t}Ne(zb,jb=tu),zb.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},zb.prototype.resolve=function(e,t){return e instanceof V0&&t.reason===d.TRAFFIC_ALLOCATED?t.with(d.TRAFFIC_ALLOCATED_BY_TARGETING):t},zb.prototype.evaluationMatches=function(e,t){return!!zb.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},zb.AB_TEST_MATCHED_REASONS=[d.OVERRIDDEN,d.TRAFFIC_ALLOCATED,d.EXPERIMENT_COMPLETED,d.TRAFFIC_ALLOCATED_BY_TARGETING];var jb,Vb=zb;function zb(e,t){return jb.call(this,e,t)||this}Ne(Gb,Hb=tu),Gb.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},Gb.prototype.resolve=function(e,t){return t},Gb.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var Hb,Bb=Gb;function Gb(e,t){return Hb.call(this,e,t)||this}Jb.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return!a.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},Jb.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var Kb=Jb;function Jb(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}$b.prototype.resolveOrNull=function(e,t){var r;switch(t.type){case"EVENT_PROPERTY":return null==(r=this.properties(e))?void 0:r[t.name];case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":case"SEGMENT":case"AB_TEST":case"FEATURE_FLAG":case"COHORT":throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},$b.prototype.properties=function(e){return s0.isTrackEvent(e)?e.event.properties:s0.isExposureEvent(e)||s0.isRemoteConfigEvent(e)?e.properties:void 0};var Yb=$b;function $b(){}Xb.prototype.matches=function(e,t,r){var n=this;if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));return!!e.user.cohorts&&e.user.cohorts.some(function(e){return n.valueOperatorMatcher.matches(e.id,r.match)})};var qb=Xb;function Xb(e){this.valueOperatorMatcher=e}Zb.prototype.getMatcher=function(e){switch(e){case"USER_ID":case"USER_PROPERTY":case"HACKLE_PROPERTY":return this.userConditionMatcher;case"EVENT_PROPERTY":return this.eventConditionMatcher;case"SEGMENT":return this.segmentConditionMatcher;case"AB_TEST":case"FEATURE_FLAG":return this.experimentConditionMatcher;case"COHORT":return this.cohortConditionMatcher}};var Wb=Zb;function Zb(e){var t=new ib(new Ob,new mb);this.userConditionMatcher=new Rb(new Cb,t),this.eventConditionMatcher=new Kb(new Yb,t),this.segmentConditionMatcher=new kb(new Pb(this.userConditionMatcher)),this.experimentConditionMatcher=new Db(new Vb(e,t),new Bb(e,t)),this.cohortConditionMatcher=new qb(t)}eT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},eT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},eT.prototype.resolveBucket=function(e,t){var t=e.workspace.getBucketOrNull(t.bucketId),r=e.user.identifiers[e.experiment.identifierType];if(r){t=this.bucketer.bucketing(t,r);if(t)return e.experiment._getVariationByIdOrNull(t.variationId)}};var Qb=eT;function eT(e){this.bucketer=e}var tT={murmurhash3_x86_32:function(e,t,r,n){for(var i,o=-4&(n=void 0===n?e.length:n),s=t,a=0;a<o;a+=4)i=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,i=this.mul32(i,3432918353),s=5*(s=(524287&(s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)))<<13|s>>>19)+3864292196|0;switch(i=0,n%4){case 3:i=(255&e.charCodeAt(2+o))<<16;case 2:i|=(255&e.charCodeAt(1+o))<<8;case 1:i|=255&e.charCodeAt(o),i=this.mul32(i,3432918353),s^=i=this.mul32(i=(131071&i)<<15|i>>>17,461845907)}return s=this.mul32(s=(s^=n)^s>>>16,2246822507),s=this.mul32(s^=s>>>13,3266489909),s^=s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},rT=(nT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},nT.prototype.calculateSlotNumber=function(e,t,r){r=tT.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},nT);function nT(){}oT.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},oT.end=function(){return new oT(void 0,void 0)},oT.decision=function(e,t){return new oT(e,t)},oT.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this.end(),n=0,i=e.reverse();n<i.length;n++)var o=i[n],r=this.decision(o,r);return r};var iT=oT;function oT(e,t){this.flowEvaluator=e,this.nextFlow=t}aT.prototype.evaluate=function(e,t,r){var n=this.overrideResolver.resolveOrNull(e,t);if(!n)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return O0.of(e,t,n,d.OVERRIDDEN);case"FEATURE_FLAG":return O0.of(e,t,n,d.INDIVIDUAL_TARGET_MATCH)}};var sT=aT;function aT(e){this.overrideResolver=e}cT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?O0.ofDefault(e,t,d.EXPERIMENT_DRAFT):r.evaluate(e,t)};var uT=cT;function cT(){}pT.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return O0.ofDefault(e,t,d.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return O0.ofDefault(e,t,d.FEATURE_FLAG_INACTIVE)}};var lT=pT;function pT(){}dT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return O0.of(e,t,r,d.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var fT=dT;function dT(){}vT.prototype.evaluate=function(e,t,r){if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));return this.experimentTargetDeterminer.isUserInExperimentTarget(e,t)?r.evaluate(e,t):O0.ofDefault(e,t,d.NOT_IN_EXPERIMENT_TARGET)};var hT=vT;function vT(e){this.experimentTargetDeterminer=e}mT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("AB_TEST"!==e.experiment.type)throw new Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);return n?n.isDropped?O0.ofDefault(e,t,d.VARIATION_DROPPED):O0.of(e,t,n,d.TRAFFIC_ALLOCATED):O0.ofDefault(e,t,d.TRAFFIC_NOT_ALLOCATED)};var yT=mT;function mT(e){this.actionResolver=e}ET.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return r.evaluate(e,t);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);if(!n)return r.evaluate(e,t);r=this.actionResolver.resolveOrNull(e,t,n.action);if(r)return O0.of(e,t,r,d.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var gT=ET;function ET(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}bT.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw new Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw new Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return O0.ofDefault(e,t,d.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return O0.of(e,t,n,d.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var wT=bT;function bT(e){this.actionResolver=e}_T.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var i=e.workspace.getContainerOrNull(n);if(i)return this.containerResolver.isUserInContainerGroup(e,t,i)?r.evaluate(e,t):O0.ofDefault(e,t,d.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var TT=_T;function _T(e){this.containerResolver=e}AT.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):O0.ofDefault(e,t,d.IDENTIFIER_NOT_FOUND)};var IT=AT;function AT(){}NT.prototype.isUserInExperimentTarget=function(t,r){var n=this;return 0===t.experiment.targetAudiences.length||t.experiment.targetAudiences.some(function(e){return n.targetMatcher.matches(t,r,e)})};var OT=NT;function NT(e){this.targetMatcher=e}ST.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var RT=ST;function ST(e){this.targetMatcher=e}xT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},xT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},xT.prototype._resolveUserOverride=function(e){var t=e.experiment,e=e.user.identifiers[t.identifierType];if(e){e=t.userOverrides.get(e);if(e)return t._getVariationByIdOrNull(e)}},xT.prototype._resolveSegmentOverride=function(t,r){var n=this,e=t.experiment.segmentOverrides.find(function(e){return n.targetMatcher.matches(t,r,e.target)});if(e)return this.actionResolver.resolveOrNull(t,r,e.action)};var CT=xT;function xT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}MT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(a.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(a.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(a.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var kT=MT;function MT(e){this.bucketer=e}UT.of=function(e,t,r,n){return new UT(r,t.targetEvaluations,e.inAppMessage,n)};var PT=UT;function UT(e,t,r,n){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n}LT.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):PT.of(e,t,d.UNSUPPORTED_PLATFORM)};var DT=LT;function LT(){}jT.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),PT.of(e,t,d.OVERRIDDEN,n)):r.evaluate(e,t)};var FT=jT;function jT(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}zT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?PT.of(e,t,d.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var VT=zT;function zT(){}BT.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?PT.of(e,t,d.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var HT=BT;function BT(){}KT.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):PT.of(e,t,d.NOT_IN_IN_APP_MESSAGE_PERIOD)};var GT=KT;function KT(){}YT.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?PT.of(e,t,d.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var JT=YT;function YT(e){this.hiddenMatcher=e}qT.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),PT.of(e,t,d.IN_APP_MESSAGE_TARGET,n)):PT.of(e,t,d.NOT_IN_IN_APP_MESSAGE_TARGET)};var $T=qT;function qT(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}WT.prototype.resolve=function(e,t){var e=e.inAppMessage,r=e.messageContext.defaultLang,n=e.messageContext.messages.find(function(e){return e.lang===r});if(a.isNullOrUndefined(n))throw new Error("InAppMessage must be decided [".concat(e.id,"]"));return n};var XT=WT;function WT(){}QT.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},QT.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)};var ZT=QT;function QT(){}t_.prototype.matches=function(t,r){var n=this,e=t.inAppMessage.targetContext.targets;return 0===e.length||e.some(function(e){return n.targetMatcher.matches(t,r,e)})};var e_=t_;function t_(e){this.targetMatcher=e}n_.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var r_=n_;function n_(e){this.storage=e}o_.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},o_.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(a.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(a.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return a.isNotNullOrUndefined(this.bucketer.bucketing(e,t))};var i_=o_;function o_(e,t){this.targetMatcher=e,this.bucketer=t}a_.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},a_.getOrNull=function(e){return a_.instances.get(e)},a_.register=function(e,t){return a_.instances.set(e,t),t},a_.instances=new Map;var s_=a_;function a_(){}c_.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},c_.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow};var u_=c_;function c_(e,t,r){var n=new rT,e=s_.register("targetMatcher",new Z0(new Wb(e))),i=new Qb(n),t=new CT(t,e,i),o=new kT(n),o=(this.abTestFlow=iT.of(new sT(t),new IT,new TT(o),new hT(new OT(e)),new uT,new lT,new fT,new yT(i)),this.featureFlagFlow=iT.of(new uT,new lT,new fT,new sT(t),new IT,new gT(new RT(e),i),new wT(i)),new XT);this.inAppMessageFlow=iT.of(new DT,new FT(new ZT,o),new VT,new HT,new GT,new JT(new r_(r)),new $T(new e_(e),o)),this.remoteConfigParameterTargetRuleDeterminer=new i_(e,n)}p_.prototype.create=function(r,e){var n=this,i=this.clock.currentMillis(),o=new Array,t=this.createEvent(r,e,i,{});return o.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[p_.ROOT_TYPE]=r.key.type,t[p_.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);o.push(e)}),o},p_.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof O0)return n[p_.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[p_.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[p_.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,s0.exposure(e.user,t,n,r);if(t instanceof x0)return s0.remoteConfig(e.user,t,c(c({},n),t.properties),r);throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},p_.ROOT_TYPE="$targetingRootType",p_.ROOT_ID="$targetingRootId",p_.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",p_.EXPERIMENT_VERSION_KEY="$experiment_version",p_.EXECUTION_VERSION_KEY="$execution_version";var l_=p_;function p_(e){this.clock=e}Ne(h_,f_=eu),h_.prototype.supports=function(e){return void 0!==e.inAppMessage},h_.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:PT.of(e,t,d.NOT_IN_IN_APP_MESSAGE_TARGET)};var f_,d_=h_;function h_(e){var t=f_.call(this)||this;return t.evaluationFlowFactory=e,t}y_.of=function(e,t,r,n){return new y_(e,t,r,n)},y_.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var v_=y_;function y_(e,t,r,n){this.key=new D0("IN_APP_MESSAGE",r.key),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}var m_=s.log,g_=(E_.create=function(e,t,r,n){var i=new X0,r=new J0(r),r=new u_(i,r,n),n=new S0(r),o=new P0(r.remoteConfigParameterTargetRuleDeterminer),r=new d_(r);return i.add(n),i.add(o),new E_(n,o,r,e,new l_(Le.instance),t,new w_,Le.instance)},E_.prototype.experiment=function(e,t,r){var n=this;if(!e)return m_.error("experimentKey must not be empty"),Xe.of(r,d.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return m_.warn("SDK not ready."),Xe.of(r,d.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return m_.warn("Experiment does not exist."),Xe.of(r,d.EXPERIMENT_NOT_FOUND);i=V0.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},E_.prototype.experiments=function(r){var n=this,i=new Dn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=V0.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},E_.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,F0.create()),t=null!=(t=e.config)?t:new je;return[e,Xe.of(e.variationKey,e.reason,t)]},E_.prototype.featureFlag=function(e,t){var r=this;if(!e)return m_.error("featureKey must not be empty"),Ze.off(d.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return m_.warn("SDK not ready."),Ze.off(d.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return m_.warn("FeatureFlag does not exist."),Ze.off(d.FEATURE_FLAG_NOT_FOUND);n=V0.of(n,t,e,"A"),t=this.featureFlagInternal(n),e=t[0],t=t[1];return this.eventFactory.create(n,e).forEach(function(e){return r.eventProcessor.process(e)}),t},E_.prototype.featureFlags=function(r){var n=this,i=new Dn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=V0.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},E_.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,F0.create()),t=null!=(t=e.config)?t:new je;return[e,"A"===e.variationKey?Ze.off(e.reason,t):Ze.on(e.reason,t)]},E_.prototype.inAppMessage=function(e,t){var r=this.workspaceFetcher.get();if(!r)return m_.warn("SDK not ready."),$e.of(d.SDK_NOT_READY);e=r.getInAppMessageOrNull(e);if(!e)return m_.warn("In app message does not exist."),$e.of(d.IN_APP_MESSAGE_NOT_FOUND);r=v_.of(r,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(r,F0.create());return $e.of(t.reason,t.inAppMessage,t.message)},E_.prototype.tryInAppMessage=function(t,e){var r,n=An.start();try{r=this.inAppMessage(t,e)}catch(e){m_.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=$e.of(d.EXCEPTION)}return wi.inAppMessage(n,t,r),r},E_.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?m_.warn("Event must be event type."):"object"!=typeof e||e.key&&"string"==typeof e.key?(n=(null==(n=this.workspaceFetcher.get())?void 0:n.getEventTypeOrNull(e.key))||new pt(0,e.key),this.eventProcessor.process(s0.track(n,e,t,r))):m_.warn("Event key must be not null. or event key must be string type."):m_.warn("event must not be null.")},E_.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=_0.toEvent(e),this.flush(),this.track(e,t),this.flush())},E_.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},E_.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(a.isNullOrUndefined(o))return m_.warn("SDK not ready."),Je.of(n,d.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return m_.warn("Remote config parameter does not exist."),Je.of(n,d.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=H0.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,F0.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),Je.of(t.value,t.reason)},E_.prototype.close=function(){this.eventProcessor.close()},E_);function E_(e,t,r,n,i,o,s,a){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.inAppMessageEvaluator=r,this.workspaceFetcher=n,this.eventFactory=i,this.eventProcessor=o,this.errorDedupDeterminer=s,this.clock=a}b_.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},b_.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var w_=b_;function b_(){}__.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},__.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var T_=__;function __(){this._installed=[],this._installations={onerror:O_,onunhandledrejection:N_}}var I_,A_=null;function O_(o,s){A_=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),A_&&A_.apply(this,arguments)}}function N_(r,n){I_=window.onunhandledrejection,window.onunhandledrejection=function(e){var t;try{"reason"in e?t=e.reason:"detail"in e&&"reason"in e.detail&&(t=e.detail.reason)}catch(e){}t instanceof Error&&r.trackException(t,n.resolve()),I_&&I_.apply(this,arguments)}}S_.prototype.read=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},S_.prototype.save=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},S_.prototype.add=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),[4,this.save(t.concat(r).slice(-this.maxSize))];case 2:return e.sent(),[2]}})})},S_.prototype.delete=function(n){return u(this,void 0,void 0,function(){var t,r=this;return l(this,function(e){switch(e.label){case 0:return[4,this.read()];case 1:return t=e.sent(),t=t.filter(function(e){return!r.isDeleteTarget(e,n)}),[4,this.save(t)];case 2:return e.sent(),[2]}})})},S_.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},S_.prototype.clear=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var R_=S_;function S_(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var C_=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},x_=(k_.builder=function(){return new M_},k_.empty=function(){return k_.builder().build()},k_.from=function(e){return new k_(e)},k_.fromDto=function(e){for(var t=k_.builder(),r=0,n=e.cohorts;r<n.length;r++){var i=n[r];t.put({identifier:i.identifier,cohorts:i.cohorts.map(function(e){return new qr(e)})})}return t.build()},Object.defineProperty(k_.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),k_.prototype.get=function(e){return this.cohorts.get(e)},k_.prototype.filterBy=function(e){var r=vt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return k_.from(e)},k_.prototype.asArray=function(){return this.cohorts.values()},k_.prototype.asComparable=function(){return this.cohorts},k_.prototype.toBuilder=function(){return new M_(this)},k_);function k_(e){this.cohorts=e}P_.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},P_.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},P_.prototype.build=function(){return new x_(this.cohorts)};var M_=P_;function P_(e){this.cohorts=new Dn(Ce.isEqual),e&&this.putAll(e)}var w="model",t="name",S="type",R="vendor",o="version",Id="architecture",Zd="console",E="mobile",C="tablet",M="smarttv",b="wearable",U_=(P.parse=function(e){return{browser:P.getBrowser(e),cpu:P.getCPU(e),device:P.getDevice(e),engine:P.getEngine(e),os:P.getOS(e)}},P.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return P.mapper.rgx.call(t,e,P.regexes.browser),t.major=P.util.major(t.version),t},P.getCPU=function(e){var t={architecture:void 0};return P.mapper.rgx.call(t,e,P.regexes.cpu),t},P.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return P.mapper.rgx.call(t,e,P.regexes.device),t},P.getEngine=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.getOS=function(e){var t={name:void 0,version:void 0};return P.mapper.rgx.call(t,e,P.regexes.os),t},P.util={extend:function(e,t){var r,n={};for(r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},P.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[t,o],[/(opios)[\/\s]+([\w\.]+)/i],[[t,"Opera Mini"],o],[/\s(opr)\/([\w\.]+)/i],[[t,"Opera"],o],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i],[t,o],[/(konqueror)\/([\w\.]+)/i],[[t,"Konqueror"],o],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[t,"IE"],o],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[t,"Edge"],o],[/(yabrowser)\/([\w\.]+)/i],[[t,"Yandex"],o],[/(Avast)\/([\w\.]+)/i],[[t,"Avast Secure Browser"],o],[/(AVG)\/([\w\.]+)/i],[[t,"AVG Secure Browser"],o],[/(puffin)\/([\w\.]+)/i],[[t,"Puffin"],o],[/(focus)\/([\w\.]+)/i],[[t,"Firefox Focus"],o],[/(opt)\/([\w\.]+)/i],[[t,"Opera Touch"],o],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[t,"UCBrowser"],o],[/(comodo_dragon)\/([\w\.]+)/i],[[t,/_/g," "],o],[/(windowswechat qbcore)\/([\w\.]+)/i],[[t,"WeChat(Win) Desktop"],o],[/(micromessenger)\/([\w\.]+)/i],[[t,"WeChat"],o],[/(brave)\/([\w\.]+)/i],[[t,"Brave"],o],[/(whale)\/([\w\.]+)/i],[[t,"Whale"],o],[/(qqbrowserlite)\/([\w\.]+)/i],[t,o],[/(QQ)\/([\d\.]+)/i],[t,o],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[t,o],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[t,o],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[t,o],[/(MetaSr)[\/\s]?([\w\.]+)/i],[t],[/(LBBROWSER)/i],[t],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[o,[t,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[o,[t,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[t,o],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[o,[t,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[t,/(.+)/,"$1 WebView"],o],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[t,/(.+(?:g|us))(.+)/,"$1 $2"],o],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[t,"Chrome Mobile"],o],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[o,[t,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[t,"Sailfish Browser"],o],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[t,o],[/(dolfin)\/([\w\.]+)/i],[[t,"Dolphin"],o],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[t,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[t,"Opera Coast"],o],[/fxios\/([\w\.-]+)/i],[o,[t,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[o,[t,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[o,t],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[t,"GSA"],o],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[t,[o,(P.mapper={rgx:function(e,t){for(var r,n,i,o,s,a=0;a<t.length&&!o;){for(var u=t[a],c=t[a+1],l=r=0;l<u.length&&!o;)if(o=u[l++].exec(e))for(n=0;n<c.length;n++)s=o[++r],"object"==typeof(i=c[n])&&0<i.length?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(P.util.has(t[r][n],e))return"?"===r?void 0:r}else if(P.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(P.maps={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}}).browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[t,o],[/(navigator|netscape)\/([\w\.-]+)/i],[[t,"Netscape"],o],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)/i,/(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[t,o]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[Id,"amd64"]],[/(ia32(?=;))/i],[[Id,P.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[Id,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[Id,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[Id,/ower/,"",P.util.lowerize]],[/(sun4\w)[;\)]/i],[[Id,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[Id,P.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[w,R,[S,C]],[/applecoremedia\/[\w\.]+ \((ipad)/],[w,[R,"Apple"],[S,C]],[/(apple\s{0,1}tv)/i],[[w,"Apple TV"],[R,"Apple"],[S,M]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[R,w,[S,C]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[w,[R,"Amazon"],[S,C]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[w,P.mapper.str,P.maps.device.amazon.model],[R,"Amazon"],[S,E]],[/android.+aft([bms])\sbuild/i],[w,[R,"Amazon"],[S,M]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[w,R,[S,E]],[/\((ip[honed|\s\w*]+);/i],[w,[R,"Apple"],[S,E]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[R,w,[S,E]],[/\(bb10;\s(\w+)/i],[w,[R,"BlackBerry"],[S,E]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[w,[R,"Asus"],[S,C]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[R,"Sony"],[w,"Xperia Tablet"],[S,C]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[w,[R,"Sony"],[S,E]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[R,w,[S,Zd]],[/android.+;\s(shield)\sbuild/i],[w,[R,"Nvidia"],[S,Zd]],[/(playstation\s[34portablevi]+)/i],[w,[R,"Sony"],[S,Zd]],[/(sprint\s(\w+))/i],[[R,P.mapper.str,P.maps.device.sprint.vendor],[w,P.mapper.str,P.maps.device.sprint.model],[S,E]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[R,[w,/_/g," "],[S,E]],[/(nexus\s9)/i],[w,[R,"HTC"],[S,C]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[w,[R,"Huawei"],[S,E]],[/android.+(bah2?-a?[lw]\d{2})/i],[w,[R,"Huawei"],[S,C]],[/(microsoft);\s(lumia[\s\w]+)/i],[R,w,[S,E]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[w,[R,"Microsoft"],[S,Zd]],[/(kin\.[onetw]{3})/i],[[w,/\./g," "],[R,"Microsoft"],[S,E]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/mot[\s-]?(\w*)/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[w,[R,"Motorola"],[S,E]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[w,[R,"Motorola"],[S,C]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[R,P.util.trim],[w,P.util.trim],[S,M]],[/hbbtv.+maple;(\d+)/i],[[w,/^/,"SmartTV"],[R,"Samsung"],[S,M]],[/\(dtv[\);].+(aquos)/i],[w,[R,"Sharp"],[S,M]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[R,"Samsung"],w,[S,C]],[/smart-tv.+(samsung)/i],[R,[S,M],w],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[R,"Samsung"],w,[S,E]],[/sie-(\w*)/i],[w,[R,"Siemens"],[S,E]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[R,"Nokia"],w,[S,E]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[w,[R,"Acer"],[S,C]],[/android.+([vl]k\-?\d{3})\s+build/i],[w,[R,"LG"],[S,C]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[R,"LG"],w,[S,C]],[/(lg) netcast\.tv/i],[R,w,[S,M]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[w,[R,"LG"],[S,E]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[R,w,[S,C]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[w,[R,"Lenovo"],[S,C]],[/(lenovo)[_\s-]?([\w-]+)/i],[R,w,[S,E]],[/linux;.+((jolla));/i],[R,w,[S,E]],[/((pebble))app\/[\d\.]+\s/i],[R,w,[S,b]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[R,w,[S,E]],[/crkey/i],[[w,"Chromecast"],[R,"Google"],[S,M]],[/android.+;\s(glass)\s\d/i],[w,[R,"Google"],[S,b]],[/android.+;\s(pixel c)[\s)]/i],[w,[R,"Google"],[S,C]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[w,[R,"Google"],[S,E]],[/android.+;\s(\w+)\s+build\/hm\1/i,/android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i,/android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i,/android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i],[[w,/_/g," "],[R,"Xiaomi"],[S,E]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[w,/_/g," "],[R,"Xiaomi"],[S,C]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[w,[R,"Meizu"],[S,E]],[/(mz)-([\w-]{2,})/i],[[R,"Meizu"],w,[S,E]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[w,[R,"OnePlus"],[S,E]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[w,[R,"RCA"],[S,C]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[w,[R,"Dell"],[S,C]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[w,[R,"Verizon"],[S,C]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[R,"Barnes & Noble"],w,[S,C]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[w,[R,"NuVision"],[S,C]],[/android.+;\s(k88)\sbuild/i],[w,[R,"ZTE"],[S,C]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[w,[R,"Swiss"],[S,E]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[w,[R,"Swiss"],[S,C]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[w,[R,"Zeki"],[S,C]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[R,"Dragon Touch"],w,[S,C]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[w,[R,"Insignia"],[S,C]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[w,[R,"NextBook"],[S,C]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[R,"Voice"],w,[S,E]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[R,"LvTel"],w,[S,E]],[/android.+;\s(PH-1)\s/i],[w,[R,"Essential"],[S,E]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[w,[R,"Envizen"],[S,C]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[R,w,[S,C]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[w,[R,"MachSpeed"],[S,C]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[R,w,[S,C]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[w,[R,"Rotor"],[S,C]],[/android.+(KS(.+))\s+build/i],[w,[R,"Amazon"],[S,C]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[R,w,[S,C]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[S,P.util.lowerize],R,w],[/[\s\/\(](smart-?tv)[;\)]/i],[[S,M]],[/(android[\w\.\s\-]{0,9});.+build/i],[w,[R,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[o,[t,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[o,[t,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[t,o],[/rv\:([\w\.]{1,9}).+(gecko)/i],[o,t]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[t,o],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[t,P.mapper.str,P.maps.os.windows],[o,P.mapper.str,P.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[t,"Windows"],[o,P.mapper.str,P.maps.os.windows.version]],[/\((bb)(10);/i],[[t,"BlackBerry"],o],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[t,o],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[t,"Symbian"],o],[/\((series40);/i],[t],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[t,"Firefox OS"],o],[/(nintendo|playstation)\s([wids34portablevu]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[[t,"Linux"],o],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[t,"Chromium OS"],o],[/(sunos)\s?([\w\.\d]*)/i],[[t,"Solaris"],o],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[t,"Linux"],o],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[t,"iPhone"],[o,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[t,"iPad"],[o,/_/g,"."]],[/(haiku)\s(\w+)/i],[t,o],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[o,/_/g,"."],[t,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[t,"Mac"],[o,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[t,o]]},P);function P(){}L_.generate=function(e){o=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},document:{location:o={hostname:"",pathname:"",host:"",search:"",protocol:""},title:""},location:o,screen:{width:"",height:""}}:e;var t,r,n,i,o,e=U_.parse(o.navigator.userAgent),s=e.browser,a=e.os,e=e.device,u=(o.location.protocol||"").replace(":",""),c=o.screen,l=(null==(l=o.navigator.languages)?void 0:l[0])||"",p=l.split("-")[0],f=(null!=(f=e.type)?f:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),d=a.name||"",h="",v="";try{d=null!=(r=null==(t=d.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:d,h=null!=(i=null==(n=c.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",v=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:s.name||"",browserMajorVersion:s.major||"",browserVersion:s.version||"",osName:d,osVersion:a.version||"",deviceModel:e.model||"",deviceType:f,deviceVendor:e.vendor||"",deviceBrand:e.vendor||"",locale:l,language:p,orientation:h,userAgent:o.navigator.userAgent||"",pagePath:o.location.pathname||"",pageTitle:o.document.title||"",host:o.location.host||"",url:o.location.href||"",protocol:u,referrer:o.document.referrer||"",queryParameter:o.location.search||"",screenWidth:c.width||"",screenHeight:c.height||"",timeZone:v}};var D_=L_;function L_(){}j_.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return H_.of(G_(e,this.hackleDeviceId),x_.empty())},j_.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(j_.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),j_.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},j_.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},j_.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},j_.prototype.hackleUser=function(e){var t=(new yt).addIdentifiers(e.user.identifiers||{}).add(dt.ID,e.user.id||this.hackleDeviceId).add(dt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(dt.HACKLE_DEVICE,this.hackleDeviceId),t=(a.isNotNullOrUndefined(e.user.userId)&&t.add(dt.USER,e.user.userId),t.build()),r=this.campaignParser.parse();return{identifiers:t,properties:c(c({},r),e.user.properties),hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts}},j_.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?D_.generate(window):e)||{}},j_.prototype.setUser=function(e){return this.updateUser(e).user},j_.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},j_.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},j_.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},j_.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},j_.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},j_.prototype.saveUser=function(e){this.storage.saveUser(e)},j_.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,C_(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},j_.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=G_(r,n.hackleDeviceId),C_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},j_.prototype.operateProperties=function(r){return this.updateContext(function(e){var t=null!=(t=e.properties)?t:{},t=r.operate(new Map(Object.entries(t)));return c(c({},e),{properties:a.fromMap(t)})})},j_.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.cohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},j_.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var F_=j_;function j_(e,t,r,n,i,o,s){this.hackleDeviceId=e,this.storage=t,this.cohortFetcher=r,this.campaignParser=n,this.clock=i,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(o,s),this.storage.saveUser(this.context.user)}z_.prototype.getUser=function(){var e=this.deviceId||void 0,t=this.userId||void 0;return void 0!==e||void 0!==t?{deviceId:e,userId:t}:null},z_.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(z_.prototype,"deviceId",{get:function(){return this.storage.getItem(hn)},enumerable:!1,configurable:!0}),Object.defineProperty(z_.prototype,"userId",{get:function(){return this.storage.getItem(dn)},enumerable:!1,configurable:!0}),z_.prototype.setDeviceId=function(e){this.setId(hn,e)},z_.prototype.setUserId=function(e){this.setId(dn,e)},z_.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var V_=z_;function z_(e){this.storage=e}B_.of=function(e,t){return new B_(e,t.filterBy(e))},B_.prototype.with=function(e){return B_.of(e,this.cohorts.filterBy(e))},B_.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return B_.of(this.user,e)};var H_=B_;function B_(e,t){this.user=e,this.cohorts=t}var G_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},K_=(Object.defineProperty(J_.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(J_.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:J_.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(J_.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),J_.prototype.addListener=function(e){this.sessionListeners.push(e)},J_.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},J_.prototype.startNewSessionIfNeeded=function(e,t){var r=this._lastEventTime;return null!==r&&null!==this._currentSessionId&&t-r<this.sessionTimeoutMillis?(this.updateLastEventTime(t),this._currentSessionId):this.startNewSession(e,e,t)},J_.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(fn,"".concat(e))},J_.prototype.endSession=function(t){var r=this._currentSessionId,n=this._lastEventTime;null!==r&&null!==n&&this.sessionListeners.forEach(function(e){return e.onSessionEnded(r,t,n)})},J_.prototype.newSession=function(t,r){var n="".concat(r,".").concat(H().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},J_.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(pn,e)},J_.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(pn)},J_.prototype.loadLastEventTime=function(){var e=this.storage.getItem(fn);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},J_.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},J_.EMPTY_SESSION_ID="0.ffffffff",J_);function J_(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}$_.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},$_.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},$_.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},$_.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var Y_=$_;function $_(){this.storage=window.localStorage}X_.postfix=function(e,t){return new X_(e,function(e){return"".concat(e).concat(t)})},X_.prefix=function(e,t){return new X_(e,function(e){return"".concat(t).concat(e)})},X_.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},X_.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},X_.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var q_=X_;function X_(e,t){this.delegate=e,this.transform=t}Z_.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Z_.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},Z_.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},Z_.prototype.getVictimIndex=function(e){var t=this.getRemainListSize();try{var r=JSON.stringify(e),n=this.getList(),i=0;return n.findIndex(function(e){return(i+=JSON.stringify(e).length)+t>=r.length})}catch(e){return-1}},Z_.prototype.getList=function(){try{var e=this.delegate.getItem(this.listKey);if(!e)return[];var t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return[]}},Z_.prototype.entries=function(){return this.getList().flatMap(Object.entries)},Z_.prototype.setItem=function(e,t){var r;try{this.removeItem(e);var n=this.getList(),i=((r={})[e]=t,r);if(!this.isAddableItem(i)){var o=this.getVictimIndex(i);if(o<0)return;n=n.slice(o+1)}var s=JSON.stringify(n.concat(i));this.delegate.setItem(this.listKey,s)}catch(e){}},Z_.prototype.getItem=function(t){var r=this,e=this.getList().find(function(e){return r.isEqualItem(e,t)});if(e&&e[t])return e[t]},Z_.prototype.removeItem=function(t){var r=this,e=this.getList();try{var n=e.filter(function(e){return!r.isEqualItem(e,t)}),i=JSON.stringify(n);this.delegate.setItem(this.listKey,i)}catch(e){}},Z_.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var W_=Z_;function Z_(e,t,r){void 0===r&&(r=4096);var n=this;this.delegate=e,this.listKey=t,this.encodedListCharLen=6,this.resolveMaxLength=function(e){e-=n.encodedListCharLen;return e<0?0:e},this.maxLength=this.resolveMaxLength(r)}eI.prototype.currentUser=function(){return this.userManager.resolve()},eI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},eI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},eI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},eI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},eI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},eI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},eI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},eI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},eI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},eI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},eI.prototype.increment=function(e,t){ni.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var Q_=eI;function eI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}rI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},rI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},rI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},rI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},rI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},rI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},rI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},rI.monitoring=function(e){return"".concat(e,"/metrics")};var tI=rI;function rI(){}iI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(a.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},iI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},iI.prototype.key=function(e){return"".concat(e.key)};var nI=iI;function iI(e){this.storage=e}sI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var oI=sI;function sI(e){this.handlers=e}uI.prototype.handle=function(e,t){e.close()},uI.prototype.supports=function(e){return"CLOSE"===e.type};var aI=uI;function uI(){}lI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},lI.prototype.supports=function(e){return"WEB_LINK"===e.type};var cI=lI;function lI(e){this.urlHandler=e}fI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},fI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var pI=fI;function fI(e){this.urlHandler=e}hI.prototype.handle=function(e,t){var r=this.clock.currentMillis()+hI.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},hI.prototype.supports=function(e){return"HIDDEN"===e.type},hI.HIDE_EXPIRATION=864e5;var dI=hI;function hI(e,t){this.storage=e,this.clock=t}yI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},yI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var vI=yI;function yI(e){this.urlHandler=e}gI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},gI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var mI=gI;function gI(e){this.urlHandler=e}wI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},wI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var EI=wI;function wI(e){this.urlHandler=e}TI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){s.log.error("Invalid url: ".concat(t.value))}},TI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var bI=TI;function TI(e){this.urlHandler=e}II.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},II.prototype.createTrackEvent=function(e,t){var r;switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c({in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,title_text:null==(r=null==(r=t.message.text)?void 0:r.title)?void 0:r.text,body_text:null==(r=null==(r=t.message.text)?void 0:r.body)?void 0:r.text,button_text:t.message.buttons.map(function(e){return e.text}),image_url:t.message.images.map(function(e){return e.imagePath})},t.properties)};case"CLOSE":return{key:"$in_app_close",properties:{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key}};case"ACTION":return{key:"$in_app_action",properties:{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,action_type:e.action.type,action_area:e.area,action_value:e.action.value,button_text:e.text}}}};var _I=II;function II(e){this.core=e}OI.prototype.present=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(this.currentMessageView)return[2];if(this.opening)return[2];this.opening=!0,t=null,e.label=1;case 1:return e.trys.push([1,3,4,5]),t=this.messageViewFactory.create(r,this),[4,(this.currentMessageView=t).open()];case 2:return e.sent(),[3,5];case 3:return e.sent(),null!=t&&t.close(),[3,5];case 4:return this.opening=!1,[7];case 5:return[2]}})})};var AI=OI;function OI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}RI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},RI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var NI=RI;function RI(e,t,r){var n=this;this.userEventEmitter=e,this.determiner=t,this.presenter=r,this.onEvent=function(e){e=n.determiner.determineOrNull(e);e&&n.presenter.present(e)},this.initialize()}var SI=function(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n},CI=(xI.prototype.determineOrNull=function(e){var t=this.workspaceFetcher.get();if(t)for(var r=0,n=t.getInAppMessages();r<n.length;r++){var i=n[r];if(this.eventMatcher.matches(t,i,e)){i=this.context(i,e);if(i)return i}}},xI.prototype.context=function(e,t){e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return new SI(e.inAppMessage,e.message,t.user,Me.sanitize({decision_reason:e.reason}))},xI);function xI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}MI.prototype.open=function(){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),window.addEventListener(MI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),[4,this.scriptLoader.load()];case 1:return e.sent(),(t=this.addContainer()).style.display="none",t.classList.add("".concat(MI.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson()})];case 2:return e.sent(),t.classList.remove("".concat(MI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleEvent({type:"IMPRESSION"}),[3,4];case 3:return e.sent(),this.close(),[3,4];case 4:return[2]}})})},MI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(MI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},MI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(MI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},MI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},MI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},MI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},MI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",MI.CONTAINER_CLASS_NAME="hackle-iam";var kI=MI;function MI(e,t,r){var n=this;this.scriptLoader=e,this.context=t,this.ui=r,this.container=null,this.renderer=null,this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===MI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}UI.prototype.create=function(e,t){return new kI(this.scriptLoader,e,t)};var PI=UI;function UI(e){this.scriptLoader=e}LI.prototype.load=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return window.HackleInAppMessageRenderer?[2]:(t=this.createScript(),document.head.appendChild(t),[4,this.waitForLoad(t)]);case 1:return[2,e.sent()]}})})},LI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},LI.prototype.waitForLoad=function(o){return new Promise(function(e,t){function r(){o.removeEventListener("error",i),o.removeEventListener("load",n)}var n=function(){r(),e(o)},i=function(e){r(),t(e.message)};o.addEventListener("load",n),o.addEventListener("error",i)})};var DI=LI;function LI(e){this.scriptUrl=e}jI.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},jI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=VI.of(e,t,r);return this.targetMatcher.anyMatches(e,F0.create(),n.targets)};var FI=jI;function jI(e){this.targetMatcher=e}zI.of=function(e,t,r){return new zI(new D0("IN_APP_MESSAGE",r.key),e,t.user,t)};var VI=zI;function zI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}BI.prototype.isTriggerTarget=function(e,t,r){if(!t.eventTrigger.frequencyCap)return!0;var n=this.createMatchContexts(t.eventTrigger.frequencyCap);if(0===n.length)return!0;for(var i=0,o=this.storage.get(t);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(r,s))return!1;return!0},BI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new GI(new JI(i)))}return e.durationCap&&t.push(new GI(new $I(e.durationCap))),t};var HI=BI;function BI(e){this.storage=e}KI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var GI=KI;function KI(e){this.matchCount=0,this.predicate=e}Object.defineProperty(YI.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),YI.prototype.matches=function(e,t){e=e.user.identifiers[this.identifierCap.identifierType];if(a.isNullOrUndefined(e))return!1;t=t.identifiers[this.identifierCap.identifierType];return!a.isNullOrUndefined(t)&&e===t};var JI=YI;function YI(e){this.identifierCap=e}Object.defineProperty(qI.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),qI.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis};var $I=qI;function qI(e){this.durationCap=e}WI.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},WI.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var XI=WI;function WI(e){this.storage=e}QI.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var ZI=QI;function QI(e){this.processors=e}tA.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},tA.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>tA.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-tA.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},tA.prototype.supports=function(e){return"IMPRESSION"===e.type},tA.IMPRESSION_MAX_SIZE=100;var eA=tA;function tA(e){this.impressionStorage=e}nA.prototype.process=function(e,t,r){},nA.prototype.supports=function(e){return"CLOSE"===e.type};var rA=nA;function nA(){}oA.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},oA.prototype.supports=function(e){return"ACTION"===e.type};var iA=oA;function oA(e){this.actionHandlerFactory=e}aA.prototype.handle=function(e,t){var r=this.clock.currentMillis(),n=(this.eventTracker.track(e.context,t,r),this.eventProcessorFactory.get(t));n&&n.process(e,t,r)};var sA=aA;function aA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}cA.prototype.matches=function(e,t,r){return!!s0.isTrackEvent(r)&&(!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r))};var uA=cA;function cA(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}pA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var lA=pA;function pA(e){this.handlers=e}dA.prototype.handle=function(e,t){e.close()},dA.prototype.supports=function(e){return"CLOSE"===e.type};var fA=dA;function dA(){}vA.prototype.handle=function(e,t){var r=Yr.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},vA.prototype.supports=function(e){return"ACTION"===e.type};var hA=vA;function vA(e){this.eventHandler=e}mA.prototype.open=function(e){window.location.href=e.href};var yA=mA;function mA(){}EA.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var gA=EA;function EA(){}bA.prototype.open=function(e){window.open(e.href)};var wA=bA;function bA(){}_A.prototype.open=function(e){window.location.replace(e)};var TA=_A;function _A(){}function IA(e,t,r){return null===e||(!NA(t,AA)||r.current!==r.referrer)&&!NA(e,t)}var AA={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,gclid:void 0,fbclid:void 0},OA={current:void 0,referrer:void 0},NA=function(t,r){return Object.keys(AA).every(function(e){return t[e]===r[e]})},RA=(SA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},AA),t),n=new so,i=0,o=Object.entries(t);i<o.length;i++){var s=o[i],a=s[0],s=s[1];s?n.set(a,s):n.unset(a)}var t=n.build(),u=t.toEvent(),e=this.userManager.toHackleUser(e);this.core.track(u,e,r),this.userManager.updateUserProperties(t)},SA.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();IA(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},SA.prototype.onSessionEnded=function(e,t,r){},SA.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},SA);function SA(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}xA.prototype.get=function(){var e=this.storage.getItem(vn);return e?JSON.parse(e):null},xA.prototype.set=function(e){this.storage.setItem(vn,JSON.stringify(e))};var CA=xA;function xA(e){this.storage=e}MA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},MA.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var i=n[r].split("="),o=i[0],i=i[1];e&&!e(o,i)||(t[o]=decodeURIComponent(i))}return t},MA.getQueryParams=function(e){return"undefined"==typeof window?{}:new MA(window.location.search).getQueryParams(e)};var kA=MA;function MA(e){this.search=e}UA.extractDomain=function(e){var t=this.DOMAIN_MATCH_REGEX,r=e.split("."),r=r[r.length-1],r=((4<r.length||"com"===r||"org"===r)&&(t=this.SIMPLE_DOMAIN_MATCH_REGEX),e.match(t));return r?r[0]:e},UA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,UA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var PA=UA;function UA(){}LA.prototype.parse=function(){var e=kA.getQueryParams(function(e,t){return!!t});return{utm_campaign:e[FA],utm_content:e[jA],utm_id:e[VA],utm_medium:e[zA],utm_source:e[HA],utm_term:e[BA],gclid:e[GA],fbclid:e[KA]}},LA.prototype.parseDomain=function(){if("undefined"==typeof window)return OA;return{current:PA.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,PA.extractDomain(e)}()}};var DA=LA;function LA(){}var FA="utm_campaign",jA="utm_content",VA="utm_id",zA="utm_medium",HA="utm_source",BA="utm_term",GA="gclid",KA="fbclid",JA=(YA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},YA.prototype.send=function(e){var t=e.experiment.key,r=e.variationKey,t="HACKLE-EXPERIMENT_".concat(t,"_V").concat(e.experiment.version,"-").concat(r);try{window.gtag("event","experience_impression",{exp_variant_string:t})}catch(e){s.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},YA);function YA(e,t){var r=this;this.userEventEmitter=e,this.determiner=t,this.onEvent=function(e){e=r.determiner.determineTargetExposureOrNull(e);e&&r.send(e)},this.initialize()}qA.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!t||!t.getAttributes().integration_ga_experiment||!s0.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==d.TRAFFIC_ALLOCATED?null:e};var $A=qA;function qA(e){this.workspaceFetcher=e}var XA={user:void 0,debug:!1,log_disabled:!1,auto_track_page_view:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://client-sdk.hackle.io",eventUrl:"https://event.hackle.io",monitoringUrl:"https://monitoring.hackle.io",cdnUrl:"https://static.hackle.io",sameSiteCookie:"LAX",secureCookie:!1,SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.27.2",IAM_RENDERER_VERSION_HEADER:"0.0.3"},WA=(ZA.config=function(e){return c(c({},XA),e)},ZA.logging=function(e){s.initCounter(function(e){return ni.counter("log",{level:e})}),s.setLogLevel(Te.INFO),e.log_disabled?s.setLogLevel(Te.DISABLE):e.debug&&s.setLogLevel(Te.DEBUG)},ZA.sdk=function(e,t){return s.log.debug("SDK key: ".concat(e)),e||s.log.error("invalid sdk key: '".concat(e,"' (expected: not null, not undefined and not empty string)")),{key:e,name:t.SDK_NAME_HEADER,version:t.SDK_VERSION_HEADER}},ZA.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},ZA.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},ZA.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(s.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},ZA);function ZA(){}eO.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},eO.prototype.sync=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.sync())}))];case 1:return e.sent(),[2]}})})},eO.prototype.syncOnly=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:if(t=this.synchronizations.find(function(e){return e.type===r}))return[4,t.synchronizer.sync()];throw new Error("Unsupported SynchronizerType [".concat(r,"]"));case 1:return e.sent(),[2]}})})},eO.prototype.close=function(){return u(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizations.map(function(e){return t.safe(e.synchronizer.close())}))];case 1:return e.sent(),[2]}})})},eO.prototype.safe=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,r];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})};var QA=eO;function eO(){this.synchronizations=[]}rO.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.sync()];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},rO.prototype.syncOnly=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.delegate.syncOnly(r)];case 1:return e.sent(),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},rO.prototype.start=function(){var e=this;-1!==this.intervalMillis&&null===this.pollingJob&&(this.pollingJob=this.scheduler.schedulePeriodically(this.intervalMillis,this.intervalMillis,function(){return e.sync()}))},rO.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},rO.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})};var tO=rO;function rO(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}iO.prototype.schedule=function(e,t){e=new oO(e,t);return e.start(),e},iO.prototype.schedulePeriodically=function(e,t,r){e=new aO(e,t,r);return e.start(),e};var nO=iO;function iO(){}sO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},sO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var oO=sO;function sO(e,t){this.delayMillis=e,this.task=t,this.timeout=null}uO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},uO.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},uO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var aO=uO;function uO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}lO.prototype.fetchIfModified=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},lO.prototype.createRequest=function(e){var t=ai.builder().url(this.url).method("GET");return null!==e&&t.addHeader(di.IF_MODIFIED_SINCE,e),t.build()},lO.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=An.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ti.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),Ti.record("get.workspace",t,null),r;case 4:return[2]}})})},lO.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is empty");return{config:JSON.parse(e.body),lastModified:e.headers.get(di.LAST_MODIFIED)}};var cO=lO;function lO(e,t){this.url=e,this.transport=t}fO.prototype.fetch=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.createRequest(r),[4,this.execute(t)];case 1:return t=e.sent(),[2,this.handleResponse(t)]}})})},fO.prototype.createRequest=function(e){e={identifiers:vt(e)},e=Ee.encodeURL(JSON.stringify(e));return ai.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},fO.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=An.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ti.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),Ti.record("get.cohorts",t,null),r;case 4:return[2]}})})},fO.prototype.handleResponse=function(e){if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is null");e=JSON.parse(e.body);return x_.fromDto(e)};var pO=fO;function fO(e,t){this.url=e,this.transport=t}hO.prototype.getExperiments=function(){return Array.from(this.experiments.values())},hO.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},hO.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},hO.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},hO.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},hO.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},hO.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},hO.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},hO.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},hO.prototype.getContainerOrNull=function(e){return this.containers.get(e)},hO.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},hO.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},hO.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},hO.prototype.getAttributes=function(){return this.attributes},hO.from=function(e){return new hO(p.mapNotNullOrUndefined(e.experiments,function(e){return it.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.experiments,function(e){return it.fromJson("AB_TEST",e)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return it.fromJson("FEATURE_FLAG",e)}),e.buckets.map(at.fromJson),e.events.map(pt.fromJson),p.mapNotNullOrUndefined(e.segments,xt.fromJson),e.containers.map(Mt.fromJson),e.parameterConfigurations.map(rt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Lt.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,pr.fromJson),e.workspace.attributes)};var dO=hO;function hO(e,t,r,n,i,o,s,a,u,c,l){this.experiments=p.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=p.associateBy(t,function(e){return e.key}),this.featureFlags=p.associateBy(r,function(e){return e.key}),this.buckets=p.associateBy(n,function(e){return e.id}),this.eventTypes=p.associateBy(i,function(e){return e.key}),this.segments=p.associateBy(o,function(e){return e.key}),this.containers=p.associateBy(s,function(e){return e.id}),this.parameterConfigurations=p.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=p.associateBy(u,function(e){return e.key}),this.inAppMessages=p.associateBy(c,function(e){return e.key}),this.attributes=l}yO.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},yO.prototype.setWorkspace=function(e){try{this.workspace=dO.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},yO.prototype.get=function(){return this.workspace},yO.prototype.sync=function(){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.workspaceFetcher.fetchIfModified(this.lastModified)];case 1:return(t=e.sent())&&(this.setConfig(t),this.workspaceConfigStorage.set(t)),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync workspace: ".concat(t)),[3,3];case 3:return[2]}})})},yO.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var vO=yO;function yO(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}gO.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.shutdownDispatch(e):this.normalDispatch(e)},gO.prototype.shutdownDispatch=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.retryManager.add(r)];case 1:return e.sent(),[4,this.shutdownTransport.send(r)];case 2:return(t=e.sent()).isSuccessful()||t.isClientError()?[4,this.retryManager.delete(r)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})},gO.prototype.normalDispatch=function(r){return u(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return[4,this.transport.send(r)];case 1:return(t=e.sent()).isSuccessful()||t.isClientError()?[2]:[4,this.retryManager.add(r)];case 2:return e.sent(),[2]}})})};var mO=gO;function gO(e,t,r){this.transport=e,this.shutdownTransport=t,this.retryManager=r}wO.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},wO.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof s0?s0.isExposureEvent(e)?t.push(e.toDto()):s0.isTrackEvent(e)?r.push(e.toDto()):s0.isRemoteConfigEvent(e)&&n.push(e.toDto()):s0.isExposureEventDto(e)?t.push(e):s0.isTrackEventDto(e)?r.push(e):s0.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return ai.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},wO.prototype.execute=function(n){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=An.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Ti.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),Ti.record("post.events",t,null),r;case 4:return[2]}})})};var EO=wO;function wO(e,t){this.url=e,this.transport=t}TO.prototype.add=function(e){return this.repository.add(e)},TO.prototype.delete=function(e){return this.repository.delete(e)},TO.prototype.flush=function(){return u(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:return[4,this.repository.read()];case 1:return 0===(t=e.sent()).length?[2]:[4,this.transport.send(t)];case 2:return(r=e.sent()).isSuccessful()||r.isClientError()?[4,this.delete(t)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}})})};var bO=TO;function TO(e,t){this.repository=e,this.transport=t}function _O(){this.listeners={}}_O.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},_O.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},_O.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ne(AO,IO=_O);var IO,i=AO;function AO(){return null!==IO&&IO.apply(this,arguments)||this}Ne(RO,OO=i),RO.prototype.process=function(e){this.isEnqueueTarget(e)&&this.enqueue(e),this.emit("event",e)},RO.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},RO.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},RO.prototype.isPageViewEvent=function(e){return s0.isTrackEvent(e)&&"$page_view"===e.event.key},RO.prototype.isEnqueueTarget=function(e){return!(this.isPageViewEvent(e)&&!this.autoTrackPageView)},RO.prototype.flush=function(e){var t;void 0===e&&(e=!1),null!=(t=this.flushingJob)&&t.cancel(),0!==this.queue.length&&(this.eventDispatcher.dispatch(this.queue,e).catch(function(e){return s.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},RO.prototype.close=function(){this.flush(!0)};var OO,NO=RO;function RO(e,t,r,n,i){var o=OO.call(this)||this;return o.eventDispatcher=e,o.eventDispatchMaxSize=t,o.flushScheduler=r,o.flushIntervalMillis=n,o.autoTrackPageView=i,o.queue=[],o.flushingJob=null,o}CO.prototype.send=function(e){e=e.toBuilder().addHeader(en,this.sdk.key).addHeader(tn,this.sdk.name).addHeader(rn,this.sdk.version).addHeader("X-HACKLE-SDK-TIME",this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var SO=CO;function CO(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}kO.intercept=function(e,t){return t instanceof SO?t:new SO(e,Le.instance,t)};var xO=kO;function kO(){}PO.create=function(){return new PO},PO.prototype.send=function(s){return new Promise(function(t,r){var e,n=new XMLHttpRequest,i=(s.options.timeoutMillis&&(n.timeout=s.options.timeoutMillis),n.open(s.method,s.url),n.onreadystatechange=function(){var e;n.readyState===n.DONE&&(0===n.status?r(new Error("Request Error")):(e=new pi(n.status,n.responseText,function(e){var t=di.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var i,o=n[r],s=o.indexOf(": ");0<s&&(i=o.slice(0,s),o=o.slice(s+2),t.add(i,o))}return t.build()}(n)),t(e)))},n),o=s.headers.raw();for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e]);n.send(s.body)})};var MO=PO;function PO(){}DO.create=function(){return new DO},DO.prototype.send=function(n){var i=this;return new Promise(function(e,t){var r=!1;if(!(r="undefined"!=typeof window?window&&window.navigator&&!!window.navigator.sendBeacon&&!0:r))throw new Error("BeaconTransport not supported.");r=i.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(pi.ok())})},DO.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(en);return r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(tn,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(rn,"unknown")),e.body&&t.append("data",e.body),t};var UO=DO;function DO(){}FO.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var LO=FO;function FO(e){this.invocationResponseResolver=e}zO.prototype.invoke=function(e){if(null==(t=window._hackleApp)||!t.invoke)throw new Error("window._hackleApp.invoke is not implemented");var t=window._hackleApp.invoke(JSON.stringify(e));return this.invocationResponseResolver.resolve(t)};var jO,VO=zO;function zO(e){this.invocationResponseResolver=e}(Cs=jO=jO||{}).prompt="prompt",Cs.function="function";BO.prototype.getInvocator=function(e,t){return e===jO.prompt?new LO(t):e===jO.function?new VO(t):null};var HO=BO;function BO(){}KO.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},KO.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var GO=KO;function KO(e,t,r,n){var i=this;this.userEventEmitter=e,this.determiner=t,this.redirector=r,this.core=n,this.onEvent=function(e){e=i.determiner.determineOrNull(e);e&&(i.core.flush(!0),i.redirector.redirect(e))},this.initialize()}var JO=function(e,t,r){this.workspace=e,this.experiment=t,this.decision=r},YO=($O.prototype.determineOrNull=function(e){if(!s0.isTrackEvent(e))return null;if("$page_view"!==e.event.key)return null;if(this.splitUrlRedirectedCookieStorage.alreadyRedirected())return this.splitUrlRedirectedCookieStorage.clear(),null;var t=this.workspaceFetcher.get();if(!t)return null;for(var r=0,n=t.getSplitUrlExperiments();r<n.length;r++){var i,o=n[r];if(this.splitUrlMatcher.matches(t,o,e))return i=this.core.experiment(o.key,e.user,"A"),new JO(t,o,i)}return null},$O);function $O(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}XO.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=WO.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,F0.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,F0.create(),t.includeTargets))};var qO=XO;function XO(e){this.targetMatcher=e}ZO.of=function(e,t){return new ZO(new D0("SPLIT_URL",t.insertId),t.user,e)};var WO=ZO;function ZO(e,t,r){this.key=e,this.user=t,this.workspace=r}eN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var QO=eN;function eN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}rN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(rN.SPLIT_URL_CONFIG_KEY,"")),r=Xr.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl):null}catch(e){return null}},rN.prototype.resolveByRedirectType=function(e,t){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t)},rN.prototype.resolveManualRedirectUrl=function(e){return null!=(e=sb.tryParse(e))?e:null},rN.SPLIT_URL_CONFIG_KEY="redirectUrl";var tN=rN;function rN(){}iN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return a.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},iN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},iN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var nN=iN;function iN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}sN.prototype.setNeedDispatch=function(e){this.needDispatch=e},sN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(sN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},sN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var oN=sN;function sN(){this.needDispatch=!0}uN.prototype.get=function(){var e=this.storage.getItem(Tn);if(a.isNullOrUndefined(e))return null;try{var t=JSON.parse(e);return this.sdk.version!==t.version?(this.clear(),null):t}catch(e){return this.clear(),null}},uN.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(Tn,JSON.stringify(e))},uN.prototype.clear=function(){this.storage.removeItem(Tn)};var aN=uN;function uN(e,t){this.sdk=e,this.storage=t}var cN=s.log,lN=null;function pN(e,t){t=WA.config(t);WA.logging(t);try{if((n=window)&&"_hackleApp"in n&&null!==n._hackleApp&&"object"==typeof n._hackleApp&&("getAppSdkKey"in n._hackleApp&&"function"==typeof n._hackleApp.getAppSdkKey&&("getInvocationType"in n._hackleApp&&"function"==typeof n._hackleApp.getInvocationType))&&e===window._hackleApp.getAppSdkKey()){o=window._hackleApp.getInvocationType();var r=null===(s=(s=new HO).getInvocator(o,new Eo))?(Co.error("Failed to get invocator with invocationType:".concat(o)),null):new xo(new Ro(s));if(r)return r}}catch(e){cN.error("Unexpected exception while check WebApp client: ".concat(e))}var n=WA.sdk(e,t);if(lN)return cN.debug("use already exists hackleClient"),lN;_o.initialize();function i(){w.flush().catch(function(e){return cN.warn("Failed to flush retry events: ".concat(e))})}var o=new Y_,s=bo.getInstance({days:an,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),r=WA.isBeaconSupported(),a=xO.intercept(n,MO.create()),u=xO.intercept(n,UO.create()),c=a,l=(r&&(c=u),new QA),p=new tO(l,new nO,WA.pollingIntervalMillis(t)),f=new aN(n,q_.postfix(o,"_".concat(e.slice(0,8)))),d=new cO(tI.clientFetch(t.sdkUrl,n.key),a),f=new vO(f,d),d=(l.add("workspace",f),new pO(tI.userCohorts(t.sdkUrl),a)),h=new DA,v=new V_(q_.postfix(s,"_".concat(e))),y=v.getUser(),m=t.user||null,g=new F_(Ao(),v,d,h,Le.instance,y,m),E=(l.add("cohort",g),new K_(t.sessionTimeoutMillis,q_.postfix(s,"_".concat(e.slice(8))))),v=(g.addListener(E),new R_(o,"".concat(ln,"_").concat(e),nn)),d=new EO(tI.clientDispatch(t.eventUrl),a),m=d,w=(r&&(m=new EO(tI.beaconDispatch(t.eventUrl,n.key),u)),new bO(v,d)),l=new mO(d,m,w),r=new b0(WA.dedupIntervalMillis(t)),u=new NO(l,nn,new nO,sn,t.auto_track_page_view),v=new E0(u,r,E,g),b=new oN,d=new $0(new W_(s,"".concat(yn,"_").concat(e.slice(0,8)))),m=new $0(new W_(s,"".concat(mn,"_").concat(e.slice(0,8)))),l=new nI(q_.prefix(o,"".concat(gn,"_").concat(e.slice(0,8),"_"))),r=new XI(q_.prefix(o,"".concat(En,"_").concat(e.slice(0,8),"_"))),T=g_.create(f,v,[d,m],l),v=new RA(new CA(q_.postfix(s,"_".concat(e.slice(0,8)))),h,T,g),e=new m0(g,T),h=(E.addListener(v),E.addListener(e),new _I(T)),e=new oI([new aI,new cI(new yA),new pI(new yA),new dI(l,Le.instance),new vI(new gA),new mI(new gA),new EI(new wA),new bI(new wA)]),l=new ZI([new eA(r),new iA(e),new rA]),e=new sA(Le.instance,h,l),h=new lA([new fA,new hA(e)]),l=new DI(tI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),l=new AI(new PI(l),e,h),e=new uA(new FI(s_.get("targetMatcher")),new HI(r)),h=new CI(f,e,T),r=(new NI(u,h,l),new $A(f)),e=(new JA(u,r),new qO(s_.get("targetMatcher"))),h=new nN(s,wn,{days:bn}),l=new YO(f,e,h,T),r=new QO(new tN,new TA,h,b),f=(new GO(u,l,r,T),new Q_(T,g,d,m)),u=(null==(e=t.devTool)?void 0:e.userExplorer)&&"function"==typeof(null==(h=t.devTool)?void 0:h.userExplorer),l=t.devTool&&u?{manager:t.devTool,userExplorer:f}:void 0,r=new gi(tI.monitoring(t.monitoringUrl),a,c,new nO,on),_=(ni.addRegistry(r),p.start(),new ho(T,p,E,g,l));lN=_;return window.addEventListener("onpagehide"in window?"pagehide":"unload",function(){Oo(),E.updateLastEventTime((new Date).getTime()),_.close(),ni.globalRegistry.close()}),window.addEventListener("pageshow",i),document.addEventListener("visibilitychange",function(){document.hidden||i()}),t.autoOpenDevTool&&(t.devTool?_.showUserExplorer():cN.error("DevTool is not provided")),d=Date.now(),m=g.currentUser,e=E.currentSessionId,(C_(y,m)?E.startNewSessionIfNeeded(m,d):E.startNewSession(y,m,d))===e&&v.startNewCampaignIfNeeded(m,d),_.onReady(function(){(new T_).install(T,g);var e=_;function r(e){if("function"==typeof window.Event)return new Event(e);var t={bubbles:!1,cancelable:!1,detail:void 0},r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r}try{history.pushState=function(t){return function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(r("locationchange")),e}catch(e){if(e instanceof Error)cN.error(e);else try{cN.error(e)}catch(e){}}}}(history.pushState),history.replaceState=function(t){return function(){try{var e=t.apply(this,arguments);return window.dispatchEvent(r("locationchange")),e}catch(e){if(e instanceof Error)cN.error(e);else try{cN.error(e)}catch(e){}}}}(history.replaceState),window.addEventListener("popstate",function(){try{window.dispatchEvent(r("locationchange"))}catch(e){if(e instanceof Error)cN.error(e);else try{cN.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)cN.error(e);else try{cN.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)cN.error(e);else try{cN.error(e)}catch(e){}}_.trackPageView(),b.dispatchDoneEventIfNeeded()}),_}var fN=function(e,t){return(fN=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};var dN=function(){return(dN=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function hN(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}vN.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},vN.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},vN.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Jl=vN;function vN(){this.listeners={}}mN.arePropertiesEqual=function(e,t){var r=mN.coerceUnknownToProperties(e),n=mN.coerceUnknownToProperties(t),e=Object.keys(r),t=Object.keys(n);return e.length===t.length&&e.every(function(e){return e in n&&r[e]===n[e]})},mN.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var yN=mN;function mN(){}EN.isUserEqual=function(e,t){return(null==e?void 0:e.id)===(null==t?void 0:t.id)&&(null==e?void 0:e.deviceId)===(null==t?void 0:t.deviceId)&&(null==e?void 0:e.userId)===(null==t?void 0:t.userId)&&yN.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&yN.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var gN=EN;function EN(){}var wN=function(n){var e=i,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}function i(e,t){var r=n.call(this)||this;return r._currentUser=null,r.client=pN(e,dN(dN({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.27.2"})),r.getUser=r.getUser.bind(r),r.setUser=r.setUser.bind(r),r.setUserId=r.setUserId.bind(r),r.setDeviceId=r.setDeviceId.bind(r),r.setUserProperty=r.setUserProperty.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.resetUser=r.resetUser.bind(r),r.variation=r.variation.bind(r),r.variationDetail=r.variationDetail.bind(r),r.isFeatureOn=r.isFeatureOn.bind(r),r.featureFlagDetail=r.featureFlagDetail.bind(r),r.track=r.track.bind(r),r.trackPageView=r.trackPageView.bind(r),r.remoteConfig=r.remoteConfig.bind(r),r.onReady=r.onReady.bind(r),r.onInitialized=r.onInitialized.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return fN(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(e){this.client.setUser(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserId=function(e){this.client.setUserId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setDeviceId=function(e){this.client.setDeviceId(e),this.emitUpdatedUser(this.getUser())},i.prototype.setUserProperty=function(e,t){this.client.setUserProperty(e,t),this.emitUpdatedUser(this.getUser())},i.prototype.updateUserProperties=function(e){this.client.updateUserProperties(e),this.emitUpdatedUser(this.getUser())},i.prototype.resetUser=function(){this.client.resetUser(),this.emitUpdatedUser(this.getUser())},i.prototype.variation=function(e,t,r){return this.client.variation(e,t||void 0,r)},i.prototype.variationDetail=function(e,t,r){return this.client.variationDetail(e,t||void 0,r)},i.prototype.isFeatureOn=function(e,t){return this.client.isFeatureOn(e,t||void 0)},i.prototype.featureFlagDetail=function(e,t){return this.client.featureFlagDetail(e,t||void 0)},i.prototype.track=function(e,t){this.client.track(e,t||void 0)},i.prototype.trackPageView=function(e){this.client.trackPageView(dN(dN({},e),{user:(null==e?void 0:e.user)||void 0}))},i.prototype.remoteConfig=function(e){return this.client.remoteConfig(e||void 0)},i.prototype.onReady=function(e,t){this.client.onReady(e,t)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){gN.isUserEqual(this._currentUser,e)||this.emit("user-updated",e),this._currentUser=e},i.prototype.showUserExplorer=function(){this.client.showUserExplorer()},i.prototype.hideUserExplorer=function(){this.client.hideUserExplorer()},i}(Jl);var U={exports:{}},_={},bN=Object.getOwnPropertySymbols,TN=Object.prototype.hasOwnProperty,_N=Object.prototype.propertyIsEnumerable;var Ss=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},n)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var r,n=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var o in r=Object(arguments[i]))TN.call(r,o)&&(n[o]=r[o]);if(bN)for(var s=bN(r),a=0;a<s.length;a++)_N.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},IN=Ss,oa="function"==typeof Symbol&&Symbol.for,AN=oa?Symbol.for("react.element"):60103,ON=oa?Symbol.for("react.portal"):60106,I=oa?Symbol.for("react.fragment"):60107,B=oa?Symbol.for("react.strict_mode"):60108,op=oa?Symbol.for("react.profiler"):60114,NN=oa?Symbol.for("react.provider"):60109,RN=oa?Symbol.for("react.context"):60110,SN=oa?Symbol.for("react.forward_ref"):60112,g=oa?Symbol.for("react.suspense"):60113,CN=oa?Symbol.for("react.memo"):60115,xN=oa?Symbol.for("react.lazy"):60116,kN="function"==typeof Symbol&&Symbol.iterator;function MN(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var PN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},UN={};function DN(e,t,r){this.props=e,this.context=t,this.refs=UN,this.updater=r||PN}function LN(){}function FN(e,t,r){this.props=e,this.context=t,this.refs=UN,this.updater=r||PN}DN.prototype.isReactComponent={},DN.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(MN(85));this.updater.enqueueSetState(this,e,t,"setState")},DN.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},LN.prototype=DN.prototype;var x=FN.prototype=new LN,jN=(x.constructor=FN,IN(x,DN.prototype),x.isPureReactComponent=!0,{current:null}),VN=Object.prototype.hasOwnProperty,zN={key:!0,ref:!0,__self:!0,__source:!0};function HN(e,t,r){var n,i={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)VN.call(t,n)&&!zN.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(1===a)i.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===i[n]&&(i[n]=a[n]);return{$$typeof:AN,type:e,key:o,ref:s,props:i,_owner:jN.current}}function BN(e){return"object"==typeof e&&null!==e&&e.$$typeof===AN}var GN=/\/+/g,KN=[];function JN(e,t,r,n){var i;return KN.length?((i=KN.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function YN(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,KN.length<10&&KN.push(e)}function $N(e,t,r){return null==e?0:function e(t,r,n,i){var o=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case AN:case ON:o=!0}}if(o)return n(i,t,""===r?"."+qN(t,0):r),1;if(o=0,r=""===r?".":r+":",Array.isArray(t))for(var s=0;s<t.length;s++){var a,u=r+qN(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=kN&&t[kN]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+qN(a,s++),n,i);else if("object"===a)throw n=""+t,Error(MN(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function qN(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function XN(e,t){e.func.call(e.context,t,e.count++)}function WN(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?ZN(e,n,r,function(e){return e}):null!=e&&(BN(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(GN,"$&/")+"/")+r,e={$$typeof:AN,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function ZN(e,t,r,n,i){var o="";$N(e,WN,t=JN(t,o=null!=r?(""+r).replace(GN,"$&/")+"/":o,n,i)),YN(t)}var QN={current:null};function eR(){var e=QN.current;if(null===e)throw Error(MN(321));return e}var tR,rR,nR,$s={ReactCurrentDispatcher:QN,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:jN,IsSomeRendererActing:{current:!1},assign:IN},e=(_.Children={map:function(e,t,r){if(null==e)return e;var n=[];return ZN(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;$N(e,XN,t=JN(null,null,t,r)),YN(t)},count:function(e){return $N(e,function(){return null},null)},toArray:function(e){var t=[];return ZN(e,t,null,function(e){return e}),t},only:function(e){if(BN(e))return e;throw Error(MN(143))}},_.Component=DN,_.Fragment=I,_.Profiler=op,_.PureComponent=FN,_.StrictMode=B,_.Suspense=g,_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$s,_.cloneElement=function(e,t,r){if(null==e)throw Error(MN(267,e));var n=IN({},e.props),i=e.key,o=e.ref,s=e._owner;if(null!=t)for(a in void 0!==t.ref&&(o=t.ref,s=jN.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)VN.call(t,a)&&!zN.hasOwnProperty(a)&&(n[a]=(void 0===t[a]&&void 0!==u?u:t)[a]);var a=arguments.length-2;if(1===a)n.children=r;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];n.children=u}return{$$typeof:AN,type:e.type,key:i,ref:o,props:n,_owner:s}},_.createContext=function(e,t){return(e={$$typeof:RN,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:NN,_context:e},e.Consumer=e},_.createElement=HN,_.createFactory=function(e){var t=HN.bind(null,e);return t.type=e,t},_.createRef=function(){return{current:null}},_.forwardRef=function(e){return{$$typeof:SN,render:e}},_.isValidElement=BN,_.lazy=function(e){return{$$typeof:xN,_ctor:e,_status:-1,_result:null}},_.memo=function(e,t){return{$$typeof:CN,type:e,compare:void 0===t?null:t}},_.useCallback=function(e,t){return eR().useCallback(e,t)},_.useContext=function(e,t){return eR().useContext(e,t)},_.useDebugValue=function(){},_.useEffect=function(e,t){return eR().useEffect(e,t)},_.useImperativeHandle=function(e,t,r){return eR().useImperativeHandle(e,t,r)},_.useLayoutEffect=function(e,t){return eR().useLayoutEffect(e,t)},_.useMemo=function(e,t){return eR().useMemo(e,t)},_.useReducer=function(e,t,r){return eR().useReducer(e,t,r)},_.useRef=function(e){return eR().useRef(e)},_.useState=function(e){return eR().useState(e)},_.version="16.14.0",{}),iu=Function.call.bind(Object.prototype.hasOwnProperty),iR=function(){};function oR(e,t,r,n,i){if("production"!==production)for(var o in e)if(nR(e,o)){var s,a;try{if("function"!=typeof e[o])throw(a=Error((n||"React class")+": "+r+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.")).name="Invariant Violation",a;s=e[o](t,o,n,r,null,tR)}catch(e){s=e}!s||s instanceof Error||iR((n||"React class")+": type specification of "+r+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in rR)&&(rR[s.message]=!0,o=i?i():"",iR("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(tR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",rR={},nR=iu,iR=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),oR.resetWarningCache=function(){"production"!==production&&(rR={})},"production"!==production){var sR=Ss,aR=oR,A="function"==typeof Symbol&&Symbol.for,uR=A?Symbol.for("react.element"):60103,cR=A?Symbol.for("react.portal"):60106,lR=A?Symbol.for("react.fragment"):60107,pR=A?Symbol.for("react.strict_mode"):60108,fR=A?Symbol.for("react.profiler"):60114,dR=A?Symbol.for("react.provider"):60109,hR=A?Symbol.for("react.context"):60110,vR=A?Symbol.for("react.concurrent_mode"):60111,yR=A?Symbol.for("react.forward_ref"):60112,mR=A?Symbol.for("react.suspense"):60113,gR=A?Symbol.for("react.suspense_list"):60120,ER=A?Symbol.for("react.memo"):60115,wR=A?Symbol.for("react.lazy"):60116,bR=A?Symbol.for("react.block"):60121,TR=A?Symbol.for("react.fundamental"):60117,_R=A?Symbol.for("react.responder"):60118,IR=A?Symbol.for("react.scope"):60119,AR="function"==typeof Symbol&&Symbol.iterator,OR="@@iterator";function NR(e){if(null===e||"object"!=typeof e)return null;e=AR&&e[AR]||e[OR];return"function"==typeof e?e:null}var RR={current:null},SR={current:null},CR=/^(.*)[\\\/]/,xR=1;function kR(e){if(null==e)return null;if("number"==typeof e.tag&&FR("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case lR:return"Fragment";case cR:return"Portal";case fR:return"Profiler";case pR:return"StrictMode";case mR:return"Suspense";case gR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case hR:return"Context.Consumer";case dR:return"Context.Provider";case yR:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case ER:return kR(e.type);case bR:return kR(e.render);case wR:r=(t=e)._status===xR?t._result:null;if(r)return kR(r)}var t,r;return null}var MR={},PR=null;function UR(e){PR=e}MR.getCurrentStack=null,MR.getStackAddendum=function(){var e,t,r,n,i,o="",s=(PR&&(e=kR(PR.type),r=PR._owner,o+=(e=e,t=PR._source,r=r&&kR(r.type),i="",t?(n=(s=t.fileName).replace(CR,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(CR))&&(s=s[1])?s.replace(CR,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),MR.getCurrentStack);return s&&(o+=s()||""),o};var DR={ReactCurrentDispatcher:RR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:SR,IsSomeRendererActing:{current:!1},assign:sR};function LR(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];jR("warn",e,r)}function FR(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];jR("error",e,r)}function jR(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=DR.ReactDebugCurrentFrame.getStackAddendum())&&(t+="%s",r=r.concat([n]));var n=r.map(function(e){return""+e});n.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,n);try{var i=0,o="Warning: "+t.replace(/%s/g,function(){return r[i++]});throw new Error(o)}catch(e){}}sR(DR,{ReactDebugCurrentFrame:MR,ReactComponentTreeHook:{}});var VR={};function zR(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;VR[r]||(FR("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),VR[r]=!0)}var HR={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){zR(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){zR(e,"replaceState")},enqueueSetState:function(e,t,r,n){zR(e,"setState")}},BR={};function GR(e,t,r){this.props=e,this.context=t,this.refs=BR,this.updater=r||HR}Object.freeze(BR),GR.prototype.isReactComponent={},GR.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},GR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var KR,JR={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(KR in JR)JR.hasOwnProperty(KR)&&!function(e,t){Object.defineProperty(GR.prototype,e,{get:function(){LR("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(KR,JR[KR]);function YR(){}function $R(e,t,r){this.props=e,this.context=t,this.refs=BR,this.updater=r||HR}YR.prototype=GR.prototype,(A=$R.prototype=new YR).constructor=$R,sR(A,GR.prototype),A.isPureReactComponent=!0;var qR,XR,WR=Object.prototype.hasOwnProperty,ZR={key:!0,ref:!0,__self:!0,__source:!0};function QR(e){if(WR.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function eS(e){if(WR.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var tS={},rS=function(e,t,r,n,i,o,s){e={$$typeof:uR,type:e,key:t,ref:r,props:s,_owner:o,_store:{}};return Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e};function nS(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in QR(t)&&(s=t.ref,"string"==typeof(c=t).ref&&SR.current&&c.__self&&SR.current.stateNode!==c.__self&&(p=kR(SR.current.type),tS[p]||(FR('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',kR(SR.current.type),c.ref),tS[p]=!0))),eS(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)WR.call(t,n)&&!ZR.hasOwnProperty(n)&&(i[n]=t[n]);var c,l,p,f,d=arguments.length-2;if(1==d)i.children=r;else if(1<d){for(var h=Array(d),v=0;v<d;v++)h[v]=arguments[v+2];Object.freeze&&Object.freeze(h),i.children=h}if(e&&e.defaultProps){var y=e.defaultProps;for(n in y)void 0===i[n]&&(i[n]=y[n])}function m(){XR||(XR=!0,FR("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",l))}function g(){qR||(qR=!0,FR("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",f))}return(o||s)&&(c="function"==typeof e?e.displayName||e.name||"Unknown":e,o&&(p=i,f=c,g.isReactWarning=!0,Object.defineProperty(p,"key",{get:g,configurable:!0})),s&&(r=i,l=c,m.isReactWarning=!0,Object.defineProperty(r,"ref",{get:m,configurable:!0}))),rS(e,o,s,a,u,SR.current,i)}function iS(e){return"object"==typeof e&&null!==e&&e.$$typeof===uR}var oS=".",sS=":",aS=!1,uS=/\/+/g;function cS(e){return(""+e).replace(uS,"$&/")}var lS=10,pS=[];function fS(e,t,r,n){var i;return pS.length?((i=pS.pop()).result=e,i.keyPrefix=t,i.func=r,i.context=n,i.count=0,i):{result:e,keyPrefix:t,func:r,context:n,count:0}}function dS(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,pS.length<lS&&pS.push(e)}function hS(e,t,r){return null==e?0:function e(t,r,n,i){var o,s=typeof t,a=!1;if(null===(t="undefined"!=s&&"boolean"!=s?t:null))a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case uR:case cR:a=!0}}if(a)return n(i,t,""===r?oS+vS(t,0):r),1;var u=0,c=""===r?oS:r+sS;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+vS(o,l),n,i);else if("function"==typeof(r=NR(t))){r===t.entries&&(aS||LR("Using Maps as children is deprecated and will be removed in a future major release. Consider converting children to an array of keyed ReactElements instead."),aS=!0);for(var p,f=r.call(t),d=0;!(p=f.next()).done;)u+=e(o=p.value,c+vS(o,d++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+MR.getStackAddendum(),s=""+t,Error("Objects are not valid as a React child (found: "+("[object Object]"==s?"object with keys {"+Object.keys(t).join(", ")+"}":s)+")."+r);return u}(e,"",t,r)}function vS(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(e=e.key,r={"=":"=0",":":"=2"},"$"+(""+e).replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var r}function yS(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function mS(e,t,r){var n=e.result,i=e.keyPrefix,o=e.func,s=e.context,o=o.call(s,t,e.count++);Array.isArray(o)?gS(o,n,r,function(e){return e}):null!=o&&(iS(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":cS(o.key)+"/")+r,o=rS(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function gS(e,t,r,n,i){var o="",t=fS(t,o=null!=r?cS(r)+"/":o,n,i);hS(e,mS,t),dS(t)}function ES(e){return"string"==typeof e||"function"==typeof e||e===lR||e===vR||e===fR||e===pR||e===mR||e===gR||"object"==typeof e&&null!==e&&(e.$$typeof===wR||e.$$typeof===ER||e.$$typeof===dR||e.$$typeof===hR||e.$$typeof===yR||e.$$typeof===TR||e.$$typeof===_R||e.$$typeof===IR||e.$$typeof===bR)}function wS(){var e=RR.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");return e}function bS(){if(SR.current){var e=kR(SR.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var TS=!1,_S={};function IS(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=bS())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),_S[t=r]||(_S[t]=!0,r="",e&&e._owner&&e._owner!==SR.current&&(r=" It was passed a child from "+kR(e._owner.type)+"."),UR(e),FR('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',t,r),UR(null)))}function AS(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];iS(n)&&IS(n,t)}else if(iS(e))e._store&&(e._store.validated=!0);else if(e){var i=NR(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)iS(o.value)&&IS(o.value,t)}}function OS(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=kR(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==yR&&t.$$typeof!==ER)return;r=t.propTypes}r?(UR(e),aR(r,e.props,"prop",n,MR.getStackAddendum),UR(null)):void 0===t.PropTypes||TS||(TS=!0,FR("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||FR("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function NS(e,t,r){var n,i=ES(e),t=(i||(n="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),n+=(null!=(t=t)&&void 0!==(t=t.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"")||bS(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===uR?(s="<"+(kR(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,FR("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,n)),nS.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)AS(arguments[o],e);if(e===lR){var s=t;UR(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){FR("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&FR("Invalid attribute `ref` supplied to `React.Fragment`."),UR(null)}else OS(t);return t}var RS=!1;try{var SS=Object.freeze({}),CS=new Map([[SS,null]]),xS=new Set([SS]);CS.set(0,0),xS.add(0)}catch(e){}function kS(e,t,r){for(var n=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n,i,o=sR({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in QR(t)&&(a=t.ref,l=SR.current),eS(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)WR.call(t,n)&&!ZR.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var p=arguments.length-2;if(1==p)o.children=r;else if(1<p){for(var f=Array(p),d=0;d<p;d++)f[d]=arguments[d+2];o.children=f}return rS(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)AS(arguments[i],n.type);return OS(n),n}function MS(e){var t=NS.bind(null,e);return t.type=e,RS||(RS=!0,LR("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(t,"type",{enumerable:!1,get:function(){return LR("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}A=NS,e.Children={map:function(e,t,r){if(null==e)return e;var n=[];return gS(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=fS(null,null,t,r),hS(e,yS,t),dS(t)},count:function(e){return hS(e,function(){return null},null)},toArray:function(e){var t=[];return gS(e,t,null,function(e){return e}),t},only:function(e){if(iS(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},e.Component=GR,e.Fragment=lR,e.Profiler=fR,e.PureComponent=$R,e.StrictMode=pR,e.Suspense=mR,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DR,e.cloneElement=kS,e.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&FR("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:hR,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:dR,_context:r}),i=!1,t={$$typeof:hR,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,FR("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(e){r.Provider=e}},_currentValue:{get:function(){return r._currentValue},set:function(e){r._currentValue=e}},_currentValue2:{get:function(){return r._currentValue2},set:function(e){r._currentValue2=e}},_threadCount:{get:function(){return r._threadCount},set:function(e){r._threadCount=e}},Consumer:{get:function(){return n||(n=!0,FR("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}}}),r.Consumer=t,r._currentRenderer=null,r._currentRenderer2=null,r},e.createElement=A,e.createFactory=MS,e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){return null!=e&&e.$$typeof===ER?FR("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?FR("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&FR("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null==e||null==e.defaultProps&&null==e.propTypes||FR("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:yR,render:e}},e.isValidElement=iS,e.lazy=function(e){var t,r,n={$$typeof:wR,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){FR("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(e){FR("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=e,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},e.memo=function(e,t){return ES(e)||FR("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:ER,type:e,compare:void 0===t?null:t}},e.useCallback=function(e,t){return wS().useCallback(e,t)},e.useContext=function(e,t){var r,n=wS();return void 0!==t&&FR("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",t,"number"==typeof t&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==e._context&&((r=e._context).Consumer===e?FR("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&FR("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},e.useDebugValue=function(e,t){return wS().useDebugValue(e,t)},e.useEffect=function(e,t){return wS().useEffect(e,t)},e.useImperativeHandle=function(e,t,r){return wS().useImperativeHandle(e,t,r)},e.useLayoutEffect=function(e,t){return wS().useLayoutEffect(e,t)},e.useMemo=function(e,t){return wS().useMemo(e,t)},e.useReducer=function(e,t,r){return wS().useReducer(e,t,r)},e.useRef=function(e){return wS().useRef(e)},e.useState=function(e){return wS().useState(e)},e.version="16.14.0"}"production"===production?U.exports=_:U.exports=e;var PS=U.exports,US=U.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),qs=US.Consumer,DS=US.Provider;var LS=s.log;function FS(e,t){e=jS(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function jS(e,t){void 0===t&&(t="A");var r=U.exports.useContext(US),n=r.hackle,i=r.userVersion,o=r.initialized,s=U.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||Xe.of(t,d.EXCEPTION):Xe.of(t,d.SDK_NOT_READY)},[t,e,n,o]),r=hN(U.exports.useState(function(){return n?s():(LS.error("HackleClient is not existed"),Xe.of(t,d.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=hN(U.exports.useState(i),2),c=u[0],u=u[1];return HS(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function VS(e){e=zS(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function zS(e){var t=U.exports.useContext(US),r=t.hackle,n=t.userVersion,i=t.initialized,o=U.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||Ze.off(d.EXCEPTION):Ze.off(d.SDK_NOT_READY)},[e,r,i]),t=hN(U.exports.useState(function(){return r?o():(LS.error("HackleClient is not existed"),Ze.off(d.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=hN(U.exports.useState(n),2),u=a[0],a=a[1];return HS(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function HS(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function BS(e){var t,r=e.experimentKey,e=e.children,n=(r=FS(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(U.exports.Children.forEach(e,function(e){U.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?U.exports.cloneElement(t,{variation:i}):null)}function GS(e){return e.variation,e=e.children,U.exports.createElement(U.exports.Fragment,null,e)}function KS(e){var t=(r=VS(e.featureKey)).isLoading,r=r.isOn;return t?null:PS.createElement(PS.Fragment,null,e.children(r))}n.Bucket=at,n.Cohort=qr,n.Container=Mt,n.ContainerGroup=Ut,n.CoreVersion=Kt,n.Decision=Xe,n.DecisionReason=d,n.EmptyHackleRemoteConfig=et,n.EmptyParameterConfig=je,n.EventType=pt,n.Experiment=it,n.FeatureFlagDecision=Ze,n.HackleContext=US,n.HackleContextConsumer=qs,n.HackleContextProvider=DS,n.HackleExperiment=BS,n.HackleFeature=KS,n.HackleProvider=function(e){var t=e.hackleClient,r=e.user,n=void 0===(i=e.timeout)?3e3:i,i=void 0!==(i=e.supportSSR)&&i,e=e.children,o=hN(U.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return U.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),U.exports.useEffect(function(){function e(){a(function(e){return dN(dN({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),U.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return dN(dN({},e),{initialized:!0})})},function(){a(function(e){return dN(dN({},e),{initialized:!0})})}).catch(function(){a(function(e){return dN(dN({},e),{initialized:!0})})})},[t]),i||s.initialized?PS.createElement(DS,{value:s},e):null},n.HackleVariation=GS,n.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],n.IAM_ACTION_TYPE=lr,n.IAM_BEHAVIOR=cr,n.IAM_DISPLAY_TYPE=sr,n.IAM_LAYOUT_TYPE=ar,n.IAM_ORIENTATION=ur,n.IAM_PLATFORM_TYPE=ir,n.IAM_STATUS=nr,n.IAM_TIMEUNIT=or,n.IdentifierType=dt,n.IdentifiersBuilder=yt,n.InAppMessage=pr,n.InAppMessageAction=Yr,n.InAppMessageBackground=Jr,n.InAppMessageButton=Br,n.InAppMessageButtonStyle=Kr,n.InAppMessageContext=Cr,n.InAppMessageContextLayout=Pr,n.InAppMessageContextMessage=kr,n.InAppMessageDecision=$e,n.InAppMessageDurationCap=Ir,n.InAppMessageEventFrequencyCap=wr,n.InAppMessageEventTrigger=mr,n.InAppMessageEventTriggerRule=gr,n.InAppMessageIdentifierCap=Tr,n.InAppMessageImage=Dr,n.InAppMessagePeriodAlways=dr,n.InAppMessagePeriodCustom=vr,n.InAppMessageTargetContext=Or,n.InAppMessageText=Fr,n.InAppMessageTextAttribute=Vr,n.InAppMessageTextStyle=Hr,n.InAppMessageUserOverride=Rr,n.Logger=s,n.MATCH_OPERATORS=Wt,n.MATCH_TYPES=qt,n.MATCH_VALUE_TYPES=Xt,n.MetaVersion=Yt,n.ParameterConfiguration=rt,n.PropertyOperations=uo,n.PropertyOperationsBuilder=so,n.RemoteConfigDecision=Je,n.RemoteConfigParameter=Lt,n.RemoteConfigParameterValue=zt,n.RemoteConfigTargetRule=jt,n.SEGMENT_TYPES=er,n.Segment=xt,n.Slot=ct,n.SplitUrlConfig=Xr,n.SplitUrlTargets=Zr,n.TARGET_ACTION_TYPES=Zt,n.TARGET_KEY_TYPES=Qt,n.Target=Et,n.TargetAction=Nt,n.TargetCondition=bt,n.TargetKey=_t,n.TargetMatch=At,n.TargetRule=St,n.TargetingType=tr,n.Variation=st,n.Version=Bt,n.createInstance=function(e,t){return new wN(e,t)},n.getUserId=Ao,n.removeUserId=Oo,n.resolveIdentifiers=vt,n.sanitizeUser=gt,n.setUserId=function(e){bo.getInstance().setItem(cn,e)},n.useFeature=function(e){var t=(n=U.exports.useContext(US)).hackle,r=n.userVersion,n=n.initialized,i=U.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=hN(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&LS.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=hN(U.exports.useState(r),2))[0],n=n[1];return HS(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=U.exports.useContext(US)).hackle,r=n.userVersion,n=n.initialized,i=U.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||Ze.off(d.EXCEPTION)},[e,t,n]),o=(s=hN(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&LS.error("HackleClient is not existed"),Ze.off(d.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=hN(U.exports.useState(r),2))[0],n=n[1];return HS(a,r)||(n(r),s(i())),o},n.useLoadableFeature=VS,n.useLoadableFeatureDetail=zS,n.useLoadableRemoteConfig=function(){var e=(o=U.exports.useContext(US)).hackle,t=o.userVersion,r=o.initialized,n=U.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=hN(U.exports.useState(function(){return e||LS.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=hN(U.exports.useState(t),2))[0],a=a[1];return HS(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=FS,n.useLoadableVariationDetail=jS,n.useRemoteConfig=function(){var e=(r=U.exports.useContext(US)).hackle,t=r.userVersion,r=r.initialized,n=U.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new et},[e,r]),i=(o=hN(U.exports.useState(function(){return e||LS.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=hN(U.exports.useState(t),2))[0],r=r[1];return HS(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=U.exports.useContext(US).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(LS.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=U.exports.useContext(US)).hackle,n=a.userVersion,i=a.initialized,o=U.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=hN(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&LS.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=hN(U.exports.useState(n),2))[0],c=c[1];return HS(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=U.exports.useContext(US)).hackle,n=i.userVersion,i=i.initialized,o=U.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||Xe.of(t,d.EXCEPTION)},[t,e,r,i]),s=(a=hN(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&LS.error("HackleClient is not existed"),Xe.of(t,d.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=hN(U.exports.useState(n),2))[0],i=i[1];return HS(u,n)||(i(n),a(o())),s},Object.defineProperty(n,"__esModule",{value:!0})});