@hackler/react-sdk 11.28.0 → 11.29.0

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(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),q=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,$=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($.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?$(192|t>>>6)+$(128|63&t):$(224|t>>>12&15)+$(128|t>>>6&63)+$(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),$(240|t>>>18&7)+$(128|t>>>12&63)+$(128|t>>>6&63)+$(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 $(55296+(t>>>10))+$(56320+(1023&t));case 3:return $((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return $((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ce=e=>e.replace(ae,ue);var o=t=>{if(t=t.replace(/\s+/g,""),!q.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?$(r>>16&255):64===o?$(r>>16&255,r>>8&255):$(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(){}Oe.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Ie=Oe;function Oe(){}var Ae=function(e,t){return(Ae=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}Ae(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}$e.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},$e.of=function(e,t,r){return new $e(t,r,e)};var qe=$e;function $e(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=Ot.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}At.fromJson=function(e){var t=Ge($t,e.type),r=Ge(Wt,e.operator),n=Ge(Xt,e.valueType);return t&&r&&n&&new At(t,r,n,e.values)},At.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var Ot=At;function At(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}qt.parse=function(e){return e?new qt(e.split(".")):qt.EMPTY},qt.prototype.isEmpty=function(){return 0===this.identifiers.length},qt.prototype.isNotEmpty=function(){return!this.isEmpty()},qt.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},qt.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=qt.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},qt.compareIdentifiers=function(e,t){return qt.numericIdentifierRegExp.test(e)&&qt.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},qt.EMPTY=new qt([]),qt.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var Yt=qt;function qt(e){this.identifiers=e}var $t=["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),Ar.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}Or.fromJson=function(e){if(!e)return null;var t=Ge(Ue,e.durationUnit.timeUnit);return t?new Or(De.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Ir=Or;function Or(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 Ar=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=(qr.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 qr(t,r,null!=(t=e.value)?t:void 0)}},qr.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},qr);function qr(e,t,r){this.behavior=e,this.type=t,this.value=r}var $r=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}An.start=function(e){return new An(e=void 0===e?An.defaultClock:e)},An.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},An.defaultClock=new Le;var On=An;function An(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}qn.prototype.count=function(){return 0},qn.prototype.increment=function(e){},qn.prototype.measure=function(){return[new Sn("count",this.count.bind(this))]};var Yn=qn;function qn(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 $n=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 $n(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()},si.isNotEmptyString=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};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(){}Oi.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)}},Oi.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=Oi;function Oi(){}var Ai=s.log,Ni=(Ri.prototype.get=function(t,r){var n,e=On.start();try{n=this.decide(t,r)}catch(e){Ai.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($i,Yi=t),$i.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var Yi,qi=$i;function $i(){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 qi;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=On.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=On.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 Oo(){var e=bo.getInstance(),t=e.getItem(cn);if(t)return t;t=e.getItem(un);return t||No()}function Ao(){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:Oo()}catch(e){return Co.error("Unexpected exception while get sessionId: ".concat(e)),Oo()}},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:Oo()}};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:Os(e)}function Vo(e,t){return arguments.length<2?(r=As[e],Ns(r)?r:void 0):As[e]&&As[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 qo(e){return e=wa(e,"string"),ba(e)?e:e+""}function $o(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]=$a(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[$u(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,Os=Fo,As=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,qs=Go,$s="__core-js_shared__",qs=e[$s]||qs($s,{}),Xs=qs,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),$s=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=$s,_=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=$o,b=!B&&!Mo(function(){return 7!=Object.defineProperty(Ia("div"),"a",{get:function(){return 7}}).a}),Oa=t,Aa=r,Na=Po,Ra=Lo,Sa=qo,Ca=$s,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(!Oa(Aa.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=qo,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=$s,_=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=qs,Ya=g(Function.toString),_=(r(I.inspectSource)||(I.inspectSource=function(e){return Ya(e)}),I.inspectSource),r=Fo,I=_,qa=e.WeakMap,r=r(qa)&&/native code/.test(I(qa)),I=xs.exports,$a=Jo,Xa=I("keys"),qa={},xs=g,Wa=jo,Za=T,Qa=$s,I=qs,eu=Wo,tu=qa,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=$s,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,Ou=Qo,Au=Math.min,Nu=function(e){return 0<e?Au(Ou(e),9007199254740991):0},Ru=Lo,Su=es,Cu=y,tu={includes:ts(!0),indexOf:ts(!1)},eu=g,xu=$s,ku=Lo,Mu=tu.indexOf,Pu=qa,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=$s,Bu=iu,Gu=o,Ku=oa,Ju=Mo,Yu=Fo,qu=/#|\.prototype\./,$u=is.normalize=function(e){return String(e).replace(qu,".").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=$s,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")},O=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,A=Object.keys||function(e){return Ec(e,wc)},bc=oa,Tc=Xo,_c=Lo,Ic=A;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 Oc(){}function Ac(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=Ol(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=Al(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)),ql(r,n),$l(e,ep,{that:i=[]}),Kl(r,"errors",i),r}function Dc(e){np[rp][e]=!0}var Lc,Fc,A=Vo("document","documentElement"),jc=Xo,Vc=gc,zc=I,ta=qa,Hc=A,Bc=$o,Gc="prototype",Kc="script",Jc=Wo("IE_PROTO"),Yc=function(e){return"<"+Kc+">"+e+"</"+Kc+">"},qc=function(){try{Lc=new ActiveXObject("htmlfile")}catch(e){}qc="undefined"==typeof document||document.domain&&Lc?Ac(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 qc[Gc][zc[r]];return qc()},gc=(ta[Jc]=!0,Object.create||function(e,t){var r;return null!==e?(Oc[Gc]=jc(e),r=new Oc,Oc[Gc]=null,r[Jc]=e):r=qc(),void 0===t?r:Vc.f(r,t)}),$c=Error,Xc=g("".replace),I=String($c("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,Ol=Nc,Al=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=O,C=ns,Gl=gc,Kl=T,Jl=Po,Yl=function(e,t){if(Zc&&"string"==typeof e&&!$c.prepareStackTrace)for(;t--;)e=Xc(e,Wc,"");return e},ql=function(e,t){Qc(t)&&"cause"in t&&el(e,"cause",t.cause)},$l=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])||Ap(h,kp,up)),Ip(h,n,!0)),Rp&&i==Mp&&f&&f.name!==Mp&&(Sp?Op(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||Ap(p,c,u[c]);else gp({target:t,proto:!0,forced:xp||l},u);return p[kp]!==d&&Ap(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=$s,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=O,Ip=sp,Op=T,Ap=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=qp(e),t=$p.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),qp=Vo,$p=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=$s,N=Mo,Tf=A,_f=ta,If=$o,Of=function(e,t){if(e<t)throw mf("Not enough arguments");return e},b=I,S=C,x=gf.setImmediate,i=gf.clearImmediate,Af=gf.process,Nf=gf.Dispatch,Rf=gf.Function,A=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,qf,$f,Xf=function(e){var t;bf(xf,e)&&(t=xf[e],delete xf[e],t())},A=(x&&i||(x=function(e){Of(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){Af.nextTick(Mf(e))}:Nf&&Nf.now?Yp=function(e){Nf.now(Mf(e))}:A&&!b?(b=(S=new A).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=A.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=O,N=sp,E=Vp,dd=Ho,hd=Fo,vd=jo,yd=zp,md=Kp,gd=A.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,A=r,I=k,o=x,_d="Promise",Id=_.CONSTRUCTOR,Od=_.REJECTION_EVENT,M=_.SUBCLASSING,Ad=A.getterFor(_d),Nd=A.set,A=I&&I.prototype,Rd=I,Sd=A,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},!Od&&(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))},qd=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(qd,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=Ad(this);try{e(Jd(qd,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=Ad(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}),qf=function(){var e=new Yf,t=Ad(e);this.promise=e,this.resolve=Jd(qd,t),this.reject=Jd(Yd,t)},o.f=Md=function(e){return e===Rd||void 0===e?new qf:Pd(e)},hd(I)&&A!==Object.prototype)){$f=A.then,M||i(A,"then",function(e,t){var r=this;return new Rd(function(e,t){fd($f,r,e,t)}).then(e,t)},{unsafe:!0});try{delete A.constructor}catch(e){}b&&b(A,Sd)}S({global:!0,constructor:!0,wrap:!0,forced:Id},{Promise:Rd}),N(Rd,_d,!1),E(_d);var $d=Yo("iterator"),Xd=!1;try{var Wd=0,Zd={next:function(){return{done:!!Wd++}},return:function(){Xd=!0}};Zd[$d]=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[$d]=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,A=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)}}),A(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,Oh=Ho,Ah=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=Ah("AggregateError"),t=Nh.f(u),l=t.resolve,p=t.reject,r=Rh(function(){var n=Oh(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),A=k,i=Mo,xh=Vo,kh=Fo,Mh=Kp,Ph=ph,b=Zo,Uh=A&&A.prototype,Id=(M({target:"Promise",proto:!0,real:!0,forced:!!A&&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(A)&&(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 qh,_=e,Zd=_.Promise,E=$o("span").classList,o=E&&E.constructor&&E.constructor.prototype,k=o===Object.prototype?void 0:o,$h=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(qh in Xh)Yh($h[qh]&&$h[qh].prototype,qh);Yh(M,"DOMTokenList");var A,b,S=b=A=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=qo,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,A=Zd(function(){function e(){}return!(_v.of.call(e)instanceof e)}),Iv=(M({target:"Array",stat:!0,forced:A},{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),Ov=y,Av=Qo,b=Dc,Nv=(m({target:"Array",proto:!0},{at:function(e){var t=Iv(this),r=Ov(t),e=Av(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,qv=es,$v=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=$v(r),i=qv(e,n),o=qv(t,n),e=2<arguments.length?arguments[2]:void 0,s=Wv((void 0===e?n:qv(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),A,b={forEach:(A=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:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(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,A=((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}),A({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,A=(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=(A({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,Oy=k=Iy,Ay=Ko,Ny=y,Ry=Qo,Sy=x;m({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Ay(this),r=Ny(t),n=Sy(t,0);return n.length=Oy(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=Am(Nm(o-i,0)),a=0;i<o;i++,a++)Om(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),A=g,Vy=tu.indexOf,I=E,zy=A([].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,A=M("join",","),Ky=(o({target:"Array",proto:!0,forced:tu||!A},{join:function(e){return Gy(By(this),void 0===e?",":e)}}),op),Jy=Lo,Yy=Qo,qy=y,I=E,$y=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=qy(t),n=r-1;for((n=1<arguments.length?$y(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,A={left:Cy(!1),right:Cy(!0)},op=m,am=A.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=A.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,A=(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=(A({target:"Array",proto:!0,forced:!E("some")},{some:function(e){return Tm(this,e,1<arguments.length?arguments[1]:void 0)}}),es),Im=y,Om=N,Am=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),A=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:A||!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,qm=S,$m=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)),qm(c+r-n),i=$m(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,A=!Mo(function(){return Object.isExtensible(Object.preventExtensions({}))}),mg=m,gg=g,k=qa,Eg=jo,wg=$s,bg=oa.f,Tg=xs,_g=T,Ig=ta,Og=A,Ag=!1,Ng=Jo("meta"),Rg=0,Sg=tu.exports={enable:function(){Sg.enable=function(){},Ag=!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 Og&&Ag&&Ig(e)&&!wg(e,Ng)&&cg(e),e}},Cg=(k[Ng]=!0,Fo),xg=jo,kg=O,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,qg=oa.f,$g=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:$g(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&&qg(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=qo,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),OE(s,t)?NE(IE(s,t),r):AE(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),OE=Id(o.has),AE=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),qE=Qo,$E=RangeError,XE=function(e,t,r,n){var i=YE(e),r=qE(r),o=r<0?i+r:r;if(i<=o||o<0)throw $E("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)}});qa=e,$s=qs,xs=Fo,T=iu,ta=Zo,A="USE_FUNCTION_CONSTRUCTOR",k=Yo("asyncIterator"),O=qa.AsyncIterator,eu=$s.AsyncIteratorPrototype;if(eu)Tb=eu;else if(xs(O))Tb=O.prototype;else if($s[A]||qa[A])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=Aw("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{Ow(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,Ow=S,Aw=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,qw=y;B&&(nw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=Yw(this),t=qw(e);return 0==t?void 0:e[t-1]},set:function(e){var t=Yw(this),r=qw(t);return t[0==r?0:r-1]=e}}),I("lastItem"));var op=Dc,$w=Ko,Xw=y;B&&(nw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=$w(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"),qs=t0.prototype,r0=e(qs.forEach),n0=e(qs.has),i0=e(qs.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(){}O0.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=O0;function O0(){}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 A0=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:A0.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 A0&&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}$0.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},$0.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return G0.asNumber(e)},$0.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},$0.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},$0.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},$0.prototype.clear=function(){this.listStorage.clear()};var q0=$0;function $0(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))};O=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)};$s=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)};qa=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};A=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 O,gb.CONTAINS_MATCHER=new $s,gb.STARTS_WITH_MATCHER=new qa,gb.ENDS_WITH_MATCHER=new A,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(){}Ob.prototype.matches=function(e,t,r){return!1};Rs=Ob;function Ob(){}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 Ab=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}qb.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,"]"))}},qb.prototype.properties=function(e){return s0.isTrackEvent(e)?e.event.properties:s0.isExposureEvent(e)||s0.isRemoteConfigEvent(e)?e.properties:void 0};var Yb=qb;function qb(){}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 $b=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 Ab,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 $b(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 A0.of(e,t,n,d.OVERRIDDEN);case"FEATURE_FLAG":return A0.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?A0.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 A0.ofDefault(e,t,d.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return A0.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 A0.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):A0.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?A0.ofDefault(e,t,d.VARIATION_DROPPED):A0.of(e,t,n,d.TRAFFIC_ALLOCATED):A0.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 A0.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 A0.ofDefault(e,t,d.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return A0.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):A0.ofDefault(e,t,d.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var TT=_T;function _T(e){this.containerResolver=e}OT.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):A0.ofDefault(e,t,d.IDENTIFIER_NOT_FOUND)};var IT=OT;function OT(){}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 AT=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}$T.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 qT=$T;function $T(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 AT(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 qT(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 A0)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."),qe.of(d.SDK_NOT_READY);e=r.getInAppMessageOrNull(e);if(!e)return m_.warn("In app message does not exist."),qe.of(d.IN_APP_MESSAGE_NOT_FOUND);r=v_.of(r,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(r,F0.create());return qe.of(t.reason,t.inAppMessage,t.message)},E_.prototype.tryInAppMessage=function(t,e){var r,n=On.start();try{r=this.inAppMessage(t,e)}catch(e){m_.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=qe.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:A_,onunhandledrejection:N_}}var I_,O_=null;function A_(o,s){O_=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),O_&&O_.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 $r(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()}q_.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},q_.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},q_.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},q_.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var Y_=q_;function q_(){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 $_=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}AI.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 OI=AI;function AI(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 qI(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($I.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),$I.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis};var qI=$I;function $I(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}tO.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},tO.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>tO.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-tO.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},tO.prototype.supports=function(e){return"IMPRESSION"===e.type},tO.IMPRESSION_MAX_SIZE=100;var eO=tO;function tO(e){this.impressionStorage=e}nO.prototype.process=function(e,t,r){},nO.prototype.supports=function(e){return"CLOSE"===e.type};var rO=nO;function nO(){}oO.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},oO.prototype.supports=function(e){return"ACTION"===e.type};var iO=oO;function oO(e){this.actionHandlerFactory=e}aO.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 sO=aO;function aO(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}cO.prototype.matches=function(e,t,r){return!!s0.isTrackEvent(r)&&(!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r))};var uO=cO;function cO(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}pO.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var lO=pO;function pO(e){this.handlers=e}dO.prototype.handle=function(e,t){e.close()},dO.prototype.supports=function(e){return"CLOSE"===e.type};var fO=dO;function dO(){}vO.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))},vO.prototype.supports=function(e){return"ACTION"===e.type};var hO=vO;function vO(e){this.eventHandler=e}mO.prototype.open=function(e){window.location.href=e.href};var yO=mO;function mO(){}EO.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var gO=EO;function EO(){}bO.prototype.open=function(e){window.open(e.href)};var wO=bO;function bO(){}_O.prototype.open=function(e){window.location.replace(e)};var TO=_O;function _O(){}function IO(e,t,r){return null===e||(!NO(t,OO)||r.current!==r.referrer)&&!NO(e,t)}var OO={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},AO={current:void 0,referrer:void 0},NO=function(t,r){return Object.keys(OO).every(function(e){return t[e]===r[e]})},RO=(SO.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},OO),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)},SO.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();IO(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},SO.prototype.onSessionEnded=function(e,t,r){},SO.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},SO);function SO(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}xO.prototype.get=function(){var e=this.storage.getItem(vn);return e?JSON.parse(e):null},xO.prototype.set=function(e){this.storage.setItem(vn,JSON.stringify(e))};var CO=xO;function xO(e){this.storage=e}MO.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},MO.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},MO.getQueryParams=function(e){return"undefined"==typeof window?{}:new MO(window.location.search).getQueryParams(e)};var kO=MO;function MO(e){this.search=e}UO.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},UO.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,UO.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var PO=UO;function UO(){}LO.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},LO.prototype.params=function(e){return(a.isNullOrUndefined(e)?kO:new kO(e)).getQueryParams(LO.CAMPAIGN_QUERY_CONDITION)},LO.prototype.resolve=function(e){return{utm_campaign:e[FO],utm_content:e[jO],utm_id:e[VO],utm_medium:e[zO],utm_source:e[HO],utm_term:e[BO],gclid:e[GO],fbclid:e[KO]}},LO.prototype.parseDomain=function(){if("undefined"==typeof window)return AO;return{current:PO.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,PO.extractDomain(e)}()}},LO.CAMPAIGN_QUERY_CONDITION=function(e,t){return oi.isNotEmptyString(t)};var DO=LO;function LO(){}var FO="utm_campaign",jO="utm_content",VO="utm_id",zO="utm_medium",HO="utm_source",BO="utm_term",GO="gclid",KO="fbclid",JO=(YO.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},YO.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))}},YO);function YO(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()}$O.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 qO=$O;function $O(e){this.workspaceFetcher=e}var XO={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.28.0",IAM_RENDERER_VERSION_HEADER:"0.0.3"},WO=(ZO.config=function(e){return c(c({},XO),e)},ZO.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)},ZO.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}},ZO.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},ZO.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},ZO.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},ZO);function ZO(){}eA.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},eA.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]}})})},eA.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]}})})},eA.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]}})})},eA.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 QO=eA;function eA(){this.synchronizations=[]}rA.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]}})})},rA.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]}})})},rA.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()}))},rA.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},rA.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 tA=rA;function rA(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}iA.prototype.schedule=function(e,t){e=new oA(e,t);return e.start(),e},iA.prototype.schedulePeriodically=function(e,t,r){e=new aA(e,t,r);return e.start(),e};var nA=iA;function iA(){}sA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},sA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var oA=sA;function sA(e,t){this.delayMillis=e,this.task=t,this.timeout=null}uA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},uA.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},uA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var aA=uA;function uA(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}lA.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)]}})})},lA.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()},lA.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=On.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]}})})},lA.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 cA=lA;function lA(e,t){this.url=e,this.transport=t}fA.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)]}})})},fA.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()},fA.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=On.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]}})})},fA.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 pA=fA;function fA(e,t){this.url=e,this.transport=t}hA.prototype.getExperiments=function(){return Array.from(this.experiments.values())},hA.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},hA.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},hA.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},hA.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},hA.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},hA.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},hA.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},hA.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},hA.prototype.getContainerOrNull=function(e){return this.containers.get(e)},hA.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},hA.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},hA.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},hA.prototype.getAttributes=function(){return this.attributes},hA.from=function(e){return new hA(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 dA=hA;function hA(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}yA.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},yA.prototype.setWorkspace=function(e){try{this.workspace=dA.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},yA.prototype.get=function(){return this.workspace},yA.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]}})})},yA.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var vA=yA;function yA(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}gA.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.shutdownDispatch(e):this.normalDispatch(e)},gA.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]}})})},gA.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 mA=gA;function gA(e,t,r){this.transport=e,this.shutdownTransport=t,this.retryManager=r}wA.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},wA.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()},wA.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=On.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 EA=wA;function wA(e,t){this.url=e,this.transport=t}TA.prototype.add=function(e){return this.repository.add(e)},TA.prototype.delete=function(e){return this.repository.delete(e)},TA.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 bA=TA;function TA(e,t){this.repository=e,this.transport=t}function _A(){this.listeners={}}_A.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},_A.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},_A.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ne(OA,IA=_A);var IA,i=OA;function OA(){return null!==IA&&IA.apply(this,arguments)||this}Ne(RA,AA=i),RA.prototype.process=function(e){this.isEnqueueTarget(e)&&this.enqueue(e),this.emit("event",e)},RA.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},RA.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},RA.prototype.isPageViewEvent=function(e){return s0.isTrackEvent(e)&&"$page_view"===e.event.key},RA.prototype.isEnqueueTarget=function(e){return!(this.isPageViewEvent(e)&&!this.autoTrackPageView)},RA.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=[])},RA.prototype.close=function(){this.flush(!0)};var AA,NA=RA;function RA(e,t,r,n,i){var o=AA.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}CA.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 SA=CA;function CA(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}kA.intercept=function(e,t){return t instanceof SA?t:new SA(e,Le.instance,t)};var xA=kA;function kA(){}PA.create=function(){return new PA},PA.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 MA=PA;function PA(){}DA.create=function(){return new DA},DA.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())})},DA.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 UA=DA;function DA(){}FA.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var LA=FA;function FA(e){this.invocationResponseResolver=e}zA.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 jA,VA=zA;function zA(e){this.invocationResponseResolver=e}(Cs=jA=jA||{}).prompt="prompt",Cs.function="function";BA.prototype.getInvocator=function(e,t){return e===jA.prompt?new LA(t):e===jA.function?new VA(t):null};var HA=BA;function BA(){}KA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},KA.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var GA=KA;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()}var JA=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.event=n},YA=(qA.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 JA(t,o,i,e)}return null},qA);function qA(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}XA.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=WA.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 $A=XA;function XA(e){this.targetMatcher=e}ZA.of=function(e,t){return new ZA(new D0("SPLIT_URL",t.insertId),t.user,e)};var WA=ZA;function ZA(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 QA=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,e):null}catch(e){return null}},rN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},rN.prototype.resolveManualRedirectUrl=function(e,t){e=sb.tryParse(e);return e?this.decorateCampaign(e,t):null},rN.prototype.decorateCampaign=function(e,t){t=t.event.user.hackleProperties.queryParameter;if(oi.isNotEmptyString(t)){for(var t=this.campaignParser.parse(t),r=e,n=0,i=Object.entries(t);n<i.length;n++){var o=i[n],s=o[0],o=o[1];oi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},rN.SPLIT_URL_CONFIG_KEY="redirectUrl";var tN=rN;function rN(e){this.campaignParser=e}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=WO.config(t);WO.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 HA).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=WO.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=WO.isBeaconSupported(),a=xA.intercept(n,MA.create()),u=xA.intercept(n,UA.create()),c=a,l=(r&&(c=u),new QO),p=new tA(l,new nA,WO.pollingIntervalMillis(t)),f=new aN(n,$_.postfix(o,"_".concat(e.slice(0,8)))),d=new cA(tI.clientFetch(t.sdkUrl,n.key),a),f=new vA(f,d),d=(l.add("workspace",f),new pA(tI.userCohorts(t.sdkUrl),a)),h=new DO,v=new V_($_.postfix(s,"_".concat(e))),y=v.getUser(),m=t.user||null,g=new F_(Oo(),v,d,h,Le.instance,y,m),E=(l.add("cohort",g),new K_(t.sessionTimeoutMillis,$_.postfix(s,"_".concat(e.slice(8))))),v=(g.addListener(E),new R_(o,"".concat(ln,"_").concat(e),nn)),d=new EA(tI.clientDispatch(t.eventUrl),a),m=d,w=(r&&(m=new EA(tI.beaconDispatch(t.eventUrl,n.key),u)),new bA(v,d)),l=new mA(d,m,w),r=new b0(WO.dedupIntervalMillis(t)),u=new NA(l,nn,new nA,sn,t.auto_track_page_view),v=new E0(u,r,E,g),b=new oN,d=new q0(new W_(s,"".concat(yn,"_").concat(e.slice(0,8)))),m=new q0(new W_(s,"".concat(mn,"_").concat(e.slice(0,8)))),l=new nI($_.prefix(o,"".concat(gn,"_").concat(e.slice(0,8),"_"))),r=new XI($_.prefix(o,"".concat(En,"_").concat(e.slice(0,8),"_"))),T=g_.create(f,v,[d,m],l),v=new RO(new CO($_.postfix(s,"_".concat(e.slice(0,8)))),h,T,g),e=new m0(g,T),e=(E.addListener(v),E.addListener(e),new _I(T)),l=new oI([new aI,new cI(new yO),new pI(new yO),new dI(l,Le.instance),new vI(new gO),new mI(new gO),new EI(new wO),new bI(new wO)]),l=new ZI([new eO(r),new iO(l),new rO]),e=new sO(Le.instance,e,l),l=new lO([new fO,new hO(e)]),_=new DI(tI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),_=new OI(new PI(_),e,l),e=new uO(new FI(s_.get("targetMatcher")),new HI(r)),l=new CI(f,e,T),r=(new NI(u,l,_),new qO(f)),e=(new JO(u,r),new $A(s_.get("targetMatcher"))),l=new nN(s,wn,{days:bn}),_=new YA(f,e,l,T),r=new QA(new tN(h),new TO,l,b),f=(new GA(u,_,r,T),new Q_(T,g,d,m)),l=(null==(e=t.devTool)?void 0:e.userExplorer)&&"function"==typeof(null==(h=t.devTool)?void 0:h.userExplorer),u=t.devTool&&l?{manager:t.devTool,userExplorer:f}:void 0,_=new gi(tI.monitoring(t.monitoringUrl),a,c,new nA,on),I=(ni.addRegistry(_),p.start(),new ho(T,p,E,g,u));lN=I;return window.addEventListener("onpagehide"in window?"pagehide":"unload",function(){Ao(),E.updateLastEventTime((new Date).getTime()),I.close(),ni.globalRegistry.close()}),window.addEventListener("pageshow",i),document.addEventListener("visibilitychange",function(){document.hidden||i()}),t.autoOpenDevTool&&(t.devTool?I.showUserExplorer():cN.error("DevTool is not provided")),r=Date.now(),d=g.currentUser,m=E.currentSessionId,(C_(y,d)?E.startNewSessionIfNeeded(d,r):E.startNewSession(y,d,r))===m&&v.startNewCampaignIfNeeded(d,r),I.onReady(function(){(new T_).install(T,g);var e=I;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){}}I.trackPageView(),b.dispatchDoneEventIfNeeded()}),I}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.28.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 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,ON=oa?Symbol.for("react.element"):60103,AN=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:ON,type:e,key:o,ref:s,props:i,_owner:jN.current}}function BN(e){return"object"==typeof e&&null!==e&&e.$$typeof===ON}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 qN(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 ON:case AN:o=!0}}if(o)return n(i,t,""===r?"."+$N(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+$N(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+$N(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 $N(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:ON,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="";qN(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,qs={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;qN(e,XN,t=JN(null,null,t,r)),YN(t)},count:function(e){return qN(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=qs,_.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:ON,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,O="function"==typeof Symbol&&Symbol.for,uR=O?Symbol.for("react.element"):60103,cR=O?Symbol.for("react.portal"):60106,lR=O?Symbol.for("react.fragment"):60107,pR=O?Symbol.for("react.strict_mode"):60108,fR=O?Symbol.for("react.profiler"):60114,dR=O?Symbol.for("react.provider"):60109,hR=O?Symbol.for("react.context"):60110,vR=O?Symbol.for("react.concurrent_mode"):60111,yR=O?Symbol.for("react.forward_ref"):60112,mR=O?Symbol.for("react.suspense"):60113,gR=O?Symbol.for("react.suspense_list"):60120,ER=O?Symbol.for("react.memo"):60115,wR=O?Symbol.for("react.lazy"):60116,bR=O?Symbol.for("react.block"):60121,TR=O?Symbol.for("react.fundamental"):60117,_R=O?Symbol.for("react.responder"):60118,IR=O?Symbol.for("react.scope"):60119,OR="function"==typeof Symbol&&Symbol.iterator,AR="@@iterator";function NR(e){if(null===e||"object"!=typeof e)return null;e=OR&&e[OR]||e[AR];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 qR(e,t,r){this.props=e,this.context=t,this.refs=BR,this.updater=r||HR}YR.prototype=GR.prototype,(O=qR.prototype=new YR).constructor=qR,sR(O,GR.prototype),O.isPureReactComponent=!0;var $R,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(){$R||($R=!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 OS(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 AS(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++)OS(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 AS(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++)OS(arguments[i],n.type);return AS(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}O=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=qR,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=O,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}),$s=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=$r,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=$s,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=qe,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=Ar,n.InAppMessageText=Fr,n.InAppMessageTextAttribute=Vr,n.InAppMessageTextStyle=Hr,n.InAppMessageUserOverride=Rr,n.Logger=s,n.MATCH_OPERATORS=Wt,n.MATCH_TYPES=$t,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=Ot,n.TargetRule=St,n.TargetingType=tr,n.Variation=st,n.Version=Bt,n.createInstance=function(e,t){return new wN(e,t)},n.getUserId=Oo,n.removeUserId=Ao,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})});
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 V=[],j=0;j<256;++j)V.push((j+256).toString(16).substr(1));function z(e,t){var t=1<arguments.length&&void 0!==t?t:0,e=(V[e[t+0]]+V[e[t+1]]+V[e[t+2]]+V[e[t+3]]+"-"+V[e[t+4]]+V[e[t+5]]+"-"+V[e[t+6]]+V[e[t+7]]+"-"+V[e[t+8]]+V[e[t+9]]+"-"+V[e[t+10]]+V[e[t+11]]+V[e[t+12]]+V[e[t+13]]+V[e[t+14]]+V[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),q=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,$=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($.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?$(192|t>>>6)+$(128|63&t):$(224|t>>>12&15)+$(128|t>>>6&63)+$(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),$(240|t>>>18&7)+$(128|t>>>12&63)+$(128|t>>>6&63)+$(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 $(55296+(t>>>10))+$(56320+(1023&t));case 3:return $((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return $((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ce=e=>e.replace(ae,ue);var o=t=>{if(t=t.replace(/\s+/g,""),!q.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?$(r>>16&255):64===o?$(r>>16&255,r>>8&255):$(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(de(e)),he=r?e=>Buffer.from(e,"base64").toString("utf8"):G?e=>G.decode(pe(e)):e=>ce(le(e)),de=e=>Z(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ve=e=>he(de(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,xe=(Ce.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},Ce.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]})},Ce.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},Ce.isValidType=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH)},Ce.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},Ce.MAX_IDENTIFIER_TYPE_LENGTH=128,Ce.MAX_IDENTIFIER_VALUE_LENGTH=512,Ce);function Ce(){}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(){}je.prototype.get=function(e,t){return t};var Ve=je;function je(){}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}$e.prototype.isShow=function(){return a.isNotNullOrUndefined(this.inAppMessage)&&a.isNotNullOrUndefined(this.message)},$e.of=function(e,t,r,n){return new $e(t,r,e,n=void 0===n?{}:n)};var qe=$e;function $e(e,t,r,n){this.inAppMessage=e,this.message=t,this.reason=r,this.properties=n}We.of=function(e,t,r){return new We(e,t,r=void 0===r?new Ve: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 Ve:t)},Qe.off=function(e,t){return new Qe(!1,e,t=void 0===t?new Ve: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}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";var h=d;function d(){}var it=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],ot=(st.fromJson=function(e,t){var r=st.experimentStatusOrNull(t.execution.status),n=t.variations.map(function(e){return new at(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 xt.fromJson(e,rr.IDENTIFIER)}),s=p.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return wt.fromJson(e,rr.PROPERTY)}),a=en.fromJson(t.execution.targetUrls),u=Ge(it,t.implementationType),c=p.mapNotNullOrUndefined(t.execution.targetRules,function(e){return xt.fromJson(e,rr.PROPERTY)}),l=Rt.fromJson(t.execution.defaultRule);return r&&u&&l&&new st(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)},st.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,"]"))}},st.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},st.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},st.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},st);function st(e,t,r,n,i,o,s,a,u,c,l,p,f,h,d,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=h,this.containerId=d,this.implementationType=v,this.winnerVariationId=y}var at=function(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.parameterConfigurationId=n},ut=(ct.fromJson=function(e){return new ct(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new lt(t,r,e)}))},ct);function ct(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}pt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var lt=pt;function pt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}ht.fromJson=function(e){return new ht(e.id,e.key)};var ft=ht;function ht(e,t){this.id=e,this.key=t}vt.ID="$id",vt.USER="$userId",vt.DEVICE="$deviceId",vt.SESSION="$sessionId",vt.HACKLE_DEVICE="$hackleDeviceId";var dt=vt;function vt(){}function yt(e){var t=new mt;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()}gt.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},gt.prototype.add=function(e,t){var r=xe.sanitizeValue(t);return xe.isValidType(e)&&r?this.identifiers[e]=t:Be.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},gt.prototype.build=function(){return this.identifiers};var mt=gt;function gt(){this.identifiers={}}function Et(e){var t,r={};return r.id=null!=(t=xe.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=xe.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=xe.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Me.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=xe.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}bt.fromJson=function(e,t){return new bt(p.mapNotNullOrUndefined(e.conditions,function(e){return Tt.fromJson(e,t)}))},bt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var wt=bt;function bt(e){this.conditions=e}_t.fromJson=function(e,t){var r=It.fromJson(e.key);if(r&&t.supports(r.type))return(t=Ot.fromJson(e.match))&&new _t(r,t)},_t.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var Tt=_t;function _t(e,t){this.key=e,this.match=t}At.fromJson=function(e){var t=Ge(er,e.type);return t&&new At(t,e.name)},At.prototype.toJson=function(){return{type:this.type,name:this.name}};var It=At;function At(e,t){this.type=e,this.name=t}Nt.fromJson=function(e){var t=Ge(Xt,e.type),r=Ge(Zt,e.operator),n=Ge(Wt,e.valueType);return t&&r&&n&&new Nt(t,r,n,e.values)},Nt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var Ot=Nt;function Nt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}St.fromJson=function(e){var t=Ge(Qt,e.type);return t&&new St(t,e.variationId,e.bucketId)};var Rt=St;function St(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}Ct.fromJson=function(e,t){t=wt.fromJson(e.target,t),e=Rt.fromJson(e.action);return t&&e&&new Ct(t,e)};var xt=Ct;function Ct(e,t){this.target=e,this.action=t}Mt.fromJson=function(e){var t=Ge(tr,e.type);return t&&new Mt(e.id,e.key,t,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.SEGMENT)}))};var kt=Mt;function Mt(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}Ut.fromJson=function(e){return new Ut(e.id,e.bucketId,e.groups.map(function(e){return Dt.fromJson(e)}))},Ut.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var Pt=Ut;function Ut(e,t,r){this.id=e,this.bucketId=t,this.groups=r}Lt.fromJson=function(e){return new Lt(e.id,e.experiments)};var Dt=Lt;function Lt(e,t){this.id=e,this.experiments=t}Vt.fromJson=function(e){var t=Ge(Wt,e.type),r=p.mapNotNullOrUndefined(e.targetRules,function(e){return jt.fromJson(e,rr.PROPERTY)}),n=Ht.fromJson(e.defaultValue);return t&&new Vt(e.id,e.key,t,e.identifierType,r,n)};var Ft=Vt;function Vt(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}zt.fromJson=function(e,t){t=wt.fromJson(e.target,t);return t&&new zt(e.key,e.name,t,e.bucketId,Ht.fromJson(e.value))};var jt=zt;function zt(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}Bt.fromJson=function(e){return new Bt(e.id,e.value)};var Ht=Bt;function Bt(e,t){this.id=e,this.rawValue=t}Kt.tryParse=function(e){var t,r,n,i,e=Kt.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 Kt(new Jt(parseInt(t,10),parseInt(r,10),parseInt(n,10)),qt.parse(i),qt.parse(e))},Kt.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},Kt.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},Kt.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},Kt.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},Kt.prototype.isLessThan=function(e){return this.compareTo(e)<0},Kt.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},Kt.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 Gt=Kt;function Kt(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}Yt.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var Jt=Yt;function Yt(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 qt=$t;function $t(e){this.identifiers=e}var Xt=["MATCH","NOT_MATCH"],Wt=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Zt=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],Qt=["VARIATION","BUCKET"],er=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"],tr=["USER_ID","USER_PROPERTY"],rr=(nr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},nr.IDENTIFIER=new nr("SEGMENT"),nr.PROPERTY=new nr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT"),nr.SEGMENT=new nr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT"),nr);function nr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var ir=["ACTIVE","DRAFT","PAUSE"],or=["WEB","ANDROID","IOS"],sr=["IMMEDIATE","CUSTOM"],ar=["MODAL"],ur=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY"],cr=["VERTICAL","HORIZONTAL"],lr=["CLICK"],pr=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],fr=(hr.fromJson=function(e){var t,r=Ge(ir,e.status);if(!a.isNullOrUndefined(r)){switch(Ge(sr,e.timeUnit)){case"IMMEDIATE":t=new dr;break;case"CUSTOM":if(a.isNullOrUndefined(e.startEpochTimeMillis))return;if(a.isNullOrUndefined(e.endEpochTimeMillis))return;t=new yr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=Cr.fromJson(e.messageContext);if(!a.isNullOrUndefined(o))return n=e.eventTriggerRules.map(Er.fromJson),i=br.fromJson(e.eventFrequencyCap),new hr(e.id,e.key,r,t,new gr(n,i),Nr.fromJson(e.targetContext),o)}},hr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},hr);function hr(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}vr.prototype.within=function(e){return!0};var dr=vr;function vr(){this.type="IMMEDIATE"}mr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var yr=mr;function mr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var gr=function(e,t){this.rules=e,this.frequencyCap=t},Er=(wr.fromJson=function(e){return new wr(e.eventKey,p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))},wr);function wr(e,t){this.eventKey=e,this.targets=t}Tr.fromJson=function(e){return e?new Tr(e.identifiers.map(_r.fromJson),Ar.fromJson(e.duration)):null};var br=Tr;function Tr(e,t){this.identifierCaps=e,this.durationCap=t}Ir.fromJson=function(e){return new Ir(e.identifierType,e.countPerIdentifier)};var _r=Ir;function Ir(e,t){this.identifierType=e,this.count=t}Or.fromJson=function(e){if(!e)return null;var t=Ge(Ue,e.durationUnit.timeUnit);return t?new Or(De.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Ar=Or;function Or(e,t){this.durationMillis=e,this.count=t}Rr.fromJson=function(e){return new Rr(e.overrides.map(Sr.fromJson),p.mapNotNullOrUndefined(e.targets,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var Nr=Rr;function Rr(e,t){this.overrides=e,this.targets=t}xr.fromJson=function(e){return new xr(e.identifierType,e.identifiers)};var Sr=xr;function xr(e,t){this.identifierType=e,this.identifiers=t}kr.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new Mr(e.exposure.key)),Ke(or,e.platformTypes));if(!a.isNullOrUndefined(r)){var n=Ke(cr,e.orientations);if(!a.isNullOrUndefined(n)){var i=p.mapOrUndefined(e.messages,Pr.fromJson);if(!a.isNullOrUndefined(i))return new kr(e.defaultLang,t,r,n,i)}}};var Cr=kr;function kr(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var Mr=function(e){this.key=e},Pr=(Ur.fromJson=function(e){var t=Dr.fromJson(e.layout);if(!a.isNullOrUndefined(t)){var r=p.mapOrUndefined(e.images,Fr.fromJson);if(!a.isNullOrUndefined(r)){var n=p.mapOrUndefined(e.buttons,Kr.fromJson);if(!a.isNullOrUndefined(n)){var i=void 0;if(!a.isNotNullOrUndefined(e.closeButton)||(i=Kr.fromJson2(e.closeButton),!a.isNullOrUndefined(i)))return new Ur(e.variationKey,e.lang,t,r,e.text?jr.fromJson(e.text):void 0,n,i,new qr(e.background.color))}}}},Ur.prototype.toJson=function(){var e;return{variationKey:this.variationKey,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}}},Ur);function Ur(e,t,r,n,i,o,s,a){this.variationKey=e,this.lang=t,this.layout=r,this.images=n,this.text=i,this.buttons=o,this.closeButton=s,this.background=a}Lr.fromJson=function(e){var t=Ge(ur,e.layoutType),e=Ge(ar,e.displayType);if(!a.isNullOrUndefined(e)&&!a.isNullOrUndefined(t))return new Lr(e,t)};var Dr=Lr;function Lr(e,t){this.displayType=e,this.layoutType=t}Vr.fromJson=function(e){var t=Ge(cr,e.orientation);if(!a.isNullOrUndefined(t)){var r=void 0;if(!a.isNotNullOrUndefined(e.action)||(r=$r.fromJson(e.action),!a.isNullOrUndefined(r)))return new Vr(t,e.imagePath,r)}},Vr.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 Fr=Vr;function Vr(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}zr.fromJson=function(e){return new zr(Hr.fromJson(e.title),Hr.fromJson(e.body))},zr.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 jr=zr;function zr(e,t){this.title=e,this.body=t}Br.fromJson=function(e){return new Br(e.text,new Gr(e.style.textColor))};var Hr=Br;function Br(e,t){this.text=e,this.style=t}var Gr=function(e){this.color=e},Kr=(Jr.fromJson=function(e){var t=$r.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Jr(e.text,new Yr(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},Jr.fromJson2=function(e){var t=$r.fromJson(e.action);if(!a.isNullOrUndefined(t))return new Jr("✕",new Yr(e.style.color,"#FFFFFF","#FFFFFF"),t)},Jr.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},Jr.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},Jr);function Jr(e,t,r){this.text=e,this.style=t,this.action=r}var Yr=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},qr=function(e){this.color=e},$r=(Xr.fromJson=function(e){var t=Ge(lr,e.behavior);if(!a.isNullOrUndefined(t)){var r=Ge(pr,e.type);if(!a.isNullOrUndefined(r))return new Xr(t,r,null!=(t=e.value)?t:void 0)}},Xr.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Xr);function Xr(e,t,r){this.behavior=e,this.type=t,this.value=r}var Wr=function(e){this.id=e},Zr=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Qr.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new Qr(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},Qr);function Qr(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}tn.fromJson=function(e){if(null!==e)return new tn(p.mapNotNullOrUndefined(e.match,function(e){return wt.fromJson(e,rr.PROPERTY)}),p.mapNotNullOrUndefined(e.notMatch,function(e){return wt.fromJson(e,rr.PROPERTY)}))};var en=tn;function tn(e,t){this.includeTargets=e,this.excludeTargets=t}var rn="X-HACKLE-SDK-KEY",nn="X-HACKLE-SDK-NAME",on="X-HACKLE-SDK-VERSION",sn="X-HACKLE-SDK-TIME",an=100,un=6e4,cn=500,ln=3650,pn="_hackle_hid",fn="_hackle_id",hn="hackle-repository-storage",dn="_hackle_session_id",vn="_hackle_last_event_ts",yn="_hackle_uid",mn="_hackle_did",gn="_hackle_mkt",En="hackle-manual-override_ab",wn="hackle-manual-override_ff",bn="hackle-iam-hide",Tn="hackle-iam-impression",_n="hackle-split-url-redirected",In=1/86400*3,An="hackle-workspace-config",On=6e4,Nn=(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.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},Rn);function Rn(e){this.name=e,this._tags={},this.name=e}xn.start=function(e){return new xn(e=void 0===e?xn.defaultClock:e)},xn.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},xn.defaultClock=new Le;var Sn=xn;function xn(e){this._clock=e,this.startTime=this._clock.tick()}kn.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},kn.prototype.tag=function(e,t){return this._tags[e]=t,this},kn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Cn=kn;function kn(e){this.name=e,this._tags={}}Pn.prototype.values=function(){return Array.from(this.data.values())},Pn.prototype.keys=function(){return Array.from(this.data.keys())},Pn.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},Pn.prototype.has=function(e){return void 0!==this.get(e)},Pn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},Pn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},Pn.prototype.forEach=function(e){this.data.forEach(e)},Pn.prototype.filter=function(e){for(var t=new Pn(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},Pn.prototype.entries=function(){return Array.from(this.data.entries())};var Mn=Pn;function Pn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(Dn.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var Un=Dn;function Dn(e,t){this.valueSupplier=t,this.field=e}function Ln(e,t){return e.name===t.name&&xe.isEquals(e.tags,t.tags)}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 Cn(e).tags(t).register(this)},Fn.prototype.timer=function(e,t){return void 0===t&&(t={}),new Nn(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 Mn(Ln)}Ne(jn,Vn=e),jn.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.")))},jn.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},jn.prototype.close=function(){this.stop()};var Vn,r=jn;function jn(e,t){var r=Vn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}Hn.prototype.count=function(){return this.counterValue},Hn.prototype.increment=function(e){this.counterValue+=null!=e?e:1},Hn.prototype.measure=function(){return[new Un("count",this.count.bind(this))]};var zn=Hn;function Hn(e){this.counterValue=0,this.id=e}Gn.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new zn(this.id),e},Gn.prototype.count=function(){return this.currentCounter.count()},Gn.prototype.increment=function(e){this.currentCounter.increment(e)},Gn.prototype.measure=function(){return[new Un("count",this.count.bind(this))]};var Bn=Gn;function Gn(e){this.id=e,this.currentCounter=new zn(e)}Jn.prototype.count=function(){return this._count},Jn.prototype.totalTime=function(e){return De.nanosToUnit(this._total,e)},Jn.prototype.max=function(e){return De.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=De.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 Un("count",this.count.bind(this)),new Un("total",function(){return e.totalTime("milliseconds")}),new Un("max",function(){return e.max("milliseconds")}),new Un("mean",function(){return e.mean("milliseconds")})]};var Kn=Jn;function Jn(e){this._count=0,this._total=0,this._max=0,this.id=e}qn.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new Kn(this.id),e},qn.prototype.count=function(){return this.currentTimer.count()},qn.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},qn.prototype.max=function(e){return this.currentTimer.max(e)},qn.prototype.record=function(e,t){this.currentTimer.record(e,t)},qn.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},qn.prototype.measure=function(){var e=this;return[new Un("count",this.count.bind(this)),new Un("total",function(){return e.totalTime("milliseconds")}),new Un("max",function(){return e.max("milliseconds")}),new Un("mean",function(){return e.mean("milliseconds")})]};var Yn=qn;function qn(e){this.id=e,this.currentTimer=new Kn(e)}Ne(Xn,$n=r),Xn.prototype.createCounter=function(e){return new Bn(e)},Xn.prototype.createTimer=function(e){return new Yn(e)},Xn.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)};var $n,B=Xn;function Xn(e,t){return $n.call(this,e,t)||this}Zn.prototype.count=function(){return 0},Zn.prototype.increment=function(e){},Zn.prototype.measure=function(){return[new Un("count",this.count.bind(this))]};var Wn=Zn;function Zn(e){this.id=e}Object.defineProperty(ei.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),ei.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},ei.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},ei.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},ei.prototype.measure=function(){return[new Un("count",this.count.bind(this))]};var Qn=ei;function ei(e){this._counters=new Mn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new Wn(e)}ri.prototype.measure=function(){var e=this;return[new Un("count",this.count.bind(this)),new Un("total",function(){return e.totalTime("milliseconds")}),new Un("max",function(){return e.max("milliseconds")}),new Un("mean",function(){return e.mean("milliseconds")})]},ri.prototype.count=function(){return 0},ri.prototype.totalTime=function(e){return 0},ri.prototype.max=function(e){return 0},ri.prototype.mean=function(e){return 0},ri.prototype.record=function(e,t){};var ti=ri;function ri(e){this.id=e}Object.defineProperty(ii.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),ii.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},ii.prototype.max=function(e){return this.firstTimer.max(e)},ii.prototype.mean=function(e){return this.firstTimer.mean(e)},ii.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(ii.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),ii.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},ii.prototype.count=function(){return this.firstTimer.count()},ii.prototype.measure=function(){var e=this;return[new Un("count",this.count.bind(this)),new Un("total",function(){return e.totalTime("milliseconds")}),new Un("max",function(){return e.max("milliseconds")}),new Un("mean",function(){return e.mean("milliseconds")})]};var ni=ii;function ii(e){this._timers=new Mn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new ti(e)}Ne(si,oi=e),si.prototype.createCounter=function(e){e=new Qn(e);return this.addRegistry(e),e},si.prototype.createTimer=function(e){e=new ni(e);return this.addRegistry(e),e},si.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},si.prototype.add=function(r){r instanceof si||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)}))},si.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var oi,o=si;function si(){var e=null!==oi&&oi.apply(this,arguments)||this;return e.registries=new Mn(function(e,t){return e.id===t.id}),e}ui.counter=function(e,t){return ui.globalRegistry.counter(e,t)},ui.timer=function(e,t){return ui.globalRegistry.timer(e,t)},ui.addRegistry=function(e){ui.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},ui.globalRegistry=new o;var ai=ui;function ui(){}li.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},li.isNotEmptyString=function(e){return!a.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var ci=li;function li(){}fi.builder=function(){return new hi},fi.get=function(e){return fi.builder().url(e).build()},fi.prototype.toBuilder=function(){return new hi(this)};var pi=fi;function fi(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}di.prototype.url=function(e){return this._url=e,this},di.prototype.method=function(e){return this._method=e,this},di.prototype.body=function(e){return this._body=e,this},di.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},di.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},di.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new pi(this._url,this._method,this._body,this._headers.build(),e)};var hi=di;function di(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:mi.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}yi.ok=function(e,t){return yi.of(200,e,t)},yi.of=function(e,t,r){return new yi(e,null!=t?t:null,null!=r?r:mi.empty())},yi.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},yi.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},yi.prototype.isNotModified=function(){return 304===this.statusCode};var vi=yi;function yi(e,t,r){this.statusCode=e,this.body=t,this.headers=r}gi.empty=function(){return new gi(new Map)},gi.builder=function(){return new Ei(new Map)},gi.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(ci.equalsIgnoreCase(i,e))return n}return null},gi.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},gi.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},{})},gi.prototype.toBuilder=function(){return new Ei(this.headers)},gi.IF_MODIFIED_SINCE="If-Modified-Since",gi.LAST_MODIFIED="Last-Modified";var mi=gi;function gi(e){this.headers=e}wi.prototype.add=function(e,t){return this.headers.set(e,t),this},wi.prototype.build=function(){return new mi(this.headers)};var Ei=wi;function wi(e){this.headers=e}Ne(_i,bi=B),_i.prototype.flushMetrics=function(e,t){var r=this;p.chunked(e.filter(this.isDispatchTarget.bind(this)),an).forEach(function(e){r.dispatch(e,t)})},_i.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},_i.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))})},_i.prototype.createRequest=function(e){return pi.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},_i.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},_i.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]}))}})}},_i.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.publish(!0)}};var bi,Ti=_i;function _i(e,t,r,n,i){n=bi.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}Ai.experiment=function(e,t,r){t=ai.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Ai.featureFlag=function(e,t,r){t=ai.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Ai.remoteConfig=function(e,t,r){t=ai.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},Ai.inAppMessage=function(e,t,r){t=ai.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)};var Ii=Ai;function Ai(){}Ni.record=function(e,t,r){e=ai.timer("api.call",{operation:e,success:Ni.success(r)});t.stop(e)},Ni.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var Oi=Ni;function Ni(){}Si.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)}},Si.decision=function(e,t,r,n,i){return a.isNullOrUndefined(t)?Je.of(n,h.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Ri=Si;function Si(){}var xi=s.log,Ci=(ki.prototype.get=function(t,r){var n,e=Sn.start();try{n=this.decide(t,r)}catch(e){xi.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=Je.of(r,h.EXCEPTION)}return Ii.remoteConfig(e,t,n),n.value},ki.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Ri.decide(this.core,e,t,r)},ki);function ki(e,t,r){this.core=e,this.userManager=t,this.user=r}Ui.prototype.contains=function(e){return this._properties.has(e)},Ui.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},Ui.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)},Ui.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},Ui.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},Ui.prototype.build=function(){return this._properties};var Mi,Pi=Ui;function Ui(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(i=Mi=Mi||{}).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";Li.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Pi).addProperties(e).addProperties(t).build()};var Di=Li;function Li(){}Vi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Pi).addProperties(e).addProperties(t,!0).build()};var Fi=Vi;function Vi(){}zi.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new Pi).addProperties(e).remove(t).build()};var ji=zi;function zi(){}Bi.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()},Bi.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var Hi=Bi;function Bi(){}Gi.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()},Gi.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},Gi.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},Gi.prototype.contains=function(e,t){return e.includes(t)},Gi.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Re([e],t,!0)},Gi.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=Gi;function Gi(){}Ne(Yi,Ki=t),Yi.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var Ki,Ji=Yi;function Yi(){return null!==Ki&&Ki.apply(this,arguments)||this}Ne(Xi,qi=t),Xi.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},Xi.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var qi,$i=Xi;function Xi(){return null!==qi&&qi.apply(this,arguments)||this}Ne(Qi,Wi=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 Wi,Zi=Qi;function Qi(){return null!==Wi&&Wi.apply(this,arguments)||this}Ne(ro,eo=t),ro.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)},ro.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},ro.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var eo,to=ro;function ro(){return null!==eo&&eo.apply(this,arguments)||this}Ne(oo,no=t),oo.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},oo.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var no,io=oo;function oo(){return null!==no&&no.apply(this,arguments)||this}ao.prototype.operate=function(e,t){return new Map};var so=ao;function ao(){}co.get=function(e){switch(e){case Mi.SET:return new Di;case Mi.SET_ONCE:return new Fi;case Mi.UNSET:return new ji;case Mi.INCREMENT:return new Hi;case Mi.APPEND:return new Ji;case Mi.APPEND_ONCE:return new $i;case Mi.PREPEND:return new Zi;case Mi.PREPEND_ONCE:return new to;case Mi.CLEAR_ALL:return new so;case Mi.REMOVE:return new io}};var uo=co;function co(){}po.prototype.set=function(e,t){return this.add(Mi.SET,e,t)},po.prototype.setOnce=function(e,t){return this.add(Mi.SET_ONCE,e,t)},po.prototype.unset=function(e){return this.add(Mi.UNSET,e,"-")},po.prototype.increment=function(e,t){return this.add(Mi.INCREMENT,e,t)},po.prototype.append=function(e,t){return this.add(Mi.APPEND,e,t)},po.prototype.appendOnce=function(e,t){return this.add(Mi.APPEND_ONCE,e,t)},po.prototype.prepend=function(e,t){return this.add(Mi.PREPEND,e,t)},po.prototype.prependOnce=function(e,t){return this.add(Mi.PREPEND_ONCE,e,t)},po.prototype.remove=function(e,t){return this.add(Mi.REMOVE,e,t)},po.prototype.clearAll=function(){return this.add(Mi.CLEAR_ALL,"clearAll","-")},po.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new fo(new Map(e))},po.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},po.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};var lo=po;function po(){this.operations=new Map}ho.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=uo.get(t).operate(r,e)}),r},ho.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},ho.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 fo=ho;function ho(e){this.operations=null!=e?e:new Map}yo.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 vo=yo;function yo(){}var mo=s.log,go=(Eo.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]),mo.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),mo.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),mo.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},Eo.prototype.getSessionId=function(){return this.sessionManager.sessionId},Eo.prototype.getUser=function(){return this.userManager.currentUser},Eo.prototype.setUser=function(e){try{var t=Et(e);return t?(this.userManager.setUser(t),this.synchronizer.syncOnly("cohort").catch(function(){})):(mo.warn("invalid user"),Promise.resolve())}catch(e){return mo.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},Eo.prototype.setUserId=function(e){try{if(void 0===e)this.userManager.setUserId(void 0);else{var t=xe.sanitizeValue(e);if(!t)return mo.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();this.userManager.setUserId(t)}return this.synchronizer.syncOnly("cohort").catch(function(){})}catch(e){return mo.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},Eo.prototype.setDeviceId=function(e){try{var t=xe.sanitizeValue(e);return t?(this.userManager.setDeviceId(t),this.synchronizer.syncOnly("cohort").catch(function(e){})):(mo.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve())}catch(e){return mo.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},Eo.prototype.setUserProperty=function(e,t){e=(new lo).set(e,t).build();return this.updateUserProperties(e)},Eo.prototype.setUserProperties=function(e){try{var t=Me.sanitize(e),r=new lo;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 mo.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},Eo.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),Promise.resolve()}catch(e){return mo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},Eo.prototype.resetUser=function(){try{this.userManager.resetUser();var e=(new lo).clearAll().build();return this.track(e.toEvent()),this.synchronizer.syncOnly("cohort")}catch(e){return mo.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},Eo.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},Eo.prototype.variationDetail=function(r,n,e){var i=e||"A",e=Sn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return mo.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),Xe.of(i,h.EXCEPTION)}}(this);return Ii.experiment(e,r,t),t},Eo.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},Eo.prototype.featureFlagDetail=function(r,n){var e=Sn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return mo.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),Ze.off(h.EXCEPTION)}}(this);return Ii.featureFlag(e,r,t),t},Eo.prototype.track=function(e,t){try{mo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){mo.error("Unexpected exception while tracking event: ".concat(e))}},Eo.prototype.trackPageView=function(e){mo.debug("tracking page view");var t=this.userManager.resolve();this.core.track({key:"$page_view"},t)},Eo.prototype.remoteConfig=function(e){return new Ci(this.core,this.userManager,e)},Eo.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},Eo.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,vo.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(),mo.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},Eo.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},Eo.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(mo.debug("UserExplorer opened."),ai.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):mo.error("UserExplorer is not provided")},Eo.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():mo.warn("There is no active HackleDevtools.")},Eo.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},Eo.prototype.close=function(){mo.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},Eo);function Eo(e,t,r,n,i,o){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.fetchThrottler=i,this.devTools=o,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.fetch=this.fetch.bind(this),this.close=this.close.bind(this),this.initialization=this.initialize()}var wo=s.log,bo=(To.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 wo.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},To);function To(e,t){this.invocationProcessor=e,this.user=t}Io.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},Io.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 _o=Io;function Io(){}Oo.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]:""},Oo.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},Oo.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},Oo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Oo.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},Oo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Oo.prototype.getOptions=function(){return this.options},Oo.getInstance=function(e){return void 0===e&&(e={days:ln,isCrossSubdomain:!0}),Oo.storage=Oo.storage?Oo.storage:new Oo(e)};var Ao=Oo;function Oo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Ro.prototype.initialize=function(){Ao.getInstance().getItem(pn)||Co()},Ro.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void xo()}};var No=Ro;function Ro(){}function So(){var e=Ao.getInstance(),t=e.getItem(fn);if(t)return t;t=e.getItem(pn);return t||Co()}function xo(){Ao.getInstance().removeItem(fn)}function Co(){var e=H();return Ao.getInstance().setItem(pn,e),e}Mo.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},Mo.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var ko=Mo;function Mo(e){this.invocator=e}var Po=s.log;v.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:So()}catch(e){return Po.error("Unexpected exception while get sessionId: ".concat(e)),So()}},v.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=Et(t))?e:this.defaultUser()}catch(e){return Po.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=Et(n)))return Po.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){Po.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=xe.sanitizeValue(n)))return Po.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){Po.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=xe.sanitizeValue(n)))return Po.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){Po.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){Po.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 lo,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){Po.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){Po.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){Po.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 Po.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 Po.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),Xe.of(r,h.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 Po.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 Po.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),Ze.off(h.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){Po.error("Unexpected exception while tracking event: ".concat(e))}},v.prototype.trackPageView=function(e){Po.info("Web to app integration feature is not support 'trackPageView' method")},v.prototype.remoteConfig=function(e){return new bo(this.invocationProcessor,this.convertUser(e))},v.prototype.onReady=function(e,t){e()},v.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){Po.error("Unexpected exception while show userExplorer: ".concat(e))}},v.prototype.hideUserExplorer=function(){Po.info("Web to app integration feature is not support 'hideUserExplorer' method")},v.prototype.fetch=function(){return Promise.resolve()},v.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},v.prototype.close=function(){Po.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=Et(e))?e:void 0},v.prototype.defaultUser=function(){return{deviceId:So()}};var Uo=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.fetch=this.fetch.bind(this),this.close=this.close.bind(this)}function Do(e){return e&&e.Math==Math&&e}function Lo(e){try{return!!e()}catch(e){return!0}}function Fo(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function Vo(e){return Ts(bs(e),8,-1)}function jo(e){if(null==e)throw Os("Can't call method on "+e);return e}function zo(e){return Ns(Rs(e))}function Ho(e){return"function"==typeof e}function Bo(e){return"object"==typeof e?null!==e:Ss(e)}function Go(e,t){return arguments.length<2?(r=xs[e],Cs(r)?r:void 0):xs[e]&&xs[e][t];var r}function Ko(e){try{return zs(e)}catch(e){return"Object"}}function Jo(e){if(Hs(e))return e;throw Gs(Bs(e)+" is not a function")}function Yo(e,t){return null==(e=e[t])?void 0:Ks(e)}function qo(t,r){try{Ws(Xs,t,{value:r,configurable:!0,writable:!0})}catch(e){Xs[t]=r}return r}function $o(e){return ra(ta(e))}function Xo(e){return"Symbol("+(void 0===e?"":e)+")_"+ua(++sa+aa,36)}function Wo(e){var t;return la(ha,e)&&(pa||"string"==typeof ha[e])||(t="Symbol."+e,pa&&la(da,e)?ha[e]=da[e]:ha[e]=(fa&&va?va:ya)(t)),ha[e]}function Zo(e){return e=Ia(e,"string"),Aa(e)?e:e+""}function Qo(e){return Na?Oa.createElement(e):{}}function es(e){if(La(e))return e;throw Va(Fa(e)+" is not an object")}function ts(e){return eu[e]||(eu[e]=Qa(e))}function rs(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(Eu(r)&&bu(r,o,n),n.global)i?e[t]=r:Tu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:wu.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function ns(e){return(e=+e)!=e||0==e?0:Au(e)}function is(e,t){return(e=Ou(e))<0?Nu(e+t,0):Ru(e,t)}function y(e){return Cu(e.length)}function os(a){return function(e,t,r){var n,i=ku(e),o=Pu(i),s=Mu(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 ss(e,t){var r,n=Du(e),i=0,o=[];for(r in n)!Uu(Fu,r)&&Uu(n,r)&&Vu(o,r);for(;t.length>i;)!Uu(n,r=t[i++])||~Lu(o,r)||Vu(o,r);return o}function as(e,t,r){for(var n=Yu(t),i=$u.f,o=qu.f,s=0;s<n.length;s++){var a=n[s];Ju(e,a)||r&&Ju(r,a)||i(e,a,o(t,a))}}function us(e,t){return(e=ec[Qu(e)])==rc||e!=tc&&(Wu(t)?Xu(t):!!t)}function m(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?nc:a?nc[o]||ac(o,{}):(nc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=ic(u,r))&&i.value:u[r],!cc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;uc(n,i)}(e.sham||i&&i.sham)&&oc(n,"sham",!0),sc(u,r,n,e)}}var cs,ls,ps,fs,hs,ds,vs,ys,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=Do("object"==typeof globalThis&&globalThis)||Do("object"==typeof window&&window)||Do("object"==typeof self&&self)||Do("object"==typeof r&&r)||function(){return this}()||Function("return this")(),o={},B=!Lo(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),i=!Lo(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),ms=Function.prototype.call,t=i?ms.bind(ms):function(){return ms.apply(ms,arguments)},r={},g={}.propertyIsEnumerable,gs=Object.getOwnPropertyDescriptor,E=gs&&!g.call({1:2},1),E=(r.f=E?function(e){e=gs(this,e);return!!e&&e.enumerable}:g,i),g=Function.prototype,w=g.bind,Es=g.call,ws=E&&w.bind(Es,Es),g=E?function(e){return e&&ws(e)}:function(e){return e&&function(){return Es.apply(e,arguments)}},w=g,bs=w({}.toString),Ts=w("".slice),E=Lo,_s=Vo,Is=Object,As=g("".split),w=E(function(){return!Is("z").propertyIsEnumerable(0)})?function(e){return"String"==_s(e)?As(e,""):Is(e)}:Is,Os=TypeError,Ns=w,Rs=jo,Ss=Ho,xs=e,Cs=Ho,E=g({}.isPrototypeOf),ks=Go("navigator","userAgent")||"",Ms=ks,Ps=e.process,Us=e.Deno,Ps=Ps&&Ps.versions||Us&&Us.version,Us=Ps&&Ps.v8,Ps=T=!(T=Us?0<(b=Us.split("."))[0]&&b[0]<4?1:+(b[0]+b[1]):T)&&Ms&&(!(b=Ms.match(/Edge\/(\d+)/))||74<=b[1])&&(b=Ms.match(/Chrome\/(\d+)/))?+b[1]:T,Ds=Ps,Us=Lo,Ms=!!Object.getOwnPropertySymbols&&!Us(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ds&&Ds<41}),b=Ms&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ls=Go,Fs=Ho,Vs=E,js=Object,T=b?function(e){return"symbol"==typeof e}:function(e){var t=Ls("Symbol");return Fs(t)&&Vs(t.prototype,js(e))},zs=String,Hs=Ho,Bs=Ko,Gs=TypeError,Ks=Jo,Js=t,Ys=Ho,qs=Bo,$s=TypeError,Us={exports:{}},Xs=e,Ws=Object.defineProperty,Zs=qo,Qs="__core-js_shared__",Zs=e[Qs]||Zs(Qs,{}),ea=Zs,ta=((Us.exports=function(e,t){return ea[e]||(ea[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"}),jo),ra=Object,na=$o,ia=g({}.hasOwnProperty),Qs=Object.hasOwn||function(e,t){return ia(na(e),t)},oa=g,sa=0,aa=Math.random(),ua=oa(1..toString),oa=e,ca=Us.exports,la=Qs,_=Xo,pa=Ms,fa=b,ha=ca("wks"),da=oa.Symbol,va=da&&da.for,ya=fa?da:da&&da.withoutSetter||_,ma=t,ga=Bo,Ea=T,wa=Yo,ba=function(e,t){var r,n;if("string"===t&&Ys(r=e.toString)&&!qs(n=Js(r,e)))return n;if(Ys(r=e.valueOf)&&!qs(n=Js(r,e)))return n;if("string"!==t&&Ys(r=e.toString)&&!qs(n=Js(r,e)))return n;throw $s("Can't convert object to primitive value")},Ta=TypeError,_a=Wo("toPrimitive"),Ia=function(e,t){if(!ga(e)||Ea(e))return e;var r=wa(e,_a);if(r){if(r=ma(r,e,t=void 0===t?"default":t),!ga(r)||Ea(r))return r;throw Ta("Can't convert object to primitive value")}return ba(e,t=void 0===t?"number":t)},Aa=T,Ms=Bo,Oa=e.document,Na=Ms(Oa)&&Ms(Oa.createElement),Ra=Qo,b=!B&&!Lo(function(){return 7!=Object.defineProperty(Ra("div"),"a",{get:function(){return 7}}).a}),Sa=t,xa=r,Ca=Fo,ka=zo,Ma=Zo,Pa=Qs,Ua=b,Da=Object.getOwnPropertyDescriptor,ca=(o.f=B?Da:function(e,t){if(e=ka(e),t=Ma(t),Ua)try{return Da(e,t)}catch(e){}if(Pa(e,t))return Ca(!Sa(xa.f,e,t),e[t])},{}),oa=B&&Lo(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),La=Bo,Fa=String,Va=TypeError,ja=b,za=es,Ha=Zo,Ba=TypeError,Ga=Object.defineProperty,Ka=Object.getOwnPropertyDescriptor,Ja="enumerable",Ya="configurable",qa="writable",_=(ca.f=B?oa?function(e,t,r){var n;return za(e),t=Ha(t),za(r),"function"==typeof e&&"prototype"===t&&"value"in r&&qa in r&&!r[qa]&&((n=Ka(e,t))&&n[qa]&&(e[t]=r.value,r={configurable:(Ya in r?r:n)[Ya],enumerable:(Ja in r?r:n)[Ja],writable:!1})),Ga(e,t,r)}:Ga:function(e,t,r){if(za(e),t=Ha(t),za(r),ja)try{return Ga(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Ba("Accessors not supported");return"value"in r&&(e[t]=r.value),e},B),$a=ca,Xa=Fo,T=_?function(e,t,r){return $a.f(e,t,Xa(1,r))}:function(e,t,r){return e[t]=r,e},Ms={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=Ho,I=Zs,Wa=g(Function.toString),_=(r(I.inspectSource)||(I.inspectSource=function(e){return Wa(e)}),I.inspectSource),r=Ho,I=_,Za=e.WeakMap,r=r(Za)&&/native code/.test(I(Za)),I=Us.exports,Qa=Xo,eu=I("keys"),Za={},Us=g,tu=Bo,ru=T,nu=Qs,I=Zs,iu=ts,ou=Za,su="Object already initialized",au=e.TypeError,uu=e.WeakMap,r=(vs=r||I.state?(cs=I.state||(I.state=new uu),ls=Us(cs.get),ps=Us(cs.has),fs=Us(cs.set),hs=function(e,t){if(ps(cs,e))throw new au(su);return t.facade=e,fs(cs,e,t),t},ds=function(e){return ls(cs,e)||{}},function(e){return ps(cs,e)}):(ou[ys=iu("state")]=!0,hs=function(e,t){if(nu(e,ys))throw new au(su);return t.facade=e,ru(e,ys,t),t},ds=function(e){return nu(e,ys)?e[ys]:{}},function(e){return nu(e,ys)}),{set:hs,get:ds,has:vs,enforce:function(e){return vs(e)?ds(e):hs(e,{})},getterFor:function(t){return function(e){if(tu(e)&&(e=ds(e)).type===t)return e;throw au("Incompatible receiver, "+t+" required")}}}),I=Lo,cu=Ho,lu=Qs,pu=B,fu=b.CONFIGURABLE,hu=_,du=r.enforce,vu=r.get,yu=Object.defineProperty,mu=pu&&!I(function(){return 8!==yu(function(){},"length",{value:8}).length}),gu=String(String).split("String"),uu=Ms.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),(!lu(e,"name")||fu&&e.name!==t)&&(pu?yu(e,"name",{value:t,configurable:!0}):e.name=t),mu&&r&&lu(r,"arity")&&e.length!==r.arity&&yu(e,"length",{value:r.arity});try{r&&lu(r,"constructor")&&r.constructor?pu&&yu(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=du(e);return lu(r,"source")||(r.source=gu.join("string"==typeof t?t:"")),e},Eu=(Function.prototype.toString=uu(function(){return cu(this)&&vu(this).source||hu(this)},"toString"),Ho),wu=ca,bu=Ms.exports,Tu=qo,Us={},_u=Math.ceil,Iu=Math.floor,Au=Math.trunc||function(e){e=+e;return(0<e?Iu:_u)(e)},Ou=ns,Nu=Math.max,Ru=Math.min,Su=ns,xu=Math.min,Cu=function(e){return 0<e?xu(Su(e),9007199254740991):0},ku=zo,Mu=is,Pu=y,ou={includes:os(!0),indexOf:os(!1)},iu=g,Uu=Qs,Du=zo,Lu=ou.indexOf,Fu=Za,Vu=iu([].push),I=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ju=ss,zu=I.concat("length","prototype"),uu=(Us.f=Object.getOwnPropertyNames||function(e){return ju(e,zu)},{}),iu=(uu.f=Object.getOwnPropertySymbols,Go),Hu=Us,Bu=uu,Gu=es,Ku=g([].concat),uu=iu("Reflect","ownKeys")||function(e){var t=Hu.f(Gu(e)),r=Bu.f;return r?Ku(t,r(e)):t},Ju=Qs,Yu=uu,qu=o,$u=ca,Xu=Lo,Wu=Ho,Zu=/#|\.prototype\./,Qu=us.normalize=function(e){return String(e).replace(Zu,".").toLowerCase()},ec=us.data={},tc=us.NATIVE="N",rc=us.POLYFILL="P",iu=us,nc=e,ic=o.f,oc=T,sc=rs,ac=qo,uc=as,cc=iu,uu=!Lo(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),lc=Qs,pc=Ho,fc=$o,hc=ts("IE_PROTO"),dc=Object,vc=dc.prototype,uu=uu?dc.getPrototypeOf:function(e){e=fc(e);if(lc(e,hc))return e[hc];var t=e.constructor;return pc(t)&&e instanceof t?t.prototype:e instanceof dc?vc:null},yc=Ho,mc=String,gc=TypeError,Ec=g,wc=es,bc=function(e){if("object"==typeof e||yc(e))return e;throw gc("Can't set "+mc(e)+" as a prototype")},A=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Ec(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return wc(e),bc(t),n?r(e,t):e.__proto__=t,e}}():void 0),Tc={},_c=ss,Ic=I,O=Object.keys||function(e){return _c(e,Ic)},Ac=ca,Oc=es,Nc=zo,Rc=O;Tc.f=B&&!oa?Object.defineProperties:function(e,t){Oc(e);for(var r,n=Nc(t),i=Rc(t),o=i.length,s=0;s<o;)Ac.f(e,r=i[s++],n[r]);return e};function Sc(){}function xc(e){e.write(Wc("")),e.close();var t=e.parentWindow.Object;return e=null,t}function Cc(e,t){return ol(e),void 0===t?e:sl?al(e,t):function(){return e.apply(t,arguments)}}function kc(e){return void 0!==e&&(ul.Array===e||ll[cl]===e)}function Mc(e){if(null!=e)return ml(e,El)||ml(e,"@@iterator")||gl[yl(e)]}function Pc(e,t){if(t=arguments.length<2?Il(e):t,bl(t))return Tl(wl(t,e));throw Al(_l(e)+" is not iterable")}function Uc(e,t,r){var n,i;Nl(e);try{if(!(n=Rl(e,"return"))){if("throw"===t)throw r;return r}n=Ol(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Nl(n),r}function Dc(e,t){this.stopped=e,this.result=t}function Lc(e,t,r){function n(e){return o&&Fl(o,"normal",e),new Dc(!0,e)}function i(e){return f?(Cl(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),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Sl(t,p);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=Ll(e)))throw Vl(kl(e)+" is not iterable");if(Ml(r)){for(s=0,a=Pl(e);s<a;s++)if((u=i(e[s]))&&Ul(jl,u))return u;return new Dc(!1)}o=Dl(e,r)}for(c=(h?e:o).next;!(l=xl(c,o)).done;){try{u=i(l.value)}catch(e){Fl(o,"throw",e)}if("object"==typeof u&&u&&Ul(jl,u))return u}return new Dc(!1)}function Fc(e){if("Symbol"===zl(e))throw TypeError("Cannot convert a Symbol value to a string");return Hl(e)}function Vc(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=Kl(op,this);return Yl?r=Yl(new np,i?Jl(this):op):(r=i?this:ql(op),$l(r,rp,"Error")),void 0!==t&&$l(r,"message",ep(t)),tp&&$l(r,"stack",Wl(r.stack,1)),Zl(r,n),Ql(e,ip,{that:i=[]}),$l(r,"errors",i),r}function jc(e){ap[sp][e]=!0}var zc,Hc,O=Go("document","documentElement"),Bc=es,Gc=Tc,Kc=I,oa=Za,Jc=O,Yc=Qo,qc="prototype",$c="script",Xc=ts("IE_PROTO"),Wc=function(e){return"<"+$c+">"+e+"</"+$c+">"},Zc=function(){try{zc=new ActiveXObject("htmlfile")}catch(e){}Zc="undefined"==typeof document||document.domain&&zc?xc(zc):(e=Yc("iframe"),t="java"+$c+":",e.style.display="none",Jc.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(Wc("document.F=Object")),t.close(),t.F);for(var e,t,r=Kc.length;r--;)delete Zc[qc][Kc[r]];return Zc()},Tc=(oa[Xc]=!0,Object.create||function(e,t){var r;return null!==e?(Sc[qc]=Bc(e),r=new Sc,Sc[qc]=null,r[Xc]=e):r=Zc(),void 0===t?r:Gc.f(r,t)}),Qc=Error,el=g("".replace),I=String(Qc("zxcasd").stack),tl=/\n\s*at [^:]*:[^\n]*/,rl=tl.test(I),nl=Bo,il=T,ol=Jo,sl=i,al=g(g.bind),oa={},ul=oa,cl=Wo("iterator"),ll=Array.prototype,I={},I=(I[Wo("toStringTag")]="z","[object z]"===String(I)),N=I,pl=Ho,fl=Vo,hl=Wo("toStringTag"),dl=Object,vl="Arguments"==fl(function(){return arguments}()),N=N?fl: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=dl(e),hl))?t:vl?fl(e):"Object"==(t=fl(e))&&pl(e.callee)?"Arguments":t},yl=N,ml=Yo,gl=oa,El=Wo("iterator"),wl=t,bl=Jo,Tl=es,_l=Ko,Il=Mc,Al=TypeError,Ol=t,Nl=es,Rl=Yo,Sl=Cc,xl=t,Cl=es,kl=Ko,Ml=kc,Pl=y,Ul=E,Dl=Pc,Ll=Mc,Fl=Uc,Vl=TypeError,jl=Dc.prototype,zl=N,Hl=String,Bl=Fc,Gl=Fo,R=!Lo(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Gl(1,7)),7!==e.stack)}),S=m,Kl=E,Jl=uu,Yl=A,x=as,ql=Tc,$l=T,Xl=Fo,Wl=function(e,t){if(rl&&"string"==typeof e&&!Qc.prepareStackTrace)for(;t--;)e=el(e,tl,"");return e},Zl=function(e,t){nl(t)&&"cause"in t&&il(e,"cause",t.cause)},Ql=Lc,ep=function(e,t){return void 0===e?arguments.length<2?"":t:Bl(e)},tp=R,rp=Wo("toStringTag"),np=Error,ip=[].push,op=(Yl?Yl(Vc,np):x(Vc,np,{name:!0}),Vc.prototype=ql(np.prototype,{constructor:Xl(1,Vc),message:Xl(1,""),name:Xl(1,"AggregateError")})),R=(S({global:!0,constructor:!0,arity:2},{AggregateError:Vc}),Wo),x=Tc,Xl=ca.f,sp=R("unscopables"),ap=Array.prototype,S=(null==ap[sp]&&Xl(ap,sp,{configurable:!0,value:x(null)}),Lo),R=Ho,Xl=uu,x=rs,up=Wo("iterator"),cp=!1;[].keys&&("next"in(C=[].keys())?(Xl=Xl(Xl(C)))!==Object.prototype&&(Hc=Xl):cp=!0);function lp(e,t,r){(e=e&&!r?e.prototype:e)&&!vp(e,yp)&&dp(e,yp,{configurable:!0,value:t})}function pp(){return this}function fp(){return this}function hp(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!Up&&e in p)return p[e];switch(e){case"keys":case Lp:case Fp:return function(){return new r(this,e)}}return function(){return new r(this)}}Ap(r,t,n);var u,c,n=t+" Iterator",l=!1,p=e.prototype,f=p[Dp]||p["@@iterator"]||i&&p[i],h=!Up&&f||a(i),d="Array"==t&&p.entries||f;if(d&&(d=Op(d.call(new e)))!==Object.prototype&&d.next&&(Op(d)!==Pp&&(Np?Np(d,Pp):Ip(d[Dp])||xp(d,Dp,fp)),Rp(d,n,!0)),kp&&i==Lp&&f&&f.name!==Lp&&(Mp?Sp(p,"name",Lp):(l=!0,h=function(){return _p(f,this)})),i)if(u={values:a(Lp),keys:o?h:a("keys"),entries:a(Fp)},s)for(c in u)!Up&&!l&&c in p||xp(p,c,u[c]);else Tp({target:t,proto:!0,forced:Up||l},u);return p[Dp]!==h&&xp(p,Dp,h,{name:i}),Cp[t]=h,u}R((Hc=null==Hc||S(function(){var e={};return Hc[up].call(e)!==e})?{}:Hc)[up])||x(Hc,up,function(){return this});var C={IteratorPrototype:Hc,BUGGY_SAFARI_ITERATORS:cp},dp=ca.f,vp=Qs,yp=Wo("toStringTag"),mp=C.IteratorPrototype,gp=Tc,Ep=Fo,wp=lp,bp=oa,Tp=m,_p=t,Ip=Ho,Ap=function(e,t,r,n){t+=" Iterator";return e.prototype=gp(mp,{next:Ep(+!n,r)}),wp(e,t,!1),bp[t]=pp,e},Op=uu,Np=A,Rp=lp,Sp=T,xp=rs,Xl=Wo,Cp=oa,kp=b.PROPER,Mp=b.CONFIGURABLE,Pp=C.IteratorPrototype,Up=C.BUGGY_SAFARI_ITERATORS,Dp=Xl("iterator"),Lp="values",Fp="entries",Vp=zo,R=jc,S=oa,x=r,cp=ca.f,b=hp,C=B,jp="Array Iterator",zp=x.set,Hp=x.getterFor(jp),Xl=b(Array,"Array",function(e,t){zp(this,{type:jp,target:Vp(e),index:0,kind:t})},function(){var e=Hp(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"),oa=S.Arguments=S.Array;if(R("keys"),R("values"),R("entries"),C&&"values"!==oa.name)try{cp(oa,"name",{value:"values"})}catch(e){}var Bp=N;I||rs(Object.prototype,"toString",I?{}.toString:function(){return"[object "+Bp(this)+"]"},{unsafe:!0});function Gp(e){var e=Zp(e),t=Qp.f;ef&&e&&!e[tf]&&t(e,tf,{configurable:!0,get:function(){return this}})}function Kp(e,t){if(rf(t,e))return e;throw nf("Incorrect invocation")}function Jp(){}function Yp(e){if(!of(e))return!1;try{return cf(Jp,uf,e),!0}catch(e){return!1}}function qp(e){if(!of(e))return!1;switch(sf(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ff||!!pf(lf,af(e))}catch(e){return!0}}function $p(e,t){return void 0===(e=yf(e).constructor)||null==(e=yf(e)[gf])?t:mf(e)}var Xp,Wp,x="process"==Vo(e.process),Zp=Go,Qp=ca,ef=B,tf=Wo("species"),rf=E,nf=TypeError,b=g,S=Lo,of=Ho,sf=N,af=_,uf=[],cf=Go("Reflect","construct"),lf=/^\s*(?:class|function)\b/,pf=b(lf.exec),ff=!lf.exec(Jp),R=(qp.sham=!0,!cf||S(function(){var e;return Yp(Yp.call)||!Yp(Object)||!Yp(function(){e=!0})||e})?qp:Yp),hf=R,df=Ko,vf=TypeError,yf=es,mf=function(e){if(hf(e))return e;throw vf(df(e)+" is not a constructor")},gf=Wo("species"),C=Function.prototype,Ef=C.apply,wf=C.call,cp="object"==typeof Reflect&&Reflect.apply||(i?wf.bind(Ef):function(){return wf.apply(Ef,arguments)}),oa=g([].slice),bf=TypeError,I=/(?:ipad|iphone|ipod).*applewebkit/i.test(ks),Tf=e,_f=cp,E=Cc,If=Ho,Af=Qs,N=Lo,Of=O,Nf=oa,Rf=Qo,Sf=function(e,t){if(e<t)throw bf("Not enough arguments");return e},b=I,S=x,C=Tf.setImmediate,i=Tf.clearImmediate,xf=Tf.process,Cf=Tf.Dispatch,kf=Tf.Function,O=Tf.MessageChannel,Mf=Tf.String,Pf=0,Uf={},Df="onreadystatechange";try{Xp=Tf.location}catch(e){}function Lf(e){return function(){eh(e)}}function Ff(e){eh(e.data)}function Vf(e){Tf.postMessage(Mf(e),Xp.protocol+"//"+Xp.host)}function jf(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function zf(){this.head=null,this.tail=null}function Hf(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=hh(r),this.reject=hh(n)}function Bf(e,t){var r,n,i,o,s=t.value,a=t.state==Hh,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(t.rejection===Kh&&(o=t,yh(Th,vh,function(){var e=o.facade;dh?Dh.emit("rejectionHandled",e):qh(zh,e,o.value)})),t.rejection=Gh),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(Ph("Promise-chain cycle")):(n=Jh(r))?yh(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var Gf,Kf,Jf,Yf,qf,$f,Xf,Wf,Zf,Qf,eh=function(e){var t;Af(Uf,e)&&(t=Uf[e],delete Uf[e],t())},O=(C&&i||(C=function(e){Sf(arguments.length,1);var t=If(e)?e:kf(e),r=Nf(arguments,1);return Uf[++Pf]=function(){_f(t,void 0,r)},Wp(Pf),Pf},i=function(e){delete Uf[e]},S?Wp=function(e){xf.nextTick(Lf(e))}:Cf&&Cf.now?Wp=function(e){Cf.now(Lf(e))}:O&&!b?(b=(S=new O).port2,S.port1.onmessage=Ff,Wp=E(b.postMessage,b)):Tf.addEventListener&&If(Tf.postMessage)&&!Tf.importScripts&&Xp&&"file:"!==Xp.protocol&&!N(Vf)?(Wp=Vf,Tf.addEventListener("message",Ff,!1)):Wp=Df in Rf("script")?function(e){Of.appendChild(Rf("script"))[Df]=function(){Of.removeChild(this),eh(e)}}:function(e){setTimeout(Lf(e),0)}),{set:C,clear:i}),S=e,E=/ipad|iphone|ipod/i.test(ks)&&void 0!==S.Pebble,b=/web0s(?!.*chrome)/i.test(ks),N=e,C=Cc,i=o.f,th=O.set,S=I,o=E,I=b,rh=x,E=N.MutationObserver||N.WebKitMutationObserver,b=N.document,nh=N.process,k=N.Promise,i=i(N,"queueMicrotask"),i=i&&i.value,I=(i||(Gf=function(){var e,t;for(rh&&(e=nh.domain)&&e.exit();Kf;){t=Kf.fn,Kf=Kf.next;try{t()}catch(e){throw Kf?Yf():Jf=void 0,e}}Jf=void 0,e&&e.enter()},Yf=S||rh||I||!E||!b?!o&&k&&k.resolve?((S=k.resolve(void 0)).constructor=k,Xf=C(S.then,S),function(){Xf(Gf)}):rh?function(){nh.nextTick(Gf)}:(th=C(th,N),function(){th(Gf)}):(qf=!0,$f=b.createTextNode(""),new E(Gf).observe($f,{characterData:!0}),function(){$f.data=qf=!qf})),i||function(e){e={fn:e,next:void 0};Jf&&(Jf.next=e),Kf||(Kf=e,Yf()),Jf=e}),ih=e,o=(zf.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}},zf),k=e.Promise,S="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,C=!S&&!x&&"object"==typeof window&&"object"==typeof document,N=e,oh=k,b=Ho,E=iu,sh=_,i=Wo,ah=C,uh=S,ch=Ps,lh=(oh&&oh.prototype,i("species")),ph=!1,fh=b(N.PromiseRejectionEvent),_={CONSTRUCTOR:E("Promise",function(){var e=sh(oh),t=e!==String(oh);if(!t&&66===ch)return!0;if(!ch||ch<51||!/native code/.test(e)){var e=new oh(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[lh]=r,!(ph=e.then(function(){})instanceof r))return!0}return!t&&(ah||uh)&&!fh}),REJECTION_EVENT:fh,SUBCLASSING:ph},C={},hh=Jo,S=(C.f=function(e){return new Hf(e)},m),dh=x,vh=e,yh=t,i=rs,b=A,N=lp,E=Gp,mh=Jo,gh=Ho,Eh=Bo,wh=Kp,bh=$p,Th=O.set,_h=I,Ih=function(e,t){var r=ih.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},Ah=jf,Oh=o,O=r,I=k,o=C,Nh="Promise",Rh=_.CONSTRUCTOR,Sh=_.REJECTION_EVENT,M=_.SUBCLASSING,xh=O.getterFor(Nh),Ch=O.set,O=I&&I.prototype,kh=I,Mh=O,Ph=vh.TypeError,Uh=vh.document,Dh=vh.process,Lh=o.f,Fh=Lh,Vh=!!(Uh&&Uh.createEvent&&vh.dispatchEvent),jh="unhandledrejection",zh="rejectionhandled",Hh=1,Bh=2,Gh=1,Kh=2,Jh=function(e){var t;return!(!Eh(e)||!gh(t=e.then))&&t},Yh=function(r,i){r.notified||(r.notified=!0,_h(function(){for(var e,n,t=r.reactions;e=t.get();)Bf(e,r);r.notified=!1,i&&!r.rejection&&(n=r,yh(Th,vh,function(){var e=n.facade,t=n.value,r=$h(n);if(r&&(r=Ah(function(){dh?Dh.emit("unhandledRejection",t,e):qh(jh,e,t)}),n.rejection=dh||$h(n)?Kh:Gh,r.error))throw r.value}))}))},qh=function(e,t,r){var n;Vh?((n=Uh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),vh.dispatchEvent(n)):n={promise:t,reason:r},!Sh&&(t=vh["on"+e])?t(n):e===jh&&Ih("Unhandled promise rejection",r)},$h=function(e){return e.rejection!==Gh&&!e.parent},Xh=function(t,r,n){return function(e){t(r,e,n)}},Wh=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=Bh,Yh(e,!0))},Zh=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Ph("Promise can't be resolved itself");var n=Jh(e);n?_h(function(){var t={done:!1};try{yh(n,e,Xh(Zh,t,r),Xh(Wh,t,r))}catch(e){Wh(t,e,r)}}):(r.value=e,r.state=Hh,Yh(r,!1))}catch(e){Wh({done:!1},e,r)}}};if(Rh&&(Mh=(kh=function(e){wh(this,Mh),mh(e),yh(Wf,this);var t=xh(this);try{e(Xh(Zh,t),Xh(Wh,t))}catch(e){Wh(t,e)}}).prototype,(Wf=function(e){Ch(this,{type:Nh,done:!1,notified:!1,parent:!1,reactions:new Oh,rejection:!1,state:0,value:void 0})}).prototype=i(Mh,"then",function(e,t){var r=xh(this),n=Lh(bh(this,kh));return r.parent=!0,n.ok=!gh(e)||e,n.fail=gh(t)&&t,n.domain=dh?Dh.domain:void 0,0==r.state?r.reactions.add(n):_h(function(){Bf(n,r)}),n.promise}),Zf=function(){var e=new Wf,t=xh(e);this.promise=e,this.resolve=Xh(Zh,t),this.reject=Xh(Wh,t)},o.f=Lh=function(e){return e===kh||void 0===e?new Zf:Fh(e)},gh(I)&&O!==Object.prototype)){Qf=O.then,M||i(O,"then",function(e,t){var r=this;return new kh(function(e,t){yh(Qf,r,e,t)}).then(e,t)},{unsafe:!0});try{delete O.constructor}catch(e){}b&&b(O,Mh)}S({global:!0,constructor:!0,wrap:!0,forced:Rh},{Promise:kh}),N(kh,Nh,!1),E(Nh);var Qh=Wo("iterator"),ed=!1;try{var td=0,rd={next:function(){return{done:!!td++}},return:function(){ed=!0}};rd[Qh]=function(){return this},Array.from(rd,function(){throw 2})}catch(e){}function nd(e,t){if(!t&&!ed)return!1;var r=!1;try{var n={};n[Qh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var id=k,o=nd,I=_.CONSTRUCTOR||!o(function(e){id.all(e).then(void 0,function(){})}),od=t,sd=Jo,ad=C,ud=jf,cd=Lc,M=(m({target:"Promise",stat:!0,forced:I},{all:function(e){var a=this,t=ad.f(a),u=t.resolve,c=t.reject,r=ud(function(){var n=sd(a.resolve),i=[],o=0,s=1;cd(e,function(e){var t=o++,r=!1;s++,od(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=Go,O=Ho,S=rs,Rh=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,Rh.catch!==N&&S(Rh,"catch",N,{unsafe:!0}));var ld=t,pd=Jo,fd=C,hd=jf,dd=Lc;m({target:"Promise",stat:!0,forced:I},{race:function(e){var r=this,n=fd.f(r),i=n.reject,t=hd(function(){var t=pd(r.resolve);dd(e,function(e){ld(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function vd(e,t){return gd(e),Ed(t)&&t.constructor===e?t:((0,(e=wd.f(e)).resolve)(t),e.promise)}var yd=t,md=C,gd=(m({target:"Promise",stat:!0,forced:_.CONSTRUCTOR},{reject:function(e){var t=md.f(this);return yd(t.reject,void 0,e),t.promise}}),es),Ed=Bo,wd=C,E=m,rd=Go,o=_.CONSTRUCTOR,bd=vd;rd("Promise"),E({target:"Promise",stat:!0,forced:o},{resolve:function(e){return bd(this,e)}});var Td=t,_d=Jo,Id=C,Ad=jf,Od=Lc;m({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Id.f(a),u=t.resolve,r=t.reject,n=Ad(function(){var n=_d(a.resolve),i=[],o=0,s=1;Od(e,function(e){var t=o++,r=!1;s++,Td(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 Nd(i){return function(e,t){var r,e=zd(Hd(e)),t=jd(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=Gd(e,t))<55296||56319<r||t+1===n||(n=Gd(e,t+1))<56320||57343<n?i?Bd(e,t):r:i?Kd(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Rd=t,Sd=Jo,xd=Go,Cd=C,kd=jf,Md=Lc,Pd="No one promise resolved",M=(m({target:"Promise",stat:!0},{any:function(e){var u=this,c=xd("AggregateError"),t=Cd.f(u),l=t.resolve,p=t.reject,r=kd(function(){var n=Sd(u.resolve),i=[],o=0,s=1,a=!1;Md(e,function(e){var t=o++,r=!1;s++,Rd(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,Pd)))})}),--s||p(new c(i,Pd))});return r.error&&p(r.value),t.promise}}),m),O=k,i=Lo,Ud=Go,Dd=Ho,Ld=$p,Fd=vd,b=rs,Vd=O&&O.prototype,Rh=(M({target:"Promise",proto:!0,real:!0,forced:!!O&&i(function(){Vd.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=Ld(this,Ud("Promise")),e=Dd(t);return this.then(e?function(e){return Fd(r,t()).then(function(){return e})}:t,e?function(e){return Fd(r,t()).then(function(){throw e})}:t)}}),Dd(O)&&(S=Ud("Promise").prototype.finally,Vd.finally!==S&&b(Vd,"finally",S,{unsafe:!0})),g),jd=ns,zd=Fc,Hd=jo,Bd=Rh("".charAt),Gd=Rh("".charCodeAt),Kd=Rh("".slice),Jd={codeAt:Nd(!1),charAt:Nd(!0)}.charAt,Yd=Fc,N=r,I=hp,qd="String Iterator",$d=N.set,Xd=N.getterFor(qd);I(String,"String",function(e){$d(this,{type:qd,string:Yd(e),index:0})},function(){var e=Xd(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=Jd(t,r),e.index+=t.length,{value:t,done:!1})});function Wd(t,e){if(t){if(t[nv]!==ov)try{rv(t,nv,ov)}catch(e){t[nv]=ov}if(t[iv]||rv(t,iv,e),ev[e])for(var r in tv)if(t[r]!==tv[r])try{rv(t,r,tv[r])}catch(e){t[r]=tv[r]}}}var Zd,_=e,rd=_.Promise,E=Qo("span").classList,o=E&&E.constructor&&E.constructor.prototype,k=o===Object.prototype?void 0:o,Qd=e,ev={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,tv=Xl,rv=T,i=Wo,nv=i("iterator"),iv=i("toStringTag"),ov=tv.values;for(Zd in ev)Wd(Qd[Zd]&&Qd[Zd].prototype,Zd);Wd(M,"DOMTokenList");var O,b,S=b=O=rd,Rh,sv=C,av=jf,uv=((Rh=m)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=sv.f(this),e=av(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),es),cv=Uc,lv=Zo,pv=ca,fv=Fo,N,hv=Cc,dv=t,vv=$o,yv=function(t,e,r,n){try{return n?e(uv(r)[0],r[1]):e(r)}catch(e){cv(t,"throw",e)}},mv=kc,gv=R,Ev=y,wv=N=function(e,t,r){t=lv(t);t in e?pv.f(e,t,fv(0,r)):e[t]=r},bv=Pc,Tv=Mc,_v=Array,I,E=function(e){var t,r,n,i,o,s,a=vv(e),e=gv(this),u=arguments.length,c=1<u?arguments[1]:void 0,l=void 0!==c,u=(l&&(c=hv(c,2<u?arguments[2]:void 0)),Tv(a)),p=0;if(!u||this===_v&&mv(u))for(t=Ev(a),r=e?new this(t):_v(t);p<t;p++)s=l?c(a[p],p):a[p],wv(r,p,s);else for(o=(i=bv(a,u)).next,r=e?new this:[];!(n=dv(o,i)).done;p++)s=l?yv(i,c,[n.value,p],!0):n.value,wv(r,p,s);return r.length=p,r},o,k,Iv=((I=m)({target:"Array",stat:!0,forced:k=!(o=nd)(function(e){Array.from(e)})},{from:E}),Vo),Xl=Array.isArray||function(e){return"Array"==Iv(e)},T,i,M=((T=m)({target:"Array",stat:!0},{isArray:i=Xl}),m),rd=Lo,Av=R,Ov=N,Nv=Array,O=rd(function(){function e(){}return!(Nv.of.call(e)instanceof e)}),Rv=(M({target:"Array",stat:!0,forced:O},{of:function(){for(var e=0,t=arguments.length,r=new(Av(this)?this:Nv)(t);e<t;)Ov(r,e,arguments[e++]);return r.length=t,r}}),$o),Sv=y,xv=ns,b=jc,Cv=(m({target:"Array",proto:!0},{at:function(e){var t=Rv(this),r=Sv(t),e=xv(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 Cv("Maximum allowed index exceeded");return e},kv=Xl,Mv=R,Pv=Bo,Uv=Wo("species"),Dv=Array,Lv=function(e){var t;return kv(e)&&(t=e.constructor,(Mv(t)&&(t===Dv||kv(t.prototype))||Pv(t)&&null===(t=t[Uv]))&&(t=void 0)),void 0===t?Dv:t},C=function(e,t){return new(Lv(e))(0===t?0:t)},Fv=Lo,Vv=Ps,jv=Wo("species"),Rh,o=m,I=Lo,zv=Xl,Hv=Bo,Bv=$o,Gv=y,Kv=S,Jv=N,Yv=C,k=Rh=function(t){return 51<=Vv||!Fv(function(){var e=[];return(e.constructor={})[jv]=function(){return{foo:1}},1!==e[t](Boolean).foo})},E=Ps,qv=Wo("isConcatSpreadable"),T=51<=E||!I(function(){var e=[];return e[qv]=!1,e.concat()[0]!==e}),i=k("concat"),$v=(o({target:"Array",proto:!0,arity:1,forced:!T||!i},{concat:function(e){for(var t,r,n,i=Bv(this),o=Yv(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!Hv(e))return!1;var t=e[qv];return void 0!==t?!!t:zv(e)}(n=-1===a?i:arguments[a]))for(r=Gv(n),Kv(s+r),t=0;t<r;t++,s++)t in n&&Jv(o,s,n[t]);else Kv(s+1),Jv(o,s++,n);return o.length=s,o}}),Ko),Xv=TypeError,rd,Wv=$o,Zv=is,Qv=y,ey=rd=function(e,t){if(!delete e[t])throw Xv("Cannot delete property "+$v(t)+" of "+$v(e))},ty=Math.min,M=jc,ry=(m({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=Wv(this),n=Qv(r),i=Zv(e,n),o=Zv(t,n),e=2<arguments.length?arguments[2]:void 0,s=ty((void 0===e?n:Zv(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]:ey(r,i),i+=a,o+=a;return r}}),M("copyWithin"),Cc),ny=w,iy=$o,oy=y,sy=C,ay=g([].push),O,b={forEach:(O=function(f){var h=1==f,d=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=iy(e),a=ny(s),u=ry(t,r),c=oy(a),l=0,t=n||sy,p=h?t(e,c):d||g?t(e,0):void 0;l<c;l++)if((E||l in a)&&(o=u(i=a[l],l,s),f))if(h)p[l]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return l;case 2:ay(p,i)}else switch(f){case 4:return!1;case 7:ay(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)},uy=Lo,E=function(e,t){var r=[][e];return!!r&&uy(function(){r.call(null,t||function(){return 1},1)})},I=m,cy=b.every,ly=(I({target:"Array",proto:!0,forced:!E("every")},{every:function(e){return cy(this,e,1<arguments.length?arguments[1]:void 0)}}),$o),py=is,fy=y,k=jc,o=(m({target:"Array",proto:!0},{fill:function(e){for(var t=ly(this),r=fy(t),n=arguments.length,i=py(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:py(n,r);i<o;)t[i++]=e;return t}}),k("fill"),m),hy=b.filter,T=(o({target:"Array",proto:!0,forced:!Rh("filter")},{filter:function(e){return hy(this,e,1<arguments.length?arguments[1]:void 0)}}),m),dy=b.find,i=jc,M,vy=!0,O=((M="find")in[]&&Array(1)[M](function(){vy=!1}),T({target:"Array",proto:!0,forced:vy},{find:function(e){return dy(this,e,1<arguments.length?arguments[1]:void 0)}}),i(M),m),yy=b.findIndex,I=jc,k,my=!0,gy=((k="findIndex")in[]&&Array(1)[k](function(){my=!1}),O({target:"Array",proto:!0,forced:my},{findIndex:function(e){return yy(this,e,1<arguments.length?arguments[1]:void 0)}}),I(k),Cc),Ey=w,wy=$o,by=y,o,T={findLast:(o=function(u){var c=1==u;return function(e,t,r){for(var n,i=wy(e),o=Ey(i),s=gy(t,r),a=by(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,Ty=T.findLast,M=jc,O=(i({target:"Array",proto:!0},{findLast:function(e){return Ty(this,e,1<arguments.length?arguments[1]:void 0)}}),M("findLast"),m),_y=T.findLastIndex,I=jc,Iy=(O({target:"Array",proto:!0},{findLastIndex:function(e){return _y(this,e,1<arguments.length?arguments[1]:void 0)}}),I("findLastIndex"),Xl),Ay=y,Oy=S,Ny=Cc,Ry=function(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&Ny(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&Iy(u)?(c=Ay(u),l=Ry(e,t,u,c,l,o-1)-1):(Oy(l+1),e[l]=u),l++),p++;return l},k,Sy=k=Ry,xy=$o,Cy=y,ky=ns,My=C;m({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=xy(this),r=Cy(t),n=My(t,0);return n.length=Sy(n,t,t,r,0,void 0===e?1:ky(e)),n}});function Py(c){return function(e,t,r,n){sm(t);var i=am(e),o=um(i),s=cm(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 lm("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 Uy(e,t,r){for(var n=Rm(e),i=Nm(t,n),o=Nm(void 0===r?n:r,n),s=xm(Cm(o-i,0)),a=0;i<o;i++,a++)Sm(s,a,e[i]);return s.length=a,s}function Dy(e,t){var r=e.length,n=Mm(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=Dy(km(e,0,n),t),f=Dy(km(e,n),t),h=t,d=p.length,v=f.length,y=0,m=0;y<d||m<v;)l[y+m]=y<d&&m<v?h(p[y],f[m])<=0?p[y++]:f[m++]:y<d?p[y++]:f[m++];return l}var Ly=k,Fy=Jo,Vy=$o,jy=y,zy=C,Hy=(m({target:"Array",proto:!0},{flatMap:function(e){var t,r=Vy(this),n=jy(r);return Fy(e),(t=zy(r,0)).length=Ly(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),b.forEach),o=E("forEach")?[].forEach:function(e){return Hy(this,e,1<arguments.length?arguments[1]:void 0)},i=(m({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o}),m),By=ou.includes,M=jc,T=(i({target:"Array",proto:!0,forced:Lo(function(){return!Array(1).includes()})},{includes:function(e){return By(this,e,1<arguments.length?arguments[1]:void 0)}}),M("includes"),m),O=g,Gy=ou.indexOf,I=E,Ky=O([].indexOf),Jy=!!Ky&&1/Ky([1],1,-0)<0,k=I("indexOf"),o=(T({target:"Array",proto:!0,forced:Jy||!k},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Jy?Ky(this,e,t)||0:Gy(this,e,t)}}),m),i=w,Yy=zo,M=E,qy=g([].join),ou=i!=Object,O=M("join",","),$y=(o({target:"Array",proto:!0,forced:ou||!O},{join:function(e){return qy(Yy(this),void 0===e?",":e)}}),cp),Xy=zo,Wy=ns,Zy=y,I=E,Qy=Math.min,em=[].lastIndexOf,tm=!!em&&1/[1].lastIndexOf(1,-0)<0,T=I("lastIndexOf"),k=tm||!T?function(e){if(tm)return $y(em,this,arguments)||0;var t=Xy(this),r=Zy(t),n=r-1;for((n=1<arguments.length?Qy(n,Wy(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:em,i=(m({target:"Array",proto:!0,forced:k!==[].lastIndexOf},{lastIndexOf:k}),m),rm=b.map,M=(i({target:"Array",proto:!0,forced:!Rh("map")},{map:function(e){return rm(this,e,1<arguments.length?arguments[1]:void 0)}}),m),nm=$o,im=y,om=S,o=Lo(function(){return 4294967297!==[].push.call({length:4294967296},1)}),ou=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),sm=(M({target:"Array",proto:!0,arity:1,forced:o||ou},{push:function(e){var t=nm(this),r=im(t),n=arguments.length;om(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),Jo),am=$o,um=w,cm=y,lm=TypeError,O={left:Py(!1),right:Py(!0)},cp=m,pm=O.left,I=Ps,T=x,k=(cp({target:"Array",proto:!0,forced:!E("reduce")||!T&&79<I&&I<83},{reduce:function(e){var t=arguments.length;return pm(this,e,t,1<t?arguments[1]:void 0)}}),m),fm=O.right,i=Ps,M=x,o=(k({target:"Array",proto:!0,forced:!E("reduceRight")||!M&&79<i&&i<83},{reduceRight:function(e){return fm(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),m),hm=Xl,dm=g([].reverse),ou=[1,2],cp=(o({target:"Array",proto:!0,forced:String(ou)===String(ou.reverse())},{reverse:function(){return hm(this)&&(this.length=this.length),dm(this)}}),m),vm=Xl,ym=R,mm=Bo,gm=is,Em=y,wm=zo,bm=N,T=Wo,Tm=oa,I=Rh("slice"),_m=T("species"),Im=Array,Am=Math.max,O=(cp({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,n,i,o=wm(this),s=Em(o),a=gm(e,s),u=gm(void 0===t?s:t,s);if(vm(o)&&(r=o.constructor,(r=ym(r)&&(r===Im||vm(r.prototype))||mm(r)&&null===(r=r[_m])?void 0:r)===Im||void 0===r))return Tm(o,a,u);for(n=new(void 0===r?Im:r)(Am(u-a,0)),i=0;a<u;a++,i++)a in o&&bm(n,i,o[a]);return n.length=i,n}}),m),Om=b.some,Nm=(O({target:"Array",proto:!0,forced:!E("some")},{some:function(e){return Om(this,e,1<arguments.length?arguments[1]:void 0)}}),is),Rm=y,Sm=N,xm=Array,Cm=Math.max,km=Uy,Mm=Math.floor,x=Dy,k=ks.match(/firefox\/(\d+)/i),M=!!k&&+k[1],i=/MSIE|Trident/.test(ks),o=ks.match(/AppleWebKit\/(\d+)\./),ou=!!o&&+o[1],oa=m,T=g,Pm=Jo,Um=$o,Dm=y,Lm=rd,Fm=Fc,cp=Lo,Vm=x,I=E,jm=M,zm=i,Hm=Ps,Bm=ou,Gm=[],Km=T(Gm.sort),Jm=T(Gm.push),O=cp(function(){Gm.sort(void 0)}),k=cp(function(){Gm.sort(null)}),ks=I("sort"),Ym=!cp(function(){if(Hm)return Hm<70;if(!(jm&&3<jm)){if(zm)return!0;if(Bm)return Bm<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++)Gm.push({k:e+r,v:t})}for(Gm.sort(function(e,t){return t.v-e.v}),r=0;r<Gm.length;r++)e=Gm[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});oa({target:"Array",proto:!0,forced:O||!k||!ks||!Ym},{sort:function(e){void 0!==e&&Pm(e);var t=Um(this);if(Ym)return void 0===e?Km(t):Km(t,e);for(var r,n,i=[],o=Dm(t),s=0;s<o;s++)s in t&&Jm(i,t[s]);for(Vm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:Fm(e)>Fm(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)Lm(t,s++);return t}});Gp("Array");var o=m,qm=$o,$m=is,Xm=ns,Wm=y,Zm=S,Qm=C,eg=N,tg=rd,x=Rh("splice"),rg=Math.max,ng=Math.min;o({target:"Array",proto:!0,forced:!x},{splice:function(e,t){var r,n,i,o,s,a,u=qm(this),c=Wm(u),l=$m(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,ng(rg(Xm(t),0),c-l)),Zm(c+r-n),i=Qm(u,n),o=0;o<n;o++)(s=l+o)in u&&eg(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]:tg(u,a);for(o=c;c-n+r<o;o--)tg(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]:tg(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),jc("flat");jc("flatMap");var M=m,ig=$o,og=y,sg=rd,ag=S,i=1!==[].unshift(0),Ps=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();M({target:"Array",proto:!0,arity:1,forced:i||Ps},{unshift:function(e){var t=ig(this),r=og(t),n=arguments.length;if(n){ag(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:sg(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});_.Array;var ou={exports:{}},T={},ug=Vo,cg=zo,lg=Us.f,pg=Uy,fg="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];T.f=function(e){if(!fg||"Window"!=ug(e))return lg(cg(e));try{return lg(e)}catch(e){return pg(fg)}};function hg(e){Ag(e,Cg,{value:{objectID:"O"+kg++,weakData:{}}})}function dg(e,t,r){for(var n in t)Wg(e,n,t[n],r);return e}function vg(e,t){for(var r=0,n=lE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function yg(e,t,r,n){for(var i,o,s,a=hE(e),u=fE(a),c=pE(t,r),l=yE(null),p=vE(u),f=0;f<p;f++)s=u[f],(o=dE(c(s,f,a)))in l?EE(l[o],s):l[o]=[s];if(n&&(i=n(a))!==gE)for(o in l)l[o]=mE(i,l[o]);return l}var I=Lo(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),cp=Lo,mg=Bo,gg=Vo,Eg=I,wg=Object.isExtensible,oa=cp(function(){wg(1)})||Eg?function(e){return!!mg(e)&&((!Eg||"ArrayBuffer"!=gg(e))&&(!wg||wg(e)))}:wg,O=!Lo(function(){return Object.isExtensible(Object.preventExtensions({}))}),bg=m,Tg=g,k=Za,_g=Bo,Ig=Qs,Ag=ca.f,Og=Us,Ng=T,Rg=oa,Sg=O,xg=!1,Cg=Xo("meta"),kg=0,Mg=ou.exports={enable:function(){Mg.enable=function(){},xg=!0;var i=Og.f,o=Tg([].splice),e={};e[Cg]=1,i(e).length&&(Og.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===Cg){o(t,r,1);break}return t},bg({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Ng.f}))},fastKey:function(e,t){if(!_g(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Ig(e,Cg)){if(!Rg(e))return"F";if(!t)return"E";hg(e)}return e[Cg].objectID},getWeakData:function(e,t){if(!Ig(e,Cg)){if(!Rg(e))return!0;if(!t)return!1;hg(e)}return e[Cg].weakData},onFreeze:function(e){return Sg&&xg&&Rg(e)&&!Ig(e,Cg)&&hg(e),e}},Pg=(k[Cg]=!0,Ho),Ug=Bo,Dg=A,Lg=m,Fg=e,Vg=g,jg=iu,zg=rs,Hg=ou.exports,Bg=Lc,Gg=Kp,Kg=Ho,Jg=Bo,Yg=Lo,qg=nd,$g=lp,Xg=function(e,t,r){return Dg&&Pg(t=t.constructor)&&t!==r&&Ug(t=t.prototype)&&t!==r.prototype&&Dg(e,t),e},Wg=rs,Zg=ca.f,Qg=Tc,eE=dg,tE=Cc,rE=Kp,nE=Lc,iE=hp,oE=Gp,sE=B,aE=ou.exports.fastKey,uE=r.set,cE=r.getterFor,lE=(function(e,t,r){function n(e){var r=Vg(h[e]);zg(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(l&&!Jg(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return l&&!Jg(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(l&&!Jg(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=Fg[e],h=f&&f.prototype,d=f,v={};return jg(e,!Kg(f)||!(l||h.forEach&&!Yg(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,p),Hg.enable()):jg(e,!0)&&(o=(i=new d)[p](l?{}:-0,1)!=i,s=Yg(function(){i.has(1)}),a=qg(function(e){new f(e)}),u=!l&&Yg(function(){for(var e=new f,t=5;t--;)e[p](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){Gg(e,h);e=Xg(new f,e,d);return null!=t&&Bg(t,e[p],{that:e,AS_ENTRIES:c}),e})).prototype=h).constructor=d),(s||u)&&(n("delete"),n("has"),c&&n("get")),(u||o)&&n(p),l&&h.clear&&delete h.clear),v[e]=d,Lg({global:!0,constructor:!0,forced:d!=f},v),$g(d,e),l||r.setStrong(d,e,c),d}("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=aE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),sE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=aE(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){rE(e,a),uE(e,{type:r,index:Qg(null),first:void 0,last:void 0,size:0}),sE||(e.size=0),null!=t&&nE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=cE(r);return eE(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,sE?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),sE?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=tE(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)}}),eE(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)}}),sE&&Zg(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=cE(t),o=cE(n);iE(e,t,function(e,t){uE(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),oE(t)}}),y),pE=Cc,fE=w,hE=$o,dE=Zo,vE=y,yE=Tc,mE=vg,gE=Array,EE=g([].push),wE=yg,ks=jc;m({target:"Array",proto:!0},{group:function(e){return wE(this,e,1<arguments.length?arguments[1]:void 0)}}),ks("group");var bE=yg,N=jc;m({target:"Array",proto:!0,forced:!E("groupBy")},{groupBy:function(e){return bE(this,e,1<arguments.length?arguments[1]:void 0)}}),N("groupBy");function TE(e){for(var t,r,n=AE(this),i=IE(n),o=_E(e,1<arguments.length?arguments[1]:void 0),s=new NE,a=OE(i),u=0;u<a;u++)t=o(r=i[u],u,n),SE(s,t)?CE(RE(s,t),r):xE(s,t,[r]);return s}var _E=Cc,Rh=g,IE=w,AE=$o,OE=y,NE=Go("Map"),o=NE.prototype,RE=Rh(o.get),SE=Rh(o.has),xE=Rh(o.set),CE=Rh([].push),x=jc,rd=TE;m({target:"Array",proto:!0,name:"groupToMap",forced:!E("groupByToMap")},{groupByToMap:rd}),x("groupByToMap");function kE(e){return LE[e].prototype}var M=jc,ME=(m({target:"Array",proto:!0},{groupToMap:TE}),M("groupToMap"),y),PE=function(e,t){for(var r=ME(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},UE=zo,i=jc,DE=Array,LE=(m({target:"Array",proto:!0},{toReversed:function(){return PE(UE(this),DE)}}),i("toReversed"),e),Ps=m,FE=Jo,VE=zo,jE=vg,_=jc,zE=Array,HE=g(kE("Array").sort),I=(Ps({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&FE(e);var t=VE(this),t=jE(zE,t);return HE(t,e)}}),_("toSorted"),m),cp=jc,BE=S,GE=y,KE=is,JE=zo,YE=ns,qE=Array,$E=Math.max,XE=Math.min,WE=(I({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=JE(this),a=GE(s),u=KE(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,XE($E(YE(t),0),a-u)),i=BE(a+r-n),o=qE(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}}),cp("toSpliced"),y),ZE=ns,QE=RangeError,ew=function(e,t,r,n){var i=WE(e),r=ZE(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},tw=zo,rw=Array;m({target:"Array",proto:!0},{with:function(e,t){return ew(tw(this),rw,e,t)}});Za=e,Qs=Zs,Us=Ho,T=uu,oa=rs,O="USE_FUNCTION_CONSTRUCTOR",k=Wo("asyncIterator"),A=Za.AsyncIterator,iu=Qs.AsyncIteratorPrototype;if(iu)Ob=iu;else if(Us(A))Ob=A.prototype;else if(Qs[O]||Za[O])try{mb=T(T(T(Function("return async function*(){}()")()))),T(mb)===Object.prototype&&(Ob=mb)}catch(e){}Us((Ob=Ob||{})[k])||oa(Ob,k,function(){return this});function nw(e,t,r){var n=e.done;pw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function iw(e){hw(this,{type:fw,iterator:cw(e),next:e.next})}function ow(e){var f=0==e,h=1==e,d=2==e,v=3==e;return function(e,s,a){var e=Cw(e),u=xw("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||Nw(s),new u(function(r,n){var i=function(e){kw(c,n,e,n)},o=function(){try{if(f&&p)try{Sw(l)}catch(e){i(e)}u.resolve(Rw(Ow(t,c))).then(function(e){try{if(Rw(e).done)f?(a.length=l,r(a)):r(!v&&(d||void 0));else{var t=e.value;try{p?u.resolve(f?s(t,l):s(t)).then(function(e){if(h)o();else if(d)e?o():kw(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?kw(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 sw(e,t){if(!qw||!Yw(e)||!qw(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 aw(e,t,r){return r.get&&$w(r.get,t,{getter:!0}),r.set&&$w(r.set,t,{setter:!0}),Xw.f(e,t,r)}var uw=t,cw=es,ou=Tc,lw=Yo,ks=dg,N=r,w=Ob,pw=Go("Promise"),fw="AsyncFromSyncIterator",hw=N.set,dw=N.getterFor(fw),o=(iw.prototype=ks(ou(w),{next:function(){var n=dw(this);return new pw(function(e,t){var r=cw(uw(n.next,n.iterator));nw(r,e,t)})},return:function(){var n=dw(this).iterator;return new pw(function(e,t){var r=lw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=cw(uw(r,n));nw(r,e,t)})}}),iw),vw=t,yw=o,mw=es,gw=Pc,Ew=Yo,ww=Wo("asyncIterator"),bw=Jo,Tw=es,_w=t,Iw=Go,Aw=Yo,Ow=t,Nw=Jo,Rw=es,Sw=S,xw=Go,Cw=function(e){return{iterator:e,next:bw(Tw(e).next)}},kw=function(e,t,r,n){try{var i=Aw(e,"return");if(i)return Iw("Promise").resolve(_w(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},Rh={toArray:ow(0),forEach:ow(1),every:ow(2),some:ow(3),find:ow(4)},Mw=Cc,Pw=$o,Uw=R,Dw=function(e,t){t=arguments.length<2?Ew(e,ww):t;return t?mw(vw(t,e)):new yw(gw(e))},Lw=Pc,Fw=Mc,Vw=Yo,E=kE,jw=Go,rd=Wo,zw=o,Hw=Rh.toArray,Bw=rd("asyncIterator"),Gw=E("Array").values,x=(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(jw("Promise"))(function(e){var t=Pw(o),r=(void 0!==a&&(a=Mw(a,u)),Vw(t,Bw)),n=r?void 0:Fw(t)||Gw,i=Uw(s)?new s:[],r=r?Dw(t,r):new zw(Lw(t,n));e(Hw(r,a,i))})}}),m),Kw=b.filterReject,M=jc,i=(x({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return Kw(this,e,1<arguments.length?arguments[1]:void 0)}}),M("filterOut"),m),Jw=b.filterReject,Ps=jc,_=(i({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return Jw(this,e,1<arguments.length?arguments[1]:void 0)}}),Ps("filterReject"),m),Yw=Xl,qw=Object.isFrozen,$w=(_({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!sw(e,!0))return!1;var t=e.raw;return t.length===e.length&&sw(t,!1)}}),Ms.exports),Xw=ca,I=jc,Ww=$o,Zw=y;B&&(aw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=Ww(this),t=Zw(e);return 0==t?void 0:e[t-1]},set:function(e){var t=Ww(this),r=Zw(t);return t[0==r?0:r-1]=e}}),I("lastItem"));var cp=jc,Qw=$o,e0=y;B&&(aw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=Qw(this),e=e0(e);return 0==e?0:e-1}}),cp("lastIndex"));var e=g,t0=Jo,r0=y,n0=$o,i0=C,o0=Go("Map"),Zs=o0.prototype,s0=e(Zs.forEach),a0=e(Zs.has),u0=e(Zs.set),c0=e([].push),uu=jc;m({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=n0(this),i=r0(n),o=i0(n,0),s=new o0,a=null!=e?t0(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),a0(s,r)||u0(s,r,t);return s0(s,function(e){c0(o,e)}),o}}),uu("uniqueBy");p0.exposure=function(e,t,r,n){return new h0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},p0.track=function(e,t,r,n){return new y0(n,r,e,t)},p0.remoteConfig=function(e,t,r,n){return new E0(n,e,t.parameter,t.valueId,t.reason,r)},p0.isExposureEvent=function(e){return void 0!==e.experiment},p0.isTrackEvent=function(e){return void 0!==e.eventType},p0.isRemoteConfigEvent=function(e){return void 0!==e.parameter},p0.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},p0.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},p0.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},p0.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 l0=p0;function p0(e,t,r){void 0===r&&(r=H()),this.timestamp=e,this.user=t,this.insertId=r}Ne(d0,f0=l0),d0.prototype.copyWithUser=function(e){return new d0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},d0.prototype.toDto=function(){return c(c({},f0.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 f0,h0=d0;function d0(e,t,r,n,i,o,s,a){e=f0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}Ne(m0,v0=l0),m0.prototype.copyWithUser=function(e){return new m0(this.timestamp,e,this.eventType,this.event,this.insertId)},m0.prototype.toDto=function(){return c(c({},v0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Me.sanitize(this.event.properties)})};var v0,y0=m0;function m0(e,t,r,n,i){e=v0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}Ne(w0,g0=l0),w0.prototype.copyWithUser=function(e){return new w0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},w0.prototype.toDto=function(){return c(c({},g0.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 g0,E0=w0;function w0(e,t,r,n,i,o,s){e=g0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}T0.isSessionEvent=function(e){return!!l0.isTrackEvent(e)&&(e.event.key===T0.SESSION_START_EVENT_NAME||e.event.key===T0.SESSION_END_EVENT_NAME)},T0.prototype.onSessionStarted=function(e,t,r){this.track(T0.SESSION_START_EVENT_NAME,e,t,r)},T0.prototype.onSessionEnded=function(e,t,r){this.track(T0.SESSION_END_EVENT_NAME,e,t,r)},T0.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)},T0.prototype.decorateSession=function(e,t){t=(new mt).add(dt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},T0.SESSION_START_EVENT_NAME="$session_start",T0.SESSION_END_EVENT_NAME="$session_end";var b0=T0;function T0(e,t){this.userManager=e,this.core=t}I0.prototype.process=function(e){var t;b0.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))},I0.prototype.flush=function(e){this.delegate.flush(e)},I0.prototype.close=function(){this.delegate.close()},I0.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.flush(!0)}};var _0=I0;function I0(e,t,r,n){this.delegate=e,this.exposureEventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}O0.prototype.isDedupTarget=function(e){if(-1===this.exposureEventDedupIntervalMillis)return!1;if(!l0.isExposureEvent(e))return!1;xe.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 A0=O0;function O0(e){this.cache=new Map,this.exposureEventDedupIntervalMillis=e}R0.toEvent=function(e){var t;return{key:R0.EVENT_KEY,properties:{level:R0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:R0._stacktrace(e)}}},R0._stacktrace=function(e){return a.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,R0.STACK_TRACK_LIMIT).join("\n")},R0.EVENT_KEY="$trace",R0.LEVEL_ERROR="error",R0.STACK_TRACK_LIMIT=30;var N0=R0;function R0(){}S0.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)}};iu=S0;function S0(){}C0.prototype.with=function(e){return new C0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},C0.of=function(e,t,r,n){var i=this.config(e.workspace,r);return new C0(n,t.targetEvaluations,e.experiment,r.id,r.key,i)},C0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return a.isNotNullOrUndefined(n)?this.of(e,t,n,r):new C0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)},C0.config=function(e,t){if(!a.isNullOrUndefined(t.parameterConfigurationId))return a.requiredNotNullOrUndefined(e.getParameterConfigurationOrNull(t.parameterConfigurationId),function(){return"ParameterConfiguration[".concat(t.parameterConfigurationId,"]")})};var x0=C0;function C0(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(P0,k0=iu),P0.prototype.supports=function(e){return void 0!==e.experiment},P0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:x0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var k0,M0=P0;function P0(e){var t=k0.call(this)||this;return t.evaluationFlowFactory=e,t}D0.of=function(e,t,r,n,i,o){return o.returnValue=Me.truncateStringValue(n),new D0(i,t.targetEvaluations,e.parameter,r,n,o)},D0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var U0=D0;function D0(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(V0,L0=iu),V0.prototype.supports=function(e){return void 0!==e.parameter},V0.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 U0.ofDefault(e,t,h.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,h.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,h.DEFAULT_RULE,r)},V0.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?U0.ofDefault(e,t,h.TYPE_MISMATCH,i):U0.of(e,t,r.id,r.rawValue,n,i)};var L0,F0=V0;function V0(e){var t=L0.call(this)||this;return t.targetRuleDeterminer=e,t}z0.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var j0=z0;function z0(e,t){this.type=e,this.id=t}B0.create=function(){return new B0},Object.defineProperty(B0.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(B0.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(B0.prototype,"properties",{get:function(){return Me.sanitize(this._properties)},enumerable:!1,configurable:!0}),B0.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},B0.prototype.addRequest=function(e){this._stack.push(e)},B0.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},B0.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof x0&&e.experiment.id===t.id})},B0.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},B0.prototype.setProperty=function(e,t){this._properties[e]=t};var H0=B0;function B0(){this._stack=[],this._targetEvaluations=[],this._properties={}}K0.of=function(e,t,r,n){return new K0(e,t,r,n)},K0.by=function(e,t){return new K0(e.workspace,e.user,t,"A")},K0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var G0=K0;function K0(e,t,r,n){this.key=new j0("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}Y0.of=function(e,t,r,n,i){return new Y0(e,t,r,n,i)},Y0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var J0=Y0;function Y0(e,t,r,n,i){this.key=new j0("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}$0.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();default:return}},$0.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},$0.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var q0=$0;function $0(){}W0.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 X0=W0;function W0(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 q0.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=q0.asNumber(t),e=q0.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 Z0=Q0;function Q0(e){this.listStorage=e}tb.prototype.add=function(e){this.evaluators.push(e)},tb.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 eb=tb;function tb(){this.evaluators=new Array}nb.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},nb.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},nb.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var rb=nb;function nb(e){this.conditionMatcherFactory=e}ob.prototype.decorate=function(e){return e};var ib=ob;function ob(){}ab.prototype.decorate=function(e){return"string"==typeof e?decodeURI(e):e};var sb=ab;function ab(){}cb.prototype.matches=function(e,t,r){void 0===r&&(r=new ib);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)},cb.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)},cb.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},cb.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},cb.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var ub=cb;function cb(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}pb.tryParse=function(e){try{return new URL(e)}catch(e){return}},pb.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:pb.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)};var lb=pb;function pb(){}fb.prototype.booleanMatches=function(e,t){return e===t},fb.prototype.numberMatches=function(e,t){return e===t},fb.prototype.stringMatches=function(e,t){return e===t},fb.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},fb.prototype.urlMatches=function(e,t){return decodeURI(lb.removePathnameTrailingSlash(e))===decodeURI(lb.removePathnameTrailingSlash(t))};A=fb;function fb(){}hb.prototype.booleanMatches=function(e,t){return!1},hb.prototype.numberMatches=function(e,t){return!1},hb.prototype.stringMatches=function(e,t){return e.includes(t)},hb.prototype.versionMatches=function(e,t){return!1},hb.prototype.urlMatches=function(e,t){return decodeURI(e.href).includes(t)};Qs=hb;function hb(){}db.prototype.booleanMatches=function(e,t){return!1},db.prototype.numberMatches=function(e,t){return!1},db.prototype.stringMatches=function(e,t){return e.startsWith(t)},db.prototype.versionMatches=function(e,t){return!1},db.prototype.urlMatches=function(e,t){return decodeURI(e.href).startsWith(t)};Za=db;function db(){}vb.prototype.booleanMatches=function(e,t){return!1},vb.prototype.numberMatches=function(e,t){return!1},vb.prototype.stringMatches=function(e,t){return e.endsWith(t)},vb.prototype.versionMatches=function(e,t){return!1},vb.prototype.urlMatches=function(e,t){return!1};O=vb;function vb(){}yb.prototype.booleanMatches=function(e,t){return!1},yb.prototype.numberMatches=function(e,t){return t<e},yb.prototype.stringMatches=function(e,t){return t<e},yb.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},yb.prototype.urlMatches=function(e,t){return!1};T=yb;function yb(){}gb.prototype.booleanMatches=function(e,t){return!1},gb.prototype.numberMatches=function(e,t){return t<=e},gb.prototype.stringMatches=function(e,t){return t<=e},gb.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},gb.prototype.urlMatches=function(e,t){return!1};var mb=gb;function gb(){}Eb.prototype.booleanMatches=function(e,t){return!1},Eb.prototype.numberMatches=function(e,t){return e<t},Eb.prototype.stringMatches=function(e,t){return e<t},Eb.prototype.versionMatches=function(e,t){return e.isLessThan(t)},Eb.prototype.urlMatches=function(e,t){return!1};Us=Eb;function Eb(){}wb.prototype.booleanMatches=function(e,t){return!1},wb.prototype.numberMatches=function(e,t){return e<=t},wb.prototype.stringMatches=function(e,t){return e<=t},wb.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},wb.prototype.urlMatches=function(e,t){return!1};oa=wb;function wb(){}Tb.prototype.getMatcher=function(e){switch(e){case"IN":return Tb.IN_MATCHER;case"CONTAINS":return Tb.CONTAINS_MATCHER;case"STARTS_WITH":return Tb.STARTS_WITH_MATCHER;case"ENDS_WITH":return Tb.ENDS_WITH_MATCHER;case"GT":return Tb.GT_MATCHER;case"GTE":return Tb.GTE_MATCHER;case"LT":return Tb.LT_MATCHER;case"LTE":return Tb.LTE_MATCHER}},Tb.IN_MATCHER=new A,Tb.CONTAINS_MATCHER=new Qs,Tb.STARTS_WITH_MATCHER=new Za,Tb.ENDS_WITH_MATCHER=new O,Tb.GT_MATCHER=new T,Tb.GTE_MATCHER=new mb,Tb.LT_MATCHER=new Us,Tb.LTE_MATCHER=new oa;var bb=Tb;function Tb(){}_b.prototype.matches=function(e,t,r){t=q0.asString(t),r=q0.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.stringMatches(t,r)};k=_b;function _b(){}Ib.prototype.matches=function(e,t,r){t=q0.asNumber(t),r=q0.asNumber(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.numberMatches(t,r)};Tc=Ib;function Ib(){}Ab.prototype.matches=function(e,t,r){return"boolean"==typeof t&&"boolean"==typeof r&&e.booleanMatches(t,r)};r=Ab;function Ab(){}Nb.prototype.matches=function(e,t,r){t=Gt.tryParse(t),r=Gt.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)};var Ob=Nb;function Nb(){}Rb.prototype.matches=function(e,t,r){t=lb.tryParse(t),r=q0.asString(r);return!a.isNullOrUndefined(t)&&!a.isNullOrUndefined(r)&&e.urlMatches(t,r)};N=Rb;function Rb(){}Sb.prototype.matches=function(e,t,r){return!1};ks=Sb;function Sb(){}Cb.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return Cb.STRING_MATCHER;case"NUMBER":return Cb.NUMBER_MATCHER;case"BOOLEAN":return Cb.BOOLEAN_MATCHER;case"VERSION":return Cb.VERSION_MATCHER;case"URL":return Cb.URL_MATCHER;case"NULL":case"UNKNOWN":return Cb.NULL_MATCHER}},Cb.STRING_MATCHER=new k,Cb.NUMBER_MATCHER=new Tc,Cb.BOOLEAN_MATCHER=new r,Cb.VERSION_MATCHER=new Ob,Cb.URL_MATCHER=new N,Cb.NULL_MATCHER=new ks;var xb=Cb;function Cb(){}Mb.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)},Mb.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?sb:ib)};var kb=Mb;function Mb(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}Ub.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 Pb=Ub;function Ub(){}Lb.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}},Lb.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 Db=Lb;function Lb(e){this.segmentMatcher=e}Vb.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},Vb.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var Fb=Vb;function Vb(e){this.userConditionMatcher=e}zb.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 jb=zb;function zb(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}Hb.prototype.matches=function(e,t,r){var n=a.requiredNotNullOrUndefined(q0.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.getEvaluation(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},Hb.prototype.evaluate=function(e,t,r){r=G0.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e};ou=Hb;function Hb(e,t){this.evaluator=e,this.valueOperatorMatcher=t}Ne(Kb,Bb=ou),Kb.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},Kb.prototype.resolve=function(e,t){return e instanceof G0&&t.reason===h.TRAFFIC_ALLOCATED?t.with(h.TRAFFIC_ALLOCATED_BY_TARGETING):t},Kb.prototype.evaluationMatches=function(e,t){return!!Kb.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},Kb.AB_TEST_MATCHED_REASONS=[h.OVERRIDDEN,h.TRAFFIC_ALLOCATED,h.EXPERIMENT_COMPLETED,h.TRAFFIC_ALLOCATED_BY_TARGETING];var Bb,Gb=Kb;function Kb(e,t){return Bb.call(this,e,t)||this}Ne(qb,Jb=ou),qb.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},qb.prototype.resolve=function(e,t){return t},qb.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var Jb,Yb=qb;function qb(e,t){return Jb.call(this,e,t)||this}Xb.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)},Xb.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var $b=Xb;function Xb(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}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 l0.isTrackEvent(e)?e.event.properties:l0.isExposureEvent(e)||l0.isRemoteConfigEvent(e)?e.properties:void 0};var Wb=Zb;function Zb(){}eT.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=eT;function eT(e){this.valueOperatorMatcher=e}rT.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 tT=rT;function rT(e){var t=new ub(new xb,new bb);this.userConditionMatcher=new kb(new Pb,t),this.eventConditionMatcher=new $b(new Wb,t),this.segmentConditionMatcher=new Db(new Fb(this.userConditionMatcher)),this.experimentConditionMatcher=new jb(new Gb(e,t),new Yb(e,t)),this.cohortConditionMatcher=new Qb(t)}iT.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},iT.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},iT.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 nT=iT;function iT(e){this.bucketer=e}var oT={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}},sT=(aT.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},aT.prototype.calculateSlotNumber=function(e,t,r){r=oT.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},aT);function aT(){}cT.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},cT.end=function(){return new cT(void 0,void 0)},cT.decision=function(e,t){return new cT(e,t)},cT.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 uT=cT;function cT(e,t){this.flowEvaluator=e,this.nextFlow=t}pT.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 x0.of(e,t,n,h.OVERRIDDEN);case"FEATURE_FLAG":return x0.of(e,t,n,h.INDIVIDUAL_TARGET_MATCH)}};var lT=pT;function pT(e){this.overrideResolver=e}hT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?x0.ofDefault(e,t,h.EXPERIMENT_DRAFT):r.evaluate(e,t)};var fT=hT;function hT(){}vT.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return x0.ofDefault(e,t,h.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return x0.ofDefault(e,t,h.FEATURE_FLAG_INACTIVE)}};var dT=vT;function vT(){}mT.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return x0.of(e,t,r,h.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var yT=mT;function mT(){}ET.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):x0.ofDefault(e,t,h.NOT_IN_EXPERIMENT_TARGET)};var gT=ET;function ET(e){this.experimentTargetDeterminer=e}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("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?x0.ofDefault(e,t,h.VARIATION_DROPPED):x0.of(e,t,n,h.TRAFFIC_ALLOCATED):x0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var wT=bT;function bT(e){this.actionResolver=e}_T.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 x0.of(e,t,r,h.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var TT=_T;function _T(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}AT.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 x0.ofDefault(e,t,h.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return x0.of(e,t,n,h.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var IT=AT;function AT(e){this.actionResolver=e}NT.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):x0.ofDefault(e,t,h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var OT=NT;function NT(e){this.containerResolver=e}ST.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):x0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND)};var RT=ST;function ST(){}CT.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 xT=CT;function CT(e){this.targetMatcher=e}MT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var kT=MT;function MT(e){this.targetMatcher=e}UT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},UT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},UT.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)}},UT.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 PT=UT;function UT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}LT.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 DT=LT;function LT(e){this.bucketer=e}VT.of=function(e,t,r,n){return new VT(r,t.targetEvaluations,e.inAppMessage,n,t.properties)};var FT=VT;function VT(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n,this.properties=i}zT.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):FT.of(e,t,h.UNSUPPORTED_PLATFORM)};var jT=zT;function zT(){}BT.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),FT.of(e,t,h.OVERRIDDEN,n)):r.evaluate(e,t)};var HT=BT;function BT(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}KT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?FT.of(e,t,h.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var GT=KT;function KT(){}YT.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?FT.of(e,t,h.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var JT=YT;function YT(){}$T.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):FT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_PERIOD)};var qT=$T;function $T(){}WT.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?FT.of(e,t,h.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var XT=WT;function WT(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),FT.of(e,t,h.IN_APP_MESSAGE_TARGET,n)):FT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var ZT=QT;function QT(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}t_.prototype.resolve=function(e,t){return null!=(t=this.resolveExperiment(e,t))?t:this.resolveDefault(e)},t_.prototype.resolveExperiment=function(e,t){var r=e.inAppMessage.messageContext.experimentContext;if(!r)return null;var n=a.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[".concat(r.key,"]")}),n=G0.by(e,n),i=this.evaluator.evaluate(n,t),o=(this.addExperimentContext(i,t),e.inAppMessage.messageContext.defaultLang);return this.resolveMessage(e,function(e){return e.lang===o&&i.variationKey===e.variationKey})},t_.prototype.addExperimentContext=function(e,t){t.addEvaluation(e),t.setProperty("experiment_id",e.experiment.id),t.setProperty("experiment_key",e.experiment.key),t.setProperty("variation_id",e.variationId),t.setProperty("variation_key",e.variationKey),t.setProperty("experiment_decision_reason",e.reason)},t_.prototype.resolveDefault=function(e){var t=e.inAppMessage.messageContext.defaultLang;return this.resolveMessage(e,function(e){return e.lang===t})},t_.prototype.resolveMessage=function(e,t){t=e.inAppMessage.messageContext.messages.find(t);return a.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.inAppMessage.id,"]")})};var e_=t_;function t_(e){this.evaluator=e}n_.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},n_.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!a.isNullOrUndefined(e)&&t.identifiers.includes(e)};var r_=n_;function n_(){}o_.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 i_=o_;function o_(e){this.targetMatcher=e}a_.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var s_=a_;function a_(e){this.storage=e}c_.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},c_.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 u_=c_;function c_(e,t){this.targetMatcher=e,this.bucketer=t}p_.get=function(e){return a.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},p_.getOrNull=function(e){return p_.instances.get(e)},p_.register=function(e,t){return p_.instances.set(e,t),t},p_.instances=new Map;var l_=p_;function p_(){}h_.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},h_.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow};var f_=h_;function h_(e,t,r){var n=new sT,i=l_.register("targetMatcher",new rb(new tT(e))),o=new nT(n),t=new PT(t,i,o),s=new DT(n),s=(this.abTestFlow=uT.of(new lT(t),new RT,new OT(s),new gT(new xT(i)),new fT,new dT,new yT,new wT(o)),this.featureFlagFlow=uT.of(new fT,new dT,new yT,new lT(t),new RT,new TT(new kT(i),o),new IT(o)),new e_(e));this.inAppMessageFlow=uT.of(new jT,new HT(new r_,s),new GT,new JT,new qT,new XT(new s_(r)),new ZT(new i_(i),s)),this.remoteConfigParameterTargetRuleDeterminer=new u_(i,n)}v_.prototype.create=function(r,e){var n=this,i=this.clock.currentMillis(),o=new Array,t=this.createEvent(r,e,i,{});return t&&o.push(t),e.targetEvaluations.forEach(function(e){var t;(t={})[v_.ROOT_TYPE]=r.key.type,t[v_.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},v_.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof x0)return n[v_.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[v_.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[v_.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,l0.exposure(e.user,t,n,r);if(t instanceof U0)return l0.remoteConfig(e.user,t,c(c({},n),t.properties),r);if(t instanceof FT)return null;throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},v_.ROOT_TYPE="$targetingRootType",v_.ROOT_ID="$targetingRootId",v_.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",v_.EXPERIMENT_VERSION_KEY="$experiment_version",v_.EXECUTION_VERSION_KEY="$execution_version";var d_=v_;function v_(e){this.clock=e}Ne(g_,y_=iu),g_.prototype.supports=function(e){return void 0!==e.inAppMessage},g_.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:FT.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var y_,m_=g_;function g_(e){var t=y_.call(this)||this;return t.evaluationFlowFactory=e,t}w_.of=function(e,t,r,n){return new w_(e,t,r,n)},w_.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var E_=w_;function w_(e,t,r,n){this.key=new j0("IN_APP_MESSAGE",r.id),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}var b_=s.log,T_=(__.create=function(e,t,r,n){var i=new eb,r=new X0(r),r=new f_(i,r,n),n=new M0(r),o=new F0(r.remoteConfigParameterTargetRuleDeterminer),r=new m_(r);return i.add(n),i.add(o),new __(n,o,r,e,new d_(Le.instance),t,new I_,Le.instance)},__.prototype.experiment=function(e,t,r){var n=this;if(!e)return b_.error("experimentKey must not be empty"),Xe.of(r,h.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return b_.warn("SDK not ready."),Xe.of(r,h.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return b_.warn("Experiment does not exist."),Xe.of(r,h.EXPERIMENT_NOT_FOUND);i=G0.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},__.prototype.experiments=function(r){var n=this,i=new Mn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=G0.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},__.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,H0.create()),t=null!=(t=e.config)?t:new Ve;return[e,Xe.of(e.variationKey,e.reason,t)]},__.prototype.featureFlag=function(e,t){var r=this;if(!e)return b_.error("featureKey must not be empty"),Ze.off(h.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return b_.warn("SDK not ready."),Ze.off(h.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return b_.warn("FeatureFlag does not exist."),Ze.off(h.FEATURE_FLAG_NOT_FOUND);n=G0.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},__.prototype.featureFlags=function(r){var n=this,i=new Mn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=G0.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},__.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,H0.create()),t=null!=(t=e.config)?t:new Ve;return[e,"A"===e.variationKey?Ze.off(e.reason,t):Ze.on(e.reason,t)]},__.prototype.inAppMessage=function(e,t){var r=this,n=this.workspaceFetcher.get();if(!n)return b_.warn("SDK not ready."),qe.of(h.SDK_NOT_READY);e=n.getInAppMessageOrNull(e);if(!e)return b_.warn("In app message does not exist."),qe.of(h.IN_APP_MESSAGE_NOT_FOUND);n=E_.of(n,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(n,H0.create());return this.eventFactory.create(n,t).forEach(function(e){return r.eventProcessor.process(e)}),qe.of(t.reason,t.inAppMessage,t.message,t.properties)},__.prototype.tryInAppMessage=function(t,e){var r,n=Sn.start();try{r=this.inAppMessage(t,e)}catch(e){b_.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=qe.of(h.EXCEPTION)}return Ii.inAppMessage(n,t,r),r},__.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?b_.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 ft(0,e.key),this.eventProcessor.process(l0.track(n,e,t,r))):b_.warn("Event key must be not null. or event key must be string type."):b_.warn("event must not be null.")},__.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=N0.toEvent(e),this.flush(),this.track(e,t),this.flush())},__.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},__.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(a.isNullOrUndefined(o))return b_.warn("SDK not ready."),Je.of(n,h.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(a.isNullOrUndefined(e))return b_.warn("Remote config parameter does not exist."),Je.of(n,h.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=J0.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,H0.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),Je.of(t.value,t.reason)},__.prototype.close=function(){this.eventProcessor.close()},__);function __(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}A_.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},A_.prototype._isSameError=function(e,t){return!a.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var I_=A_;function A_(){}N_.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},N_.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var O_=N_;function N_(){this._installed=[],this._installations={onerror:x_,onunhandledrejection:C_}}var R_,S_=null;function x_(o,s){S_=window.onerror,window.onerror=function(e,t,r,n,i){a.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),S_&&S_.apply(this,arguments)}}function C_(r,n){R_=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()),R_&&R_.apply(this,arguments)}}M_.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,[]]})})},M_.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])})})},M_.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]}})})},M_.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]}})})},M_.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},M_.prototype.clear=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var k_=M_;function M_(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var P_=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},U_=(D_.builder=function(){return new L_},D_.empty=function(){return D_.builder().build()},D_.from=function(e){return new D_(e)},D_.fromDto=function(e){for(var t=D_.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 Wr(e)})})}return t.build()},Object.defineProperty(D_.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),D_.prototype.get=function(e){return this.cohorts.get(e)},D_.prototype.filterBy=function(e){var r=yt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return D_.from(e)},D_.prototype.asArray=function(){return this.cohorts.values()},D_.prototype.asComparable=function(){return this.cohorts},D_.prototype.toBuilder=function(){return new L_(this)},D_);function D_(e){this.cohorts=e}F_.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},F_.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},F_.prototype.build=function(){return new U_(this.cohorts)};var L_=F_;function F_(e){this.cohorts=new Mn(xe.isEqual),e&&this.putAll(e)}var w="model",t="name",S="type",R="vendor",o="version",Rh="architecture",rd="console",E="mobile",x="tablet",M="smarttv",b="wearable",V_=(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],[[Rh,"amd64"]],[/(ia32(?=;))/i],[[Rh,P.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[Rh,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[Rh,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[Rh,/ower/,"",P.util.lowerize]],[/(sun4\w)[;\)]/i],[[Rh,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[Rh,P.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[w,R,[S,x]],[/applecoremedia\/[\w\.]+ \((ipad)/],[w,[R,"Apple"],[S,x]],[/(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,x]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[w,[R,"Amazon"],[S,x]],[/(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,x]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[R,"Sony"],[w,"Xperia Tablet"],[S,x]],[/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,rd]],[/android.+;\s(shield)\sbuild/i],[w,[R,"Nvidia"],[S,rd]],[/(playstation\s[34portablevi]+)/i],[w,[R,"Sony"],[S,rd]],[/(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,x]],[/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,x]],[/(microsoft);\s(lumia[\s\w]+)/i],[R,w,[S,E]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[w,[R,"Microsoft"],[S,rd]],[/(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,x]],[/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,x]],[/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,x]],[/android.+([vl]k\-?\d{3})\s+build/i],[w,[R,"LG"],[S,x]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[R,"LG"],w,[S,x]],[/(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,x]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[w,[R,"Lenovo"],[S,x]],[/(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,x]],[/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,x]],[/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,x]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[w,[R,"Dell"],[S,x]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[w,[R,"Verizon"],[S,x]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[R,"Barnes & Noble"],w,[S,x]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[w,[R,"NuVision"],[S,x]],[/android.+;\s(k88)\sbuild/i],[w,[R,"ZTE"],[S,x]],[/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,x]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[w,[R,"Zeki"],[S,x]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[R,"Dragon Touch"],w,[S,x]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[w,[R,"Insignia"],[S,x]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[w,[R,"NextBook"],[S,x]],[/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,x]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[R,w,[S,x]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[w,[R,"MachSpeed"],[S,x]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[R,w,[S,x]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[w,[R,"Rotor"],[S,x]],[/android.+(KS(.+))\s+build/i],[w,[R,"Amazon"],[S,x]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[R,w,[S,x]],[/\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(){}z_.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=V_.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}),h=a.name||"",d="",v="";try{h=null!=(r=null==(t=h.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:h,d=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:h,osVersion:a.version||"",deviceModel:e.model||"",deviceType:f,deviceVendor:e.vendor||"",deviceBrand:e.vendor||"",locale:l,language:p,orientation:d,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 j_=z_;function z_(){}B_.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return J_.of(q_(e,this.hackleDeviceId),U_.empty())},B_.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(B_.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),B_.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},B_.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}):this.updateUser(e)},B_.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},B_.prototype.hackleUser=function(e){var t=(new mt).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}},B_.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?j_.generate(window):e)||{}},B_.prototype.setUser=function(e){return this.updateUser(e).user},B_.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},B_.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},B_.prototype.updateUserProperties=function(e){return this.operateProperties(e).user},B_.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).user},B_.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},B_.prototype.saveUser=function(e){this.storage.saveUser(e)},B_.prototype.updateContext=function(e){var t=this.context.user,e=e(t),r=this.context.with(e);return this.context=r,P_(t,e)||(this.changeUser(t,e,this.clock.currentMillis()),this.saveUser(e)),r},B_.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=q_(r,n.hackleDeviceId),P_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},B_.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)})})},B_.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]}})})},B_.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var H_=B_;function B_(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)}K_.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},K_.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(K_.prototype,"deviceId",{get:function(){return this.storage.getItem(mn)},enumerable:!1,configurable:!0}),Object.defineProperty(K_.prototype,"userId",{get:function(){return this.storage.getItem(yn)},enumerable:!1,configurable:!0}),K_.prototype.setDeviceId=function(e){this.setId(mn,e)},K_.prototype.setUserId=function(e){this.setId(yn,e)},K_.prototype.setId=function(e,t){a.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var G_=K_;function K_(e){this.storage=e}Y_.of=function(e,t){return new Y_(e,t.filterBy(e))},Y_.prototype.with=function(e){return Y_.of(e,this.cohorts.filterBy(e))},Y_.prototype.update=function(e){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return Y_.of(this.user,e)};var J_=Y_;function Y_(e,t){this.user=e,this.cohorts=t}var q_=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},$_=(Object.defineProperty(X_.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(X_.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:X_.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(X_.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),X_.prototype.addListener=function(e){this.sessionListeners.push(e)},X_.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},X_.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)},X_.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(vn,"".concat(e))},X_.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)})},X_.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},X_.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(dn,e)},X_.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(dn)},X_.prototype.loadLastEventTime=function(){var e=this.storage.getItem(vn);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},X_.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},X_.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return;case"hidden":return void this.updateLastEventTime(t)}},X_.EMPTY_SESSION_ID="0.ffffffff",X_);function X_(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}Z_.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},Z_.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},Z_.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},Z_.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var W_=Z_;function Z_(){this.storage=window.localStorage}eI.postfix=function(e,t){return new eI(e,function(e){return"".concat(e).concat(t)})},eI.prefix=function(e,t){return new eI(e,function(e){return"".concat(t).concat(e)})},eI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},eI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},eI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var Q_=eI;function eI(e,t){this.delegate=e,this.transform=t}rI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},rI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},rI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},rI.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}},rI.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[]}},rI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},rI.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){}},rI.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]},rI.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){}},rI.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var tI=rI;function rI(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)}iI.prototype.currentUser=function(){return this.userManager.resolve()},iI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},iI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},iI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},iI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},iI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},iI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},iI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},iI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},iI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},iI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},iI.prototype.increment=function(e,t){ai.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var nI=iI;function iI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}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")};var oI=sI;function sI(){}uI.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)},uI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},uI.prototype.key=function(e){return"".concat(e.key)};var aI=uI;function uI(e){this.storage=e}lI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var cI=lI;function lI(e){this.handlers=e}fI.prototype.handle=function(e,t){e.close()},fI.prototype.supports=function(e){return"CLOSE"===e.type};var pI=fI;function fI(){}dI.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))}},dI.prototype.supports=function(e){return"WEB_LINK"===e.type};var hI=dI;function dI(e){this.urlHandler=e}yI.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))}},yI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var vI=yI;function yI(e){this.urlHandler=e}gI.prototype.handle=function(e,t){var r=this.clock.currentMillis()+gI.HIDE_EXPIRATION;this.storage.put(e.context.inAppMessage,r),e.close()},gI.prototype.supports=function(e){return"HIDDEN"===e.type},gI.HIDE_EXPIRATION=864e5;var mI=gI;function gI(e,t){this.storage=e,this.clock=t}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_WINDOW"===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_WINDOW_AND_CLOSE"===e.type};var bI=TI;function TI(e){this.urlHandler=e}II.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))}},II.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var _I=II;function II(e){this.urlHandler=e}OI.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))}},OI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var AI=OI;function OI(e){this.urlHandler=e}RI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},RI.prototype.createTrackEvent=function(e,t){switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c(c({},t.properties),{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})})};case"CLOSE":return{key:"$in_app_close",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key})};case"ACTION":var r=e;return{key:"$in_app_action",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,action_type:r.action.type,action_area:r.area,action_value:r.action.value,button_text:r.text})}}};var NI=RI;function RI(e){this.core=e}xI.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 SI=xI;function xI(e,t,r){this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.currentMessageView=null,this.opening=!1}kI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},kI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var CI=kI;function kI(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 MI=function(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n},PI=(UI.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}}},UI.prototype.context=function(e,t){var r,e=this.core.tryInAppMessage(e.key,t.user);if(e.inAppMessage&&e.message)return r=c(c({},e.properties),{decision_reason:e.reason}),new MI(e.inAppMessage,e.message,t.user,Me.sanitize(r))},UI);function UI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}LI.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(LI.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(LI.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(LI.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]}})})},LI.prototype.close=function(){var e;this.handleEvent({type:"CLOSE"}),window.removeEventListener(LI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null},LI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(LI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},LI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},LI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},LI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},LI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",LI.CONTAINER_CLASS_NAME="hackle-iam";var DI=LI;function LI(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===LI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,n.handleInteraction(e))}}VI.create=function(e){return new VI(e)},VI.prototype.create=function(e,t){return new DI(this.scriptLoader,e,t)};var FI=VI;function VI(e){this.scriptLoader=e}zI.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()]}})})},zI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},zI.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 jI=zI;function zI(e){this.scriptUrl=e}BI.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},BI.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=GI.of(e,t,r);return this.targetMatcher.anyMatches(e,H0.create(),n.targets)};var HI=BI;function BI(e){this.targetMatcher=e}KI.of=function(e,t,r){return new KI(new j0("IN_APP_MESSAGE",r.id),e,t.user,t)};var GI=KI;function KI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}YI.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},YI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new qI(new XI(i)))}return e.durationCap&&t.push(new qI(new ZI(e.durationCap))),t};var JI=YI;function YI(e){this.storage=e}$I.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var qI=$I;function $I(e){this.matchCount=0,this.predicate=e}Object.defineProperty(WI.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),WI.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 XI=WI;function WI(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 ZI=QI;function QI(e){this.durationCap=e}tA.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return a.isNullOrUndefined(e)?[]:JSON.parse(e)},tA.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var eA=tA;function tA(e){this.storage=e}nA.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var rA=nA;function nA(e){this.processors=e}oA.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},oA.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>oA.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-oA.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},oA.prototype.supports=function(e){return"IMPRESSION"===e.type},oA.IMPRESSION_MAX_SIZE=100;var iA=oA;function oA(e){this.impressionStorage=e}aA.prototype.process=function(e,t,r){},aA.prototype.supports=function(e){return"CLOSE"===e.type};var sA=aA;function aA(){}cA.prototype.process=function(e,t,r){var n=this.actionHandlerFactory.get(t.action);n&&n.handle(e,t.action)},cA.prototype.supports=function(e){return"ACTION"===e.type};var uA=cA;function cA(e){this.actionHandlerFactory=e}pA.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 lA=pA;function pA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}hA.prototype.matches=function(e,t,r){return!!l0.isTrackEvent(r)&&(!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r))};var fA=hA;function hA(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}vA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var dA=vA;function vA(e){this.handlers=e}mA.prototype.handle=function(e,t){e.close()},mA.prototype.supports=function(e){return"CLOSE"===e.type};var yA=mA;function mA(){}EA.prototype.handle=function(e,t){var r=$r.fromJson(t.action);r&&(r={type:"ACTION",action:r,area:t.area,text:t.text},this.eventHandler.handle(e,r))},EA.prototype.supports=function(e){return"ACTION"===e.type};var gA=EA;function EA(e){this.eventHandler=e}bA.prototype.open=function(e){window.location.href=e.href};var wA=bA;function bA(){}_A.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var TA=_A;function _A(){}AA.prototype.open=function(e){window.open(e.href)};var IA=AA;function AA(){}NA.prototype.open=function(e){window.location.replace(e)};var OA=NA;function NA(){}function RA(e,t,r){return null===e||(!CA(t,SA)||r.current!==r.referrer)&&!CA(e,t)}var SA={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},xA={current:void 0,referrer:void 0},CA=function(t,r){return Object.keys(SA).every(function(e){return t[e]===r[e]})},kA=(MA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},SA),t),n=new lo,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)},MA.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();RA(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},MA.prototype.onSessionEnded=function(e,t,r){},MA.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},MA);function MA(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}UA.prototype.get=function(){var e=this.storage.getItem(gn);return e?JSON.parse(e):null},UA.prototype.set=function(e){this.storage.setItem(gn,JSON.stringify(e))};var PA=UA;function UA(e){this.storage=e}LA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},LA.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},LA.getQueryParams=function(e){return"undefined"==typeof window?{}:new LA(window.location.search).getQueryParams(e)};var DA=LA;function LA(e){this.search=e}VA.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},VA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,VA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var FA=VA;function VA(){}zA.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},zA.prototype.params=function(e){return(a.isNullOrUndefined(e)?DA:new DA(e)).getQueryParams(zA.CAMPAIGN_QUERY_CONDITION)},zA.prototype.resolve=function(e){return{utm_campaign:e[HA],utm_content:e[BA],utm_id:e[GA],utm_medium:e[KA],utm_source:e[JA],utm_term:e[YA],gclid:e[qA],fbclid:e[$A]}},zA.prototype.parseDomain=function(){if("undefined"==typeof window)return xA;return{current:FA.extractDomain(window.document.location.hostname),referrer:function(){var e=window.document.referrer;if(e)return e=new URL(e).hostname,FA.extractDomain(e)}()}},zA.CAMPAIGN_QUERY_CONDITION=function(e,t){return ci.isNotEmptyString(t)};var jA=zA;function zA(){}var HA="utm_campaign",BA="utm_content",GA="utm_id",KA="utm_medium",JA="utm_source",YA="utm_term",qA="gclid",$A="fbclid",XA=(WA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},WA.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))}},WA);function WA(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||!l0.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==h.TRAFFIC_ALLOCATED?null:e};var ZA=QA;function QA(e){this.workspaceFetcher=e}var eO={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.29.0",IAM_RENDERER_VERSION_HEADER:"0.0.3"},tO=(rO.config=function(e){return c(c({},eO),e)},rO.logging=function(e){s.initCounter(function(e){return ai.counter("log",{level:e})}),s.setLogLevel(Te.INFO),e.log_disabled?s.setLogLevel(Te.DISABLE):e.debug&&s.setLogLevel(Te.DEBUG)},rO.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}},rO.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},rO.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,3e4)},rO.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},rO);function rO(){}iO.prototype.add=function(e,t){this.synchronizations.push({type:e,synchronizer:t})},iO.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]}})})},iO.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]}})})},iO.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]}})})},iO.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 nO=iO;function iO(){this.synchronizations=[]}sO.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]}})})},sO.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]}})})},sO.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()}))},sO.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},sO.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 oO=sO;function sO(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}uO.prototype.schedule=function(e,t){e=new cO(e,t);return e.start(),e},uO.prototype.schedulePeriodically=function(e,t,r){e=new pO(e,t,r);return e.start(),e};var aO=uO;function uO(){}lO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},lO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var cO=lO;function lO(e,t){this.delayMillis=e,this.task=t,this.timeout=null}fO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},fO.prototype.run=function(){var e=this;this.task(),this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},fO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var pO=fO;function fO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}dO.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)]}})})},dO.prototype.createRequest=function(e){var t=pi.builder().url(this.url).method("GET");return null!==e&&t.addHeader(mi.IF_MODIFIED_SINCE,e),t.build()},dO.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=Sn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Oi.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),Oi.record("get.workspace",t,null),r;case 4:return[2]}})})},dO.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(mi.LAST_MODIFIED)}};var hO=dO;function dO(e,t){this.url=e,this.transport=t}yO.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)]}})})},yO.prototype.createRequest=function(e){e={identifiers:yt(e)},e=Ee.encodeURL(JSON.stringify(e));return pi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},yO.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=Sn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Oi.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),Oi.record("get.cohorts",t,null),r;case 4:return[2]}})})},yO.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 U_.fromDto(e)};var vO=yO;function yO(e,t){this.url=e,this.transport=t}gO.prototype.getExperiments=function(){return Array.from(this.experiments.values())},gO.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},gO.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},gO.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},gO.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},gO.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},gO.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},gO.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},gO.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},gO.prototype.getContainerOrNull=function(e){return this.containers.get(e)},gO.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},gO.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},gO.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},gO.prototype.getAttributes=function(){return this.attributes},gO.from=function(e){return new gO(p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}),p.mapNotNullOrUndefined(e.experiments,function(e){return ot.fromJson("AB_TEST",e)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),p.mapNotNullOrUndefined(e.featureFlags,function(e){return ot.fromJson("FEATURE_FLAG",e)}),e.buckets.map(ut.fromJson),e.events.map(ft.fromJson),p.mapNotNullOrUndefined(e.segments,kt.fromJson),e.containers.map(Pt.fromJson),e.parameterConfigurations.map(rt.fromJson),p.mapNotNullOrUndefined(e.remoteConfigParameters,Ft.fromJson),p.mapNotNullOrUndefined(e.inAppMessages,fr.fromJson),e.workspace.attributes)};var mO=gO;function gO(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}wO.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},wO.prototype.setWorkspace=function(e){try{this.workspace=mO.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},wO.prototype.get=function(){return this.workspace},wO.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]}})})},wO.prototype.close=function(){return u(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var EO=wO;function wO(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}TO.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},TO.prototype.dispatchEventsSynchronously=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.synchronousTransport.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]}})})},TO.prototype.dispatchEvents=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 bO=TO;function TO(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}IO.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},IO.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof l0?l0.isExposureEvent(e)?t.push(e.toDto()):l0.isTrackEvent(e)?r.push(e.toDto()):l0.isRemoteConfigEvent(e)&&n.push(e.toDto()):l0.isExposureEventDto(e)?t.push(e):l0.isTrackEventDto(e)?r.push(e):l0.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return pi.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},IO.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=Sn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Oi.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),Oi.record("post.events",t,null),r;case 4:return[2]}})})};var _O=IO;function IO(e,t){this.url=e,this.transport=t}OO.prototype.add=function(e){return this.repository.add(e)},OO.prototype.delete=function(e){return this.repository.delete(e)},OO.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]}})})},OO.prototype.onVisibilityChanged=function(e,t){switch(e){case"visible":return void this.flush().catch(function(e){return s.log.warn("Failed to flush retry events: ".concat(e))});case"hidden":return}};var AO=OO;function OO(e,t){this.repository=e,this.transport=t}function NO(){this.listeners={}}NO.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},NO.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},NO.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ne(SO,RO=NO);var RO,i=SO;function SO(){return null!==RO&&RO.apply(this,arguments)||this}Ne(kO,xO=i),kO.prototype.process=function(e){this.isEnqueueTarget(e)&&this.enqueue(e),this.emit("event",e)},kO.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},kO.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},kO.prototype.isPageViewEvent=function(e){return l0.isTrackEvent(e)&&"$page_view"===e.event.key},kO.prototype.isEnqueueTarget=function(e){return!(this.isPageViewEvent(e)&&!this.autoTrackPageView)},kO.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=[])},kO.prototype.close=function(){this.flush(!0)};var xO,CO=kO;function kO(e,t,r,n,i){var o=xO.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}PO.prototype.send=function(e){e=e.toBuilder().addHeader(rn,this.sdk.key).addHeader(nn,this.sdk.name).addHeader(on,this.sdk.version).addHeader(sn,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var MO=PO;function PO(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}DO.intercept=function(e,t){return t instanceof MO?t:new MO(e,Le.instance,t)};var UO=DO;function DO(){}FO.create=function(){return new FO},FO.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 vi(n.status,n.responseText,function(e){var t=mi.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 LO=FO;function FO(){}jO.create=function(){return new jO},jO.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(vi.ok())})},jO.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(rn),r=(r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(nn,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(on,"unknown")),e.headers.get(sn));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var VO=jO;function jO(){}HO.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var zO=HO;function HO(e){this.invocationResponseResolver=e}KO.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 BO,GO=KO;function KO(e){this.invocationResponseResolver=e}(Ps=BO=BO||{}).prompt="prompt",Ps.function="function";YO.prototype.getInvocator=function(e,t){return e===BO.prompt?new zO(t):e===BO.function?new GO(t):null};var JO=YO;function YO(){}$O.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},$O.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var qO=$O;function $O(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 XO=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.event=n},WO=(ZO.prototype.determineOrNull=function(e){if(!l0.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 XO(t,o,i,e)}return null},ZO);function ZO(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}eN.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=tN.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,H0.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,H0.create(),t.includeTargets))};var QO=eN;function eN(e){this.targetMatcher=e}rN.of=function(e,t){return new rN(new j0("SPLIT_URL",t.insertId),t.user,e)};var tN=rN;function rN(e,t,r){this.key=e,this.user=t,this.workspace=r}iN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var nN=iN;function iN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}sN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(sN.SPLIT_URL_CONFIG_KEY,"")),r=Zr.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},sN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},sN.prototype.resolveManualRedirectUrl=function(e,t){e=lb.tryParse(e);return e?this.decorateCampaign(e,t):null},sN.prototype.decorateCampaign=function(e,t){t=t.event.user.hackleProperties.queryParameter;if(ci.isNotEmptyString(t)){for(var t=this.campaignParser.parse(t),r=e,n=0,i=Object.entries(t);n<i.length;n++){var o=i[n],s=o[0],o=o[1];ci.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},sN.SPLIT_URL_CONFIG_KEY="redirectUrl";var oN=sN;function sN(e){this.campaignParser=e}uN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return a.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},uN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},uN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var aN=uN;function uN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}lN.prototype.setNeedDispatch=function(e){this.needDispatch=e},lN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(lN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},lN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var cN=lN;function lN(){this.needDispatch=!0}fN.prototype.get=function(){var e=this.storage.getItem(An);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}},fN.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(An,JSON.stringify(e))},fN.prototype.clear=function(){this.storage.removeItem(An)};var pN=fN;function fN(e,t){this.sdk=e,this.storage=t}dN.prototype.addListener=function(e){this.listeners.push(e)},dN.prototype.changeVisibility=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onVisibilityChanged(t,r)})};var hN=dN;function dN(e){void 0===e&&(e=Le.instance),this.clock=e,this.listeners=[]}yN.create=function(e,t,r){return void 0===r&&(r=Le.instance),new yN(new mN(r,e,t))},yN.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var vN=yN;function yN(e){this.limiter=e}gN.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},gN.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new EN(e+this.intervalMillis,this.limit)),this.currentScope};var mN=gN;function gN(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}wN.prototype.isExpired=function(e){return this.expirationTime<e},wN.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var EN=wN;function wN(e,t){this.expirationTime=e,this.token=t}var bN=s.log,TN=null;function _N(e,t){t=tO.config(t);tO.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=(o=new JO).getInvocator(i,new _o))?(Po.error("Failed to get invocator with invocationType:".concat(i)),null):new Uo(new ko(o));if(r)return r}}catch(e){bN.error("Unexpected exception while check WebApp client: ".concat(e))}var n=tO.sdk(e,t);if(TN)return bN.debug("use already exists hackleClient"),TN;var i=new No,o=(i.initialize(),new W_),r=Ao.getInstance({days:ln,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=tO.isBeaconSupported(),a=UO.intercept(n,LO.create()),u=UO.intercept(n,VO.create()),c=a,l=(s&&(c=u),new nO),p=new oO(l,new aO,tO.pollingIntervalMillis(t)),f=new pN(n,Q_.postfix(o,"_".concat(e.slice(0,8)))),h=new hO(oI.clientFetch(t.sdkUrl,n.key),a),f=new EO(f,h),h=(l.add("workspace",f),new vO(oI.userCohorts(t.sdkUrl),a)),d=new jA,v=new G_(Q_.postfix(r,"_".concat(e))),y=v.getUser(),m=t.user||null,g=new H_(So(),v,h,d,Le.instance,y,m),v=(l.add("cohort",g),new $_(t.sessionTimeoutMillis,Q_.postfix(r,"_".concat(e.slice(8))))),h=(g.addListener(v),new k_(o,"".concat(hn,"_").concat(e),an)),m=new _O(oI.clientDispatch(t.eventUrl),a),l=m,s=(s&&(l=new _O(oI.beaconDispatch(t.eventUrl,n.key),u)),new AO(h,m)),u=new bO(m,l,s),h=new A0(tO.dedupIntervalMillis(t)),m=new CO(u,an,new aO,cn,t.auto_track_page_view),l=new _0(m,h,v,g),E=new cN,u=new Z0(new tI(r,"".concat(En,"_").concat(e.slice(0,8)))),h=new Z0(new tI(r,"".concat(wn,"_").concat(e.slice(0,8)))),w=new aI(Q_.prefix(o,"".concat(bn,"_").concat(e.slice(0,8),"_"))),b=new eA(Q_.prefix(o,"".concat(Tn,"_").concat(e.slice(0,8),"_"))),T=T_.create(f,l,[u,h],w),e=new kA(new PA(Q_.postfix(r,"_".concat(e.slice(0,8)))),d,T,g),_=new b0(g,T),_=(v.addListener(e),v.addListener(_),new NI(T)),w=new cI([new pI,new hI(new wA),new vI(new wA),new mI(w,Le.instance),new EI(new TA),new bI(new TA),new _I(new IA),new AI(new IA)]),w=new rA([new iA(b),new uA(w),new sA]),_=new lA(Le.instance,_,w),w=new dA([new yA,new gA(_)]),I=new jI(oI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),I=new SI(FI.create(I),_,w),_=new fA(new HI(l_.get("targetMatcher")),new JI(b)),w=new PI(f,_,T),b=(new CI(m,w,I),new ZA(f)),_=(new XA(m,b),new QO(l_.get("targetMatcher"))),w=new aN(r,_n,{days:In}),I=new WO(f,_,w,T),b=new nN(new oN(d),new OA,w,E),r=(new qO(m,I,b,T),new nI(T,g,u,h)),d=(null==(f=t.devTool)?void 0:f.userExplorer)&&"function"==typeof(null==(_=t.devTool)?void 0:_.userExplorer),w=t.devTool&&d?{manager:t.devTool,userExplorer:r}:void 0,m=new Ti(oI.monitoring(t.monitoringUrl),a,c,new aO,un),I=(ai.addRegistry(m),p.start(),vN.create(On,1)),A=new go(T,p,v,g,I,w),O=(TN=A,new hN);O.addListener(l),O.addListener(s),O.addListener(v),O.addListener(m),O.addListener(i),window.addEventListener("pageshow",function(){return O.changeVisibility("visible")}),window.addEventListener("pagehide",function(){return O.changeVisibility("hidden")}),document.addEventListener("visibilitychange",function(){return O.changeVisibility(document.visibilityState)});return t.autoOpenDevTool&&(t.devTool?A.showUserExplorer():bN.error("DevTool is not provided")),b=Date.now(),u=g.currentUser,h=v.currentSessionId,(P_(y,u)?v.startNewSessionIfNeeded(u,b):v.startNewSession(y,u,b))===h&&e.startNewCampaignIfNeeded(u,b),O.changeVisibility("visible"),A.onReady(function(){(new O_).install(T,g);var e=A;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)bN.error(e);else try{bN.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)bN.error(e);else try{bN.error(e)}catch(e){}}}}(history.replaceState),window.addEventListener("popstate",function(){try{window.dispatchEvent(r("locationchange"))}catch(e){if(e instanceof Error)bN.error(e);else try{bN.error(e)}catch(e){}}}),window.addEventListener("locationchange",function(){try{e.trackPageView()}catch(e){if(e instanceof Error)bN.error(e);else try{bN.error(e)}catch(e){}}})}catch(e){if(e instanceof Error)bN.error(e);else try{bN.error(e)}catch(e){}}A.trackPageView(),E.dispatchDoneEventIfNeeded()}),A}var IN=function(e,t){return(IN=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 AN=function(){return(AN=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 ON(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}NN.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},NN.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},NN.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Xl=NN;function NN(){this.listeners={}}SN.arePropertiesEqual=function(e,t){var r=SN.coerceUnknownToProperties(e),n=SN.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]})},SN.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var RN=SN;function SN(){}CN.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)&&RN.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&RN.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var xN=CN;function CN(){}var kN=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=_N(e,AN(AN({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.29.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),r.fetch=r.fetch.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return IN(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(AN(AN({},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){xN.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.prototype.fetch=function(){return this.client.fetch()},i}(Xl);var U={exports:{}},_={},MN=Object.getOwnPropertySymbols,PN=Object.prototype.hasOwnProperty,UN=Object.prototype.propertyIsEnumerable;var Ms=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]))PN.call(r,o)&&(n[o]=r[o]);if(MN)for(var s=MN(r),a=0;a<s.length;a++)UN.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},DN=Ms,ca="function"==typeof Symbol&&Symbol.for,LN=ca?Symbol.for("react.element"):60103,FN=ca?Symbol.for("react.portal"):60106,I=ca?Symbol.for("react.fragment"):60107,B=ca?Symbol.for("react.strict_mode"):60108,cp=ca?Symbol.for("react.profiler"):60114,VN=ca?Symbol.for("react.provider"):60109,jN=ca?Symbol.for("react.context"):60110,zN=ca?Symbol.for("react.forward_ref"):60112,g=ca?Symbol.for("react.suspense"):60113,HN=ca?Symbol.for("react.memo"):60115,BN=ca?Symbol.for("react.lazy"):60116,GN="function"==typeof Symbol&&Symbol.iterator;function KN(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 JN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},YN={};function qN(e,t,r){this.props=e,this.context=t,this.refs=YN,this.updater=r||JN}function $N(){}function XN(e,t,r){this.props=e,this.context=t,this.refs=YN,this.updater=r||JN}qN.prototype.isReactComponent={},qN.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(KN(85));this.updater.enqueueSetState(this,e,t,"setState")},qN.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},$N.prototype=qN.prototype;var C=XN.prototype=new $N,WN=(C.constructor=XN,DN(C,qN.prototype),C.isPureReactComponent=!0,{current:null}),ZN=Object.prototype.hasOwnProperty,QN={key:!0,ref:!0,__self:!0,__source:!0};function eR(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)ZN.call(t,n)&&!QN.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:LN,type:e,key:o,ref:s,props:i,_owner:WN.current}}function tR(e){return"object"==typeof e&&null!==e&&e.$$typeof===LN}var rR=/\/+/g,nR=[];function iR(e,t,r,n){var i;return nR.length?((i=nR.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 oR(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,nR.length<10&&nR.push(e)}function sR(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 LN:case FN:o=!0}}if(o)return n(i,t,""===r?"."+aR(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+aR(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=GN&&t[GN]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+aR(a,s++),n,i);else if("object"===a)throw n=""+t,Error(KN(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function aR(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 uR(e,t){e.func.call(e.context,t,e.count++)}function cR(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?lR(e,n,r,function(e){return e}):null!=e&&(tR(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(rR,"$&/")+"/")+r,e={$$typeof:LN,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function lR(e,t,r,n,i){var o="";sR(e,cR,t=iR(t,o=null!=r?(""+r).replace(rR,"$&/")+"/":o,n,i)),oR(t)}var pR={current:null};function fR(){var e=pR.current;if(null===e)throw Error(KN(321));return e}var hR,dR,vR,Zs={ReactCurrentDispatcher:pR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:WN,IsSomeRendererActing:{current:!1},assign:DN},e=(_.Children={map:function(e,t,r){if(null==e)return e;var n=[];return lR(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;sR(e,uR,t=iR(null,null,t,r)),oR(t)},count:function(e){return sR(e,function(){return null},null)},toArray:function(e){var t=[];return lR(e,t,null,function(e){return e}),t},only:function(e){if(tR(e))return e;throw Error(KN(143))}},_.Component=qN,_.Fragment=I,_.Profiler=cp,_.PureComponent=XN,_.StrictMode=B,_.Suspense=g,_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zs,_.cloneElement=function(e,t,r){if(null==e)throw Error(KN(267,e));var n=DN({},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=WN.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)ZN.call(t,a)&&!QN.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:LN,type:e.type,key:i,ref:o,props:n,_owner:s}},_.createContext=function(e,t){return(e={$$typeof:jN,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:VN,_context:e},e.Consumer=e},_.createElement=eR,_.createFactory=function(e){var t=eR.bind(null,e);return t.type=e,t},_.createRef=function(){return{current:null}},_.forwardRef=function(e){return{$$typeof:zN,render:e}},_.isValidElement=tR,_.lazy=function(e){return{$$typeof:BN,_ctor:e,_status:-1,_result:null}},_.memo=function(e,t){return{$$typeof:HN,type:e,compare:void 0===t?null:t}},_.useCallback=function(e,t){return fR().useCallback(e,t)},_.useContext=function(e,t){return fR().useContext(e,t)},_.useDebugValue=function(){},_.useEffect=function(e,t){return fR().useEffect(e,t)},_.useImperativeHandle=function(e,t,r){return fR().useImperativeHandle(e,t,r)},_.useLayoutEffect=function(e,t){return fR().useLayoutEffect(e,t)},_.useMemo=function(e,t){return fR().useMemo(e,t)},_.useReducer=function(e,t,r){return fR().useReducer(e,t,r)},_.useRef=function(e){return fR().useRef(e)},_.useState=function(e){return fR().useState(e)},_.version="16.14.0",{}),uu=Function.call.bind(Object.prototype.hasOwnProperty),yR=function(){};function mR(e,t,r,n,i){if("production"!==production)for(var o in e)if(vR(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,hR)}catch(e){s=e}!s||s instanceof Error||yR((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 dR)&&(dR[s.message]=!0,o=i?i():"",yR("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(hR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",dR={},vR=uu,yR=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),mR.resetWarningCache=function(){"production"!==production&&(dR={})},"production"!==production){var gR=Ms,ER=mR,A="function"==typeof Symbol&&Symbol.for,wR=A?Symbol.for("react.element"):60103,bR=A?Symbol.for("react.portal"):60106,TR=A?Symbol.for("react.fragment"):60107,_R=A?Symbol.for("react.strict_mode"):60108,IR=A?Symbol.for("react.profiler"):60114,AR=A?Symbol.for("react.provider"):60109,OR=A?Symbol.for("react.context"):60110,NR=A?Symbol.for("react.concurrent_mode"):60111,RR=A?Symbol.for("react.forward_ref"):60112,SR=A?Symbol.for("react.suspense"):60113,xR=A?Symbol.for("react.suspense_list"):60120,CR=A?Symbol.for("react.memo"):60115,kR=A?Symbol.for("react.lazy"):60116,MR=A?Symbol.for("react.block"):60121,PR=A?Symbol.for("react.fundamental"):60117,UR=A?Symbol.for("react.responder"):60118,DR=A?Symbol.for("react.scope"):60119,LR="function"==typeof Symbol&&Symbol.iterator,FR="@@iterator";function VR(e){if(null===e||"object"!=typeof e)return null;e=LR&&e[LR]||e[FR];return"function"==typeof e?e:null}var jR={current:null},zR={current:null},HR=/^(.*)[\\\/]/,BR=1;function GR(e){if(null==e)return null;if("number"==typeof e.tag&&XR("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 TR:return"Fragment";case bR:return"Portal";case IR:return"Profiler";case _R:return"StrictMode";case SR:return"Suspense";case xR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case OR:return"Context.Consumer";case AR:return"Context.Provider";case RR:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case CR:return GR(e.type);case MR:return GR(e.render);case kR:r=(t=e)._status===BR?t._result:null;if(r)return GR(r)}var t,r;return null}var KR={},JR=null;function YR(e){JR=e}KR.getCurrentStack=null,KR.getStackAddendum=function(){var e,t,r,n,i,o="",s=(JR&&(e=GR(JR.type),r=JR._owner,o+=(e=e,t=JR._source,r=r&&GR(r.type),i="",t?(n=(s=t.fileName).replace(HR,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(HR))&&(s=s[1])?s.replace(HR,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),KR.getCurrentStack);return s&&(o+=s()||""),o};var qR={ReactCurrentDispatcher:jR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:zR,IsSomeRendererActing:{current:!1},assign:gR};function $R(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];WR("warn",e,r)}function XR(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];WR("error",e,r)}function WR(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=qR.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){}}gR(qR,{ReactDebugCurrentFrame:KR,ReactComponentTreeHook:{}});var ZR={};function QR(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;ZR[r]||(XR("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),ZR[r]=!0)}var eS={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){QR(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){QR(e,"replaceState")},enqueueSetState:function(e,t,r,n){QR(e,"setState")}},tS={};function rS(e,t,r){this.props=e,this.context=t,this.refs=tS,this.updater=r||eS}Object.freeze(tS),rS.prototype.isReactComponent={},rS.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")},rS.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var nS,iS={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(nS in iS)iS.hasOwnProperty(nS)&&!function(e,t){Object.defineProperty(rS.prototype,e,{get:function(){$R("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(nS,iS[nS]);function oS(){}function sS(e,t,r){this.props=e,this.context=t,this.refs=tS,this.updater=r||eS}oS.prototype=rS.prototype,(A=sS.prototype=new oS).constructor=sS,gR(A,rS.prototype),A.isPureReactComponent=!0;var aS,uS,cS=Object.prototype.hasOwnProperty,lS={key:!0,ref:!0,__self:!0,__source:!0};function pS(e){if(cS.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function fS(e){if(cS.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var hS={},dS=function(e,t,r,n,i,o,s){e={$$typeof:wR,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 vS(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in pS(t)&&(s=t.ref,"string"==typeof(c=t).ref&&zR.current&&c.__self&&zR.current.stateNode!==c.__self&&(p=GR(zR.current.type),hS[p]||(XR('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',GR(zR.current.type),c.ref),hS[p]=!0))),fS(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)cS.call(t,n)&&!lS.hasOwnProperty(n)&&(i[n]=t[n]);var c,l,p,f,h=arguments.length-2;if(1==h)i.children=r;else if(1<h){for(var d=Array(h),v=0;v<h;v++)d[v]=arguments[v+2];Object.freeze&&Object.freeze(d),i.children=d}if(e&&e.defaultProps){var y=e.defaultProps;for(n in y)void 0===i[n]&&(i[n]=y[n])}function m(){uS||(uS=!0,XR("%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(){aS||(aS=!0,XR("%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}))),dS(e,o,s,a,u,zR.current,i)}function yS(e){return"object"==typeof e&&null!==e&&e.$$typeof===wR}var mS=".",gS=":",ES=!1,wS=/\/+/g;function bS(e){return(""+e).replace(wS,"$&/")}var TS=10,_S=[];function IS(e,t,r,n){var i;return _S.length?((i=_S.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 AS(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,_S.length<TS&&_S.push(e)}function OS(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 wR:case bR:a=!0}}if(a)return n(i,t,""===r?mS+NS(t,0):r),1;var u=0,c=""===r?mS:r+gS;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+NS(o,l),n,i);else if("function"==typeof(r=VR(t))){r===t.entries&&(ES||$R("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."),ES=!0);for(var p,f=r.call(t),h=0;!(p=f.next()).done;)u+=e(o=p.value,c+NS(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+KR.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 NS(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 RS(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function SS(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)?xS(o,n,r,function(e){return e}):null!=o&&(yS(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":bS(o.key)+"/")+r,o=dS(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function xS(e,t,r,n,i){var o="",t=IS(t,o=null!=r?bS(r)+"/":o,n,i);OS(e,SS,t),AS(t)}function CS(e){return"string"==typeof e||"function"==typeof e||e===TR||e===NR||e===IR||e===_R||e===SR||e===xR||"object"==typeof e&&null!==e&&(e.$$typeof===kR||e.$$typeof===CR||e.$$typeof===AR||e.$$typeof===OR||e.$$typeof===RR||e.$$typeof===PR||e.$$typeof===UR||e.$$typeof===DR||e.$$typeof===MR)}function kS(){var e=jR.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 MS(){if(zR.current){var e=GR(zR.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var PS=!1,US={};function DS(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=MS())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),US[t=r]||(US[t]=!0,r="",e&&e._owner&&e._owner!==zR.current&&(r=" It was passed a child from "+GR(e._owner.type)+"."),YR(e),XR('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),YR(null)))}function LS(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];yS(n)&&DS(n,t)}else if(yS(e))e._store&&(e._store.validated=!0);else if(e){var i=VR(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)yS(o.value)&&DS(o.value,t)}}function FS(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=GR(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==RR&&t.$$typeof!==CR)return;r=t.propTypes}r?(YR(e),ER(r,e.props,"prop",n,KR.getStackAddendum),YR(null)):void 0===t.PropTypes||PS||(PS=!0,XR("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||XR("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function VS(e,t,r){var n,i=CS(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+".":"")||MS(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===wR?(s="<"+(GR(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,XR("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)),vS.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)LS(arguments[o],e);if(e===TR){var s=t;YR(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){XR("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&XR("Invalid attribute `ref` supplied to `React.Fragment`."),YR(null)}else FS(t);return t}var jS=!1;try{var zS=Object.freeze({}),HS=new Map([[zS,null]]),BS=new Set([zS]);HS.set(0,0),BS.add(0)}catch(e){}function GS(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=gR({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,l=e._owner;if(null!=t)for(n in pS(t)&&(a=t.ref,l=zR.current),fS(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)cS.call(t,n)&&!lS.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),h=0;h<p;h++)f[h]=arguments[h+2];o.children=f}return dS(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)LS(arguments[i],n.type);return FS(n),n}function KS(e){var t=VS.bind(null,e);return t.type=e,jS||(jS=!0,$R("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 $R("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}A=VS,e.Children={map:function(e,t,r){if(null==e)return e;var n=[];return xS(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=IS(null,null,t,r),OS(e,RS,t),AS(t)},count:function(e){return OS(e,function(){return null},null)},toArray:function(e){var t=[];return xS(e,t,null,function(e){return e}),t},only:function(e){if(yS(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},e.Component=rS,e.Fragment=TR,e.Profiler=IR,e.PureComponent=sS,e.StrictMode=_R,e.Suspense=SR,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qR,e.cloneElement=GS,e.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&XR("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:OR,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:AR,_context:r}),i=!1,t={$$typeof:OR,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,XR("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,XR("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=KS,e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){return null!=e&&e.$$typeof===CR?XR("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?XR("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&XR("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||XR("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:RR,render:e}},e.isValidElement=yS,e.lazy=function(e){var t,r,n={$$typeof:kR,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){XR("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){XR("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 CS(e)||XR("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:CR,type:e,compare:void 0===t?null:t}},e.useCallback=function(e,t){return kS().useCallback(e,t)},e.useContext=function(e,t){var r,n=kS();return void 0!==t&&XR("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?XR("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&&XR("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 kS().useDebugValue(e,t)},e.useEffect=function(e,t){return kS().useEffect(e,t)},e.useImperativeHandle=function(e,t,r){return kS().useImperativeHandle(e,t,r)},e.useLayoutEffect=function(e,t){return kS().useLayoutEffect(e,t)},e.useMemo=function(e,t){return kS().useMemo(e,t)},e.useReducer=function(e,t,r){return kS().useReducer(e,t,r)},e.useRef=function(e){return kS().useRef(e)},e.useState=function(e){return kS().useState(e)},e.version="16.14.0"}"production"===production?U.exports=_:U.exports=e;var JS=U.exports,YS=U.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),Qs=YS.Consumer,qS=YS.Provider;var $S=s.log;function XS(e,t){e=WS(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function WS(e,t){void 0===t&&(t="A");var r=U.exports.useContext(YS),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,h.EXCEPTION):Xe.of(t,h.SDK_NOT_READY)},[t,e,n,o]),r=ON(U.exports.useState(function(){return n?s():($S.error("HackleClient is not existed"),Xe.of(t,h.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=ON(U.exports.useState(i),2),c=u[0],u=u[1];return ex(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function ZS(e){e=QS(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function QS(e){var t=U.exports.useContext(YS),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(h.EXCEPTION):Ze.off(h.SDK_NOT_READY)},[e,r,i]),t=ON(U.exports.useState(function(){return r?o():($S.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=ON(U.exports.useState(n),2),u=a[0],a=a[1];return ex(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function ex(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function tx(e){var t,r=e.experimentKey,e=e.children,n=(r=XS(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 rx(e){return e.variation,e=e.children,U.exports.createElement(U.exports.Fragment,null,e)}function nx(e){var t=(r=ZS(e.featureKey)).isLoading,r=r.isOn;return t?null:JS.createElement(JS.Fragment,null,e.children(r))}n.Bucket=ut,n.Cohort=Wr,n.Container=Pt,n.ContainerGroup=Dt,n.CoreVersion=Jt,n.Decision=Xe,n.DecisionReason=h,n.EXPERIMENT_IMPLEMENTATION_TYPE=it,n.EmptyHackleRemoteConfig=et,n.EmptyParameterConfig=Ve,n.EventType=ft,n.Experiment=ot,n.FeatureFlagDecision=Ze,n.HackleContext=YS,n.HackleContextConsumer=Qs,n.HackleContextProvider=qS,n.HackleExperiment=tx,n.HackleFeature=nx,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=ON(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 AN(AN({},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 AN(AN({},e),{initialized:!0})})},function(){a(function(e){return AN(AN({},e),{initialized:!0})})}).catch(function(){a(function(e){return AN(AN({},e),{initialized:!0})})})},[t]),i||s.initialized?JS.createElement(qS,{value:s},e):null},n.HackleVariation=rx,n.IAM_ACTION_AREA=["BUTTON","IMAGE","X_BUTTON"],n.IAM_ACTION_TYPE=pr,n.IAM_BEHAVIOR=lr,n.IAM_DISPLAY_TYPE=ar,n.IAM_LAYOUT_TYPE=ur,n.IAM_ORIENTATION=cr,n.IAM_PLATFORM_TYPE=or,n.IAM_STATUS=ir,n.IAM_TIMEUNIT=sr,n.IdentifierType=dt,n.IdentifiersBuilder=mt,n.InAppMessage=fr,n.InAppMessageAction=$r,n.InAppMessageBackground=qr,n.InAppMessageButton=Kr,n.InAppMessageButtonStyle=Yr,n.InAppMessageContext=Cr,n.InAppMessageContextLayout=Dr,n.InAppMessageContextMessage=Pr,n.InAppMessageDecision=qe,n.InAppMessageDurationCap=Ar,n.InAppMessageEventFrequencyCap=br,n.InAppMessageEventTrigger=gr,n.InAppMessageEventTriggerRule=Er,n.InAppMessageExperimentContext=Mr,n.InAppMessageIdentifierCap=_r,n.InAppMessageImage=Fr,n.InAppMessagePeriodAlways=dr,n.InAppMessagePeriodCustom=yr,n.InAppMessageTargetContext=Nr,n.InAppMessageText=jr,n.InAppMessageTextAttribute=Hr,n.InAppMessageTextStyle=Gr,n.InAppMessageUserOverride=Sr,n.Logger=s,n.MATCH_OPERATORS=Zt,n.MATCH_TYPES=Xt,n.MATCH_VALUE_TYPES=Wt,n.MetaVersion=qt,n.ParameterConfiguration=rt,n.PropertyOperations=fo,n.PropertyOperationsBuilder=lo,n.RemoteConfigDecision=Je,n.RemoteConfigParameter=Ft,n.RemoteConfigParameterValue=Ht,n.RemoteConfigTargetRule=jt,n.SEGMENT_TYPES=tr,n.Segment=kt,n.Slot=lt,n.SplitUrlConfig=Zr,n.SplitUrlTargets=en,n.TARGET_ACTION_TYPES=Qt,n.TARGET_KEY_TYPES=er,n.Target=wt,n.TargetAction=Rt,n.TargetCondition=Tt,n.TargetKey=It,n.TargetMatch=Ot,n.TargetRule=xt,n.TargetingType=rr,n.Variation=at,n.Version=Gt,n.createInstance=function(e,t){return new kN(e,t)},n.getUserId=So,n.removeUserId=xo,n.resolveIdentifiers=yt,n.sanitizeUser=Et,n.setUserId=function(e){Ao.getInstance().setItem(fn,e)},n.useFeature=function(e){var t=(n=U.exports.useContext(YS)).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=ON(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&$S.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=ON(U.exports.useState(r),2))[0],n=n[1];return ex(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=U.exports.useContext(YS)).hackle,r=n.userVersion,n=n.initialized,i=U.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||Ze.off(h.EXCEPTION)},[e,t,n]),o=(s=ON(U.exports.useState(function(){return t?i():("undefined"!=typeof window&&$S.error("HackleClient is not existed"),Ze.off(h.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=ON(U.exports.useState(r),2))[0],n=n[1];return ex(a,r)||(n(r),s(i())),o},n.useLoadableFeature=ZS,n.useLoadableFeatureDetail=QS,n.useLoadableRemoteConfig=function(){var e=(o=U.exports.useContext(YS)).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=ON(U.exports.useState(function(){return e||$S.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=ON(U.exports.useState(t),2))[0],a=a[1];return ex(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=XS,n.useLoadableVariationDetail=WS,n.useRemoteConfig=function(){var e=(r=U.exports.useContext(YS)).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=ON(U.exports.useState(function(){return e||$S.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=ON(U.exports.useState(t),2))[0],r=r[1];return ex(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=U.exports.useContext(YS).hackle;return t?function(e){return null==t?void 0:t.track(e)}:($S.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=U.exports.useContext(YS)).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=ON(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&$S.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=ON(U.exports.useState(n),2))[0],c=c[1];return ex(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=U.exports.useContext(YS)).hackle,n=i.userVersion,i=i.initialized,o=U.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||Xe.of(t,h.EXCEPTION)},[t,e,r,i]),s=(a=ON(U.exports.useState(function(){return r?o():("undefined"!=typeof window&&$S.error("HackleClient is not existed"),Xe.of(t,h.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=ON(U.exports.useState(n),2))[0],i=i[1];return ex(u,n)||(i(n),a(o())),s},Object.defineProperty(n,"__esModule",{value:!0})});