@hackler/react-sdk 11.40.0 → 11.41.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.es.js +1 -1
- package/lib/index.js +1 -1
- package/lib/index.umd.js +1 -1
- package/package.json +2 -2
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 V=[],j=0;j<256;++j)V.push((j+256).toString(16).substr(1));function B(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 B(n)}var e="3.7.5",z="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),W=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,q=String.fromCharCode.bind(String),$="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),X=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Z=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var Q=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 ee=t?e=>btoa(e):r?e=>Buffer.from(e,"binary").toString("base64"):Q,te=r?e=>Buffer.from(e).toString("base64"):r=>{let n=[];for(let e=0,t=r.length;e<t;e+=4096)n.push(q.apply(null,r.subarray(e,e+4096)));return ee(n.join(""))},re=(e,t=!1)=>t?X(te(e)):te(e),ne=e=>{var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?q(192|t>>>6)+q(128|63&t):q(224|t>>>12&15)+q(128|t>>>6&63)+q(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),q(240|t>>>18&7)+q(128|t>>>12&63)+q(128|t>>>6&63)+q(128|63&t))},ie=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,oe=e=>e.replace(ie,ne),se=r?e=>Buffer.from(e,"utf8").toString("base64"):K?e=>te(K.encode(e)):e=>ee(oe(e)),ae=(e,t=!1)=>t?X(se(e)):se(e);t=e=>ae(e,!0);const ue=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ce=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return q(55296+(t>>>10))+q(56320+(1023&t));case 3:return q((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return q((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},pe=e=>e.replace(ue,ce);var i=t=>{if(t=t.replace(/\s+/g,""),!W.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let r,n="",i,o;for(let e=0;e<t.length;)r=Y[t.charAt(e++)]<<18|Y[t.charAt(e++)]<<12|(i=Y[t.charAt(e++)])<<6|(o=Y[t.charAt(e++)]),n+=64===i?q(r>>16&255):64===o?q(r>>16&255,r>>8&255):q(r>>16&255,r>>8&255,255&r);return n};const le=z?e=>atob(Z(e)):r?e=>Buffer.from(e,"base64").toString("binary"):i,fe=r?e=>$(Buffer.from(e,"base64")):e=>$(le(e).split("").map(e=>e.charCodeAt(0))),he=e=>fe(ve(e)),de=r?e=>Buffer.from(e,"base64").toString("utf8"):G?e=>G.decode(fe(e)):e=>pe(le(e)),ve=e=>Z(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ye=e=>de(ve(e));function ge(){var e=(e,t)=>Object.defineProperty(String.prototype,e,Ee(t));e("fromBase64",function(){return ye(this)}),e("toBase64",function(e){return ae(this,e)}),e("toBase64URI",function(){return ae(this,!0)}),e("toBase64URL",function(){return ae(this,!0)}),e("toUint8Array",function(){return he(this)})}function me(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Ee(t));e("toBase64",function(e){return re(this,e)}),e("toBase64URI",function(){return re(this,!0)}),e("toBase64URL",function(){return re(this,!0)})}const Ee=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const we={version:e,VERSION:"3.7.5",atob:le,atobPolyfill:i,btoa:ee,btoaPolyfill:Q,fromBase64:ye,toBase64:ae,encode:ae,encodeURI:t,encodeURL:t,utob:oe,btou:pe,decode:ye,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:re,toUint8Array:he,extendString:ge,extendUint8Array:me,extendBuiltins:()=>{ge(),me()}};be.isNotNullOrUndefined=function(e){return null!=e},be.isNullOrUndefined=function(e){return null==e},be.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},be.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var u=be;function be(){}_e.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);u.isNotNullOrUndefined(o)&&r.push(o)}return r},_e.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(u.isNullOrUndefined(o))return;r.push(o)}return r},_e.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},_e.associate=function(e,t){return this.associateTo(e,new Map,t)},_e.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},_e.associateRecord=function(e,t){for(var r={},n=0,i=e;n<i.length;n++){var o=t(i[n]),s=o[0],o=o[1];r[s]=o}return r},_e.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},_e.sum=function(e,r){return e.reduce(function(e,t){return e+r(t)},0)};var f=_e;function _e(){}var Te={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},s=(Ie.setLogLevel=function(e){this.logLevel=e=void 0===e?Te.INFO:e},Ie.initCounter=function(t){this.counters=f.associate(Object.keys(Te),function(e){return[e,t(e)]})},Ie._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)Ae.log(e,r,t.message,t);else try{Ae.log(e,r,t)}catch(e){}},Ie.increment=function(e){var t;null!=(t=null==(t=Ie.counters)?void 0:t.get(e))&&t.increment()},Ie.logLevel=Te.INFO,Ie.log={error:function(e){Te.ERROR<=Ie.logLevel&&(Ie._log("ERROR",e),Ie.increment("ERROR"))},warn:function(e){Te.WARN<=Ie.logLevel&&(Ie._log("WARN",e),Ie.increment("WARN"))},info:function(e){Te.INFO<=Ie.logLevel&&(Ie._log("INFO",e),Ie.increment("INFO"))},debug:function(e){Te.DEBUG<=Ie.logLevel&&(Ie._log("DEBUG",e),Ie.increment("DEBUG"))}},Ie);function Ie(){}Oe.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Ae=Oe;function Oe(){}var Ne=function(e,t){return(Ne=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 Se(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}Ne(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 a(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 p(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 Ce=s.log,Me=(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(u.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),u.isNullOrUndefined(i)?Ce.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Ce.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!u.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 Pe=s.log,Ue=(ke.sanitize=function(e){var t={};if(u.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){Pe.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),u.isNullOrUndefined(i)?Pe.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):Pe.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},ke.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},ke.isValidKey=function(e){return u.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},ke.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},ke.isValidValue=function(e){return!u.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))},ke.isValidElement=function(e){return!u.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},ke.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},ke.SYSTEM_PROPERTY_KEY_PREFIX="$",ke.MAX_PROPERTIES_COUNT=128,ke.MAX_PROPERTY_KEY_LENGTH=128,ke.MAX_PROPERTY_VALUE_LENGTH=1024,ke);function ke(){}var De=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],Le=(o.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(o.C1/o.C0);case"milliseconds":return e/(o.C2/o.C0);case"seconds":return e/(o.C3/o.C0);case"minutes":return e/(o.C4/o.C0);case"hours":return e/(o.C5/o.C0);case"days":return e/(o.C6/o.C0)}},o.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C1/o.C0);case"milliseconds":return e/(o.C2/o.C1);case"microseconds":return e;case"seconds":return e/(o.C3/o.C1);case"minutes":return e/(o.C4/o.C1);case"hours":return e/(o.C5/o.C1);case"days":return e/(o.C6/o.C1)}},o.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C2/o.C0);case"microseconds":return e*(o.C2/o.C1);case"milliseconds":return e;case"seconds":return e/(o.C3/o.C2);case"minutes":return e/(o.C4/o.C2);case"hours":return e/(o.C5/o.C2);case"days":return e/(o.C6/o.C2)}},o.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C3/o.C0);case"microseconds":return e*(o.C3/o.C1);case"milliseconds":return e*(o.C3/o.C2);case"seconds":return e;case"minutes":return e/(o.C4/o.C3);case"hours":return e/(o.C5/o.C3);case"days":return e/(o.C6/o.C3)}},o.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C4/o.C0);case"microseconds":return e*(o.C4/o.C1);case"milliseconds":return e*(o.C4/o.C2);case"seconds":return e*(o.C4/o.C3);case"minutes":return e;case"hours":return e/(o.C5/o.C4);case"days":return e/(o.C6/o.C4)}},o.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C5/o.C0);case"microseconds":return e*(o.C5/o.C1);case"milliseconds":return e*(o.C5/o.C2);case"seconds":return e*(o.C5/o.C3);case"minutes":return e*(o.C5/o.C4);case"hours":return e;case"days":return e/(o.C6/o.C5)}},o.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(o.C6/o.C0);case"microseconds":return e*(o.C6/o.C1);case"milliseconds":return e*(o.C6/o.C2);case"seconds":return e*(o.C6/o.C3);case"minutes":return e*(o.C6/o.C4);case"hours":return e*(o.C6/o.C5);case"days":return e}},o.C6=24*(o.C5=60*(o.C4=60*(o.C3=1e3*(o.C2=1e3*(o.C1=1e3*(o.C0=1)))))),o.converter={nanoseconds:o.nanosToUnit,microseconds:o.microsToUnit,milliseconds:o.millisToUnit,seconds:o.secondsToUnit,minutes:o.minutesToUnit,hours:o.hoursToUnit,days:o.daysToUnit},o);function o(){}Ve.prototype.tick=function(){return 1e3*Date.now()},Ve.prototype.currentMillis=function(){return Date.now()},Ve.instance=new Ve;var Fe=Ve;function Ve(){}Be.prototype.get=function(e,t){return t};var je=Be;function Be(){this.parameters={}}ze.prototype.get=function(e,t){e=this.parameters[e];return!u.isNullOrUndefined(e)&&(u.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var He=ze;function ze(e){this.parameters=e}var Ge="X-HACKLE-SDK-KEY",Ke="X-HACKLE-SDK-NAME",Je="X-HACKLE-SDK-VERSION",Ye="X-HACKLE-SDK-TIME",We=100,qe=6e4,$e=500,Xe=3650,Ze="_hackle_hid",Qe="_hackle_id",et="hackle-repository-storage",tt="_hackle_session_id",rt="_hackle_last_event_ts",nt="_hackle_uid",it="_hackle_did",ot="_hackle_mkt",st="hackle-manual-override_ab",at="hackle-manual-override_ff",ut="hackle-iam-hide",ct="hackle-iam-impression",pt="hackle-split-url-redirected",lt=1/86400*3,ft="hackle-workspace-config",ht=6e4,dt=1e3,vt=s.log;function yt(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||vt.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function gt(e,t){if(!u.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=yt(e,i[n]);if(u.isNullOrUndefined(o))return;r.push(o)}return r}}Et.of=function(e,t){return new Et(e,t)};var mt=Et;function Et(e,t){this.value=e,this.reason=t}bt.prototype.isShow=function(){return u.isNotNullOrUndefined(this.inAppMessage)&&u.isNotNullOrUndefined(this.message)},bt.of=function(e,t,r,n){return new bt(t,r,e,n=void 0===n?{}:n)};var wt=bt;function bt(e,t,r,n){this.inAppMessage=e,this.message=t,this.reason=r,this.properties=n}Tt.of=function(e,t,r,n){return new Tt(e,t,r=void 0===r?new je:r,n=void 0===n?void 0:n)},Object.defineProperty(Tt.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),Tt.prototype.get=function(e,t){return this.config.get(e,t)};var _t=Tt;function Tt(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}At.on=function(e,t,r){return new At(!0,e,t=void 0===t?new je:t,r=void 0===r?void 0:r)},At.off=function(e,t,r){return new At(!1,e,t=void 0===t?new je:t,r=void 0===r?void 0:r)},Object.defineProperty(At.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),At.prototype.get=function(e,t){return this.config.get(e,t)};var It=At;function At(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}Nt.prototype.get=function(e,t){return t};var Ot=Nt;function Nt(){}Object.defineProperty(Rt.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),Rt.fromJson=function(e){return new Rt(e.id,new He(f.associateRecord(e.parameters,function(e){return[e.key,e.value]})))},Rt.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}};var St=Rt;function Rt(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 l=h;function h(){}var Ct=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],Mt=(xt.fromJson=function(e,t,r){var n=xt.experimentStatusOrNull(t.execution.status),i=t.variations.map(function(t){return new Pt(t.id,t.key,"DROPPED"===t.status,r.find(function(e){return e.id===t.parameterConfigurationId}))}),o=f.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),s=f.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return nr.fromJson(e,Rr.IDENTIFIER)}),a=f.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return Yt.fromJson(e,Rr.PROPERTY)}),u=Fn.fromJson(t.execution.targetUrls),c=yt(Ct,t.implementationType),p=f.mapNotNullOrUndefined(t.execution.targetRules,function(e){return nr.fromJson(e,Rr.PROPERTY)}),l=tr.fromJson(t.execution.defaultRule);return n&&c&&l&&new xt(t.id,t.key,e,t.identifierType,n,t.version,t.execution.version,i,o,s,a,u,p,l,t.containerId,c,t.winnerVariationId)},xt.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void vt.debug("Unsupported status [".concat(e,"]"))}},xt.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},xt.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},xt.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},xt);function xt(e,t,r,n,i,o,s,a,u,c,p,l,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=p,this.splitUrlTargets=l,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=v,this.winnerVariationId=y}Object.defineProperty(Ut.prototype,"parameters",{get:function(){var e;return null!=(e=null==(e=this.config)?void 0:e.parameters)?e:{}},enumerable:!1,configurable:!0});var Pt=Ut;function Ut(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.config=n}Dt.fromJson=function(e){return new Dt(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)}))};var kt=Dt;function Dt(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}Ft.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var Lt=Ft;function Ft(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}jt.fromJson=function(e){return new jt(e.id,e.key)};var Vt=jt;function jt(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 Bt=Ht;function Ht(){}function zt(e){var t=new Gt;return t.addIdentifiers(e.identifiers||{}),t.add(Bt.ID,e.id),t.add(Bt.DEVICE,e.deviceId),u.isNotNullOrUndefined(e.userId)&&t.add(Bt.USER,e.userId),t.build()}Kt.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},Kt.prototype.add=function(e,t){var r=Me.sanitizeValue(t);return Me.isValidType(e)&&r?this.identifiers[e]=t:vt.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},Kt.prototype.build=function(){return this.identifiers};var Gt=Kt;function Kt(){this.identifiers={}}function Jt(e){var t,r={};return r.id=null!=(t=Me.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=Me.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=Me.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Ue.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=Me.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(f.mapNotNullOrUndefined(e.conditions,function(e){return qt.fromJson(e,t)}))},Wt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var Yt=Wt;function Wt(e){this.conditions=e}$t.fromJson=function(e,t){var r=Xt.fromJson(e.key);if(r&&t.supports(r.type))return(t=Qt.fromJson(e.match))&&new $t(r,t)},$t.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var qt=$t;function $t(e,t){this.key=e,this.match=t}Zt.fromJson=function(e){var t=yt(Nr,e.type);return t&&new Zt(t,e.name)},Zt.prototype.toJson=function(){return{type:this.type,name:this.name}};var Xt=Zt;function Zt(e,t){this.type=e,this.name=t}er.fromJson=function(e){var t=yt(Tr,e.type),r=yt(Ar,e.operator),n=yt(Ir,e.valueType);return t&&r&&n&&new er(t,r,n,e.values)},er.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var Qt=er;function er(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}rr.fromJson=function(e){var t=yt(Or,e.type);return t&&new rr(t,e.variationId,e.bucketId)};var tr=rr;function rr(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}ir.fromJson=function(e,t){t=Yt.fromJson(e.target,t),e=tr.fromJson(e.action);return t&&e&&new ir(t,e)};var nr=ir;function ir(e,t){this.target=e,this.action=t}sr.fromJson=function(e){var t=yt(Sr,e.type);return t&&new sr(e.id,e.key,t,f.mapNotNullOrUndefined(e.targets,function(e){return Yt.fromJson(e,Rr.SEGMENT)}))};var or=sr;function sr(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}ur.fromJson=function(e){return new ur(e.id,e.bucketId,e.groups.map(function(e){return cr.fromJson(e)}))},ur.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var ar=ur;function ur(e,t,r){this.id=e,this.bucketId=t,this.groups=r}pr.fromJson=function(e){return new pr(e.id,e.experiments)};var cr=pr;function pr(e,t){this.id=e,this.experiments=t}fr.fromJson=function(e){var t=yt(Ir,e.type),r=f.mapNotNullOrUndefined(e.targetRules,function(e){return hr.fromJson(e,Rr.PROPERTY)}),n=vr.fromJson(e.defaultValue);return t&&new fr(e.id,e.key,t,e.identifierType,r,n)};var lr=fr;function fr(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}dr.fromJson=function(e,t){t=Yt.fromJson(e.target,t);return t&&new dr(e.key,e.name,t,e.bucketId,vr.fromJson(e.value))};var hr=dr;function dr(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}yr.fromJson=function(e){return new yr(e.id,e.value)};var vr=yr;function yr(e,t){this.id=e,this.rawValue=t}mr.tryParse=function(e){var t,r,n,i,e=mr.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 mr(new Er(parseInt(t,10),parseInt(r,10),parseInt(n,10)),br.parse(i),br.parse(e))},mr.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},mr.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},mr.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},mr.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},mr.prototype.isLessThan=function(e){return this.compareTo(e)<0},mr.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},mr.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 gr=mr;function mr(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}wr.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var Er=wr;function wr(e,t,r){this.major=e,this.minor=t,this.patch=r}_r.parse=function(e){return e?new _r(e.split(".")):_r.EMPTY},_r.prototype.isEmpty=function(){return 0===this.identifiers.length},_r.prototype.isNotEmpty=function(){return!this.isEmpty()},_r.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},_r.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=_r.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},_r.compareIdentifiers=function(e,t){return _r.numericIdentifierRegExp.test(e)&&_r.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},_r.EMPTY=new _r([]),_r.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var br=_r;function _r(e){this.identifiers=e}var Tr=["MATCH","NOT_MATCH"],Ir=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Ar=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE"],Or=["VARIATION","BUCKET"],Nr=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"],Sr=["USER_ID","USER_PROPERTY"],Rr=(Cr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},Cr.IDENTIFIER=new Cr("SEGMENT"),Cr.PROPERTY=new Cr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Cr.SEGMENT=new Cr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Cr);function Cr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var Mr=["ACTIVE","DRAFT","PAUSE"],xr=["WEB","ANDROID","IOS"],Pr=["IMMEDIATE","CUSTOM"],Ur=["MODAL","BANNER","BOTTOM_SHEET","NONE"],kr=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE","NONE"],Dr=["VERTICAL","HORIZONTAL"],Lr=["CLICK"],Fr=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Vr=["TOP","MIDDLE","BOTTOM"],jr=["LEFT","CENTER","RIGHT"],Br=(Hr.fromJson=function(e){var t,r=yt(Mr,e.status);if(!u.isNullOrUndefined(r)){switch(yt(Pr,e.timeUnit)){case"IMMEDIATE":t=new zr;break;case"CUSTOM":if(u.isNullOrUndefined(e.startEpochTimeMillis))return;if(u.isNullOrUndefined(e.endEpochTimeMillis))return;t=new Kr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=an.fromJson(e.messageContext);if(!u.isNullOrUndefined(o))return n=e.eventTriggerRules.map(Wr.fromJson),i=$r.fromJson(e.eventFrequencyCap),new Hr(e.id,e.key,r,t,new Yr(n,i),rn.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}Gr.prototype.within=function(e){return!0};var zr=Gr;function Gr(){this.type="IMMEDIATE"}Jr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var Kr=Jr;function Jr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var Yr=function(e,t){this.rules=e,this.frequencyCap=t},Wr=(qr.fromJson=function(e){return new qr(e.eventKey,f.mapNotNullOrUndefined(e.targets,function(e){return Yt.fromJson(e,Rr.PROPERTY)}))},qr);function qr(e,t){this.eventKey=e,this.targets=t}Xr.fromJson=function(e){return e?new Xr(e.identifiers.map(Zr.fromJson),en.fromJson(e.duration)):null};var $r=Xr;function Xr(e,t){this.identifierCaps=e,this.durationCap=t}Qr.fromJson=function(e){return new Qr(e.identifierType,e.countPerIdentifier)};var Zr=Qr;function Qr(e,t){this.identifierType=e,this.count=t}tn.fromJson=function(e){if(!e)return null;var t=yt(De,e.durationUnit.timeUnit);return t?new tn(Le.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var en=tn;function tn(e,t){this.durationMillis=e,this.count=t}nn.fromJson=function(e){return new nn(e.overrides.map(on.fromJson),f.mapNotNullOrUndefined(e.targets,function(e){return Yt.fromJson(e,Rr.PROPERTY)}))};var rn=nn;function nn(e,t){this.overrides=e,this.targets=t}sn.fromJson=function(e){return new sn(e.identifierType,e.identifiers)};var on=sn;function sn(e,t){this.identifierType=e,this.identifiers=t}un.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new cn(e.exposure.key)),gt(xr,e.platformTypes));if(!u.isNullOrUndefined(r)){var n=gt(Dr,e.orientations);if(!u.isNullOrUndefined(n)){var i=f.mapOrUndefined(e.messages,pn.fromJson);if(!u.isNullOrUndefined(i))return new un(e.defaultLang,t,r,n,i)}}};var an=un;function un(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var cn=function(e){this.key=e},pn=(ln.fromJson=function(e){var t=fn.fromJson(e.layout);if(!u.isNullOrUndefined(t)){var r=f.mapOrUndefined(e.images,yn.fromJson);if(!u.isNullOrUndefined(r)){var n=void 0;if(!u.isNotNullOrUndefined(e.imageAutoScroll)||(n=mn.fromJson(e.imageAutoScroll),!u.isNullOrUndefined(n))){var i=f.mapOrUndefined(e.buttons,An.fromJson);if(!u.isNullOrUndefined(i)){var o=void 0;if(!u.isNotNullOrUndefined(e.closeButton)||(o=An.fromJson2(e.closeButton),!u.isNullOrUndefined(o))){var s=f.mapOrUndefined(e.outerButtons,Nn.fromJson),a=f.mapOrUndefined(e.innerButtons,Nn.fromJson);if(!u.isNullOrUndefined(s)&&!u.isNullOrUndefined(a))return new ln(e.variationKey,e.lang,t,r,n,e.text?wn.fromJson(e.text):void 0,i,o,new Cn(e.background.color),e.action?Mn.fromJson(e.action):void 0,s,a)}}}}}},ln.prototype.toJson=function(){var e;return{variationKey:this.variationKey,lang:this.lang,layout:{layoutType:this.layout.layoutType,alignment:null!=(e=null==(e=this.layout.alignment)?void 0:e.toJson())?e:null,displayType:this.layout.displayType},images:this.images.map(function(e){return e.toJson()}),imageAutoScroll:null!=(e=null==(e=this.imageAutoScroll)?void 0:e.toJson())?e:null,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},action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null,outerButtons:this.outerButtons.map(function(e){return e.toJson()}),innerButtons:this.innerButtons.map(function(e){return e.toJson()})}},ln);function ln(e,t,r,n,i,o,s,a,u,c,p,l){this.variationKey=e,this.lang=t,this.layout=r,this.images=n,this.imageAutoScroll=i,this.text=o,this.buttons=s,this.closeButton=a,this.background=u,this.action=c,this.outerButtons=p,this.innerButtons=l}hn.fromJson=function(e){var t=yt(kr,e.layoutType),r=yt(Ur,e.displayType);if(!u.isNullOrUndefined(r)&&!u.isNullOrUndefined(t))return new hn(r,t,e.alignment?dn.fromJson(e.alignment):void 0)};var fn=hn;function hn(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}vn.fromJson=function(e){var t=yt(jr,e.horizontal);if(!u.isNullOrUndefined(t)){e=yt(Vr,e.vertical);if(!u.isNullOrUndefined(e))return new vn(t,e)}},vn.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}};var dn=vn;function vn(e,t){this.horizontal=e,this.vertical=t}gn.fromJson=function(e){var t=yt(Dr,e.orientation);if(!u.isNullOrUndefined(t)){var r=void 0;if(!u.isNotNullOrUndefined(e.action)||(r=Mn.fromJson(e.action),!u.isNullOrUndefined(r)))return new gn(t,e.imagePath,r)}},gn.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 yn=gn;function gn(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}En.fromJson=function(e){var t=yt(De,e.interval.timeUnit);if(t)return new En(Le.converter[t](e.interval.amount,"milliseconds"))},En.prototype.toJson=function(){return{interval:{timeUnit:"milliseconds",amount:this.intervalMillis}}};var mn=En;function En(e){this.intervalMillis=e}bn.fromJson=function(e){return new bn(_n.fromJson(e.title),_n.fromJson(e.body))},bn.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 wn=bn;function bn(e,t){this.title=e,this.body=t}Tn.fromJson=function(e){return new Tn(e.text,new In(e.style.textColor))};var _n=Tn;function Tn(e,t){this.text=e,this.style=t}var In=function(e){this.color=e},An=(On.fromJson=function(e){var t=Mn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new On(e.text,new Rn(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},On.fromJson2=function(e){var t=Mn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new On("✕",new Rn(e.style.color,"#FFFFFF","#FFFFFF"),t)},On.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},On.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},On);function On(e,t,r){this.text=e,this.style=t,this.action=r}Sn.fromJson=function(e){var t=An.fromJson(e.button);if(!u.isNullOrUndefined(t)){e=dn.fromJson(e.alignment);if(!u.isNullOrUndefined(e))return new Sn(t,e)}},Sn.prototype.toJson=function(){return{button:this.button.toJson(),alignment:this.alignment.toJson()}};var Nn=Sn;function Sn(e,t){this.button=e,this.alignment=t}var Rn=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Cn=function(e){this.color=e},Mn=(xn.fromJson=function(e){var t=yt(Lr,e.behavior);if(!u.isNullOrUndefined(t)){var r=yt(Fr,e.type);if(!u.isNullOrUndefined(r))return new xn(t,r,null!=(t=e.value)?t:void 0)}},xn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},xn);function xn(e,t,r){this.behavior=e,this.type=t,this.value=r}Un.fromJson=function(e){var t=e.type,e=e.value,r=this.linkActionTypes.some(function(e){return e===t}),n=this.closeActionTypes.some(function(e){return e===t}),i=this.tabTargetActionsTypes.some(function(e){return e===t}),o=this.windowTargetActionsTypes.some(function(e){return e===t});return new Un(r?"LINK":"CLOSE",n?{hideDurationMillis:"HIDDEN"===t?864e5:null}:void 0,r?{url:null!=e?e:"",target:o?"NEW_WINDOW":i?"NEW_TAB":"CURRENT",shouldCloseAfterLink:n}:void 0)},Un.fromInteraction=function(e){return"CLOSE"===e.type?new Un(e.type,{hideDurationMillis:null}):Un.fromJson(e.action)},Un.fromAction=function(e){return Un.fromJson(e.toJson())},Un.linkActionTypes=["LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE","WEB_LINK"],Un.closeActionTypes=["CLOSE","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW_AND_CLOSE"],Un.tabTargetActionsTypes=["LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE"],Un.windowTargetActionsTypes=["LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"];var Pn=Un;function Un(e,t,r){this.type=e,this.close=t,this.link=r}var kn=function(e){this.id=e},Dn=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Ln.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new Ln(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},Ln);function Ln(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}Vn.fromJson=function(e){if(null!==e)return new Vn(f.mapNotNullOrUndefined(e.match,function(e){return Yt.fromJson(e,Rr.PROPERTY)}),f.mapNotNullOrUndefined(e.notMatch,function(e){return Yt.fromJson(e,Rr.PROPERTY)}))};var Fn=Vn;function Vn(e,t){this.includeTargets=e,this.excludeTargets=t}Bn.fromJson=function(e){return new Bn(e.eventKey,e.property,e.stats)},Bn.prototype.countWithinDays=function(t){return f.sum(this.stats.filter(function(e){return e.date>=t}),function(e){return e.count})};var jn=Bn;function Bn(e,t,r){this.eventKey=e,this.property=t,this.stats=r}zn.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},zn.prototype.tag=function(e,t){return this._tags[e]=t,this},zn.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})};var Hn=zn;function zn(e){this.name=e,this._tags={},this.name=e}Kn.start=function(e){return new Kn(e=void 0===e?Kn.defaultClock:e)},Kn.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Kn.defaultClock=new Fe;var Gn=Kn;function Kn(e){this._clock=e,this.startTime=this._clock.tick()}Yn.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},Yn.prototype.tag=function(e,t){return this._tags[e]=t,this},Yn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Jn=Yn;function Yn(e){this.name=e,this._tags={}}qn.prototype.values=function(){return Array.from(this.data.values())},qn.prototype.keys=function(){return Array.from(this.data.keys())},qn.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},qn.prototype.has=function(e){return void 0!==this.get(e)},qn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},qn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},qn.prototype.forEach=function(e){this.data.forEach(e)},qn.prototype.filter=function(e){for(var t=new qn(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},qn.prototype.entries=function(){return Array.from(this.data.entries())};var Wn=qn;function qn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(Xn.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var $n=Xn;function Xn(e,t){this.valueSupplier=t,this.field=e}function Zn(e,t){return e.name===t.name&&Me.isEquals(e.tags,t.tags)}Object.defineProperty(Qn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Qn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Qn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Qn.prototype.counter=function(e,t){return void 0===t&&(t={}),new Jn(e).tags(t).register(this)},Qn.prototype.timer=function(e,t){return void 0===t&&(t={}),new Hn(e).tags(t).register(this)},Qn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Qn.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},Qn.prototype.close=function(){};z=Qn;function Qn(){this.id=H(),this.name="MetricRegistry",this._metrics=new Wn(Zn)}Se(ti,ei=z),ti.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.")))},ti.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},ti.prototype.close=function(){this.stop()};var ei,r=ti;function ti(e,t){var r=ei.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}ni.prototype.count=function(){return this.counterValue},ni.prototype.increment=function(e){this.counterValue+=null!=e?e:1},ni.prototype.measure=function(){return[new $n("count",this.count.bind(this))]};var ri=ni;function ni(e){this.counterValue=0,this.id=e}oi.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new ri(this.id),e},oi.prototype.count=function(){return this.currentCounter.count()},oi.prototype.increment=function(e){this.currentCounter.increment(e)},oi.prototype.measure=function(){return[new $n("count",this.count.bind(this))]};var ii=oi;function oi(e){this.id=e,this.currentCounter=new ri(e)}ai.prototype.count=function(){return this._count},ai.prototype.totalTime=function(e){return Le.nanosToUnit(this._total,e)},ai.prototype.max=function(e){return Le.nanosToUnit(this._max,e)},ai.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},ai.prototype.record=function(e,t){e<0||(t=Le.converter[t](e,"nanoseconds"),this._count=this.count()+1,this._total+=t,this._max=Math.max(t,this._max))},ai.prototype.measure=function(){var e=this;return[new $n("count",this.count.bind(this)),new $n("total",function(){return e.totalTime("milliseconds")}),new $n("max",function(){return e.max("milliseconds")}),new $n("mean",function(){return e.mean("milliseconds")})]};var si=ai;function ai(e){this._count=0,this._total=0,this._max=0,this.id=e}ci.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new si(this.id),e},ci.prototype.count=function(){return this.currentTimer.count()},ci.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},ci.prototype.max=function(e){return this.currentTimer.max(e)},ci.prototype.record=function(e,t){this.currentTimer.record(e,t)},ci.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},ci.prototype.measure=function(){var e=this;return[new $n("count",this.count.bind(this)),new $n("total",function(){return e.totalTime("milliseconds")}),new $n("max",function(){return e.max("milliseconds")}),new $n("mean",function(){return e.mean("milliseconds")})]};var ui=ci;function ci(e){this.id=e,this.currentTimer=new si(e)}Se(li,pi=r),li.prototype.createCounter=function(e){return new ii(e)},li.prototype.createTimer=function(e){return new ui(e)},li.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 pi,e=li;function li(e,t){return pi.call(this,e,t)||this}hi.prototype.count=function(){return 0},hi.prototype.increment=function(e){},hi.prototype.measure=function(){return[new $n("count",this.count.bind(this))]};var fi=hi;function hi(e){this.id=e}Object.defineProperty(vi.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),vi.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},vi.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},vi.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},vi.prototype.measure=function(){return[new $n("count",this.count.bind(this))]};var di=vi;function vi(e){this._counters=new Wn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new fi(e)}gi.prototype.measure=function(){var e=this;return[new $n("count",this.count.bind(this)),new $n("total",function(){return e.totalTime("milliseconds")}),new $n("max",function(){return e.max("milliseconds")}),new $n("mean",function(){return e.mean("milliseconds")})]},gi.prototype.count=function(){return 0},gi.prototype.totalTime=function(e){return 0},gi.prototype.max=function(e){return 0},gi.prototype.mean=function(e){return 0},gi.prototype.record=function(e,t){};var yi=gi;function gi(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 $n("count",this.count.bind(this)),new $n("total",function(){return e.totalTime("milliseconds")}),new $n("max",function(){return e.max("milliseconds")}),new $n("mean",function(){return e.mean("milliseconds")})]};var mi=Ei;function Ei(e){this._timers=new Wn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new yi(e)}Se(bi,wi=z),bi.prototype.createCounter=function(e){e=new di(e);return this.addRegistry(e),e},bi.prototype.createTimer=function(e){e=new mi(e);return this.addRegistry(e),e},bi.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},bi.prototype.add=function(r){r instanceof bi||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)}))},bi.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var wi,i=bi;function bi(){var e=null!==wi&&wi.apply(this,arguments)||this;return e.registries=new Wn(function(e,t){return e.id===t.id}),e}Ti.counter=function(e,t){return Ti.globalRegistry.counter(e,t)},Ti.timer=function(e,t){return Ti.globalRegistry.timer(e,t)},Ti.addRegistry=function(e){Ti.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},Ti.globalRegistry=new i;var _i=Ti;function Ti(){}Ai.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},Ai.isNotEmptyString=function(e){return!u.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var Ii=Ai;function Ai(){}Ni.builder=function(){return new Si},Ni.get=function(e){return Ni.builder().url(e).build()},Ni.prototype.toBuilder=function(){return new Si(this)};var Oi=Ni;function Ni(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}Ri.prototype.url=function(e){return this._url=e,this},Ri.prototype.method=function(e){return this._method=e,this},Ri.prototype.body=function(e){return this._body=e,this},Ri.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},Ri.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},Ri.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new Oi(this._url,this._method,this._body,this._headers.build(),e)};var Si=Ri;function Ri(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:xi.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}Mi.ok=function(e,t){return Mi.of(200,e,t)},Mi.of=function(e,t,r){return new Mi(e,null!=t?t:null,null!=r?r:xi.empty())},Mi.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},Mi.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},Mi.prototype.isNotModified=function(){return 304===this.statusCode};var Ci=Mi;function Mi(e,t,r){this.statusCode=e,this.body=t,this.headers=r}Pi.empty=function(){return new Pi(new Map)},Pi.builder=function(){return new Ui(new Map)},Pi.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(Ii.equalsIgnoreCase(i,e))return n}return null},Pi.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Pi.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},{})},Pi.prototype.toBuilder=function(){return new Ui(this.headers)},Pi.IF_MODIFIED_SINCE="If-Modified-Since",Pi.LAST_MODIFIED="Last-Modified";var xi=Pi;function Pi(e){this.headers=e}ki.prototype.add=function(e,t){return this.headers.set(e,t),this},ki.prototype.build=function(){return new xi(this.headers)};var Ui=ki;function ki(e){this.headers=e}Se(Fi,Di=e),Fi.prototype.flushMetrics=function(e,t){var r=this;f.chunked(e.filter(this.isDispatchTarget.bind(this)),We).forEach(function(e){r.dispatch(e,t)})},Fi.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Fi.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))})},Fi.prototype.createRequest=function(e){return Oi.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Fi.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Fi.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:u.fromMap(f.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Fi.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.publish(!0);case"visible":case"pageshow":case"blur":case"locationChange":case"focus":return}};var Di,Li=Fi;function Fi(e,t,r,n,i){n=Di.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}ji.experiment=function(e,t,r){t=_i.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},ji.featureFlag=function(e,t,r){t=_i.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},ji.remoteConfig=function(e,t,r){t=_i.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},ji.inAppMessage=function(e,t,r){t=_i.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)};var Vi=ji;function ji(){}Hi.record=function(e,t,r){e=_i.timer("api.call",{operation:e,success:Hi.success(r)});t.stop(e)},Hi.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var Bi=Hi;function Hi(){}Gi.decide=function(e,t,r,n){if(u.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)}},Gi.decision=function(e,t,r,n,i){return u.isNullOrUndefined(t)?mt.of(n,l.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var zi=Gi;function Gi(){}var Ki=s.log,Ji=(Yi.prototype.get=function(t,r){var n,e=Gn.start();try{n=this.decide(t,r)}catch(e){Ki.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=mt.of(r,l.EXCEPTION)}return Vi.remoteConfig(e,t,n),n.value},Yi.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return zi.decide(this.core,e,t,r)},Yi);function Yi(e,t,r){this.core=e,this.userManager=t,this.user=r}$i.prototype.contains=function(e){return this._properties.has(e)},$i.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},$i.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)},$i.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=Ue.sanitizeValue(e,t);return u.isNullOrUndefined(r)||this._properties.set(e,r),this},$i.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},$i.prototype.build=function(){return this._properties};var Wi,qi=$i;function $i(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(Q=Wi=Wi||{}).SET="$set",Q.SET_ONCE="$setOnce",Q.UNSET="$unset",Q.INCREMENT="$increment",Q.APPEND="$append",Q.APPEND_ONCE="$appendOnce",Q.PREPEND="$prepend",Q.PREPEND_ONCE="$prependOnce",Q.REMOVE="$remove",Q.CLEAR_ALL="$clearAll";Zi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new qi).addProperties(e).addProperties(t).build()};var Xi=Zi;function Zi(){}eo.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new qi).addProperties(e).addProperties(t,!0).build()};var Qi=eo;function eo(){}ro.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new qi).addProperties(e).remove(t).build()};var to=ro;function ro(){}io.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new qi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},io.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var no=io;function io(){}oo.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new qi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},oo.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},oo.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},oo.prototype.contains=function(e,t){return e.includes(t)},oo.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Re([e],t,!0)},oo.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=oo;function oo(){}Se(uo,so=t),uo.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var so,ao=uo;function uo(){return null!==so&&so.apply(this,arguments)||this}Se(lo,co=t),lo.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},lo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var co,po=lo;function lo(){return null!==co&&co.apply(this,arguments)||this}Se(vo,fo=t),vo.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var fo,ho=vo;function vo(){return null!==fo&&fo.apply(this,arguments)||this}Se(mo,yo=t),mo.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)},mo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},mo.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var yo,go=mo;function mo(){return null!==yo&&yo.apply(this,arguments)||this}Se(bo,Eo=t),bo.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},bo.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var Eo,wo=bo;function bo(){return null!==Eo&&Eo.apply(this,arguments)||this}To.prototype.operate=function(e,t){return new Map};var _o=To;function To(){}Ao.get=function(e){switch(e){case Wi.SET:return new Xi;case Wi.SET_ONCE:return new Qi;case Wi.UNSET:return new to;case Wi.INCREMENT:return new no;case Wi.APPEND:return new ao;case Wi.APPEND_ONCE:return new po;case Wi.PREPEND:return new ho;case Wi.PREPEND_ONCE:return new go;case Wi.CLEAR_ALL:return new _o;case Wi.REMOVE:return new wo}};var Io=Ao;function Ao(){}No.prototype.set=function(e,t){return this.add(Wi.SET,e,t)},No.prototype.setOnce=function(e,t){return this.add(Wi.SET_ONCE,e,t)},No.prototype.unset=function(e){return this.add(Wi.UNSET,e,"-")},No.prototype.increment=function(e,t){return this.add(Wi.INCREMENT,e,t)},No.prototype.append=function(e,t){return this.add(Wi.APPEND,e,t)},No.prototype.appendOnce=function(e,t){return this.add(Wi.APPEND_ONCE,e,t)},No.prototype.prepend=function(e,t){return this.add(Wi.PREPEND,e,t)},No.prototype.prependOnce=function(e,t){return this.add(Wi.PREPEND_ONCE,e,t)},No.prototype.remove=function(e,t){return this.add(Wi.REMOVE,e,t)},No.prototype.clearAll=function(){return this.add(Wi.CLEAR_ALL,"clearAll","-")},No.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new So(new Map(e))},No.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},No.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new qi);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var Oo=No;function No(){this.operations=new Map}Ro.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Io.get(t).operate(r,e)}),r},Ro.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]),Ue.sanitize(u.fromMap(e))),r))}),i},Ro.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 So=Ro;function Ro(e){this.operations=null!=e?e:new Map}Mo.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 Co=Mo;function Mo(){}Po.prototype.isEquals=function(e){return this.url===e.url},Object.defineProperty(Po.prototype,"pageTitle",{get:function(){return"undefined"==typeof window||"undefined"==typeof document?"":window.document.title},enumerable:!1,configurable:!0}),Po.createWithCurrentPage=function(){return"undefined"==typeof window||"undefined"==typeof document?new Po:new Po(window.location.pathname,window.location.host,window.location.hostname,window.location.href,window.document.referrer,window.location.search,window.location.protocol)},Po.prototype.toProperties=function(){return{pagePath:this.pagePath,pageTitle:this.pageTitle,host:this.host,url:this.url,referrer:this.referrer,queryParameter:this.queryParameter,protocol:this.protocol.replace(":","")}};var xo=Po;function Po(e,t,r,n,i,o,s){void 0===t&&(t=""),void 0===r&&(r=""),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s=""),this.pagePath=e=void 0===e?"":e,this.host=t,this.hostname=r,this.url=n,this.referrer=i,this.queryParameter=o,this.protocol=s}var Uo=s.log,ko=(d.prototype.initialize=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Uo.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Uo.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Uo.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},d.prototype.getSessionId=function(){return this.sessionManager.sessionId},d.prototype.getUser=function(){return this.userManager.currentUser},d.prototype.setUser=function(e){try{var t=Jt(e);if(!t)return Uo.warn("invalid user"),Promise.resolve();var r=this.userManager.setUser(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Uo.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},d.prototype.setUserId=function(e){try{var t=void 0;if(void 0===e)t=this.userManager.setUserId(void 0);else{var r=Me.sanitizeValue(e);if(!r)return Uo.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();t=this.userManager.setUserId(r)}return this.userManager.syncIfNeeded(t).catch(function(){})}catch(e){return Uo.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},d.prototype.setDeviceId=function(e){try{var t=Me.sanitizeValue(e);if(!t)return Uo.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve();var r=this.userManager.setDeviceId(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Uo.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},d.prototype.setUserProperty=function(e,t){e=(new Oo).set(e,t).build();return this.updateUserProperties(e)},d.prototype.setUserProperties=function(e){try{var t=Ue.sanitize(e),r=new Oo;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 Uo.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},d.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),this.core.flush(!1),Promise.resolve()}catch(e){return Uo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},d.prototype.resetUser=function(){try{var e=this.userManager.resetUser(),t=(new Oo).clearAll().build();return this.track(t.toEvent()),this.userManager.syncIfNeeded(e).catch(function(){})}catch(e){return Uo.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},d.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},d.prototype.variationDetail=function(r,n,e){var i=e||"A",e=Gn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return Uo.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),_t.of(i,l.EXCEPTION)}}(this);return Vi.experiment(e,r,t),t},d.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},d.prototype.featureFlagDetail=function(r,n){var e=Gn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Uo.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),It.off(l.EXCEPTION)}}(this);return Vi.featureFlag(e,r,t),t},d.prototype.track=function(e,t){try{Uo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Uo.error("Unexpected exception while tracking event: ".concat(e))}},d.prototype.trackPageView=function(e){var t=xo.createWithCurrentPage();this.pageEventTracker.track(t)},d.prototype.remoteConfig=function(e){return new Ji(this.core,this.userManager,e)},d.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},d.prototype.getExperiment=function(t){try{return this.core.getExperiment(t)}catch(e){return void Uo.error('"Unexpected exception while get experiment['.concat(t,"]"))}},d.prototype.onInitialized=function(r){var n;return a(this,void 0,void 0,function(){var t;return p(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,Co.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(),Uo.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},d.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},d.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Uo.debug("UserExplorer opened."),_i.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Uo.error("UserExplorer is not provided")},d.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Uo.warn("There is no active HackleDevtools.")},d.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},d.prototype.setInAppMessageListener=function(e){this.inAppMessageUi.setListener(e)},d.prototype.close=function(){Uo.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},d);function d(e,t,r,n,i,o,s,a){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.fetchThrottler=i,this.pageEventTracker=o,this.inAppMessageUi=s,this.devTools=a,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.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this),this.initialization=this.initialize()}var Do=s.log,Lo=(Fo.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 Do.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},Fo);function Fo(e,t){this.invocationProcessor=e,this.user=t}jo.tryParse=function(e){try{return new URL(e)}catch(e){return}},jo.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:jo.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},jo.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},jo.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},jo.decodeURIOrOriginal=function(t){try{return decodeURI(t)}catch(e){return t}},jo.decodeURIComponentOrOriginal=function(t){try{return decodeURIComponent(t)}catch(e){return t}};var Vo=jo;function jo(){}Ho.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]:""},Ho.prototype.getItem=function(e){for(var t,r=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(r))return null!=(t=Vo.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},Ho.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},Ho.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Ho.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},Ho.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Ho.prototype.getOptions=function(){return this.options},Ho.getInstance=function(e){return void 0===e&&(e={days:Xe,isCrossSubdomain:!0}),Ho.storage=Ho.storage?Ho.storage:new Ho(e)};var Bo=Ho;function Ho(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Go.prototype.initialize=function(){Bo.getInstance().getItem(Ze)||Yo()},Go.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return Jo();case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var zo=Go;function Go(){}function Ko(){var e=Bo.getInstance(),t=e.getItem(Qe);if(t)return t;t=e.getItem(Ze);return t||Yo()}function Jo(){Bo.getInstance().removeItem(Qe)}function Yo(){var e=H();return Bo.getInstance().setItem(Ze,e),e}var Wo,qo=s.log;(r=Wo=Wo||{}).native="native",r.web_view_wrapper="web_view_wrapper";v.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:Ko()}catch(e){return qo.error("Unexpected exception while get sessionId: ".concat(e)),Ko()}},v.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=Jt(t))?e:this.defaultUser()}catch(e){return qo.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},v.prototype.setUser=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{if(!(t=Jt(n)))return qo.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){qo.error("Unexpected exception while set user: ".concat(e))}return[2]})})},v.prototype.setUserId=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{if(!(t=Me.sanitizeValue(n)))return qo.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){qo.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},v.prototype.setDeviceId=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{if(!(t=Me.sanitizeValue(n)))return qo.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){qo.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},v.prototype.setUserProperty=function(r,n){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n}},this.invocationProcessor.process(t)}catch(e){qo.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},v.prototype.setUserProperties=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){try{t=Ue.sanitize(n),r=new Oo,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){qo.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},v.prototype.updateUserProperties=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()}},this.invocationProcessor.process(t)}catch(e){qo.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},v.prototype.resetUser=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){qo.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 qo.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 _t.of(o.variation,o.reason,new He(null!=(n=o.config.parameters)?n:{}))}catch(e){return qo.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),_t.of(r,l.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 qo.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 It(i.isOn,i.reason,new He(null!=(r=i.config.parameters)?r:{}),void 0)}catch(e){return qo.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),It.off(l.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){qo.error("Unexpected exception while tracking event: ".concat(e))}},v.prototype.trackPageView=function(e){qo.info("Web to app integration feature is not support 'trackPageView' method")},v.prototype.remoteConfig=function(e){return new Lo(this.invocationProcessor,this.convertUser(e))},v.prototype.onReady=function(e,t){e()},v.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){qo.error("Unexpected exception while show userExplorer: ".concat(e))}},v.prototype.hideUserExplorer=function(){qo.info("Web to app integration feature is not support 'hideUserExplorer' method")},v.prototype.setInAppMessageListener=function(e){qo.info("Web to app integration feature is not support 'setInAppMessageListener' method")},v.prototype.fetch=function(){return Promise.resolve()},v.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},v.prototype.close=function(){qo.info("Web to app integration feature is not support 'close' method")},v.prototype.getExperiment=function(e){qo.info("Web to app integration feature is not support 'getExperiment' 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=Jt(e))?e:void 0},v.prototype.defaultUser=function(){return{deviceId:Ko()}};var $o=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),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this)}Zo.prototype.getSessionId=function(){return this.browser.getSessionId()},Zo.prototype.getUser=function(){return this.browser.getUser()},Zo.prototype.syncUser=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return t=this.browser.getUser(),[4,this.app.setUser(t)];case 1:return e.sent(),[2]}})})},Zo.prototype.setUser=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUser(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Zo.prototype.setUserId=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Zo.prototype.setDeviceId=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setDeviceId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Zo.prototype.setUserProperty=function(t,r){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperty(t,r)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Zo.prototype.setUserProperties=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Zo.prototype.updateUserProperties=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.updateUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Zo.prototype.resetUser=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,this.browser.resetUser()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Zo.prototype.variation=function(e,t,r){return this.browser.variation(e,t,r=void 0===r?"A":r)},Zo.prototype.variationDetail=function(e,t,r){return this.browser.variationDetail(e,t,r=void 0===r?"A":r)},Zo.prototype.isFeatureOn=function(e,t){return this.browser.isFeatureOn(e,t)},Zo.prototype.featureFlagDetail=function(e,t){return this.browser.featureFlagDetail(e,t)},Zo.prototype.track=function(e,t){return this.browser.track(e,t)},Zo.prototype.trackPageView=function(e){return this.browser.trackPageView(e)},Zo.prototype.remoteConfig=function(e){return this.browser.remoteConfig(e)},Zo.prototype.onReady=function(e,t){this.browser.onReady(e,t)},Zo.prototype.showUserExplorer=function(){this.browser.showUserExplorer()},Zo.prototype.hideUserExplorer=function(){this.browser.hideUserExplorer()},Zo.prototype.fetch=function(){return this.browser.fetch()},Zo.prototype.onInitialized=function(e){return this.browser.onInitialized(e)},Zo.prototype.close=function(){this.browser.close()},Zo.prototype.setInAppMessageListener=function(e){this.browser.setInAppMessageListener(e)},Zo.prototype.getExperiment=function(e){return this.browser.getExperiment(e)};var Xo=Zo;function Zo(e,t){this.browser=e,this.app=t,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.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this)}function Qo(e){return e&&e.Math==Math&&e}function es(e){try{return!!e()}catch(e){return!0}}function ts(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function rs(e){return Vs(Fs(e),8,-1)}function ns(e){if(null==e)throw zs("Can't call method on "+e);return e}function is(e){return Gs(Ks(e))}function os(e){return"function"==typeof e}function ss(e){return"object"==typeof e?null!==e:Js(e)}function as(e,t){return arguments.length<2?(r=Ys[e],Ws(r)?r:void 0):Ys[e]&&Ys[e][t];var r}function us(e){try{return na(e)}catch(e){return"Object"}}function cs(e){if(ia(e))return e;throw sa(oa(e)+" is not a function")}function ps(e,t){return null==(e=e[t])?void 0:aa(e)}function ls(t,r){try{ha(fa,t,{value:r,configurable:!0,writable:!0})}catch(e){fa[t]=r}return r}function fs(e){return ga(ya(e))}function hs(e){return"Symbol("+(void 0===e?"":e)+")_"+Ta(++ba+_a,36)}function ds(e){var t;return Aa(Ra,e)&&(Na||"string"==typeof Ra[e])||(t="Symbol."+e,Na&&Aa(Ca,e)?Ra[e]=Ca[e]:Ra[e]=(Sa&&Ma?Ma:xa)(t)),Ra[e]}function vs(e){return e=ja(e,"string"),Ba(e)?e:e+""}function ys(e){return za?Ha.createElement(e):{}}function gs(e){if(Qa(e))return e;throw tu(eu(e)+" is not an object")}function ms(e){return yu[e]||(yu[e]=vu(e))}function Es(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(Uu(r)&&Du(r,o,n),n.global)i?e[t]=r:Lu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:ku.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function ws(e){return(e=+e)!=e||0==e?0:ju(e)}function bs(e,t){return(e=Bu(e))<0?Hu(e+t,0):zu(e,t)}function y(e){return Ju(e.length)}function _s(a){return function(e,t,r){var n,i=Yu(e),o=qu(i),s=Wu(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 Ts(e,t){var r,n=Xu(e),i=0,o=[];for(r in n)!$u(Qu,r)&&$u(n,r)&&ec(o,r);for(;t.length>i;)!$u(n,r=t[i++])||~Zu(o,r)||ec(o,r);return o}function Is(e,t,r){for(var n=uc(t),i=pc.f,o=cc.f,s=0;s<n.length;s++){var a=n[s];ac(e,a)||r&&ac(r,a)||i(e,a,o(t,a))}}function As(e,t){return(e=vc[dc(e)])==gc||e!=yc&&(fc(t)?lc(t):!!t)}function g(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?mc:a?mc[o]||_c(o,{}):(mc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=Ec(u,r))&&i.value:u[r],!Ic(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;Tc(n,i)}(e.sham||i&&i.sham)&&wc(n,"sham",!0),bc(u,r,n,e)}}var Os,Ns,Ss,Rs,Cs,Ms,xs,Ps,z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=Qo("object"==typeof globalThis&&globalThis)||Qo("object"==typeof window&&window)||Qo("object"==typeof self&&self)||Qo("object"==typeof z&&z)||function(){return this}()||Function("return this")(),e={},Q=!es(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t=!es(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Us=Function.prototype.call,r=t?Us.bind(Us):function(){return Us.apply(Us,arguments)},z={},m={}.propertyIsEnumerable,ks=Object.getOwnPropertyDescriptor,E=ks&&!m.call({1:2},1),E=(z.f=E?function(e){e=ks(this,e);return!!e&&e.enumerable}:m,t),m=Function.prototype,w=m.bind,Ds=m.call,Ls=E&&w.bind(Ds,Ds),m=E?function(e){return e&&Ls(e)}:function(e){return e&&function(){return Ds.apply(e,arguments)}},w=m,Fs=w({}.toString),Vs=w("".slice),E=es,js=rs,Bs=Object,Hs=m("".split),w=E(function(){return!Bs("z").propertyIsEnumerable(0)})?function(e){return"String"==js(e)?Hs(e,""):Bs(e)}:Bs,zs=TypeError,Gs=w,Ks=ns,Js=os,Ys=i,Ws=os,E=m({}.isPrototypeOf),qs=as("navigator","userAgent")||"",b=qs,$s=i.process,Xs=i.Deno,$s=$s&&$s.versions||Xs&&Xs.version,Xs=$s&&$s.v8,$s=T=!(T=Xs?0<(_=Xs.split("."))[0]&&_[0]<4?1:+(_[0]+_[1]):T)&&b&&(!(_=b.match(/Edge\/(\d+)/))||74<=_[1])&&(_=b.match(/Chrome\/(\d+)/))?+_[1]:T,Zs=$s,Xs=es,b=!!Object.getOwnPropertySymbols&&!Xs(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Zs&&Zs<41}),_=b&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Qs=as,ea=os,ta=E,ra=Object,T=_?function(e){return"symbol"==typeof e}:function(e){var t=Qs("Symbol");return ea(t)&&ta(t.prototype,ra(e))},na=String,ia=os,oa=us,sa=TypeError,aa=cs,ua=r,ca=os,pa=ss,la=TypeError,Xs={exports:{}},fa=i,ha=Object.defineProperty,da=ls,I="__core-js_shared__",da=i[I]||da(I,{}),va=da,ya=((Xs.exports=function(e,t){return va[e]||(va[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"}),ns),ga=Object,ma=fs,Ea=m({}.hasOwnProperty),I=Object.hasOwn||function(e,t){return Ea(ma(e),t)},wa=m,ba=0,_a=Math.random(),Ta=wa(1..toString),wa=i,Ia=Xs.exports,Aa=I,Oa=hs,Na=b,Sa=_,Ra=Ia("wks"),Ca=wa.Symbol,Ma=Ca&&Ca.for,xa=Sa?Ca:Ca&&Ca.withoutSetter||Oa,Pa=r,Ua=ss,ka=T,Da=ps,La=function(e,t){var r,n;if("string"===t&&ca(r=e.toString)&&!pa(n=ua(r,e)))return n;if(ca(r=e.valueOf)&&!pa(n=ua(r,e)))return n;if("string"!==t&&ca(r=e.toString)&&!pa(n=ua(r,e)))return n;throw la("Can't convert object to primitive value")},Fa=TypeError,Va=ds("toPrimitive"),ja=function(e,t){if(!Ua(e)||ka(e))return e;var r=Da(e,Va);if(r){if(r=Pa(r,e,t=void 0===t?"default":t),!Ua(r)||ka(r))return r;throw Fa("Can't convert object to primitive value")}return La(e,t=void 0===t?"number":t)},Ba=T,b=ss,Ha=i.document,za=b(Ha)&&b(Ha.createElement),Ga=ys,_=!Q&&!es(function(){return 7!=Object.defineProperty(Ga("div"),"a",{get:function(){return 7}}).a}),Ka=r,Ja=z,Ya=ts,Wa=is,qa=vs,$a=I,Xa=_,Za=Object.getOwnPropertyDescriptor,Ia=(e.f=Q?Za:function(e,t){if(e=Wa(e),t=qa(t),Xa)try{return Za(e,t)}catch(e){}if($a(e,t))return Ya(!Ka(Ja.f,e,t),e[t])},{}),wa=Q&&es(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Qa=ss,eu=String,tu=TypeError,ru=_,nu=gs,iu=vs,ou=TypeError,su=Object.defineProperty,au=Object.getOwnPropertyDescriptor,uu="enumerable",cu="configurable",pu="writable",Oa=(Ia.f=Q?wa?function(e,t,r){var n;return nu(e),t=iu(t),nu(r),"function"==typeof e&&"prototype"===t&&"value"in r&&pu in r&&!r[pu]&&((n=au(e,t))&&n[pu]&&(e[t]=r.value,r={configurable:(cu in r?r:n)[cu],enumerable:(uu in r?r:n)[uu],writable:!1})),su(e,t,r)}:su:function(e,t,r){if(nu(e),t=iu(t),nu(r),ru)try{return su(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ou("Accessors not supported");return"value"in r&&(e[t]=r.value),e},Q),lu=Ia,fu=ts,T=Oa?function(e,t,r){return lu.f(e,t,fu(1,r))}:function(e,t,r){return e[t]=r,e},b={exports:{}},z=Q,_=I,Oa=Function.prototype,A=z&&Object.getOwnPropertyDescriptor,_=_(Oa,"name"),_={EXISTS:_,PROPER:_&&"something"===function(){}.name,CONFIGURABLE:_&&(!z||A(Oa,"name").configurable)},z=os,A=da,hu=m(Function.toString),Oa=(z(A.inspectSource)||(A.inspectSource=function(e){return hu(e)}),A.inspectSource),z=os,A=Oa,du=i.WeakMap,z=z(du)&&/native code/.test(A(du)),A=Xs.exports,vu=hs,yu=A("keys"),du={},Xs=m,gu=ss,mu=T,Eu=I,A=da,wu=ms,bu=du,_u="Object already initialized",Tu=i.TypeError,O=i.WeakMap,z=(xs=z||A.state?(Os=A.state||(A.state=new O),Ns=Xs(Os.get),Ss=Xs(Os.has),Rs=Xs(Os.set),Cs=function(e,t){if(Ss(Os,e))throw new Tu(_u);return t.facade=e,Rs(Os,e,t),t},Ms=function(e){return Ns(Os,e)||{}},function(e){return Ss(Os,e)}):(bu[Ps=wu("state")]=!0,Cs=function(e,t){if(Eu(e,Ps))throw new Tu(_u);return t.facade=e,mu(e,Ps,t),t},Ms=function(e){return Eu(e,Ps)?e[Ps]:{}},function(e){return Eu(e,Ps)}),{set:Cs,get:Ms,has:xs,enforce:function(e){return xs(e)?Ms(e):Cs(e,{})},getterFor:function(t){return function(e){if(gu(e)&&(e=Ms(e)).type===t)return e;throw Tu("Incompatible receiver, "+t+" required")}}}),A=es,Iu=os,Au=I,Ou=Q,Nu=_.CONFIGURABLE,Su=Oa,Ru=z.enforce,Cu=z.get,Mu=Object.defineProperty,xu=Ou&&!A(function(){return 8!==Mu(function(){},"length",{value:8}).length}),Pu=String(String).split("String"),O=b.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),(!Au(e,"name")||Nu&&e.name!==t)&&(Ou?Mu(e,"name",{value:t,configurable:!0}):e.name=t),xu&&r&&Au(r,"arity")&&e.length!==r.arity&&Mu(e,"length",{value:r.arity});try{r&&Au(r,"constructor")&&r.constructor?Ou&&Mu(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=Ru(e);return Au(r,"source")||(r.source=Pu.join("string"==typeof t?t:"")),e},Uu=(Function.prototype.toString=O(function(){return Iu(this)&&Cu(this).source||Su(this)},"toString"),os),ku=Ia,Du=b.exports,Lu=ls,Xs={},Fu=Math.ceil,Vu=Math.floor,ju=Math.trunc||function(e){e=+e;return(0<e?Vu:Fu)(e)},Bu=ws,Hu=Math.max,zu=Math.min,Gu=ws,Ku=Math.min,Ju=function(e){return 0<e?Ku(Gu(e),9007199254740991):0},Yu=is,Wu=bs,qu=y,bu={includes:_s(!0),indexOf:_s(!1)},wu=m,$u=I,Xu=is,Zu=bu.indexOf,Qu=du,ec=wu([].push),A=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tc=Ts,rc=A.concat("length","prototype"),O=(Xs.f=Object.getOwnPropertyNames||function(e){return tc(e,rc)},{}),wu=(O.f=Object.getOwnPropertySymbols,as),nc=Xs,ic=O,oc=gs,sc=m([].concat),O=wu("Reflect","ownKeys")||function(e){var t=nc.f(oc(e)),r=ic.f;return r?sc(t,r(e)):t},ac=I,uc=O,cc=e,pc=Ia,lc=es,fc=os,hc=/#|\.prototype\./,dc=As.normalize=function(e){return String(e).replace(hc,".").toLowerCase()},vc=As.data={},yc=As.NATIVE="N",gc=As.POLYFILL="P",wu=As,mc=i,Ec=e.f,wc=T,bc=Es,_c=ls,Tc=Is,Ic=wu,O=!es(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Ac=I,Oc=os,Nc=fs,Sc=ms("IE_PROTO"),Rc=Object,Cc=Rc.prototype,O=O?Rc.getPrototypeOf:function(e){e=Nc(e);if(Ac(e,Sc))return e[Sc];var t=e.constructor;return Oc(t)&&e instanceof t?t.prototype:e instanceof Rc?Cc:null},Mc=os,xc=String,Pc=TypeError,Uc=m,kc=gs,Dc=function(e){if("object"==typeof e||Mc(e))return e;throw Pc("Can't set "+xc(e)+" as a prototype")},Lc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Uc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return kc(e),Dc(t),n?r(e,t):e.__proto__=t,e}}():void 0),Fc={},Vc=Ts,jc=A,N=Object.keys||function(e){return Vc(e,jc)},Bc=Ia,Hc=gs,zc=is,Gc=N;Fc.f=Q&&!wa?Object.defineProperties:function(e,t){Hc(e);for(var r,n=zc(t),i=Gc(t),o=i.length,s=0;s<o;)Bc.f(e,r=i[s++],n[r]);return e};function Kc(){}function Jc(e){e.write(hp("")),e.close();var t=e.parentWindow.Object;return e=null,t}function Yc(e,t){return bp(e),void 0===t?e:_p?Tp(e,t):function(){return e.apply(t,arguments)}}function Wc(e){return void 0!==e&&(Ip.Array===e||Op[Ap]===e)}function qc(e){if(null!=e)return Pp(e,kp)||Pp(e,"@@iterator")||Up[xp(e)]}function $c(e,t){if(t=arguments.length<2?jp(e):t,Lp(t))return Fp(Dp(t,e));throw Bp(Vp(e)+" is not iterable")}function Xc(e,t,r){var n,i;zp(e);try{if(!(n=Gp(e,"return"))){if("throw"===t)throw r;return r}n=Hp(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return zp(n),r}function Zc(e,t){this.stopped=e,this.result=t}function Qc(e,t,r){function n(e){return o&&el(o,"normal",e),new Zc(!0,e)}function i(e){return f?(Yp(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,p,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Kp(t,l);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=Qp(e)))throw tl(Wp(e)+" is not iterable");if(qp(r)){for(s=0,a=$p(e);s<a;s++)if((u=i(e[s]))&&Xp(rl,u))return u;return new Zc(!1)}o=Zp(e,r)}for(c=(h?e:o).next;!(p=Jp(c,o)).done;){try{u=i(p.value)}catch(e){el(o,"throw",e)}if("object"==typeof u&&u&&Xp(rl,u))return u}return new Zc(!1)}function ep(e){if("Symbol"===nl(e))throw TypeError("Cannot convert a Symbol value to a string");return il(e)}function tp(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=al(bl,this);return cl?r=cl(new El,i?ul(this):bl):(r=i?this:pl(bl),ll(r,ml,"Error")),void 0!==t&&ll(r,"message",yl(t)),gl&&ll(r,"stack",hl(r.stack,1)),dl(r,n),vl(e,wl,{that:i=[]}),ll(r,"errors",i),r}function rp(e){Tl[_l][e]=!0}var np,ip,N=as("document","documentElement"),op=gs,sp=Fc,ap=A,wa=du,up=N,cp=ys,pp="prototype",lp="script",fp=ms("IE_PROTO"),hp=function(e){return"<"+lp+">"+e+"</"+lp+">"},dp=function(){try{np=new ActiveXObject("htmlfile")}catch(e){}dp="undefined"==typeof document||document.domain&&np?Jc(np):(e=cp("iframe"),t="java"+lp+":",e.style.display="none",up.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(hp("document.F=Object")),t.close(),t.F);for(var e,t,r=ap.length;r--;)delete dp[pp][ap[r]];return dp()},Fc=(wa[fp]=!0,Object.create||function(e,t){var r;return null!==e?(Kc[pp]=op(e),r=new Kc,Kc[pp]=null,r[fp]=e):r=dp(),void 0===t?r:sp.f(r,t)}),vp=Error,yp=m("".replace),A=String(vp("zxcasd").stack),gp=/\n\s*at [^:]*:[^\n]*/,mp=gp.test(A),Ep=ss,wp=T,bp=cs,_p=t,Tp=m(m.bind),wa={},Ip=wa,Ap=ds("iterator"),Op=Array.prototype,A={},A=(A[ds("toStringTag")]="z","[object z]"===String(A)),S=A,Np=os,Sp=rs,Rp=ds("toStringTag"),Cp=Object,Mp="Arguments"==Sp(function(){return arguments}()),S=S?Sp: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=Cp(e),Rp))?t:Mp?Sp(e):"Object"==(t=Sp(e))&&Np(e.callee)?"Arguments":t},xp=S,Pp=ps,Up=wa,kp=ds("iterator"),Dp=r,Lp=cs,Fp=gs,Vp=us,jp=qc,Bp=TypeError,Hp=r,zp=gs,Gp=ps,Kp=Yc,Jp=r,Yp=gs,Wp=us,qp=Wc,$p=y,Xp=E,Zp=$c,Qp=qc,el=Xc,tl=TypeError,rl=Zc.prototype,nl=S,il=String,ol=ep,sl=ts,R=!es(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",sl(1,7)),7!==e.stack)}),C=g,al=E,ul=O,cl=Lc,M=Is,pl=Fc,ll=T,fl=ts,hl=function(e,t){if(mp&&"string"==typeof e&&!vp.prepareStackTrace)for(;t--;)e=yp(e,gp,"");return e},dl=function(e,t){Ep(t)&&"cause"in t&&wp(e,"cause",t.cause)},vl=Qc,yl=function(e,t){return void 0===e?arguments.length<2?"":t:ol(e)},gl=R,ml=ds("toStringTag"),El=Error,wl=[].push,bl=(cl?cl(tp,El):M(tp,El,{name:!0}),tp.prototype=pl(El.prototype,{constructor:fl(1,tp),message:fl(1,""),name:fl(1,"AggregateError")})),R=(C({global:!0,constructor:!0,arity:2},{AggregateError:tp}),ds),M=Fc,fl=Ia.f,_l=R("unscopables"),Tl=Array.prototype,C=(null==Tl[_l]&&fl(Tl,_l,{configurable:!0,value:M(null)}),es),R=os,fl=O,M=Es,Il=ds("iterator"),Al=!1;[].keys&&("next"in(x=[].keys())?(fl=fl(fl(x)))!==Object.prototype&&(ip=fl):Al=!0);function Ol(e,t,r){(e=e&&!r?e.prototype:e)&&!Ml(e,xl)&&Cl(e,xl,{configurable:!0,value:t})}function Nl(){return this}function Sl(){return this}function Rl(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!Xl&&e in l)return l[e];switch(e){case"keys":case Ql:case ef:return function(){return new r(this,e)}}return function(){return new r(this)}}Bl(r,t,n);var u,c,n=t+" Iterator",p=!1,l=e.prototype,f=l[Zl]||l["@@iterator"]||i&&l[i],h=!Xl&&f||a(i),d="Array"==t&&l.entries||f;if(d&&(d=Hl(d.call(new e)))!==Object.prototype&&d.next&&(Hl(d)!==$l&&(zl?zl(d,$l):jl(d[Zl])||Jl(d,Zl,Sl)),Gl(d,n,!0)),Wl&&i==Ql&&f&&f.name!==Ql&&(ql?Kl(l,"name",Ql):(p=!0,h=function(){return Vl(f,this)})),i)if(u={values:a(Ql),keys:o?h:a("keys"),entries:a(ef)},s)for(c in u)!Xl&&!p&&c in l||Jl(l,c,u[c]);else Fl({target:t,proto:!0,forced:Xl||p},u);return l[Zl]!==h&&Jl(l,Zl,h,{name:i}),Yl[t]=h,u}R((ip=null==ip||C(function(){var e={};return ip[Il].call(e)!==e})?{}:ip)[Il])||M(ip,Il,function(){return this});var x={IteratorPrototype:ip,BUGGY_SAFARI_ITERATORS:Al},Cl=Ia.f,Ml=I,xl=ds("toStringTag"),Pl=x.IteratorPrototype,Ul=Fc,kl=ts,Dl=Ol,Ll=wa,Fl=g,Vl=r,jl=os,Bl=function(e,t,r,n){t+=" Iterator";return e.prototype=Ul(Pl,{next:kl(+!n,r)}),Dl(e,t,!1),Ll[t]=Nl,e},Hl=O,zl=Lc,Gl=Ol,Kl=T,Jl=Es,fl=ds,Yl=wa,Wl=_.PROPER,ql=_.CONFIGURABLE,$l=x.IteratorPrototype,Xl=x.BUGGY_SAFARI_ITERATORS,Zl=fl("iterator"),Ql="values",ef="entries",tf=is,R=rp,C=wa,M=z,Al=Ia.f,_=Rl,x=Q,rf="Array Iterator",nf=M.set,of=M.getterFor(rf),fl=_(Array,"Array",function(e,t){nf(this,{type:rf,target:tf(e),index:0,kind:t})},function(){var e=of(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"),wa=C.Arguments=C.Array;if(R("keys"),R("values"),R("entries"),x&&"values"!==wa.name)try{Al(wa,"name",{value:"values"})}catch(e){}var sf=S;A||Es(Object.prototype,"toString",A?{}.toString:function(){return"[object "+sf(this)+"]"},{unsafe:!0});function af(e){var e=vf(e),t=yf.f;gf&&e&&!e[mf]&&t(e,mf,{configurable:!0,get:function(){return this}})}function uf(e,t){if(Ef(t,e))return e;throw wf("Incorrect invocation")}function cf(){}function pf(e){if(!bf(e))return!1;try{return Af(cf,If,e),!0}catch(e){return!1}}function lf(e){if(!bf(e))return!1;switch(_f(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Sf||!!Nf(Of,Tf(e))}catch(e){return!0}}function ff(e,t){return void 0===(e=xf(e).constructor)||null==(e=xf(e)[Uf])?t:Pf(e)}var hf,df,M="process"==rs(i.process),vf=as,yf=Ia,gf=Q,mf=ds("species"),Ef=E,wf=TypeError,_=m,C=es,bf=os,_f=S,Tf=Oa,If=[],Af=as("Reflect","construct"),Of=/^\s*(?:class|function)\b/,Nf=_(Of.exec),Sf=!Of.exec(cf),R=(lf.sham=!0,!Af||C(function(){var e;return pf(pf.call)||!pf(Object)||!pf(function(){e=!0})||e})?lf:pf),Rf=R,Cf=us,Mf=TypeError,xf=gs,Pf=function(e){if(Rf(e))return e;throw Mf(Cf(e)+" is not a constructor")},Uf=ds("species"),x=Function.prototype,kf=x.apply,Df=x.call,Al="object"==typeof Reflect&&Reflect.apply||(t?Df.bind(kf):function(){return Df.apply(kf,arguments)}),wa=m([].slice),Lf=TypeError,A=/(?:ipad|iphone|ipod).*applewebkit/i.test(qs),Ff=i,Vf=Al,E=Yc,jf=os,Bf=I,S=es,Hf=N,zf=wa,Gf=ys,Kf=function(e,t){if(e<t)throw Lf("Not enough arguments");return e},_=A,C=M,x=Ff.setImmediate,t=Ff.clearImmediate,Jf=Ff.process,Yf=Ff.Dispatch,Wf=Ff.Function,N=Ff.MessageChannel,qf=Ff.String,$f=0,Xf={},Zf="onreadystatechange";try{hf=Ff.location}catch(e){}function Qf(e){return function(){yh(e)}}function eh(e){yh(e.data)}function th(e){Ff.postMessage(qf(e),hf.protocol+"//"+hf.host)}function rh(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function nh(){this.head=null,this.tail=null}function ih(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=Rh(r),this.reject=Rh(n)}function oh(e,t){var r,n,i,o,s=t.value,a=t.state==od,u=a?e.ok:e.fail,c=e.resolve,p=e.reject,l=e.domain;try{u?(a||(t.rejection===ud&&(o=t,xh(Fh,Mh,function(){var e=o.facade;Ch?Qh.emit("rejectionHandled",e):ld(id,e,o.value)})),t.rejection=ad),!0===u?r=s:(l&&l.enter(),r=u(s),l&&(l.exit(),i=!0)),r===e.promise?p(Xh("Promise-chain cycle")):(n=cd(r))?xh(n,r,c,p):c(r)):p(s)}catch(e){l&&!i&&l.exit(),p(e)}}var sh,ah,uh,ch,ph,lh,fh,hh,dh,vh,yh=function(e){var t;Bf(Xf,e)&&(t=Xf[e],delete Xf[e],t())},N=(x&&t||(x=function(e){Kf(arguments.length,1);var t=jf(e)?e:Wf(e),r=zf(arguments,1);return Xf[++$f]=function(){Vf(t,void 0,r)},df($f),$f},t=function(e){delete Xf[e]},C?df=function(e){Jf.nextTick(Qf(e))}:Yf&&Yf.now?df=function(e){Yf.now(Qf(e))}:N&&!_?(_=(C=new N).port2,C.port1.onmessage=eh,df=E(_.postMessage,_)):Ff.addEventListener&&jf(Ff.postMessage)&&!Ff.importScripts&&hf&&"file:"!==hf.protocol&&!S(th)?(df=th,Ff.addEventListener("message",eh,!1)):df=Zf in Gf("script")?function(e){Hf.appendChild(Gf("script"))[Zf]=function(){Hf.removeChild(this),yh(e)}}:function(e){setTimeout(Qf(e),0)}),{set:x,clear:t}),C=i,E=/ipad|iphone|ipod/i.test(qs)&&void 0!==C.Pebble,_=/web0s(?!.*chrome)/i.test(qs),S=i,x=Yc,t=e.f,gh=N.set,C=A,e=E,A=_,mh=M,E=S.MutationObserver||S.WebKitMutationObserver,_=S.document,Eh=S.process,P=S.Promise,t=t(S,"queueMicrotask"),t=t&&t.value,A=(t||(sh=function(){var e,t;for(mh&&(e=Eh.domain)&&e.exit();ah;){t=ah.fn,ah=ah.next;try{t()}catch(e){throw ah?ch():uh=void 0,e}}uh=void 0,e&&e.enter()},ch=C||mh||A||!E||!_?!e&&P&&P.resolve?((C=P.resolve(void 0)).constructor=P,fh=x(C.then,C),function(){fh(sh)}):mh?function(){Eh.nextTick(sh)}:(gh=x(gh,S),function(){gh(sh)}):(ph=!0,lh=_.createTextNode(""),new E(sh).observe(lh,{characterData:!0}),function(){lh.data=ph=!ph})),t||function(e){e={fn:e,next:void 0};uh&&(uh.next=e),ah||(ah=e,ch()),uh=e}),wh=i,e=(nh.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}},nh),P=i.Promise,C="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,x=!C&&!M&&"object"==typeof window&&"object"==typeof document,S=i,bh=P,_=os,E=wu,_h=Oa,t=ds,Th=x,Ih=C,Ah=$s,Oh=(bh&&bh.prototype,t("species")),Nh=!1,Sh=_(S.PromiseRejectionEvent),Oa={CONSTRUCTOR:E("Promise",function(){var e=_h(bh),t=e!==String(bh);if(!t&&66===Ah)return!0;if(!Ah||Ah<51||!/native code/.test(e)){var e=new bh(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Oh]=r,!(Nh=e.then(function(){})instanceof r))return!0}return!t&&(Th||Ih)&&!Sh}),REJECTION_EVENT:Sh,SUBCLASSING:Nh},x={},Rh=cs,C=(x.f=function(e){return new ih(e)},g),Ch=M,Mh=i,xh=r,t=Es,_=Lc,S=Ol,E=af,Ph=cs,Uh=os,kh=ss,Dh=uf,Lh=ff,Fh=N.set,Vh=A,jh=function(e,t){var r=wh.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},Bh=rh,Hh=e,N=z,A=P,e=x,zh="Promise",Gh=Oa.CONSTRUCTOR,Kh=Oa.REJECTION_EVENT,Jh=Oa.SUBCLASSING,Yh=N.getterFor(zh),Wh=N.set,N=A&&A.prototype,qh=A,$h=N,Xh=Mh.TypeError,Zh=Mh.document,Qh=Mh.process,ed=e.f,td=ed,rd=!!(Zh&&Zh.createEvent&&Mh.dispatchEvent),nd="unhandledrejection",id="rejectionhandled",od=1,sd=2,ad=1,ud=2,cd=function(e){var t;return!(!kh(e)||!Uh(t=e.then))&&t},pd=function(r,i){r.notified||(r.notified=!0,Vh(function(){for(var e,n,t=r.reactions;e=t.get();)oh(e,r);r.notified=!1,i&&!r.rejection&&(n=r,xh(Fh,Mh,function(){var e=n.facade,t=n.value,r=fd(n);if(r&&(r=Bh(function(){Ch?Qh.emit("unhandledRejection",t,e):ld(nd,e,t)}),n.rejection=Ch||fd(n)?ud:ad,r.error))throw r.value}))}))},ld=function(e,t,r){var n;rd?((n=Zh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Mh.dispatchEvent(n)):n={promise:t,reason:r},!Kh&&(t=Mh["on"+e])?t(n):e===nd&&jh("Unhandled promise rejection",r)},fd=function(e){return e.rejection!==ad&&!e.parent},hd=function(t,r,n){return function(e){t(r,e,n)}},dd=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=sd,pd(e,!0))},vd=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Xh("Promise can't be resolved itself");var n=cd(e);n?Vh(function(){var t={done:!1};try{xh(n,e,hd(vd,t,r),hd(dd,t,r))}catch(e){dd(t,e,r)}}):(r.value=e,r.state=od,pd(r,!1))}catch(e){dd({done:!1},e,r)}}};if(Gh&&($h=(qh=function(e){Dh(this,$h),Ph(e),xh(hh,this);var t=Yh(this);try{e(hd(vd,t),hd(dd,t))}catch(e){dd(t,e)}}).prototype,(hh=function(e){Wh(this,{type:zh,done:!1,notified:!1,parent:!1,reactions:new Hh,rejection:!1,state:0,value:void 0})}).prototype=t($h,"then",function(e,t){var r=Yh(this),n=ed(Lh(this,qh));return r.parent=!0,n.ok=!Uh(e)||e,n.fail=Uh(t)&&t,n.domain=Ch?Qh.domain:void 0,0==r.state?r.reactions.add(n):Vh(function(){oh(n,r)}),n.promise}),dh=function(){var e=new hh,t=Yh(e);this.promise=e,this.resolve=hd(vd,t),this.reject=hd(dd,t)},e.f=ed=function(e){return e===qh||void 0===e?new dh:td(e)},Uh(A)&&N!==Object.prototype)){vh=N.then,Jh||t(N,"then",function(e,t){var r=this;return new qh(function(e,t){xh(vh,r,e,t)}).then(e,t)},{unsafe:!0});try{delete N.constructor}catch(e){}_&&_(N,$h)}C({global:!0,constructor:!0,wrap:!0,forced:Gh},{Promise:qh}),S(qh,zh,!1),E(zh);var yd=ds("iterator"),gd=!1;try{var md=0,Ed={next:function(){return{done:!!md++}},return:function(){gd=!0}};Ed[yd]=function(){return this},Array.from(Ed,function(){throw 2})}catch(e){}function wd(e,t){if(!t&&!gd)return!1;var r=!1;try{var n={};n[yd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var bd=P,e=wd,A=Oa.CONSTRUCTOR||!e(function(e){bd.all(e).then(void 0,function(){})}),_d=r,Td=cs,Id=x,Ad=rh,Od=Qc,Jh=(g({target:"Promise",stat:!0,forced:A},{all:function(e){var a=this,t=Id.f(a),u=t.resolve,c=t.reject,r=Ad(function(){var n=Td(a.resolve),i=[],o=0,s=1;Od(e,function(e){var t=o++,r=!1;s++,_d(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}}),g),t=P,_=as,N=os,C=Es,Gh=t&&t.prototype;Jh({target:"Promise",proto:!0,forced:Oa.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),N(t)&&(S=_("Promise").prototype.catch,Gh.catch!==S&&C(Gh,"catch",S,{unsafe:!0}));var Nd=r,Sd=cs,Rd=x,Cd=rh,Md=Qc;g({target:"Promise",stat:!0,forced:A},{race:function(e){var r=this,n=Rd.f(r),i=n.reject,t=Cd(function(){var t=Sd(r.resolve);Md(e,function(e){Nd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function xd(e,t){return kd(e),Dd(t)&&t.constructor===e?t:((0,(e=Ld.f(e)).resolve)(t),e.promise)}var Pd=r,Ud=x,kd=(g({target:"Promise",stat:!0,forced:Oa.CONSTRUCTOR},{reject:function(e){var t=Ud.f(this);return Pd(t.reject,void 0,e),t.promise}}),gs),Dd=ss,Ld=x,E=g,Ed=as,e=Oa.CONSTRUCTOR,Fd=xd;Ed("Promise"),E({target:"Promise",stat:!0,forced:e},{resolve:function(e){return Fd(this,e)}});var Vd=r,jd=cs,Bd=x,Hd=rh,zd=Qc;g({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Bd.f(a),u=t.resolve,r=t.reject,n=Hd(function(){var n=jd(a.resolve),i=[],o=0,s=1;zd(e,function(e){var t=o++,r=!1;s++,Vd(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 Gd(i){return function(e,t){var r,e=iv(ov(e)),t=nv(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=av(e,t))<55296||56319<r||t+1===n||(n=av(e,t+1))<56320||57343<n?i?sv(e,t):r:i?uv(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Kd=r,Jd=cs,Yd=as,Wd=x,qd=rh,$d=Qc,Xd="No one promise resolved",Jh=(g({target:"Promise",stat:!0},{any:function(e){var u=this,c=Yd("AggregateError"),t=Wd.f(u),p=t.resolve,l=t.reject,r=qd(function(){var n=Jd(u.resolve),i=[],o=0,s=1,a=!1;$d(e,function(e){var t=o++,r=!1;s++,Kd(n,u,e).then(function(e){r||a||(a=!0,p(e))},function(e){r||a||(r=!0,i[t]=e,--s||l(new c(i,Xd)))})}),--s||l(new c(i,Xd))});return r.error&&l(r.value),t.promise}}),g),N=P,t=es,Zd=as,Qd=os,ev=ff,tv=xd,_=Es,rv=N&&N.prototype,Gh=(Jh({target:"Promise",proto:!0,real:!0,forced:!!N&&t(function(){rv.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=ev(this,Zd("Promise")),e=Qd(t);return this.then(e?function(e){return tv(r,t()).then(function(){return e})}:t,e?function(e){return tv(r,t()).then(function(){throw e})}:t)}}),Qd(N)&&(C=Zd("Promise").prototype.finally,rv.finally!==C&&_(rv,"finally",C,{unsafe:!0})),m),nv=ws,iv=ep,ov=ns,sv=Gh("".charAt),av=Gh("".charCodeAt),uv=Gh("".slice),cv={codeAt:Gd(!1),charAt:Gd(!0)}.charAt,pv=ep,S=z,A=Rl,lv="String Iterator",fv=S.set,hv=S.getterFor(lv);A(String,"String",function(e){fv(this,{type:lv,string:pv(e),index:0})},function(){var e=hv(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=cv(t,r),e.index+=t.length,{value:t,done:!1})});function dv(t,e){if(t){if(t[wv]!==_v)try{Ev(t,wv,_v)}catch(e){t[wv]=_v}if(t[bv]||Ev(t,bv,e),gv[e])for(var r in mv)if(t[r]!==mv[r])try{Ev(t,r,mv[r])}catch(e){t[r]=mv[r]}}}var vv,Oa=i,Ed=Oa.Promise,E=ys("span").classList,e=E&&E.constructor&&E.constructor.prototype,P=e===Object.prototype?void 0:e,yv=i,gv={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},Jh=P,mv=fl,Ev=T,t=ds,wv=t("iterator"),bv=t("toStringTag"),_v=mv.values;for(vv in gv)dv(yv[vv]&&yv[vv].prototype,vv);dv(Jh,"DOMTokenList");var N,_,C=_=N=Ed,Gh,Tv=x,Iv=rh,Av=((Gh=g)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Tv.f(this),e=Iv(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),gs),Ov=Xc,Nv=vs,Sv=Ia,Rv=ts,S,Cv=Yc,Mv=r,xv=fs,Pv=function(t,e,r,n){try{return n?e(Av(r)[0],r[1]):e(r)}catch(e){Ov(t,"throw",e)}},Uv=Wc,kv=R,Dv=y,Lv=S=function(e,t,r){t=Nv(t);t in e?Sv.f(e,t,Rv(0,r)):e[t]=r},Fv=$c,Vv=qc,jv=Array,A,E=function(e){var t,r,n,i,o,s,a=xv(e),e=kv(this),u=arguments.length,c=1<u?arguments[1]:void 0,p=void 0!==c,u=(p&&(c=Cv(c,2<u?arguments[2]:void 0)),Vv(a)),l=0;if(!u||this===jv&&Uv(u))for(t=Dv(a),r=e?new this(t):jv(t);l<t;l++)s=p?c(a[l],l):a[l],Lv(r,l,s);else for(o=(i=Fv(a,u)).next,r=e?new this:[];!(n=Mv(o,i)).done;l++)s=p?Pv(i,c,[n.value,l],!0):n.value,Lv(r,l,s);return r.length=l,r},e,P,Bv=((A=g)({target:"Array",stat:!0,forced:P=!(e=wd)(function(e){Array.from(e)})},{from:E}),rs),fl=Array.isArray||function(e){return"Array"==Bv(e)},T,t,Jh=((T=g)({target:"Array",stat:!0},{isArray:t=fl}),g),Ed=es,Hv=R,zv=S,Gv=Array,N=Ed(function(){function e(){}return!(Gv.of.call(e)instanceof e)}),Kv=(Jh({target:"Array",stat:!0,forced:N},{of:function(){for(var e=0,t=arguments.length,r=new(Hv(this)?this:Gv)(t);e<t;)zv(r,e,arguments[e++]);return r.length=t,r}}),fs),Jv=y,Yv=ws,_=rp,Wv=(g({target:"Array",proto:!0},{at:function(e){var t=Kv(this),r=Jv(t),e=Yv(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),_("at"),TypeError),C=function(e){if(9007199254740991<e)throw Wv("Maximum allowed index exceeded");return e},qv=fl,$v=R,Xv=ss,Zv=ds("species"),Qv=Array,ey=function(e){var t;return qv(e)&&(t=e.constructor,($v(t)&&(t===Qv||qv(t.prototype))||Xv(t)&&null===(t=t[Zv]))&&(t=void 0)),void 0===t?Qv:t},x=function(e,t){return new(ey(e))(0===t?0:t)},ty=es,ry=$s,ny=ds("species"),Gh,e=g,A=es,iy=fl,oy=ss,sy=fs,ay=y,uy=C,cy=S,py=x,P=Gh=function(t){return 51<=ry||!ty(function(){var e=[];return(e.constructor={})[ny]=function(){return{foo:1}},1!==e[t](Boolean).foo})},E=$s,ly=ds("isConcatSpreadable"),T=51<=E||!A(function(){var e=[];return e[ly]=!1,e.concat()[0]!==e}),t=P("concat"),fy=(e({target:"Array",proto:!0,arity:1,forced:!T||!t},{concat:function(e){for(var t,r,n,i=sy(this),o=py(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!oy(e))return!1;var t=e[ly];return void 0!==t?!!t:iy(e)}(n=-1===a?i:arguments[a]))for(r=ay(n),uy(s+r),t=0;t<r;t++,s++)t in n&&cy(o,s,n[t]);else uy(s+1),cy(o,s++,n);return o.length=s,o}}),us),hy=TypeError,Ed,dy=fs,vy=bs,yy=y,gy=Ed=function(e,t){if(!delete e[t])throw hy("Cannot delete property "+fy(t)+" of "+fy(e))},my=Math.min,Jh=rp,Ey=(g({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=dy(this),n=yy(r),i=vy(e,n),o=vy(t,n),e=2<arguments.length?arguments[2]:void 0,s=my((void 0===e?n:vy(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]:gy(r,i),i+=a,o+=a;return r}}),Jh("copyWithin"),Yc),wy=w,by=fs,_y=y,Ty=x,Iy=m([].push),N,_={forEach:(N=function(f){var h=1==f,d=2==f,v=3==f,y=4==f,g=6==f,m=7==f,E=5==f||g;return function(e,t,r,n){for(var i,o,s=by(e),a=wy(s),u=Ey(t,r),c=_y(a),p=0,t=n||Ty,l=h?t(e,c):d||m?t(e,0):void 0;p<c;p++)if((E||p in a)&&(o=u(i=a[p],p,s),f))if(h)l[p]=o;else if(o)switch(f){case 3:return!0;case 5:return i;case 6:return p;case 2:Iy(l,i)}else switch(f){case 4:return!1;case 7:Iy(l,i)}return g?-1:v||y?y:l}})(0),map:N(1),filter:N(2),some:N(3),every:N(4),find:N(5),findIndex:N(6),filterReject:N(7)},Ay=es,E=function(e,t){var r=[][e];return!!r&&Ay(function(){r.call(null,t||function(){return 1},1)})},A=g,Oy=_.every,Ny=(A({target:"Array",proto:!0,forced:!E("every")},{every:function(e){return Oy(this,e,1<arguments.length?arguments[1]:void 0)}}),fs),Sy=bs,Ry=y,P=rp,e=(g({target:"Array",proto:!0},{fill:function(e){for(var t=Ny(this),r=Ry(t),n=arguments.length,i=Sy(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:Sy(n,r);i<o;)t[i++]=e;return t}}),P("fill"),g),Cy=_.filter,T=(e({target:"Array",proto:!0,forced:!Gh("filter")},{filter:function(e){return Cy(this,e,1<arguments.length?arguments[1]:void 0)}}),g),My=_.find,t=rp,Jh,xy=!0,N=((Jh="find")in[]&&Array(1)[Jh](function(){xy=!1}),T({target:"Array",proto:!0,forced:xy},{find:function(e){return My(this,e,1<arguments.length?arguments[1]:void 0)}}),t(Jh),g),Py=_.findIndex,A=rp,P,Uy=!0,ky=((P="findIndex")in[]&&Array(1)[P](function(){Uy=!1}),N({target:"Array",proto:!0,forced:Uy},{findIndex:function(e){return Py(this,e,1<arguments.length?arguments[1]:void 0)}}),A(P),Yc),Dy=w,Ly=fs,Fy=y,e,T={findLast:(e=function(u){var c=1==u;return function(e,t,r){for(var n,i=Ly(e),o=Dy(i),s=ky(t,r),a=Fy(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:e(1)},t=g,Vy=T.findLast,Jh=rp,N=(t({target:"Array",proto:!0},{findLast:function(e){return Vy(this,e,1<arguments.length?arguments[1]:void 0)}}),Jh("findLast"),g),jy=T.findLastIndex,A=rp,By=(N({target:"Array",proto:!0},{findLastIndex:function(e){return jy(this,e,1<arguments.length?arguments[1]:void 0)}}),A("findLastIndex"),fl),Hy=y,zy=C,Gy=Yc,Ky=function(e,t,r,n,i,o,s,a){for(var u,c,p=i,l=0,f=!!s&&Gy(s,a);l<n;)l in r&&(u=f?f(r[l],l,t):r[l],0<o&&By(u)?(c=Hy(u),p=Ky(e,t,u,c,p,o-1)-1):(zy(p+1),e[p]=u),p++),l++;return p},P,Jy=P=Ky,Yy=fs,Wy=y,qy=ws,$y=x;g({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Yy(this),r=Wy(t),n=$y(t,0);return n.length=Jy(n,t,t,r,0,void 0===e?1:qy(e)),n}});function Xy(c){return function(e,t,r,n){Tg(t);var i=Ig(e),o=Ag(i),s=Og(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 Ng("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 Zy(e,t,r){for(var n=Kg(e),i=Gg(t,n),o=Gg(void 0===r?n:r,n),s=Yg(Wg(o-i,0)),a=0;i<o;i++,a++)Jg(s,a,e[i]);return s.length=a,s}function Qy(e,t){var r=e.length,n=$g(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 p=e,l=Qy(qg(e,0,n),t),f=Qy(qg(e,n),t),h=t,d=l.length,v=f.length,y=0,g=0;y<d||g<v;)p[y+g]=y<d&&g<v?h(l[y],f[g])<=0?l[y++]:f[g++]:y<d?l[y++]:f[g++];return p}var eg=P,tg=cs,rg=fs,ng=y,ig=x,og=(g({target:"Array",proto:!0},{flatMap:function(e){var t,r=rg(this),n=ng(r);return tg(e),(t=ig(r,0)).length=eg(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),_.forEach),e=E("forEach")?[].forEach:function(e){return og(this,e,1<arguments.length?arguments[1]:void 0)},t=(g({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e}),g),sg=bu.includes,Jh=rp,T=(t({target:"Array",proto:!0,forced:es(function(){return!Array(1).includes()})},{includes:function(e){return sg(this,e,1<arguments.length?arguments[1]:void 0)}}),Jh("includes"),g),N=m,ag=bu.indexOf,A=E,ug=N([].indexOf),cg=!!ug&&1/ug([1],1,-0)<0,P=A("indexOf"),e=(T({target:"Array",proto:!0,forced:cg||!P},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return cg?ug(this,e,t)||0:ag(this,e,t)}}),g),t=w,pg=is,Jh=E,lg=m([].join),bu=t!=Object,N=Jh("join",","),fg=(e({target:"Array",proto:!0,forced:bu||!N},{join:function(e){return lg(pg(this),void 0===e?",":e)}}),Al),hg=is,dg=ws,vg=y,A=E,yg=Math.min,gg=[].lastIndexOf,mg=!!gg&&1/[1].lastIndexOf(1,-0)<0,T=A("lastIndexOf"),P=mg||!T?function(e){if(mg)return fg(gg,this,arguments)||0;var t=hg(this),r=vg(t),n=r-1;for((n=1<arguments.length?yg(n,dg(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:gg,t=(g({target:"Array",proto:!0,forced:P!==[].lastIndexOf},{lastIndexOf:P}),g),Eg=_.map,Jh=(t({target:"Array",proto:!0,forced:!Gh("map")},{map:function(e){return Eg(this,e,1<arguments.length?arguments[1]:void 0)}}),g),wg=fs,bg=y,_g=C,e=es(function(){return 4294967297!==[].push.call({length:4294967296},1)}),bu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),Tg=(Jh({target:"Array",proto:!0,arity:1,forced:e||bu},{push:function(e){var t=wg(this),r=bg(t),n=arguments.length;_g(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),cs),Ig=fs,Ag=w,Og=y,Ng=TypeError,N={left:Xy(!1),right:Xy(!0)},Al=g,Sg=N.left,A=$s,T=M,P=(Al({target:"Array",proto:!0,forced:!E("reduce")||!T&&79<A&&A<83},{reduce:function(e){var t=arguments.length;return Sg(this,e,t,1<t?arguments[1]:void 0)}}),g),Rg=N.right,t=$s,Jh=M,e=(P({target:"Array",proto:!0,forced:!E("reduceRight")||!Jh&&79<t&&t<83},{reduceRight:function(e){return Rg(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),g),Cg=fl,Mg=m([].reverse),bu=[1,2],Al=(e({target:"Array",proto:!0,forced:String(bu)===String(bu.reverse())},{reverse:function(){return Cg(this)&&(this.length=this.length),Mg(this)}}),g),xg=fl,Pg=R,Ug=ss,kg=bs,Dg=y,Lg=is,Fg=S,T=ds,Vg=wa,A=Gh("slice"),jg=T("species"),Bg=Array,Hg=Math.max,N=(Al({target:"Array",proto:!0,forced:!A},{slice:function(e,t){var r,n,i,o=Lg(this),s=Dg(o),a=kg(e,s),u=kg(void 0===t?s:t,s);if(xg(o)&&(r=o.constructor,(r=Pg(r)&&(r===Bg||xg(r.prototype))||Ug(r)&&null===(r=r[jg])?void 0:r)===Bg||void 0===r))return Vg(o,a,u);for(n=new(void 0===r?Bg:r)(Hg(u-a,0)),i=0;a<u;a++,i++)a in o&&Fg(n,i,o[a]);return n.length=i,n}}),g),zg=_.some,Gg=(N({target:"Array",proto:!0,forced:!E("some")},{some:function(e){return zg(this,e,1<arguments.length?arguments[1]:void 0)}}),bs),Kg=y,Jg=S,Yg=Array,Wg=Math.max,qg=Zy,$g=Math.floor,M=Qy,P=qs.match(/firefox\/(\d+)/i),Jh=!!P&&+P[1],t=/MSIE|Trident/.test(qs),e=qs.match(/AppleWebKit\/(\d+)\./),bu=!!e&&+e[1],wa=g,T=m,Xg=cs,Zg=fs,Qg=y,em=Ed,tm=ep,Al=es,rm=M,A=E,nm=Jh,im=t,om=$s,sm=bu,am=[],um=T(am.sort),cm=T(am.push),N=Al(function(){am.sort(void 0)}),P=Al(function(){am.sort(null)}),qs=A("sort"),pm=!Al(function(){if(om)return om<70;if(!(nm&&3<nm)){if(im)return!0;if(sm)return sm<603;for(var e,t,r,n="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)am.push({k:e+r,v:t})}for(am.sort(function(e,t){return t.v-e.v}),r=0;r<am.length;r++)e=am[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});wa({target:"Array",proto:!0,forced:N||!P||!qs||!pm},{sort:function(e){void 0!==e&&Xg(e);var t=Zg(this);if(pm)return void 0===e?um(t):um(t,e);for(var r,n,i=[],o=Qg(t),s=0;s<o;s++)s in t&&cm(i,t[s]);for(rm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:tm(e)>tm(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)em(t,s++);return t}});af("Array");var e=g,lm=fs,fm=bs,hm=ws,dm=y,vm=C,ym=x,gm=S,mm=Ed,M=Gh("splice"),Em=Math.max,wm=Math.min;e({target:"Array",proto:!0,forced:!M},{splice:function(e,t){var r,n,i,o,s,a,u=lm(this),c=dm(u),p=fm(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-p):(r=e-2,wm(Em(hm(t),0),c-p)),vm(c+r-n),i=ym(u,n),o=0;o<n;o++)(s=p+o)in u&&gm(i,o,u[s]);if(r<(i.length=n)){for(o=p;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:mm(u,a);for(o=c;c-n+r<o;o--)mm(u,o-1)}else if(n<r)for(o=c-n;p<o;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:mm(u,a);for(o=0;o<r;o++)u[o+p]=arguments[o+2];return u.length=c-n+r,i}}),rp("flat");rp("flatMap");var Jh=g,bm=fs,_m=y,Tm=Ed,Im=C,t=1!==[].unshift(0),$s=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();Jh({target:"Array",proto:!0,arity:1,forced:t||$s},{unshift:function(e){var t=bm(this),r=_m(t),n=arguments.length;if(n){Im(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:Tm(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});Oa.Array;var bu={exports:{}},T={},Am=rs,Om=is,Nm=Xs.f,Sm=Zy,Rm="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];T.f=function(e){if(!Rm||"Window"!=Am(e))return Nm(Om(e));try{return Nm(e)}catch(e){return Sm(Rm)}};function Cm(e){Hm(e,Wm,{value:{objectID:"O"+qm++,weakData:{}}})}function Mm(e,t,r){for(var n in t)dE(e,n,t[n],r);return e}function xm(e,t){for(var r=0,n=NE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Pm(e,t,r,n){for(var i,o,s,a=CE(e),u=RE(a),c=SE(t,r),p=PE(null),l=xE(u),f=0;f<l;f++)s=u[f],(o=ME(c(s,f,a)))in p?DE(p[o],s):p[o]=[s];if(n&&(i=n(a))!==kE)for(o in p)p[o]=UE(i,p[o]);return p}var A=es(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),Al=es,Um=ss,km=rs,Dm=A,Lm=Object.isExtensible,wa=Al(function(){Lm(1)})||Dm?function(e){return!!Um(e)&&((!Dm||"ArrayBuffer"!=km(e))&&(!Lm||Lm(e)))}:Lm,N=!es(function(){return Object.isExtensible(Object.preventExtensions({}))}),Fm=g,Vm=m,P=du,jm=ss,Bm=I,Hm=Ia.f,zm=Xs,Gm=T,Km=wa,Jm=N,Ym=!1,Wm=hs("meta"),qm=0,$m=bu.exports={enable:function(){$m.enable=function(){},Ym=!0;var i=zm.f,o=Vm([].splice),e={};e[Wm]=1,i(e).length&&(zm.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===Wm){o(t,r,1);break}return t},Fm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Gm.f}))},fastKey:function(e,t){if(!jm(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Bm(e,Wm)){if(!Km(e))return"F";if(!t)return"E";Cm(e)}return e[Wm].objectID},getWeakData:function(e,t){if(!Bm(e,Wm)){if(!Km(e))return!0;if(!t)return!1;Cm(e)}return e[Wm].weakData},onFreeze:function(e){return Jm&&Ym&&Km(e)&&!Bm(e,Wm)&&Cm(e),e}},Xm=(P[Wm]=!0,os),Zm=ss,Qm=Lc,eE=g,tE=i,rE=m,nE=wu,iE=Es,oE=bu.exports,sE=Qc,aE=uf,uE=os,cE=ss,pE=es,lE=wd,fE=Ol,hE=function(e,t,r){return Qm&&Xm(t=t.constructor)&&t!==r&&Zm(t=t.prototype)&&t!==r.prototype&&Qm(e,t),e},dE=Es,vE=Ia.f,yE=Fc,gE=Mm,mE=Yc,EE=uf,wE=Qc,bE=Rl,_E=af,TE=Q,IE=bu.exports.fastKey,AE=z.set,OE=z.getterFor,NE=(function(e,t,r){function n(e){var r=rE(h[e]);iE(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(p&&!cE(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return p&&!cE(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(p&&!cE(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"),p=-1!==e.indexOf("Weak"),l=c?"set":"add",f=tE[e],h=f&&f.prototype,d=f,v={};return nE(e,!uE(f)||!(p||h.forEach&&!pE(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,l),oE.enable()):nE(e,!0)&&(o=(i=new d)[l](p?{}:-0,1)!=i,s=pE(function(){i.has(1)}),a=lE(function(e){new f(e)}),u=!p&&pE(function(){for(var e=new f,t=5;t--;)e[l](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){aE(e,h);e=hE(new f,e,d);return null!=t&&sE(t,e[l],{that:e,AS_ENTRIES:c}),e})).prototype=h).constructor=d),(s||u)&&(n("delete"),n("has"),c&&n("get")),(u||o)&&n(l),p&&h.clear&&delete h.clear),v[e]=d,eE({global:!0,constructor:!0,forced:d!=f},v),fE(d,e),p||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=IE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),TE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=IE(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){EE(e,a),AE(e,{type:r,index:yE(null),first:void 0,last:void 0,size:0}),TE||(e.size=0),null!=t&&wE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=OE(r);return gE(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,TE?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),TE?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=mE(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)}}),gE(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)}}),TE&&vE(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=OE(t),o=OE(n);bE(e,t,function(e,t){AE(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),_E(t)}}),y),SE=Yc,RE=w,CE=fs,ME=vs,xE=y,PE=Fc,UE=xm,kE=Array,DE=m([].push),LE=Pm,qs=rp;g({target:"Array",proto:!0},{group:function(e){return LE(this,e,1<arguments.length?arguments[1]:void 0)}}),qs("group");var FE=Pm,S=rp;g({target:"Array",proto:!0,forced:!E("groupBy")},{groupBy:function(e){return FE(this,e,1<arguments.length?arguments[1]:void 0)}}),S("groupBy");function VE(e){for(var t,r,n=HE(this),i=BE(n),o=jE(e,1<arguments.length?arguments[1]:void 0),s=new GE,a=zE(i),u=0;u<a;u++)t=o(r=i[u],u,n),JE(s,t)?WE(KE(s,t),r):YE(s,t,[r]);return s}var jE=Yc,Gh=m,BE=w,HE=fs,zE=y,GE=as("Map"),e=GE.prototype,KE=Gh(e.get),JE=Gh(e.has),YE=Gh(e.set),WE=Gh([].push),M=rp,Ed=VE;g({target:"Array",proto:!0,name:"groupToMap",forced:!E("groupByToMap")},{groupByToMap:Ed}),M("groupByToMap");function qE(e){return ew[e].prototype}var Jh=rp,$E=(g({target:"Array",proto:!0},{groupToMap:VE}),Jh("groupToMap"),y),XE=function(e,t){for(var r=$E(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},ZE=is,t=rp,QE=Array,ew=(g({target:"Array",proto:!0},{toReversed:function(){return XE(ZE(this),QE)}}),t("toReversed"),i),$s=g,tw=cs,rw=is,nw=xm,Oa=rp,iw=Array,ow=m(qE("Array").sort),A=($s({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&tw(e);var t=rw(this),t=nw(iw,t);return ow(t,e)}}),Oa("toSorted"),g),Al=rp,sw=C,aw=y,uw=bs,cw=is,pw=ws,lw=Array,fw=Math.max,hw=Math.min,dw=(A({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=cw(this),a=aw(s),u=uw(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,hw(fw(pw(t),0),a-u)),i=sw(a+r-n),o=lw(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}}),Al("toSpliced"),y),vw=ws,yw=RangeError,gw=function(e,t,r,n){var i=dw(e),r=vw(r),o=r<0?i+r:r;if(i<=o||o<0)throw yw("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},mw=is,Ew=Array;g({target:"Array",proto:!0},{with:function(e,t){return gw(mw(this),Ew,e,t)}});du=i,I=da,Xs=os,T=O,wa=Es,N="USE_FUNCTION_CONSTRUCTOR",P=ds("asyncIterator"),Lc=du.AsyncIterator,wu=I.AsyncIteratorPrototype;if(wu)Vb=wu;else if(Xs(Lc))Vb=Lc.prototype;else if(I[N]||du[N])try{Cb=T(T(T(Function("return async function*(){}()")()))),T(Cb)===Object.prototype&&(Vb=Cb)}catch(e){}Xs((Vb=Vb||{})[P])||wa(Vb,P,function(){return this});function ww(e,t,r){var n=e.done;Sw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function bw(e){Cw(this,{type:Rw,iterator:Ow(e),next:e.next})}function _w(e){var f=0==e,h=1==e,d=2==e,v=3==e;return function(e,s,a){var e=Ww(e),u=Yw("Promise"),c=e.iterator,t=e.next,p=0,l=void 0!==s;return!l&&f||Gw(s),new u(function(r,n){var i=function(e){qw(c,n,e,n)},o=function(){try{if(f&&l)try{Jw(p)}catch(e){i(e)}u.resolve(Kw(zw(t,c))).then(function(e){try{if(Kw(e).done)f?(a.length=p,r(a)):r(!v&&(d||void 0));else{var t=e.value;try{l?u.resolve(f?s(t,p):s(t)).then(function(e){if(h)o();else if(d)e?o():qw(c,r,!1,n);else if(f)try{a[p++]=e,o()}catch(e){i(e)}else e?qw(c,r,v||t,n):o()},i):(a[p++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function Tw(e,t){if(!l0||!p0(e)||!l0(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 Iw(e,t,r){return r.get&&f0(r.get,t,{getter:!0}),r.set&&f0(r.set,t,{setter:!0}),h0.f(e,t,r)}var Aw=r,Ow=gs,bu=Fc,Nw=ps,qs=Mm,S=z,w=Vb,Sw=as("Promise"),Rw="AsyncFromSyncIterator",Cw=S.set,Mw=S.getterFor(Rw),e=(bw.prototype=qs(bu(w),{next:function(){var n=Mw(this);return new Sw(function(e,t){var r=Ow(Aw(n.next,n.iterator));ww(r,e,t)})},return:function(){var n=Mw(this).iterator;return new Sw(function(e,t){var r=Nw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=Ow(Aw(r,n));ww(r,e,t)})}}),bw),xw=r,Pw=e,Uw=gs,kw=$c,Dw=ps,Lw=ds("asyncIterator"),Fw=cs,Vw=gs,jw=r,Bw=as,Hw=ps,zw=r,Gw=cs,Kw=gs,Jw=C,Yw=as,Ww=function(e){return{iterator:e,next:Fw(Vw(e).next)}},qw=function(e,t,r,n){try{var i=Hw(e,"return");if(i)return Bw("Promise").resolve(jw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},Gh={toArray:_w(0),forEach:_w(1),every:_w(2),some:_w(3),find:_w(4)},$w=Yc,Xw=fs,Zw=R,Qw=function(e,t){t=arguments.length<2?Dw(e,Lw):t;return t?Uw(xw(t,e)):new Pw(kw(e))},e0=$c,t0=qc,r0=ps,E=qE,n0=as,Ed=ds,i0=e,o0=Gh.toArray,s0=Ed("asyncIterator"),a0=E("Array").values,M=(g({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(n0("Promise"))(function(e){var t=Xw(o),r=(void 0!==a&&(a=$w(a,u)),r0(t,s0)),n=r?void 0:t0(t)||a0,i=Zw(s)?new s:[],r=r?Qw(t,r):new i0(e0(t,n));e(o0(r,a,i))})}}),g),u0=_.filterReject,Jh=rp,t=(M({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return u0(this,e,1<arguments.length?arguments[1]:void 0)}}),Jh("filterOut"),g),c0=_.filterReject,$s=rp,Oa=(t({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return c0(this,e,1<arguments.length?arguments[1]:void 0)}}),$s("filterReject"),g),p0=fl,l0=Object.isFrozen,f0=(Oa({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!Tw(e,!0))return!1;var t=e.raw;return t.length===e.length&&Tw(t,!1)}}),b.exports),h0=Ia,A=rp,d0=fs,v0=y;Q&&(Iw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=d0(this),t=v0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=d0(this),r=v0(t);return t[0==r?0:r-1]=e}}),A("lastItem"));var Al=rp,y0=fs,g0=y;Q&&(Iw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=y0(this),e=g0(e);return 0==e?0:e-1}}),Al("lastIndex"));var i=m,m0=cs,E0=y,w0=fs,b0=x,_0=as("Map"),da=_0.prototype,T0=i(da.forEach),I0=i(da.has),A0=i(da.set),O0=i([].push),O=rp;g({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=w0(this),i=E0(n),o=b0(n,0),s=new _0,a=null!=e?m0(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),I0(s,r)||A0(s,r,t);return T0(s,function(e){O0(o,e)}),o}}),O("uniqueBy");S0.exposure=function(e,t,r,n){return new C0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},S0.track=function(e,t,r,n){return new P0(n,r,e,t)},S0.remoteConfig=function(e,t,r,n){return new D0(n,e,t.parameter,t.valueId,t.reason,r)},S0.isExposureEvent=function(e){return void 0!==e.experiment},S0.isTrackEvent=function(e){return void 0!==e.eventType},S0.isRemoteConfigEvent=function(e){return void 0!==e.parameter},S0.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},S0.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},S0.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},S0.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[Bt.ID],identifiers:this.user.identifiers,userProperties:Ue.sanitize(this.user.properties),hackleProperties:Ue.sanitize(this.user.hackleProperties)}};var N0=S0;function S0(e,t,r){void 0===r&&(r=H()),this.timestamp=e,this.user=t,this.insertId=r}Se(M0,R0=N0),M0.prototype.copyWithUser=function(e){return new M0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},M0.prototype.toDto=function(){return c(c({},R0.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 R0,C0=M0;function M0(e,t,r,n,i,o,s,a){e=R0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}Se(U0,x0=N0),U0.prototype.copyWithUser=function(e){return new U0(this.timestamp,e,this.eventType,this.event,this.insertId)},U0.prototype.toDto=function(){return c(c({},x0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Ue.sanitize(this.event.properties)})};var x0,P0=U0;function U0(e,t,r,n,i){e=x0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}Se(L0,k0=N0),L0.prototype.copyWithUser=function(e){return new L0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},L0.prototype.toDto=function(){return c(c({},k0.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Ue.sanitize(this.properties)})};var k0,D0=L0;function L0(e,t,r,n,i,o,s){e=k0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}V0.isSessionEvent=function(e){return!!N0.isTrackEvent(e)&&(e.event.key===V0.SESSION_START_EVENT_NAME||e.event.key===V0.SESSION_END_EVENT_NAME)},V0.prototype.onSessionStarted=function(e,t,r){this.track(V0.SESSION_START_EVENT_NAME,e,t,r)},V0.prototype.onSessionEnded=function(e,t,r){this.track(V0.SESSION_END_EVENT_NAME,e,t,r)},V0.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)},V0.prototype.decorateSession=function(e,t){t=(new Gt).add(Bt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},V0.SESSION_START_EVENT_NAME="$session_start",V0.SESSION_END_EVENT_NAME="$session_end";var F0=V0;function V0(e,t){this.userManager=e,this.core=t}B0.prototype.process=function(e){var t;F0.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=e.copyWithUser(e.user),t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[Bt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[Bt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},B0.prototype.flush=function(e){this.delegate.flush(e)},B0.prototype.close=function(){this.delegate.close()},B0.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.flush(!0);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var j0=B0;function B0(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}z0.toEvent=function(e){var t;return{key:z0.EVENT_KEY,properties:{level:z0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:z0._stacktrace(e)}}},z0._stacktrace=function(e){return u.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,z0.STACK_TRACK_LIMIT).join("\n")},z0.EVENT_KEY="$trace",z0.LEVEL_ERROR="error",z0.STACK_TRACK_LIMIT=30;var H0=z0;function z0(){}G0.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)}};wu=G0;function G0(){}J0.prototype.with=function(e){return new J0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},J0.of=function(e,t,r,n){return new J0(n,t.targetEvaluations,e.experiment,r.id,r.key,r.config)},J0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return u.isNotNullOrUndefined(n)?this.of(e,t,n,r):new J0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)};var K0=J0;function J0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}Se(q0,Y0=wu),q0.prototype.supports=function(e){return void 0!==e.experiment},q0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:K0.ofDefault(e,t,l.TRAFFIC_NOT_ALLOCATED)};var Y0,W0=q0;function q0(e){var t=Y0.call(this)||this;return t.evaluationFlowFactory=e,t}X0.of=function(e,t,r,n,i,o){return o.returnValue=Ue.truncateStringValue(n),new X0(i,t.targetEvaluations,e.parameter,r,n,o)},X0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var $0=X0;function X0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}Se(eb,Z0=wu),eb.prototype.supports=function(e){return void 0!==e.parameter},eb.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=Ue.truncateStringValue(e.defaultValue),u.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return $0.ofDefault(e,t,l.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return u.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,l.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,l.DEFAULT_RULE,r)},eb.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?$0.ofDefault(e,t,l.TYPE_MISMATCH,i):$0.of(e,t,r.id,r.rawValue,n,i)};var Z0,Q0=eb;function eb(e){var t=Z0.call(this)||this;return t.targetRuleDeterminer=e,t}rb.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var tb=rb;function rb(e,t){this.type=e,this.id=t}ib.create=function(){return new ib},Object.defineProperty(ib.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(ib.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(ib.prototype,"properties",{get:function(){return Ue.sanitize(this._properties)},enumerable:!1,configurable:!0}),ib.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},ib.prototype.addRequest=function(e){this._stack.push(e)},ib.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},ib.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof K0&&e.experiment.id===t.id})},ib.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},ib.prototype.setProperty=function(e,t){this._properties[e]=t};var nb=ib;function ib(){this._stack=[],this._targetEvaluations=[],this._properties={}}sb.of=function(e,t,r,n){return new sb(e,t,r,n)},sb.by=function(e,t){return new sb(e.workspace,e.user,t,"A")},sb.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var ob=sb;function sb(e,t,r,n){this.key=new tb("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}ub.of=function(e,t,r,n,i){return new ub(e,t,r,n,i)},ub.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var ab=ub;function ub(e,t,r,n,i){this.key=new tb("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}pb.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();case"boolean":return e?"true":"false";default:return}},pb.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},pb.asBoolean=function(e){switch(typeof e){case"boolean":return e;case"string":switch(e){case"true":return!0;case"false":return!1;default:return}default:return}},pb.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var cb=pb;function pb(){}fb.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 lb=fb;function fb(e){this.storages=e}db.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},db.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return cb.asNumber(e)},db.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=cb.asNumber(t),e=cb.asNumber(e);u.isNullOrUndefined(t)||t<0||u.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},db.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},db.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},db.prototype.clear=function(){this.listStorage.clear()};var hb=db;function db(e){this.listStorage=e}yb.prototype.add=function(e){this.evaluators.push(e)},yb.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(u.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)};var vb=yb;function yb(){this.evaluators=new Array}mb.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},mb.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},mb.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var gb=mb;function mb(e){this.conditionMatcherFactory=e}wb.prototype.decorate=function(e){return e};var Eb=wb;function wb(){}_b.prototype.decorate=function(e){return"string"==typeof e?Vo.decodeURIOrOriginal(e):e};var bb=_b;function _b(){}Ib.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)},Ib.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)},Ib.prototype.singleMatches=function(t,e,r,n,i){return e.values.some(function(e){return r.matches(n,i.decorate(t),i.decorate(e))})},Ib.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},Ib.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var Tb=Ib;function Ib(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}Ab.prototype.booleanMatches=function(e,t){return e===t},Ab.prototype.numberMatches=function(e,t){return e===t},Ab.prototype.stringMatches=function(e,t){return e===t},Ab.prototype.versionMatches=function(e,t){return e.isEqualTo(t)},Ab.prototype.urlMatches=function(e,t){return Vo.decodeURIOrOriginal(Vo.removePathnameTrailingSlash(e))===Vo.decodeURIOrOriginal(Vo.removePathnameTrailingSlash(t))};Lc=Ab;function Ab(){}Ob.prototype.booleanMatches=function(e,t){return!1},Ob.prototype.numberMatches=function(e,t){return!1},Ob.prototype.stringMatches=function(e,t){return e.includes(t)},Ob.prototype.versionMatches=function(e,t){return!1},Ob.prototype.urlMatches=function(e,t){e=Vo.decodeURIOrOriginal(e.href);return e.includes(t)||e.includes(encodeURI(t))};I=Ob;function Ob(){}Nb.prototype.booleanMatches=function(e,t){return!1},Nb.prototype.numberMatches=function(e,t){return!1},Nb.prototype.stringMatches=function(e,t){return e.startsWith(t)},Nb.prototype.versionMatches=function(e,t){return!1},Nb.prototype.urlMatches=function(e,t){e=Vo.decodeURIOrOriginal(e.href);return e.startsWith(t)||e.startsWith(encodeURI(t))};du=Nb;function Nb(){}Sb.prototype.booleanMatches=function(e,t){return!1},Sb.prototype.numberMatches=function(e,t){return!1},Sb.prototype.stringMatches=function(e,t){return e.endsWith(t)},Sb.prototype.versionMatches=function(e,t){return!1},Sb.prototype.urlMatches=function(e,t){return!1};N=Sb;function Sb(){}Rb.prototype.booleanMatches=function(e,t){return!1},Rb.prototype.numberMatches=function(e,t){return t<e},Rb.prototype.stringMatches=function(e,t){return t<e},Rb.prototype.versionMatches=function(e,t){return e.isGreaterThan(t)},Rb.prototype.urlMatches=function(e,t){return!1};T=Rb;function Rb(){}Mb.prototype.booleanMatches=function(e,t){return!1},Mb.prototype.numberMatches=function(e,t){return t<=e},Mb.prototype.stringMatches=function(e,t){return t<=e},Mb.prototype.versionMatches=function(e,t){return e.isGreaterThanOrEqualTo(t)},Mb.prototype.urlMatches=function(e,t){return!1};var Cb=Mb;function Mb(){}xb.prototype.booleanMatches=function(e,t){return!1},xb.prototype.numberMatches=function(e,t){return e<t},xb.prototype.stringMatches=function(e,t){return e<t},xb.prototype.versionMatches=function(e,t){return e.isLessThan(t)},xb.prototype.urlMatches=function(e,t){return!1};Xs=xb;function xb(){}Pb.prototype.booleanMatches=function(e,t){return!1},Pb.prototype.numberMatches=function(e,t){return e<=t},Pb.prototype.stringMatches=function(e,t){return e<=t},Pb.prototype.versionMatches=function(e,t){return e.isLessThanOrEqualTo(t)},Pb.prototype.urlMatches=function(e,t){return!1};wa=Pb;function Pb(){}kb.prototype.getMatcher=function(e){switch(e){case"IN":return kb.IN_MATCHER;case"CONTAINS":return kb.CONTAINS_MATCHER;case"STARTS_WITH":return kb.STARTS_WITH_MATCHER;case"ENDS_WITH":return kb.ENDS_WITH_MATCHER;case"GT":return kb.GT_MATCHER;case"GTE":return kb.GTE_MATCHER;case"LT":return kb.LT_MATCHER;case"LTE":return kb.LTE_MATCHER}},kb.IN_MATCHER=new Lc,kb.CONTAINS_MATCHER=new I,kb.STARTS_WITH_MATCHER=new du,kb.ENDS_WITH_MATCHER=new N,kb.GT_MATCHER=new T,kb.GTE_MATCHER=new Cb,kb.LT_MATCHER=new Xs,kb.LTE_MATCHER=new wa;var Ub=kb;function kb(){}Db.prototype.matches=function(e,t,r){t=cb.asString(t),r=cb.asString(r);return!u.isNullOrUndefined(t)&&!u.isNullOrUndefined(r)&&e.stringMatches(t,r)};P=Db;function Db(){}Lb.prototype.matches=function(e,t,r){t=cb.asNumber(t),r=cb.asNumber(r);return!u.isNullOrUndefined(t)&&!u.isNullOrUndefined(r)&&e.numberMatches(t,r)};Fc=Lb;function Lb(){}Fb.prototype.matches=function(e,t,r){t=cb.asBoolean(t),r=cb.asBoolean(r);return!u.isNullOrUndefined(t)&&!u.isNullOrUndefined(r)&&e.booleanMatches(t,r)};z=Fb;function Fb(){}jb.prototype.matches=function(e,t,r){t=gr.tryParse(t),r=gr.tryParse(r);return!(!t||!r)&&e.versionMatches(t,r)};var Vb=jb;function jb(){}Bb.prototype.matches=function(e,t,r){t=Vo.tryParse(t),r=cb.asString(r);return!u.isNullOrUndefined(t)&&!u.isNullOrUndefined(r)&&e.urlMatches(t,r)};S=Bb;function Bb(){}Hb.prototype.matches=function(e,t,r){return!1};qs=Hb;function Hb(){}Gb.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return Gb.STRING_MATCHER;case"NUMBER":return Gb.NUMBER_MATCHER;case"BOOLEAN":return Gb.BOOLEAN_MATCHER;case"VERSION":return Gb.VERSION_MATCHER;case"URL":return Gb.URL_MATCHER;case"NULL":case"UNKNOWN":return Gb.NULL_MATCHER}},Gb.STRING_MATCHER=new P,Gb.NUMBER_MATCHER=new Fc,Gb.BOOLEAN_MATCHER=new z,Gb.VERSION_MATCHER=new Vb,Gb.URL_MATCHER=new S,Gb.NULL_MATCHER=new qs;var zb=Gb;function Gb(){}Jb.prototype.matches=function(e,t,r){e=this.userValueResolver.resolveOrNull(e.user,r.key);if(u.isNullOrUndefined(e))return!1;var n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},Jb.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?bb:Eb)};var Kb=Jb;function Jb(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}Wb.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];default:throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}};var Yb=Wb;function Wb(){}$b.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}},$b.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 qb=$b;function $b(e){this.segmentMatcher=e}Zb.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},Zb.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var Xb=Zb;function Zb(e){this.userConditionMatcher=e}e_.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);default:throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}};var Qb=e_;function e_(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}t_.prototype.matches=function(e,t,r){var n=u.requiredNotNullOrUndefined(cb.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(u.isNullOrUndefined(n))return!1;var i=null!=(i=t.getEvaluation(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},t_.prototype.evaluate=function(e,t,r){r=ob.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e};bu=t_;function t_(e,t){this.evaluator=e,this.valueOperatorMatcher=t}Se(i_,r_=bu),i_.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},i_.prototype.resolve=function(e,t){return e instanceof ob&&t.reason===l.TRAFFIC_ALLOCATED?t.with(l.TRAFFIC_ALLOCATED_BY_TARGETING):t},i_.prototype.evaluationMatches=function(e,t){return!!i_.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},i_.AB_TEST_MATCHED_REASONS=[l.OVERRIDDEN,l.TRAFFIC_ALLOCATED,l.EXPERIMENT_COMPLETED,l.TRAFFIC_ALLOCATED_BY_TARGETING];var r_,n_=i_;function i_(e,t){return r_.call(this,e,t)||this}Se(a_,o_=bu),a_.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},a_.prototype.resolve=function(e,t){return t},a_.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var o_,s_=a_;function a_(e,t){return o_.call(this,e,t)||this}c_.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return!u.isNullOrUndefined(e)&&this.valueOperatorMatcher.matches(e,r.match)},c_.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var u_=c_;function c_(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}l_.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,"]"))}},l_.prototype.properties=function(e){return N0.isTrackEvent(e)?e.event.properties:N0.isExposureEvent(e)||N0.isRemoteConfigEvent(e)?e.properties:void 0};var p_=l_;function l_(){}h_.prototype.matches=function(e,t,r){if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));e=null!=(e=null==(e=e.user.cohorts)?void 0:e.map(function(e){return e.id}))?e:[];return this.valueOperatorMatcher.matches(e,r.match)};var f_=h_;function h_(e){this.valueOperatorMatcher=e}v_.prototype.supports=function(e){return"NUMBER_OF_EVENTS_IN_DAYS"===e||"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"===e},v_.prototype.matches=function(e,t,r){var n,i=r.key.type;if(!this.supports(i))throw new Error("Unsupported TargetKeyType [".concat(i,"]"));var o=null!=(n=e.user.targetEvents)?n:[];switch(i){case"NUMBER_OF_EVENTS_IN_DAYS":return new m_(this.valueOperatorMatcher,this.clock).matches(e,o,r);case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return new b_(this.valueOperatorMatcher,this.clock).matches(e,o,r);default:return i}};var d_=v_;function v_(e,t){this.valueOperatorMatcher=e,this.clock=t}function y_(){}Se(E_,g_=y_),E_.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-Le.daysToUnit(i.days,"milliseconds"),t=t.filter(function(e){return n.expressionMatch(e,i)}),t=f.sum(t,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(t,r.match)},E_.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&null===e.property},E_.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var g_,m_=E_;function E_(e,t){var r=g_.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}Se(__,w_=y_),__.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-Le.daysToUnit(i.days,"milliseconds"),t=t.filter(function(e){return n.expressionMatch(e,i)}),t=f.sum(t,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(t,r.match)},__.prototype.propertyMatch=function(e,t){return(null==e?void 0:e.type)===t.key.type&&e.key===t.key.name&&this.valueOperatorMatcher.matches(e.value,t.match)},__.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&this.propertyMatch(e.property,t.propertyFilter)},__.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var w_,b_=__;function __(e,t){var r=w_.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}I_.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;case"NUMBER_OF_EVENTS_IN_DAYS":case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return this.userTargetConditionMatcher;default:return e}};var T_=I_;function I_(e,t){var r=new Tb(new zb,new Ub);this.userConditionMatcher=new Kb(new Yb,r),this.eventConditionMatcher=new u_(new p_,r),this.segmentConditionMatcher=new qb(new Xb(this.userConditionMatcher)),this.experimentConditionMatcher=new Qb(new n_(e,r),new s_(e,r)),this.cohortConditionMatcher=new f_(r),this.userTargetConditionMatcher=new d_(r,t)}O_.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},O_.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},O_.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 A_=O_;function O_(e){this.bucketer=e}var N_={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}},S_=(R_.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},R_.prototype.calculateSlotNumber=function(e,t,r){r=N_.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},R_);function R_(){}M_.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},M_.end=function(){return new M_(void 0,void 0)},M_.decision=function(e,t){return new M_(e,t)},M_.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 C_=M_;function M_(e,t){this.flowEvaluator=e,this.nextFlow=t}P_.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 K0.of(e,t,n,l.OVERRIDDEN);case"FEATURE_FLAG":return K0.of(e,t,n,l.INDIVIDUAL_TARGET_MATCH)}};var x_=P_;function P_(e){this.overrideResolver=e}k_.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?K0.ofDefault(e,t,l.EXPERIMENT_DRAFT):r.evaluate(e,t)};var U_=k_;function k_(){}L_.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return K0.ofDefault(e,t,l.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return K0.ofDefault(e,t,l.FEATURE_FLAG_INACTIVE)}};var D_=L_;function L_(){}V_.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return K0.of(e,t,r,l.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var F_=V_;function V_(){}B_.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):K0.ofDefault(e,t,l.NOT_IN_EXPERIMENT_TARGET)};var j_=B_;function B_(e){this.experimentTargetDeterminer=e}z_.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?K0.ofDefault(e,t,l.VARIATION_DROPPED):K0.of(e,t,n,l.TRAFFIC_ALLOCATED):K0.ofDefault(e,t,l.TRAFFIC_NOT_ALLOCATED)};var H_=z_;function z_(e){this.actionResolver=e}K_.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 K0.of(e,t,r,l.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var G_=K_;function K_(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}Y_.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 K0.ofDefault(e,t,l.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return K0.of(e,t,n,l.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var J_=Y_;function Y_(e){this.actionResolver=e}q_.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):K0.ofDefault(e,t,l.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var W_=q_;function q_(e){this.containerResolver=e}X_.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):K0.ofDefault(e,t,l.IDENTIFIER_NOT_FOUND)};var $_=X_;function X_(){}Q_.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 Z_=Q_;function Q_(e){this.targetMatcher=e}tT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var eT=tT;function tT(e){this.targetMatcher=e}nT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},nT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},nT.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)}},nT.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 rT=nT;function nT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}oT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(u.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(u.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(u.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(u.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var iT=oT;function oT(e){this.bucketer=e}aT.of=function(e,t,r,n){return new aT(r,t.targetEvaluations,e.inAppMessage,n,t.properties)};var sT=aT;function aT(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n,this.properties=i}cT.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):sT.of(e,t,l.UNSUPPORTED_PLATFORM)};var uT=cT;function cT(){}lT.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),sT.of(e,t,l.OVERRIDDEN,n)):r.evaluate(e,t)};var pT=lT;function lT(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}hT.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?sT.of(e,t,l.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var fT=hT;function hT(){}vT.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?sT.of(e,t,l.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var dT=vT;function vT(){}gT.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):sT.of(e,t,l.NOT_IN_IN_APP_MESSAGE_PERIOD)};var yT=gT;function gT(){}ET.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?sT.of(e,t,l.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var mT=ET;function ET(e){this.hiddenMatcher=e}bT.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),sT.of(e,t,l.IN_APP_MESSAGE_TARGET,n)):sT.of(e,t,l.NOT_IN_IN_APP_MESSAGE_TARGET)};var wT=bT;function bT(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}TT.prototype.resolve=function(e,t){return null!=(t=this.resolveExperiment(e,t))?t:this.resolveDefault(e)},TT.prototype.resolveExperiment=function(e,t){var r=e.inAppMessage.messageContext.experimentContext;if(!r)return null;var n=u.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[".concat(r.key,"]")}),n=ob.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})},TT.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)},TT.prototype.resolveDefault=function(e){var t=e.inAppMessage.messageContext.defaultLang;return this.resolveMessage(e,function(e){return e.lang===t})},TT.prototype.resolveMessage=function(e,t){t=e.inAppMessage.messageContext.messages.find(t);return u.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.inAppMessage.id,"]")})};var _T=TT;function TT(e){this.evaluator=e}AT.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},AT.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!u.isNullOrUndefined(e)&&t.identifiers.includes(e)};var IT=AT;function AT(){}NT.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 OT=NT;function NT(e){this.targetMatcher=e}RT.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var ST=RT;function RT(e){this.storage=e}MT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},MT.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(u.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(u.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return u.isNotNullOrUndefined(this.bucketer.bucketing(e,t))};var CT=MT;function MT(e,t){this.targetMatcher=e,this.bucketer=t}PT.get=function(e){return u.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},PT.getOrNull=function(e){return PT.instances.get(e)},PT.register=function(e,t){return PT.instances.set(e,t),t},PT.instances=new Map;var xT=PT;function PT(){}kT.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},kT.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow};var UT=kT;function kT(e,t,r,n){var i=new S_,n=xT.register("targetMatcher",new gb(new T_(e,n))),o=new A_(i),t=new rT(t,n,o),s=new iT(i),s=(this.abTestFlow=C_.of(new x_(t),new $_,new W_(s),new j_(new Z_(n)),new U_,new D_,new F_,new H_(o)),this.featureFlagFlow=C_.of(new U_,new D_,new F_,new x_(t),new $_,new G_(new eT(n),o),new J_(o)),new _T(e));this.inAppMessageFlow=C_.of(new uT,new pT(new IT,s),new fT,new dT,new yT,new mT(new ST(r)),new wT(new OT(n),s)),this.remoteConfigParameterTargetRuleDeterminer=new CT(n,i)}LT.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={})[LT.ROOT_TYPE]=r.key.type,t[LT.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},LT.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof K0)return n[LT.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[LT.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[LT.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,N0.exposure(e.user,t,n,r);if(t instanceof $0)return N0.remoteConfig(e.user,t,c(c({},n),t.properties),r);if(t instanceof sT)return null;throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},LT.ROOT_TYPE="$targetingRootType",LT.ROOT_ID="$targetingRootId",LT.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",LT.EXPERIMENT_VERSION_KEY="$experiment_version",LT.EXECUTION_VERSION_KEY="$execution_version";var DT=LT;function LT(e){this.clock=e}Se(jT,FT=wu),jT.prototype.supports=function(e){return void 0!==e.inAppMessage},jT.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:sT.of(e,t,l.NOT_IN_IN_APP_MESSAGE_TARGET)};var FT,VT=jT;function jT(e){var t=FT.call(this)||this;return t.evaluationFlowFactory=e,t}HT.of=function(e,t,r,n){return new HT(e,t,r,n)},HT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var BT=HT;function HT(e,t,r,n){this.key=new tb("IN_APP_MESSAGE",r.id),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}var zT=s.log,GT=(KT.create=function(e,t,r,n){var i=Fe.instance,o=new vb,r=new lb(r),r=new UT(o,r,n,i),n=new W0(r),s=new Q0(r.remoteConfigParameterTargetRuleDeterminer),r=new VT(r);return o.add(n),o.add(s),new KT(n,s,r,e,new DT(i),t,new JT,i)},KT.prototype.getExperiment=function(e){if(e){var t=this.workspaceFetcher.get();if(t)return t.getExperimentOrNull(e)}else zT.error("experimentKey must not be empty")},KT.prototype.experiment=function(e,t,r){var n=this;if(!e)return zT.error("experimentKey must not be empty"),_t.of(r,l.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return zT.warn("SDK not ready."),_t.of(r,l.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return zT.warn("Experiment does not exist."),_t.of(r,l.EXPERIMENT_NOT_FOUND);i=ob.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},KT.prototype.experiments=function(r){var n=this,i=new Wn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=ob.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},KT.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,nb.create()),t=null!=(t=e.config)?t:new je;return[e,_t.of(e.variationKey,e.reason,t,e.experiment)]},KT.prototype.featureFlag=function(e,t){var r=this;if(!e)return zT.error("featureKey must not be empty"),It.off(l.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return zT.warn("SDK not ready."),It.off(l.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return zT.warn("FeatureFlag does not exist."),It.off(l.FEATURE_FLAG_NOT_FOUND);n=ob.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},KT.prototype.featureFlags=function(r){var n=this,i=new Wn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=ob.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},KT.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,nb.create()),t=null!=(t=e.config)?t:new je;return[e,"A"===e.variationKey?It.off(e.reason,t,e.experiment):It.on(e.reason,t,e.experiment)]},KT.prototype.inAppMessage=function(e,t){var r=this,n=this.workspaceFetcher.get();if(!n)return zT.warn("SDK not ready."),wt.of(l.SDK_NOT_READY);e=n.getInAppMessageOrNull(e);if(!e)return zT.warn("In app message does not exist."),wt.of(l.IN_APP_MESSAGE_NOT_FOUND);n=BT.of(n,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(n,nb.create());return this.eventFactory.create(n,t).forEach(function(e){return r.eventProcessor.process(e)}),wt.of(t.reason,t.inAppMessage,t.message,t.properties)},KT.prototype.tryInAppMessage=function(t,e){var r,n=Gn.start();try{r=this.inAppMessage(t,e)}catch(e){zT.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=wt.of(l.EXCEPTION)}return Vi.inAppMessage(n,t,r),r},KT.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?zT.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 Vt(0,e.key),this.eventProcessor.process(N0.track(n,e,t,r))):zT.warn("Event key must be not null. or event key must be string type."):zT.warn("event must not be null.")},KT.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=H0.toEvent(e),this.flush(),this.track(e,t),this.flush())},KT.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},KT.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(u.isNullOrUndefined(o))return zT.warn("SDK not ready."),mt.of(n,l.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(u.isNullOrUndefined(e))return zT.warn("Remote config parameter does not exist."),mt.of(n,l.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=ab.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,nb.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),mt.of(t.value,t.reason)},KT.prototype.close=function(){this.eventProcessor.close()},KT);function KT(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}YT.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},YT.prototype._isSameError=function(e,t){return!u.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var JT=YT;function YT(){}qT.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},qT.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var WT=qT;function qT(){this._installed=[],this._installations={onerror:ZT,onunhandledrejection:QT}}var $T,XT=null;function ZT(o,s){XT=window.onerror,window.onerror=function(e,t,r,n,i){u.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),XT&&XT.apply(this,arguments)}}function QT(r,n){$T=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()),$T&&$T.apply(this,arguments)}}tI.prototype.read=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},tI.prototype.save=function(r){return a(this,void 0,void 0,function(){var t;return p(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},tI.prototype.add=function(r){return a(this,void 0,void 0,function(){var t;return p(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]}})})},tI.prototype.delete=function(n){return a(this,void 0,void 0,function(){var t,r=this;return p(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]}})})},tI.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},tI.prototype.clear=function(){return a(this,void 0,void 0,function(){return p(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var eI=tI;function tI(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var rI=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},nI=(iI.builder=function(){return new oI},iI.empty=function(){return iI.builder().build()},iI.from=function(e){return new iI(e)},iI.fromDto=function(e){for(var t=iI.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 kn(e)})})}return t.build()},Object.defineProperty(iI.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),iI.prototype.get=function(e){return this.cohorts.get(e)},iI.prototype.filterBy=function(e){var r=zt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return iI.from(e)},iI.prototype.asArray=function(){return this.cohorts.values()},iI.prototype.asComparable=function(){return this.cohorts},iI.prototype.toBuilder=function(){return new oI(this)},iI);function iI(e){this.cohorts=e}sI.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},sI.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},sI.prototype.build=function(){return new nI(this.cohorts)};var oI=sI;function sI(e){this.cohorts=new Wn(Me.isEqual),e&&this.putAll(e)}var w="model",r="name",C="type",R="vendor",e="version",Gh="architecture",Ed="console",E="mobile",M="tablet",Jh="smarttv",_="wearable",aI=(U.parse=function(e){return{browser:U.getBrowser(e),cpu:U.getCPU(e),device:U.getDevice(e),engine:U.getEngine(e),os:U.getOS(e)}},U.getBrowser=function(e){var t={name:void 0,version:void 0,major:void 0};return U.mapper.rgx.call(t,e,U.regexes.browser),t.major=U.util.major(t.version),t},U.getCPU=function(e){var t={architecture:void 0};return U.mapper.rgx.call(t,e,U.regexes.cpu),t},U.getDevice=function(e){var t={model:void 0,type:void 0,vendor:void 0};return U.mapper.rgx.call(t,e,U.regexes.device),t},U.getEngine=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.getOS=function(e){var t={name:void 0,version:void 0};return U.mapper.rgx.call(t,e,U.regexes.os),t},U.util={extend:function(e,t){var r,n={};for(r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},has:function(e,t){return"string"==typeof e&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return"string"==typeof e?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},U.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[r,e],[/(opios)[\/\s]+([\w\.]+)/i],[[r,"Opera Mini"],e],[/\s(opr)\/([\w\.]+)/i],[[r,"Opera"],e],[/(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],[r,e],[/(konqueror)\/([\w\.]+)/i],[[r,"Konqueror"],e],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[r,"IE"],e],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[r,"Edge"],e],[/(yabrowser)\/([\w\.]+)/i],[[r,"Yandex"],e],[/(Avast)\/([\w\.]+)/i],[[r,"Avast Secure Browser"],e],[/(AVG)\/([\w\.]+)/i],[[r,"AVG Secure Browser"],e],[/(puffin)\/([\w\.]+)/i],[[r,"Puffin"],e],[/(focus)\/([\w\.]+)/i],[[r,"Firefox Focus"],e],[/(opt)\/([\w\.]+)/i],[[r,"Opera Touch"],e],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[r,"UCBrowser"],e],[/(comodo_dragon)\/([\w\.]+)/i],[[r,/_/g," "],e],[/(windowswechat qbcore)\/([\w\.]+)/i],[[r,"WeChat(Win) Desktop"],e],[/(micromessenger)\/([\w\.]+)/i],[[r,"WeChat"],e],[/(brave)\/([\w\.]+)/i],[[r,"Brave"],e],[/(whale)\/([\w\.]+)/i],[[r,"Whale"],e],[/(qqbrowserlite)\/([\w\.]+)/i],[r,e],[/(QQ)\/([\d\.]+)/i],[r,e],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[r,e],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[r,e],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[r,e],[/(MetaSr)[\/\s]?([\w\.]+)/i],[r],[/(LBBROWSER)/i],[r],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[e,[r,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[e,[r,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[r,e],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[e,[r,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[r,/(.+)/,"$1 WebView"],e],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[r,/(.+(?:g|us))(.+)/,"$1 $2"],e],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[r,"Chrome Mobile"],e],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[e,[r,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[r,"Sailfish Browser"],e],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[r,e],[/(dolfin)\/([\w\.]+)/i],[[r,"Dolphin"],e],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[r,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[r,"Opera Coast"],e],[/fxios\/([\w\.-]+)/i],[e,[r,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[e,[r,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[e,r],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[r,"GSA"],e],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[r,[e,(U.mapper={rgx:function(e,t){for(var r,n,i,o,s,a=0;a<t.length&&!o;){for(var u=t[a],c=t[a+1],p=r=0;p<u.length&&!o;)if(o=u[p++].exec(e))for(n=0;n<c.length;n++)s=o[++r],"object"==typeof(i=c[n])&&0<i.length?2==i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;a+=2}},str:function(e,t){for(var r in t)if("object"==typeof t[r]&&0<t[r].length){for(var n=0;n<t[r].length;n++)if(U.util.has(t[r][n],e))return"?"===r?void 0:r}else if(U.util.has(t[r],e))return"?"===r?void 0:r;return e}}).str,(U.maps={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}}).browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[r,e],[/(navigator|netscape)\/([\w\.-]+)/i],[[r,"Netscape"],e],[/(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],[r,e]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[Gh,"amd64"]],[/(ia32(?=;))/i],[[Gh,U.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[Gh,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[Gh,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[Gh,/ower/,"",U.util.lowerize]],[/(sun4\w)[;\)]/i],[[Gh,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[Gh,U.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[w,R,[C,M]],[/applecoremedia\/[\w\.]+ \((ipad)/],[w,[R,"Apple"],[C,M]],[/(apple\s{0,1}tv)/i],[[w,"Apple TV"],[R,"Apple"],[C,Jh]],[/(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,[C,M]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[w,[R,"Amazon"],[C,M]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[w,U.mapper.str,U.maps.device.amazon.model],[R,"Amazon"],[C,E]],[/android.+aft([bms])\sbuild/i],[w,[R,"Amazon"],[C,Jh]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[w,R,[C,E]],[/\((ip[honed|\s\w*]+);/i],[w,[R,"Apple"],[C,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,[C,E]],[/\(bb10;\s(\w+)/i],[w,[R,"BlackBerry"],[C,E]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[w,[R,"Asus"],[C,M]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[R,"Sony"],[w,"Xperia Tablet"],[C,M]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[w,[R,"Sony"],[C,E]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[R,w,[C,Ed]],[/android.+;\s(shield)\sbuild/i],[w,[R,"Nvidia"],[C,Ed]],[/(playstation\s[34portablevi]+)/i],[w,[R,"Sony"],[C,Ed]],[/(sprint\s(\w+))/i],[[R,U.mapper.str,U.maps.device.sprint.vendor],[w,U.mapper.str,U.maps.device.sprint.model],[C,E]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[R,[w,/_/g," "],[C,E]],[/(nexus\s9)/i],[w,[R,"HTC"],[C,M]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[w,[R,"Huawei"],[C,E]],[/android.+(bah2?-a?[lw]\d{2})/i],[w,[R,"Huawei"],[C,M]],[/(microsoft);\s(lumia[\s\w]+)/i],[R,w,[C,E]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[w,[R,"Microsoft"],[C,Ed]],[/(kin\.[onetw]{3})/i],[[w,/\./g," "],[R,"Microsoft"],[C,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"],[C,E]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[w,[R,"Motorola"],[C,M]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[R,U.util.trim],[w,U.util.trim],[C,Jh]],[/hbbtv.+maple;(\d+)/i],[[w,/^/,"SmartTV"],[R,"Samsung"],[C,Jh]],[/\(dtv[\);].+(aquos)/i],[w,[R,"Sharp"],[C,Jh]],[/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,[C,M]],[/smart-tv.+(samsung)/i],[R,[C,Jh],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,[C,E]],[/sie-(\w*)/i],[w,[R,"Siemens"],[C,E]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[R,"Nokia"],w,[C,E]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[w,[R,"Acer"],[C,M]],[/android.+([vl]k\-?\d{3})\s+build/i],[w,[R,"LG"],[C,M]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[R,"LG"],w,[C,M]],[/(lg) netcast\.tv/i],[R,w,[C,Jh]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[w,[R,"LG"],[C,E]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[R,w,[C,M]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[w,[R,"Lenovo"],[C,M]],[/(lenovo)[_\s-]?([\w-]+)/i],[R,w,[C,E]],[/linux;.+((jolla));/i],[R,w,[C,E]],[/((pebble))app\/[\d\.]+\s/i],[R,w,[C,_]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[R,w,[C,E]],[/crkey/i],[[w,"Chromecast"],[R,"Google"],[C,Jh]],[/android.+;\s(glass)\s\d/i],[w,[R,"Google"],[C,_]],[/android.+;\s(pixel c)[\s)]/i],[w,[R,"Google"],[C,M]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[w,[R,"Google"],[C,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"],[C,E]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[w,/_/g," "],[R,"Xiaomi"],[C,M]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[w,[R,"Meizu"],[C,E]],[/(mz)-([\w-]{2,})/i],[[R,"Meizu"],w,[C,E]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[w,[R,"OnePlus"],[C,E]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[w,[R,"RCA"],[C,M]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[w,[R,"Dell"],[C,M]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[w,[R,"Verizon"],[C,M]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[R,"Barnes & Noble"],w,[C,M]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[w,[R,"NuVision"],[C,M]],[/android.+;\s(k88)\sbuild/i],[w,[R,"ZTE"],[C,M]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[w,[R,"Swiss"],[C,E]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[w,[R,"Swiss"],[C,M]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[w,[R,"Zeki"],[C,M]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[R,"Dragon Touch"],w,[C,M]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[w,[R,"Insignia"],[C,M]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[w,[R,"NextBook"],[C,M]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[R,"Voice"],w,[C,E]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[R,"LvTel"],w,[C,E]],[/android.+;\s(PH-1)\s/i],[w,[R,"Essential"],[C,E]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[w,[R,"Envizen"],[C,M]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[R,w,[C,M]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[w,[R,"MachSpeed"],[C,M]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[R,w,[C,M]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[w,[R,"Rotor"],[C,M]],[/android.+(KS(.+))\s+build/i],[w,[R,"Amazon"],[C,M]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[R,w,[C,M]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[C,U.util.lowerize],R,w],[/[\s\/\(](smart-?tv)[;\)]/i],[[C,Jh]],[/(android[\w\.\s\-]{0,9});.+build/i],[w,[R,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[e,[r,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[e,[r,"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],[r,e],[/rv\:([\w\.]{1,9}).+(gecko)/i],[e,r]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[r,e],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[r,U.mapper.str,U.maps.os.windows],[e,U.mapper.str,U.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[r,"Windows"],[e,U.mapper.str,U.maps.os.windows.version]],[/\((bb)(10);/i],[[r,"BlackBerry"],e],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[r,e],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[r,"Symbian"],e],[/\((series40);/i],[r],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[r,"Firefox OS"],e],[/(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],[[r,"Linux"],e],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[r,"Chromium OS"],e],[/(sunos)\s?([\w\.\d]*)/i],[[r,"Solaris"],e],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[r,"Linux"],e],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[r,"iOS"],[e,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[r,"iOS"],[e,/_/g,"."]],[/(haiku)\s(\w+)/i],[r,e],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[e,/_/g,"."],[r,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[r,"Mac"],[e,/_/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],[r,e]]},U);function U(){}cI.generate=function(e){var t,r,n,i,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,o=aI.parse(e.navigator.userAgent),s=o.browser,a=o.os,o=o.device,u=e.screen,c=(null==(c=e.navigator.languages)?void 0:c[0])||"",p=c.split("-")[0],l=(null!=(l=o.type)?l:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),f=a.name||"",h="",d="";try{f=null!=(r=null==(t=f.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:f,h=null!=(i=null==(n=u.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",d=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:s.name||"",browserMajorVersion:s.major||"",browserVersion:s.version||"",osName:f,osVersion:a.version||"",deviceModel:o.model||"",deviceType:l,deviceVendor:o.vendor||"",deviceBrand:o.vendor||"",locale:c,language:p,orientation:h,userAgent:e.navigator.userAgent||"",screenWidth:u.width||"",screenHeight:u.height||"",timeZone:d}};var uI=cI;function cI(){}lI.prototype.map=function(e){return new lI(e(this.previous),e(this.current))};var pI=lI;function lI(e,t){this.previous=e,this.current=t}hI.empty=function(){return this.from([])},hI.from=function(e){return new hI(e)},hI.fromDto=function(e){return this.from(e.events.map(function(e){return jn.fromJson(e)}))},Object.defineProperty(hI.prototype,"rawEvents",{get:function(){return this.events},enumerable:!1,configurable:!0});var fI=hI;function hI(e){this.events=e}vI.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return mI.of(wI(e,this.hackleDeviceId),nI.empty(),fI.empty())},vI.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(vI.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),vI.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},vI.prototype.resolveContext=function(e){return void 0===e?this.context:("string"==typeof e?this.updateUser({id:e}):this.updateUser(e)).current},vI.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},vI.prototype.hackleUser=function(e){var t=(new Gt).addIdentifiers(e.user.identifiers||{}).add(Bt.ID,e.user.id||this.hackleDeviceId).add(Bt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(Bt.HACKLE_DEVICE,this.hackleDeviceId),t=(u.isNotNullOrUndefined(e.user.userId)&&t.add(Bt.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,targetEvents:e.targetEvents.rawEvents}},vI.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?c(c({},uI.generate(window)),this.pageManager.currentPage.toProperties()):e)||{}},vI.prototype.setUser=function(e){return this.updateUser(e).map(function(e){return e.user})},vI.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},vI.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},vI.prototype.updateUserProperties=function(e){return this.operateProperties(e).map(function(e){return e.user})},vI.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).map(function(e){return e.user})},vI.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},vI.prototype.saveUser=function(e){this.storage.saveUser(e)},vI.prototype.updateContext=function(e){var t=this.context,r=t.user,e=e(r),n=this.context.with(e);return this.context=n,rI(r,e)||(this.changeUser(r,e,this.clock.currentMillis()),this.saveUser(e)),new pI(t,n)},vI.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=wI(r,n.hackleDeviceId),rI(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},vI.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:u.fromMap(t)})})},vI.prototype.sync=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.syncCohort(),this.syncUserTarget()])];case 1:return e.sent(),[2]}})})},vI.prototype.syncIfNeeded=function(t){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return this.hasNewIdentifiers(t.previous,t.current)?[4,this.syncCohort()]:[3,2];case 1:e.sent(),e.label=2;case 2:return rI(t.previous,t.current)?[3,4]:[4,this.syncUserTarget()];case 3:e.sent(),e.label=4;case 4:return[2]}})})},vI.prototype.syncCohort=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.userCohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t,this.context.targetEvents),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},vI.prototype.syncUserTarget=function(){return a(this,void 0,void 0,function(){var t;return p(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.userTargetFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(this.context.cohorts,t),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync userTargets: ".concat(t)),[3,3];case 3:return[2]}})})},vI.prototype.hasNewIdentifiers=function(e,t){var r=zt(e),e=zt(t);return Object.entries(e).some(function(e){var t=e[0],e=e[1];return r[t]!==e})},vI.prototype.close=function(){return a(this,void 0,void 0,function(){return p(this,function(e){return[2]})})};var dI=vI;function vI(e,t,r,n,i,o,s,a,u){this.hackleDeviceId=e,this.storage=t,this.userTargetFetcher=r,this.userCohortFetcher=n,this.campaignParser=i,this.pageManager=o,this.clock=s,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(a,u),this.storage.saveUser(this.context.user)}gI.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},gI.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(gI.prototype,"deviceId",{get:function(){return this.storage.getItem(it)},enumerable:!1,configurable:!0}),Object.defineProperty(gI.prototype,"userId",{get:function(){return this.storage.getItem(nt)},enumerable:!1,configurable:!0}),gI.prototype.setDeviceId=function(e){this.setId(it,e)},gI.prototype.setUserId=function(e){this.setId(nt,e)},gI.prototype.setId=function(e,t){u.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var yI=gI;function gI(e){this.storage=e}EI.of=function(e,t,r){return new EI(e,t.filterBy(e),r)},EI.prototype.with=function(e){return EI.of(e,this.cohorts.filterBy(e),this.targetEvents)},EI.prototype.update=function(e,t){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return EI.of(this.user,e,t)};var mI=EI;function EI(e,t,r){this.user=e,this.cohorts=t,this.targetEvents=r}var wI=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},bI=(Object.defineProperty(_I.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(_I.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:_I.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(_I.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),_I.prototype.addListener=function(e){this.sessionListeners.push(e)},_I.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},_I.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)},_I.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(rt,"".concat(e))},_I.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)})},_I.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},_I.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(tt,e)},_I.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(tt)},_I.prototype.loadLastEventTime=function(){var e=this.storage.getItem(rt);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},_I.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},_I.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.updateLastEventTime(t);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}},_I.EMPTY_SESSION_ID="0.ffffffff",_I);function _I(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}II.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},II.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},II.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},II.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var TI=II;function II(){this.storage=window.localStorage}OI.postfix=function(e,t){return new OI(e,function(e){return"".concat(e).concat(t)})},OI.prefix=function(e,t){return new OI(e,function(e){return"".concat(t).concat(e)})},OI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},OI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},OI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var AI=OI;function OI(e,t){this.delegate=e,this.transform=t}SI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},SI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},SI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},SI.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}},SI.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[]}},SI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},SI.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){}},SI.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]},SI.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){}},SI.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var NI=SI;function SI(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)}CI.prototype.currentUser=function(){return this.userManager.resolve()},CI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},CI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},CI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},CI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},CI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},CI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},CI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},CI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},CI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},CI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},CI.prototype.increment=function(e,t){_i.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var RI=CI;function CI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}xI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},xI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},xI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},xI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},xI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},xI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},xI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},xI.monitoring=function(e){return"".concat(e,"/metrics")},xI.userTargets=function(e){return"".concat(e,"/api/v1/user-targets")};var MI=xI;function xI(){}UI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(u.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 PI=UI;function UI(e){this.storage=e}DI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var kI=DI;function DI(e){this.handlers=e}FI.prototype.handle=function(e,t){e.close()},FI.prototype.supports=function(e){return"CLOSE"===e.type};var LI=FI;function FI(){}jI.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))}},jI.prototype.supports=function(e){return"WEB_LINK"===e.type};var VI=jI;function jI(e){this.urlHandler=e}HI.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))}},HI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var BI=HI;function HI(e){this.urlHandler=e}GI.prototype.handle=function(e,t){var r=this.clock.currentMillis()+864e5;this.storage.put(e.context.inAppMessage,r),e.close()},GI.prototype.supports=function(e){return"HIDDEN"===e.type};var zI=GI;function GI(e,t){this.storage=e,this.clock=t}JI.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))}},JI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var KI=JI;function JI(e){this.urlHandler=e}WI.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))}},WI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var YI=WI;function WI(e){this.urlHandler=e}$I.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))}},$I.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var qI=$I;function $I(e){this.urlHandler=e}ZI.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))}},ZI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var XI=ZI;function ZI(e){this.urlHandler=e}eA.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},eA.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,in_app_message_display_type:t.message.layout.displayType,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,in_app_message_display_type:t.message.layout.displayType})};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,in_app_message_display_type:t.message.layout.displayType,action_type:r.action.type,action_area:r.area,action_value:r.action.value,button_text:r.buttonText,image_url:r.imageUrl,image_order:r.imageOrder})};case"IMAGE_IMPRESSION":r=e;return{key:"$in_app_image_impression",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,in_app_message_display_type:t.message.layout.displayType,image_url:r.imageUrl,image_order:r.imageOrder})}}};var QI=eA;function eA(e){this.core=e}rA.prototype.setListener=function(e){this.inAppMessageListener=e},rA.prototype.present=function(r){return a(this,void 0,void 0,function(){var t;return p(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]),null===(t=this.messageViewFactory.create(r,this)))?[2]:[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 tA=rA;function rA(e,t,r,n){void 0===n&&(n=null),this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.inAppMessageListener=n,this.currentMessageView=null,this.opening=!1}iA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},iA.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var nA=iA;function iA(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 oA=function(e,t,r,n){this.inAppMessage=e,this.message=t,this.user=r,this.properties=n},sA=(aA.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}}},aA.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 oA(e.inAppMessage,e.message,t.user,Ue.sanitize(r))},aA);function aA(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}cA.prototype.open=function(){var i,o;return a(this,void 0,void 0,function(){var t,r,n=this;return p(this,function(e){switch(e.label){case 0:if(!this.status.canOpen())return s.log.debug("InAppMessage is already opened. (key=".concat(this.context.inAppMessage.key,")")),[2];e.label=1;case 1:return e.trys.push([1,4,,5]),null!=(o=null==(i=this.ui.inAppMessageListener)?void 0:i.beforeInAppMessageOpen)&&o.call(i,this.context.inAppMessage),this.status.current="OPENING",window.addEventListener(cA.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.addEventListener(cA.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE,this.resolveLifecycleEnd),[4,this.scriptLoader.load()];case 2:return e.sent(),(t=this.addContainer()).style.display="none",t.classList.add("".concat(cA.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(t),r=this.renderTypeResolver.resolve(this.context),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),renderType:r})];case 3:return e.sent(),t.classList.remove("".concat(cA.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleInAppMessageLifecycle("OPEN",function(){var e,t;n.handleEvent({type:"IMPRESSION"}),n.status.current="OPENED",null!=(t=null==(e=n.ui.inAppMessageListener)?void 0:e.afterInAppMessageOpen)&&t.call(e,n.context.inAppMessage)},function(){s.log.warn("Failed to open inAppMessage with [Timeout expired.]"),n.destroy()}),[3,5];case 4:return e.sent(),this.destroy(),[3,5];case 5:return[2]}})})},cA.prototype.close=function(){var e,t,r=this;this.status.canClose()?(null!=(t=null==(e=this.ui.inAppMessageListener)?void 0:e.beforeInAppMessageClose)&&t.call(e,this.context.inAppMessage),this.status.current="CLOSING",this.handleInAppMessageLifecycle("CLOSE",function(){var e,t;r.handleEvent({type:"CLOSE"}),r.destroy(),null!=(t=null==(e=r.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r.context.inAppMessage)},function(){var e,t;s.log.warn("Failed to close inAppMessage with [Timeout expired.]"),r.destroy(),null!=(t=null==(e=r.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r.context.inAppMessage)})):s.log.debug("InAppMessage is already closed. (key=".concat(this.context.inAppMessage.key,")"))},cA.prototype.handleInAppMessageLifecycle=function(e,t,r){var n=this,i=this.lifecycleRegistry.register(e,t);window.dispatchEvent(new CustomEvent(cA.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE,{detail:{type:e,id:i}})),setTimeout(function(){void 0!==n.lifecycleRegistry.getAndRemove(e,i)&&r()},cA.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT)},cA.prototype.destroy=function(){var e;window.removeEventListener(cA.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.removeEventListener(cA.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE,this.resolveLifecycleEnd),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null,this.status.current="CLOSED"},cA.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(cA.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},cA.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},cA.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},cA.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},cA.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",cA.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE="hackle-iam-lifecycle-start",cA.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE="hackle-iam-lifecycle-end",cA.CONTAINER_CLASS_NAME="hackle-iam",cA.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT=5e3;var uA=cA;function cA(e,t,r,n,i,o){var s=this;this.scriptLoader=e,this.context=t,this.ui=r,this.renderTypeResolver=n,this.status=i,this.lifecycleRegistry=o,this.container=null,this.renderer=null,this.resolveLifecycleEnd=function(e){var t;e instanceof CustomEvent&&("string"==typeof(t=e).detail.id&&["OPEN","CLOSE"].includes(t.detail.type))&&(e=(t=e.detail).id,t=t.type,null!=(t=s.lifecycleRegistry.getAndRemove(t,e))&&t())},this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===cA.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,s.handleInteraction(e))}}lA.prototype.isMobileOS=function(e){e=e.user.hackleProperties.osName;return"string"==typeof e&&Boolean(e.match(this.mobileOSRegex))},lA.prototype.isMobileDeviceType=function(e){e=e.user.hackleProperties.deviceType;return"string"==typeof e&&Boolean(e.match(this.mobileDeviceRegex))},lA.prototype.resolve=function(e){return this.isMobileOS(e)||this.isMobileDeviceType(e)?"mobile":"pc"};var pA=lA;function lA(){this.mobileOSRegex=/(iOS|Android|iPad|iPhone)/g,this.mobileDeviceRegex=/(mobile|phone|tablet)/g}hA.prototype.canOpen=function(){return"OPENED"!==this.current&&"OPENING"!==this.current},hA.prototype.canClose=function(){return"CLOSED"!==this.current&&"CLOSING"!==this.current};var fA=hA;function hA(e){this.current=e=void 0===e?"CLOSED":e}vA.prototype.resolveKey=function(e,t){return"".concat(e,"_").concat(t)},vA.prototype.register=function(e,t){var r=H(),e=this.resolveKey(e,r);return this.record[e]=t,r},vA.prototype.getAndRemove=function(e,t){var e=this.resolveKey(e,t),t=this.record,r=t[e],t=function(e,t){var r={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}(t,["symbol"==typeof e?e:e+""]);return this.record=t,r};var dA=vA;function vA(){this.record={}}gA.create=function(e){return new gA(e)},gA.prototype.create=function(e,t){var r=new pA,n=new fA,i=new dA;switch(e.message.layout.displayType){case"MODAL":case"BANNER":case"BOTTOM_SHEET":return new uA(this.scriptLoader,e,t,r,n,i);case"NONE":return null}};var yA=gA;function gA(e){this.scriptLoader=e}EA.prototype.load=function(){return a(this,void 0,void 0,function(){var t;return p(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()]}})})},EA.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},EA.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 mA=EA;function EA(e){this.scriptUrl=e}bA.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},bA.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=_A.of(e,t,r);return this.targetMatcher.anyMatches(e,nb.create(),n.targets)};var wA=bA;function bA(e){this.targetMatcher=e}TA.of=function(e,t,r){return new TA(new tb("IN_APP_MESSAGE",r.id),e,t.user,t)};var _A=TA;function TA(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}AA.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},AA.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new OA(new SA(i)))}return e.durationCap&&t.push(new OA(new CA(e.durationCap))),t};var IA=AA;function AA(e){this.storage=e}NA.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var OA=NA;function NA(e){this.matchCount=0,this.predicate=e}Object.defineProperty(RA.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),RA.prototype.matches=function(e,t){e=e.user.identifiers[this.identifierCap.identifierType];if(u.isNullOrUndefined(e))return!1;t=t.identifiers[this.identifierCap.identifierType];return!u.isNullOrUndefined(t)&&e===t};var SA=RA;function RA(e){this.identifierCap=e}Object.defineProperty(MA.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),MA.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis};var CA=MA;function MA(e){this.durationCap=e}PA.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return u.isNullOrUndefined(e)?[]:JSON.parse(e)},PA.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var xA=PA;function PA(e){this.storage=e}kA.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var UA=kA;function kA(e){this.processors=e}LA.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},LA.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>LA.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-LA.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},LA.prototype.supports=function(e){return"IMPRESSION"===e.type},LA.IMPRESSION_MAX_SIZE=100;var DA=LA;function LA(e){this.impressionStorage=e}VA.prototype.process=function(e,t,r){},VA.prototype.supports=function(e){return"CLOSE"===e.type};var FA=VA;function VA(){}BA.prototype.process=function(e,t,r){var n,i,o=this.actionHandlerFactory.get(t.action);!(null==(i=null==(n=e.ui.inAppMessageListener)?void 0:n.onInAppMessageClick)?void 0:i.call(n,e.context.inAppMessage,e,Pn.fromAction(t.action)))&&e.status.canClose()&&null!=o&&o.handle(e,t.action)},BA.prototype.supports=function(e){return"ACTION"===e.type};var jA=BA;function BA(e){this.actionHandlerFactory=e}zA.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 HA=zA;function zA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}KA.prototype.matches=function(e,t,r){return!!N0.isTrackEvent(r)&&(!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r))};var GA=KA;function KA(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}YA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var JA=YA;function YA(e){this.handlers=e}qA.prototype.handle=function(e,t){e.close()},qA.prototype.supports=function(e){return"CLOSE"===e.type};var WA=qA;function qA(){}XA.prototype.handle=function(e,t){t=this.eventOrNull(t);t&&this.eventHandler.handle(e,t)},XA.prototype.eventOrNull=function(e){var t=Mn.fromJson(e.action);return t?{type:"ACTION",action:t,area:e.area,buttonText:e.buttonText,imageUrl:e.imageUrl,imageOrder:e.imageOrder}:null},XA.prototype.supports=function(e){return"ACTION"===e.type};var $A=XA;function XA(e){this.eventHandler=e}QA.prototype.handle=function(e,t){t={type:"IMAGE_IMPRESSION",imageUrl:t.imageUrl,imageOrder:t.imageOrder};this.eventHandler.handle(e,t)},QA.prototype.supports=function(e){return"IMAGE_IMPRESSION"===e.type};var ZA=QA;function QA(e){this.eventHandler=e}tO.prototype.open=function(e){window.location.href=e.href};var eO=tO;function tO(){}nO.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var rO=nO;function nO(){}oO.prototype.open=function(e){window.open(e.href)};var iO=oO;function oO(){}aO.prototype.open=function(e){window.location.replace(e)};var sO=aO;function aO(){}function uO(e,t,r){return null===e||(!lO(t,cO)||r.current!==r.referrer)&&!lO(e,t)}var cO={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},pO={current:void 0,referrer:void 0},lO=function(t,r){return Object.keys(cO).every(function(e){return t[e]===r[e]})},fO=(hO.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},cO),t),n=new Oo,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)},hO.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();uO(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},hO.prototype.onSessionEnded=function(e,t,r){},hO.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},hO);function hO(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}vO.prototype.get=function(){var e=this.storage.getItem(ot);return e?JSON.parse(e):null},vO.prototype.set=function(e){this.storage.setItem(ot,JSON.stringify(e))};var dO=vO;function vO(e){this.storage=e}gO.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},gO.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)||(i=Vo.tryDecodeURIComponent(i))&&(t[o]=i)}return t};var yO=gO;function gO(e){this.search=e}EO.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},EO.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,EO.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var mO=EO;function EO(){}bO.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},bO.prototype.params=function(e){e=u.isNotNullOrUndefined(e)?e:this.pageManager.currentPage.queryParameter;return new yO(e).getQueryParams(bO.CAMPAIGN_QUERY_CONDITION)},bO.prototype.resolve=function(e){return{utm_campaign:e[_O],utm_content:e[TO],utm_id:e[IO],utm_medium:e[AO],utm_source:e[OO],utm_term:e[NO],gclid:e[SO],fbclid:e[RO]}},bO.prototype.parseDomain=function(){var t=this;if("undefined"==typeof window)return pO;return{current:mO.extractDomain(this.pageManager.currentPage.hostname),referrer:function(){var e=t.pageManager.currentPage.referrer;if(e)return e=new URL(e).hostname,mO.extractDomain(e)}()}},bO.CAMPAIGN_QUERY_CONDITION=function(e,t){return Ii.isNotEmptyString(t)};var wO=bO;function bO(e){this.pageManager=e}var _O="utm_campaign",TO="utm_content",IO="utm_id",AO="utm_medium",OO="utm_source",NO="utm_term",SO="gclid",RO="fbclid",CO=(MO.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},MO.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))}},MO);function MO(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()}PO.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!t||!t.getAttributes().integration_ga_experiment||!N0.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==l.TRAFFIC_ALLOCATED?null:e};var xO=PO;function PO(e){this.workspaceFetcher=e}var UO={user:void 0,debug:!1,log_disabled:!1,automaticPageTracking:!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.40.0",IAM_RENDERER_VERSION_HEADER:"0.0.9"},kO=(DO.config=function(e){return c(c(c({},UO),e),{automaticPageTracking:DO.resolveAutomaticPageTracking(e)})},DO.resolveAutomaticPageTracking=function(e){return"boolean"!=typeof(null==e?void 0:e.automaticPageTracking)&&"boolean"!=typeof(null==e?void 0:e.auto_track_page_view)?UO.automaticPageTracking:!!e.automaticPageTracking||!!e.auto_track_page_view},DO.logging=function(e){s.initCounter(function(e){return _i.counter("log",{level:e})}),s.setLogLevel(Te.INFO),e.log_disabled?s.setLogLevel(Te.DISABLE):e.debug&&s.setLogLevel(Te.DEBUG)},DO.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}},DO.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},DO.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,6e4)},DO.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},DO);function DO(){}FO.prototype.add=function(e){this.synchronizers.push(e)},FO.prototype.sync=function(){return a(this,void 0,void 0,function(){var t=this;return p(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.sync())}))];case 1:return e.sent(),[2]}})})},FO.prototype.close=function(){return a(this,void 0,void 0,function(){var t=this;return p(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.close())}))];case 1:return e.sent(),[2]}})})},FO.prototype.safe=function(r){return a(this,void 0,void 0,function(){var t;return p(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 LO=FO;function FO(){this.synchronizers=[]}jO.prototype.sync=function(){return a(this,void 0,void 0,function(){var t;return p(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]}})})},jO.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()}))},jO.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},jO.prototype.close=function(){return a(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})};var VO=jO;function jO(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}HO.prototype.schedule=function(e,t){e=new zO(e,t);return e.start(),e},HO.prototype.schedulePeriodically=function(e,t,r){var n;switch(this.scheduleType){case"setTimeout":n=new KO(e,t,r);break;case"setInterval":n=new YO(e,t,r)}return n.start(),n};var BO=HO;function HO(e){this.scheduleType=e}GO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},GO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var zO=GO;function GO(e,t){this.delayMillis=e,this.task=t,this.timeout=null}JO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},JO.prototype.run=function(){var e=this;try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},JO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var KO=JO;function JO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}WO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){e.run(),e.interval=setInterval(function(){return e.run()},e.intervalMillis)},this.delayMillis)},WO.prototype.run=function(){try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}},WO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.interval&&(clearInterval(this.interval),this.interval=null)};var YO=WO;function WO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null,this.interval=null}$O.prototype.fetchIfModified=function(r){return a(this,void 0,void 0,function(){var t;return p(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)]}})})},$O.prototype.createRequest=function(e){var t=Oi.builder().url(this.url).method("GET");return null!==e&&t.addHeader(xi.IF_MODIFIED_SINCE,e),t.build()},$O.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=Gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Bi.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),Bi.record("get.workspace",t,null),r;case 4:return[2]}})})},$O.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(xi.LAST_MODIFIED)}};var qO=$O;function $O(e,t){this.url=e,this.transport=t}ZO.prototype.fetch=function(r){return a(this,void 0,void 0,function(){var t;return p(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)]}})})},ZO.prototype.createRequest=function(e){e={identifiers:zt(e)},e=we.encodeURL(JSON.stringify(e));return Oi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},ZO.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=Gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Bi.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),Bi.record("get.cohorts",t,null),r;case 4:return[2]}})})},ZO.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 nI.fromDto(e)};var XO=ZO;function ZO(e,t){this.url=e,this.transport=t}eN.prototype.fetch=function(r){return a(this,void 0,void 0,function(){var t;return p(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)]}})})},eN.prototype.createRequest=function(e){e={identifiers:zt(e)},e=we.encodeURL(JSON.stringify(e));return Oi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},eN.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=Gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Bi.record("get.user-targets",t,r),[2,r];case 3:throw r=e.sent(),Bi.record("get.user-targets",t,null),r;case 4:return[2]}})})},eN.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 fI.fromDto(e)};var QO=eN;function eN(e,t){this.url=e,this.transport=t}rN.prototype.getExperiments=function(){return Array.from(this.experiments.values())},rN.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},rN.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},rN.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},rN.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},rN.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},rN.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},rN.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},rN.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},rN.prototype.getContainerOrNull=function(e){return this.containers.get(e)},rN.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},rN.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},rN.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},rN.prototype.getAttributes=function(){return this.attributes},rN.from=function(e){var t=e.parameterConfigurations.map(St.fromJson),r=f.mapNotNullOrUndefined(e.experiments,function(e){return Mt.fromJson("AB_TEST",e,t)}),n=f.mapNotNullOrUndefined(e.experiments,function(e){return Mt.fromJson("AB_TEST",e,t)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),i=f.mapNotNullOrUndefined(e.featureFlags,function(e){return Mt.fromJson("FEATURE_FLAG",e,t)}),o=e.buckets.map(kt.fromJson),s=e.events.map(Vt.fromJson),a=f.mapNotNullOrUndefined(e.segments,or.fromJson),u=e.containers.map(ar.fromJson),c=f.mapNotNullOrUndefined(e.remoteConfigParameters,lr.fromJson),p=f.mapNotNullOrUndefined(e.inAppMessages,Br.fromJson),e=e.workspace.attributes;return new rN(r,n,i,o,s,a,u,t,c,p,e)};var tN=rN;function rN(e,t,r,n,i,o,s,a,u,c,p){this.experiments=f.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=f.associateBy(t,function(e){return e.key}),this.featureFlags=f.associateBy(r,function(e){return e.key}),this.buckets=f.associateBy(n,function(e){return e.id}),this.eventTypes=f.associateBy(i,function(e){return e.key}),this.segments=f.associateBy(o,function(e){return e.key}),this.containers=f.associateBy(s,function(e){return e.id}),this.parameterConfigurations=f.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=f.associateBy(u,function(e){return e.key}),this.inAppMessages=f.associateBy(c,function(e){return e.key}),this.attributes=p}iN.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},iN.prototype.setWorkspace=function(e){try{this.workspace=tN.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},iN.prototype.get=function(){return this.workspace},iN.prototype.sync=function(){return a(this,void 0,void 0,function(){var t;return p(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]}})})},iN.prototype.close=function(){return a(this,void 0,void 0,function(){return p(this,function(e){return[2]})})};var nN=iN;function iN(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}sN.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},sN.prototype.dispatchEventsSynchronously=function(r){return a(this,void 0,void 0,function(){var t;return p(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]}})})},sN.prototype.dispatchEvents=function(r){return a(this,void 0,void 0,function(){var t;return p(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 oN=sN;function sN(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}uN.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},uN.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof N0?N0.isExposureEvent(e)?t.push(e.toDto()):N0.isTrackEvent(e)?r.push(e.toDto()):N0.isRemoteConfigEvent(e)&&n.push(e.toDto()):N0.isExposureEventDto(e)?t.push(e):N0.isTrackEventDto(e)?r.push(e):N0.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return Oi.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},uN.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return p(this,function(e){switch(e.label){case 0:t=Gn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),Bi.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),Bi.record("post.events",t,null),r;case 4:return[2]}})})};var aN=uN;function uN(e,t){this.url=e,this.transport=t}pN.prototype.add=function(e){return this.repository.add(e)},pN.prototype.delete=function(e){return this.repository.delete(e)},pN.prototype.flush=function(){return a(this,void 0,void 0,function(){var t,r;return p(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]}})})},pN.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"pageshow":return void this.flush().catch(function(e){return s.log.warn("Failed to flush retry events: ".concat(e))});case"blur":case"focus":case"hidden":case"locationChange":case"pagehide":return}};var cN=pN;function pN(e,t){this.repository=e,this.transport=t}function lN(){this.listeners={}}lN.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},lN.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},lN.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Se(hN,fN=lN);var fN,t=hN;function hN(){return null!==fN&&fN.apply(this,arguments)||this}Se(yN,dN=t),yN.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},yN.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},yN.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},yN.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=[])},yN.prototype.close=function(){this.flush(!0)};var dN,vN=yN;function yN(e,t,r,n){var i=dN.call(this)||this;return i.eventDispatcher=e,i.eventDispatchMaxSize=t,i.flushScheduler=r,i.flushIntervalMillis=n,i.queue=[],i.flushingJob=null,i}mN.prototype.send=function(e){e=e.toBuilder().addHeader(Ge,this.sdk.key).addHeader(Ke,this.sdk.name).addHeader(Je,this.sdk.version).addHeader(Ye,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var gN=mN;function mN(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}wN.intercept=function(e,t){return t instanceof gN?t:new gN(e,Fe.instance,t)};var EN=wN;function wN(){}_N.create=function(){return new _N},_N.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 Ci(n.status,n.responseText,function(e){var t=xi.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 bN=_N;function _N(){}IN.create=function(){return new IN},IN.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(Ci.ok())})},IN.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(Ge),r=(r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(Ke,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(Je,"unknown")),e.headers.get(Ye));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var TN=IN;function IN(){}ON.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var AN=ON;function ON(e){this.invocationResponseResolver=e}RN.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 NN,SN=RN;function RN(e){this.invocationResponseResolver=e}($s=NN=NN||{}).prompt="prompt",$s.function="function";MN.prototype.getInvocator=function(e,t){return e===NN.prompt?new AN(t):e===NN.function?new SN(t):null};var CN=MN;function MN(){}PN.prototype.onPageStarted=function(e,t){var r=this.userManager.resolve(),r=this.determiner.determineOrNull(r);r&&(this.core.flush(!0),this.redirector.redirect(r))},PN.prototype.onPageEnded=function(e,t){};var xN=PN;function PN(e,t,r,n){this.determiner=e,this.redirector=t,this.userManager=r,this.core=n}var UN=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.user=n},kN=(DN.prototype.determineOrNull=function(e){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,"A"),new UN(t,o,i,e)}return null},DN);function DN(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}FN.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=VN.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,nb.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,nb.create(),t.includeTargets))};var LN=FN;function FN(e){this.targetMatcher=e}jN.of=function(e,t){return new jN(new tb("SPLIT_URL",H()),t,e)};var VN=jN;function jN(e,t,r){this.key=e,this.user=t,this.workspace=r}HN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var BN=HN;function HN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}GN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(GN.SPLIT_URL_CONFIG_KEY,"")),r=Dn.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},GN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},GN.prototype.resolveManualRedirectUrl=function(e,t){e=Vo.tryParse(e);return e?this.decorateCampaign(e,t):null},GN.prototype.decorateCampaign=function(e,t){t=t.user.hackleProperties.queryParameter;if(Ii.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];Ii.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},GN.SPLIT_URL_CONFIG_KEY="redirectUrl";var zN=GN;function GN(e){this.campaignParser=e}JN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return u.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},JN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},JN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var KN=JN;function JN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}WN.prototype.setNeedDispatch=function(e){this.needDispatch=e},WN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(WN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},WN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var YN=WN;function WN(){this.needDispatch=!0}$N.prototype.get=function(){var e=this.storage.getItem(ft);if(u.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}},$N.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(ft,JSON.stringify(e))},$N.prototype.clear=function(){this.storage.removeItem(ft)};var qN=$N;function $N(e,t){this.sdk=e,this.storage=t}var XN=s.log,ZN=(QN.prototype.install=function(e){void 0===e&&(e=null);try{var t=this.changeLifecycle.bind(this);window.addEventListener("pageshow",function(){return t("pageshow")}),window.addEventListener("pagehide",function(){return t("pagehide")}),document.addEventListener("visibilitychange",function(){return t(document.visibilityState)}),window.addEventListener("blur",function(){return t("blur")}),window.addEventListener("focus",function(){return t("focus")}),QN.isSafariBrowser(e)&&window.addEventListener("beforeunload",function(){return t("hidden")}),history.pushState=(n=history.pushState,function(){try{var e=n.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&XN.error(e)}}),history.replaceState=(r=history.replaceState,function(){try{var e=r.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&XN.error(e)}}),window.addEventListener("popstate",function(){try{t("locationChange")}catch(e){(e instanceof Error||"string"==typeof e)&&XN.error(e)}})}catch(e){(e instanceof Error||"string"==typeof e)&&XN.error(e)}var r,n},QN.prototype.addListener=function(e){this.listeners.push(e)},QN.prototype.initialize=function(){this._initialized=!0,this.changeLifecycle("pageshow")},QN.prototype.changeLifecycle=function(e){this._initialized&&this.publish(e)},QN.prototype.publish=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onLifecycleChanged(t,r)})},QN.isSafariBrowser=function(e){return!u.isNullOrUndefined(e)&&e.toLowerCase().includes("safari")},QN);function QN(e){void 0===e&&(e=Fe.instance),this.clock=e,this.listeners=[],this._initialized=!1}tS.create=function(e,t,r){return void 0===r&&(r=Fe.instance),new tS(new rS(r,e,t))},tS.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var eS=tS;function tS(e){this.limiter=e}nS.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},nS.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new iS(e+this.intervalMillis,this.limit)),this.currentScope};var rS=nS;function nS(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}oS.prototype.isExpired=function(e){return this.expirationTime<e},oS.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var iS=oS;function oS(e,t){this.expirationTime=e,this.token=t}aS.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var sS=aS;function aS(e){this.determiners=e}uS.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;Me.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache={});var t=this.cacheKey(e),e=this.clock.currentMillis(),r=this.cache[t];return void 0!==r&&e-r<=this.dedupIntervalMillis||(this.cache[t]=e,!1)};fl=uS;function uS(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}Se(lS,cS=fl),lS.prototype.supports=function(e){return N0.isRemoteConfigEvent(e)},lS.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var cS,pS=lS;function lS(e,t){return void 0===t&&(t=Fe.instance),cS.call(this,e,t)||this}Se(dS,fS=fl),dS.prototype.supports=function(e){return N0.isExposureEvent(e)},dS.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var fS,hS=dS;function dS(e,t){return void 0===t&&(t=Fe.instance),fS.call(this,e,t)||this}yS.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},yS.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 vS=yS;function yS(){}mS.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},mS.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var gS=mS;function mS(e){this.invocator=e}var ES=s.log,wS=(bS.prototype.onPageStarted=function(e,t){this.track(e,t)},bS.prototype.onPageEnded=function(e,t){},bS.prototype.track=function(e,t){ES.debug("tracking page view");var r,e={key:bS.PAGE_VIEW_EVENT_KEY,properties:((r={})[bS.PAGE_NAME_PROPERTY_KEY]=e.pageTitle,r)};this.core.track(e,this.userManager.resolve(),t)},bS.PAGE_VIEW_EVENT_KEY="$page_view",bS.PAGE_NAME_PROPERTY_KEY="$page_name",bS);function bS(e,t){this.core=e,this.userManager=t}Object.defineProperty(TS.prototype,"currentPage",{get:function(){var e;return null!=(e=this._currentPage)?e:xo.createWithCurrentPage()},enumerable:!1,configurable:!0}),TS.prototype.updatePage=function(e,t){var r=this._currentPage;r&&e.isEquals(r)||(r&&this.publishEnd(r,t),this._currentPage=e,this.publishStart(e,t))},TS.prototype.publishStart=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageStarted(e,t)},TS.prototype.publishEnd=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageEnded(e,t)},TS.prototype.onLifecycleChanged=function(e,t){switch(e){case"pageshow":case"locationChange":var r=xo.createWithCurrentPage();return this.updatePage(r,t);case"visible":case"pagehide":case"blur":case"focus":case"hidden":return}},TS.prototype.addListener=function(e){this.listeners.push(e)};var _S=TS;function TS(){this.listeners=[],this._currentPage=null}var IS=s.log,AS=(Object.defineProperty(OS.prototype,"lastEngagementTime",{get:function(){return this._lastEngagementTime},enumerable:!1,configurable:!0}),OS.prototype.startEngagement=function(e){IS.debug("startEngagement timestamp:".concat(e,", page:").concat(this.pageManager.currentPage.url)),this._lastEngagementTime=e},OS.prototype.endEngagement=function(e,t){var r;u.isNullOrUndefined(this._lastEngagementTime)||(r=this._lastEngagementTime,(r=(this._lastEngagementTime=t)-r)<this.minimumEngagementDurationMillis||this.publish({page:e,durationMillis:r},this.userManager.resolve(),t))},OS.prototype.publish=function(e,t,r){IS.debug("onEngagement timestamp:".concat(r,", page:").concat(this.pageManager.currentPage.url));for(var n=0,i=this.listeners;n<i.length;n++)i[n].onEngagement(e,t,r)},OS.prototype.onPageStarted=function(e,t){this.startEngagement(t)},OS.prototype.onPageEnded=function(e,t){this.endEngagement(e,t)},OS.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"focus":return this.startEngagement(t);case"pagehide":case"hidden":case"blur":return this.endEngagement(this.pageManager.currentPage,t);case"pageshow":case"locationChange":return}},OS.prototype.addListener=function(e){this.listeners.push(e)},OS);function OS(e,t,r){this.userManager=e,this.pageManager=t,this.minimumEngagementDurationMillis=r,this.listeners=[],this._lastEngagementTime=null}SS.prototype.onEngagement=function(e,t,r){var n,e={key:SS.ENGAGEMENT_EVENT_KEY,properties:((n={})[wS.PAGE_NAME_PROPERTY_KEY]=e.page.pageTitle,n[SS.ENGAGEMENT_TIME_PROPERTY_KEY]=e.durationMillis,n)};this.core.track(e,t,r)},SS.ENGAGEMENT_EVENT_KEY="$engagement",SS.ENGAGEMENT_TIME_PROPERTY_KEY="$engagement_time_ms";var NS=SS;function SS(e){this.core=e}var RS=s.log,CS=null;function MS(e,t){var r,t=kO.config(t);kO.logging(t);try{if((r=window)&&"_hackleApp"in r&&null!==r._hackleApp&&"object"==typeof r._hackleApp&&("getAppSdkKey"in r._hackleApp&&"function"==typeof r._hackleApp.getAppSdkKey&&("getInvocationType"in r._hackleApp&&"function"==typeof r._hackleApp.getInvocationType))&&e===window._hackleApp.getAppSdkKey()){var n=e,i=t,o=window._hackleApp,s=(new CN).getInvocator(o.getInvocationType(),new vS);if(null===s)throw new Error("Failed to get invocator with invocationType:".concat(o.getInvocationType()));if(s=new gS(s),s=new $o(s),!o.getAppMode)return s;if((o=o.getAppMode().toLowerCase())===Wo.native)return s;if(o!==Wo.web_view_wrapper)throw new Error("Unsupported HackleAppMode: ".concat(o));return o=xS(n,i),(n=new Xo(o,s)).syncUser(),n}}catch(e){RS.error("Unexpected exception while check WebApp client: ".concat(e))}return xS(e,t)}function xS(e,t){var r=kO.sdk(e,t);if(CS)return RS.debug("use already exists hackleClient"),CS;var n=new zo,i=(n.initialize(),new TI),o=Bo.getInstance({days:Xe,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=kO.isBeaconSupported(),a=EN.intercept(r,bN.create()),u=EN.intercept(r,TN.create()),c=a,p=(s&&(c=u),new LO),l=new VO(p,new BO("setTimeout"),kO.pollingIntervalMillis(t)),f=new qN(r,AI.postfix(i,"_".concat(e.slice(0,8)))),h=new qO(MI.clientFetch(t.sdkUrl,r.key),a),f=new nN(f,h),h=(p.add(f),new _S),d=new QO(MI.userTargets(t.sdkUrl),a),v=new XO(MI.userCohorts(t.sdkUrl),a),y=new wO(h),g=new yI(AI.postfix(o,"_".concat(e))),m=g.getUser(),E=t.user||null,g=new dI(Ko(),g,d,v,y,h,Fe.instance,m,E),d=(p.add(g),new bI(t.sessionTimeoutMillis,AI.postfix(o,"_".concat(e.slice(8))))),v=(g.addListener(d),new eI(i,"".concat(et,"_").concat(e),We)),E=new aN(MI.clientDispatch(t.eventUrl),a),p=E,s=(s&&(p=new aN(MI.beaconDispatch(t.eventUrl,r.key),u)),new cN(v,E)),r=new oN(E,p,s),u=new sS([new pS(kO.dedupIntervalMillis(t)),new hS(kO.dedupIntervalMillis(t))]),v=new vN(r,We,new BO("setTimeout"),$e),E=new j0(v,u,d,g),w=new YN,p=new hb(new NI(o,"".concat(st,"_").concat(e.slice(0,8)))),r=new hb(new NI(o,"".concat(at,"_").concat(e.slice(0,8)))),u=new PI(AI.prefix(i,"".concat(ut,"_").concat(e.slice(0,8),"_"))),i=new xA(AI.prefix(i,"".concat(ct,"_").concat(e.slice(0,8),"_"))),b=GT.create(f,E,[p,r],u),e=new fO(new dO(AI.postfix(o,"_".concat(e.slice(0,8)))),y,b,g),_=new F0(g,b),_=(d.addListener(e),d.addListener(_),new QI(b)),u=new kI([new LI,new VI(new eO),new BI(new eO),new zI(u,Fe.instance),new KI(new rO),new YI(new rO),new qI(new iO),new XI(new iO)]),u=new UA([new DA(i),new jA(u),new FA]),_=new HA(Fe.instance,_,u),u=new JA([new WA,new $A(_),new ZA(_)]),T=new mA(MI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),T=new tA(yA.create(T),_,u),_=new GA(new wA(xT.get("targetMatcher")),new IA(i)),u=new sA(f,_,b),i=(new nA(v,u,T),new xO(f)),_=(new CO(v,i),new AS(g,h,dt)),u=(h.addListener(_),new NS(b)),v=(_.addListener(u),new wS(b,g)),i=(t.automaticPageTracking&&h.addListener(v),new LN(xT.get("targetMatcher"))),u=new KN(o,pt,{days:lt}),o=new kN(f,i,u,b),f=new BN(new zN(y),new sO,u,w),i=new xN(o,f,g,b),y=(h.addListener(i),new RI(b,g,p,r)),f=(null==(u=t.devTool)?void 0:u.userExplorer)&&"function"==typeof(null==(o=t.devTool)?void 0:o.userExplorer),i=t.devTool&&f?{manager:t.devTool,userExplorer:y}:void 0,p=new Li(MI.monitoring(t.monitoringUrl),a,c,new BO("setTimeout"),qe),I=(_i.addRegistry(p),new ZN),r=(I.addListener(h),I.addListener(_),I.addListener(d),I.addListener(n),I.addListener(s),I.addListener(E),I.addListener(p),l.start(),eS.create(ht,1)),A=new ko(b,l,d,g,r,v,T,i),u=(CS=A,(new WT).install(b,g),g.resolve().hackleProperties.browserName);return I.install("string"==typeof u?u:null),o=Date.now(),f=g.currentUser,y=d.currentSessionId,(rI(m,f)?d.startNewSessionIfNeeded(f,o):d.startNewSession(m,f,o))===y&&e.startNewCampaignIfNeeded(f,o),A.onReady(function(){t.autoOpenDevTool&&(t.devTool?A.showUserExplorer():RS.error("DevTool is not provided")),I.initialize(),w.dispatchDoneEventIfNeeded()}),A}var PS=function(e,t){return(PS=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 US=function(){return(US=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 kS(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}DS.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},DS.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},DS.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Oa=DS;function DS(){this.listeners={}}FS.arePropertiesEqual=function(e,t){var r=FS.coerceUnknownToProperties(e),n=FS.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]})},FS.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var LS=FS;function FS(){}jS.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)&&LS.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&LS.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var VS=jS;function jS(){}var BS=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=MS(e,US(US({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.40.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),r.setInAppMessageListener=r.setInAppMessageListener.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return PS(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(US(US({},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){VS.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.prototype.setInAppMessageListener=function(e){this.client.setInAppMessageListener(e)},i}(Oa);var k={exports:{}},b={},HS=Object.getOwnPropertySymbols,zS=Object.prototype.hasOwnProperty,GS=Object.prototype.propertyIsEnumerable;var Ia=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]))zS.call(r,o)&&(n[o]=r[o]);if(HS)for(var s=HS(r),a=0;a<s.length;a++)GS.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},KS=Ia,A="function"==typeof Symbol&&Symbol.for,JS=A?Symbol.for("react.element"):60103,YS=A?Symbol.for("react.portal"):60106,Q=A?Symbol.for("react.fragment"):60107,Al=A?Symbol.for("react.strict_mode"):60108,m=A?Symbol.for("react.profiler"):60114,WS=A?Symbol.for("react.provider"):60109,qS=A?Symbol.for("react.context"):60110,$S=A?Symbol.for("react.forward_ref"):60112,x=A?Symbol.for("react.suspense"):60113,XS=A?Symbol.for("react.memo"):60115,ZS=A?Symbol.for("react.lazy"):60116,QS="function"==typeof Symbol&&Symbol.iterator;function eR(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 tR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rR={};function nR(e,t,r){this.props=e,this.context=t,this.refs=rR,this.updater=r||tR}function iR(){}function oR(e,t,r){this.props=e,this.context=t,this.refs=rR,this.updater=r||tR}nR.prototype.isReactComponent={},nR.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(eR(85));this.updater.enqueueSetState(this,e,t,"setState")},nR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},iR.prototype=nR.prototype;var da=oR.prototype=new iR,sR=(da.constructor=oR,KS(da,nR.prototype),da.isPureReactComponent=!0,{current:null}),aR=Object.prototype.hasOwnProperty,uR={key:!0,ref:!0,__self:!0,__source:!0};function cR(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)aR.call(t,n)&&!uR.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:JS,type:e,key:o,ref:s,props:i,_owner:sR.current}}function pR(e){return"object"==typeof e&&null!==e&&e.$$typeof===JS}var lR=/\/+/g,fR=[];function hR(e,t,r,n){var i;return fR.length?((i=fR.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 dR(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,fR.length<10&&fR.push(e)}function vR(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 JS:case YS:o=!0}}if(o)return n(i,t,""===r?"."+yR(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+yR(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=QS&&t[QS]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+yR(a,s++),n,i);else if("object"===a)throw n=""+t,Error(eR(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function yR(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 gR(e,t){e.func.call(e.context,t,e.count++)}function mR(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?ER(e,n,r,function(e){return e}):null!=e&&(pR(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(lR,"$&/")+"/")+r,e={$$typeof:JS,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function ER(e,t,r,n,i){var o="";vR(e,mR,t=hR(t,o=null!=r?(""+r).replace(lR,"$&/")+"/":o,n,i)),dR(t)}var wR={current:null};function bR(){var e=wR.current;if(null===e)throw Error(eR(321));return e}var _R,TR,IR,i={ReactCurrentDispatcher:wR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:sR,IsSomeRendererActing:{current:!1},assign:KS},O=(b.Children={map:function(e,t,r){if(null==e)return e;var n=[];return ER(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;vR(e,gR,t=hR(null,null,t,r)),dR(t)},count:function(e){return vR(e,function(){return null},null)},toArray:function(e){var t=[];return ER(e,t,null,function(e){return e}),t},only:function(e){if(pR(e))return e;throw Error(eR(143))}},b.Component=nR,b.Fragment=Q,b.Profiler=m,b.PureComponent=oR,b.StrictMode=Al,b.Suspense=x,b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=i,b.cloneElement=function(e,t,r){if(null==e)throw Error(eR(267,e));var n=KS({},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=sR.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)aR.call(t,a)&&!uR.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:JS,type:e.type,key:i,ref:o,props:n,_owner:s}},b.createContext=function(e,t){return(e={$$typeof:qS,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:WS,_context:e},e.Consumer=e},b.createElement=cR,b.createFactory=function(e){var t=cR.bind(null,e);return t.type=e,t},b.createRef=function(){return{current:null}},b.forwardRef=function(e){return{$$typeof:$S,render:e}},b.isValidElement=pR,b.lazy=function(e){return{$$typeof:ZS,_ctor:e,_status:-1,_result:null}},b.memo=function(e,t){return{$$typeof:XS,type:e,compare:void 0===t?null:t}},b.useCallback=function(e,t){return bR().useCallback(e,t)},b.useContext=function(e,t){return bR().useContext(e,t)},b.useDebugValue=function(){},b.useEffect=function(e,t){return bR().useEffect(e,t)},b.useImperativeHandle=function(e,t,r){return bR().useImperativeHandle(e,t,r)},b.useLayoutEffect=function(e,t){return bR().useLayoutEffect(e,t)},b.useMemo=function(e,t){return bR().useMemo(e,t)},b.useReducer=function(e,t,r){return bR().useReducer(e,t,r)},b.useRef=function(e){return bR().useRef(e)},b.useState=function(e){return bR().useState(e)},b.version="16.14.0",{}),Lc=Function.call.bind(Object.prototype.hasOwnProperty),AR=function(){};function OR(e,t,r,n,i){if("production"!==production)for(var o in e)if(IR(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,_R)}catch(e){s=e}!s||s instanceof Error||AR((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 TR)&&(TR[s.message]=!0,o=i?i():"",AR("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(_R="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",TR={},IR=Lc,AR=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),OR.resetWarningCache=function(){"production"!==production&&(TR={})},"production"!==production){var NR=Ia,SR=OR,I="function"==typeof Symbol&&Symbol.for,RR=I?Symbol.for("react.element"):60103,CR=I?Symbol.for("react.portal"):60106,MR=I?Symbol.for("react.fragment"):60107,xR=I?Symbol.for("react.strict_mode"):60108,PR=I?Symbol.for("react.profiler"):60114,UR=I?Symbol.for("react.provider"):60109,kR=I?Symbol.for("react.context"):60110,DR=I?Symbol.for("react.concurrent_mode"):60111,LR=I?Symbol.for("react.forward_ref"):60112,FR=I?Symbol.for("react.suspense"):60113,VR=I?Symbol.for("react.suspense_list"):60120,jR=I?Symbol.for("react.memo"):60115,BR=I?Symbol.for("react.lazy"):60116,HR=I?Symbol.for("react.block"):60121,zR=I?Symbol.for("react.fundamental"):60117,GR=I?Symbol.for("react.responder"):60118,KR=I?Symbol.for("react.scope"):60119,JR="function"==typeof Symbol&&Symbol.iterator,YR="@@iterator";function WR(e){if(null===e||"object"!=typeof e)return null;e=JR&&e[JR]||e[YR];return"function"==typeof e?e:null}var qR={current:null},$R={current:null},XR=/^(.*)[\\\/]/,ZR=1;function QR(e){if(null==e)return null;if("number"==typeof e.tag&&oC("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 MR:return"Fragment";case CR:return"Portal";case PR:return"Profiler";case xR:return"StrictMode";case FR:return"Suspense";case VR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case kR:return"Context.Consumer";case UR:return"Context.Provider";case LR:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case jR:return QR(e.type);case HR:return QR(e.render);case BR:r=(t=e)._status===ZR?t._result:null;if(r)return QR(r)}var t,r;return null}var eC={},tC=null;function rC(e){tC=e}eC.getCurrentStack=null,eC.getStackAddendum=function(){var e,t,r,n,i,o="",s=(tC&&(e=QR(tC.type),r=tC._owner,o+=(e=e,t=tC._source,r=r&&QR(r.type),i="",t?(n=(s=t.fileName).replace(XR,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(XR))&&(s=s[1])?s.replace(XR,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),eC.getCurrentStack);return s&&(o+=s()||""),o};var nC={ReactCurrentDispatcher:qR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:$R,IsSomeRendererActing:{current:!1},assign:NR};function iC(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];sC("warn",e,r)}function oC(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];sC("error",e,r)}function sC(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=nC.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){}}NR(nC,{ReactDebugCurrentFrame:eC,ReactComponentTreeHook:{}});var aC={};function uC(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;aC[r]||(oC("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),aC[r]=!0)}var cC={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){uC(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){uC(e,"replaceState")},enqueueSetState:function(e,t,r,n){uC(e,"setState")}},pC={};function lC(e,t,r){this.props=e,this.context=t,this.refs=pC,this.updater=r||cC}Object.freeze(pC),lC.prototype.isReactComponent={},lC.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")},lC.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var fC,hC={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(fC in hC)hC.hasOwnProperty(fC)&&!function(e,t){Object.defineProperty(lC.prototype,e,{get:function(){iC("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(fC,hC[fC]);function dC(){}function vC(e,t,r){this.props=e,this.context=t,this.refs=pC,this.updater=r||cC}dC.prototype=lC.prototype,(I=vC.prototype=new dC).constructor=vC,NR(I,lC.prototype),I.isPureReactComponent=!0;var yC,gC,mC=Object.prototype.hasOwnProperty,EC={key:!0,ref:!0,__self:!0,__source:!0};function wC(e){if(mC.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function bC(e){if(mC.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var _C={},TC=function(e,t,r,n,i,o,s){e={$$typeof:RR,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 IC(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in wC(t)&&(s=t.ref,"string"==typeof(c=t).ref&&$R.current&&c.__self&&$R.current.stateNode!==c.__self&&(l=QR($R.current.type),_C[l]||(oC('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',QR($R.current.type),c.ref),_C[l]=!0))),bC(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)mC.call(t,n)&&!EC.hasOwnProperty(n)&&(i[n]=t[n]);var c,p,l,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 g(){gC||(gC=!0,oC("%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)",p))}function m(){yC||(yC=!0,oC("%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&&(l=i,f=c,m.isReactWarning=!0,Object.defineProperty(l,"key",{get:m,configurable:!0})),s&&(r=i,p=c,g.isReactWarning=!0,Object.defineProperty(r,"ref",{get:g,configurable:!0}))),TC(e,o,s,a,u,$R.current,i)}function AC(e){return"object"==typeof e&&null!==e&&e.$$typeof===RR}var OC=".",NC=":",SC=!1,RC=/\/+/g;function CC(e){return(""+e).replace(RC,"$&/")}var MC=10,xC=[];function PC(e,t,r,n){var i;return xC.length?((i=xC.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 UC(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,xC.length<MC&&xC.push(e)}function kC(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 RR:case CR:a=!0}}if(a)return n(i,t,""===r?OC+DC(t,0):r),1;var u=0,c=""===r?OC:r+NC;if(Array.isArray(t))for(var p=0;p<t.length;p++)u+=e(o=t[p],c+DC(o,p),n,i);else if("function"==typeof(r=WR(t))){r===t.entries&&(SC||iC("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."),SC=!0);for(var l,f=r.call(t),h=0;!(l=f.next()).done;)u+=e(o=l.value,c+DC(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+eC.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 DC(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 LC(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function FC(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)?VC(o,n,r,function(e){return e}):null!=o&&(AC(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":CC(o.key)+"/")+r,o=TC(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function VC(e,t,r,n,i){var o="",t=PC(t,o=null!=r?CC(r)+"/":o,n,i);kC(e,FC,t),UC(t)}function jC(e){return"string"==typeof e||"function"==typeof e||e===MR||e===DR||e===PR||e===xR||e===FR||e===VR||"object"==typeof e&&null!==e&&(e.$$typeof===BR||e.$$typeof===jR||e.$$typeof===UR||e.$$typeof===kR||e.$$typeof===LR||e.$$typeof===zR||e.$$typeof===GR||e.$$typeof===KR||e.$$typeof===HR)}function BC(){var e=qR.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 HC(){if($R.current){var e=QR($R.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var zC=!1,GC={};function KC(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=HC())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),GC[t=r]||(GC[t]=!0,r="",e&&e._owner&&e._owner!==$R.current&&(r=" It was passed a child from "+QR(e._owner.type)+"."),rC(e),oC('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),rC(null)))}function JC(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];AC(n)&&KC(n,t)}else if(AC(e))e._store&&(e._store.validated=!0);else if(e){var i=WR(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)AC(o.value)&&KC(o.value,t)}}function YC(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=QR(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==LR&&t.$$typeof!==jR)return;r=t.propTypes}r?(rC(e),SR(r,e.props,"prop",n,eC.getStackAddendum),rC(null)):void 0===t.PropTypes||zC||(zC=!0,oC("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||oC("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function WC(e,t,r){var n,i=jC(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+".":"")||HC(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===RR?(s="<"+(QR(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,oC("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)),IC.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)JC(arguments[o],e);if(e===MR){var s=t;rC(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){oC("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&oC("Invalid attribute `ref` supplied to `React.Fragment`."),rC(null)}else YC(t);return t}var qC=!1;try{var $C=Object.freeze({}),XC=new Map([[$C,null]]),ZC=new Set([$C]);XC.set(0,0),ZC.add(0)}catch(e){}function QC(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=NR({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,p=e._owner;if(null!=t)for(n in wC(t)&&(a=t.ref,p=$R.current),bC(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)mC.call(t,n)&&!EC.hasOwnProperty(n)&&(void 0===t[n]&&void 0!==i?o[n]=i[n]:o[n]=t[n]);var l=arguments.length-2;if(1==l)o.children=r;else if(1<l){for(var f=Array(l),h=0;h<l;h++)f[h]=arguments[h+2];o.children=f}return TC(e.type,s,a,u,c,p,o)}.apply(this,arguments),i=2;i<arguments.length;i++)JC(arguments[i],n.type);return YC(n),n}function eM(e){var t=WC.bind(null,e);return t.type=e,qC||(qC=!0,iC("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 iC("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}I=WC,O.Children={map:function(e,t,r){if(null==e)return e;var n=[];return VC(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=PC(null,null,t,r),kC(e,LC,t),UC(t)},count:function(e){return kC(e,function(){return null},null)},toArray:function(e){var t=[];return VC(e,t,null,function(e){return e}),t},only:function(e){if(AC(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},O.Component=lC,O.Fragment=MR,O.Profiler=PR,O.PureComponent=vC,O.StrictMode=xR,O.Suspense=FR,O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nC,O.cloneElement=QC,O.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&oC("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:kR,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:UR,_context:r}),i=!1,t={$$typeof:kR,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,oC("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,oC("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},O.createElement=I,O.createFactory=eM,O.createRef=function(){var e={current:null};return Object.seal(e),e},O.forwardRef=function(e){return null!=e&&e.$$typeof===jR?oC("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?oC("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&oC("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||oC("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:LR,render:e}},O.isValidElement=AC,O.lazy=function(e){var t,r,n={$$typeof:BR,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){oC("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){oC("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},O.memo=function(e,t){return jC(e)||oC("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:jR,type:e,compare:void 0===t?null:t}},O.useCallback=function(e,t){return BC().useCallback(e,t)},O.useContext=function(e,t){var r,n=BC();return void 0!==t&&oC("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?oC("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&&oC("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},O.useDebugValue=function(e,t){return BC().useDebugValue(e,t)},O.useEffect=function(e,t){return BC().useEffect(e,t)},O.useImperativeHandle=function(e,t,r){return BC().useImperativeHandle(e,t,r)},O.useLayoutEffect=function(e,t){return BC().useLayoutEffect(e,t)},O.useMemo=function(e,t){return BC().useMemo(e,t)},O.useReducer=function(e,t,r){return BC().useReducer(e,t,r)},O.useRef=function(e){return BC().useRef(e)},O.useState=function(e){return BC().useState(e)},O.version="16.14.0"}"production"===production?k.exports=b:k.exports=O;var tM=k.exports,rM=k.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),du=rM.Consumer,nM=rM.Provider;var iM=s.log;function oM(e,t){e=sM(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function sM(e,t){void 0===t&&(t="A");var r=k.exports.useContext(rM),n=r.hackle,i=r.userVersion,o=r.initialized,s=k.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||_t.of(t,l.EXCEPTION):_t.of(t,l.SDK_NOT_READY)},[t,e,n,o]),r=kS(k.exports.useState(function(){return n?s():(iM.error("HackleClient is not existed"),_t.of(t,l.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=kS(k.exports.useState(i),2),c=u[0],u=u[1];return cM(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function aM(e){e=uM(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function uM(e){var t=k.exports.useContext(rM),r=t.hackle,n=t.userVersion,i=t.initialized,o=k.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||It.off(l.EXCEPTION):It.off(l.SDK_NOT_READY)},[e,r,i]),t=kS(k.exports.useState(function(){return r?o():(iM.error("HackleClient is not existed"),It.off(l.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=kS(k.exports.useState(n),2),u=a[0],a=a[1];return cM(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function cM(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function pM(e){var t,r=e.experimentKey,e=e.children,n=(r=oM(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(k.exports.Children.forEach(e,function(e){k.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?k.exports.cloneElement(t,{variation:i}):null)}function lM(e){return e.variation,e=e.children,k.exports.createElement(k.exports.Fragment,null,e)}function fM(e){var t=(r=aM(e.featureKey)).isLoading,r=r.isOn;return t?null:tM.createElement(tM.Fragment,null,e.children(r))}n.Bucket=kt,n.Cohort=kn,n.Container=ar,n.ContainerGroup=cr,n.CoreVersion=Er,n.Decision=_t,n.DecisionReason=l,n.EXPERIMENT_IMPLEMENTATION_TYPE=Ct,n.EmptyHackleRemoteConfig=Ot,n.EmptyParameterConfig=je,n.EventType=Vt,n.Experiment=Mt,n.FeatureFlagDecision=It,n.HackleContext=rM,n.HackleContextConsumer=du,n.HackleContextProvider=nM,n.HackleExperiment=pM,n.HackleFeature=fM,n.HackleInAppMessageActionImpl=Pn,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=kS(k.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return k.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),k.exports.useEffect(function(){function e(){a(function(e){return US(US({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),k.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return US(US({},e),{initialized:!0})})},function(){a(function(e){return US(US({},e),{initialized:!0})})}).catch(function(){a(function(e){return US(US({},e),{initialized:!0})})})},[t]),i||s.initialized?tM.createElement(nM,{value:s},e):null},n.HackleVariation=lM,n.IAM_ACTION_AREA=["BUTTON","IMAGE","MESSAGE","X_BUTTON"],n.IAM_ACTION_TYPE=Fr,n.IAM_BEHAVIOR=Lr,n.IAM_DISPLAY_TYPE=Ur,n.IAM_HORIZONTAL_ALIGNMENT=jr,n.IAM_LAYOUT_TYPE=kr,n.IAM_ORIENTATION=Dr,n.IAM_PLATFORM_TYPE=xr,n.IAM_STATUS=Mr,n.IAM_TIMEUNIT=Pr,n.IAM_VERTICAL_ALIGNMENT=Vr,n.IdentifierType=Bt,n.IdentifiersBuilder=Gt,n.InAppMessage=Br,n.InAppMessageAction=Mn,n.InAppMessageAlignment=dn,n.InAppMessageBackground=Cn,n.InAppMessageButton=An,n.InAppMessageButtonStyle=Rn,n.InAppMessageContext=an,n.InAppMessageContextLayout=fn,n.InAppMessageContextMessage=pn,n.InAppMessageDecision=wt,n.InAppMessageDurationCap=en,n.InAppMessageEventFrequencyCap=$r,n.InAppMessageEventTrigger=Yr,n.InAppMessageEventTriggerRule=Wr,n.InAppMessageExperimentContext=cn,n.InAppMessageIdentifierCap=Zr,n.InAppMessageImage=yn,n.InAppMessageImageAutoScroll=mn,n.InAppMessagePeriodAlways=zr,n.InAppMessagePeriodCustom=Kr,n.InAppMessagePositionalButton=Nn,n.InAppMessageTargetContext=rn,n.InAppMessageText=wn,n.InAppMessageTextAttribute=_n,n.InAppMessageTextStyle=In,n.InAppMessageUserOverride=on,n.Logger=s,n.MATCH_OPERATORS=Ar,n.MATCH_TYPES=Tr,n.MATCH_VALUE_TYPES=Ir,n.MetaVersion=br,n.ParameterConfiguration=St,n.PropertyOperations=So,n.PropertyOperationsBuilder=Oo,n.RemoteConfigDecision=mt,n.RemoteConfigParameter=lr,n.RemoteConfigParameterValue=vr,n.RemoteConfigTargetRule=hr,n.SEGMENT_TYPES=Sr,n.Segment=or,n.Slot=Lt,n.SplitUrlConfig=Dn,n.SplitUrlTargets=Fn,n.TARGET_ACTION_TYPES=Or,n.TARGET_KEY_TYPES=Nr,n.Target=Yt,n.TargetAction=tr,n.TargetCondition=qt,n.TargetKey=Xt,n.TargetMatch=Qt,n.TargetRule=nr,n.TargetingType=Rr,n.UserTargetEvent=jn,n.Variation=Pt,n.Version=gr,n.createInstance=function(e,t){return new BS(e,t)},n.getUserId=Ko,n.removeUserId=Jo,n.resolveIdentifiers=zt,n.sanitizeUser=Jt,n.setUserId=function(e){Bo.getInstance().setItem(Qe,e)},n.useFeature=function(e){var t=(n=k.exports.useContext(rM)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=kS(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&iM.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=kS(k.exports.useState(r),2))[0],n=n[1];return cM(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=k.exports.useContext(rM)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||It.off(l.EXCEPTION)},[e,t,n]),o=(s=kS(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&iM.error("HackleClient is not existed"),It.off(l.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=kS(k.exports.useState(r),2))[0],n=n[1];return cM(a,r)||(n(r),s(i())),o},n.useLoadableFeature=aM,n.useLoadableFeatureDetail=uM,n.useLoadableRemoteConfig=function(){var e=(o=k.exports.useContext(rM)).hackle,t=o.userVersion,r=o.initialized,n=k.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new Ot},[e,r]),i=(o=kS(k.exports.useState(function(){return e||iM.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=kS(k.exports.useState(t),2))[0],a=a[1];return cM(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=oM,n.useLoadableVariationDetail=sM,n.useRemoteConfig=function(){var e=(r=k.exports.useContext(rM)).hackle,t=r.userVersion,r=r.initialized,n=k.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new Ot},[e,r]),i=(o=kS(k.exports.useState(function(){return e||iM.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=kS(k.exports.useState(t),2))[0],r=r[1];return cM(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=k.exports.useContext(rM).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(iM.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=k.exports.useContext(rM)).hackle,n=a.userVersion,i=a.initialized,o=k.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=kS(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&iM.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=kS(k.exports.useState(n),2))[0],c=c[1];return cM(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=k.exports.useContext(rM)).hackle,n=i.userVersion,i=i.initialized,o=k.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||_t.of(t,l.EXCEPTION)},[t,e,r,i]),s=(a=kS(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&iM.error("HackleClient is not existed"),_t.of(t,l.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=kS(k.exports.useState(n),2))[0],i=i[1];return cM(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 B(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 B(n)}var e="3.7.5",z="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),W=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,q=String.fromCharCode.bind(String),$="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),X=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Z=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var i=t=>{let r,n,i,o,s="";var e=t.length%3;for(let e=0;e<t.length;){if(255<(n=t.charCodeAt(e++))||255<(i=t.charCodeAt(e++))||255<(o=t.charCodeAt(e++)))throw new TypeError("invalid character found");r=n<<16|i<<8|o,s+=J[r>>18&63]+J[r>>12&63]+J[r>>6&63]+J[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const Q=t?e=>btoa(e):r?e=>Buffer.from(e,"binary").toString("base64"):i,ee=r?e=>Buffer.from(e).toString("base64"):r=>{let n=[];for(let e=0,t=r.length;e<t;e+=4096)n.push(q.apply(null,r.subarray(e,e+4096)));return Q(n.join(""))},te=(e,t=!1)=>t?X(ee(e)):ee(e),re=e=>{var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?q(192|t>>>6)+q(128|63&t):q(224|t>>>12&15)+q(128|t>>>6&63)+q(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),q(240|t>>>18&7)+q(128|t>>>12&63)+q(128|t>>>6&63)+q(128|63&t))},ne=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ie=e=>e.replace(ne,re),oe=r?e=>Buffer.from(e,"utf8").toString("base64"):K?e=>ee(K.encode(e)):e=>Q(ie(e)),se=(e,t=!1)=>t?X(oe(e)):oe(e);t=e=>se(e,!0);const ae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ue=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return q(55296+(t>>>10))+q(56320+(1023&t));case 3:return q((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return q((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},ce=e=>e.replace(ae,ue);var o=t=>{if(t=t.replace(/\s+/g,""),!W.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let r,n="",i,o;for(let e=0;e<t.length;)r=Y[t.charAt(e++)]<<18|Y[t.charAt(e++)]<<12|(i=Y[t.charAt(e++)])<<6|(o=Y[t.charAt(e++)]),n+=64===i?q(r>>16&255):64===o?q(r>>16&255,r>>8&255):q(r>>16&255,r>>8&255,255&r);return n};const le=z?e=>atob(Z(e)):r?e=>Buffer.from(e,"base64").toString("binary"):o,pe=r?e=>$(Buffer.from(e,"base64")):e=>$(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?"+":"/")),ye=e=>he(de(e));function ve(){var e=(e,t)=>Object.defineProperty(String.prototype,e,me(t));e("fromBase64",function(){return ye(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 ge(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,me(t));e("toBase64",function(e){return te(this,e)}),e("toBase64URI",function(){return te(this,!0)}),e("toBase64URL",function(){return te(this,!0)})}const me=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const Ee={version:e,VERSION:"3.7.5",atob:le,atobPolyfill:o,btoa:Q,btoaPolyfill:i,fromBase64:ye,toBase64:se,encode:se,encodeURI:t,encodeURL:t,utob:ie,btou:ce,decode:ye,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:ve,extendUint8Array:ge,extendBuiltins:()=>{ve(),ge()}};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 u=we;function we(){}Te.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);u.isNotNullOrUndefined(o)&&r.push(o)}return r},Te.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(u.isNullOrUndefined(o))return;r.push(o)}return r},Te.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},Te.associate=function(e,t){return this.associateTo(e,new Map,t)},Te.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},Te.associateRecord=function(e,t){for(var r={},n=0,i=e;n<i.length;n++){var o=t(i[n]),s=o[0],o=o[1];r[s]=o}return r},Te.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},Te.sum=function(e,r){return e.reduce(function(e,t){return e+r(t)},0)};var f=Te;function Te(){}var _e={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},s=(be.setLogLevel=function(e){this.logLevel=e=void 0===e?_e.INFO:e},be.initCounter=function(t){this.counters=f.associate(Object.keys(_e),function(e){return[e,t(e)]})},be._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)Oe.log(e,r,t.message,t);else try{Oe.log(e,r,t)}catch(e){}},be.increment=function(e){var t;null!=(t=null==(t=be.counters)?void 0:t.get(e))&&t.increment()},be.logLevel=_e.INFO,be.log={error:function(e){_e.ERROR<=be.logLevel&&(be._log("ERROR",e),be.increment("ERROR"))},warn:function(e){_e.WARN<=be.logLevel&&(be._log("WARN",e),be.increment("WARN"))},info:function(e){_e.INFO<=be.logLevel&&(be._log("INFO",e),be.increment("INFO"))},debug:function(e){_e.DEBUG<=be.logLevel&&(be._log("DEBUG",e),be.increment("DEBUG"))}},be);function be(){}Ie.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Oe=Ie;function Ie(){}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 a(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 Se(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 Re=s.log,Me=(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(u.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),u.isNullOrUndefined(i)?Re.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Re.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!u.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 xe=s.log,Ue=(Pe.sanitize=function(e){var t={};if(u.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){xe.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),u.isNullOrUndefined(i)?xe.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):xe.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 u.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!u.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!u.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 ke=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],De=(p.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(p.C1/p.C0);case"milliseconds":return e/(p.C2/p.C0);case"seconds":return e/(p.C3/p.C0);case"minutes":return e/(p.C4/p.C0);case"hours":return e/(p.C5/p.C0);case"days":return e/(p.C6/p.C0)}},p.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(p.C1/p.C0);case"milliseconds":return e/(p.C2/p.C1);case"microseconds":return e;case"seconds":return e/(p.C3/p.C1);case"minutes":return e/(p.C4/p.C1);case"hours":return e/(p.C5/p.C1);case"days":return e/(p.C6/p.C1)}},p.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(p.C2/p.C0);case"microseconds":return e*(p.C2/p.C1);case"milliseconds":return e;case"seconds":return e/(p.C3/p.C2);case"minutes":return e/(p.C4/p.C2);case"hours":return e/(p.C5/p.C2);case"days":return e/(p.C6/p.C2)}},p.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(p.C3/p.C0);case"microseconds":return e*(p.C3/p.C1);case"milliseconds":return e*(p.C3/p.C2);case"seconds":return e;case"minutes":return e/(p.C4/p.C3);case"hours":return e/(p.C5/p.C3);case"days":return e/(p.C6/p.C3)}},p.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(p.C4/p.C0);case"microseconds":return e*(p.C4/p.C1);case"milliseconds":return e*(p.C4/p.C2);case"seconds":return e*(p.C4/p.C3);case"minutes":return e;case"hours":return e/(p.C5/p.C4);case"days":return e/(p.C6/p.C4)}},p.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(p.C5/p.C0);case"microseconds":return e*(p.C5/p.C1);case"milliseconds":return e*(p.C5/p.C2);case"seconds":return e*(p.C5/p.C3);case"minutes":return e*(p.C5/p.C4);case"hours":return e;case"days":return e/(p.C6/p.C5)}},p.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(p.C6/p.C0);case"microseconds":return e*(p.C6/p.C1);case"milliseconds":return e*(p.C6/p.C2);case"seconds":return e*(p.C6/p.C3);case"minutes":return e*(p.C6/p.C4);case"hours":return e*(p.C6/p.C5);case"days":return e}},p.C6=24*(p.C5=60*(p.C4=60*(p.C3=1e3*(p.C2=1e3*(p.C1=1e3*(p.C0=1)))))),p.converter={nanoseconds:p.nanosToUnit,microseconds:p.microsToUnit,milliseconds:p.millisToUnit,seconds:p.secondsToUnit,minutes:p.minutesToUnit,hours:p.hoursToUnit,days:p.daysToUnit},p);function p(){}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(){this.parameters={}}He.prototype.get=function(e,t){e=this.parameters[e];return!u.isNullOrUndefined(e)&&(u.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var Be=He;function He(e){this.parameters=e}var ze="X-HACKLE-SDK-KEY",Ge="X-HACKLE-SDK-NAME",Ke="X-HACKLE-SDK-VERSION",Je="X-HACKLE-SDK-TIME",Ye=100,We=6e4,qe=500,$e=3650,Xe="_hackle_hid",Ze="_hackle_id",Qe="hackle-repository-storage",et="_hackle_session_id",tt="_hackle_last_event_ts",rt="_hackle_uid",nt="_hackle_did",it="_hackle_mkt",ot="hackle-manual-override_ab",st="hackle-manual-override_ff",at="hackle-iam-hide",ut="hackle-iam-impression",ct="hackle-split-url-redirected",lt=1/86400*3,pt="hackle-workspace-config",ft=6e4,ht=1e3,dt=s.log;function yt(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||dt.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function vt(e,t){if(!u.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=yt(e,i[n]);if(u.isNullOrUndefined(o))return;r.push(o)}return r}}mt.of=function(e,t){return new mt(e,t)};var gt=mt;function mt(e,t){this.value=e,this.reason=t}wt.prototype.isShow=function(){return u.isNotNullOrUndefined(this.inAppMessage)&&u.isNotNullOrUndefined(this.message)},wt.of=function(e,t,r,n){return new wt(t,r,e,n=void 0===n?{}:n)};var Et=wt;function wt(e,t,r,n){this.inAppMessage=e,this.message=t,this.reason=r,this.properties=n}_t.of=function(e,t,r,n){return new _t(e,t,r=void 0===r?new Ve:r,n=void 0===n?void 0:n)},Object.defineProperty(_t.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),_t.prototype.get=function(e,t){return this.config.get(e,t)};var Tt=_t;function _t(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}Ot.on=function(e,t,r){return new Ot(!0,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},Ot.off=function(e,t,r){return new Ot(!1,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},Object.defineProperty(Ot.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),Ot.prototype.get=function(e,t){return this.config.get(e,t)};var bt=Ot;function Ot(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}At.prototype.get=function(e,t){return t};var It=At;function At(){}Object.defineProperty(St.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),St.fromJson=function(e){return new St(e.id,new Be(f.associateRecord(e.parameters,function(e){return[e.key,e.value]})))},St.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}};var Nt=St;function St(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 Rt=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],Mt=(Ct.fromJson=function(e,t,r){var n=Ct.experimentStatusOrNull(t.execution.status),i=t.variations.map(function(t){return new xt(t.id,t.key,"DROPPED"===t.status,r.find(function(e){return e.id===t.parameterConfigurationId}))}),o=f.associate(t.execution.userOverrides,function(e){return[e.userId,e.variationId]}),s=f.mapNotNullOrUndefined(t.execution.segmentOverrides,function(e){return rr.fromJson(e,Sr.IDENTIFIER)}),a=f.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return Jt.fromJson(e,Sr.PROPERTY)}),u=Ln.fromJson(t.execution.targetUrls),c=yt(Rt,t.implementationType),l=f.mapNotNullOrUndefined(t.execution.targetRules,function(e){return rr.fromJson(e,Sr.PROPERTY)}),p=er.fromJson(t.execution.defaultRule);return n&&c&&p&&new Ct(t.id,t.key,e,t.identifierType,n,t.version,t.execution.version,i,o,s,a,u,l,p,t.containerId,c,t.winnerVariationId)},Ct.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void dt.debug("Unsupported status [".concat(e,"]"))}},Ct.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},Ct.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},Ct.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},Ct);function Ct(e,t,r,n,i,o,s,a,u,c,l,p,f,h,d,y,v){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.status=i,this.version=o,this.executionVersion=s,this.variations=a,this.userOverrides=u,this.segmentOverrides=c,this.targetAudiences=l,this.splitUrlTargets=p,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=y,this.winnerVariationId=v}Object.defineProperty(Ut.prototype,"parameters",{get:function(){var e;return null!=(e=null==(e=this.config)?void 0:e.parameters)?e:{}},enumerable:!1,configurable:!0});var xt=Ut;function Ut(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.config=n}kt.fromJson=function(e){return new kt(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new Dt(t,r,e)}))};var Pt=kt;function kt(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 Dt=Lt;function Lt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}Vt.fromJson=function(e){return new Vt(e.id,e.key)};var Ft=Vt;function Vt(e,t){this.id=e,this.key=t}Bt.ID="$id",Bt.USER="$userId",Bt.DEVICE="$deviceId",Bt.SESSION="$sessionId",Bt.HACKLE_DEVICE="$hackleDeviceId";var jt=Bt;function Bt(){}function Ht(e){var t=new zt;return t.addIdentifiers(e.identifiers||{}),t.add(jt.ID,e.id),t.add(jt.DEVICE,e.deviceId),u.isNotNullOrUndefined(e.userId)&&t.add(jt.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=Me.sanitizeValue(t);return Me.isValidType(e)&&r?this.identifiers[e]=t:dt.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},Gt.prototype.build=function(){return this.identifiers};var zt=Gt;function Gt(){this.identifiers={}}function Kt(e){var t,r={};return r.id=null!=(t=Me.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=Me.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=Me.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Ue.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=Me.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}Yt.fromJson=function(e,t){return new Yt(f.mapNotNullOrUndefined(e.conditions,function(e){return Wt.fromJson(e,t)}))},Yt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var Jt=Yt;function Yt(e){this.conditions=e}qt.fromJson=function(e,t){var r=$t.fromJson(e.key);if(r&&t.supports(r.type))return(t=Zt.fromJson(e.match))&&new qt(r,t)},qt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var Wt=qt;function qt(e,t){this.key=e,this.match=t}Xt.fromJson=function(e){var t=yt(Ar,e.type);return t&&new Xt(t,e.name)},Xt.prototype.toJson=function(){return{type:this.type,name:this.name}};var $t=Xt;function Xt(e,t){this.type=e,this.name=t}Qt.fromJson=function(e){var t=yt(_r,e.type),r=yt(Or,e.operator),n=yt(br,e.valueType);return t&&r&&n&&new Qt(t,r,n,e.values)},Qt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var Zt=Qt;function Qt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}tr.fromJson=function(e){var t=yt(Ir,e.type);return t&&new tr(t,e.variationId,e.bucketId)};var er=tr;function tr(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}nr.fromJson=function(e,t){t=Jt.fromJson(e.target,t),e=er.fromJson(e.action);return t&&e&&new nr(t,e)};var rr=nr;function nr(e,t){this.target=e,this.action=t}or.fromJson=function(e){var t=yt(Nr,e.type);return t&&new or(e.id,e.key,t,f.mapNotNullOrUndefined(e.targets,function(e){return Jt.fromJson(e,Sr.SEGMENT)}))};var ir=or;function or(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}ar.fromJson=function(e){return new ar(e.id,e.bucketId,e.groups.map(function(e){return ur.fromJson(e)}))},ar.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var sr=ar;function ar(e,t,r){this.id=e,this.bucketId=t,this.groups=r}cr.fromJson=function(e){return new cr(e.id,e.experiments)};var ur=cr;function cr(e,t){this.id=e,this.experiments=t}pr.fromJson=function(e){var t=yt(br,e.type),r=f.mapNotNullOrUndefined(e.targetRules,function(e){return fr.fromJson(e,Sr.PROPERTY)}),n=dr.fromJson(e.defaultValue);return t&&new pr(e.id,e.key,t,e.identifierType,r,n)};var lr=pr;function pr(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}hr.fromJson=function(e,t){t=Jt.fromJson(e.target,t);return t&&new hr(e.key,e.name,t,e.bucketId,dr.fromJson(e.value))};var fr=hr;function hr(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}yr.fromJson=function(e){return new yr(e.id,e.value)};var dr=yr;function yr(e,t){this.id=e,this.rawValue=t}gr.tryParse=function(e){if(e instanceof gr)return e;var t,r,n,i,e=gr.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 gr(new mr(parseInt(t,10),parseInt(r,10),parseInt(n,10)),wr.parse(i),wr.parse(e))},gr.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},gr.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},gr.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},gr.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},gr.prototype.isLessThan=function(e){return this.compareTo(e)<0},gr.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},gr.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 vr=gr;function gr(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}Er.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var mr=Er;function Er(e,t,r){this.major=e,this.minor=t,this.patch=r}Tr.parse=function(e){return e?new Tr(e.split(".")):Tr.EMPTY},Tr.prototype.isEmpty=function(){return 0===this.identifiers.length},Tr.prototype.isNotEmpty=function(){return!this.isEmpty()},Tr.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},Tr.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=Tr.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},Tr.compareIdentifiers=function(e,t){return Tr.numericIdentifierRegExp.test(e)&&Tr.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},Tr.EMPTY=new Tr([]),Tr.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var wr=Tr;function Tr(e){this.identifiers=e}var _r=["MATCH","NOT_MATCH"],br=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Or=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE","EXISTS"],Ir=["VARIATION","BUCKET"],Ar=["USER_ID","USER_PROPERTY","HACKLE_PROPERTY","SEGMENT","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"],Nr=["USER_ID","USER_PROPERTY"],Sr=(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","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Rr.SEGMENT=new Rr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Rr);function Rr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var Mr=["ACTIVE","DRAFT","PAUSE"],Cr=["WEB","ANDROID","IOS"],xr=["IMMEDIATE","CUSTOM"],Ur=["MODAL","BANNER","BOTTOM_SHEET","NONE"],Pr=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE","NONE"],kr=["VERTICAL","HORIZONTAL"],Dr=["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"],Fr=["TOP","MIDDLE","BOTTOM"],Vr=["LEFT","CENTER","RIGHT"],jr=(Br.fromJson=function(e){var t,r=yt(Mr,e.status);if(!u.isNullOrUndefined(r)){switch(yt(xr,e.timeUnit)){case"IMMEDIATE":t=new Hr;break;case"CUSTOM":if(u.isNullOrUndefined(e.startEpochTimeMillis))return;if(u.isNullOrUndefined(e.endEpochTimeMillis))return;t=new Gr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o=sn.fromJson(e.messageContext);if(!u.isNullOrUndefined(o))return n=e.eventTriggerRules.map(Yr.fromJson),i=qr.fromJson(e.eventFrequencyCap),new Br(e.id,e.key,r,t,new Jr(n,i),tn.fromJson(e.targetContext),o)}},Br.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},Br);function Br(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}zr.prototype.within=function(e){return!0};var Hr=zr;function zr(){this.type="IMMEDIATE"}Kr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var Gr=Kr;function Kr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var Jr=function(e,t){this.rules=e,this.frequencyCap=t},Yr=(Wr.fromJson=function(e){return new Wr(e.eventKey,f.mapNotNullOrUndefined(e.targets,function(e){return Jt.fromJson(e,Sr.PROPERTY)}))},Wr);function Wr(e,t){this.eventKey=e,this.targets=t}$r.fromJson=function(e){return e?new $r(e.identifiers.map(Xr.fromJson),Qr.fromJson(e.duration)):null};var qr=$r;function $r(e,t){this.identifierCaps=e,this.durationCap=t}Zr.fromJson=function(e){return new Zr(e.identifierType,e.countPerIdentifier)};var Xr=Zr;function Zr(e,t){this.identifierType=e,this.count=t}en.fromJson=function(e){if(!e)return null;var t=yt(ke,e.durationUnit.timeUnit);return t?new en(De.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Qr=en;function en(e,t){this.durationMillis=e,this.count=t}rn.fromJson=function(e){return new rn(e.overrides.map(nn.fromJson),f.mapNotNullOrUndefined(e.targets,function(e){return Jt.fromJson(e,Sr.PROPERTY)}))};var tn=rn;function rn(e,t){this.overrides=e,this.targets=t}on.fromJson=function(e){return new on(e.identifierType,e.identifiers)};var nn=on;function on(e,t){this.identifierType=e,this.identifiers=t}an.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new un(e.exposure.key)),vt(Cr,e.platformTypes));if(!u.isNullOrUndefined(r)){var n=vt(kr,e.orientations);if(!u.isNullOrUndefined(n)){var i=f.mapOrUndefined(e.messages,cn.fromJson);if(!u.isNullOrUndefined(i))return new an(e.defaultLang,t,r,n,i)}}};var sn=an;function an(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var un=function(e){this.key=e},cn=(ln.fromJson=function(e){var t=pn.fromJson(e.layout);if(!u.isNullOrUndefined(t)){var r=f.mapOrUndefined(e.images,yn.fromJson);if(!u.isNullOrUndefined(r)){var n=void 0;if(!u.isNotNullOrUndefined(e.imageAutoScroll)||(n=gn.fromJson(e.imageAutoScroll),!u.isNullOrUndefined(n))){var i=f.mapOrUndefined(e.buttons,On.fromJson);if(!u.isNullOrUndefined(i)){var o=void 0;if(!u.isNotNullOrUndefined(e.closeButton)||(o=On.fromJson2(e.closeButton),!u.isNullOrUndefined(o))){var s=f.mapOrUndefined(e.outerButtons,An.fromJson),a=f.mapOrUndefined(e.innerButtons,An.fromJson);if(!u.isNullOrUndefined(s)&&!u.isNullOrUndefined(a))return new ln(e.variationKey,e.lang,t,r,n,e.text?En.fromJson(e.text):void 0,i,o,new Rn(e.background.color),e.action?Mn.fromJson(e.action):void 0,s,a)}}}}}},ln.prototype.toJson=function(){var e;return{variationKey:this.variationKey,lang:this.lang,layout:{layoutType:this.layout.layoutType,alignment:null!=(e=null==(e=this.layout.alignment)?void 0:e.toJson())?e:null,displayType:this.layout.displayType},images:this.images.map(function(e){return e.toJson()}),imageAutoScroll:null!=(e=null==(e=this.imageAutoScroll)?void 0:e.toJson())?e:null,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},action:null!=(e=null==(e=this.action)?void 0:e.toJson())?e:null,outerButtons:this.outerButtons.map(function(e){return e.toJson()}),innerButtons:this.innerButtons.map(function(e){return e.toJson()})}},ln);function ln(e,t,r,n,i,o,s,a,u,c,l,p){this.variationKey=e,this.lang=t,this.layout=r,this.images=n,this.imageAutoScroll=i,this.text=o,this.buttons=s,this.closeButton=a,this.background=u,this.action=c,this.outerButtons=l,this.innerButtons=p}fn.fromJson=function(e){var t=yt(Pr,e.layoutType),r=yt(Ur,e.displayType);if(!u.isNullOrUndefined(r)&&!u.isNullOrUndefined(t))return new fn(r,t,e.alignment?hn.fromJson(e.alignment):void 0)};var pn=fn;function fn(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}dn.fromJson=function(e){var t=yt(Vr,e.horizontal);if(!u.isNullOrUndefined(t)){e=yt(Fr,e.vertical);if(!u.isNullOrUndefined(e))return new dn(t,e)}},dn.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}};var hn=dn;function dn(e,t){this.horizontal=e,this.vertical=t}vn.fromJson=function(e){var t=yt(kr,e.orientation);if(!u.isNullOrUndefined(t)){var r=void 0;if(!u.isNotNullOrUndefined(e.action)||(r=Mn.fromJson(e.action),!u.isNullOrUndefined(r)))return new vn(t,e.imagePath,r)}},vn.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 yn=vn;function vn(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}mn.fromJson=function(e){var t=yt(ke,e.interval.timeUnit);if(t)return new mn(De.converter[t](e.interval.amount,"milliseconds"))},mn.prototype.toJson=function(){return{interval:{timeUnit:"milliseconds",amount:this.intervalMillis}}};var gn=mn;function mn(e){this.intervalMillis=e}wn.fromJson=function(e){return new wn(Tn.fromJson(e.title),Tn.fromJson(e.body))},wn.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 En=wn;function wn(e,t){this.title=e,this.body=t}_n.fromJson=function(e){return new _n(e.text,new bn(e.style.textColor))};var Tn=_n;function _n(e,t){this.text=e,this.style=t}var bn=function(e){this.color=e},On=(In.fromJson=function(e){var t=Mn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new In(e.text,new Sn(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},In.fromJson2=function(e){var t=Mn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new In("✕",new Sn(e.style.color,"#FFFFFF","#FFFFFF"),t)},In.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},In.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},In);function In(e,t,r){this.text=e,this.style=t,this.action=r}Nn.fromJson=function(e){var t=On.fromJson(e.button);if(!u.isNullOrUndefined(t)){e=hn.fromJson(e.alignment);if(!u.isNullOrUndefined(e))return new Nn(t,e)}},Nn.prototype.toJson=function(){return{button:this.button.toJson(),alignment:this.alignment.toJson()}};var An=Nn;function Nn(e,t){this.button=e,this.alignment=t}var Sn=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Rn=function(e){this.color=e},Mn=(Cn.fromJson=function(e){var t=yt(Dr,e.behavior);if(!u.isNullOrUndefined(t)){var r=yt(Lr,e.type);if(!u.isNullOrUndefined(r))return new Cn(t,r,null!=(t=e.value)?t:void 0)}},Cn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Cn);function Cn(e,t,r){this.behavior=e,this.type=t,this.value=r}Un.fromJson=function(e){var t=e.type,e=e.value,r=this.linkActionTypes.some(function(e){return e===t}),n=this.closeActionTypes.some(function(e){return e===t}),i=this.tabTargetActionsTypes.some(function(e){return e===t}),o=this.windowTargetActionsTypes.some(function(e){return e===t});return new Un(r?"LINK":"CLOSE",n?{hideDurationMillis:"HIDDEN"===t?864e5:null}:void 0,r?{url:null!=e?e:"",target:o?"NEW_WINDOW":i?"NEW_TAB":"CURRENT",shouldCloseAfterLink:n}:void 0)},Un.fromInteraction=function(e){return"CLOSE"===e.type?new Un(e.type,{hideDurationMillis:null}):Un.fromJson(e.action)},Un.fromAction=function(e){return Un.fromJson(e.toJson())},Un.linkActionTypes=["LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE","WEB_LINK"],Un.closeActionTypes=["CLOSE","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW_AND_CLOSE"],Un.tabTargetActionsTypes=["LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE"],Un.windowTargetActionsTypes=["LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"];var xn=Un;function Un(e,t,r){this.type=e,this.close=t,this.link=r}var Pn=function(e){this.id=e},kn=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Dn.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new Dn(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},Dn);function Dn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}Fn.fromJson=function(e){if(null!==e)return new Fn(f.mapNotNullOrUndefined(e.match,function(e){return Jt.fromJson(e,Sr.PROPERTY)}),f.mapNotNullOrUndefined(e.notMatch,function(e){return Jt.fromJson(e,Sr.PROPERTY)}))};var Ln=Fn;function Fn(e,t){this.includeTargets=e,this.excludeTargets=t}jn.fromJson=function(e){return new jn(e.eventKey,e.property,e.stats)},jn.prototype.countWithinDays=function(t){return f.sum(this.stats.filter(function(e){return e.date>=t}),function(e){return e.count})};var Vn=jn;function jn(e,t,r){this.eventKey=e,this.property=t,this.stats=r}Hn.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},Hn.prototype.tag=function(e,t){return this._tags[e]=t,this},Hn.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})};var Bn=Hn;function Hn(e){this.name=e,this._tags={},this.name=e}Gn.start=function(e){return new Gn(e=void 0===e?Gn.defaultClock:e)},Gn.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Gn.defaultClock=new Le;var zn=Gn;function Gn(e){this._clock=e,this.startTime=this._clock.tick()}Jn.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},Jn.prototype.tag=function(e,t){return this._tags[e]=t,this},Jn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Kn=Jn;function Jn(e){this.name=e,this._tags={}}Wn.prototype.values=function(){return Array.from(this.data.values())},Wn.prototype.keys=function(){return Array.from(this.data.keys())},Wn.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},Wn.prototype.has=function(e){return void 0!==this.get(e)},Wn.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},Wn.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},Wn.prototype.forEach=function(e){this.data.forEach(e)},Wn.prototype.filter=function(e){for(var t=new Wn(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},Wn.prototype.entries=function(){return Array.from(this.data.entries())};var Yn=Wn;function Wn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty($n.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var qn=$n;function $n(e,t){this.valueSupplier=t,this.field=e}function Xn(e,t){return e.name===t.name&&Me.isEquals(e.tags,t.tags)}Object.defineProperty(Zn.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),Zn.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},Zn.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},Zn.prototype.counter=function(e,t){return void 0===t&&(t={}),new Kn(e).tags(t).register(this)},Zn.prototype.timer=function(e,t){return void 0===t&&(t={}),new Bn(e).tags(t).register(this)},Zn.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},Zn.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},Zn.prototype.close=function(){};z=Zn;function Zn(){this.id=H(),this.name="MetricRegistry",this._metrics=new Yn(Xn)}Ne(ei,Qn=z),ei.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.")))},ei.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),s.log.debug("PushMetricRegistry stopped.")},ei.prototype.close=function(){this.stop()};var Qn,r=ei;function ei(e,t){var r=Qn.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}ri.prototype.count=function(){return this.counterValue},ri.prototype.increment=function(e){this.counterValue+=null!=e?e:1},ri.prototype.measure=function(){return[new qn("count",this.count.bind(this))]};var ti=ri;function ri(e){this.counterValue=0,this.id=e}ii.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new ti(this.id),e},ii.prototype.count=function(){return this.currentCounter.count()},ii.prototype.increment=function(e){this.currentCounter.increment(e)},ii.prototype.measure=function(){return[new qn("count",this.count.bind(this))]};var ni=ii;function ii(e){this.id=e,this.currentCounter=new ti(e)}si.prototype.count=function(){return this._count},si.prototype.totalTime=function(e){return De.nanosToUnit(this._total,e)},si.prototype.max=function(e){return De.nanosToUnit(this._max,e)},si.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},si.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))},si.prototype.measure=function(){var e=this;return[new qn("count",this.count.bind(this)),new qn("total",function(){return e.totalTime("milliseconds")}),new qn("max",function(){return e.max("milliseconds")}),new qn("mean",function(){return e.mean("milliseconds")})]};var oi=si;function si(e){this._count=0,this._total=0,this._max=0,this.id=e}ui.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new oi(this.id),e},ui.prototype.count=function(){return this.currentTimer.count()},ui.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},ui.prototype.max=function(e){return this.currentTimer.max(e)},ui.prototype.record=function(e,t){this.currentTimer.record(e,t)},ui.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},ui.prototype.measure=function(){var e=this;return[new qn("count",this.count.bind(this)),new qn("total",function(){return e.totalTime("milliseconds")}),new qn("max",function(){return e.max("milliseconds")}),new qn("mean",function(){return e.mean("milliseconds")})]};var ai=ui;function ui(e){this.id=e,this.currentTimer=new oi(e)}Ne(li,ci=r),li.prototype.createCounter=function(e){return new ni(e)},li.prototype.createTimer=function(e){return new ai(e)},li.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 ci,e=li;function li(e,t){return ci.call(this,e,t)||this}fi.prototype.count=function(){return 0},fi.prototype.increment=function(e){},fi.prototype.measure=function(){return[new qn("count",this.count.bind(this))]};var pi=fi;function fi(e){this.id=e}Object.defineProperty(di.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),di.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},di.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},di.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},di.prototype.measure=function(){return[new qn("count",this.count.bind(this))]};var hi=di;function di(e){this._counters=new Yn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new pi(e)}vi.prototype.measure=function(){var e=this;return[new qn("count",this.count.bind(this)),new qn("total",function(){return e.totalTime("milliseconds")}),new qn("max",function(){return e.max("milliseconds")}),new qn("mean",function(){return e.mean("milliseconds")})]},vi.prototype.count=function(){return 0},vi.prototype.totalTime=function(e){return 0},vi.prototype.max=function(e){return 0},vi.prototype.mean=function(e){return 0},vi.prototype.record=function(e,t){};var yi=vi;function vi(e){this.id=e}Object.defineProperty(mi.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),mi.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},mi.prototype.max=function(e){return this.firstTimer.max(e)},mi.prototype.mean=function(e){return this.firstTimer.mean(e)},mi.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(mi.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),mi.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},mi.prototype.count=function(){return this.firstTimer.count()},mi.prototype.measure=function(){var e=this;return[new qn("count",this.count.bind(this)),new qn("total",function(){return e.totalTime("milliseconds")}),new qn("max",function(){return e.max("milliseconds")}),new qn("mean",function(){return e.mean("milliseconds")})]};var gi=mi;function mi(e){this._timers=new Yn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new yi(e)}Ne(wi,Ei=z),wi.prototype.createCounter=function(e){e=new hi(e);return this.addRegistry(e),e},wi.prototype.createTimer=function(e){e=new gi(e);return this.addRegistry(e),e},wi.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},wi.prototype.add=function(r){r instanceof wi||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)}))},wi.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var Ei,o=wi;function wi(){var e=null!==Ei&&Ei.apply(this,arguments)||this;return e.registries=new Yn(function(e,t){return e.id===t.id}),e}_i.counter=function(e,t){return _i.globalRegistry.counter(e,t)},_i.timer=function(e,t){return _i.globalRegistry.timer(e,t)},_i.addRegistry=function(e){_i.globalRegistry.add(e),s.log.debug("MetricRegistry added ".concat(e.name))},_i.globalRegistry=new o;var Ti=_i;function _i(){}Oi.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},Oi.isNotEmptyString=function(e){return!u.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var bi=Oi;function Oi(){}Ai.builder=function(){return new Ni},Ai.get=function(e){return Ai.builder().url(e).build()},Ai.prototype.toBuilder=function(){return new Ni(this)};var Ii=Ai;function Ai(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}Si.prototype.url=function(e){return this._url=e,this},Si.prototype.method=function(e){return this._method=e,this},Si.prototype.body=function(e){return this._body=e,this},Si.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},Si.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},Si.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new Ii(this._url,this._method,this._body,this._headers.build(),e)};var Ni=Si;function Si(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:Ci.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}Mi.ok=function(e,t){return Mi.of(200,e,t)},Mi.of=function(e,t,r){return new Mi(e,null!=t?t:null,null!=r?r:Ci.empty())},Mi.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},Mi.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},Mi.prototype.isNotModified=function(){return 304===this.statusCode};var Ri=Mi;function Mi(e,t,r){this.statusCode=e,this.body=t,this.headers=r}xi.empty=function(){return new xi(new Map)},xi.builder=function(){return new Ui(new Map)},xi.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(bi.equalsIgnoreCase(i,e))return n}return null},xi.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},xi.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},{})},xi.prototype.toBuilder=function(){return new Ui(this.headers)},xi.IF_MODIFIED_SINCE="If-Modified-Since",xi.LAST_MODIFIED="Last-Modified";var Ci=xi;function xi(e){this.headers=e}Pi.prototype.add=function(e,t){return this.headers.set(e,t),this},Pi.prototype.build=function(){return new Ci(this.headers)};var Ui=Pi;function Pi(e){this.headers=e}Ne(Li,ki=e),Li.prototype.flushMetrics=function(e,t){var r=this;f.chunked(e.filter(this.isDispatchTarget.bind(this)),Ye).forEach(function(e){r.dispatch(e,t)})},Li.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Li.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))})},Li.prototype.createRequest=function(e){return Ii.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Li.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Li.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:u.fromMap(f.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Li.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.publish(!0);case"visible":case"pageshow":case"blur":case"locationChange":case"focus":return}};var ki,Di=Li;function Li(e,t,r,n,i){n=ki.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}Vi.experiment=function(e,t,r){t=Ti.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Vi.featureFlag=function(e,t,r){t=Ti.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Vi.remoteConfig=function(e,t,r){t=Ti.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)},Vi.inAppMessage=function(e,t,r){t=Ti.timer("iam.decision",{key:String(t),show:String(r.isShow()),reason:String(r.reason)});e.stop(t)};var Fi=Vi;function Vi(){}Bi.record=function(e,t,r){e=Ti.timer("api.call",{operation:e,success:Bi.success(r)});t.stop(e)},Bi.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var ji=Bi;function Bi(){}zi.decide=function(e,t,r,n){if(u.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)}},zi.decision=function(e,t,r,n,i){return u.isNullOrUndefined(t)?gt.of(n,h.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Hi=zi;function zi(){}var Gi=s.log,Ki=(Ji.prototype.get=function(t,r){var n,e=zn.start();try{n=this.decide(t,r)}catch(e){Gi.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=gt.of(r,h.EXCEPTION)}return Fi.remoteConfig(e,t,n),n.value},Ji.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Hi.decide(this.core,e,t,r)},Ji);function Ji(e,t,r){this.core=e,this.userManager=t,this.user=r}qi.prototype.contains=function(e){return this._properties.has(e)},qi.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},qi.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)},qi.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=Ue.sanitizeValue(e,t);return u.isNullOrUndefined(r)||this._properties.set(e,r),this},qi.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},qi.prototype.build=function(){return this._properties};var Yi,Wi=qi;function qi(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(i=Yi=Yi||{}).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";Xi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Wi).addProperties(e).addProperties(t).build()};var $i=Xi;function Xi(){}Qi.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Wi).addProperties(e).addProperties(t,!0).build()};var Zi=Qi;function Qi(){}to.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new Wi).addProperties(e).remove(t).build()};var eo=to;function to(){}no.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new Wi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},no.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var ro=no;function no(){}io.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new Wi;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},io.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},io.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},io.prototype.contains=function(e,t){return e.includes(t)},io.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Se([e],t,!0)},io.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Se(Se([],e,!0),[t],!1)};t=io;function io(){}Ne(ao,oo=t),ao.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var oo,so=ao;function ao(){return null!==oo&&oo.apply(this,arguments)||this}Ne(lo,uo=t),lo.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},lo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var uo,co=lo;function lo(){return null!==uo&&uo.apply(this,arguments)||this}Ne(ho,po=t),ho.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var po,fo=ho;function ho(){return null!==po&&po.apply(this,arguments)||this}Ne(go,yo=t),go.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)},go.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},go.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var yo,vo=go;function go(){return null!==yo&&yo.apply(this,arguments)||this}Ne(wo,mo=t),wo.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},wo.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var mo,Eo=wo;function wo(){return null!==mo&&mo.apply(this,arguments)||this}_o.prototype.operate=function(e,t){return new Map};var To=_o;function _o(){}Oo.get=function(e){switch(e){case Yi.SET:return new $i;case Yi.SET_ONCE:return new Zi;case Yi.UNSET:return new eo;case Yi.INCREMENT:return new ro;case Yi.APPEND:return new so;case Yi.APPEND_ONCE:return new co;case Yi.PREPEND:return new fo;case Yi.PREPEND_ONCE:return new vo;case Yi.CLEAR_ALL:return new To;case Yi.REMOVE:return new Eo}};var bo=Oo;function Oo(){}Ao.prototype.set=function(e,t){return this.add(Yi.SET,e,t)},Ao.prototype.setOnce=function(e,t){return this.add(Yi.SET_ONCE,e,t)},Ao.prototype.unset=function(e){return this.add(Yi.UNSET,e,"-")},Ao.prototype.increment=function(e,t){return this.add(Yi.INCREMENT,e,t)},Ao.prototype.append=function(e,t){return this.add(Yi.APPEND,e,t)},Ao.prototype.appendOnce=function(e,t){return this.add(Yi.APPEND_ONCE,e,t)},Ao.prototype.prepend=function(e,t){return this.add(Yi.PREPEND,e,t)},Ao.prototype.prependOnce=function(e,t){return this.add(Yi.PREPEND_ONCE,e,t)},Ao.prototype.remove=function(e,t){return this.add(Yi.REMOVE,e,t)},Ao.prototype.clearAll=function(){return this.add(Yi.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 No(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 Wi);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var Io=Ao;function Ao(){this.operations=new Map}So.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=bo.get(t).operate(r,e)}),r},So.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]),Ue.sanitize(u.fromMap(e))),r))}),i},So.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 No=So;function So(e){this.operations=null!=e?e:new Map}Mo.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 Ro=Mo;function Mo(){}xo.prototype.isEquals=function(e){return this.url===e.url},Object.defineProperty(xo.prototype,"pageTitle",{get:function(){return"undefined"==typeof window||"undefined"==typeof document?"":window.document.title},enumerable:!1,configurable:!0}),xo.createWithCurrentPage=function(){return"undefined"==typeof window||"undefined"==typeof document?new xo:new xo(window.location.pathname,window.location.host,window.location.hostname,window.location.href,window.document.referrer,window.location.search,window.location.protocol)},xo.prototype.toProperties=function(){return{pagePath:this.pagePath,pageTitle:this.pageTitle,host:this.host,url:this.url,referrer:this.referrer,queryParameter:this.queryParameter,protocol:this.protocol.replace(":","")}};var Co=xo;function xo(e,t,r,n,i,o,s){void 0===t&&(t=""),void 0===r&&(r=""),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s=""),this.pagePath=e=void 0===e?"":e,this.host=t,this.hostname=r,this.url=n,this.referrer=i,this.queryParameter=o,this.protocol=s}var Uo=s.log,Po=(ko.prototype.initialize=function(){return a(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]),Uo.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Uo.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Uo.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},ko.prototype.getSessionId=function(){return this.sessionManager.sessionId},ko.prototype.getUser=function(){return this.userManager.currentUser},ko.prototype.setUser=function(e){try{var t=Kt(e);if(!t)return Uo.warn("invalid user"),Promise.resolve();var r=this.userManager.setUser(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Uo.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},ko.prototype.setUserId=function(e){try{var t=void 0;if(void 0===e)t=this.userManager.setUserId(void 0);else{var r=Me.sanitizeValue(e);if(!r)return Uo.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();t=this.userManager.setUserId(r)}return this.userManager.syncIfNeeded(t).catch(function(){})}catch(e){return Uo.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},ko.prototype.setDeviceId=function(e){try{var t=Me.sanitizeValue(e);if(!t)return Uo.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve();var r=this.userManager.setDeviceId(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Uo.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},ko.prototype.setUserProperty=function(e,t){e=(new Io).set(e,t).build();return this.updateUserProperties(e)},ko.prototype.setUserProperties=function(e){try{var t=Ue.sanitize(e),r=new Io;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 Uo.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},ko.prototype.updateUserProperties=function(e){try{var t=e.toEvent();return this.track(t),this.userManager.updateUserProperties(e),this.core.flush(!1),Promise.resolve()}catch(e){return Uo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},ko.prototype.resetUser=function(){try{var e=this.userManager.resetUser(),t=(new Io).clearAll().build();return this.track(t.toEvent()),this.userManager.syncIfNeeded(e).catch(function(){})}catch(e){return Uo.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},ko.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},ko.prototype.variationDetail=function(r,n,e){var i=e||"A",e=zn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return Uo.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),Tt.of(i,h.EXCEPTION)}}(this);return Fi.experiment(e,r,t),t},ko.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},ko.prototype.featureFlagDetail=function(r,n){var e=zn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Uo.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),bt.off(h.EXCEPTION)}}(this);return Fi.featureFlag(e,r,t),t},ko.prototype.track=function(e,t){try{Uo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Uo.error("Unexpected exception while tracking event: ".concat(e))}},ko.prototype.trackPageView=function(e){var t=Co.createWithCurrentPage();this.pageEventTracker.track(t)},ko.prototype.remoteConfig=function(e){return new Ki(this.core,this.userManager,e)},ko.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},ko.prototype.getExperiment=function(t){try{return this.core.getExperiment(t)}catch(e){return void Uo.error('"Unexpected exception while get experiment['.concat(t,"]"))}},ko.prototype.onInitialized=function(r){var n;return a(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,Ro.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(),Uo.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},ko.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},ko.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Uo.debug("UserExplorer opened."),Ti.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Uo.error("UserExplorer is not provided")},ko.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Uo.warn("There is no active HackleDevtools.")},ko.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},ko.prototype.setInAppMessageListener=function(e){this.inAppMessageUi.setListener(e)},ko.prototype.close=function(){Uo.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},ko);function ko(e,t,r,n,i,o,s,a){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.fetchThrottler=i,this.pageEventTracker=o,this.inAppMessageUi=s,this.devTools=a,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.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this),this.initialization=this.initialize()}var Do=s.log,Lo=(Fo.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 Do.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},Fo);function Fo(e,t){this.invocationProcessor=e,this.user=t}jo.tryParse=function(e){try{return new URL(e)}catch(e){return}},jo.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:jo.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},jo.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},jo.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},jo.decodeURIOrOriginal=function(t){try{return decodeURI(t)}catch(e){return t}},jo.decodeURIComponentOrOriginal=function(t){try{return decodeURIComponent(t)}catch(e){return t}};var Vo=jo;function jo(){}Ho.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]:""},Ho.prototype.getItem=function(e){for(var t,r=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(r))return null!=(t=Vo.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},Ho.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},Ho.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Ho.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},Ho.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Ho.prototype.getOptions=function(){return this.options},Ho.getInstance=function(e){return void 0===e&&(e={days:$e,isCrossSubdomain:!0}),Ho.storage=Ho.storage?Ho.storage:new Ho(e)};var Bo=Ho;function Ho(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}Go.prototype.initialize=function(){Bo.getInstance().getItem(Xe)||Yo()},Go.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return Jo();case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var zo=Go;function Go(){}function Ko(){var e=Bo.getInstance(),t=e.getItem(Ze);if(t)return t;t=e.getItem(Xe);return t||Yo()}function Jo(){Bo.getInstance().removeItem(Ze)}function Yo(){var e=H();return Bo.getInstance().setItem(Xe,e),e}var Wo,qo=s.log;(r=Wo=Wo||{}).native="native",r.web_view_wrapper="web_view_wrapper";Xo.prototype.getSessionId=function(){try{var e=this.invocationProcessor.process({command:"getSessionId"});return null!=e?e:Ko()}catch(e){return qo.error("Unexpected exception while get sessionId: ".concat(e)),Ko()}},Xo.prototype.getUser=function(){var e;try{var t=this.invocationProcessor.process({command:"getUser"});return null!=(e=Kt(t))?e:this.defaultUser()}catch(e){return qo.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},Xo.prototype.setUser=function(n){return a(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Kt(n)))return qo.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t}},this.invocationProcessor.process(r)}catch(e){qo.error("Unexpected exception while set user: ".concat(e))}return[2]})})},Xo.prototype.setUserId=function(n){return a(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Me.sanitizeValue(n)))return qo.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t}},this.invocationProcessor.process(r)}catch(e){qo.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},Xo.prototype.setDeviceId=function(n){return a(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Me.sanitizeValue(n)))return qo.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t}},this.invocationProcessor.process(r)}catch(e){qo.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},Xo.prototype.setUserProperty=function(r,n){return a(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){qo.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},Xo.prototype.setUserProperties=function(n){return a(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{t=Ue.sanitize(n),r=new Io,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){qo.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},Xo.prototype.updateUserProperties=function(r){return a(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){qo.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},Xo.prototype.resetUser=function(){return a(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"resetUser"},this.invocationProcessor.process(t)}catch(e){qo.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},Xo.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 qo.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),r}},Xo.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 Tt.of(o.variation,o.reason,new Be(null!=(n=o.config.parameters)?n:{}))}catch(e){return qo.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),Tt.of(r,h.EXCEPTION)}},Xo.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 qo.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),!1}},Xo.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 bt(i.isOn,i.reason,new Be(null!=(r=i.config.parameters)?r:{}),void 0)}catch(e){return qo.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),bt.off(h.EXCEPTION)}},Xo.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){qo.error("Unexpected exception while tracking event: ".concat(e))}},Xo.prototype.trackPageView=function(e){qo.info("Web to app integration feature is not support 'trackPageView' method")},Xo.prototype.remoteConfig=function(e){return new Lo(this.invocationProcessor,this.convertUser(e))},Xo.prototype.onReady=function(e,t){e()},Xo.prototype.showUserExplorer=function(){try{this.invocationProcessor.process({command:"showUserExplorer"})}catch(e){qo.error("Unexpected exception while show userExplorer: ".concat(e))}},Xo.prototype.hideUserExplorer=function(){qo.info("Web to app integration feature is not support 'hideUserExplorer' method")},Xo.prototype.setInAppMessageListener=function(e){qo.info("Web to app integration feature is not support 'setInAppMessageListener' method")},Xo.prototype.fetch=function(){return Promise.resolve()},Xo.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},Xo.prototype.close=function(){qo.info("Web to app integration feature is not support 'close' method")},Xo.prototype.getExperiment=function(e){qo.info("Web to app integration feature is not support 'getExperiment' method")},Xo.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},Xo.prototype.convertUser=function(e){return"string"==typeof e||e&&null!=(e=Kt(e))?e:void 0},Xo.prototype.defaultUser=function(){return{deviceId:Ko()}};var $o=Xo;function Xo(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),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this)}Qo.prototype.getSessionId=function(){return this.browser.getSessionId()},Qo.prototype.getUser=function(){return this.browser.getUser()},Qo.prototype.syncUser=function(){return a(this,void 0,void 0,function(){var t;return l(this,function(e){switch(e.label){case 0:return t=this.browser.getUser(),[4,this.app.setUser(t)];case 1:return e.sent(),[2]}})})},Qo.prototype.setUser=function(t){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUser(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Qo.prototype.setUserId=function(t){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Qo.prototype.setDeviceId=function(t){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setDeviceId(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Qo.prototype.setUserProperty=function(t,r){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperty(t,r)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Qo.prototype.setUserProperties=function(t){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Qo.prototype.updateUserProperties=function(t){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.updateUserProperties(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Qo.prototype.resetUser=function(){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.resetUser()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},Qo.prototype.variation=function(e,t,r){return this.browser.variation(e,t,r=void 0===r?"A":r)},Qo.prototype.variationDetail=function(e,t,r){return this.browser.variationDetail(e,t,r=void 0===r?"A":r)},Qo.prototype.isFeatureOn=function(e,t){return this.browser.isFeatureOn(e,t)},Qo.prototype.featureFlagDetail=function(e,t){return this.browser.featureFlagDetail(e,t)},Qo.prototype.track=function(e,t){return this.browser.track(e,t)},Qo.prototype.trackPageView=function(e){return this.browser.trackPageView(e)},Qo.prototype.remoteConfig=function(e){return this.browser.remoteConfig(e)},Qo.prototype.onReady=function(e,t){this.browser.onReady(e,t)},Qo.prototype.showUserExplorer=function(){this.browser.showUserExplorer()},Qo.prototype.hideUserExplorer=function(){this.browser.hideUserExplorer()},Qo.prototype.fetch=function(){return this.browser.fetch()},Qo.prototype.onInitialized=function(e){return this.browser.onInitialized(e)},Qo.prototype.close=function(){this.browser.close()},Qo.prototype.setInAppMessageListener=function(e){this.browser.setInAppMessageListener(e)},Qo.prototype.getExperiment=function(e){return this.browser.getExperiment(e)};var Zo=Qo;function Qo(e,t){this.browser=e,this.app=t,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.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getExperiment=this.getExperiment.bind(this)}function es(e){return e&&e.Math==Math&&e}function ts(e){try{return!!e()}catch(e){return!0}}function rs(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function ns(e){return Hs(Bs(e),8,-1)}function is(e){if(null==e)throw Js("Can't call method on "+e);return e}function os(e){return Ys(Ws(e))}function ss(e){return"function"==typeof e}function as(e){return"object"==typeof e?null!==e:qs(e)}function us(e,t){return arguments.length<2?(r=$s[e],Xs(r)?r:void 0):$s[e]&&$s[e][t];var r}function cs(e){try{return aa(e)}catch(e){return"Object"}}function ls(e){if(ua(e))return e;throw la(ca(e)+" is not a function")}function ps(e,t){return null==(e=e[t])?void 0:pa(e)}function fs(t,r){try{ga(va,t,{value:r,configurable:!0,writable:!0})}catch(e){va[t]=r}return r}function hs(e){return _a(Ta(e))}function ds(e){return"Symbol("+(void 0===e?"":e)+")_"+Sa(++Aa+Na,36)}function ys(e){var t;return Ra(Ua,e)&&(Ca||"string"==typeof Ua[e])||(t="Symbol."+e,Ca&&Ra(Pa,e)?Ua[e]=Pa[e]:Ua[e]=(xa&&ka?ka:Da)(t)),Ua[e]}function vs(e){return e=Ga(e,"string"),Ka(e)?e:e+""}function gs(e){return Ya?Ja.createElement(e):{}}function ms(e){if(nu(e))return e;throw ou(iu(e)+" is not an object")}function Es(e){return Eu[e]||(Eu[e]=mu(e))}function ws(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(Fu(r)&&ju(r,o,n),n.global)i?e[t]=r:Bu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Vu.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Ts(e){return(e=+e)!=e||0==e?0:Gu(e)}function _s(e,t){return(e=Ku(e))<0?Ju(e+t,0):Yu(e,t)}function bs(e){return $u(e.length)}function Os(a){return function(e,t,r){var n,i=Xu(e),o=Qu(i),s=Zu(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 Is(e,t){var r,n=tc(e),i=0,o=[];for(r in n)!ec(nc,r)&&ec(n,r)&&ic(o,r);for(;t.length>i;)!ec(n,r=t[i++])||~rc(o,r)||ic(o,r);return o}function As(e,t,r){for(var n=fc(t),i=dc.f,o=hc.f,s=0;s<n.length;s++){var a=n[s];pc(e,a)||r&&pc(r,a)||i(e,a,o(t,a))}}function Ns(e,t){return(e=Ec[mc(e)])==Tc||e!=wc&&(vc(t)?yc(t):!!t)}function y(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?_c:a?_c[o]||Ac(o,{}):(_c[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=bc(u,r))&&i.value:u[r],!Sc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;Nc(n,i)}(e.sham||i&&i.sham)&&Oc(n,"sham",!0),Ic(u,r,n,e)}}var Ss,Rs,Ms,Cs,xs,Us,Ps,ks,z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o=es("object"==typeof globalThis&&globalThis)||es("object"==typeof window&&window)||es("object"==typeof self&&self)||es("object"==typeof z&&z)||function(){return this}()||Function("return this")(),e={},i=!ts(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t=!ts(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Ds=Function.prototype.call,r=t?Ds.bind(Ds):function(){return Ds.apply(Ds,arguments)},z={},v={}.propertyIsEnumerable,Ls=Object.getOwnPropertyDescriptor,g=Ls&&!v.call({1:2},1),g=(z.f=g?function(e){e=Ls(this,e);return!!e&&e.enumerable}:v,t),v=Function.prototype,Fs=v.bind,Vs=v.call,js=g&&Fs.bind(Vs,Vs),v=g?function(e){return e&&js(e)}:function(e){return e&&function(){return Vs.apply(e,arguments)}},Fs=v,Bs=Fs({}.toString),Hs=Fs("".slice),g=ts,zs=ns,Gs=Object,Ks=v("".split),Fs=g(function(){return!Gs("z").propertyIsEnumerable(0)})?function(e){return"String"==zs(e)?Ks(e,""):Gs(e)}:Gs,Js=TypeError,Ys=Fs,Ws=is,qs=ss,$s=o,Xs=ss,g=v({}.isPrototypeOf),Zs=us("navigator","userAgent")||"",Qs=Zs,ea=o.process,ta=o.Deno,ea=ea&&ea.versions||ta&&ta.version,ta=ea&&ea.v8,ea=E=!(E=ta?0<(m=ta.split("."))[0]&&m[0]<4?1:+(m[0]+m[1]):E)&&Qs&&(!(m=Qs.match(/Edge\/(\d+)/))||74<=m[1])&&(m=Qs.match(/Chrome\/(\d+)/))?+m[1]:E,ra=ea,ta=ts,Qs=!!Object.getOwnPropertySymbols&&!ta(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ra&&ra<41}),m=Qs&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,na=us,ia=ss,oa=g,sa=Object,E=m?function(e){return"symbol"==typeof e}:function(e){var t=na("Symbol");return ia(t)&&oa(t.prototype,sa(e))},aa=String,ua=ss,ca=cs,la=TypeError,pa=ls,fa=r,ha=ss,da=as,ya=TypeError,ta={exports:{}},va=o,ga=Object.defineProperty,ma=fs,Ea="__core-js_shared__",ma=o[Ea]||ma(Ea,{}),wa=ma,Ta=((ta.exports=function(e,t){return wa[e]||(wa[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"}),is),_a=Object,ba=hs,Oa=v({}.hasOwnProperty),Ea=Object.hasOwn||function(e,t){return Oa(ba(e),t)},Ia=v,Aa=0,Na=Math.random(),Sa=Ia(1..toString),Ia=o,w=ta.exports,Ra=Ea,Ma=ds,Ca=Qs,xa=m,Ua=w("wks"),Pa=Ia.Symbol,ka=Pa&&Pa.for,Da=xa?Pa:Pa&&Pa.withoutSetter||Ma,La=r,Fa=as,Va=E,ja=ps,Ba=function(e,t){var r,n;if("string"===t&&ha(r=e.toString)&&!da(n=fa(r,e)))return n;if(ha(r=e.valueOf)&&!da(n=fa(r,e)))return n;if("string"!==t&&ha(r=e.toString)&&!da(n=fa(r,e)))return n;throw ya("Can't convert object to primitive value")},Ha=TypeError,za=ys("toPrimitive"),Ga=function(e,t){if(!Fa(e)||Va(e))return e;var r=ja(e,za);if(r){if(r=La(r,e,t=void 0===t?"default":t),!Fa(r)||Va(r))return r;throw Ha("Can't convert object to primitive value")}return Ba(e,t=void 0===t?"number":t)},Ka=E,Qs=as,Ja=o.document,Ya=Qs(Ja)&&Qs(Ja.createElement),Wa=gs,m=!i&&!ts(function(){return 7!=Object.defineProperty(Wa("div"),"a",{get:function(){return 7}}).a}),qa=r,$a=z,Xa=rs,Za=os,Qa=vs,eu=Ea,tu=m,ru=Object.getOwnPropertyDescriptor,w=(e.f=i?ru:function(e,t){if(e=Za(e),t=Qa(t),tu)try{return ru(e,t)}catch(e){}if(eu(e,t))return Xa(!qa($a.f,e,t),e[t])},{}),Ia=i&&ts(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),nu=as,iu=String,ou=TypeError,su=m,au=ms,uu=vs,cu=TypeError,lu=Object.defineProperty,pu=Object.getOwnPropertyDescriptor,fu="enumerable",hu="configurable",du="writable",Ma=(w.f=i?Ia?function(e,t,r){var n;return au(e),t=uu(t),au(r),"function"==typeof e&&"prototype"===t&&"value"in r&&du in r&&!r[du]&&((n=pu(e,t))&&n[du]&&(e[t]=r.value,r={configurable:(hu in r?r:n)[hu],enumerable:(fu in r?r:n)[fu],writable:!1})),lu(e,t,r)}:lu:function(e,t,r){if(au(e),t=uu(t),au(r),su)try{return lu(e,t,r)}catch(e){}if("get"in r||"set"in r)throw cu("Accessors not supported");return"value"in r&&(e[t]=r.value),e},i),yu=w,vu=rs,E=Ma?function(e,t,r){return yu.f(e,t,vu(1,r))}:function(e,t,r){return e[t]=r,e},Qs={exports:{}},z=i,m=Ea,Ma=Function.prototype,T=z&&Object.getOwnPropertyDescriptor,m=m(Ma,"name"),m={EXISTS:m,PROPER:m&&"something"===function(){}.name,CONFIGURABLE:m&&(!z||T(Ma,"name").configurable)},z=ss,T=ma,gu=v(Function.toString),Ma=(z(T.inspectSource)||(T.inspectSource=function(e){return gu(e)}),T.inspectSource),z=ss,T=Ma,_=o.WeakMap,z=z(_)&&/native code/.test(T(_)),T=ta.exports,mu=ds,Eu=T("keys"),_={},ta=v,wu=as,Tu=E,_u=Ea,T=ma,bu=Es,Ou=_,Iu="Object already initialized",Au=o.TypeError,Nu=o.WeakMap,z=(Ps=z||T.state?(Ss=T.state||(T.state=new Nu),Rs=ta(Ss.get),Ms=ta(Ss.has),Cs=ta(Ss.set),xs=function(e,t){if(Ms(Ss,e))throw new Au(Iu);return t.facade=e,Cs(Ss,e,t),t},Us=function(e){return Rs(Ss,e)||{}},function(e){return Ms(Ss,e)}):(Ou[ks=bu("state")]=!0,xs=function(e,t){if(_u(e,ks))throw new Au(Iu);return t.facade=e,Tu(e,ks,t),t},Us=function(e){return _u(e,ks)?e[ks]:{}},function(e){return _u(e,ks)}),{set:xs,get:Us,has:Ps,enforce:function(e){return Ps(e)?Us(e):xs(e,{})},getterFor:function(t){return function(e){if(wu(e)&&(e=Us(e)).type===t)return e;throw Au("Incompatible receiver, "+t+" required")}}}),T=ts,Su=ss,Ru=Ea,Mu=i,Cu=m.CONFIGURABLE,xu=Ma,Uu=z.enforce,Pu=z.get,ku=Object.defineProperty,Du=Mu&&!T(function(){return 8!==ku(function(){},"length",{value:8}).length}),Lu=String(String).split("String"),Nu=Qs.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),(!Ru(e,"name")||Cu&&e.name!==t)&&(Mu?ku(e,"name",{value:t,configurable:!0}):e.name=t),Du&&r&&Ru(r,"arity")&&e.length!==r.arity&&ku(e,"length",{value:r.arity});try{r&&Ru(r,"constructor")&&r.constructor?Mu&&ku(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=Uu(e);return Ru(r,"source")||(r.source=Lu.join("string"==typeof t?t:"")),e},Fu=(Function.prototype.toString=Nu(function(){return Su(this)&&Pu(this).source||xu(this)},"toString"),ss),Vu=w,ju=Qs.exports,Bu=fs,ta={},Hu=Math.ceil,zu=Math.floor,Gu=Math.trunc||function(e){e=+e;return(0<e?zu:Hu)(e)},Ku=Ts,Ju=Math.max,Yu=Math.min,Wu=Ts,qu=Math.min,$u=function(e){return 0<e?qu(Wu(e),9007199254740991):0},Xu=os,Zu=_s,Qu=bs,Ou={includes:Os(!0),indexOf:Os(!1)},bu=v,ec=Ea,tc=os,rc=Ou.indexOf,nc=_,ic=bu([].push),T=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],oc=Is,sc=T.concat("length","prototype"),Nu=(ta.f=Object.getOwnPropertyNames||function(e){return oc(e,sc)},{}),bu=(Nu.f=Object.getOwnPropertySymbols,us),ac=ta,uc=Nu,cc=ms,lc=v([].concat),Nu=bu("Reflect","ownKeys")||function(e){var t=ac.f(cc(e)),r=uc.f;return r?lc(t,r(e)):t},pc=Ea,fc=Nu,hc=e,dc=w,yc=ts,vc=ss,gc=/#|\.prototype\./,mc=Ns.normalize=function(e){return String(e).replace(gc,".").toLowerCase()},Ec=Ns.data={},wc=Ns.NATIVE="N",Tc=Ns.POLYFILL="P",bu=Ns,_c=o,bc=e.f,Oc=E,Ic=ws,Ac=fs,Nc=As,Sc=bu,Nu=!ts(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Rc=Ea,Mc=ss,Cc=hs,xc=Es("IE_PROTO"),Uc=Object,Pc=Uc.prototype,Nu=Nu?Uc.getPrototypeOf:function(e){e=Cc(e);if(Rc(e,xc))return e[xc];var t=e.constructor;return Mc(t)&&e instanceof t?t.prototype:e instanceof Uc?Pc:null},kc=ss,Dc=String,Lc=TypeError,Fc=v,Vc=ms,jc=function(e){if("object"==typeof e||kc(e))return e;throw Lc("Can't set "+Dc(e)+" as a prototype")},b=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Fc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return Vc(e),jc(t),n?r(e,t):e.__proto__=t,e}}():void 0),Bc={},Hc=Is,zc=T,O=Object.keys||function(e){return Hc(e,zc)},Gc=w,Kc=ms,Jc=os,Yc=O;Bc.f=i&&!Ia?Object.defineProperties:function(e,t){Kc(e);for(var r,n=Jc(t),i=Yc(t),o=i.length,s=0;s<o;)Gc.f(e,r=i[s++],n[r]);return e};function Wc(){}function qc(e){e.write(vl("")),e.close();var t=e.parentWindow.Object;return e=null,t}function $c(e,t){return Ol(e),void 0===t?e:Il?Al(e,t):function(){return e.apply(t,arguments)}}function Xc(e){return void 0!==e&&(Nl.Array===e||Rl[Sl]===e)}function Zc(e){if(null!=e)return Dl(e,Fl)||Dl(e,"@@iterator")||Ll[kl(e)]}function Qc(e,t){if(t=arguments.length<2?zl(e):t,jl(t))return Bl(Vl(t,e));throw Gl(Hl(e)+" is not iterable")}function el(e,t,r){var n,i;Jl(e);try{if(!(n=Yl(e,"return"))){if("throw"===t)throw r;return r}n=Kl(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Jl(n),r}function tl(e,t){this.stopped=e,this.result=t}function rl(e,t,r){function n(e){return o&&np(o,"normal",e),new tl(!0,e)}function i(e){return f?($l(e),y?v(e[0],e[1],n):v(e[0],e[1])):y?v(e,n):v(e)}var o,s,a,u,c,l,p=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),v=Wl(t,p);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=rp(e)))throw ip(Xl(e)+" is not iterable");if(Zl(r)){for(s=0,a=Ql(e);s<a;s++)if((u=i(e[s]))&&ep(op,u))return u;return new tl(!1)}o=tp(e,r)}for(c=(h?e:o).next;!(l=ql(c,o)).done;){try{u=i(l.value)}catch(e){np(o,"throw",e)}if("object"==typeof u&&u&&ep(op,u))return u}return new tl(!1)}function nl(e){if("Symbol"===sp(e))throw TypeError("Cannot convert a Symbol value to a string");return ap(e)}function il(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=lp(Op,this);return fp?r=fp(new _p,i?pp(this):Op):(r=i?this:hp(Op),dp(r,Tp,"Error")),void 0!==t&&dp(r,"message",Ep(t)),wp&&dp(r,"stack",vp(r.stack,1)),gp(r,n),mp(e,bp,{that:i=[]}),dp(r,"errors",i),r}function ol(e){Ap[Ip][e]=!0}var sl,al,O=us("document","documentElement"),ul=ms,cl=Bc,ll=T,Ia=_,pl=O,fl=gs,hl="prototype",dl="script",yl=Es("IE_PROTO"),vl=function(e){return"<"+dl+">"+e+"</"+dl+">"},gl=function(){try{sl=new ActiveXObject("htmlfile")}catch(e){}gl="undefined"==typeof document||document.domain&&sl?qc(sl):(e=fl("iframe"),t="java"+dl+":",e.style.display="none",pl.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(vl("document.F=Object")),t.close(),t.F);for(var e,t,r=ll.length;r--;)delete gl[hl][ll[r]];return gl()},Bc=(Ia[yl]=!0,Object.create||function(e,t){var r;return null!==e?(Wc[hl]=ul(e),r=new Wc,Wc[hl]=null,r[yl]=e):r=gl(),void 0===t?r:cl.f(r,t)}),ml=Error,El=v("".replace),T=String(ml("zxcasd").stack),wl=/\n\s*at [^:]*:[^\n]*/,Tl=wl.test(T),_l=as,bl=E,Ol=ls,Il=t,Al=v(v.bind),Ia={},Nl=Ia,Sl=ys("iterator"),Rl=Array.prototype,T={},T=(T[ys("toStringTag")]="z","[object z]"===String(T)),I=T,Ml=ss,Cl=ns,xl=ys("toStringTag"),Ul=Object,Pl="Arguments"==Cl(function(){return arguments}()),I=I?Cl: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=Ul(e),xl))?t:Pl?Cl(e):"Object"==(t=Cl(e))&&Ml(e.callee)?"Arguments":t},kl=I,Dl=ps,Ll=Ia,Fl=ys("iterator"),Vl=r,jl=ls,Bl=ms,Hl=cs,zl=Zc,Gl=TypeError,Kl=r,Jl=ms,Yl=ps,Wl=$c,ql=r,$l=ms,Xl=cs,Zl=Xc,Ql=bs,ep=g,tp=Qc,rp=Zc,np=el,ip=TypeError,op=tl.prototype,sp=I,ap=String,up=nl,cp=rs,A=!ts(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",cp(1,7)),7!==e.stack)}),N=y,lp=g,pp=Nu,fp=b,S=As,hp=Bc,dp=E,yp=rs,vp=function(e,t){if(Tl&&"string"==typeof e&&!ml.prepareStackTrace)for(;t--;)e=El(e,wl,"");return e},gp=function(e,t){_l(t)&&"cause"in t&&bl(e,"cause",t.cause)},mp=rl,Ep=function(e,t){return void 0===e?arguments.length<2?"":t:up(e)},wp=A,Tp=ys("toStringTag"),_p=Error,bp=[].push,Op=(fp?fp(il,_p):S(il,_p,{name:!0}),il.prototype=hp(_p.prototype,{constructor:yp(1,il),message:yp(1,""),name:yp(1,"AggregateError")})),A=(N({global:!0,constructor:!0,arity:2},{AggregateError:il}),ys),S=Bc,yp=w.f,Ip=A("unscopables"),Ap=Array.prototype,N=(null==Ap[Ip]&&yp(Ap,Ip,{configurable:!0,value:S(null)}),ts),A=ss,yp=Nu,S=ws,Np=ys("iterator"),Sp=!1;[].keys&&("next"in(R=[].keys())?(yp=yp(yp(R)))!==Object.prototype&&(al=yp):Sp=!0);function Rp(e,t,r){(e=e&&!r?e.prototype:e)&&!Pp(e,kp)&&Up(e,kp,{configurable:!0,value:t})}function Mp(){return this}function Cp(){return this}function xp(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!ef&&e in p)return p[e];switch(e){case"keys":case rf:case nf:return function(){return new r(this,e)}}return function(){return new r(this)}}Gp(r,t,n);var u,c,n=t+" Iterator",l=!1,p=e.prototype,f=p[tf]||p["@@iterator"]||i&&p[i],h=!ef&&f||a(i),d="Array"==t&&p.entries||f;if(d&&(d=Kp(d.call(new e)))!==Object.prototype&&d.next&&(Kp(d)!==Qp&&(Jp?Jp(d,Qp):zp(d[tf])||qp(d,tf,Cp)),Yp(d,n,!0)),Xp&&i==rf&&f&&f.name!==rf&&(Zp?Wp(p,"name",rf):(l=!0,h=function(){return Hp(f,this)})),i)if(u={values:a(rf),keys:o?h:a("keys"),entries:a(nf)},s)for(c in u)!ef&&!l&&c in p||qp(p,c,u[c]);else Bp({target:t,proto:!0,forced:ef||l},u);return p[tf]!==h&&qp(p,tf,h,{name:i}),$p[t]=h,u}A((al=null==al||N(function(){var e={};return al[Np].call(e)!==e})?{}:al)[Np])||S(al,Np,function(){return this});var R={IteratorPrototype:al,BUGGY_SAFARI_ITERATORS:Sp},Up=w.f,Pp=Ea,kp=ys("toStringTag"),Dp=R.IteratorPrototype,Lp=Bc,Fp=rs,Vp=Rp,jp=Ia,Bp=y,Hp=r,zp=ss,Gp=function(e,t,r,n){t+=" Iterator";return e.prototype=Lp(Dp,{next:Fp(+!n,r)}),Vp(e,t,!1),jp[t]=Mp,e},Kp=Nu,Jp=b,Yp=Rp,Wp=E,qp=ws,yp=ys,$p=Ia,Xp=m.PROPER,Zp=m.CONFIGURABLE,Qp=R.IteratorPrototype,ef=R.BUGGY_SAFARI_ITERATORS,tf=yp("iterator"),rf="values",nf="entries",of=os,A=ol,N=Ia,S=z,Sp=w.f,m=xp,R=i,sf="Array Iterator",af=S.set,uf=S.getterFor(sf),yp=m(Array,"Array",function(e,t){af(this,{type:sf,target:of(e),index:0,kind:t})},function(){var e=uf(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"),Ia=N.Arguments=N.Array;if(A("keys"),A("values"),A("entries"),R&&"values"!==Ia.name)try{Sp(Ia,"name",{value:"values"})}catch(e){}var cf=I;T||ws(Object.prototype,"toString",T?{}.toString:function(){return"[object "+cf(this)+"]"},{unsafe:!0});function lf(e){var e=mf(e),t=Ef.f;wf&&e&&!e[Tf]&&t(e,Tf,{configurable:!0,get:function(){return this}})}function pf(e,t){if(_f(t,e))return e;throw bf("Incorrect invocation")}function ff(){}function hf(e){if(!Of(e))return!1;try{return Sf(ff,Nf,e),!0}catch(e){return!1}}function df(e){if(!Of(e))return!1;switch(If(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Cf||!!Mf(Rf,Af(e))}catch(e){return!0}}function yf(e,t){return void 0===(e=kf(e).constructor)||null==(e=kf(e)[Lf])?t:Df(e)}var vf,gf,S="process"==ns(o.process),mf=us,Ef=w,wf=i,Tf=ys("species"),_f=g,bf=TypeError,m=v,N=ts,Of=ss,If=I,Af=Ma,Nf=[],Sf=us("Reflect","construct"),Rf=/^\s*(?:class|function)\b/,Mf=m(Rf.exec),Cf=!Rf.exec(ff),A=(df.sham=!0,!Sf||N(function(){var e;return hf(hf.call)||!hf(Object)||!hf(function(){e=!0})||e})?df:hf),xf=A,Uf=cs,Pf=TypeError,kf=ms,Df=function(e){if(xf(e))return e;throw Pf(Uf(e)+" is not a constructor")},Lf=ys("species"),R=Function.prototype,Ff=R.apply,Vf=R.call,Sp="object"==typeof Reflect&&Reflect.apply||(t?Vf.bind(Ff):function(){return Vf.apply(Ff,arguments)}),Ia=v([].slice),jf=TypeError,T=/(?:ipad|iphone|ipod).*applewebkit/i.test(Zs),Bf=o,Hf=Sp,g=$c,zf=ss,Gf=Ea,I=ts,Kf=O,Jf=Ia,Yf=gs,Wf=function(e,t){if(e<t)throw jf("Not enough arguments");return e},m=T,N=S,R=Bf.setImmediate,t=Bf.clearImmediate,qf=Bf.process,$f=Bf.Dispatch,Xf=Bf.Function,O=Bf.MessageChannel,Zf=Bf.String,Qf=0,eh={},th="onreadystatechange";try{vf=Bf.location}catch(e){}function rh(e){return function(){Eh(e)}}function nh(e){Eh(e.data)}function ih(e){Bf.postMessage(Zf(e),vf.protocol+"//"+vf.host)}function oh(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function sh(){this.head=null,this.tail=null}function ah(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=xh(r),this.reject=xh(n)}function uh(e,t){var r,n,i,o,s=t.value,a=t.state==sd,u=a?e.ok:e.fail,c=e.resolve,l=e.reject,p=e.domain;try{u?(a||(t.rejection===cd&&(o=t,kh(Bh,Ph,function(){var e=o.facade;Uh?ed.emit("rejectionHandled",e):fd(od,e,o.value)})),t.rejection=ud),!0===u?r=s:(p&&p.enter(),r=u(s),p&&(p.exit(),i=!0)),r===e.promise?l(Zh("Promise-chain cycle")):(n=ld(r))?kh(n,r,c,l):c(r)):l(s)}catch(e){p&&!i&&p.exit(),l(e)}}var ch,lh,ph,fh,hh,dh,yh,vh,gh,mh,Eh=function(e){var t;Gf(eh,e)&&(t=eh[e],delete eh[e],t())},O=(R&&t||(R=function(e){Wf(arguments.length,1);var t=zf(e)?e:Xf(e),r=Jf(arguments,1);return eh[++Qf]=function(){Hf(t,void 0,r)},gf(Qf),Qf},t=function(e){delete eh[e]},N?gf=function(e){qf.nextTick(rh(e))}:$f&&$f.now?gf=function(e){$f.now(rh(e))}:O&&!m?(m=(N=new O).port2,N.port1.onmessage=nh,gf=g(m.postMessage,m)):Bf.addEventListener&&zf(Bf.postMessage)&&!Bf.importScripts&&vf&&"file:"!==vf.protocol&&!I(ih)?(gf=ih,Bf.addEventListener("message",nh,!1)):gf=th in Yf("script")?function(e){Kf.appendChild(Yf("script"))[th]=function(){Kf.removeChild(this),Eh(e)}}:function(e){setTimeout(rh(e),0)}),{set:R,clear:t}),N=o,g=/ipad|iphone|ipod/i.test(Zs)&&void 0!==N.Pebble,m=/web0s(?!.*chrome)/i.test(Zs),I=o,R=$c,t=e.f,wh=O.set,N=T,e=g,T=m,Th=S,g=I.MutationObserver||I.WebKitMutationObserver,m=I.document,_h=I.process,M=I.Promise,t=t(I,"queueMicrotask"),t=t&&t.value,T=(t||(ch=function(){var e,t;for(Th&&(e=_h.domain)&&e.exit();lh;){t=lh.fn,lh=lh.next;try{t()}catch(e){throw lh?fh():ph=void 0,e}}ph=void 0,e&&e.enter()},fh=N||Th||T||!g||!m?!e&&M&&M.resolve?((N=M.resolve(void 0)).constructor=M,yh=R(N.then,N),function(){yh(ch)}):Th?function(){_h.nextTick(ch)}:(wh=R(wh,I),function(){wh(ch)}):(hh=!0,dh=m.createTextNode(""),new g(ch).observe(dh,{characterData:!0}),function(){dh.data=hh=!hh})),t||function(e){e={fn:e,next:void 0};ph&&(ph.next=e),lh||(lh=e,fh()),ph=e}),bh=o,e=(sh.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}},sh),M=o.Promise,N="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,R=!N&&!S&&"object"==typeof window&&"object"==typeof document,I=o,Oh=M,m=ss,g=bu,Ih=Ma,t=ys,Ah=R,Nh=N,Sh=ea,Rh=(Oh&&Oh.prototype,t("species")),Mh=!1,Ch=m(I.PromiseRejectionEvent),Ma={CONSTRUCTOR:g("Promise",function(){var e=Ih(Oh),t=e!==String(Oh);if(!t&&66===Sh)return!0;if(!Sh||Sh<51||!/native code/.test(e)){var e=new Oh(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Rh]=r,!(Mh=e.then(function(){})instanceof r))return!0}return!t&&(Ah||Nh)&&!Ch}),REJECTION_EVENT:Ch,SUBCLASSING:Mh},R={},xh=ls,N=(R.f=function(e){return new ah(e)},y),Uh=S,Ph=o,kh=r,t=ws,m=b,I=Rp,g=lf,Dh=ls,Lh=ss,Fh=as,Vh=pf,jh=yf,Bh=O.set,Hh=T,zh=function(e,t){var r=bh.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},Gh=oh,Kh=e,O=z,T=M,e=R,Jh="Promise",C=Ma.CONSTRUCTOR,Yh=Ma.REJECTION_EVENT,x=Ma.SUBCLASSING,Wh=O.getterFor(Jh),qh=O.set,O=T&&T.prototype,$h=T,Xh=O,Zh=Ph.TypeError,Qh=Ph.document,ed=Ph.process,td=e.f,rd=td,nd=!!(Qh&&Qh.createEvent&&Ph.dispatchEvent),id="unhandledrejection",od="rejectionhandled",sd=1,ad=2,ud=1,cd=2,ld=function(e){var t;return!(!Fh(e)||!Lh(t=e.then))&&t},pd=function(r,i){r.notified||(r.notified=!0,Hh(function(){for(var e,n,t=r.reactions;e=t.get();)uh(e,r);r.notified=!1,i&&!r.rejection&&(n=r,kh(Bh,Ph,function(){var e=n.facade,t=n.value,r=hd(n);if(r&&(r=Gh(function(){Uh?ed.emit("unhandledRejection",t,e):fd(id,e,t)}),n.rejection=Uh||hd(n)?cd:ud,r.error))throw r.value}))}))},fd=function(e,t,r){var n;nd?((n=Qh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Ph.dispatchEvent(n)):n={promise:t,reason:r},!Yh&&(t=Ph["on"+e])?t(n):e===id&&zh("Unhandled promise rejection",r)},hd=function(e){return e.rejection!==ud&&!e.parent},dd=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=ad,pd(e,!0))},vd=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw Zh("Promise can't be resolved itself");var n=ld(e);n?Hh(function(){var t={done:!1};try{kh(n,e,dd(vd,t,r),dd(yd,t,r))}catch(e){yd(t,e,r)}}):(r.value=e,r.state=sd,pd(r,!1))}catch(e){yd({done:!1},e,r)}}};if(C&&(Xh=($h=function(e){Vh(this,Xh),Dh(e),kh(vh,this);var t=Wh(this);try{e(dd(vd,t),dd(yd,t))}catch(e){yd(t,e)}}).prototype,(vh=function(e){qh(this,{type:Jh,done:!1,notified:!1,parent:!1,reactions:new Kh,rejection:!1,state:0,value:void 0})}).prototype=t(Xh,"then",function(e,t){var r=Wh(this),n=td(jh(this,$h));return r.parent=!0,n.ok=!Lh(e)||e,n.fail=Lh(t)&&t,n.domain=Uh?ed.domain:void 0,0==r.state?r.reactions.add(n):Hh(function(){uh(n,r)}),n.promise}),gh=function(){var e=new vh,t=Wh(e);this.promise=e,this.resolve=dd(vd,t),this.reject=dd(yd,t)},e.f=td=function(e){return e===$h||void 0===e?new gh:rd(e)},Lh(T)&&O!==Object.prototype)){mh=O.then,x||t(O,"then",function(e,t){var r=this;return new $h(function(e,t){kh(mh,r,e,t)}).then(e,t)},{unsafe:!0});try{delete O.constructor}catch(e){}m&&m(O,Xh)}N({global:!0,constructor:!0,wrap:!0,forced:C},{Promise:$h}),I($h,Jh,!1),g(Jh);var gd=ys("iterator"),md=!1;try{var Ed=0,wd={next:function(){return{done:!!Ed++}},return:function(){md=!0}};wd[gd]=function(){return this},Array.from(wd,function(){throw 2})}catch(e){}function Td(e,t){if(!t&&!md)return!1;var r=!1;try{var n={};n[gd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var _d=M,e=Td,T=Ma.CONSTRUCTOR||!e(function(e){_d.all(e).then(void 0,function(){})}),bd=r,Od=ls,Id=R,Ad=oh,Nd=rl,x=(y({target:"Promise",stat:!0,forced:T},{all:function(e){var a=this,t=Id.f(a),u=t.resolve,c=t.reject,r=Ad(function(){var n=Od(a.resolve),i=[],o=0,s=1;Nd(e,function(e){var t=o++,r=!1;s++,bd(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}}),y),t=M,m=us,O=ss,N=ws,C=t&&t.prototype;x({target:"Promise",proto:!0,forced:Ma.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),O(t)&&(I=m("Promise").prototype.catch,C.catch!==I&&N(C,"catch",I,{unsafe:!0}));var Sd=r,Rd=ls,Md=R,Cd=oh,xd=rl;y({target:"Promise",stat:!0,forced:T},{race:function(e){var r=this,n=Md.f(r),i=n.reject,t=Cd(function(){var t=Rd(r.resolve);xd(e,function(e){Sd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function Ud(e,t){return Dd(e),Ld(t)&&t.constructor===e?t:((0,(e=Fd.f(e)).resolve)(t),e.promise)}var Pd=r,kd=R,Dd=(y({target:"Promise",stat:!0,forced:Ma.CONSTRUCTOR},{reject:function(e){var t=kd.f(this);return Pd(t.reject,void 0,e),t.promise}}),ms),Ld=as,Fd=R,g=y,wd=us,e=Ma.CONSTRUCTOR,Vd=Ud;wd("Promise"),g({target:"Promise",stat:!0,forced:e},{resolve:function(e){return Vd(this,e)}});var jd=r,Bd=ls,Hd=R,zd=oh,Gd=rl;y({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Hd.f(a),u=t.resolve,r=t.reject,n=zd(function(){var n=Bd(a.resolve),i=[],o=0,s=1;Gd(e,function(e){var t=o++,r=!1;s++,jd(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 Kd(i){return function(e,t){var r,e=oy(sy(e)),t=iy(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=uy(e,t))<55296||56319<r||t+1===n||(n=uy(e,t+1))<56320||57343<n?i?ay(e,t):r:i?cy(e,t,t+2):n-56320+(r-55296<<10)+65536}}var Jd=r,Yd=ls,Wd=us,qd=R,$d=oh,Xd=rl,Zd="No one promise resolved",x=(y({target:"Promise",stat:!0},{any:function(e){var u=this,c=Wd("AggregateError"),t=qd.f(u),l=t.resolve,p=t.reject,r=$d(function(){var n=Yd(u.resolve),i=[],o=0,s=1,a=!1;Xd(e,function(e){var t=o++,r=!1;s++,Jd(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,Zd)))})}),--s||p(new c(i,Zd))});return r.error&&p(r.value),t.promise}}),y),O=M,t=ts,Qd=us,ey=ss,ty=yf,ry=Ud,m=ws,ny=O&&O.prototype,C=(x({target:"Promise",proto:!0,real:!0,forced:!!O&&t(function(){ny.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=ty(this,Qd("Promise")),e=ey(t);return this.then(e?function(e){return ry(r,t()).then(function(){return e})}:t,e?function(e){return ry(r,t()).then(function(){throw e})}:t)}}),ey(O)&&(N=Qd("Promise").prototype.finally,ny.finally!==N&&m(ny,"finally",N,{unsafe:!0})),v),iy=Ts,oy=nl,sy=is,ay=C("".charAt),uy=C("".charCodeAt),cy=C("".slice),ly={codeAt:Kd(!1),charAt:Kd(!0)}.charAt,py=nl,I=z,T=xp,fy="String Iterator",hy=I.set,dy=I.getterFor(fy);T(String,"String",function(e){hy(this,{type:fy,string:py(e),index:0})},function(){var e=dy(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=ly(t,r),e.index+=t.length,{value:t,done:!1})});function yy(t,e){if(t){if(t[Ty]!==by)try{wy(t,Ty,by)}catch(e){t[Ty]=by}if(t[_y]||wy(t,_y,e),my[e])for(var r in Ey)if(t[r]!==Ey[r])try{wy(t,r,Ey[r])}catch(e){t[r]=Ey[r]}}}var vy,Ma=o,wd=Ma.Promise,g=gs("span").classList,e=g&&g.constructor&&g.constructor.prototype,M=e===Object.prototype?void 0:e,gy=o,my={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},x=M,Ey=yp,wy=E,t=ys,Ty=t("iterator"),_y=t("toStringTag"),by=Ey.values;for(vy in my)yy(gy[vy]&&gy[vy].prototype,vy);yy(x,"DOMTokenList");var O,m,N=m=O=wd,C,Oy=R,Iy=oh,Ay=((C=y)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=Oy.f(this),e=Iy(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),ms),Ny=el,Sy=vs,Ry=w,My=rs,I,Cy=$c,xy=r,Uy=hs,Py=function(t,e,r,n){try{return n?e(Ay(r)[0],r[1]):e(r)}catch(e){Ny(t,"throw",e)}},ky=Xc,Dy=A,Ly=bs,Fy=I=function(e,t,r){t=Sy(t);t in e?Ry.f(e,t,My(0,r)):e[t]=r},Vy=Qc,jy=Zc,By=Array,T=y,g=function(e){var t,r,n,i,o,s,a=Uy(e),e=Dy(this),u=arguments.length,c=1<u?arguments[1]:void 0,l=void 0!==c,u=(l&&(c=Cy(c,2<u?arguments[2]:void 0)),jy(a)),p=0;if(!u||this===By&&ky(u))for(t=Ly(a),r=e?new this(t):By(t);p<t;p++)s=l?c(a[p],p):a[p],Fy(r,p,s);else for(o=(i=Vy(a,u)).next,r=e?new this:[];!(n=xy(o,i)).done;p++)s=l?Py(i,c,[n.value,p],!0):n.value,Fy(r,p,s);return r.length=p,r},e,M=!(e=Td)(function(e){Array.from(e)}),Hy=(T({target:"Array",stat:!0,forced:M},{from:g}),ns),yp=Array.isArray||function(e){return"Array"==Hy(e)},E,t,x=((E=y)({target:"Array",stat:!0},{isArray:t=yp}),y),wd=ts,zy=A,Gy=I,Ky=Array,O=wd(function(){function e(){}return!(Ky.of.call(e)instanceof e)}),Jy=(x({target:"Array",stat:!0,forced:O},{of:function(){for(var e=0,t=arguments.length,r=new(zy(this)?this:Ky)(t);e<t;)Gy(r,e,arguments[e++]);return r.length=t,r}}),hs),Yy=bs,Wy=Ts,m=ol,qy=(y({target:"Array",proto:!0},{at:function(e){var t=Jy(this),r=Yy(t),e=Wy(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),m("at"),TypeError),N=function(e){if(9007199254740991<e)throw qy("Maximum allowed index exceeded");return e},$y=yp,Xy=A,Zy=as,Qy=ys("species"),ev=Array,tv=function(e){var t;return $y(e)&&(t=e.constructor,(Xy(t)&&(t===ev||$y(t.prototype))||Zy(t)&&null===(t=t[Qy]))&&(t=void 0)),void 0===t?ev:t},R=function(e,t){return new(tv(e))(0===t?0:t)},rv=ts,nv=ea,iv=ys("species"),C,e=y,T=ts,ov=yp,sv=as,av=hs,uv=bs,cv=N,lv=I,pv=R,M=C=function(t){return 51<=nv||!rv(function(){var e=[];return(e.constructor={})[iv]=function(){return{foo:1}},1!==e[t](Boolean).foo})},g=ea,fv=ys("isConcatSpreadable"),E=51<=g||!T(function(){var e=[];return e[fv]=!1,e.concat()[0]!==e}),t=M("concat"),hv=(e({target:"Array",proto:!0,arity:1,forced:!E||!t},{concat:function(e){for(var t,r,n,i=av(this),o=pv(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!sv(e))return!1;var t=e[fv];return void 0!==t?!!t:ov(e)}(n=-1===a?i:arguments[a]))for(r=uv(n),cv(s+r),t=0;t<r;t++,s++)t in n&&lv(o,s,n[t]);else cv(s+1),lv(o,s++,n);return o.length=s,o}}),cs),dv=TypeError,wd,yv=hs,vv=_s,gv=bs,mv=wd=function(e,t){if(!delete e[t])throw dv("Cannot delete property "+hv(t)+" of "+hv(e))},Ev=Math.min,x=ol,wv=(y({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=yv(this),n=gv(r),i=vv(e,n),o=vv(t,n),e=2<arguments.length?arguments[2]:void 0,s=Ev((void 0===e?n:vv(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]:mv(r,i),i+=a,o+=a;return r}}),x("copyWithin"),$c),Tv=Fs,_v=hs,bv=bs,Ov=R,Iv=v([].push),O,m={forEach:(O=function(f){var h=1==f,d=2==f,y=3==f,v=4==f,g=6==f,m=7==f,E=5==f||g;return function(e,t,r,n){for(var i,o,s=_v(e),a=Tv(s),u=wv(t,r),c=bv(a),l=0,t=n||Ov,p=h?t(e,c):d||m?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:Iv(p,i)}else switch(f){case 4:return!1;case 7:Iv(p,i)}return g?-1:y||v?v:p}})(0),map:O(1),filter:O(2),some:O(3),every:O(4),find:O(5),findIndex:O(6),filterReject:O(7)},Av=ts,g=function(e,t){var r=[][e];return!!r&&Av(function(){r.call(null,t||function(){return 1},1)})},T=y,Nv=m.every,Sv=(T({target:"Array",proto:!0,forced:!g("every")},{every:function(e){return Nv(this,e,1<arguments.length?arguments[1]:void 0)}}),hs),Rv=_s,Mv=bs,M=ol,e=(y({target:"Array",proto:!0},{fill:function(e){for(var t=Sv(this),r=Mv(t),n=arguments.length,i=Rv(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:Rv(n,r);i<o;)t[i++]=e;return t}}),M("fill"),y),Cv=m.filter,E=(e({target:"Array",proto:!0,forced:!C("filter")},{filter:function(e){return Cv(this,e,1<arguments.length?arguments[1]:void 0)}}),y),xv=m.find,t=ol,x,Uv=!0,O=((x="find")in[]&&Array(1)[x](function(){Uv=!1}),E({target:"Array",proto:!0,forced:Uv},{find:function(e){return xv(this,e,1<arguments.length?arguments[1]:void 0)}}),t(x),y),Pv=m.findIndex,T=ol,M,kv=!0,Dv=((M="findIndex")in[]&&Array(1)[M](function(){kv=!1}),O({target:"Array",proto:!0,forced:kv},{findIndex:function(e){return Pv(this,e,1<arguments.length?arguments[1]:void 0)}}),T(M),$c),Lv=Fs,Fv=hs,Vv=bs,e,E={findLast:(e=function(u){var c=1==u;return function(e,t,r){for(var n,i=Fv(e),o=Lv(i),s=Dv(t,r),a=Vv(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:e(1)},t=y,jv=E.findLast,x=ol,O=(t({target:"Array",proto:!0},{findLast:function(e){return jv(this,e,1<arguments.length?arguments[1]:void 0)}}),x("findLast"),y),Bv=E.findLastIndex,T=ol,Hv=(O({target:"Array",proto:!0},{findLastIndex:function(e){return Bv(this,e,1<arguments.length?arguments[1]:void 0)}}),T("findLastIndex"),yp),zv=bs,Gv=N,Kv=$c,Jv=function(e,t,r,n,i,o,s,a){for(var u,c,l=i,p=0,f=!!s&&Kv(s,a);p<n;)p in r&&(u=f?f(r[p],p,t):r[p],0<o&&Hv(u)?(c=zv(u),l=Jv(e,t,u,c,l,o-1)-1):(Gv(l+1),e[l]=u),l++),p++;return l},M,Yv=M=Jv,Wv=hs,qv=bs,$v=Ts,Xv=R;y({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Wv(this),r=qv(t),n=Xv(t,0);return n.length=Yv(n,t,t,r,0,void 0===e?1:$v(e)),n}});function Zv(c){return function(e,t,r,n){Og(t);var i=Ig(e),o=Ag(i),s=Ng(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 Sg("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 Qv(e,t,r){for(var n=Jg(e),i=Kg(t,n),o=Kg(void 0===r?n:r,n),s=Wg(qg(o-i,0)),a=0;i<o;i++,a++)Yg(s,a,e[i]);return s.length=a,s}function eg(e,t){var r=e.length,n=Xg(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=eg($g(e,0,n),t),f=eg($g(e,n),t),h=t,d=p.length,y=f.length,v=0,g=0;v<d||g<y;)l[v+g]=v<d&&g<y?h(p[v],f[g])<=0?p[v++]:f[g++]:v<d?p[v++]:f[g++];return l}var tg=M,rg=ls,ng=hs,ig=bs,og=R,sg=(y({target:"Array",proto:!0},{flatMap:function(e){var t,r=ng(this),n=ig(r);return rg(e),(t=og(r,0)).length=tg(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),m.forEach),e=g("forEach")?[].forEach:function(e){return sg(this,e,1<arguments.length?arguments[1]:void 0)},t=(y({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e}),y),ag=Ou.includes,x=ol,E=(t({target:"Array",proto:!0,forced:ts(function(){return!Array(1).includes()})},{includes:function(e){return ag(this,e,1<arguments.length?arguments[1]:void 0)}}),x("includes"),y),O=v,ug=Ou.indexOf,T=g,cg=O([].indexOf),lg=!!cg&&1/cg([1],1,-0)<0,M=T("indexOf"),e=(E({target:"Array",proto:!0,forced:lg||!M},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return lg?cg(this,e,t)||0:ug(this,e,t)}}),y),t=Fs,pg=os,x=g,fg=v([].join),Ou=t!=Object,O=x("join",","),hg=(e({target:"Array",proto:!0,forced:Ou||!O},{join:function(e){return fg(pg(this),void 0===e?",":e)}}),Sp),dg=os,yg=Ts,vg=bs,T=g,gg=Math.min,mg=[].lastIndexOf,Eg=!!mg&&1/[1].lastIndexOf(1,-0)<0,E=T("lastIndexOf"),M=Eg||!E?function(e){if(Eg)return hg(mg,this,arguments)||0;var t=dg(this),r=vg(t),n=r-1;for((n=1<arguments.length?gg(n,yg(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:mg,t=(y({target:"Array",proto:!0,forced:M!==[].lastIndexOf},{lastIndexOf:M}),y),wg=m.map,x=(t({target:"Array",proto:!0,forced:!C("map")},{map:function(e){return wg(this,e,1<arguments.length?arguments[1]:void 0)}}),y),Tg=hs,_g=bs,bg=N,e=ts(function(){return 4294967297!==[].push.call({length:4294967296},1)}),Ou=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),Og=(x({target:"Array",proto:!0,arity:1,forced:e||Ou},{push:function(e){var t=Tg(this),r=_g(t),n=arguments.length;bg(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),ls),Ig=hs,Ag=Fs,Ng=bs,Sg=TypeError,O={left:Zv(!1),right:Zv(!0)},Sp=y,Rg=O.left,T=ea,E=S,M=(Sp({target:"Array",proto:!0,forced:!g("reduce")||!E&&79<T&&T<83},{reduce:function(e){var t=arguments.length;return Rg(this,e,t,1<t?arguments[1]:void 0)}}),y),Mg=O.right,t=ea,x=S,e=(M({target:"Array",proto:!0,forced:!g("reduceRight")||!x&&79<t&&t<83},{reduceRight:function(e){return Mg(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),y),Cg=yp,xg=v([].reverse),Ou=[1,2],Sp=(e({target:"Array",proto:!0,forced:String(Ou)===String(Ou.reverse())},{reverse:function(){return Cg(this)&&(this.length=this.length),xg(this)}}),y),Ug=yp,Pg=A,kg=as,Dg=_s,Lg=bs,Fg=os,Vg=I,E=ys,jg=Ia,T=C("slice"),Bg=E("species"),Hg=Array,zg=Math.max,O=(Sp({target:"Array",proto:!0,forced:!T},{slice:function(e,t){var r,n,i,o=Fg(this),s=Lg(o),a=Dg(e,s),u=Dg(void 0===t?s:t,s);if(Ug(o)&&(r=o.constructor,(r=Pg(r)&&(r===Hg||Ug(r.prototype))||kg(r)&&null===(r=r[Bg])?void 0:r)===Hg||void 0===r))return jg(o,a,u);for(n=new(void 0===r?Hg:r)(zg(u-a,0)),i=0;a<u;a++,i++)a in o&&Vg(n,i,o[a]);return n.length=i,n}}),y),Gg=m.some,Kg=(O({target:"Array",proto:!0,forced:!g("some")},{some:function(e){return Gg(this,e,1<arguments.length?arguments[1]:void 0)}}),_s),Jg=bs,Yg=I,Wg=Array,qg=Math.max,$g=Qv,Xg=Math.floor,S=eg,M=Zs.match(/firefox\/(\d+)/i),x=!!M&&+M[1],t=/MSIE|Trident/.test(Zs),e=Zs.match(/AppleWebKit\/(\d+)\./),Ou=!!e&&+e[1],Ia=y,E=v,Zg=ls,Qg=hs,em=bs,tm=wd,rm=nl,Sp=ts,nm=S,T=g,im=x,om=t,sm=ea,am=Ou,um=[],cm=E(um.sort),lm=E(um.push),O=Sp(function(){um.sort(void 0)}),M=Sp(function(){um.sort(null)}),Zs=T("sort"),pm=!Sp(function(){if(sm)return sm<70;if(!(im&&3<im)){if(om)return!0;if(am)return am<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++)um.push({k:e+r,v:t})}for(um.sort(function(e,t){return t.v-e.v}),r=0;r<um.length;r++)e=um[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});Ia({target:"Array",proto:!0,forced:O||!M||!Zs||!pm},{sort:function(e){void 0!==e&&Zg(e);var t=Qg(this);if(pm)return void 0===e?cm(t):cm(t,e);for(var r,n,i=[],o=em(t),s=0;s<o;s++)s in t&&lm(i,t[s]);for(nm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:rm(e)>rm(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)tm(t,s++);return t}});lf("Array");var e=y,fm=hs,hm=_s,dm=Ts,ym=bs,vm=N,gm=R,mm=I,Em=wd,S=C("splice"),wm=Math.max,Tm=Math.min;e({target:"Array",proto:!0,forced:!S},{splice:function(e,t){var r,n,i,o,s,a,u=fm(this),c=ym(u),l=hm(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-l):(r=e-2,Tm(wm(dm(t),0),c-l)),vm(c+r-n),i=gm(u,n),o=0;o<n;o++)(s=l+o)in u&&mm(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]:Em(u,a);for(o=c;c-n+r<o;o--)Em(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]:Em(u,a);for(o=0;o<r;o++)u[o+l]=arguments[o+2];return u.length=c-n+r,i}}),ol("flat");ol("flatMap");var x=y,_m=hs,bm=bs,Om=wd,Im=N,t=1!==[].unshift(0),ea=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();x({target:"Array",proto:!0,arity:1,forced:t||ea},{unshift:function(e){var t=_m(this),r=bm(t),n=arguments.length;if(n){Im(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:Om(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});Ma.Array;var Ou={exports:{}},E={},Am=ns,Nm=os,Sm=ta.f,Rm=Qv,Mm="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];E.f=function(e){if(!Mm||"Window"!=Am(e))return Sm(Nm(e));try{return Sm(e)}catch(e){return Rm(Mm)}};function Cm(e){zm(e,qm,{value:{objectID:"O"+$m++,weakData:{}}})}function xm(e,t,r){for(var n in t)yE(e,n,t[n],r);return e}function Um(e,t){for(var r=0,n=SE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function Pm(e,t,r,n){for(var i,o,s,a=CE(e),u=ME(a),c=RE(t,r),l=PE(null),p=UE(u),f=0;f<p;f++)s=u[f],(o=xE(c(s,f,a)))in l?LE(l[o],s):l[o]=[s];if(n&&(i=n(a))!==DE)for(o in l)l[o]=kE(i,l[o]);return l}var T=ts(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),Sp=ts,km=as,Dm=ns,Lm=T,Fm=Object.isExtensible,Ia=Sp(function(){Fm(1)})||Lm?function(e){return!!km(e)&&((!Lm||"ArrayBuffer"!=Dm(e))&&(!Fm||Fm(e)))}:Fm,O=!ts(function(){return Object.isExtensible(Object.preventExtensions({}))}),Vm=y,jm=v,M=_,Bm=as,Hm=Ea,zm=w.f,Gm=ta,Km=E,Jm=Ia,Ym=O,Wm=!1,qm=ds("meta"),$m=0,Xm=Ou.exports={enable:function(){Xm.enable=function(){},Wm=!0;var i=Gm.f,o=jm([].splice),e={};e[qm]=1,i(e).length&&(Gm.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===qm){o(t,r,1);break}return t},Vm({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Km.f}))},fastKey:function(e,t){if(!Bm(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Hm(e,qm)){if(!Jm(e))return"F";if(!t)return"E";Cm(e)}return e[qm].objectID},getWeakData:function(e,t){if(!Hm(e,qm)){if(!Jm(e))return!0;if(!t)return!1;Cm(e)}return e[qm].weakData},onFreeze:function(e){return Ym&&Wm&&Jm(e)&&!Hm(e,qm)&&Cm(e),e}},Zm=(M[qm]=!0,ss),Qm=as,eE=b,tE=y,rE=o,nE=v,iE=bu,oE=ws,sE=Ou.exports,aE=rl,uE=pf,cE=ss,lE=as,pE=ts,fE=Td,hE=Rp,dE=function(e,t,r){return eE&&Zm(t=t.constructor)&&t!==r&&Qm(t=t.prototype)&&t!==r.prototype&&eE(e,t),e},yE=ws,vE=w.f,gE=Bc,mE=xm,EE=$c,wE=pf,TE=rl,_E=xp,bE=lf,OE=i,IE=Ou.exports.fastKey,AE=z.set,NE=z.getterFor,SE=(function(e,t,r){function n(e){var r=nE(h[e]);oE(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(l&&!lE(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return l&&!lE(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(l&&!lE(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=rE[e],h=f&&f.prototype,d=f,y={};return iE(e,!cE(f)||!(l||h.forEach&&!pE(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,p),sE.enable()):iE(e,!0)&&(o=(i=new d)[p](l?{}:-0,1)!=i,s=pE(function(){i.has(1)}),a=fE(function(e){new f(e)}),u=!l&&pE(function(){for(var e=new f,t=5;t--;)e[p](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){uE(e,h);e=dE(new f,e,d);return null!=t&&aE(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),y[e]=d,tE({global:!0,constructor:!0,forced:d!=f},y),hE(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=IE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),OE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=IE(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){wE(e,a),AE(e,{type:r,index:gE(null),first:void 0,last:void 0,size:0}),OE||(e.size=0),null!=t&&TE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=NE(r);return mE(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,OE?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),OE?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=u(this),n=EE(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)}}),mE(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)}}),OE&&vE(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=NE(t),o=NE(n);_E(e,t,function(e,t){AE(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),bE(t)}}),bs),RE=$c,ME=Fs,CE=hs,xE=vs,UE=bs,PE=Bc,kE=Um,DE=Array,LE=v([].push),FE=Pm,Zs=ol;y({target:"Array",proto:!0},{group:function(e){return FE(this,e,1<arguments.length?arguments[1]:void 0)}}),Zs("group");var VE=Pm,I=ol;y({target:"Array",proto:!0,forced:!g("groupBy")},{groupBy:function(e){return VE(this,e,1<arguments.length?arguments[1]:void 0)}}),I("groupBy");function jE(e){for(var t,r,n=zE(this),i=HE(n),o=BE(e,1<arguments.length?arguments[1]:void 0),s=new KE,a=GE(i),u=0;u<a;u++)t=o(r=i[u],u,n),YE(s,t)?qE(JE(s,t),r):WE(s,t,[r]);return s}var BE=$c,C=v,HE=Fs,zE=hs,GE=bs,KE=us("Map"),e=KE.prototype,JE=C(e.get),YE=C(e.has),WE=C(e.set),qE=C([].push),S=ol,wd=jE;y({target:"Array",proto:!0,name:"groupToMap",forced:!g("groupByToMap")},{groupByToMap:wd}),S("groupByToMap");function $E(e){return tw[e].prototype}var x=ol,XE=(y({target:"Array",proto:!0},{groupToMap:jE}),x("groupToMap"),bs),ZE=function(e,t){for(var r=XE(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},QE=os,t=ol,ew=Array,tw=(y({target:"Array",proto:!0},{toReversed:function(){return ZE(QE(this),ew)}}),t("toReversed"),o),ea=y,rw=ls,nw=os,iw=Um,Ma=ol,ow=Array,sw=v($E("Array").sort),T=(ea({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&rw(e);var t=nw(this),t=iw(ow,t);return sw(t,e)}}),Ma("toSorted"),y),Sp=ol,aw=N,uw=bs,cw=_s,lw=os,pw=Ts,fw=Array,hw=Math.max,dw=Math.min,yw=(T({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=lw(this),a=uw(s),u=cw(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,dw(hw(pw(t),0),a-u)),i=aw(a+r-n),o=fw(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}}),Sp("toSpliced"),bs),vw=Ts,gw=RangeError,mw=function(e,t,r,n){var i=yw(e),r=vw(r),o=r<0?i+r:r;if(i<=o||o<0)throw gw("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},Ew=os,ww=Array;y({target:"Array",proto:!0},{with:function(e,t){return mw(Ew(this),ww,e,t)}});_=o,Ea=ma,ta=ss,E=Nu,Ia=ws,O="USE_FUNCTION_CONSTRUCTOR",M=ys("asyncIterator"),b=_.AsyncIterator,bu=Ea.AsyncIteratorPrototype;if(bu)VT=bu;else if(ta(b))VT=b.prototype;else if(Ea[O]||_[O])try{MT=E(E(E(Function("return async function*(){}()")()))),E(MT)===Object.prototype&&(VT=MT)}catch(e){}ta((VT=VT||{})[M])||Ia(VT,M,function(){return this});function Tw(e,t,r){var n=e.done;Rw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function _w(e){Cw(this,{type:Mw,iterator:Nw(e),next:e.next})}function bw(e){var f=0==e,h=1==e,d=2==e,y=3==e;return function(e,s,a){var e=qw(e),u=Ww("Promise"),c=e.iterator,t=e.next,l=0,p=void 0!==s;return!p&&f||Kw(s),new u(function(r,n){var i=function(e){$w(c,n,e,n)},o=function(){try{if(f&&p)try{Yw(l)}catch(e){i(e)}u.resolve(Jw(Gw(t,c))).then(function(e){try{if(Jw(e).done)f?(a.length=l,r(a)):r(!y&&(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():$w(c,r,!1,n);else if(f)try{a[l++]=e,o()}catch(e){i(e)}else e?$w(c,r,y||t,n):o()},i):(a[l++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function Ow(e,t){if(!f0||!p0(e)||!f0(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 Iw(e,t,r){return r.get&&h0(r.get,t,{getter:!0}),r.set&&h0(r.set,t,{setter:!0}),d0.f(e,t,r)}var Aw=r,Nw=ms,Ou=Bc,Sw=ps,Zs=xm,I=z,Fs=VT,Rw=us("Promise"),Mw="AsyncFromSyncIterator",Cw=I.set,xw=I.getterFor(Mw),e=(_w.prototype=Zs(Ou(Fs),{next:function(){var n=xw(this);return new Rw(function(e,t){var r=Nw(Aw(n.next,n.iterator));Tw(r,e,t)})},return:function(){var n=xw(this).iterator;return new Rw(function(e,t){var r=Sw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=Nw(Aw(r,n));Tw(r,e,t)})}}),_w),Uw=r,Pw=e,kw=ms,Dw=Qc,Lw=ps,Fw=ys("asyncIterator"),Vw=ls,jw=ms,Bw=r,Hw=us,zw=ps,Gw=r,Kw=ls,Jw=ms,Yw=N,Ww=us,qw=function(e){return{iterator:e,next:Vw(jw(e).next)}},$w=function(e,t,r,n){try{var i=zw(e,"return");if(i)return Hw("Promise").resolve(Bw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},C={toArray:bw(0),forEach:bw(1),every:bw(2),some:bw(3),find:bw(4)},Xw=$c,Zw=hs,Qw=A,e0=function(e,t){t=arguments.length<2?Lw(e,Fw):t;return t?kw(Uw(t,e)):new Pw(Dw(e))},t0=Qc,r0=Zc,n0=ps,g=$E,i0=us,wd=ys,o0=e,s0=C.toArray,a0=wd("asyncIterator"),u0=g("Array").values,S=(y({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(i0("Promise"))(function(e){var t=Zw(o),r=(void 0!==a&&(a=Xw(a,u)),n0(t,a0)),n=r?void 0:r0(t)||u0,i=Qw(s)?new s:[],r=r?e0(t,r):new o0(t0(t,n));e(s0(r,a,i))})}}),y),c0=m.filterReject,x=ol,t=(S({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return c0(this,e,1<arguments.length?arguments[1]:void 0)}}),x("filterOut"),y),l0=m.filterReject,ea=ol,Ma=(t({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return l0(this,e,1<arguments.length?arguments[1]:void 0)}}),ea("filterReject"),y),p0=yp,f0=Object.isFrozen,h0=(Ma({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!Ow(e,!0))return!1;var t=e.raw;return t.length===e.length&&Ow(t,!1)}}),Qs.exports),d0=w,T=ol,y0=hs,v0=bs;i&&(Iw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=y0(this),t=v0(e);return 0==t?void 0:e[t-1]},set:function(e){var t=y0(this),r=v0(t);return t[0==r?0:r-1]=e}}),T("lastItem"));var Sp=ol,g0=hs,m0=bs;i&&(Iw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=g0(this),e=m0(e);return 0==e?0:e-1}}),Sp("lastIndex"));var o=v,E0=ls,w0=bs,T0=hs,_0=R,b0=us("Map"),ma=b0.prototype,O0=o(ma.forEach),I0=o(ma.has),A0=o(ma.set),N0=o([].push),Nu=ol;y({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=T0(this),i=w0(n),o=_0(n,0),s=new b0,a=null!=e?E0(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),I0(s,r)||A0(s,r,t);return O0(s,function(e){N0(o,e)}),o}}),Nu("uniqueBy");R0.exposure=function(e,t,r,n){return new C0(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},R0.track=function(e,t,r,n){return new P0(n,r,e,t)},R0.remoteConfig=function(e,t,r,n){return new L0(n,e,t.parameter,t.valueId,t.reason,r)},R0.isExposureEvent=function(e){return void 0!==e.experiment},R0.isTrackEvent=function(e){return void 0!==e.eventType},R0.isRemoteConfigEvent=function(e){return void 0!==e.parameter},R0.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},R0.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},R0.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},R0.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[jt.ID],identifiers:this.user.identifiers,userProperties:Ue.sanitize(this.user.properties),hackleProperties:Ue.sanitize(this.user.hackleProperties)}};var S0=R0;function R0(e,t,r){void 0===r&&(r=H()),this.timestamp=e,this.user=t,this.insertId=r}Ne(x0,M0=S0),x0.prototype.copyWithUser=function(e){return new x0(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},x0.prototype.toDto=function(){return c(c({},M0.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 M0,C0=x0;function x0(e,t,r,n,i,o,s,a){e=M0.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}Ne(k0,U0=S0),k0.prototype.copyWithUser=function(e){return new k0(this.timestamp,e,this.eventType,this.event,this.insertId)},k0.prototype.toDto=function(){return c(c({},U0.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Ue.sanitize(this.event.properties)})};var U0,P0=k0;function k0(e,t,r,n,i){e=U0.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}Ne(F0,D0=S0),F0.prototype.copyWithUser=function(e){return new F0(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},F0.prototype.toDto=function(){return c(c({},D0.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:Ue.sanitize(this.properties)})};var D0,L0=F0;function F0(e,t,r,n,i,o,s){e=D0.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}j0.isSessionEvent=function(e){return!!S0.isTrackEvent(e)&&(e.event.key===j0.SESSION_START_EVENT_NAME||e.event.key===j0.SESSION_END_EVENT_NAME)},j0.prototype.onSessionStarted=function(e,t,r){this.track(j0.SESSION_START_EVENT_NAME,e,t,r)},j0.prototype.onSessionEnded=function(e,t,r){this.track(j0.SESSION_END_EVENT_NAME,e,t,r)},j0.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)},j0.prototype.decorateSession=function(e,t){t=(new zt).add(jt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},j0.SESSION_START_EVENT_NAME="$session_start",j0.SESSION_END_EVENT_NAME="$session_end";var V0=j0;function j0(e,t){this.userManager=e,this.core=t}H0.prototype.process=function(e){var t;V0.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=e.copyWithUser(e.user),t=null===(t=this.sessionManager).currentSessionId||e.user.identifiers[jt.SESSION]?e:e.copyWithUser(c(c({},e.user),{identifiers:c(c({},e.user.identifiers),((e={})[jt.SESSION]=t.sessionId,e))})),this.delegate.process(t))},H0.prototype.flush=function(e){this.delegate.flush(e)},H0.prototype.close=function(){this.delegate.close()},H0.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.flush(!0);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var B0=H0;function H0(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n}G0.toEvent=function(e){var t;return{key:G0.EVENT_KEY,properties:{level:G0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:G0._stacktrace(e)}}},G0._stacktrace=function(e){return u.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,G0.STACK_TRACK_LIMIT).join("\n")},G0.EVENT_KEY="$trace",G0.LEVEL_ERROR="error",G0.STACK_TRACK_LIMIT=30;var z0=G0;function G0(){}K0.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)}};bu=K0;function K0(){}Y0.prototype.with=function(e){return new Y0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},Y0.of=function(e,t,r,n){return new Y0(n,t.targetEvaluations,e.experiment,r.id,r.key,r.config)},Y0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return u.isNotNullOrUndefined(n)?this.of(e,t,n,r):new Y0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)};var J0=Y0;function Y0(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($0,W0=bu),$0.prototype.supports=function(e){return void 0!==e.experiment},$0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:J0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var W0,q0=$0;function $0(e){var t=W0.call(this)||this;return t.evaluationFlowFactory=e,t}Z0.of=function(e,t,r,n,i,o){return o.returnValue=Ue.truncateStringValue(n),new Z0(i,t.targetEvaluations,e.parameter,r,n,o)},Z0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var X0=Z0;function Z0(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(tT,Q0=bu),tT.prototype.supports=function(e){return void 0!==e.parameter},tT.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=Ue.truncateStringValue(e.defaultValue),u.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return X0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return u.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)},tT.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,h.TYPE_MISMATCH,i):X0.of(e,t,r.id,r.rawValue,n,i)};var Q0,eT=tT;function tT(e){var t=Q0.call(this)||this;return t.targetRuleDeterminer=e,t}nT.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var rT=nT;function nT(e,t){this.type=e,this.id=t}oT.create=function(){return new oT},Object.defineProperty(oT.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(oT.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(oT.prototype,"properties",{get:function(){return Ue.sanitize(this._properties)},enumerable:!1,configurable:!0}),oT.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},oT.prototype.addRequest=function(e){this._stack.push(e)},oT.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},oT.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof J0&&e.experiment.id===t.id})},oT.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},oT.prototype.setProperty=function(e,t){this._properties[e]=t};var iT=oT;function oT(){this._stack=[],this._targetEvaluations=[],this._properties={}}aT.of=function(e,t,r,n){return new aT(e,t,r,n)},aT.by=function(e,t){return new aT(e.workspace,e.user,t,"A")},aT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var sT=aT;function aT(e,t,r,n){this.key=new rT("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}cT.of=function(e,t,r,n,i){return new cT(e,t,r,n,i)},cT.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var uT=cT;function cT(e,t,r,n,i){this.key=new rT("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}lT.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();case"boolean":return e?"true":"false";default:return}},lT.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},lT.asBoolean=function(e){switch(typeof e){case"boolean":return e;case"string":switch(e){case"true":return!0;case"false":return!1;default:return}default:return}},lT.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var U=lT;function lT(){}fT.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 pT=fT;function fT(e){this.storages=e}dT.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},dT.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return U.asNumber(e)},dT.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=U.asNumber(t),e=U.asNumber(e);u.isNullOrUndefined(t)||t<0||u.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},dT.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},dT.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},dT.prototype.clear=function(){this.listStorage.clear()};var hT=dT;function dT(e){this.listStorage=e}vT.prototype.add=function(e){this.evaluators.push(e)},vT.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(u.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)};var yT=vT;function vT(){this.evaluators=new Array}mT.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},mT.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},mT.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var gT=mT;function mT(e){this.conditionMatcherFactory=e}wT.prototype.decorate=function(e){return e};var ET=wT;function wT(){}_T.prototype.decorate=function(e){return"string"==typeof e?Vo.decodeURIOrOriginal(e):e};var TT=_T;function _T(){}OT.prototype.matches=function(e,t,r){void 0===r&&(r=new ET);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)},OT.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)},OT.prototype.singleMatches=function(e,t,r,n,i){e=i.decorate(e),t=t.values.map(i.decorate);return n.matches(r,e,t)},OT.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},OT.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var bT=OT;function OT(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}IT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.inMatches(r,e)})};b=IT;function IT(){}AT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.containsMatches(r,e)})};Ea=AT;function AT(){}NT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.startsWithMatches(r,e)})};_=NT;function NT(){}ST.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.endsWithMatches(r,e)})};O=ST;function ST(){}RT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanMatches(r,e)})};E=RT;function RT(){}CT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanOrEqualMatches(r,e)})};var MT=CT;function CT(){}xT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanMatches(r,e)})};ta=xT;function xT(){}UT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanOrEqualMatches(r,e)})};Ia=UT;function UT(){}PT.prototype.matches=function(e,t,r){return!u.isNullOrUndefined(t)};M=PT;function PT(){}DT.prototype.getMatcher=function(e){switch(e){case"IN":return DT.IN_MATCHER;case"CONTAINS":return DT.CONTAINS_MATCHER;case"STARTS_WITH":return DT.STARTS_WITH_MATCHER;case"ENDS_WITH":return DT.ENDS_WITH_MATCHER;case"GT":return DT.GT_MATCHER;case"GTE":return DT.GTE_MATCHER;case"LT":return DT.LT_MATCHER;case"LTE":return DT.LTE_MATCHER;case"EXISTS":return DT.EXISTS_MATCHER}},DT.IN_MATCHER=new b,DT.CONTAINS_MATCHER=new Ea,DT.STARTS_WITH_MATCHER=new _,DT.ENDS_WITH_MATCHER=new O,DT.GT_MATCHER=new E,DT.GTE_MATCHER=new MT,DT.LT_MATCHER=new ta,DT.LTE_MATCHER=new Ia,DT.EXISTS_MATCHER=new M;var kT=DT;function DT(){}LT.prototype.inMatches=function(e,t){e=U.asString(e),t=U.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},LT.prototype.containsMatches=function(e,t){e=U.asString(e),t=U.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.includes(t)},LT.prototype.startsWithMatches=function(e,t){e=U.asString(e),t=U.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.startsWith(t)},LT.prototype.endsWithMatches=function(e,t){e=U.asString(e),t=U.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.endsWith(t)},LT.prototype.greaterThanMatches=function(e,t){e=U.asString(e),t=U.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<e},LT.prototype.greaterThanOrEqualMatches=function(e,t){e=U.asString(e),t=U.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<=e},LT.prototype.lessThanMatches=function(e,t){e=U.asString(e),t=U.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<t},LT.prototype.lessThanOrEqualMatches=function(e,t){e=U.asString(e),t=U.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<=t};Bc=LT;function LT(){}FT.prototype.inMatches=function(e,t){e=U.asNumber(e),t=U.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},FT.prototype.containsMatches=function(e,t){return!1},FT.prototype.startsWithMatches=function(e,t){return!1},FT.prototype.endsWithMatches=function(e,t){return!1},FT.prototype.greaterThanMatches=function(e,t){e=U.asNumber(e),t=U.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<e},FT.prototype.greaterThanOrEqualMatches=function(e,t){e=U.asNumber(e),t=U.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<=e},FT.prototype.lessThanMatches=function(e,t){e=U.asNumber(e),t=U.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<t},FT.prototype.lessThanOrEqualMatches=function(e,t){e=U.asNumber(e),t=U.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<=t};z=FT;function FT(){}jT.prototype.inMatches=function(e,t){e=U.asBoolean(e),t=U.asBoolean(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},jT.prototype.containsMatches=function(e,t){return!1},jT.prototype.startsWithMatches=function(e,t){return!1},jT.prototype.endsWithMatches=function(e,t){return!1},jT.prototype.greaterThanMatches=function(e,t){return!1},jT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},jT.prototype.lessThanMatches=function(e,t){return!1},jT.prototype.lessThanOrEqualMatches=function(e,t){return!1};var VT=jT;function jT(){}BT.prototype.inMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isEqualTo(t)},BT.prototype.containsMatches=function(e,t){return!1},BT.prototype.startsWithMatches=function(e,t){return!1},BT.prototype.endsWithMatches=function(e,t){return!1},BT.prototype.greaterThanMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isGreaterThan(t)},BT.prototype.greaterThanOrEqualMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isGreaterThanOrEqualTo(t)},BT.prototype.lessThanMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isLessThan(t)},BT.prototype.lessThanOrEqualMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isLessThanOrEqualTo(t)};I=BT;function BT(){}HT.prototype.inMatches=function(e,t){e=Vo.tryParse(e),t=U.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&Vo.decodeURIOrOriginal(Vo.removePathnameTrailingSlash(e))===Vo.decodeURIOrOriginal(Vo.removePathnameTrailingSlash(t))},HT.prototype.containsMatches=function(e,t){e=Vo.tryParse(e),t=U.asString(t);if(u.isNullOrUndefined(e)||u.isNullOrUndefined(t))return!1;e=Vo.decodeURIOrOriginal(e.href);return e.includes(t)||e.includes(encodeURI(t))},HT.prototype.startsWithMatches=function(e,t){e=Vo.tryParse(e),t=U.asString(t);if(u.isNullOrUndefined(e)||u.isNullOrUndefined(t))return!1;e=Vo.decodeURIOrOriginal(e.href);return e.startsWith(t)||e.startsWith(encodeURI(t))},HT.prototype.endsWithMatches=function(e,t){return!1},HT.prototype.greaterThanMatches=function(e,t){return!1},HT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},HT.prototype.lessThanMatches=function(e,t){return!1},HT.prototype.lessThanOrEqualMatches=function(e,t){return!1};Zs=HT;function HT(){}zT.prototype.inMatches=function(e,t){return!1},zT.prototype.containsMatches=function(e,t){return!1},zT.prototype.startsWithMatches=function(e,t){return!1},zT.prototype.endsWithMatches=function(e,t){return!1},zT.prototype.greaterThanMatches=function(e,t){return!1},zT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},zT.prototype.lessThanMatches=function(e,t){return!1},zT.prototype.lessThanOrEqualMatches=function(e,t){return!1};Ou=zT;function zT(){}KT.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return KT.STRING_MATCHER;case"NUMBER":return KT.NUMBER_MATCHER;case"BOOLEAN":return KT.BOOLEAN_MATCHER;case"VERSION":return KT.VERSION_MATCHER;case"URL":return KT.URL_MATCHER;case"NULL":case"UNKNOWN":return KT.NULL_MATCHER}},KT.STRING_MATCHER=new Bc,KT.NUMBER_MATCHER=new z,KT.BOOLEAN_MATCHER=new VT,KT.VERSION_MATCHER=new I,KT.URL_MATCHER=new Zs,KT.NULL_MATCHER=new Ou;var GT=KT;function KT(){}YT.prototype.matches=function(e,t,r){var e=this.userValueResolver.resolveOrNull(e.user,r.key),n=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(e,r.match,n)},YT.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?TT:ET)};var JT=YT;function YT(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}qT.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];default:throw new Error("Unsupported TargetKeyType [".concat(t.type,"]"))}};var WT=qT;function qT(){}XT.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}},XT.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 $T=XT;function XT(e){this.segmentMatcher=e}QT.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},QT.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var ZT=QT;function QT(e){this.userConditionMatcher=e}t_.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);default:throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}};var e_=t_;function t_(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}r_.prototype.matches=function(e,t,r){var n=u.requiredNotNullOrUndefined(U.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(u.isNullOrUndefined(n))return!1;var i=null!=(i=t.getEvaluation(n))?i:this.evaluate(e,t,n);return this.evaluationMatches(i,r)},r_.prototype.evaluate=function(e,t,r){r=sT.by(e,r),r=this.evaluator.evaluate(r,t),e=this.resolve(e,r);return t.addEvaluation(e),e};Fs=r_;function r_(e,t){this.evaluator=e,this.valueOperatorMatcher=t}Ne(o_,n_=Fs),o_.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},o_.prototype.resolve=function(e,t){return e instanceof sT&&t.reason===h.TRAFFIC_ALLOCATED?t.with(h.TRAFFIC_ALLOCATED_BY_TARGETING):t},o_.prototype.evaluationMatches=function(e,t){return!!o_.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},o_.AB_TEST_MATCHED_REASONS=[h.OVERRIDDEN,h.TRAFFIC_ALLOCATED,h.EXPERIMENT_COMPLETED,h.TRAFFIC_ALLOCATED_BY_TARGETING];var n_,i_=o_;function o_(e,t){return n_.call(this,e,t)||this}Ne(u_,s_=Fs),u_.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},u_.prototype.resolve=function(e,t){return t},u_.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var s_,a_=u_;function u_(e,t){return s_.call(this,e,t)||this}l_.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;e=this.eventValueResolver.resolveOrNull(e.event,r.key);return this.valueOperatorMatcher.matches(e,r.match)},l_.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var c_=l_;function l_(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}f_.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,"]"))}},f_.prototype.properties=function(e){return S0.isTrackEvent(e)?e.event.properties:S0.isExposureEvent(e)||S0.isRemoteConfigEvent(e)?e.properties:void 0};var p_=f_;function f_(){}d_.prototype.matches=function(e,t,r){if("COHORT"!==r.key.type)throw new Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));e=null!=(e=null==(e=e.user.cohorts)?void 0:e.map(function(e){return e.id}))?e:[];return this.valueOperatorMatcher.matches(e,r.match)};var h_=d_;function d_(e){this.valueOperatorMatcher=e}v_.prototype.supports=function(e){return"NUMBER_OF_EVENTS_IN_DAYS"===e||"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"===e},v_.prototype.matches=function(e,t,r){var n,i=r.key.type;if(!this.supports(i))throw new Error("Unsupported TargetKeyType [".concat(i,"]"));var o=null!=(n=e.user.targetEvents)?n:[];switch(i){case"NUMBER_OF_EVENTS_IN_DAYS":return new E_(this.valueOperatorMatcher,this.clock).matches(e,o,r);case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return new __(this.valueOperatorMatcher,this.clock).matches(e,o,r);default:return i}};var y_=v_;function v_(e,t){this.valueOperatorMatcher=e,this.clock=t}function g_(){}Ne(w_,m_=g_),w_.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-De.daysToUnit(i.days,"milliseconds"),t=t.filter(function(e){return n.expressionMatch(e,i)}),t=f.sum(t,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(t,r.match)},w_.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&null===e.property},w_.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var m_,E_=w_;function w_(e,t){var r=m_.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}Ne(b_,T_=g_),b_.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-De.daysToUnit(i.days,"milliseconds"),t=t.filter(function(e){return n.expressionMatch(e,i)}),t=f.sum(t,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(t,r.match)},b_.prototype.propertyMatch=function(e,t){return(null==e?void 0:e.type)===t.key.type&&e.key===t.key.name&&this.valueOperatorMatcher.matches(e.value,t.match)},b_.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&this.propertyMatch(e.property,t.propertyFilter)},b_.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var T_,__=b_;function b_(e,t){var r=T_.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}I_.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;case"NUMBER_OF_EVENTS_IN_DAYS":case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return this.userTargetConditionMatcher;default:return e}};var O_=I_;function I_(e,t){var r=new bT(new GT,new kT);this.userConditionMatcher=new JT(new WT,r),this.eventConditionMatcher=new c_(new p_,r),this.segmentConditionMatcher=new $T(new ZT(this.userConditionMatcher)),this.experimentConditionMatcher=new e_(new i_(e,r),new a_(e,r)),this.cohortConditionMatcher=new h_(r),this.userTargetConditionMatcher=new y_(r,t)}N_.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},N_.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},N_.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 A_=N_;function N_(e){this.bucketer=e}var S_={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}},R_=(M_.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},M_.prototype.calculateSlotNumber=function(e,t,r){r=S_.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},M_);function M_(){}x_.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},x_.end=function(){return new x_(void 0,void 0)},x_.decision=function(e,t){return new x_(e,t)},x_.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 C_=x_;function x_(e,t){this.flowEvaluator=e,this.nextFlow=t}P_.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 J0.of(e,t,n,h.OVERRIDDEN);case"FEATURE_FLAG":return J0.of(e,t,n,h.INDIVIDUAL_TARGET_MATCH)}};var U_=P_;function P_(e){this.overrideResolver=e}D_.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?J0.ofDefault(e,t,h.EXPERIMENT_DRAFT):r.evaluate(e,t)};var k_=D_;function D_(){}F_.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return J0.ofDefault(e,t,h.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return J0.ofDefault(e,t,h.FEATURE_FLAG_INACTIVE)}};var L_=F_;function F_(){}j_.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return J0.of(e,t,r,h.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var V_=j_;function j_(){}H_.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):J0.ofDefault(e,t,h.NOT_IN_EXPERIMENT_TARGET)};var B_=H_;function H_(e){this.experimentTargetDeterminer=e}G_.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?J0.ofDefault(e,t,h.VARIATION_DROPPED):J0.of(e,t,n,h.TRAFFIC_ALLOCATED):J0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var z_=G_;function G_(e){this.actionResolver=e}J_.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 J0.of(e,t,r,h.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var K_=J_;function J_(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}W_.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 J0.ofDefault(e,t,h.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return J0.of(e,t,n,h.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var Y_=W_;function W_(e){this.actionResolver=e}$_.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):J0.ofDefault(e,t,h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var q_=$_;function $_(e){this.containerResolver=e}Z_.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):J0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND)};var X_=Z_;function Z_(){}eb.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 Q_=eb;function eb(e){this.targetMatcher=e}rb.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var tb=rb;function rb(e){this.targetMatcher=e}ib.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},ib.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},ib.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)}},ib.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 nb=ib;function ib(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}sb.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(u.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(u.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(u.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(u.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var ob=sb;function sb(e){this.bucketer=e}ub.of=function(e,t,r,n){return new ub(r,t.targetEvaluations,e.inAppMessage,n,t.properties)};var ab=ub;function ub(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.message=n,this.properties=i}lb.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):ab.of(e,t,h.UNSUPPORTED_PLATFORM)};var cb=lb;function lb(){}fb.prototype.evaluate=function(e,t,r){var n;return this.userOverrideMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),ab.of(e,t,h.OVERRIDDEN,n)):r.evaluate(e,t)};var pb=fb;function fb(e,t){this.userOverrideMatcher=e,this.inAppMessageResolver=t}db.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?ab.of(e,t,h.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var hb=db;function db(){}vb.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?ab.of(e,t,h.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var yb=vb;function vb(){}mb.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):ab.of(e,t,h.NOT_IN_IN_APP_MESSAGE_PERIOD)};var gb=mb;function mb(){}wb.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?ab.of(e,t,h.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var Eb=wb;function wb(e){this.hiddenMatcher=e}_b.prototype.evaluate=function(e,t,r){var n;return this.targetMatcher.matches(e,t)?(n=this.inAppMessageResolver.resolve(e,t),ab.of(e,t,h.IN_APP_MESSAGE_TARGET,n)):ab.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var Tb=_b;function _b(e,t){this.targetMatcher=e,this.inAppMessageResolver=t}Ob.prototype.resolve=function(e,t){return null!=(t=this.resolveExperiment(e,t))?t:this.resolveDefault(e)},Ob.prototype.resolveExperiment=function(e,t){var r=e.inAppMessage.messageContext.experimentContext;if(!r)return null;var n=u.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[".concat(r.key,"]")}),n=sT.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})},Ob.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)},Ob.prototype.resolveDefault=function(e){var t=e.inAppMessage.messageContext.defaultLang;return this.resolveMessage(e,function(e){return e.lang===t})},Ob.prototype.resolveMessage=function(e,t){t=e.inAppMessage.messageContext.messages.find(t);return u.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.inAppMessage.id,"]")})};var bb=Ob;function Ob(e){this.evaluator=e}Ab.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},Ab.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!u.isNullOrUndefined(e)&&t.identifiers.includes(e)};var Ib=Ab;function Ab(){}Sb.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 Nb=Sb;function Sb(e){this.targetMatcher=e}Mb.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var Rb=Mb;function Mb(e){this.storage=e}xb.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},xb.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(u.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(u.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return u.isNotNullOrUndefined(this.bucketer.bucketing(e,t))};var Cb=xb;function xb(e,t){this.targetMatcher=e,this.bucketer=t}Pb.get=function(e){return u.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},Pb.getOrNull=function(e){return Pb.instances.get(e)},Pb.register=function(e,t){return Pb.instances.set(e,t),t},Pb.instances=new Map;var Ub=Pb;function Pb(){}Db.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},Db.prototype.getInAppMessageFlow=function(){return this.inAppMessageFlow};var kb=Db;function Db(e,t,r,n){var i=new R_,n=Ub.register("targetMatcher",new gT(new O_(e,n))),o=new A_(i),t=new nb(t,n,o),s=new ob(i),s=(this.abTestFlow=C_.of(new U_(t),new X_,new q_(s),new B_(new Q_(n)),new k_,new L_,new V_,new z_(o)),this.featureFlagFlow=C_.of(new k_,new L_,new V_,new U_(t),new X_,new K_(new tb(n),o),new Y_(o)),new bb(e));this.inAppMessageFlow=C_.of(new cb,new pb(new Ib,s),new hb,new yb,new gb,new Eb(new Rb(r)),new Tb(new Nb(n),s)),this.remoteConfigParameterTargetRuleDeterminer=new Cb(n,i)}Fb.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={})[Fb.ROOT_TYPE]=r.key.type,t[Fb.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},Fb.prototype.createEvent=function(e,t,r,n){var i;if(t instanceof J0)return n[Fb.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[Fb.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[Fb.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);if(t instanceof ab)return null;throw new Error("Unsupported Evaluation [".concat(typeof t,"]"))},Fb.ROOT_TYPE="$targetingRootType",Fb.ROOT_ID="$targetingRootId",Fb.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",Fb.EXPERIMENT_VERSION_KEY="$experiment_version",Fb.EXECUTION_VERSION_KEY="$execution_version";var Lb=Fb;function Fb(e){this.clock=e}Ne(Bb,Vb=bu),Bb.prototype.supports=function(e){return void 0!==e.inAppMessage},Bb.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlowFactory.getInAppMessageFlow().evaluate(e,t))?r:ab.of(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var Vb,jb=Bb;function Bb(e){var t=Vb.call(this)||this;return t.evaluationFlowFactory=e,t}zb.of=function(e,t,r,n){return new zb(e,t,r,n)},zb.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var Hb=zb;function zb(e,t,r,n){this.key=new rT("IN_APP_MESSAGE",r.id),this.workspace=e,this.user=t,this.inAppMessage=r,this.timestamp=n}var Gb=s.log,Kb=(Jb.create=function(e,t,r,n){var i=Le.instance,o=new yT,r=new pT(r),r=new kb(o,r,n,i),n=new q0(r),s=new eT(r.remoteConfigParameterTargetRuleDeterminer),r=new jb(r);return o.add(n),o.add(s),new Jb(n,s,r,e,new Lb(i),t,new Yb,i)},Jb.prototype.getExperiment=function(e){if(e){var t=this.workspaceFetcher.get();if(t)return t.getExperimentOrNull(e)}else Gb.error("experimentKey must not be empty")},Jb.prototype.experiment=function(e,t,r){var n=this;if(!e)return Gb.error("experimentKey must not be empty"),Tt.of(r,h.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return Gb.warn("SDK not ready."),Tt.of(r,h.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return Gb.warn("Experiment does not exist."),Tt.of(r,h.EXPERIMENT_NOT_FOUND);i=sT.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},Jb.prototype.experiments=function(r){var n=this,i=new Yn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=sT.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},Jb.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,iT.create()),t=null!=(t=e.config)?t:new Ve;return[e,Tt.of(e.variationKey,e.reason,t,e.experiment)]},Jb.prototype.featureFlag=function(e,t){var r=this;if(!e)return Gb.error("featureKey must not be empty"),bt.off(h.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return Gb.warn("SDK not ready."),bt.off(h.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return Gb.warn("FeatureFlag does not exist."),bt.off(h.FEATURE_FLAG_NOT_FOUND);n=sT.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},Jb.prototype.featureFlags=function(r){var n=this,i=new Yn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=sT.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},Jb.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,iT.create()),t=null!=(t=e.config)?t:new Ve;return[e,"A"===e.variationKey?bt.off(e.reason,t,e.experiment):bt.on(e.reason,t,e.experiment)]},Jb.prototype.inAppMessage=function(e,t){var r=this,n=this.workspaceFetcher.get();if(!n)return Gb.warn("SDK not ready."),Et.of(h.SDK_NOT_READY);e=n.getInAppMessageOrNull(e);if(!e)return Gb.warn("In app message does not exist."),Et.of(h.IN_APP_MESSAGE_NOT_FOUND);n=Hb.of(n,t,e,this.clock.currentMillis()),t=this.inAppMessageEvaluator.evaluate(n,iT.create());return this.eventFactory.create(n,t).forEach(function(e){return r.eventProcessor.process(e)}),Et.of(t.reason,t.inAppMessage,t.message,t.properties)},Jb.prototype.tryInAppMessage=function(t,e){var r,n=zn.start();try{r=this.inAppMessage(t,e)}catch(e){Gb.error("Unexpected error while deciding in app message [".concat(t,"]: ").concat(e)),r=Et.of(h.EXCEPTION)}return Fi.inAppMessage(n,t,r),r},Jb.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?Gb.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(S0.track(n,e,t,r))):Gb.warn("Event key must be not null. or event key must be string type."):Gb.warn("event must not be null.")},Jb.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=z0.toEvent(e),this.flush(),this.track(e,t),this.flush())},Jb.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},Jb.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(u.isNullOrUndefined(o))return Gb.warn("SDK not ready."),gt.of(n,h.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(u.isNullOrUndefined(e))return Gb.warn("Remote config parameter does not exist."),gt.of(n,h.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=uT.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,iT.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),gt.of(t.value,t.reason)},Jb.prototype.close=function(){this.eventProcessor.close()},Jb);function Jb(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}Wb.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},Wb.prototype._isSameError=function(e,t){return!u.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var Yb=Wb;function Wb(){}$b.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},$b.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var qb=$b;function $b(){this._installed=[],this._installations={onerror:Qb,onunhandledrejection:eO}}var Xb,Zb=null;function Qb(o,s){Zb=window.onerror,window.onerror=function(e,t,r,n,i){u.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),Zb&&Zb.apply(this,arguments)}}function eO(r,n){Xb=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()),Xb&&Xb.apply(this,arguments)}}rO.prototype.read=function(){return a(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,[]]})})},rO.prototype.save=function(r){return a(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])})})},rO.prototype.add=function(r){return a(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]}})})},rO.prototype.delete=function(n){return a(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]}})})},rO.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},rO.prototype.clear=function(){return a(this,void 0,void 0,function(){return l(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var tO=rO;function rO(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var nO=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},iO=(oO.builder=function(){return new sO},oO.empty=function(){return oO.builder().build()},oO.from=function(e){return new oO(e)},oO.fromDto=function(e){for(var t=oO.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 Pn(e)})})}return t.build()},Object.defineProperty(oO.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),oO.prototype.get=function(e){return this.cohorts.get(e)},oO.prototype.filterBy=function(e){var r=Ht(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return oO.from(e)},oO.prototype.asArray=function(){return this.cohorts.values()},oO.prototype.asComparable=function(){return this.cohorts},oO.prototype.toBuilder=function(){return new sO(this)},oO);function oO(e){this.cohorts=e}aO.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},aO.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},aO.prototype.build=function(){return new iO(this.cohorts)};var sO=aO;function aO(e){this.cohorts=new Yn(Me.isEqual),e&&this.putAll(e)}var r="model",N="name",A="type",e="vendor",C="version",wd="architecture",g="console",S="mobile",x="tablet",m="smarttv",t="wearable",uO=(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],[N,C],[/(opios)[\/\s]+([\w\.]+)/i],[[N,"Opera Mini"],C],[/\s(opr)\/([\w\.]+)/i],[[N,"Opera"],C],[/(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],[N,C],[/(konqueror)\/([\w\.]+)/i],[[N,"Konqueror"],C],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[N,"IE"],C],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[N,"Edge"],C],[/(yabrowser)\/([\w\.]+)/i],[[N,"Yandex"],C],[/(Avast)\/([\w\.]+)/i],[[N,"Avast Secure Browser"],C],[/(AVG)\/([\w\.]+)/i],[[N,"AVG Secure Browser"],C],[/(puffin)\/([\w\.]+)/i],[[N,"Puffin"],C],[/(focus)\/([\w\.]+)/i],[[N,"Firefox Focus"],C],[/(opt)\/([\w\.]+)/i],[[N,"Opera Touch"],C],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[N,"UCBrowser"],C],[/(comodo_dragon)\/([\w\.]+)/i],[[N,/_/g," "],C],[/(windowswechat qbcore)\/([\w\.]+)/i],[[N,"WeChat(Win) Desktop"],C],[/(micromessenger)\/([\w\.]+)/i],[[N,"WeChat"],C],[/(brave)\/([\w\.]+)/i],[[N,"Brave"],C],[/(whale)\/([\w\.]+)/i],[[N,"Whale"],C],[/(qqbrowserlite)\/([\w\.]+)/i],[N,C],[/(QQ)\/([\d\.]+)/i],[N,C],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[N,C],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[N,C],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[N,C],[/(MetaSr)[\/\s]?([\w\.]+)/i],[N],[/(LBBROWSER)/i],[N],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[C,[N,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[C,[N,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[N,C],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[C,[N,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[N,/(.+)/,"$1 WebView"],C],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[N,/(.+(?:g|us))(.+)/,"$1 $2"],C],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[N,"Chrome Mobile"],C],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[C,[N,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[N,"Sailfish Browser"],C],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[N,C],[/(dolfin)\/([\w\.]+)/i],[[N,"Dolphin"],C],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[N,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[N,"Opera Coast"],C],[/fxios\/([\w\.-]+)/i],[C,[N,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[C,[N,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[C,N],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[N,"GSA"],C],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[N,[C,(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],[N,C],[/(navigator|netscape)\/([\w\.-]+)/i],[[N,"Netscape"],C],[/(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],[N,C]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[wd,"amd64"]],[/(ia32(?=;))/i],[[wd,P.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[wd,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[wd,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[wd,/ower/,"",P.util.lowerize]],[/(sun4\w)[;\)]/i],[[wd,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[wd,P.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[r,e,[A,x]],[/applecoremedia\/[\w\.]+ \((ipad)/],[r,[e,"Apple"],[A,x]],[/(apple\s{0,1}tv)/i],[[r,"Apple TV"],[e,"Apple"],[A,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],[e,r,[A,x]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[r,[e,"Amazon"],[A,x]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[r,P.mapper.str,P.maps.device.amazon.model],[e,"Amazon"],[A,S]],[/android.+aft([bms])\sbuild/i],[r,[e,"Amazon"],[A,m]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[r,e,[A,S]],[/\((ip[honed|\s\w*]+);/i],[r,[e,"Apple"],[A,S]],[/(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],[e,r,[A,S]],[/\(bb10;\s(\w+)/i],[r,[e,"BlackBerry"],[A,S]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[r,[e,"Asus"],[A,x]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[e,"Sony"],[r,"Xperia Tablet"],[A,x]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[r,[e,"Sony"],[A,S]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[e,r,[A,g]],[/android.+;\s(shield)\sbuild/i],[r,[e,"Nvidia"],[A,g]],[/(playstation\s[34portablevi]+)/i],[r,[e,"Sony"],[A,g]],[/(sprint\s(\w+))/i],[[e,P.mapper.str,P.maps.device.sprint.vendor],[r,P.mapper.str,P.maps.device.sprint.model],[A,S]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[e,[r,/_/g," "],[A,S]],[/(nexus\s9)/i],[r,[e,"HTC"],[A,x]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[r,[e,"Huawei"],[A,S]],[/android.+(bah2?-a?[lw]\d{2})/i],[r,[e,"Huawei"],[A,x]],[/(microsoft);\s(lumia[\s\w]+)/i],[e,r,[A,S]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[r,[e,"Microsoft"],[A,g]],[/(kin\.[onetw]{3})/i],[[r,/\./g," "],[e,"Microsoft"],[A,S]],[/\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],[r,[e,"Motorola"],[A,S]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[r,[e,"Motorola"],[A,x]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[e,P.util.trim],[r,P.util.trim],[A,m]],[/hbbtv.+maple;(\d+)/i],[[r,/^/,"SmartTV"],[e,"Samsung"],[A,m]],[/\(dtv[\);].+(aquos)/i],[r,[e,"Sharp"],[A,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],[[e,"Samsung"],r,[A,x]],[/smart-tv.+(samsung)/i],[e,[A,m],r],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[e,"Samsung"],r,[A,S]],[/sie-(\w*)/i],[r,[e,"Siemens"],[A,S]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[e,"Nokia"],r,[A,S]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[r,[e,"Acer"],[A,x]],[/android.+([vl]k\-?\d{3})\s+build/i],[r,[e,"LG"],[A,x]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[e,"LG"],r,[A,x]],[/(lg) netcast\.tv/i],[e,r,[A,m]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[r,[e,"LG"],[A,S]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[e,r,[A,x]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[r,[e,"Lenovo"],[A,x]],[/(lenovo)[_\s-]?([\w-]+)/i],[e,r,[A,S]],[/linux;.+((jolla));/i],[e,r,[A,S]],[/((pebble))app\/[\d\.]+\s/i],[e,r,[A,t]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[e,r,[A,S]],[/crkey/i],[[r,"Chromecast"],[e,"Google"],[A,m]],[/android.+;\s(glass)\s\d/i],[r,[e,"Google"],[A,t]],[/android.+;\s(pixel c)[\s)]/i],[r,[e,"Google"],[A,x]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[r,[e,"Google"],[A,S]],[/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],[[r,/_/g," "],[e,"Xiaomi"],[A,S]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[r,/_/g," "],[e,"Xiaomi"],[A,x]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[r,[e,"Meizu"],[A,S]],[/(mz)-([\w-]{2,})/i],[[e,"Meizu"],r,[A,S]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[r,[e,"OnePlus"],[A,S]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[r,[e,"RCA"],[A,x]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[r,[e,"Dell"],[A,x]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[r,[e,"Verizon"],[A,x]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[e,"Barnes & Noble"],r,[A,x]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[r,[e,"NuVision"],[A,x]],[/android.+;\s(k88)\sbuild/i],[r,[e,"ZTE"],[A,x]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[r,[e,"Swiss"],[A,S]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[r,[e,"Swiss"],[A,x]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[r,[e,"Zeki"],[A,x]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[e,"Dragon Touch"],r,[A,x]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[r,[e,"Insignia"],[A,x]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[r,[e,"NextBook"],[A,x]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[e,"Voice"],r,[A,S]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[e,"LvTel"],r,[A,S]],[/android.+;\s(PH-1)\s/i],[r,[e,"Essential"],[A,S]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[r,[e,"Envizen"],[A,x]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[e,r,[A,x]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[r,[e,"MachSpeed"],[A,x]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[e,r,[A,x]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[r,[e,"Rotor"],[A,x]],[/android.+(KS(.+))\s+build/i],[r,[e,"Amazon"],[A,x]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[e,r,[A,x]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[A,P.util.lowerize],e,r],[/[\s\/\(](smart-?tv)[;\)]/i],[[A,m]],[/(android[\w\.\s\-]{0,9});.+build/i],[r,[e,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[C,[N,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[N,"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],[N,C],[/rv\:([\w\.]{1,9}).+(gecko)/i],[C,N]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[N,C],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[N,P.mapper.str,P.maps.os.windows],[C,P.mapper.str,P.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[N,"Windows"],[C,P.mapper.str,P.maps.os.windows.version]],[/\((bb)(10);/i],[[N,"BlackBerry"],C],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[N,C],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[N,"Symbian"],C],[/\((series40);/i],[N],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[N,"Firefox OS"],C],[/(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],[[N,"Linux"],C],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[N,"Chromium OS"],C],[/(sunos)\s?([\w\.\d]*)/i],[[N,"Solaris"],C],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[N,"Linux"],C],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[N,"iOS"],[C,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[N,"iOS"],[C,/_/g,"."]],[/(haiku)\s(\w+)/i],[N,C],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[C,/_/g,"."],[N,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[N,"Mac"],[C,/_/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],[N,C]]},P);function P(){}lO.generate=function(e){var t,r,n,i,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,o=uO.parse(e.navigator.userAgent),s=o.browser,a=o.os,o=o.device,u=e.screen,c=(null==(c=e.navigator.languages)?void 0:c[0])||"",l=c.split("-")[0],p=(null!=(p=o.type)?p:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),f=a.name||"",h="",d="";try{f=null!=(r=null==(t=f.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:f,h=null!=(i=null==(n=u.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",d=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{platform:"Web",browserName:s.name||"",browserMajorVersion:s.major||"",browserVersion:s.version||"",osName:f,osVersion:a.version||"",deviceModel:o.model||"",deviceType:p,deviceVendor:o.vendor||"",deviceBrand:o.vendor||"",locale:c,language:l,orientation:h,userAgent:e.navigator.userAgent||"",screenWidth:u.width||"",screenHeight:u.height||"",timeZone:d}};var cO=lO;function lO(){}fO.prototype.map=function(e){return new fO(e(this.previous),e(this.current))};var pO=fO;function fO(e,t){this.previous=e,this.current=t}dO.empty=function(){return this.from([])},dO.from=function(e){return new dO(e)},dO.fromDto=function(e){return this.from(e.events.map(function(e){return Vn.fromJson(e)}))},Object.defineProperty(dO.prototype,"rawEvents",{get:function(){return this.events},enumerable:!1,configurable:!0});var hO=dO;function dO(e){this.events=e}vO.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return EO.of(TO(e,this.hackleDeviceId),iO.empty(),hO.empty())},vO.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(vO.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),vO.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},vO.prototype.resolveContext=function(e){return void 0===e?this.context:("string"==typeof e?this.updateUser({id:e}):this.updateUser(e)).current},vO.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},vO.prototype.hackleUser=function(e){var t=(new zt).addIdentifiers(e.user.identifiers||{}).add(jt.ID,e.user.id||this.hackleDeviceId).add(jt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(jt.HACKLE_DEVICE,this.hackleDeviceId),t=(u.isNotNullOrUndefined(e.user.userId)&&t.add(jt.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,targetEvents:e.targetEvents.rawEvents}},vO.prototype.hackleProperties=function(){var e;return(e="undefined"!=typeof window?c(c({},cO.generate(window)),this.pageManager.currentPage.toProperties()):e)||{}},vO.prototype.setUser=function(e){return this.updateUser(e).map(function(e){return e.user})},vO.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},vO.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},vO.prototype.updateUserProperties=function(e){return this.operateProperties(e).map(function(e){return e.user})},vO.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).map(function(e){return e.user})},vO.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},vO.prototype.saveUser=function(e){this.storage.saveUser(e)},vO.prototype.updateContext=function(e){var t=this.context,r=t.user,e=e(r),n=this.context.with(e);return this.context=n,nO(r,e)||(this.changeUser(r,e,this.clock.currentMillis()),this.saveUser(e)),new pO(t,n)},vO.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=TO(r,n.hackleDeviceId),nO(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},vO.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:u.fromMap(t)})})},vO.prototype.sync=function(){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.syncCohort(),this.syncUserTarget()])];case 1:return e.sent(),[2]}})})},vO.prototype.syncIfNeeded=function(t){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return this.hasNewIdentifiers(t.previous,t.current)?[4,this.syncCohort()]:[3,2];case 1:e.sent(),e.label=2;case 2:return nO(t.previous,t.current)?[3,4]:[4,this.syncUserTarget()];case 3:e.sent(),e.label=4;case 4:return[2]}})})},vO.prototype.syncCohort=function(){return a(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.userCohortFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(t,this.context.targetEvents),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},vO.prototype.syncUserTarget=function(){return a(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.userTargetFetcher.fetch(this.currentUser)];case 1:return t=e.sent(),this.context=this.context.update(this.context.cohorts,t),[3,3];case 2:return t=e.sent(),s.log.error("Failed to sync userTargets: ".concat(t)),[3,3];case 3:return[2]}})})},vO.prototype.hasNewIdentifiers=function(e,t){var r=Ht(e),e=Ht(t);return Object.entries(e).some(function(e){var t=e[0],e=e[1];return r[t]!==e})},vO.prototype.close=function(){return a(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var yO=vO;function vO(e,t,r,n,i,o,s,a,u){this.hackleDeviceId=e,this.storage=t,this.userTargetFetcher=r,this.userCohortFetcher=n,this.campaignParser=i,this.pageManager=o,this.clock=s,this.userListeners=[],this.defaultUser={id:this.hackleDeviceId,deviceId:this.hackleDeviceId},this.context=this.initContext(a,u),this.storage.saveUser(this.context.user)}mO.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},mO.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(mO.prototype,"deviceId",{get:function(){return this.storage.getItem(nt)},enumerable:!1,configurable:!0}),Object.defineProperty(mO.prototype,"userId",{get:function(){return this.storage.getItem(rt)},enumerable:!1,configurable:!0}),mO.prototype.setDeviceId=function(e){this.setId(nt,e)},mO.prototype.setUserId=function(e){this.setId(rt,e)},mO.prototype.setId=function(e,t){u.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var gO=mO;function mO(e){this.storage=e}wO.of=function(e,t,r){return new wO(e,t.filterBy(e),r)},wO.prototype.with=function(e){return wO.of(e,this.cohorts.filterBy(e),this.targetEvents)},wO.prototype.update=function(e,t){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return wO.of(this.user,e,t)};var EO=wO;function wO(e,t,r){this.user=e,this.cohorts=t,this.targetEvents=r}var TO=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},_O=(Object.defineProperty(bO.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(bO.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:bO.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(bO.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),bO.prototype.addListener=function(e){this.sessionListeners.push(e)},bO.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},bO.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)},bO.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(tt,"".concat(e))},bO.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)})},bO.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},bO.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(et,e)},bO.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(et)},bO.prototype.loadLastEventTime=function(){var e=this.storage.getItem(tt);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},bO.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},bO.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return this.updateLastEventTime(t);case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}},bO.EMPTY_SESSION_ID="0.ffffffff",bO);function bO(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}IO.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},IO.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},IO.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},IO.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var OO=IO;function IO(){this.storage=window.localStorage}NO.postfix=function(e,t){return new NO(e,function(e){return"".concat(e).concat(t)})},NO.prefix=function(e,t){return new NO(e,function(e){return"".concat(t).concat(e)})},NO.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},NO.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},NO.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var AO=NO;function NO(e,t){this.delegate=e,this.transform=t}RO.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},RO.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},RO.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},RO.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}},RO.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[]}},RO.prototype.entries=function(){return this.getList().flatMap(Object.entries)},RO.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){}},RO.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]},RO.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){}},RO.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var SO=RO;function RO(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)}CO.prototype.currentUser=function(){return this.userManager.resolve()},CO.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},CO.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},CO.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},CO.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},CO.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},CO.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},CO.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},CO.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},CO.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},CO.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},CO.prototype.increment=function(e,t){Ti.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var MO=CO;function CO(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}UO.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},UO.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},UO.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},UO.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},UO.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},UO.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},UO.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},UO.monitoring=function(e){return"".concat(e,"/metrics")},UO.userTargets=function(e){return"".concat(e,"/api/v1/user-targets")};var xO=UO;function UO(){}kO.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(u.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},kO.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},kO.prototype.key=function(e){return"".concat(e.key)};var PO=kO;function kO(e){this.storage=e}LO.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var DO=LO;function LO(e){this.handlers=e}VO.prototype.handle=function(e,t){e.close()},VO.prototype.supports=function(e){return"CLOSE"===e.type};var FO=VO;function VO(){}BO.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))}},BO.prototype.supports=function(e){return"WEB_LINK"===e.type};var jO=BO;function BO(e){this.urlHandler=e}zO.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))}},zO.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var HO=zO;function zO(e){this.urlHandler=e}KO.prototype.handle=function(e,t){var r=this.clock.currentMillis()+864e5;this.storage.put(e.context.inAppMessage,r),e.close()},KO.prototype.supports=function(e){return"HIDDEN"===e.type};var GO=KO;function KO(e,t){this.storage=e,this.clock=t}YO.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))}},YO.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var JO=YO;function YO(e){this.urlHandler=e}qO.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))}},qO.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var WO=qO;function qO(e){this.urlHandler=e}XO.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))}},XO.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var $O=XO;function XO(e){this.urlHandler=e}QO.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))}},QO.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var ZO=QO;function QO(e){this.urlHandler=e}tI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},tI.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,in_app_message_display_type:t.message.layout.displayType,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,in_app_message_display_type:t.message.layout.displayType})};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,in_app_message_display_type:t.message.layout.displayType,action_type:r.action.type,action_area:r.area,action_value:r.action.value,button_text:r.buttonText,image_url:r.imageUrl,image_order:r.imageOrder})};case"IMAGE_IMPRESSION":r=e;return{key:"$in_app_image_impression",properties:c(c({},t.properties),{in_app_message_id:t.inAppMessage.id,in_app_message_key:t.inAppMessage.key,in_app_message_display_type:t.message.layout.displayType,image_url:r.imageUrl,image_order:r.imageOrder})}}};var eI=tI;function tI(e){this.core=e}nI.prototype.setListener=function(e){this.inAppMessageListener=e},nI.prototype.present=function(r){return a(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]),null===(t=this.messageViewFactory.create(r,this)))?[2]:[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 rI=nI;function nI(e,t,r,n){void 0===n&&(n=null),this.messageViewFactory=e,this.eventHandler=t,this.interactionHandlerFactory=r,this.inAppMessageListener=n,this.currentMessageView=null,this.opening=!1}oI.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},oI.prototype.destroy=function(){this.userEventEmitter.off("event",this.onEvent)};var iI=oI;function oI(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},aI=(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 sI(e.inAppMessage,e.message,t.user,Ue.sanitize(r))},uI);function uI(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.core=r}lI.prototype.open=function(){var i,o;return a(this,void 0,void 0,function(){var t,r,n=this;return l(this,function(e){switch(e.label){case 0:if(!this.status.canOpen())return s.log.debug("InAppMessage is already opened. (key=".concat(this.context.inAppMessage.key,")")),[2];e.label=1;case 1:return e.trys.push([1,4,,5]),null!=(o=null==(i=this.ui.inAppMessageListener)?void 0:i.beforeInAppMessageOpen)&&o.call(i,this.context.inAppMessage),this.status.current="OPENING",window.addEventListener(lI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.addEventListener(lI.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE,this.resolveLifecycleEnd),[4,this.scriptLoader.load()];case 2: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),r=this.renderTypeResolver.resolve(this.context),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),renderType:r})];case 3:return e.sent(),t.classList.remove("".concat(lI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleInAppMessageLifecycle("OPEN",function(){var e,t;n.handleEvent({type:"IMPRESSION"}),n.status.current="OPENED",null!=(t=null==(e=n.ui.inAppMessageListener)?void 0:e.afterInAppMessageOpen)&&t.call(e,n.context.inAppMessage)},function(){s.log.warn("Failed to open inAppMessage with [Timeout expired.]"),n.destroy()}),[3,5];case 4:return e.sent(),this.destroy(),[3,5];case 5:return[2]}})})},lI.prototype.close=function(){var e,t,r=this;this.status.canClose()?(null!=(t=null==(e=this.ui.inAppMessageListener)?void 0:e.beforeInAppMessageClose)&&t.call(e,this.context.inAppMessage),this.status.current="CLOSING",this.handleInAppMessageLifecycle("CLOSE",function(){var e,t;r.handleEvent({type:"CLOSE"}),r.destroy(),null!=(t=null==(e=r.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r.context.inAppMessage)},function(){var e,t;s.log.warn("Failed to close inAppMessage with [Timeout expired.]"),r.destroy(),null!=(t=null==(e=r.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r.context.inAppMessage)})):s.log.debug("InAppMessage is already closed. (key=".concat(this.context.inAppMessage.key,")"))},lI.prototype.handleInAppMessageLifecycle=function(e,t,r){var n=this,i=this.lifecycleRegistry.register(e,t);window.dispatchEvent(new CustomEvent(lI.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE,{detail:{type:e,id:i}})),setTimeout(function(){void 0!==n.lifecycleRegistry.getAndRemove(e,i)&&r()},lI.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT)},lI.prototype.destroy=function(){var e;window.removeEventListener(lI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.removeEventListener(lI.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE,this.resolveLifecycleEnd),null!=(e=this.renderer)&&e.destroy(),this.renderer=null,this.removeContainer(),this.ui.currentMessageView=null,this.status.current="CLOSED"},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.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE="hackle-iam-lifecycle-start",lI.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE="hackle-iam-lifecycle-end",lI.CONTAINER_CLASS_NAME="hackle-iam",lI.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT=5e3;var cI=lI;function lI(e,t,r,n,i,o){var s=this;this.scriptLoader=e,this.context=t,this.ui=r,this.renderTypeResolver=n,this.status=i,this.lifecycleRegistry=o,this.container=null,this.renderer=null,this.resolveLifecycleEnd=function(e){var t;e instanceof CustomEvent&&("string"==typeof(t=e).detail.id&&["OPEN","CLOSE"].includes(t.detail.type))&&(e=(t=e.detail).id,t=t.type,null!=(t=s.lifecycleRegistry.getAndRemove(t,e))&&t())},this.handleInAppMessageInteraction=function(e){e instanceof CustomEvent&&e.type===lI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,s.handleInteraction(e))}}fI.prototype.isMobileOS=function(e){e=e.user.hackleProperties.osName;return"string"==typeof e&&Boolean(e.match(this.mobileOSRegex))},fI.prototype.isMobileDeviceType=function(e){e=e.user.hackleProperties.deviceType;return"string"==typeof e&&Boolean(e.match(this.mobileDeviceRegex))},fI.prototype.resolve=function(e){return this.isMobileOS(e)||this.isMobileDeviceType(e)?"mobile":"pc"};var pI=fI;function fI(){this.mobileOSRegex=/(iOS|Android|iPad|iPhone)/g,this.mobileDeviceRegex=/(mobile|phone|tablet)/g}dI.prototype.canOpen=function(){return"OPENED"!==this.current&&"OPENING"!==this.current},dI.prototype.canClose=function(){return"CLOSED"!==this.current&&"CLOSING"!==this.current};var hI=dI;function dI(e){this.current=e=void 0===e?"CLOSED":e}vI.prototype.resolveKey=function(e,t){return"".concat(e,"_").concat(t)},vI.prototype.register=function(e,t){var r=H(),e=this.resolveKey(e,r);return this.record[e]=t,r},vI.prototype.getAndRemove=function(e,t){var e=this.resolveKey(e,t),t=this.record,r=t[e],t=function(e,t){var r={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}(t,["symbol"==typeof e?e:e+""]);return this.record=t,r};var yI=vI;function vI(){this.record={}}mI.create=function(e){return new mI(e)},mI.prototype.create=function(e,t){var r=new pI,n=new hI,i=new yI;switch(e.message.layout.displayType){case"MODAL":case"BANNER":case"BOTTOM_SHEET":return new cI(this.scriptLoader,e,t,r,n,i);case"NONE":return null}};var gI=mI;function mI(e){this.scriptLoader=e}wI.prototype.load=function(){return a(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()]}})})},wI.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},wI.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 EI=wI;function wI(e){this.scriptUrl=e}_I.prototype.isTriggerTarget=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},_I.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=bI.of(e,t,r);return this.targetMatcher.anyMatches(e,iT.create(),n.targets)};var TI=_I;function _I(e){this.targetMatcher=e}OI.of=function(e,t,r){return new OI(new rT("IN_APP_MESSAGE",r.id),e,t.user,t)};var bI=OI;function OI(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}AI.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},AI.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new NI(new RI(i)))}return e.durationCap&&t.push(new NI(new CI(e.durationCap))),t};var II=AI;function AI(e){this.storage=e}SI.prototype.matches=function(e,t){return this.predicate.matches(e,t)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var NI=SI;function SI(e){this.matchCount=0,this.predicate=e}Object.defineProperty(MI.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),MI.prototype.matches=function(e,t){e=e.user.identifiers[this.identifierCap.identifierType];if(u.isNullOrUndefined(e))return!1;t=t.identifiers[this.identifierCap.identifierType];return!u.isNullOrUndefined(t)&&e===t};var RI=MI;function MI(e){this.identifierCap=e}Object.defineProperty(xI.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),xI.prototype.matches=function(e,t){return e.timestamp-t.timestamp<=this.durationCap.durationMillis};var CI=xI;function xI(e){this.durationCap=e}PI.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return u.isNullOrUndefined(e)?[]:JSON.parse(e)},PI.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var UI=PI;function PI(e){this.storage=e}DI.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var kI=DI;function DI(e){this.processors=e}FI.prototype.process=function(e,t,r){this.saveImpression(e.context.inAppMessage,e.context.user,r)},FI.prototype.saveImpression=function(e,t,r){var n=this.impressionStorage.get(e),t={identifiers:t.identifiers,timestamp:r};n.push(t),n.length>FI.IMPRESSION_MAX_SIZE&&n.splice(0,n.length-FI.IMPRESSION_MAX_SIZE),this.impressionStorage.set(e,n)},FI.prototype.supports=function(e){return"IMPRESSION"===e.type},FI.IMPRESSION_MAX_SIZE=100;var LI=FI;function FI(e){this.impressionStorage=e}jI.prototype.process=function(e,t,r){},jI.prototype.supports=function(e){return"CLOSE"===e.type};var VI=jI;function jI(){}HI.prototype.process=function(e,t,r){var n,i,o=this.actionHandlerFactory.get(t.action);!(null==(i=null==(n=e.ui.inAppMessageListener)?void 0:n.onInAppMessageClick)?void 0:i.call(n,e.context.inAppMessage,e,xn.fromAction(t.action)))&&e.status.canClose()&&null!=o&&o.handle(e,t.action)},HI.prototype.supports=function(e){return"ACTION"===e.type};var BI=HI;function HI(e){this.actionHandlerFactory=e}GI.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 zI=GI;function GI(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}JI.prototype.matches=function(e,t,r){return!!S0.isTrackEvent(r)&&(!!this.ruleDeterminer.isTriggerTarget(e,t,r)&&this.frequencyCapDeterminer.isTriggerTarget(e,t,r))};var KI=JI;function JI(e,t){this.ruleDeterminer=e,this.frequencyCapDeterminer=t}WI.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var YI=WI;function WI(e){this.handlers=e}$I.prototype.handle=function(e,t){e.close()},$I.prototype.supports=function(e){return"CLOSE"===e.type};var qI=$I;function $I(){}ZI.prototype.handle=function(e,t){t=this.eventOrNull(t);t&&this.eventHandler.handle(e,t)},ZI.prototype.eventOrNull=function(e){var t=Mn.fromJson(e.action);return t?{type:"ACTION",action:t,area:e.area,buttonText:e.buttonText,imageUrl:e.imageUrl,imageOrder:e.imageOrder}:null},ZI.prototype.supports=function(e){return"ACTION"===e.type};var XI=ZI;function ZI(e){this.eventHandler=e}eA.prototype.handle=function(e,t){t={type:"IMAGE_IMPRESSION",imageUrl:t.imageUrl,imageOrder:t.imageOrder};this.eventHandler.handle(e,t)},eA.prototype.supports=function(e){return"IMAGE_IMPRESSION"===e.type};var QI=eA;function eA(e){this.eventHandler=e}rA.prototype.open=function(e){window.location.href=e.href};var tA=rA;function rA(){}iA.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var nA=iA;function iA(){}sA.prototype.open=function(e){window.open(e.href)};var oA=sA;function sA(){}uA.prototype.open=function(e){window.location.replace(e)};var aA=uA;function uA(){}function cA(e,t,r){return null===e||(!fA(t,lA)||r.current!==r.referrer)&&!fA(e,t)}var lA={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},pA={current:void 0,referrer:void 0},fA=function(t,r){return Object.keys(lA).every(function(e){return t[e]===r[e]})},hA=(dA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},lA),t),n=new Io,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)},dA.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();cA(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},dA.prototype.onSessionEnded=function(e,t,r){},dA.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},dA);function dA(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}vA.prototype.get=function(){var e=this.storage.getItem(it);return e?JSON.parse(e):null},vA.prototype.set=function(e){this.storage.setItem(it,JSON.stringify(e))};var yA=vA;function vA(e){this.storage=e}mA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},mA.prototype.getQueryParams=function(e){for(var t={},r=0,n=this.search.substring(1).split("&");r<n.length;r++){var i=n[r].split("="),o=i[0],i=i[1];e&&!e(o,i)||(i=Vo.tryDecodeURIComponent(i))&&(t[o]=i)}return t};var gA=mA;function mA(e){this.search=e}wA.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},wA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,wA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var EA=wA;function wA(){}_A.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},_A.prototype.params=function(e){e=u.isNotNullOrUndefined(e)?e:this.pageManager.currentPage.queryParameter;return new gA(e).getQueryParams(_A.CAMPAIGN_QUERY_CONDITION)},_A.prototype.resolve=function(e){return{utm_campaign:e[bA],utm_content:e[OA],utm_id:e[IA],utm_medium:e[AA],utm_source:e[NA],utm_term:e[SA],gclid:e[RA],fbclid:e[MA]}},_A.prototype.parseDomain=function(){var t=this;if("undefined"==typeof window)return pA;return{current:EA.extractDomain(this.pageManager.currentPage.hostname),referrer:function(){var e=t.pageManager.currentPage.referrer;if(e)return e=new URL(e).hostname,EA.extractDomain(e)}()}},_A.CAMPAIGN_QUERY_CONDITION=function(e,t){return bi.isNotEmptyString(t)};var TA=_A;function _A(e){this.pageManager=e}var bA="utm_campaign",OA="utm_content",IA="utm_id",AA="utm_medium",NA="utm_source",SA="utm_term",RA="gclid",MA="fbclid",CA=(xA.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},xA.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))}},xA);function xA(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()}PA.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!==h.TRAFFIC_ALLOCATED?null:e};var UA=PA;function PA(e){this.workspaceFetcher=e}var kA={user:void 0,debug:!1,log_disabled:!1,automaticPageTracking:!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.41.0",IAM_RENDERER_VERSION_HEADER:"0.0.9"},DA=(LA.config=function(e){return c(c(c({},kA),e),{automaticPageTracking:LA.resolveAutomaticPageTracking(e)})},LA.resolveAutomaticPageTracking=function(e){return"boolean"!=typeof(null==e?void 0:e.automaticPageTracking)&&"boolean"!=typeof(null==e?void 0:e.auto_track_page_view)?kA.automaticPageTracking:!!e.automaticPageTracking||!!e.auto_track_page_view},LA.logging=function(e){s.initCounter(function(e){return Ti.counter("log",{level:e})}),s.setLogLevel(_e.INFO),e.log_disabled?s.setLogLevel(_e.DISABLE):e.debug&&s.setLogLevel(_e.DEBUG)},LA.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}},LA.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&s.log.debug("support sendBeacon API"),e},LA.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,6e4)},LA.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},LA);function LA(){}VA.prototype.add=function(e){this.synchronizers.push(e)},VA.prototype.sync=function(){return a(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.sync())}))];case 1:return e.sent(),[2]}})})},VA.prototype.close=function(){return a(this,void 0,void 0,function(){var t=this;return l(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.synchronizers.map(function(e){return t.safe(e.close())}))];case 1:return e.sent(),[2]}})})},VA.prototype.safe=function(r){return a(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 FA=VA;function VA(){this.synchronizers=[]}BA.prototype.sync=function(){return a(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]}})})},BA.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()}))},BA.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},BA.prototype.close=function(){return a(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 jA=BA;function BA(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}zA.prototype.schedule=function(e,t){e=new GA(e,t);return e.start(),e},zA.prototype.schedulePeriodically=function(e,t,r){var n;switch(this.scheduleType){case"setTimeout":n=new JA(e,t,r);break;case"setInterval":n=new WA(e,t,r)}return n.start(),n};var HA=zA;function zA(e){this.scheduleType=e}KA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.task()},this.delayMillis)},KA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var GA=KA;function KA(e,t){this.delayMillis=e,this.task=t,this.timeout=null}YA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},YA.prototype.run=function(){var e=this;try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},YA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var JA=YA;function YA(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}qA.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){e.run(),e.interval=setInterval(function(){return e.run()},e.intervalMillis)},this.delayMillis)},qA.prototype.run=function(){try{this.task()}catch(e){s.log.error("Failed to run task: ".concat(e))}},qA.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.interval&&(clearInterval(this.interval),this.interval=null)};var WA=qA;function qA(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null,this.interval=null}XA.prototype.fetchIfModified=function(r){return a(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)]}})})},XA.prototype.createRequest=function(e){var t=Ii.builder().url(this.url).method("GET");return null!==e&&t.addHeader(Ci.IF_MODIFIED_SINCE,e),t.build()},XA.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=zn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ji.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),ji.record("get.workspace",t,null),r;case 4:return[2]}})})},XA.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(Ci.LAST_MODIFIED)}};var $A=XA;function XA(e,t){this.url=e,this.transport=t}QA.prototype.fetch=function(r){return a(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)]}})})},QA.prototype.createRequest=function(e){e={identifiers:Ht(e)},e=Ee.encodeURL(JSON.stringify(e));return Ii.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},QA.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=zn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ji.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),ji.record("get.cohorts",t,null),r;case 4:return[2]}})})},QA.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 iO.fromDto(e)};var ZA=QA;function QA(e,t){this.url=e,this.transport=t}tN.prototype.fetch=function(r){return a(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)]}})})},tN.prototype.createRequest=function(e){e={identifiers:Ht(e)},e=Ee.encodeURL(JSON.stringify(e));return Ii.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},tN.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=zn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ji.record("get.user-targets",t,r),[2,r];case 3:throw r=e.sent(),ji.record("get.user-targets",t,null),r;case 4:return[2]}})})},tN.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 hO.fromDto(e)};var eN=tN;function tN(e,t){this.url=e,this.transport=t}nN.prototype.getExperiments=function(){return Array.from(this.experiments.values())},nN.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},nN.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},nN.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},nN.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},nN.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},nN.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},nN.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},nN.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},nN.prototype.getContainerOrNull=function(e){return this.containers.get(e)},nN.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},nN.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},nN.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},nN.prototype.getAttributes=function(){return this.attributes},nN.from=function(e){var t=e.parameterConfigurations.map(Nt.fromJson),r=f.mapNotNullOrUndefined(e.experiments,function(e){return Mt.fromJson("AB_TEST",e,t)}),n=f.mapNotNullOrUndefined(e.experiments,function(e){return Mt.fromJson("AB_TEST",e,t)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),i=f.mapNotNullOrUndefined(e.featureFlags,function(e){return Mt.fromJson("FEATURE_FLAG",e,t)}),o=e.buckets.map(Pt.fromJson),s=e.events.map(Ft.fromJson),a=f.mapNotNullOrUndefined(e.segments,ir.fromJson),u=e.containers.map(sr.fromJson),c=f.mapNotNullOrUndefined(e.remoteConfigParameters,lr.fromJson),l=f.mapNotNullOrUndefined(e.inAppMessages,jr.fromJson),e=e.workspace.attributes;return new nN(r,n,i,o,s,a,u,t,c,l,e)};var rN=nN;function nN(e,t,r,n,i,o,s,a,u,c,l){this.experiments=f.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=f.associateBy(t,function(e){return e.key}),this.featureFlags=f.associateBy(r,function(e){return e.key}),this.buckets=f.associateBy(n,function(e){return e.id}),this.eventTypes=f.associateBy(i,function(e){return e.key}),this.segments=f.associateBy(o,function(e){return e.key}),this.containers=f.associateBy(s,function(e){return e.id}),this.parameterConfigurations=f.associateBy(a,function(e){return e.id}),this.remoteConfigParameters=f.associateBy(u,function(e){return e.key}),this.inAppMessages=f.associateBy(c,function(e){return e.key}),this.attributes=l}oN.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},oN.prototype.setWorkspace=function(e){try{this.workspace=rN.from(e.config)}catch(e){s.log.error("Failed to set workspace: ".concat(e))}},oN.prototype.get=function(){return this.workspace},oN.prototype.sync=function(){return a(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]}})})},oN.prototype.close=function(){return a(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var iN=oN;function oN(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}aN.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},aN.prototype.dispatchEventsSynchronously=function(r){return a(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]}})})},aN.prototype.dispatchEvents=function(r){return a(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 sN=aN;function aN(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}cN.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},cN.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 Ii.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},cN.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=zn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),ji.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),ji.record("post.events",t,null),r;case 4:return[2]}})})};var uN=cN;function cN(e,t){this.url=e,this.transport=t}pN.prototype.add=function(e){return this.repository.add(e)},pN.prototype.delete=function(e){return this.repository.delete(e)},pN.prototype.flush=function(){return a(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]}})})},pN.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"pageshow":return void this.flush().catch(function(e){return s.log.warn("Failed to flush retry events: ".concat(e))});case"blur":case"focus":case"hidden":case"locationChange":case"pagehide":return}};var lN=pN;function pN(e,t){this.repository=e,this.transport=t}function fN(){this.listeners={}}fN.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},fN.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},fN.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Ne(dN,hN=fN);var hN,ea=dN;function dN(){return null!==hN&&hN.apply(this,arguments)||this}Ne(gN,yN=ea),gN.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},gN.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},gN.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},gN.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=[])},gN.prototype.close=function(){this.flush(!0)};var yN,vN=gN;function gN(e,t,r,n){var i=yN.call(this)||this;return i.eventDispatcher=e,i.eventDispatchMaxSize=t,i.flushScheduler=r,i.flushIntervalMillis=n,i.queue=[],i.flushingJob=null,i}EN.prototype.send=function(e){e=e.toBuilder().addHeader(ze,this.sdk.key).addHeader(Ge,this.sdk.name).addHeader(Ke,this.sdk.version).addHeader(Je,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var mN=EN;function EN(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}TN.intercept=function(e,t){return t instanceof mN?t:new mN(e,Le.instance,t)};var wN=TN;function TN(){}bN.create=function(){return new bN},bN.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 Ri(n.status,n.responseText,function(e){var t=Ci.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 _N=bN;function bN(){}IN.create=function(){return new IN},IN.prototype.send=function(n){var i=this;return new Promise(function(e,t){var r=!1;if(!(r="undefined"!=typeof window?window&&window.navigator&&!!window.navigator.sendBeacon&&!0:r))throw new Error("BeaconTransport not supported.");r=i.createBody(n);if(!window.navigator.sendBeacon(n.url,r))throw Error("Failed to sendBeacon");e(Ri.ok())})},IN.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get(ze),r=(r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault(Ge,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(Ke,"unknown")),e.headers.get(Je));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var ON=IN;function IN(){}NN.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var AN=NN;function NN(e){this.invocationResponseResolver=e}MN.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 SN,RN=MN;function MN(e){this.invocationResponseResolver=e}(yp=SN=SN||{}).prompt="prompt",yp.function="function";xN.prototype.getInvocator=function(e,t){return e===SN.prompt?new AN(t):e===SN.function?new RN(t):null};var CN=xN;function xN(){}PN.prototype.onPageStarted=function(e,t){var r=this.userManager.resolve(),r=this.determiner.determineOrNull(r);r&&(this.core.flush(!0),this.redirector.redirect(r))},PN.prototype.onPageEnded=function(e,t){};var UN=PN;function PN(e,t,r,n){this.determiner=e,this.redirector=t,this.userManager=r,this.core=n}var kN=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.user=n},DN=(LN.prototype.determineOrNull=function(e){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,"A"),new kN(t,o,i,e)}return null},LN);function LN(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}VN.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=jN.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,iT.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,iT.create(),t.includeTargets))};var FN=VN;function VN(e){this.targetMatcher=e}BN.of=function(e,t){return new BN(new rT("SPLIT_URL",H()),t,e)};var jN=BN;function BN(e,t,r){this.key=e,this.user=t,this.workspace=r}zN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var HN=zN;function zN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}KN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(KN.SPLIT_URL_CONFIG_KEY,"")),r=kn.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},KN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},KN.prototype.resolveManualRedirectUrl=function(e,t){e=Vo.tryParse(e);return e?this.decorateCampaign(e,t):null},KN.prototype.decorateCampaign=function(e,t){t=t.user.hackleProperties.queryParameter;if(bi.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];bi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},KN.SPLIT_URL_CONFIG_KEY="redirectUrl";var GN=KN;function KN(e){this.campaignParser=e}YN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return u.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},YN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},YN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var JN=YN;function YN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}qN.prototype.setNeedDispatch=function(e){this.needDispatch=e},qN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(qN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},qN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var WN=qN;function qN(){this.needDispatch=!0}XN.prototype.get=function(){var e=this.storage.getItem(pt);if(u.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}},XN.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(pt,JSON.stringify(e))},XN.prototype.clear=function(){this.storage.removeItem(pt)};var $N=XN;function XN(e,t){this.sdk=e,this.storage=t}var ZN=s.log,QN=(eS.prototype.install=function(e){void 0===e&&(e=null);try{var t=this.changeLifecycle.bind(this);window.addEventListener("pageshow",function(){return t("pageshow")}),window.addEventListener("pagehide",function(){return t("pagehide")}),document.addEventListener("visibilitychange",function(){return t(document.visibilityState)}),window.addEventListener("blur",function(){return t("blur")}),window.addEventListener("focus",function(){return t("focus")}),eS.isSafariBrowser(e)&&window.addEventListener("beforeunload",function(){return t("hidden")}),history.pushState=(n=history.pushState,function(){try{var e=n.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&ZN.error(e)}}),history.replaceState=(r=history.replaceState,function(){try{var e=r.apply(history,arguments);return t("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&ZN.error(e)}}),window.addEventListener("popstate",function(){try{t("locationChange")}catch(e){(e instanceof Error||"string"==typeof e)&&ZN.error(e)}})}catch(e){(e instanceof Error||"string"==typeof e)&&ZN.error(e)}var r,n},eS.prototype.addListener=function(e){this.listeners.push(e)},eS.prototype.initialize=function(){this._initialized=!0,this.changeLifecycle("pageshow")},eS.prototype.changeLifecycle=function(e){this._initialized&&this.publish(e)},eS.prototype.publish=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onLifecycleChanged(t,r)})},eS.isSafariBrowser=function(e){return!u.isNullOrUndefined(e)&&e.toLowerCase().includes("safari")},eS);function eS(e){void 0===e&&(e=Le.instance),this.clock=e,this.listeners=[],this._initialized=!1}rS.create=function(e,t,r){return void 0===r&&(r=Le.instance),new rS(new nS(r,e,t))},rS.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var tS=rS;function rS(e){this.limiter=e}iS.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},iS.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new oS(e+this.intervalMillis,this.limit)),this.currentScope};var nS=iS;function iS(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}sS.prototype.isExpired=function(e){return this.expirationTime<e},sS.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var oS=sS;function sS(e,t){this.expirationTime=e,this.token=t}uS.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var aS=uS;function uS(e){this.determiners=e}cS.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;Me.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache={});var t=this.cacheKey(e),e=this.clock.currentMillis(),r=this.cache[t];return void 0!==r&&e-r<=this.dedupIntervalMillis||(this.cache[t]=e,!1)};Ma=cS;function cS(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}Ne(fS,lS=Ma),fS.prototype.supports=function(e){return S0.isRemoteConfigEvent(e)},fS.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var lS,pS=fS;function fS(e,t){return void 0===t&&(t=Le.instance),lS.call(this,e,t)||this}Ne(yS,hS=Ma),yS.prototype.supports=function(e){return S0.isExposureEvent(e)},yS.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var hS,dS=yS;function yS(e,t){return void 0===t&&(t=Le.instance),hS.call(this,e,t)||this}gS.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},gS.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 vS=gS;function gS(){}ES.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters}}},ES.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var mS=ES;function ES(e){this.invocator=e}var wS=s.log,TS=(_S.prototype.onPageStarted=function(e,t){this.track(e,t)},_S.prototype.onPageEnded=function(e,t){},_S.prototype.track=function(e,t){wS.debug("tracking page view");var r,e={key:_S.PAGE_VIEW_EVENT_KEY,properties:((r={})[_S.PAGE_NAME_PROPERTY_KEY]=e.pageTitle,r)};this.core.track(e,this.userManager.resolve(),t)},_S.PAGE_VIEW_EVENT_KEY="$page_view",_S.PAGE_NAME_PROPERTY_KEY="$page_name",_S);function _S(e,t){this.core=e,this.userManager=t}Object.defineProperty(OS.prototype,"currentPage",{get:function(){var e;return null!=(e=this._currentPage)?e:Co.createWithCurrentPage()},enumerable:!1,configurable:!0}),OS.prototype.updatePage=function(e,t){var r=this._currentPage;r&&e.isEquals(r)||(r&&this.publishEnd(r,t),this._currentPage=e,this.publishStart(e,t))},OS.prototype.publishStart=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageStarted(e,t)},OS.prototype.publishEnd=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageEnded(e,t)},OS.prototype.onLifecycleChanged=function(e,t){switch(e){case"pageshow":case"locationChange":var r=Co.createWithCurrentPage();return this.updatePage(r,t);case"visible":case"pagehide":case"blur":case"focus":case"hidden":return}},OS.prototype.addListener=function(e){this.listeners.push(e)};var bS=OS;function OS(){this.listeners=[],this._currentPage=null}var IS=s.log,AS=(Object.defineProperty(NS.prototype,"lastEngagementTime",{get:function(){return this._lastEngagementTime},enumerable:!1,configurable:!0}),NS.prototype.startEngagement=function(e){IS.debug("startEngagement timestamp:".concat(e,", page:").concat(this.pageManager.currentPage.url)),this._lastEngagementTime=e},NS.prototype.endEngagement=function(e,t){var r;u.isNullOrUndefined(this._lastEngagementTime)||(r=this._lastEngagementTime,(r=(this._lastEngagementTime=t)-r)<this.minimumEngagementDurationMillis||this.publish({page:e,durationMillis:r},this.userManager.resolve(),t))},NS.prototype.publish=function(e,t,r){IS.debug("onEngagement timestamp:".concat(r,", page:").concat(this.pageManager.currentPage.url));for(var n=0,i=this.listeners;n<i.length;n++)i[n].onEngagement(e,t,r)},NS.prototype.onPageStarted=function(e,t){this.startEngagement(t)},NS.prototype.onPageEnded=function(e,t){this.endEngagement(e,t)},NS.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"focus":return this.startEngagement(t);case"pagehide":case"hidden":case"blur":return this.endEngagement(this.pageManager.currentPage,t);case"pageshow":case"locationChange":return}},NS.prototype.addListener=function(e){this.listeners.push(e)},NS);function NS(e,t,r){this.userManager=e,this.pageManager=t,this.minimumEngagementDurationMillis=r,this.listeners=[],this._lastEngagementTime=null}RS.prototype.onEngagement=function(e,t,r){var n,e={key:RS.ENGAGEMENT_EVENT_KEY,properties:((n={})[TS.PAGE_NAME_PROPERTY_KEY]=e.page.pageTitle,n[RS.ENGAGEMENT_TIME_PROPERTY_KEY]=e.durationMillis,n)};this.core.track(e,t,r)},RS.ENGAGEMENT_EVENT_KEY="$engagement",RS.ENGAGEMENT_TIME_PROPERTY_KEY="$engagement_time_ms";var SS=RS;function RS(e){this.core=e}var MS=s.log,CS=null;function xS(e,t){var r,t=DA.config(t);DA.logging(t);try{if((r=window)&&"_hackleApp"in r&&null!==r._hackleApp&&"object"==typeof r._hackleApp&&("getAppSdkKey"in r._hackleApp&&"function"==typeof r._hackleApp.getAppSdkKey&&("getInvocationType"in r._hackleApp&&"function"==typeof r._hackleApp.getInvocationType))&&e===window._hackleApp.getAppSdkKey()){var n=e,i=t,o=window._hackleApp,s=(new CN).getInvocator(o.getInvocationType(),new vS);if(null===s)throw new Error("Failed to get invocator with invocationType:".concat(o.getInvocationType()));if(s=new mS(s),s=new $o(s),!o.getAppMode)return s;if((o=o.getAppMode().toLowerCase())===Wo.native)return s;if(o!==Wo.web_view_wrapper)throw new Error("Unsupported HackleAppMode: ".concat(o));return o=US(n,i),(n=new Zo(o,s)).syncUser(),n}}catch(e){MS.error("Unexpected exception while check WebApp client: ".concat(e))}return US(e,t)}function US(e,t){var r=DA.sdk(e,t);if(CS)return MS.debug("use already exists hackleClient"),CS;var n=new zo,i=(n.initialize(),new OO),o=Bo.getInstance({days:$e,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=DA.isBeaconSupported(),a=wN.intercept(r,_N.create()),u=wN.intercept(r,ON.create()),c=a,l=(s&&(c=u),new FA),p=new jA(l,new HA("setTimeout"),DA.pollingIntervalMillis(t)),f=new $N(r,AO.postfix(i,"_".concat(e.slice(0,8)))),h=new $A(xO.clientFetch(t.sdkUrl,r.key),a),f=new iN(f,h),h=(l.add(f),new bS),d=new eN(xO.userTargets(t.sdkUrl),a),y=new ZA(xO.userCohorts(t.sdkUrl),a),v=new TA(h),g=new gO(AO.postfix(o,"_".concat(e))),m=g.getUser(),E=t.user||null,g=new yO(Ko(),g,d,y,v,h,Le.instance,m,E),d=(l.add(g),new _O(t.sessionTimeoutMillis,AO.postfix(o,"_".concat(e.slice(8))))),y=(g.addListener(d),new tO(i,"".concat(Qe,"_").concat(e),Ye)),E=new uN(xO.clientDispatch(t.eventUrl),a),l=E,s=(s&&(l=new uN(xO.beaconDispatch(t.eventUrl,r.key),u)),new lN(y,E)),r=new sN(E,l,s),u=new aS([new pS(DA.dedupIntervalMillis(t)),new dS(DA.dedupIntervalMillis(t))]),y=new vN(r,Ye,new HA("setTimeout"),qe),E=new B0(y,u,d,g),w=new WN,l=new hT(new SO(o,"".concat(ot,"_").concat(e.slice(0,8)))),r=new hT(new SO(o,"".concat(st,"_").concat(e.slice(0,8)))),u=new PO(AO.prefix(i,"".concat(at,"_").concat(e.slice(0,8),"_"))),i=new UI(AO.prefix(i,"".concat(ut,"_").concat(e.slice(0,8),"_"))),T=Kb.create(f,E,[l,r],u),e=new hA(new yA(AO.postfix(o,"_".concat(e.slice(0,8)))),v,T,g),_=new V0(g,T),_=(d.addListener(e),d.addListener(_),new eI(T)),u=new DO([new FO,new jO(new tA),new HO(new tA),new GO(u,Le.instance),new JO(new nA),new WO(new nA),new $O(new oA),new ZO(new oA)]),u=new kI([new LI(i),new BI(u),new VI]),_=new zI(Le.instance,_,u),u=new YI([new qI,new XI(_),new QI(_)]),b=new EI(xO.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),b=new rI(gI.create(b),_,u),_=new KI(new TI(Ub.get("targetMatcher")),new II(i)),u=new aI(f,_,T),i=(new iI(y,u,b),new UA(f)),_=(new CA(y,i),new AS(g,h,ht)),u=(h.addListener(_),new SS(T)),y=(_.addListener(u),new TS(T,g)),i=(t.automaticPageTracking&&h.addListener(y),new FN(Ub.get("targetMatcher"))),u=new JN(o,ct,{days:lt}),o=new DN(f,i,u,T),f=new HN(new GN(v),new aA,u,w),i=new UN(o,f,g,T),v=(h.addListener(i),new MO(T,g,l,r)),f=(null==(u=t.devTool)?void 0:u.userExplorer)&&"function"==typeof(null==(o=t.devTool)?void 0:o.userExplorer),i=t.devTool&&f?{manager:t.devTool,userExplorer:v}:void 0,l=new Di(xO.monitoring(t.monitoringUrl),a,c,new HA("setTimeout"),We),O=(Ti.addRegistry(l),new QN),r=(O.addListener(h),O.addListener(_),O.addListener(d),O.addListener(n),O.addListener(s),O.addListener(E),O.addListener(l),p.start(),tS.create(ft,1)),I=new Po(T,p,d,g,r,y,b,i),u=(CS=I,(new qb).install(T,g),g.resolve().hackleProperties.browserName);return O.install("string"==typeof u?u:null),o=Date.now(),f=g.currentUser,v=d.currentSessionId,(nO(m,f)?d.startNewSessionIfNeeded(f,o):d.startNewSession(m,f,o))===v&&e.startNewCampaignIfNeeded(f,o),I.onReady(function(){t.autoOpenDevTool&&(t.devTool?I.showUserExplorer():MS.error("DevTool is not provided")),O.initialize(),w.dispatchDoneEventIfNeeded()}),I}var PS=function(e,t){return(PS=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 kS=function(){return(kS=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 DS(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}LS.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},LS.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},LS.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Qs=LS;function LS(){this.listeners={}}VS.arePropertiesEqual=function(e,t){var r=VS.coerceUnknownToProperties(e),n=VS.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]})},VS.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var FS=VS;function VS(){}BS.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)&&FS.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&FS.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var jS=BS;function BS(){}var HS=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=xS(e,kS(kS({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.41.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),r.setInAppMessageListener=r.setInAppMessageListener.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return PS(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(kS(kS({},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){jS.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.prototype.setInAppMessageListener=function(e){this.client.setInAppMessageListener(e)},i}(Qs);var k={exports:{}},w={},zS=Object.getOwnPropertySymbols,GS=Object.prototype.hasOwnProperty,KS=Object.prototype.propertyIsEnumerable;var T=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]))GS.call(r,o)&&(n[o]=r[o]);if(zS)for(var s=zS(r),a=0;a<s.length;a++)KS.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},JS=T,i="function"==typeof Symbol&&Symbol.for,YS=i?Symbol.for("react.element"):60103,WS=i?Symbol.for("react.portal"):60106,Sp=i?Symbol.for("react.fragment"):60107,v=i?Symbol.for("react.strict_mode"):60108,R=i?Symbol.for("react.profiler"):60114,qS=i?Symbol.for("react.provider"):60109,$S=i?Symbol.for("react.context"):60110,XS=i?Symbol.for("react.forward_ref"):60112,ma=i?Symbol.for("react.suspense"):60113,ZS=i?Symbol.for("react.memo"):60115,QS=i?Symbol.for("react.lazy"):60116,eR="function"==typeof Symbol&&Symbol.iterator;function tR(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 rR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nR={};function iR(e,t,r){this.props=e,this.context=t,this.refs=nR,this.updater=r||rR}function oR(){}function sR(e,t,r){this.props=e,this.context=t,this.refs=nR,this.updater=r||rR}iR.prototype.isReactComponent={},iR.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(tR(85));this.updater.enqueueSetState(this,e,t,"setState")},iR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},oR.prototype=iR.prototype;var o=sR.prototype=new oR,aR=(o.constructor=sR,JS(o,iR.prototype),o.isPureReactComponent=!0,{current:null}),uR=Object.prototype.hasOwnProperty,cR={key:!0,ref:!0,__self:!0,__source:!0};function lR(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)uR.call(t,n)&&!cR.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:YS,type:e,key:o,ref:s,props:i,_owner:aR.current}}function pR(e){return"object"==typeof e&&null!==e&&e.$$typeof===YS}var fR=/\/+/g,hR=[];function dR(e,t,r,n){var i;return hR.length?((i=hR.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 yR(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,hR.length<10&&hR.push(e)}function vR(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 YS:case WS:o=!0}}if(o)return n(i,t,""===r?"."+gR(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+gR(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=eR&&t[eR]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+gR(a,s++),n,i);else if("object"===a)throw n=""+t,Error(tR(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function gR(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 mR(e,t){e.func.call(e.context,t,e.count++)}function ER(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?wR(e,n,r,function(e){return e}):null!=e&&(pR(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(fR,"$&/")+"/")+r,e={$$typeof:YS,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function wR(e,t,r,n,i){var o="";vR(e,ER,t=dR(t,o=null!=r?(""+r).replace(fR,"$&/")+"/":o,n,i)),yR(t)}var TR={current:null};function _R(){var e=TR.current;if(null===e)throw Error(tR(321));return e}var bR,OR,IR,Nu={ReactCurrentDispatcher:TR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:aR,IsSomeRendererActing:{current:!1},assign:JS},b=(w.Children={map:function(e,t,r){if(null==e)return e;var n=[];return wR(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;vR(e,mR,t=dR(null,null,t,r)),yR(t)},count:function(e){return vR(e,function(){return null},null)},toArray:function(e){var t=[];return wR(e,t,null,function(e){return e}),t},only:function(e){if(pR(e))return e;throw Error(tR(143))}},w.Component=iR,w.Fragment=Sp,w.Profiler=R,w.PureComponent=sR,w.StrictMode=v,w.Suspense=ma,w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nu,w.cloneElement=function(e,t,r){if(null==e)throw Error(tR(267,e));var n=JS({},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=aR.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)uR.call(t,a)&&!cR.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:YS,type:e.type,key:i,ref:o,props:n,_owner:s}},w.createContext=function(e,t){return(e={$$typeof:$S,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:qS,_context:e},e.Consumer=e},w.createElement=lR,w.createFactory=function(e){var t=lR.bind(null,e);return t.type=e,t},w.createRef=function(){return{current:null}},w.forwardRef=function(e){return{$$typeof:XS,render:e}},w.isValidElement=pR,w.lazy=function(e){return{$$typeof:QS,_ctor:e,_status:-1,_result:null}},w.memo=function(e,t){return{$$typeof:ZS,type:e,compare:void 0===t?null:t}},w.useCallback=function(e,t){return _R().useCallback(e,t)},w.useContext=function(e,t){return _R().useContext(e,t)},w.useDebugValue=function(){},w.useEffect=function(e,t){return _R().useEffect(e,t)},w.useImperativeHandle=function(e,t,r){return _R().useImperativeHandle(e,t,r)},w.useLayoutEffect=function(e,t){return _R().useLayoutEffect(e,t)},w.useMemo=function(e,t){return _R().useMemo(e,t)},w.useReducer=function(e,t,r){return _R().useReducer(e,t,r)},w.useRef=function(e){return _R().useRef(e)},w.useState=function(e){return _R().useState(e)},w.version="16.14.0",{}),Ea=Function.call.bind(Object.prototype.hasOwnProperty),AR=function(){};function NR(e,t,r,n,i){if("production"!==production)for(var o in e)if(IR(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,bR)}catch(e){s=e}!s||s instanceof Error||AR((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 OR)&&(OR[s.message]=!0,o=i?i():"",AR("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(bR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",OR={},IR=Ea,AR=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),NR.resetWarningCache=function(){"production"!==production&&(OR={})},"production"!==production){var SR=T,RR=NR,_="function"==typeof Symbol&&Symbol.for,MR=_?Symbol.for("react.element"):60103,CR=_?Symbol.for("react.portal"):60106,xR=_?Symbol.for("react.fragment"):60107,UR=_?Symbol.for("react.strict_mode"):60108,PR=_?Symbol.for("react.profiler"):60114,kR=_?Symbol.for("react.provider"):60109,DR=_?Symbol.for("react.context"):60110,LR=_?Symbol.for("react.concurrent_mode"):60111,FR=_?Symbol.for("react.forward_ref"):60112,VR=_?Symbol.for("react.suspense"):60113,jR=_?Symbol.for("react.suspense_list"):60120,BR=_?Symbol.for("react.memo"):60115,HR=_?Symbol.for("react.lazy"):60116,zR=_?Symbol.for("react.block"):60121,GR=_?Symbol.for("react.fundamental"):60117,KR=_?Symbol.for("react.responder"):60118,JR=_?Symbol.for("react.scope"):60119,YR="function"==typeof Symbol&&Symbol.iterator,WR="@@iterator";function qR(e){if(null===e||"object"!=typeof e)return null;e=YR&&e[YR]||e[WR];return"function"==typeof e?e:null}var $R={current:null},XR={current:null},ZR=/^(.*)[\\\/]/,QR=1;function eM(e){if(null==e)return null;if("number"==typeof e.tag&&sM("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 xR:return"Fragment";case CR:return"Portal";case PR:return"Profiler";case UR:return"StrictMode";case VR:return"Suspense";case jR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case DR:return"Context.Consumer";case kR:return"Context.Provider";case FR:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case BR:return eM(e.type);case zR:return eM(e.render);case HR:r=(t=e)._status===QR?t._result:null;if(r)return eM(r)}var t,r;return null}var tM={},rM=null;function nM(e){rM=e}tM.getCurrentStack=null,tM.getStackAddendum=function(){var e,t,r,n,i,o="",s=(rM&&(e=eM(rM.type),r=rM._owner,o+=(e=e,t=rM._source,r=r&&eM(r.type),i="",t?(n=(s=t.fileName).replace(ZR,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(ZR))&&(s=s[1])?s.replace(ZR,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),tM.getCurrentStack);return s&&(o+=s()||""),o};var iM={ReactCurrentDispatcher:$R,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:XR,IsSomeRendererActing:{current:!1},assign:SR};function oM(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];aM("warn",e,r)}function sM(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];aM("error",e,r)}function aM(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=iM.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(iM,{ReactDebugCurrentFrame:tM,ReactComponentTreeHook:{}});var uM={};function cM(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;uM[r]||(sM("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),uM[r]=!0)}var lM={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){cM(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){cM(e,"replaceState")},enqueueSetState:function(e,t,r,n){cM(e,"setState")}},pM={};function fM(e,t,r){this.props=e,this.context=t,this.refs=pM,this.updater=r||lM}Object.freeze(pM),fM.prototype.isReactComponent={},fM.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")},fM.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var hM,dM={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(hM in dM)dM.hasOwnProperty(hM)&&!function(e,t){Object.defineProperty(fM.prototype,e,{get:function(){oM("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(hM,dM[hM]);function yM(){}function vM(e,t,r){this.props=e,this.context=t,this.refs=pM,this.updater=r||lM}yM.prototype=fM.prototype,(_=vM.prototype=new yM).constructor=vM,SR(_,fM.prototype),_.isPureReactComponent=!0;var gM,mM,EM=Object.prototype.hasOwnProperty,wM={key:!0,ref:!0,__self:!0,__source:!0};function TM(e){if(EM.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function _M(e){if(EM.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var bM={},OM=function(e,t,r,n,i,o,s){e={$$typeof:MR,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 IM(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in TM(t)&&(s=t.ref,"string"==typeof(c=t).ref&&XR.current&&c.__self&&XR.current.stateNode!==c.__self&&(p=eM(XR.current.type),bM[p]||(sM('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',eM(XR.current.type),c.ref),bM[p]=!0))),_M(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)EM.call(t,n)&&!wM.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),y=0;y<h;y++)d[y]=arguments[y+2];Object.freeze&&Object.freeze(d),i.children=d}if(e&&e.defaultProps){var v=e.defaultProps;for(n in v)void 0===i[n]&&(i[n]=v[n])}function g(){mM||(mM=!0,sM("%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 m(){gM||(gM=!0,sM("%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,m.isReactWarning=!0,Object.defineProperty(p,"key",{get:m,configurable:!0})),s&&(r=i,l=c,g.isReactWarning=!0,Object.defineProperty(r,"ref",{get:g,configurable:!0}))),OM(e,o,s,a,u,XR.current,i)}function AM(e){return"object"==typeof e&&null!==e&&e.$$typeof===MR}var NM=".",SM=":",RM=!1,MM=/\/+/g;function CM(e){return(""+e).replace(MM,"$&/")}var xM=10,UM=[];function PM(e,t,r,n){var i;return UM.length?((i=UM.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 kM(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,UM.length<xM&&UM.push(e)}function DM(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 MR:case CR:a=!0}}if(a)return n(i,t,""===r?NM+LM(t,0):r),1;var u=0,c=""===r?NM:r+SM;if(Array.isArray(t))for(var l=0;l<t.length;l++)u+=e(o=t[l],c+LM(o,l),n,i);else if("function"==typeof(r=qR(t))){r===t.entries&&(RM||oM("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."),RM=!0);for(var p,f=r.call(t),h=0;!(p=f.next()).done;)u+=e(o=p.value,c+LM(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+tM.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 LM(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 FM(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function VM(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)?jM(o,n,r,function(e){return e}):null!=o&&(AM(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":CM(o.key)+"/")+r,o=OM(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function jM(e,t,r,n,i){var o="",t=PM(t,o=null!=r?CM(r)+"/":o,n,i);DM(e,VM,t),kM(t)}function BM(e){return"string"==typeof e||"function"==typeof e||e===xR||e===LR||e===PR||e===UR||e===VR||e===jR||"object"==typeof e&&null!==e&&(e.$$typeof===HR||e.$$typeof===BR||e.$$typeof===kR||e.$$typeof===DR||e.$$typeof===FR||e.$$typeof===GR||e.$$typeof===KR||e.$$typeof===JR||e.$$typeof===zR)}function HM(){var e=$R.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 zM(){if(XR.current){var e=eM(XR.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var GM=!1,KM={};function JM(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=zM())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),KM[t=r]||(KM[t]=!0,r="",e&&e._owner&&e._owner!==XR.current&&(r=" It was passed a child from "+eM(e._owner.type)+"."),nM(e),sM('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),nM(null)))}function YM(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];AM(n)&&JM(n,t)}else if(AM(e))e._store&&(e._store.validated=!0);else if(e){var i=qR(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)AM(o.value)&&JM(o.value,t)}}function WM(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=eM(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==FR&&t.$$typeof!==BR)return;r=t.propTypes}r?(nM(e),RR(r,e.props,"prop",n,tM.getStackAddendum),nM(null)):void 0===t.PropTypes||GM||(GM=!0,sM("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||sM("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qM(e,t,r){var n,i=BM(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+".":"")||zM(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===MR?(s="<"+(eM(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,sM("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)),IM.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)YM(arguments[o],e);if(e===xR){var s=t;nM(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){sM("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&sM("Invalid attribute `ref` supplied to `React.Fragment`."),nM(null)}else WM(t);return t}var $M=!1;try{var XM=Object.freeze({}),ZM=new Map([[XM,null]]),QM=new Set([XM]);ZM.set(0,0),QM.add(0)}catch(e){}function eC(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 TM(t)&&(a=t.ref,l=XR.current),_M(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)EM.call(t,n)&&!wM.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 OM(e.type,s,a,u,c,l,o)}.apply(this,arguments),i=2;i<arguments.length;i++)YM(arguments[i],n.type);return WM(n),n}function tC(e){var t=qM.bind(null,e);return t.type=e,$M||($M=!0,oM("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 oM("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}_=qM,b.Children={map:function(e,t,r){if(null==e)return e;var n=[];return jM(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=PM(null,null,t,r),DM(e,FM,t),kM(t)},count:function(e){return DM(e,function(){return null},null)},toArray:function(e){var t=[];return jM(e,t,null,function(e){return e}),t},only:function(e){if(AM(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},b.Component=fM,b.Fragment=xR,b.Profiler=PR,b.PureComponent=vM,b.StrictMode=UR,b.Suspense=VR,b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iM,b.cloneElement=eC,b.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&sM("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:DR,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:kR,_context:r}),i=!1,t={$$typeof:DR,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,sM("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,sM("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},b.createElement=_,b.createFactory=tC,b.createRef=function(){var e={current:null};return Object.seal(e),e},b.forwardRef=function(e){return null!=e&&e.$$typeof===BR?sM("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?sM("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&sM("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||sM("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:FR,render:e}},b.isValidElement=AM,b.lazy=function(e){var t,r,n={$$typeof:HR,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){sM("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){sM("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},b.memo=function(e,t){return BM(e)||sM("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:BR,type:e,compare:void 0===t?null:t}},b.useCallback=function(e,t){return HM().useCallback(e,t)},b.useContext=function(e,t){var r,n=HM();return void 0!==t&&sM("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?sM("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&&sM("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},b.useDebugValue=function(e,t){return HM().useDebugValue(e,t)},b.useEffect=function(e,t){return HM().useEffect(e,t)},b.useImperativeHandle=function(e,t,r){return HM().useImperativeHandle(e,t,r)},b.useLayoutEffect=function(e,t){return HM().useLayoutEffect(e,t)},b.useMemo=function(e,t){return HM().useMemo(e,t)},b.useReducer=function(e,t,r){return HM().useReducer(e,t,r)},b.useRef=function(e){return HM().useRef(e)},b.useState=function(e){return HM().useState(e)},b.version="16.14.0"}"production"===production?k.exports=w:k.exports=b;var rC=k.exports,nC=k.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),O=nC.Consumer,iC=nC.Provider;var oC=s.log;function sC(e,t){e=aC(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function aC(e,t){void 0===t&&(t="A");var r=k.exports.useContext(nC),n=r.hackle,i=r.userVersion,o=r.initialized,s=k.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||Tt.of(t,h.EXCEPTION):Tt.of(t,h.SDK_NOT_READY)},[t,e,n,o]),r=DS(k.exports.useState(function(){return n?s():(oC.error("HackleClient is not existed"),Tt.of(t,h.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=DS(k.exports.useState(i),2),c=u[0],u=u[1];return lC(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function uC(e){e=cC(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function cC(e){var t=k.exports.useContext(nC),r=t.hackle,n=t.userVersion,i=t.initialized,o=k.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||bt.off(h.EXCEPTION):bt.off(h.SDK_NOT_READY)},[e,r,i]),t=DS(k.exports.useState(function(){return r?o():(oC.error("HackleClient is not existed"),bt.off(h.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=DS(k.exports.useState(n),2),u=a[0],a=a[1];return lC(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function lC(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function pC(e){var t,r=e.experimentKey,e=e.children,n=(r=sC(r)).isLoading,i=r.variation;return n?null:e&&"function"==typeof e?e(i):(k.exports.Children.forEach(e,function(e){k.exports.isValidElement(e)&&(e.props.variation?i===e.props.variation&&(t=e):e.props.default&&(t=e))}),t?k.exports.cloneElement(t,{variation:i}):null)}function fC(e){return e.variation,e=e.children,k.exports.createElement(k.exports.Fragment,null,e)}function hC(e){var t=(r=uC(e.featureKey)).isLoading,r=r.isOn;return t?null:rC.createElement(rC.Fragment,null,e.children(r))}n.Bucket=Pt,n.Cohort=Pn,n.Container=sr,n.ContainerGroup=ur,n.CoreVersion=mr,n.Decision=Tt,n.DecisionReason=h,n.EXPERIMENT_IMPLEMENTATION_TYPE=Rt,n.EmptyHackleRemoteConfig=It,n.EmptyParameterConfig=Ve,n.EventType=Ft,n.Experiment=Mt,n.FeatureFlagDecision=bt,n.HackleContext=nC,n.HackleContextConsumer=O,n.HackleContextProvider=iC,n.HackleExperiment=pC,n.HackleFeature=hC,n.HackleInAppMessageActionImpl=xn,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=DS(k.exports.useState({hackle:t,initialized:!1,userVersion:0}),2),s=o[0],a=o[1];return k.exports.useEffect(function(){null!=r&&t.setUser(r)},[r]),k.exports.useEffect(function(){function e(){a(function(e){return kS(kS({},e),{userVersion:e.userVersion+1})})}return t.on("user-updated",e),function(){t.off("user-updated",e)}},[t]),k.exports.useEffect(function(){t.onInitialized({timeout:n}).then(function(){a(function(e){return kS(kS({},e),{initialized:!0})})},function(){a(function(e){return kS(kS({},e),{initialized:!0})})}).catch(function(){a(function(e){return kS(kS({},e),{initialized:!0})})})},[t]),i||s.initialized?rC.createElement(iC,{value:s},e):null},n.HackleVariation=fC,n.IAM_ACTION_AREA=["BUTTON","IMAGE","MESSAGE","X_BUTTON"],n.IAM_ACTION_TYPE=Lr,n.IAM_BEHAVIOR=Dr,n.IAM_DISPLAY_TYPE=Ur,n.IAM_HORIZONTAL_ALIGNMENT=Vr,n.IAM_LAYOUT_TYPE=Pr,n.IAM_ORIENTATION=kr,n.IAM_PLATFORM_TYPE=Cr,n.IAM_STATUS=Mr,n.IAM_TIMEUNIT=xr,n.IAM_VERTICAL_ALIGNMENT=Fr,n.IdentifierType=jt,n.IdentifiersBuilder=zt,n.InAppMessage=jr,n.InAppMessageAction=Mn,n.InAppMessageAlignment=hn,n.InAppMessageBackground=Rn,n.InAppMessageButton=On,n.InAppMessageButtonStyle=Sn,n.InAppMessageContext=sn,n.InAppMessageContextLayout=pn,n.InAppMessageContextMessage=cn,n.InAppMessageDecision=Et,n.InAppMessageDurationCap=Qr,n.InAppMessageEventFrequencyCap=qr,n.InAppMessageEventTrigger=Jr,n.InAppMessageEventTriggerRule=Yr,n.InAppMessageExperimentContext=un,n.InAppMessageIdentifierCap=Xr,n.InAppMessageImage=yn,n.InAppMessageImageAutoScroll=gn,n.InAppMessagePeriodAlways=Hr,n.InAppMessagePeriodCustom=Gr,n.InAppMessagePositionalButton=An,n.InAppMessageTargetContext=tn,n.InAppMessageText=En,n.InAppMessageTextAttribute=Tn,n.InAppMessageTextStyle=bn,n.InAppMessageUserOverride=nn,n.Logger=s,n.MATCH_OPERATORS=Or,n.MATCH_TYPES=_r,n.MATCH_VALUE_TYPES=br,n.MetaVersion=wr,n.ParameterConfiguration=Nt,n.PropertyOperations=No,n.PropertyOperationsBuilder=Io,n.RemoteConfigDecision=gt,n.RemoteConfigParameter=lr,n.RemoteConfigParameterValue=dr,n.RemoteConfigTargetRule=fr,n.SEGMENT_TYPES=Nr,n.Segment=ir,n.Slot=Dt,n.SplitUrlConfig=kn,n.SplitUrlTargets=Ln,n.TARGET_ACTION_TYPES=Ir,n.TARGET_KEY_TYPES=Ar,n.Target=Jt,n.TargetAction=er,n.TargetCondition=Wt,n.TargetKey=$t,n.TargetMatch=Zt,n.TargetRule=rr,n.TargetingType=Sr,n.UserTargetEvent=Vn,n.Variation=xt,n.Version=vr,n.createInstance=function(e,t){return new HS(e,t)},n.getUserId=Ko,n.removeUserId=Jo,n.resolveIdentifiers=Ht,n.sanitizeUser=Kt,n.setUserId=function(e){Bo.getInstance().setItem(Ze,e)},n.useFeature=function(e){var t=(n=k.exports.useContext(nC)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.isFeatureOn(e))||!1},[e,t,n]),o=(s=DS(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&oC.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=DS(k.exports.useState(r),2))[0],n=n[1];return lC(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=k.exports.useContext(nC)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||bt.off(h.EXCEPTION)},[e,t,n]),o=(s=DS(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&oC.error("HackleClient is not existed"),bt.off(h.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=DS(k.exports.useState(r),2))[0],n=n[1];return lC(a,r)||(n(r),s(i())),o},n.useLoadableFeature=uC,n.useLoadableFeatureDetail=cC,n.useLoadableRemoteConfig=function(){var e=(o=k.exports.useContext(nC)).hackle,t=o.userVersion,r=o.initialized,n=k.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new It},[e,r]),i=(o=DS(k.exports.useState(function(){return e||oC.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=DS(k.exports.useState(t),2))[0],a=a[1];return lC(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=sC,n.useLoadableVariationDetail=aC,n.useRemoteConfig=function(){var e=(r=k.exports.useContext(nC)).hackle,t=r.userVersion,r=r.initialized,n=k.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new It},[e,r]),i=(o=DS(k.exports.useState(function(){return e||oC.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=DS(k.exports.useState(t),2))[0],r=r[1];return lC(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=k.exports.useContext(nC).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(oC.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=k.exports.useContext(nC)).hackle,n=a.userVersion,i=a.initialized,o=k.exports.useCallback(function(){return i&&(null==r?void 0:r.variation(e))||t},[t,e,r,i]),s=(a=DS(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&oC.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=DS(k.exports.useState(n),2))[0],c=c[1];return lC(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=k.exports.useContext(nC)).hackle,n=i.userVersion,i=i.initialized,o=k.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||Tt.of(t,h.EXCEPTION)},[t,e,r,i]),s=(a=DS(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&oC.error("HackleClient is not existed"),Tt.of(t,h.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=DS(k.exports.useState(n),2))[0],i=i[1];return lC(u,n)||(i(n),a(o())),s},Object.defineProperty(n,"__esModule",{value:!0})});
|