@hackler/react-sdk 11.50.0 → 11.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).hackleReactSDK={})}(this,function(n){"use strict";var D,L=new Uint8Array(16);var F=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var 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 K(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",H="function"==typeof atob,t="function"==typeof btoa,G="function"==typeof Buffer;const z="function"==typeof TextDecoder?new TextDecoder:void 0,J="function"==typeof TextEncoder?new TextEncoder:void 0;const q=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Y=(e=>{let r={};return e.forEach((e,t)=>r[e]=t),r})(q),W=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,$=String.fromCharCode.bind(String),X="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Z=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Q=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");var ee=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+=q[r>>18&63]+q[r>>12&63]+q[r>>6&63]+q[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const te=t?e=>btoa(e):G?e=>Buffer.from(e,"binary").toString("base64"):ee,re=G?e=>Buffer.from(e).toString("base64"):r=>{let n=[];for(let e=0,t=r.length;e<t;e+=4096)n.push($.apply(null,r.subarray(e,e+4096)));return te(n.join(""))},ne=(e,t=!1)=>t?Z(re(e)):re(e),ie=e=>{var t;return e.length<2?(t=e.charCodeAt(0))<128?e:t<2048?$(192|t>>>6)+$(128|63&t):$(224|t>>>12&15)+$(128|t>>>6&63)+$(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),$(240|t>>>18&7)+$(128|t>>>12&63)+$(128|t>>>6&63)+$(128|63&t))},oe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,se=e=>e.replace(oe,ie),ae=G?e=>Buffer.from(e,"utf8").toString("base64"):J?e=>re(J.encode(e)):e=>te(se(e)),ue=(e,t=!1)=>t?Z(ae(e)):ae(e);t=e=>ue(e,!0);const ce=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,pe=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return $(55296+(t>>>10))+$(56320+(1023&t));case 3:return $((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return $((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},le=e=>e.replace(ce,pe);var r=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?$(r>>16&255):64===o?$(r>>16&255,r>>8&255):$(r>>16&255,r>>8&255,255&r);return n};const fe=H?e=>atob(Q(e)):G?e=>Buffer.from(e,"base64").toString("binary"):r,he=G?e=>X(Buffer.from(e,"base64")):e=>X(fe(e).split("").map(e=>e.charCodeAt(0))),de=e=>he(ve(e)),ye=G?e=>Buffer.from(e,"base64").toString("utf8"):z?e=>z.decode(he(e)):e=>le(fe(e)),ve=e=>Q(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ge=e=>ye(ve(e));function me(){var e=(e,t)=>Object.defineProperty(String.prototype,e,we(t));e("fromBase64",function(){return ge(this)}),e("toBase64",function(e){return ue(this,e)}),e("toBase64URI",function(){return ue(this,!0)}),e("toBase64URL",function(){return ue(this,!0)}),e("toUint8Array",function(){return de(this)})}function Ee(){var e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,we(t));e("toBase64",function(e){return ne(this,e)}),e("toBase64URI",function(){return ne(this,!0)}),e("toBase64URL",function(){return ne(this,!0)})}const we=e=>({value:e,enumerable:!1,writable:!0,configurable:!0});const be={version:e,VERSION:"3.7.5",atob:fe,atobPolyfill:r,btoa:te,btoaPolyfill:ee,fromBase64:ge,toBase64:ue,encode:ue,encodeURI:t,encodeURL:t,utob:se,btou:le,decode:ge,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:ne,toUint8Array:de,extendString:me,extendUint8Array:Ee,extendBuiltins:()=>{me(),Ee()}};Te.isNotNullOrUndefined=function(e){return null!=e},Te.isNullOrUndefined=function(e){return null==e},Te.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},Te.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var u=Te;function Te(){}_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 Ie={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},a=(Ae.setLogLevel=function(e){this.logLevel=e=void 0===e?Ie.INFO:e},Ae.initCounter=function(t){this.counters=f.associate(Object.keys(Ie),function(e){return[e,t(e)]})},Ae._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){}},Ae.increment=function(e){var t;null!=(t=null==(t=Ae.counters)?void 0:t.get(e))&&t.increment()},Ae.logLevel=Ie.INFO,Ae.log={error:function(e){Ie.ERROR<=Ae.logLevel&&(Ae._log("ERROR",e),Ae.increment("ERROR"))},warn:function(e){Ie.WARN<=Ae.logLevel&&(Ae._log("WARN",e),Ae.increment("WARN"))},info:function(e){Ie.INFO<=Ae.logLevel&&(Ae._log("INFO",e),Ae.increment("INFO"))},debug:function(e){Ie.DEBUG<=Ae.logLevel&&(Ae._log("DEBUG",e),Ae.increment("DEBUG"))}},Ae);function Ae(){}Ne.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Oe=Ne;function Ne(){}var Se=function(e,t){return(Se=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 i(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}Se(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 p(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 Pe(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 Me=a.log,Re=(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)?Me.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Me.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=a.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){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},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={}}He.prototype.get=function(e,t){e=this.parameters[e];return!u.isNullOrUndefined(e)&&(u.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var Ke=He;function He(e){this.parameters=e}var Ge="X-HACKLE-SDK-KEY",ze="X-HACKLE-SDK-NAME",Je="X-HACKLE-SDK-VERSION",qe="X-HACKLE-SDK-TIME",Ye=100,We=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,yt="hackle-campaign-delay",vt=a.log;function gt(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 mt(e,t){if(!u.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=gt(e,i[n]);if(u.isNullOrUndefined(o))return;r.push(o)}return r}}wt.of=function(e,t){return new wt(e,t)};var Et=wt;function wt(e,t){this.value=e,this.reason=t}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 bt=Tt;function Tt(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}It.on=function(e,t,r){return new It(!0,e,t=void 0===t?new je:t,r=void 0===r?void 0:r)},It.off=function(e,t,r){return new It(!1,e,t=void 0===t?new je:t,r=void 0===r?void 0:r)},Object.defineProperty(It.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),It.prototype.get=function(e,t){return this.config.get(e,t)};var _t=It;function It(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}Ot.prototype.get=function(e,t){return t};var At=Ot;function Ot(){}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 Ke(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}s.SDK_NOT_READY="SDK_NOT_READY",s.EXCEPTION="EXCEPTION",s.INVALID_INPUT="INVALID_INPUT",s.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",s.TYPE_MISMATCH="TYPE_MISMATCH",s.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",s.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",s.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",s.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",s.OVERRIDDEN="OVERRIDDEN",s.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",s.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",s.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",s.VARIATION_DROPPED="VARIATION_DROPPED",s.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",s.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",s.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",s.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",s.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",s.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",s.TARGET_RULE_MATCH="TARGET_RULE_MATCH",s.DEFAULT_RULE="DEFAULT_RULE",s.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",s.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",s.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",s.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",s.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",s.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",s.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",s.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET",s.IN_APP_MESSAGE_FREQUENCY_CAPPED="IN_APP_MESSAGE_FREQUENCY_CAPPED",s.EXPERIMENT_CONTROL_GROUP="EXPERIMENT_CONTROL_GROUP";var h=s;function s(){}var Pt=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],Mt=(Rt.fromJson=function(e,t,r){var n=Rt.experimentStatusOrNull(t.execution.status),i=t.variations.map(function(t){return new Ct(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=Hn.fromJson(t.execution.targetUrls),c=gt(Pt,t.implementationType),p=f.mapNotNullOrUndefined(t.execution.targetRules,function(e){return rr.fromJson(e,Sr.PROPERTY)}),l=er.fromJson(t.execution.defaultRule);return n&&c&&l&&new Rt(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)},Rt.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,"]"))}},Rt.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},Rt.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},Rt.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},Rt);function Rt(e,t,r,n,i,o,s,a,u,c,p,l,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=p,this.splitUrlTargets=l,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=y,this.winnerVariationId=v}Object.defineProperty(xt.prototype,"parameters",{get:function(){var e;return null!=(e=null==(e=this.config)?void 0:e.parameters)?e:{}},enumerable:!1,configurable:!0});var Ct=xt;function xt(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 Ut=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 Kt(e){var t=new Ht;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=Re.sanitizeValue(t);return Re.isValidType(e)&&r?this.identifiers[e]=t:vt.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},Gt.prototype.build=function(){return this.identifiers};var Ht=Gt;function Gt(){this.identifiers={}}function zt(e){var t,r={};return r.id=null!=(t=Re.sanitizeValue(e.id))?t:void 0,r.userId=null!=(t=Re.sanitizeValue(e.userId))?t:void 0,r.deviceId=null!=(t=Re.sanitizeValue(e.deviceId))?t:void 0,"object"==typeof e.properties&&(r.properties=Ue.sanitize(e.properties)),"object"==typeof e.identifiers&&(r.identifiers=Re.sanitize(e.identifiers)),t=r,Boolean(t.id||t.userId||t.deviceId||t.identifiers&&0<Object.keys(t.identifiers).length)?r:null}qt.fromJson=function(e,t){return new qt(f.mapNotNullOrUndefined(e.conditions,function(e){return Yt.fromJson(e,t)}))},qt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var Jt=qt;function qt(e){this.conditions=e}Wt.fromJson=function(e,t){var r=$t.fromJson(e.key);if(r&&t.supports(r.type))return(t=Zt.fromJson(e.match))&&new Wt(r,t)},Wt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var Yt=Wt;function Wt(e,t){this.key=e,this.match=t}Xt.fromJson=function(e){var t=gt(Or,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=gt(Tr,e.type),r=gt(Ir,e.operator),n=gt(_r,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=gt(Ar,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=gt(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}lr.fromJson=function(e){var t=gt(_r,e.type),r=f.mapNotNullOrUndefined(e.targetRules,function(e){return fr.fromJson(e,Sr.PROPERTY)}),n=dr.fromJson(e.defaultValue);return t&&new lr(e.id,e.key,t,e.identifierType,r,n)};var pr=lr;function lr(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}br.parse=function(e){return e?new br(e.split(".")):br.EMPTY},br.prototype.isEmpty=function(){return 0===this.identifiers.length},br.prototype.isNotEmpty=function(){return!this.isEmpty()},br.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},br.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=br.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},br.compareIdentifiers=function(e,t){return br.numericIdentifierRegExp.test(e)&&br.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},br.EMPTY=new br([]),br.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var wr=br;function br(e){this.identifiers=e}var Tr=["MATCH","NOT_MATCH"],_r=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],Ir=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE","EXISTS"],Ar=["VARIATION","BUCKET"],Or=["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=(Pr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},Pr.IDENTIFIER=new Pr("SEGMENT"),Pr.PROPERTY=new Pr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Pr.SEGMENT=new Pr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Pr);function Pr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var Mr=["ACTIVE","DRAFT","PAUSE"],Rr=["WEB","ANDROID","IOS"],Cr=["IMMEDIATE","CUSTOM"],xr=["MODAL","BANNER","BOTTOM_SHEET","NONE"],Ur=["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=gt(Mr,e.status);if(!u.isNullOrUndefined(r)){switch(gt(Cr,e.timeUnit)){case"IMMEDIATE":t=new Kr;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,s,a=sn.fromJson(e.messageContext);if(!u.isNullOrUndefined(a))return n=e.eventTriggerRules.map(qr.fromJson),i=Wr.fromJson(e.eventFrequencyCap),o=null!=(o=e.eventTriggerDelay&&Dn.fromJson(e.eventTriggerDelay))?o:Dn.immediate(),s=Cn.fromJson(null!=(s=e.evaluateContext)?s:{atDeliverTime:!1}),new Br(e.id,e.key,r,t,new Jr(n,i,o),tn.fromJson(e.targetContext),a,s)}},Br.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},Br.prototype.toString=function(){return"InAppMessage(id=".concat(this.id,", key=").concat(this.key,", status=").concat(this.status,")")},Br);function Br(e,t,r,n,i,o,s,a){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s,this.evaluateContext=a}Hr.prototype.within=function(e){return!0};var Kr=Hr;function Hr(){this.type="IMMEDIATE"}zr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var Gr=zr;function zr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var Jr=function(e,t,r){this.rules=e,this.frequencyCap=t,this.delay=r},qr=(Yr.fromJson=function(e){return new Yr(e.eventKey,f.mapNotNullOrUndefined(e.targets,function(e){return Jt.fromJson(e,Sr.PROPERTY)}))},Yr);function Yr(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 Wr=$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=gt(De,e.durationUnit.timeUnit);return t?new en(Le.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)),mt(Rr,e.platformTypes));if(!u.isNullOrUndefined(r)){var n=mt(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=(pn.fromJson=function(e){var t=ln.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,In.fromJson);if(!u.isNullOrUndefined(i)){var o=void 0;if(!u.isNotNullOrUndefined(e.closeButton)||(o=In.fromJson2(e.closeButton),!u.isNullOrUndefined(o))){var s=f.mapOrUndefined(e.outerButtons,On.fromJson),a=f.mapOrUndefined(e.innerButtons,On.fromJson);if(!u.isNullOrUndefined(s)&&!u.isNullOrUndefined(a))return new pn(e.variationKey,e.lang,t,r,n,e.text?En.fromJson(e.text):void 0,i,o,new Pn(e.background.color),e.action?Mn.fromJson(e.action):void 0,s,a)}}}}}},pn.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()})}},pn);function pn(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}fn.fromJson=function(e){var t=gt(Ur,e.layoutType),r=gt(xr,e.displayType);if(!u.isNullOrUndefined(r)&&!u.isNullOrUndefined(t))return new fn(r,t,e.alignment?hn.fromJson(e.alignment):void 0)};var ln=fn;function fn(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}dn.fromJson=function(e){var t=gt(Vr,e.horizontal);if(!u.isNullOrUndefined(t)){e=gt(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=gt(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=gt(De,e.interval.timeUnit);if(t)return new mn(Le.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(bn.fromJson(e.title),bn.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}Tn.fromJson=function(e){return new Tn(e.text,new _n(e.style.textColor))};var bn=Tn;function Tn(e,t){this.text=e,this.style=t}var _n=function(e){this.color=e},In=(An.fromJson=function(e){var t=Mn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new An(e.text,new Sn(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},An.fromJson2=function(e){var t=Mn.fromJson(e.action);if(!u.isNullOrUndefined(t))return new An("✕",new Sn(e.style.color,"#FFFFFF","#FFFFFF"),t)},An.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},An.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},An);function An(e,t,r){this.text=e,this.style=t,this.action=r}Nn.fromJson=function(e){var t=In.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 On=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},Pn=function(e){this.color=e},Mn=(Rn.fromJson=function(e){var t=gt(Dr,e.behavior);if(!u.isNullOrUndefined(t)){var r=gt(Lr,e.type);if(!u.isNullOrUndefined(r))return new Rn(t,r,null!=(t=e.value)?t:void 0)}},Rn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Rn);function Rn(e,t,r){this.behavior=e,this.type=t,this.value=r}xn.fromJson=function(e){return new xn(e.atDeliverTime)};var Cn=xn;function xn(e){this.atDeliverTime=e}kn.fromJson=function(e){var t=gt(De,e.duration.timeUnit);return u.isNullOrUndefined(t)?null:new kn(Le.converter[t](e.duration.amount,"milliseconds"))};var Un=kn;function kn(e){this.durationMillis=e}Ln.fromJson=function(e){var t=e.afterCondition&&Un.fromJson(e.afterCondition);return new Ln(e.type,t)},Ln.immediate=function(){return new Ln("IMMEDIATE",null)},Ln.prototype.deliverAt=function(e){var t=this.type;switch(t){case"IMMEDIATE":return e;case"AFTER":if(null===this.afterCondition)throw new Error("AfterCondition is required for AFTER delay type");return e+this.afterCondition.durationMillis;default:throw new Error("Unsupported delay type: ".concat(t))}};var Dn=Ln;function Ln(e,t){this.type=e,this.afterCondition=t}Vn.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 Vn(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)},Vn.fromInteraction=function(e){return"CLOSE"===e.type?new Vn(e.type,{hideDurationMillis:null}):Vn.fromJson(e.action)},Vn.fromAction=function(e){return Vn.fromJson(e.toJson())},Vn.linkActionTypes=["LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE","WEB_LINK"],Vn.closeActionTypes=["CLOSE","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW_AND_CLOSE"],Vn.tabTargetActionsTypes=["LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE"],Vn.windowTargetActionsTypes=["LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"];var Fn=Vn;function Vn(e,t,r){this.type=e,this.close=t,this.link=r}var jn=function(e){this.id=e},Bn=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Kn.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new Kn(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},Kn);function Kn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}Gn.fromJson=function(e){if(null!==e)return new Gn(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 Hn=Gn;function Gn(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 zn=Jn;function Jn(e,t,r){this.eventKey=e,this.property=t,this.stats=r}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.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})};var qn=Yn;function Yn(e){this.name=e,this._tags={},this.name=e}$n.start=function(e){return new $n(e=void 0===e?$n.defaultClock:e)},$n.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},$n.defaultClock=new Fe;var Wn=$n;function $n(e){this._clock=e,this.startTime=this._clock.tick()}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.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var Xn=Zn;function Zn(e){this.name=e,this._tags={}}ei.prototype.values=function(){return Array.from(this.data.values())},ei.prototype.keys=function(){return Array.from(this.data.keys())},ei.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},ei.prototype.has=function(e){return void 0!==this.get(e)},ei.prototype.add=function(e,t){t=(t=t)||e;return this.data.set(e,t),this},ei.prototype.delete=function(e){var t;if(this.has(e))return t=this.get(e),this.data.delete(e),t},ei.prototype.forEach=function(e){this.data.forEach(e)},ei.prototype.filter=function(e){for(var t=new ei(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},ei.prototype.entries=function(){return Array.from(this.data.entries())};var Qn=ei;function ei(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(ri.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var ti=ri;function ri(e,t){this.valueSupplier=t,this.field=e}function ni(e,t){return e.name===t.name&&Re.isEquals(e.tags,t.tags)}Object.defineProperty(ii.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),ii.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},ii.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},ii.prototype.counter=function(e,t){return void 0===t&&(t={}),new Xn(e).tags(t).register(this)},ii.prototype.timer=function(e,t){return void 0===t&&(t={}),new qn(e).tags(t).register(this)},ii.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},ii.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},ii.prototype.close=function(){};H=ii;function ii(){this.id=K(),this.name="MetricRegistry",this._metrics=new Qn(ni)}i(si,oi=H),si.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),a.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},si.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),a.log.debug("PushMetricRegistry stopped.")},si.prototype.close=function(){this.stop()};var oi,G=si;function si(e,t){var r=oi.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}ui.prototype.count=function(){return this.counterValue},ui.prototype.increment=function(e){this.counterValue+=null!=e?e:1},ui.prototype.measure=function(){return[new ti("count",this.count.bind(this))]};var ai=ui;function ui(e){this.counterValue=0,this.id=e}pi.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new ai(this.id),e},pi.prototype.count=function(){return this.currentCounter.count()},pi.prototype.increment=function(e){this.currentCounter.increment(e)},pi.prototype.measure=function(){return[new ti("count",this.count.bind(this))]};var ci=pi;function pi(e){this.id=e,this.currentCounter=new ai(e)}fi.prototype.count=function(){return this._count},fi.prototype.totalTime=function(e){return Le.nanosToUnit(this._total,e)},fi.prototype.max=function(e){return Le.nanosToUnit(this._max,e)},fi.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},fi.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))},fi.prototype.measure=function(){var e=this;return[new ti("count",this.count.bind(this)),new ti("total",function(){return e.totalTime("milliseconds")}),new ti("max",function(){return e.max("milliseconds")}),new ti("mean",function(){return e.mean("milliseconds")})]};var li=fi;function fi(e){this._count=0,this._total=0,this._max=0,this.id=e}di.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new li(this.id),e},di.prototype.count=function(){return this.currentTimer.count()},di.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},di.prototype.max=function(e){return this.currentTimer.max(e)},di.prototype.record=function(e,t){this.currentTimer.record(e,t)},di.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},di.prototype.measure=function(){var e=this;return[new ti("count",this.count.bind(this)),new ti("total",function(){return e.totalTime("milliseconds")}),new ti("max",function(){return e.max("milliseconds")}),new ti("mean",function(){return e.mean("milliseconds")})]};var hi=di;function di(e){this.id=e,this.currentTimer=new li(e)}i(vi,yi=G),vi.prototype.createCounter=function(e){return new ci(e)},vi.prototype.createTimer=function(e){return new hi(e)},vi.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 yi,e=vi;function vi(e,t){return yi.call(this,e,t)||this}mi.prototype.count=function(){return 0},mi.prototype.increment=function(e){},mi.prototype.measure=function(){return[new ti("count",this.count.bind(this))]};var gi=mi;function mi(e){this.id=e}Object.defineProperty(wi.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),wi.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},wi.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},wi.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},wi.prototype.measure=function(){return[new ti("count",this.count.bind(this))]};var Ei=wi;function wi(e){this._counters=new Qn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new gi(e)}Ti.prototype.measure=function(){var e=this;return[new ti("count",this.count.bind(this)),new ti("total",function(){return e.totalTime("milliseconds")}),new ti("max",function(){return e.max("milliseconds")}),new ti("mean",function(){return e.mean("milliseconds")})]},Ti.prototype.count=function(){return 0},Ti.prototype.totalTime=function(e){return 0},Ti.prototype.max=function(e){return 0},Ti.prototype.mean=function(e){return 0},Ti.prototype.record=function(e,t){};var bi=Ti;function Ti(e){this.id=e}Object.defineProperty(Ii.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),Ii.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},Ii.prototype.max=function(e){return this.firstTimer.max(e)},Ii.prototype.mean=function(e){return this.firstTimer.mean(e)},Ii.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(Ii.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),Ii.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},Ii.prototype.count=function(){return this.firstTimer.count()},Ii.prototype.measure=function(){var e=this;return[new ti("count",this.count.bind(this)),new ti("total",function(){return e.totalTime("milliseconds")}),new ti("max",function(){return e.max("milliseconds")}),new ti("mean",function(){return e.mean("milliseconds")})]};var _i=Ii;function Ii(e){this._timers=new Qn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new bi(e)}i(Oi,Ai=H),Oi.prototype.createCounter=function(e){e=new Ei(e);return this.addRegistry(e),e},Oi.prototype.createTimer=function(e){e=new _i(e);return this.addRegistry(e),e},Oi.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},Oi.prototype.add=function(r){r instanceof Oi||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)}))},Oi.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var Ai,r=Oi;function Oi(){var e=null!==Ai&&Ai.apply(this,arguments)||this;return e.registries=new Qn(function(e,t){return e.id===t.id}),e}Si.counter=function(e,t){return Si.globalRegistry.counter(e,t)},Si.timer=function(e,t){return Si.globalRegistry.timer(e,t)},Si.addRegistry=function(e){Si.globalRegistry.add(e),a.log.debug("MetricRegistry added ".concat(e.name))},Si.globalRegistry=new r;var Ni=Si;function Si(){}Mi.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},Mi.isNotEmptyString=function(e){return!u.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var Pi=Mi;function Mi(){}Ci.builder=function(){return new xi},Ci.get=function(e){return Ci.builder().url(e).build()},Ci.prototype.toBuilder=function(){return new xi(this)};var Ri=Ci;function Ci(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}Ui.prototype.url=function(e){return this._url=e,this},Ui.prototype.method=function(e){return this._method=e,this},Ui.prototype.body=function(e){return this._body=e,this},Ui.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},Ui.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},Ui.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new Ri(this._url,this._method,this._body,this._headers.build(),e)};var xi=Ui;function Ui(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:Li.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}Di.ok=function(e,t){return Di.of(200,e,t)},Di.of=function(e,t,r){return new Di(e,null!=t?t:null,null!=r?r:Li.empty())},Di.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},Di.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},Di.prototype.isNotModified=function(){return 304===this.statusCode};var ki=Di;function Di(e,t,r){this.statusCode=e,this.body=t,this.headers=r}Fi.empty=function(){return new Fi(new Map)},Fi.builder=function(){return new Vi(new Map)},Fi.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(Pi.equalsIgnoreCase(i,e))return n}return null},Fi.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Fi.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},{})},Fi.prototype.toBuilder=function(){return new Vi(this.headers)},Fi.IF_MODIFIED_SINCE="If-Modified-Since",Fi.LAST_MODIFIED="Last-Modified",Fi.ACCEPT_ENCODING="Accept-Encoding";var Li=Fi;function Fi(e){this.headers=e}ji.prototype.add=function(e,t){return this.headers.set(e,t),this},ji.prototype.build=function(){return new Li(this.headers)};var Vi=ji;function ji(e){this.headers=e}i(Hi,Bi=e),Hi.prototype.flushMetrics=function(e,t){var r=this;f.chunked(e.filter(this.isDispatchTarget.bind(this)),Ye).forEach(function(e){r.dispatch(e,t)})},Hi.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Hi.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return a.log.debug("Failed to flushing metrics: ".concat(e))})},Hi.prototype.createRequest=function(e){return Ri.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Hi.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Hi.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]}))}})}},Hi.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 Bi,Ki=Hi;function Hi(e,t,r,n,i){n=Bi.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}zi.experiment=function(e,t,r){t=Ni.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},zi.featureFlag=function(e,t,r){t=Ni.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},zi.remoteConfig=function(e,t,r){t=Ni.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)};var Gi=zi;function zi(){}qi.record=function(e,t,r){e=Ni.timer("api.call",{operation:e,success:qi.success(r)});t.stop(e)},qi.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var Ji=qi;function qi(){}Wi.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)}},Wi.decision=function(e,t,r,n,i){return u.isNullOrUndefined(t)?Et.of(n,h.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Yi=Wi;function Wi(){}var $i=a.log,Xi=(Zi.prototype.get=function(t,r){var n,e=Wn.start();try{n=this.decide(t,r)}catch(e){$i.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=Et.of(r,h.EXCEPTION)}return Gi.remoteConfig(e,t,n),n.value},Zi.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Yi.decide(this.core,e,t,r)},Zi);function Zi(e,t,r){this.core=e,this.userManager=t,this.user=r}to.prototype.contains=function(e){return this._properties.has(e)},to.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},to.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)},to.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},to.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},to.prototype.build=function(){return this._properties};var Qi,eo=to;function to(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(ee=Qi=Qi||{}).SET="$set",ee.SET_ONCE="$setOnce",ee.UNSET="$unset",ee.INCREMENT="$increment",ee.APPEND="$append",ee.APPEND_ONCE="$appendOnce",ee.PREPEND="$prepend",ee.PREPEND_ONCE="$prependOnce",ee.REMOVE="$remove",ee.CLEAR_ALL="$clearAll";no.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new eo).addProperties(e).addProperties(t).build()};var ro=no;function no(){}oo.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new eo).addProperties(e).addProperties(t,!0).build()};var io=oo;function oo(){}ao.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new eo).addProperties(e).remove(t).build()};var so=ao;function ao(){}co.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new eo;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.increment(e,t)})}),n.build()},co.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var uo=co;function co(){}po.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new eo;return n.addProperties(e),t.forEach(function(t,e){n.compute(e,function(e){return r.compute(e,t)})}),n.build()},po.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},po.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},po.prototype.contains=function(e,t){return e.includes(t)},po.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Pe([e],t,!0)},po.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Pe(Pe([],e,!0),[t],!1)};t=po;function po(){}i(ho,lo=t),ho.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var lo,fo=ho;function ho(){return null!==lo&&lo.apply(this,arguments)||this}i(go,yo=t),go.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},go.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var yo,vo=go;function go(){return null!==yo&&yo.apply(this,arguments)||this}i(wo,mo=t),wo.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var mo,Eo=wo;function wo(){return null!==mo&&mo.apply(this,arguments)||this}i(_o,bo=t),_o.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)},_o.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},_o.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var bo,To=_o;function _o(){return null!==bo&&bo.apply(this,arguments)||this}i(Oo,Io=t),Oo.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},Oo.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var Io,Ao=Oo;function Oo(){return null!==Io&&Io.apply(this,arguments)||this}So.prototype.operate=function(e,t){return new Map};var No=So;function So(){}Mo.get=function(e){switch(e){case Qi.SET:return new ro;case Qi.SET_ONCE:return new io;case Qi.UNSET:return new so;case Qi.INCREMENT:return new uo;case Qi.APPEND:return new fo;case Qi.APPEND_ONCE:return new vo;case Qi.PREPEND:return new Eo;case Qi.PREPEND_ONCE:return new To;case Qi.CLEAR_ALL:return new No;case Qi.REMOVE:return new Ao}};var Po=Mo;function Mo(){}Co.prototype.set=function(e,t){return this.add(Qi.SET,e,t)},Co.prototype.setOnce=function(e,t){return this.add(Qi.SET_ONCE,e,t)},Co.prototype.unset=function(e){return this.add(Qi.UNSET,e,"-")},Co.prototype.increment=function(e,t){return this.add(Qi.INCREMENT,e,t)},Co.prototype.append=function(e,t){return this.add(Qi.APPEND,e,t)},Co.prototype.appendOnce=function(e,t){return this.add(Qi.APPEND_ONCE,e,t)},Co.prototype.prepend=function(e,t){return this.add(Qi.PREPEND,e,t)},Co.prototype.prependOnce=function(e,t){return this.add(Qi.PREPEND_ONCE,e,t)},Co.prototype.remove=function(e,t){return this.add(Qi.REMOVE,e,t)},Co.prototype.clearAll=function(){return this.add(Qi.CLEAR_ALL,"clearAll","-")},Co.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new xo(new Map(e))},Co.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},Co.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new eo);e=this.operations.get(e);return null!=e&&e.add(t,r),this};var Ro=Co;function Co(){this.operations=new Map}Uo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Po.get(t).operate(r,e)}),r},Uo.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},Uo.prototype.toSecuredEvent=function(){var i={key:"$secured_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},Uo.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 xo=Uo;function Uo(e){this.operations=null!=e?e:new Map}Do.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 ko=Do;function Do(){}Fo.prototype.isEquals=function(e){return this.url===e.url},Object.defineProperty(Fo.prototype,"pageTitle",{get:function(){return"undefined"==typeof window||"undefined"==typeof document?"":window.document.title},enumerable:!1,configurable:!0}),Fo.createWithCurrentPage=function(){return"undefined"==typeof window||"undefined"==typeof document?new Fo:new Fo(window.location.pathname,window.location.host,window.location.hostname,window.location.href,window.document.referrer,window.location.search,window.location.protocol)},Fo.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 Lo=Fo;function Fo(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}jo.create=function(e){return new jo(e)},jo.prototype.getValue=function(){return this.value};var Vo=jo;function jo(e){this.value=e}Ko.toPublic=function(e){return{key:e.key}};var Bo=Ko;function Ko(){}Go.toPublic=function(e){return{close:e.close.bind(e),inAppMessage:Bo.toPublic(e.context.inAppMessage)}};var Ho=Go;function Go(){}var zo=a.log,Jo=(d.prototype.initialize=function(){return p(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]),zo.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),zo.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),zo.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=zt(e);if(!t)return zo.warn("invalid user"),Promise.resolve();var r=this.userManager.setUser(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return zo.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},d.prototype.setUserId=function(e){try{var t=void 0;if(u.isNullOrUndefined(e))t=this.userManager.setUserId(void 0);else{var r=Re.sanitizeValue(e);if(!r)return zo.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();t=this.userManager.setUserId(r)}return this.userManager.syncIfNeeded(t).catch(function(){})}catch(e){return zo.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},d.prototype.setDeviceId=function(e){try{var t=Re.sanitizeValue(e);if(!t)return zo.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve();var r=this.userManager.setDeviceId(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return zo.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},d.prototype.setUserProperty=function(e,t){e=(new Ro).set(e,t).build();return this.updateUserProperties(e)},d.prototype.setUserProperties=function(e){try{var t=Ue.sanitize(e),r=new Ro;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 zo.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 zo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},d.prototype.updatePushSubscriptions=function(e){try{var t=e.toEvent("$push_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return zo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},d.prototype.updateSmsSubscriptions=function(e){try{var t=e.toEvent("$sms_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return zo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},d.prototype.updateKakaoSubscriptions=function(e){try{var t=e.toEvent("$kakao_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return zo.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},d.prototype.resetUser=function(){try{var e=this.userManager.resetUser(),t=(new Ro).clearAll().build();return this.track(t.toEvent()),this.userManager.syncIfNeeded(e).catch(function(){})}catch(e){return zo.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},d.prototype.setPhoneNumber=function(e){try{if("string"!=typeof e)return zo.error("Invalid value ".concat(e,": phoneNumber value type must be string.")),Promise.resolve();var t=Vo.create(e),r=Fe.instance.currentMillis();return this.piiEventManager.setPhoneNumber(t,r),this.core.flush(!1),Promise.resolve()}catch(e){return zo.error("Unexpected exception occurred while setting phone number: ".concat(e)),Promise.resolve()}},d.prototype.unsetPhoneNumber=function(){try{var e=Fe.instance.currentMillis();return this.piiEventManager.unsetPhoneNumber(e),this.core.flush(!1),Promise.resolve()}catch(e){return zo.error("Unexpected exception occurred while unsetting phone number: ".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=Wn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return zo.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),bt.of(i,h.EXCEPTION)}}(this);return Gi.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=Wn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return zo.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),_t.off(h.EXCEPTION)}}(this);return Gi.featureFlag(e,r,t),t},d.prototype.track=function(e,t){try{zo.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){zo.error("Unexpected exception while tracking event: ".concat(e))}},d.prototype.trackPageView=function(e){var t=Lo.createWithCurrentPage();this.pageEventTracker.track(t)},d.prototype.remoteConfig=function(e){return new Xi(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 zo.error('"Unexpected exception while get experiment['.concat(t,"]"))}},d.prototype.onInitialized=function(r){var n;return p(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,ko.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(),zo.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?(zo.debug("UserExplorer opened."),Ni.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):zo.error("UserExplorer is not provided")},d.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():zo.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.getDisplayedInAppMessageView=function(){return this.inAppMessageUi.currentMessageView?Ho.toPublic(this.inAppMessageUi.currentMessageView):null},d.prototype.close=function(){zo.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},d);function d(e,t,r,n,i,o,s,a,u){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.piiEventManager=i,this.fetchThrottler=o,this.pageEventTracker=s,this.inAppMessageUi=a,this.devTools=u,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.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.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.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.getDisplayedInAppMessageView=this.getDisplayedInAppMessageView.bind(this),this.initialization=this.initialize()}var qo=a.log,Yo=(Wo.prototype.get=function(t,r){var e=typeof r;try{var n={command:"remoteConfig",parameters:{defaultValue:r,key:t,valueType:e,user:this.user},browserProperties:this.browserPropertyProvider.getBrowserProperties()},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 qo.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},Wo);function Wo(e,t,r){this.invocationProcessor=e,this.user=t,this.browserPropertyProvider=r}Xo.tryParse=function(e){try{return new URL(e)}catch(e){return}},Xo.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:Xo.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},Xo.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},Xo.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},Xo.decodeURIOrOriginal=function(t){try{return decodeURI(t)}catch(e){return t}},Xo.decodeURIComponentOrOriginal=function(t){try{return decodeURIComponent(t)}catch(e){return t}};var $o=Xo;function Xo(){}Qo.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]:""},Qo.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=$o.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},Qo.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},Qo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Qo.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},Qo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Qo.prototype.getOptions=function(){return this.options},Qo.getInstance=function(e){return void 0===e&&(e={days:Xe,isCrossSubdomain:!0}),Qo.storage=Qo.storage?Qo.storage:new Qo(e)};var Zo=Qo;function Qo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}ts.prototype.initialize=function(){Zo.getInstance().getItem(Ze)||is()},ts.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return ns();case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var es=ts;function ts(){}function rs(){var e=Zo.getInstance(),t=e.getItem(Qe);if(t)return t;t=e.getItem(Ze);return t||is()}function ns(){Zo.getInstance().removeItem(Qe)}function is(){var e=K();return Zo.getInstance().setItem(Ze,e),e}var os,ss=a.log;(G=os=os||{}).native="native",G.web_view_wrapper="web_view_wrapper";y.prototype.getSessionId=function(){try{var e={command:"getSessionId",browserProperties:this.browserPropertyProvider.getBrowserProperties()},t=this.invocationProcessor.process(e);return null!=t?t:rs()}catch(e){return ss.error("Unexpected exception while get sessionId: ".concat(e)),rs()}},y.prototype.getUser=function(){var e;try{var t={command:"getUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},r=this.invocationProcessor.process(t);return null!=(e=zt(r))?e:this.defaultUser()}catch(e){return ss.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},y.prototype.setUser=function(n){return p(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=zt(n)))return ss.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){ss.error("Unexpected exception while set user: ".concat(e))}return[2]})})},y.prototype.setUserId=function(n){return p(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(t=void 0,u.isNullOrUndefined(n))t=null;else if(!(t=Re.sanitizeValue(n)))return ss.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){ss.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},y.prototype.setDeviceId=function(n){return p(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{if(!(t=Re.sanitizeValue(n)))return ss.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){ss.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},y.prototype.setUserProperty=function(r,n){return p(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){ss.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},y.prototype.setUserProperties=function(n){return p(this,void 0,void 0,function(){var t,r;return l(this,function(e){try{t=Ue.sanitize(n),r=new Ro,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){ss.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},y.prototype.updateUserProperties=function(r){return p(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){ss.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},y.prototype.updatePushSubscriptions=function(r){return p(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"updatePushSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){ss.error("Unexpected exception while update push subscriptions: ".concat(e))}return[2]})})},y.prototype.updateSmsSubscriptions=function(r){return p(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"updateSmsSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){ss.error("Unexpected exception while update sms subscriptions: ".concat(e))}return[2]})})},y.prototype.updateKakaoSubscriptions=function(r){return p(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"updateKakaoSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){ss.error("Unexpected exception while update Kakao subscriptions: ".concat(e))}return[2]})})},y.prototype.resetUser=function(){return p(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"resetUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){ss.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},y.prototype.setPhoneNumber=function(r){return p(this,void 0,void 0,function(){var t;return l(this,function(e){try{if("string"!=typeof r)return ss.error("Invalid type ".concat(r,": phoneNumber value must be string.")),[2,Promise.resolve()];t={command:"setPhoneNumber",parameters:{phoneNumber:r},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){ss.error("Unexpected exception occurred while setting phone number: ".concat(e))}return[2]})})},y.prototype.unsetPhoneNumber=function(){return p(this,void 0,void 0,function(){var t;return l(this,function(e){try{t={command:"unsetPhoneNumber",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){ss.error("Unexpected exception occurred while unsetting phone number: ".concat(e))}return[2]})})},y.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)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(e){return ss.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),r}},y.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)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return bt.of(o.variation,o.reason,new Ke(null!=(n=o.config.parameters)?n:{}))}catch(e){return ss.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),bt.of(r,h.EXCEPTION)}},y.prototype.isFeatureOn=function(t,e){try{var r={command:"isFeatureOn",parameters:{featureKey:t,user:this.convertUser(e)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(e){return ss.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),!1}},y.prototype.featureFlagDetail=function(t,e){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:t,user:this.convertUser(e)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new _t(i.isOn,i.reason,new Ke(null!=(r=i.config.parameters)?r:{}),void 0)}catch(e){return ss.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),_t.off(h.EXCEPTION)}},y.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)},browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(r)}catch(e){ss.error("Unexpected exception while tracking event: ".concat(e))}},y.prototype.trackPageView=function(e){ss.info("Web to app integration feature is not support 'trackPageView' method")},y.prototype.remoteConfig=function(e){return new Yo(this.invocationProcessor,this.convertUser(e),this.browserPropertyProvider)},y.prototype.onReady=function(e,t){e()},y.prototype.showUserExplorer=function(){try{var e={command:"showUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){ss.error("Unexpected exception while show userExplorer: ".concat(e))}},y.prototype.hideUserExplorer=function(){try{var e={command:"hideUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){ss.error("Unexpected exception while hide userExplorer: ".concat(e))}},y.prototype.setInAppMessageListener=function(e){ss.info("Web to app integration feature is not support 'setInAppMessageListener' method")},y.prototype.fetch=function(){return Promise.resolve()},y.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},y.prototype.close=function(){ss.info("Web to app integration feature is not support 'close' method")},y.prototype.getExperiment=function(e){ss.info("Web to app integration feature is not support 'getExperiment' method")},y.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},y.prototype.convertUser=function(e){return"string"==typeof e||e&&null!=(e=zt(e))?e:void 0},y.prototype.defaultUser=function(){return{deviceId:rs()}},y.prototype.getDisplayedInAppMessageView=function(){return ss.info("Web to app integration feature is not support 'getDisplayedInAppMessageView' method"),null};var as=y;function y(e,t){this.invocationProcessor=e,this.browserPropertyProvider=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.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.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.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.getDisplayedInAppMessageView=this.getDisplayedInAppMessageView.bind(this)}v.prototype.getSessionId=function(){return this.browser.getSessionId()},v.prototype.getUser=function(){return this.browser.getUser()},v.prototype.syncUser=function(){return p(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]}})})},v.prototype.setUser=function(t){return p(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]}})})},v.prototype.setUserId=function(t){return p(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]}})})},v.prototype.setDeviceId=function(t){return p(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]}})})},v.prototype.setUserProperty=function(t,r){return p(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]}})})},v.prototype.setUserProperties=function(t){return p(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]}})})},v.prototype.updateUserProperties=function(t){return p(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]}})})},v.prototype.updatePushSubscriptions=function(t){return p(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.updatePushSubscriptions(t)];case 1:return e.sent(),[2]}})})},v.prototype.updateSmsSubscriptions=function(t){return p(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.updateSmsSubscriptions(t)];case 1:return e.sent(),[2]}})})},v.prototype.updateKakaoSubscriptions=function(t){return p(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.updateKakaoSubscriptions(t)];case 1:return e.sent(),[2]}})})},v.prototype.resetUser=function(){return p(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]}})})},v.prototype.setPhoneNumber=function(t){return p(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.setPhoneNumber(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.unsetPhoneNumber=function(){return p(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,this.browser.unsetPhoneNumber()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},v.prototype.variation=function(e,t,r){return this.browser.variation(e,t,r=void 0===r?"A":r)},v.prototype.variationDetail=function(e,t,r){return this.browser.variationDetail(e,t,r=void 0===r?"A":r)},v.prototype.isFeatureOn=function(e,t){return this.browser.isFeatureOn(e,t)},v.prototype.featureFlagDetail=function(e,t){return this.browser.featureFlagDetail(e,t)},v.prototype.track=function(e,t){return this.browser.track(e,t)},v.prototype.trackPageView=function(e){return this.browser.trackPageView(e)},v.prototype.remoteConfig=function(e){return this.browser.remoteConfig(e)},v.prototype.onReady=function(e,t){this.browser.onReady(e,t)},v.prototype.showUserExplorer=function(){this.browser.showUserExplorer()},v.prototype.hideUserExplorer=function(){this.browser.hideUserExplorer()},v.prototype.fetch=function(){return this.browser.fetch()},v.prototype.onInitialized=function(e){return this.browser.onInitialized(e)},v.prototype.close=function(){this.browser.close()},v.prototype.setInAppMessageListener=function(e){this.browser.setInAppMessageListener(e)},v.prototype.getExperiment=function(e){return this.browser.getExperiment(e)},v.prototype.getDisplayedInAppMessageView=function(){return this.browser.getDisplayedInAppMessageView()};var us=v;function v(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.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.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.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.getDisplayedInAppMessageView=this.getDisplayedInAppMessageView.bind(this)}function cs(e){return e&&e.Math==Math&&e}function ps(e){try{return!!e()}catch(e){return!0}}function ls(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function fs(e){return Xs($s(e),8,-1)}function hs(e){if(null==e)throw ta("Can't call method on "+e);return e}function ds(e){return ra(na(e))}function ys(e){return"function"==typeof e}function vs(e){return"object"==typeof e?null!==e:ia(e)}function gs(e,t){return arguments.length<2?(r=oa[e],sa(r)?r:void 0):oa[e]&&oa[e][t];var r}function ms(e){try{return va(e)}catch(e){return"Object"}}function Es(e){if(ga(e))return e;throw Ea(ma(e)+" is not a function")}function ws(e,t){return null==(e=e[t])?void 0:wa(e)}function bs(t,r){try{Oa(Aa,t,{value:r,configurable:!0,writable:!0})}catch(e){Aa[t]=r}return r}function Ts(e){return Ma(Pa(e))}function _s(e){return"Symbol("+(void 0===e?"":e)+")_"+ka(++xa+Ua,36)}function Is(e){var t;return La(Ba,e)&&(Va||"string"==typeof Ba[e])||(t="Symbol."+e,Va&&La(Ka,e)?Ba[e]=Ka[e]:Ba[e]=(ja&&Ha?Ha:Ga)(t)),Ba[e]}function As(e){return e=Za(e,"string"),Qa(e)?e:e+""}function Os(e){return tu?eu.createElement(e):{}}function Ns(e){if(lu(e))return e;throw hu(fu(e)+" is not an object")}function Ss(e){return Su[e]||(Su[e]=Nu(e))}function Ps(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(qu(r)&&Wu(r,o,n),n.global)i?e[t]=r:$u(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Yu.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Ms(e){return(e=+e)!=e||0==e?0:Qu(e)}function Rs(e,t){return(e=ec(e))<0?tc(e+t,0):rc(e,t)}function Cs(e){return oc(e.length)}function xs(a){return function(e,t,r){var n,i=sc(e),o=uc(i),s=ac(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 Us(e,t){var r,n=pc(e),i=0,o=[];for(r in n)!cc(fc,r)&&cc(n,r)&&hc(o,r);for(;t.length>i;)!cc(n,r=t[i++])||~lc(o,r)||hc(o,r);return o}function ks(e,t,r){for(var n=bc(t),i=_c.f,o=Tc.f,s=0;s<n.length;s++){var a=n[s];wc(e,a)||r&&wc(r,a)||i(e,a,o(t,a))}}function Ds(e,t){return(e=Sc[Nc(e)])==Mc||e!=Pc&&(Ac(t)?Ic(t):!!t)}function g(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?Rc:a?Rc[o]||kc(o,{}):(Rc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=Cc(u,r))&&i.value:u[r],!Lc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;Dc(n,i)}(e.sham||i&&i.sham)&&xc(n,"sham",!0),Uc(u,r,n,e)}}var Ls,Fs,Vs,js,Bs,Ks,Hs,Gs,H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=cs("object"==typeof globalThis&&globalThis)||cs("object"==typeof window&&window)||cs("object"==typeof self&&self)||cs("object"==typeof H&&H)||function(){return this}()||Function("return this")(),e={},ee=!ps(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t=!ps(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),zs=Function.prototype.call,G=t?zs.bind(zs):function(){return zs.apply(zs,arguments)},H={},m={}.propertyIsEnumerable,Js=Object.getOwnPropertyDescriptor,E=Js&&!m.call({1:2},1),E=(H.f=E?function(e){e=Js(this,e);return!!e&&e.enumerable}:m,t),m=Function.prototype,qs=m.bind,Ys=m.call,Ws=E&&qs.bind(Ys,Ys),m=E?function(e){return e&&Ws(e)}:function(e){return e&&function(){return Ys.apply(e,arguments)}},qs=m,$s=qs({}.toString),Xs=qs("".slice),E=ps,Zs=fs,Qs=Object,ea=m("".split),qs=E(function(){return!Qs("z").propertyIsEnumerable(0)})?function(e){return"String"==Zs(e)?ea(e,""):Qs(e)}:Qs,ta=TypeError,ra=qs,na=hs,ia=ys,oa=r,sa=ys,E=m({}.isPrototypeOf),aa=gs("navigator","userAgent")||"",ua=aa,ca=r.process,pa=r.Deno,ca=ca&&ca.versions||pa&&pa.version,pa=ca&&ca.v8,ca=b=!(b=pa?0<(w=pa.split("."))[0]&&w[0]<4?1:+(w[0]+w[1]):b)&&ua&&(!(w=ua.match(/Edge\/(\d+)/))||74<=w[1])&&(w=ua.match(/Chrome\/(\d+)/))?+w[1]:b,la=ca,pa=ps,ua=!!Object.getOwnPropertySymbols&&!pa(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&la&&la<41}),w=ua&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fa=gs,ha=ys,da=E,ya=Object,b=w?function(e){return"symbol"==typeof e}:function(e){var t=fa("Symbol");return ha(t)&&da(t.prototype,ya(e))},va=String,ga=ys,ma=ms,Ea=TypeError,wa=Es,ba=G,Ta=ys,_a=vs,Ia=TypeError,pa={exports:{}},Aa=r,Oa=Object.defineProperty,T=bs,Na="__core-js_shared__",T=r[Na]||T(Na,{}),Sa=T,Pa=((pa.exports=function(e,t){return Sa[e]||(Sa[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"}),hs),Ma=Object,Ra=Ts,Ca=m({}.hasOwnProperty),Na=Object.hasOwn||function(e,t){return Ca(Ra(e),t)},_=m,xa=0,Ua=Math.random(),ka=_(1..toString),_=r,Da=pa.exports,La=Na,Fa=_s,Va=ua,ja=w,Ba=Da("wks"),Ka=_.Symbol,Ha=Ka&&Ka.for,Ga=ja?Ka:Ka&&Ka.withoutSetter||Fa,za=G,Ja=vs,qa=b,Ya=ws,Wa=function(e,t){var r,n;if("string"===t&&Ta(r=e.toString)&&!_a(n=ba(r,e)))return n;if(Ta(r=e.valueOf)&&!_a(n=ba(r,e)))return n;if("string"!==t&&Ta(r=e.toString)&&!_a(n=ba(r,e)))return n;throw Ia("Can't convert object to primitive value")},$a=TypeError,Xa=Is("toPrimitive"),Za=function(e,t){if(!Ja(e)||qa(e))return e;var r=Ya(e,Xa);if(r){if(r=za(r,e,t=void 0===t?"default":t),!Ja(r)||qa(r))return r;throw $a("Can't convert object to primitive value")}return Wa(e,t=void 0===t?"number":t)},Qa=b,ua=vs,eu=r.document,tu=ua(eu)&&ua(eu.createElement),ru=Os,w=!ee&&!ps(function(){return 7!=Object.defineProperty(ru("div"),"a",{get:function(){return 7}}).a}),nu=G,iu=H,ou=ls,su=ds,au=As,uu=Na,cu=w,pu=Object.getOwnPropertyDescriptor,Da=(e.f=ee?pu:function(e,t){if(e=su(e),t=au(t),cu)try{return pu(e,t)}catch(e){}if(uu(e,t))return ou(!nu(iu.f,e,t),e[t])},{}),_=ee&&ps(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),lu=vs,fu=String,hu=TypeError,du=w,yu=Ns,vu=As,gu=TypeError,mu=Object.defineProperty,Eu=Object.getOwnPropertyDescriptor,wu="enumerable",bu="configurable",Tu="writable",Fa=(Da.f=ee?_?function(e,t,r){var n;return yu(e),t=vu(t),yu(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Tu in r&&!r[Tu]&&((n=Eu(e,t))&&n[Tu]&&(e[t]=r.value,r={configurable:(bu in r?r:n)[bu],enumerable:(wu in r?r:n)[wu],writable:!1})),mu(e,t,r)}:mu:function(e,t,r){if(yu(e),t=vu(t),yu(r),du)try{return mu(e,t,r)}catch(e){}if("get"in r||"set"in r)throw gu("Accessors not supported");return"value"in r&&(e[t]=r.value),e},ee),_u=Da,Iu=ls,b=Fa?function(e,t,r){return _u.f(e,t,Iu(1,r))}:function(e,t,r){return e[t]=r,e},ua={exports:{}},H=ee,w=Na,Fa=Function.prototype,I=H&&Object.getOwnPropertyDescriptor,w=w(Fa,"name"),w={EXISTS:w,PROPER:w&&"something"===function(){}.name,CONFIGURABLE:w&&(!H||I(Fa,"name").configurable)},H=ys,I=T,Au=m(Function.toString),Fa=(H(I.inspectSource)||(I.inspectSource=function(e){return Au(e)}),I.inspectSource),H=ys,I=Fa,Ou=r.WeakMap,H=H(Ou)&&/native code/.test(I(Ou)),I=pa.exports,Nu=_s,Su=I("keys"),Ou={},pa=m,Pu=vs,Mu=b,Ru=Na,I=T,Cu=Ss,xu=Ou,Uu="Object already initialized",ku=r.TypeError,Du=r.WeakMap,H=(Hs=H||I.state?(Ls=I.state||(I.state=new Du),Fs=pa(Ls.get),Vs=pa(Ls.has),js=pa(Ls.set),Bs=function(e,t){if(Vs(Ls,e))throw new ku(Uu);return t.facade=e,js(Ls,e,t),t},Ks=function(e){return Fs(Ls,e)||{}},function(e){return Vs(Ls,e)}):(xu[Gs=Cu("state")]=!0,Bs=function(e,t){if(Ru(e,Gs))throw new ku(Uu);return t.facade=e,Mu(e,Gs,t),t},Ks=function(e){return Ru(e,Gs)?e[Gs]:{}},function(e){return Ru(e,Gs)}),{set:Bs,get:Ks,has:Hs,enforce:function(e){return Hs(e)?Ks(e):Bs(e,{})},getterFor:function(t){return function(e){if(Pu(e)&&(e=Ks(e)).type===t)return e;throw ku("Incompatible receiver, "+t+" required")}}}),I=ps,Lu=ys,Fu=Na,Vu=ee,ju=w.CONFIGURABLE,Bu=Fa,Ku=H.enforce,Hu=H.get,Gu=Object.defineProperty,zu=Vu&&!I(function(){return 8!==Gu(function(){},"length",{value:8}).length}),Ju=String(String).split("String"),Du=ua.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),(!Fu(e,"name")||ju&&e.name!==t)&&(Vu?Gu(e,"name",{value:t,configurable:!0}):e.name=t),zu&&r&&Fu(r,"arity")&&e.length!==r.arity&&Gu(e,"length",{value:r.arity});try{r&&Fu(r,"constructor")&&r.constructor?Vu&&Gu(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=Ku(e);return Fu(r,"source")||(r.source=Ju.join("string"==typeof t?t:"")),e},qu=(Function.prototype.toString=Du(function(){return Lu(this)&&Hu(this).source||Bu(this)},"toString"),ys),Yu=Da,Wu=ua.exports,$u=bs,pa={},Xu=Math.ceil,Zu=Math.floor,Qu=Math.trunc||function(e){e=+e;return(0<e?Zu:Xu)(e)},ec=Ms,tc=Math.max,rc=Math.min,nc=Ms,ic=Math.min,oc=function(e){return 0<e?ic(nc(e),9007199254740991):0},sc=ds,ac=Rs,uc=Cs,xu={includes:xs(!0),indexOf:xs(!1)},Cu=m,cc=Na,pc=ds,lc=xu.indexOf,fc=Ou,hc=Cu([].push),I=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dc=Us,yc=I.concat("length","prototype"),Du=(pa.f=Object.getOwnPropertyNames||function(e){return dc(e,yc)},{}),Cu=(Du.f=Object.getOwnPropertySymbols,gs),vc=pa,gc=Du,mc=Ns,Ec=m([].concat),Du=Cu("Reflect","ownKeys")||function(e){var t=vc.f(mc(e)),r=gc.f;return r?Ec(t,r(e)):t},wc=Na,bc=Du,Tc=e,_c=Da,Ic=ps,Ac=ys,Oc=/#|\.prototype\./,Nc=Ds.normalize=function(e){return String(e).replace(Oc,".").toLowerCase()},Sc=Ds.data={},Pc=Ds.NATIVE="N",Mc=Ds.POLYFILL="P",Cu=Ds,Rc=r,Cc=e.f,xc=b,Uc=Ps,kc=bs,Dc=ks,Lc=Cu,Du=!ps(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Fc=Na,Vc=ys,jc=Ts,Bc=Ss("IE_PROTO"),Kc=Object,Hc=Kc.prototype,Du=Du?Kc.getPrototypeOf:function(e){e=jc(e);if(Fc(e,Bc))return e[Bc];var t=e.constructor;return Vc(t)&&e instanceof t?t.prototype:e instanceof Kc?Hc:null},Gc=ys,zc=String,Jc=TypeError,qc=m,Yc=Ns,Wc=function(e){if("object"==typeof e||Gc(e))return e;throw Jc("Can't set "+zc(e)+" as a prototype")},$c=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=qc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return Yc(e),Wc(t),n?r(e,t):e.__proto__=t,e}}():void 0),A={},Xc=Us,Zc=I,O=Object.keys||function(e){return Xc(e,Zc)},Qc=Da,ep=Ns,tp=ds,rp=O;A.f=ee&&!_?Object.defineProperties:function(e,t){ep(e);for(var r,n=tp(t),i=rp(t),o=i.length,s=0;s<o;)Qc.f(e,r=i[s++],n[r]);return e};function np(){}function ip(e){e.write(Ap("")),e.close();var t=e.parentWindow.Object;return e=null,t}function op(e,t){return xp(e),void 0===t?e:Up?kp(e,t):function(){return e.apply(t,arguments)}}function sp(e){return void 0!==e&&(Dp.Array===e||Fp[Lp]===e)}function ap(e){if(null!=e)return Jp(e,Yp)||Jp(e,"@@iterator")||qp[zp(e)]}function up(e,t){if(t=arguments.length<2?Qp(e):t,$p(t))return Xp(Wp(t,e));throw el(Zp(e)+" is not iterable")}function cp(e,t,r){var n,i;rl(e);try{if(!(n=nl(e,"return"))){if("throw"===t)throw r;return r}n=tl(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return rl(n),r}function pp(e,t){this.stopped=e,this.result=t}function lp(e,t,r){function n(e){return o&&hl(o,"normal",e),new pp(!0,e)}function i(e){return f?(sl(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,p,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),v=il(t,l);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=fl(e)))throw dl(al(e)+" is not iterable");if(ul(r)){for(s=0,a=cl(e);s<a;s++)if((u=i(e[s]))&&pl(yl,u))return u;return new pp(!1)}o=ll(e,r)}for(c=(h?e:o).next;!(p=ol(c,o)).done;){try{u=i(p.value)}catch(e){hl(o,"throw",e)}if("object"==typeof u&&u&&pl(yl,u))return u}return new pp(!1)}function fp(e){if("Symbol"===vl(e))throw TypeError("Cannot convert a Symbol value to a string");return gl(e)}function hp(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=wl(kl,this);return Tl?r=Tl(new xl,i?bl(this):kl):(r=i?this:Il(kl),Al(r,Cl,"Error")),void 0!==t&&Al(r,"message",Ml(t)),Rl&&Al(r,"stack",Nl(r.stack,1)),Sl(r,n),Pl(e,Ul,{that:i=[]}),Al(r,"errors",i),r}function dp(e){Ll[Dl][e]=!0}var yp,vp,O=gs("document","documentElement"),gp=Ns,mp=A,Ep=I,_=Ou,wp=O,bp=Os,Tp="prototype",_p="script",Ip=Ss("IE_PROTO"),Ap=function(e){return"<"+_p+">"+e+"</"+_p+">"},Op=function(){try{yp=new ActiveXObject("htmlfile")}catch(e){}Op="undefined"==typeof document||document.domain&&yp?ip(yp):(e=bp("iframe"),t="java"+_p+":",e.style.display="none",wp.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(Ap("document.F=Object")),t.close(),t.F);for(var e,t,r=Ep.length;r--;)delete Op[Tp][Ep[r]];return Op()},A=(_[Ip]=!0,Object.create||function(e,t){var r;return null!==e?(np[Tp]=gp(e),r=new np,np[Tp]=null,r[Ip]=e):r=Op(),void 0===t?r:mp.f(r,t)}),Np=Error,Sp=m("".replace),I=String(Np("zxcasd").stack),Pp=/\n\s*at [^:]*:[^\n]*/,Mp=Pp.test(I),Rp=vs,Cp=b,xp=Es,Up=t,kp=m(m.bind),_={},Dp=_,Lp=Is("iterator"),Fp=Array.prototype,I={},I=(I[Is("toStringTag")]="z","[object z]"===String(I)),Vp=I,jp=ys,Bp=fs,Kp=Is("toStringTag"),Hp=Object,Gp="Arguments"==Bp(function(){return arguments}()),Vp=Vp?Bp: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=Hp(e),Kp))?t:Gp?Bp(e):"Object"==(t=Bp(e))&&jp(e.callee)?"Arguments":t},zp=Vp,Jp=ws,qp=_,Yp=Is("iterator"),Wp=G,$p=Es,Xp=Ns,Zp=ms,Qp=ap,el=TypeError,tl=G,rl=Ns,nl=ws,il=op,ol=G,sl=Ns,al=ms,ul=sp,cl=Cs,pl=E,ll=up,fl=ap,hl=cp,dl=TypeError,yl=pp.prototype,vl=Vp,gl=String,ml=fp,El=ls,N=!ps(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",El(1,7)),7!==e.stack)}),S=g,wl=E,bl=Du,Tl=$c,_l=ks,Il=A,Al=b,Ol=ls,Nl=function(e,t){if(Mp&&"string"==typeof e&&!Np.prepareStackTrace)for(;t--;)e=Sp(e,Pp,"");return e},Sl=function(e,t){Rp(t)&&"cause"in t&&Cp(e,"cause",t.cause)},Pl=lp,Ml=function(e,t){return void 0===e?arguments.length<2?"":t:ml(e)},Rl=N,Cl=Is("toStringTag"),xl=Error,Ul=[].push,kl=(Tl?Tl(hp,xl):_l(hp,xl,{name:!0}),hp.prototype=Il(xl.prototype,{constructor:Ol(1,hp),message:Ol(1,""),name:Ol(1,"AggregateError")})),N=(S({global:!0,constructor:!0,arity:2},{AggregateError:hp}),Is),_l=A,Ol=Da.f,Dl=N("unscopables"),Ll=Array.prototype,S=(null==Ll[Dl]&&Ol(Ll,Dl,{configurable:!0,value:_l(null)}),ps),N=ys,Ol=Du,_l=Ps,Fl=Is("iterator"),Vl=!1;[].keys&&("next"in(Gl=[].keys())?(Ol=Ol(Ol(Gl)))!==Object.prototype&&(vp=Ol):Vl=!0);function jl(e,t,r){(e=e&&!r?e.prototype:e)&&!Jl(e,ql)&&zl(e,ql,{configurable:!0,value:t})}function Bl(){return this}function Kl(){return this}function Hl(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!hf&&e in l)return l[e];switch(e){case"keys":case yf:case vf:return function(){return new r(this,e)}}return function(){return new r(this)}}rf(r,t,n);var u,c,n=t+" Iterator",p=!1,l=e.prototype,f=l[df]||l["@@iterator"]||i&&l[i],h=!hf&&f||a(i),d="Array"==t&&l.entries||f;if(d&&(d=nf(d.call(new e)))!==Object.prototype&&d.next&&(nf(d)!==ff&&(of?of(d,ff):tf(d[df])||uf(d,df,Kl)),sf(d,n,!0)),pf&&i==yf&&f&&f.name!==yf&&(lf?af(l,"name",yf):(p=!0,h=function(){return ef(f,this)})),i)if(u={values:a(yf),keys:o?h:a("keys"),entries:a(vf)},s)for(c in u)!hf&&!p&&c in l||uf(l,c,u[c]);else Ql({target:t,proto:!0,forced:hf||p},u);return l[df]!==h&&uf(l,df,h,{name:i}),cf[t]=h,u}N((vp=null==vp||S(function(){var e={};return vp[Fl].call(e)!==e})?{}:vp)[Fl])||_l(vp,Fl,function(){return this});var Gl={IteratorPrototype:vp,BUGGY_SAFARI_ITERATORS:Vl},zl=Da.f,Jl=Na,ql=Is("toStringTag"),Yl=Gl.IteratorPrototype,Wl=A,$l=ls,Xl=jl,Zl=_,Ql=g,ef=G,tf=ys,rf=function(e,t,r,n){t+=" Iterator";return e.prototype=Wl(Yl,{next:$l(+!n,r)}),Xl(e,t,!1),Zl[t]=Bl,e},nf=Du,of=$c,sf=jl,af=b,uf=Ps,Ol=Is,cf=_,pf=w.PROPER,lf=w.CONFIGURABLE,ff=Gl.IteratorPrototype,hf=Gl.BUGGY_SAFARI_ITERATORS,df=Ol("iterator"),yf="values",vf="entries",gf=ds,N=dp,S=_,_l=H,Vl=Da.f,w=Hl,Gl=ee,mf="Array Iterator",Ef=_l.set,wf=_l.getterFor(mf),Ol=w(Array,"Array",function(e,t){Ef(this,{type:mf,target:gf(e),index:0,kind:t})},function(){var e=wf(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"),_=S.Arguments=S.Array;if(N("keys"),N("values"),N("entries"),Gl&&"values"!==_.name)try{Vl(_,"name",{value:"values"})}catch(e){}var bf=Vp;I||Ps(Object.prototype,"toString",I?{}.toString:function(){return"[object "+bf(this)+"]"},{unsafe:!0});function Tf(e){var e=Mf(e),t=Rf.f;Cf&&e&&!e[xf]&&t(e,xf,{configurable:!0,get:function(){return this}})}function _f(e,t){if(Uf(t,e))return e;throw kf("Incorrect invocation")}function If(){}function Af(e){if(!Df(e))return!1;try{return jf(If,Vf,e),!0}catch(e){return!1}}function Of(e){if(!Df(e))return!1;switch(Lf(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Hf||!!Kf(Bf,Ff(e))}catch(e){return!0}}function Nf(e,t){return void 0===(e=qf(e).constructor)||null==(e=qf(e)[Wf])?t:Yf(e)}var Sf,Pf,_l="process"==fs(r.process),Mf=gs,Rf=Da,Cf=ee,xf=Is("species"),Uf=E,kf=TypeError,w=m,S=ps,Df=ys,Lf=Vp,Ff=Fa,Vf=[],jf=gs("Reflect","construct"),Bf=/^\s*(?:class|function)\b/,Kf=w(Bf.exec),Hf=!Bf.exec(If),N=(Of.sham=!0,!jf||S(function(){var e;return Af(Af.call)||!Af(Object)||!Af(function(){e=!0})||e})?Of:Af),Gf=N,zf=ms,Jf=TypeError,qf=Ns,Yf=function(e){if(Gf(e))return e;throw Jf(zf(e)+" is not a constructor")},Wf=Is("species"),Gl=Function.prototype,$f=Gl.apply,Xf=Gl.call,Vl="object"==typeof Reflect&&Reflect.apply||(t?Xf.bind($f):function(){return Xf.apply($f,arguments)}),_=m([].slice),Zf=TypeError,I=/(?:ipad|iphone|ipod).*applewebkit/i.test(aa),Qf=r,eh=Vl,E=op,th=ys,rh=Na,Vp=ps,nh=O,ih=_,oh=Os,sh=function(e,t){if(e<t)throw Zf("Not enough arguments");return e},w=I,S=_l,Gl=Qf.setImmediate,t=Qf.clearImmediate,ah=Qf.process,uh=Qf.Dispatch,ch=Qf.Function,O=Qf.MessageChannel,ph=Qf.String,lh=0,fh={},hh="onreadystatechange";try{Sf=Qf.location}catch(e){}function dh(e){return function(){Rh(e)}}function yh(e){Rh(e.data)}function vh(e){Qf.postMessage(ph(e),Sf.protocol+"//"+Sf.host)}function gh(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function mh(){this.head=null,this.tail=null}function Eh(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=Gh(r),this.reject=Gh(n)}function wh(e,t){var r,n,i,o,s=t.value,a=t.state==md,u=a?e.ok:e.fail,c=e.resolve,p=e.reject,l=e.domain;try{u?(a||(t.rejection===bd&&(o=t,qh(Qh,Jh,function(){var e=o.facade;zh?fd.emit("rejectionHandled",e):Id(gd,e,o.value)})),t.rejection=wd),!0===u?r=s:(l&&l.enter(),r=u(s),l&&(l.exit(),i=!0)),r===e.promise?p(pd("Promise-chain cycle")):(n=Td(r))?qh(n,r,c,p):c(r)):p(s)}catch(e){l&&!i&&l.exit(),p(e)}}var bh,Th,_h,Ih,Ah,Oh,Nh,Sh,Ph,Mh,Rh=function(e){var t;rh(fh,e)&&(t=fh[e],delete fh[e],t())},O=(Gl&&t||(Gl=function(e){sh(arguments.length,1);var t=th(e)?e:ch(e),r=ih(arguments,1);return fh[++lh]=function(){eh(t,void 0,r)},Pf(lh),lh},t=function(e){delete fh[e]},S?Pf=function(e){ah.nextTick(dh(e))}:uh&&uh.now?Pf=function(e){uh.now(dh(e))}:O&&!w?(w=(S=new O).port2,S.port1.onmessage=yh,Pf=E(w.postMessage,w)):Qf.addEventListener&&th(Qf.postMessage)&&!Qf.importScripts&&Sf&&"file:"!==Sf.protocol&&!Vp(vh)?(Pf=vh,Qf.addEventListener("message",yh,!1)):Pf=hh in oh("script")?function(e){nh.appendChild(oh("script"))[hh]=function(){nh.removeChild(this),Rh(e)}}:function(e){setTimeout(dh(e),0)}),{set:Gl,clear:t}),S=r,E=/ipad|iphone|ipod/i.test(aa)&&void 0!==S.Pebble,w=/web0s(?!.*chrome)/i.test(aa),Vp=r,Gl=op,t=e.f,Ch=O.set,S=I,e=E,I=w,xh=_l,E=Vp.MutationObserver||Vp.WebKitMutationObserver,w=Vp.document,Uh=Vp.process,P=Vp.Promise,t=t(Vp,"queueMicrotask"),t=t&&t.value,I=(t||(bh=function(){var e,t;for(xh&&(e=Uh.domain)&&e.exit();Th;){t=Th.fn,Th=Th.next;try{t()}catch(e){throw Th?Ih():_h=void 0,e}}_h=void 0,e&&e.enter()},Ih=S||xh||I||!E||!w?!e&&P&&P.resolve?((S=P.resolve(void 0)).constructor=P,Nh=Gl(S.then,S),function(){Nh(bh)}):xh?function(){Uh.nextTick(bh)}:(Ch=Gl(Ch,Vp),function(){Ch(bh)}):(Ah=!0,Oh=w.createTextNode(""),new E(bh).observe(Oh,{characterData:!0}),function(){Oh.data=Ah=!Ah})),t||function(e){e={fn:e,next:void 0};_h&&(_h.next=e),Th||(Th=e,Ih()),_h=e}),kh=r,e=(mh.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}},mh),P=r.Promise,S="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Gl=!S&&!_l&&"object"==typeof window&&"object"==typeof document,Vp=r,Dh=P,w=ys,E=Cu,Lh=Fa,t=Is,Fh=Gl,Vh=S,jh=ca,Bh=(Dh&&Dh.prototype,t("species")),Kh=!1,Hh=w(Vp.PromiseRejectionEvent),Fa={CONSTRUCTOR:E("Promise",function(){var e=Lh(Dh),t=e!==String(Dh);if(!t&&66===jh)return!0;if(!jh||jh<51||!/native code/.test(e)){var e=new Dh(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Bh]=r,!(Kh=e.then(function(){})instanceof r))return!0}return!t&&(Fh||Vh)&&!Hh}),REJECTION_EVENT:Hh,SUBCLASSING:Kh},Gl={},Gh=Es,S=(Gl.f=function(e){return new Eh(e)},g),zh=_l,Jh=r,qh=G,t=Ps,w=$c,Vp=jl,E=Tf,Yh=Es,Wh=ys,$h=vs,Xh=_f,Zh=Nf,Qh=O.set,ed=I,td=function(e,t){var r=kh.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},rd=gh,nd=e,O=H,I=P,e=Gl,id="Promise",M=Fa.CONSTRUCTOR,od=Fa.REJECTION_EVENT,R=Fa.SUBCLASSING,sd=O.getterFor(id),ad=O.set,O=I&&I.prototype,ud=I,cd=O,pd=Jh.TypeError,ld=Jh.document,fd=Jh.process,hd=e.f,dd=hd,yd=!!(ld&&ld.createEvent&&Jh.dispatchEvent),vd="unhandledrejection",gd="rejectionhandled",md=1,Ed=2,wd=1,bd=2,Td=function(e){var t;return!(!$h(e)||!Wh(t=e.then))&&t},_d=function(r,i){r.notified||(r.notified=!0,ed(function(){for(var e,n,t=r.reactions;e=t.get();)wh(e,r);r.notified=!1,i&&!r.rejection&&(n=r,qh(Qh,Jh,function(){var e=n.facade,t=n.value,r=Ad(n);if(r&&(r=rd(function(){zh?fd.emit("unhandledRejection",t,e):Id(vd,e,t)}),n.rejection=zh||Ad(n)?bd:wd,r.error))throw r.value}))}))},Id=function(e,t,r){var n;yd?((n=ld.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Jh.dispatchEvent(n)):n={promise:t,reason:r},!od&&(t=Jh["on"+e])?t(n):e===vd&&td("Unhandled promise rejection",r)},Ad=function(e){return e.rejection!==wd&&!e.parent},Od=function(t,r,n){return function(e){t(r,e,n)}},Nd=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=Ed,_d(e,!0))},Sd=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw pd("Promise can't be resolved itself");var n=Td(e);n?ed(function(){var t={done:!1};try{qh(n,e,Od(Sd,t,r),Od(Nd,t,r))}catch(e){Nd(t,e,r)}}):(r.value=e,r.state=md,_d(r,!1))}catch(e){Nd({done:!1},e,r)}}};if(M&&(cd=(ud=function(e){Xh(this,cd),Yh(e),qh(Sh,this);var t=sd(this);try{e(Od(Sd,t),Od(Nd,t))}catch(e){Nd(t,e)}}).prototype,(Sh=function(e){ad(this,{type:id,done:!1,notified:!1,parent:!1,reactions:new nd,rejection:!1,state:0,value:void 0})}).prototype=t(cd,"then",function(e,t){var r=sd(this),n=hd(Zh(this,ud));return r.parent=!0,n.ok=!Wh(e)||e,n.fail=Wh(t)&&t,n.domain=zh?fd.domain:void 0,0==r.state?r.reactions.add(n):ed(function(){wh(n,r)}),n.promise}),Ph=function(){var e=new Sh,t=sd(e);this.promise=e,this.resolve=Od(Sd,t),this.reject=Od(Nd,t)},e.f=hd=function(e){return e===ud||void 0===e?new Ph:dd(e)},Wh(I)&&O!==Object.prototype)){Mh=O.then,R||t(O,"then",function(e,t){var r=this;return new ud(function(e,t){qh(Mh,r,e,t)}).then(e,t)},{unsafe:!0});try{delete O.constructor}catch(e){}w&&w(O,cd)}S({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:ud}),Vp(ud,id,!1),E(id);var Pd=Is("iterator"),Md=!1;try{var Rd=0,C={next:function(){return{done:!!Rd++}},return:function(){Md=!0}};C[Pd]=function(){return this},Array.from(C,function(){throw 2})}catch(e){}function Cd(e,t){if(!t&&!Md)return!1;var r=!1;try{var n={};n[Pd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var xd=P,e=Cd,I=Fa.CONSTRUCTOR||!e(function(e){xd.all(e).then(void 0,function(){})}),Ud=G,kd=Es,Dd=Gl,Ld=gh,Fd=lp,R=(g({target:"Promise",stat:!0,forced:I},{all:function(e){var a=this,t=Dd.f(a),u=t.resolve,c=t.reject,r=Ld(function(){var n=kd(a.resolve),i=[],o=0,s=1;Fd(e,function(e){var t=o++,r=!1;s++,Ud(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,w=gs,O=ys,S=Ps,M=t&&t.prototype;R({target:"Promise",proto:!0,forced:Fa.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),O(t)&&(Vp=w("Promise").prototype.catch,M.catch!==Vp&&S(M,"catch",Vp,{unsafe:!0}));var Vd=G,jd=Es,Bd=Gl,Kd=gh,Hd=lp;g({target:"Promise",stat:!0,forced:I},{race:function(e){var r=this,n=Bd.f(r),i=n.reject,t=Kd(function(){var t=jd(r.resolve);Hd(e,function(e){Vd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function Gd(e,t){return qd(e),Yd(t)&&t.constructor===e?t:((0,(e=Wd.f(e)).resolve)(t),e.promise)}var zd=G,Jd=Gl,qd=(g({target:"Promise",stat:!0,forced:Fa.CONSTRUCTOR},{reject:function(e){var t=Jd.f(this);return zd(t.reject,void 0,e),t.promise}}),Ns),Yd=vs,Wd=Gl,E=g,C=gs,e=Fa.CONSTRUCTOR,$d=Gd;C("Promise"),E({target:"Promise",stat:!0,forced:e},{resolve:function(e){return $d(this,e)}});var Xd=G,Zd=Es,Qd=Gl,ey=gh,ty=lp;g({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Qd.f(a),u=t.resolve,r=t.reject,n=ey(function(){var n=Zd(a.resolve),i=[],o=0,s=1;ty(e,function(e){var t=o++,r=!1;s++,Xd(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 ry(i){return function(e,t){var r,e=vy(gy(e)),t=yy(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=Ey(e,t))<55296||56319<r||t+1===n||(n=Ey(e,t+1))<56320||57343<n?i?my(e,t):r:i?wy(e,t,t+2):n-56320+(r-55296<<10)+65536}}var ny=G,iy=Es,oy=gs,sy=Gl,ay=gh,uy=lp,cy="No one promise resolved",R=(g({target:"Promise",stat:!0},{any:function(e){var u=this,c=oy("AggregateError"),t=sy.f(u),p=t.resolve,l=t.reject,r=ay(function(){var n=iy(u.resolve),i=[],o=0,s=1,a=!1;uy(e,function(e){var t=o++,r=!1;s++,ny(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,cy)))})}),--s||l(new c(i,cy))});return r.error&&l(r.value),t.promise}}),g),O=P,t=ps,py=gs,ly=ys,fy=Nf,hy=Gd,w=Ps,dy=O&&O.prototype,M=(R({target:"Promise",proto:!0,real:!0,forced:!!O&&t(function(){dy.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=fy(this,py("Promise")),e=ly(t);return this.then(e?function(e){return hy(r,t()).then(function(){return e})}:t,e?function(e){return hy(r,t()).then(function(){throw e})}:t)}}),ly(O)&&(S=py("Promise").prototype.finally,dy.finally!==S&&w(dy,"finally",S,{unsafe:!0})),m),yy=Ms,vy=fp,gy=hs,my=M("".charAt),Ey=M("".charCodeAt),wy=M("".slice),by={codeAt:ry(!1),charAt:ry(!0)}.charAt,Ty=fp,Vp=H,I=Hl,_y="String Iterator",Iy=Vp.set,Ay=Vp.getterFor(_y);I(String,"String",function(e){Iy(this,{type:_y,string:Ty(e),index:0})},function(){var e=Ay(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=by(t,r),e.index+=t.length,{value:t,done:!1})});function Oy(t,e){if(t){if(t[Cy]!==Uy)try{Ry(t,Cy,Uy)}catch(e){t[Cy]=Uy}if(t[xy]||Ry(t,xy,e),Py[e])for(var r in My)if(t[r]!==My[r])try{Ry(t,r,My[r])}catch(e){t[r]=My[r]}}}var Ny,Fa=r,C=Fa.Promise,E=Os("span").classList,e=E&&E.constructor&&E.constructor.prototype,P=e===Object.prototype?void 0:e,Sy=r,Py={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},R=P,My=Ol,Ry=b,t=Is,Cy=t("iterator"),xy=t("toStringTag"),Uy=My.values;for(Ny in Py)Oy(Sy[Ny]&&Sy[Ny].prototype,Ny);Oy(R,"DOMTokenList");var O,w,S=w=O=C,M,ky=Gl,Dy=gh,Ly=((M=g)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=ky.f(this),e=Dy(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),Ns),Fy=cp,Vy=As,jy=Da,By=ls,Vp,Ky=op,Hy=G,Gy=Ts,zy=function(t,e,r,n){try{return n?e(Ly(r)[0],r[1]):e(r)}catch(e){Fy(t,"throw",e)}},Jy=sp,qy=N,Yy=Cs,Wy=Vp=function(e,t,r){t=Vy(t);t in e?jy.f(e,t,By(0,r)):e[t]=r},$y=up,Xy=ap,Zy=Array,I=g,E=function(e){var t,r,n,i,o,s,a=Gy(e),e=qy(this),u=arguments.length,c=1<u?arguments[1]:void 0,p=void 0!==c,u=(p&&(c=Ky(c,2<u?arguments[2]:void 0)),Xy(a)),l=0;if(!u||this===Zy&&Jy(u))for(t=Yy(a),r=e?new this(t):Zy(t);l<t;l++)s=p?c(a[l],l):a[l],Wy(r,l,s);else for(o=(i=$y(a,u)).next,r=e?new this:[];!(n=Hy(o,i)).done;l++)s=p?zy(i,c,[n.value,l],!0):n.value,Wy(r,l,s);return r.length=l,r},e,P=!(e=Cd)(function(e){Array.from(e)}),Qy=(I({target:"Array",stat:!0,forced:P},{from:E}),fs),Ol=Array.isArray||function(e){return"Array"==Qy(e)},b,t,R=((b=g)({target:"Array",stat:!0},{isArray:t=Ol}),g),C=ps,ev=N,tv=Vp,rv=Array,O=C(function(){function e(){}return!(rv.of.call(e)instanceof e)}),nv=(R({target:"Array",stat:!0,forced:O},{of:function(){for(var e=0,t=arguments.length,r=new(ev(this)?this:rv)(t);e<t;)tv(r,e,arguments[e++]);return r.length=t,r}}),Ts),iv=Cs,ov=Ms,w=dp,sv=(g({target:"Array",proto:!0},{at:function(e){var t=nv(this),r=iv(t),e=ov(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),w("at"),TypeError),S=function(e){if(9007199254740991<e)throw sv("Maximum allowed index exceeded");return e},av=Ol,uv=N,cv=vs,pv=Is("species"),lv=Array,fv=function(e){var t;return av(e)&&(t=e.constructor,(uv(t)&&(t===lv||av(t.prototype))||cv(t)&&null===(t=t[pv]))&&(t=void 0)),void 0===t?lv:t},Gl=function(e,t){return new(fv(e))(0===t?0:t)},hv=ps,dv=ca,yv=Is("species"),M,e=g,I=ps,vv=Ol,gv=vs,mv=Ts,Ev=Cs,wv=S,bv=Vp,Tv=Gl,P=M=function(t){return 51<=dv||!hv(function(){var e=[];return(e.constructor={})[yv]=function(){return{foo:1}},1!==e[t](Boolean).foo})},E=ca,_v=Is("isConcatSpreadable"),b=51<=E||!I(function(){var e=[];return e[_v]=!1,e.concat()[0]!==e}),t=P("concat"),Iv=(e({target:"Array",proto:!0,arity:1,forced:!b||!t},{concat:function(e){for(var t,r,n,i=mv(this),o=Tv(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!gv(e))return!1;var t=e[_v];return void 0!==t?!!t:vv(e)}(n=-1===a?i:arguments[a]))for(r=Ev(n),wv(s+r),t=0;t<r;t++,s++)t in n&&bv(o,s,n[t]);else wv(s+1),bv(o,s++,n);return o.length=s,o}}),ms),Av=TypeError,C,Ov=Ts,Nv=Rs,Sv=Cs,Pv=C=function(e,t){if(!delete e[t])throw Av("Cannot delete property "+Iv(t)+" of "+Iv(e))},Mv=Math.min,R=dp,Rv=(g({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=Ov(this),n=Sv(r),i=Nv(e,n),o=Nv(t,n),e=2<arguments.length?arguments[2]:void 0,s=Mv((void 0===e?n:Nv(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]:Pv(r,i),i+=a,o+=a;return r}}),R("copyWithin"),op),Cv=qs,xv=Ts,Uv=Cs,kv=Gl,Dv=m([].push),O,w={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=xv(e),a=Cv(s),u=Rv(t,r),c=Uv(a),p=0,t=n||kv,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:Dv(l,i)}else switch(f){case 4:return!1;case 7:Dv(l,i)}return g?-1:y||v?v:l}})(0),map:O(1),filter:O(2),some:O(3),every:O(4),find:O(5),findIndex:O(6),filterReject:O(7)},Lv=ps,E=function(e,t){var r=[][e];return!!r&&Lv(function(){r.call(null,t||function(){return 1},1)})},I=g,Fv=w.every,Vv=(I({target:"Array",proto:!0,forced:!E("every")},{every:function(e){return Fv(this,e,1<arguments.length?arguments[1]:void 0)}}),Ts),jv=Rs,Bv=Cs,P=dp,e=(g({target:"Array",proto:!0},{fill:function(e){for(var t=Vv(this),r=Bv(t),n=arguments.length,i=jv(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:jv(n,r);i<o;)t[i++]=e;return t}}),P("fill"),g),Kv=w.filter,b=(e({target:"Array",proto:!0,forced:!M("filter")},{filter:function(e){return Kv(this,e,1<arguments.length?arguments[1]:void 0)}}),g),Hv=w.find,t=dp,R,Gv=!0,O=((R="find")in[]&&Array(1)[R](function(){Gv=!1}),b({target:"Array",proto:!0,forced:Gv},{find:function(e){return Hv(this,e,1<arguments.length?arguments[1]:void 0)}}),t(R),g),zv=w.findIndex,I=dp,P,Jv=!0,qv=((P="findIndex")in[]&&Array(1)[P](function(){Jv=!1}),O({target:"Array",proto:!0,forced:Jv},{findIndex:function(e){return zv(this,e,1<arguments.length?arguments[1]:void 0)}}),I(P),op),Yv=qs,Wv=Ts,$v=Cs,e,b={findLast:(e=function(u){var c=1==u;return function(e,t,r){for(var n,i=Wv(e),o=Yv(i),s=qv(t,r),a=$v(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,Xv=b.findLast,R=dp,O=(t({target:"Array",proto:!0},{findLast:function(e){return Xv(this,e,1<arguments.length?arguments[1]:void 0)}}),R("findLast"),g),Zv=b.findLastIndex,I=dp,Qv=(O({target:"Array",proto:!0},{findLastIndex:function(e){return Zv(this,e,1<arguments.length?arguments[1]:void 0)}}),I("findLastIndex"),Ol),eg=Cs,tg=S,rg=op,ng=function(e,t,r,n,i,o,s,a){for(var u,c,p=i,l=0,f=!!s&&rg(s,a);l<n;)l in r&&(u=f?f(r[l],l,t):r[l],0<o&&Qv(u)?(c=eg(u),p=ng(e,t,u,c,p,o-1)-1):(tg(p+1),e[p]=u),p++),l++;return p},P,ig=P=ng,og=Ts,sg=Cs,ag=Ms,ug=Gl;g({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=og(this),r=sg(t),n=ug(t,0);return n.length=ig(n,t,t,r,0,void 0===e?1:ag(e)),n}});function cg(c){return function(e,t,r,n){kg(t);var i=Dg(e),o=Lg(i),s=Fg(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 Vg("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 pg(e,t,r){for(var n=nm(e),i=rm(t,n),o=rm(void 0===r?n:r,n),s=om(sm(o-i,0)),a=0;i<o;i++,a++)im(s,a,e[i]);return s.length=a,s}function lg(e,t){var r=e.length,n=um(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=lg(am(e,0,n),t),f=lg(am(e,n),t),h=t,d=l.length,y=f.length,v=0,g=0;v<d||g<y;)p[v+g]=v<d&&g<y?h(l[v],f[g])<=0?l[v++]:f[g++]:v<d?l[v++]:f[g++];return p}var fg=P,hg=Es,dg=Ts,yg=Cs,vg=Gl,gg=(g({target:"Array",proto:!0},{flatMap:function(e){var t,r=dg(this),n=yg(r);return hg(e),(t=vg(r,0)).length=fg(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),w.forEach),e=E("forEach")?[].forEach:function(e){return gg(this,e,1<arguments.length?arguments[1]:void 0)},t=(g({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e}),g),mg=xu.includes,R=dp,b=(t({target:"Array",proto:!0,forced:ps(function(){return!Array(1).includes()})},{includes:function(e){return mg(this,e,1<arguments.length?arguments[1]:void 0)}}),R("includes"),g),O=m,Eg=xu.indexOf,I=E,wg=O([].indexOf),bg=!!wg&&1/wg([1],1,-0)<0,P=I("indexOf"),e=(b({target:"Array",proto:!0,forced:bg||!P},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return bg?wg(this,e,t)||0:Eg(this,e,t)}}),g),t=qs,Tg=ds,R=E,_g=m([].join),xu=t!=Object,O=R("join",","),Ig=(e({target:"Array",proto:!0,forced:xu||!O},{join:function(e){return _g(Tg(this),void 0===e?",":e)}}),Vl),Ag=ds,Og=Ms,Ng=Cs,I=E,Sg=Math.min,Pg=[].lastIndexOf,Mg=!!Pg&&1/[1].lastIndexOf(1,-0)<0,b=I("lastIndexOf"),P=Mg||!b?function(e){if(Mg)return Ig(Pg,this,arguments)||0;var t=Ag(this),r=Ng(t),n=r-1;for((n=1<arguments.length?Sg(n,Og(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:Pg,t=(g({target:"Array",proto:!0,forced:P!==[].lastIndexOf},{lastIndexOf:P}),g),Rg=w.map,R=(t({target:"Array",proto:!0,forced:!M("map")},{map:function(e){return Rg(this,e,1<arguments.length?arguments[1]:void 0)}}),g),Cg=Ts,xg=Cs,Ug=S,e=ps(function(){return 4294967297!==[].push.call({length:4294967296},1)}),xu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),kg=(R({target:"Array",proto:!0,arity:1,forced:e||xu},{push:function(e){var t=Cg(this),r=xg(t),n=arguments.length;Ug(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),Es),Dg=Ts,Lg=qs,Fg=Cs,Vg=TypeError,O={left:cg(!1),right:cg(!0)},Vl=g,jg=O.left,I=ca,b=_l,P=(Vl({target:"Array",proto:!0,forced:!E("reduce")||!b&&79<I&&I<83},{reduce:function(e){var t=arguments.length;return jg(this,e,t,1<t?arguments[1]:void 0)}}),g),Bg=O.right,t=ca,R=_l,e=(P({target:"Array",proto:!0,forced:!E("reduceRight")||!R&&79<t&&t<83},{reduceRight:function(e){return Bg(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),g),Kg=Ol,Hg=m([].reverse),xu=[1,2],Vl=(e({target:"Array",proto:!0,forced:String(xu)===String(xu.reverse())},{reverse:function(){return Kg(this)&&(this.length=this.length),Hg(this)}}),g),Gg=Ol,zg=N,Jg=vs,qg=Rs,Yg=Cs,Wg=ds,$g=Vp,b=Is,Xg=_,I=M("slice"),Zg=b("species"),Qg=Array,em=Math.max,O=(Vl({target:"Array",proto:!0,forced:!I},{slice:function(e,t){var r,n,i,o=Wg(this),s=Yg(o),a=qg(e,s),u=qg(void 0===t?s:t,s);if(Gg(o)&&(r=o.constructor,(r=zg(r)&&(r===Qg||Gg(r.prototype))||Jg(r)&&null===(r=r[Zg])?void 0:r)===Qg||void 0===r))return Xg(o,a,u);for(n=new(void 0===r?Qg:r)(em(u-a,0)),i=0;a<u;a++,i++)a in o&&$g(n,i,o[a]);return n.length=i,n}}),g),tm=w.some,rm=(O({target:"Array",proto:!0,forced:!E("some")},{some:function(e){return tm(this,e,1<arguments.length?arguments[1]:void 0)}}),Rs),nm=Cs,im=Vp,om=Array,sm=Math.max,am=pg,um=Math.floor,_l=lg,P=aa.match(/firefox\/(\d+)/i),R=!!P&&+P[1],t=/MSIE|Trident/.test(aa),e=aa.match(/AppleWebKit\/(\d+)\./),xu=!!e&&+e[1],_=g,b=m,cm=Es,pm=Ts,lm=Cs,fm=C,hm=fp,Vl=ps,dm=_l,I=E,ym=R,vm=t,gm=ca,mm=xu,Em=[],wm=b(Em.sort),bm=b(Em.push),O=Vl(function(){Em.sort(void 0)}),P=Vl(function(){Em.sort(null)}),aa=I("sort"),Tm=!Vl(function(){if(gm)return gm<70;if(!(ym&&3<ym)){if(vm)return!0;if(mm)return mm<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++)Em.push({k:e+r,v:t})}for(Em.sort(function(e,t){return t.v-e.v}),r=0;r<Em.length;r++)e=Em[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});_({target:"Array",proto:!0,forced:O||!P||!aa||!Tm},{sort:function(e){void 0!==e&&cm(e);var t=pm(this);if(Tm)return void 0===e?wm(t):wm(t,e);for(var r,n,i=[],o=lm(t),s=0;s<o;s++)s in t&&bm(i,t[s]);for(dm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:hm(e)>hm(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)fm(t,s++);return t}});Tf("Array");var e=g,_m=Ts,Im=Rs,Am=Ms,Om=Cs,Nm=S,Sm=Gl,Pm=Vp,Mm=C,_l=M("splice"),Rm=Math.max,Cm=Math.min;e({target:"Array",proto:!0,forced:!_l},{splice:function(e,t){var r,n,i,o,s,a,u=_m(this),c=Om(u),p=Im(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-p):(r=e-2,Cm(Rm(Am(t),0),c-p)),Nm(c+r-n),i=Sm(u,n),o=0;o<n;o++)(s=p+o)in u&&Pm(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}}),dp("flat");dp("flatMap");var R=g,xm=Ts,Um=Cs,km=C,Dm=S,t=1!==[].unshift(0),ca=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();R({target:"Array",proto:!0,arity:1,forced:t||ca},{unshift:function(e){var t=xm(this),r=Um(t),n=arguments.length;if(n){Dm(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:km(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});Fa.Array;var xu={exports:{}},b={},Lm=fs,Fm=ds,Vm=pa.f,jm=pg,Bm="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];b.f=function(e){if(!Bm||"Window"!=Lm(e))return Vm(Fm(e));try{return Vm(e)}catch(e){return jm(Bm)}};function Km(e){eE(e,sE,{value:{objectID:"O"+aE++,weakData:{}}})}function Hm(e,t,r){for(var n in t)OE(e,n,t[n],r);return e}function Gm(e,t){for(var r=0,n=VE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function zm(e,t,r,n){for(var i,o,s,a=KE(e),u=BE(a),c=jE(t,r),p=zE(null),l=GE(u),f=0;f<l;f++)s=u[f],(o=HE(c(s,f,a)))in p?YE(p[o],s):p[o]=[s];if(n&&(i=n(a))!==qE)for(o in p)p[o]=JE(i,p[o]);return p}var I=ps(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),Vl=ps,Jm=vs,qm=fs,Ym=I,Wm=Object.isExtensible,_=Vl(function(){Wm(1)})||Ym?function(e){return!!Jm(e)&&((!Ym||"ArrayBuffer"!=qm(e))&&(!Wm||Wm(e)))}:Wm,O=!ps(function(){return Object.isExtensible(Object.preventExtensions({}))}),$m=g,Xm=m,P=Ou,Zm=vs,Qm=Na,eE=Da.f,tE=pa,rE=b,nE=_,iE=O,oE=!1,sE=_s("meta"),aE=0,uE=xu.exports={enable:function(){uE.enable=function(){},oE=!0;var i=tE.f,o=Xm([].splice),e={};e[sE]=1,i(e).length&&(tE.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===sE){o(t,r,1);break}return t},$m({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:rE.f}))},fastKey:function(e,t){if(!Zm(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Qm(e,sE)){if(!nE(e))return"F";if(!t)return"E";Km(e)}return e[sE].objectID},getWeakData:function(e,t){if(!Qm(e,sE)){if(!nE(e))return!0;if(!t)return!1;Km(e)}return e[sE].weakData},onFreeze:function(e){return iE&&oE&&nE(e)&&!Qm(e,sE)&&Km(e),e}},cE=(P[sE]=!0,ys),pE=vs,lE=$c,fE=g,hE=r,dE=m,yE=Cu,vE=Ps,gE=xu.exports,mE=lp,EE=_f,wE=ys,bE=vs,TE=ps,_E=Cd,IE=jl,AE=function(e,t,r){return lE&&cE(t=t.constructor)&&t!==r&&pE(t=t.prototype)&&t!==r.prototype&&lE(e,t),e},OE=Ps,NE=Da.f,SE=A,PE=Hm,ME=op,RE=_f,CE=lp,xE=Hl,UE=Tf,kE=ee,DE=xu.exports.fastKey,LE=H.set,FE=H.getterFor,VE=(function(e,t,r){function n(e){var r=dE(h[e]);vE(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(p&&!bE(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return p&&!bE(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(p&&!bE(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=hE[e],h=f&&f.prototype,d=f,y={};return yE(e,!wE(f)||!(p||h.forEach&&!TE(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,l),gE.enable()):yE(e,!0)&&(o=(i=new d)[l](p?{}:-0,1)!=i,s=TE(function(){i.has(1)}),a=_E(function(e){new f(e)}),u=!p&&TE(function(){for(var e=new f,t=5;t--;)e[l](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){EE(e,h);e=AE(new f,e,d);return null!=t&&mE(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),y[e]=d,fE({global:!0,constructor:!0,forced:d!=f},y),IE(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=DE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),kE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=DE(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key==t)return r}var e=e(function(e,t){RE(e,a),LE(e,{type:r,index:SE(null),first:void 0,last:void 0,size:0}),kE||(e.size=0),null!=t&&CE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=FE(r);return PE(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,kE?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),kE?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)}}),PE(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)}}),kE&&NE(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=FE(t),o=FE(n);xE(e,t,function(e,t){LE(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),UE(t)}}),Cs),jE=op,BE=qs,KE=Ts,HE=As,GE=Cs,zE=A,JE=Gm,qE=Array,YE=m([].push),WE=zm,aa=dp;g({target:"Array",proto:!0},{group:function(e){return WE(this,e,1<arguments.length?arguments[1]:void 0)}}),aa("group");var $E=zm,Vp=dp;g({target:"Array",proto:!0,forced:!E("groupBy")},{groupBy:function(e){return $E(this,e,1<arguments.length?arguments[1]:void 0)}}),Vp("groupBy");function XE(e){for(var t,r,n=ew(this),i=QE(n),o=ZE(e,1<arguments.length?arguments[1]:void 0),s=new rw,a=tw(i),u=0;u<a;u++)t=o(r=i[u],u,n),iw(s,t)?sw(nw(s,t),r):ow(s,t,[r]);return s}var ZE=op,M=m,QE=qs,ew=Ts,tw=Cs,rw=gs("Map"),e=rw.prototype,nw=M(e.get),iw=M(e.has),ow=M(e.set),sw=M([].push),_l=dp,C=XE;g({target:"Array",proto:!0,name:"groupToMap",forced:!E("groupByToMap")},{groupByToMap:C}),_l("groupByToMap");function aw(e){return fw[e].prototype}var R=dp,uw=(g({target:"Array",proto:!0},{groupToMap:XE}),R("groupToMap"),Cs),cw=function(e,t){for(var r=uw(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},pw=ds,t=dp,lw=Array,fw=(g({target:"Array",proto:!0},{toReversed:function(){return cw(pw(this),lw)}}),t("toReversed"),r),ca=g,hw=Es,dw=ds,yw=Gm,Fa=dp,vw=Array,gw=m(aw("Array").sort),I=(ca({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&hw(e);var t=dw(this),t=yw(vw,t);return gw(t,e)}}),Fa("toSorted"),g),Vl=dp,mw=S,Ew=Cs,ww=Rs,bw=ds,Tw=Ms,_w=Array,Iw=Math.max,Aw=Math.min,Ow=(I({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=bw(this),a=Ew(s),u=ww(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,Aw(Iw(Tw(t),0),a-u)),i=mw(a+r-n),o=_w(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}}),Vl("toSpliced"),Cs),Nw=Ms,Sw=RangeError,Pw=function(e,t,r,n){var i=Ow(e),r=Nw(r),o=r<0?i+r:r;if(i<=o||o<0)throw Sw("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},Mw=ds,Rw=Array;g({target:"Array",proto:!0},{with:function(e,t){return Pw(Mw(this),Rw,e,t)}});Ou=r,Na=T,pa=ys,b=Du,_=Ps,O="USE_FUNCTION_CONSTRUCTOR",P=Is("asyncIterator"),$c=Ou.AsyncIterator,Cu=Na.AsyncIteratorPrototype;if(Cu)UT=Cu;else if(pa($c))UT=$c.prototype;else if(Na[O]||Ou[O])try{AT=b(b(b(Function("return async function*(){}()")()))),b(AT)===Object.prototype&&(UT=AT)}catch(e){}pa((UT=UT||{})[P])||_(UT,P,function(){return this});function Cw(e,t,r){var n=e.done;jw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function xw(e){Kw(this,{type:Bw,iterator:Fw(e),next:e.next})}function Uw(e){var f=0==e,h=1==e,d=2==e,y=3==e;return function(e,s,a){var e=sb(e),u=ob("Promise"),c=e.iterator,t=e.next,p=0,l=void 0!==s;return!l&&f||rb(s),new u(function(r,n){var i=function(e){ab(c,n,e,n)},o=function(){try{if(f&&l)try{ib(p)}catch(e){i(e)}u.resolve(nb(tb(t,c))).then(function(e){try{if(nb(e).done)f?(a.length=p,r(a)):r(!y&&(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():ab(c,r,!1,n);else if(f)try{a[p++]=e,o()}catch(e){i(e)}else e?ab(c,r,y||t,n):o()},i):(a[p++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function kw(e,t){if(!_b||!Tb(e)||!_b(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 Dw(e,t,r){return r.get&&Ib(r.get,t,{getter:!0}),r.set&&Ib(r.set,t,{setter:!0}),Ab.f(e,t,r)}var Lw=G,Fw=Ns,xu=A,Vw=ws,aa=Hm,Vp=H,qs=UT,jw=gs("Promise"),Bw="AsyncFromSyncIterator",Kw=Vp.set,Hw=Vp.getterFor(Bw),e=(xw.prototype=aa(xu(qs),{next:function(){var n=Hw(this);return new jw(function(e,t){var r=Fw(Lw(n.next,n.iterator));Cw(r,e,t)})},return:function(){var n=Hw(this).iterator;return new jw(function(e,t){var r=Vw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=Fw(Lw(r,n));Cw(r,e,t)})}}),xw),Gw=G,zw=e,Jw=Ns,qw=up,Yw=ws,Ww=Is("asyncIterator"),$w=Es,Xw=Ns,Zw=G,Qw=gs,eb=ws,tb=G,rb=Es,nb=Ns,ib=S,ob=gs,sb=function(e){return{iterator:e,next:$w(Xw(e).next)}},ab=function(e,t,r,n){try{var i=eb(e,"return");if(i)return Qw("Promise").resolve(Zw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},M={toArray:Uw(0),forEach:Uw(1),every:Uw(2),some:Uw(3),find:Uw(4)},ub=op,cb=Ts,pb=N,lb=function(e,t){t=arguments.length<2?Yw(e,Ww):t;return t?Jw(Gw(t,e)):new zw(qw(e))},fb=up,hb=ap,db=ws,E=aw,yb=gs,C=Is,vb=e,gb=M.toArray,mb=C("asyncIterator"),Eb=E("Array").values,_l=(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(yb("Promise"))(function(e){var t=cb(o),r=(void 0!==a&&(a=ub(a,u)),db(t,mb)),n=r?void 0:hb(t)||Eb,i=pb(s)?new s:[],r=r?lb(t,r):new vb(fb(t,n));e(gb(r,a,i))})}}),g),wb=w.filterReject,R=dp,t=(_l({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return wb(this,e,1<arguments.length?arguments[1]:void 0)}}),R("filterOut"),g),bb=w.filterReject,ca=dp,Fa=(t({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return bb(this,e,1<arguments.length?arguments[1]:void 0)}}),ca("filterReject"),g),Tb=Ol,_b=Object.isFrozen,Ib=(Fa({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!kw(e,!0))return!1;var t=e.raw;return t.length===e.length&&kw(t,!1)}}),ua.exports),Ab=Da,I=dp,Ob=Ts,Nb=Cs;ee&&(Dw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=Ob(this),t=Nb(e);return 0==t?void 0:e[t-1]},set:function(e){var t=Ob(this),r=Nb(t);return t[0==r?0:r-1]=e}}),I("lastItem"));var Vl=dp,Sb=Ts,Pb=Cs;ee&&(Dw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=Sb(this),e=Pb(e);return 0==e?0:e-1}}),Vl("lastIndex"));var r=m,Mb=Es,Rb=Cs,Cb=Ts,xb=Gl,Ub=gs("Map"),T=Ub.prototype,kb=r(T.forEach),Db=r(T.has),Lb=r(T.set),Fb=r([].push),Du=dp;g({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=Cb(this),i=Rb(n),o=xb(n,0),s=new Ub,a=null!=e?Mb(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),Db(s,r)||Lb(s,r,t);return kb(s,function(e){Fb(o,e)}),o}}),Du("uniqueBy");jb.exposure=function(e,t,r,n){return new Kb(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},jb.track=function(e,t,r,n){return new zb(n,r,e,t)},jb.remoteConfig=function(e,t,r,n){return new Yb(n,e,t.parameter,t.valueId,t.reason,r)},jb.isExposureEvent=function(e){return void 0!==e.experiment},jb.isTrackEvent=function(e){return void 0!==e.eventType},jb.isRemoteConfigEvent=function(e){return void 0!==e.parameter},jb.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},jb.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},jb.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},jb.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 Vb=jb;function jb(e,t,r){void 0===r&&(r=K()),this.timestamp=e,this.user=t,this.insertId=r}i(Hb,Bb=Vb),Hb.prototype.copyWithUser=function(e){return new Hb(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},Hb.prototype.toDto=function(){return c(c({},Bb.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 Bb,Kb=Hb;function Hb(e,t,r,n,i,o,s,a){e=Bb.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}i(Jb,Gb=Vb),Jb.prototype.copyWithUser=function(e){return new Jb(this.timestamp,e,this.eventType,this.event,this.insertId)},Jb.prototype.toDto=function(){return c(c({},Gb.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:Ue.sanitize(this.event.properties)})};var Gb,zb=Jb;function Jb(e,t,r,n,i){e=Gb.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}i(Wb,qb=Vb),Wb.prototype.copyWithUser=function(e){return new Wb(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},Wb.prototype.toDto=function(){return c(c({},qb.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 qb,Yb=Wb;function Wb(e,t,r,n,i,o,s){e=qb.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}Xb.isSessionEvent=function(e){return!!Vb.isTrackEvent(e)&&(e.event.key===Xb.SESSION_START_EVENT_NAME||e.event.key===Xb.SESSION_END_EVENT_NAME)},Xb.prototype.onSessionStarted=function(e,t,r){this.track(Xb.SESSION_START_EVENT_NAME,e,t,r)},Xb.prototype.onSessionEnded=function(e,t,r){this.track(Xb.SESSION_END_EVENT_NAME,e,t,r)},Xb.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)},Xb.prototype.decorateSession=function(e,t){t=(new Ht).add(jt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},Xb.SESSION_START_EVENT_NAME="$session_start",Xb.SESSION_END_EVENT_NAME="$session_end";var $b=Xb;function Xb(e,t){this.userManager=e,this.core=t}Qb.prototype.addDecorator=function(e){this.decorators.push(e)},Qb.prototype.process=function(e){$b.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=this.decorators.reduce(function(e,t){return t.decorate(e)},e),this.delegate.process(e))},Qb.prototype.flush=function(e){this.delegate.flush(e)},Qb.prototype.close=function(){this.delegate.close()},Qb.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 Zb=Qb;function Qb(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n,this.decorators=[]}t0.toEvent=function(e){var t;return{key:t0.EVENT_KEY,properties:{level:t0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:t0._stacktrace(e)}}},t0._stacktrace=function(e){return u.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,t0.STACK_TRACK_LIMIT).join("\n")},t0.EVENT_KEY="$trace",t0.LEVEL_ERROR="error",t0.STACK_TRACK_LIMIT=30;var e0=t0;function t0(){}r0.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)}};Cu=r0;function r0(){}i0.prototype.with=function(e){return new i0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},i0.of=function(e,t,r,n){return new i0(n,t.targetEvaluations,e.experiment,r.id,r.key,r.config)},i0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return u.isNotNullOrUndefined(n)?this.of(e,t,n,r):new i0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)};var n0=i0;function i0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}i(a0,o0=Cu),a0.prototype.supports=function(e){return void 0!==e.experiment},a0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.experimentFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:n0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var o0,s0=a0;function a0(e){var t=o0.call(this)||this;return t.experimentFlowFactory=e,t}c0.of=function(e,t,r,n,i,o){return o.returnValue=Ue.truncateStringValue(n),new c0(i,t.targetEvaluations,e.parameter,r,n,o)},c0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var u0=c0;function c0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}i(f0,p0=Cu),f0.prototype.supports=function(e){return void 0!==e.parameter},f0.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 u0.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)},f0.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?u0.ofDefault(e,t,h.TYPE_MISMATCH,i):u0.of(e,t,r.id,r.rawValue,n,i)};var p0,l0=f0;function f0(e){var t=p0.call(this)||this;return t.targetRuleDeterminer=e,t}d0.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var h0=d0;function d0(e,t){this.type=e,this.id=t}v0.create=function(){return new v0},Object.defineProperty(v0.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(v0.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(v0.prototype,"properties",{get:function(){return Ue.sanitize(this._properties)},enumerable:!1,configurable:!0}),v0.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},v0.prototype.addRequest=function(e){this._stack.push(e)},v0.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},v0.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof n0&&e.experiment.id===t.id})},v0.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},v0.prototype.setProperty=function(e,t){this._properties[e]=t},v0.prototype.get=function(e){var t=this.map.get(e);if(!t)return null;if(t instanceof e)return t;throw new Error("Context does not contain a value of type ".concat(e.name))},v0.prototype.set=function(e,t){this.map.set(e,t)};var y0=v0;function v0(){this._stack=[],this._targetEvaluations=[],this._properties={},this.map=new WeakMap}m0.of=function(e,t,r,n){return new m0(e,t,r,n)},m0.by=function(e,t){return new m0(e.workspace,e.user,t,"A")},m0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var g0=m0;function m0(e,t,r,n){this.key=new h0("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}w0.of=function(e,t,r,n,i){return new w0(e,t,r,n,i)},w0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var E0=w0;function w0(e,t,r,n,i){this.key=new h0("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}b0.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();case"boolean":return e?"true":"false";default:return}},b0.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},b0.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}},b0.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var x=b0;function b0(){}_0.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 T0=_0;function _0(e){this.storages=e}A0.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},A0.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return x.asNumber(e)},A0.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=x.asNumber(t),e=x.asNumber(e);u.isNullOrUndefined(t)||t<0||u.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},A0.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},A0.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},A0.prototype.clear=function(){this.listStorage.clear()};var I0=A0;function A0(e){this.listStorage=e}N0.prototype.add=function(e){this.evaluators.push(e)},N0.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 O0=N0;function N0(){this.evaluators=new Array}P0.get=function(e){return u.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},P0.getOrNull=function(e){return P0.instances.get(e)},P0.register=function(e,t){return P0.instances.set(e,t),t},P0.instances=new Map;var S0=P0;function P0(){}R0.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},R0.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 M0=R0;function R0(e,t){this.targetMatcher=e,this.bucketer=t}x0.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},x0.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},x0.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 C0=x0;function x0(e){this.bucketer=e}k0.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},k0.end=function(){return new k0(void 0,void 0)},k0.decision=function(e,t){return new k0(e,t)},k0.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 U0=k0;function k0(e,t){this.flowEvaluator=e,this.nextFlow=t}L0.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 n0.of(e,t,n,h.OVERRIDDEN);case"FEATURE_FLAG":return n0.of(e,t,n,h.INDIVIDUAL_TARGET_MATCH)}};var D0=L0;function L0(e){this.overrideResolver=e}V0.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?n0.ofDefault(e,t,h.EXPERIMENT_DRAFT):r.evaluate(e,t)};var F0=V0;function V0(){}B0.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return n0.ofDefault(e,t,h.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return n0.ofDefault(e,t,h.FEATURE_FLAG_INACTIVE)}};var j0=B0;function B0(){}H0.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return n0.of(e,t,r,h.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var K0=H0;function H0(){}z0.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):n0.ofDefault(e,t,h.NOT_IN_EXPERIMENT_TARGET)};var G0=z0;function z0(e){this.experimentTargetDeterminer=e}q0.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?n0.ofDefault(e,t,h.VARIATION_DROPPED):n0.of(e,t,n,h.TRAFFIC_ALLOCATED):n0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var J0=q0;function q0(e){this.actionResolver=e}W0.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 n0.of(e,t,r,h.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var Y0=W0;function W0(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}X0.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 n0.ofDefault(e,t,h.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return n0.of(e,t,n,h.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var $0=X0;function X0(e){this.actionResolver=e}Q0.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):n0.ofDefault(e,t,h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var Z0=Q0;function Q0(e){this.containerResolver=e}tT.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):n0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND)};var eT=tT;function tT(){}nT.prototype.isUserInExperimentTarget=function(t,r){var n=this;return 0===t.experiment.targetAudiences.length||t.experiment.targetAudiences.some(function(e){return n.targetMatcher.matches(t,r,e)})};var rT=nT;function nT(e){this.targetMatcher=e}oT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var iT=oT;function oT(e){this.targetMatcher=e}aT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},aT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},aT.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)}},aT.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 sT=aT;function aT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}cT.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 uT=cT;function cT(e){this.bucketer=e}lT.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}};var pT=lT;function lT(e,t,r){var n=new C0(t),e=new sT(e,r,n),t=new uT(t);this.abTestFlow=U0.of(new D0(e),new eT,new Z0(t),new G0(new rT(r)),new F0,new j0,new K0,new J0(n)),this.featureFlagFlow=U0.of(new F0,new j0,new K0,new D0(e),new eT,new Y0(new iT(r),n),new $0(n))}hT.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},hT.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},hT.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var fT=hT;function hT(e){this.conditionMatcherFactory=e}yT.prototype.decorate=function(e){return e};var dT=yT;function yT(){}gT.prototype.decorate=function(e){return"string"==typeof e?$o.decodeURIOrOriginal(e):e};var vT=gT;function gT(){}ET.prototype.matches=function(e,t,r){void 0===r&&(r=new dT);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)},ET.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)},ET.prototype.singleMatches=function(e,t,r,n,i){e=i.decorate(e),t=t.values.map(i.decorate);return n.matches(r,e,t)},ET.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},ET.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var mT=ET;function ET(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}wT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.inMatches(r,e)})};$c=wT;function wT(){}bT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.containsMatches(r,e)})};Na=bT;function bT(){}TT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.startsWithMatches(r,e)})};Ou=TT;function TT(){}_T.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.endsWithMatches(r,e)})};O=_T;function _T(){}IT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanMatches(r,e)})};b=IT;function IT(){}OT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanOrEqualMatches(r,e)})};var AT=OT;function OT(){}NT.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanMatches(r,e)})};pa=NT;function NT(){}ST.prototype.matches=function(t,r,e){return!u.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanOrEqualMatches(r,e)})};_=ST;function ST(){}PT.prototype.matches=function(e,t,r){return!u.isNullOrUndefined(t)};P=PT;function PT(){}RT.prototype.getMatcher=function(e){switch(e){case"IN":return RT.IN_MATCHER;case"CONTAINS":return RT.CONTAINS_MATCHER;case"STARTS_WITH":return RT.STARTS_WITH_MATCHER;case"ENDS_WITH":return RT.ENDS_WITH_MATCHER;case"GT":return RT.GT_MATCHER;case"GTE":return RT.GTE_MATCHER;case"LT":return RT.LT_MATCHER;case"LTE":return RT.LTE_MATCHER;case"EXISTS":return RT.EXISTS_MATCHER}},RT.IN_MATCHER=new $c,RT.CONTAINS_MATCHER=new Na,RT.STARTS_WITH_MATCHER=new Ou,RT.ENDS_WITH_MATCHER=new O,RT.GT_MATCHER=new b,RT.GTE_MATCHER=new AT,RT.LT_MATCHER=new pa,RT.LTE_MATCHER=new _,RT.EXISTS_MATCHER=new P;var MT=RT;function RT(){}CT.prototype.inMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},CT.prototype.containsMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.includes(t)},CT.prototype.startsWithMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.startsWith(t)},CT.prototype.endsWithMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.endsWith(t)},CT.prototype.greaterThanMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<e},CT.prototype.greaterThanOrEqualMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<=e},CT.prototype.lessThanMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<t},CT.prototype.lessThanOrEqualMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<=t};A=CT;function CT(){}xT.prototype.inMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},xT.prototype.containsMatches=function(e,t){return!1},xT.prototype.startsWithMatches=function(e,t){return!1},xT.prototype.endsWithMatches=function(e,t){return!1},xT.prototype.greaterThanMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<e},xT.prototype.greaterThanOrEqualMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&t<=e},xT.prototype.lessThanMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<t},xT.prototype.lessThanOrEqualMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e<=t};H=xT;function xT(){}kT.prototype.inMatches=function(e,t){e=x.asBoolean(e),t=x.asBoolean(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e===t},kT.prototype.containsMatches=function(e,t){return!1},kT.prototype.startsWithMatches=function(e,t){return!1},kT.prototype.endsWithMatches=function(e,t){return!1},kT.prototype.greaterThanMatches=function(e,t){return!1},kT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},kT.prototype.lessThanMatches=function(e,t){return!1},kT.prototype.lessThanOrEqualMatches=function(e,t){return!1};var UT=kT;function kT(){}DT.prototype.inMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isEqualTo(t)},DT.prototype.containsMatches=function(e,t){return!1},DT.prototype.startsWithMatches=function(e,t){return!1},DT.prototype.endsWithMatches=function(e,t){return!1},DT.prototype.greaterThanMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isGreaterThan(t)},DT.prototype.greaterThanOrEqualMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isGreaterThanOrEqualTo(t)},DT.prototype.lessThanMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isLessThan(t)},DT.prototype.lessThanOrEqualMatches=function(e,t){e=vr.tryParse(e),t=vr.tryParse(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&e.isLessThanOrEqualTo(t)};Vp=DT;function DT(){}LT.prototype.inMatches=function(e,t){e=$o.tryParse(e),t=x.asString(t);return!u.isNullOrUndefined(e)&&!u.isNullOrUndefined(t)&&$o.decodeURIOrOriginal($o.removePathnameTrailingSlash(e))===$o.decodeURIOrOriginal($o.removePathnameTrailingSlash(t))},LT.prototype.containsMatches=function(e,t){e=$o.tryParse(e),t=x.asString(t);if(u.isNullOrUndefined(e)||u.isNullOrUndefined(t))return!1;e=$o.decodeURIOrOriginal(e.href);return e.includes(t)||e.includes(encodeURI(t))},LT.prototype.startsWithMatches=function(e,t){e=$o.tryParse(e),t=x.asString(t);if(u.isNullOrUndefined(e)||u.isNullOrUndefined(t))return!1;e=$o.decodeURIOrOriginal(e.href);return e.startsWith(t)||e.startsWith(encodeURI(t))},LT.prototype.endsWithMatches=function(e,t){return!1},LT.prototype.greaterThanMatches=function(e,t){return!1},LT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},LT.prototype.lessThanMatches=function(e,t){return!1},LT.prototype.lessThanOrEqualMatches=function(e,t){return!1};aa=LT;function LT(){}FT.prototype.inMatches=function(e,t){return!1},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){return!1},FT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},FT.prototype.lessThanMatches=function(e,t){return!1},FT.prototype.lessThanOrEqualMatches=function(e,t){return!1};xu=FT;function FT(){}jT.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return jT.STRING_MATCHER;case"NUMBER":return jT.NUMBER_MATCHER;case"BOOLEAN":return jT.BOOLEAN_MATCHER;case"VERSION":return jT.VERSION_MATCHER;case"URL":return jT.URL_MATCHER;case"NULL":case"UNKNOWN":return jT.NULL_MATCHER}},jT.STRING_MATCHER=new A,jT.NUMBER_MATCHER=new H,jT.BOOLEAN_MATCHER=new UT,jT.VERSION_MATCHER=new Vp,jT.URL_MATCHER=new aa,jT.NULL_MATCHER=new xu;var VT=jT;function jT(){}KT.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)},KT.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?vT:dT)};var BT=KT;function KT(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}GT.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 HT=GT;function GT(){}JT.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}},JT.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 zT=JT;function JT(e){this.segmentMatcher=e}YT.prototype.matches=function(t,r,e){var n=this;return e.targets.some(function(e){return n._matches(t,r,e)})},YT.prototype._matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n.userConditionMatcher.matches(t,r,e)})};var qT=YT;function YT(e){this.userConditionMatcher=e}WT.prototype.evaluateInternal=function(e,t,r){r=g0.by(e,r),r=this.evaluator.evaluate(r,t);if(!(r instanceof n0))throw new Error("Unexpected evaluation [expected=ExperimentEvaluation, actual=".concat(r.constructor.name,"]"));e=this.resolve(e,t,r);return t.addEvaluation(e),e},WT.prototype.evaluate=function(e,t,r){var n;return null!=(n=t.getEvaluation(r))?n:this.evaluateInternal(e,t,r)};qs=WT;function WT(e){this.evaluator=e}XT.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 $T=XT;function XT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}i(QT,ZT=qs),QT.prototype.matches=function(e,t,r){var n=u.requiredNotNullOrUndefined(x.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;e=this.evaluate(e,t,n);return this.evaluationMatches(e,r)};var ZT,G=QT;function QT(e,t){e=ZT.call(this,e)||this;return e.valueOperatorMatcher=t,e}i(r_,e_=G),r_.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},r_.prototype.resolve=function(e,t,r){return r.reason===h.TRAFFIC_ALLOCATED?r.with(h.TRAFFIC_ALLOCATED_BY_TARGETING):r},r_.prototype.evaluationMatches=function(e,t){return!!r_.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},r_.AB_TEST_MATCHED_REASONS=[h.OVERRIDDEN,h.TRAFFIC_ALLOCATED,h.EXPERIMENT_COMPLETED,h.TRAFFIC_ALLOCATED_BY_TARGETING];var e_,t_=r_;function r_(e,t){return e_.call(this,e,t)||this}i(o_,n_=G),o_.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},o_.prototype.resolve=function(e,t,r){return r},o_.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var n_,i_=o_;function o_(e,t){return n_.call(this,e,t)||this}a_.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)},a_.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var s_=a_;function a_(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}c_.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,"]"))}},c_.prototype.properties=function(e){return Vb.isTrackEvent(e)?e.event.properties:Vb.isExposureEvent(e)||Vb.isRemoteConfigEvent(e)?e.properties:void 0};var u_=c_;function c_(){}l_.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 p_=l_;function l_(e){this.valueOperatorMatcher=e}h_.prototype.supports=function(e){return"NUMBER_OF_EVENTS_IN_DAYS"===e||"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"===e},h_.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 v_(this.valueOperatorMatcher,this.clock).matches(e,o,r);case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return new E_(this.valueOperatorMatcher,this.clock).matches(e,o,r);default:return i}};var f_=h_;function h_(e,t){this.valueOperatorMatcher=e,this.clock=t}function d_(){}i(g_,y_=d_),g_.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)},g_.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&null===e.property},g_.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var y_,v_=g_;function g_(e,t){var r=y_.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}i(w_,m_=d_),w_.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)},w_.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)},w_.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&this.propertyMatch(e.property,t.propertyFilter)},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}T_.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 b_=T_;function T_(e,t){var r=new mT(new VT,new MT);this.userConditionMatcher=new BT(new HT,r),this.eventConditionMatcher=new s_(new u_,r),this.segmentConditionMatcher=new zT(new qT(this.userConditionMatcher)),this.experimentConditionMatcher=new $T(new t_(e,r),new i_(e,r)),this.cohortConditionMatcher=new p_(r),this.userTargetConditionMatcher=new f_(r,t)}var __={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}},I_=(A_.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},A_.prototype.calculateSlotNumber=function(e,t,r){r=__.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},A_);function A_(){}var O_=a.log,N_=(S_.create=function(e,t,r,n){var i=Fe.instance,o=S0.register("delegatingEvaluator",new O0),s=new I_,i=S0.register("targetMatcher",new fT(new b_(o,i))),n=new T0(n),i=new M0(i,s),n=new pT(n,s,S0.get("targetMatcher")),s=new s0(n),n=new l0(i);return o.add(s),o.add(n),new S_(s,n,e,t,r,new P_)},S_.prototype.getExperiment=function(e){if(e){var t=this.workspaceFetcher.get();if(t)return t.getExperimentOrNull(e)}else O_.error("experimentKey must not be empty")},S_.prototype.experiment=function(e,t,r){var n=this;if(!e)return O_.error("experimentKey must not be empty"),bt.of(r,h.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return O_.warn("SDK not ready."),bt.of(r,h.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return O_.warn("Experiment does not exist."),bt.of(r,h.EXPERIMENT_NOT_FOUND);i=g0.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},S_.prototype.experiments=function(r){var n=this,i=new Qn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=g0.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},S_.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,y0.create()),t=null!=(t=e.config)?t:new je;return[e,bt.of(e.variationKey,e.reason,t,e.experiment)]},S_.prototype.featureFlag=function(e,t){var r=this;if(!e)return O_.error("featureKey must not be empty"),_t.off(h.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return O_.warn("SDK not ready."),_t.off(h.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return O_.warn("FeatureFlag does not exist."),_t.off(h.FEATURE_FLAG_NOT_FOUND);n=g0.of(n,t,e,"A"),t=this.featureFlagInternal(n),e=t[0],t=t[1];return this.eventFactory.create(n,e).forEach(function(e){return r.eventProcessor.process(e)}),t},S_.prototype.featureFlags=function(r){var n=this,i=new Qn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=g0.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},S_.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,y0.create()),t=null!=(t=e.config)?t:new je;return[e,"A"===e.variationKey?_t.off(e.reason,t,e.experiment):_t.on(e.reason,t,e.experiment)]},S_.prototype.inAppMessage=function(e,t,r){t=r.evaluate(e,t);return r.record(e,t),t},S_.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?O_.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(Vb.track(n,e,t,r))):O_.warn("Event key must be not null. or event key must be string type."):O_.warn("event must not be null.")},S_.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=e0.toEvent(e),this.flush(),this.track(e,t),this.flush())},S_.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},S_.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(u.isNullOrUndefined(o))return O_.warn("SDK not ready."),Et.of(n,h.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(u.isNullOrUndefined(e))return O_.warn("Remote config parameter does not exist."),Et.of(n,h.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=E0.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,y0.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),Et.of(t.value,t.reason)},S_.prototype.close=function(){this.eventProcessor.close()},S_);function S_(e,t,r,n,i,o){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.workspaceFetcher=r,this.eventFactory=n,this.eventProcessor=i,this.errorDedupDeterminer=o}M_.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},M_.prototype._isSameError=function(e,t){return!u.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var P_=M_;function M_(){}C_.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},C_.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var R_=C_;function C_(){this._installed=[],this._installations={onerror:k_,onunhandledrejection:D_}}var x_,U_=null;function k_(o,s){U_=window.onerror,window.onerror=function(e,t,r,n,i){u.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),U_&&U_.apply(this,arguments)}}function D_(r,n){x_=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()),x_&&x_.apply(this,arguments)}}F_.prototype.read=function(){return p(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,[]]})})},F_.prototype.save=function(r){return p(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])})})},F_.prototype.add=function(r){return p(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]}})})},F_.prototype.delete=function(n){return p(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]}})})},F_.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},F_.prototype.clear=function(){return p(this,void 0,void 0,function(){return l(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var L_=F_;function F_(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}var V_=function(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)},j_=(B_.builder=function(){return new K_},B_.empty=function(){return B_.builder().build()},B_.from=function(e){return new B_(e)},B_.fromDto=function(e){for(var t=B_.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 jn(e)})})}return t.build()},Object.defineProperty(B_.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),B_.prototype.get=function(e){return this.cohorts.get(e)},B_.prototype.filterBy=function(e){var r=Kt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return B_.from(e)},B_.prototype.asArray=function(){return this.cohorts.values()},B_.prototype.asComparable=function(){return this.cohorts},B_.prototype.toBuilder=function(){return new K_(this)},B_);function B_(e){this.cohorts=e}H_.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},H_.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},H_.prototype.build=function(){return new j_(this.cohorts)};var K_=H_;function H_(e){this.cohorts=new Qn(Re.isEqual),e&&this.putAll(e)}var S="model",N="name",e="type",M="vendor",C="version",E="architecture",_l="console",R="mobile",w="tablet",t="smarttv",ca="wearable",G_=(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],[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,(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],[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],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,U.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[E,/ower/,"",U.util.lowerize]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[E,U.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[S,M,[e,w]],[/applecoremedia\/[\w\.]+ \((ipad)/],[S,[M,"Apple"],[e,w]],[/(apple\s{0,1}tv)/i],[[S,"Apple TV"],[M,"Apple"],[e,t]],[/(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],[M,S,[e,w]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[S,[M,"Amazon"],[e,w]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[S,U.mapper.str,U.maps.device.amazon.model],[M,"Amazon"],[e,R]],[/android.+aft([bms])\sbuild/i],[S,[M,"Amazon"],[e,t]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[S,M,[e,R]],[/\((ip[honed|\s\w*]+);/i],[S,[M,"Apple"],[e,R]],[/(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],[M,S,[e,R]],[/\(bb10;\s(\w+)/i],[S,[M,"BlackBerry"],[e,R]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[S,[M,"Asus"],[e,w]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[M,"Sony"],[S,"Xperia Tablet"],[e,w]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[S,[M,"Sony"],[e,R]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[M,S,[e,_l]],[/android.+;\s(shield)\sbuild/i],[S,[M,"Nvidia"],[e,_l]],[/(playstation\s[34portablevi]+)/i],[S,[M,"Sony"],[e,_l]],[/(sprint\s(\w+))/i],[[M,U.mapper.str,U.maps.device.sprint.vendor],[S,U.mapper.str,U.maps.device.sprint.model],[e,R]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[M,[S,/_/g," "],[e,R]],[/(nexus\s9)/i],[S,[M,"HTC"],[e,w]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[S,[M,"Huawei"],[e,R]],[/android.+(bah2?-a?[lw]\d{2})/i],[S,[M,"Huawei"],[e,w]],[/(microsoft);\s(lumia[\s\w]+)/i],[M,S,[e,R]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[S,[M,"Microsoft"],[e,_l]],[/(kin\.[onetw]{3})/i],[[S,/\./g," "],[M,"Microsoft"],[e,R]],[/\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],[S,[M,"Motorola"],[e,R]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[S,[M,"Motorola"],[e,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[M,U.util.trim],[S,U.util.trim],[e,t]],[/hbbtv.+maple;(\d+)/i],[[S,/^/,"SmartTV"],[M,"Samsung"],[e,t]],[/\(dtv[\);].+(aquos)/i],[S,[M,"Sharp"],[e,t]],[/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],[[M,"Samsung"],S,[e,w]],[/smart-tv.+(samsung)/i],[M,[e,t],S],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[M,"Samsung"],S,[e,R]],[/sie-(\w*)/i],[S,[M,"Siemens"],[e,R]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[M,"Nokia"],S,[e,R]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[S,[M,"Acer"],[e,w]],[/android.+([vl]k\-?\d{3})\s+build/i],[S,[M,"LG"],[e,w]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[M,"LG"],S,[e,w]],[/(lg) netcast\.tv/i],[M,S,[e,t]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[S,[M,"LG"],[e,R]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[M,S,[e,w]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[S,[M,"Lenovo"],[e,w]],[/(lenovo)[_\s-]?([\w-]+)/i],[M,S,[e,R]],[/linux;.+((jolla));/i],[M,S,[e,R]],[/((pebble))app\/[\d\.]+\s/i],[M,S,[e,ca]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[M,S,[e,R]],[/crkey/i],[[S,"Chromecast"],[M,"Google"],[e,t]],[/android.+;\s(glass)\s\d/i],[S,[M,"Google"],[e,ca]],[/android.+;\s(pixel c)[\s)]/i],[S,[M,"Google"],[e,w]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[S,[M,"Google"],[e,R]],[/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],[[S,/_/g," "],[M,"Xiaomi"],[e,R]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[S,/_/g," "],[M,"Xiaomi"],[e,w]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[S,[M,"Meizu"],[e,R]],[/(mz)-([\w-]{2,})/i],[[M,"Meizu"],S,[e,R]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[S,[M,"OnePlus"],[e,R]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[S,[M,"RCA"],[e,w]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[S,[M,"Dell"],[e,w]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[S,[M,"Verizon"],[e,w]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[M,"Barnes & Noble"],S,[e,w]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[S,[M,"NuVision"],[e,w]],[/android.+;\s(k88)\sbuild/i],[S,[M,"ZTE"],[e,w]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[S,[M,"Swiss"],[e,R]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[S,[M,"Swiss"],[e,w]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[S,[M,"Zeki"],[e,w]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[M,"Dragon Touch"],S,[e,w]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[S,[M,"Insignia"],[e,w]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[S,[M,"NextBook"],[e,w]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[M,"Voice"],S,[e,R]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[M,"LvTel"],S,[e,R]],[/android.+;\s(PH-1)\s/i],[S,[M,"Essential"],[e,R]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[S,[M,"Envizen"],[e,w]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[M,S,[e,w]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[S,[M,"MachSpeed"],[e,w]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[M,S,[e,w]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[S,[M,"Rotor"],[e,w]],[/android.+(KS(.+))\s+build/i],[S,[M,"Amazon"],[e,w]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[M,S,[e,w]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[e,U.util.lowerize],M,S],[/[\s\/\(](smart-?tv)[;\)]/i],[[e,t]],[/(android[\w\.\s\-]{0,9});.+build/i],[S,[M,"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,U.mapper.str,U.maps.os.windows],[C,U.mapper.str,U.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[N,"Windows"],[C,U.mapper.str,U.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]]},U);function U(){}J_.generate=function(e,t){var r,n,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,i=G_.parse(e.navigator.userAgent).browser,o="";try{o=null!=(n=null==(r=screen.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:r[0])?n:""}catch(e){}return c({browserName:i.name||"",browserMajorVersion:i.major||"",browserVersion:i.version||"",orientation:o,userAgent:e.navigator.userAgent||""},t.toProperties())};var z_=J_;function J_(){}Y_.generate=function(e){var t,r,n,i,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,o=G_.parse(e.navigator.userAgent),s=o.os,o=o.device,a=e.screen,e=(null==(e=e.navigator.languages)?void 0:e[0])||"",u=e.split("-")[0],c=(null!=(c=o.type)?c:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),p=s.name||"",l="";try{p=null!=(r=null==(t=p.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:p,orientation=null!=(i=null==(n=a.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",l=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{osName:p,osVersion:s.version||"",deviceModel:o.model||"",deviceType:c,deviceVendor:o.vendor||"",deviceBrand:o.vendor||"",screenWidth:a.width||"",screenHeight:a.height||"",locale:e,language:u,timeZone:l}};var q_=Y_;function Y_(){}$_.generate=function(e,t){t=null!=t?t:Lo.createWithCurrentPage();return c(c({platform:"Web"},z_.generate(e,t)),q_.generate(e))};var W_=$_;function $_(){}Z_.prototype.map=function(e){return new Z_(e(this.previous),e(this.current))};var X_=Z_;function Z_(e,t){this.previous=e,this.current=t}eI.empty=function(){return this.from([])},eI.from=function(e){return new eI(e)},eI.fromDto=function(e){return this.from(e.events.map(function(e){return zn.fromJson(e)}))},Object.defineProperty(eI.prototype,"rawEvents",{get:function(){return this.events},enumerable:!1,configurable:!0});var Q_=eI;function eI(e){this.events=e}rI.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return oI.of(aI(e,this.hackleDeviceId),j_.empty(),Q_.empty())},rI.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(rI.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),rI.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},rI.prototype.resolveContext=function(e){return void 0===e?this.context:("string"==typeof e?this.updateUser({id:e}):this.updateUser(e)).current},rI.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},rI.prototype.hackleUser=function(e){var t=(new Ht).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}},rI.prototype.hackleProperties=function(){return"undefined"!=typeof window?W_.generate(window,this.pageManager.currentPage):{}},rI.prototype.setUser=function(e){return this.updateUser(e).map(function(e){return e.user})},rI.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},rI.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},rI.prototype.updateUserProperties=function(e){return this.operateProperties(e).map(function(e){return e.user})},rI.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).map(function(e){return e.user})},rI.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},rI.prototype.saveUser=function(e){this.storage.saveUser(e)},rI.prototype.updateContext=function(e){var t=this.context,r=t.user,e=e(r),n=this.context.with(e);return this.context=n,V_(r,e)||(this.changeUser(r,e,this.clock.currentMillis()),this.saveUser(e)),new X_(t,n)},rI.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=aI(r,n.hackleDeviceId),V_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},rI.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)})})},rI.prototype.sync=function(){return p(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]}})})},rI.prototype.syncIfNeeded=function(t){return p(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 V_(t.previous,t.current)?[3,4]:[4,this.syncUserTarget()];case 3:e.sent(),e.label=4;case 4:return[2]}})})},rI.prototype.syncCohort=function(){return p(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(),a.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},rI.prototype.syncUserTarget=function(){return p(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(),a.log.error("Failed to sync userTargets: ".concat(t)),[3,3];case 3:return[2]}})})},rI.prototype.hasNewIdentifiers=function(e,t){var r=Kt(e),e=Kt(t);return Object.entries(e).some(function(e){var t=e[0],e=e[1];return r[t]!==e})},rI.prototype.close=function(){return p(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var tI=rI;function rI(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)}iI.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},iI.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(iI.prototype,"deviceId",{get:function(){return this.storage.getItem(it)},enumerable:!1,configurable:!0}),Object.defineProperty(iI.prototype,"userId",{get:function(){return this.storage.getItem(nt)},enumerable:!1,configurable:!0}),iI.prototype.setDeviceId=function(e){this.setId(it,e)},iI.prototype.setUserId=function(e){this.setId(nt,e)},iI.prototype.setId=function(e,t){u.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var nI=iI;function iI(e){this.storage=e}sI.of=function(e,t,r){return new sI(e,t.filterBy(e),r)},sI.prototype.with=function(e){return sI.of(e,this.cohorts.filterBy(e),this.targetEvents)},sI.prototype.update=function(e,t){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return sI.of(this.user,e,t)};var oI=sI;function sI(e,t,r){this.user=e,this.cohorts=t,this.targetEvents=r}var aI=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},uI=(Object.defineProperty(cI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(cI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:cI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(cI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),cI.prototype.addListener=function(e){this.sessionListeners.push(e)},cI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},cI.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)},cI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(rt,"".concat(e))},cI.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)})},cI.prototype.newSession=function(t,r){var n="".concat(r,".").concat(K().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},cI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(tt,e)},cI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(tt)},cI.prototype.loadLastEventTime=function(){var e=this.storage.getItem(rt);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},cI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},cI.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}},cI.EMPTY_SESSION_ID="0.ffffffff",cI);function cI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}lI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},lI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},lI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},lI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var pI=lI;function lI(){this.storage=window.localStorage}hI.postfix=function(e,t){return new hI(e,function(e){return"".concat(e).concat(t)})},hI.prefix=function(e,t){return new hI(e,function(e){return"".concat(t).concat(e)})},hI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},hI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},hI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var fI=hI;function hI(e,t){this.delegate=e,this.transform=t}yI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},yI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},yI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},yI.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}},yI.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[]}},yI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},yI.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){}},yI.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]},yI.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){}},yI.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var dI=yI;function yI(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)}gI.prototype.currentUser=function(){return this.userManager.resolve()},gI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},gI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},gI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},gI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},gI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},gI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},gI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},gI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},gI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},gI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},gI.prototype.increment=function(e,t){Ni.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var vI=gI;function gI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}EI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},EI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},EI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},EI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},EI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},EI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},EI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},EI.monitoring=function(e){return"".concat(e,"/metrics")},EI.userTargets=function(e){return"".concat(e,"/api/v1/user-targets")};var mI=EI;function EI(){}bI.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)},bI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},bI.prototype.key=function(e){return"".concat(e.key)};var wI=bI;function bI(e){this.storage=e}_I.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var TI=_I;function _I(e){this.handlers=e}AI.prototype.handle=function(e,t){e.close()},AI.prototype.supports=function(e){return"CLOSE"===e.type};var II=AI;function AI(){}NI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){a.log.error("Invalid url: ".concat(t.value))}},NI.prototype.supports=function(e){return"WEB_LINK"===e.type};var OI=NI;function NI(e){this.urlHandler=e}PI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){a.log.error("Invalid url: ".concat(t.value))}},PI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var SI=PI;function PI(e){this.urlHandler=e}RI.prototype.handle=function(e,t){var r;e.context.decisionReason!==h.OVERRIDDEN&&(r=this.clock.currentMillis()+864e5,this.storage.put(e.context.inAppMessage,r)),e.close()},RI.prototype.supports=function(e){return"HIDDEN"===e.type};var MI=RI;function RI(e,t){this.storage=e,this.clock=t}xI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){a.log.error("Invalid url: ".concat(t.value))}},xI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var CI=xI;function xI(e){this.urlHandler=e}kI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){a.log.error("Invalid url: ".concat(t.value))}},kI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var UI=kI;function kI(e){this.urlHandler=e}LI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){a.log.error("Invalid url: ".concat(t.value))}},LI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var DI=LI;function LI(e){this.urlHandler=e}VI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){a.log.error("Invalid url: ".concat(t.value))}},VI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var FI=VI;function VI(e){this.urlHandler=e}BI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},BI.prototype.commonProperties=function(e){return c(c({},e.properties),{in_app_message_id:e.inAppMessage.id,in_app_message_key:e.inAppMessage.key,in_app_message_display_type:e.message.layout.displayType,decision_reason:String(e.decisionReason)})},BI.prototype.createTrackEvent=function(e,t){switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c(c({},this.commonProperties(t)),{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:this.commonProperties(t)};case"ACTION":var r=e;return{key:"$in_app_action",properties:c(c({},this.commonProperties(t)),{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({},this.commonProperties(t)),{image_url:r.imageUrl,image_order:r.imageOrder})}}};var jI=BI;function BI(e){this.core=e}HI.prototype.setListener=function(e){this.inAppMessageListener=e},HI.prototype.present=function(r){return p(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 KI=HI;function HI(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}zI.prototype.open=function(){var o,s;return p(this,void 0,void 0,function(){var r,t,n,i=this;return l(this,function(e){switch(e.label){case 0:if(!this.status.canOpen())return a.log.debug("InAppMessage is already opened. (key=".concat(this.context.inAppMessage.key,")")),[2];r=Bo.toPublic(this.context.inAppMessage),e.label=1;case 1:return e.trys.push([1,4,,5]),null!=(s=null==(o=this.ui.inAppMessageListener)?void 0:o.beforeInAppMessageOpen)&&s.call(o,r),this.status.current="OPENING",window.addEventListener(zI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.addEventListener(zI.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(zI.CONTAINER_CLASS_NAME,"--loading")),n=window.HackleInAppMessageRenderer,this.renderer=new n.HackleInAppMessageRenderer(t),n=this.renderTypeResolver.resolve(this.context),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),renderType:n})];case 3:return e.sent(),t.classList.remove("".concat(zI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleInAppMessageLifecycle("OPEN",function(){var e,t;i.handleEvent({type:"IMPRESSION"}),i.status.current="OPENED",null!=(t=null==(e=i.ui.inAppMessageListener)?void 0:e.afterInAppMessageOpen)&&t.call(e,r)},function(){a.log.warn("Failed to open inAppMessage with [Timeout expired.]"),i.destroy()}),[3,5];case 4:return e.sent(),this.destroy(),[3,5];case 5:return[2]}})})},zI.prototype.close=function(){var e,t,r,n=this;this.status.canClose()?(r=Bo.toPublic(this.context.inAppMessage),null!=(t=null==(e=this.ui.inAppMessageListener)?void 0:e.beforeInAppMessageClose)&&t.call(e,r),this.status.current="CLOSING",this.handleInAppMessageLifecycle("CLOSE",function(){var e,t;n.handleEvent({type:"CLOSE"}),n.destroy(),null!=(t=null==(e=n.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r)},function(){var e,t;a.log.warn("Failed to close inAppMessage with [Timeout expired.]"),n.destroy(),null!=(t=null==(e=n.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r)})):a.log.debug("InAppMessage is already closed. (key=".concat(this.context.inAppMessage.key,")"))},zI.prototype.handleInAppMessageLifecycle=function(e,t,r){var n=this,i=this.lifecycleRegistry.register(e,t);window.dispatchEvent(new CustomEvent(zI.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE,{detail:{type:e,id:i}})),setTimeout(function(){void 0!==n.lifecycleRegistry.getAndRemove(e,i)&&r()},zI.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT)},zI.prototype.destroy=function(){var e;window.removeEventListener(zI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.removeEventListener(zI.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"},zI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(zI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},zI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},zI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},zI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},zI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",zI.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE="hackle-iam-lifecycle-start",zI.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE="hackle-iam-lifecycle-end",zI.CONTAINER_CLASS_NAME="hackle-iam",zI.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT=5e3;var GI=zI;function zI(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===zI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,s.handleInteraction(e))}}qI.prototype.isMobileOS=function(e){e=e.user.hackleProperties.osName;return"string"==typeof e&&Boolean(e.match(this.mobileOSRegex))},qI.prototype.isMobileDeviceType=function(e){e=e.user.hackleProperties.deviceType;return"string"==typeof e&&Boolean(e.match(this.mobileDeviceRegex))},qI.prototype.resolve=function(e){return this.isMobileOS(e)||this.isMobileDeviceType(e)?"mobile":"pc"};var JI=qI;function qI(){this.mobileOSRegex=/(iOS|Android|iPad|iPhone)/g,this.mobileDeviceRegex=/(mobile|phone|tablet)/g}WI.prototype.canOpen=function(){return"OPENED"!==this.current&&"OPENING"!==this.current},WI.prototype.canClose=function(){return"CLOSED"!==this.current&&"CLOSING"!==this.current};var YI=WI;function WI(e){this.current=e=void 0===e?"CLOSED":e}XI.prototype.resolveKey=function(e,t){return"".concat(e,"_").concat(t)},XI.prototype.register=function(e,t){var r=K(),e=this.resolveKey(e,r);return this.record[e]=t,r},XI.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 $I=XI;function XI(){this.record={}}QI.create=function(e){return new QI(e)},QI.prototype.create=function(e,t){var r=new JI,n=new YI,i=new $I;switch(e.message.layout.displayType){case"MODAL":case"BANNER":case"BOTTOM_SHEET":return new GI(this.scriptLoader,e,t,r,n,i);case"NONE":return null}};var ZI=QI;function QI(e){this.scriptLoader=e}tA.prototype.load=function(){return p(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()]}})})},tA.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},tA.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 eA=tA;function tA(e){this.scriptUrl=e}nA.prototype.matches=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},nA.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=iA.of(e,t,r);return this.targetMatcher.anyMatches(e,y0.create(),n.targets)};var rA=nA;function nA(e){this.targetMatcher=e}oA.of=function(e,t,r){return new oA(new h0("IN_APP_MESSAGE",r.id),e,t.user,t)};var iA=oA;function oA(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}aA.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return u.isNullOrUndefined(e)?[]:JSON.parse(e)},aA.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var sA=aA;function aA(e){this.storage=e}cA.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var uA=cA;function cA(e){this.processors=e}lA.prototype.process=function(e,t,r){},lA.prototype.supports=function(e){return"IMPRESSION"===e.type};var pA=lA;function lA(){}hA.prototype.process=function(e,t,r){},hA.prototype.supports=function(e){return"CLOSE"===e.type};var fA=hA;function hA(){}yA.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,Bo.toPublic(e.context.inAppMessage),Ho.toPublic(e),Fn.fromAction(t.action)))&&e.status.canClose()&&null!=o&&o.handle(e,t.action)},yA.prototype.supports=function(e){return"ACTION"===e.type};var dA=yA;function yA(e){this.actionHandlerFactory=e}gA.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 vA=gA;function gA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}EA.prototype.matches=function(e,t,r){return this.ruleMatcher.matches(e,t,r)};var mA=EA;function EA(e){this.ruleMatcher=e}bA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var wA=bA;function bA(e){this.handlers=e}_A.prototype.handle=function(e,t){e.close()},_A.prototype.supports=function(e){return"CLOSE"===e.type};var TA=_A;function _A(){}AA.prototype.handle=function(e,t){t=this.eventOrNull(t);t&&this.eventHandler.handle(e,t)},AA.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},AA.prototype.supports=function(e){return"ACTION"===e.type};var IA=AA;function AA(e){this.eventHandler=e}NA.prototype.handle=function(e,t){t={type:"IMAGE_IMPRESSION",imageUrl:t.imageUrl,imageOrder:t.imageOrder};this.eventHandler.handle(e,t)},NA.prototype.supports=function(e){return"IMAGE_IMPRESSION"===e.type};var OA=NA;function NA(e){this.eventHandler=e}PA.prototype.open=function(e){window.location.href=e.href};var SA=PA;function PA(){}RA.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var MA=RA;function RA(){}xA.prototype.open=function(e){window.open(e.href)};var CA=xA;function xA(){}kA.prototype.open=function(e){window.location.replace(e)};var UA=kA;function kA(){}function DA(e,t,r){return null===e||(!VA(t,LA)||r.current!==r.referrer)&&!VA(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},FA={current:void 0,referrer:void 0},VA=function(t,r){return Object.keys(LA).every(function(e){return t[e]===r[e]})},jA=(BA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},LA),t),n=new Ro,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)},BA.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();DA(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},BA.prototype.onSessionEnded=function(e,t,r){},BA.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},BA);function BA(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}HA.prototype.get=function(){var e=this.storage.getItem(ot);return e?JSON.parse(e):null},HA.prototype.set=function(e){this.storage.setItem(ot,JSON.stringify(e))};var KA=HA;function HA(e){this.storage=e}zA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},zA.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=$o.tryDecodeURIComponent(i))&&(t[o]=i)}return t};var GA=zA;function zA(e){this.search=e}qA.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},qA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,qA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var JA=qA;function qA(){}WA.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},WA.prototype.params=function(e){e=u.isNotNullOrUndefined(e)?e:this.pageManager.currentPage.queryParameter;return new GA(e).getQueryParams(WA.CAMPAIGN_QUERY_CONDITION)},WA.prototype.resolve=function(e){return{utm_campaign:e[$A],utm_content:e[XA],utm_id:e[ZA],utm_medium:e[QA],utm_source:e[eO],utm_term:e[tO],gclid:e[rO],fbclid:e[nO]}},WA.prototype.parseDomain=function(){var t=this;if("undefined"==typeof window)return FA;return{current:JA.extractDomain(this.pageManager.currentPage.hostname),referrer:function(){var e=t.pageManager.currentPage.referrer;if(e)return e=new URL(e).hostname,JA.extractDomain(e)}()}},WA.CAMPAIGN_QUERY_CONDITION=function(e,t){return Pi.isNotEmptyString(t)};var YA=WA;function WA(e){this.pageManager=e}var $A="utm_campaign",XA="utm_content",ZA="utm_id",QA="utm_medium",eO="utm_source",tO="utm_term",rO="gclid",nO="fbclid",iO=(oO.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},oO.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){a.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},oO);function oO(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()}aO.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!t||!t.getAttributes().integration_ga_experiment||!Vb.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==h.TRAFFIC_ALLOCATED?null:e};var sO=aO;function aO(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://sdk-api.hackle.io",eventUrl:"https://event-api.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.50.0",IAM_RENDERER_VERSION_HEADER:"0.0.12"},cO=(pO.config=function(e){return c(c(c({},uO),e),{automaticPageTracking:pO.resolveAutomaticPageTracking(e)})},pO.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},pO.logging=function(e){a.initCounter(function(e){return Ni.counter("log",{level:e})}),a.setLogLevel(Ie.INFO),e.log_disabled?a.setLogLevel(Ie.DISABLE):e.debug&&a.setLogLevel(Ie.DEBUG)},pO.sdk=function(e,t){return a.log.debug("SDK key: ".concat(e)),e||a.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}},pO.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&a.log.debug("support sendBeacon API"),e},pO.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,6e4)},pO.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(a.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},pO);function pO(){}fO.prototype.add=function(e){this.synchronizers.push(e)},fO.prototype.sync=function(){return p(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]}})})},fO.prototype.close=function(){return p(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]}})})},fO.prototype.safe=function(r){return p(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(),a.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})};var lO=fO;function fO(){this.synchronizers=[]}dO.prototype.sync=function(){return p(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(),a.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},dO.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()}))},dO.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},dO.prototype.close=function(){return p(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 hO=dO;function dO(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}vO.prototype.schedule=function(e,t){e=new gO(e,t);return e.start(),e},vO.prototype.schedulePeriodically=function(e,t,r){var n;switch(this.scheduleType){case"setTimeout":n=new EO(e,t,r);break;case"setInterval":n=new bO(e,t,r)}return n.start(),n};var yO=vO;function vO(e){this.scheduleType=e}mO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){try{e.task()}catch(e){a.log.error("Failed to run task: ".concat(e))}finally{e.timeout=null}},this.delayMillis)},mO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var gO=mO;function mO(e,t){this.delayMillis=e,this.task=t,this.timeout=null}wO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},wO.prototype.run=function(){var e=this;try{this.task()}catch(e){a.log.error("Failed to run task: ".concat(e))}this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},wO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var EO=wO;function wO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}TO.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){e.run(),e.interval=setInterval(function(){return e.run()},e.intervalMillis)},this.delayMillis)},TO.prototype.run=function(){try{this.task()}catch(e){a.log.error("Failed to run task: ".concat(e))}},TO.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.interval&&(clearInterval(this.interval),this.interval=null)};var bO=TO;function TO(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null,this.interval=null}IO.prototype.fetchIfModified=function(r){return p(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)]}})})},IO.prototype.createRequest=function(e){var t=Ri.builder().url(this.url).method("GET");return null!==e&&t.addHeader(Li.IF_MODIFIED_SINCE,e),t.build()},IO.prototype.execute=function(n){return p(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Wn.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]}})})},IO.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(Li.LAST_MODIFIED)}};var _O=IO;function IO(e,t){this.url=e,this.transport=t}OO.prototype.fetch=function(r){return p(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)]}})})},OO.prototype.createRequest=function(e){e={identifiers:Kt(e)},e=be.encodeURL(JSON.stringify(e));return Ri.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},OO.prototype.execute=function(n){return p(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Wn.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]}})})},OO.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 j_.fromDto(e)};var AO=OO;function OO(e,t){this.url=e,this.transport=t}SO.prototype.fetch=function(r){return p(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)]}})})},SO.prototype.createRequest=function(e){e={identifiers:Kt(e)},e=be.encodeURL(JSON.stringify(e));return Ri.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},SO.prototype.execute=function(n){return p(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Wn.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]}})})},SO.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 Q_.fromDto(e)};var NO=SO;function SO(e,t){this.url=e,this.transport=t}MO.prototype.getExperiments=function(){return Array.from(this.experiments.values())},MO.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},MO.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},MO.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},MO.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},MO.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},MO.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},MO.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},MO.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},MO.prototype.getContainerOrNull=function(e){return this.containers.get(e)},MO.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},MO.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},MO.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},MO.prototype.getAttributes=function(){return this.attributes},MO.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(Ut.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,pr.fromJson),p=f.mapNotNullOrUndefined(e.inAppMessages,jr.fromJson),e=e.workspace.attributes;return new MO(r,n,i,o,s,a,u,t,c,p,e)};var PO=MO;function MO(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}CO.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},CO.prototype.setWorkspace=function(e){try{this.workspace=PO.from(e.config)}catch(e){a.log.error("Failed to set workspace: ".concat(e))}},CO.prototype.get=function(){return this.workspace},CO.prototype.sync=function(){return p(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(),a.log.error("Failed to sync workspace: ".concat(t)),[3,3];case 3:return[2]}})})},CO.prototype.close=function(){return p(this,void 0,void 0,function(){return l(this,function(e){return[2]})})};var RO=CO;function CO(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}UO.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},UO.prototype.dispatchEventsSynchronously=function(r){return p(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]}})})},UO.prototype.dispatchEvents=function(r){return p(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 xO=UO;function UO(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}DO.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},DO.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof Vb?Vb.isExposureEvent(e)?t.push(e.toDto()):Vb.isTrackEvent(e)?r.push(e.toDto()):Vb.isRemoteConfigEvent(e)&&n.push(e.toDto()):Vb.isExposureEventDto(e)?t.push(e):Vb.isTrackEventDto(e)?r.push(e):Vb.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return Ri.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},DO.prototype.execute=function(n){return p(this,void 0,void 0,function(){var t,r;return l(this,function(e){switch(e.label){case 0:t=Wn.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 kO=DO;function DO(e,t){this.url=e,this.transport=t}FO.prototype.add=function(e){return this.repository.add(e)},FO.prototype.delete=function(e){return this.repository.delete(e)},FO.prototype.flush=function(){return p(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]}})})},FO.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"pageshow":return void this.flush().catch(function(e){return a.log.warn("Failed to flush retry events: ".concat(e))});case"blur":case"focus":case"hidden":case"locationChange":case"pagehide":return}};var LO=FO;function FO(e,t){this.repository=e,this.transport=t}function VO(){this.listeners={}}VO.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},VO.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},VO.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};i(BO,jO=VO);var jO,Ol=BO;function BO(){return null!==jO&&jO.apply(this,arguments)||this}i(GO,KO=Ol),GO.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},GO.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},GO.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},GO.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 a.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},GO.prototype.close=function(){this.flush(!0)};var KO,HO=GO;function GO(e,t,r,n){var i=KO.call(this)||this;return i.eventDispatcher=e,i.eventDispatchMaxSize=t,i.flushScheduler=r,i.flushIntervalMillis=n,i.queue=[],i.flushingJob=null,i}JO.prototype.send=function(e){e=e.toBuilder().addHeader(Ge,this.sdk.key).addHeader(ze,this.sdk.name).addHeader(Je,this.sdk.version).addHeader(qe,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var zO=JO;function JO(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}YO.intercept=function(e,t){return t instanceof zO?t:new zO(e,Fe.instance,t)};var qO=YO;function YO(){}$O.create=function(){return new $O},$O.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 ki(n.status,n.responseText,function(e){var t=Li.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 WO=$O;function $O(){}ZO.create=function(){return new ZO},ZO.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(ki.ok())})},ZO.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(ze,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(Je,"unknown")),e.headers.get(qe));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var XO=ZO;function ZO(){}eN.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var QO=eN;function eN(e){this.invocationResponseResolver=e}nN.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 tN,rN=nN;function nN(e){this.invocationResponseResolver=e}(Fa=tN=tN||{}).prompt="prompt",Fa.function="function";oN.prototype.getInvocator=function(e,t){return e===tN.prompt?new QO(t):e===tN.function?new rN(t):null};var iN=oN;function oN(){}aN.prototype.onPageStarted=function(e,t){var r=this.userManager.resolve(),r=this.determiner.determineOrNull(r);r&&(this.core.flush(!0),this.redirector.redirect(r))},aN.prototype.onPageEnded=function(e,t){};var sN=aN;function aN(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},cN=(pN.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},pN);function pN(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=hN.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,y0.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,y0.create(),t.includeTargets))};var lN=fN;function fN(e){this.targetMatcher=e}dN.of=function(e,t){return new dN(new h0("SPLIT_URL",K()),t,e)};var hN=dN;function dN(e,t,r){this.key=e,this.user=t,this.workspace=r}vN.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var yN=vN;function vN(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}mN.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(mN.SPLIT_URL_CONFIG_KEY,"")),r=Bn.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},mN.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},mN.prototype.resolveManualRedirectUrl=function(e,t){e=$o.tryParse(e);return e?this.decorateCampaign(e,t):null},mN.prototype.decorateCampaign=function(e,t){t=t.user.hackleProperties.queryParameter;if(Pi.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];Pi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},mN.SPLIT_URL_CONFIG_KEY="redirectUrl";var gN=mN;function mN(e){this.campaignParser=e}wN.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return u.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},wN.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},wN.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var EN=wN;function wN(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}TN.prototype.setNeedDispatch=function(e){this.needDispatch=e},TN.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(TN.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},TN.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var bN=TN;function TN(){this.needDispatch=!0}IN.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}},IN.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(ft,JSON.stringify(e))},IN.prototype.clear=function(){this.storage.removeItem(ft)};var _N=IN;function IN(e,t){this.sdk=e,this.storage=t}var AN=a.log,ON=(NN.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")}),NN.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)&&AN.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)&&AN.error(e)}}),window.addEventListener("popstate",function(){try{t("locationChange")}catch(e){(e instanceof Error||"string"==typeof e)&&AN.error(e)}})}catch(e){(e instanceof Error||"string"==typeof e)&&AN.error(e)}var r,n},NN.prototype.addListener=function(e){this.listeners.push(e)},NN.prototype.initialize=function(){this._initialized=!0,this.changeLifecycle("pageshow")},NN.prototype.changeLifecycle=function(e){this._initialized&&this.publish(e)},NN.prototype.publish=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onLifecycleChanged(t,r)})},NN.isSafariBrowser=function(e){return!u.isNullOrUndefined(e)&&e.toLowerCase().includes("safari")},NN);function NN(e){void 0===e&&(e=Fe.instance),this.clock=e,this.listeners=[],this._initialized=!1}PN.create=function(e,t,r){return void 0===r&&(r=Fe.instance),new PN(new MN(r,e,t))},PN.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var SN=PN;function PN(e){this.limiter=e}RN.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},RN.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new CN(e+this.intervalMillis,this.limit)),this.currentScope};var MN=RN;function RN(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}xN.prototype.isExpired=function(e){return this.expirationTime<e},xN.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var CN=xN;function xN(e,t){this.expirationTime=e,this.token=t}kN.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var UN=kN;function kN(e){this.determiners=e}DN.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;Re.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)};ua=DN;function DN(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}i(VN,LN=ua),VN.prototype.supports=function(e){return Vb.isRemoteConfigEvent(e)},VN.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var LN,FN=VN;function VN(e,t){return void 0===t&&(t=Fe.instance),LN.call(this,e,t)||this}i(KN,jN=ua),KN.prototype.supports=function(e){return Vb.isExposureEvent(e)},KN.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var jN,BN=KN;function KN(e,t){return void 0===t&&(t=Fe.instance),jN.call(this,e,t)||this}GN.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},GN.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 HN=GN;function GN(){}JN.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters,browserProperties:e.browserProperties}}},JN.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var zN=JN;function JN(e){this.invocator=e}var qN=a.log,YN=(WN.prototype.onPageStarted=function(e,t){this.track(e,t)},WN.prototype.onPageEnded=function(e,t){},WN.prototype.track=function(e,t){qN.debug("tracking page view");var r,e={key:WN.PAGE_VIEW_EVENT_KEY,properties:((r={})[WN.PAGE_NAME_PROPERTY_KEY]=e.pageTitle,r)};this.core.track(e,this.userManager.resolve(),t)},WN.PAGE_VIEW_EVENT_KEY="$page_view",WN.PAGE_NAME_PROPERTY_KEY="$page_name",WN);function WN(e,t){this.core=e,this.userManager=t}Object.defineProperty(XN.prototype,"currentPage",{get:function(){var e;return null!=(e=this._currentPage)?e:Lo.createWithCurrentPage()},enumerable:!1,configurable:!0}),XN.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))},XN.prototype.publishStart=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageStarted(e,t)},XN.prototype.publishEnd=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageEnded(e,t)},XN.prototype.onLifecycleChanged=function(e,t){switch(e){case"pageshow":case"locationChange":var r=Lo.createWithCurrentPage();return this.updatePage(r,t);case"visible":case"pagehide":case"blur":case"focus":case"hidden":return}},XN.prototype.addListener=function(e){this.listeners.push(e)};var $N=XN;function XN(){this.listeners=[],this._currentPage=null}var ZN=a.log,QN=(Object.defineProperty(eS.prototype,"lastEngagementTime",{get:function(){return this._lastEngagementTime},enumerable:!1,configurable:!0}),eS.prototype.startEngagement=function(e){ZN.debug("startEngagement timestamp:".concat(e,", page:").concat(this.pageManager.currentPage.url)),this._lastEngagementTime=e},eS.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))},eS.prototype.publish=function(e,t,r){ZN.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)},eS.prototype.onPageStarted=function(e,t){this.startEngagement(t)},eS.prototype.onPageEnded=function(e,t){this.endEngagement(e,t)},eS.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}},eS.prototype.addListener=function(e){this.listeners.push(e)},eS);function eS(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={})[YN.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 tS=rS;function rS(e){this.core=e}iS.prototype.setPhoneNumber=function(e,t){e=(new Ro).set(iS.PHONE_NUMBER_PROPERTY_KEY,e.getValue()).build().toSecuredEvent();this.track(e,t)},iS.prototype.unsetPhoneNumber=function(e){var t=(new Ro).unset(iS.PHONE_NUMBER_PROPERTY_KEY).build().toSecuredEvent();this.track(t,e)},iS.prototype.track=function(e,t){var r=this.userManager.resolve();this.core.track(e,r,t)},iS.PHONE_NUMBER_PROPERTY_KEY="$phone_number";var nS=iS;function iS(e,t){this.core=e,this.userManager=t}sS.prototype.getBrowserProperties=function(){return z_.generate(window,Lo.createWithCurrentPage())};var oS=sS;function sS(){}Object.defineProperty(uS.prototype,"delayMillis",{get:function(){return this.schedule.time.deliverAt-this.requestedAt},enumerable:!1,configurable:!0}),uS.prototype.toString=function(){return"InAppMessageScheduleRequest(scheduleType=".concat(this.scheduleType,", requestedAt=").concat(this.requestedAt,")")};var aS=uS;function uS(e,t,r){this.schedule=e,this.scheduleType=t,this.requestedAt=r}pS.prototype.toRequest=function(e,t){return new aS(this,e,t)},pS.create=function(e){return new pS(K(),e.inAppMessage.key,e.event.user.identifiers,lS.of(e.inAppMessage,e.event.timestamp),e.reason,new hS(e.event.insertId,e.event.event))},pS.fromDelayStorageEntity=function(e,t){return new pS(e.schedule.dispatchId,e.schedule.inAppMessageKey,e.schedule.identifiers,new lS(t,e.schedule.time.deliverAt),e.schedule.reason,e.schedule.eventBasedContext)};var cS=pS;function pS(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessageKey=t,this.identifiers=r,this.time=n,this.reason=i,this.eventBasedContext=o}fS.prototype.delayMillis=function(e){return this.deliverAt-e},fS.of=function(e,t){return new fS(t,e.eventTrigger.delay.deliverAt(t))};var lS=fS;function fS(e,t){this.startedAt=e,this.deliverAt=t}var hS=function(e,t){this.insertId=e,this.event=t},dS=(yS.prototype.initialize=function(){var t=this;this.userEventEmitter.on("event",function(e){t.onEvent(e)})},yS.prototype.destroy=function(){var t=this;this.userEventEmitter.off("event",function(e){t.onEvent(e)})},yS.prototype.onEvent=function(e){this.triggerProcessor.process(e)},yS.prototype.onUserUpdated=function(e,t,r){e=Kt(e),t=Kt(t);this.resetProcessor.process({identifiers:e},{identifiers:t})},yS.prototype.loadDelaySchedule=function(){var r=this;this.delayStorage.values().forEach(function(e){var t=r.clock.currentMillis(),e=cS.fromDelayStorageEntity(e,t).toRequest("STORED",t);r.scheduleProcessor.process(e)})},yS);function yS(e,t,r,n,i,o){this.scheduleProcessor=e,this.delayStorage=t,this.triggerProcessor=r,this.resetProcessor=n,this.userEventEmitter=i,this.clock=o,this.initialize()}i(mS,vS=qs),mS.prototype.resolve=function(e,t,r){return t.setProperty("experiment_id",r.experiment.id),t.setProperty("experiment_key",r.experiment.key),t.setProperty("variation_id",r.variationId),t.setProperty("variation_key",r.variationKey),t.setProperty("experiment_decision_reason",r.reason),r};var vS,gS=mS;function mS(e){return vS.call(this,e)||this}i(wS,ES=Cu);var ES,Da=wS;function wS(){return null!==ES&&ES.apply(this,arguments)||this}Object.defineProperty(TS.prototype,"inAppMessage",{get:function(){return this.request.inAppMessage},enumerable:!1,configurable:!0}),TS.of=function(e,t,r){return new TS(e,h.IN_APP_MESSAGE_TARGET,t.targetEvaluations,r,t.properties)};var bS=TS;function TS(e,t,r,n,i){this.request=e,this.reason=t,this.targetEvaluations=r,this.message=n,this.properties=i}Object.defineProperty(_S.prototype,"key",{get:function(){return new h0("IN_APP_MESSAGE",this.inAppMessage.id)},enumerable:!1,configurable:!0});I=_S;function _S(){}i(OS,IS=I),OS.of=function(e){return e instanceof OS?e:new OS(e.workspace,e.user,e.inAppMessage)},OS.prototype.toString=function(){return"InAppMessageLayoutRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var IS,AS=OS;function OS(e,t,r){var n=IS.call(this)||this;return n.workspace=e,n.user=t,n.inAppMessage=r,n}i(PS,NS=Da),PS.prototype.supports=function(e){return e instanceof AS},PS.prototype.evaluateInternal=function(e,t){var r=e.inAppMessage.messageContext.experimentContext,r=null!==r?this.evaluateExperiment(e,t,r):this.evaluateDefault(e,t);return bS.of(e,t,r)},PS.prototype.evaluateDefault=function(e,t){var r=MS(e.inAppMessage.messageContext.defaultLang);return this.selector.select(e.inAppMessage,r)},PS.prototype.evaluateExperiment=function(e,t,r){var n,i=u.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[key=".concat(r.key,"]")}),t=this.experimentEvaluator.evaluate(e,t,i),o=MS(e.inAppMessage.messageContext.defaultLang),s=(n=t.variationKey,function(e){return n===e.variationKey});return this.selector.select(e.inAppMessage,function(e){return o(e)&&s(e)})},PS.prototype.record=function(e,t){this.eventRecorder.record(e,t)};var NS,SS=PS;function PS(e,t,r){var n=NS.call(this)||this;return n.experimentEvaluator=e,n.selector=t,n.eventRecorder=r,n}function MS(t){return function(e){return t===e.lang}}CS.prototype.select=function(e,t){t=e.messageContext.messages.find(t);return u.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.id,"]")})};var RS=CS;function CS(){}US.prototype.record=function(e,t){if(e.reason!==h.OVERRIDDEN)try{this.doRecord(e)}catch(e){a.log.error("Failed to record InAppMessageImpression: ".concat(e))}},US.prototype.doRecord=function(e){var t=this.storage.get(e.inAppMessage),r={identifiers:e.user.identifiers,timestamp:e.requestedAt},t=Pe(Pe([],t,!0),[r],!1),r=t.length>this.STORE_MAX_SIZE?t.length-this.STORE_MAX_SIZE:0,t=t.slice(r);this.storage.set(e.inAppMessage,t)};var xS=US;function US(e){this.storage=e,this.STORE_MAX_SIZE=100}DS.prototype.toString=function(){return"InAppMessagePresentResponse(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.context.inAppMessage,", displayType=").concat(this.context.message.layout.displayType,", layoutType=").concat(this.context.message.layout.layoutType,")")},DS.of=function(e,t){return new DS(e.dispatchId,t)};var kS=DS;function DS(e,t){this.dispatchId=e,this.context=t}FS.prototype.toString=function(){return"InAppMessagePresentationContext(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.inAppMessage,", message=").concat(this.message,")")},FS.of=function(e){return new FS(e.dispatchId,e.inAppMessage,e.message,e.user,e.reason,e.properties)};var LS=FS;function FS(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessage=t,this.message=r,this.user=n,this.decisionReason=i,this.properties=o}jS.prototype.process=function(e){a.log.debug("InAppMessage Present Request: ".concat(e));var t=this.present(e);return this.recorder.record(e,t),a.log.debug("InAppMessage Present Response: ".concat(t)),t},jS.prototype.present=function(e){var t=LS.of(e);return this.presenter.present(t),kS.of(e,t)};var VS=jS;function jS(e,t){this.presenter=e,this.recorder=t}KS.prototype.isIdentifierChanged=function(e,t){var r=e[jt.USER],n=t[jt.USER];if(void 0!==r&&void 0!==n)return r!==n;r=e[jt.DEVICE],n=t[jt.DEVICE];return void 0!==r&&void 0!==n&&r!==n};var BS=KS;function KS(){}Object.defineProperty(GS.prototype,"listener",{get:function(){return this._listener},set:function(e){this._listener=e},enumerable:!1,configurable:!0}),GS.prototype.schedule=function(e){var t=this,r=this.scheduler.schedule(e.delayMillis,function(){return t.delayCommand(e)});return new zS(e,r)},GS.prototype.delayCommand=function(e){var t=this.clock.currentMillis(),e=e.schedule.toRequest("DELAYED",t);null!=(t=this.listener)&&t.onSchedule(e)};var HS=GS;function GS(e,t){this.clock=e,this.scheduler=t}JS.prototype.cancel=function(){this.job.cancel(),a.log.debug("InAppMessageDelay cancelled: ".concat(this.delay))};var zS=JS;function JS(e,t){this.delay=e,this.job=t}Object.defineProperty(YS.prototype,"delayMillis",{get:function(){return this.schedule.time.delayMillis(this.requestedAt)},enumerable:!1,configurable:!0}),YS.from=function(e){return new YS(e.schedule,e.requestedAt)},YS.prototype.toString=function(){return"InAppMessageDelay(dispatchId=".concat(this.schedule.dispatchId,", requestedAt=").concat(this.requestedAt,")")};var qS=YS;function YS(e,t){this.schedule=e,this.requestedAt=t}$S.prototype.registerAndDelay=function(e){return this.storage.set(e.schedule.inAppMessageKey,e.schedule.dispatchId,qS.from(e)),this.delay(e)},$S.prototype.delay=function(e){var t=qS.from(e),r=this.scheduler.schedule(t);return this.tasks.set(t.schedule.dispatchId,r),a.log.debug("InAppMessage Delay started: dispatchId=".concat(e.schedule.dispatchId)),t},$S.prototype.delete=function(e){var t=null!=(t=null==(t=this.tasks.get(e.schedule.dispatchId))?void 0:t.delay)?t:null;return t&&a.log.debug("InAppMessage Delay deleted: dispatchId=".concat(e.schedule.dispatchId)),this.tasks.delete(e.schedule.dispatchId),this.storage.remove(e.schedule.inAppMessageKey,e.schedule.dispatchId),t},$S.prototype.cancelAll=function(){var e=Array.from(this.tasks.values());return e.forEach(function(e){return e.cancel()}),this.tasks.clear(),this.storage.clear(),a.log.debug("InAppMessage Delay clear."),e.map(function(e){return e.delay})};var WS=$S;function $S(e,t,r){this.scheduler=e,this.tasks=t,this.storage=r}ZS.prototype.toString=function(){return"InAppMessageDeliverResponse(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", code=").concat(this.code,")")},ZS.of=function(e,t,r){return new ZS(e.dispatchId,e.inAppMessageKey,t,r=void 0===r?null:r)};var XS=ZS;function ZS(e,t,r,n){this.dispatchId=e,this.inAppMessageKey=t,this.code=r,this.presentResponse=n}eP.prototype.toString=function(){return"InAppMessagePresentRequest(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.inAppMessage,", user=").concat(this.user.identifiers,", requestedAt=").concat(this.requestedAt,", reason=").concat(this.reason,", properties=").concat(this.properties,")")},eP.of=function(e,t,r,n,i){return new eP(e.dispatchId,t,i.message,r,e.requestedAt,n.reason,c(c({},e.properties),i.properties))};var QS=eP;function eP(e,t,r,n,i,o,s){this.dispatchId=e,this.inAppMessage=t,this.message=r,this.user=n,this.requestedAt=i,this.reason=o,this.properties=s}i(nP,tP=I),nP.prototype.toString=function(){return"InAppMessageEligibilityRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var tP,rP=nP;function nP(e,t,r,n){var i=tP.call(this)||this;return i.workspace=e,i.user=t,i.inAppMessage=r,i.timestamp=n,i}oP.prototype.response=function(t){try{return this.deliver(t)}catch(e){return a.log.error("Failed to process InAppMessageDeliver: ".concat(e)),XS.of(t,"EXCEPTION")}},oP.prototype.process=function(e){a.log.debug("InAppMessage Deliver Request: ".concat(e));e=this.response(e);return a.log.debug("InAppMessage Deliver Response: ".concat(e)),e},oP.prototype.deliver=function(e){var t=this.workspaceFetcher.get();if(!t)return XS.of(e,"WORKSPACE_NOT_FOUND");var r=t.getInAppMessageOrNull(e.inAppMessageKey);if(!r)return XS.of(e,"IN_APP_MESSAGE_NOT_FOUND");var n=this.userDecorator.decorate(this.userManager.resolve());if(this.identifierChecker.isIdentifierChanged(e.identifiers,n.identifiers))return XS.of(e,"IDENTIFIER_CHANGED");var i=this.layoutResolver.resolve(t,r,n),t=new rP(t,n,r,e.requestedAt),t=this.evaluateProcessor.process("DELIVER",t);if(!t.isEligible)return XS.of(e,"INELIGIBLE");r=QS.of(e,r,n,t,i),n=this.presentProcessor.process(r);return XS.of(e,"PRESENT",n)};var iP=oP;function oP(e,t,r,n,i,o,s){this.workspaceFetcher=e,this.userManager=t,this.identifierChecker=r,this.layoutResolver=n,this.evaluateProcessor=i,this.presentProcessor=o,this.userDecorator=s}aP.prototype.get=function(t){return u.requiredNotNullOrUndefined(this.schedulers.find(function(e){return e.supports(t)}),function(){return"Unsupported InAppMessageScheduleType[".concat(t,"]")})};var sP=aP;function aP(e){this.schedulers=e}cP.prototype.toString=function(){return"InAppMessageScheduleResponse(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", code=").concat(this.code,")")},cP.of=function(e,t,r,n){return new cP(e.schedule.dispatchId,e.schedule.inAppMessageKey,t,r=void 0===r?null:r,n=void 0===n?null:n)};var uP=cP;function cP(e,t,r,n,i){this.dispatchId=e,this.inAppMessageKey=t,this.code=r,this.deliverResponse=n,this.delay=i}lP.of=function(e){var t=(new eo).add("$trigger_event_insert_id",e.schedule.eventBasedContext.insertId).build();return new lP(e.schedule.dispatchId,e.schedule.inAppMessageKey,e.schedule.identifiers,e.requestedAt,e.schedule.reason,u.fromMap(t))},lP.prototype.toString=function(){return"InAppMessageDeliverRequest(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", identifiers=").concat(this.identifiers,", requestedAt=").concat(this.requestedAt,", reason=").concat(this.reason)};var pP=lP;function lP(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessageKey=t,this.identifiers=r,this.requestedAt=n,this.reason=i,this.properties=o}fP.prototype.schedule=function(e,t){switch(e){case"DELIVER":return this.deliver(t);case"DELAY":return this.delay(t);case"IGNORE":return this.ignore(t)}};ee=fP;function fP(){}i(yP,hP=ee),yP.prototype.supports=function(e){return"DELAYED"===e},yP.prototype.deliver=function(e){var t=this.delayManager.delete(e),t=(u.requiredNotNullOrUndefined(t,function(){return"InAppMessageDelay not found (inAppMessageKey=".concat(e.schedule.inAppMessageKey,")")}),pP.of(e)),t=this.deliverProcessor.process(t);return uP.of(e,"DELIVER",t)},yP.prototype.delay=function(e){var t=this.delayManager.delay(e);return uP.of(e,"DELAY",null,t)},yP.prototype.ignore=function(e){var t=this.delayManager.delete(e);return uP.of(e,"IGNORE",null,t)};var hP,dP=yP;function yP(e,t){var r=hP.call(this)||this;return r.deliverProcessor=e,r.delayManager=t,r}i(mP,vP=ee),mP.prototype.supports=function(e){return"TRIGGERED"===e},mP.prototype.deliver=function(e){var t=pP.of(e),t=this.deliverProcessor.process(t);return uP.of(e,"DELIVER",t)},mP.prototype.delay=function(e){var t=this.delayManager.registerAndDelay(e);return uP.of(e,"DELAY",null,t)},mP.prototype.ignore=function(e){return uP.of(e,"IGNORE")};var vP,gP=mP;function mP(e,t){var r=vP.call(this)||this;return r.deliverProcessor=e,r.delayManager=t,r}wP.prototype.process=function(e){a.log.debug("InAppMessage Schedule Request: ".concat(e));e=this.schedule(e);return a.log.debug("InAppMessage Schedule Response: ".concat(e)),e},wP.prototype.schedule=function(t){try{var e=this.actionDeterminer.determine(t);return this.schedulerFactory.get(t.scheduleType).schedule(e,t)}catch(e){return a.log.error("Failed to process InAppMessageSchedule: ".concat(e)),uP.of(t,"EXCEPTION")}},wP.prototype.onSchedule=function(e){this.process(e)};var EP=wP;function wP(e,t){this.actionDeterminer=e,this.schedulerFactory=t}TP.prototype.shouldIgnoreRequest=function(e){return"STORED"===e.scheduleType&&e.delayMillis<0},TP.prototype.determineAction=function(e){var t=e.delayMillis;if(0<t)return"DELAY";if(t>=this.DELIVER_DURATION_THRESHOLD_MILLIS)return"DELIVER";if(t<this.DELIVER_DURATION_THRESHOLD_MILLIS)return"IGNORE";throw new Error("InAppMessageScheduleAction cannot be determined (key=".concat(e.schedule.inAppMessageKey,")"))},TP.prototype.determine=function(e){if(this.shouldIgnoreRequest(e))return"IGNORE";var t=this.determineAction(e);return a.log.debug("InAppMessage ScheduleAction determined: action=".concat(t,", dispatchId=").concat(e.schedule.dispatchId)),t};var bP=TP;function TP(){this.DELIVER_DURATION_THRESHOLD_MILLIS=-1e4}IP.prototype.toString=function(){return"InAppMessageTrigger(inAppMessage=".concat(this.inAppMessage.toString(),", reason=").concat(this.reason,", insertId=").concat(this.event.insertId,", timestamp=").concat(this.event.timestamp,", event=").concat(this.event.event.key,")")};var _P=IP;function IP(e,t,r){this.inAppMessage=e,this.reason=t,this.event=r}OP.prototype.determine=function(e){var t=Vb.isTrackEvent(e)?e:null;if(!t)return null;var r=this.workspaceFetcher.get();if(!r)return null;for(var n=0,i=r.getInAppMessages();n<i.length;n++){var o=i[n];if(this.eventMatcher.matches(r,o,t)){var s=this.evaluate(r,o,t);if(s.isEligible)return new _P(o,s.reason,t)}}return null},OP.prototype.evaluate=function(e,t,r){e=new rP(e,r.user,t,r.timestamp);return this.evaluateProcessor.process("TRIGGER",e)};var AP=OP;function OP(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.evaluateProcessor=r}SP.prototype.handle=function(e){e=cS.create(e).toRequest("TRIGGERED",e.event.timestamp);this.scheduleProcessor.process(e)};var NP=SP;function SP(e){this.scheduleProcessor=e}MP.prototype.process=function(e){try{var t=this.determiner.determine(e);if(!t)return;a.log.debug("InAppMessage triggered: ".concat(t)),this.handler.handle(t)}catch(e){a.log.error("Failed to process InAppMessage event trigger: ".concat(e))}};var PP=MP;function MP(e,t){this.determiner=e,this.handler=t}CP.prototype.process=function(e,t){try{this.identifierChecker.isIdentifierChanged(Kt(e),Kt(t))&&this.delayManager.cancelAll()}catch(e){a.log.error("Failed to reset InAppMessage: ".concat(e))}};var RP=CP;function CP(e,t){this.identifierChecker=e,this.delayManager=t}UP.prototype.getDelayStorageItem=function(){var e=this.storage.getItem(this.storageKey);if(u.isNullOrUndefined(e))return null;try{return JSON.parse(e)}catch(e){return a.log.warn("Failed to get delay storage item: ".concat(e)),null}},UP.prototype.get=function(e,t){var r=this.getDelayStorageItem();return!u.isNullOrUndefined(r)&&null!=(e=null==(r=r[e])?void 0:r.find(function(e){return e.schedule.dispatchId===t}))?e:null},UP.prototype.set=function(e,t,r){var n=this.getDelayStorageItem();if(u.isNullOrUndefined(n))return a.log.debug("No delay storage item found. create new item"),void this.storage.setItem(this.storageKey,JSON.stringify(((i={})[e]=[r],i)));var i=null!=(i=n[e])?i:[];i.push(r),n[e]=i,this.storage.setItem(this.storageKey,JSON.stringify(n))},UP.prototype.remove=function(e,t){var r=this.getDelayStorageItem(),n=null==r?void 0:r[e];u.isNullOrUndefined(r)||u.isNullOrUndefined(n)?a.log.debug("No delay storage item found for ".concat(e,". do nothing")):(r[e]=n.filter(function(e){return e.schedule.dispatchId!==t}),0===r[e].length&&delete r[e],this.storage.setItem(this.storageKey,JSON.stringify(r)))},UP.prototype.values=function(){var e=this.getDelayStorageItem();return u.isNullOrUndefined(e)?(a.log.debug("No delay storage item found. do nothing"),[]):Object.values(e).flat()},UP.prototype.clear=function(){this.storage.removeItem(this.storageKey)};var xP=UP;function UP(e){this.storage=e,this.storageKey="iam-delay"}DP.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={})[DP.ROOT_TYPE]=r.key.type,t[DP.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},DP.prototype.createEvent=function(e,t,r,n){var i;return t instanceof n0?(n[DP.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[DP.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[DP.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,Vb.exposure(e.user,t,n,r)):t instanceof u0?Vb.remoteConfig(e.user,t,c(c({},n),t.properties),r):null},DP.ROOT_TYPE="$targetingRootType",DP.ROOT_ID="$targetingRootId",DP.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",DP.EXPERIMENT_VERSION_KEY="$experiment_version",DP.EXECUTION_VERSION_KEY="$execution_version";var kP=DP;function DP(e){this.clock=e}FP.prototype.record=function(e,t){var r=this;this.eventFactory.create(e,t).forEach(function(e){r.eventProcessor.process(e)})};var LP=FP;function FP(e,t){this.eventFactory=e,this.eventProcessor=t}jP.eligible=function(e,t,r){return jP.of(e,t,r,!0)},jP.ineligible=function(e,t,r){return jP.of(e,t,r,!1)},jP.of=function(e,t,r,n){return new jP(String(r),t.targetEvaluations,e.inAppMessage,n,t.get(bS))};var VP=jP;function jP(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.isEligible=n,this.layoutEvaluation=i}KP.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):VP.ineligible(e,t,h.UNSUPPORTED_PLATFORM)};var BP=KP;function KP(){}GP.prototype.evaluate=function(e,t,r){return this.userOverrideMatcher.matches(e,t)?VP.eligible(e,t,h.OVERRIDDEN):r.evaluate(e,t)};var HP=GP;function GP(e){this.userOverrideMatcher=e}JP.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?VP.ineligible(e,t,h.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var zP=JP;function JP(){}YP.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?VP.ineligible(e,t,h.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var qP=YP;function YP(){}$P.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):VP.ineligible(e,t,h.NOT_IN_IN_APP_MESSAGE_PERIOD)};var WP=$P;function $P(){}ZP.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?VP.ineligible(e,t,h.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var XP=ZP;function ZP(e){this.hiddenMatcher=e}eM.prototype.evaluate=function(e,t,r){return this.targetMatcher.matches(e,t)?r.evaluate(e,t):VP.ineligible(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var QP=eM;function eM(e){this.targetMatcher=e}rM.prototype.evaluate=function(e,t,r){return this.frequencyCapMatcher.matches(e,t)?VP.ineligible(e,t,h.IN_APP_MESSAGE_FREQUENCY_CAPPED):r.evaluate(e,t)};var tM=rM;function rM(e){this.frequencyCapMatcher=e}iM.prototype.evaluate=function(e,t,r){return VP.eligible(e,t,h.IN_APP_MESSAGE_TARGET)};var nM=iM;function iM(){}sM.prototype.evaluate=function(e,t,r){var n=AS.of(e),n=this.layoutEvaluator.evaluate(n,y0.create());return t.set(bS,n),r.evaluate(e,t)};var oM=sM;function sM(e){this.layoutEvaluator=e}uM.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},uM.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!u.isNullOrUndefined(e)&&t.identifiers.includes(e)};var aM=uM;function uM(){}pM.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 cM=pM;function pM(e){this.targetMatcher=e}fM.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var lM=fM;function fM(e){this.storage=e}dM.prototype.matches=function(e,t){var r=e.inAppMessage,n=e.user,e=e.timestamp;return this.isFrequencyCapped(r,n,e)},dM.prototype.isFrequencyCapped=function(e,t,r){if(!e.eventTrigger.frequencyCap)return!1;var n=this.createMatchContexts(e.eventTrigger.frequencyCap);if(0===n.length)return!1;for(var i=0,o=this.storage.get(e);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(t,r,s))return!0;return!1},dM.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new yM(new gM(i)))}return e.durationCap&&t.push(new yM(new EM(e.durationCap))),t};var hM=dM;function dM(e){this.storage=e}vM.prototype.matches=function(e,t,r){return this.predicate.matches(e,t,r)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var yM=vM;function vM(e){this.matchCount=0,this.predicate=e}Object.defineProperty(mM.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),mM.prototype.matches=function(e,t,r){e=e.identifiers[this.identifierCap.identifierType];if(u.isNullOrUndefined(e))return!1;r=r.identifiers[this.identifierCap.identifierType];return!u.isNullOrUndefined(r)&&e===r};var gM=mM;function mM(e){this.identifierCap=e}Object.defineProperty(wM.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),wM.prototype.matches=function(e,t,r){return t-r.timestamp<=this.durationCap.durationMillis};var EM=wM;function wM(e){this.durationCap=e}TM.prototype.getTriggerFlow=function(){return this.triggerFlow},TM.prototype.getDeliverFlow=function(e){return e?this.deliverReEvaluateFlow:this.deliverFlow};var bM=TM;function TM(e,t,r){this.layoutEvaluator=r;var r=S0.get("targetMatcher"),r=[new BP,new HP(new aM),new zP,new qP,new WP,new QP(new cM(r))],n=[new oM(this.layoutEvaluator)],t=[new tM(new hM(t)),new XP(new lM(e))],e=[new nM];this.triggerFlow=U0.of.apply(U0,Pe(Pe(Pe(Pe([],r,!1),n,!1),t,!1),e,!1)),this.deliverFlow=U0.of.apply(U0,Pe(Pe([],t,!1),e,!1)),this.deliverReEvaluateFlow=U0.of.apply(U0,Pe(Pe(Pe([],r,!1),t,!1),e,!1))}i(AM,_M=Da),AM.prototype.supports=function(e){return void 0!==e.inAppMessage},AM.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlow.evaluate(e,t))?r:VP.ineligible(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)},AM.prototype.record=function(e,t){this.eventRecorder.record(e,t),t.isEligible||null===t.layoutEvaluation||this.eventRecorder.record(t.layoutEvaluation.request,t.layoutEvaluation)};var _M,IM=AM;function AM(e,t){var r=_M.call(this)||this;return r.evaluationFlow=e,r.eventRecorder=t,r}NM.prototype.process=function(e,t){e=this.resolveFlow(e,t),e=new IM(e,this.eventRecorder);return this.core.inAppMessage(t,y0.create(),e)},NM.prototype.resolveFlow=function(e,t){return"TRIGGER"===e?this.flowFactory.getTriggerFlow():this.flowFactory.getDeliverFlow(null!=(t=null==(e=t.inAppMessage.evaluateContext)?void 0:e.atDeliverTime)&&t)};var OM=NM;function NM(e,t,r){this.core=e,this.flowFactory=t,this.eventRecorder=r}PM.prototype.resolve=function(e,t,r){e=new AS(e,r,t);return this.core.inAppMessage(e,y0.create(),this.layoutEvaluator)};var SM=PM;function PM(e,t){this.core=e,this.layoutEvaluator=t}i(CM,MM=ee),CM.prototype.supports=function(e){return"STORED"===e},CM.prototype.deliver=function(e){var t=this.delayManager.delete(e),r=(u.requiredNotNullOrUndefined(t,function(){return"InAppMessageDelay not found (inAppMessageKey=".concat(e.schedule.inAppMessageKey,")")}),pP.of(e)),r=this.deliverProcessor.process(r);return uP.of(e,"DELIVER",r,t)},CM.prototype.delay=function(e){var t=this.delayManager.delay(e);return a.log.debug("StoredDelay is scheduled (inAppMessageKey=".concat(e.schedule.inAppMessageKey,", delayMillis=").concat(e.delayMillis.toLocaleString(),")")),uP.of(e,"DELAY",null,t)},CM.prototype.ignore=function(e){var t=this.delayManager.delete(e);return uP.of(e,"IGNORE",null,t)};var MM,RM=CM;function CM(e,t){var r=MM.call(this)||this;return r.deliverProcessor=e,r.delayManager=t,r}UM.prototype.decorate=function(e){if(e.identifiers[jt.SESSION])return e;var t=this.sessionManager.currentSessionId;if(u.isNullOrUndefined(t))return e;t=(new Ht).addIdentifiers(e.identifiers).add(jt.SESSION,t).build();return c(c({},e),{identifiers:t})};var xM=UM;function UM(e){this.sessionManager=e}DM.prototype.decorate=function(e){var t=this.sessionUserDecorator.decorate(e.user);return e.copyWithUser(t)};var kM=DM;function DM(e){this.sessionUserDecorator=e}LM.prototype.marketing=function(e){return this.operations.set("$marketing",e),this},LM.prototype.information=function(e){return this.operations.set("$information",e),this},LM.prototype.custom=function(e,t){return this.operations.set(e,t),this},LM.prototype.build=function(){return new FM(this.operations)};Vl=LM;function LM(){this.operations=new Map}VM.prototype.toEvent=function(e){var r=new Ro;return this.operations.forEach(function(e,t){r.set(t,e)}),{key:e,properties:u.fromMap(this.operations)}},VM.prototype.toRecord=function(){var r={};return this.operations.forEach(function(e,t){r[t]=e}),r};var FM=VM;function VM(e){this.operations=e}n.HackleSubscriptionStatus=void 0,(m=n.HackleSubscriptionStatus||(n.HackleSubscriptionStatus={})).SUBSCRIBED="SUBSCRIBED",m.UNSUBSCRIBED="UNSUBSCRIBED",m.UNKNOWN="UNKNOWN";var jM=a.log,BM=null;function KM(e,t){var r,t=cO.config(t);cO.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;if(null===(a=(new iN).getInvocator(o.getInvocationType(),new HN)))throw new Error("Failed to get invocator with invocationType:".concat(o.getInvocationType()));var s=new oS,a=new zN(a),a=new as(a,s);if(!o.getAppMode)return a;if((s=o.getAppMode().toLowerCase())===os.native)return a;if(s!==os.web_view_wrapper)throw new Error("Unsupported HackleAppMode: ".concat(s));return o=HM(n,i),(s=new us(o,a)).syncUser(),s}}catch(e){jM.error("Unexpected exception while check WebApp client: ".concat(e))}return HM(e,t)}function HM(e,t){var r=cO.sdk(e,t);if(BM)return jM.debug("use already exists hackleClient"),BM;var n=new es,i=(n.initialize(),new pI),o=Zo.getInstance({days:Xe,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),s=cO.isBeaconSupported(),a=qO.intercept(r,WO.create()),u=qO.intercept(r,XO.create()),c=a,p=(s&&(c=u),new lO),l=new hO(p,new yO("setTimeout"),cO.pollingIntervalMillis(t)),f=new _N(r,fI.postfix(i,"_".concat(e.slice(0,8)))),h=new _O(mI.clientFetch(t.sdkUrl,r.key),a),f=new RO(f,h),h=(p.add(f),new $N),d=new NO(mI.userTargets(t.sdkUrl),a),y=new AO(mI.userCohorts(t.sdkUrl),a),v=new YA(h),g=new nI(fI.postfix(o,"_".concat(e))),m=g.getUser(),E=t.user||null,g=new tI(rs(),g,d,y,v,h,Fe.instance,m,E),d=(p.add(g),new uI(t.sessionTimeoutMillis,fI.postfix(o,"_".concat(e.slice(8))))),y=(g.addListener(d),new L_(i,"".concat(et,"_").concat(e),Ye)),E=new kO(mI.clientDispatch(t.eventUrl),a),p=E,s=(s&&(p=new kO(mI.beaconDispatch(t.eventUrl,r.key),u)),new LO(y,E)),r=new xO(E,p,s),u=new UN([new FN(cO.dedupIntervalMillis(t)),new BN(cO.dedupIntervalMillis(t))]),y=new HO(r,Ye,new yO("setTimeout"),$e),E=new Zb(y,u,d,g),p=new xM(d),r=new kM(p),w=(E.addDecorator(r),new bN),u=new I0(new dI(o,"".concat(st,"_").concat(e.slice(0,8)))),r=new I0(new dI(o,"".concat(at,"_").concat(e.slice(0,8)))),b=new wI(fI.prefix(i,"".concat(ut,"_").concat(e.slice(0,8),"_"))),T=new sA(fI.prefix(i,"".concat(ct,"_").concat(e.slice(0,8),"_"))),_=new kP(Fe.instance),I=new LP(_,E),_=N_.create(f,_,E,[u,r]),A=new nS(_,g),O=new jA(new KA(fI.postfix(o,"_".concat(e.slice(0,8)))),v,_,g),N=new $b(g,_),N=(d.addListener(O),d.addListener(N),new jI(_)),S=new TI([new II,new OI(new SA),new SI(new SA),new MI(b,Fe.instance),new CI(new MA),new UI(new MA),new DI(new CA),new FI(new CA)]),S=new uA([new pA,new dA(S),new fA]),N=new vA(Fe.instance,N,S),S=new wA([new TA,new IA(N),new OA(N)]),P=new eA(mI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),P=new KI(ZI.create(P),N,S),N=S0.get("delegatingEvaluator"),S=new SS(new gS(N),new RS,I),N=new xS(T),N=new VS(P,N),M=new BS,b=new bM(b,T,S),T=new SM(_,S),S=new HS(Fe.instance,new yO("setTimeout")),i=new xP(fI.prefix(i,"".concat(yt,"_").concat(e.slice(0,8),"_"))),e=new WS(S,new Map,i),b=new OM(_,b,I),I=new iP(f,g,M,T,b,N,p),T=[new dP(I,e),new gP(I,e),new RM(I,e)],N=new EP(new bP,new sP(T)),p=(S.listener=N,new mA(new rA(S0.get("targetMatcher")))),I=new AP(f,p,b),T=new NP(N),S=new PP(I,T),p=new RP(M,e),R=new dS(N,i,S,p,y,Fe.instance),b=(g.addListener(R),new sO(f)),I=(new iO(y,b),new QN(g,h,dt)),T=(h.addListener(I),new tS(_)),M=(I.addListener(T),new YN(_,g)),e=(t.automaticPageTracking&&h.addListener(M),new lN(S0.get("targetMatcher"))),N=new EN(o,pt,{days:lt}),i=new cN(f,e,N,_),S=new yN(new gN(v),new UA,N,w),p=new sN(i,S,g,_),y=(h.addListener(p),new vI(_,g,u,r)),o=(null==(b=t.devTool)?void 0:b.userExplorer)&&"function"==typeof(null==(T=t.devTool)?void 0:T.userExplorer),f=t.devTool&&o?{manager:t.devTool,userExplorer:y}:void 0,e=new Ki(mI.monitoring(t.monitoringUrl),a,c,new yO("setTimeout"),We),C=(Ni.addRegistry(e),new ON),v=(C.addListener(h),C.addListener(I),C.addListener(d),C.addListener(n),C.addListener(s),C.addListener(E),C.addListener(e),l.start(),SN.create(ht,1)),x=new Jo(_,l,d,g,A,v,M,P,f),N=(BM=x,(new R_).install(_,g),g.resolve().hackleProperties.browserName);return C.install("string"==typeof N?N:null),i=Date.now(),S=g.currentUser,p=d.currentSessionId,(V_(m,S)?d.startNewSessionIfNeeded(S,i):d.startNewSession(m,S,i))===p&&O.startNewCampaignIfNeeded(S,i),x.onReady(function(){t.autoOpenDevTool&&(t.devTool?x.showUserExplorer():jM.error("DevTool is not provided")),C.initialize(),w.dispatchDoneEventIfNeeded(),R.loadDelaySchedule()}),x}var GM=function(e,t){return(GM=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 zM=function(){return(zM=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 JM(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 qM(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 YM(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}WM.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},WM.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},WM.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Gl=WM;function WM(){this.listeners={}}XM.arePropertiesEqual=function(e,t){var r=XM.coerceUnknownToProperties(e),n=XM.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]})},XM.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var $M=XM;function XM(){}QM.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)&&$M.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&$M.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var ZM=QM;function QM(){}var eR=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=KM(e,zM(zM({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.50.0"})),r.getSessionId=r.getSessionId.bind(r),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.setUserProperties=r.setUserProperties.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.updatePushSubscriptions=r.updatePushSubscriptions.bind(r),r.updateSmsSubscriptions=r.updateSmsSubscriptions.bind(r),r.updateKakaoSubscriptions=r.updateKakaoSubscriptions.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.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),r.fetch=r.fetch.bind(r),r.close=r.close.bind(r),r.setInAppMessageListener=r.setInAppMessageListener.bind(r),r.getExperiment=r.getExperiment.bind(r),r.setPhoneNumber=r.setPhoneNumber.bind(r),r.unsetPhoneNumber=r.unsetPhoneNumber.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.getDisplayedInAppMessageView=r.getDisplayedInAppMessageView.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return GM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getSessionId=function(){return this.client.getSessionId()},i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(t){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.setUser(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserId=function(t){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.setUserId(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setDeviceId=function(t){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.setDeviceId(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserProperty=function(t,r){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.setUserProperty(t,r),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserProperties=function(t){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.setUserProperties(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.updateUserProperties=function(t){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.updateUserProperties(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.updatePushSubscriptions=function(t){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.updatePushSubscriptions(t),[2]})})},i.prototype.updateSmsSubscriptions=function(t){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.updateSmsSubscriptions(t),[2]})})},i.prototype.updateKakaoSubscriptions=function(t){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.updateKakaoSubscriptions(t),[2]})})},i.prototype.resetUser=function(){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.resetUser(),this.emitUpdatedUser(this.getUser()),[2]})})},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(zM(zM({},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.getExperiment=function(e){return this.client.getExperiment(e)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){ZM.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.prototype.close=function(){this.client.close()},i.prototype.setPhoneNumber=function(t){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.setPhoneNumber(t),[2]})})},i.prototype.unsetPhoneNumber=function(){return JM(this,void 0,void 0,function(){return qM(this,function(e){return this.client.unsetPhoneNumber(),[2]})})},i.prototype.getDisplayedInAppMessageView=function(){return this.client.getDisplayedInAppMessageView()},i}(Gl);var k={exports:{}},T={},tR=Object.getOwnPropertySymbols,rR=Object.prototype.hasOwnProperty,nR=Object.prototype.propertyIsEnumerable;var r=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]))rR.call(r,o)&&(n[o]=r[o]);if(tR)for(var s=tR(r),a=0;a<s.length;a++)nR.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},iR=r,Du="function"==typeof Symbol&&Symbol.for,oR=Du?Symbol.for("react.element"):60103,sR=Du?Symbol.for("react.portal"):60106,$c=Du?Symbol.for("react.fragment"):60107,Na=Du?Symbol.for("react.strict_mode"):60108,Ou=Du?Symbol.for("react.profiler"):60114,aR=Du?Symbol.for("react.provider"):60109,uR=Du?Symbol.for("react.context"):60110,cR=Du?Symbol.for("react.forward_ref"):60112,O=Du?Symbol.for("react.suspense"):60113,pR=Du?Symbol.for("react.memo"):60115,lR=Du?Symbol.for("react.lazy"):60116,fR="function"==typeof Symbol&&Symbol.iterator;function hR(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 dR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yR={};function vR(e,t,r){this.props=e,this.context=t,this.refs=yR,this.updater=r||dR}function gR(){}function mR(e,t,r){this.props=e,this.context=t,this.refs=yR,this.updater=r||dR}vR.prototype.isReactComponent={},vR.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(hR(85));this.updater.enqueueSetState(this,e,t,"setState")},vR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},gR.prototype=vR.prototype;var b=mR.prototype=new gR,ER=(b.constructor=mR,iR(b,vR.prototype),b.isPureReactComponent=!0,{current:null}),wR=Object.prototype.hasOwnProperty,bR={key:!0,ref:!0,__self:!0,__source:!0};function TR(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)wR.call(t,n)&&!bR.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:oR,type:e,key:o,ref:s,props:i,_owner:ER.current}}function _R(e){return"object"==typeof e&&null!==e&&e.$$typeof===oR}var IR=/\/+/g,AR=[];function OR(e,t,r,n){var i;return AR.length?((i=AR.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 NR(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,AR.length<10&&AR.push(e)}function SR(e,t,r){return null==e?0:function e(t,r,n,i){var o=!1;if(null===(t="undefined"!=(a=typeof t)&&"boolean"!==a?t:null))o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case oR:case sR:o=!0}}if(o)return n(i,t,""===r?"."+PR(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+PR(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=fR&&t[fR]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+PR(a,s++),n,i);else if("object"===a)throw n=""+t,Error(hR(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function PR(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 RR(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?CR(e,n,r,function(e){return e}):null!=e&&(_R(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(IR,"$&/")+"/")+r,e={$$typeof:oR,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function CR(e,t,r,n,i){var o="";SR(e,RR,t=OR(t,o=null!=r?(""+r).replace(IR,"$&/")+"/":o,n,i)),NR(t)}var xR={current:null};function UR(){var e=xR.current;if(null===e)throw Error(hR(321));return e}var kR,DR,LR,pa={ReactCurrentDispatcher:xR,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:ER,IsSomeRendererActing:{current:!1},assign:iR},_=(T.Children={map:function(e,t,r){if(null==e)return e;var n=[];return CR(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;SR(e,MR,t=OR(null,null,t,r)),NR(t)},count:function(e){return SR(e,function(){return null},null)},toArray:function(e){var t=[];return CR(e,t,null,function(e){return e}),t},only:function(e){if(_R(e))return e;throw Error(hR(143))}},T.Component=vR,T.Fragment=$c,T.Profiler=Ou,T.PureComponent=mR,T.StrictMode=Na,T.Suspense=O,T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pa,T.cloneElement=function(e,t,r){if(null==e)throw Error(hR(267,e));var n=iR({},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=ER.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)wR.call(t,a)&&!bR.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:oR,type:e.type,key:i,ref:o,props:n,_owner:s}},T.createContext=function(e,t){return(e={$$typeof:uR,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:aR,_context:e},e.Consumer=e},T.createElement=TR,T.createFactory=function(e){var t=TR.bind(null,e);return t.type=e,t},T.createRef=function(){return{current:null}},T.forwardRef=function(e){return{$$typeof:cR,render:e}},T.isValidElement=_R,T.lazy=function(e){return{$$typeof:lR,_ctor:e,_status:-1,_result:null}},T.memo=function(e,t){return{$$typeof:pR,type:e,compare:void 0===t?null:t}},T.useCallback=function(e,t){return UR().useCallback(e,t)},T.useContext=function(e,t){return UR().useContext(e,t)},T.useDebugValue=function(){},T.useEffect=function(e,t){return UR().useEffect(e,t)},T.useImperativeHandle=function(e,t,r){return UR().useImperativeHandle(e,t,r)},T.useLayoutEffect=function(e,t){return UR().useLayoutEffect(e,t)},T.useMemo=function(e,t){return UR().useMemo(e,t)},T.useReducer=function(e,t,r){return UR().useReducer(e,t,r)},T.useRef=function(e){return UR().useRef(e)},T.useState=function(e){return UR().useState(e)},T.version="16.14.0",{}),P=Function.call.bind(Object.prototype.hasOwnProperty),FR=function(){};function VR(e,t,r,n,i){if("production"!==production)for(var o in e)if(LR(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,kR)}catch(e){s=e}!s||s instanceof Error||FR((n||"React class")+": type specification of "+r+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof s+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),s instanceof Error&&!(s.message in DR)&&(DR[s.message]=!0,o=i?i():"",FR("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(kR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",DR={},LR=P,FR=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),VR.resetWarningCache=function(){"production"!==production&&(DR={})},"production"!==production){var jR=r,BR=VR,A="function"==typeof Symbol&&Symbol.for,KR=A?Symbol.for("react.element"):60103,HR=A?Symbol.for("react.portal"):60106,GR=A?Symbol.for("react.fragment"):60107,zR=A?Symbol.for("react.strict_mode"):60108,JR=A?Symbol.for("react.profiler"):60114,qR=A?Symbol.for("react.provider"):60109,YR=A?Symbol.for("react.context"):60110,WR=A?Symbol.for("react.concurrent_mode"):60111,$R=A?Symbol.for("react.forward_ref"):60112,XR=A?Symbol.for("react.suspense"):60113,ZR=A?Symbol.for("react.suspense_list"):60120,QR=A?Symbol.for("react.memo"):60115,eC=A?Symbol.for("react.lazy"):60116,tC=A?Symbol.for("react.block"):60121,rC=A?Symbol.for("react.fundamental"):60117,nC=A?Symbol.for("react.responder"):60118,iC=A?Symbol.for("react.scope"):60119,oC="function"==typeof Symbol&&Symbol.iterator,sC="@@iterator";function aC(e){if(null===e||"object"!=typeof e)return null;e=oC&&e[oC]||e[sC];return"function"==typeof e?e:null}var uC={current:null},cC={current:null},pC=/^(.*)[\\\/]/,lC=1;function fC(e){if(null==e)return null;if("number"==typeof e.tag&&mC("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 GR:return"Fragment";case HR:return"Portal";case JR:return"Profiler";case zR:return"StrictMode";case XR:return"Suspense";case ZR:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case YR:return"Context.Consumer";case qR:return"Context.Provider";case $R:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case QR:return fC(e.type);case tC:return fC(e.render);case eC:r=(t=e)._status===lC?t._result:null;if(r)return fC(r)}var t,r;return null}var hC={},dC=null;function yC(e){dC=e}hC.getCurrentStack=null,hC.getStackAddendum=function(){var e,t,r,n,i,o="",s=(dC&&(e=fC(dC.type),r=dC._owner,o+=(e=e,t=dC._source,r=r&&fC(r.type),i="",t?(n=(s=t.fileName).replace(pC,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(pC))&&(s=s[1])?s.replace(pC,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),hC.getCurrentStack);return s&&(o+=s()||""),o};var vC={ReactCurrentDispatcher:uC,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:cC,IsSomeRendererActing:{current:!1},assign:jR};function gC(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];EC("warn",e,r)}function mC(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];EC("error",e,r)}function EC(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=vC.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){}}jR(vC,{ReactDebugCurrentFrame:hC,ReactComponentTreeHook:{}});var wC={};function bC(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;wC[r]||(mC("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),wC[r]=!0)}var TC={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){bC(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){bC(e,"replaceState")},enqueueSetState:function(e,t,r,n){bC(e,"setState")}},_C={};function IC(e,t,r){this.props=e,this.context=t,this.refs=_C,this.updater=r||TC}Object.freeze(_C),IC.prototype.isReactComponent={},IC.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")},IC.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var AC,OC={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(AC in OC)OC.hasOwnProperty(AC)&&!function(e,t){Object.defineProperty(IC.prototype,e,{get:function(){gC("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(AC,OC[AC]);function NC(){}function SC(e,t,r){this.props=e,this.context=t,this.refs=_C,this.updater=r||TC}NC.prototype=IC.prototype,(A=SC.prototype=new NC).constructor=SC,jR(A,IC.prototype),A.isPureReactComponent=!0;var PC,MC,RC=Object.prototype.hasOwnProperty,CC={key:!0,ref:!0,__self:!0,__source:!0};function xC(e){if(RC.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function UC(e){if(RC.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var kC={},DC=function(e,t,r,n,i,o,s){e={$$typeof:KR,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 LC(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in xC(t)&&(s=t.ref,"string"==typeof(c=t).ref&&cC.current&&c.__self&&cC.current.stateNode!==c.__self&&(l=fC(cC.current.type),kC[l]||(mC('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',fC(cC.current.type),c.ref),kC[l]=!0))),UC(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)RC.call(t,n)&&!CC.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),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(){MC||(MC=!0,mC("%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(){PC||(PC=!0,mC("%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}))),DC(e,o,s,a,u,cC.current,i)}function FC(e){return"object"==typeof e&&null!==e&&e.$$typeof===KR}var VC=".",jC=":",BC=!1,KC=/\/+/g;function HC(e){return(""+e).replace(KC,"$&/")}var GC=10,zC=[];function JC(e,t,r,n){var i;return zC.length?((i=zC.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 qC(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,zC.length<GC&&zC.push(e)}function YC(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 KR:case HR:a=!0}}if(a)return n(i,t,""===r?VC+WC(t,0):r),1;var u=0,c=""===r?VC:r+jC;if(Array.isArray(t))for(var p=0;p<t.length;p++)u+=e(o=t[p],c+WC(o,p),n,i);else if("function"==typeof(r=aC(t))){r===t.entries&&(BC||gC("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."),BC=!0);for(var l,f=r.call(t),h=0;!(l=f.next()).done;)u+=e(o=l.value,c+WC(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+hC.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 WC(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 $C(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function XC(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)?ZC(o,n,r,function(e){return e}):null!=o&&(FC(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":HC(o.key)+"/")+r,o=DC(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function ZC(e,t,r,n,i){var o="",t=JC(t,o=null!=r?HC(r)+"/":o,n,i);YC(e,XC,t),qC(t)}function QC(e){return"string"==typeof e||"function"==typeof e||e===GR||e===WR||e===JR||e===zR||e===XR||e===ZR||"object"==typeof e&&null!==e&&(e.$$typeof===eC||e.$$typeof===QR||e.$$typeof===qR||e.$$typeof===YR||e.$$typeof===$R||e.$$typeof===rC||e.$$typeof===nC||e.$$typeof===iC||e.$$typeof===tC)}function ex(){var e=uC.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 tx(){if(cC.current){var e=fC(cC.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var rx=!1,nx={};function ix(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=tx())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),nx[t=r]||(nx[t]=!0,r="",e&&e._owner&&e._owner!==cC.current&&(r=" It was passed a child from "+fC(e._owner.type)+"."),yC(e),mC('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),yC(null)))}function ox(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];FC(n)&&ix(n,t)}else if(FC(e))e._store&&(e._store.validated=!0);else if(e){var i=aC(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)FC(o.value)&&ix(o.value,t)}}function sx(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=fC(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==$R&&t.$$typeof!==QR)return;r=t.propTypes}r?(yC(e),BR(r,e.props,"prop",n,hC.getStackAddendum),yC(null)):void 0===t.PropTypes||rx||(rx=!0,mC("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||mC("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ax(e,t,r){var n,i=QC(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+".":"")||tx(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===KR?(s="<"+(fC(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,mC("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)),LC.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)ox(arguments[o],e);if(e===GR){var s=t;yC(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){mC("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&mC("Invalid attribute `ref` supplied to `React.Fragment`."),yC(null)}else sx(t);return t}var ux=!1;try{var cx=Object.freeze({}),px=new Map([[cx,null]]),lx=new Set([cx]);px.set(0,0),lx.add(0)}catch(e){}function fx(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=jR({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,p=e._owner;if(null!=t)for(n in xC(t)&&(a=t.ref,p=cC.current),UC(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)RC.call(t,n)&&!CC.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 DC(e.type,s,a,u,c,p,o)}.apply(this,arguments),i=2;i<arguments.length;i++)ox(arguments[i],n.type);return sx(n),n}function hx(e){var t=ax.bind(null,e);return t.type=e,ux||(ux=!0,gC("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 gC("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}A=ax,_.Children={map:function(e,t,r){if(null==e)return e;var n=[];return ZC(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=JC(null,null,t,r),YC(e,$C,t),qC(t)},count:function(e){return YC(e,function(){return null},null)},toArray:function(e){var t=[];return ZC(e,t,null,function(e){return e}),t},only:function(e){if(FC(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},_.Component=IC,_.Fragment=GR,_.Profiler=JR,_.PureComponent=SC,_.StrictMode=zR,_.Suspense=XR,_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vC,_.cloneElement=fx,_.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&mC("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:YR,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:qR,_context:r}),i=!1,t={$$typeof:YR,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,mC("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,mC("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},_.createElement=A,_.createFactory=hx,_.createRef=function(){var e={current:null};return Object.seal(e),e},_.forwardRef=function(e){return null!=e&&e.$$typeof===QR?mC("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?mC("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&mC("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||mC("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:$R,render:e}},_.isValidElement=FC,_.lazy=function(e){var t,r,n={$$typeof:eC,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){mC("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){mC("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},_.memo=function(e,t){return QC(e)||mC("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:QR,type:e,compare:void 0===t?null:t}},_.useCallback=function(e,t){return ex().useCallback(e,t)},_.useContext=function(e,t){var r,n=ex();return void 0!==t&&mC("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?mC("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&&mC("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},_.useDebugValue=function(e,t){return ex().useDebugValue(e,t)},_.useEffect=function(e,t){return ex().useEffect(e,t)},_.useImperativeHandle=function(e,t,r){return ex().useImperativeHandle(e,t,r)},_.useLayoutEffect=function(e,t){return ex().useLayoutEffect(e,t)},_.useMemo=function(e,t){return ex().useMemo(e,t)},_.useReducer=function(e,t,r){return ex().useReducer(e,t,r)},_.useRef=function(e){return ex().useRef(e)},_.useState=function(e){return ex().useState(e)},_.version="16.14.0"}"production"===production?k.exports=T:k.exports=_;var dx=k.exports,yx=k.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),H=yx.Consumer,vx=yx.Provider;var gx=a.log;function mx(e,t){e=Ex(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function Ex(e,t){void 0===t&&(t="A");var r=k.exports.useContext(yx),n=r.hackle,i=r.userVersion,o=r.initialized,s=k.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||bt.of(t,h.EXCEPTION):bt.of(t,h.SDK_NOT_READY)},[t,e,n,o]),r=YM(k.exports.useState(function(){return n?s():(gx.error("HackleClient is not existed"),bt.of(t,h.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=YM(k.exports.useState(i),2),c=u[0],u=u[1];return Tx(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function wx(e){e=bx(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function bx(e){var t=k.exports.useContext(yx),r=t.hackle,n=t.userVersion,i=t.initialized,o=k.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||_t.off(h.EXCEPTION):_t.off(h.SDK_NOT_READY)},[e,r,i]),t=YM(k.exports.useState(function(){return r?o():(gx.error("HackleClient is not existed"),_t.off(h.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=YM(k.exports.useState(n),2),u=a[0],a=a[1];return Tx(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function Tx(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function _x(e){var t,r=e.experimentKey,e=e.children,n=(r=mx(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 Ix(e){return e.variation,e=e.children,k.exports.createElement(k.exports.Fragment,null,e)}function Ax(e){var t=(r=wx(e.featureKey)).isLoading,r=r.isOn;return t?null:dx.createElement(dx.Fragment,null,e.children(r))}n.Bucket=Ut,n.Cohort=jn,n.Container=sr,n.ContainerGroup=ur,n.CoreVersion=mr,n.Decision=bt,n.DecisionReason=h,n.DefaultBrowserPropertyProvider=oS,n.Delay=Dn,n.EXPERIMENT_IMPLEMENTATION_TYPE=Pt,n.EmptyHackleRemoteConfig=At,n.EmptyParameterConfig=je,n.EventType=Ft,n.Experiment=Mt,n.FeatureFlagDecision=_t,n.HackleContext=yx,n.HackleContextConsumer=H,n.HackleContextProvider=vx,n.HackleExperiment=_x,n.HackleFeature=Ax,n.HackleInAppMessageActionImpl=Fn,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=YM(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 zM(zM({},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 zM(zM({},e),{initialized:!0})})},function(){a(function(e){return zM(zM({},e),{initialized:!0})})}).catch(function(){a(function(e){return zM(zM({},e),{initialized:!0})})})},[t]),i||s.initialized?dx.createElement(vx,{value:s},e):null},n.HackleSubscriptionOperations=FM,n.HackleSubscriptionOperationsBuilder=Vl,n.HackleVariation=Ix,n.IAM_ACTION_AREA=["BUTTON","IMAGE","MESSAGE","X_BUTTON"],n.IAM_ACTION_TYPE=Lr,n.IAM_BEHAVIOR=Dr,n.IAM_DISPLAY_TYPE=xr,n.IAM_HORIZONTAL_ALIGNMENT=Vr,n.IAM_LAYOUT_TYPE=Ur,n.IAM_ORIENTATION=kr,n.IAM_PLATFORM_TYPE=Rr,n.IAM_STATUS=Mr,n.IAM_TIMEUNIT=Cr,n.IAM_VERTICAL_ALIGNMENT=Fr,n.IdentifierType=jt,n.IdentifiersBuilder=Ht,n.InAppMessage=jr,n.InAppMessageAction=Mn,n.InAppMessageAfterCondition=Un,n.InAppMessageAlignment=hn,n.InAppMessageBackground=Pn,n.InAppMessageButton=In,n.InAppMessageButtonStyle=Sn,n.InAppMessageContext=sn,n.InAppMessageContextLayout=ln,n.InAppMessageContextMessage=cn,n.InAppMessageDurationCap=Qr,n.InAppMessageEvaluateContext=Cn,n.InAppMessageEventFrequencyCap=Wr,n.InAppMessageEventTrigger=Jr,n.InAppMessageEventTriggerRule=qr,n.InAppMessageExperimentContext=un,n.InAppMessageIdentifierCap=Xr,n.InAppMessageImage=yn,n.InAppMessageImageAutoScroll=gn,n.InAppMessagePeriodAlways=Kr,n.InAppMessagePeriodCustom=Gr,n.InAppMessagePositionalButton=On,n.InAppMessageTargetContext=tn,n.InAppMessageText=En,n.InAppMessageTextAttribute=bn,n.InAppMessageTextStyle=_n,n.InAppMessageUserOverride=nn,n.Logger=a,n.MATCH_OPERATORS=Ir,n.MATCH_TYPES=Tr,n.MATCH_VALUE_TYPES=_r,n.MetaVersion=wr,n.ParameterConfiguration=Nt,n.PropertyOperations=xo,n.PropertyOperationsBuilder=Ro,n.RemoteConfigDecision=Et,n.RemoteConfigParameter=pr,n.RemoteConfigParameterValue=dr,n.RemoteConfigTargetRule=fr,n.SEGMENT_TYPES=Nr,n.Segment=ir,n.Slot=Dt,n.SplitUrlConfig=Bn,n.SplitUrlTargets=Hn,n.TARGET_ACTION_TYPES=Ar,n.TARGET_KEY_TYPES=Or,n.Target=Jt,n.TargetAction=er,n.TargetCondition=Yt,n.TargetKey=$t,n.TargetMatch=Zt,n.TargetRule=rr,n.TargetingType=Sr,n.UserTargetEvent=zn,n.Variation=Ct,n.Version=vr,n.createInstance=function(e,t){return new eR(e,t)},n.getUserId=rs,n.removeUserId=ns,n.resolveIdentifiers=Kt,n.sanitizeUser=zt,n.setUserId=function(e){Zo.getInstance().setItem(Qe,e)},n.useFeature=function(e){var t=(n=k.exports.useContext(yx)).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=YM(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&gx.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=YM(k.exports.useState(r),2))[0],n=n[1];return Tx(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=k.exports.useContext(yx)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||_t.off(h.EXCEPTION)},[e,t,n]),o=(s=YM(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&gx.error("HackleClient is not existed"),_t.off(h.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=YM(k.exports.useState(r),2))[0],n=n[1];return Tx(a,r)||(n(r),s(i())),o},n.useLoadableFeature=wx,n.useLoadableFeatureDetail=bx,n.useLoadableRemoteConfig=function(){var e=(o=k.exports.useContext(yx)).hackle,t=o.userVersion,r=o.initialized,n=k.exports.useCallback(function(){return r&&(null==e?void 0:e.remoteConfig())||new At},[e,r]),i=(o=YM(k.exports.useState(function(){return e||gx.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=YM(k.exports.useState(t),2))[0],a=a[1];return Tx(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=mx,n.useLoadableVariationDetail=Ex,n.useRemoteConfig=function(){var e=(r=k.exports.useContext(yx)).hackle,t=r.userVersion,r=r.initialized,n=k.exports.useCallback(function(){return(null==e?void 0:e.remoteConfig())||new At},[e,r]),i=(o=YM(k.exports.useState(function(){return e||gx.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=YM(k.exports.useState(t),2))[0],r=r[1];return Tx(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=k.exports.useContext(yx).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(gx.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=k.exports.useContext(yx)).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=YM(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&gx.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=YM(k.exports.useState(n),2))[0],c=c[1];return Tx(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=k.exports.useContext(yx)).hackle,n=i.userVersion,i=i.initialized,o=k.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||bt.of(t,h.EXCEPTION)},[t,e,r,i]),s=(a=YM(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&gx.error("HackleClient is not existed"),bt.of(t,h.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=YM(k.exports.useState(n),2))[0],i=i[1];return Tx(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 K(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",t="function"==typeof atob,r="function"==typeof btoa,G="function"==typeof Buffer;const H="function"==typeof TextDecoder?new TextDecoder:void 0,z="function"==typeof TextEncoder?new TextEncoder:void 0;const Y=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),J=(e=>{let r={};return e.forEach((e,t)=>r[e]=t),r})(Y),q=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,W=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+=Y[r>>18&63]+Y[r>>12&63]+Y[r>>6&63]+Y[63&r]}return e?s.slice(0,e-3)+"===".substring(e):s};const ee=r?e=>btoa(e):G?e=>Buffer.from(e,"binary").toString("base64"):Q,te=G?e=>Buffer.from(e).toString("base64"):r=>{let n=[];for(let e=0,t=r.length;e<t;e+=4096)n.push(W.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?W(192|t>>>6)+W(128|63&t):W(224|t>>>12&15)+W(128|t>>>6&63)+W(128|63&t):(t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320),W(240|t>>>18&7)+W(128|t>>>12&63)+W(128|t>>>6&63)+W(128|63&t))},ie=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,oe=e=>e.replace(ie,ne),se=G?e=>Buffer.from(e,"utf8").toString("base64"):z?e=>te(z.encode(e)):e=>ee(oe(e)),ae=(e,t=!1)=>t?X(se(e)):se(e);r=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 W(55296+(t>>>10))+W(56320+(1023&t));case 3:return W((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return W((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},pe=e=>e.replace(ue,ce);var i=t=>{if(t=t.replace(/\s+/g,""),!q.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let r,n="",i,o;for(let e=0;e<t.length;)r=J[t.charAt(e++)]<<18|J[t.charAt(e++)]<<12|(i=J[t.charAt(e++)])<<6|(o=J[t.charAt(e++)]),n+=64===i?W(r>>16&255):64===o?W(r>>16&255,r>>8&255):W(r>>16&255,r>>8&255,255&r);return n};const le=t?e=>atob(Z(e)):G?e=>Buffer.from(e,"base64").toString("binary"):i,fe=G?e=>$(Buffer.from(e,"base64")):e=>$(le(e).split("").map(e=>e.charCodeAt(0))),he=e=>fe(ye(e)),de=G?e=>Buffer.from(e,"base64").toString("utf8"):H?e=>H.decode(fe(e)):e=>pe(le(e)),ye=e=>Z(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),ve=e=>de(ye(e));function ge(){var e=(e,t)=>Object.defineProperty(String.prototype,e,Ee(t));e("fromBase64",function(){return ve(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:ve,toBase64:ae,encode:ae,encodeURI:r,encodeURL:r,utob:oe,btou:pe,decode:ve,isValid:e=>{if("string"!=typeof e)return!1;e=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:re,toUint8Array:he,extendString:ge,extendUint8Array:me,extendBuiltins:()=>{ge(),me()}};var be=function(e,t){return(be=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 o(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}be(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 u(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 Te(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))}_e.isNotNullOrUndefined=function(e){return null!=e},_e.isNullOrUndefined=function(e){return null==e},_e.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},_e.fromMap=function(e){var r={};return e.forEach(function(e,t){r[t]=e}),r};var p=_e;function _e(){}Ie.mapNotNullOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);p.isNotNullOrUndefined(o)&&r.push(o)}return r},Ie.mapOrUndefined=function(e,t){for(var r=Array(),n=0,i=e;n<i.length;n++){var o=t(i[n]);if(p.isNullOrUndefined(o))return;r.push(o)}return r},Ie.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},Ie.associate=function(e,t){return this.associateTo(e,new Map,t)},Ie.associateBy=function(e,t){return this.associate(e,function(e){return[t(e),e]})},Ie.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},Ie.chunked=function(e,t){for(var r=[],n=e.slice();n.length;)r.push(n.splice(0,t));return r},Ie.sum=function(e,r){return e.reduce(function(e,t){return e+r(t)},0)};var f=Ie;function Ie(){}var Ae={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},l=(Ne.setLogLevel=function(e){this.logLevel=e=void 0===e?Ae.INFO:e},Ne.initCounter=function(t){this.counters=f.associate(Object.keys(Ae),function(e){return[e,t(e)]})},Ne._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){}},Ne.increment=function(e){var t;null!=(t=null==(t=Ne.counters)?void 0:t.get(e))&&t.increment()},Ne.logLevel=Ae.INFO,Ne.log={error:function(e){Ae.ERROR<=Ne.logLevel&&(Ne._log("ERROR",e),Ne.increment("ERROR"))},warn:function(e){Ae.WARN<=Ne.logLevel&&(Ne._log("WARN",e),Ne.increment("WARN"))},info:function(e){Ae.INFO<=Ne.logLevel&&(Ne._log("INFO",e),Ne.increment("INFO"))},debug:function(e){Ae.DEBUG<=Ne.logLevel&&(Ne._log("DEBUG",e),Ne.increment("DEBUG"))}},Ne);function Ne(){}Pe.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}};var Oe=Pe;function Pe(){}var Se=l.log,Me=(Re.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},Re.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]})},Re.sanitize=function(e){var t={};if(p.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),p.isNullOrUndefined(i)?Se.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=i):Se.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}return t},Re.isValidType=function(e){return!p.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH)},Re.sanitizeValue=function(e){return"string"==typeof e&&0<e.length&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},Re.MAX_IDENTIFIER_TYPE_LENGTH=128,Re.MAX_IDENTIFIER_VALUE_LENGTH=512,Re);function Re(){}var Ce=l.log,xe=(Ue.sanitize=function(e){var t={};if(p.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){Ce.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(s,", ").concat(o,"]"));break}this.isValidKey(s)?(i=this.sanitizeValue(s,o),p.isNullOrUndefined(i)?Ce.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(o,"]")):t[s]=i):Ce.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(s,"]"))}return t},Ue.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},Ue.isValidKey=function(e){return p.isNotNullOrUndefined(e)&&"string"==typeof e&&0<e.length&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},Ue.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},Ue.isValidValue=function(e){return!p.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))},Ue.isValidElement=function(e){return!p.isNullOrUndefined(e)&&("string"==typeof e?0<e.length&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},Ue.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},Ue.SYSTEM_PROPERTY_KEY_PREFIX="$",Ue.MAX_PROPERTIES_COUNT=128,Ue.MAX_PROPERTY_KEY_LENGTH=128,Ue.MAX_PROPERTY_VALUE_LENGTH=1024,Ue);function Ue(){}var ke=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],De=(s.nanosToUnit=function(e,t){switch(t){case"nanoseconds":return e;case"microseconds":return e/(s.C1/s.C0);case"milliseconds":return e/(s.C2/s.C0);case"seconds":return e/(s.C3/s.C0);case"minutes":return e/(s.C4/s.C0);case"hours":return e/(s.C5/s.C0);case"days":return e/(s.C6/s.C0)}},s.microsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(s.C1/s.C0);case"milliseconds":return e/(s.C2/s.C1);case"microseconds":return e;case"seconds":return e/(s.C3/s.C1);case"minutes":return e/(s.C4/s.C1);case"hours":return e/(s.C5/s.C1);case"days":return e/(s.C6/s.C1)}},s.millisToUnit=function(e,t){switch(t){case"nanoseconds":return e*(s.C2/s.C0);case"microseconds":return e*(s.C2/s.C1);case"milliseconds":return e;case"seconds":return e/(s.C3/s.C2);case"minutes":return e/(s.C4/s.C2);case"hours":return e/(s.C5/s.C2);case"days":return e/(s.C6/s.C2)}},s.secondsToUnit=function(e,t){switch(t){case"nanoseconds":return e*(s.C3/s.C0);case"microseconds":return e*(s.C3/s.C1);case"milliseconds":return e*(s.C3/s.C2);case"seconds":return e;case"minutes":return e/(s.C4/s.C3);case"hours":return e/(s.C5/s.C3);case"days":return e/(s.C6/s.C3)}},s.minutesToUnit=function(e,t){switch(t){case"nanoseconds":return e*(s.C4/s.C0);case"microseconds":return e*(s.C4/s.C1);case"milliseconds":return e*(s.C4/s.C2);case"seconds":return e*(s.C4/s.C3);case"minutes":return e;case"hours":return e/(s.C5/s.C4);case"days":return e/(s.C6/s.C4)}},s.hoursToUnit=function(e,t){switch(t){case"nanoseconds":return e*(s.C5/s.C0);case"microseconds":return e*(s.C5/s.C1);case"milliseconds":return e*(s.C5/s.C2);case"seconds":return e*(s.C5/s.C3);case"minutes":return e*(s.C5/s.C4);case"hours":return e;case"days":return e/(s.C6/s.C5)}},s.daysToUnit=function(e,t){switch(t){case"nanoseconds":return e*(s.C6/s.C0);case"microseconds":return e*(s.C6/s.C1);case"milliseconds":return e*(s.C6/s.C2);case"seconds":return e*(s.C6/s.C3);case"minutes":return e*(s.C6/s.C4);case"hours":return e*(s.C6/s.C5);case"days":return e}},s.C6=24*(s.C5=60*(s.C4=60*(s.C3=1e3*(s.C2=1e3*(s.C1=1e3*(s.C0=1)))))),s.converter={nanoseconds:s.nanosToUnit,microseconds:s.microsToUnit,milliseconds:s.millisToUnit,seconds:s.secondsToUnit,minutes:s.minutesToUnit,hours:s.hoursToUnit,days:s.daysToUnit},s);function s(){}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={}}Ke.prototype.get=function(e,t){e=this.parameters[e];return!p.isNullOrUndefined(e)&&(p.isNullOrUndefined(t)||typeof e==typeof t)?e:t};var Be=Ke;function Ke(e){this.parameters=e}var Ge="X-HACKLE-SDK-KEY",He="X-HACKLE-SDK-NAME",ze="X-HACKLE-SDK-VERSION",Ye="X-HACKLE-SDK-TIME",Je=100,qe=6e4,We=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",pt=1/86400*3,lt="hackle-workspace-config",ft=6e4,ht=1e3,dt="hackle-campaign-delay",yt=l.log;function vt(e,t){e=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return e||yt.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),e}function gt(e,t){if(!p.isNullOrUndefined(t)){for(var r=new Array,n=0,i=t;n<i.length;n++){var o=vt(e,i[n]);if(p.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.of=function(e,t,r,n){return new bt(e,t,r=void 0===r?new Ve:r,n=void 0===n?void 0:n)},Object.defineProperty(bt.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),bt.prototype.get=function(e,t){return this.config.get(e,t)};var wt=bt;function bt(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}_t.on=function(e,t,r){return new _t(!0,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},_t.off=function(e,t,r){return new _t(!1,e,t=void 0===t?new Ve:t,r=void 0===r?void 0:r)},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.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(Ot.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),Ot.fromJson=function(e){return new Ot(e.id,new Be(f.associateRecord(e.parameters,function(e){return[e.key,e.value]})))},Ot.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=Ot;function Ot(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",d.IN_APP_MESSAGE_FREQUENCY_CAPPED="IN_APP_MESSAGE_FREQUENCY_CAPPED",d.EXPERIMENT_CONTROL_GROUP="EXPERIMENT_CONTROL_GROUP";var h=d;function d(){}var Pt=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],St=(Mt.fromJson=function(e,t,r){var n=Mt.experimentStatusOrNull(t.execution.status),i=t.variations.map(function(t){return new Rt(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 tr.fromJson(e,Or.IDENTIFIER)}),a=f.mapNotNullOrUndefined(t.execution.targetAudiences,function(e){return zt.fromJson(e,Or.PROPERTY)}),u=Kn.fromJson(t.execution.targetUrls),c=vt(Pt,t.implementationType),p=f.mapNotNullOrUndefined(t.execution.targetRules,function(e){return tr.fromJson(e,Or.PROPERTY)}),l=Qt.fromJson(t.execution.defaultRule);return n&&c&&l&&new Mt(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)},Mt.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void yt.debug("Unsupported status [".concat(e,"]"))}},Mt.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},Mt.prototype._getVariationByIdOrNull=function(t){return this.variations.find(function(e){return e.id===t})},Mt.prototype._getVariationByKeyOrNull=function(t){return this.variations.find(function(e){return e.key===t})},Mt);function Mt(e,t,r,n,i,o,s,a,u,c,p,l,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=p,this.splitUrlTargets=l,this.targetRules=f,this.defaultRule=h,this.containerId=d,this.implementationType=y,this.winnerVariationId=v}Object.defineProperty(Ct.prototype,"parameters",{get:function(){var e;return null!=(e=null==(e=this.config)?void 0:e.parameters)?e:{}},enumerable:!1,configurable:!0});var Rt=Ct;function Ct(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.config=n}Ut.fromJson=function(e){return new Ut(e.id,e.seed,e.slotSize,e.slots.map(function(e){var t=e.startInclusive,r=e.endExclusive,e=e.variationId;return new kt(t,r,e)}))};var xt=Ut;function Ut(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}Dt.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive};var kt=Dt;function Dt(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}Ft.fromJson=function(e){return new Ft(e.id,e.key)};var Lt=Ft;function Ft(e,t){this.id=e,this.key=t}jt.ID="$id",jt.USER="$userId",jt.DEVICE="$deviceId",jt.SESSION="$sessionId",jt.HACKLE_DEVICE="$hackleDeviceId";var Vt=jt;function jt(){}function Bt(e){var t=new Kt;return t.addIdentifiers(e.identifiers||{}),t.add(Vt.ID,e.id),t.add(Vt.DEVICE,e.deviceId),p.isNotNullOrUndefined(e.userId)&&t.add(Vt.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:yt.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},Gt.prototype.build=function(){return this.identifiers};var Kt=Gt;function Gt(){this.identifiers={}}function Ht(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=xe.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 Jt.fromJson(e,t)}))},Yt.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}};var zt=Yt;function Yt(e){this.conditions=e}qt.fromJson=function(e,t){var r=Wt.fromJson(e.key);if(r&&t.supports(r.type))return(t=Xt.fromJson(e.match))&&new qt(r,t)},qt.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}};var Jt=qt;function qt(e,t){this.key=e,this.match=t}$t.fromJson=function(e){var t=vt(Ar,e.type);return t&&new $t(t,e.name)},$t.prototype.toJson=function(){return{type:this.type,name:this.name}};var Wt=$t;function $t(e,t){this.type=e,this.name=t}Zt.fromJson=function(e){var t=vt(br,e.type),r=vt(_r,e.operator),n=vt(Tr,e.valueType);return t&&r&&n&&new Zt(t,r,n,e.values)},Zt.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}};var Xt=Zt;function Zt(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}er.fromJson=function(e){var t=vt(Ir,e.type);return t&&new er(t,e.variationId,e.bucketId)};var Qt=er;function er(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}rr.fromJson=function(e,t){t=zt.fromJson(e.target,t),e=Qt.fromJson(e.action);return t&&e&&new rr(t,e)};var tr=rr;function rr(e,t){this.target=e,this.action=t}ir.fromJson=function(e){var t=vt(Nr,e.type);return t&&new ir(e.id,e.key,t,f.mapNotNullOrUndefined(e.targets,function(e){return zt.fromJson(e,Or.SEGMENT)}))};var nr=ir;function ir(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}sr.fromJson=function(e){return new sr(e.id,e.bucketId,e.groups.map(function(e){return ar.fromJson(e)}))},sr.prototype.getGroupOrNull=function(t){return this.groups.find(function(e){return e.id===t})};var or=sr;function sr(e,t,r){this.id=e,this.bucketId=t,this.groups=r}ur.fromJson=function(e){return new ur(e.id,e.experiments)};var ar=ur;function ur(e,t){this.id=e,this.experiments=t}pr.fromJson=function(e){var t=vt(Tr,e.type),r=f.mapNotNullOrUndefined(e.targetRules,function(e){return lr.fromJson(e,Or.PROPERTY)}),n=hr.fromJson(e.defaultValue);return t&&new pr(e.id,e.key,t,e.identifierType,r,n)};var cr=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}fr.fromJson=function(e,t){t=zt.fromJson(e.target,t);return t&&new fr(e.key,e.name,t,e.bucketId,hr.fromJson(e.value))};var lr=fr;function fr(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}dr.fromJson=function(e){return new dr(e.id,e.value)};var hr=dr;function dr(e,t){this.id=e,this.rawValue=t}vr.tryParse=function(e){if(e instanceof vr)return e;var t,r,n,i,e=vr.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 vr(new gr(parseInt(t,10),parseInt(r,10),parseInt(n,10)),Er.parse(i),Er.parse(e))},vr.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},vr.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},vr.prototype.isGreaterThan=function(e){return 0<this.compareTo(e)},vr.prototype.isGreaterThanOrEqualTo=function(e){return 0<=this.compareTo(e)},vr.prototype.isLessThan=function(e){return this.compareTo(e)<0},vr.prototype.isLessThanOrEqualTo=function(e){return this.compareTo(e)<=0},vr.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 yr=vr;function vr(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}mr.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch};var gr=mr;function mr(e,t,r){this.major=e,this.minor=t,this.patch=r}wr.parse=function(e){return e?new wr(e.split(".")):wr.EMPTY},wr.prototype.isEmpty=function(){return 0===this.identifiers.length},wr.prototype.isNotEmpty=function(){return!this.isEmpty()},wr.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},wr.prototype.compareIdentifiers=function(e){for(var t=Math.min(this.identifiers.length,e.identifiers.length),r=0;r<t;r++){var n=wr.compareIdentifiers(this.identifiers[r],e.identifiers[r]);if(0!==n)return n}return this.identifiers.length-e.identifiers.length},wr.compareIdentifiers=function(e,t){return wr.numericIdentifierRegExp.test(e)&&wr.numericIdentifierRegExp.test(t)?+e-+t:e===t?0:e<t?-1:1},wr.EMPTY=new wr([]),wr.numericIdentifierRegExp=/^(0|[1-9]\d*)$/;var Er=wr;function wr(e){this.identifiers=e}var br=["MATCH","NOT_MATCH"],Tr=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],_r=["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"],Or=(Pr.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},Pr.IDENTIFIER=new Pr("SEGMENT"),Pr.PROPERTY=new Pr("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Pr.SEGMENT=new Pr("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),Pr);function Pr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}var Sr=["ACTIVE","DRAFT","PAUSE"],Mr=["WEB","ANDROID","IOS"],Rr=["IMMEDIATE","CUSTOM"],Cr=["MODAL","BANNER","BOTTOM_SHEET","NONE"],xr=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE","NONE"],Ur=["VERTICAL","HORIZONTAL"],kr=["CLICK"],Dr=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],Lr=["TOP","MIDDLE","BOTTOM"],Fr=["LEFT","CENTER","RIGHT"],Vr=(jr.fromJson=function(e){var t,r=vt(Sr,e.status);if(!p.isNullOrUndefined(r)){switch(vt(Rr,e.timeUnit)){case"IMMEDIATE":t=new Br;break;case"CUSTOM":if(p.isNullOrUndefined(e.startEpochTimeMillis))return;if(p.isNullOrUndefined(e.endEpochTimeMillis))return;t=new Gr(e.startEpochTimeMillis,e.endEpochTimeMillis);break;default:return}var n,i,o,s,a=on.fromJson(e.messageContext);if(!p.isNullOrUndefined(a))return n=e.eventTriggerRules.map(Yr.fromJson),i=qr.fromJson(e.eventFrequencyCap),o=null!=(o=e.eventTriggerDelay&&kn.fromJson(e.eventTriggerDelay))?o:kn.immediate(),s=Rn.fromJson(null!=(s=e.evaluateContext)?s:{atDeliverTime:!1}),new jr(e.id,e.key,r,t,new zr(n,i,o),en.fromJson(e.targetContext),a,s)}},jr.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},jr.prototype.toString=function(){return"InAppMessage(id=".concat(this.id,", key=").concat(this.key,", status=").concat(this.status,")")},jr);function jr(e,t,r,n,i,o,s,a){this.id=e,this.key=t,this.status=r,this.period=n,this.eventTrigger=i,this.targetContext=o,this.messageContext=s,this.evaluateContext=a}Kr.prototype.within=function(e){return!0};var Br=Kr;function Kr(){this.type="IMMEDIATE"}Hr.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive};var Gr=Hr;function Hr(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}var zr=function(e,t,r){this.rules=e,this.frequencyCap=t,this.delay=r},Yr=(Jr.fromJson=function(e){return new Jr(e.eventKey,f.mapNotNullOrUndefined(e.targets,function(e){return zt.fromJson(e,Or.PROPERTY)}))},Jr);function Jr(e,t){this.eventKey=e,this.targets=t}Wr.fromJson=function(e){return e?new Wr(e.identifiers.map($r.fromJson),Zr.fromJson(e.duration)):null};var qr=Wr;function Wr(e,t){this.identifierCaps=e,this.durationCap=t}Xr.fromJson=function(e){return new Xr(e.identifierType,e.countPerIdentifier)};var $r=Xr;function Xr(e,t){this.identifierType=e,this.count=t}Qr.fromJson=function(e){if(!e)return null;var t=vt(ke,e.durationUnit.timeUnit);return t?new Qr(De.converter[t](e.durationUnit.amount,"milliseconds"),e.countPerDuration):null};var Zr=Qr;function Qr(e,t){this.durationMillis=e,this.count=t}tn.fromJson=function(e){return new tn(e.overrides.map(rn.fromJson),f.mapNotNullOrUndefined(e.targets,function(e){return zt.fromJson(e,Or.PROPERTY)}))};var en=tn;function tn(e,t){this.overrides=e,this.targets=t}nn.fromJson=function(e){return new nn(e.identifierType,e.identifiers)};var rn=nn;function nn(e,t){this.identifierType=e,this.identifiers=t}sn.fromJson=function(e){var t=null,r=("AB_TEST"===e.exposure.type&&null!==e.exposure.key&&(t=new an(e.exposure.key)),gt(Mr,e.platformTypes));if(!p.isNullOrUndefined(r)){var n=gt(Ur,e.orientations);if(!p.isNullOrUndefined(n)){var i=f.mapOrUndefined(e.messages,un.fromJson);if(!p.isNullOrUndefined(i))return new sn(e.defaultLang,t,r,n,i)}}};var on=sn;function sn(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}var an=function(e){this.key=e},un=(cn.fromJson=function(e){var t=pn.fromJson(e.layout);if(!p.isNullOrUndefined(t)){var r=f.mapOrUndefined(e.images,dn.fromJson);if(!p.isNullOrUndefined(r)){var n=void 0;if(!p.isNotNullOrUndefined(e.imageAutoScroll)||(n=vn.fromJson(e.imageAutoScroll),!p.isNullOrUndefined(n))){var i=f.mapOrUndefined(e.buttons,_n.fromJson);if(!p.isNullOrUndefined(i)){var o=void 0;if(!p.isNotNullOrUndefined(e.closeButton)||(o=_n.fromJson2(e.closeButton),!p.isNullOrUndefined(o))){var s=f.mapOrUndefined(e.outerButtons,An.fromJson),a=f.mapOrUndefined(e.innerButtons,An.fromJson);if(!p.isNullOrUndefined(s)&&!p.isNullOrUndefined(a))return new cn(e.variationKey,e.lang,t,r,n,e.text?mn.fromJson(e.text):void 0,i,o,new Pn(e.background.color),e.action?Sn.fromJson(e.action):void 0,s,a)}}}}}},cn.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()})}},cn);function cn(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}ln.fromJson=function(e){var t=vt(xr,e.layoutType),r=vt(Cr,e.displayType);if(!p.isNullOrUndefined(r)&&!p.isNullOrUndefined(t))return new ln(r,t,e.alignment?fn.fromJson(e.alignment):void 0)};var pn=ln;function ln(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}hn.fromJson=function(e){var t=vt(Fr,e.horizontal);if(!p.isNullOrUndefined(t)){e=vt(Lr,e.vertical);if(!p.isNullOrUndefined(e))return new hn(t,e)}},hn.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}};var fn=hn;function hn(e,t){this.horizontal=e,this.vertical=t}yn.fromJson=function(e){var t=vt(Ur,e.orientation);if(!p.isNullOrUndefined(t)){var r=void 0;if(!p.isNotNullOrUndefined(e.action)||(r=Sn.fromJson(e.action),!p.isNullOrUndefined(r)))return new yn(t,e.imagePath,r)}},yn.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 dn=yn;function yn(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}gn.fromJson=function(e){var t=vt(ke,e.interval.timeUnit);if(t)return new gn(De.converter[t](e.interval.amount,"milliseconds"))},gn.prototype.toJson=function(){return{interval:{timeUnit:"milliseconds",amount:this.intervalMillis}}};var vn=gn;function gn(e){this.intervalMillis=e}En.fromJson=function(e){return new En(wn.fromJson(e.title),wn.fromJson(e.body))},En.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 mn=En;function En(e,t){this.title=e,this.body=t}bn.fromJson=function(e){return new bn(e.text,new Tn(e.style.textColor))};var wn=bn;function bn(e,t){this.text=e,this.style=t}var Tn=function(e){this.color=e},_n=(In.fromJson=function(e){var t=Sn.fromJson(e.action);if(!p.isNullOrUndefined(t))return new In(e.text,new On(e.style.textColor,e.style.bgColor,e.style.borderColor),t)},In.fromJson2=function(e){var t=Sn.fromJson(e.action);if(!p.isNullOrUndefined(t))return new In("✕",new On(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=_n.fromJson(e.button);if(!p.isNullOrUndefined(t)){e=fn.fromJson(e.alignment);if(!p.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 On=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},Pn=function(e){this.color=e},Sn=(Mn.fromJson=function(e){var t=vt(kr,e.behavior);if(!p.isNullOrUndefined(t)){var r=vt(Dr,e.type);if(!p.isNullOrUndefined(r))return new Mn(t,r,null!=(t=e.value)?t:void 0)}},Mn.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},Mn);function Mn(e,t,r){this.behavior=e,this.type=t,this.value=r}Cn.fromJson=function(e){return new Cn(e.atDeliverTime)};var Rn=Cn;function Cn(e){this.atDeliverTime=e}Un.fromJson=function(e){var t=vt(ke,e.duration.timeUnit);return p.isNullOrUndefined(t)?null:new Un(De.converter[t](e.duration.amount,"milliseconds"))};var xn=Un;function Un(e){this.durationMillis=e}Dn.fromJson=function(e){var t=e.afterCondition&&xn.fromJson(e.afterCondition);return new Dn(e.type,t)},Dn.immediate=function(){return new Dn("IMMEDIATE",null)},Dn.prototype.deliverAt=function(e){var t=this.type;switch(t){case"IMMEDIATE":return e;case"AFTER":if(null===this.afterCondition)throw new Error("AfterCondition is required for AFTER delay type");return e+this.afterCondition.durationMillis;default:throw new Error("Unsupported delay type: ".concat(t))}};var kn=Dn;function Dn(e,t){this.type=e,this.afterCondition=t}Fn.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 Fn(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)},Fn.fromInteraction=function(e){return"CLOSE"===e.type?new Fn(e.type,{hideDurationMillis:null}):Fn.fromJson(e.action)},Fn.fromAction=function(e){return Fn.fromJson(e.toJson())},Fn.linkActionTypes=["LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE","WEB_LINK"],Fn.closeActionTypes=["CLOSE","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW_AND_CLOSE"],Fn.tabTargetActionsTypes=["LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE"],Fn.windowTargetActionsTypes=["LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"];var Ln=Fn;function Fn(e,t,r){this.type=e,this.close=t,this.link=r}var Vn=function(e){this.id=e},jn=(n.SplitUrlRedirectType=void 0,(n.SplitUrlRedirectType||(n.SplitUrlRedirectType={})).MANUAL="MANUAL",Bn.fromDto=function(e){var t,r=e.needRedirect;return t=e.properties.type,new Bn(r,Object.values(n.SplitUrlRedirectType).includes(t)?e.properties.type:null,e.properties.value)},Bn);function Bn(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}Gn.fromJson=function(e){if(null!==e)return new Gn(f.mapNotNullOrUndefined(e.match,function(e){return zt.fromJson(e,Or.PROPERTY)}),f.mapNotNullOrUndefined(e.notMatch,function(e){return zt.fromJson(e,Or.PROPERTY)}))};var Kn=Gn;function Gn(e,t){this.includeTargets=e,this.excludeTargets=t}zn.fromJson=function(e){return new zn(e.eventKey,e.property,e.stats)},zn.prototype.countWithinDays=function(t){return f.sum(this.stats.filter(function(e){return e.date>=t}),function(e){return e.count})};var Hn=zn;function zn(e,t,r){this.eventKey=e,this.property=t,this.stats=r}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.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})};var Yn=Jn;function Jn(e){this.name=e,this._tags={},this.name=e}Wn.start=function(e){return new Wn(e=void 0===e?Wn.defaultClock:e)},Wn.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},Wn.defaultClock=new Le;var qn=Wn;function Wn(e){this._clock=e,this.startTime=this._clock.tick()}Xn.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},Xn.prototype.tag=function(e,t){return this._tags[e]=t,this},Xn.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})};var $n=Xn;function Xn(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 Zn=Qn;function Qn(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}Object.defineProperty(ti.prototype,"value",{get:function(){return this.valueSupplier()},enumerable:!1,configurable:!0});var ei=ti;function ti(e,t){this.valueSupplier=t,this.field=e}function ri(e,t){return e.name===t.name&&Me.isEquals(e.tags,t.tags)}Object.defineProperty(ni.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),ni.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},ni.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},ni.prototype.counter=function(e,t){return void 0===t&&(t={}),new $n(e).tags(t).register(this)},ni.prototype.timer=function(e,t){return void 0===t&&(t={}),new Yn(e).tags(t).register(this)},ni.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},ni.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},ni.prototype.close=function(){};t=ni;function ni(){this.id=K(),this.name="MetricRegistry",this._metrics=new Zn(ri)}o(oi,ii=t),oi.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),l.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},oi.prototype.stop=function(){var e;null!=(e=this.publishingJob)&&e.cancel(),this.publishingJob=null,this.publish(!0),l.log.debug("PushMetricRegistry stopped.")},oi.prototype.close=function(){this.stop()};var ii,G=oi;function oi(e,t){var r=ii.call(this)||this;return r.scheduler=e,r.pushIntervalMillis=t,r.publishingJob=null,r}ai.prototype.count=function(){return this.counterValue},ai.prototype.increment=function(e){this.counterValue+=null!=e?e:1},ai.prototype.measure=function(){return[new ei("count",this.count.bind(this))]};var si=ai;function ai(e){this.counterValue=0,this.id=e}ci.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new si(this.id),e},ci.prototype.count=function(){return this.currentCounter.count()},ci.prototype.increment=function(e){this.currentCounter.increment(e)},ci.prototype.measure=function(){return[new ei("count",this.count.bind(this))]};var ui=ci;function ci(e){this.id=e,this.currentCounter=new si(e)}li.prototype.count=function(){return this._count},li.prototype.totalTime=function(e){return De.nanosToUnit(this._total,e)},li.prototype.max=function(e){return De.nanosToUnit(this._max,e)},li.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},li.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))},li.prototype.measure=function(){var e=this;return[new ei("count",this.count.bind(this)),new ei("total",function(){return e.totalTime("milliseconds")}),new ei("max",function(){return e.max("milliseconds")}),new ei("mean",function(){return e.mean("milliseconds")})]};var pi=li;function li(e){this._count=0,this._total=0,this._max=0,this.id=e}hi.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new pi(this.id),e},hi.prototype.count=function(){return this.currentTimer.count()},hi.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},hi.prototype.max=function(e){return this.currentTimer.max(e)},hi.prototype.record=function(e,t){this.currentTimer.record(e,t)},hi.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},hi.prototype.measure=function(){var e=this;return[new ei("count",this.count.bind(this)),new ei("total",function(){return e.totalTime("milliseconds")}),new ei("max",function(){return e.max("milliseconds")}),new ei("mean",function(){return e.mean("milliseconds")})]};var fi=hi;function hi(e){this.id=e,this.currentTimer=new pi(e)}o(yi,di=G),yi.prototype.createCounter=function(e){return new ui(e)},yi.prototype.createTimer=function(e){return new fi(e)},yi.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 di,e=yi;function yi(e,t){return di.call(this,e,t)||this}gi.prototype.count=function(){return 0},gi.prototype.increment=function(e){},gi.prototype.measure=function(){return[new ei("count",this.count.bind(this))]};var vi=gi;function gi(e){this.id=e}Object.defineProperty(Ei.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),Ei.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},Ei.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},Ei.prototype.increment=function(t){this.counters.forEach(function(e){e.increment(t)})},Ei.prototype.measure=function(){return[new ei("count",this.count.bind(this))]};var mi=Ei;function Ei(e){this._counters=new Zn(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new vi(e)}bi.prototype.measure=function(){var e=this;return[new ei("count",this.count.bind(this)),new ei("total",function(){return e.totalTime("milliseconds")}),new ei("max",function(){return e.max("milliseconds")}),new ei("mean",function(){return e.mean("milliseconds")})]},bi.prototype.count=function(){return 0},bi.prototype.totalTime=function(e){return 0},bi.prototype.max=function(e){return 0},bi.prototype.mean=function(e){return 0},bi.prototype.record=function(e,t){};var wi=bi;function bi(e){this.id=e}Object.defineProperty(_i.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer},enumerable:!1,configurable:!0}),_i.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},_i.prototype.max=function(e){return this.firstTimer.max(e)},_i.prototype.mean=function(e){return this.firstTimer.mean(e)},_i.prototype.record=function(t,r){this.timers.forEach(function(e){e.record(t,r)})},Object.defineProperty(_i.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),_i.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},_i.prototype.count=function(){return this.firstTimer.count()},_i.prototype.measure=function(){var e=this;return[new ei("count",this.count.bind(this)),new ei("total",function(){return e.totalTime("milliseconds")}),new ei("max",function(){return e.max("milliseconds")}),new ei("mean",function(){return e.mean("milliseconds")})]};var Ti=_i;function _i(e){this._timers=new Zn(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new wi(e)}o(Ai,Ii=t),Ai.prototype.createCounter=function(e){e=new mi(e);return this.addRegistry(e),e},Ai.prototype.createTimer=function(e){e=new Ti(e);return this.addRegistry(e),e},Ai.prototype.addRegistry=function(t){this.registries.forEach(function(e){return t.add(e)})},Ai.prototype.add=function(r){r instanceof Ai||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)}))},Ai.prototype.close=function(){this.registries.forEach(function(e){e.close()})};var Ii,i=Ai;function Ai(){var e=null!==Ii&&Ii.apply(this,arguments)||this;return e.registries=new Zn(function(e,t){return e.id===t.id}),e}Oi.counter=function(e,t){return Oi.globalRegistry.counter(e,t)},Oi.timer=function(e,t){return Oi.globalRegistry.timer(e,t)},Oi.addRegistry=function(e){Oi.globalRegistry.add(e),l.log.debug("MetricRegistry added ".concat(e.name))},Oi.globalRegistry=new i;var Ni=Oi;function Oi(){}Si.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},Si.isNotEmptyString=function(e){return!p.isNullOrUndefined(e)&&("string"==typeof e&&0<e.length)};var Pi=Si;function Si(){}Ri.builder=function(){return new Ci},Ri.get=function(e){return Ri.builder().url(e).build()},Ri.prototype.toBuilder=function(){return new Ci(this)};var Mi=Ri;function Ri(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}xi.prototype.url=function(e){return this._url=e,this},xi.prototype.method=function(e){return this._method=e,this},xi.prototype.body=function(e){return this._body=e,this},xi.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},xi.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},xi.prototype.build=function(){if(null===this._url)throw new Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new Mi(this._url,this._method,this._body,this._headers.build(),e)};var Ci=xi;function xi(e){var t;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(t=null==e?void 0:e.method)?t:"GET",this._body=null!=(t=null==e?void 0:e.body)?t:null,this._headers=null!=(t=null==(t=null==e?void 0:e.headers)?void 0:t.toBuilder())?t:Di.builder(),this._timeoutMillis=null!=(e=null==(t=null==e?void 0:e.options)?void 0:t.timeoutMillis)?e:null}ki.ok=function(e,t){return ki.of(200,e,t)},ki.of=function(e,t,r){return new ki(e,null!=t?t:null,null!=r?r:Di.empty())},ki.prototype.isSuccessful=function(){return 200<=this.statusCode&&this.statusCode<300},ki.prototype.isClientError=function(){return 400<=this.statusCode&&this.statusCode<500},ki.prototype.isNotModified=function(){return 304===this.statusCode};var Ui=ki;function ki(e,t,r){this.statusCode=e,this.body=t,this.headers=r}Li.empty=function(){return new Li(new Map)},Li.builder=function(){return new Fi(new Map)},Li.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(Pi.equalsIgnoreCase(i,e))return n}return null},Li.prototype.getOrDefault=function(e,t){return null!=(e=this.get(e))?e:t},Li.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},{})},Li.prototype.toBuilder=function(){return new Fi(this.headers)},Li.IF_MODIFIED_SINCE="If-Modified-Since",Li.LAST_MODIFIED="Last-Modified",Li.ACCEPT_ENCODING="Accept-Encoding";var Di=Li;function Li(e){this.headers=e}Vi.prototype.add=function(e,t){return this.headers.set(e,t),this},Vi.prototype.build=function(){return new Di(this.headers)};var Fi=Vi;function Vi(e){this.headers=e}o(Ki,ji=e),Ki.prototype.flushMetrics=function(e,t){var r=this;f.chunked(e.filter(this.isDispatchTarget.bind(this)),Je).forEach(function(e){r.dispatch(e,t)})},Ki.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&0<e.count()},Ki.prototype.dispatch=function(e,t){e=this.createRequest(e);this.execute(e,t).catch(function(e){return l.log.debug("Failed to flushing metrics: ".concat(e))})},Ki.prototype.createRequest=function(e){return Mi.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},Ki.prototype.execute=function(e,t){return(t?this.synchronousTransport:this.transport).send(e)},Ki.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:p.fromMap(f.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},Ki.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 ji,Bi=Ki;function Ki(e,t,r,n,i){n=ji.call(this,n,i)||this;return n.url=e,n.transport=t,n.synchronousTransport=r,n.start(),n}Hi.experiment=function(e,t,r){t=Ni.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(t)},Hi.featureFlag=function(e,t,r){t=Ni.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(t)},Hi.remoteConfig=function(e,t,r){t=Ni.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(t)};var Gi=Hi;function Hi(){}Yi.record=function(e,t,r){e=Ni.timer("api.call",{operation:e,success:Yi.success(r)});t.stop(e)},Yi.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())};var zi=Yi;function Yi(){}qi.decide=function(e,t,r,n){if(p.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)}},qi.decision=function(e,t,r,n,i){return p.isNullOrUndefined(t)?mt.of(n,h.INVALID_INPUT):e.remoteConfig(t,i,r,n)};var Ji=qi;function qi(){}var Wi=l.log,$i=(Xi.prototype.get=function(t,r){var n,e=qn.start();try{n=this.decide(t,r)}catch(e){Wi.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),n=mt.of(r,h.EXCEPTION)}return Gi.remoteConfig(e,t,n),n.value},Xi.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return Ji.decide(this.core,e,t,r)},Xi);function Xi(e,t,r){this.core=e,this.userManager=t,this.user=r}eo.prototype.contains=function(e){return this._properties.has(e)},eo.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},eo.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)},eo.prototype.add=function(e,t,r){if((r=void 0===r?!1:r)&&this.contains(e))return this;if(this._properties.size>=this.MAX_PROPERTIES_COUNT)return this;if("string"==typeof e&&e.length>this.MAX_PROPERTY_KEY_LENGTH)return this;r=xe.sanitizeValue(e,t);return p.isNullOrUndefined(r)||this._properties.set(e,r),this},eo.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},eo.prototype.build=function(){return this._properties};var Zi,Qi=eo;function eo(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}(Q=Zi=Zi||{}).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";ro.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Qi).addProperties(e).addProperties(t).build()};var to=ro;function ro(){}io.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new Qi).addProperties(e).addProperties(t,!0).build()};var no=io;function io(){}so.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new Qi).addProperties(e).remove(t).build()};var oo=so;function so(){}uo.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()},uo.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t};var ao=uo;function uo(){}co.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()},co.prototype.compute=function(e,t){e=this.toArray(e),t=this.toArray(t);return this.operateArray(e,t)},co.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},co.prototype.contains=function(e,t){return e.includes(t)},co.prototype.prepend=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(t,e)?t:Te([e],t,!0)},co.prototype.append=function(e,t,r){return(r=void 0===r?!1:r)&&this.contains(e,t)?e:Te(Te([],e,!0),[t],!1)};r=co;function co(){}o(fo,po=r),fo.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)};var po,lo=fo;function fo(){return null!==po&&po.apply(this,arguments)||this}o(vo,ho=r),vo.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},vo.prototype.appendOnce=function(e,t){return this.append(e,t,!0)};var ho,yo=vo;function vo(){return null!==ho&&ho.apply(this,arguments)||this}o(Eo,go=r),Eo.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)};var go,mo=Eo;function Eo(){return null!==go&&go.apply(this,arguments)||this}o(To,wo=r),To.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)},To.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},To.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)};var wo,bo=To;function To(){return null!==wo&&wo.apply(this,arguments)||this}o(Ao,_o=r),Ao.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},Ao.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})};var _o,Io=Ao;function Ao(){return null!==_o&&_o.apply(this,arguments)||this}Oo.prototype.operate=function(e,t){return new Map};var No=Oo;function Oo(){}So.get=function(e){switch(e){case Zi.SET:return new to;case Zi.SET_ONCE:return new no;case Zi.UNSET:return new oo;case Zi.INCREMENT:return new ao;case Zi.APPEND:return new lo;case Zi.APPEND_ONCE:return new yo;case Zi.PREPEND:return new mo;case Zi.PREPEND_ONCE:return new bo;case Zi.CLEAR_ALL:return new No;case Zi.REMOVE:return new Io}};var Po=So;function So(){}Ro.prototype.set=function(e,t){return this.add(Zi.SET,e,t)},Ro.prototype.setOnce=function(e,t){return this.add(Zi.SET_ONCE,e,t)},Ro.prototype.unset=function(e){return this.add(Zi.UNSET,e,"-")},Ro.prototype.increment=function(e,t){return this.add(Zi.INCREMENT,e,t)},Ro.prototype.append=function(e,t){return this.add(Zi.APPEND,e,t)},Ro.prototype.appendOnce=function(e,t){return this.add(Zi.APPEND_ONCE,e,t)},Ro.prototype.prepend=function(e,t){return this.add(Zi.PREPEND,e,t)},Ro.prototype.prependOnce=function(e,t){return this.add(Zi.PREPEND_ONCE,e,t)},Ro.prototype.remove=function(e,t){return this.add(Zi.REMOVE,e,t)},Ro.prototype.clearAll=function(){return this.add(Zi.CLEAR_ALL,"clearAll","-")},Ro.prototype.build=function(){var e=Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]});return new Co(new Map(e))},Ro.prototype.containsKey=function(t){return Array.from(this.operations.entries()).some(function(e){return e[0],e[1].contains(t)})},Ro.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 Mo=Ro;function Ro(){this.operations=new Map}xo.prototype.operate=function(e){var r=e;return this.operations.forEach(function(e,t){r=Po.get(t).operate(r,e)}),r},xo.prototype.toEvent=function(){var i={key:"$properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),xe.sanitize(p.fromMap(e))),r))}),i},xo.prototype.toSecuredEvent=function(){var i={key:"$secured_properties"};return this.operations.forEach(function(e,t){var r,n;i.properties=c(c({},i.properties),((r={})[t]=c(c({},null==(n=i.properties)?void 0:n[t]),xe.sanitize(p.fromMap(e))),r))}),i},xo.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 Co=xo;function xo(e){this.operations=null!=e?e:new Map}ko.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 Uo=ko;function ko(){}Lo.prototype.isEquals=function(e){return this.url===e.url},Object.defineProperty(Lo.prototype,"pageTitle",{get:function(){return"undefined"==typeof window||"undefined"==typeof document?"":window.document.title},enumerable:!1,configurable:!0}),Lo.createWithCurrentPage=function(){return"undefined"==typeof window||"undefined"==typeof document?new Lo:new Lo(window.location.pathname,window.location.host,window.location.hostname,window.location.href,window.document.referrer,window.location.search,window.location.protocol)},Lo.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 Do=Lo;function Lo(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}Vo.create=function(e){return new Vo(e)},Vo.prototype.getValue=function(){return this.value};var Fo=Vo;function Vo(e){this.value=e}Bo.toPublic=function(e){return{key:e.key}};var jo=Bo;function Bo(){}Go.toPublic=function(e){return{close:e.close.bind(e),inAppMessage:jo.toPublic(e.context.inAppMessage)}};var Ko=Go;function Go(){}var Ho=l.log,zo=(y.prototype.initialize=function(){return a(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),Ho.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return e.sent(),Ho.debug("HackleClient initialized"),[3,4];case 2:throw t=e.sent(),Ho.error("HackleClient initialize failed: ".concat(t)),t;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},y.prototype.getSessionId=function(){return this.sessionManager.sessionId},y.prototype.getUser=function(){return this.userManager.currentUser},y.prototype.setUser=function(e){try{var t=Ht(e);if(!t)return Ho.warn("invalid user"),Promise.resolve();var r=this.userManager.setUser(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Ho.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},y.prototype.setUserId=function(e){try{var t=void 0;if(p.isNullOrUndefined(e))t=this.userManager.setUserId(void 0);else{var r=Me.sanitizeValue(e);if(!r)return Ho.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();t=this.userManager.setUserId(r)}return this.userManager.syncIfNeeded(t).catch(function(){})}catch(e){return Ho.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},y.prototype.setDeviceId=function(e){try{var t=Me.sanitizeValue(e);if(!t)return Ho.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve();var r=this.userManager.setDeviceId(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return Ho.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},y.prototype.setUserProperty=function(e,t){e=(new Mo).set(e,t).build();return this.updateUserProperties(e)},y.prototype.setUserProperties=function(e){try{var t=xe.sanitize(e),r=new Mo;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 Ho.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},y.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 Ho.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},y.prototype.updatePushSubscriptions=function(e){try{var t=e.toEvent("$push_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Ho.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},y.prototype.updateSmsSubscriptions=function(e){try{var t=e.toEvent("$sms_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Ho.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},y.prototype.updateKakaoSubscriptions=function(e){try{var t=e.toEvent("$kakao_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return Ho.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},y.prototype.resetUser=function(){try{var e=this.userManager.resetUser(),t=(new Mo).clearAll().build();return this.track(t.toEvent()),this.userManager.syncIfNeeded(e).catch(function(){})}catch(e){return Ho.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},y.prototype.setPhoneNumber=function(e){try{if("string"!=typeof e)return Ho.error("Invalid value ".concat(e,": phoneNumber value type must be string.")),Promise.resolve();var t=Fo.create(e),r=Le.instance.currentMillis();return this.piiEventManager.setPhoneNumber(t,r),this.core.flush(!1),Promise.resolve()}catch(e){return Ho.error("Unexpected exception occurred while setting phone number: ".concat(e)),Promise.resolve()}},y.prototype.unsetPhoneNumber=function(){try{var e=Le.instance.currentMillis();return this.piiEventManager.unsetPhoneNumber(e),this.core.flush(!1),Promise.resolve()}catch(e){return Ho.error("Unexpected exception occurred while unsetting phone number: ".concat(e)),Promise.resolve()}},y.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},y.prototype.variationDetail=function(r,n,e){var i=e||"A",e=qn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.experiment(r,t,i)}catch(e){return Ho.error("Unexpected exception while deciding variation for experiment[".concat(r,"]. Returning default variation[").concat(i,"] : ").concat(e)),wt.of(i,h.EXCEPTION)}}(this);return Gi.experiment(e,r,t),t},y.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},y.prototype.featureFlagDetail=function(r,n){var e=qn.start(),t=function(e){try{var t=e.userManager.resolve(n);return e.core.featureFlag(r,t)}catch(e){return Ho.error("Unexpected exception while deciding feature flag[".concat(r,"]. Returning default value[false] : ").concat(e)),Tt.off(h.EXCEPTION)}}(this);return Gi.featureFlag(e,r,t),t},y.prototype.track=function(e,t){try{Ho.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){Ho.error("Unexpected exception while tracking event: ".concat(e))}},y.prototype.trackPageView=function(e){var t=Do.createWithCurrentPage();this.pageEventTracker.track(t)},y.prototype.remoteConfig=function(e){return new $i(this.core,this.userManager,e)},y.prototype.onReady=function(e,t){this.onInitialized({timeout:t=void 0===t?3e3:t}).finally(function(){return e()})},y.prototype.getExperiment=function(t){try{return this.core.getExperiment(t)}catch(e){return void Ho.error('"Unexpected exception while get experiment['.concat(t,"]"))}},y.prototype.onInitialized=function(r){var n;return a(this,void 0,void 0,function(){var t;return u(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,Uo.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(),Ho.error("Failed to onInitialized: ".concat(t)),[2,{success:!1}];case 4:return[2]}})})},y.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},y.prototype.showUserExplorer=function(){var e;null!=(e=this.devTools)&&e.userExplorer?(Ho.debug("UserExplorer opened."),Ni.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):Ho.error("UserExplorer is not provided")},y.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():Ho.warn("There is no active HackleDevtools.")},y.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},y.prototype.setInAppMessageListener=function(e){this.inAppMessageUi.setListener(e)},y.prototype.getDisplayedInAppMessageView=function(){return this.inAppMessageUi.currentMessageView?Ko.toPublic(this.inAppMessageUi.currentMessageView):null},y.prototype.close=function(){Ho.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},y);function y(e,t,r,n,i,o,s,a,u){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.piiEventManager=i,this.fetchThrottler=o,this.pageEventTracker=s,this.inAppMessageUi=a,this.devTools=u,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.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.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.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.getDisplayedInAppMessageView=this.getDisplayedInAppMessageView.bind(this),this.initialization=this.initialize()}var Yo=l.log,Jo=(qo.prototype.get=function(t,r){var e=typeof r;try{var n={command:"remoteConfig",parameters:{defaultValue:r,key:t,valueType:e,user:this.user},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(!i)throw new Error("invoke result data not exists");switch(e){case"number":return Number(i);case"boolean":return Boolean(i);default:return i}}catch(e){return Yo.error("Unexpected exception while deciding remote config parameter[".concat(t,"]. Returning default value. : ").concat(e)),r}},qo);function qo(e,t,r){this.invocationProcessor=e,this.user=t,this.browserPropertyProvider=r}$o.tryParse=function(e){try{return new URL(e)}catch(e){return}},$o.removePathnameTrailingSlash=function(e){var t=e instanceof URL?e:$o.tryParse(e);return t?(t.pathname.endsWith("/")&&(t.pathname=t.pathname.replace(/\/+$/,"")),t.href):String(e)},$o.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},$o.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}},$o.decodeURIOrOriginal=function(t){try{return decodeURI(t)}catch(e){return t}},$o.decodeURIComponentOrOriginal=function(t){try{return decodeURIComponent(t)}catch(e){return t}};var Wo=$o;function $o(){}Zo.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]:""},Zo.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=Wo.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},Zo.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},Zo.prototype.setItem=function(e,t,r){var r=c(c({},this.options),r),n="",i="",o="",s="",a=(r.isCrossSubdomain&&(n=(a=Zo.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},Zo.prototype.removeItem=function(e,t){this.setItem(e,"",c(c({},t),{days:-1}))},Zo.prototype.getOptions=function(){return this.options},Zo.getInstance=function(e){return void 0===e&&(e={days:$e,isCrossSubdomain:!0}),Zo.storage=Zo.storage?Zo.storage:new Zo(e)};var Xo=Zo;function Zo(e){this.options=e=void 0===e?{days:0,isCrossSubdomain:!1,isSecure:!1}:e}es.prototype.initialize=function(){Xo.getInstance().getItem(Xe)||ns()},es.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return rs();case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}};var Qo=es;function es(){}function ts(){var e=Xo.getInstance(),t=e.getItem(Ze);if(t)return t;t=e.getItem(Xe);return t||ns()}function rs(){Xo.getInstance().removeItem(Ze)}function ns(){var e=K();return Xo.getInstance().setItem(Xe,e),e}var is,os=l.log;(G=is=is||{}).native="native",G.web_view_wrapper="web_view_wrapper";v.prototype.getSessionId=function(){try{var e={command:"getSessionId",browserProperties:this.browserPropertyProvider.getBrowserProperties()},t=this.invocationProcessor.process(e);return null!=t?t:ts()}catch(e){return os.error("Unexpected exception while get sessionId: ".concat(e)),ts()}},v.prototype.getUser=function(){var e;try{var t={command:"getUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},r=this.invocationProcessor.process(t);return null!=(e=Ht(r))?e:this.defaultUser()}catch(e){return os.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 u(this,function(e){try{if(!(t=Ht(n)))return os.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){os.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 u(this,function(e){try{if(t=void 0,p.isNullOrUndefined(n))t=null;else if(!(t=Me.sanitizeValue(n)))return os.warn("Invalid userId. [userId=".concat(n,"]")),[2];r={command:"setUserId",parameters:{userId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){os.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 u(this,function(e){try{if(!(t=Me.sanitizeValue(n)))return os.warn("Invalid deviceId. [deviceId=".concat(n,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){os.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 u(this,function(e){try{t={command:"setUserProperty",parameters:{key:r,value:n},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){os.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 u(this,function(e){try{t=xe.sanitize(n),r=new Mo,Object.entries(t).forEach(function(e){var t=e[0],e=e[1];r.set(t,e)}),this.updateUserProperties(r.build())}catch(e){os.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 u(this,function(e){try{t={command:"updateUserProperties",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){os.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},v.prototype.updatePushSubscriptions=function(r){return a(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"updatePushSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){os.error("Unexpected exception while update push subscriptions: ".concat(e))}return[2]})})},v.prototype.updateSmsSubscriptions=function(r){return a(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"updateSmsSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){os.error("Unexpected exception while update sms subscriptions: ".concat(e))}return[2]})})},v.prototype.updateKakaoSubscriptions=function(r){return a(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"updateKakaoSubscriptions",parameters:{operations:r.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){os.error("Unexpected exception while update Kakao subscriptions: ".concat(e))}return[2]})})},v.prototype.resetUser=function(){return a(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"resetUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){os.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},v.prototype.setPhoneNumber=function(r){return a(this,void 0,void 0,function(){var t;return u(this,function(e){try{if("string"!=typeof r)return os.error("Invalid type ".concat(r,": phoneNumber value must be string.")),[2,Promise.resolve()];t={command:"setPhoneNumber",parameters:{phoneNumber:r},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){os.error("Unexpected exception occurred while setting phone number: ".concat(e))}return[2]})})},v.prototype.unsetPhoneNumber=function(){return a(this,void 0,void 0,function(){var t;return u(this,function(e){try{t={command:"unsetPhoneNumber",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){os.error("Unexpected exception occurred while unsetting phone number: ".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)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(i)return i;throw new Error("invoke result data not exists")}catch(e){return os.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)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},o=this.invocationProcessor.process(i);if(null===o)throw new Error("invoke result data not exists");return wt.of(o.variation,o.reason,new Be(null!=(n=o.config.parameters)?n:{}))}catch(e){return os.error("Unexpected exception while deciding variation for experiment[".concat(t,"]. Returning default variation[").concat(r,"] : ").concat(e)),wt.of(r,h.EXCEPTION)}},v.prototype.isFeatureOn=function(t,e){try{var r={command:"isFeatureOn",parameters:{featureKey:t,user:this.convertUser(e)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},n=this.invocationProcessor.process(r);if(null===n)throw new Error("invoke result data not exists");return Boolean(n)}catch(e){return os.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)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(null===i)throw new Error("invoke result data not exists");return new Tt(i.isOn,i.reason,new Be(null!=(r=i.config.parameters)?r:{}),void 0)}catch(e){return os.error("Unexpected exception while deciding feature flag[".concat(t,"]. Returning default value[false] : ").concat(e)),Tt.off(h.EXCEPTION)}},v.prototype.track=function(e,t){try{var r={command:"track",parameters:{event:this.convertEvent(e),user:this.convertUser(t)},browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(r)}catch(e){os.error("Unexpected exception while tracking event: ".concat(e))}},v.prototype.trackPageView=function(e){os.info("Web to app integration feature is not support 'trackPageView' method")},v.prototype.remoteConfig=function(e){return new Jo(this.invocationProcessor,this.convertUser(e),this.browserPropertyProvider)},v.prototype.onReady=function(e,t){e()},v.prototype.showUserExplorer=function(){try{var e={command:"showUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){os.error("Unexpected exception while show userExplorer: ".concat(e))}},v.prototype.hideUserExplorer=function(){try{var e={command:"hideUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){os.error("Unexpected exception while hide userExplorer: ".concat(e))}},v.prototype.setInAppMessageListener=function(e){os.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(){os.info("Web to app integration feature is not support 'close' method")},v.prototype.getExperiment=function(e){os.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=Ht(e))?e:void 0},v.prototype.defaultUser=function(){return{deviceId:ts()}},v.prototype.getDisplayedInAppMessageView=function(){return os.info("Web to app integration feature is not support 'getDisplayedInAppMessageView' method"),null};var ss=v;function v(e,t){this.invocationProcessor=e,this.browserPropertyProvider=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.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.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.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.getDisplayedInAppMessageView=this.getDisplayedInAppMessageView.bind(this)}g.prototype.getSessionId=function(){return this.browser.getSessionId()},g.prototype.getUser=function(){return this.browser.getUser()},g.prototype.syncUser=function(){return a(this,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:return t=this.browser.getUser(),[4,this.app.setUser(t)];case 1:return e.sent(),[2]}})})},g.prototype.setUser=function(t){return a(this,void 0,void 0,function(){return u(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]}})})},g.prototype.setUserId=function(t){return a(this,void 0,void 0,function(){return u(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]}})})},g.prototype.setDeviceId=function(t){return a(this,void 0,void 0,function(){return u(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]}})})},g.prototype.setUserProperty=function(t,r){return a(this,void 0,void 0,function(){return u(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]}})})},g.prototype.setUserProperties=function(t){return a(this,void 0,void 0,function(){return u(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]}})})},g.prototype.updateUserProperties=function(t){return a(this,void 0,void 0,function(){return u(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]}})})},g.prototype.updatePushSubscriptions=function(t){return a(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return[4,this.browser.updatePushSubscriptions(t)];case 1:return e.sent(),[2]}})})},g.prototype.updateSmsSubscriptions=function(t){return a(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return[4,this.browser.updateSmsSubscriptions(t)];case 1:return e.sent(),[2]}})})},g.prototype.updateKakaoSubscriptions=function(t){return a(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return[4,this.browser.updateKakaoSubscriptions(t)];case 1:return e.sent(),[2]}})})},g.prototype.resetUser=function(){return a(this,void 0,void 0,function(){return u(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]}})})},g.prototype.setPhoneNumber=function(t){return a(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return[4,this.browser.setPhoneNumber(t)];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},g.prototype.unsetPhoneNumber=function(){return a(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return[4,this.browser.unsetPhoneNumber()];case 1:return e.sent(),[4,this.syncUser()];case 2:return e.sent(),[2]}})})},g.prototype.variation=function(e,t,r){return this.browser.variation(e,t,r=void 0===r?"A":r)},g.prototype.variationDetail=function(e,t,r){return this.browser.variationDetail(e,t,r=void 0===r?"A":r)},g.prototype.isFeatureOn=function(e,t){return this.browser.isFeatureOn(e,t)},g.prototype.featureFlagDetail=function(e,t){return this.browser.featureFlagDetail(e,t)},g.prototype.track=function(e,t){return this.browser.track(e,t)},g.prototype.trackPageView=function(e){return this.browser.trackPageView(e)},g.prototype.remoteConfig=function(e){return this.browser.remoteConfig(e)},g.prototype.onReady=function(e,t){this.browser.onReady(e,t)},g.prototype.showUserExplorer=function(){this.browser.showUserExplorer()},g.prototype.hideUserExplorer=function(){this.browser.hideUserExplorer()},g.prototype.fetch=function(){return this.browser.fetch()},g.prototype.onInitialized=function(e){return this.browser.onInitialized(e)},g.prototype.close=function(){this.browser.close()},g.prototype.setInAppMessageListener=function(e){this.browser.setInAppMessageListener(e)},g.prototype.getExperiment=function(e){return this.browser.getExperiment(e)},g.prototype.getDisplayedInAppMessageView=function(){return this.browser.getDisplayedInAppMessageView()};var as=g;function g(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.updatePushSubscriptions=this.updatePushSubscriptions.bind(this),this.updateSmsSubscriptions=this.updateSmsSubscriptions.bind(this),this.updateKakaoSubscriptions=this.updateKakaoSubscriptions.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.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.getDisplayedInAppMessageView=this.getDisplayedInAppMessageView.bind(this)}function us(e){return e&&e.Math==Math&&e}function cs(e){try{return!!e()}catch(e){return!0}}function ps(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function ls(e){return $s(Ws(e),8,-1)}function fs(e){if(null==e)throw ea("Can't call method on "+e);return e}function hs(e){return ta(ra(e))}function ds(e){return"function"==typeof e}function ys(e){return"object"==typeof e?null!==e:na(e)}function vs(e,t){return arguments.length<2?(r=ia[e],oa(r)?r:void 0):ia[e]&&ia[e][t];var r}function gs(e){try{return ya(e)}catch(e){return"Object"}}function ms(e){if(va(e))return e;throw ma(ga(e)+" is not a function")}function Es(e,t){return null==(e=e[t])?void 0:Ea(e)}function ws(t,r){try{Aa(Ia,t,{value:r,configurable:!0,writable:!0})}catch(e){Ia[t]=r}return r}function bs(e){return Ma(Sa(e))}function Ts(e){return"Symbol("+(void 0===e?"":e)+")_"+Da(++Ua+ka,36)}function _s(e){var t;return Fa(Ka,e)&&(ja||"string"==typeof Ka[e])||(t="Symbol."+e,ja&&Fa(Ga,e)?Ka[e]=Ga[e]:Ka[e]=(Ba&&Ha?Ha:za)(t)),Ka[e]}function Is(e){return e=Qa(e,"string"),eu(e)?e:e+""}function As(e){return ru?tu.createElement(e):{}}function Ns(e){if(fu(e))return e;throw du(hu(e)+" is not an object")}function Os(e){return Su[e]||(Su[e]=Pu(e))}function Ps(e,t,r,n){var i=(n=n||{}).enumerable,o=void 0!==n.name?n.name:t;if(qu(r)&&$u(r,o,n),n.global)i?e[t]=r:Xu(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Wu.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}function Ss(e){return(e=+e)!=e||0==e?0:ec(e)}function Ms(e,t){return(e=tc(e))<0?rc(e+t,0):nc(e,t)}function Rs(e){return sc(e.length)}function Cs(a){return function(e,t,r){var n,i=ac(e),o=cc(i),s=uc(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 xs(e,t){var r,n=lc(e),i=0,o=[];for(r in n)!pc(hc,r)&&pc(n,r)&&dc(o,r);for(;t.length>i;)!pc(n,r=t[i++])||~fc(o,r)||dc(o,r);return o}function Us(e,t,r){for(var n=Tc(t),i=Ic.f,o=_c.f,s=0;s<n.length;s++){var a=n[s];bc(e,a)||r&&bc(r,a)||i(e,a,o(t,a))}}function ks(e,t){return(e=Sc[Pc(e)])==Rc||e!=Mc&&(Nc(t)?Ac(t):!!t)}function m(e,t){var r,n,i,o=e.target,s=e.global,a=e.stat,u=s?Cc:a?Cc[o]||Dc(o,{}):(Cc[o]||{}).prototype;if(u)for(r in t){if(n=t[r],i=e.dontCallGetSet?(i=xc(u,r))&&i.value:u[r],!Fc(s?r:o+(a?".":"#")+r,e.forced)&&void 0!==i){if(typeof n==typeof i)continue;Lc(n,i)}(e.sham||i&&i.sham)&&Uc(n,"sham",!0),kc(u,r,n,e)}}var Ds,Ls,Fs,Vs,js,Bs,Ks,Gs,t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=us("object"==typeof globalThis&&globalThis)||us("object"==typeof window&&window)||us("object"==typeof self&&self)||us("object"==typeof t&&t)||function(){return this}()||Function("return this")(),e={},Q=!cs(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),r=!cs(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),Hs=Function.prototype.call,G=r?Hs.bind(Hs):function(){return Hs.apply(Hs,arguments)},t={},E={}.propertyIsEnumerable,zs=Object.getOwnPropertyDescriptor,w=zs&&!E.call({1:2},1),w=(t.f=w?function(e){e=zs(this,e);return!!e&&e.enumerable}:E,r),E=Function.prototype,Ys=E.bind,Js=E.call,qs=w&&Ys.bind(Js,Js),E=w?function(e){return e&&qs(e)}:function(e){return e&&function(){return Js.apply(e,arguments)}},Ys=E,Ws=Ys({}.toString),$s=Ys("".slice),w=cs,Xs=ls,Zs=Object,Qs=E("".split),Ys=w(function(){return!Zs("z").propertyIsEnumerable(0)})?function(e){return"String"==Xs(e)?Qs(e,""):Zs(e)}:Zs,ea=TypeError,ta=Ys,ra=fs,na=ds,ia=i,oa=ds,w=E({}.isPrototypeOf),sa=vs("navigator","userAgent")||"",aa=sa,ua=i.process,ca=i.Deno,ua=ua&&ua.versions||ca&&ca.version,ca=ua&&ua.v8,ua=T=!(T=ca?0<(b=ca.split("."))[0]&&b[0]<4?1:+(b[0]+b[1]):T)&&aa&&(!(b=aa.match(/Edge\/(\d+)/))||74<=b[1])&&(b=aa.match(/Chrome\/(\d+)/))?+b[1]:T,pa=ua,ca=cs,aa=!!Object.getOwnPropertySymbols&&!ca(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&pa&&pa<41}),b=aa&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,la=vs,fa=ds,ha=w,da=Object,T=b?function(e){return"symbol"==typeof e}:function(e){var t=la("Symbol");return fa(t)&&ha(t.prototype,da(e))},ya=String,va=ds,ga=gs,ma=TypeError,Ea=ms,wa=G,ba=ds,Ta=ys,_a=TypeError,ca={exports:{}},Ia=i,Aa=Object.defineProperty,Na=ws,Oa="__core-js_shared__",Na=i[Oa]||Na(Oa,{}),Pa=Na,Sa=((ca.exports=function(e,t){return Pa[e]||(Pa[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"}),fs),Ma=Object,Ra=bs,Ca=E({}.hasOwnProperty),Oa=Object.hasOwn||function(e,t){return Ca(Ra(e),t)},xa=E,Ua=0,ka=Math.random(),Da=xa(1..toString),xa=i,La=ca.exports,Fa=Oa,Va=Ts,ja=aa,Ba=b,Ka=La("wks"),Ga=xa.Symbol,Ha=Ga&&Ga.for,za=Ba?Ga:Ga&&Ga.withoutSetter||Va,Ya=G,Ja=ys,qa=T,Wa=Es,$a=function(e,t){var r,n;if("string"===t&&ba(r=e.toString)&&!Ta(n=wa(r,e)))return n;if(ba(r=e.valueOf)&&!Ta(n=wa(r,e)))return n;if("string"!==t&&ba(r=e.toString)&&!Ta(n=wa(r,e)))return n;throw _a("Can't convert object to primitive value")},Xa=TypeError,Za=_s("toPrimitive"),Qa=function(e,t){if(!Ja(e)||qa(e))return e;var r=Wa(e,Za);if(r){if(r=Ya(r,e,t=void 0===t?"default":t),!Ja(r)||qa(r))return r;throw Xa("Can't convert object to primitive value")}return $a(e,t=void 0===t?"number":t)},eu=T,aa=ys,tu=i.document,ru=aa(tu)&&aa(tu.createElement),nu=As,b=!Q&&!cs(function(){return 7!=Object.defineProperty(nu("div"),"a",{get:function(){return 7}}).a}),iu=G,ou=t,su=ps,au=hs,uu=Is,cu=Oa,pu=b,lu=Object.getOwnPropertyDescriptor,La=(e.f=Q?lu:function(e,t){if(e=au(e),t=uu(t),pu)try{return lu(e,t)}catch(e){}if(cu(e,t))return su(!iu(ou.f,e,t),e[t])},{}),xa=Q&&cs(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),fu=ys,hu=String,du=TypeError,yu=b,vu=Ns,gu=Is,mu=TypeError,Eu=Object.defineProperty,wu=Object.getOwnPropertyDescriptor,bu="enumerable",Tu="configurable",_u="writable",Va=(La.f=Q?xa?function(e,t,r){var n;return vu(e),t=gu(t),vu(r),"function"==typeof e&&"prototype"===t&&"value"in r&&_u in r&&!r[_u]&&((n=wu(e,t))&&n[_u]&&(e[t]=r.value,r={configurable:(Tu in r?r:n)[Tu],enumerable:(bu in r?r:n)[bu],writable:!1})),Eu(e,t,r)}:Eu:function(e,t,r){if(vu(e),t=gu(t),vu(r),yu)try{return Eu(e,t,r)}catch(e){}if("get"in r||"set"in r)throw mu("Accessors not supported");return"value"in r&&(e[t]=r.value),e},Q),Iu=La,Au=ps,T=Va?function(e,t,r){return Iu.f(e,t,Au(1,r))}:function(e,t,r){return e[t]=r,e},aa={exports:{}},t=Q,b=Oa,Va=Function.prototype,_=t&&Object.getOwnPropertyDescriptor,b=b(Va,"name"),b={EXISTS:b,PROPER:b&&"something"===function(){}.name,CONFIGURABLE:b&&(!t||_(Va,"name").configurable)},t=ds,_=Na,Nu=E(Function.toString),Va=(t(_.inspectSource)||(_.inspectSource=function(e){return Nu(e)}),_.inspectSource),t=ds,_=Va,Ou=i.WeakMap,t=t(Ou)&&/native code/.test(_(Ou)),_=ca.exports,Pu=Ts,Su=_("keys"),Ou={},ca=E,Mu=ys,Ru=T,Cu=Oa,_=Na,xu=Os,Uu=Ou,ku="Object already initialized",Du=i.TypeError,Lu=i.WeakMap,t=(Ks=t||_.state?(Ds=_.state||(_.state=new Lu),Ls=ca(Ds.get),Fs=ca(Ds.has),Vs=ca(Ds.set),js=function(e,t){if(Fs(Ds,e))throw new Du(ku);return t.facade=e,Vs(Ds,e,t),t},Bs=function(e){return Ls(Ds,e)||{}},function(e){return Fs(Ds,e)}):(Uu[Gs=xu("state")]=!0,js=function(e,t){if(Cu(e,Gs))throw new Du(ku);return t.facade=e,Ru(e,Gs,t),t},Bs=function(e){return Cu(e,Gs)?e[Gs]:{}},function(e){return Cu(e,Gs)}),{set:js,get:Bs,has:Ks,enforce:function(e){return Ks(e)?Bs(e):js(e,{})},getterFor:function(t){return function(e){if(Mu(e)&&(e=Bs(e)).type===t)return e;throw Du("Incompatible receiver, "+t+" required")}}}),_=cs,Fu=ds,Vu=Oa,ju=Q,Bu=b.CONFIGURABLE,Ku=Va,Gu=t.enforce,Hu=t.get,zu=Object.defineProperty,Yu=ju&&!_(function(){return 8!==zu(function(){},"length",{value:8}).length}),Ju=String(String).split("String"),Lu=aa.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),(!Vu(e,"name")||Bu&&e.name!==t)&&(ju?zu(e,"name",{value:t,configurable:!0}):e.name=t),Yu&&r&&Vu(r,"arity")&&e.length!==r.arity&&zu(e,"length",{value:r.arity});try{r&&Vu(r,"constructor")&&r.constructor?ju&&zu(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=Gu(e);return Vu(r,"source")||(r.source=Ju.join("string"==typeof t?t:"")),e},qu=(Function.prototype.toString=Lu(function(){return Fu(this)&&Hu(this).source||Ku(this)},"toString"),ds),Wu=La,$u=aa.exports,Xu=ws,ca={},Zu=Math.ceil,Qu=Math.floor,ec=Math.trunc||function(e){e=+e;return(0<e?Qu:Zu)(e)},tc=Ss,rc=Math.max,nc=Math.min,ic=Ss,oc=Math.min,sc=function(e){return 0<e?oc(ic(e),9007199254740991):0},ac=hs,uc=Ms,cc=Rs,Uu={includes:Cs(!0),indexOf:Cs(!1)},xu=E,pc=Oa,lc=hs,fc=Uu.indexOf,hc=Ou,dc=xu([].push),_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],yc=xs,vc=_.concat("length","prototype"),Lu=(ca.f=Object.getOwnPropertyNames||function(e){return yc(e,vc)},{}),xu=(Lu.f=Object.getOwnPropertySymbols,vs),gc=ca,mc=Lu,Ec=Ns,wc=E([].concat),Lu=xu("Reflect","ownKeys")||function(e){var t=gc.f(Ec(e)),r=mc.f;return r?wc(t,r(e)):t},bc=Oa,Tc=Lu,_c=e,Ic=La,Ac=cs,Nc=ds,Oc=/#|\.prototype\./,Pc=ks.normalize=function(e){return String(e).replace(Oc,".").toLowerCase()},Sc=ks.data={},Mc=ks.NATIVE="N",Rc=ks.POLYFILL="P",xu=ks,Cc=i,xc=e.f,Uc=T,kc=Ps,Dc=ws,Lc=Us,Fc=xu,Lu=!cs(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Vc=Oa,jc=ds,Bc=bs,Kc=Os("IE_PROTO"),Gc=Object,Hc=Gc.prototype,Lu=Lu?Gc.getPrototypeOf:function(e){e=Bc(e);if(Vc(e,Kc))return e[Kc];var t=e.constructor;return jc(t)&&e instanceof t?t.prototype:e instanceof Gc?Hc:null},zc=ds,Yc=String,Jc=TypeError,qc=E,Wc=Ns,$c=function(e){if("object"==typeof e||zc(e))return e;throw Jc("Can't set "+Yc(e)+" as a prototype")},Xc=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=qc(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return Wc(e),$c(t),n?r(e,t):e.__proto__=t,e}}():void 0),Zc={},Qc=xs,ep=_,I=Object.keys||function(e){return Qc(e,ep)},tp=La,rp=Ns,np=hs,ip=I;Zc.f=Q&&!xa?Object.defineProperties:function(e,t){rp(e);for(var r,n=np(t),i=ip(t),o=i.length,s=0;s<o;)tp.f(e,r=i[s++],n[r]);return e};function op(){}function sp(e){e.write(Op("")),e.close();var t=e.parentWindow.Object;return e=null,t}function ap(e,t){return kp(e),void 0===t?e:Dp?Lp(e,t):function(){return e.apply(t,arguments)}}function up(e){return void 0!==e&&(Fp.Array===e||jp[Vp]===e)}function cp(e){if(null!=e)return Jp(e,Wp)||Jp(e,"@@iterator")||qp[Yp(e)]}function pp(e,t){if(t=arguments.length<2?el(e):t,Xp(t))return Zp($p(t,e));throw tl(Qp(e)+" is not iterable")}function lp(e,t,r){var n,i;nl(e);try{if(!(n=il(e,"return"))){if("throw"===t)throw r;return r}n=rl(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return nl(n),r}function fp(e,t){this.stopped=e,this.result=t}function hp(e,t,r){function n(e){return o&&dl(o,"normal",e),new fp(!0,e)}function i(e){return f?(al(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,p,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),v=ol(t,l);if(h)o=e.iterator;else if(d)o=e;else{if(!(r=hl(e)))throw yl(ul(e)+" is not iterable");if(cl(r)){for(s=0,a=pl(e);s<a;s++)if((u=i(e[s]))&&ll(vl,u))return u;return new fp(!1)}o=fl(e,r)}for(c=(h?e:o).next;!(p=sl(c,o)).done;){try{u=i(p.value)}catch(e){dl(o,"throw",e)}if("object"==typeof u&&u&&ll(vl,u))return u}return new fp(!1)}function dp(e){if("Symbol"===gl(e))throw TypeError("Cannot convert a Symbol value to a string");return ml(e)}function yp(e,t){var r,n=2<arguments.length?arguments[2]:void 0,i=bl(Dl,this);return _l?r=_l(new Ul,i?Tl(this):Dl):(r=i?this:Al(Dl),Nl(r,xl,"Error")),void 0!==t&&Nl(r,"message",Rl(t)),Cl&&Nl(r,"stack",Pl(r.stack,1)),Sl(r,n),Ml(e,kl,{that:i=[]}),Nl(r,"errors",i),r}function vp(e){Fl[Ll][e]=!0}var gp,mp,I=vs("document","documentElement"),Ep=Ns,wp=Zc,bp=_,xa=Ou,Tp=I,_p=As,Ip="prototype",Ap="script",Np=Os("IE_PROTO"),Op=function(e){return"<"+Ap+">"+e+"</"+Ap+">"},Pp=function(){try{gp=new ActiveXObject("htmlfile")}catch(e){}Pp="undefined"==typeof document||document.domain&&gp?sp(gp):(e=_p("iframe"),t="java"+Ap+":",e.style.display="none",Tp.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(Op("document.F=Object")),t.close(),t.F);for(var e,t,r=bp.length;r--;)delete Pp[Ip][bp[r]];return Pp()},Zc=(xa[Np]=!0,Object.create||function(e,t){var r;return null!==e?(op[Ip]=Ep(e),r=new op,op[Ip]=null,r[Np]=e):r=Pp(),void 0===t?r:wp.f(r,t)}),Sp=Error,Mp=E("".replace),_=String(Sp("zxcasd").stack),Rp=/\n\s*at [^:]*:[^\n]*/,Cp=Rp.test(_),xp=ys,Up=T,kp=ms,Dp=r,Lp=E(E.bind),xa={},Fp=xa,Vp=_s("iterator"),jp=Array.prototype,_={},_=(_[_s("toStringTag")]="z","[object z]"===String(_)),A=_,Bp=ds,Kp=ls,Gp=_s("toStringTag"),Hp=Object,zp="Arguments"==Kp(function(){return arguments}()),A=A?Kp: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=Hp(e),Gp))?t:zp?Kp(e):"Object"==(t=Kp(e))&&Bp(e.callee)?"Arguments":t},Yp=A,Jp=Es,qp=xa,Wp=_s("iterator"),$p=G,Xp=ms,Zp=Ns,Qp=gs,el=cp,tl=TypeError,rl=G,nl=Ns,il=Es,ol=ap,sl=G,al=Ns,ul=gs,cl=up,pl=Rs,ll=w,fl=pp,hl=cp,dl=lp,yl=TypeError,vl=fp.prototype,gl=A,ml=String,El=dp,wl=ps,N=!cs(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",wl(1,7)),7!==e.stack)}),O=m,bl=w,Tl=Lu,_l=Xc,Il=Us,Al=Zc,Nl=T,Ol=ps,Pl=function(e,t){if(Cp&&"string"==typeof e&&!Sp.prepareStackTrace)for(;t--;)e=Mp(e,Rp,"");return e},Sl=function(e,t){xp(t)&&"cause"in t&&Up(e,"cause",t.cause)},Ml=hp,Rl=function(e,t){return void 0===e?arguments.length<2?"":t:El(e)},Cl=N,xl=_s("toStringTag"),Ul=Error,kl=[].push,Dl=(_l?_l(yp,Ul):Il(yp,Ul,{name:!0}),yp.prototype=Al(Ul.prototype,{constructor:Ol(1,yp),message:Ol(1,""),name:Ol(1,"AggregateError")})),N=(O({global:!0,constructor:!0,arity:2},{AggregateError:yp}),_s),Il=Zc,Ol=La.f,Ll=N("unscopables"),Fl=Array.prototype,O=(null==Fl[Ll]&&Ol(Fl,Ll,{configurable:!0,value:Il(null)}),cs),N=ds,Ol=Lu,Il=Ps,Vl=_s("iterator"),jl=!1;[].keys&&("next"in(P=[].keys())?(Ol=Ol(Ol(P)))!==Object.prototype&&(mp=Ol):jl=!0);function Bl(e,t,r){(e=e&&!r?e.prototype:e)&&!Yl(e,Jl)&&zl(e,Jl,{configurable:!0,value:t})}function Kl(){return this}function Gl(){return this}function Hl(e,t,r,n,i,o,s){function a(e){if(e===i&&h)return h;if(!hf&&e in l)return l[e];switch(e){case"keys":case yf:case vf:return function(){return new r(this,e)}}return function(){return new r(this)}}rf(r,t,n);var u,c,n=t+" Iterator",p=!1,l=e.prototype,f=l[df]||l["@@iterator"]||i&&l[i],h=!hf&&f||a(i),d="Array"==t&&l.entries||f;if(d&&(d=nf(d.call(new e)))!==Object.prototype&&d.next&&(nf(d)!==ff&&(of?of(d,ff):tf(d[df])||uf(d,df,Gl)),sf(d,n,!0)),pf&&i==yf&&f&&f.name!==yf&&(lf?af(l,"name",yf):(p=!0,h=function(){return ef(f,this)})),i)if(u={values:a(yf),keys:o?h:a("keys"),entries:a(vf)},s)for(c in u)!hf&&!p&&c in l||uf(l,c,u[c]);else Ql({target:t,proto:!0,forced:hf||p},u);return l[df]!==h&&uf(l,df,h,{name:i}),cf[t]=h,u}N((mp=null==mp||O(function(){var e={};return mp[Vl].call(e)!==e})?{}:mp)[Vl])||Il(mp,Vl,function(){return this});var P={IteratorPrototype:mp,BUGGY_SAFARI_ITERATORS:jl},zl=La.f,Yl=Oa,Jl=_s("toStringTag"),ql=P.IteratorPrototype,Wl=Zc,$l=ps,Xl=Bl,Zl=xa,Ql=m,ef=G,tf=ds,rf=function(e,t,r,n){t+=" Iterator";return e.prototype=Wl(ql,{next:$l(+!n,r)}),Xl(e,t,!1),Zl[t]=Kl,e},nf=Lu,of=Xc,sf=Bl,af=T,uf=Ps,Ol=_s,cf=xa,pf=b.PROPER,lf=b.CONFIGURABLE,ff=P.IteratorPrototype,hf=P.BUGGY_SAFARI_ITERATORS,df=Ol("iterator"),yf="values",vf="entries",gf=hs,N=vp,O=xa,Il=t,jl=La.f,b=Hl,P=Q,mf="Array Iterator",Ef=Il.set,wf=Il.getterFor(mf),Ol=b(Array,"Array",function(e,t){Ef(this,{type:mf,target:gf(e),index:0,kind:t})},function(){var e=wf(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"),xa=O.Arguments=O.Array;if(N("keys"),N("values"),N("entries"),P&&"values"!==xa.name)try{jl(xa,"name",{value:"values"})}catch(e){}var bf=A;_||Ps(Object.prototype,"toString",_?{}.toString:function(){return"[object "+bf(this)+"]"},{unsafe:!0});function Tf(e){var e=Mf(e),t=Rf.f;Cf&&e&&!e[xf]&&t(e,xf,{configurable:!0,get:function(){return this}})}function _f(e,t){if(Uf(t,e))return e;throw kf("Incorrect invocation")}function If(){}function Af(e){if(!Df(e))return!1;try{return jf(If,Vf,e),!0}catch(e){return!1}}function Nf(e){if(!Df(e))return!1;switch(Lf(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Gf||!!Kf(Bf,Ff(e))}catch(e){return!0}}function Of(e,t){return void 0===(e=Jf(e).constructor)||null==(e=Jf(e)[Wf])?t:qf(e)}var Pf,Sf,Il="process"==ls(i.process),Mf=vs,Rf=La,Cf=Q,xf=_s("species"),Uf=w,kf=TypeError,b=E,O=cs,Df=ds,Lf=A,Ff=Va,Vf=[],jf=vs("Reflect","construct"),Bf=/^\s*(?:class|function)\b/,Kf=b(Bf.exec),Gf=!Bf.exec(If),N=(Nf.sham=!0,!jf||O(function(){var e;return Af(Af.call)||!Af(Object)||!Af(function(){e=!0})||e})?Nf:Af),Hf=N,zf=gs,Yf=TypeError,Jf=Ns,qf=function(e){if(Hf(e))return e;throw Yf(zf(e)+" is not a constructor")},Wf=_s("species"),P=Function.prototype,$f=P.apply,Xf=P.call,jl="object"==typeof Reflect&&Reflect.apply||(r?Xf.bind($f):function(){return Xf.apply($f,arguments)}),xa=E([].slice),Zf=TypeError,_=/(?:ipad|iphone|ipod).*applewebkit/i.test(sa),Qf=i,eh=jl,w=ap,th=ds,rh=Oa,A=cs,nh=I,ih=xa,oh=As,sh=function(e,t){if(e<t)throw Zf("Not enough arguments");return e},b=_,O=Il,P=Qf.setImmediate,r=Qf.clearImmediate,ah=Qf.process,uh=Qf.Dispatch,ch=Qf.Function,I=Qf.MessageChannel,ph=Qf.String,lh=0,fh={},hh="onreadystatechange";try{Pf=Qf.location}catch(e){}function dh(e){return function(){Rh(e)}}function yh(e){Rh(e.data)}function vh(e){Qf.postMessage(ph(e),Pf.protocol+"//"+Pf.host)}function gh(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}function mh(){this.head=null,this.tail=null}function Eh(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw TypeError("Bad Promise constructor");r=e,n=t}),this.resolve=Hh(r),this.reject=Hh(n)}function wh(e,t){var r,n,i,o,s=t.value,a=t.state==md,u=a?e.ok:e.fail,c=e.resolve,p=e.reject,l=e.domain;try{u?(a||(t.rejection===bd&&(o=t,Jh(Qh,Yh,function(){var e=o.facade;zh?fd.emit("rejectionHandled",e):Id(gd,e,o.value)})),t.rejection=wd),!0===u?r=s:(l&&l.enter(),r=u(s),l&&(l.exit(),i=!0)),r===e.promise?p(pd("Promise-chain cycle")):(n=Td(r))?Jh(n,r,c,p):c(r)):p(s)}catch(e){l&&!i&&l.exit(),p(e)}}var bh,Th,_h,Ih,Ah,Nh,Oh,Ph,Sh,Mh,Rh=function(e){var t;rh(fh,e)&&(t=fh[e],delete fh[e],t())},I=(P&&r||(P=function(e){sh(arguments.length,1);var t=th(e)?e:ch(e),r=ih(arguments,1);return fh[++lh]=function(){eh(t,void 0,r)},Sf(lh),lh},r=function(e){delete fh[e]},O?Sf=function(e){ah.nextTick(dh(e))}:uh&&uh.now?Sf=function(e){uh.now(dh(e))}:I&&!b?(b=(O=new I).port2,O.port1.onmessage=yh,Sf=w(b.postMessage,b)):Qf.addEventListener&&th(Qf.postMessage)&&!Qf.importScripts&&Pf&&"file:"!==Pf.protocol&&!A(vh)?(Sf=vh,Qf.addEventListener("message",yh,!1)):Sf=hh in oh("script")?function(e){nh.appendChild(oh("script"))[hh]=function(){nh.removeChild(this),Rh(e)}}:function(e){setTimeout(dh(e),0)}),{set:P,clear:r}),O=i,w=/ipad|iphone|ipod/i.test(sa)&&void 0!==O.Pebble,b=/web0s(?!.*chrome)/i.test(sa),A=i,P=ap,r=e.f,Ch=I.set,O=_,e=w,_=b,xh=Il,w=A.MutationObserver||A.WebKitMutationObserver,b=A.document,Uh=A.process,S=A.Promise,r=r(A,"queueMicrotask"),r=r&&r.value,_=(r||(bh=function(){var e,t;for(xh&&(e=Uh.domain)&&e.exit();Th;){t=Th.fn,Th=Th.next;try{t()}catch(e){throw Th?Ih():_h=void 0,e}}_h=void 0,e&&e.enter()},Ih=O||xh||_||!w||!b?!e&&S&&S.resolve?((O=S.resolve(void 0)).constructor=S,Oh=P(O.then,O),function(){Oh(bh)}):xh?function(){Uh.nextTick(bh)}:(Ch=P(Ch,A),function(){Ch(bh)}):(Ah=!0,Nh=b.createTextNode(""),new w(bh).observe(Nh,{characterData:!0}),function(){Nh.data=Ah=!Ah})),r||function(e){e={fn:e,next:void 0};_h&&(_h.next=e),Th||(Th=e,Ih()),_h=e}),kh=i,e=(mh.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}},mh),S=i.Promise,O="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,P=!O&&!Il&&"object"==typeof window&&"object"==typeof document,A=i,Dh=S,b=ds,w=xu,Lh=Va,r=_s,Fh=P,Vh=O,jh=ua,Bh=(Dh&&Dh.prototype,r("species")),Kh=!1,Gh=b(A.PromiseRejectionEvent),Va={CONSTRUCTOR:w("Promise",function(){var e=Lh(Dh),t=e!==String(Dh);if(!t&&66===jh)return!0;if(!jh||jh<51||!/native code/.test(e)){var e=new Dh(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[Bh]=r,!(Kh=e.then(function(){})instanceof r))return!0}return!t&&(Fh||Vh)&&!Gh}),REJECTION_EVENT:Gh,SUBCLASSING:Kh},P={},Hh=ms,O=(P.f=function(e){return new Eh(e)},m),zh=Il,Yh=i,Jh=G,r=Ps,b=Xc,A=Bl,w=Tf,qh=ms,Wh=ds,$h=ys,Xh=_f,Zh=Of,Qh=I.set,ed=_,td=function(e,t){var r=kh.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},rd=gh,nd=e,I=t,_=S,e=P,id="Promise",M=Va.CONSTRUCTOR,od=Va.REJECTION_EVENT,R=Va.SUBCLASSING,sd=I.getterFor(id),ad=I.set,I=_&&_.prototype,ud=_,cd=I,pd=Yh.TypeError,ld=Yh.document,fd=Yh.process,hd=e.f,dd=hd,yd=!!(ld&&ld.createEvent&&Yh.dispatchEvent),vd="unhandledrejection",gd="rejectionhandled",md=1,Ed=2,wd=1,bd=2,Td=function(e){var t;return!(!$h(e)||!Wh(t=e.then))&&t},_d=function(r,i){r.notified||(r.notified=!0,ed(function(){for(var e,n,t=r.reactions;e=t.get();)wh(e,r);r.notified=!1,i&&!r.rejection&&(n=r,Jh(Qh,Yh,function(){var e=n.facade,t=n.value,r=Ad(n);if(r&&(r=rd(function(){zh?fd.emit("unhandledRejection",t,e):Id(vd,e,t)}),n.rejection=zh||Ad(n)?bd:wd,r.error))throw r.value}))}))},Id=function(e,t,r){var n;yd?((n=ld.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Yh.dispatchEvent(n)):n={promise:t,reason:r},!od&&(t=Yh["on"+e])?t(n):e===vd&&td("Unhandled promise rejection",r)},Ad=function(e){return e.rejection!==wd&&!e.parent},Nd=function(t,r,n){return function(e){t(r,e,n)}},Od=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=Ed,_d(e,!0))},Pd=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw pd("Promise can't be resolved itself");var n=Td(e);n?ed(function(){var t={done:!1};try{Jh(n,e,Nd(Pd,t,r),Nd(Od,t,r))}catch(e){Od(t,e,r)}}):(r.value=e,r.state=md,_d(r,!1))}catch(e){Od({done:!1},e,r)}}};if(M&&(cd=(ud=function(e){Xh(this,cd),qh(e),Jh(Ph,this);var t=sd(this);try{e(Nd(Pd,t),Nd(Od,t))}catch(e){Od(t,e)}}).prototype,(Ph=function(e){ad(this,{type:id,done:!1,notified:!1,parent:!1,reactions:new nd,rejection:!1,state:0,value:void 0})}).prototype=r(cd,"then",function(e,t){var r=sd(this),n=hd(Zh(this,ud));return r.parent=!0,n.ok=!Wh(e)||e,n.fail=Wh(t)&&t,n.domain=zh?fd.domain:void 0,0==r.state?r.reactions.add(n):ed(function(){wh(n,r)}),n.promise}),Sh=function(){var e=new Ph,t=sd(e);this.promise=e,this.resolve=Nd(Pd,t),this.reject=Nd(Od,t)},e.f=hd=function(e){return e===ud||void 0===e?new Sh:dd(e)},Wh(_)&&I!==Object.prototype)){Mh=I.then,R||r(I,"then",function(e,t){var r=this;return new ud(function(e,t){Jh(Mh,r,e,t)}).then(e,t)},{unsafe:!0});try{delete I.constructor}catch(e){}b&&b(I,cd)}O({global:!0,constructor:!0,wrap:!0,forced:M},{Promise:ud}),A(ud,id,!1),w(id);var Sd=_s("iterator"),Md=!1;try{var Rd=0,C={next:function(){return{done:!!Rd++}},return:function(){Md=!0}};C[Sd]=function(){return this},Array.from(C,function(){throw 2})}catch(e){}function Cd(e,t){if(!t&&!Md)return!1;var r=!1;try{var n={};n[Sd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}var xd=S,e=Cd,_=Va.CONSTRUCTOR||!e(function(e){xd.all(e).then(void 0,function(){})}),Ud=G,kd=ms,Dd=P,Ld=gh,Fd=hp,R=(m({target:"Promise",stat:!0,forced:_},{all:function(e){var a=this,t=Dd.f(a),u=t.resolve,c=t.reject,r=Ld(function(){var n=kd(a.resolve),i=[],o=0,s=1;Fd(e,function(e){var t=o++,r=!1;s++,Ud(n,a,e).then(function(e){r||(r=!0,i[t]=e,--s||u(i))},c)}),--s||u(i)});return r.error&&c(r.value),t.promise}}),m),r=S,b=vs,I=ds,O=Ps,M=r&&r.prototype;R({target:"Promise",proto:!0,forced:Va.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),I(r)&&(A=b("Promise").prototype.catch,M.catch!==A&&O(M,"catch",A,{unsafe:!0}));var Vd=G,jd=ms,Bd=P,Kd=gh,Gd=hp;m({target:"Promise",stat:!0,forced:_},{race:function(e){var r=this,n=Bd.f(r),i=n.reject,t=Kd(function(){var t=jd(r.resolve);Gd(e,function(e){Vd(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}});function Hd(e,t){return Jd(e),qd(t)&&t.constructor===e?t:((0,(e=Wd.f(e)).resolve)(t),e.promise)}var zd=G,Yd=P,Jd=(m({target:"Promise",stat:!0,forced:Va.CONSTRUCTOR},{reject:function(e){var t=Yd.f(this);return zd(t.reject,void 0,e),t.promise}}),Ns),qd=ys,Wd=P,w=m,C=vs,e=Va.CONSTRUCTOR,$d=Hd;C("Promise"),w({target:"Promise",stat:!0,forced:e},{resolve:function(e){return $d(this,e)}});var Xd=G,Zd=ms,Qd=P,ey=gh,ty=hp;m({target:"Promise",stat:!0},{allSettled:function(e){var a=this,t=Qd.f(a),u=t.resolve,r=t.reject,n=ey(function(){var n=Zd(a.resolve),i=[],o=0,s=1;ty(e,function(e){var t=o++,r=!1;s++,Xd(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 ry(i){return function(e,t){var r,e=vy(gy(e)),t=yy(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=Ey(e,t))<55296||56319<r||t+1===n||(n=Ey(e,t+1))<56320||57343<n?i?my(e,t):r:i?wy(e,t,t+2):n-56320+(r-55296<<10)+65536}}var ny=G,iy=ms,oy=vs,sy=P,ay=gh,uy=hp,cy="No one promise resolved",R=(m({target:"Promise",stat:!0},{any:function(e){var u=this,c=oy("AggregateError"),t=sy.f(u),p=t.resolve,l=t.reject,r=ay(function(){var n=iy(u.resolve),i=[],o=0,s=1,a=!1;uy(e,function(e){var t=o++,r=!1;s++,ny(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,cy)))})}),--s||l(new c(i,cy))});return r.error&&l(r.value),t.promise}}),m),I=S,r=cs,py=vs,ly=ds,fy=Of,hy=Hd,b=Ps,dy=I&&I.prototype,M=(R({target:"Promise",proto:!0,real:!0,forced:!!I&&r(function(){dy.finally.call({then:function(){}},function(){})})},{finally:function(t){var r=fy(this,py("Promise")),e=ly(t);return this.then(e?function(e){return hy(r,t()).then(function(){return e})}:t,e?function(e){return hy(r,t()).then(function(){throw e})}:t)}}),ly(I)&&(O=py("Promise").prototype.finally,dy.finally!==O&&b(dy,"finally",O,{unsafe:!0})),E),yy=Ss,vy=dp,gy=fs,my=M("".charAt),Ey=M("".charCodeAt),wy=M("".slice),by={codeAt:ry(!1),charAt:ry(!0)}.charAt,Ty=dp,A=t,_=Hl,_y="String Iterator",Iy=A.set,Ay=A.getterFor(_y);_(String,"String",function(e){Iy(this,{type:_y,string:Ty(e),index:0})},function(){var e=Ay(this),t=e.string,r=e.index;return r>=t.length?{value:void 0,done:!0}:(t=by(t,r),e.index+=t.length,{value:t,done:!1})});function Ny(t,e){if(t){if(t[Cy]!==Uy)try{Ry(t,Cy,Uy)}catch(e){t[Cy]=Uy}if(t[xy]||Ry(t,xy,e),Sy[e])for(var r in My)if(t[r]!==My[r])try{Ry(t,r,My[r])}catch(e){t[r]=My[r]}}}var Oy,Va=i,C=Va.Promise,w=As("span").classList,e=w&&w.constructor&&w.constructor.prototype,S=e===Object.prototype?void 0:e,Py=i,Sy={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},R=S,My=Ol,Ry=T,r=_s,Cy=r("iterator"),xy=r("toStringTag"),Uy=My.values;for(Oy in Sy)Ny(Py[Oy]&&Py[Oy].prototype,Oy);Ny(R,"DOMTokenList");var I,b,O=b=I=C,M,ky=P,Dy=gh,Ly=((M=m)({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=ky.f(this),e=Dy(e);return(e.error?t.reject:t.resolve)(e.value),t.promise}}),Ns),Fy=lp,Vy=Is,jy=La,By=ps,A,Ky=ap,Gy=G,Hy=bs,zy=function(t,e,r,n){try{return n?e(Ly(r)[0],r[1]):e(r)}catch(e){Fy(t,"throw",e)}},Yy=up,Jy=N,qy=Rs,Wy=A=function(e,t,r){t=Vy(t);t in e?jy.f(e,t,By(0,r)):e[t]=r},$y=pp,Xy=cp,Zy=Array,_=m,w=function(e){var t,r,n,i,o,s,a=Hy(e),e=Jy(this),u=arguments.length,c=1<u?arguments[1]:void 0,p=void 0!==c,u=(p&&(c=Ky(c,2<u?arguments[2]:void 0)),Xy(a)),l=0;if(!u||this===Zy&&Yy(u))for(t=qy(a),r=e?new this(t):Zy(t);l<t;l++)s=p?c(a[l],l):a[l],Wy(r,l,s);else for(o=(i=$y(a,u)).next,r=e?new this:[];!(n=Gy(o,i)).done;l++)s=p?zy(i,c,[n.value,l],!0):n.value,Wy(r,l,s);return r.length=l,r},e,S=!(e=Cd)(function(e){Array.from(e)}),Qy=(_({target:"Array",stat:!0,forced:S},{from:w}),ls),Ol=Array.isArray||function(e){return"Array"==Qy(e)},T,r,R=((T=m)({target:"Array",stat:!0},{isArray:r=Ol}),m),C=cs,ev=N,tv=A,rv=Array,I=C(function(){function e(){}return!(rv.of.call(e)instanceof e)}),nv=(R({target:"Array",stat:!0,forced:I},{of:function(){for(var e=0,t=arguments.length,r=new(ev(this)?this:rv)(t);e<t;)tv(r,e,arguments[e++]);return r.length=t,r}}),bs),iv=Rs,ov=Ss,b=vp,sv=(m({target:"Array",proto:!0},{at:function(e){var t=nv(this),r=iv(t),e=ov(e),e=0<=e?e:r+e;return e<0||r<=e?void 0:t[e]}}),b("at"),TypeError),O=function(e){if(9007199254740991<e)throw sv("Maximum allowed index exceeded");return e},av=Ol,uv=N,cv=ys,pv=_s("species"),lv=Array,fv=function(e){var t;return av(e)&&(t=e.constructor,(uv(t)&&(t===lv||av(t.prototype))||cv(t)&&null===(t=t[pv]))&&(t=void 0)),void 0===t?lv:t},P=function(e,t){return new(fv(e))(0===t?0:t)},hv=cs,dv=ua,yv=_s("species"),M,e=m,_=cs,vv=Ol,gv=ys,mv=bs,Ev=Rs,wv=O,bv=A,Tv=P,S=M=function(t){return 51<=dv||!hv(function(){var e=[];return(e.constructor={})[yv]=function(){return{foo:1}},1!==e[t](Boolean).foo})},w=ua,_v=_s("isConcatSpreadable"),T=51<=w||!_(function(){var e=[];return e[_v]=!1,e.concat()[0]!==e}),r=S("concat"),Iv=(e({target:"Array",proto:!0,arity:1,forced:!T||!r},{concat:function(e){for(var t,r,n,i=mv(this),o=Tv(i,0),s=0,a=-1,u=arguments.length;a<u;a++)if(function(e){if(!gv(e))return!1;var t=e[_v];return void 0!==t?!!t:vv(e)}(n=-1===a?i:arguments[a]))for(r=Ev(n),wv(s+r),t=0;t<r;t++,s++)t in n&&bv(o,s,n[t]);else wv(s+1),bv(o,s++,n);return o.length=s,o}}),gs),Av=TypeError,C,Nv=bs,Ov=Ms,Pv=Rs,Sv=C=function(e,t){if(!delete e[t])throw Av("Cannot delete property "+Iv(t)+" of "+Iv(e))},Mv=Math.min,R=vp,Rv=(m({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=Nv(this),n=Pv(r),i=Ov(e,n),o=Ov(t,n),e=2<arguments.length?arguments[2]:void 0,s=Mv((void 0===e?n:Ov(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]:Sv(r,i),i+=a,o+=a;return r}}),R("copyWithin"),ap),Cv=Ys,xv=bs,Uv=Rs,kv=P,Dv=E([].push),I,b={forEach:(I=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=xv(e),a=Cv(s),u=Rv(t,r),c=Uv(a),p=0,t=n||kv,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:Dv(l,i)}else switch(f){case 4:return!1;case 7:Dv(l,i)}return g?-1:y||v?v:l}})(0),map:I(1),filter:I(2),some:I(3),every:I(4),find:I(5),findIndex:I(6),filterReject:I(7)},Lv=cs,w=function(e,t){var r=[][e];return!!r&&Lv(function(){r.call(null,t||function(){return 1},1)})},_=m,Fv=b.every,Vv=(_({target:"Array",proto:!0,forced:!w("every")},{every:function(e){return Fv(this,e,1<arguments.length?arguments[1]:void 0)}}),bs),jv=Ms,Bv=Rs,S=vp,e=(m({target:"Array",proto:!0},{fill:function(e){for(var t=Vv(this),r=Bv(t),n=arguments.length,i=jv(1<n?arguments[1]:void 0,r),n=2<n?arguments[2]:void 0,o=void 0===n?r:jv(n,r);i<o;)t[i++]=e;return t}}),S("fill"),m),Kv=b.filter,T=(e({target:"Array",proto:!0,forced:!M("filter")},{filter:function(e){return Kv(this,e,1<arguments.length?arguments[1]:void 0)}}),m),Gv=b.find,r=vp,R,Hv=!0,I=((R="find")in[]&&Array(1)[R](function(){Hv=!1}),T({target:"Array",proto:!0,forced:Hv},{find:function(e){return Gv(this,e,1<arguments.length?arguments[1]:void 0)}}),r(R),m),zv=b.findIndex,_=vp,S,Yv=!0,Jv=((S="findIndex")in[]&&Array(1)[S](function(){Yv=!1}),I({target:"Array",proto:!0,forced:Yv},{findIndex:function(e){return zv(this,e,1<arguments.length?arguments[1]:void 0)}}),_(S),ap),qv=Ys,Wv=bs,$v=Rs,e,T={findLast:(e=function(u){var c=1==u;return function(e,t,r){for(var n,i=Wv(e),o=qv(i),s=Jv(t,r),a=$v(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)},r=m,Xv=T.findLast,R=vp,I=(r({target:"Array",proto:!0},{findLast:function(e){return Xv(this,e,1<arguments.length?arguments[1]:void 0)}}),R("findLast"),m),Zv=T.findLastIndex,_=vp,Qv=(I({target:"Array",proto:!0},{findLastIndex:function(e){return Zv(this,e,1<arguments.length?arguments[1]:void 0)}}),_("findLastIndex"),Ol),eg=Rs,tg=O,rg=ap,ng=function(e,t,r,n,i,o,s,a){for(var u,c,p=i,l=0,f=!!s&&rg(s,a);l<n;)l in r&&(u=f?f(r[l],l,t):r[l],0<o&&Qv(u)?(c=eg(u),p=ng(e,t,u,c,p,o-1)-1):(tg(p+1),e[p]=u),p++),l++;return p},S,ig=S=ng,og=bs,sg=Rs,ag=Ss,ug=P;m({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=og(this),r=sg(t),n=ug(t,0);return n.length=ig(n,t,t,r,0,void 0===e?1:ag(e)),n}});function cg(c){return function(e,t,r,n){kg(t);var i=Dg(e),o=Lg(i),s=Fg(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 Vg("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 pg(e,t,r){for(var n=nm(e),i=rm(t,n),o=rm(void 0===r?n:r,n),s=om(sm(o-i,0)),a=0;i<o;i++,a++)im(s,a,e[i]);return s.length=a,s}function lg(e,t){var r=e.length,n=um(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=lg(am(e,0,n),t),f=lg(am(e,n),t),h=t,d=l.length,y=f.length,v=0,g=0;v<d||g<y;)p[v+g]=v<d&&g<y?h(l[v],f[g])<=0?l[v++]:f[g++]:v<d?l[v++]:f[g++];return p}var fg=S,hg=ms,dg=bs,yg=Rs,vg=P,gg=(m({target:"Array",proto:!0},{flatMap:function(e){var t,r=dg(this),n=yg(r);return hg(e),(t=vg(r,0)).length=fg(t,r,r,n,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),b.forEach),e=w("forEach")?[].forEach:function(e){return gg(this,e,1<arguments.length?arguments[1]:void 0)},r=(m({target:"Array",proto:!0,forced:[].forEach!=e},{forEach:e}),m),mg=Uu.includes,R=vp,T=(r({target:"Array",proto:!0,forced:cs(function(){return!Array(1).includes()})},{includes:function(e){return mg(this,e,1<arguments.length?arguments[1]:void 0)}}),R("includes"),m),I=E,Eg=Uu.indexOf,_=w,wg=I([].indexOf),bg=!!wg&&1/wg([1],1,-0)<0,S=_("indexOf"),e=(T({target:"Array",proto:!0,forced:bg||!S},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return bg?wg(this,e,t)||0:Eg(this,e,t)}}),m),r=Ys,Tg=hs,R=w,_g=E([].join),Uu=r!=Object,I=R("join",","),Ig=(e({target:"Array",proto:!0,forced:Uu||!I},{join:function(e){return _g(Tg(this),void 0===e?",":e)}}),jl),Ag=hs,Ng=Ss,Og=Rs,_=w,Pg=Math.min,Sg=[].lastIndexOf,Mg=!!Sg&&1/[1].lastIndexOf(1,-0)<0,T=_("lastIndexOf"),S=Mg||!T?function(e){if(Mg)return Ig(Sg,this,arguments)||0;var t=Ag(this),r=Og(t),n=r-1;for((n=1<arguments.length?Pg(n,Ng(arguments[1])):n)<0&&(n=r+n);0<=n;n--)if(n in t&&t[n]===e)return n||0;return-1}:Sg,r=(m({target:"Array",proto:!0,forced:S!==[].lastIndexOf},{lastIndexOf:S}),m),Rg=b.map,R=(r({target:"Array",proto:!0,forced:!M("map")},{map:function(e){return Rg(this,e,1<arguments.length?arguments[1]:void 0)}}),m),Cg=bs,xg=Rs,Ug=O,e=cs(function(){return 4294967297!==[].push.call({length:4294967296},1)}),Uu=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}(),kg=(R({target:"Array",proto:!0,arity:1,forced:e||Uu},{push:function(e){var t=Cg(this),r=xg(t),n=arguments.length;Ug(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r}}),ms),Dg=bs,Lg=Ys,Fg=Rs,Vg=TypeError,I={left:cg(!1),right:cg(!0)},jl=m,jg=I.left,_=ua,T=Il,S=(jl({target:"Array",proto:!0,forced:!w("reduce")||!T&&79<_&&_<83},{reduce:function(e){var t=arguments.length;return jg(this,e,t,1<t?arguments[1]:void 0)}}),m),Bg=I.right,r=ua,R=Il,e=(S({target:"Array",proto:!0,forced:!w("reduceRight")||!R&&79<r&&r<83},{reduceRight:function(e){return Bg(this,e,arguments.length,1<arguments.length?arguments[1]:void 0)}}),m),Kg=Ol,Gg=E([].reverse),Uu=[1,2],jl=(e({target:"Array",proto:!0,forced:String(Uu)===String(Uu.reverse())},{reverse:function(){return Kg(this)&&(this.length=this.length),Gg(this)}}),m),Hg=Ol,zg=N,Yg=ys,Jg=Ms,qg=Rs,Wg=hs,$g=A,T=_s,Xg=xa,_=M("slice"),Zg=T("species"),Qg=Array,em=Math.max,I=(jl({target:"Array",proto:!0,forced:!_},{slice:function(e,t){var r,n,i,o=Wg(this),s=qg(o),a=Jg(e,s),u=Jg(void 0===t?s:t,s);if(Hg(o)&&(r=o.constructor,(r=zg(r)&&(r===Qg||Hg(r.prototype))||Yg(r)&&null===(r=r[Zg])?void 0:r)===Qg||void 0===r))return Xg(o,a,u);for(n=new(void 0===r?Qg:r)(em(u-a,0)),i=0;a<u;a++,i++)a in o&&$g(n,i,o[a]);return n.length=i,n}}),m),tm=b.some,rm=(I({target:"Array",proto:!0,forced:!w("some")},{some:function(e){return tm(this,e,1<arguments.length?arguments[1]:void 0)}}),Ms),nm=Rs,im=A,om=Array,sm=Math.max,am=pg,um=Math.floor,Il=lg,S=sa.match(/firefox\/(\d+)/i),R=!!S&&+S[1],r=/MSIE|Trident/.test(sa),e=sa.match(/AppleWebKit\/(\d+)\./),Uu=!!e&&+e[1],xa=m,T=E,cm=ms,pm=bs,lm=Rs,fm=C,hm=dp,jl=cs,dm=Il,_=w,ym=R,vm=r,gm=ua,mm=Uu,Em=[],wm=T(Em.sort),bm=T(Em.push),I=jl(function(){Em.sort(void 0)}),S=jl(function(){Em.sort(null)}),sa=_("sort"),Tm=!jl(function(){if(gm)return gm<70;if(!(ym&&3<ym)){if(vm)return!0;if(mm)return mm<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++)Em.push({k:e+r,v:t})}for(Em.sort(function(e,t){return t.v-e.v}),r=0;r<Em.length;r++)e=Em[r].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});xa({target:"Array",proto:!0,forced:I||!S||!sa||!Tm},{sort:function(e){void 0!==e&&cm(e);var t=pm(this);if(Tm)return void 0===e?wm(t):wm(t,e);for(var r,n,i=[],o=lm(t),s=0;s<o;s++)s in t&&bm(i,t[s]);for(dm(i,(n=e,function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:hm(e)>hm(t)?1:-1})),r=i.length,s=0;s<r;)t[s]=i[s++];for(;s<o;)fm(t,s++);return t}});Tf("Array");var e=m,_m=bs,Im=Ms,Am=Ss,Nm=Rs,Om=O,Pm=P,Sm=A,Mm=C,Il=M("splice"),Rm=Math.max,Cm=Math.min;e({target:"Array",proto:!0,forced:!Il},{splice:function(e,t){var r,n,i,o,s,a,u=_m(this),c=Nm(u),p=Im(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-p):(r=e-2,Cm(Rm(Am(t),0),c-p)),Om(c+r-n),i=Pm(u,n),o=0;o<n;o++)(s=p+o)in u&&Sm(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}}),vp("flat");vp("flatMap");var R=m,xm=bs,Um=Rs,km=C,Dm=O,r=1!==[].unshift(0),ua=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();R({target:"Array",proto:!0,arity:1,forced:r||ua},{unshift:function(e){var t=xm(this),r=Um(t),n=arguments.length;if(n){Dm(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:km(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}});Va.Array;var Uu={exports:{}},T={},Lm=ls,Fm=hs,Vm=ca.f,jm=pg,Bm="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];T.f=function(e){if(!Bm||"Window"!=Lm(e))return Vm(Fm(e));try{return Vm(e)}catch(e){return jm(Bm)}};function Km(e){eE(e,sE,{value:{objectID:"O"+aE++,weakData:{}}})}function Gm(e,t,r){for(var n in t)NE(e,n,t[n],r);return e}function Hm(e,t){for(var r=0,n=VE(t),i=new e(n);r<n;)i[r]=t[r++];return i}function zm(e,t,r,n){for(var i,o,s,a=KE(e),u=BE(a),c=jE(t,r),p=zE(null),l=HE(u),f=0;f<l;f++)s=u[f],(o=GE(c(s,f,a)))in p?qE(p[o],s):p[o]=[s];if(n&&(i=n(a))!==JE)for(o in p)p[o]=YE(i,p[o]);return p}var _=cs(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),jl=cs,Ym=ys,Jm=ls,qm=_,Wm=Object.isExtensible,xa=jl(function(){Wm(1)})||qm?function(e){return!!Ym(e)&&((!qm||"ArrayBuffer"!=Jm(e))&&(!Wm||Wm(e)))}:Wm,I=!cs(function(){return Object.isExtensible(Object.preventExtensions({}))}),$m=m,Xm=E,S=Ou,Zm=ys,Qm=Oa,eE=La.f,tE=ca,rE=T,nE=xa,iE=I,oE=!1,sE=Ts("meta"),aE=0,uE=Uu.exports={enable:function(){uE.enable=function(){},oE=!0;var i=tE.f,o=Xm([].splice),e={};e[sE]=1,i(e).length&&(tE.f=function(e){for(var t=i(e),r=0,n=t.length;r<n;r++)if(t[r]===sE){o(t,r,1);break}return t},$m({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:rE.f}))},fastKey:function(e,t){if(!Zm(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Qm(e,sE)){if(!nE(e))return"F";if(!t)return"E";Km(e)}return e[sE].objectID},getWeakData:function(e,t){if(!Qm(e,sE)){if(!nE(e))return!0;if(!t)return!1;Km(e)}return e[sE].weakData},onFreeze:function(e){return iE&&oE&&nE(e)&&!Qm(e,sE)&&Km(e),e}},cE=(S[sE]=!0,ds),pE=ys,lE=Xc,fE=m,hE=i,dE=E,yE=xu,vE=Ps,gE=Uu.exports,mE=hp,EE=_f,wE=ds,bE=ys,TE=cs,_E=Cd,IE=Bl,AE=function(e,t,r){return lE&&cE(t=t.constructor)&&t!==r&&pE(t=t.prototype)&&t!==r.prototype&&lE(e,t),e},NE=Ps,OE=La.f,PE=Zc,SE=Gm,ME=ap,RE=_f,CE=hp,xE=Hl,UE=Tf,kE=Q,DE=Uu.exports.fastKey,LE=t.set,FE=t.getterFor,VE=(function(e,t,r){function n(e){var r=dE(h[e]);vE(h,e,"add"==e?function(e){return r(this,0===e?0:e),this}:"delete"==e?function(e){return!(p&&!bE(e))&&r(this,0===e?0:e)}:"get"==e?function(e){return p&&!bE(e)?void 0:r(this,0===e?0:e)}:"has"==e?function(e){return!(p&&!bE(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=hE[e],h=f&&f.prototype,d=f,y={};return yE(e,!wE(f)||!(p||h.forEach&&!TE(function(){(new f).entries().next()})))?(d=r.getConstructor(t,e,c,l),gE.enable()):yE(e,!0)&&(o=(i=new d)[l](p?{}:-0,1)!=i,s=TE(function(){i.has(1)}),a=_E(function(e){new f(e)}),u=!p&&TE(function(){for(var e=new f,t=5;t--;)e[l](t,t);return!e.has(-0)}),a||(((d=t(function(e,t){EE(e,h);e=AE(new f,e,d);return null!=t&&mE(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),y[e]=d,fE({global:!0,constructor:!0,forced:d!=f},y),IE(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=DE(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=o),t&&(t.next=o),kE?i.size++:e.size++,"F"!==n&&(i.index[n]=o)),e}function s(e,t){var r,e=u(e),n=DE(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key==t)return r}var e=e(function(e,t){RE(e,a),LE(e,{type:r,index:PE(null),first:void 0,last:void 0,size:0}),kE||(e.size=0),null!=t&&CE(t,e[i],{that:e,AS_ENTRIES:n})}),a=e.prototype,u=FE(r);return SE(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,kE?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),kE?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)}}),SE(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)}}),kE&&OE(a,"size",{get:function(){return u(this).size}}),e},setStrong:function(e,t,r){var n=t+" Iterator",i=FE(t),o=FE(n);xE(e,t,function(e,t){LE(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),UE(t)}}),Rs),jE=ap,BE=Ys,KE=bs,GE=Is,HE=Rs,zE=Zc,YE=Hm,JE=Array,qE=E([].push),WE=zm,sa=vp;m({target:"Array",proto:!0},{group:function(e){return WE(this,e,1<arguments.length?arguments[1]:void 0)}}),sa("group");var $E=zm,A=vp;m({target:"Array",proto:!0,forced:!w("groupBy")},{groupBy:function(e){return $E(this,e,1<arguments.length?arguments[1]:void 0)}}),A("groupBy");function XE(e){for(var t,r,n=ew(this),i=QE(n),o=ZE(e,1<arguments.length?arguments[1]:void 0),s=new rw,a=tw(i),u=0;u<a;u++)t=o(r=i[u],u,n),iw(s,t)?sw(nw(s,t),r):ow(s,t,[r]);return s}var ZE=ap,M=E,QE=Ys,ew=bs,tw=Rs,rw=vs("Map"),e=rw.prototype,nw=M(e.get),iw=M(e.has),ow=M(e.set),sw=M([].push),Il=vp,C=XE;m({target:"Array",proto:!0,name:"groupToMap",forced:!w("groupByToMap")},{groupByToMap:C}),Il("groupByToMap");function aw(e){return fw[e].prototype}var R=vp,uw=(m({target:"Array",proto:!0},{groupToMap:XE}),R("groupToMap"),Rs),cw=function(e,t){for(var r=uw(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},pw=hs,r=vp,lw=Array,fw=(m({target:"Array",proto:!0},{toReversed:function(){return cw(pw(this),lw)}}),r("toReversed"),i),ua=m,hw=ms,dw=hs,yw=Hm,Va=vp,vw=Array,gw=E(aw("Array").sort),_=(ua({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&hw(e);var t=dw(this),t=yw(vw,t);return gw(t,e)}}),Va("toSorted"),m),jl=vp,mw=O,Ew=Rs,ww=Ms,bw=hs,Tw=Ss,_w=Array,Iw=Math.max,Aw=Math.min,Nw=(_({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=bw(this),a=Ew(s),u=ww(e,a),e=arguments.length,c=0;for(0===e?r=n=0:n=1===e?(r=0,a-u):(r=e-2,Aw(Iw(Tw(t),0),a-u)),i=mw(a+r-n),o=_w(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}}),jl("toSpliced"),Rs),Ow=Ss,Pw=RangeError,Sw=function(e,t,r,n){var i=Nw(e),r=Ow(r),o=r<0?i+r:r;if(i<=o||o<0)throw Pw("Incorrect index");for(var s=new t(i),a=0;a<i;a++)s[a]=a===o?n:e[a];return s},Mw=hs,Rw=Array;m({target:"Array",proto:!0},{with:function(e,t){return Sw(Mw(this),Rw,e,t)}});Ou=i,Oa=Na,ca=ds,T=Lu,xa=Ps,I="USE_FUNCTION_CONSTRUCTOR",S=_s("asyncIterator"),Xc=Ou.AsyncIterator,xu=Oa.AsyncIteratorPrototype;if(xu)UT=xu;else if(ca(Xc))UT=Xc.prototype;else if(Oa[I]||Ou[I])try{AT=T(T(T(Function("return async function*(){}()")()))),T(AT)===Object.prototype&&(UT=AT)}catch(e){}ca((UT=UT||{})[S])||xa(UT,S,function(){return this});function Cw(e,t,r){var n=e.done;jw.resolve(e.value).then(function(e){t({done:n,value:e})},r)}function xw(e){Kw(this,{type:Bw,iterator:Fw(e),next:e.next})}function Uw(e){var f=0==e,h=1==e,d=2==e,y=3==e;return function(e,s,a){var e=sb(e),u=ob("Promise"),c=e.iterator,t=e.next,p=0,l=void 0!==s;return!l&&f||rb(s),new u(function(r,n){var i=function(e){ab(c,n,e,n)},o=function(){try{if(f&&l)try{ib(p)}catch(e){i(e)}u.resolve(nb(tb(t,c))).then(function(e){try{if(nb(e).done)f?(a.length=p,r(a)):r(!y&&(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():ab(c,r,!1,n);else if(f)try{a[p++]=e,o()}catch(e){i(e)}else e?ab(c,r,y||t,n):o()},i):(a[p++]=t,o())}catch(e){i(e)}}}catch(e){n(e)}},n)}catch(e){n(e)}};o()})}}function kw(e,t){if(!_b||!Tb(e)||!_b(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 Dw(e,t,r){return r.get&&Ib(r.get,t,{getter:!0}),r.set&&Ib(r.set,t,{setter:!0}),Ab.f(e,t,r)}var Lw=G,Fw=Ns,Uu=Zc,Vw=Es,sa=Gm,A=t,Ys=UT,jw=vs("Promise"),Bw="AsyncFromSyncIterator",Kw=A.set,Gw=A.getterFor(Bw),e=(xw.prototype=sa(Uu(Ys),{next:function(){var n=Gw(this);return new jw(function(e,t){var r=Fw(Lw(n.next,n.iterator));Cw(r,e,t)})},return:function(){var n=Gw(this).iterator;return new jw(function(e,t){var r=Vw(n,"return");if(void 0===r)return e({done:!0,value:void 0});r=Fw(Lw(r,n));Cw(r,e,t)})}}),xw),Hw=G,zw=e,Yw=Ns,Jw=pp,qw=Es,Ww=_s("asyncIterator"),$w=ms,Xw=Ns,Zw=G,Qw=vs,eb=Es,tb=G,rb=ms,nb=Ns,ib=O,ob=vs,sb=function(e){return{iterator:e,next:$w(Xw(e).next)}},ab=function(e,t,r,n){try{var i=eb(e,"return");if(i)return Qw("Promise").resolve(Zw(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},M={toArray:Uw(0),forEach:Uw(1),every:Uw(2),some:Uw(3),find:Uw(4)},ub=ap,cb=bs,pb=N,lb=function(e,t){t=arguments.length<2?qw(e,Ww):t;return t?Yw(Hw(t,e)):new zw(Jw(e))},fb=pp,hb=cp,db=Es,w=aw,yb=vs,C=_s,vb=e,gb=M.toArray,mb=C("asyncIterator"),Eb=w("Array").values,Il=(m({target:"Array",stat:!0,forced:!0},{fromAsync:function(o){var s=this,e=arguments.length,a=1<e?arguments[1]:void 0,u=2<e?arguments[2]:void 0;return new(yb("Promise"))(function(e){var t=cb(o),r=(void 0!==a&&(a=ub(a,u)),db(t,mb)),n=r?void 0:hb(t)||Eb,i=pb(s)?new s:[],r=r?lb(t,r):new vb(fb(t,n));e(gb(r,a,i))})}}),m),wb=b.filterReject,R=vp,r=(Il({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return wb(this,e,1<arguments.length?arguments[1]:void 0)}}),R("filterOut"),m),bb=b.filterReject,ua=vp,Va=(r({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return bb(this,e,1<arguments.length?arguments[1]:void 0)}}),ua("filterReject"),m),Tb=Ol,_b=Object.isFrozen,Ib=(Va({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!kw(e,!0))return!1;var t=e.raw;return t.length===e.length&&kw(t,!1)}}),aa.exports),Ab=La,_=vp,Nb=bs,Ob=Rs;Q&&(Dw(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=Nb(this),t=Ob(e);return 0==t?void 0:e[t-1]},set:function(e){var t=Nb(this),r=Ob(t);return t[0==r?0:r-1]=e}}),_("lastItem"));var jl=vp,Pb=bs,Sb=Rs;Q&&(Dw(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=Pb(this),e=Sb(e);return 0==e?0:e-1}}),jl("lastIndex"));var i=E,Mb=ms,Rb=Rs,Cb=bs,xb=P,Ub=vs("Map"),Na=Ub.prototype,kb=i(Na.forEach),Db=i(Na.has),Lb=i(Na.set),Fb=i([].push),Lu=vp;m({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){for(var t,r,n=Cb(this),i=Rb(n),o=xb(n,0),s=new Ub,a=null!=e?Mb(e):function(e){return e},u=0;u<i;u++)r=a(t=n[u]),Db(s,r)||Lb(s,r,t);return kb(s,function(e){Fb(o,e)}),o}}),Lu("uniqueBy");jb.exposure=function(e,t,r,n){return new Kb(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},jb.track=function(e,t,r,n){return new zb(n,r,e,t)},jb.remoteConfig=function(e,t,r,n){return new qb(n,e,t.parameter,t.valueId,t.reason,r)},jb.isExposureEvent=function(e){return void 0!==e.experiment},jb.isTrackEvent=function(e){return void 0!==e.eventType},jb.isRemoteConfigEvent=function(e){return void 0!==e.parameter},jb.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},jb.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},jb.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},jb.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[Vt.ID],identifiers:this.user.identifiers,userProperties:xe.sanitize(this.user.properties),hackleProperties:xe.sanitize(this.user.hackleProperties)}};var Vb=jb;function jb(e,t,r){void 0===r&&(r=K()),this.timestamp=e,this.user=t,this.insertId=r}o(Gb,Bb=Vb),Gb.prototype.copyWithUser=function(e){return new Gb(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},Gb.prototype.toDto=function(){return c(c({},Bb.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 Bb,Kb=Gb;function Gb(e,t,r,n,i,o,s,a){e=Bb.call(this,e,t,a)||this;return e.experiment=r,e.variationId=n,e.variationKey=i,e.decisionReason=o,e.properties=s,e}o(Yb,Hb=Vb),Yb.prototype.copyWithUser=function(e){return new Yb(this.timestamp,e,this.eventType,this.event,this.insertId)},Yb.prototype.toDto=function(){return c(c({},Hb.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:xe.sanitize(this.event.properties)})};var Hb,zb=Yb;function Yb(e,t,r,n,i){e=Hb.call(this,e,t,i)||this;return e.eventType=r,e.event=n,e}o(Wb,Jb=Vb),Wb.prototype.copyWithUser=function(e){return new Wb(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},Wb.prototype.toDto=function(){return c(c({},Jb.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:xe.sanitize(this.properties)})};var Jb,qb=Wb;function Wb(e,t,r,n,i,o,s){e=Jb.call(this,e,t,s)||this;return e.parameter=r,e.valueId=n,e.decisionReason=i,e.properties=o,e}Xb.isSessionEvent=function(e){return!!Vb.isTrackEvent(e)&&(e.event.key===Xb.SESSION_START_EVENT_NAME||e.event.key===Xb.SESSION_END_EVENT_NAME)},Xb.prototype.onSessionStarted=function(e,t,r){this.track(Xb.SESSION_START_EVENT_NAME,e,t,r)},Xb.prototype.onSessionEnded=function(e,t,r){this.track(Xb.SESSION_END_EVENT_NAME,e,t,r)},Xb.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)},Xb.prototype.decorateSession=function(e,t){t=(new Kt).add(Vt.SESSION,t).addIdentifiers(e.identifiers).build();return c(c({},e),{identifiers:t})},Xb.SESSION_START_EVENT_NAME="$session_start",Xb.SESSION_END_EVENT_NAME="$session_end";var $b=Xb;function Xb(e,t){this.userManager=e,this.core=t}Qb.prototype.addDecorator=function(e){this.decorators.push(e)},Qb.prototype.process=function(e){$b.isSessionEvent(e)||this.sessionManager.startNewSessionIfNeeded(this.userManager.currentUser,e.timestamp),this.eventDedupDeterminer.isDedupTarget(e)||(e=this.decorators.reduce(function(e,t){return t.decorate(e)},e),this.delegate.process(e))},Qb.prototype.flush=function(e){this.delegate.flush(e)},Qb.prototype.close=function(){this.delegate.close()},Qb.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 Zb=Qb;function Qb(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n,this.decorators=[]}t0.toEvent=function(e){var t;return{key:t0.EVENT_KEY,properties:{level:t0.LEVEL_ERROR,type:e.name,message:null!=(t=e.message)?t:"",$stacktrace:t0._stacktrace(e)}}},t0._stacktrace=function(e){return p.isNullOrUndefined(e.stack)?"":e.stack.split("\n").slice(0,t0.STACK_TRACK_LIMIT).join("\n")},t0.EVENT_KEY="$trace",t0.LEVEL_ERROR="error",t0.STACK_TRACK_LIMIT=30;var e0=t0;function t0(){}r0.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)}};xu=r0;function r0(){}i0.prototype.with=function(e){return new i0(e,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},i0.of=function(e,t,r,n){return new i0(n,t.targetEvaluations,e.experiment,r.id,r.key,r.config)},i0.ofDefault=function(e,t,r){var n=e.experiment._getVariationByKeyOrNull(e.defaultVariationKey);return p.isNotNullOrUndefined(n)?this.of(e,t,n,r):new i0(r,t.targetEvaluations,e.experiment,void 0,e.defaultVariationKey,void 0)};var n0=i0;function i0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}o(a0,o0=xu),a0.prototype.supports=function(e){return void 0!==e.experiment},a0.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.experimentFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:n0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var o0,s0=a0;function a0(e){var t=o0.call(this)||this;return t.experimentFlowFactory=e,t}c0.of=function(e,t,r,n,i,o){return o.returnValue=xe.truncateStringValue(n),new c0(i,t.targetEvaluations,e.parameter,r,n,o)},c0.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)};var u0=c0;function c0(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}o(f0,p0=xu),f0.prototype.supports=function(e){return void 0!==e.parameter},f0.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=xe.truncateStringValue(e.defaultValue),p.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return u0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return p.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)},f0.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?u0.ofDefault(e,t,h.TYPE_MISMATCH,i):u0.of(e,t,r.id,r.rawValue,n,i)};var p0,l0=f0;function f0(e){var t=p0.call(this)||this;return t.targetRuleDeterminer=e,t}d0.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id};var h0=d0;function d0(e,t){this.type=e,this.id=t}v0.create=function(){return new v0},Object.defineProperty(v0.prototype,"stack",{get:function(){return Array.from(this._stack)},enumerable:!1,configurable:!0}),Object.defineProperty(v0.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(v0.prototype,"properties",{get:function(){return xe.sanitize(this._properties)},enumerable:!1,configurable:!0}),v0.prototype.contains=function(t){return this._stack.some(function(e){return e.key.isEquals(t.key)})},v0.prototype.addRequest=function(e){this._stack.push(e)},v0.prototype.removeRequest=function(e){e=this._stack.indexOf(e,0);-1<e&&this._stack.splice(e,1)},v0.prototype.getEvaluation=function(t){return this._targetEvaluations.find(function(e){return e instanceof n0&&e.experiment.id===t.id})},v0.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},v0.prototype.setProperty=function(e,t){this._properties[e]=t},v0.prototype.get=function(e){var t=this.map.get(e);if(!t)return null;if(t instanceof e)return t;throw new Error("Context does not contain a value of type ".concat(e.name))},v0.prototype.set=function(e,t){this.map.set(e,t)};var y0=v0;function v0(){this._stack=[],this._targetEvaluations=[],this._properties={},this.map=new WeakMap}m0.of=function(e,t,r,n){return new m0(e,t,r,n)},m0.by=function(e,t){return new m0(e.workspace,e.user,t,"A")},m0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")};var g0=m0;function m0(e,t,r,n){this.key=new h0("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}w0.of=function(e,t,r,n,i){return new w0(e,t,r,n,i)},w0.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")};var E0=w0;function w0(e,t,r,n,i){this.key=new h0("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}b0.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();case"boolean":return e?"true":"false";default:return}},b0.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},b0.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}},b0.asActualNumber=function(e){if(!isNaN(e)&&isFinite(e))return e};var x=b0;function b0(){}_0.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 T0=_0;function _0(e){this.storages=e}A0.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},A0.prototype.get=function(e){e=this.listStorage.getItem(e.id.toString());return x.asNumber(e)},A0.prototype.getAll=function(){var r=new Map;return this.listStorage.entries().forEach(function(e){var t=e[0],e=e[1],t=x.asNumber(t),e=x.asNumber(e);p.isNullOrUndefined(t)||t<0||p.isNullOrUndefined(e)||t<0||r.set(t,e)}),r},A0.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},A0.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},A0.prototype.clear=function(){this.listStorage.clear()};var I0=A0;function A0(e){this.listStorage=e}O0.prototype.add=function(e){this.evaluators.push(e)},O0.prototype.evaluate=function(t,e){var r=this.evaluators.find(function(e){return e.supports(t)});if(p.isNullOrUndefined(r))throw new Error("Unsupported EvaluatorRequest [".concat(t.toString(),"]"));return r.evaluate(t,e)};var N0=O0;function O0(){this.evaluators=new Array}S0.get=function(e){return p.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},S0.getOrNull=function(e){return S0.instances.get(e)},S0.register=function(e,t){return S0.instances.set(e,t),t},S0.instances=new Map;var P0=S0;function S0(){}R0.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.parameter.targetRules.find(function(e){return n.matches(t,r,e)})},R0.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;t=e.user.identifiers[e.parameter.identifierType];if(p.isNullOrUndefined(t))return!1;e=e.workspace.getBucketOrNull(r.bucketId);if(p.isNullOrUndefined(e))throw new Error("bucket[".concat(r.bucketId,"]"));return p.isNotNullOrUndefined(this.bucketer.bucketing(e,t))};var M0=R0;function R0(e,t){this.targetMatcher=e,this.bucketer=t}x0.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},x0.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},x0.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 C0=x0;function x0(e){this.bucketer=e}k0.prototype.evaluate=function(e,t){if(this.flowEvaluator&&this.nextFlow)return this.flowEvaluator.evaluate(e,t,this.nextFlow)},k0.end=function(){return new k0(void 0,void 0)},k0.decision=function(e,t){return new k0(e,t)},k0.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 U0=k0;function k0(e,t){this.flowEvaluator=e,this.nextFlow=t}L0.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 n0.of(e,t,n,h.OVERRIDDEN);case"FEATURE_FLAG":return n0.of(e,t,n,h.INDIVIDUAL_TARGET_MATCH)}};var D0=L0;function L0(e){this.overrideResolver=e}V0.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?n0.ofDefault(e,t,h.EXPERIMENT_DRAFT):r.evaluate(e,t)};var F0=V0;function V0(){}B0.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return n0.ofDefault(e,t,h.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return n0.ofDefault(e,t,h.FEATURE_FLAG_INACTIVE)}};var j0=B0;function B0(){}G0.prototype.evaluate=function(e,t,r){if("COMPLETED"!==e.experiment.status)return r.evaluate(e,t);r=e.experiment._winnerVariationOrNull();if(r)return n0.of(e,t,r,h.EXPERIMENT_COMPLETED);throw new Error("winner variation [".concat(e.experiment.id,"]"))};var K0=G0;function G0(){}z0.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):n0.ofDefault(e,t,h.NOT_IN_EXPERIMENT_TARGET)};var H0=z0;function z0(e){this.experimentTargetDeterminer=e}J0.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?n0.ofDefault(e,t,h.VARIATION_DROPPED):n0.of(e,t,n,h.TRAFFIC_ALLOCATED):n0.ofDefault(e,t,h.TRAFFIC_NOT_ALLOCATED)};var Y0=J0;function J0(e){this.actionResolver=e}W0.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 n0.of(e,t,r,h.TARGET_RULE_MATCH);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var q0=W0;function W0(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}X0.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 n0.ofDefault(e,t,h.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(n)return n0.of(e,t,n,h.DEFAULT_RULE);throw new Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"))};var $0=X0;function X0(e){this.actionResolver=e}Q0.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):n0.ofDefault(e,t,h.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT);throw new Error("container[".concat(n,"]"))};var Z0=Q0;function Q0(e){this.containerResolver=e}tT.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):n0.ofDefault(e,t,h.IDENTIFIER_NOT_FOUND)};var eT=tT;function tT(){}nT.prototype.isUserInExperimentTarget=function(t,r){var n=this;return 0===t.experiment.targetAudiences.length||t.experiment.targetAudiences.some(function(e){return n.targetMatcher.matches(t,r,e)})};var rT=nT;function nT(e){this.targetMatcher=e}oT.prototype.determineTargetRuleOrNull=function(t,r){var n=this;return t.experiment.targetRules.find(function(e){return n.targetMatcher.matches(t,r,e.target)})};var iT=oT;function oT(e){this.targetMatcher=e}aT.prototype.resolveOrNull=function(e,t){var r;return null!=(r=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?r:this._resolveSegmentOverride(e,t)},aT.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},aT.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)}},aT.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 sT=aT;function aT(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}cT.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(p.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(p.isNullOrUndefined(i))throw new Error("Bucket[".concat(r.bucketId,"]"));i=this.bucketer.bucketing(i,n);if(p.isNullOrUndefined(i))return!1;n=r.getGroupOrNull(i.variationId);if(p.isNullOrUndefined(n))throw new Error("ContainerGroup[".concat(i.variationId,"]"));return n.experiments.includes(e.experiment.id)};var uT=cT;function cT(e){this.bucketer=e}lT.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}};var pT=lT;function lT(e,t,r){var n=new C0(t),e=new sT(e,r,n),t=new uT(t);this.abTestFlow=U0.of(new D0(e),new eT,new Z0(t),new H0(new rT(r)),new F0,new j0,new K0,new Y0(n)),this.featureFlagFlow=U0.of(new F0,new j0,new K0,new D0(e),new eT,new q0(new iT(r),n),new $0(n))}hT.prototype.matches=function(t,r,e){var n=this;return e.conditions.every(function(e){return n._matches(t,r,e)})},hT.prototype.anyMatches=function(t,r,e){var n=this;return!e.length||e.some(function(e){return n.matches(t,r,e)})},hT.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)};var fT=hT;function hT(e){this.conditionMatcherFactory=e}yT.prototype.decorate=function(e){return e};var dT=yT;function yT(){}gT.prototype.decorate=function(e){return"string"==typeof e?Wo.decodeURIOrOriginal(e):e};var vT=gT;function gT(){}ET.prototype.matches=function(e,t,r){void 0===r&&(r=new dT);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)},ET.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)},ET.prototype.singleMatches=function(e,t,r,n,i){e=i.decorate(e),t=t.values.map(i.decorate);return n.matches(r,e,t)},ET.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},ET.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}};var mT=ET;function ET(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}wT.prototype.matches=function(t,r,e){return!p.isNullOrUndefined(r)&&e.some(function(e){return t.inMatches(r,e)})};Xc=wT;function wT(){}bT.prototype.matches=function(t,r,e){return!p.isNullOrUndefined(r)&&e.some(function(e){return t.containsMatches(r,e)})};Oa=bT;function bT(){}TT.prototype.matches=function(t,r,e){return!p.isNullOrUndefined(r)&&e.some(function(e){return t.startsWithMatches(r,e)})};Ou=TT;function TT(){}_T.prototype.matches=function(t,r,e){return!p.isNullOrUndefined(r)&&e.some(function(e){return t.endsWithMatches(r,e)})};I=_T;function _T(){}IT.prototype.matches=function(t,r,e){return!p.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanMatches(r,e)})};T=IT;function IT(){}NT.prototype.matches=function(t,r,e){return!p.isNullOrUndefined(r)&&e.some(function(e){return t.greaterThanOrEqualMatches(r,e)})};var AT=NT;function NT(){}OT.prototype.matches=function(t,r,e){return!p.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanMatches(r,e)})};ca=OT;function OT(){}PT.prototype.matches=function(t,r,e){return!p.isNullOrUndefined(r)&&e.some(function(e){return t.lessThanOrEqualMatches(r,e)})};xa=PT;function PT(){}ST.prototype.matches=function(e,t,r){return!p.isNullOrUndefined(t)};S=ST;function ST(){}RT.prototype.getMatcher=function(e){switch(e){case"IN":return RT.IN_MATCHER;case"CONTAINS":return RT.CONTAINS_MATCHER;case"STARTS_WITH":return RT.STARTS_WITH_MATCHER;case"ENDS_WITH":return RT.ENDS_WITH_MATCHER;case"GT":return RT.GT_MATCHER;case"GTE":return RT.GTE_MATCHER;case"LT":return RT.LT_MATCHER;case"LTE":return RT.LTE_MATCHER;case"EXISTS":return RT.EXISTS_MATCHER}},RT.IN_MATCHER=new Xc,RT.CONTAINS_MATCHER=new Oa,RT.STARTS_WITH_MATCHER=new Ou,RT.ENDS_WITH_MATCHER=new I,RT.GT_MATCHER=new T,RT.GTE_MATCHER=new AT,RT.LT_MATCHER=new ca,RT.LTE_MATCHER=new xa,RT.EXISTS_MATCHER=new S;var MT=RT;function RT(){}CT.prototype.inMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e===t},CT.prototype.containsMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e.includes(t)},CT.prototype.startsWithMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e.startsWith(t)},CT.prototype.endsWithMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e.endsWith(t)},CT.prototype.greaterThanMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&t<e},CT.prototype.greaterThanOrEqualMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&t<=e},CT.prototype.lessThanMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e<t},CT.prototype.lessThanOrEqualMatches=function(e,t){e=x.asString(e),t=x.asString(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e<=t};Zc=CT;function CT(){}xT.prototype.inMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e===t},xT.prototype.containsMatches=function(e,t){return!1},xT.prototype.startsWithMatches=function(e,t){return!1},xT.prototype.endsWithMatches=function(e,t){return!1},xT.prototype.greaterThanMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&t<e},xT.prototype.greaterThanOrEqualMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&t<=e},xT.prototype.lessThanMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e<t},xT.prototype.lessThanOrEqualMatches=function(e,t){e=x.asNumber(e),t=x.asNumber(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e<=t};t=xT;function xT(){}kT.prototype.inMatches=function(e,t){e=x.asBoolean(e),t=x.asBoolean(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e===t},kT.prototype.containsMatches=function(e,t){return!1},kT.prototype.startsWithMatches=function(e,t){return!1},kT.prototype.endsWithMatches=function(e,t){return!1},kT.prototype.greaterThanMatches=function(e,t){return!1},kT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},kT.prototype.lessThanMatches=function(e,t){return!1},kT.prototype.lessThanOrEqualMatches=function(e,t){return!1};var UT=kT;function kT(){}DT.prototype.inMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e.isEqualTo(t)},DT.prototype.containsMatches=function(e,t){return!1},DT.prototype.startsWithMatches=function(e,t){return!1},DT.prototype.endsWithMatches=function(e,t){return!1},DT.prototype.greaterThanMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e.isGreaterThan(t)},DT.prototype.greaterThanOrEqualMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e.isGreaterThanOrEqualTo(t)},DT.prototype.lessThanMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e.isLessThan(t)},DT.prototype.lessThanOrEqualMatches=function(e,t){e=yr.tryParse(e),t=yr.tryParse(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&e.isLessThanOrEqualTo(t)};A=DT;function DT(){}LT.prototype.inMatches=function(e,t){e=Wo.tryParse(e),t=x.asString(t);return!p.isNullOrUndefined(e)&&!p.isNullOrUndefined(t)&&Wo.decodeURIOrOriginal(Wo.removePathnameTrailingSlash(e))===Wo.decodeURIOrOriginal(Wo.removePathnameTrailingSlash(t))},LT.prototype.containsMatches=function(e,t){e=Wo.tryParse(e),t=x.asString(t);if(p.isNullOrUndefined(e)||p.isNullOrUndefined(t))return!1;e=Wo.decodeURIOrOriginal(e.href);return e.includes(t)||e.includes(encodeURI(t))},LT.prototype.startsWithMatches=function(e,t){e=Wo.tryParse(e),t=x.asString(t);if(p.isNullOrUndefined(e)||p.isNullOrUndefined(t))return!1;e=Wo.decodeURIOrOriginal(e.href);return e.startsWith(t)||e.startsWith(encodeURI(t))},LT.prototype.endsWithMatches=function(e,t){return!1},LT.prototype.greaterThanMatches=function(e,t){return!1},LT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},LT.prototype.lessThanMatches=function(e,t){return!1},LT.prototype.lessThanOrEqualMatches=function(e,t){return!1};sa=LT;function LT(){}FT.prototype.inMatches=function(e,t){return!1},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){return!1},FT.prototype.greaterThanOrEqualMatches=function(e,t){return!1},FT.prototype.lessThanMatches=function(e,t){return!1},FT.prototype.lessThanOrEqualMatches=function(e,t){return!1};Uu=FT;function FT(){}jT.prototype.getMatcher=function(e){switch(e){case"STRING":case"JSON":return jT.STRING_MATCHER;case"NUMBER":return jT.NUMBER_MATCHER;case"BOOLEAN":return jT.BOOLEAN_MATCHER;case"VERSION":return jT.VERSION_MATCHER;case"URL":return jT.URL_MATCHER;case"NULL":case"UNKNOWN":return jT.NULL_MATCHER}},jT.STRING_MATCHER=new Zc,jT.NUMBER_MATCHER=new t,jT.BOOLEAN_MATCHER=new UT,jT.VERSION_MATCHER=new A,jT.URL_MATCHER=new sa,jT.NULL_MATCHER=new Uu;var VT=jT;function jT(){}KT.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)},KT.prototype.valueDecorator=function(e){return new("HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?vT:dT)};var BT=KT;function KT(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}HT.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 GT=HT;function HT(){}YT.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}},YT.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 zT=YT;function YT(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 JT=qT;function qT(e){this.userConditionMatcher=e}WT.prototype.evaluateInternal=function(e,t,r){r=g0.by(e,r),r=this.evaluator.evaluate(r,t);if(!(r instanceof n0))throw new Error("Unexpected evaluation [expected=ExperimentEvaluation, actual=".concat(r.constructor.name,"]"));e=this.resolve(e,t,r);return t.addEvaluation(e),e},WT.prototype.evaluate=function(e,t,r){var n;return null!=(n=t.getEvaluation(r))?n:this.evaluateInternal(e,t,r)};Ys=WT;function WT(e){this.evaluator=e}XT.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 $T=XT;function XT(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}o(QT,ZT=Ys),QT.prototype.matches=function(e,t,r){var n=p.requiredNotNullOrUndefined(x.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),n=this.experiment(e,n);if(p.isNullOrUndefined(n))return!1;e=this.evaluate(e,t,n);return this.evaluationMatches(e,r)};var ZT,G=QT;function QT(e,t){e=ZT.call(this,e)||this;return e.valueOperatorMatcher=t,e}o(r_,e_=G),r_.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},r_.prototype.resolve=function(e,t,r){return r.reason===h.TRAFFIC_ALLOCATED?r.with(h.TRAFFIC_ALLOCATED_BY_TARGETING):r},r_.prototype.evaluationMatches=function(e,t){return!!r_.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,t.match)},r_.AB_TEST_MATCHED_REASONS=[h.OVERRIDDEN,h.TRAFFIC_ALLOCATED,h.EXPERIMENT_COMPLETED,h.TRAFFIC_ALLOCATED_BY_TARGETING];var e_,t_=r_;function r_(e,t){return e_.call(this,e,t)||this}o(o_,n_=G),o_.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},o_.prototype.resolve=function(e,t,r){return r},o_.prototype.evaluationMatches=function(e,t){e="A"!==e.variationKey;return this.valueOperatorMatcher.matches(e,t.match)};var n_,i_=o_;function o_(e,t){return n_.call(this,e,t)||this}a_.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)},a_.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event};var s_=a_;function a_(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}c_.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,"]"))}},c_.prototype.properties=function(e){return Vb.isTrackEvent(e)?e.event.properties:Vb.isExposureEvent(e)||Vb.isRemoteConfigEvent(e)?e.properties:void 0};var u_=c_;function c_(){}l_.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 p_=l_;function l_(e){this.valueOperatorMatcher=e}h_.prototype.supports=function(e){return"NUMBER_OF_EVENTS_IN_DAYS"===e||"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"===e},h_.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 v_(this.valueOperatorMatcher,this.clock).matches(e,o,r);case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return new E_(this.valueOperatorMatcher,this.clock).matches(e,o,r);default:return i}};var f_=h_;function h_(e,t){this.valueOperatorMatcher=e,this.clock=t}function d_(){}o(g_,y_=d_),g_.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)},g_.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&null===e.property},g_.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw new Error("Failed to parse UserTargetCondition. ".concat(e))}};var y_,v_=g_;function g_(e,t){var r=y_.call(this)||this;return r.valueOperatorMatcher=e,r.clock=t,r}o(w_,m_=d_),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.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)},w_.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&this.propertyMatch(e.property,t.propertyFilter)},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}T_.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 b_=T_;function T_(e,t){var r=new mT(new VT,new MT);this.userConditionMatcher=new BT(new GT,r),this.eventConditionMatcher=new s_(new u_,r),this.segmentConditionMatcher=new zT(new JT(this.userConditionMatcher)),this.experimentConditionMatcher=new $T(new t_(e,r),new i_(e,r)),this.cohortConditionMatcher=new p_(r),this.userTargetConditionMatcher=new f_(r,t)}var __={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}},I_=(A_.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},A_.prototype.calculateSlotNumber=function(e,t,r){r=__.murmurhash3_x86_32(r,e);return Math.abs(r)%Math.abs(t)},A_);function A_(){}var N_=l.log,O_=(P_.create=function(e,t,r,n){var i=Le.instance,o=P0.register("delegatingEvaluator",new N0),s=new I_,i=P0.register("targetMatcher",new fT(new b_(o,i))),n=new T0(n),i=new M0(i,s),n=new pT(n,s,P0.get("targetMatcher")),s=new s0(n),n=new l0(i);return o.add(s),o.add(n),new P_(s,n,e,t,r,new S_)},P_.prototype.getExperiment=function(e){if(e){var t=this.workspaceFetcher.get();if(t)return t.getExperimentOrNull(e)}else N_.error("experimentKey must not be empty")},P_.prototype.experiment=function(e,t,r){var n=this;if(!e)return N_.error("experimentKey must not be empty"),wt.of(r,h.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return N_.warn("SDK not ready."),wt.of(r,h.SDK_NOT_READY);e=i.getExperimentOrNull(e);if(!e)return N_.warn("Experiment does not exist."),wt.of(r,h.EXPERIMENT_NOT_FOUND);i=g0.of(i,t,e,r),t=this.experimentInternal(i),e=t[0],r=t[1];return this.eventFactory.create(i,e).forEach(function(e){return n.eventProcessor.process(e)}),r},P_.prototype.experiments=function(r){var n=this,i=new Zn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getExperiments().forEach(function(e){var t=g0.of(o,r,e,"A"),t=n.experimentInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},P_.prototype.experimentInternal=function(e){var e=this.experimentEvaluator.evaluate(e,y0.create()),t=null!=(t=e.config)?t:new Ve;return[e,wt.of(e.variationKey,e.reason,t,e.experiment)]},P_.prototype.featureFlag=function(e,t){var r=this;if(!e)return N_.error("featureKey must not be empty"),Tt.off(h.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return N_.warn("SDK not ready."),Tt.off(h.SDK_NOT_READY);e=n.getFeatureFlagOrNull(e);if(!e)return N_.warn("FeatureFlag does not exist."),Tt.off(h.FEATURE_FLAG_NOT_FOUND);n=g0.of(n,t,e,"A"),t=this.featureFlagInternal(n),e=t[0],t=t[1];return this.eventFactory.create(n,e).forEach(function(e){return r.eventProcessor.process(e)}),t},P_.prototype.featureFlags=function(r){var n=this,i=new Zn(function(e,t){return e.id===t.id}),o=this.workspaceFetcher.get();return o&&o.getFeatureFlags().forEach(function(e){var t=g0.of(o,r,e,"A"),t=n.featureFlagInternal(t),t=(t[0],t[1]);i.add(e,t)}),i},P_.prototype.featureFlagInternal=function(e){var e=this.experimentEvaluator.evaluate(e,y0.create()),t=null!=(t=e.config)?t:new Ve;return[e,"A"===e.variationKey?Tt.off(e.reason,t,e.experiment):Tt.on(e.reason,t,e.experiment)]},P_.prototype.inAppMessage=function(e,t,r){t=r.evaluate(e,t);return r.record(e,t),t},P_.prototype.track=function(e,t,r){var n;void 0===r&&(r=(new Date).getTime()),e?"object"!=typeof e?N_.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 Lt(0,e.key),this.eventProcessor.process(Vb.track(n,e,t,r))):N_.warn("Event key must be not null. or event key must be string type."):N_.warn("event must not be null.")},P_.prototype.trackException=function(e,t){this.errorDedupDeterminer.isDedupTarget(e)||(e=e0.toEvent(e),this.flush(),this.track(e,t),this.flush())},P_.prototype.flush=function(e){this.eventProcessor.flush(e=void 0===e?!1:e)},P_.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(p.isNullOrUndefined(o))return N_.warn("SDK not ready."),mt.of(n,h.SDK_NOT_READY);e=o.getRemoteConfigParameterOrNull(e);if(p.isNullOrUndefined(e))return N_.warn("Remote config parameter does not exist."),mt.of(n,h.REMOTE_CONFIG_PARAMETER_NOT_FOUND);o=E0.of(o,t,e,r,n),t=this.remoteConfigEvaluator.evaluate(o,y0.create());return this.eventFactory.create(o,t).forEach(function(e){return i.eventProcessor.process(e)}),mt.of(t.value,t.reason)},P_.prototype.close=function(){this.eventProcessor.close()},P_);function P_(e,t,r,n,i,o){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.workspaceFetcher=r,this.eventFactory=n,this.eventProcessor=i,this.errorDedupDeterminer=o}M_.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},M_.prototype._isSameError=function(e,t){return!p.isNullOrUndefined(t)&&(e.name===t.name&&e.message===t.message&&e.stack===t.stack)};var S_=M_;function M_(){}C_.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},C_.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))};var R_=C_;function C_(){this._installed=[],this._installations={onerror:k_,onunhandledrejection:D_}}var x_,U_=null;function k_(o,s){U_=window.onerror,window.onerror=function(e,t,r,n,i){p.isNotNullOrUndefined(i)&&o.trackException(i,s.resolve()),U_&&U_.apply(this,arguments)}}function D_(r,n){x_=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()),x_&&x_.apply(this,arguments)}}F_.prototype.read=function(){return a(this,void 0,void 0,function(){var t;return u(this,function(e){return(t=this.storage.getItem(this.storageKey))?[2,JSON.parse(t)]:[2,[]]})})},F_.prototype.save=function(r){return a(this,void 0,void 0,function(){var t;return u(this,function(e){return 0===r.length?[2,this.clear()]:(t=JSON.stringify(r.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},F_.prototype.add=function(r){return a(this,void 0,void 0,function(){var t;return u(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]}})})},F_.prototype.delete=function(n){return a(this,void 0,void 0,function(){var t,r=this;return u(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]}})})},F_.prototype.isDeleteTarget=function(t,e){return e.some(function(e){return e.insertId===t.insertId})},F_.prototype.clear=function(){return a(this,void 0,void 0,function(){return u(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})};var L_=F_;function F_(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}function V_(e,t){return null!==e&&(e.userId===t.userId&&e.deviceId===t.deviceId)}B_.builder=function(){return new K_},B_.empty=function(){return B_.builder().build()},B_.from=function(e){return new B_(e)},B_.fromDto=function(e){for(var t=B_.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 Vn(e)})})}return t.build()},Object.defineProperty(B_.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),B_.prototype.get=function(e){return this.cohorts.get(e)},B_.prototype.filterBy=function(e){var r=Bt(e),e=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return B_.from(e)},B_.prototype.asArray=function(){return this.cohorts.values()},B_.prototype.asComparable=function(){return this.cohorts},B_.prototype.toBuilder=function(){return new K_(this)};var j_=B_;function B_(e){this.cohorts=e}G_.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},G_.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},G_.prototype.build=function(){return new j_(this.cohorts)};var K_=G_;function G_(e){this.cohorts=new Zn(Me.isEqual),e&&this.putAll(e)}var O="model",N="name",e="type",M="vendor",C="version",w="architecture",Il="console",R="mobile",b="tablet",r="smarttv",ua="wearable",H_=(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],[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,(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],[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],[[w,"amd64"]],[/(ia32(?=;))/i],[[w,U.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[w,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[w,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[w,/ower/,"",U.util.lowerize]],[/(sun4\w)[;\)]/i],[[w,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[w,U.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[O,M,[e,b]],[/applecoremedia\/[\w\.]+ \((ipad)/],[O,[M,"Apple"],[e,b]],[/(apple\s{0,1}tv)/i],[[O,"Apple TV"],[M,"Apple"],[e,r]],[/(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],[M,O,[e,b]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[O,[M,"Amazon"],[e,b]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[O,U.mapper.str,U.maps.device.amazon.model],[M,"Amazon"],[e,R]],[/android.+aft([bms])\sbuild/i],[O,[M,"Amazon"],[e,r]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[O,M,[e,R]],[/\((ip[honed|\s\w*]+);/i],[O,[M,"Apple"],[e,R]],[/(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],[M,O,[e,R]],[/\(bb10;\s(\w+)/i],[O,[M,"BlackBerry"],[e,R]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[O,[M,"Asus"],[e,b]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[M,"Sony"],[O,"Xperia Tablet"],[e,b]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[O,[M,"Sony"],[e,R]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[M,O,[e,Il]],[/android.+;\s(shield)\sbuild/i],[O,[M,"Nvidia"],[e,Il]],[/(playstation\s[34portablevi]+)/i],[O,[M,"Sony"],[e,Il]],[/(sprint\s(\w+))/i],[[M,U.mapper.str,U.maps.device.sprint.vendor],[O,U.mapper.str,U.maps.device.sprint.model],[e,R]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[M,[O,/_/g," "],[e,R]],[/(nexus\s9)/i],[O,[M,"HTC"],[e,b]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[O,[M,"Huawei"],[e,R]],[/android.+(bah2?-a?[lw]\d{2})/i],[O,[M,"Huawei"],[e,b]],[/(microsoft);\s(lumia[\s\w]+)/i],[M,O,[e,R]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[O,[M,"Microsoft"],[e,Il]],[/(kin\.[onetw]{3})/i],[[O,/\./g," "],[M,"Microsoft"],[e,R]],[/\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],[O,[M,"Motorola"],[e,R]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[O,[M,"Motorola"],[e,b]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[M,U.util.trim],[O,U.util.trim],[e,r]],[/hbbtv.+maple;(\d+)/i],[[O,/^/,"SmartTV"],[M,"Samsung"],[e,r]],[/\(dtv[\);].+(aquos)/i],[O,[M,"Sharp"],[e,r]],[/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],[[M,"Samsung"],O,[e,b]],[/smart-tv.+(samsung)/i],[M,[e,r],O],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[M,"Samsung"],O,[e,R]],[/sie-(\w*)/i],[O,[M,"Siemens"],[e,R]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[M,"Nokia"],O,[e,R]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[O,[M,"Acer"],[e,b]],[/android.+([vl]k\-?\d{3})\s+build/i],[O,[M,"LG"],[e,b]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[M,"LG"],O,[e,b]],[/(lg) netcast\.tv/i],[M,O,[e,r]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[O,[M,"LG"],[e,R]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[M,O,[e,b]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[O,[M,"Lenovo"],[e,b]],[/(lenovo)[_\s-]?([\w-]+)/i],[M,O,[e,R]],[/linux;.+((jolla));/i],[M,O,[e,R]],[/((pebble))app\/[\d\.]+\s/i],[M,O,[e,ua]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[M,O,[e,R]],[/crkey/i],[[O,"Chromecast"],[M,"Google"],[e,r]],[/android.+;\s(glass)\s\d/i],[O,[M,"Google"],[e,ua]],[/android.+;\s(pixel c)[\s)]/i],[O,[M,"Google"],[e,b]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[O,[M,"Google"],[e,R]],[/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],[[O,/_/g," "],[M,"Xiaomi"],[e,R]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[O,/_/g," "],[M,"Xiaomi"],[e,b]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[O,[M,"Meizu"],[e,R]],[/(mz)-([\w-]{2,})/i],[[M,"Meizu"],O,[e,R]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[O,[M,"OnePlus"],[e,R]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[O,[M,"RCA"],[e,b]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[O,[M,"Dell"],[e,b]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[O,[M,"Verizon"],[e,b]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[M,"Barnes & Noble"],O,[e,b]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[O,[M,"NuVision"],[e,b]],[/android.+;\s(k88)\sbuild/i],[O,[M,"ZTE"],[e,b]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[O,[M,"Swiss"],[e,R]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[O,[M,"Swiss"],[e,b]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[O,[M,"Zeki"],[e,b]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[M,"Dragon Touch"],O,[e,b]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[O,[M,"Insignia"],[e,b]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[O,[M,"NextBook"],[e,b]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[M,"Voice"],O,[e,R]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[M,"LvTel"],O,[e,R]],[/android.+;\s(PH-1)\s/i],[O,[M,"Essential"],[e,R]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[O,[M,"Envizen"],[e,b]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[M,O,[e,b]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[O,[M,"MachSpeed"],[e,b]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[M,O,[e,b]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[O,[M,"Rotor"],[e,b]],[/android.+(KS(.+))\s+build/i],[O,[M,"Amazon"],[e,b]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[M,O,[e,b]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[e,U.util.lowerize],M,O],[/[\s\/\(](smart-?tv)[;\)]/i],[[e,r]],[/(android[\w\.\s\-]{0,9});.+build/i],[O,[M,"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,U.mapper.str,U.maps.os.windows],[C,U.mapper.str,U.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[N,"Windows"],[C,U.mapper.str,U.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]]},U);function U(){}Y_.generate=function(e,t){var r,n,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,i=H_.parse(e.navigator.userAgent).browser,o="";try{o=null!=(n=null==(r=screen.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:r[0])?n:""}catch(e){}return c({browserName:i.name||"",browserMajorVersion:i.major||"",browserVersion:i.version||"",orientation:o,userAgent:e.navigator.userAgent||""},t.toProperties())};var z_=Y_;function Y_(){}q_.generate=function(e){var t,r,n,i,e=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,o=H_.parse(e.navigator.userAgent),s=o.os,o=o.device,a=e.screen,e=(null==(e=e.navigator.languages)?void 0:e[0])||"",u=e.split("-")[0],c=(null!=(c=o.type)?c:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),p=s.name||"",l="";try{p=null!=(r=null==(t=p.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:t[0])?r:p,orientation=null!=(i=null==(n=a.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:n[0])?i:"",l=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{osName:p,osVersion:s.version||"",deviceModel:o.model||"",deviceType:c,deviceVendor:o.vendor||"",deviceBrand:o.vendor||"",screenWidth:a.width||"",screenHeight:a.height||"",locale:e,language:u,timeZone:l}};var J_=q_;function q_(){}$_.generate=function(e,t){t=null!=t?t:Do.createWithCurrentPage();return c(c({platform:"Web"},z_.generate(e,t)),J_.generate(e))};var W_=$_;function $_(){}Z_.prototype.map=function(e){return new Z_(e(this.previous),e(this.current))};var X_=Z_;function Z_(e,t){this.previous=e,this.current=t}eI.empty=function(){return this.from([])},eI.from=function(e){return new eI(e)},eI.fromDto=function(e){return this.from(e.events.map(function(e){return Hn.fromJson(e)}))},Object.defineProperty(eI.prototype,"rawEvents",{get:function(){return this.events},enumerable:!1,configurable:!0});var Q_=eI;function eI(e){this.events=e}rI.prototype.initContext=function(e,t){e=null!=(t=null!=t?t:e)?t:this.defaultUser;return oI.of(aI(e,this.hackleDeviceId),j_.empty(),Q_.empty())},rI.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(rI.prototype,"currentUser",{get:function(){return this.context.user},enumerable:!1,configurable:!0}),rI.prototype.resolve=function(e){e=this.resolveContext(e);return this.hackleUser(e)},rI.prototype.resolveContext=function(e){return void 0===e?this.context:("string"==typeof e?this.updateUser({id:e}):this.updateUser(e)).current},rI.prototype.toHackleUser=function(e){e=this.context.with(e);return this.hackleUser(e)},rI.prototype.hackleUser=function(e){var t=(new Kt).addIdentifiers(e.user.identifiers||{}).add(Vt.ID,e.user.id||this.hackleDeviceId).add(Vt.DEVICE,e.user.deviceId||this.hackleDeviceId).add(Vt.HACKLE_DEVICE,this.hackleDeviceId),t=(p.isNotNullOrUndefined(e.user.userId)&&t.add(Vt.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}},rI.prototype.hackleProperties=function(){return"undefined"!=typeof window?W_.generate(window,this.pageManager.currentPage):{}},rI.prototype.setUser=function(e){return this.updateUser(e).map(function(e){return e.user})},rI.prototype.setUserId=function(e){e=c(c({},this.context.user),{userId:e});return this.setUser(e)},rI.prototype.setDeviceId=function(e){e=c(c({},this.context.user),{deviceId:e});return this.setUser(e)},rI.prototype.updateUserProperties=function(e){return this.operateProperties(e).map(function(e){return e.user})},rI.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).map(function(e){return e.user})},rI.prototype.changeUser=function(t,r,n){this.userListeners.forEach(function(e){e.onUserUpdated(t,r,n)})},rI.prototype.saveUser=function(e){this.storage.saveUser(e)},rI.prototype.updateContext=function(e){var t=this.context,r=t.user,e=e(r),n=this.context.with(e);return this.context=n,V_(r,e)||(this.changeUser(r,e,this.clock.currentMillis()),this.saveUser(e)),new X_(t,n)},rI.prototype.updateUser=function(r){var n=this;return this.updateContext(function(e){return e=e,t=aI(r,n.hackleDeviceId),V_(e,t)?c(c({},t),{properties:c(c({},e.properties),t.properties)}):t;var t})},rI.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:p.fromMap(t)})})},rI.prototype.sync=function(){return a(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.syncCohort(),this.syncUserTarget()])];case 1:return e.sent(),[2]}})})},rI.prototype.syncIfNeeded=function(t){return a(this,void 0,void 0,function(){return u(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 V_(t.previous,t.current)?[3,4]:[4,this.syncUserTarget()];case 3:e.sent(),e.label=4;case 4:return[2]}})})},rI.prototype.syncCohort=function(){return a(this,void 0,void 0,function(){var t;return u(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(),l.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},rI.prototype.syncUserTarget=function(){return a(this,void 0,void 0,function(){var t;return u(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(),l.log.error("Failed to sync userTargets: ".concat(t)),[3,3];case 3:return[2]}})})},rI.prototype.hasNewIdentifiers=function(e,t){var r=Bt(e),e=Bt(t);return Object.entries(e).some(function(e){var t=e[0],e=e[1];return r[t]!==e})},rI.prototype.close=function(){return a(this,void 0,void 0,function(){return u(this,function(e){return[2]})})};var tI=rI;function rI(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)}iI.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},iI.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(iI.prototype,"deviceId",{get:function(){return this.storage.getItem(nt)},enumerable:!1,configurable:!0}),Object.defineProperty(iI.prototype,"userId",{get:function(){return this.storage.getItem(rt)},enumerable:!1,configurable:!0}),iI.prototype.setDeviceId=function(e){this.setId(nt,e)},iI.prototype.setUserId=function(e){this.setId(rt,e)},iI.prototype.setId=function(e,t){p.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)};var nI=iI;function iI(e){this.storage=e}sI.of=function(e,t,r){return new sI(e,t.filterBy(e),r)},sI.prototype.with=function(e){return sI.of(e,this.cohorts.filterBy(e),this.targetEvents)},sI.prototype.update=function(e,t){e=e.filterBy(this.user),e=this.cohorts.toBuilder().putAll(e).build();return sI.of(this.user,e,t)};var oI=sI;function sI(e,t,r){this.user=e,this.cohorts=t,this.targetEvents=r}var aI=function(e,t){return c(c({},e),{id:e.id||t,deviceId:e.deviceId||t})},uI=(Object.defineProperty(cI.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(cI.prototype,"sessionId",{get:function(){var e;return null!=(e=this._currentSessionId)?e:cI.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(cI.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),cI.prototype.addListener=function(e){this.sessionListeners.push(e)},cI.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},cI.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)},cI.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem(tt,"".concat(e))},cI.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)})},cI.prototype.newSession=function(t,r){var n="".concat(r,".").concat(K().slice(0,8));return this.saveSession(n),this.updateLastEventTime(r),this.sessionListeners.forEach(function(e){e.onSessionStarted(n,t,r)}),n},cI.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem(et,e)},cI.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem(et)},cI.prototype.loadLastEventTime=function(){var e=this.storage.getItem(tt);null!==e&&0<(e=Number.parseFloat(e))&&(this._lastEventTime=e)},cI.prototype.onUserUpdated=function(e,t,r){this.endSession(e),this.newSession(t,r)},cI.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}},cI.EMPTY_SESSION_ID="0.ffffffff",cI);function cI(e,t){this.sessionTimeoutMillis=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}lI.prototype.getItem=function(e){var t;return null!=(t=null==(t=this.storage)?void 0:t.getItem(e))?t:null},lI.prototype.removeItem=function(e){var t;null!=(t=this.storage)&&t.removeItem(e)},lI.prototype.setItem=function(e,t){var r;null!=(r=this.storage)&&r.setItem(e,t)},lI.prototype.clear=function(){var e;null!=(e=this.storage)&&e.clear()};var pI=lI;function lI(){this.storage=window.localStorage}hI.postfix=function(e,t){return new hI(e,function(e){return"".concat(e).concat(t)})},hI.prefix=function(e,t){return new hI(e,function(e){return"".concat(t).concat(e)})},hI.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},hI.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},hI.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)};var fI=hI;function hI(e,t){this.delegate=e,this.transform=t}yI.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},yI.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},yI.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},yI.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}},yI.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[]}},yI.prototype.entries=function(){return this.getList().flatMap(Object.entries)},yI.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){}},yI.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]},yI.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){}},yI.prototype.clear=function(){this.delegate.removeItem(this.listKey)};var dI=yI;function yI(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)}gI.prototype.currentUser=function(){return this.userManager.resolve()},gI.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entries()},gI.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},gI.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},gI.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},gI.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},gI.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},gI.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},gI.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},gI.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},gI.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},gI.prototype.increment=function(e,t){Ni.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()};var vI=gI;function gI(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}EI.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},EI.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},EI.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},EI.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},EI.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},EI.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},EI.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},EI.monitoring=function(e){return"".concat(e,"/metrics")},EI.userTargets=function(e){return"".concat(e,"/api/v1/user-targets")};var mI=EI;function EI(){}bI.prototype.exist=function(e,t){var e=this.key(e),r=this.storage.getItem(e);if(p.isNullOrUndefined(r))return!1;r=Number.parseInt(r,10);return!Number.isNaN(r)&&t<=r||(this.storage.removeItem(e),!1)},bI.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},bI.prototype.key=function(e){return"".concat(e.key)};var wI=bI;function bI(e){this.storage=e}_I.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var TI=_I;function _I(e){this.handlers=e}AI.prototype.handle=function(e,t){e.close()},AI.prototype.supports=function(e){return"CLOSE"===e.type};var II=AI;function AI(){}OI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){l.log.error("Invalid url: ".concat(t.value))}},OI.prototype.supports=function(e){return"WEB_LINK"===e.type};var NI=OI;function OI(e){this.urlHandler=e}SI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){l.log.error("Invalid url: ".concat(t.value))}},SI.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type};var PI=SI;function SI(e){this.urlHandler=e}RI.prototype.handle=function(e,t){var r;e.context.decisionReason!==h.OVERRIDDEN&&(r=this.clock.currentMillis()+864e5,this.storage.put(e.context.inAppMessage,r)),e.close()},RI.prototype.supports=function(e){return"HIDDEN"===e.type};var MI=RI;function RI(e,t){this.storage=e,this.clock=t}xI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){l.log.error("Invalid url: ".concat(t.value))}},xI.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type};var CI=xI;function xI(e){this.urlHandler=e}kI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){l.log.error("Invalid url: ".concat(t.value))}},kI.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type};var UI=kI;function kI(e){this.urlHandler=e}LI.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){l.log.error("Invalid url: ".concat(t.value))}},LI.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type};var DI=LI;function LI(e){this.urlHandler=e}VI.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){l.log.error("Invalid url: ".concat(t.value))}},VI.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type};var FI=VI;function VI(e){this.urlHandler=e}BI.prototype.track=function(e,t,r){t=this.createTrackEvent(t,e);this.core.track(t,e.user,r)},BI.prototype.commonProperties=function(e){return c(c({},e.properties),{in_app_message_id:e.inAppMessage.id,in_app_message_key:e.inAppMessage.key,in_app_message_display_type:e.message.layout.displayType,decision_reason:String(e.decisionReason)})},BI.prototype.createTrackEvent=function(e,t){switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:c(c({},this.commonProperties(t)),{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:this.commonProperties(t)};case"ACTION":var r=e;return{key:"$in_app_action",properties:c(c({},this.commonProperties(t)),{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({},this.commonProperties(t)),{image_url:r.imageUrl,image_order:r.imageOrder})}}};var jI=BI;function BI(e){this.core=e}GI.prototype.setListener=function(e){this.inAppMessageListener=e},GI.prototype.present=function(r){return a(this,void 0,void 0,function(){var t;return u(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 KI=GI;function GI(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}zI.prototype.open=function(){var o,s;return a(this,void 0,void 0,function(){var r,t,n,i=this;return u(this,function(e){switch(e.label){case 0:if(!this.status.canOpen())return l.log.debug("InAppMessage is already opened. (key=".concat(this.context.inAppMessage.key,")")),[2];r=jo.toPublic(this.context.inAppMessage),e.label=1;case 1:return e.trys.push([1,4,,5]),null!=(s=null==(o=this.ui.inAppMessageListener)?void 0:o.beforeInAppMessageOpen)&&s.call(o,r),this.status.current="OPENING",window.addEventListener(zI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.addEventListener(zI.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(zI.CONTAINER_CLASS_NAME,"--loading")),n=window.HackleInAppMessageRenderer,this.renderer=new n.HackleInAppMessageRenderer(t),n=this.renderTypeResolver.resolve(this.context),[4,this.renderer.render({messageId:this.context.inAppMessage.id,message:this.context.message.toJson(),renderType:n})];case 3:return e.sent(),t.classList.remove("".concat(zI.CONTAINER_CLASS_NAME,"--loading")),t.style.display="block",this.handleInAppMessageLifecycle("OPEN",function(){var e,t;i.handleEvent({type:"IMPRESSION"}),i.status.current="OPENED",null!=(t=null==(e=i.ui.inAppMessageListener)?void 0:e.afterInAppMessageOpen)&&t.call(e,r)},function(){l.log.warn("Failed to open inAppMessage with [Timeout expired.]"),i.destroy()}),[3,5];case 4:return e.sent(),this.destroy(),[3,5];case 5:return[2]}})})},zI.prototype.close=function(){var e,t,r,n=this;this.status.canClose()?(r=jo.toPublic(this.context.inAppMessage),null!=(t=null==(e=this.ui.inAppMessageListener)?void 0:e.beforeInAppMessageClose)&&t.call(e,r),this.status.current="CLOSING",this.handleInAppMessageLifecycle("CLOSE",function(){var e,t;n.handleEvent({type:"CLOSE"}),n.destroy(),null!=(t=null==(e=n.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r)},function(){var e,t;l.log.warn("Failed to close inAppMessage with [Timeout expired.]"),n.destroy(),null!=(t=null==(e=n.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)&&t.call(e,r)})):l.log.debug("InAppMessage is already closed. (key=".concat(this.context.inAppMessage.key,")"))},zI.prototype.handleInAppMessageLifecycle=function(e,t,r){var n=this,i=this.lifecycleRegistry.register(e,t);window.dispatchEvent(new CustomEvent(zI.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE,{detail:{type:e,id:i}})),setTimeout(function(){void 0!==n.lifecycleRegistry.getAndRemove(e,i)&&r()},zI.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT)},zI.prototype.destroy=function(){var e;window.removeEventListener(zI.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.removeEventListener(zI.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"},zI.prototype.addContainer=function(){var e;return this.container||((e=document.createElement("div")).classList.add(zI.CONTAINER_CLASS_NAME),this.container=e),this.container.parentNode||document.body.appendChild(this.container),this.container},zI.prototype.removeContainer=function(){var e;this.container&&(null!=(e=this.container.parentNode)&&e.removeChild(this.container),this.container=null)},zI.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},zI.prototype.handleEvent=function(e){this.ui.eventHandler.handle(this,e)},zI.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",zI.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE="hackle-iam-lifecycle-start",zI.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE="hackle-iam-lifecycle-end",zI.CONTAINER_CLASS_NAME="hackle-iam",zI.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT=5e3;var HI=zI;function zI(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===zI.HACKLE_IAM_INTERACTION_EVENT_TYPE&&(e=e.detail,s.handleInteraction(e))}}JI.prototype.isMobileOS=function(e){e=e.user.hackleProperties.osName;return"string"==typeof e&&Boolean(e.match(this.mobileOSRegex))},JI.prototype.isMobileDeviceType=function(e){e=e.user.hackleProperties.deviceType;return"string"==typeof e&&Boolean(e.match(this.mobileDeviceRegex))},JI.prototype.resolve=function(e){return this.isMobileOS(e)||this.isMobileDeviceType(e)?"mobile":"pc"};var YI=JI;function JI(){this.mobileOSRegex=/(iOS|Android|iPad|iPhone)/g,this.mobileDeviceRegex=/(mobile|phone|tablet)/g}WI.prototype.canOpen=function(){return"OPENED"!==this.current&&"OPENING"!==this.current},WI.prototype.canClose=function(){return"CLOSED"!==this.current&&"CLOSING"!==this.current};var qI=WI;function WI(e){this.current=e=void 0===e?"CLOSED":e}XI.prototype.resolveKey=function(e,t){return"".concat(e,"_").concat(t)},XI.prototype.register=function(e,t){var r=K(),e=this.resolveKey(e,r);return this.record[e]=t,r},XI.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 $I=XI;function XI(){this.record={}}QI.create=function(e){return new QI(e)},QI.prototype.create=function(e,t){var r=new YI,n=new qI,i=new $I;switch(e.message.layout.displayType){case"MODAL":case"BANNER":case"BOTTOM_SHEET":return new HI(this.scriptLoader,e,t,r,n,i);case"NONE":return null}};var ZI=QI;function QI(e){this.scriptLoader=e}tA.prototype.load=function(){return a(this,void 0,void 0,function(){var t;return u(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()]}})})},tA.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},tA.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 eA=tA;function tA(e){this.scriptUrl=e}nA.prototype.matches=function(t,r,n){var i=this;return r.eventTrigger.rules.some(function(e){return i.ruleMatches(t,n,r,e)})},nA.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;e=iA.of(e,t,r);return this.targetMatcher.anyMatches(e,y0.create(),n.targets)};var rA=nA;function nA(e){this.targetMatcher=e}oA.of=function(e,t,r){return new oA(new h0("IN_APP_MESSAGE",r.id),e,t.user,t)};var iA=oA;function oA(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}aA.prototype.get=function(e){e=this.storage.getItem(e.id.toString());return p.isNullOrUndefined(e)?[]:JSON.parse(e)},aA.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))};var sA=aA;function aA(e){this.storage=e}cA.prototype.get=function(t){return this.processors.find(function(e){return e.supports(t)})};var uA=cA;function cA(e){this.processors=e}lA.prototype.process=function(e,t,r){},lA.prototype.supports=function(e){return"IMPRESSION"===e.type};var pA=lA;function lA(){}hA.prototype.process=function(e,t,r){},hA.prototype.supports=function(e){return"CLOSE"===e.type};var fA=hA;function hA(){}yA.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,jo.toPublic(e.context.inAppMessage),Ko.toPublic(e),Ln.fromAction(t.action)))&&e.status.canClose()&&null!=o&&o.handle(e,t.action)},yA.prototype.supports=function(e){return"ACTION"===e.type};var dA=yA;function yA(e){this.actionHandlerFactory=e}gA.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 vA=gA;function gA(e,t,r){this.clock=e,this.eventTracker=t,this.eventProcessorFactory=r}EA.prototype.matches=function(e,t,r){return this.ruleMatcher.matches(e,t,r)};var mA=EA;function EA(e){this.ruleMatcher=e}bA.prototype.get=function(t){return this.handlers.find(function(e){return e.supports(t)})};var wA=bA;function bA(e){this.handlers=e}_A.prototype.handle=function(e,t){e.close()},_A.prototype.supports=function(e){return"CLOSE"===e.type};var TA=_A;function _A(){}AA.prototype.handle=function(e,t){t=this.eventOrNull(t);t&&this.eventHandler.handle(e,t)},AA.prototype.eventOrNull=function(e){var t=Sn.fromJson(e.action);return t?{type:"ACTION",action:t,area:e.area,buttonText:e.buttonText,imageUrl:e.imageUrl,imageOrder:e.imageOrder}:null},AA.prototype.supports=function(e){return"ACTION"===e.type};var IA=AA;function AA(e){this.eventHandler=e}OA.prototype.handle=function(e,t){t={type:"IMAGE_IMPRESSION",imageUrl:t.imageUrl,imageOrder:t.imageOrder};this.eventHandler.handle(e,t)},OA.prototype.supports=function(e){return"IMAGE_IMPRESSION"===e.type};var NA=OA;function OA(e){this.eventHandler=e}SA.prototype.open=function(e){window.location.href=e.href};var PA=SA;function SA(){}RA.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")};var MA=RA;function RA(){}xA.prototype.open=function(e){window.open(e.href)};var CA=xA;function xA(){}kA.prototype.open=function(e){window.location.replace(e)};var UA=kA;function kA(){}function DA(e,t,r){return null===e||(!VA(t,LA)||r.current!==r.referrer)&&!VA(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},FA={current:void 0,referrer:void 0},VA=function(t,r){return Object.keys(LA).every(function(e){return t[e]===r[e]})},jA=(BA.prototype.startNewCampaign=function(e,t,r){for(var t=c(c({},LA),t),n=new Mo,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)},BA.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();DA(r,n,i)&&(this.storage.set(n),this.startNewCampaign(e,n,t))},BA.prototype.onSessionEnded=function(e,t,r){},BA.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},BA);function BA(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}GA.prototype.get=function(){var e=this.storage.getItem(it);return e?JSON.parse(e):null},GA.prototype.set=function(e){this.storage.setItem(it,JSON.stringify(e))};var KA=GA;function GA(e){this.storage=e}zA.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},zA.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=Wo.tryDecodeURIComponent(i))&&(t[o]=i)}return t};var HA=zA;function zA(e){this.search=e}JA.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},JA.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,JA.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i;var YA=JA;function JA(){}WA.prototype.parse=function(e){e=this.params(e);return this.resolve(e)},WA.prototype.params=function(e){e=p.isNotNullOrUndefined(e)?e:this.pageManager.currentPage.queryParameter;return new HA(e).getQueryParams(WA.CAMPAIGN_QUERY_CONDITION)},WA.prototype.resolve=function(e){return{utm_campaign:e[$A],utm_content:e[XA],utm_id:e[ZA],utm_medium:e[QA],utm_source:e[eN],utm_term:e[tN],gclid:e[rN],fbclid:e[nN]}},WA.prototype.parseDomain=function(){var t=this;if("undefined"==typeof window)return FA;return{current:YA.extractDomain(this.pageManager.currentPage.hostname),referrer:function(){var e=t.pageManager.currentPage.referrer;if(e)return e=new URL(e).hostname,YA.extractDomain(e)}()}},WA.CAMPAIGN_QUERY_CONDITION=function(e,t){return Pi.isNotEmptyString(t)};var qA=WA;function WA(e){this.pageManager=e}var $A="utm_campaign",XA="utm_content",ZA="utm_id",QA="utm_medium",eN="utm_source",tN="utm_term",rN="gclid",nN="fbclid",iN=(oN.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},oN.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){l.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},oN);function oN(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()}aN.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return!t||!t.getAttributes().integration_ga_experiment||!Vb.isExposureEvent(e)||"RUNNING"!==e.experiment.status||e.decisionReason!==h.TRAFFIC_ALLOCATED?null:e};var sN=aN;function aN(e){this.workspaceFetcher=e}var uN={user:void 0,debug:!1,log_disabled:!1,automaticPageTracking:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionTimeoutMillis:18e5,autoOpenDevTool:!1,sdkUrl:"https://sdk-api.hackle.io",eventUrl:"https://event-api.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.51.0",IAM_RENDERER_VERSION_HEADER:"0.0.12"},cN=(pN.config=function(e){return c(c(c({},uN),e),{automaticPageTracking:pN.resolveAutomaticPageTracking(e)})},pN.resolveAutomaticPageTracking=function(e){return"boolean"!=typeof(null==e?void 0:e.automaticPageTracking)&&"boolean"!=typeof(null==e?void 0:e.auto_track_page_view)?uN.automaticPageTracking:!!e.automaticPageTracking||!!e.auto_track_page_view},pN.logging=function(e){l.initCounter(function(e){return Ni.counter("log",{level:e})}),l.setLogLevel(Ae.INFO),e.log_disabled?l.setLogLevel(Ae.DISABLE):e.debug&&l.setLogLevel(Ae.DEBUG)},pN.sdk=function(e,t){return l.log.debug("SDK key: ".concat(e)),e||l.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}},pN.isBeaconSupported=function(){var e=!1;return"undefined"!=typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&l.log.debug("support sendBeacon API"),e},pN.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,6e4)},pN.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||36e5<e.exposureEventDedupIntervalMillis?(l.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},pN);function pN(){}fN.prototype.add=function(e){this.synchronizers.push(e)},fN.prototype.sync=function(){return a(this,void 0,void 0,function(){var t=this;return u(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]}})})},fN.prototype.close=function(){return a(this,void 0,void 0,function(){var t=this;return u(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]}})})},fN.prototype.safe=function(r){return a(this,void 0,void 0,function(){var t;return u(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(),l.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})};var lN=fN;function fN(){this.synchronizers=[]}dN.prototype.sync=function(){return a(this,void 0,void 0,function(){var t;return u(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(),l.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},dN.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()}))},dN.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null!=(e=this.pollingJob)&&e.cancel(),this.pollingJob=null)},dN.prototype.close=function(){return a(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})};var hN=dN;function dN(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}vN.prototype.schedule=function(e,t){e=new gN(e,t);return e.start(),e},vN.prototype.schedulePeriodically=function(e,t,r){var n;switch(this.scheduleType){case"setTimeout":n=new EN(e,t,r);break;case"setInterval":n=new bN(e,t,r)}return n.start(),n};var yN=vN;function vN(e){this.scheduleType=e}mN.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){try{e.task()}catch(e){l.log.error("Failed to run task: ".concat(e))}finally{e.timeout=null}},this.delayMillis)},mN.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var gN=mN;function mN(e,t){this.delayMillis=e,this.task=t,this.timeout=null}wN.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},wN.prototype.run=function(){var e=this;try{this.task()}catch(e){l.log.error("Failed to run task: ".concat(e))}this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},wN.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)};var EN=wN;function wN(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}TN.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){e.run(),e.interval=setInterval(function(){return e.run()},e.intervalMillis)},this.delayMillis)},TN.prototype.run=function(){try{this.task()}catch(e){l.log.error("Failed to run task: ".concat(e))}},TN.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.interval&&(clearInterval(this.interval),this.interval=null)};var bN=TN;function TN(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null,this.interval=null}IN.prototype.fetchIfModified=function(r){return a(this,void 0,void 0,function(){var t;return u(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)]}})})},IN.prototype.createRequest=function(e){var t=Mi.builder().url(this.url).method("GET");return null!==e&&t.addHeader(Di.IF_MODIFIED_SINCE,e),t.build()},IN.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),zi.record("get.workspace",t,r),[2,r];case 3:throw r=e.sent(),zi.record("get.workspace",t,null),r;case 4:return[2]}})})},IN.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw new Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw new Error("Response body is empty");return{config:JSON.parse(e.body),lastModified:e.headers.get(Di.LAST_MODIFIED)}};var _N=IN;function IN(e,t){this.url=e,this.transport=t}NN.prototype.fetch=function(r){return a(this,void 0,void 0,function(){var t;return u(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)]}})})},NN.prototype.createRequest=function(e){e={identifiers:Bt(e)},e=we.encodeURL(JSON.stringify(e));return Mi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},NN.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),zi.record("get.cohorts",t,r),[2,r];case 3:throw r=e.sent(),zi.record("get.cohorts",t,null),r;case 4:return[2]}})})},NN.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 j_.fromDto(e)};var AN=NN;function NN(e,t){this.url=e,this.transport=t}PN.prototype.fetch=function(r){return a(this,void 0,void 0,function(){var t;return u(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)]}})})},PN.prototype.createRequest=function(e){e={identifiers:Bt(e)},e=we.encodeURL(JSON.stringify(e));return Mi.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",e).build()},PN.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),zi.record("get.user-targets",t,r),[2,r];case 3:throw r=e.sent(),zi.record("get.user-targets",t,null),r;case 4:return[2]}})})},PN.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 Q_.fromDto(e)};var ON=PN;function PN(e,t){this.url=e,this.transport=t}MN.prototype.getExperiments=function(){return Array.from(this.experiments.values())},MN.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},MN.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},MN.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},MN.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},MN.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},MN.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},MN.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},MN.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},MN.prototype.getContainerOrNull=function(e){return this.containers.get(e)},MN.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},MN.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},MN.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},MN.prototype.getAttributes=function(){return this.attributes},MN.from=function(e){var t=e.parameterConfigurations.map(Nt.fromJson),r=f.mapNotNullOrUndefined(e.experiments,function(e){return St.fromJson("AB_TEST",e,t)}),n=f.mapNotNullOrUndefined(e.experiments,function(e){return St.fromJson("AB_TEST",e,t)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),i=f.mapNotNullOrUndefined(e.featureFlags,function(e){return St.fromJson("FEATURE_FLAG",e,t)}),o=e.buckets.map(xt.fromJson),s=e.events.map(Lt.fromJson),a=f.mapNotNullOrUndefined(e.segments,nr.fromJson),u=e.containers.map(or.fromJson),c=f.mapNotNullOrUndefined(e.remoteConfigParameters,cr.fromJson),p=f.mapNotNullOrUndefined(e.inAppMessages,Vr.fromJson),e=e.workspace.attributes;return new MN(r,n,i,o,s,a,u,t,c,p,e)};var SN=MN;function MN(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}CN.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},CN.prototype.setWorkspace=function(e){try{this.workspace=SN.from(e.config)}catch(e){l.log.error("Failed to set workspace: ".concat(e))}},CN.prototype.get=function(){return this.workspace},CN.prototype.sync=function(){return a(this,void 0,void 0,function(){var t;return u(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(),l.log.error("Failed to sync workspace: ".concat(t)),[3,3];case 3:return[2]}})})},CN.prototype.close=function(){return a(this,void 0,void 0,function(){return u(this,function(e){return[2]})})};var RN=CN;function CN(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;e=this.workspaceConfigStorage.get();e&&this.setConfig(e)}UN.prototype.dispatch=function(e,t){e=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(e):this.dispatchEvents(e)},UN.prototype.dispatchEventsSynchronously=function(r){return a(this,void 0,void 0,function(){var t;return u(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]}})})},UN.prototype.dispatchEvents=function(r){return a(this,void 0,void 0,function(){var t;return u(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 xN=UN;function UN(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}DN.prototype.send=function(e){e=this.createRequest(e);return this.execute(e)},DN.prototype.createRequest=function(e){e=e,t=new Array,r=new Array,n=new Array,e.forEach(function(e){e instanceof Vb?Vb.isExposureEvent(e)?t.push(e.toDto()):Vb.isTrackEvent(e)?r.push(e.toDto()):Vb.isRemoteConfigEvent(e)&&n.push(e.toDto()):Vb.isExposureEventDto(e)?t.push(e):Vb.isTrackEventDto(e)?r.push(e):Vb.isRemoteConfigEventDto(e)&&n.push(e)});var t,r,n,e={exposureEvents:t,trackEvents:r,remoteConfigEvents:n};return Mi.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(e)).build()},DN.prototype.execute=function(n){return a(this,void 0,void 0,function(){var t,r;return u(this,function(e){switch(e.label){case 0:t=qn.start(),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transport.send(n)];case 2:return r=e.sent(),zi.record("post.events",t,r),[2,r];case 3:throw r=e.sent(),zi.record("post.events",t,null),r;case 4:return[2]}})})};var kN=DN;function DN(e,t){this.url=e,this.transport=t}FN.prototype.add=function(e){return this.repository.add(e)},FN.prototype.delete=function(e){return this.repository.delete(e)},FN.prototype.flush=function(){return a(this,void 0,void 0,function(){var t,r;return u(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]}})})},FN.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"pageshow":return void this.flush().catch(function(e){return l.log.warn("Failed to flush retry events: ".concat(e))});case"blur":case"focus":case"hidden":case"locationChange":case"pagehide":return}};var LN=FN;function FN(e,t){this.repository=e,this.transport=t}function VN(){this.listeners={}}VN.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},VN.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},VN.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};o(BN,jN=VN);var jN,Ol=BN;function BN(){return null!==jN&&jN.apply(this,arguments)||this}o(HN,KN=Ol),HN.prototype.process=function(e){this.enqueue(e),this.emit("event",e)},HN.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},HN.prototype.scheduleFlush=function(){var e,t=this;null!=(e=this.flushingJob)&&e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},HN.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 l.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},HN.prototype.close=function(){this.flush(!0)};var KN,GN=HN;function HN(e,t,r,n){var i=KN.call(this)||this;return i.eventDispatcher=e,i.eventDispatchMaxSize=t,i.flushScheduler=r,i.flushIntervalMillis=n,i.queue=[],i.flushingJob=null,i}YN.prototype.send=function(e){e=e.toBuilder().addHeader(Ge,this.sdk.key).addHeader(He,this.sdk.name).addHeader(ze,this.sdk.version).addHeader(Ye,this.clock.currentMillis().toString()).build();return this.delegate.send(e)};var zN=YN;function YN(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}qN.intercept=function(e,t){return t instanceof zN?t:new zN(e,Le.instance,t)};var JN=qN;function qN(){}$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 Ui(n.status,n.responseText,function(e){var t=Di.builder(),e=e.getAllResponseHeaders();if(!e)return t.build();for(var r=0,n=e.split("\r\n");r<n.length;r++){var i,o=n[r],s=o.indexOf(": ");0<s&&(i=o.slice(0,s),o=o.slice(s+2),t.add(i,o))}return t.build()}(n)),t(e)))},n),o=s.headers.raw();for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e]);n.send(s.body)})};var WN=$N;function $N(){}ZN.create=function(){return new ZN},ZN.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(Ui.ok())})},ZN.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(He,"unknown")),t.append("sdkVersion",e.headers.getOrDefault(ze,"unknown")),e.headers.get(Ye));return r&&t.append("sdkTime",r),e.body&&t.append("data",e.body),t};var XN=ZN;function ZN(){}eO.prototype.invoke=function(e){e=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(e)};var QN=eO;function eO(e){this.invocationResponseResolver=e}nO.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 tO,rO=nO;function nO(e){this.invocationResponseResolver=e}(Va=tO=tO||{}).prompt="prompt",Va.function="function";oO.prototype.getInvocator=function(e,t){return e===tO.prompt?new QN(t):e===tO.function?new rO(t):null};var iO=oO;function oO(){}aO.prototype.onPageStarted=function(e,t){var r=this.userManager.resolve(),r=this.determiner.determineOrNull(r);r&&(this.core.flush(!0),this.redirector.redirect(r))},aO.prototype.onPageEnded=function(e,t){};var sO=aO;function aO(e,t,r,n){this.determiner=e,this.redirector=t,this.userManager=r,this.core=n}var uO=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.user=n},cO=(pO.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 uO(t,o,i,e)}return null},pO);function pO(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}fO.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType)return!1;if(!t.splitUrlTargets)return!1;t=t.splitUrlTargets,e=hO.of(e,r);return!(0<t.excludeTargets.length&&this.targetMatcher.anyMatches(e,y0.create(),t.excludeTargets))&&(0<t.includeTargets.length&&this.targetMatcher.anyMatches(e,y0.create(),t.includeTargets))};var lO=fO;function fO(e){this.targetMatcher=e}dO.of=function(e,t){return new dO(new h0("SPLIT_URL",K()),t,e)};var hO=dO;function dO(e,t,r){this.key=e,this.user=t,this.workspace=r}vO.prototype.redirect=function(e){e=this.urlResolver.resolveOrNull(e);e&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(e))};var yO=vO;function vO(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}mO.prototype.resolveOrNull=function(e){try{var t=JSON.parse(e.decision.get(mO.SPLIT_URL_CONFIG_KEY,"")),r=jn.fromDto(t);return r.needRedirect?this.resolveByRedirectType(r.redirectType,r.redirectUrl,e):null}catch(e){return null}},mO.prototype.resolveByRedirectType=function(e,t,r){return!t||e!==n.SplitUrlRedirectType.MANUAL?null:this.resolveManualRedirectUrl(t,r)},mO.prototype.resolveManualRedirectUrl=function(e,t){e=Wo.tryParse(e);return e?this.decorateCampaign(e,t):null},mO.prototype.decorateCampaign=function(e,t){t=t.user.hackleProperties.queryParameter;if(Pi.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];Pi.isNotEmptyString(o)&&r.searchParams.set(s,o)}return r}return e},mO.SPLIT_URL_CONFIG_KEY="redirectUrl";var gO=mO;function mO(e){this.campaignParser=e}wO.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return p.isNullOrUndefined(e)?!1:Boolean(JSON.parse(e))}catch(e){return!1}},wO.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},wO.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)};var EO=wO;function wO(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}TO.prototype.setNeedDispatch=function(e){this.needDispatch=e},TO.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(TO.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},TO.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done";var bO=TO;function TO(){this.needDispatch=!0}IO.prototype.get=function(){var e=this.storage.getItem(lt);if(p.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}},IO.prototype.set=function(e){e=c(c({},e),{version:this.sdk.version});this.storage.setItem(lt,JSON.stringify(e))},IO.prototype.clear=function(){this.storage.removeItem(lt)};var _O=IO;function IO(e,t){this.sdk=e,this.storage=t}var AO=l.log,NO=(OO.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")}),OO.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)&&AO.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)&&AO.error(e)}}),window.addEventListener("popstate",function(){try{t("locationChange")}catch(e){(e instanceof Error||"string"==typeof e)&&AO.error(e)}})}catch(e){(e instanceof Error||"string"==typeof e)&&AO.error(e)}var r,n},OO.prototype.addListener=function(e){this.listeners.push(e)},OO.prototype.initialize=function(){this._initialized=!0,this.changeLifecycle("pageshow")},OO.prototype.changeLifecycle=function(e){this._initialized&&this.publish(e)},OO.prototype.publish=function(t){var r=this.clock.currentMillis();this.listeners.forEach(function(e){e.onLifecycleChanged(t,r)})},OO.isSafariBrowser=function(e){return!p.isNullOrUndefined(e)&&e.toLowerCase().includes("safari")},OO);function OO(e){void 0===e&&(e=Le.instance),this.clock=e,this.listeners=[],this._initialized=!1}SO.create=function(e,t,r){return void 0===r&&(r=Le.instance),new SO(new MO(r,e,t))},SO.prototype.execute=function(e,t){return(this.limiter.tryAcquire()?e:t)()};var PO=SO;function SO(e){this.limiter=e}RO.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},RO.prototype.refreshScopeIfNeeded=function(e){return null!=this.currentScope&&!this.currentScope.isExpired(e)||(this.currentScope=new CO(e+this.intervalMillis,this.limit)),this.currentScope};var MO=RO;function RO(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}xO.prototype.isExpired=function(e){return this.expirationTime<e},xO.prototype.tryAcquire=function(){return 0<this.token&&(--this.token,!0)};var CO=xO;function xO(e,t){this.expirationTime=e,this.token=t}kO.prototype.isDedupTarget=function(t){var e=this.determiners.find(function(e){return e.supports(t)});return!!e&&e.isDedupTarget(t)};var UO=kO;function kO(e){this.determiners=e}DO.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)};aa=DO;function DO(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}o(VO,LO=aa),VO.prototype.supports=function(e){return Vb.isRemoteConfigEvent(e)},VO.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")};var LO,FO=VO;function VO(e,t){return void 0===t&&(t=Le.instance),LO.call(this,e,t)||this}o(KO,jO=aa),KO.prototype.supports=function(e){return Vb.isExposureEvent(e)},KO.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")};var jO,BO=KO;function KO(e,t){return void 0===t&&(t=Le.instance),jO.call(this,e,t)||this}HO.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},HO.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 GO=HO;function HO(){}YO.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters,browserProperties:e.browserProperties}}},YO.prototype.process=function(e){var e=this.createInvocationRequestDto(e);return null!=(e=this.invocator.invoke(e).data)?e:null};var zO=YO;function YO(e){this.invocator=e}var JO=l.log,qO=(WO.prototype.onPageStarted=function(e,t){this.track(e,t)},WO.prototype.onPageEnded=function(e,t){},WO.prototype.track=function(e,t){JO.debug("tracking page view");var r,e={key:WO.PAGE_VIEW_EVENT_KEY,properties:((r={})[WO.PAGE_NAME_PROPERTY_KEY]=e.pageTitle,r)};this.core.track(e,this.userManager.resolve(),t)},WO.PAGE_VIEW_EVENT_KEY="$page_view",WO.PAGE_NAME_PROPERTY_KEY="$page_name",WO);function WO(e,t){this.core=e,this.userManager=t}Object.defineProperty(XO.prototype,"currentPage",{get:function(){var e;return null!=(e=this._currentPage)?e:Do.createWithCurrentPage()},enumerable:!1,configurable:!0}),XO.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))},XO.prototype.publishStart=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageStarted(e,t)},XO.prototype.publishEnd=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageEnded(e,t)},XO.prototype.onLifecycleChanged=function(e,t){switch(e){case"pageshow":case"locationChange":var r=Do.createWithCurrentPage();return this.updatePage(r,t);case"visible":case"pagehide":case"blur":case"focus":case"hidden":return}},XO.prototype.addListener=function(e){this.listeners.push(e)};var $O=XO;function XO(){this.listeners=[],this._currentPage=null}var ZO=l.log,QO=(Object.defineProperty(eP.prototype,"lastEngagementTime",{get:function(){return this._lastEngagementTime},enumerable:!1,configurable:!0}),eP.prototype.startEngagement=function(e){ZO.debug("startEngagement timestamp:".concat(e,", page:").concat(this.pageManager.currentPage.url)),this._lastEngagementTime=e},eP.prototype.endEngagement=function(e,t){var r;p.isNullOrUndefined(this._lastEngagementTime)||(r=this._lastEngagementTime,(r=(this._lastEngagementTime=t)-r)<this.minimumEngagementDurationMillis||this.publish({page:e,durationMillis:r},t))},eP.prototype.publish=function(e,t){ZO.debug("onEngagement timestamp:".concat(t,", page:").concat(this.pageManager.currentPage.url));for(var r=0,n=this.listeners;r<n.length;r++)n[r].onEngagement(e,t)},eP.prototype.onPageStarted=function(e,t){this.startEngagement(t)},eP.prototype.onPageEnded=function(e,t){this.endEngagement(e,t)},eP.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}},eP.prototype.addListener=function(e){this.listeners.push(e)},eP);function eP(e,t){this.pageManager=e,this.minimumEngagementDurationMillis=t,this.listeners=[],this._lastEngagementTime=null}rP.prototype.onEngagement=function(e,t){var r,e={key:rP.ENGAGEMENT_EVENT_KEY,properties:((r={})[qO.PAGE_NAME_PROPERTY_KEY]=e.page.pageTitle,r[rP.ENGAGEMENT_TIME_PROPERTY_KEY]=e.durationMillis,r)};this.core.track(e,this.userManager.resolve(),t)},rP.ENGAGEMENT_EVENT_KEY="$engagement",rP.ENGAGEMENT_TIME_PROPERTY_KEY="$engagement_time_ms";var tP=rP;function rP(e,t){this.core=e,this.userManager=t}iP.prototype.setPhoneNumber=function(e,t){e=(new Mo).set(iP.PHONE_NUMBER_PROPERTY_KEY,e.getValue()).build().toSecuredEvent();this.track(e,t)},iP.prototype.unsetPhoneNumber=function(e){var t=(new Mo).unset(iP.PHONE_NUMBER_PROPERTY_KEY).build().toSecuredEvent();this.track(t,e)},iP.prototype.track=function(e,t){var r=this.userManager.resolve();this.core.track(e,r,t)},iP.PHONE_NUMBER_PROPERTY_KEY="$phone_number";var nP=iP;function iP(e,t){this.core=e,this.userManager=t}sP.prototype.getBrowserProperties=function(e){return z_.generate(window,null!=e?e:Do.createWithCurrentPage())};var oP=sP;function sP(){}Object.defineProperty(uP.prototype,"delayMillis",{get:function(){return this.schedule.time.deliverAt-this.requestedAt},enumerable:!1,configurable:!0}),uP.prototype.toString=function(){return"InAppMessageScheduleRequest(scheduleType=".concat(this.scheduleType,", requestedAt=").concat(this.requestedAt,")")};var aP=uP;function uP(e,t,r){this.schedule=e,this.scheduleType=t,this.requestedAt=r}pP.prototype.toRequest=function(e,t){return new aP(this,e,t)},pP.create=function(e){return new pP(K(),e.inAppMessage.key,e.event.user.identifiers,lP.of(e.inAppMessage,e.event.timestamp),e.reason,new hP(e.event.insertId,e.event.event))},pP.fromDelayStorageEntity=function(e,t){return new pP(e.schedule.dispatchId,e.schedule.inAppMessageKey,e.schedule.identifiers,new lP(t,e.schedule.time.deliverAt),e.schedule.reason,e.schedule.eventBasedContext)};var cP=pP;function pP(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessageKey=t,this.identifiers=r,this.time=n,this.reason=i,this.eventBasedContext=o}fP.prototype.delayMillis=function(e){return this.deliverAt-e},fP.of=function(e,t){return new fP(t,e.eventTrigger.delay.deliverAt(t))};var lP=fP;function fP(e,t){this.startedAt=e,this.deliverAt=t}var hP=function(e,t){this.insertId=e,this.event=t},dP=(yP.prototype.initialize=function(){var t=this;this.userEventEmitter.on("event",function(e){t.onEvent(e)})},yP.prototype.destroy=function(){var t=this;this.userEventEmitter.off("event",function(e){t.onEvent(e)})},yP.prototype.onEvent=function(e){this.triggerProcessor.process(e)},yP.prototype.onUserUpdated=function(e,t,r){e=Bt(e),t=Bt(t);this.resetProcessor.process({identifiers:e},{identifiers:t})},yP.prototype.loadDelaySchedule=function(){var r=this;this.delayStorage.values().forEach(function(e){var t=r.clock.currentMillis(),e=cP.fromDelayStorageEntity(e,t).toRequest("STORED",t);r.scheduleProcessor.process(e)})},yP);function yP(e,t,r,n,i,o){this.scheduleProcessor=e,this.delayStorage=t,this.triggerProcessor=r,this.resetProcessor=n,this.userEventEmitter=i,this.clock=o,this.initialize()}o(mP,vP=Ys),mP.prototype.resolve=function(e,t,r){return t.setProperty("experiment_id",r.experiment.id),t.setProperty("experiment_key",r.experiment.key),t.setProperty("variation_id",r.variationId),t.setProperty("variation_key",r.variationKey),t.setProperty("experiment_decision_reason",r.reason),r};var vP,gP=mP;function mP(e){return vP.call(this,e)||this}o(wP,EP=xu);var EP,La=wP;function wP(){return null!==EP&&EP.apply(this,arguments)||this}Object.defineProperty(TP.prototype,"inAppMessage",{get:function(){return this.request.inAppMessage},enumerable:!1,configurable:!0}),TP.of=function(e,t,r){return new TP(e,h.IN_APP_MESSAGE_TARGET,t.targetEvaluations,r,t.properties)};var bP=TP;function TP(e,t,r,n,i){this.request=e,this.reason=t,this.targetEvaluations=r,this.message=n,this.properties=i}Object.defineProperty(_P.prototype,"key",{get:function(){return new h0("IN_APP_MESSAGE",this.inAppMessage.id)},enumerable:!1,configurable:!0});_=_P;function _P(){}o(NP,IP=_),NP.of=function(e){return e instanceof NP?e:new NP(e.workspace,e.user,e.inAppMessage)},NP.prototype.toString=function(){return"InAppMessageLayoutRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var IP,AP=NP;function NP(e,t,r){var n=IP.call(this)||this;return n.workspace=e,n.user=t,n.inAppMessage=r,n}o(SP,OP=La),SP.prototype.supports=function(e){return e instanceof AP},SP.prototype.evaluateInternal=function(e,t){var r=e.inAppMessage.messageContext.experimentContext,r=null!==r?this.evaluateExperiment(e,t,r):this.evaluateDefault(e,t);return bP.of(e,t,r)},SP.prototype.evaluateDefault=function(e,t){var r=MP(e.inAppMessage.messageContext.defaultLang);return this.selector.select(e.inAppMessage,r)},SP.prototype.evaluateExperiment=function(e,t,r){var n,i=p.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[key=".concat(r.key,"]")}),t=this.experimentEvaluator.evaluate(e,t,i),o=MP(e.inAppMessage.messageContext.defaultLang),s=(n=t.variationKey,function(e){return n===e.variationKey});return this.selector.select(e.inAppMessage,function(e){return o(e)&&s(e)})},SP.prototype.record=function(e,t){this.eventRecorder.record(e,t)};var OP,PP=SP;function SP(e,t,r){var n=OP.call(this)||this;return n.experimentEvaluator=e,n.selector=t,n.eventRecorder=r,n}function MP(t){return function(e){return t===e.lang}}CP.prototype.select=function(e,t){t=e.messageContext.messages.find(t);return p.requiredNotNullOrUndefined(t,function(){return"InAppMessage must be decided [".concat(e.id,"]")})};var RP=CP;function CP(){}UP.prototype.record=function(e,t){if(e.reason!==h.OVERRIDDEN)try{this.doRecord(e)}catch(e){l.log.error("Failed to record InAppMessageImpression: ".concat(e))}},UP.prototype.doRecord=function(e){var t=this.storage.get(e.inAppMessage),r={identifiers:e.user.identifiers,timestamp:e.requestedAt},t=Te(Te([],t,!0),[r],!1),r=t.length>this.STORE_MAX_SIZE?t.length-this.STORE_MAX_SIZE:0,t=t.slice(r);this.storage.set(e.inAppMessage,t)};var xP=UP;function UP(e){this.storage=e,this.STORE_MAX_SIZE=100}DP.prototype.toString=function(){return"InAppMessagePresentResponse(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.context.inAppMessage,", displayType=").concat(this.context.message.layout.displayType,", layoutType=").concat(this.context.message.layout.layoutType,")")},DP.of=function(e,t){return new DP(e.dispatchId,t)};var kP=DP;function DP(e,t){this.dispatchId=e,this.context=t}FP.prototype.toString=function(){return"InAppMessagePresentationContext(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.inAppMessage,", message=").concat(this.message,")")},FP.of=function(e){return new FP(e.dispatchId,e.inAppMessage,e.message,e.user,e.reason,e.properties)};var LP=FP;function FP(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessage=t,this.message=r,this.user=n,this.decisionReason=i,this.properties=o}jP.prototype.process=function(e){l.log.debug("InAppMessage Present Request: ".concat(e));var t=this.present(e);return this.recorder.record(e,t),l.log.debug("InAppMessage Present Response: ".concat(t)),t},jP.prototype.present=function(e){var t=LP.of(e);return this.presenter.present(t),kP.of(e,t)};var VP=jP;function jP(e,t){this.presenter=e,this.recorder=t}KP.prototype.isIdentifierChanged=function(e,t){var r=e[Vt.USER],n=t[Vt.USER];if(void 0!==r&&void 0!==n)return r!==n;r=e[Vt.DEVICE],n=t[Vt.DEVICE];return void 0!==r&&void 0!==n&&r!==n};var BP=KP;function KP(){}Object.defineProperty(HP.prototype,"listener",{get:function(){return this._listener},set:function(e){this._listener=e},enumerable:!1,configurable:!0}),HP.prototype.schedule=function(e){var t=this,r=this.scheduler.schedule(e.delayMillis,function(){return t.delayCommand(e)});return new zP(e,r)},HP.prototype.delayCommand=function(e){var t=this.clock.currentMillis(),e=e.schedule.toRequest("DELAYED",t);null!=(t=this.listener)&&t.onSchedule(e)};var GP=HP;function HP(e,t){this.clock=e,this.scheduler=t}YP.prototype.cancel=function(){this.job.cancel(),l.log.debug("InAppMessageDelay cancelled: ".concat(this.delay))};var zP=YP;function YP(e,t){this.delay=e,this.job=t}Object.defineProperty(qP.prototype,"delayMillis",{get:function(){return this.schedule.time.delayMillis(this.requestedAt)},enumerable:!1,configurable:!0}),qP.from=function(e){return new qP(e.schedule,e.requestedAt)},qP.prototype.toString=function(){return"InAppMessageDelay(dispatchId=".concat(this.schedule.dispatchId,", requestedAt=").concat(this.requestedAt,")")};var JP=qP;function qP(e,t){this.schedule=e,this.requestedAt=t}$P.prototype.registerAndDelay=function(e){return this.storage.set(e.schedule.inAppMessageKey,e.schedule.dispatchId,JP.from(e)),this.delay(e)},$P.prototype.delay=function(e){var t=JP.from(e),r=this.scheduler.schedule(t);return this.tasks.set(t.schedule.dispatchId,r),l.log.debug("InAppMessage Delay started: dispatchId=".concat(e.schedule.dispatchId)),t},$P.prototype.delete=function(e){var t=null!=(t=null==(t=this.tasks.get(e.schedule.dispatchId))?void 0:t.delay)?t:null;return t&&l.log.debug("InAppMessage Delay deleted: dispatchId=".concat(e.schedule.dispatchId)),this.tasks.delete(e.schedule.dispatchId),this.storage.remove(e.schedule.inAppMessageKey,e.schedule.dispatchId),t},$P.prototype.cancelAll=function(){var e=Array.from(this.tasks.values());return e.forEach(function(e){return e.cancel()}),this.tasks.clear(),this.storage.clear(),l.log.debug("InAppMessage Delay clear."),e.map(function(e){return e.delay})};var WP=$P;function $P(e,t,r){this.scheduler=e,this.tasks=t,this.storage=r}ZP.prototype.toString=function(){return"InAppMessageDeliverResponse(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", code=").concat(this.code,")")},ZP.of=function(e,t,r){return new ZP(e.dispatchId,e.inAppMessageKey,t,r=void 0===r?null:r)};var XP=ZP;function ZP(e,t,r,n){this.dispatchId=e,this.inAppMessageKey=t,this.code=r,this.presentResponse=n}eS.prototype.toString=function(){return"InAppMessagePresentRequest(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.inAppMessage,", user=").concat(this.user.identifiers,", requestedAt=").concat(this.requestedAt,", reason=").concat(this.reason,", properties=").concat(this.properties,")")},eS.of=function(e,t,r,n,i){return new eS(e.dispatchId,t,i.message,r,e.requestedAt,n.reason,c(c({},e.properties),i.properties))};var QP=eS;function eS(e,t,r,n,i,o,s){this.dispatchId=e,this.inAppMessage=t,this.message=r,this.user=n,this.requestedAt=i,this.reason=o,this.properties=s}o(nS,tS=_),nS.prototype.toString=function(){return"InAppMessageEligibilityRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")};var tS,rS=nS;function nS(e,t,r,n){var i=tS.call(this)||this;return i.workspace=e,i.user=t,i.inAppMessage=r,i.timestamp=n,i}oS.prototype.response=function(t){try{return this.deliver(t)}catch(e){return l.log.error("Failed to process InAppMessageDeliver: ".concat(e)),XP.of(t,"EXCEPTION")}},oS.prototype.process=function(e){l.log.debug("InAppMessage Deliver Request: ".concat(e));e=this.response(e);return l.log.debug("InAppMessage Deliver Response: ".concat(e)),e},oS.prototype.deliver=function(e){var t=this.workspaceFetcher.get();if(!t)return XP.of(e,"WORKSPACE_NOT_FOUND");var r=t.getInAppMessageOrNull(e.inAppMessageKey);if(!r)return XP.of(e,"IN_APP_MESSAGE_NOT_FOUND");var n=this.userDecorator.decorate(this.userManager.resolve());if(this.identifierChecker.isIdentifierChanged(e.identifiers,n.identifiers))return XP.of(e,"IDENTIFIER_CHANGED");var i=this.layoutResolver.resolve(t,r,n),t=new rS(t,n,r,e.requestedAt),t=this.evaluateProcessor.process("DELIVER",t);if(!t.isEligible)return XP.of(e,"INELIGIBLE");r=QP.of(e,r,n,t,i),n=this.presentProcessor.process(r);return XP.of(e,"PRESENT",n)};var iS=oS;function oS(e,t,r,n,i,o,s){this.workspaceFetcher=e,this.userManager=t,this.identifierChecker=r,this.layoutResolver=n,this.evaluateProcessor=i,this.presentProcessor=o,this.userDecorator=s}aS.prototype.get=function(t){return p.requiredNotNullOrUndefined(this.schedulers.find(function(e){return e.supports(t)}),function(){return"Unsupported InAppMessageScheduleType[".concat(t,"]")})};var sS=aS;function aS(e){this.schedulers=e}cS.prototype.toString=function(){return"InAppMessageScheduleResponse(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", code=").concat(this.code,")")},cS.of=function(e,t,r,n){return new cS(e.schedule.dispatchId,e.schedule.inAppMessageKey,t,r=void 0===r?null:r,n=void 0===n?null:n)};var uS=cS;function cS(e,t,r,n,i){this.dispatchId=e,this.inAppMessageKey=t,this.code=r,this.deliverResponse=n,this.delay=i}lS.of=function(e){var t=(new Qi).add("$trigger_event_insert_id",e.schedule.eventBasedContext.insertId).build();return new lS(e.schedule.dispatchId,e.schedule.inAppMessageKey,e.schedule.identifiers,e.requestedAt,e.schedule.reason,p.fromMap(t))},lS.prototype.toString=function(){return"InAppMessageDeliverRequest(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", identifiers=").concat(this.identifiers,", requestedAt=").concat(this.requestedAt,", reason=").concat(this.reason)};var pS=lS;function lS(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessageKey=t,this.identifiers=r,this.requestedAt=n,this.reason=i,this.properties=o}fS.prototype.schedule=function(e,t){switch(e){case"DELIVER":return this.deliver(t);case"DELAY":return this.delay(t);case"IGNORE":return this.ignore(t)}};Q=fS;function fS(){}o(yS,hS=Q),yS.prototype.supports=function(e){return"DELAYED"===e},yS.prototype.deliver=function(e){var t=this.delayManager.delete(e),t=(p.requiredNotNullOrUndefined(t,function(){return"InAppMessageDelay not found (inAppMessageKey=".concat(e.schedule.inAppMessageKey,")")}),pS.of(e)),t=this.deliverProcessor.process(t);return uS.of(e,"DELIVER",t)},yS.prototype.delay=function(e){var t=this.delayManager.delay(e);return uS.of(e,"DELAY",null,t)},yS.prototype.ignore=function(e){var t=this.delayManager.delete(e);return uS.of(e,"IGNORE",null,t)};var hS,dS=yS;function yS(e,t){var r=hS.call(this)||this;return r.deliverProcessor=e,r.delayManager=t,r}o(mS,vS=Q),mS.prototype.supports=function(e){return"TRIGGERED"===e},mS.prototype.deliver=function(e){var t=pS.of(e),t=this.deliverProcessor.process(t);return uS.of(e,"DELIVER",t)},mS.prototype.delay=function(e){var t=this.delayManager.registerAndDelay(e);return uS.of(e,"DELAY",null,t)},mS.prototype.ignore=function(e){return uS.of(e,"IGNORE")};var vS,gS=mS;function mS(e,t){var r=vS.call(this)||this;return r.deliverProcessor=e,r.delayManager=t,r}wS.prototype.process=function(e){l.log.debug("InAppMessage Schedule Request: ".concat(e));e=this.schedule(e);return l.log.debug("InAppMessage Schedule Response: ".concat(e)),e},wS.prototype.schedule=function(t){try{var e=this.actionDeterminer.determine(t);return this.schedulerFactory.get(t.scheduleType).schedule(e,t)}catch(e){return l.log.error("Failed to process InAppMessageSchedule: ".concat(e)),uS.of(t,"EXCEPTION")}},wS.prototype.onSchedule=function(e){this.process(e)};var ES=wS;function wS(e,t){this.actionDeterminer=e,this.schedulerFactory=t}TS.prototype.shouldIgnoreRequest=function(e){return"STORED"===e.scheduleType&&e.delayMillis<0},TS.prototype.determineAction=function(e){var t=e.delayMillis;if(0<t)return"DELAY";if(t>=this.DELIVER_DURATION_THRESHOLD_MILLIS)return"DELIVER";if(t<this.DELIVER_DURATION_THRESHOLD_MILLIS)return"IGNORE";throw new Error("InAppMessageScheduleAction cannot be determined (key=".concat(e.schedule.inAppMessageKey,")"))},TS.prototype.determine=function(e){if(this.shouldIgnoreRequest(e))return"IGNORE";var t=this.determineAction(e);return l.log.debug("InAppMessage ScheduleAction determined: action=".concat(t,", dispatchId=").concat(e.schedule.dispatchId)),t};var bS=TS;function TS(){this.DELIVER_DURATION_THRESHOLD_MILLIS=-1e4}IS.prototype.toString=function(){return"InAppMessageTrigger(inAppMessage=".concat(this.inAppMessage.toString(),", reason=").concat(this.reason,", insertId=").concat(this.event.insertId,", timestamp=").concat(this.event.timestamp,", event=").concat(this.event.event.key,")")};var _S=IS;function IS(e,t,r){this.inAppMessage=e,this.reason=t,this.event=r}NS.prototype.determine=function(e){var t=Vb.isTrackEvent(e)?e:null;if(!t)return null;var r=this.workspaceFetcher.get();if(!r)return null;for(var n=0,i=r.getInAppMessages();n<i.length;n++){var o=i[n];if(this.eventMatcher.matches(r,o,t)){var s=this.evaluate(r,o,t);if(s.isEligible)return new _S(o,s.reason,t)}}return null},NS.prototype.evaluate=function(e,t,r){e=new rS(e,r.user,t,r.timestamp);return this.evaluateProcessor.process("TRIGGER",e)};var AS=NS;function NS(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.evaluateProcessor=r}PS.prototype.handle=function(e){e=cP.create(e).toRequest("TRIGGERED",e.event.timestamp);this.scheduleProcessor.process(e)};var OS=PS;function PS(e){this.scheduleProcessor=e}MS.prototype.process=function(e){try{var t=this.determiner.determine(e);if(!t)return;l.log.debug("InAppMessage triggered: ".concat(t)),this.handler.handle(t)}catch(e){l.log.error("Failed to process InAppMessage event trigger: ".concat(e))}};var SS=MS;function MS(e,t){this.determiner=e,this.handler=t}CS.prototype.process=function(e,t){try{this.identifierChecker.isIdentifierChanged(Bt(e),Bt(t))&&this.delayManager.cancelAll()}catch(e){l.log.error("Failed to reset InAppMessage: ".concat(e))}};var RS=CS;function CS(e,t){this.identifierChecker=e,this.delayManager=t}US.prototype.getDelayStorageItem=function(){var e=this.storage.getItem(this.storageKey);if(p.isNullOrUndefined(e))return null;try{return JSON.parse(e)}catch(e){return l.log.warn("Failed to get delay storage item: ".concat(e)),null}},US.prototype.get=function(e,t){var r=this.getDelayStorageItem();return!p.isNullOrUndefined(r)&&null!=(e=null==(r=r[e])?void 0:r.find(function(e){return e.schedule.dispatchId===t}))?e:null},US.prototype.set=function(e,t,r){var n=this.getDelayStorageItem();if(p.isNullOrUndefined(n))return l.log.debug("No delay storage item found. create new item"),void this.storage.setItem(this.storageKey,JSON.stringify(((i={})[e]=[r],i)));var i=null!=(i=n[e])?i:[];i.push(r),n[e]=i,this.storage.setItem(this.storageKey,JSON.stringify(n))},US.prototype.remove=function(e,t){var r=this.getDelayStorageItem(),n=null==r?void 0:r[e];p.isNullOrUndefined(r)||p.isNullOrUndefined(n)?l.log.debug("No delay storage item found for ".concat(e,". do nothing")):(r[e]=n.filter(function(e){return e.schedule.dispatchId!==t}),0===r[e].length&&delete r[e],this.storage.setItem(this.storageKey,JSON.stringify(r)))},US.prototype.values=function(){var e=this.getDelayStorageItem();return p.isNullOrUndefined(e)?(l.log.debug("No delay storage item found. do nothing"),[]):Object.values(e).flat()},US.prototype.clear=function(){this.storage.removeItem(this.storageKey)};var xS=US;function US(e){this.storage=e,this.storageKey="iam-delay"}DS.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={})[DS.ROOT_TYPE]=r.key.type,t[DS.ROOT_ID]=r.key.id;e=n.createEvent(r,e,i,t);e&&o.push(e)}),o},DS.prototype.createEvent=function(e,t,r,n){var i;return t instanceof n0?(n[DS.CONFIG_ID_PROPERTY_KEY]=null==(i=t.config)?void 0:i.id,n[DS.EXPERIMENT_VERSION_KEY]=t.experiment.version,n[DS.EXECUTION_VERSION_KEY]=t.experiment.executionVersion,Vb.exposure(e.user,t,n,r)):t instanceof u0?Vb.remoteConfig(e.user,t,c(c({},n),t.properties),r):null},DS.ROOT_TYPE="$targetingRootType",DS.ROOT_ID="$targetingRootId",DS.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",DS.EXPERIMENT_VERSION_KEY="$experiment_version",DS.EXECUTION_VERSION_KEY="$execution_version";var kS=DS;function DS(e){this.clock=e}FS.prototype.record=function(e,t){var r=this;this.eventFactory.create(e,t).forEach(function(e){r.eventProcessor.process(e)})};var LS=FS;function FS(e,t){this.eventFactory=e,this.eventProcessor=t}jS.eligible=function(e,t,r){return jS.of(e,t,r,!0)},jS.ineligible=function(e,t,r){return jS.of(e,t,r,!1)},jS.of=function(e,t,r,n){return new jS(String(r),t.targetEvaluations,e.inAppMessage,n,t.get(bP))};var VS=jS;function jS(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.isEligible=n,this.layoutEvaluation=i}KS.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):VS.ineligible(e,t,h.UNSUPPORTED_PLATFORM)};var BS=KS;function KS(){}HS.prototype.evaluate=function(e,t,r){return this.userOverrideMatcher.matches(e,t)?VS.eligible(e,t,h.OVERRIDDEN):r.evaluate(e,t)};var GS=HS;function HS(e){this.userOverrideMatcher=e}YS.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?VS.ineligible(e,t,h.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)};var zS=YS;function YS(){}qS.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?VS.ineligible(e,t,h.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)};var JS=qS;function qS(){}$S.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):VS.ineligible(e,t,h.NOT_IN_IN_APP_MESSAGE_PERIOD)};var WS=$S;function $S(){}ZS.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?VS.ineligible(e,t,h.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)};var XS=ZS;function ZS(e){this.hiddenMatcher=e}eM.prototype.evaluate=function(e,t,r){return this.targetMatcher.matches(e,t)?r.evaluate(e,t):VS.ineligible(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)};var QS=eM;function eM(e){this.targetMatcher=e}rM.prototype.evaluate=function(e,t,r){return this.frequencyCapMatcher.matches(e,t)?VS.ineligible(e,t,h.IN_APP_MESSAGE_FREQUENCY_CAPPED):r.evaluate(e,t)};var tM=rM;function rM(e){this.frequencyCapMatcher=e}iM.prototype.evaluate=function(e,t,r){return VS.eligible(e,t,h.IN_APP_MESSAGE_TARGET)};var nM=iM;function iM(){}sM.prototype.evaluate=function(e,t,r){var n=AP.of(e),n=this.layoutEvaluator.evaluate(n,y0.create());return t.set(bP,n),r.evaluate(e,t)};var oM=sM;function sM(e){this.layoutEvaluator=e}uM.prototype.matches=function(t,e){var r=this;return t.inAppMessage.targetContext.overrides.some(function(e){return r.isUserOverridden(t,e)})},uM.prototype.isUserOverridden=function(e,t){e=e.user.identifiers[t.identifierType];return!p.isNullOrUndefined(e)&&t.identifiers.includes(e)};var aM=uM;function uM(){}pM.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 cM=pM;function pM(e){this.targetMatcher=e}fM.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)};var lM=fM;function fM(e){this.storage=e}dM.prototype.matches=function(e,t){var r=e.inAppMessage,n=e.user,e=e.timestamp;return this.isFrequencyCapped(r,n,e)},dM.prototype.isFrequencyCapped=function(e,t,r){if(!e.eventTrigger.frequencyCap)return!1;var n=this.createMatchContexts(e.eventTrigger.frequencyCap);if(0===n.length)return!1;for(var i=0,o=this.storage.get(e);i<o.length;i++)for(var s=o[i],a=0,u=n;a<u.length;a++)if(u[a].matches(t,r,s))return!0;return!1},dM.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new yM(new gM(i)))}return e.durationCap&&t.push(new yM(new EM(e.durationCap))),t};var hM=dM;function dM(e){this.storage=e}vM.prototype.matches=function(e,t,r){return this.predicate.matches(e,t,r)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount};var yM=vM;function vM(e){this.matchCount=0,this.predicate=e}Object.defineProperty(mM.prototype,"thresholdCount",{get:function(){return this.identifierCap.count},enumerable:!1,configurable:!0}),mM.prototype.matches=function(e,t,r){e=e.identifiers[this.identifierCap.identifierType];if(p.isNullOrUndefined(e))return!1;r=r.identifiers[this.identifierCap.identifierType];return!p.isNullOrUndefined(r)&&e===r};var gM=mM;function mM(e){this.identifierCap=e}Object.defineProperty(wM.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),wM.prototype.matches=function(e,t,r){return t-r.timestamp<=this.durationCap.durationMillis};var EM=wM;function wM(e){this.durationCap=e}TM.prototype.getTriggerFlow=function(){return this.triggerFlow},TM.prototype.getDeliverFlow=function(e){return e?this.deliverReEvaluateFlow:this.deliverFlow};var bM=TM;function TM(e,t,r){this.layoutEvaluator=r;var r=P0.get("targetMatcher"),r=[new BS,new GS(new aM),new zS,new JS,new WS,new QS(new cM(r))],n=[new oM(this.layoutEvaluator)],t=[new tM(new hM(t)),new XS(new lM(e))],e=[new nM];this.triggerFlow=U0.of.apply(U0,Te(Te(Te(Te([],r,!1),n,!1),t,!1),e,!1)),this.deliverFlow=U0.of.apply(U0,Te(Te([],t,!1),e,!1)),this.deliverReEvaluateFlow=U0.of.apply(U0,Te(Te(Te([],r,!1),t,!1),e,!1))}o(AM,_M=La),AM.prototype.supports=function(e){return void 0!==e.inAppMessage},AM.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlow.evaluate(e,t))?r:VS.ineligible(e,t,h.NOT_IN_IN_APP_MESSAGE_TARGET)},AM.prototype.record=function(e,t){this.eventRecorder.record(e,t),t.isEligible||null===t.layoutEvaluation||this.eventRecorder.record(t.layoutEvaluation.request,t.layoutEvaluation)};var _M,IM=AM;function AM(e,t){var r=_M.call(this)||this;return r.evaluationFlow=e,r.eventRecorder=t,r}OM.prototype.process=function(e,t){e=this.resolveFlow(e,t),e=new IM(e,this.eventRecorder);return this.core.inAppMessage(t,y0.create(),e)},OM.prototype.resolveFlow=function(e,t){return"TRIGGER"===e?this.flowFactory.getTriggerFlow():this.flowFactory.getDeliverFlow(null!=(t=null==(e=t.inAppMessage.evaluateContext)?void 0:e.atDeliverTime)&&t)};var NM=OM;function OM(e,t,r){this.core=e,this.flowFactory=t,this.eventRecorder=r}SM.prototype.resolve=function(e,t,r){e=new AP(e,r,t);return this.core.inAppMessage(e,y0.create(),this.layoutEvaluator)};var PM=SM;function SM(e,t){this.core=e,this.layoutEvaluator=t}o(CM,MM=Q),CM.prototype.supports=function(e){return"STORED"===e},CM.prototype.deliver=function(e){var t=this.delayManager.delete(e),r=(p.requiredNotNullOrUndefined(t,function(){return"InAppMessageDelay not found (inAppMessageKey=".concat(e.schedule.inAppMessageKey,")")}),pS.of(e)),r=this.deliverProcessor.process(r);return uS.of(e,"DELIVER",r,t)},CM.prototype.delay=function(e){var t=this.delayManager.delay(e);return l.log.debug("StoredDelay is scheduled (inAppMessageKey=".concat(e.schedule.inAppMessageKey,", delayMillis=").concat(e.delayMillis.toLocaleString(),")")),uS.of(e,"DELAY",null,t)},CM.prototype.ignore=function(e){var t=this.delayManager.delete(e);return uS.of(e,"IGNORE",null,t)};var MM,RM=CM;function CM(e,t){var r=MM.call(this)||this;return r.deliverProcessor=e,r.delayManager=t,r}UM.prototype.decorate=function(e){if(e.identifiers[Vt.SESSION])return e;var t=this.sessionManager.currentSessionId;if(p.isNullOrUndefined(t))return e;t=(new Kt).addIdentifiers(e.identifiers).add(Vt.SESSION,t).build();return c(c({},e),{identifiers:t})};var xM=UM;function UM(e){this.sessionManager=e}DM.prototype.decorate=function(e){var t=this.sessionUserDecorator.decorate(e.user);return e.copyWithUser(t)};var kM=DM;function DM(e){this.sessionUserDecorator=e}FM.prototype.onPageStarted=function(e,t){this.track(e,t)},FM.prototype.onPageEnded=function(e,t){},FM.prototype.track=function(e,t){var r={command:"track",parameters:{event:{key:qO.PAGE_VIEW_EVENT_KEY,properties:((r={})[qO.PAGE_NAME_PROPERTY_KEY]=e.pageTitle,r)},user:void 0},browserProperties:this.browserPropertyProvider.getBrowserProperties(e)};this.invocationProcessor.process(r)};var LM=FM;function FM(e,t){this.invocationProcessor=e,this.browserPropertyProvider=t}function VM(e,t,r,n,i){this.sdkKey=e,this.config=t,this.invocationProcessor=r,this.browserPropertyProvider=n,this.lifecycleCompositeManager=i}var jM={automaticScreenTracking:!1,automaticEngagementTracking:!1},BM=l.log,KM=(GM.prototype.config=function(){var e=this.configResolver.resolve();return c(c({},jM),e)},GM);function GM(e){this.configResolver=e}zM.prototype.supports=function(e){return"getWebViewConfig"in e&&p.isNotNullOrUndefined(e.getWebViewConfig)},zM.prototype.resolveAutomaticEngagementTracking=function(e){return("boolean"!=typeof e.automaticEngagementTracking?jM:e).automaticEngagementTracking},zM.prototype.resolveAutomaticScreenTracking=function(e){return("boolean"!=typeof e.automaticScreenTracking?jM:e).automaticScreenTracking},zM.prototype.resolve=function(){try{if(!this.supports(this.hackleApp))return jM;var e=this.hackleApp.getWebViewConfig(),t=JSON.parse(e);return{automaticEngagementTracking:this.resolveAutomaticEngagementTracking(t),automaticScreenTracking:this.resolveAutomaticScreenTracking(t)}}catch(e){return BM.warn("Failed to resolve web view config: ".concat(e)),jM}};var HM=zM;function zM(e){this.hackleApp=e}JM.prototype.onEngagement=function(e,t){this.track(e,t)},JM.prototype.track=function(e,t){var r={command:"track",parameters:{event:{key:JM.ENGAGEMENT_EVENT_KEY,properties:((r={})[qO.PAGE_NAME_PROPERTY_KEY]=e.page.pageTitle,r[JM.ENGAGEMENT_TIME_PROPERTY_KEY]=e.durationMillis,r)},user:void 0},browserProperties:this.browserPropertyProvider.getBrowserProperties(e.page)};this.invocationProcessor.process(r)},JM.ENGAGEMENT_EVENT_KEY="$engagement",JM.ENGAGEMENT_TIME_PROPERTY_KEY="$engagement_time_ms";var YM=JM;function JM(e,t){this.invocationProcessor=e,this.browserPropertyProvider=t}WM.prototype.addPageListener=function(e){this.pageManager.addListener(e)},WM.prototype.addEngagementListener=function(e){this.engagementManager.addListener(e)},WM.prototype.addLifecycleListener=function(e){this.lifecycleManager.addListener(e)},WM.prototype.initialize=function(){this.lifecycleManager.initialize()},WM.prototype.install=function(e){this.pageManager.addListener(this.engagementManager),this.lifecycleManager.addListener(this.pageManager),this.lifecycleManager.addListener(this.engagementManager),this.lifecycleManager.install(e)};var qM=WM;function WM(e,t,r,n){this.lifecycleManager=e,this.pageManager=t,this.engagementManager=r,this.lifecycleManager=e,this.pageManager=t,this.engagementManager=r,this.install("string"==typeof n?n:null)}$M.prototype.marketing=function(e){return this.operations.set("$marketing",e),this},$M.prototype.information=function(e){return this.operations.set("$information",e),this},$M.prototype.custom=function(e,t){return this.operations.set(e,t),this},$M.prototype.build=function(){return new XM(this.operations)};jl=$M;function $M(){this.operations=new Map}ZM.prototype.toEvent=function(e){var r=new Mo;return this.operations.forEach(function(e,t){r.set(t,e)}),{key:e,properties:p.fromMap(this.operations)}},ZM.prototype.toRecord=function(){var r={};return this.operations.forEach(function(e,t){r[t]=e}),r};var XM=ZM;function ZM(e){this.operations=e}n.HackleSubscriptionStatus=void 0,(E=n.HackleSubscriptionStatus||(n.HackleSubscriptionStatus={})).SUBSCRIBED="SUBSCRIBED",E.UNSUBSCRIBED="UNSUBSCRIBED",E.UNKNOWN="UNKNOWN";QM.prototype.addPageListener=function(e){this.compositeManager.addPageListener(e)},QM.prototype.addEngagementListener=function(e){this.compositeManager.addEngagementListener(e)},QM.prototype.addLifecycleListener=function(e){this.compositeManager.addLifecycleListener(e)},QM.prototype.initialize=function(){this.compositeManager.initialize()};P=QM;function QM(e,t){void 0===t&&(t=ht);var r=new NO,n=new $O,t=new QO(n,t);this.compositeManager=new qM(r,n,t,e)}var eR,tR=l.log,rR=null,nR=(o(iR,eR=VM),iR.prototype.create=function(e){var t=new ss(this.invocationProcessor,this.browserPropertyProvider);return this.initialize(e),t},iR.prototype.initialize=function(e){e.automaticScreenTracking&&this.lifecycleCompositeManager.addPageListener(new LM(this.invocationProcessor,this.browserPropertyProvider)),e.automaticEngagementTracking&&this.lifecycleCompositeManager.addEngagementListener(new YM(this.invocationProcessor,this.browserPropertyProvider)),this.lifecycleCompositeManager.initialize()},iR);function iR(e,t,r,n,i){return eR.call(this,e,t,r,n,i)||this}o(aR,oR=VM),aR.prototype.create=function(e){var t=lR(this.sdkKey,this.config,this.lifecycleCompositeManager),r=new ss(this.invocationProcessor,this.browserPropertyProvider),t=new as(t,r);return this.initialize(t),t},aR.prototype.initialize=function(e){e.syncUser()};var oR,sR=aR;function aR(e,t,r,n,i){return oR.call(this,e,t,r,n,i)||this}cR.prototype.create=function(e,t){var r=this.factories[e];if(r)return r.create(t);throw new Error("Unsupported HackleAppMode: ".concat(e))};var uR=cR;function cR(e,t,r,n,i){this.sdkKey=e,this.config=t,this.invocationProcessor=r,this.browserPropertyProvider=n,this.lifecycleCompositeManager=i,this.factories=((e={})[is.native]=new nR(this.sdkKey,this.config,this.invocationProcessor,this.browserPropertyProvider,this.lifecycleCompositeManager),e[is.web_view_wrapper]=new sR(this.sdkKey,this.config,this.invocationProcessor,this.browserPropertyProvider,this.lifecycleCompositeManager),e)}function pR(e,t){var r,t=cN.config(t),n=(cN.logging(t),new oP),i=n.getBrowserProperties().browserName,o=new $O,s=new NO,a=new QO(o,ht),s=new qM(s,o,a,"string"==typeof i?i:null);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 u=e,c=t,p=window._hackleApp,l=s,f=n;if(null===(h=(new iO).getInvocator(p.getInvocationType(),new GO)))throw new Error("Failed to get invocator with invocationType:".concat(p.getInvocationType()));var h=new zO(h),u=new uR(u,c,h,f,l),c=new KM(new HM(p)),h=null!=(l=null==(f=null==(h=p.getAppMode)?void 0:h.call(p))?void 0:f.toLowerCase())?l:is.native,p=c.config();return u.create(h,p)}}catch(e){tR.error("Unexpected exception while check WebApp client: ".concat(e))}return lR(e,t,s)}function lR(e,t,r){var n=cN.sdk(e,t);if(rR)return tR.debug("use already exists hackleClient"),rR;var i=new Qo,o=(i.initialize(),new pI),s=Xo.getInstance({days:$e,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),a=cN.isBeaconSupported(),u=JN.intercept(n,WN.create()),c=JN.intercept(n,XN.create()),p=u,l=(a&&(p=c),new lN),f=new hN(l,new yN("setTimeout"),cN.pollingIntervalMillis(t)),h=new _O(n,fI.postfix(o,"_".concat(e.slice(0,8)))),d=new _N(mI.clientFetch(t.sdkUrl,n.key),u),h=new RN(h,d),d=(l.add(h),new ON(mI.userTargets(t.sdkUrl),u)),y=new AN(mI.userCohorts(t.sdkUrl),u),v=new qA(r.pageManager),g=new nI(fI.postfix(s,"_".concat(e))),m=g.getUser(),E=t.user||null,g=new tI(ts(),g,d,y,v,r.pageManager,Le.instance,m,E),d=(l.add(g),new uI(t.sessionTimeoutMillis,fI.postfix(s,"_".concat(e.slice(8))))),y=(g.addListener(d),new L_(o,"".concat(Qe,"_").concat(e),Je)),E=new kN(mI.clientDispatch(t.eventUrl),u),l=E,a=(a&&(l=new kN(mI.beaconDispatch(t.eventUrl,n.key),c)),new LN(y,E)),n=new xN(E,l,a),c=new UO([new FO(cN.dedupIntervalMillis(t)),new BO(cN.dedupIntervalMillis(t))]),y=new GN(n,Je,new yN("setTimeout"),We),E=new Zb(y,c,d,g),l=new xM(d),n=new kM(l),w=(E.addDecorator(n),new bO),c=new I0(new dI(s,"".concat(ot,"_").concat(e.slice(0,8)))),n=new I0(new dI(s,"".concat(st,"_").concat(e.slice(0,8)))),b=new wI(fI.prefix(o,"".concat(at,"_").concat(e.slice(0,8),"_"))),T=new sA(fI.prefix(o,"".concat(ut,"_").concat(e.slice(0,8),"_"))),_=new kS(Le.instance),I=new LS(_,E),_=O_.create(h,_,E,[c,n]),A=new nP(_,g),N=new jA(new KA(fI.postfix(s,"_".concat(e.slice(0,8)))),v,_,g),O=new $b(g,_),O=(d.addListener(N),d.addListener(O),new jI(_)),P=new TI([new II,new NI(new PA),new PI(new PA),new MI(b,Le.instance),new CI(new MA),new UI(new MA),new DI(new CA),new FI(new CA)]),P=new uA([new pA,new dA(P),new fA]),O=new vA(Le.instance,O,P),P=new wA([new TA,new IA(O),new NA(O)]),S=new eA(mI.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),S=new KI(ZI.create(S),O,P),O=P0.get("delegatingEvaluator"),P=new PP(new gP(O),new RP,I),O=new xP(T),O=new VP(S,O),M=new BP,b=new bM(b,T,P),T=new PM(_,P),P=new GP(Le.instance,new yN("setTimeout")),o=new xS(fI.prefix(o,"".concat(dt,"_").concat(e.slice(0,8),"_"))),e=new WP(P,new Map,o),b=new NM(_,b,I),I=new iS(h,g,M,T,b,O,l),T=[new dS(I,e),new gS(I,e),new RM(I,e)],O=new ES(new bS,new sS(T)),l=(P.listener=O,new mA(new rA(P0.get("targetMatcher")))),I=new AS(h,l,b),T=new OS(O),P=new SS(I,T),l=new RS(M,e),R=new dP(O,o,P,l,y,Le.instance),b=(g.addListener(R),new sN(h)),I=(new iN(y,b),new tP(_,g)),T=(r.addEngagementListener(I),new qO(_,g)),M=(t.automaticPageTracking&&r.addPageListener(T),new lO(P0.get("targetMatcher"))),e=new EO(s,ct,{days:pt}),O=new cO(h,M,e,_),o=new yO(new gO(v),new UA,e,w),P=new sO(O,o,g,_),l=(r.addPageListener(P),new vI(_,g,c,n)),I=(null==(y=t.devTool)?void 0:y.userExplorer)&&"function"==typeof(null==(b=t.devTool)?void 0:b.userExplorer),s=t.devTool&&I?{manager:t.devTool,userExplorer:l}:void 0,h=new Bi(mI.monitoring(t.monitoringUrl),u,p,new yN("setTimeout"),qe),M=(Ni.addRegistry(h),r.addLifecycleListener(d),r.addLifecycleListener(i),r.addLifecycleListener(a),r.addLifecycleListener(E),r.addLifecycleListener(h),f.start(),PO.create(ft,1)),C=new zo(_,f,d,g,A,M,T,S,s);rR=C;return(new R_).install(_,g),v=Date.now(),e=g.currentUser,O=d.currentSessionId,(V_(m,e)?d.startNewSessionIfNeeded(e,v):d.startNewSession(m,e,v))===O&&N.startNewCampaignIfNeeded(e,v),C.onReady(function(){t.autoOpenDevTool&&(t.devTool?C.showUserExplorer():tR.error("DevTool is not provided")),r.initialize(),w.dispatchDoneEventIfNeeded(),R.loadDelaySchedule()}),C}var fR=function(e,t){return(fR=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 hR=function(){return(hR=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 dR(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 yR(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 vR(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}gR.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},gR.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},gR.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})};Na=gR;function gR(){this.listeners={}}ER.arePropertiesEqual=function(e,t){var r=ER.coerceUnknownToProperties(e),n=ER.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]})},ER.coerceUnknownToProperties=function(e){return"object"==typeof e&&null!==e?e:{}};var mR=ER;function ER(){}bR.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)&&mR.arePropertiesEqual(null==e?void 0:e.properties,null==t?void 0:t.properties)&&mR.arePropertiesEqual(null==e?void 0:e.identifiers,null==t?void 0:t.identifiers)};var wR=bR;function bR(){}var TR=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=pR(e,hR(hR({},t),{SDK_NAME_HEADER:"react-sdk",SDK_VERSION_HEADER:"11.51.0"})),r.getSessionId=r.getSessionId.bind(r),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.setUserProperties=r.setUserProperties.bind(r),r.updateUserProperties=r.updateUserProperties.bind(r),r.updatePushSubscriptions=r.updatePushSubscriptions.bind(r),r.updateSmsSubscriptions=r.updateSmsSubscriptions.bind(r),r.updateKakaoSubscriptions=r.updateKakaoSubscriptions.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.showUserExplorer=r.showUserExplorer.bind(r),r.hideUserExplorer=r.hideUserExplorer.bind(r),r.fetch=r.fetch.bind(r),r.close=r.close.bind(r),r.setInAppMessageListener=r.setInAppMessageListener.bind(r),r.getExperiment=r.getExperiment.bind(r),r.setPhoneNumber=r.setPhoneNumber.bind(r),r.unsetPhoneNumber=r.unsetPhoneNumber.bind(r),r.emitUpdatedUser=r.emitUpdatedUser.bind(r),r.getDisplayedInAppMessageView=r.getDisplayedInAppMessageView.bind(r),null!=t&&t.devTool&&null!=t&&t.autoOpenDevTool&&"undefined"!=typeof window&&r.showUserExplorer(),r}return fR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r),i.prototype.getSessionId=function(){return this.client.getSessionId()},i.prototype.getUser=function(){return this.client.getUser()},i.prototype.setUser=function(t){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.setUser(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserId=function(t){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.setUserId(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setDeviceId=function(t){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.setDeviceId(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserProperty=function(t,r){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.setUserProperty(t,r),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.setUserProperties=function(t){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.setUserProperties(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.updateUserProperties=function(t){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.updateUserProperties(t),this.emitUpdatedUser(this.getUser()),[2]})})},i.prototype.updatePushSubscriptions=function(t){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.updatePushSubscriptions(t),[2]})})},i.prototype.updateSmsSubscriptions=function(t){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.updateSmsSubscriptions(t),[2]})})},i.prototype.updateKakaoSubscriptions=function(t){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.updateKakaoSubscriptions(t),[2]})})},i.prototype.resetUser=function(){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.resetUser(),this.emitUpdatedUser(this.getUser()),[2]})})},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(hR(hR({},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.getExperiment=function(e){return this.client.getExperiment(e)},i.prototype.onInitialized=function(e){return this.client.onInitialized(e)},i.prototype.emitUpdatedUser=function(e){wR.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.prototype.close=function(){this.client.close()},i.prototype.setPhoneNumber=function(t){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.setPhoneNumber(t),[2]})})},i.prototype.unsetPhoneNumber=function(){return dR(this,void 0,void 0,function(){return yR(this,function(e){return this.client.unsetPhoneNumber(),[2]})})},i.prototype.getDisplayedInAppMessageView=function(){return this.client.getDisplayedInAppMessageView()},i}(Na);var k={exports:{}},i={},_R=Object.getOwnPropertySymbols,IR=Object.prototype.hasOwnProperty,AR=Object.prototype.propertyIsEnumerable;var Lu=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]))IR.call(r,o)&&(n[o]=r[o]);if(_R)for(var s=_R(r),a=0;a<s.length;a++)AR.call(r,s[a])&&(n[s[a]]=r[s[a]])}return n},NR=Lu,Xc="function"==typeof Symbol&&Symbol.for,OR=Xc?Symbol.for("react.element"):60103,PR=Xc?Symbol.for("react.portal"):60106,Oa=Xc?Symbol.for("react.fragment"):60107,Ou=Xc?Symbol.for("react.strict_mode"):60108,I=Xc?Symbol.for("react.profiler"):60114,SR=Xc?Symbol.for("react.provider"):60109,MR=Xc?Symbol.for("react.context"):60110,RR=Xc?Symbol.for("react.forward_ref"):60112,T=Xc?Symbol.for("react.suspense"):60113,CR=Xc?Symbol.for("react.memo"):60115,xR=Xc?Symbol.for("react.lazy"):60116,UR="function"==typeof Symbol&&Symbol.iterator;function kR(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 DR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},LR={};function FR(e,t,r){this.props=e,this.context=t,this.refs=LR,this.updater=r||DR}function VR(){}function jR(e,t,r){this.props=e,this.context=t,this.refs=LR,this.updater=r||DR}FR.prototype.isReactComponent={},FR.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(kR(85));this.updater.enqueueSetState(this,e,t,"setState")},FR.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},VR.prototype=FR.prototype;var ca=jR.prototype=new VR,BR=(ca.constructor=jR,NR(ca,FR.prototype),ca.isPureReactComponent=!0,{current:null}),KR=Object.prototype.hasOwnProperty,GR={key:!0,ref:!0,__self:!0,__source:!0};function HR(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)KR.call(t,n)&&!GR.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:OR,type:e,key:o,ref:s,props:i,_owner:BR.current}}function zR(e){return"object"==typeof e&&null!==e&&e.$$typeof===OR}var YR=/\/+/g,JR=[];function qR(e,t,r,n){var i;return JR.length?((i=JR.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 WR(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,JR.length<10&&JR.push(e)}function $R(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 OR:case PR:o=!0}}if(o)return n(i,t,""===r?"."+XR(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+XR(a=t[s],s);o+=e(a,u,n,i)}else if("function"==typeof(u=null!==t&&"object"==typeof t&&"function"==typeof(u=UR&&t[UR]||t["@@iterator"])?u:null))for(t=u.call(t),s=0;!(a=t.next()).done;)o+=e(a=a.value,u=r+XR(a,s++),n,i);else if("object"===a)throw n=""+t,Error(kR(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return o}(e,"",t,r)}function XR(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 ZR(e,t){e.func.call(e.context,t,e.count++)}function QR(e,t,r){var n=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?eC(e,n,r,function(e){return e}):null!=e&&(zR(e)&&(t=i+(!(i=e).key||t&&t.key===e.key?"":(""+e.key).replace(YR,"$&/")+"/")+r,e={$$typeof:OR,type:i.type,key:t,ref:i.ref,props:i.props,_owner:i._owner}),n.push(e))}function eC(e,t,r,n,i){var o="";$R(e,QR,t=qR(t,o=null!=r?(""+r).replace(YR,"$&/")+"/":o,n,i)),WR(t)}var tC={current:null};function rC(){var e=tC.current;if(null===e)throw Error(kR(321));return e}var nC,iC,oC,xa={ReactCurrentDispatcher:tC,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:BR,IsSomeRendererActing:{current:!1},assign:NR},S=(i.Children={map:function(e,t,r){if(null==e)return e;var n=[];return eC(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;$R(e,ZR,t=qR(null,null,t,r)),WR(t)},count:function(e){return $R(e,function(){return null},null)},toArray:function(e){var t=[];return eC(e,t,null,function(e){return e}),t},only:function(e){if(zR(e))return e;throw Error(kR(143))}},i.Component=FR,i.Fragment=Oa,i.Profiler=I,i.PureComponent=jR,i.StrictMode=Ou,i.Suspense=T,i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xa,i.cloneElement=function(e,t,r){if(null==e)throw Error(kR(267,e));var n=NR({},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=BR.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)KR.call(t,a)&&!GR.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:OR,type:e.type,key:i,ref:o,props:n,_owner:s}},i.createContext=function(e,t){return(e={$$typeof:MR,_calculateChangedBits:t=void 0===t?null:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:SR,_context:e},e.Consumer=e},i.createElement=HR,i.createFactory=function(e){var t=HR.bind(null,e);return t.type=e,t},i.createRef=function(){return{current:null}},i.forwardRef=function(e){return{$$typeof:RR,render:e}},i.isValidElement=zR,i.lazy=function(e){return{$$typeof:xR,_ctor:e,_status:-1,_result:null}},i.memo=function(e,t){return{$$typeof:CR,type:e,compare:void 0===t?null:t}},i.useCallback=function(e,t){return rC().useCallback(e,t)},i.useContext=function(e,t){return rC().useContext(e,t)},i.useDebugValue=function(){},i.useEffect=function(e,t){return rC().useEffect(e,t)},i.useImperativeHandle=function(e,t,r){return rC().useImperativeHandle(e,t,r)},i.useLayoutEffect=function(e,t){return rC().useLayoutEffect(e,t)},i.useMemo=function(e,t){return rC().useMemo(e,t)},i.useReducer=function(e,t,r){return rC().useReducer(e,t,r)},i.useRef=function(e){return rC().useRef(e)},i.useState=function(e){return rC().useState(e)},i.version="16.14.0",{}),Zc=Function.call.bind(Object.prototype.hasOwnProperty),sC=function(){};function aC(e,t,r,n,i){if("production"!==production)for(var o in e)if(oC(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,nC)}catch(e){s=e}!s||s instanceof Error||sC((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 iC)&&(iC[s.message]=!0,o=i?i():"",sC("Failed "+r+" type: "+s.message+(null!=o?o:"")))}}if("production"!==production&&(nC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",iC={},oC=Zc,sC=function(e){e="Warning: "+e;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(e){}}),aC.resetWarningCache=function(){"production"!==production&&(iC={})},"production"!==production){var uC=Lu,cC=aC,t="function"==typeof Symbol&&Symbol.for,pC=t?Symbol.for("react.element"):60103,lC=t?Symbol.for("react.portal"):60106,fC=t?Symbol.for("react.fragment"):60107,hC=t?Symbol.for("react.strict_mode"):60108,dC=t?Symbol.for("react.profiler"):60114,yC=t?Symbol.for("react.provider"):60109,vC=t?Symbol.for("react.context"):60110,gC=t?Symbol.for("react.concurrent_mode"):60111,mC=t?Symbol.for("react.forward_ref"):60112,EC=t?Symbol.for("react.suspense"):60113,wC=t?Symbol.for("react.suspense_list"):60120,bC=t?Symbol.for("react.memo"):60115,TC=t?Symbol.for("react.lazy"):60116,_C=t?Symbol.for("react.block"):60121,IC=t?Symbol.for("react.fundamental"):60117,AC=t?Symbol.for("react.responder"):60118,NC=t?Symbol.for("react.scope"):60119,OC="function"==typeof Symbol&&Symbol.iterator,PC="@@iterator";function SC(e){if(null===e||"object"!=typeof e)return null;e=OC&&e[OC]||e[PC];return"function"==typeof e?e:null}var MC={current:null},RC={current:null},CC=/^(.*)[\\\/]/,xC=1;function UC(e){if(null==e)return null;if("number"==typeof e.tag&&jC("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 fC:return"Fragment";case lC:return"Portal";case dC:return"Profiler";case hC:return"StrictMode";case EC:return"Suspense";case wC:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case vC:return"Context.Consumer";case yC:return"Context.Provider";case mC:return t=e.render,r="ForwardRef",t=t.displayName||t.name||"",e.displayName||(""!==t?r+"("+t+")":r);case bC:return UC(e.type);case _C:return UC(e.render);case TC:r=(t=e)._status===xC?t._result:null;if(r)return UC(r)}var t,r;return null}var kC={},DC=null;function LC(e){DC=e}kC.getCurrentStack=null,kC.getStackAddendum=function(){var e,t,r,n,i,o="",s=(DC&&(e=UC(DC.type),r=DC._owner,o+=(e=e,t=DC._source,r=r&&UC(r.type),i="",t?(n=(s=t.fileName).replace(CC,""),i=" (at "+(n=/^index\./.test(n)&&(s=s.match(CC))&&(s=s[1])?s.replace(CC,"")+"/"+n:n)+":"+t.lineNumber+")"):r&&(i=" (created by "+r+")"),"\n in "+(e||"Unknown")+i)),kC.getCurrentStack);return s&&(o+=s()||""),o};var FC={ReactCurrentDispatcher:MC,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:RC,IsSomeRendererActing:{current:!1},assign:uC};function VC(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];BC("warn",e,r)}function jC(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];BC("error",e,r)}function BC(e,t,r){0<r.length&&"string"==typeof r[r.length-1]&&0===r[r.length-1].indexOf("\n in")||""!==(n=FC.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){}}uC(FC,{ReactDebugCurrentFrame:kC,ReactComponentTreeHook:{}});var KC={};function GC(e,t){var e=e.constructor,e=e&&(e.displayName||e.name)||"ReactClass",r=e+"."+t;KC[r]||(jC("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),KC[r]=!0)}var HC={isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,r){GC(e,"forceUpdate")},enqueueReplaceState:function(e,t,r,n){GC(e,"replaceState")},enqueueSetState:function(e,t,r,n){GC(e,"setState")}},zC={};function YC(e,t,r){this.props=e,this.context=t,this.refs=zC,this.updater=r||HC}Object.freeze(zC),YC.prototype.isReactComponent={},YC.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")},YC.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var JC,qC={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(JC in qC)qC.hasOwnProperty(JC)&&!function(e,t){Object.defineProperty(YC.prototype,e,{get:function(){VC("%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1])}})}(JC,qC[JC]);function WC(){}function $C(e,t,r){this.props=e,this.context=t,this.refs=zC,this.updater=r||HC}WC.prototype=YC.prototype,(t=$C.prototype=new WC).constructor=$C,uC(t,YC.prototype),t.isPureReactComponent=!0;var XC,ZC,QC=Object.prototype.hasOwnProperty,ex={key:!0,ref:!0,__self:!0,__source:!0};function tx(e){if(QC.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return}return void 0!==e.ref}function rx(e){if(QC.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return}return void 0!==e.key}var nx={},ix=function(e,t,r,n,i,o,s){e={$$typeof:pC,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 ox(e,t,r){var n,i={},o=null,s=null,a=null,u=null;if(null!=t)for(n in tx(t)&&(s=t.ref,"string"==typeof(c=t).ref&&RC.current&&c.__self&&RC.current.stateNode!==c.__self&&(l=UC(RC.current.type),nx[l]||(jC('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',UC(RC.current.type),c.ref),nx[l]=!0))),rx(t)&&(o=""+t.key),a=void 0===t.__self?null:t.__self,u=void 0===t.__source?null:t.__source,t)QC.call(t,n)&&!ex.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),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(){ZC||(ZC=!0,jC("%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(){XC||(XC=!0,jC("%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}))),ix(e,o,s,a,u,RC.current,i)}function sx(e){return"object"==typeof e&&null!==e&&e.$$typeof===pC}var ax=".",ux=":",cx=!1,px=/\/+/g;function lx(e){return(""+e).replace(px,"$&/")}var fx=10,hx=[];function dx(e,t,r,n){var i;return hx.length?((i=hx.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 yx(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,hx.length<fx&&hx.push(e)}function vx(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 pC:case lC:a=!0}}if(a)return n(i,t,""===r?ax+gx(t,0):r),1;var u=0,c=""===r?ax:r+ux;if(Array.isArray(t))for(var p=0;p<t.length;p++)u+=e(o=t[p],c+gx(o,p),n,i);else if("function"==typeof(r=SC(t))){r===t.entries&&(cx||VC("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."),cx=!0);for(var l,f=r.call(t),h=0;!(l=f.next()).done;)u+=e(o=l.value,c+gx(o,h++),n,i)}else if("object"==s)throw r="",r=" If you meant to render a collection of children, use an array instead."+kC.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 gx(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 mx(e,t,r){var n=e.func,i=e.context;n.call(i,t,e.count++)}function Ex(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)?wx(o,n,r,function(e){return e}):null!=o&&(sx(o)&&(e=i+(!(s=o).key||t&&t.key===o.key?"":lx(o.key)+"/")+r,o=ix(s.type,e,s.ref,s._self,s._source,s._owner,s.props)),n.push(o))}function wx(e,t,r,n,i){var o="",t=dx(t,o=null!=r?lx(r)+"/":o,n,i);vx(e,Ex,t),yx(t)}function bx(e){return"string"==typeof e||"function"==typeof e||e===fC||e===gC||e===dC||e===hC||e===EC||e===wC||"object"==typeof e&&null!==e&&(e.$$typeof===TC||e.$$typeof===bC||e.$$typeof===yC||e.$$typeof===vC||e.$$typeof===mC||e.$$typeof===IC||e.$$typeof===AC||e.$$typeof===NC||e.$$typeof===_C)}function Tx(){var e=MC.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 _x(){if(RC.current){var e=UC(RC.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}var Ix=!1,Ax={};function Nx(e,t){var r;e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,t=t,(r=_x())||(t="string"==typeof t?t:t.displayName||t.name)&&(r="\n\nCheck the top-level render call using <"+t+">."),Ax[t=r]||(Ax[t]=!0,r="",e&&e._owner&&e._owner!==RC.current&&(r=" It was passed a child from "+UC(e._owner.type)+"."),LC(e),jC('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),LC(null)))}function Ox(e,t){if("object"==typeof e)if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=e[r];sx(n)&&Nx(n,t)}else if(sx(e))e._store&&(e._store.validated=!0);else if(e){var i=SC(e);if("function"==typeof i&&i!==e.entries)for(var o,s=i.call(e);!(o=s.next()).done;)sx(o.value)&&Nx(o.value,t)}}function Px(e){var t=e.type;if(null!=t&&"string"!=typeof t){var r,n=UC(t);if("function"==typeof t)r=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==mC&&t.$$typeof!==bC)return;r=t.propTypes}r?(LC(e),cC(r,e.props,"prop",n,kC.getStackAddendum),LC(null)):void 0===t.PropTypes||Ix||(Ix=!0,jC("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",n||"Unknown")),"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||jC("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Sx(e,t,r){var n,i=bx(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+".":"")||_x(),null===e?s="null":Array.isArray(e)?s="array":void 0!==e&&e.$$typeof===pC?(s="<"+(UC(e.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,jC("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)),ox.apply(this,arguments));if(null==t)return t;if(i)for(var o=2;o<arguments.length;o++)Ox(arguments[o],e);if(e===fC){var s=t;LC(s);for(var a=Object.keys(s.props),u=0;u<a.length;u++){var c=a[u];if("children"!==c&&"key"!==c){jC("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",c);break}}null!==s.ref&&jC("Invalid attribute `ref` supplied to `React.Fragment`."),LC(null)}else Px(t);return t}var Mx=!1;try{var Rx=Object.freeze({}),Cx=new Map([[Rx,null]]),xx=new Set([Rx]);Cx.set(0,0),xx.add(0)}catch(e){}function Ux(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=uC({},e.props),s=e.key,a=e.ref,u=e._self,c=e._source,p=e._owner;if(null!=t)for(n in tx(t)&&(a=t.ref,p=RC.current),rx(t)&&(s=""+t.key),e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)QC.call(t,n)&&!ex.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 ix(e.type,s,a,u,c,p,o)}.apply(this,arguments),i=2;i<arguments.length;i++)Ox(arguments[i],n.type);return Px(n),n}function kx(e){var t=Sx.bind(null,e);return t.type=e,Mx||(Mx=!0,VC("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 VC("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),t}t=Sx,S.Children={map:function(e,t,r){if(null==e)return e;var n=[];return wx(e,n,null,t,r),n},forEach:function(e,t,r){if(null==e)return e;t=dx(null,null,t,r),vx(e,mx,t),yx(t)},count:function(e){return vx(e,function(){return null},null)},toArray:function(e){var t=[];return wx(e,t,null,function(e){return e}),t},only:function(e){if(sx(e))return e;throw Error("React.Children.only expected to receive a single React element child.")}},S.Component=YC,S.Fragment=fC,S.Profiler=dC,S.PureComponent=$C,S.StrictMode=hC,S.Suspense=EC,S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FC,S.cloneElement=Ux,S.createContext=function(e,t){void 0===t?t=null:null!==t&&"function"!=typeof t&&jC("createContext: Expected the optional second argument to be a function. Instead received: %s",t);var r={$$typeof:vC,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},n=!(r.Provider={$$typeof:yC,_context:r}),i=!1,t={$$typeof:vC,_context:r,_calculateChangedBits:r._calculateChangedBits};return Object.defineProperties(t,{Provider:{get:function(){return i||(i=!0,jC("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,jC("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},S.createElement=t,S.createFactory=kx,S.createRef=function(){var e={current:null};return Object.seal(e),e},S.forwardRef=function(e){return null!=e&&e.$$typeof===bC?jC("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?jC("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&jC("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||jC("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:mC,render:e}},S.isValidElement=sx,S.lazy=function(e){var t,r,n={$$typeof:TC,_ctor:e,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){jC("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){jC("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},S.memo=function(e,t){return bx(e)||jC("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e),{$$typeof:bC,type:e,compare:void 0===t?null:t}},S.useCallback=function(e,t){return Tx().useCallback(e,t)},S.useContext=function(e,t){var r,n=Tx();return void 0!==t&&jC("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?jC("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&&jC("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")),n.useContext(e,t)},S.useDebugValue=function(e,t){return Tx().useDebugValue(e,t)},S.useEffect=function(e,t){return Tx().useEffect(e,t)},S.useImperativeHandle=function(e,t,r){return Tx().useImperativeHandle(e,t,r)},S.useLayoutEffect=function(e,t){return Tx().useLayoutEffect(e,t)},S.useMemo=function(e,t){return Tx().useMemo(e,t)},S.useReducer=function(e,t,r){return Tx().useReducer(e,t,r)},S.useRef=function(e){return Tx().useRef(e)},S.useState=function(e){return Tx().useState(e)},S.version="16.14.0"}"production"===production?k.exports=i:k.exports=S;var Dx=k.exports,Lx=k.exports.createContext({hackle:void 0,userVersion:0,initialized:!1}),A=Lx.Consumer,Fx=Lx.Provider;var Vx=l.log;function jx(e,t){e=Bx(e,t=void 0===t?"A":t);return{isLoading:e.isLoading,variation:e.decision.variation}}function Bx(e,t){void 0===t&&(t="A");var r=k.exports.useContext(Lx),n=r.hackle,i=r.userVersion,o=r.initialized,s=k.exports.useCallback(function(){return o?(null==n?void 0:n.variationDetail(e))||wt.of(t,h.EXCEPTION):wt.of(t,h.SDK_NOT_READY)},[t,e,n,o]),r=vR(k.exports.useState(function(){return n?s():(Vx.error("HackleClient is not existed"),wt.of(t,h.EXCEPTION))}),2),a=r[0],r=r[1],i={key:e,userVersion:i,initialized:o},u=vR(k.exports.useState(i),2),c=u[0],u=u[1];return Hx(c,i)||(u(i),r(s())),{isLoading:!o,decision:a}}function Kx(e){e=Gx(e);return{isLoading:e.isLoading,isOn:e.decision.isOn}}function Gx(e){var t=k.exports.useContext(Lx),r=t.hackle,n=t.userVersion,i=t.initialized,o=k.exports.useCallback(function(){return i?(null==r?void 0:r.featureFlagDetail(e))||Tt.off(h.EXCEPTION):Tt.off(h.SDK_NOT_READY)},[e,r,i]),t=vR(k.exports.useState(function(){return r?o():(Vx.error("HackleClient is not existed"),Tt.off(h.EXCEPTION))}),2),s=t[0],t=t[1],n={key:e,userVersion:n,initialized:i},a=vR(k.exports.useState(n),2),u=a[0],a=a[1];return Hx(u,n)||(a(n),t(o())),{isLoading:!i,decision:s}}function Hx(e,t){return e.initialized===t.initialized&&e.key===t.key&&e.userVersion===t.userVersion}function zx(e){var t,r=e.experimentKey,e=e.children,n=(r=jx(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 Yx(e){return e.variation,e=e.children,k.exports.createElement(k.exports.Fragment,null,e)}function Jx(e){var t=(r=Kx(e.featureKey)).isLoading,r=r.isOn;return t?null:Dx.createElement(Dx.Fragment,null,e.children(r))}n.Bucket=xt,n.Cohort=Vn,n.Container=or,n.ContainerGroup=ar,n.CoreVersion=gr,n.Decision=wt,n.DecisionReason=h,n.DefaultBrowserPropertyProvider=oP,n.Delay=kn,n.EXPERIMENT_IMPLEMENTATION_TYPE=Pt,n.EmptyHackleRemoteConfig=It,n.EmptyParameterConfig=Ve,n.EventType=Lt,n.Experiment=St,n.FeatureFlagDecision=Tt,n.HackleContext=Lx,n.HackleContextConsumer=A,n.HackleContextProvider=Fx,n.HackleExperiment=zx,n.HackleFeature=Jx,n.HackleInAppMessageActionImpl=Ln,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=vR(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 hR(hR({},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 hR(hR({},e),{initialized:!0})})},function(){a(function(e){return hR(hR({},e),{initialized:!0})})}).catch(function(){a(function(e){return hR(hR({},e),{initialized:!0})})})},[t]),i||s.initialized?Dx.createElement(Fx,{value:s},e):null},n.HackleSubscriptionOperations=XM,n.HackleSubscriptionOperationsBuilder=jl,n.HackleVariation=Yx,n.IAM_ACTION_AREA=["BUTTON","IMAGE","MESSAGE","X_BUTTON"],n.IAM_ACTION_TYPE=Dr,n.IAM_BEHAVIOR=kr,n.IAM_DISPLAY_TYPE=Cr,n.IAM_HORIZONTAL_ALIGNMENT=Fr,n.IAM_LAYOUT_TYPE=xr,n.IAM_ORIENTATION=Ur,n.IAM_PLATFORM_TYPE=Mr,n.IAM_STATUS=Sr,n.IAM_TIMEUNIT=Rr,n.IAM_VERTICAL_ALIGNMENT=Lr,n.IdentifierType=Vt,n.IdentifiersBuilder=Kt,n.InAppMessage=Vr,n.InAppMessageAction=Sn,n.InAppMessageAfterCondition=xn,n.InAppMessageAlignment=fn,n.InAppMessageBackground=Pn,n.InAppMessageButton=_n,n.InAppMessageButtonStyle=On,n.InAppMessageContext=on,n.InAppMessageContextLayout=pn,n.InAppMessageContextMessage=un,n.InAppMessageDurationCap=Zr,n.InAppMessageEvaluateContext=Rn,n.InAppMessageEventFrequencyCap=qr,n.InAppMessageEventTrigger=zr,n.InAppMessageEventTriggerRule=Yr,n.InAppMessageExperimentContext=an,n.InAppMessageIdentifierCap=$r,n.InAppMessageImage=dn,n.InAppMessageImageAutoScroll=vn,n.InAppMessagePeriodAlways=Br,n.InAppMessagePeriodCustom=Gr,n.InAppMessagePositionalButton=An,n.InAppMessageTargetContext=en,n.InAppMessageText=mn,n.InAppMessageTextAttribute=wn,n.InAppMessageTextStyle=Tn,n.InAppMessageUserOverride=rn,n.Logger=l,n.MATCH_OPERATORS=_r,n.MATCH_TYPES=br,n.MATCH_VALUE_TYPES=Tr,n.MetaVersion=Er,n.ParameterConfiguration=Nt,n.PropertyOperations=Co,n.PropertyOperationsBuilder=Mo,n.RemoteConfigDecision=mt,n.RemoteConfigParameter=cr,n.RemoteConfigParameterValue=hr,n.RemoteConfigTargetRule=lr,n.SEGMENT_TYPES=Nr,n.Segment=nr,n.Slot=kt,n.SplitUrlConfig=jn,n.SplitUrlTargets=Kn,n.TARGET_ACTION_TYPES=Ir,n.TARGET_KEY_TYPES=Ar,n.Target=zt,n.TargetAction=Qt,n.TargetCondition=Jt,n.TargetKey=Wt,n.TargetMatch=Xt,n.TargetRule=tr,n.TargetingType=Or,n.UserTargetEvent=Hn,n.Variation=Rt,n.Version=yr,n.WebViewLifecycleCompositeManager=P,n.createInstance=function(e,t){return new TR(e,t)},n.getUserId=ts,n.removeUserId=rs,n.resolveIdentifiers=Bt,n.sanitizeUser=Ht,n.setUserId=function(e){Xo.getInstance().setItem(Ze,e)},n.useFeature=function(e){var t=(n=k.exports.useContext(Lx)).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=vR(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&Vx.error("HackleClient is not existed"),!1)}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=vR(k.exports.useState(r),2))[0],n=n[1];return Hx(a,r)||(n(r),s(i())),o},n.useFeatureFlagDetail=function(e){var t=(n=k.exports.useContext(Lx)).hackle,r=n.userVersion,n=n.initialized,i=k.exports.useCallback(function(){return(null==t?void 0:t.featureFlagDetail(e))||Tt.off(h.EXCEPTION)},[e,t,n]),o=(s=vR(k.exports.useState(function(){return t?i():("undefined"!=typeof window&&Vx.error("HackleClient is not existed"),Tt.off(h.EXCEPTION))}),2))[0],s=s[1],r={key:e,userVersion:r,initialized:n},a=(n=vR(k.exports.useState(r),2))[0],n=n[1];return Hx(a,r)||(n(r),s(i())),o},n.useLoadableFeature=Kx,n.useLoadableFeatureDetail=Gx,n.useLoadableRemoteConfig=function(){var e=(o=k.exports.useContext(Lx)).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=vR(k.exports.useState(function(){return e||Vx.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(a=vR(k.exports.useState(t),2))[0],a=a[1];return Hx(s,t)||(a(t),o(n())),{isLoading:!r,remoteConfig:i}},n.useLoadableVariation=jx,n.useLoadableVariationDetail=Bx,n.useRemoteConfig=function(){var e=(r=k.exports.useContext(Lx)).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=vR(k.exports.useState(function(){return e||Vx.error("HackleClient is not existed"),n()}),2))[0],o=o[1],t={userVersion:t,initialized:r},s=(r=vR(k.exports.useState(t),2))[0],r=r[1];return Hx(s,t)||(r(t),o(n())),i},n.useTrack=function(){var t=k.exports.useContext(Lx).hackle;return t?function(e){return null==t?void 0:t.track(e)}:(Vx.error("HackleClient is not existed"),function(){})},n.useVariation=function(e,t){void 0===t&&(t="A");var r=(a=k.exports.useContext(Lx)).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=vR(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&Vx.error("HackleClient is not existed"),t)}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(c=vR(k.exports.useState(n),2))[0],c=c[1];return Hx(u,n)||(c(n),a(o())),s},n.useVariationDetail=function(e,t){void 0===t&&(t="A");var r=(i=k.exports.useContext(Lx)).hackle,n=i.userVersion,i=i.initialized,o=k.exports.useCallback(function(){return(null==r?void 0:r.variationDetail(e))||wt.of(t,h.EXCEPTION)},[t,e,r,i]),s=(a=vR(k.exports.useState(function(){return r?o():("undefined"!=typeof window&&Vx.error("HackleClient is not existed"),wt.of(t,h.EXCEPTION))}),2))[0],a=a[1],n={key:e,userVersion:n,initialized:i},u=(i=vR(k.exports.useState(n),2))[0],i=i[1];return Hx(u,n)||(i(n),a(o())),s},Object.defineProperty(n,"__esModule",{value:!0})});