PageSourceSearch

https://www.carrotins.com/_next/static/chunks/5b5212ba-1904d39105801b4c.js

js carrotins.com collected 2026-10-02 05:02:36 UTC 339,108 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[206421],{734061:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(575228),o=r(869653),s=function(){function e(){}return 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 Error(t());return e},e.fromMap=function(e){var t={};return e.forEach(function(e,r){t[r]=e}),t},e}(),a=function(){function e(){}return e.mapNotNullOrUndefined=function(e,t){for(var r=[],n=0;n<e.length;n++){var i=t(e[n]);s.isNotNullOrUndefined(i)&&r.push(i)}return r},e.mapOrUndefined=function(e,t){for(var r=[],n=0;n<e.length;n++){var i=t(e[n]);if(s.isNullOrUndefined(i))return;r.push(i)}return r},e.associateTo=function(e,t,r){for(var n=0;n<e.length;n++){var i=r(e[n]);t.set(i[0],i[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;n<e.length;n++){var i=t(e[n]),o=i[0],s=i[1];r[o]=s}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,t){return e.reduce(function(e,r){return e+t(r)},0)},e}(),u={DISABLE:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},c=function(){function e(){}return e.setLogLevel=function(e){void 0===e&&(e=u.INFO),this.logLevel=e},e.initCounter=function(e){this.counters=a.associate(Object.keys(u),function(t){return[t,e(t)]})},e._log=function(e,t){var r;switch(e){case"WARN":r="orange";break;case"ERROR":r="red";break;default:r="#AAAAAA"}if(t instanceof Error)p.log(e,r,t.message,t);else try{p.log(e,r,t)}catch(e){}},e.increment=function(t){var r,n;null==(n=null==(r=e.counters)?void 0:r.get(t))||n.increment()},e.logLevel=u.INFO,e.log={error:function(t){e.logLevel>=u.ERROR&&(e._log("ERROR",t),e.increment("ERROR"))},warn:function(t){e.logLevel>=u.WARN&&(e._log("WARN",t),e.increment("WARN"))},info:function(t){e.logLevel>=u.INFO&&(e._log("INFO",t),e.increment("INFO"))},debug:function(t){e.logLevel>=u.DEBUG&&(e._log("DEBUG",t),e.increment("DEBUG"))}},e}(),p=function(){function e(){}return e.log=function(e,t,r,n){try{console.log("%c[".concat(e,"] Hackle: ").concat(r),"color: ".concat(t))}catch(e){}},e}(),l=function(e,t){return(l=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 h(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var f=function(){return(f=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 d(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})}function y(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var u=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=t.call(e,s)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function v(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)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var g=function(){function e(){}return e.asString=function(e){switch(typeof e){case"string":return e;case"number":return e.toString();case"boolean":return e?"true":"false";default:return}},e.asNumber=function(e){switch(typeof e){case"number":return this.asActualNumber(e);case"string":return this.asActualNumber(Number(e));default:return}},e.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}},e.asActualNumber=function(e){return!isNaN(e)&&isFinite(e)?e:void 0},e}(),m=c.log,E=function(){function e(){}return e.isEqual=function(e,t){return e.type===t.type&&e.value===t.value},e.isEquals=function(e,t){if(null==t)return!1;var r=Object.keys(e);return r.length===Object.keys(t).length&&r.every(function(r){return e[r]===t[r]})},e.sanitize=function(e){var t={};if(s.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i=n[r],o=i[0],a=i[1];
1if(this.isValidType(o)){var u=this.sanitizeValue(a);s.isNullOrUndefined(u)?m.debug("Invalid identifier value. The identifier type value be a string of 512 characters or less. [".concat(o,"]")):t[o]=u}else m.debug("Invalid identifier type. The identifier type must be a string of 128 characters or less. [".concat(o,"]"))}return t},e.isValidType=function(e){return!s.isNullOrUndefined(e)&&"string"==typeof e&&e.length>0&&e.length<=this.MAX_IDENTIFIER_TYPE_LENGTH},e.sanitizeValue=function(e){return"string"==typeof e&&e.length>0&&e.length<=this.MAX_IDENTIFIER_VALUE_LENGTH?e:"number"==typeof e?e.toString():null},e.MAX_IDENTIFIER_TYPE_LENGTH=128,e.MAX_IDENTIFIER_VALUE_LENGTH=512,e}(),w=c.log,b=function(){function e(){}return e.sanitize=function(e){var t={};if(s.isNullOrUndefined(e))return t;for(var r=0,n=Object.entries(e);r<n.length;r++){var i=n[r],o=i[0],a=i[1];if(Object.keys(t).length>=this.MAX_PROPERTIES_COUNT){w.debug("The number of properties cannot exceed 128. Drops excess properties. [".concat(o,", ").concat(a,"]"));break}if(this.isValidKey(o)){var u=this.sanitizeValue(o,a);s.isNullOrUndefined(u)?w.debug("Invalid property value. The property value mus be 'string(..1024)', 'number', 'boolean', or 'array' type. [".concat(a,"]")):t[o]=u}else w.debug("Invalid property key. The property key must be a string of 128 characters or less. [".concat(o,"]"))}return t},e.isValidProperty=function(e,t){return this.isValidKey(e)&&this.isValidValue(t)},e.isValidKey=function(e){return s.isNotNullOrUndefined(e)&&"string"==typeof e&&e.length>0&&e.length<=this.MAX_PROPERTY_KEY_LENGTH},e.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},e.isValidValue=function(e){return!s.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))},e.isValidElement=function(e){return!s.isNullOrUndefined(e)&&("string"==typeof e?e.length>0&&e.length<=this.MAX_PROPERTY_VALUE_LENGTH:"number"==typeof e)},e.truncateStringValue=function(e){return"string"==typeof e&&e.length>this.MAX_PROPERTY_VALUE_LENGTH?e.slice(0,this.MAX_PROPERTY_VALUE_LENGTH):e},e.SYSTEM_PROPERTY_KEY_PREFIX="$",e.MAX_PROPERTIES_COUNT=128,e.MAX_PROPERTY_KEY_LENGTH=128,e.MAX_PROPERTY_VALUE_LENGTH=1024,e}(),T=["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days"],I=["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],A=function(){function e(){}return e.nanosToUnit=function(t,r){switch(r){case"nanoseconds":return t;case"microseconds":return t/(e.C1/e.C0);case"milliseconds":return t/(e.C2/e.C0);case"seconds":return t/(e.C3/e.C0);case"minutes":return t/(e.C4/e.C0);case"hours":return t/(e.C5/e.C0);case"days":return t/(e.C6/e.C0)}},e.microsToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C1/e.C0);case"milliseconds":return t/(e.C2/e.C1);case"microseconds":return t;case"seconds":return t/(e.C3/e.C1);case"minutes":return t/(e.C4/e.C1);case"hours":return t/(e.C5/e.C1);case"days":return t/(e.C6/e.C1)}},e.millisToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C2/e.C0);case"microseconds":return t*(e.C2/e.C1);case"milliseconds":return t;case"seconds":return t/(e.C3/e.C2);case"minutes":return t/(e.C4/e.C2);case"hours":return t/(e.C5/e.C2);case"days":return t/(e.C6/e.C2)}},e.secondsToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C3/e.C0);case"microseconds":return t*(e.C3/e.C1);case"milliseconds":return t*(e.C3/e.C2);case"seconds":return t;case"minutes":return t/(e.C4/e.C3);case"hours":return t/(e.C5/e.C3);case"days":return t/(e.C6/e.C3)}},e.minutesToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C4/e.C0);case"microseconds":return t*(e.C4/e.C1);case"milliseconds":return t*(e.C4/e.C2);case"seconds":return t*(e.C4/e.C3);case"minutes":return t;case"hours":return t/(e.C5/e.C4);case"days":return t/(e.C6/e.C4)}},e.hoursToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C5/e.C0);case"microseconds":return t*(e.C5/e.C1);case"milliseconds":return t*(e.C5/e.C2);case"seconds":return t*(e.C5/e.C3);case"minutes":return t*(e.C5/e.C4);case"hours":return t;case"days":return t/(e.C6/e.C5)}},e.daysToUnit=function(t,r){switch(r){case"nanoseconds":return t*(e.C6/e.C0);case"microseconds":return t*(e.C6/e.C1);case"milliseconds":return t*(e.C6/e.C2);case"seconds":return t*(e.C6/e.C3);case"minutes":return t*(e.C6/e.C4);case"hours":return t*(e.C6/e.C5);case"days":return t}},e.dayOfWeek=function(e){return I[(new Date(e).getUTCDay()+6)%7]},e.midnight=function(e){var t=new Date(e);return Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},e.C0=1,e.C1=1e3*e.C0,e.C2=1e3*e.C1,e.C3=1e3*e.C2,e.C4=60*e.C3,e.C5=60*e.C4,e.C6=24*e.C5,e.converter={nanoseconds:e.nanosToUnit,microseconds:e.microsToUnit,milliseconds:e.millisToUnit,seconds:e.secondsToUnit,minutes:e.minutesToUnit,hours:e.hoursToUnit,days:e.daysToUnit},e}(),_=function(){function e(){}return e.prototype.tick=function(){return 1e3*Date.now()},e.prototype.currentMillis=function(){return Date.now()},e.instance=new e,e}(),N=function(){function e(){this.parameters={}}return e.prototype.get=function(e,t){return t},e}(),O=function(){function e(e){this.parameters=e}return e.prototype.get=function(e,t){var r=this.parameters[e];return s.isNullOrUndefined(r)?t:s.isNullOrUndefined(t)||typeof r==typeof t?r:t},e}(),M=c.log;function P(e,t){var r=e.find(function(e){return e===t||e.toLowerCase()===t.toLowerCase()});return r||M.debug("Unsupported type [".concat(t,"]. Please use the latest version of sdk.")),r}function S(e,t){if(!s.isNullOrUndefined(t)){for(var r=[],n=0;n<t.length;n++){var i=P(e,t[n]);if(s.isNullOrUndefined(i))return;r.push(i)}return r}}var C=function(){function e(e,t){this.value=e,this.reason=t}return e.of=function(t,r){return new e(t,r)},e}(),R=function(){function e(e,t,r,n){this.variation=e,this.reason=t,this.config=r,this.experiment=n}return e.of=function(t,r,n,i){return void 0===n&&(n=new N),void 0===i&&(i=void 0),new e(t,r,n,i)},Object.defineProperty(e.prototype,"parameters",{get:function(){return this.config.parameters}
1,enumerable:!1,configurable:!0}),e.prototype.get=function(e,t){return this.config.get(e,t)},e}(),U=function(){function e(e,t,r,n){this.isOn=e,this.reason=t,this.config=r,this.experiment=n}return e.on=function(t,r,n){return void 0===r&&(r=new N),void 0===n&&(n=void 0),new e(!0,t,r,n)},e.off=function(t,r,n){return void 0===r&&(r=new N),void 0===n&&(n=void 0),new e(!1,t,r,n)},Object.defineProperty(e.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),e.prototype.get=function(e,t){return this.config.get(e,t)},e}(),k=function(){function e(){}return e.prototype.get=function(e,t){return t},e}(),x=function(){function e(e,t){this.id=e,this.config=t}return Object.defineProperty(e.prototype,"parameters",{get:function(){return this.config.parameters},enumerable:!1,configurable:!0}),e.fromJson=function(t){return new e(t.id,new O(a.associateRecord(t.parameters,function(e){return[e.key,e.value]})))},e.prototype.get=function(e,t){switch(typeof t){case"string":case"number":case"boolean":return this.config.get(e,t);default:return t}},e}(),D=function(){function e(){}return e.SDK_NOT_READY="SDK_NOT_READY",e.EXCEPTION="EXCEPTION",e.INVALID_INPUT="INVALID_INPUT",e.UNSUPPORTED_PLATFORM="UNSUPPORTED_PLATFORM",e.TYPE_MISMATCH="TYPE_MISMATCH",e.EXPERIMENT_NOT_FOUND="EXPERIMENT_NOT_FOUND",e.EXPERIMENT_DRAFT="EXPERIMENT_DRAFT",e.EXPERIMENT_PAUSED="EXPERIMENT_PAUSED",e.EXPERIMENT_COMPLETED="EXPERIMENT_COMPLETED",e.OVERRIDDEN="OVERRIDDEN",e.TRAFFIC_NOT_ALLOCATED="TRAFFIC_NOT_ALLOCATED",e.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT="NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT",e.IDENTIFIER_NOT_FOUND="IDENTIFIER_NOT_FOUND",e.VARIATION_DROPPED="VARIATION_DROPPED",e.TRAFFIC_ALLOCATED="TRAFFIC_ALLOCATED",e.TRAFFIC_ALLOCATED_BY_TARGETING="TRAFFIC_ALLOCATED_BY_TARGETING",e.NOT_IN_EXPERIMENT_TARGET="NOT_IN_EXPERIMENT_TARGET",e.FEATURE_FLAG_NOT_FOUND="FEATURE_FLAG_NOT_FOUND",e.FEATURE_FLAG_INACTIVE="FEATURE_FLAG_INACTIVE",e.INDIVIDUAL_TARGET_MATCH="INDIVIDUAL_TARGET_MATCH",e.TARGET_RULE_MATCH="TARGET_RULE_MATCH",e.DEFAULT_RULE="DEFAULT_RULE",e.REMOTE_CONFIG_PARAMETER_NOT_FOUND="REMOTE_CONFIG_PARAMETER_NOT_FOUND",e.IN_APP_MESSAGE_NOT_FOUND="IN_APP_MESSAGE_NOT_FOUND",e.IN_APP_MESSAGE_DRAFT="IN_APP_MESSAGE_DRAFT",e.IN_APP_MESSAGE_PAUSED="IN_APP_MESSAGE_PAUSED",e.IN_APP_MESSAGE_HIDDEN="IN_APP_MESSAGE_HIDDEN",e.IN_APP_MESSAGE_TARGET="IN_APP_MESSAGE_TARGET",e.NOT_IN_IN_APP_MESSAGE_PERIOD="NOT_IN_IN_APP_MESSAGE_PERIOD",e.NOT_IN_IN_APP_MESSAGE_TIMETABLE="NOT_IN_IN_APP_MESSAGE_TIMETABLE",e.NOT_IN_IN_APP_MESSAGE_TARGET="NOT_IN_IN_APP_MESSAGE_TARGET",e.IN_APP_MESSAGE_FREQUENCY_CAPPED="IN_APP_MESSAGE_FREQUENCY_CAPPED",e.EXPERIMENT_CONTROL_GROUP="EXPERIMENT_CONTROL_GROUP",e}(),L=["DEFAULT","SPLIT_URL","IN_APP_MESSAGE"],F=function(){function e(e,t,r,n,i,o,s,a,u,c,p,l,h,f,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=h,this.defaultRule=f,this.containerId=d,this.implementationType=y,this.winnerVariationId=v}return e.fromJson=function(t,r,n){var i=e.experimentStatusOrNull(r.execution.status),o=r.variations.map(function(e){return new V(e.id,e.key,"DROPPED"===e.status,n.find(function(t){return t.id===e.parameterConfigurationId}))}),s=a.associate(r.execution.userOverrides,function(e){return[e.userId,e.variationId]}),u=a.mapNotNullOrUndefined(r.execution.segmentOverrides,function(e){return Z.fromJson(e,ed.IDENTIFIER)}),c=a.mapNotNullOrUndefined(r.execution.targetAudiences,function(e){return J.fromJson(e,ed.PROPERTY)}),p=te.fromJson(r.execution.targetUrls),l=P(L,r.implementationType),h=a.mapNotNullOrUndefined(r.execution.targetRules,function(e){return Z.fromJson(e,ed.PROPERTY)}),f=$.fromJson(r.execution.defaultRule);return i&&l&&f&&new e(r.id,r.key,t,r.identifierType,i,r.version,r.execution.version,o,s,u,c,p,h,f,r.containerId,l,r.winnerVariationId)},e.experimentStatusOrNull=function(e){switch(e){case"READY":return"DRAFT";case"RUNNING":return"RUNNING";case"PAUSED":return"PAUSED";case"STOPPED":return"COMPLETED";default:return void M.debug("Unsupported status [".concat(e,"]"))}},e.prototype._winnerVariationOrNull=function(){if(this.winnerVariationId)return this._getVariationByIdOrNull(this.winnerVariationId)},e.prototype._getVariationByIdOrNull=function(e){return this.variations.find(function(t){return t.id===e})},e.prototype._getVariationByKeyOrNull=function(e){return this.variations.find(function(t){return t.key===e})},e}(),V=function(){function e(e,t,r,n){this.id=e,this.key=t,this.isDropped=r,this.config=n}return Object.defineProperty(e.prototype,"parameters",{get:function(){var e,t;return null!=(t=null==(e=this.config)?void 0:e.parameters)?t:{}}
1,enumerable:!1,configurable:!0}),e}(),K=function(){function e(e,t,r,n){this.id=e,this.seed=t,this.slotSize=r,this.slots=n}return e.fromJson=function(t){return new e(t.id,t.seed,t.slotSize,t.slots.map(function(e){return new B(e.startInclusive,e.endExclusive,e.variationId)}))},e}(),B=function(){function e(e,t,r){this.startInclusive=e,this.endExclusive=t,this.variationId=r}return e.prototype.contains=function(e){return this.startInclusive<=e&&e<this.endExclusive},e}(),H=function(){function e(e,t){this.id=e,this.key=t}return e.fromJson=function(t){return new e(t.id,t.key)},e}(),G=function(){function e(){}return e.ID="$id",e.USER="$userId",e.DEVICE="$deviceId",e.SESSION="$sessionId",e.HACKLE_DEVICE="$hackleDeviceId",e}(),j=function(e){var t=new W;return t.addIdentifiers(e.identifiers||{}),t.add(G.ID,e.id),t.add(G.DEVICE,e.deviceId),s.isNotNullOrUndefined(e.userId)&&t.add(G.USER,e.userId),t.build()},W=function(){function e(){this.identifiers={}}return e.prototype.addIdentifiers=function(e){for(var t in e)this.add(t,e[t]);return this},e.prototype.add=function(e,t){var r=E.sanitizeValue(t);return E.isValidType(e)&&r?this.identifiers[e]=t:M.warn("Invalid user identifier [type=".concat(e,", value=").concat(t,"]")),this},e.prototype.build=function(){return this.identifiers},e}(),Y=function(e){var t,r,n,i={};return i.id=null!=(t=E.sanitizeValue(e.id))?t:void 0,i.userId=null!=(r=E.sanitizeValue(e.userId))?r:void 0,i.deviceId=null!=(n=E.sanitizeValue(e.deviceId))?n:void 0,"object"==typeof e.properties&&(i.properties=b.sanitize(e.properties)),"object"==typeof e.identifiers&&(i.identifiers=E.sanitize(e.identifiers)),i.id||i.userId||i.deviceId||i.identifiers&&Object.keys(i.identifiers).length>0?i:null},J=function(){function e(e){this.conditions=e}return e.fromJson=function(t,r){return new e(a.mapNotNullOrUndefined(t.conditions,function(e){return z.fromJson(e,r)}))},e.prototype.toJson=function(){return{conditions:this.conditions.map(function(e){return e.toJson()})}},e}(),z=function(){function e(e,t){this.key=e,this.match=t}return e.fromJson=function(t,r){var n=q.fromJson(t.key);if(n&&r.supports(n.type)){var i=X.fromJson(t.match);return i&&new e(n,i)}},e.prototype.toJson=function(){return{key:this.key.toJson(),match:this.match.toJson()}},e}(),q=function(){function e(e,t){this.type=e,this.name=t}return e.fromJson=function(t){var r=P(eh,t.type);return r&&new e(r,t.name)},e.prototype.toJson=function(){return{type:this.type,name:this.name}},e}(),X=function(){function e(e,t,r,n){this.type=e,this.operator=t,this.valueType=r,this.values=n}return e.fromJson=function(t){var r=P(eu,t.type),n=P(ep,t.operator),i=P(ec,t.valueType);return r&&n&&i&&new e(r,n,i,t.values)},e.prototype.toJson=function(){return{operator:this.operator,type:this.type,valueType:this.valueType,values:this.values}},e}(),$=function(){function e(e,t,r){this.type=e,this.variationId=t,this.bucketId=r}return e.fromJson=function(t){var r=P(el,t.type);return r&&new e(r,t.variationId,t.bucketId)},e}(),Z=function(){function e(e,t){this.target=e,this.action=t}return e.fromJson=function(t,r){var n=J.fromJson(t.target,r),i=$.fromJson(t.action);return n&&i&&new e(n,i)},e}(),Q=function(){function e(e,t,r,n){this.id=e,this.key=t,this.type=r,this.targets=n}return e.fromJson=function(t){var r=P(ef,t.type);return r&&new e(t.id,t.key,r,a.mapNotNullOrUndefined(t.targets,function(e){return J.fromJson(e,ed.SEGMENT)}))},e}(),ee=function(){function e(e,t,r){this.id=e,this.bucketId=t,this.groups=r}return e.fromJson=function(t){return new e(t.id,t.bucketId,t.groups.map(function(e){return et.fromJson(e)}))},e.prototype.getGroupOrNull=function(e){return this.groups.find(function(t){return t.id===e})},e}(),et=function(){function e(e,t){this.id=e,this.experiments=t}return e.fromJson=function(t){return new e(t.id,t.experiments)},e}(),er=function(){function e(e,t,r,n,i,o){this.id=e,this.key=t,this.type=r,this.identifierType=n,this.targetRules=i,this.defaultValue=o}return e.fromJson=function(t){var r=P(ec,t.type),n=a.mapNotNullOrUndefined(t.targetRules,function(e){return en.fromJson(e,ed.PROPERTY)}),i=ei.fromJson(t.defaultValue);return r&&new e(t.id,t.key,r,t.identifierType,n,i)},e}(),en=function(){function e(e,t,r,n,i){this.key=e,this.name=t,this.target=r,this.bucketId=n,this.value=i}return e.fromJson=function(t,r){var n=J.fromJson(t.target,r);return n&&new e(t.key,t.name,n,t.bucketId,ei.fromJson(t.value))},e}(),ei=function(){function e(e,t){this.id=e,this.rawValue=t}return e.fromJson=function(t){return new e(t.id,t.value)},e}(),eo=function(){function e(e,t,r){this.coreVersion=e,this.prerelease=t,this.build=r}return e.tryParse=function(t){if(t instanceof e)return t;var r=e.regExp.exec(t);if(r){r[0];var n=r[1],i=r[2],o=r[3],s=r[4],a=r[5];return new e(new es(parseInt(n,10),parseInt(void 0===i?"0":i,10),parseInt(void 0===o?"0":o,10)),ea.parse(s),ea.parse(a))}},e.prototype.compareTo=function(e){return this.coreVersion.compareTo(e.coreVersion)||this.prerelease.compareTo(e.prerelease)},e.prototype.isEqualTo=function(e){return 0===this.compareTo(e)},e.prototype.isGreaterThan=function(e){return this.compareTo(e)>0},e.prototype.isGreaterThanOrEqualTo=function(e){return this.compareTo(e)>=0},e.prototype.isLessThan=function(e){return 0>this.compareTo(e)},e.prototype.isLessThanOrEqualTo=function(e){return 0>=this.compareTo(e)},e.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-]*)(?
1:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,e}(),es=function(){function e(e,t,r){this.major=e,this.minor=t,this.patch=r}return e.prototype.compareTo=function(e){return this.major-e.major||this.minor-e.minor||this.patch-e.patch},e}(),ea=function(){function e(e){this.identifiers=e}return e.parse=function(t){return t?new e(t.split(".")):e.EMPTY},e.prototype.isEmpty=function(){return 0===this.identifiers.length},e.prototype.isNotEmpty=function(){return!this.isEmpty()},e.prototype.compareTo=function(e){return this.isEmpty()&&e.isEmpty()?0:this.isEmpty()&&e.isNotEmpty()?1:this.isNotEmpty()&&e.isEmpty()?-1:this.compareIdentifiers(e)},e.prototype.compareIdentifiers=function(t){for(var r=Math.min(this.identifiers.length,t.identifiers.length),n=0;n<r;n++){var i=e.compareIdentifiers(this.identifiers[n],t.identifiers[n]);if(0!==i)return i}return this.identifiers.length-t.identifiers.length},e.compareIdentifiers=function(t,r){return e.numericIdentifierRegExp.test(t)&&e.numericIdentifierRegExp.test(r)?t-r:t===r?0:t<r?-1:1},e.EMPTY=new e([]),e.numericIdentifierRegExp=/^(0|[1-9]\d*)$/,e}(),eu=["MATCH","NOT_MATCH"],ec=["STRING","NUMBER","BOOLEAN","VERSION","JSON","URL","NULL","UNKNOWN"],ep=["IN","CONTAINS","STARTS_WITH","ENDS_WITH","GT","GTE","LT","LTE","EXISTS"],el=["VARIATION","BUCKET"],eh=["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"],ef=["USER_ID","USER_PROPERTY"],ed=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.supportedKeyTypes=e}return e.prototype.supports=function(e){return this.supportedKeyTypes.includes(e)},e.IDENTIFIER=new e("SEGMENT"),e.PROPERTY=new e("SEGMENT","USER_PROPERTY","HACKLE_PROPERTY","AB_TEST","FEATURE_FLAG","EVENT_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),e.SEGMENT=new e("USER_ID","USER_PROPERTY","HACKLE_PROPERTY","COHORT","NUMBER_OF_EVENTS_IN_DAYS","NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"),e}(),ey=["ACTIVE","DRAFT","PAUSE"],ev=["WEB","ANDROID","IOS"],eg=["IMMEDIATE","CUSTOM"],em=["HTML","MODAL","BANNER","BOTTOM_SHEET","NONE"],eE=["IMAGE_TEXT","IMAGE_ONLY","TEXT_ONLY","IMAGE","NONE"],ew=["VERTICAL","HORIZONTAL"],eb=["CLICK"],eT=["CLOSE","WEB_LINK","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],eI=["TOP","MIDDLE","BOTTOM"],eA=["LEFT","CENTER","RIGHT"],e_=["ALL","CUSTOM"],eN=["TEXT","PATH"],eO=function(){function e(e,t,r,n,i,o,s,a,u){this.id=e,this.key=t,this.status=r,this.period=n,this.timetable=i,this.eventTrigger=o,this.targetContext=s,this.messageContext=a,this.evaluateContext=u}return e.fromJson=function(t){var r,n,i,o=P(ey,t.status);if(!s.isNullOrUndefined(o)){switch(P(eg,t.timeUnit)){case"IMMEDIATE":a=new eM;break;case"CUSTOM":if(s.isNullOrUndefined(t.startEpochTimeMillis)||s.isNullOrUndefined(t.endEpochTimeMillis))return;a=new eP(t.startEpochTimeMillis,t.endEpochTimeMillis);break;default:return}var a,u=null!=(r=t.timetable&&eS.fromJson(t.timetable))?r:new eC,c=eB.fromJson(t.messageContext);if(!s.isNullOrUndefined(c)){var p=t.eventTriggerRules.map(ex.fromJson),l=eD.fromJson(t.eventFrequencyCap),h=null!=(n=t.eventTriggerDelay&&e3.fromJson(t.eventTriggerDelay))?n:e3.immediate(),f=e2.fromJson(null!=(i=t.evaluateContext)?i:{atDeliverTime:!1});return new e(t.id,t.key,o,a,u,new ek(p,l,h),eV.fromJson(t.targetContext),c,f)}}},e.prototype.supports=function(e){return this.messageContext.platformTypes.includes(e)},e.prototype.toString=function(){return"InAppMessage(id=".concat(this.id,", key=").concat(this.key,", status=").concat(this.status,")")},e}(),eM=function(){function e(){this.type="IMMEDIATE"}return e.prototype.within=function(e){return!0},e}(),eP=function(){function e(e,t){this.startMillisInclusive=e,this.endMillisExclusive=t,this.type="CUSTOM"}return e.prototype.within=function(e){return this.startMillisInclusive<=e&&e<this.endMillisExclusive},e}(),eS=function(){function e(){}return e.fromJson=function(e){switch(P(e_,e.type)){case"ALL":return new eC;case"CUSTOM":return new eR(a.mapNotNullOrUndefined(e.slots,function(e){return eU.fromJson(e)}));default:return}},e}(),eC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="ALL",t}return h(t,e),t.prototype.within=function(e){return!0},t}(eS),eR=function(e){function t(t){var r=e.call(this)||this;return r.slots=t,r.type="CUSTOM",r}return h(t,e),t.prototype.within=function(e){return this.slots.some(function(t){return t.within(e)})},t}(eS),eU=function(){function e(e,t,r){this.dayOfWeek=e,this.startMillisInclusive=t,this.endMillisExclusive=r}return e.prototype.within=function(e){var t=A.dayOfWeek(e);if(this.dayOfWeek!==t)return!1;var r=A.midnight(e),n=r+this.startMillisInclusive,i=r+this.endMillisExclusive;return n<=e&&e<i},e.fromJson=function(t){var r=P(I,t.dayOfWeek);return r&&new e(r,t.startMillisInclusive,t.endMillisExclusive)},e}(),ek=function(e,t,r){this.rules=e,this.frequencyCap=t,this.delay=r},ex=function(){function e(e,t){this.eventKey=e,this.targets=t}
1return e.fromJson=function(t){return new e(t.eventKey,a.mapNotNullOrUndefined(t.targets,function(e){return J.fromJson(e,ed.PROPERTY)}))},e}(),eD=function(){function e(e,t){this.identifierCaps=e,this.durationCap=t}return e.fromJson=function(t){return t?new e(t.identifiers.map(eL.fromJson),eF.fromJson(t.duration)):null},e}(),eL=function(){function e(e,t){this.identifierType=e,this.count=t}return e.fromJson=function(t){return new e(t.identifierType,t.countPerIdentifier)},e}(),eF=function(){function e(e,t){this.durationMillis=e,this.count=t}return e.fromJson=function(t){if(!t)return null;var r=P(T,t.durationUnit.timeUnit);return r?new e(A.converter[r](t.durationUnit.amount,"milliseconds"),t.countPerDuration):null},e}(),eV=function(){function e(e,t){this.overrides=e,this.targets=t}return e.fromJson=function(t){return new e(t.overrides.map(eK.fromJson),a.mapNotNullOrUndefined(t.targets,function(e){return J.fromJson(e,ed.PROPERTY)}))},e}(),eK=function(){function e(e,t){this.identifierType=e,this.identifiers=t}return e.fromJson=function(t){return new e(t.identifierType,t.identifiers)},e}(),eB=function(){function e(e,t,r,n,i){this.defaultLang=e,this.experimentContext=t,this.platformTypes=r,this.orientations=n,this.messages=i}return e.fromJson=function(t){var r=null;"AB_TEST"===t.exposure.type&&null!==t.exposure.key&&(r=new eH(t.exposure.key));var n=S(ev,t.platformTypes);if(!s.isNullOrUndefined(n)){var i=S(ew,t.orientations);if(!s.isNullOrUndefined(i)){var o=a.mapOrUndefined(t.messages,eG.fromJson);if(!s.isNullOrUndefined(o))return new e(t.defaultLang,r,n,i,o)}}},e}(),eH=function(e){this.key=e},eG=function(){function e(e,t,r,n,i,o,s,a,u,c,p,l,h){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,this.html=h}return e.fromJson=function(t){var r=ej.fromJson(t.layout);if(!s.isNullOrUndefined(r)){var n=a.mapOrUndefined(t.images,eY.fromJson);if(!s.isNullOrUndefined(n)){var i=void 0;if(!s.isNotNullOrUndefined(t.imageAutoScroll)||(i=eJ.fromJson(t.imageAutoScroll),!s.isNullOrUndefined(i))){var o=a.mapOrUndefined(t.buttons,e$.fromJson);if(!s.isNullOrUndefined(o)){var u=void 0;if(!s.isNotNullOrUndefined(t.closeButton)||(u=e$.fromJson2(t.closeButton),!s.isNullOrUndefined(u))){var c=a.mapOrUndefined(t.outerButtons,eZ.fromJson),p=a.mapOrUndefined(t.innerButtons,eZ.fromJson);if(!s.isNullOrUndefined(c)&&!s.isNullOrUndefined(p)){var l=void 0;if(!s.isNotNullOrUndefined(t.html)||(l=e9.fromJson(t.html),!s.isNullOrUndefined(l)))return new e(t.variationKey,t.lang,r,n,i,t.text?ez.fromJson(t.text):void 0,o,u,new e0(t.background.color),t.action?e1.fromJson(t.action):void 0,c,p,l)}}}}}}},e.prototype.toJson=function(){var e,t,r,n,i,o,s,a,u,c,p,l;return{variationKey:this.variationKey,lang:this.lang,layout:{layoutType:this.layout.layoutType,alignment:null!=(t=null==(e=this.layout.alignment)?void 0:e.toJson())?t:null,displayType:this.layout.displayType},images:this.images.map(function(e){return e.toJson()}),imageAutoScroll:null!=(n=null==(r=this.imageAutoScroll)?void 0:r.toJson())?n:null,text:null!=(o=null==(i=this.text)?void 0:i.toJson())?o:null,closeButton:null!=(a=null==(s=this.closeButton)?void 0:s.toCloseButtonJson())?a:null,buttons:this.buttons.map(function(e){return e.toJson()}),background:{color:this.background.color},action:null!=(c=null==(u=this.action)?void 0:u.toJson())?c:null,outerButtons:this.outerButtons.map(function(e){return e.toJson()}),innerButtons:this.innerButtons.map(function(e){return e.toJson()}),html:null!=(l=null==(p=this.html)?void 0:p.toJson())?l:null}},e}(),ej=function(){function e(e,t,r){this.displayType=e,this.layoutType=t,this.alignment=r}return e.fromJson=function(t){var r=P(eE,t.layoutType),n=P(em,t.displayType);if(!s.isNullOrUndefined(n)&&!s.isNullOrUndefined(r))return new e(n,r,t.alignment?eW.fromJson(t.alignment):void 0)},e}(),eW=function(){function e(e,t){this.horizontal=e,this.vertical=t}return e.fromJson=function(t){var r=P(eA,t.horizontal);if(!s.isNullOrUndefined(r)){var n=P(eI,t.vertical);if(!s.isNullOrUndefined(n))return new e(r,n)}},e.prototype.toJson=function(){return{horizontal:this.horizontal,vertical:this.vertical}},e}(),eY=function(){function e(e,t,r){this.orientation=e,this.imagePath=t,this.action=r}return e.fromJson=function(t){var r=P(ew,t.orientation);if(!s.isNullOrUndefined(r)){var n=void 0;if(!s.isNotNullOrUndefined(t.action)||(n=e1.fromJson(t.action),!s.isNullOrUndefined(n)))return new e(r,t.imagePath,n)}},e.prototype.toJson=function(){var e,t;return{orientation:this.orientation,imagePath:this.imagePath,action:null!=(t=null==(e=this.action)?void 0:e.toJson())?t:null}},e}(),eJ=function(){function e(e){this.intervalMillis=e}return e.fromJson=function(t){var r=P(T,t.interval.timeUnit);if(r)return new e(A.converter[r](t.interval.amount,"milliseconds"))},e.prototype.toJson=function(){return{interval:{timeUnit:"milliseconds",amount:this.intervalMillis}}},e}(),ez=function(){function e(e,t){this.title=e,this.body=t}return e.fromJson=function(t){return new e(eq.fromJson(t.title),eq.fromJson(t.body))},e.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}}}},e}(),eq=function(){function e(e,t){this.text=e,this.style=t}return e.fromJson=function(t){return new e(t.text,new eX(t.style.textColor))},e}(),eX=function(e){this.color=e},e$=function(){function e(e,t,r){this.text=e,this.style=t,this.action=r}return e.fromJson=function(t){var r=e1.fromJson(t.action);if(!s.isNullOrUndefined(r))return new e(t.text,new eQ(t.style.textColor,t.style.bgColor,t.style.borderColor),r)},e.fromJson2=function(t){var r=e1.fromJson(t.action);if(!s.isNullOrUndefined(r))return new e("✕",new eQ(t.style.color,"#FFFFFF","#FFFFFF"),r)},e.prototype.toJson=function(){return{text:this.text,action:this.action.toJson(),style:{textColor:this.style.textColor,bgColor:this.style.backgroundColor,borderColor:this.style.borderColor}}},e.prototype.toCloseButtonJson=function(){return{action:this.action.toJson(),style:{color:this.style.textColor}}},e}(),eZ=function(){function e(e,t){this.button=e,this.alignment=t}return e.fromJson=function(t){var r=e$.fromJson(t.button);if(!s.isNullOrUndefined(r)){var n=eW.fromJson(t.alignment);if(!s.isNullOrUndefined(n))return new e(r,n)}},e.prototype.toJson=function(){return{button:this.button.toJson(),alignment:this.alignment.toJson()}},e}(),eQ=function(e,t,r){this.textColor=e,this.backgroundColor=t,this.borderColor=r},e0=function(e){this.color=e},e1=function(){function e(e,t,r){this.behavior=e,this.type=t,this.value=r}return Object.defineProperty(e.prototype,"hideDurationMillis",{get:function(){if("HIDDEN"!==this.type)return null;if(s.isNullOrUndefined(this.value)||""===this.value.trim())return e.DEFAULT_HIDE_DURATION_MILLIS;var t=g.asNumber(this.value);return s.isNullOrUndefined(t)?e.DEFAULT_HIDE_DURATION_MILLIS:t}
1,enumerable:!1,configurable:!0}),e.fromJson=function(t){var r,n=P(eb,t.behavior);if(!s.isNullOrUndefined(n)){var i=P(eT,t.type);if(!s.isNullOrUndefined(i))return new e(n,i,null!=(r=t.value)?r:void 0)}},e.prototype.toJson=function(){var e;return{behavior:this.behavior,type:this.type,value:null!=(e=this.value)?e:null}},e.DEFAULT_HIDE_DURATION_MILLIS=864e5,e}(),e2=function(){function e(e){this.atDeliverTime=e}return e.fromJson=function(t){return new e(t.atDeliverTime)},e}(),e4=function(){function e(e){this.durationMillis=e}return e.fromJson=function(t){var r=P(T,t.duration.timeUnit);return s.isNullOrUndefined(r)?null:new e(A.converter[r](t.duration.amount,"milliseconds"))},e}(),e3=function(){function e(e,t){this.type=e,this.afterCondition=t}return e.fromJson=function(t){var r=t.afterCondition&&e4.fromJson(t.afterCondition);return new e(t.type,r)},e.immediate=function(){return new e("IMMEDIATE",null)},e.prototype.deliverAt=function(e){var t=this.type;switch(t){case"IMMEDIATE":return e;case"AFTER":if(null===this.afterCondition)throw Error("AfterCondition is required for AFTER delay type");return e+this.afterCondition.durationMillis;default:throw Error("Unsupported delay type: ".concat(t))}},e}(),e5=function(){function e(e){this.text=e,this.resourceType="TEXT",this.path=null}return e.prototype.toJson=function(){return{resourceType:"TEXT",text:this.text,path:null}},e}(),e6=function(){function e(e){this.path=e,this.resourceType="PATH",this.text=null}return e.prototype.toJson=function(){return{resourceType:"PATH",text:null,path:this.path}},e}(),e9=function(){function e(){}return e.fromJson=function(e){var t=P(eN,e.resourceType);if(!s.isNullOrUndefined(t))switch(t){case"TEXT":if(s.isNullOrUndefined(e.text))return;return new e5(e.text);case"PATH":if(s.isNullOrUndefined(e.path))return;return new e6(e.path);default:return}},e}(),e8=function(e){this.id=e};t.SplitUrlRedirectType=void 0,(t.SplitUrlRedirectType||(t.SplitUrlRedirectType={})).MANUAL="MANUAL";var e7=function(){function e(e,t,r){this.needRedirect=e,this.redirectType=t,this.redirectUrl=r}return e.fromDto=function(r){var n;return new e(r.needRedirect,(n=r.properties.type,Object.values(t.SplitUrlRedirectType).includes(n)?r.properties.type:null),r.properties.value)},e}(),te=function(){function e(e,t){this.includeTargets=e,this.excludeTargets=t}return e.fromJson=function(t){if(null!==t)return new e(a.mapNotNullOrUndefined(t.match,function(e){return J.fromJson(e,ed.PROPERTY)}),a.mapNotNullOrUndefined(t.notMatch,function(e){return J.fromJson(e,ed.PROPERTY)}))},e}(),tt=function(){function e(e,t,r){this.eventKey=e,this.property=t,this.stats=r}return e.fromJson=function(t){return new e(t.eventKey,t.property,t.stats)},e.prototype.countWithinDays=function(e){return a.sum(this.stats.filter(function(t){return t.date>=e}),function(e){return e.count})},e}(),tr=function(){function e(e){this.name=e,this._tags={},this.name=e}return e.prototype.tags=function(e){var t=this;return Object.entries(e).forEach(function(e){var r=e[0],n=e[1];t._tags[r]=n}),this},e.prototype.tag=function(e,t){return this._tags[e]=t,this},e.prototype.register=function(e){return e.registerTimer({name:this.name,tags:this._tags,type:"TIMER"})},e}(),tn=function(){function e(e){this._clock=e,this.startTime=this._clock.tick()}return e.start=function(t){return void 0===t&&(t=e.defaultClock),new e(t)},e.prototype.stop=function(e){var t=this._clock.tick()-this.startTime;e.record(t,"microseconds")},e.defaultClock=new _,e}(),ti=function(){function e(e){this.name=e,this._tags={}}return e.prototype.tags=function(e){var t=this;return Object.entries(e).forEach(function(e){var r=e[0],n=e[1];t._tags[r]=n}),this},e.prototype.tag=function(e,t){return this._tags[e]=t,this},e.prototype.register=function(e){return e.registerCounter({name:this.name,tags:this._tags,type:"COUNTER"})},e}(),to=function(){function e(e){this.compareFn=e,this.data=new Map,this.compareFn=e,this.data=new Map}return e.prototype.values=function(){return Array.from(this.data.values())},e.prototype.keys=function(){return Array.from(this.data.keys())},e.prototype.get=function(e){var t=this,r=this.keys().find(function(r){return t.compareFn(r,e)});return r?this.data.get(r):void 0},e.prototype.has=function(e){return void 0!==this.get(e)},e.prototype.add=function(e,t){var r=t;return r||(r=e),this.data.set(e,r),this},e.prototype.delete=function(e){if(this.has(e)){var t=this.get(e);return this.data.delete(e),t}},e.prototype.forEach=function(e){this.data.forEach(e)},e.prototype.filter=function(t){for(var r=new e(this.compareFn),n=0,i=this.entries();n<i.length;n++){var o=i[n];t(o[0],o[1])&&r.add(o[0],o[1])}return r},e.prototype.entries=function(){return Array.from(this.data.entries())},e}(),ts=function(){function e(e,t){this.valueSupplier=t,this.field=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this.valueSupplier()}
vendor: 1,055 bytes, line 1
1,enumerable:!1,configurable:!0}),e}();function ta(e,t){return e.name===t.name&&E.isEquals(e.tags,t.tags)}var tu,tc=function(){function e(){this.id=i.v4(),this.name="MetricRegistry",this._metrics=new to(ta)}return Object.defineProperty(e.prototype,"metrics",{get:function(){return Array.from(this._metrics.values())},enumerable:!1,configurable:!0}),e.prototype.registerCounter=function(e){return this.registerMetricIfNecessary(e,this.createCounter.bind(this))},e.prototype.registerTimer=function(e){return this.registerMetricIfNecessary(e,this.createTimer.bind(this))},e.prototype.counter=function(e,t){return void 0===t&&(t={}),new ti(e).tags(t).register(this)},e.prototype.timer=function(e,t){return void 0===t&&(t={}),new tr(e).tags(t).register(this)},e.prototype.registerMetricIfNecessary=function(e,t){return this.getOrCreateMetric(e,t)},e.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},e.prototype.close=function(){},e}(),tp=function(e){function t(t,r){var n=e.call(this)||this;
1return n.scheduler=t,n.pushIntervalMillis=r,n.publishingJob=null,n}return h(t,e),t.prototype.start=function(){var e=this;null===this.publishingJob&&(this.publishingJob=this.scheduler.schedulePeriodically(this.pushIntervalMillis,this.pushIntervalMillis,function(){return e.publish(!1)}),c.log.debug("PushMetricRegistry started. Publish metrics every ".concat(this.pushIntervalMillis,"ms.")))},t.prototype.stop=function(){var e;null==(e=this.publishingJob)||e.cancel(),this.publishingJob=null,this.publish(!0),c.log.debug("PushMetricRegistry stopped.")},t.prototype.close=function(){this.stop()},t}(tc),tl=function(){function e(e){this.counterValue=0,this.id=e}return e.prototype.count=function(){return this.counterValue},e.prototype.increment=function(e){this.counterValue+=null!=e?e:1},e.prototype.measure=function(){return[new ts("count",this.count.bind(this))]},e}(),th=function(){function e(e){this.id=e,this.currentCounter=new tl(e)}return e.prototype.flush=function(){var e=this.currentCounter;return this.currentCounter=new tl(this.id),e},e.prototype.count=function(){return this.currentCounter.count()},e.prototype.increment=function(e){this.currentCounter.increment(e)},e.prototype.measure=function(){return[new ts("count",this.count.bind(this))]},e}(),tf=function(){function e(e){this._count=0,this._total=0,this._max=0,this.id=e}return e.prototype.count=function(){return this._count},e.prototype.totalTime=function(e){return A.nanosToUnit(this._total,e)},e.prototype.max=function(e){return A.nanosToUnit(this._max,e)},e.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},e.prototype.record=function(e,t){if(!(e<0)){var r=A.converter[t](e,"nanoseconds");this._count=this.count()+1,this._total+=r,this._max=Math.max(r,this._max)}},e.prototype.measure=function(){var e=this;return[new ts("count",this.count.bind(this)),new ts("total",function(){return e.totalTime("milliseconds")}),new ts("max",function(){return e.max("milliseconds")}),new ts("mean",function(){return e.mean("milliseconds")})]},e}(),td=function(){function e(e){this.id=e,this.currentTimer=new tf(e)}return e.prototype.flush=function(){var e=this.currentTimer;return this.currentTimer=new tf(this.id),e},e.prototype.count=function(){return this.currentTimer.count()},e.prototype.totalTime=function(e){return this.currentTimer.totalTime(e)},e.prototype.max=function(e){return this.currentTimer.max(e)},e.prototype.record=function(e,t){this.currentTimer.record(e,t)},e.prototype.mean=function(e){return 0===this.count()?0:this.totalTime(e)/this.count()},e.prototype.measure=function(){var e=this;return[new ts("count",this.count.bind(this)),new ts("total",function(){return e.totalTime("milliseconds")}),new ts("max",function(){return e.max("milliseconds")}),new ts("mean",function(){return e.mean("milliseconds")})]},e}(),ty=function(e){function t(t,r){return e.call(this,t,r)||this}return h(t,e),t.prototype.createCounter=function(e){return new th(e)},t.prototype.createTimer=function(e){return new td(e)},t.prototype.publish=function(e){void 0===e&&(e=!1);var t=this.metrics.reduce(function(e,t){return void 0!==t.flush&&"function"==typeof t.flush?e.concat(t.flush()):e},[]);this.flushMetrics(t,e)},t}(tp),tv=function(){function e(e){this.id=e}return e.prototype.count=function(){return 0},e.prototype.increment=function(e){},e.prototype.measure=function(){return[new ts("count",this.count.bind(this))]},e}(),tg=function(){function e(e){this._counters=new to(function(e,t){return e.id===t.id}),this.id=e,this.noopCounter=new tv(e)}return Object.defineProperty(e.prototype,"counters",{get:function(){return Array.from(this._counters.values())},enumerable:!1,configurable:!0}),e.prototype.add=function(e){this._counters.add(e,e.registerCounter(this.id))},e.prototype.count=function(){return(this.counters[0]||this.noopCounter).count()},e.prototype.increment=function(e){this.counters.forEach(function(t){t.increment(e)})},e.prototype.measure=function(){return[new ts("count",this.count.bind(this))]},e}(),tm=function(){function e(e){this.id=e}return e.prototype.measure=function(){var e=this;return[new ts("count",this.count.bind(this)),new ts("total",function(){return e.totalTime("milliseconds")}),new ts("max",function(){return e.max("milliseconds")}),new ts("mean",function(){return e.mean("milliseconds")})]},e.prototype.count=function(){return 0},e.prototype.totalTime=function(e){return 0},e.prototype.max=function(e){return 0},e.prototype.mean=function(e){return 0},e.prototype.record=function(e,t){},e}(),tE=function(){function e(e){this._timers=new to(function(e,t){return e.id===t.id}),this.id=e,this.noopTimer=new tm(e)}return Object.defineProperty(e.prototype,"firstTimer",{get:function(){return this.timers[0]||this.noopTimer}
1,enumerable:!1,configurable:!0}),e.prototype.totalTime=function(e){return this.firstTimer.totalTime(e)},e.prototype.max=function(e){return this.firstTimer.max(e)},e.prototype.mean=function(e){return this.firstTimer.mean(e)},e.prototype.record=function(e,t){this.timers.forEach(function(r){r.record(e,t)})},Object.defineProperty(e.prototype,"timers",{get:function(){return Array.from(this._timers.values())},enumerable:!1,configurable:!0}),e.prototype.add=function(e){this._timers.add(e,e.registerTimer(this.id))},e.prototype.count=function(){return this.firstTimer.count()},e.prototype.measure=function(){var e=this;return[new ts("count",this.count.bind(this)),new ts("total",function(){return e.totalTime("milliseconds")}),new ts("max",function(){return e.max("milliseconds")}),new ts("mean",function(){return e.mean("milliseconds")})]},e}(),tw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.registries=new to(function(e,t){return e.id===t.id}),t}return h(t,e),t.prototype.createCounter=function(e){var t=new tg(e);return this.addRegistry(t),t},t.prototype.createTimer=function(e){var t=new tE(e);return this.addRegistry(t),t},t.prototype.addRegistry=function(e){this.registries.forEach(function(t){return e.add(t)})},t.prototype.add=function(e){e instanceof t||this.registries.has(e)||(this.registries.add(e),this.metrics.forEach(function(t){void 0!==t.add&&"function"==typeof t.add&&t.add(e)}))},t.prototype.close=function(){this.registries.forEach(function(e){e.close()})},t}(tc),tb=function(){function e(){}return e.counter=function(t,r){return e.globalRegistry.counter(t,r)},e.timer=function(t,r){return e.globalRegistry.timer(t,r)},e.addRegistry=function(t){e.globalRegistry.add(t),c.log.debug("MetricRegistry added ".concat(t.name))},e.globalRegistry=new tw,e}(),tT=function(){function e(){}return e.equalsIgnoreCase=function(e,t){return e.toLowerCase()===t.toLowerCase()},e.isNotEmptyString=function(e){return!s.isNullOrUndefined(e)&&"string"==typeof e&&e.length>0},e}(),tI=function(){function e(e,t,r,n,i){this.url=e,this.method=t,this.body=r,this.headers=n,this.options=i}return e.builder=function(){return new tA},e.get=function(t){return e.builder().url(t).build()},e.prototype.toBuilder=function(){return new tA(this)},e}(),tA=function(){function e(e){var t,r,n,i,o,s,a;this._url=null!=(t=null==e?void 0:e.url)?t:null,this._method=null!=(r=null==e?void 0:e.method)?r:"GET",this._body=null!=(n=null==e?void 0:e.body)?n:null,this._headers=null!=(o=null==(i=null==e?void 0:e.headers)?void 0:i.toBuilder())?o:tN.builder(),this._timeoutMillis=null!=(a=null==(s=null==e?void 0:e.options)?void 0:s.timeoutMillis)?a:null}return e.prototype.url=function(e){return this._url=e,this},e.prototype.method=function(e){return this._method=e,this},e.prototype.body=function(e){return this._body=e,this},e.prototype.addHeader=function(e,t){return this._headers.add(e,t),this},e.prototype.timeoutMillis=function(e){return this._timeoutMillis=e,this},e.prototype.build=function(){if(null===this._url)throw Error("url is null");var e={timeoutMillis:this._timeoutMillis};return new tI(this._url,this._method,this._body,this._headers.build(),e)},e}(),t_=function(){function e(e,t,r){this.statusCode=e,this.body=t,this.headers=r}return e.ok=function(t,r){return e.of(200,t,r)},e.of=function(t,r,n){return new e(t,null!=r?r:null,null!=n?n:tN.empty())},e.prototype.isSuccessful=function(){return this.statusCode>=200&&this.statusCode<300},e.prototype.isClientError=function(){return this.statusCode>=400&&this.statusCode<500},e.prototype.isNotModified=function(){return 304===this.statusCode},e}(),tN=function(){function e(e){this.headers=e}return e.empty=function(){return new e(new Map)},e.builder=function(){return new tO(new Map)},e.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],o=n[1];if(tT.equalsIgnoreCase(i,e))return o}return null},e.prototype.getOrDefault=function(e,t){var r;return null!=(r=this.get(e))?r:t},e.prototype.raw=function(){return Array.from(this.headers.entries()).reduce(function(e,t){var r=t[0],n=t[1];return e[r]=n,e},{})},e.prototype.toBuilder=function(){return new tO(this.headers)},e.IF_MODIFIED_SINCE="If-Modified-Since",e.LAST_MODIFIED="Last-Modified",e.ACCEPT_ENCODING="Accept-Encoding",e}(),tO=function(){function e(e){this.headers=e}return e.prototype.add=function(e,t){return this.headers.set(e,t),this},e.prototype.build=function(){return new tN(this.headers)},e}(),tM=function(e){function t(t,r,n,i,o){var s=e.call(this,i,o)||this;return s.url=t,s.transport=r,s.synchronousTransport=n,s.start(),s}return h(t,e),t.prototype.flushMetrics=function(e,t){var r=this;a.chunked(e.filter(this.isDispatchTarget.bind(this)),100).forEac
1h(function(e){r.dispatch(e,t)})},t.prototype.isDispatchTarget=function(e){return("COUNTER"===e.id.type||"TIMER"===e.id.type)&&e.count()>0},t.prototype.dispatch=function(e,t){var r=this.createRequest(e);this.execute(r,t).catch(function(e){return c.log.debug("Failed to flushing metrics: ".concat(e))})},t.prototype.createRequest=function(e){return tI.builder().url(this.url).method("POST").body(JSON.stringify(this.batch(e))).addHeader("Content-Type","application/json").build()},t.prototype.execute=function(e,t){return t?this.synchronousTransport.send(e):this.transport.send(e)},t.prototype.batch=function(e){return{metrics:e.map(function(e){return{name:e.id.name,type:e.id.type,tags:e.id.tags,measurements:s.fromMap(a.associate(e.measure(),function(e){return[e.field,e.value]}))}})}},t.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}},t}(ty),tP=function(){function e(){}return e.experiment=function(e,t,r){var n=tb.timer("experiment.decision",{key:String(t),variation:r.variation,reason:String(r.reason)});e.stop(n)},e.featureFlag=function(e,t,r){var n=tb.timer("feature.flag.decision",{key:String(t),on:String(r.isOn),reason:String(r.reason)});e.stop(n)},e.remoteConfig=function(e,t,r){var n=tb.timer("remote.config.decision",{key:String(t),reason:String(r.reason)});e.stop(n)},e}(),tS=function(){function e(){}return e.record=function(t,r,n){var i=tb.timer("api.call",{operation:t,success:e.success(n)});r.stop(i)},e.success=function(e){return null===e?"false":String(e.isSuccessful()||e.isNotModified())},e}(),tC=function(){function e(){}return e.decide=function(e,t,r,n){if(s.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)}},e.decision=function(e,t,r,n,i){return s.isNullOrUndefined(t)?C.of(n,D.INVALID_INPUT):e.remoteConfig(t,i,r,n)},e}(),tR=c.log,tU=function(){function e(e,t,r){this.core=e,this.userManager=t,this.user=r}return e.prototype.get=function(e,t){var r,n=tn.start();try{r=this.decide(e,t)}catch(n){tR.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(n)),r=C.of(t,D.EXCEPTION)}return tP.remoteConfig(n,e,r),r.value},e.prototype.decide=function(e,t){var r=this.userManager.resolve(this.user);return tC.decide(this.core,e,t,r)},e}(),tk=function(){function e(){this._properties=new Map,this.MAX_PROPERTIES_COUNT=128,this.MAX_PROPERTY_KEY_LENGTH=128}return e.prototype.contains=function(e){return this._properties.has(e)},e.prototype.remove=function(e){var t=this;return e instanceof Map&&e.forEach(function(e,r){t.remove(r)}),"string"==typeof e&&this._properties.delete(e),this},e.prototype.compute=function(e,t){var r=this._properties.get(e),n=t(r);null!==n?this.add(e,n):(null!==r||this.contains(e))&&this.remove(e)},e.prototype.add=function(e,t,r){if(void 0===r&&(r=!1),r&&this.contains(e)||this._properties.size>=this.MAX_PROPERTIES_COUNT||"string"==typeof e&&e.length>this.MAX_PROPERTY_KEY_LENGTH)return this;var n=b.sanitizeValue(e,t);return s.isNullOrUndefined(n)||this._properties.set(e,n),this},e.prototype.addProperties=function(e,t){var r=this;return void 0===t&&(t=!1),e.forEach(function(e,n){r.add(n,e,t)}),this},e.prototype.build=function(){return this._properties},e}();(rs=tu||(tu={})).SET="$set",rs.SET_ONCE="$setOnce",rs.UNSET="$unset",rs.INCREMENT="$increment",rs.APPEND="$append",rs.APPEND_ONCE="$appendOnce",rs.PREPEND="$prepend",rs.PREPEND_ONCE="$prependOnce",rs.REMOVE="$remove",rs.CLEAR_ALL="$clearAll";var tx=function(){function e(){}return e.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new tk).addProperties(e).addProperties(t).build()},e}(),tD=function(){function e(){}return e.prototype.operate=function(e,t){return 0===e.size?t:0===t.size?e:(new tk).addProperties(e).addProperties(t,!0).build()},e}(),tL=function(){function e(){}return e.prototype.operate=function(e,t){return 0===e.size?new Map:0===t.size?e:(new tk).addProperties(e).remove(t).build()},e}(),tF=function(){function e(){}return e.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new tk;return n.addProperties(e),t.forEach(function(e,t){n.compute(t,function(t){return r.increment(t,e)})}),n.build()},e.prototype.increment=function(e,t){return"number"!=typeof t?e:"number"!=typeof e?null==e?t:e:e+t},e}(),tV=function(){function e(){}return e.prototype.operate=function(e,t){var r=this;if(0===t.size)return e;var n=new tk;return n.addProperties(e),t.forEach(function(e,t){n.compute(t,function(t){return r.compute(t,e)})}),n.build()},e.prototype.compute=function(e,t){var r=this.toArray(e),n=this.toArray(t);return this.operateArray(r,n)},e.prototype.toArray=function(e){return null==e?[]:Array.isArray(e)?e:[e]},e.prototype.contains=function(e,t){return e.includes(t)},e.prototype.prepend=function(e,t,r){return void 0===r&&(r=!1),r&&this.contains(t,e)?t:v([e],t,!0)},e.prototype.append=function(e,t,r){return void 0===r&&(r=!1),r&&this.contains(e,t)?e:v(v([],e,!0),[t],!1)},e}(),tK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.operateArray=function(e,t){var r=this;return t.reduce(function(e,t){return r.append.bind(r)(e,t)},e)},t}(tV),tB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.operateArray=function(e,t){return t.reduce(this.appendOnce.bind(this),e)},t.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},t}(tV),tH=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.operateArray=function(e,t){var r=this;return t.reduceRight(function(e,t){return r.prepend.bind(r)(t,e)},e)},t}(tV),tG=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.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)},t.prototype.appendOnce=function(e,t){return this.append(e,t,!0)},t.prototype.prependOnce=function(e,t){return this.prepend(e,t,!0)},t}(tV),tj=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.operateArray=function(e,t){return t.reduce(this.remove.bind(this),e)},t.prototype.remove=function(e,t){return e.filter(function(e){return e!==t})},t}(tV),tW=function(){function e(){}return e.prototype.operate=function(e,t){return new Map},e}(),tY=function(){function e(){}return e.get=function(e){switch(e){case tu.SET:return new tx;case tu.SET_ONCE:return new tD;case tu.UNSET:return new tL;case tu.INCREMENT:return new tF;case tu.APPEND:return new tK;case tu.APPEND_ONCE:return new tB;case tu.PREPEND:return new tH;case tu.PREPEND_ONCE:return new tG;case tu.CLEAR_ALL:return new tW;case tu.REMOVE:return new tj}},e}(),tJ=function(){function e(){this.operations=new Map}return e.prototype.set=function(e,t){return this.add(tu.SET,e,t)},e.prototype.setOnce=function(e,t){return this.add(tu.SET_ONCE,e,t)},e.prototype.unset=function(e){return this.add(tu.UNSET,e,"-")},e.prototype.increment=function(e,t){return this.add(tu.INCREMENT,e,t)},e.prototype.append=function(e,t){return this.add(tu.APPEND,e,t)},e.prototype.appendOnce=function(e,t){return this.add(tu.APPEND_ONCE,e,t)},e.prototype.prepend=function(e,t){return this.add(tu.PREPEND,e,t)},e.prototype.prependOnce=function(e,t){return this.add(tu.PREPEND_ONCE,e,t)},e.prototype.remove=function(e,t){return this.add(tu.REMOVE,e,t)},e.prototype.clearAll=function(){return this.add(tu.CLEAR_ALL,"clearAll","-")},e.prototype.build=function(){return new tz(new Map(Array.from(this.operations.entries()).map(function(e){return[e[0],e[1].build()]})))},e.prototype.containsKey=function(e){return Array.from(this.operations.entries()).some(function(t){return t[0],t[1].contains(e)})},e.prototype.add=function(e,t,r){if(this.containsKey(t))return this;this.operations.has(e)||this.operations.set(e,new tk);var n=this.operations.get(e);return null==n||n.add(t,r),this},e}(),tz=function(){function e(e){this.operations=null!=e?e:new Map}return e.prototype.operate=function(e){var t=e;return this.operations.forEach(function(e,r){t=tY.get(r).operate(t,e)}),t},e.prototype.toEvent=function(){var e={key:"$properties"};return this.operations.forEach(function(t,r){var n,i;e.properties=f(f({},e.properties),((n={})[r]=f(f({},null==(i=e.properties)?void 0:i[r]),b.sanitize(s.fromMap(t))),n))}),e},e.prototype.toSecuredEvent=function(){var e={key:"$secured_properties"};return this.operations.forEach(function(t,r){var n,i;e.properties=f(f({},e.properties),((n={})[r]=f(f({},null==(i=e.properties)?void 0:i[r]),b.sanitize(s.fromMap(t))),n))}),e},e.prototype.toRecord=function(){var e={};return this.operations.forEach(function(t,r){var n={};t.forEach(function(e,t){n[t]=e}),e[r]=n}),e},e}(),tq=function(){function e(){}return e.timeout=function(e,t){return new Promise(function(r,n){
1setTimeout(function(){return n(Error("timeout (".concat(t,"ms)")))},t),e.then(r,n)})},e}(),tX=function(){function e(e,t,r,n,i,o,s,a,u){void 0===e&&(e=""),void 0===t&&(t=""),void 0===r&&(r=""),void 0===n&&(n=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a=""),void 0===u&&(u={}),this.pagePath=e,this.host=t,this.hostname=r,this.url=n,this.referrer=i,this.queryParameter=o,this.protocol=s,this.pageName=a,this.properties=u}return e.prototype.isEquals=function(e){return this.url===e.url},e.createWithCurrentPage=function(t,r){return"u"<typeof window||"u"<typeof document?new e:new e(window.location.pathname,window.location.host,window.location.hostname,window.location.href,window.document.referrer,window.location.search,window.location.protocol,null!=t?t:window.document.title,null!=r?r:{})},e}(),t$=function(){function e(e){this.value=e}return e.create=function(t){return new e(t)},e.prototype.getValue=function(){return this.value},e}(),tZ=function(){function e(){}return e.toPublic=function(e){return{key:e.key}},e}(),tQ=function(){function e(){}return e.toPublic=function(e){return{close:e.close.bind(e),inAppMessage:tZ.toPublic(e.context.inAppMessage)}},e}(),t0=["LINK_AND_CLOSE","LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE","WEB_LINK"],t1=["CLOSE","HIDDEN","LINK_AND_CLOSE","LINK_NEW_TAB_AND_CLOSE","LINK_NEW_WINDOW_AND_CLOSE"],t2=["LINK_NEW_TAB","LINK_NEW_TAB_AND_CLOSE"],t4=["LINK_NEW_WINDOW","LINK_NEW_WINDOW_AND_CLOSE"],t3=function(){function e(){}return e.toPublic=function(e){var t,r=e.type,n=t0.some(function(e){return e===r}),i=t1.some(function(e){return e===r}),o=t2.some(function(e){return e===r}),s=t4.some(function(e){return e===r});return{type:n?"LINK":"CLOSE",close:i?{hideDurationMillis:e.hideDurationMillis}:void 0,link:n?{url:null!=(t=e.value)?t:"",target:s?"NEW_WINDOW":o?"NEW_TAB":"CURRENT",shouldCloseAfterLink:i}:void 0}},e.toInternalActionType=function(e){var t;return"CLOSE"===e.type?s.isNotNullOrUndefined(null==(t=e.close)?void 0:t.hideDurationMillis)?"HIDDEN":"CLOSE":e.link?"NEW_WINDOW"===e.link.target?e.link.shouldCloseAfterLink?"LINK_NEW_WINDOW_AND_CLOSE":"LINK_NEW_WINDOW":"NEW_TAB"===e.link.target?e.link.shouldCloseAfterLink?"LINK_NEW_TAB_AND_CLOSE":"LINK_NEW_TAB":e.link.shouldCloseAfterLink?"LINK_AND_CLOSE":"WEB_LINK":"WEB_LINK"},e.getActionValue=function(e){var t,r,n;return"LINK"===e.type?null==(t=e.link)?void 0:t.url:"CLOSE"===e.type?null==(n=null==(r=e.close)?void 0:r.hideDurationMillis)?void 0:n.toString():void 0},e.toInternal=function(t){return new e1("CLICK",e.toInternalActionType(t),e.getActionValue(t))},e}(),t5=c.log,t6=function(){function e(e,t,r,n,i,o,s,a,u,c){this.core=e,this.synchronizer=t,this.sessionManager=r,this.userManager=n,this.piiEventManager=i,this.fetchThrottler=o,this.pageManager=s,this.inAppMessageUi=a,this.optOutManager=u,this.devTools=c,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.setCurrentPage=this.setCurrentPage.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.isOptOutTracking=this.isOptOutTracking.bind(this),this.setOptOutTracking=this.setOptOutTracking.bind(this),this.initialization=this.initialize()}return e.prototype.initialize=function(){return d(this,void 0,void 0,function(){var e;return y(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,3,4]),t5.debug("HackleClient initializing"),[4,this.synchronizer.sync()];case 1:return t.sent(),t5.debug("HackleClient initialized"),[3,4];case 2:throw e=t.sent(),t5.error("HackleClient initialize failed: ".concat(e)),e;case 3:return this.initialized=!0,[7];case 4:return[2]}})})},e.prototype.getSessionId=function(){return this.sessionManager.sessionId},e.prototype.getUser=function(){return this.userManager.currentUser},e.prototype.setUser=function(e){try{var t=Y(e);if(!t)return t5.warn("invalid user"),Promise.resolve();var r=this.userManager.setUser(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return t5.error("Unexpected exception while set user: ".concat(e)),Promise.resolve()}},e.prototype.setUserId=function(e){try{var t=void 0;if(s.isNullOrUndefined(e))t=this.userManager.setUserId(void 0);
1else{var r=E.sanitizeValue(e);if(!r)return t5.warn("Invalid userId. [userId=".concat(e,"]")),Promise.resolve();t=this.userManager.setUserId(r)}return this.userManager.syncIfNeeded(t).catch(function(){})}catch(e){return t5.error("Unexpected exception while set userId: ".concat(e)),Promise.resolve()}},e.prototype.setDeviceId=function(e){try{var t=E.sanitizeValue(e);if(!t)return t5.warn("Invalid deviceId. [deviceId=".concat(e,"]")),Promise.resolve();var r=this.userManager.setDeviceId(t);return this.userManager.syncIfNeeded(r).catch(function(){})}catch(e){return t5.error("Unexpected exception while set deviceId: ".concat(e)),Promise.resolve()}},e.prototype.setUserProperty=function(e,t){var r=(new tJ).set(e,t).build();return this.updateUserProperties(r)},e.prototype.setUserProperties=function(e){try{var t=b.sanitize(e),r=new tJ;return Object.entries(t).forEach(function(e){var t=e[0],n=e[1];r.set(t,n)}),this.updateUserProperties(r.build())}catch(e){return t5.error("Unexpected exception while set userProperties: ".concat(e)),Promise.resolve()}},e.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 t5.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},e.prototype.updatePushSubscriptions=function(e){try{var t=e.toEvent("$push_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return t5.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},e.prototype.updateSmsSubscriptions=function(e){try{var t=e.toEvent("$sms_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return t5.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},e.prototype.updateKakaoSubscriptions=function(e){try{var t=e.toEvent("$kakao_subscriptions");return this.track(t),this.core.flush(!1),Promise.resolve()}catch(e){return t5.error("Unexpected exception while update userProperties: ".concat(e)),Promise.resolve()}},e.prototype.resetUser=function(){try{var e=this.userManager.resetUser(),t=(new tJ).clearAll().build();return this.track(t.toEvent()),this.userManager.syncIfNeeded(e).catch(function(){})}catch(e){return t5.error("Unexpected exception while reset user: ".concat(e)),Promise.resolve()}},e.prototype.setPhoneNumber=function(e){try{if("string"!=typeof e)return t5.error("Invalid value ".concat(e,": phoneNumber value type must be string.")),Promise.resolve();var t=t$.create(e),r=_.instance.currentMillis();return this.piiEventManager.setPhoneNumber(t,r),this.core.flush(!1),Promise.resolve()}catch(e){return t5.error("Unexpected exception occurred while setting phone number: ".concat(e)),Promise.resolve()}},e.prototype.unsetPhoneNumber=function(){try{var e=_.instance.currentMillis();return this.piiEventManager.unsetPhoneNumber(e),this.core.flush(!1),Promise.resolve()}catch(e){return t5.error("Unexpected exception occurred while unsetting phone number: ".concat(e)),Promise.resolve()}},e.prototype.variation=function(e,t,r){return this.variationDetail(e,t,r).variation},e.prototype.variationDetail=function(e,t,r){var n=r||"A",i=tn.start(),o=function(r){try{var i=r.userManager.resolve(t);return r.core.experiment(e,i,n)}catch(t){return t5.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(n,"] : ").concat(t)),R.of(n,D.EXCEPTION)}}(this);return tP.experiment(i,e,o),o},e.prototype.isFeatureOn=function(e,t){return this.featureFlagDetail(e,t).isOn},e.prototype.featureFlagDetail=function(e,t){var r=tn.start(),n=function(r){try{var n=r.userManager.resolve(t);return r.core.featureFlag(e,n)}catch(t){return t5.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),U.off(D.EXCEPTION)}}(this);return tP.featureFlag(r,e,n),n},e.prototype.track=function(e,t){try{t5.debug("track event : ".concat(JSON.stringify(e)));var r=this._convertEvent(e),n=this.userManager.resolve(t);this.core.track(r,n)}catch(e){t5.error("Unexpected exception while tracking event: ".concat(e))}},e.prototype.trackPageView=function(e){t5.warn("trackPageView is deprecated and do nothing.")},e.prototype.setCurrentPage=function(e){var t=tX.createWithCurrentPage(e.pageName,e.properties);this.pageManager.setCurrentPage(t)},e.prototype.remoteConfig=function(e){return new tU(this.core,this.userManager,e)},e.prototype.onReady=function(e,t){void 0===t&&(t=3e3),this.onInitialized({timeout:t}).finally(function(){return e()})},e.prototype.getExperiment=function(e){try{return this.core.getExperiment(e)}catch(t){return void t5.error('"Unexpected exception while get experiment['.concat(e,"]"))}},e.prototype.onInitialized=function(e){var t;return d(this,void 0,void 0,function(){var r;return y(this,function(n){switch(n.label){case 0:if(this.initialized)return[2,{success:!0}];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,tq.timeout(this.initialization,null!=(t=null==e?void 0:e.timeout)?t:3e3)];case 2:return n.sent(),[2,{success:!0}];case 3:return r=n.sent(),t5.error("Failed to onInitialized: ".concat(r)),[2,{success:!1}];case 4:return[2]}})})},e.prototype._convertEvent=function(e){return"string"==typeof e?{key:e}:e},e.prototype.showUserExplorer=function(){var e;(null==(e=this.devTools)?void 0:e.userExplorer)?(t5.debug("UserExplorer opened."),tb.counter("user.explorer.show",{}).increment(),this.devTools.manager.userExplorer(this.devTools.userExplorer)):t5.error("UserExplorer is not provided")},e.prototype.hideUserExplorer=function(){this.devTools?this.devTools.manager.close():t5.warn("There is no active HackleDevtools.")},e.prototype.fetch=function(){var e=this;return this.fetchThrottler.execute(function(){return e.synchronizer.sync()},function(){return Promise.resolve()})},e.prototype.setInAppMessageListener=function(e){this.inAppMessageUi.setListener(e)},e.prototype.getDisplayedInAppMessageView=function(){return this.inAppMessageUi.currentMessageView?tQ.toPublic(this.inAppMessageUi.currentMessageView):null},e.prototype.isOptOutTracking=function(){try{return this.optOutManager.isOptOutTracking}catch(e){return t5.error("Unexpected exception while get optOutTracking: ".concat(e)),!1}},e.prototype.setOptOutTracking=function(e){try{this.optOutManager.setOptOutTracking(e)}catch(e){t5.error("Unexpected exception while set optOutTracking: ".concat(e))}},e.prototype.close=function(){t5.debug("HackleClient closing"),this.core.close(),this.synchronizer.close()},e}(),t9=c.log,t8=function(){function e(e,t,r){this.invocationProcessor=e,this.user=t,this.browserPropertyProvider=r}return e.prototype.get=function(e,t){var r=typeof t;try{var n={command:"remoteConfig",parameters:{defaultValue:t,key:e,valueType:r,user:this.user},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(!i)throw Error("invoke result data not exists");switch(r){case"number":return Number(i);case"boolean":return!!i;default:return i}}catch(r){return t9.error("Unexpected exception while deciding remote config parameter[".concat(e,"]. Returning default value. : ").concat(r)),t}},e}(),t7=function(){function e(){}return e.tryParse=function(e){try{return new URL(e)}catch(e){return}},e.removePathnameTrailingSlash=function(t){var r=t instanceof URL?t:e.tryParse(t);return r?(r.pathname.endsWith("/")&&(r.pathname=r.pathname.replace(/\/+$/,"")),r.href):String(t)},e.tryDecodeURI=function(e){try{return decodeURI(e)}catch(e){return}},e.tryDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(e){return}}
1,e.decodeURIOrOriginal=function(e){try{return decodeURI(e)}catch(t){return e}},e.decodeURIComponentOrOriginal=function(e){try{return decodeURIComponent(e)}catch(t){return e}},e}(),re=function(){function e(e){void 0===e&&(e={days:0,isCrossSubdomain:!1,isSecure:!1}),this.options=e}return e.extractDomain=function(e){var t=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,r=e.split("."),n=r[r.length-1];(n.length>4||"com"===n||"org"===n)&&(t=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i);var i=e.match(t);return i?i[0]:""},e.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=t7.tryDecodeURIComponent(o.substring(r.length,o.length)))?t:null}return null},e.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},e.prototype.setItem=function(t,r,n){var i=f(f({},this.options),n),o="",s="",a="",u="";if(i.isCrossSubdomain){var c=e.extractDomain(document.location.hostname);o=c?"; domain=."+c:""}if(i.days){var p=new Date;p.setTime(p.getTime()+24*i.days*36e5),s="; expires="+p.toUTCString()}i.sameSite&&(u="; SameSite=".concat(i.sameSite)),i.isSecure&&(a+="; secure");var l=t+"="+encodeURIComponent(r)+s+"; path=/"+o+u+a;return document.cookie=l,l},e.prototype.removeItem=function(e,t){this.setItem(e,"",f(f({},t),{days:-1}))},e.prototype.getOptions=function(){return this.options},e.getInstance=function(t){return void 0===t&&(t={days:3650,isCrossSubdomain:!0}),e.storage||(e.storage=new e(t)),e.storage},e}(),rt=function(){function e(){}return e.prototype.initialize=function(){re.getInstance().getItem("_hackle_hid")||ro()},e.prototype.onLifecycleChanged=function(e,t){switch(e){case"hidden":case"pagehide":return ri();case"blur":case"focus":case"locationChange":case"visible":case"pageshow":return}},e}();function rr(){var e=re.getInstance(),t=e.getItem("_hackle_id");return t||e.getItem("_hackle_hid")||ro()}function rn(e){re.getInstance().setItem("_hackle_id",e)}function ri(){re.getInstance().removeItem("_hackle_id")}function ro(){var e=i.v4();return re.getInstance().setItem("_hackle_hid",e),e}var rs,ra,ru=function(){function e(e,t,r,n){this.id=e,this.inAppMessage=t,this.invocationProcessor=r,this.browserPropertyProvider=n}return e.prototype.close=function(){var e={command:"closeInAppMessageView",parameters:{viewId:this.id},browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)},e}(),rc=c.log;function rp(e){return!(!e||!("_hackleApp"in e)||null===e._hackleApp||"object"!=typeof e._hackleApp)&&"getAppSdkKey"in e._hackleApp&&"function"==typeof e._hackleApp.getAppSdkKey&&"getInvocationType"in e._hackleApp&&"function"==typeof e._hackleApp.getInvocationType}(r_=ra||(ra={})).native="native",r_.web_view_wrapper="web_view_wrapper";var rl=function(){function e(e,t,r){this.invocationProcessor=e,this.browserPropertyProvider=t,this.pageManager=r,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.setCurrentPage=this.setCurrentPage.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.isOptOutTracking=this.isOptOutTracking.bind(this),this.setOptOutTracking=this.setOptOutTracking.bind(this)}return e.prototype.getSessionId=function(){try{var e={command:"getSessionId",browserProperties:this.browserPropertyProvider.getBrowserProperties()},t=this.invocationProcessor.process(e);return null!=t?t:rr()}catch(e){return rc.error("Unexpected exception while get sessionId: ".concat(e)),rr()}},e.prototype.getUser=function(){var e;try{var t={command:"getUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},r=this.invocationProcessor.process(t);return null!=(e=Y(r))?e:this.defaultUser()}catch(e){return rc.error("Unexpected exception while get user: ".concat(e)),this.defaultUser()}},e.prototype.setUser=function(e){return d(this,void 0,void 0,function(){var t,r;return y(this,function(n){try{if(!(t=Y(e)))return rc.warn("invalid user"),[2];r={command:"setUser",parameters:{user:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}
1catch(e){rc.error("Unexpected exception while set user: ".concat(e))}return[2]})})},e.prototype.setUserId=function(e){return d(this,void 0,void 0,function(){var t,r;return y(this,function(n){try{if(t=void 0,s.isNullOrUndefined(e))t=null;else if(!(t=E.sanitizeValue(e)))return rc.warn("Invalid userId. [userId=".concat(e,"]")),[2];r={command:"setUserId",parameters:{userId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){rc.error("Unexpected exception while set userId: ".concat(e))}return[2]})})},e.prototype.setDeviceId=function(e){return d(this,void 0,void 0,function(){var t,r;return y(this,function(n){try{if(!(t=E.sanitizeValue(e)))return rc.warn("Invalid deviceId. [deviceId=".concat(e,"]")),[2];r={command:"setDeviceId",parameters:{deviceId:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){rc.error("Unexpected exception while set deviceId: ".concat(e))}return[2]})})},e.prototype.setUserProperty=function(e,t){return d(this,void 0,void 0,function(){var r;return y(this,function(n){try{r={command:"setUserProperty",parameters:{key:e,value:t},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(r)}catch(e){rc.error("Unexpected exception while set userProperty: ".concat(e))}return[2]})})},e.prototype.setUserProperties=function(e){return d(this,void 0,void 0,function(){var t,r;return y(this,function(n){try{t=b.sanitize(e),r=new tJ,Object.entries(t).forEach(function(e){var t=e[0],n=e[1];r.set(t,n)}),this.updateUserProperties(r.build())}catch(e){rc.error("Unexpected exception while set userProperties: ".concat(e))}return[2]})})},e.prototype.updateUserProperties=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){try{t={command:"updateUserProperties",parameters:{operations:e.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rc.error("Unexpected exception while update userProperties: ".concat(e))}return[2]})})},e.prototype.updatePushSubscriptions=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){try{t={command:"updatePushSubscriptions",parameters:{operations:e.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rc.error("Unexpected exception while update push subscriptions: ".concat(e))}return[2]})})},e.prototype.updateSmsSubscriptions=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){try{t={command:"updateSmsSubscriptions",parameters:{operations:e.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rc.error("Unexpected exception while update sms subscriptions: ".concat(e))}return[2]})})},e.prototype.updateKakaoSubscriptions=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){try{t={command:"updateKakaoSubscriptions",parameters:{operations:e.toRecord()},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rc.error("Unexpected exception while update Kakao subscriptions: ".concat(e))}return[2]})})},e.prototype.resetUser=function(){return d(this,void 0,void 0,function(){var e;return y(this,function(t){try{e={command:"resetUser",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(e)}catch(e){rc.error("Unexpected exception while reset user: ".concat(e))}return[2]})})},e.prototype.setPhoneNumber=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){try{if("string"!=typeof e)return rc.error("Invalid type ".concat(e,": phoneNumber value must be string.")),[2,Promise.resolve()];t={command:"setPhoneNumber",parameters:{phoneNumber:e},browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(t)}catch(e){rc.error("Unexpected exception occurred while setting phone number: ".concat(e))}return[2]})})},e.prototype.unsetPhoneNumber=function(){return d(this,void 0,void 0,function(){var e;return y(this,function(t){try{e={command:"unsetPhoneNumber",browserProperties:this.browserPropertyProvider.getBrowserProperties()},this.invocationProcessor.process(e)}catch(e){rc.error("Unexpected exception occurred while unsetting phone number: ".concat(e))}return[2]})})},e.prototype.variation=function(e,t,r){void 0===r&&(r="A");try{var n={command:"variation",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(!i)throw Error("invoke result data not exists");return i}catch(t){return rc.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(r,"] : ").concat(t)),r}},e.prototype.variationDetail=function(e,t,r){var n;void 0===r&&(r="A");try{var i={command:"variationDetail",parameters:{experimentKey:e,defaultVariation:r,user:this.convertUser(t)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},o=this.invocationProcessor.process(i);if(null===o)throw Error("invoke result data not exists");return R.of(o.variation,o.reason,new O(null!=(n=o.config.parameters)?n:{}))}catch(t){return rc.error("Unexpected exception while deciding variation for experiment[".concat(e,"]. Returning default variation[").concat(r,"] : ").concat(t)),R.of(r,D.EXCEPTION)}},e.prototype.isFeatureOn=function(e,t){try{var r={command:"isFeatureOn",parameters:{featureKey:e,user:this.convertUser(t)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},n=this.invocationProcessor.process(r);if(null===n)throw Error("invoke result data not exists");return!!n}catch(t){return rc.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),!1}},e.prototype.featureFlagDetail=function(e,t){var r;try{var n={command:"featureFlagDetail",parameters:{featureKey:e,user:this.convertUser(t)},browserProperties:this.browserPropertyProvider.getBrowserProperties()},i=this.invocationProcessor.process(n);if(null===i)throw Error("invoke result data not exists");return new U(i.isOn,i.reason,new O(null!=(r=i.config.parameters)?r:{}),void 0)}catch(t){return rc.error("Unexpected exception while deciding feature flag[".concat(e,"]. Returning default value[false] : ").concat(t)),U.off(D.EXCEPTION)}},e.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)}
vendor: 6,282 bytes, line 1
1catch(e){rc.error("Unexpected exception while tracking event: ".concat(e))}},e.prototype.trackPageView=function(e){rc.warn("Web to app integration feature is not support 'trackPageView' method")},e.prototype.setCurrentPage=function(e){var t=tX.createWithCurrentPage(e.pageName,e.properties);this.pageManager.setCurrentPage(t)},e.prototype.remoteConfig=function(e){return new t8(this.invocationProcessor,this.convertUser(e),this.browserPropertyProvider)},e.prototype.onReady=function(e,t){e()},e.prototype.showUserExplorer=function(){try{var e={command:"showUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){rc.error("Unexpected exception while show userExplorer: ".concat(e))}},e.prototype.hideUserExplorer=function(){try{var e={command:"hideUserExplorer",browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(e)}catch(e){rc.error("Unexpected exception while hide userExplorer: ".concat(e))}},e.prototype.setInAppMessageListener=function(e){rc.info("Web to app integration feature is not support 'setInAppMessageListener' method")},e.prototype.fetch=function(){return Promise.resolve()},e.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},e.prototype.close=function(){rc.info("Web to app integration feature is not support 'close' method")},e.prototype.getExperiment=function(e){rc.info("Web to app integration feature is not support 'getExperiment' method")},e.prototype.convertEvent=function(e){return"string"==typeof e?{key:e}:e},e.prototype.convertUser=function(e){var t;return"string"==typeof e?e:e&&null!=(t=Y(e))?t:void 0},e.prototype.defaultUser=function(){return{deviceId:rr()}},e.prototype.getCurrentInAppMessageView=function(){var e={command:"getCurrentInAppMessageView",browserProperties:this.browserPropertyProvider.getBrowserProperties()};return this.invocationProcessor.process(e)},e.prototype.getDisplayedInAppMessageView=function(){var e=this.getCurrentInAppMessageView();return e?new ru(e.id,e.inAppMessage,this.invocationProcessor,this.browserPropertyProvider):null},e.prototype.isOptOutTracking=function(){try{var e={command:"isOptOutTracking",browserProperties:this.browserPropertyProvider.getBrowserProperties()},t=this.invocationProcessor.process(e);return null!=t&&t}catch(e){return rc.error("Unexpected exception while get optOutTracking: ".concat(e)),!1}},e.prototype.setOptOutTracking=function(e){try{var t={command:"setOptOutTracking",parameters:{optOut:e},browserProperties:this.browserPropertyProvider.getBrowserProperties()};this.invocationProcessor.process(t)}catch(e){rc.error("Unexpected exception while set optOutTracking: ".concat(e))}},e}(),rh=function(){function e(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.setCurrentPage=this.setCurrentPage.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.isOptOutTracking=this.isOptOutTracking.bind(this),this.setOptOutTracking=this.setOptOutTracking.bind(this)}return e.prototype.getSessionId=function(){return this.browser.getSessionId()},e.prototype.getUser=function(){return this.browser.getUser()},e.prototype.syncUser=function(){return d(this,void 0,void 0,function(){var e;return y(this,function(t){switch(t.label){case 0:return e=this.browser.getUser(),[4,this.app.setUser(e)];case 1:return t.sent(),[2]}})})},e.prototype.setUser=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return[4,this.browser.setUser(e)];case 1:return t.sent(),[4,this.syncUser()];case 2:return t.sent(),[2]}})})},e.prototype.setUserId=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return[4,this.browser.setUserId(e)];case 1:return t.sent(),[4,this.syncUser()];case 2:return t.sent(),[2]}})})},e.prototype.setDeviceId=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return[4,this.browser.setDeviceId(e)];case 1:return t.sent(),[4,this.syncUser()];case 2:return t.sent(),[2]}})})},e.prototype.setUserProperty=function(e,t){return d(this,void 0,void 0,function(){return y(this,function(r){switch(r.label){case 0:return[4,this.browser.setUserProperty(e,t)];case 1:return r.sent(),[4,this.syncUser()];case 2:return r.sent(),[2]}})})},e.prototype.setUserProperties=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return[4,this.browser.setUserProperties(e)];case 1:return t.sent(),[4,this.syncUser()];case 2:return t.sent(),[2]}})})},e.prototype.updateUserProperties=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return[4,this.browser.updateUserProperties(e)];case 1:return t.sent(),[4,this.syncUser()];case 2:return t.sent(),[2]}})})}
1,e.prototype.updatePushSubscriptions=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return[4,this.browser.updatePushSubscriptions(e)];case 1:return t.sent(),[2]}})})},e.prototype.updateSmsSubscriptions=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return[4,this.browser.updateSmsSubscriptions(e)];case 1:return t.sent(),[2]}})})},e.prototype.updateKakaoSubscriptions=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return[4,this.browser.updateKakaoSubscriptions(e)];case 1:return t.sent(),[2]}})})},e.prototype.resetUser=function(){return d(this,void 0,void 0,function(){return y(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]}})})},e.prototype.setPhoneNumber=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return[4,this.browser.setPhoneNumber(e)];case 1:return t.sent(),[4,this.syncUser()];case 2:return t.sent(),[2]}})})},e.prototype.unsetPhoneNumber=function(){return d(this,void 0,void 0,function(){return y(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]}})})},e.prototype.variation=function(e,t,r){return void 0===r&&(r="A"),this.browser.variation(e,t,r)},e.prototype.variationDetail=function(e,t,r){return void 0===r&&(r="A"),this.browser.variationDetail(e,t,r)},e.prototype.isFeatureOn=function(e,t){return this.browser.isFeatureOn(e,t)},e.prototype.featureFlagDetail=function(e,t){return this.browser.featureFlagDetail(e,t)},e.prototype.track=function(e,t){return this.browser.track(e,t)},e.prototype.trackPageView=function(e){return this.browser.trackPageView(e)},e.prototype.setCurrentPage=function(e){return this.browser.setCurrentPage(e)},e.prototype.remoteConfig=function(e){return this.browser.remoteConfig(e)},e.prototype.onReady=function(e,t){this.browser.onReady(e,t)},e.prototype.showUserExplorer=function(){this.browser.showUserExplorer()},e.prototype.hideUserExplorer=function(){this.browser.hideUserExplorer()},e.prototype.fetch=function(){return this.browser.fetch()},e.prototype.onInitialized=function(e){return this.browser.onInitialized(e)},e.prototype.close=function(){this.browser.close()},e.prototype.setInAppMessageListener=function(e){this.browser.setInAppMessageListener(e)},e.prototype.getExperiment=function(e){return this.browser.getExperiment(e)},e.prototype.getDisplayedInAppMessageView=function(){return this.browser.getDisplayedInAppMessageView()},e.prototype.isOptOutTracking=function(){return this.browser.isOptOutTracking()},e.prototype.setOptOutTracking=function(e){this.browser.setOptOutTracking(e)},e}(),rf="u">typeof globalThis?globalThis:"u">typeof window?window:void 0!==r.g?r.g:"u">typeof self?self:{},rd=function(e){return e&&e.Math==Math&&e},ry=rd("object"==typeof globalThis&&globalThis)||rd("object"==typeof window&&window)||rd("object"==typeof self&&self)||rd("object"==typeof rf&&rf)||function(){return this}()||Function("return this")(),rv={},rg=function(e){try{return!!e()}catch(e){return!0}},rm=!rg(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),rE=!rg(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),rw=Function.prototype.call,rb=rE?rw.bind(rw):function(){return rw.apply(rw,arguments)},rT={},rI={}.propertyIsEnumerable,rA=Object.getOwnPropertyDescriptor;rT.f=rA&&!rI.call({1:2},1)?function(e){var t=rA(this,e);return!!t&&t.enumerable}:rI;var r_,rN,rO,rM=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},rP=Function.prototype,rS=rP.bind,rC=rP.call,rR=rE&&rS.bind(rC,rC),rU=rE?function(e){return e&&rR(e)}:function(e){return e&&function(){return rC.apply(e,arguments)}},rk=rU({}.toString),rx=rU("".slice),rD=function(e){return rx(rk(e),8,-1)},rL=Object,rF=rU("".split),rV=rg(function(){return!rL("z").propertyIsEnumerable(0)})?function(e){return"String"==rD(e)?rF(e,""):rL(e)}:rL,rK=TypeError,rB=function(e){if(null==e)throw rK("Can't call method on "+e);return e},rH=function(e){return rV(rB(e))},rG=function(e){return"function"==typeof e},rj=function(e){return"object"==typeof e?null!==e:rG(e)},rW=function(e,t){var r;return arguments.length<2?rG(r=ry[e])?r:void 0:ry[e]&&ry[e][t]},rY=rU({}.isPrototypeOf),rJ=rW("navigator","userAgent")||"",rz=ry.process,rq=ry.Deno,rX=rz&&rz.versions||rq&&rq.ver
1sion,r$=rX&&rX.v8;r$&&(rO=(rN=r$.split("."))[0]>0&&rN[0]<4?1:+(rN[0]+rN[1])),!rO&&rJ&&(!(rN=rJ.match(/Edge\/(\d+)/))||rN[1]>=74)&&(rN=rJ.match(/Chrome\/(\d+)/))&&(rO=+rN[1]);var rZ=rO,rQ=!!Object.getOwnPropertySymbols&&!rg(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&rZ&&rZ<41}),r0=rQ&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,r1=Object,r2=r0?function(e){return"symbol"==typeof e}:function(e){var t=rW("Symbol");return rG(t)&&rY(t.prototype,r1(e))},r4=String,r3=function(e){try{return r4(e)}catch(e){return"Object"}},r5=TypeError,r6=function(e){if(rG(e))return e;throw r5(r3(e)+" is not a function")},r9=function(e,t){var r=e[t];return null==r?void 0:r6(r)},r8=TypeError,r7={exports:{}},ne=Object.defineProperty,nt=function(e,t){try{ne(ry,e,{value:t,configurable:!0,writable:!0})}catch(r){ry[e]=t}return t},nr=ry["__core-js_shared__"]||nt("__core-js_shared__",{});(r7.exports=function(e,t){return nr[e]||(nr[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"\xa9 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"});var nn=Object,ni=function(e){return nn(rB(e))},no=rU({}.hasOwnProperty),ns=Object.hasOwn||function(e,t){return no(ni(e),t)},na=0,nu=Math.random(),nc=rU(1..toString),np=function(e){return"Symbol("+(void 0===e?"":e)+")_"+nc(++na+nu,36)},nl=(0,r7.exports)("wks"),nh=ry.Symbol,nf=nh&&nh.for,nd=r0?nh:nh&&nh.withoutSetter||np,ny=function(e){if(!ns(nl,e)||!rQ&&"string"!=typeof nl[e]){var t="Symbol."+e;rQ&&ns(nh,e)?nl[e]=nh[e]:nl[e]=r0&&nf?nf(t):nd(t)}return nl[e]},nv=function(e,t){var r,n;if("string"===t&&rG(r=e.toString)&&!rj(n=rb(r,e))||rG(r=e.valueOf)&&!rj(n=rb(r,e))||"string"!==t&&rG(r=e.toString)&&!rj(n=rb(r,e)))return n;throw r8("Can't convert object to primitive value")},ng=TypeError,nm=ny("toPrimitive"),nE=function(e,t){if(!rj(e)||r2(e))return e;var r,n=r9(e,nm);if(n){if(void 0===t&&(t="default"),!rj(r=rb(n,e,t))||r2(r))return r;throw ng("Can't convert object to primitive value")}return void 0===t&&(t="number"),nv(e,t)},nw=function(e){var t=nE(e,"string");return r2(t)?t:t+""},nb=ry.document,nT=rj(nb)&&rj(nb.createElement),nI=function(e){return nT?nb.createElement(e):{}},nA=!rm&&!rg(function(){return 7!=Object.defineProperty(nI("div"),"a",{get:function(){return 7}}).a}),n_=Object.getOwnPropertyDescriptor;rv.f=rm?n_:function(e,t){if(e=rH(e),t=nw(t),nA)try{return n_(e,t)}catch(e){}if(ns(e,t))return rM(!rb(rT.f,e,t),e[t])};var nN={},nO=rm&&rg(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),nM=String,nP=TypeError,nS=function(e){if(rj(e))return e;throw nP(nM(e)+" is not an object")},nC=TypeError,nR=Object.defineProperty,nU=Object.getOwnPropertyDescriptor;nN.f=rm?nO?function(e,t,r){if(nS(e),t=nw(t),nS(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=nU(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return nR(e,t,r)}:nR:function(e,t,r){if(nS(e),t=nw(t),nS(r),nA)try{return nR(e,t,r)}catch(e){}if("get"in r||"set"in r)throw nC("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var nk=rm?function(e,t,r){return nN.f(e,t,rM(1,r))}:function(e,t,r){return e[t]=r,e},nx={exports:{}},nD=Function.prototype,nL=rm&&Object.getOwnPropertyDescriptor,nF=ns(nD,"name"),nV={EXISTS:nF,PROPER:nF&&"something"===(function(){}).name,CONFIGURABLE:nF&&(!rm||rm&&nL(nD,"name").configurable)},nK=rU(Function.toString);rG(nr.inspectSource)||(nr.inspectSource=function(e){return nK(e)});var nB,nH,nG,nj=nr.inspectSource,nW=ry.WeakMap,nY=rG(nW)&&/native code/.test(nj(nW)),nJ=(0,r7.exports)("keys"),nz=function(e){return nJ[e]||(nJ[e]=np(e))},nq={},nX=ry.TypeError,n$=ry.WeakMap;if(nY||nr.state){var nZ=nr.state||(nr.state=new n$),nQ=rU(nZ.get),n0=rU(nZ.has),n1=rU(nZ.set);nB=function(e,t){if(n0(nZ,e))throw new nX("Object already initialized");return t.facade=e,n1(nZ,e,t),t},nH=function(e){return nQ(nZ,e)||{}},nG=function(e){return n0(nZ,e)}}else{var n2=nz("state");nq[n2]=!0,nB=function(e,t){if(ns(e,n2))throw new nX("Object already initialized");return t.facade=e,nk(e,n2,t),t},nH=function(e){return ns(e,n2)?e[n2]:{}},nG=function(e){return ns(e,n2)}}var n4=nB,n3=nH,n5=function(e){return nG(e)?nH(e):nB(e,{})},n6=function(e){return function(t){var r;if(!rj(t)||(r=nH(t)).type!==e)throw nX("Incompatible receiver, "+e+" required");return r}},n9=nV.CONFIGURABLE,n8=Object.defineProperty,n7=rm&&!rg(function(){return 8!==n8(function(){},"length",{value:8}).length}),ie=String(String).split("String"),it=nx.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),(!ns(e,"name")||n9&&e.name!==t)&&(rm?n8(e,"name",{value:t,configurable:!0}):e.name=t),n7&&r&&ns(r,"arity")&&e.length!==r.arity&&n8(e,"length",{value:r.arity});try{r&&ns(r,"constructor")&&r.constructor?rm&&n8(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=n5(e);return ns(n,"source")||(n.source=ie.join("string"==typeof t?t:"")),e};Function.prototype.toString=it(function(){return rG(this)&&n3(this).source||nj(this)},"toString");var ir=nx.exports,ii=function(e,t,r,n){n||(n={});var i=n.enumerable,o=void 0!==n.name?n.name:t;if(rG(r)&&ir(r,o,n),n.global)i?e[t]=r:nt(t,r);
1else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:nN.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},io={},is=Math.ceil,ia=Math.floor,iu=Math.trunc||function(e){var t=+e;return(t>0?ia:is)(t)},ic=function(e){var t=+e;return t!=t||0===t?0:iu(t)},ip=Math.max,il=Math.min,ih=function(e,t){var r=ic(e);return r<0?ip(r+t,0):il(r,t)},id=Math.min,iy=function(e){var t;return(t=e.length)>0?id(ic(t),0x1fffffffffffff):0},iv=function(e){return function(t,r,n){var i,o=rH(t),s=iy(o),a=ih(n,s);if(e&&r!=r){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}},ig={includes:iv(!0),indexOf:iv(!1)},im=ig.indexOf,iE=rU([].push),iw=function(e,t){var r,n=rH(e),i=0,o=[];for(r in n)!ns(nq,r)&&ns(n,r)&&iE(o,r);for(;t.length>i;)ns(n,r=t[i++])&&(~im(o,r)||iE(o,r));return o},ib=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],iT=ib.concat("length","prototype");io.f=Object.getOwnPropertyNames||function(e){return iw(e,iT)};var iI={};iI.f=Object.getOwnPropertySymbols;var iA=rU([].concat),i_=rW("Reflect","ownKeys")||function(e){var t=io.f(nS(e)),r=iI.f;return r?iA(t,r(e)):t},iN=function(e,t,r){for(var n=i_(t),i=nN.f,o=rv.f,s=0;s<n.length;s++){var a=n[s];ns(e,a)||r&&ns(r,a)||i(e,a,o(t,a))}},iO=/#|\.prototype\./,iM=function(e,t){var r=iS[iP(e)];return r==iR||r!=iC&&(rG(t)?rg(t):!!t)},iP=iM.normalize=function(e){return String(e).replace(iO,".").toLowerCase()},iS=iM.data={},iC=iM.NATIVE="N",iR=iM.POLYFILL="P",iU=rv.f,ik=function(e,t){var r,n,i,o,s,a=e.target,u=e.global,c=e.stat;if(r=u?ry:c?ry[a]||nt(a,{}):(ry[a]||{}).prototype)for(n in t){if(o=t[n],i=e.dontCallGetSet?(s=iU(r,n))&&s.value:r[n],!iM(u?n:a+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;iN(o,i)}(e.sham||i&&i.sham)&&nk(o,"sham",!0),ii(r,n,o,e)}},ix=!rg(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),iD=nz("IE_PROTO"),iL=Object,iF=iL.prototype,iV=ix?iL.getPrototypeOf:function(e){var t=ni(e);if(ns(t,iD))return t[iD];var r=t.constructor;return rG(r)&&t instanceof r?r.prototype:t instanceof iL?iF:null},iK=String,iB=TypeError,iH=function(e){if("object"==typeof e||rG(e))return e;throw iB("Can't set "+iK(e)+" as a prototype")},iG=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=rU(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return nS(r),iH(n),t?e(r,n):r.__proto__=n,r}}():void 0),ij={},iW=Object.keys||function(e){return iw(e,ib)};ij.f=rm&&!nO?Object.defineProperties:function(e,t){nS(e);for(var r,n=rH(t),i=iW(t),o=i.length,s=0;o>s;)nN.f(e,r=i[s++],n[r]);return e};var iY,iJ=rW("document","documentElement"),iz=nz("IE_PROTO"),iq=function(){},iX=function(e){return"<script>"+e+"<\/script>"},i$=function(e){e.write(iX("")),e.close();var t=e.parentWindow.Object;return e=null,t},iZ=function(){try{iY=new ActiveXObject("htmlfile")}catch(e){}iZ="u">typeof document?document.domain&&iY?i$(iY):((t=nI("iframe")).style.display="none",iJ.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(iX("document.F=Object")),e.close(),e.F):i$(iY);for(var e,t,r=ib.length;r--;)delete iZ.prototype[ib[r]];return iZ()};nq[iz]=!0;var iQ=Object.create||function(e,t){var r;return null!==e?(iq.prototype=nS(e),r=new iq,iq.prototype=null,r[iz]=e):r=iZ(),void 0===t?r:ij.f(r,t)},i0=Error,i1=rU("".replace),i2=String(i0("zxcasd").stack),i4=/\n\s*at [^:]*:[^\n]*/,i3=i4.test(i2),i5=rU(rU.bind),i6=function(e,t){return r6(e),void 0===t?e:rE?i5(e,t):function(){return e.apply(t,arguments)}},i9={},i8=ny("iterator"),i7=Array.prototype,oe=function(e){return void 0!==e&&(i9.Array===e||i7[i8]===e)},ot={};ot[ny("toStringTag")]="z";var or="[object z]"===String(ot),on=ny("toStringTag"),oi=Object,oo="Arguments"==rD(function(){return arguments}()),os=or?rD:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}
1(t=oi(e),on))?r:oo?rD(t):"Object"==(n=rD(t))&&rG(t.callee)?"Arguments":n},oa=ny("iterator"),ou=function(e){if(null!=e)return r9(e,oa)||r9(e,"@@iterator")||i9[os(e)]},oc=TypeError,op=function(e,t){var r=arguments.length<2?ou(e):t;if(r6(r))return nS(rb(r,e));throw oc(r3(e)+" is not iterable")},ol=function(e,t,r){var n,i;nS(e);try{if(!(n=r9(e,"return"))){if("throw"===t)throw r;return r}n=rb(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return nS(n),r},oh=TypeError,of=function(e,t){this.stopped=e,this.result=t},od=of.prototype,oy=function(e,t,r){var n,i,o,s,a,u,c,p=r&&r.that,l=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),f=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),y=i6(t,p),v=function(e){return n&&ol(n,"normal",e),new of(!0,e)},g=function(e){return l?(nS(e),d?y(e[0],e[1],v):y(e[0],e[1])):d?y(e,v):y(e)};if(h)n=e.iterator;else if(f)n=e;else{if(!(i=ou(e)))throw oh(r3(e)+" is not iterable");if(oe(i)){for(o=0,s=iy(e);s>o;o++)if((a=g(e[o]))&&rY(od,a))return a;return new of(!1)}n=op(e,i)}for(u=h?e.next:n.next;!(c=rb(u,n)).done;){try{a=g(c.value)}catch(e){ol(n,"throw",e)}if("object"==typeof a&&a&&rY(od,a))return a}return new of(!1)},ov=String,og=function(e){if("Symbol"===os(e))throw TypeError("Cannot convert a Symbol value to a string");return ov(e)},om=!rg(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",rM(1,7)),7!==e.stack)}),oE=function(e,t){if(i3&&"string"==typeof e&&!i0.prepareStackTrace)for(;t--;)e=i1(e,i4,"");return e},ow=function(e,t){rj(t)&&"cause"in t&&nk(e,"cause",t.cause)},ob=ny("toStringTag"),oT=Error,oI=[].push,oA=function(e,t){var r,n=arguments.length>2?arguments[2]:void 0,i=rY(o_,this);iG?r=iG(new oT,i?iV(this):o_):nk(r=i?this:iQ(o_),ob,"Error"),void 0!==t&&nk(r,"message",function(e,t){return void 0===e?arguments.length<2?"":t:og(e)}(t)),om&&nk(r,"stack",oE(r.stack,1)),ow(r,n);var o=[];return oy(e,oI,{that:o}),nk(r,"errors",o),r};iG?iG(oA,oT):iN(oA,oT,{name:!0});var o_=oA.prototype=iQ(oT.prototype,{constructor:rM(1,oA),message:rM(1,""),name:rM(1,"AggregateError")});ik({global:!0,constructor:!0,arity:2},{AggregateError:oA});var oN=nN.f,oO=ny("unscopables"),oM=Array.prototype;null==oM[oO]&&oN(oM,oO,{configurable:!0,value:iQ(null)});var oP,oS,oC,oR=function(e){oM[oO][e]=!0},oU=ny("iterator"),ok=!1;[].keys&&("next"in(oC=[].keys())?(oS=iV(iV(oC)))!==Object.prototype&&(oP=oS):ok=!0),(null==oP||rg(function(){var e={};return oP[oU].call(e)!==e}))&&(oP={}),rG(oP[oU])||ii(oP,oU,function(){return this});var ox=oP,oD=ok,oL=nN.f,oF=ny("toStringTag"),oV=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ns(e,oF)&&oL(e,oF,{configurable:!0,value:t})},oK=function(){return this},oB=function(e,t,r,n){var i=t+" Iterator";return e.prototype=iQ(ox,{next:rM(+!n,r)}),oV(e,i,!1),i9[i]=oK,e},oH=nV.PROPER,oG=nV.CONFIGURABLE,oj=ny("iterator"),oW=function(){return this},oY=function(e,t,r,n,i,o,s){oB(r,t,n);var a,u,c,p=function(e){if(e===i&&y)return y;if(!oD&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",h=!1,f=e.prototype,d=f[oj]||f["@@iterator"]||i&&f[i],y=!oD&&d||p(i),v="Array"==t&&f.entries||d;if(v&&(a=iV(v.call(new e)))!==Object.prototype&&a.next&&(iV(a)!==ox&&(iG?iG(a,ox):rG(a[oj])||ii(a,oj,oW)),oV(a,l,!0)),oH&&"values"==i&&d&&"values"!==d.name&&(oG?nk(f,"name","values"):(h=!0,y=function(){return rb(d,this)})),i)if(u={values:p("values"),keys:o?y:p("keys"),entries:p("entries")},s)for(c in u)!oD&&!h&&c in f||ii(f,c,u[c]);else ik({target:t,proto:!0,forced:oD||h},u);return f[oj]!==y&&ii(f,oj,y,{name:i}),i9[t]=y,u},oJ=nN.f,oz=n6("Array Iterator"),oq=oY(Array,"Array",function(e,t){n4(this,{type:"Array Iterator",target:rH(e),index:0,kind:t})},function(){var e=oz(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),oX=i9.Arguments=i9.Array;if(oR("keys"),oR("values"),oR("entries"),rm&&"values"!==oX.name)try{oJ(oX,"name",{value:"values"})}catch(e){}or||ii(Object.prototype,"toString",or?({}).toString:function(){return"[object "+os(this)+"]"},{unsafe:!0});var o$="process"==rD(ry.process),oZ=ny("species"),oQ=function(e){var t=rW(e),r=nN.f;rm&&t&&!t[oZ]&&r(t,oZ,{configurable:!0,get:function(){return this}})},o0=TypeError,o1=function(e,t){if(rY(t,e))return e;throw o0("Incorrect invocation")},o2=function(){},o4=[],o3=rW("Reflect","construct"),o5=/^\s*(?:class|function)\b/,o6=rU(o5.exec),o9=!o5.exec(o2),o8=function(e){if(!rG(e))return!1;try{return o3(o2,o4,e),!0}catch(e){return!1}},o7=function(e){if(!rG(e))return!1;switch(os(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return o9||!!o6(o5,nj(e))}catch(e){return!0}};o7.sham=!0;var se,st,sr,sn,si=!o3||rg(function(){var e;return o8(o8.call)||!o8(Object)||!o8(function(){e=!0})||e})?o7:o8,so=TypeError,ss=function(e){if(si(e))return e;throw so(r3(e)+" is not a constructor")},sa=ny("species"),su=function(e,t){var r,n=nS(e).constructor;return void 0===n||null==(r=nS(n)[sa])?t:ss(r)},sc=Function.prototype,sp=sc.apply,sl=sc.call,sh="object"==typeof Reflect&&Reflect.apply||(rE?sl.bind(sp):function(){return sl.apply(sp,arguments)}),sf=rU([].slice),sd=TypeError,sy=/(?:ipad|iphone|ipod).*applewebkit/i.test(rJ),sv=function(e,t){if(e<t)throw sd("Not enough arguments");return e},sg=ry.setImmediate,sm=ry.clearImmediate,sE=ry.process,sw=ry.Dispatch,sb=ry.Function,sT=ry.MessageChannel,sI=ry.String,
1sA=0,s_={};try{se=ry.location}catch(e){}var sN=function(e){if(ns(s_,e)){var t=s_[e];delete s_[e],t()}},sO=function(e){return function(){sN(e)}},sM=function(e){sN(e.data)},sP=function(e){ry.postMessage(sI(e),se.protocol+"//"+se.host)};sg&&sm||(sg=function(e){sv(arguments.length,1);var t=rG(e)?e:sb(e),r=sf(arguments,1);return s_[++sA]=function(){sh(t,void 0,r)},st(sA),sA},sm=function(e){delete s_[e]},o$?st=function(e){sE.nextTick(sO(e))}:sw&&sw.now?st=function(e){sw.now(sO(e))}:sT&&!sy?(sn=(sr=new sT).port2,sr.port1.onmessage=sM,st=i6(sn.postMessage,sn)):ry.addEventListener&&rG(ry.postMessage)&&!ry.importScripts&&se&&"file:"!==se.protocol&&!rg(sP)?(st=sP,ry.addEventListener("message",sM,!1)):st="onreadystatechange"in nI("script")?function(e){iJ.appendChild(nI("script")).onreadystatechange=function(){iJ.removeChild(this),sN(e)}}:function(e){setTimeout(sO(e),0)});var sS,sC,sR,sU,sk,sx,sD,sL,sF=sg,sV=/ipad|iphone|ipod/i.test(rJ)&&void 0!==ry.Pebble,sK=/web0s(?!.*chrome)/i.test(rJ),sB=rv.f,sH=sF,sG=ry.MutationObserver||ry.WebKitMutationObserver,sj=ry.document,sW=ry.process,sY=ry.Promise,sJ=sB(ry,"queueMicrotask"),sz=sJ&&sJ.value;sz||(sS=function(){var e,t;for(o$&&(e=sW.domain)&&e.exit();sC;){t=sC.fn,sC=sC.next;try{t()}catch(e){throw sC?sU():sR=void 0,e}}sR=void 0,e&&e.enter()},sy||o$||sK||!sG||!sj?!sV&&sY&&sY.resolve?((sD=sY.resolve(void 0)).constructor=sY,sL=i6(sD.then,sD),sU=function(){sL(sS)}):o$?sU=function(){sW.nextTick(sS)}:(sH=i6(sH,ry),sU=function(){sH(sS)}):(sk=!0,sx=sj.createTextNode(""),new sG(sS).observe(sx,{characterData:!0}),sU=function(){sx.data=sk=!sk}));var sq=sz||function(e){var t={fn:e,next:void 0};sR&&(sR.next=t),sC||(sC=t,sU()),sR=t},sX=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},s$=function(){this.head=null,this.tail=null};s$.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var sZ=ry.Promise,sQ="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,s0=!sQ&&!o$&&"object"==typeof window&&"object"==typeof document;sZ&&sZ.prototype;var s1=ny("species"),s2=!1,s4=rG(ry.PromiseRejectionEvent),s3=iM("Promise",function(){var e=nj(sZ),t=e!==String(sZ);if(!t&&66===rZ)return!0;if(!rZ||rZ<51||!/native code/.test(e)){var r=new sZ(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((r.constructor={})[s1]=n,!(s2=r.then(function(){})instanceof n))return!0}return!t&&(s0||sQ)&&!s4}),s5=s2,s6={},s9=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=r6(t),this.reject=r6(r)};s6.f=function(e){return new s9(e)};var s8,s7,ae,at=function(e,t){var r=ry.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))},ar=n6("Promise"),an=sZ&&sZ.prototype,ai=sZ,ao=an,as=ry.TypeError,aa=ry.document,au=ry.process,ac=s6.f,ap=ac,al=!!(aa&&aa.createEvent&&ry.dispatchEvent),ah=function(e){var t;return!(!rj(e)||!rG(t=e.then))&&t},af=function(e,t){var r,n,i,o=t.value,s=1==t.state,a=s?e.ok:e.fail,u=e.resolve,c=e.reject,p=e.domain;try{a?(s||(2===t.rejection&&am(t),t.rejection=1),!0===a?r=o:(p&&p.enter(),r=a(o),p&&(p.exit(),i=!0)),r===e.promise?c(as("Promise-chain cycle")):(n=ah(r))?rb(n,r,u,c):u(r)):c(o)}catch(e){p&&!i&&p.exit(),c(e)}},ad=function(e,t){e.notified||(e.notified=!0,sq(function(){for(var r,n=e.reactions;r=n.get();)af(r,e);e.notified=!1,t&&!e.rejection&&av(e)}))},ay=function(e,t,r){var n,i;al?((n=aa.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),ry.dispatchEvent(n)):n={promise:t,reason:r},!s4&&(i=ry["on"+e])?i(n):"unhandledrejection"===e&&at("Unhandled promise rejection",r)},av=function(e){rb(sF,ry,function(){var t,r=e.facade,n=e.value;if(ag(e)&&(t=sX(function(){o$?au.emit("unhandledRejection",n,r):ay("unhandledrejection",r,n)}),e.rejection=o$||ag(e)?2:1,t.error))throw t.value})},ag=function(e){return 1!==e.rejection&&!e.parent},am=function(e){rb(sF,ry,function(){var t=e.facade;o$?au.emit("rejectionHandled",t):ay("rejectionhandled",t,e.value)})},aE=function(e,t,r){return function(n){e(t,n,r)}},aw=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,ad(e,!0))},ab=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);
1try{if(e.facade===t)throw as("Promise can't be resolved itself");var n=ah(t);n?sq(function(){var r={done:!1};try{rb(n,t,aE(ab,r,e),aE(aw,r,e))}catch(t){aw(r,t,e)}}):(e.value=t,e.state=1,ad(e,!1))}catch(t){aw({done:!1},t,e)}}};if(s3&&(ao=(ai=function(e){o1(this,ao),r6(e),rb(s8,this);var t=ar(this);try{e(aE(ab,t),aE(aw,t))}catch(e){aw(t,e)}}).prototype,(s8=function(e){n4(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new s$,rejection:!1,state:0,value:void 0})}).prototype=ii(ao,"then",function(e,t){var r=ar(this),n=ac(su(this,ai));return r.parent=!0,n.ok=!rG(e)||e,n.fail=rG(t)&&t,n.domain=o$?au.domain:void 0,0==r.state?r.reactions.add(n):sq(function(){af(n,r)}),n.promise}),s7=function(){var e=new s8,t=ar(e);this.promise=e,this.resolve=aE(ab,t),this.reject=aE(aw,t)},s6.f=ac=function(e){return e===ai||void 0===e?new s7(e):ap(e)},rG(sZ)&&an!==Object.prototype)){ae=an.then,s5||ii(an,"then",function(e,t){var r=this;return new ai(function(e,t){rb(ae,r,e,t)}).then(e,t)},{unsafe:!0});try{delete an.constructor}catch(e){}iG&&iG(an,ao)}ik({global:!0,constructor:!0,wrap:!0,forced:s3},{Promise:ai}),oV(ai,"Promise",!1),oQ("Promise");var aT=ny("iterator"),aI=!1;try{var aA=0,a_={next:function(){return{done:!!aA++}},return:function(){aI=!0}};a_[aT]=function(){return this},Array.from(a_,function(){throw 2})}catch(e){}var aN=function(e,t){if(!t&&!aI)return!1;var r=!1;try{var n={};n[aT]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},aO=s3||!aN(function(e){sZ.all(e).then(void 0,function(){})});ik({target:"Promise",stat:!0,forced:aO},{all:function(e){var t=this,r=s6.f(t),n=r.resolve,i=r.reject,o=sX(function(){var r=r6(t.resolve),o=[],s=0,a=1;oy(e,function(e){var u=s++,c=!1;a++,rb(r,t,e).then(function(e){c||(c=!0,o[u]=e,--a||n(o))},i)}),--a||n(o)});return o.error&&i(o.value),r.promise}});var aM=sZ&&sZ.prototype;if(ik({target:"Promise",proto:!0,forced:s3,real:!0},{catch:function(e){return this.then(void 0,e)}}),rG(sZ)){var aP=rW("Promise").prototype.catch;aM.catch!==aP&&ii(aM,"catch",aP,{unsafe:!0})}ik({target:"Promise",stat:!0,forced:aO},{race:function(e){var t=this,r=s6.f(t),n=r.reject,i=sX(function(){var i=r6(t.resolve);oy(e,function(e){rb(i,t,e).then(r.resolve,n)})});return i.error&&n(i.value),r.promise}}),ik({target:"Promise",stat:!0,forced:s3},{reject:function(e){var t=s6.f(this);return rb(t.reject,void 0,e),t.promise}});var aS=function(e,t){if(nS(e),rj(t)&&t.constructor===e)return t;var r=s6.f(e);return(0,r.resolve)(t),r.promise};rW("Promise"),ik({target:"Promise",stat:!0,forced:s3},{resolve:function(e){return aS(this,e)}}),ik({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=s6.f(t),n=r.resolve,i=r.reject,o=sX(function(){var r=r6(t.resolve),i=[],o=0,s=1;oy(e,function(e){var a=o++,u=!1;s++,rb(r,t,e).then(function(e){u||(u=!0,i[a]={status:"fulfilled",value:e},--s||n(i))},function(e){u||(u=!0,i[a]={status:"rejected",reason:e},--s||n(i))})}),--s||n(i)});return o.error&&i(o.value),r.promise}}),ik({target:"Promise",stat:!0},{any:function(e){var t=this,r=rW("AggregateError"),n=s6.f(t),i=n.resolve,o=n.reject,s=sX(function(){var n=r6(t.resolve),s=[],a=0,u=1,c=!1;oy(e,function(e){var p=a++,l=!1;u++,rb(n,t,e).then(function(e){l||c||(c=!0,i(e))},function(e){l||c||(l=!0,s[p]=e,--u||o(new r(s,"No one promise resolved")))})}),--u||o(new r(s,"No one promise resolved"))});return s.error&&o(s.value),n.promise}});var aC=sZ&&sZ.prototype;if(ik({target:"Promise",proto:!0,real:!0,forced:!!sZ&&rg(function(){aC.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=su(this,rW("Promise")),r=rG(e);return this.then(r?function(r){return aS(t,e()).then(function(){return r})}:e,r?function(r){return aS(t,e()).then(function(){throw r})}:e)}}),rG(sZ)){var aR=rW("Promise").prototype.finally;aC.finally!==aR&&ii(aC,"finally",aR,{unsafe:!0})}var aU=rU("".charAt),ak=rU("".charCodeAt),ax=rU("".slice),aD=function(e){return function(t,r){var n,i,o=og(rB(t)),s=ic(r),a=o.length;return s<0||s>=a?e?"":void 0:(n=ak(o,s))<55296||n>56319||s+1===a||(i=ak(o,s+1))<56320||i>57343?e?aU(o,s):n:e?ax(o,s,s+2):i-56320+(n-55296<<10)+65536}},aL={codeAt:aD(!1),charAt:aD(!0)}.charAt,aF=n6("String Iterator");oY(String,"String",function(e){n4(this,{type:"String Iterator",string:og(e),index:0})},function(){var e,t=aF(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=aL(r,n),t.index+=e.length,{value:e,done:!1})});var aV=(ry.Promise,nI("span").classList),aK=aV&&aV.constructor&&aV.constructor.prototype,aB=aK===Object.prototype?void 0:aK,aH={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},aG=ny("iterator"),aj=ny("toStringTag"),aW=oq.values,aY=function(e,t){if(e){if(e[aG]!==aW)try{nk(e,aG,aW)}catch(t){e[aG]=aW}if(e[aj]||nk(e,aj,t),aH[t]){for(var r in oq)if(e[r]!==oq[r])try{nk(e,r,oq[r])}catch(t){e[r]=oq[r]}}}};for(var aJ in aH)aY(ry[aJ]&&ry[aJ].prototype,aJ);aY(aB,"DOMTokenList"),ik({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=s6.f(this),r=sX(e);return(r.error?t.reject:t.resolve)(r.value),t.promise}});var az=function(e,t,r){var n=nw(t);n in e?nN.f(e,n,rM(0,r)):e[n]=r},aq=function(e,t,r,n){try{return n?t(nS(r)[0],r[1]):t(r)}catch(t){ol(e,"throw",t)}},aX=Array;ik({target:"Array",stat:!0,forced:!aN(function(e){Array.from(e)})},{from:function(e){var t=ni(e),r=si(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=void 0!==i;o&&(i=i6(i,n>2?arguments[2]:void 0));var s,a,u,c,p,l,h=ou(t),f=0;if(!h||this===aX&&oe(h))for(s=iy(t),a=r?new this(s):aX(s);s>f;f++)l=o?i(t[f],f):t[f],az(a,f,l);else for(p=(c=op(t,h)).next,a=r?new this:[];!(u=rb(p,c)).done;f++)l=o?aq(c,i,[u.value,f],!0):u.value,az(a,f,l);return a.length=f,a}});var a$=Array.isArray||function(e){return"Array"==rD(e)};ik({target:"Array",stat:!0},{isArray:a$});var aZ=Array;ik({target:"Array",stat:!0,forced:rg(function(){function e(){}return!(aZ.of.call(e)instanceof e)})},{of:function(){for(var e=0,t=arguments.length,r=new(si(this)?this:aZ)(t);t>e;)az(r,e,arguments[e++]);return r.length=t,r}}),ik({target:"Array",proto:!0},{at:function(e){var t=ni(this),r=iy(t),n=ic(e),i=n>=0?n:r+n;return i<0||i>=r?void 0:t[i]}}),oR("at");var aQ=TypeError,a0=function(e){if(e>0x1fffffffffffff)throw aQ("Maximum allowed index exceeded");return e},a1=ny("species"),a2=Array,a4=function(e){var t;return a$(e)&&(si(t=e.constructor)&&(t===a2||a$(t.prototype))||rj(t)&&null===(t=t[a1]))&&
1(t=void 0),void 0===t?a2:t},a3=function(e,t){return new(a4(e))(0===t?0:t)},a5=ny("species"),a6=function(e){return rZ>=51||!rg(function(){var t=[];return(t.constructor={})[a5]=function(){return{foo:1}},1!==t[e](Boolean).foo})},a9=ny("isConcatSpreadable"),a8=rZ>=51||!rg(function(){var e=[];return e[a9]=!1,e.concat()[0]!==e}),a7=a6("concat"),ue=function(e){if(!rj(e))return!1;var t=e[a9];return void 0!==t?!!t:a$(e)};ik({target:"Array",proto:!0,arity:1,forced:!a8||!a7},{concat:function(e){var t,r,n,i,o,s=ni(this),a=a3(s,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(ue(o=-1===t?s:arguments[t]))for(a0(u+(i=iy(o))),r=0;r<i;r++,u++)r in o&&az(a,u,o[r]);else a0(u+1),az(a,u++,o);return a.length=u,a}});var ut=TypeError,ur=function(e,t){if(!delete e[t])throw ut("Cannot delete property "+r3(t)+" of "+r3(e))},un=Math.min;ik({target:"Array",proto:!0},{copyWithin:[].copyWithin||function(e,t){var r=ni(this),n=iy(r),i=ih(e,n),o=ih(t,n),s=arguments.length>2?arguments[2]:void 0,a=un((void 0===s?n:ih(s,n))-o,n-i),u=1;for(o<i&&i<o+a&&(u=-1,o+=a-1,i+=a-1);a-- >0;)o in r?r[i]=r[o]:ur(r,i),i+=u,o+=u;return r}}),oR("copyWithin");var ui=rU([].push),uo=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,o=6==e,s=7==e,a=5==e||o;return function(u,c,p,l){for(var h,f,d=ni(u),y=rV(d),v=i6(c,p),g=iy(y),m=0,E=l||a3,w=t?E(u,g):r||s?E(u,0):void 0;g>m;m++)if((a||m in y)&&(f=v(h=y[m],m,d),e))if(t)w[m]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:ui(w,h)}else switch(e){case 4:return!1;case 7:ui(w,h)}return o?-1:n||i?i:w}},us={forEach:uo(0),map:uo(1),filter:uo(2),some:uo(3),every:uo(4),find:uo(5),findIndex:uo(6),filterReject:uo(7)},ua=function(e,t){var r=[][e];return!!r&&rg(function(){r.call(null,t||function(){return 1},1)})},uu=us.every;ik({target:"Array",proto:!0,forced:!ua("every")},{every:function(e){return uu(this,e,arguments.length>1?arguments[1]:void 0)}}),ik({target:"Array",proto:!0},{fill:function(e){for(var t=ni(this),r=iy(t),n=arguments.length,i=ih(n>1?arguments[1]:void 0,r),o=n>2?arguments[2]:void 0,s=void 0===o?r:ih(o,r);s>i;)t[i++]=e;return t}}),oR("fill");var uc=us.filter;ik({target:"Array",proto:!0,forced:!a6("filter")},{filter:function(e){return uc(this,e,arguments.length>1?arguments[1]:void 0)}});var up=us.find,ul=!0;"find"in[]&&[,].find(function(){ul=!1}),ik({target:"Array",proto:!0,forced:ul},{find:function(e){return up(this,e,arguments.length>1?arguments[1]:void 0)}}),oR("find");var uh=us.findIndex,uf=!0;"findIndex"in[]&&[,].findIndex(function(){uf=!1}),ik({target:"Array",proto:!0,forced:uf},{findIndex:function(e){return uh(this,e,arguments.length>1?arguments[1]:void 0)}}),oR("findIndex");var ud=function(e){var t=1==e;return function(r,n,i){for(var o,s=ni(r),a=rV(s),u=i6(n,i),c=iy(a);c-- >0;)if(u(o=a[c],c,s))switch(e){case 0:return o;case 1:return c}return t?-1:void 0}},uy={findLast:ud(0),findLastIndex:ud(1)},uv=uy.findLast;ik({target:"Array",proto:!0},{findLast:function(e){return uv(this,e,arguments.length>1?arguments[1]:void 0)}}),oR("findLast");var ug=uy.findLastIndex;ik({target:"Array",proto:!0},{findLastIndex:function(e){return ug(this,e,arguments.length>1?arguments[1]:void 0)}}),oR("findLastIndex");var um=function(e,t,r,n,i,o,s,a){for(var u,c,p=i,l=0,h=!!s&&i6(s,a);l<n;)l in r&&(u=h?h(r[l],l,t):r[l],o>0&&a$(u)?(c=iy(u),p=um(e,t,u,c,p,o-1)-1):(a0(p+1),e[p]=u),p++),l++;return p};ik({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=ni(this),r=iy(t),n=a3(t,0);return n.length=um(n,t,t,r,0,void 0===e?1:ic(e)),n}}),ik({target:"Array",proto:!0},{flatMap:function(e){var t,r=ni(this),n=iy(r);return r6(e),(t=a3(r,0)).length=um(t,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var uE=us.forEach,uw=ua("forEach")?[].forEach:function(e){return uE(this,e,arguments.length>1?arguments[1]:void 0)};ik({target:"Array",proto:!0,forced:[].forEach!=uw},{forEach:uw});var ub=ig.includes;ik({target:"Array",proto:!0,forced:rg(function(){return![,].includes()})},{includes:function(e){return ub(this,e,arguments.length>1?arguments[1]:void 0)}}),oR("includes");var uT=ig.indexOf,uI=rU([].indexOf),uA=!!uI&&1/uI([1],1,-0)<0,u_=ua("indexOf");ik({target:"Array",proto:!0,forced:uA||!u_},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return uA?uI(this,e,t)||0:uT(this,e,t)}});var uN=rU([].join),uO=rV!=Object,uM=ua("join",",");ik({target:"Array",proto:!0,forced:uO||!uM},{join:function(e){return uN(rH(this),void 0===e?",":e)}});var uP=Math.min,uS=[].lastIndexOf,uC=!!uS&&1/[1].lastIndexOf(1,-0)<0,uR=ua("lastIndexOf"),uU=uC||!uR?function(e){if(uC)return sh(uS,this,arguments)||0;var t=rH(this),r=iy(t),n=r-1;for(arguments.length>1&&(n=uP(n,ic(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return -1}:uS;ik({target:"Array",proto:!0,forced:uU!==[].lastIndexOf},{lastIndexOf:uU});var uk=us.map;ik({target:"Array",proto:!0,forced:!a6("map")},{map:function(e){return uk(this,e,arguments.length>1?arguments[1]:void 0)}});var ux=rg(function(){return 0x100000001!==[].push.call({length:0x100000000},1)}),uD=!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}();ik({target:"Array",proto:!0,arity:1,forced:ux||uD},{push:function(e){var t=ni(this),r=iy(t),n=arguments.length;a0(r+n);for(var i=0;i<n;i++)t[r]=arguments[i],r++;return t.length=r,r}});var uL=TypeError,uF=function(e){return function(t,r,n,i){r6(r);var o=ni(t),s=rV(o),a=iy(o),u=e?a-1:0,c=e?-1:1;if(n<2)for(;;){if(u in s){i=s[u],u+=c;break}
1if(u+=c,e?u<0:a<=u)throw uL("Reduce of empty array with no initial value")}for(;e?u>=0:a>u;u+=c)u in s&&(i=r(i,s[u],u,o));return i}},uV={left:uF(!1),right:uF(!0)},uK=uV.left;ik({target:"Array",proto:!0,forced:!ua("reduce")||!o$&&rZ>79&&rZ<83},{reduce:function(e){var t=arguments.length;return uK(this,e,t,t>1?arguments[1]:void 0)}});var uB=uV.right;ik({target:"Array",proto:!0,forced:!ua("reduceRight")||!o$&&rZ>79&&rZ<83},{reduceRight:function(e){return uB(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var uH=rU([].reverse),uG=[1,2];ik({target:"Array",proto:!0,forced:String(uG)===String(uG.reverse())},{reverse:function(){return a$(this)&&(this.length=this.length),uH(this)}});var uj=a6("slice"),uW=ny("species"),uY=Array,uJ=Math.max;ik({target:"Array",proto:!0,forced:!uj},{slice:function(e,t){var r,n,i,o=rH(this),s=iy(o),a=ih(e,s),u=ih(void 0===t?s:t,s);if(a$(o)&&((si(r=o.constructor)&&(r===uY||a$(r.prototype))||rj(r)&&null===(r=r[uW]))&&(r=void 0),r===uY||void 0===r))return sf(o,a,u);for(n=new(void 0===r?uY:r)(uJ(u-a,0)),i=0;a<u;a++,i++)a in o&&az(n,i,o[a]);return n.length=i,n}});var uz=us.some;ik({target:"Array",proto:!0,forced:!ua("some")},{some:function(e){return uz(this,e,arguments.length>1?arguments[1]:void 0)}});var uq=Array,uX=Math.max,u$=function(e,t,r){for(var n=iy(e),i=ih(t,n),o=ih(void 0===r?n:r,n),s=uq(uX(o-i,0)),a=0;i<o;i++,a++)az(s,a,e[i]);return s.length=a,s},uZ=Math.floor,uQ=function(e,t){var r=e.length,n=uZ(r/2);return r<8?u0(e,t):u1(e,uQ(u$(e,0,n),t),uQ(u$(e,n),t),t)},u0=function(e,t){for(var r,n,i=e.length,o=1;o<i;){for(n=o,r=e[o];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},u1=function(e,t,r,n){for(var i=t.length,o=r.length,s=0,a=0;s<i||a<o;)e[s+a]=s<i&&a<o?0>=n(t[s],r[a])?t[s++]:r[a++]:s<i?t[s++]:r[a++];return e},u2=rJ.match(/firefox\/(\d+)/i),u4=!!u2&&+u2[1],u3=/MSIE|Trident/.test(rJ),u5=rJ.match(/AppleWebKit\/(\d+)\./),u6=!!u5&&+u5[1],u9=[],u8=rU(u9.sort),u7=rU(u9.push),ce=rg(function(){u9.sort(void 0)}),ct=rg(function(){u9.sort(null)}),cr=ua("sort"),cn=!rg(function(){if(rZ)return rZ<70;if(!(u4&&u4>3)){if(u3)return!0;if(u6)return u6<603;var e,t,r,n,i="";for(e=65;e<76;
1e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)u9.push({k:t+n,v:r})}for(u9.sort(function(e,t){return t.v-e.v}),n=0;n<u9.length;n++)t=u9[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}});ik({target:"Array",proto:!0,forced:ce||!ct||!cr||!cn},{sort:function(e){void 0!==e&&r6(e);var t=ni(this);if(cn)return void 0===e?u8(t):u8(t,e);var r,n,i=[],o=iy(t);for(n=0;n<o;n++)n in t&&u7(i,t[n]);for(uQ(i,function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:og(t)>og(r)?1:-1}),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<o;)ur(t,n++);return t}}),oQ("Array");var ci=a6("splice"),co=Math.max,cs=Math.min;ik({target:"Array",proto:!0,forced:!ci},{splice:function(e,t){var r,n,i,o,s,a,u=ni(this),c=iy(u),p=ih(e,c),l=arguments.length;for(0===l?r=n=0:1===l?(r=0,n=c-p):(r=l-2,n=cs(co(ic(t),0),c-p)),a0(c+r-n),i=a3(u,n),o=0;o<n;o++)(s=p+o)in u&&az(i,o,u[s]);if(i.length=n,r<n){for(o=p;o<c-n;o++)a=o+r,(s=o+n)in u?u[a]=u[s]:ur(u,a);for(o=c;o>c-n+r;o--)ur(u,o-1)}else if(r>n)for(o=c-n;o>p;o--)a=o+r-1,(s=o+n-1)in u?u[a]=u[s]:ur(u,a);for(o=0;o<r;o++)u[o+p]=arguments[o+2];return u.length=c-n+r,i}}),oR("flat"),oR("flatMap");var ca=1!==[].unshift(0),cu=!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}();ik({target:"Array",proto:!0,arity:1,forced:ca||cu},{unshift:function(e){var t=ni(this),r=iy(t),n=arguments.length;if(n){a0(r+n);for(var i=r;i--;){var o=i+n;i in t?t[o]=t[i]:ur(t,o)}for(var s=0;s<n;s++)t[s]=arguments[s]}return t.length=r+n}}),ry.Array;var cc={exports:{}},cp={},cl=io.f,ch="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];cp.f=function(e){return ch&&"Window"==rD(e)?function(e){try{return cl(e)}catch(e){return u$(ch)}}(e):cl(rH(e))};var cf=rg(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),cd=Object.isExtensible,cy=rg(function(){cd(1)})||cf?function(e){return!!rj(e)&&(!cf||"ArrayBuffer"!=rD(e))&&(!cd||cd(e))}:cd,cv=!rg(function(){return Object.isExtensible(Object.preventExtensions({}))}),cg=nN.f,cm=!1,cE=np("meta"),cw=0,cb=function(e){cg(e,cE,{value:{objectID:"O"+cw++,weakData:{}}})},cT=cc.exports={enable:function(){cT.enable=function(){},cm=!0;var e=io.f,t=rU([].splice),r={};r[cE]=1,e(r).length&&(io.f=function(r){for(var n=e(r),i=0,o=n.length;i<o;i++)if(n[i]===cE){t(n,i,1);break}return n},ik({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:cp.f}))},fastKey:function(e,t){if(!rj(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!ns(e,cE)){if(!cy(e))return"F";if(!t)return"E";cb(e)}return e[cE].objectID},getWeakData:function(e,t){if(!ns(e,cE)){if(!cy(e))return!0;if(!t)return!1;cb(e)}return e[cE].weakData},onFreeze:function(e){return cv&&cm&&cy(e)&&!ns(e,cE)&&cb(e),e}};nq[cE]=!0;var cI=cc.exports,cA=function(e,t,r){var n,i;return iG&&rG(n=t.constructor)&&n!==r&&rj(i=n.prototype)&&i!==r.prototype&&iG(e,i),e},c_=function(e,t,r){for(var n in t)ii(e,n,t[n],r);return e},cN=nN.f,cO=cc.exports.fastKey,cM=n4,cP=n6;!function(e,t){var r=-1!=="Map".indexOf("Map"),n=-1!=="Map".indexOf("Weak"),i=r?"set":"add",o=ry.Map,s=o&&o.prototype,a=o,u={},c=function(e){var t=rU(s[e]);ii(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(n&&!rj(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return n&&!rj(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(n&&!rj(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(iM("Map",!rG(o)||!(n||s.forEach&&!rg(function(){(new o).entries().next()}))))a=t.getConstructor(e,"Map",r,i),cI.enable();else if(iM("Map",!0)){var p=new a,l=p[i](n?{}:-0,1)!=p,h=rg(function(){p.has(1)}),f=aN(function(e){new o(e)}),d=!n&&rg(function(){for(var e=new o,t=5;t--;)e[i](t,t);return!e.has(-0)});f||((a=e(function(e,t){o1(e,s);var n=cA(new o,e,a);return null!=t&&oy(t,n[i],{that:n,AS_ENTRIES:r}),n})).prototype=s,s.constructor=a),(h||d)&&(c("delete"),c("has"),r&&c("get")),(d||l)&&c(i),n&&s.clear&&delete s.clear}u.Map=a,ik({global:!0,constructor:!0,forced:a!=o},u),oV(a,"Map"),n||t.setStrong(a,"Map",r)}(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,t,r,n){var i=e(function(e,i){o1(e,o),cM(e,{type:t,index:iQ(null),first:void 0,last:void 0,size:0}),rm||(e.size=0),null!=i&&oy(i,e[n],{that:e,AS_ENTRIES:r})}),o=i.prototype,s=cP(t),a=function(e,t,r){var n,i,o=s(e),a=u(e,t);return a?a.value=r:(o.last=a={index:i=cO(t,!0),key:t,value:r,previous:n=o.last,next:void 0,removed:!1},o.first||(o.first=a),n&&(n.next=a),rm?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},u=function(e,t){var r,n=s(e),i=cO(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key==t)return r};return c_(o,{clear:function(){for(var e=s(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,rm?e.size=0:this.size=0},delete:function(e){var t=s(this),r=u(this,e);if(r){var n=r.next,i=r.previous;delete t.index[r.index],r.removed=!0,i&&(i.next=n),n&&(n.previous=i),t.first==r&&(t.first=n),t.last==r&&(t.last=i),rm?t.size--:this.size--}return!!r},forEach:function(e){for(var t,r=s(this),n=i6(e,arguments.length>1?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!!u(this,e)}}),c_(o,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return a(this,0===e?0:e,t)}}:{add:function(e){return a(this,e=0===e?0:e,e)}}),rm&&cN(o,"size",{get:function(){return s(this).size}}
1),i},setStrong:function(e,t,r){var n=t+" Iterator",i=cP(t),o=cP(n);oY(e,t,function(e,t){cM(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}:(e.target=void 0,{value:void 0,done:!0})},r?"entries":"values",!r,!0),oQ(t)}});var cS=function(e,t){for(var r=0,n=iy(t),i=new e(n);n>r;)i[r]=t[r++];return i},cC=Array,cR=rU([].push),cU=function(e,t,r,n){for(var i,o,s,a=ni(e),u=rV(a),c=i6(t,r),p=iQ(null),l=iy(u),h=0;l>h;h++)(o=nw(c(s=u[h],h,a)))in p?cR(p[o],s):p[o]=[s];if(n&&(i=n(a))!==cC)for(o in p)p[o]=cS(i,p[o]);return p};ik({target:"Array",proto:!0},{group:function(e){var t=arguments.length>1?arguments[1]:void 0;return cU(this,e,t)}}),oR("group"),ik({target:"Array",proto:!0,forced:!ua("groupBy")},{groupBy:function(e){var t=arguments.length>1?arguments[1]:void 0;return cU(this,e,t)}}),oR("groupBy");var ck=rW("Map"),cx=ck.prototype,cD=rU(cx.get),cL=rU(cx.has),cF=rU(cx.set),cV=rU([].push),cK=function(e){for(var t,r,n=ni(this),i=rV(n),o=i6(e,arguments.length>1?arguments[1]:void 0),s=new ck,a=iy(i),u=0;a>u;u++)cL(s,t=o(r=i[u],u,n))?cV(cD(s,t),r):cF(s,t,[r]);return s};ik({target:"Array",proto:!0,name:"groupToMap",forced:!ua("groupByToMap")},{groupByToMap:cK}),oR("groupByToMap"),ik({target:"Array",proto:!0},{groupToMap:cK}),oR("groupToMap");var cB=function(e,t){for(var r=iy(e),n=new t(r),i=0;i<r;i++)n[i]=e[r-i-1];return n},cH=Array;ik({target:"Array",proto:!0},{toReversed:function(){return cB(rH(this),cH)}}),oR("toReversed");var cG=function(e){return ry[e].prototype},cj=Array,cW=rU(cG("Array").sort);ik({target:"Array",proto:!0},{toSorted:function(e){return void 0!==e&&r6(e),cW(cS(cj,rH(this)),e)}}),oR("toSorted");var cY=Array,cJ=Math.max,cz=Math.min;ik({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,o,s=rH(this),a=iy(s),u=ih(e,a),c=arguments.length,p=0;for(0===c?r=n=0:1===c?(r=0,n=a-u):(r=c-2,n=cz(cJ(ic(t),0),a-u)),o=cY(i=a0(a+r-n));p<u;p++)o[p]=s[p];for(;p<u+r;p++)o[p]=arguments[p-u+2];for(;p<i;p++)o[p]=s[p+n-r];return o}}),oR("toSpliced");var cq=RangeError,cX=function(e,t,r,n){var i=iy(e),o=ic(r),s=o<0?i+o:o;if(s>=i||s<0)throw cq("Incorrect index");for(var a=new t(i),u=0;u<i;u++)a[u]=u===s?n:e[u];return a},c$=Array;ik({target:"Array",proto:!0},{with:function(e,t){return cX(rH(this),c$,e,t)}});var cZ,cQ,c0=ny("asyncIterator"),c1=ry.AsyncIterator,c2=nr.AsyncIteratorPrototype;if(c2)cZ=c2;else if(rG(c1))cZ=c1.prototype;else if(nr.USE_FUNCTION_CONSTRUCTOR||ry.USE_FUNCTION_CONSTRUCTOR)try{cQ=iV(iV(iV(Function("return async function*(){}()")()))),iV(cQ)===Object.prototype&&(cZ=cQ)}catch(e){}cZ||(cZ={}),rG(cZ[c0])||ii(cZ,c0,function(){return this});var c4=cZ,c3=rW("Promise"),c5=n6("AsyncFromSyncIterator"),c6=function(e,t,r){var n=e.done;c3.resolve(e.value).then(function(e){t({done:n,value:e})},r)},c9=function(e){n4(this,{type:"AsyncFromSyncIterator",iterator:nS(e),next:e.next})};c9.prototype=c_(iQ(c4),{next:function(){var e=c5(this);return new c3(function(t,r){c6(nS(rb(e.next,e.iterator)),t,r)})},return:function(){var e=c5(this).iterator;return new c3(function(t,r){var n=r9(e,"return");if(void 0===n)return t({done:!0,value:void 0});c6(nS(rb(n,e)),t,r)})}});var c8=ny("asyncIterator"),c7=function(e,t,r,n){try{var i=r9(e,"return");if(i)return rW("Promise").resolve(rb(i,e)).then(function(){t(r)},function(e){n(e)})}catch(e){return n(e)}t(r)},pe=function(e){var t=0==e,r=1==e,n=2==e,i=3==e;return function(e,o,s){var a={iterator:e,next:r6(nS(e).next)},u=rW("Promise"),c=a.iterator,p=a.next,l=0,h=void 0!==o;return!h&&t||r6(o),new u(function(e,a){var f=function(e){c7(c,a,e,a)},d=function(){try{if(t&&h)try{a0(l)}catch(e){f(e)}u.resolve(nS(rb(p,c))).then(function(p){try{if(nS(p).done)t?(s.length=l,e(s)):e(!i&&(n||void 0));else{var y=p.value;try{h?u.resolve(t?o(y,l):o(y)).then(function(o){if(r)d();else if(n)o?d():c7(c,e,!1,a);else if(t)try{s[l++]=o,d()}catch(e){f(e)}else o?c7(c,e,i||y,a):d()},f):(s[l++]=y,d())}catch(e){f(e)}}}catch(e){a(e)}},a)}catch(e){a(e)}};d()})}}
1,pt={toArray:pe(0),forEach:pe(1),every:pe(2),some:pe(3),find:pe(4)},pr=function(e,t){var r=arguments.length<2?r9(e,c8):t;return r?nS(rb(r,e)):new c9(op(e))},pn=pt.toArray,pi=ny("asyncIterator"),po=cG("Array").values;ik({target:"Array",stat:!0,forced:!0},{fromAsync:function(e){var t=this,r=arguments.length,n=r>1?arguments[1]:void 0,i=r>2?arguments[2]:void 0;return new(rW("Promise"))(function(r){var o=ni(e);void 0!==n&&(n=i6(n,i));var s=r9(o,pi),a=s?void 0:ou(o)||po,u=si(t)?new t:[];r(pn(s?pr(o,s):new c9(op(o,a)),n,u))})}});var ps=us.filterReject;ik({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return ps(this,e,arguments.length>1?arguments[1]:void 0)}}),oR("filterOut");var pa=us.filterReject;ik({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return pa(this,e,arguments.length>1?arguments[1]:void 0)}}),oR("filterReject");var pu=Object.isFrozen,pc=function(e,t){if(!pu||!a$(e)||!pu(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};ik({target:"Array",stat:!0,sham:!0,forced:!0},{isTemplateObject:function(e){if(!pc(e,!0))return!1;var t=e.raw;return t.length===e.length&&pc(t,!1)}});var pp=nx.exports,pl=function(e,t,r){return r.get&&pp(r.get,t,{getter:!0}),r.set&&pp(r.set,t,{setter:!0}),nN.f(e,t,r)};rm&&(pl(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=ni(this),t=iy(e);return 0==t?void 0:e[t-1]},set:function(e){var t=ni(this),r=iy(t);return t[0==r?0:r-1]=e}}),oR("lastItem")),rm&&(pl(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=iy(ni(this));return 0==e?0:e-1}}),oR("lastIndex"));var ph=rW("Map"),pf=ph.prototype,pd=rU(pf.forEach),py=rU(pf.has),pv=rU(pf.set),pg=rU([].push);ik({target:"Array",proto:!0,forced:!0},{uniqueBy:function(e){var t,r,n,i=ni(this),o=iy(i),s=a3(i,0),a=new ph,u=null!=e?r6(e):function(e){return e};for(t=0;t<o;t++)py(a,n=u(r=i[t]))||pv(a,n,r);return pd(a,function(e){pg(s,e)}),s}}),oR("uniqueBy");var pm,pE=function(){function e(e,t,r){void 0===r&&(r=i.v4()),this.timestamp=e,this.user=t,this.insertId=r}return e.exposure=function(e,t,r,n){return new pw(n,e,t.experiment,t.variationId,t.variationKey,t.reason,r)},e.track=function(e,t,r,n){return new pb(n,r,e,t)},e.remoteConfig=function(e,t,r,n){return new pT(n,e,t.parameter,t.valueId,t.reason,r)},e.isExposureEvent=function(e){return void 0!==e.experiment},e.isTrackEvent=function(e){return void 0!==e.eventType},e.isRemoteConfigEvent=function(e){return void 0!==e.parameter},e.isExposureEventDto=function(e){return"experimentId"in e&&void 0!==e.experimentId},e.isTrackEventDto=function(e){return"eventTypeId"in e&&void 0!==e.eventTypeId},e.isRemoteConfigEventDto=function(e){return"parameterId"in e&&void 0!==e.parameterId},e.prototype.toDto=function(){return{insertId:this.insertId,timestamp:this.timestamp,userId:this.user.identifiers[G.ID],identifiers:this.user.identifiers,userProperties:b.sanitize(this.user.properties),hackleProperties:b.sanitize(this.user.hackleProperties)}},e}(),pw=function(e){function t(t,r,n,i,o,s,a,u){var c=e.call(this,t,r,u)||this;return c.experiment=n,c.variationId=i,c.variationKey=o,c.decisionReason=s,c.properties=a,c}return h(t,e),t.prototype.copyWithUser=function(e){return new t(this.timestamp,e,this.experiment,this.variationId,this.variationKey,this.decisionReason,this.properties,this.insertId)},t.prototype.toDto=function(){return f(f({},e.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})},t}(pE),pb=function(e){function t(t,r,n,i,o){var s=e.call(this,t,r,o)||this;return s.eventType=n,s.event=i,s}return h(t,e),t.prototype.copyWithUser=function(e){return new t(this.timestamp,e,this.eventType,this.event,this.insertId)},t.prototype.toDto=function(){return f(f({},e.prototype.toDto.call(this)),{eventTypeId:this.eventType.id,eventTypeKey:this.eventType.key,value:this.event.value||0,properties:b.sanitize(this.event.properties)})},t}(pE),pT=function(e){function t(t,r,n,i,o,s,a){var u=e.call(this,t,r,a)||this;return u.parameter=n,u.valueId=i,u.decisionReason=o,u.properties=s,u}return h(t,e),t.prototype.copyWithUser=function(e){return new t(this.timestamp,e,this.parameter,this.valueId,this.decisionReason,this.properties,this.insertId)},t.prototype.toDto=function(){return f(f({},e.prototype.toDto.call(this)),{parameterId:this.parameter.id,parameterKey:this.parameter.key,parameterType:this.parameter.type,valueId:this.valueId,decisionReason:this.decisionReason.toString(),properties:b.sanitize(this.properties)})},t}(pE),pI=function(){function e(e,t){this.userManager=e,this.core=t}return e.isSessionEvent=function(t){return!!pE.isTrackEvent(t)&&(t.event.key===e.
1SESSION_START_EVENT_NAME||t.event.key===e.SESSION_END_EVENT_NAME)},e.prototype.onSessionStarted=function(t,r,n){this.track(e.SESSION_START_EVENT_NAME,t,r,n)},e.prototype.onSessionEnded=function(t,r,n){this.track(e.SESSION_END_EVENT_NAME,t,r,n)},e.prototype.track=function(e,t,r,n){var i=this.userManager.toHackleUser(r),o=this.decorateSession(i,t);this.core.track({key:e},o,n)},e.prototype.decorateSession=function(e,t){var r=(new W).add(G.SESSION,t).addIdentifiers(e.identifiers).build();return f(f({},e),{identifiers:r})},e.SESSION_START_EVENT_NAME="$session_start",e.SESSION_END_EVENT_NAME="$session_end",e}(),pA=function(){function e(e,t,r,n){this.delegate=e,this.eventDedupDeterminer=t,this.sessionManager=r,this.userManager=n,this.decorators=[]}return e.prototype.addDecorator=function(e){this.decorators.push(e)},e.prototype.process=function(e){if(!pI.isSessionEvent(e)){var t=this.userManager.currentUser;this.sessionManager.startNewSessionIfNeeded({oldUser:t,newUser:t,timestamp:e.timestamp})}if(!this.eventDedupDeterminer.isDedupTarget(e)){var r=this.decorators.reduce(function(e,t){return t.decorate(e)},e);this.delegate.process(r)}},e.prototype.flush=function(e){this.delegate.flush(e)},e.prototype.close=function(){this.delegate.close()},e.prototype.onOptOutChanged=function(e){e&&this.delegate.flush(!1)},e.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}},e}(),p_=function(){function e(){}return e.toEvent=function(t){var r;return{key:e.EVENT_KEY,properties:{level:e.LEVEL_ERROR,type:t.name,message:null!=(r=t.message)?r:"",$stacktrace:e._stacktrace(t)}}},e._stacktrace=function(t){return s.isNullOrUndefined(t.stack)?"":t.stack.split("\n").slice(0,e.STACK_TRACK_LIMIT).join("\n")},e.EVENT_KEY="$trace",e.LEVEL_ERROR="error",e.STACK_TRACK_LIMIT=30,e}(),pN=function(){function e(){}return e.prototype.evaluate=function(e,t){if(!this.supports(e))throw Error("Unsupported EvaluatorRequest ".concat(e.toString()));if(t.contains(e)){var r=t.stack.map(function(e){return e.toString()}).join(" - ");throw Error("Circular evaluation has occurred [".concat(r," - ").concat(e.toString(),"]"))}t.addRequest(e);try{return this.evaluateInternal(e,t)}finally{t.removeRequest(e)}},e}(),pO=function(){function e(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.experiment=r,this.variationId=n,this.variationKey=i,this.config=o}return e.prototype.with=function(t){return new e(t,this.targetEvaluations,this.experiment,this.variationId,this.variationKey,this.config)},e.of=function(t,r,n,i){return new e(i,r.targetEvaluations,t.experiment,n.id,n.key,n.config)},e.ofDefault=function(t,r,n){var i=t.experiment._getVariationByKeyOrNull(t.defaultVariationKey);return s.isNotNullOrUndefined(i)?this.of(t,r,i,n):new e(n,r.targetEvaluations,t.experiment,void 0,t.defaultVariationKey,void 0)},e}(),pM=function(e){function t(t){var r=e.call(this)||this;return r.experimentFlowFactory=t,r}return h(t,e),t.prototype.supports=function(e){return void 0!==e.experiment},t.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.experimentFlowFactory.getExperimentFlow(e.experiment.type).evaluate(e,t))?r:pO.ofDefault(e,t,D.TRAFFIC_NOT_ALLOCATED)},t}(pN),pP=function(){function e(e,t,r,n,i,o){this.reason=e,this.targetEvaluations=t,this.parameter=r,this.valueId=n,this.value=i,this.properties=o}return e.of=function(t,r,n,i,o,s){return s.returnValue=b.truncateStringValue(i),new e(o,r.targetEvaluations,t.parameter,n,i,s)},e.ofDefault=function(e,t,r,n){return this.of(e,t,void 0,e.defaultValue,r,n)},e}(),pS=function(e){function t(t){var r=e.call(this)||this;return r.targetRuleDeterminer=t,r}return h(t,e),t.prototype.supports=function(e){return void 0!==e.parameter},t.prototype.evaluateInternal=function(e,t){var r={};if(r.requestValueType=e.requiredType,r.requestDefaultValue=b.truncateStringValue(e.defaultValue),s.isNullOrUndefined(e.user.identifiers[e.parameter.identifierType]))return pP.ofDefault(e,t,D.IDENTIFIER_NOT_FOUND,r);var n=this.targetRuleDeterminer.determineTargetRuleOrNull(e,t);return s.isNotNullOrUndefined(n)?(r.targetRuleKey=n.key,r.targetRuleName=n.name,this.evaluation(e,t,n.value,D.TARGET_RULE_MATCH,r)):this.evaluation(e,t,e.parameter.defaultValue,D.DEFAULT_RULE,r)},t.prototype.evaluation=function(e,t,r,n,i){return"UNKNOWN"===e.requiredType||"NULL"!==e.requiredType&&typeof e.defaultValue!=typeof r.rawValue?pP.ofDefault(e,t,D.TYPE_MISMATCH,i):pP.of(e,t,r.id,r.rawValue,n,i)},t}(pN),pC=function(){function e(e,t){this.type=e,this.id=t}return e.prototype.isEquals=function(e){return this.type===e.type&&this.id===e.id},e}(),pR=function(){function e(){this._stack=[],this._targetEvaluations=[],this._properties={},this.map=new WeakMap}return e.create=function(){return new e},Object.defineProperty(e.prototype,"stack",{get:function(){return Array.from(this._stack)}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetEvaluations",{get:function(){return Array.from(this._targetEvaluations)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return b.sanitize(this._properties)},enumerable:!1,configurable:!0}),e.prototype.contains=function(e){return this._stack.some(function(t){return t.key.isEquals(e.key)})},e.prototype.addRequest=function(e){this._stack.push(e)},e.prototype.removeRequest=function(e){var t=this._stack.indexOf(e,0);t>-1&&this._stack.splice(t,1)},e.prototype.getEvaluation=function(e){return this._targetEvaluations.find(function(t){return t instanceof pO&&t.experiment.id===e.id})},e.prototype.addEvaluation=function(e){this._targetEvaluations.push(e)},e.prototype.setProperty=function(e,t){this._properties[e]=t},e.prototype.get=function(e){var t=this.map.get(e);if(!t)return null;if(!(t instanceof e))throw Error("Context does not contain a value of type ".concat(e.name));return t},e.prototype.set=function(e,t){this.map.set(e,t)},e}(),pU=function(){function e(e,t,r,n){this.key=new pC("EXPERIMENT",r.id),this.workspace=e,this.user=t,this.experiment=r,this.defaultVariationKey=n}return e.of=function(t,r,n,i){return new e(t,r,n,i)},e.by=function(t,r){return new e(t.workspace,t.user,r,"A")},e.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.experiment.type,", key=").concat(this.experiment.key,")")},e}(),pk=function(){function e(e,t,r,n,i){this.key=new pC("REMOTE_CONFIG",r.id),this.workspace=e,this.user=t,this.parameter=r,this.requiredType=n,this.defaultValue=i}return e.of=function(t,r,n,i,o){return new e(t,r,n,i,o)},e.prototype.toString=function(){return"EvaluatorRequest(type=".concat(this.key.type,", key=").concat(this.parameter.key,")")},e}(),px=function(){function e(e){this.storages=e}return e.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}},e}(),pD=function(){function e(e){this.listStorage=e}return e.prototype.getVariation=function(e,t){var r=this.get(e);if(r)return e._getVariationByIdOrNull(r)},e.prototype.get=function(e){var t=this.listStorage.getItem(e.id.toString());return g.asNumber(t)},e.prototype.getAll=function(){var e=new Map;return this.listStorage.entries().forEach(function(t){var r=t[0],n=t[1],i=g.asNumber(r),o=g.asNumber(n);s.isNullOrUndefined(i)||i<0||s.isNullOrUndefined(o)||i<0||e.set(i,o)}),e},e.prototype.set=function(e,t){this.listStorage.setItem(e.id.toString(),t.toString())},e.prototype.remove=function(e){this.listStorage.removeItem(e.id.toString())},e.prototype.clear=function(){this.listStorage.clear()},e}(),pL=function(){function e(){this.evaluators=[]}return e.prototype.add=function(e){this.evaluators.push(e)},e.prototype.evaluate=function(e,t){var r=this.evaluators.find(function(t){return t.supports(e)});if(s.isNullOrUndefined(r))throw Error("Unsupported EvaluatorRequest [".concat(e.toString(),"]"));return r.evaluate(e,t)},e}(),pF=function(){function e(){}return e.get=function(e){return s.requiredNotNullOrUndefined(this.getOrNull(e),function(){return"Instance not registered [".concat(e,"]")})},e.getOrNull=function(t){return e.instances.get(t)},e.register=function(t,r){return e.instances.set(t,r),r},e.instances=new Map,e}(),pV=function(){function e(e,t){this.targetMatcher=e,this.bucketer=t}return e.prototype.determineTargetRuleOrNull=function(e,t){var r=this;return e.parameter.targetRules.find(function(n){return r.matches(e,t,n)})},e.prototype.matches=function(e,t,r){if(!this.targetMatcher.matches(e,t,r.target))return!1;var n=e.user.identifiers[e.parameter.identifierType];if(s.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(s.isNullOrUndefined(i))throw Error("bucket[".concat(r.bucketId,"]"));return s.isNotNullOrUndefined(this.bucketer.bucketing(i,n))},e}(),pK=function(){function e(e){this.bucketer=e}return e.prototype.resolveOrNull=function(e,t,r){switch(r.type){case"VARIATION":return this.resolveVariation(e,r);case"BUCKET":return this.resolveBucket(e,r)}},e.prototype.resolveVariation=function(e,t){return e.experiment._getVariationByIdOrNull(t.variationId)},e.prototype.resolveBucket=function(e,t){var r=e.workspace.getBucketOrNull(t.bucketId),n=e.user.identifiers[e.experiment.identifierType];if(n){var i=this.bucketer.bucketing(r,n);if(i)return e.experiment._getVariationByIdOrNull(i.variationId)}},e}(),pB=function(){function e(e,t){this.flowEvaluator=e,this.nextFlow=t}return e.prototype.evaluate=function(e,t){return this.flowEvaluator&&this.nextFlow?this.flowEvaluator.evaluate(e,t,this.nextFlow):void 0},e.end=function(){return new e(void 0,void 0)},e.decision=function(t,r){return new e(t,r)},e.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},e}(),pH=function(){function e(e){this.overrideResolver=e}return e.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 pO.of(e,t,n,D.OVERRIDDEN);case"FEATURE_FLAG":return pO.of(e,t,n,D.INDIVIDUAL_TARGET_MATCH)}},e}(),pG=function(){function e(){}return e.prototype.evaluate=function(e,t,r){return"DRAFT"===e.experiment.status?pO.ofDefault(e,t,D.EXPERIMENT_DRAFT):r.evaluate(e,t)},e}(),pj=function(){function e(){}return e.prototype.evaluate=function(e,t,r){if("PAUSED"!==e.experiment.status)return r.evaluate(e,t);switch(e.experiment.type){case"AB_TEST":return pO.ofDefault(e,t,D.EXPERIMENT_PAUSED);case"FEATURE_FLAG":return pO.ofDefault(e,t,D.FEATURE_FLAG_INACTIVE)}},e}(),pW=function(){function e(){}return e.prototype.evaluate=function(e,t,r){if("COMPLETED"===e.experiment.status){var n=e.experiment._winnerVariationOrNull();if(!n)throw Error("winner variation [".concat(e.experiment.id,"]"));return pO.of(e,t,n,D.EXPERIMENT_COMPLETED)}return r.evaluate(e,t)},e}(),pY=function(){function e(e){this.experimentTargetDeterminer=e}return e.prototype.evaluate=function(e,t,r){if("AB_TEST"!==e.experiment.type)throw Error("experiment type must be AB_TEST [".concat(e.experiment.id,"]"));return this.experimentTargetDeterminer.isUserInExperimentTarget(e,t)?r.evaluate(e,t):pO.ofDefault(e,t,D.NOT_IN_EXPERIMENT_TARGET)},e}(),pJ=function(){function e(e){this.actionResolver=e}return e.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("AB_TEST"!==e.experiment.type)throw 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?pO.ofDefault(e,t,D.VARIATION_DROPPED):pO.of(e,t,n,D.TRAFFIC_ALLOCATED):pO.ofDefault(e,t,D.TRAFFIC_NOT_ALLOCATED)},e}(),pz=function(){function e(e,t){this.targetRuleDeterminer=e,this.actionResolver=t}return e.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw 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);var i=this.actionResolver.resolveOrNull(e,t,n.action);if(!i)throw Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"));return pO.of(e,t,i,D.TARGET_RULE_MATCH)},e}(),pq=function(){function e(e){this.actionResolver=e}return e.prototype.evaluate=function(e,t,r){if("RUNNING"!==e.experiment.status)throw Error("experiment status must be RUNNING [".concat(e.experiment.id,"]"));if("FEATURE_FLAG"!==e.experiment.type)throw Error("experiment type must be FEATURE_FLAG [".concat(e.experiment.id,"]"));if(!e.user.identifiers[e.experiment.identifierType])return pO.ofDefault(e,t,D.DEFAULT_RULE);var n=this.actionResolver.resolveOrNull(e,t,e.experiment.defaultRule);if(!n)throw Error("FeatureFlag must decide the Variation [".concat(e.experiment.id,"]"));return pO.of(e,t,n,D.DEFAULT_RULE)},e}(),pX=function(){function e(e){this.containerResolver=e}return e.prototype.evaluate=function(e,t,r){var n=e.experiment.containerId;if(!n)return r.evaluate(e,t);var i=e.workspace.getContainerOrNull(n);if(!i)throw Error("container[".concat(n,"]"));return this.containerResolver.isUserInContainerGroup(e,t,i)?r.evaluate(e,t):pO.ofDefault(e,t,D.NOT_IN_MUTUAL_EXCLUSION_EXPERIMENT)},e}(),p$=function(){function e(){}return e.prototype.evaluate=function(e,t,r){return e.user.identifiers[e.experiment.identifierType]?r.evaluate(e,t):pO.ofDefault(e,t,D.IDENTIFIER_NOT_FOUND)},e}(),pZ=function(){function e(e){this.targetMatcher=e}return e.prototype.isUserInExperimentTarget=function(e,t){var r=this;return 0===e.experiment.targetAudiences.length||e.experiment.targetAudiences.some(function(n){return r.targetMatcher.matches(e,t,n)})},e}(),pQ=function(){function e(e){this.targetMatcher=e}return e.prototype.determineTargetRuleOrNull=function(e,t){var r=this;return e.experiment.targetRules.find(function(n){return r.targetMatcher.matches(e,t,n.target)})},e}(),p0=function(){function e(e,t,r){this.manualOverrideStorage=e,this.targetMatcher=t,this.actionResolver=r}return e.prototype.resolveOrNull=function(e,t){var r,n;return null!=(n=null!=(r=this.resolveManualOverride(e))?r:this._resolveUserOverride(e))?n:this._resolveSegmentOverride(e,t)},e.prototype.resolveManualOverride=function(e){return this.manualOverrideStorage.getVariation(e.experiment,e.user)},e.prototype._resolveUserOverride=function(e){var t=e.experiment,r=e.user.identifiers[t.identifierType];if(r){var n=t.userOverrides.get(r);if(n)return t._getVariationByIdOrNull(n)}},e.prototype._resolveSegmentOverride=function(e,t){var r=this,n=e.experiment.segmentOverrides.find(function(n){return r.targetMatcher.matches(e,t,n.target)});if(n)return this.actionResolver.resolveOrNull(e,t,n.action)},e}(),p1=function(){function e(e){this.bucketer=e}return e.prototype.isUserInContainerGroup=function(e,t,r){var n=e.user.identifiers[e.experiment.identifierType];if(s.isNullOrUndefined(n))return!1;var i=e.workspace.getBucketOrNull(r.bucketId);if(s.isNullOrUndefined(i))throw Error("Bucket[".concat(r.bucketId,"]"));var o=this.bucketer.bucketing(i,n);if(s.isNullOrUndefined(o))return!1;var a=r.getGroupOrNull(o.variationId);if(s.isNullOrUndefined(a))throw Error("ContainerGroup[".concat(o.variationId,"]"));return a.experiments.includes(e.experiment.id)},e}(),p2=function(){function e(e,t,r){var n=new pK(t),i=new p0(e,r,n),o=new p1(t);this.abTestFlow=pB.of(new pH(i),new p$,new pX(o),new pY(new pZ(r)),new pG,new pj,new pW,new pJ(n)),this.featureFlagFlow=pB.of(new pG,new pj,new pW,new pH(i),new p$,new pz(new pQ(r),n),new pq(n))}return e.prototype.getExperimentFlow=function(e){switch(e){case"AB_TEST":return this.abTestFlow;case"FEATURE_FLAG":return this.featureFlagFlow}},e}(),p4=function(){function e(e){this.conditionMatcherFactory=e}return e.prototype.matches=function(e,t,r){var n=this;return r.conditions.every(function(r){return n._matches(e,t,r)})},e.prototype.anyMatches=function(e,t,r){var n=this;return!r.length||r.some(function(r){return n.matches(e,t,r)})},e.prototype._matches=function(e,t,r){return this.conditionMatcherFactory.getMatcher(r.key.type).matches(e,t,r)},e}(),p3=function(){function e(){}return e.prototype.decorate=function(e){return e},e}(),p5=function(){function e(){}return e.prototype.decorate=function(e){return"string"==typeof e?t7.decodeURIOrOriginal(e):e},e}(),p6=function(){function e(e,t){this.valueMatcherFactory=e,this.operatorMatcherFactory=t}return e.prototype.matches=function(e,t,r){void 0===r&&(r=new p3);var n=this.valueMatcherFactory.getMatcher(t.valueType),i=this.operatorMatcherFactory.getMatcher(t.operator),o=this.userValueMatches(e,t,n,i,r);return this.typeMatches(t.type,o)},e.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)},e.prototype.singleMatches=function(e,t,r,n,i){var o=i.decorate(e),s=t.values.map(i.decorate);return n.matches(r,o,s)},e.prototype.arrayMatches=function(e,t,r,n,i){var o=this;return e.some(function(e){return o.singleMatches(e,t,r,n,i)})},e.prototype.typeMatches=function(e,t){switch(e){case"MATCH":return t;case"NOT_MATCH":return!t}},e}(),p9=function(){function e(){}return e.prototype.matches=function(e,t,r){return!s.isNullOrUndefined(t)&&r.some(function(r){return e.inMatches(t,r)}
1)},e}(),p8=function(){function e(){}return e.prototype.matches=function(e,t,r){return!s.isNullOrUndefined(t)&&r.some(function(r){return e.containsMatches(t,r)})},e}(),p7=function(){function e(){}return e.prototype.matches=function(e,t,r){return!s.isNullOrUndefined(t)&&r.some(function(r){return e.startsWithMatches(t,r)})},e}(),le=function(){function e(){}return e.prototype.matches=function(e,t,r){return!s.isNullOrUndefined(t)&&r.some(function(r){return e.endsWithMatches(t,r)})},e}(),lt=function(){function e(){}return e.prototype.matches=function(e,t,r){return!s.isNullOrUndefined(t)&&r.some(function(r){return e.greaterThanMatches(t,r)})},e}(),lr=function(){function e(){}return e.prototype.matches=function(e,t,r){return!s.isNullOrUndefined(t)&&r.some(function(r){return e.greaterThanOrEqualMatches(t,r)})},e}(),ln=function(){function e(){}return e.prototype.matches=function(e,t,r){return!s.isNullOrUndefined(t)&&r.some(function(r){return e.lessThanMatches(t,r)})},e}(),li=function(){function e(){}return e.prototype.matches=function(e,t,r){return!s.isNullOrUndefined(t)&&r.some(function(r){return e.lessThanOrEqualMatches(t,r)})},e}(),lo=function(){function e(){}return e.prototype.matches=function(e,t,r){return!s.isNullOrUndefined(t)},e}(),ls=function(){function e(){}return e.prototype.getMatcher=function(t){switch(t){case"IN":return e.IN_MATCHER;case"CONTAINS":return e.CONTAINS_MATCHER;case"STARTS_WITH":return e.STARTS_WITH_MATCHER;case"ENDS_WITH":return e.ENDS_WITH_MATCHER;case"GT":return e.GT_MATCHER;case"GTE":return e.GTE_MATCHER;case"LT":return e.LT_MATCHER;case"LTE":return e.LTE_MATCHER;case"EXISTS":return e.EXISTS_MATCHER}},e.IN_MATCHER=new p9,e.CONTAINS_MATCHER=new p8,e.STARTS_WITH_MATCHER=new p7,e.ENDS_WITH_MATCHER=new le,e.GT_MATCHER=new lt,e.GTE_MATCHER=new lr,e.LT_MATCHER=new ln,e.LTE_MATCHER=new li,e.EXISTS_MATCHER=new lo,e}(),la=function(){function e(){}return e.prototype.inMatches=function(e,t){var r=g.asString(e),n=g.asString(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r===n},e.prototype.containsMatches=function(e,t){var r=g.asString(e),n=g.asString(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r.includes(n)},e.prototype.startsWithMatches=function(e,t){var r=g.asString(e),n=g.asString(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r.startsWith(n)},e.prototype.endsWithMatches=function(e,t){var r=g.asString(e),n=g.asString(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r.endsWith(n)},e.prototype.greaterThanMatches=function(e,t){var r=g.asString(e),n=g.asString(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r>n},e.prototype.greaterThanOrEqualMatches=function(e,t){var r=g.asString(e),n=g.asString(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r>=n},e.prototype.lessThanMatches=function(e,t){var r=g.asString(e),n=g.asString(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r<n},e.prototype.lessThanOrEqualMatches=function(e,t){var r=g.asString(e),n=g.asString(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r<=n},e}(),lu=function(){function e(){}return e.prototype.inMatches=function(e,t){var r=g.asNumber(e),n=g.asNumber(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r===n},e.prototype.containsMatches=function(e,t){return!1},e.prototype.startsWithMatches=function(e,t){return!1},e.prototype.endsWithMatches=function(e,t){return!1},e.prototype.greaterThanMatches=function(e,t){var r=g.asNumber(e),n=g.asNumber(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r>n},e.prototype.greaterThanOrEqualMatches=function(e,t){var r=g.asNumber(e),n=g.asNumber(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r>=n},e.prototype.lessThanMatches=function(e,t){var r=g.asNumber(e),n=g.asNumber(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r<n},e.prototype.lessThanOrEqualMatches=function(e,t){var r=g.asNumber(e),n=g.asNumber(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r<=n},e}(),lc=function(){function e(){}return e.prototype.inMatches=function(e,t){var r=g.asBoolean(e),n=g.asBoolean(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r===n},e.prototype.containsMatches=function(e,t){return!1},e.prototype.startsWithMatches=function(e,t){return!1},e.prototype.endsWithMatches=function(e,t){return!1},e.prototype.greaterThanMatches=function(e,t){return!1},e.prototype.greaterThanOrEqualMatches=function(e,t){return!1},e.prototype.lessThanMatches=function(e,t){return!1},e.prototype.lessThanOrEqualMatches=function(e,t){return!1},e}(),lp=function(){function e(){}return e.prototype.inMatches=function(e,t){var r=eo.tryParse(e),n=eo.tryParse(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r.isEqualTo(n)},e.prototype.containsMatches=function(e,t){return!1},e.prototype.startsWithMatches=function(e,t){return!1},e.prototype.endsWithMatches=function(e,t){return!1},e.prototype.greaterThanMatches=function(e,t){var r=eo.tryParse(e),n=eo.tryParse(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r.isGreaterThan(n)},e.prototype.greaterThanOrEqualMatches=function(e,t){var r=eo.tryParse(e),n=eo.tryParse(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r.isGreaterThanOrEqualTo(n)},e.prototype.lessThanMatches=function(e,t){var r=eo.tryParse(e),n=eo.tryParse(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r.isLessThan(n)},e.prototype.lessThanOrEqualMatches=function(e,t){var r=eo.tryParse(e),n=eo.tryParse(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&r.isLessThanOrEqualTo(n)},e}(),ll=function(){function e(){}return e.prototype.inMatches=function(e,t){var r=t7.tryParse(e),n=g.asString(t);return!s.isNullOrUndefined(r)&&!s.isNullOrUndefined(n)&&t7.decodeURIOrOriginal(t7.removePathnameTrailingSlash(r))===t7.decodeURIOrOriginal(t7.removePathnameTrailingSlash(n))},e.prototype.containsMatches=function(e,t){var r=t7.tryParse(e),n=g.asString(t);if(s.isNullOrUndefined(r)||s.isNullOrUndefined(n))return!1;var i=t7.decodeURIOrOriginal(r.href);return i.includes(n)||i.includes(encodeURI(n))},e.prototype.startsWithMatches=function(e,t){var r=t7.tryParse(e),n=g.asString(t);if(s.isNullOrUndefined(r)||s.isNullOrUndefined(n))return!1;var i=t7.decodeURIOrOriginal(r.href);return i.startsWith(n)||i.startsWith(encodeURI(n))},e.prototype.endsWithMatches=function(e,t){return!1},e.prototype.greaterThanMatches=function(e,t){return!1},e.prototype.greaterThanOrEqualMatches=function(e,t){return!1},e.prototype.lessThanMatches=function(e,t){return!1},e.prototype.lessThanOrEqualMatches=function(e,t){return!1},e}(),lh=function(){function e(){}return e.prototype.inMatches=function(e,t){return!1},e.prototype.containsMatches=function(e,t){return!1},e.prototype.startsWithMatches=function(e,t){return!1},e.prototype.endsWithMatches=function(e,t){return!1},e.prototype.greaterThanMatches=function(e,t){return!1},e.prototype.greaterThanOrEqualMatches=function(e,t){return!1},e.prototype.lessThanMatches=function(e,t){return!1},e.prototype.lessThanOrEqualMatches=function(e,t){return!1},e}(),lf=function(){function e(){}return e.prototype.getMatcher=function(t){switch(t){case"STRING":case"JSON":return e.STRING_MATCHER;case"NUMBER":return e.NUMBER_MATCHER;case"BOOLEAN":return e.BOOLEAN_MATCHER;case"VERSION":return e.VERSION_MATCHER;case"URL":return e.URL_MATCHER;case"NULL":case"UNKNOWN":return e.NULL_MATCHER}},e.STRING_MATCHER=new la,e.NUMBER_MATCHER=new lu,e.BOOLEAN_MATCHER=new lc,e.VERSION_MATCHER=new lp,e.URL_MATCHER=new ll,e.NULL_MATCHER=new lh,e}(),ld=function(){function e(e,t){this.URL_HACKLE_PROPERTY_KEY_NAMES=["pagePath","host","url","queryParameter"],this.userValueResolver=e,this.valueOperatorMatcher=t}return e.prototype.matches=function(e,t,r){var n=this.userValueResolver.resolveOrNull(e.user,r.key),i=this.valueDecorator(r.key);return this.valueOperatorMatcher.matches(n,r.match,i)},e.prototype.valueDecorator=function(e){return"HACKLE_PROPERTY"===e.type&&this.URL_HACKLE_PROPERTY_KEY_NAMES.includes(e.name)?new p5:new p3},e}(),ly=function(){function e(){}return e.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 Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},e}(),lv=function(){function e(e){this.segmentMatcher=e}return e.prototype.matches=function(e,t,r){var n=this;if("SEGMENT"!=r.key.type)throw Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));var i=r.match.values.some(function(r){return n._matches(e,t,r)});switch(r.match.type){case"MATCH":return i;case"NOT_MATCH":return!i}},e.prototype._matches=function(e,t,r){if("string"!=typeof r)throw Error("SegmentKey[".concat(r,"]"));var n=e.workspace.getSegmentOrNull(r);if(!n)throw Error("Segment[".concat(r,"]"));return this.segmentMatcher.matches(e,t,n)},e}(),lg=function(){function e(e){this.userConditionMatcher=e}return e.prototype.matches=function(e,t,r){var n=this;return r.targets.some(function(r){return n._matches(e,t,r)})},e.prototype._matches=function(e,t,r){var n=this;return r.conditions.every(function(r){return n.userConditionMatcher.matches(e,t,r)})},e}(),lm=function(){function e(e){this.evaluator=e}return e.prototype.evaluateInternal=function(e,t,r){var n=pU.by(e,r),i=this.evaluator.evaluate(n,t);if(!(i instanceof pO))throw Error("Unexpected evaluation [expected=ExperimentEvaluation, actual=".concat(i.constructor.name,"]"));var o=this.resolve(e,t,i);return t.addEvaluation(o),o},e.prototype.evaluate=function(e,t,r){var n;return null!=(n=t.getEvaluation(r))?n:this.evaluateInternal(e,t,r)},e}(),lE=function(){function e(e,t){this.abTestMatcher=e,this.featureFlagMatcher=t}return e.prototype.matches=function(e,t,r){switch(r.key.type){case"AB_TEST":return this.abTestMatcher.matches(e,t,r);case"FEATURE_FLAG":return this.featureFlagMatcher.matches(e,t,r);default:throw Error("Unsupported TargetKeyType [".concat(r.key.type,"]"))}},e}(),lw=function(e){function t(t,r){var n=e.call(this,t)||this;return n.valueOperatorMatcher=r,n}return h(t,e),t.prototype.matches=function(e,t,r){var n=s.requiredNotNullOrUndefined(g.asNumber(r.key.name),function(){return"Invalid key [".concat(r.key.type,", ").concat(r.key.name,"]")}),i=this.experiment(e,n);if(s.isNullOrUndefined(i))return!1;var o=this.evaluate(e,t,i);return this.evaluationMatches(o,r)},t}(lm),lb=function(e){function t(t,r){return e.call(this,t,r)||this}return h(t,e),t.prototype.experiment=function(e,t){return e.workspace.getExperimentOrNull(t)},t.prototype.resolve=function(e,t,r){return r.reason===D.TRAFFIC_ALLOCATED?r.with(D.TRAFFIC_ALLOCATED_BY_TARGETING):r},t.prototype.evaluationMatches=function(e,r){return!!t.AB_TEST_MATCHED_REASONS.includes(e.reason)&&this.valueOperatorMatcher.matches(e.variationKey,r.match)},t.AB_TEST_MATCHED_REASONS=[D.OVERRIDDEN,D.TRAFFIC_ALLOCATED,D.EXPERIMENT_COMPLETED,D.TRAFFIC_ALLOCATED_BY_TARGETING],t}(lw),lT=function(e){function t(t,r){return e.call(this,t,r)||this}return h(t,e),t.prototype.experiment=function(e,t){return e.workspace.getFeatureFlagOrNull(t)},t.prototype.resolve=function(e,t,r){return r},t.prototype.evaluationMatches=function(e,t){var r="A"!==e.variationKey;return this.valueOperatorMatcher.matches(r,t.match)},t}(lw),lI=function(){function e(e,t){this.eventValueResolver=e,this.valueOperatorMatcher=t}return e.prototype.matches=function(e,t,r){if(!this.isEventEvaluatorRequest(e))return!1;var n=this.eventValueResolver.resolveOrNull(e.event,r.key);return this.valueOperatorMatcher.matches(n,r.match)},e.prototype.isEventEvaluatorRequest=function(e){return void 0!==e.event},e}(),lA=function(){function e(){}return e.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 Error("Unsupported TargetKeyType [".concat(t.type,"]"))}},e.prototype.properties=function(e){return pE.isTrackEvent(e)?e.event.properties:pE.isExposureEvent(e)||pE.isRemoteConfigEvent(e)?e.properties:void 0},e}(),l_=function(){function e(e){this.valueOperatorMatcher=e}return e.prototype.matches=function(e,t,r){if("COHORT"!==r.key.type)throw Error("Unsupported TargetKeyType [".concat(r.key.type,"]"));var n,i,o=null!=(i=null==(n=e.user.cohorts)?void 0:n.map(function(e){return e.id}))?i:[];return this.valueOperatorMatcher.matches(o,r.match)},e}(),lN=function(){function e(e,t){this.valueOperatorMatcher=e,this.clock=t}return e.prototype.supports=function(e){return"NUMBER_OF_EVENTS_IN_DAYS"===e||"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS"===e},e.prototype.matches=function(e,t,r){var n,i=r.key.type;if(!this.supports(i))throw Error("Unsupported TargetKeyType [".concat(i,"]"));var o=null!=(n=e.user.targetEvents)?n:[];switch(i){case"NUMBER_OF_EVENTS_IN_DAYS":return new lM(this.valueOperatorMatcher,this.clock).matches(e,o,r);case"NUMBER_OF_EVENTS_WITH_PROPERTY_IN_DAYS":return new lP(this.valueOperatorMatcher,this.clock).matches(e,o,r);default:return i}},e}(),lO=function(){},lM=function(e){function t(t,r){var n=e.call(this)||this;return n.valueOperatorMatcher=t,n.clock=r,n}return h(t,e),t.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-A.daysToUnit(i.days,"milliseconds"),s=t.filter(function(e){return n.expressionMatch(e,i)}),u=a.sum(s,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(u,r.match)}
1,t.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&null===e.property},t.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw Error("Failed to parse UserTargetCondition. ".concat(e))}},t}(lO),lP=function(e){function t(t,r){var n=e.call(this)||this;return n.valueOperatorMatcher=t,n.clock=r,n}return h(t,e),t.prototype.matches=function(e,t,r){var n=this,i=this.convertTargetConditionToExpression(r),o=this.clock.currentMillis()-A.daysToUnit(i.days,"milliseconds"),s=t.filter(function(e){return n.expressionMatch(e,i)}),u=a.sum(s,function(e){return e.countWithinDays(o)});return this.valueOperatorMatcher.matches(u,r.match)},t.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)},t.prototype.expressionMatch=function(e,t){return e.eventKey===t.eventKey&&this.propertyMatch(e.property,t.propertyFilter)},t.prototype.convertTargetConditionToExpression=function(e){try{return JSON.parse(e.key.name)}catch(e){throw Error("Failed to parse UserTargetCondition. ".concat(e))}},t}(lO),lS=function(){function e(e,t){var r=new p6(new lf,new ls);this.userConditionMatcher=new ld(new ly,r),this.eventConditionMatcher=new lI(new lA,r),this.segmentConditionMatcher=new lv(new lg(this.userConditionMatcher)),this.experimentConditionMatcher=new lE(new lb(e,r),new lT(e,r)),this.cohortConditionMatcher=new l_(r),this.userTargetConditionMatcher=new lN(r,t)}return e.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}},e}(),lC={murmurhash3_x86_32:function(e,t,r,n){void 0===n&&(n=e.length);for(var i,o=-4&n,s=t,a=0;a<o;a+=4)i=255&e.charCodeAt(a)|(255&e.charCodeAt(a+1))<<8|(255&e.charCodeAt(a+2))<<16|(255&e.charCodeAt(a+3))<<24,i=(131071&(i=this.mul32(i,0xcc9e2d51)))<<15|i>>>17,s=5*(s=(524287&(s^=i=this.mul32(i,0x1b873593)))<<13|s>>>19)+0xe6546b64|0;switch(i=0,n%4){case 3:i=(255&e.charCodeAt(o+2))<<16;case 2:i|=(255&e.charCodeAt(o+1))<<8;case 1:i|=255&e.charCodeAt(o),i=(131071&(i=this.mul32(i,0xcc9e2d51)))<<15|i>>>17,s^=i=this.mul32(i,0x1b873593)}return s^=n,s^=s>>>16,s=this.mul32(s,0x85ebca6b),s^=s>>>13,s=this.mul32(s,0xc2b2ae35),s^=s>>>16},mul32:function(e,t){var r=65535&t;return((t-r)*e|0)+(r*e|0)|0}},lR=function(){function e(){}return e.prototype.bucketing=function(e,t){var r=this.calculateSlotNumber(e.seed,e.slotSize,t);return e.slots.find(function(e){return e.contains(r)})},e.prototype.calculateSlotNumber=function(e,t,r){return Math.abs(lC.murmurhash3_x86_32(r,e))%Math.abs(t)},e}(),lU=c.log,lk=function(){function e(e,t,r,n,i,o){this.experimentEvaluator=e,this.remoteConfigEvaluator=t,this.workspaceFetcher=r,this.eventFactory=n,this.eventProcessor=i,this.errorDedupDeterminer=o}return e.create=function(t,r,n,i){var o=_.instance,s=pF.register("delegatingEvaluator",new pL),a=new lR,u=pF.register("targetMatcher",new p4(new lS(s,o))),c=new px(i),p=new pV(u,a),l=new pM(new p2(c,a,pF.get("targetMatcher"))),h=new pS(p);return s.add(l),s.add(h),new e(l,h,t,r,n,new lx)},e.prototype.getExperiment=function(e){if(e){var t=this.workspaceFetcher.get();if(t)return t.getExperimentOrNull(e)}else lU.error("experimentKey must not be empty")},e.prototype.experiment=function(e,t,r){var n=this;if(!e)return lU.error("experimentKey must not be empty"),R.of(r,D.INVALID_INPUT);var i=this.workspaceFetcher.get();if(!i)return lU.warn("SDK not ready."),R.of(r,D.SDK_NOT_READY);var o=i.getExperimentOrNull(e);if(!o)return lU.warn("Experiment does not exist."),R.of(r,D.EXPERIMENT_NOT_FOUND);var s=pU.of(i,t,o,r),a=this.experimentInternal(s),u=a[0],c=a[1];return this.eventFactory.create(s,u).forEach(function(e){return n.eventProcessor.process(e)}),c},e.prototype.experiments=function(e){var t=this,r=new to(function(e,t){return e.id===t.id}),n=this.workspaceFetcher.get();
1return n&&n.getExperiments().forEach(function(i){var o=pU.of(n,e,i,"A"),s=t.experimentInternal(o);s[0];var a=s[1];r.add(i,a)}),r},e.prototype.experimentInternal=function(e){var t,r=this.experimentEvaluator.evaluate(e,pR.create()),n=null!=(t=r.config)?t:new N;return[r,R.of(r.variationKey,r.reason,n,r.experiment)]},e.prototype.featureFlag=function(e,t){var r=this;if(!e)return lU.error("featureKey must not be empty"),U.off(D.INVALID_INPUT);var n=this.workspaceFetcher.get();if(!n)return lU.warn("SDK not ready."),U.off(D.SDK_NOT_READY);var i=n.getFeatureFlagOrNull(e);if(!i)return lU.warn("FeatureFlag does not exist."),U.off(D.FEATURE_FLAG_NOT_FOUND);var o=pU.of(n,t,i,"A"),s=this.featureFlagInternal(o),a=s[0],u=s[1];return this.eventFactory.create(o,a).forEach(function(e){return r.eventProcessor.process(e)}),u},e.prototype.featureFlags=function(e){var t=this,r=new to(function(e,t){return e.id===t.id}),n=this.workspaceFetcher.get();return n&&n.getFeatureFlags().forEach(function(i){var o=pU.of(n,e,i,"A"),s=t.featureFlagInternal(o);s[0];var a=s[1];r.add(i,a)}),r},e.prototype.featureFlagInternal=function(e){var t,r=this.experimentEvaluator.evaluate(e,pR.create()),n=null!=(t=r.config)?t:new N;return[r,"A"===r.variationKey?U.off(r.reason,n,r.experiment):U.on(r.reason,n,r.experiment)]},e.prototype.inAppMessage=function(e,t,r){var n=r.evaluate(e,t);return r.record(e,n),n},e.prototype.track=function(e,t,r){var n;if(void 0===r&&(r=(new Date).getTime()),e)if("object"==typeof e)if("object"!=typeof e||e.key&&"string"==typeof e.key){var i=(null==(n=this.workspaceFetcher.get())?void 0:n.getEventTypeOrNull(e.key))||new H(0,e.key);this.eventProcessor.process(pE.track(i,e,t,r))}else lU.warn("Event key must be not null. or event key must be string type.");else lU.warn("Event must be event type.");else lU.warn("event must not be null.")},e.prototype.trackException=function(e,t){if(!this.errorDedupDeterminer.isDedupTarget(e)){var r=p_.toEvent(e);this.flush(),this.track(r,t),this.flush()}},e.prototype.flush=function(e){void 0===e&&(e=!1),this.eventProcessor.flush(e)},e.prototype.remoteConfig=function(e,t,r,n){var i=this,o=this.workspaceFetcher.get();if(s.isNullOrUndefined(o))return lU.warn("SDK not ready."),C.of(n,D.SDK_NOT_READY);var a=o.getRemoteConfigParameterOrNull(e);if(s.isNullOrUndefined(a))return lU.warn("Remote config parameter does not exist."),C.of(n,D.REMOTE_CONFIG_PARAMETER_NOT_FOUND);var u=pk.of(o,t,a,r,n),c=this.remoteConfigEvaluator.evaluate(u,pR.create());return this.eventFactory.create(u,c).forEach(function(e){return i.eventProcessor.process(e)}),C.of(c.value,c.reason)},e.prototype.close=function(){this.eventProcessor.close()},e}(),lx=function(){function e(){}return e.prototype.isDedupTarget=function(e){return!!this._isSameError(e,this.previous)||(this.previous=e,!1)},e.prototype._isSameError=function(e,t){return!s.isNullOrUndefined(t)&&e.name===t.name&&e.message===t.message&&e.stack===t.stack},e}(),lD=function(){function e(){this._installed=[],this._installations={onerror:lF,onunhandledrejection:lV}}return e.prototype.install=function(e,t){this._install("onerror",e,t),this._install("onunhandledrejection",e,t)},e.prototype._install=function(e,t,r){e in this._installed||((0,this._installations[e])(t,r),this._installed.push(e))},e}(),lL=null;function lF(e,t){lL=window.onerror,window.onerror=function(r,n,i,o,a){s.isNotNullOrUndefined(a)&&e.trackException(a,t.resolve()),lL&&lL.apply(this,arguments)}}function lV(e,t){pm=window.onunhandledrejection,window.onunhandledrejection=function(r){var n;try{"reason"in r?n=r.reason:"detail"in r&&"reason"in r.detail&&(n=r.detail.reason)}catch(e){}n instanceof Error&&e.trackException(n,t.resolve()),pm&&pm.apply(this,arguments)}}var lK=function(){function e(e,t,r){this.storage=e,this.storageKey=t,this.maxSize=r}return e.prototype.read=function(){return d(this,void 0,void 0,function(){var e;return y(this,function(t){return(e=this.storage.getItem(this.storageKey))?[2,JSON.parse(e)]:[2,[]]})})},e.prototype.save=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){return 0===e.length?[2,this.clear()]:(t=JSON.stringify(e.slice(-this.maxSize)),this.storage.setItem(this.storageKey,t),[2])})})},e.prototype.add=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){switch(r.label){case 0:return[4,this.read()];case 1:return t=r.sent(),[4,this.save(t.concat(e).slice(-this.maxSize))];case 2:return r.sent(),[2]}})})},e.prototype.delete=function(e){return d(this,void 0,void 0,function(){var t,r=this;return y(this,function(n){switch(n.label){case 0:return[4,this.read()];case 1:return t=n.sent().filter(function(t){return!r.isDeleteTarget(t,e)}),[4,this.save(t)];case 2:return n.sent(),[2]}})})},e.prototype.isDeleteTarget=function(e,t){return t.some(function(t){return t.insertId===e.insertId})},e.prototype.clear=function(){return d(this,void 0,void 0,function(){return y(this,function(e){return this.storage.removeItem(this.storageKey),[2]})})},e}(),lB=function(e,t){return null!==e&&e.userId===t.userId&&e.deviceId===t.deviceId},lH=function(){function e(e){this.cohorts=e}return e.builder=function(){return new lG},e.empty=function(){return e.builder().build()},e.from=function(t){return new e(t)},e.fromDto=function(t){for(var r=e.builder(),n=0,i=t.cohorts;n<i.length;n++){var o=i[n];r.put({identifier:o.identifier,cohorts:o.cohorts.map(function(e){return new e8(e)}
vendor: 4,445 bytes, line 1
1)})}return r.build()},Object.defineProperty(e.prototype,"rawCohorts",{get:function(){return this.cohorts.values().flatMap(function(e){return e.cohorts})},enumerable:!1,configurable:!0}),e.prototype.get=function(e){return this.cohorts.get(e)},e.prototype.filterBy=function(t){var r=j(t),n=this.asComparable().filter(function(e,t){return r[e.type]===e.value});return e.from(n)},e.prototype.asArray=function(){return this.cohorts.values()},e.prototype.asComparable=function(){return this.cohorts},e.prototype.toBuilder=function(){return new lG(this)},e}(),lG=function(){function e(e){this.cohorts=new to(E.isEqual),e&&this.putAll(e)}return e.prototype.put=function(e){return this.cohorts.add(e.identifier,e),this},e.prototype.putAll=function(e){var t=this;return e.asArray().forEach(function(e){return t.put(e)}),this},e.prototype.build=function(){return new lH(this.cohorts)},e}(),lj="model",lW="name",lY="type",lJ="vendor",lz="version",lq="mobile",lX="tablet",l$=function(){function e(){}return e.parse=function(t){return{browser:e.getBrowser(t),cpu:e.getCPU(t),device:e.getDevice(t),engine:e.getEngine(t),os:e.getOS(t)}},e.getBrowser=function(t){var r={name:void 0,version:void 0,major:void 0};return e.mapper.rgx.call(r,t,e.regexes.browser),r.major=e.util.major(r.version),r},e.getCPU=function(t){var r={architecture:void 0};return e.mapper.rgx.call(r,t,e.regexes.cpu),r},e.getDevice=function(t){var r={model:void 0,type:void 0,vendor:void 0};return e.mapper.rgx.call(r,t,e.regexes.device),r},e.getEngine=function(t){var r={name:void 0,version:void 0};return e.mapper.rgx.call(r,t,e.regexes.os),r},e.getOS=function(t){var r={name:void 0,version:void 0};return e.mapper.rgx.call(r,t,e.regexes.os),r},e.util={extend:function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},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,"")}},e.mapper={rgx:function(e,t){for(var r,n,i,o,s,a,u=0;u<t.length&&!s;){var c=t[u],p=t[u+1];for(r=n=0;r<c.length&&!s;)if(s=c[r++].exec(e))for(i=0;i<p.length;i++)a=s[++n],"object"==typeof(o=p[i])&&o.length>0?2==o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,a):this[o[0]]=o[1]:3==o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=a?a.replace(o[1],o[2]):void 0:this[o[0]]=a?o[1].call(this,a,o[2]):void 0:4==o.length&&(this[o[0]]=a?o[3].call(this,a.replace(o[1],o[2])):void 0):this[o]=a||void 0;u+=2}},str:function(t,r){for(var n in r)if("object"==typeof r[n]&&r[n].length>0){for(var i=0;i<r[n].length;i++)if(e.util.has(r[n][i],t))return"?"===n?void 0:n}else if(e.util.has(r[n],t))return"?"===n?void 0:n;return t}},e.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"}}}},e.regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[lW,lz],[/(opios)[\/\s]+([\w\.]+)/i],[[lW,"Opera Mini"],lz],[/\s(opr)\/([\w\.]+)/i],[[lW,"Opera"],lz],[/(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],[lW,lz],[/(konqueror)\/([\w\.]+)/i],[[lW,"Konqueror"],lz],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[lW,"IE"],lz],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[lW,"Edge"],lz],[/(yabrowser)\/([\w\.]+)/i],[[lW,"Yandex"],lz],[/(Avast)\/([\w\.]+)/i],[[lW,"Avast Secure Browser"],lz],[/(AVG)\/([\w\.]+)/i],[[lW,"AVG Secure Browser"],lz],[/(puffin)\/([\w\.]+)/i],[[lW,"Puffin"],lz],[/(focus)\/([\w\.]+)/i],[[lW,"Firefox Focus"],lz],[/(opt)\/([\w\.]+)/i],[[lW,"Opera Touch"],lz],[/((?:[\s\/]
1)uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[lW,"UCBrowser"],lz],[/(comodo_dragon)\/([\w\.]+)/i],[[lW,/_/g," "],lz],[/(windowswechat qbcore)\/([\w\.]+)/i],[[lW,"WeChat(Win) Desktop"],lz],[/(micromessenger)\/([\w\.]+)/i],[[lW,"WeChat"],lz],[/(brave)\/([\w\.]+)/i],[[lW,"Brave"],lz],[/(whale)\/([\w\.]+)/i],[[lW,"Whale"],lz],[/(qqbrowserlite)\/([\w\.]+)/i],[lW,lz],[/(QQ)\/([\d\.]+)/i],[lW,lz],[/m?(qqbrowser)[\/\s]?([\w\.]+)/i],[lW,lz],[/(baiduboxapp)[\/\s]?([\w\.]+)/i],[lW,lz],[/(2345Explorer)[\/\s]?([\w\.]+)/i],[lW,lz],[/(MetaSr)[\/\s]?([\w\.]+)/i],[lW],[/(LBBROWSER)/i],[lW],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[lz,[lW,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[lz,[lW,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/android.+(line)\/([\w\.]+)\/iab/i],[lW,lz],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[lz,[lW,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[lW,/(.+)/,"$1 WebView"],lz],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[lW,/(.+(?:g|us))(.+)/,"$1 $2"],lz],[/((?:android.+)crmo|crios)\/([\w\.]+)/i,/android.+(chrome)\/([\w\.]+)\s+(?:mobile\s?safari)/i],[[lW,"Chrome Mobile"],lz],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[lz,[lW,"Android Browser"]],[/(sailfishbrowser)\/([\w\.]+)/i],[[lW,"Sailfish Browser"],lz],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[lW,lz],[/(dolfin)\/([\w\.]+)/i],[[lW,"Dolphin"],lz],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[lW,"360 Browser"]],[/(coast)\/([\w\.]+)/i],[[lW,"Opera Coast"],lz],[/fxios\/([\w\.-]+)/i],[lz,[lW,"Firefox"]],[/version\/([\w\.]+).+?mobile\/\w+\s(safari)/i],[lz,[lW,"Mobile Safari"]],[/version\/([\w\.]+).+?(mobile\s?safari|safari)/i],[lz,lW],[/webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[[lW,"GSA"],lz],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[lW,[lz,e.mapper.str,e.maps.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[lW,lz],[/(navigator|netscape)\/([\w\.-]+)/i],[[lW,"Netscape"],lz],[/(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\:.
vendor: 7,944 bytes, line 1
1+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],[lW,lz]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",e.util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/windows\s(ce|mobile);\sppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[["architecture",/ower/,"",e.util.lowerize]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[["architecture",e.util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[lj,lJ,[lY,lX]],[/applecoremedia\/[\w\.]+ \((ipad)/],[lj,[lJ,"Apple"],[lY,lX]],[/(apple\s{0,1}tv)/i],[[lj,"Apple TV"],[lJ,"Apple"],[lY,"smarttv"]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[lJ,lj,[lY,lX]],[/(kf[A-z]+)\sbuild\/.+silk\//i],[lj,[lJ,"Amazon"],[lY,lX]],[/(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i],[[lj,e.mapper.str,e.maps.device.amazon.model],[lJ,"Amazon"],[lY,lq]],[/android.+aft([bms])\sbuild/i],[lj,[lJ,"Amazon"],[lY,"smarttv"]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[lj,lJ,[lY,lq]],[/\((ip[honed|\s\w*]+);/i],[lj,[lJ,"Apple"],[lY,lq]],[/(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],[lJ,lj,[lY,lq]],[/\(bb10;\s(\w+)/i],[lj,[lJ,"BlackBerry"],[lY,lq]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[lj,[lJ,"Asus"],[lY,lX]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[lJ,"Sony"],[lj,"Xperia Tablet"],[lY,lX]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[lj,[lJ,"Sony"],[lY,lq]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[lJ,lj,[lY,"console"]],[/android.+;\s(shield)\sbuild/i],[lj,[lJ,"Nvidia"],[lY,"console"]],[/(playstation\s[34portablevi]+)/i],[lj,[lJ,"Sony"],[lY,"console"]],[/(sprint\s(\w+))/i],[[lJ,e.mapper.str,e.maps.device.sprint.vendor],[lj,e.mapper.str,e.maps.device.sprint.model],[lY,lq]],[/(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[lJ,[lj,/_/g," "],[lY,lq]],[/(nexus\s9)/i],[lj,[lJ,"HTC"],[lY,lX]],[/d\/huawei([\w\s-]+)[;\)]/i,/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i],[lj,[lJ,"Huawei"],[lY,lq]],[/android.+(bah2?-a?[lw]\d{2})/i],[lj,[lJ,"Huawei"],[lY,lX]],[/(microsoft);\s(lumia[\s\w]+)/i],[lJ,lj,[lY,lq]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[lj,[lJ,"Microsoft"],[lY,"console"]],[/(kin\.[onetw]{3})/i],[[lj,/\./g," "],[lJ,"Microsoft"],[lY,lq]],[/\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],[lj,[lJ,"Motorola"],[lY,lq]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[lj,[lJ,"Motorola"],[lY,lX]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[lJ,e.util.trim],[lj,e.util.trim],[lY,"smarttv"]],[/hbbtv.+maple;(\d+)/i],[[lj,/^/,"SmartTV"],[lJ,"Samsung"],[lY,"smarttv"]],[/\(dtv[\);].+(aquos)/i],[lj,[lJ,"Sharp"],[lY,"smarttv"]],[/android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[lJ,"Samsung"],lj,[lY,lX]],[/smart-tv.+(samsung)/i],[lJ,[lY,"smarttv"],lj],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[lJ,"Samsung"],lj,[lY,lq]],[/sie-(\w*)/i],[lj,[lJ,"Siemens"],[lY,lq]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[lJ,"Nokia"],lj,[lY,lq]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[lj,[lJ,"Acer"],[lY,lX]],[/android.+([vl]k\-?\d{3})\s+build/i],[lj,[lJ,"LG"],[lY,lX]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[lJ,"LG"],lj,[lY,lX]],[/(lg) netcast\.tv/i],[lJ,lj,[lY,"smarttv"]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[lj,[lJ,"LG"],[lY,lq]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[lJ,lj,[lY,lX]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[lj,[lJ,"Lenovo"],[lY,lX]],[/(lenovo)[_\s-]?([\w-]+)/i],[lJ,lj,[lY,lq]],[/linux;.+((jolla));/i],[lJ,lj,[lY,lq]],[/((pebble))app\/[\d\.]+\s/i],[lJ,lj,[lY,"wearable"]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[lJ,lj,[lY,lq]],[/crkey/i],[[lj,"Chromecast"],[lJ,"Google"],[lY,"smarttv"]],[/android.+;\s(glass)\s\d/i],[lj,[lJ,"Google"],[lY,"wearable"]],[/android.+;\s(pixel c)[\s)]/i],[lj,[lJ,"Google"],[lY,lX]],[/android.+;\s(pixel( [23])?( xl)?)[\s)]/i],[lj,[lJ,"Google"],[lY,lq]],[/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],[[lj,/_/g," "],[lJ,"Xiaomi"],[lY,lq]],[/android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i],[[lj,/_/g," "],[lJ,"Xiaomi"],[lY,lX]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[lj,[lJ,"Meizu"],[lY,lq]],[/(mz)-([\w-]{2,})/i],[[lJ,"Meizu"],lj,[lY,lq]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[lj,[lJ,"OnePlus"],[lY,lq]],[/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[lj,[lJ,"RCA"],[lY,lX]],[/android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i],[lj,[lJ,"Dell"],[lY,lX]],[/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[lj,[lJ,"Verizon"],[lY,lX]],[/android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i],[[lJ,"Barnes & Noble"],lj,[lY,lX]],[/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[lj,[lJ,"NuVision"],[lY,lX]],[/android.+;\s(k88)\sbuild/i],[lj,[lJ,"ZTE"],[lY,lX]],[/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[lj,[lJ,"Swiss"],[lY,lq]],[/android.+[;\/]\s*(zur\d{3})\s+build/i],[lj,[lJ,"Swiss"],[lY,lX]],[/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[lj,[lJ,"Zeki"],[lY,lX]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[lJ,"Dragon Touch"],lj,[lY,lX]],[/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[lj,[lJ,"Insignia"],[lY,lX]],[/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i],[lj,[lJ,"NextBook"],[lY,lX]],[/android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[lJ,"Voice"],lj,[lY,lq]],[/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[lJ,"LvTel"],lj,[lY,lq]],[/android.+;\s(PH-1)\s/i],[lj,[lJ,"Essential"],[lY,lq]],[/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[lj,[lJ,"Envizen"],[lY,lX]],[/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[lJ,lj,[lY,lX]],[/android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i],[lj,[lJ,"MachSpeed"],[lY,lX]],[/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[lJ,lj,[lY,lX]],[/android.+[;\/]\s*TU_(1491)\s+build/i],[lj,[lJ,"Rotor"],[lY,lX]],[/android.+(KS(.+))\s+build/i],[lj,[lJ,"Amazon"],[lY,lX]],[/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[lJ,lj,[lY,lX]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[lY,e.util.lowerize],lJ,lj],[/[\s\/\(](smart-?tv)[;\)]/i],[[lY,"smarttv"]],[/(android[\w\.\s\-]{0,9});.+build/i],[lj,[lJ,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[lz,[lW,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[lz,[lW,"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],[lW,lz],[/rv\:([\w\.]{1,9}).+(gecko)/i],[lz,lW]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[lW,lz],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[[lW,e.mapper.str,e.maps.os.windows],[lz,e.mapper.str,e.maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[lW,"Windows"],[lz,e.mapper.str,e.maps.os.windows.version]],[/\((bb)(10);
1/i],[[lW,"BlackBerry"],lz],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[lW,lz],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[lW,"Symbian"],lz],[/\((series40);/i],[lW],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[lW,"Firefox OS"],lz],[/(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],[[lW,"Linux"],lz],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[lW,"Chromium OS"],lz],[/(sunos)\s?([\w\.\d]*)/i],[[lW,"Solaris"],lz],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[[lW,"Linux"],lz],[/(iphone)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[lW,"iOS"],[lz,/_/g,"."]],[/(ipad)(?:.*os\s*([\w]*)\slike\smac|;\sopera)/i],[[lW,"iOS"],[lz,/_/g,"."]],[/(haiku)\s(\w+)/i],[lW,lz],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[lz,/_/g,"."],[lW,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[lW,"Mac"],[lz,/_/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],[lW,lz]]},e}(),lZ=function(){function e(){}return e.generate=function(e,t){var r,n,i=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,o=l$.parse(i.navigator.userAgent).browser,s="";try{s=null!=(n=null==(r=screen.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:r[0])?n:""}catch(e){}return{browserName:o.name||"",browserMajorVersion:o.major||"",browserVersion:o.version||"",orientation:s,userAgent:i.navigator.userAgent||"",pagePath:t.pagePath,pageTitle:t.pageName,host:t.host,url:t.url,referrer:t.referrer,queryParameter:t.queryParameter,protocol:t.protocol.replace(":","")}},e}(),lQ=function(){function e(){}return e.generate=function(e){var t,r,n,i,o,s,a=void 0===e?{navigator:{userAgent:"",vendor:"",languages:[]},screen:{width:"",height:""}}:e,u=l$.parse(a.navigator.userAgent),c=u.os,p=u.device,l=a.screen,h=(null==(t=a.navigator.languages)?void 0:t[0])||"",f=h.split("-")[0],d=(null!=(r=p.type)?r:"pc").replace(/\b(mobile|smarttv)\b/g,function(e,t){return"mobile"===t?"phone":"smarttv"===t?"tv":e}),y=c.name||"",v="";try{y=null!=(i=null==(n=y.match(/\b(Mac|Windows|Linux|Android|iOS)\b/))?void 0:n[0])?i:y,orientation=null!=(s=null==(o=l.orientation.type.match(/\b(landscape|portrait)\b/))?void 0:o[0])?s:"",v=Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch(e){}return{osName:y,osVersion:c.version||"",deviceModel:p.model||"",deviceType:d,deviceVendor:p.vendor||"",deviceBrand:p.vendor||"",screenWidth:l.width||"",screenHeight:l.height||"",locale:h,language:f,timeZone:v}},e}(),l0=function(){function e(){}return e.generate=function(e,t){var r=null!=t?t:tX.createWithCurrentPage();return f(f({platform:"Web"},lZ.generate(e,r)),lQ.generate(e))},e}(),l1=function(){function e(e,t){this.previous=e,this.current=t}return e.prototype.map=function(t){return new e(t(this.previous),t(this.current))},e}(),l2=function(){function e(e){this.events=e}return e.empty=function(){return this.from([])},e.from=function(t){return new e(t)},e.fromDto=function(e){return this.from(e.events.map(function(e){return tt.fromJson(e)}))},Object.defineProperty(e.prototype,"rawEvents",{get:function(){return this.events},enumerable:!1,configurable:!0}),e}(),l4=function(){function e(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)}return e.prototype.initContext=function(e,t){var r,n=null!=(r=null!=t?t:e)?r:this.defaultUser;return l5.of(l6(n,this.hackleDeviceId),lH.empty(),l2.empty())},e.prototype.addListener=function(e){this.userListeners.push(e)},Object.defineProperty(e.prototype,"currentUser",{get:function(){return this.context.user}
1,enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){var t=this.resolveContext(e);return this.hackleUser(t)},e.prototype.resolveContext=function(e){return void 0===e?this.context:"string"==typeof e?this.updateUser({id:e}).current:this.updateUser(e).current},e.prototype.toHackleUser=function(e){var t=this.context.with(e);return this.hackleUser(t)},e.prototype.hackleUser=function(e){var t=(new W).addIdentifiers(e.user.identifiers||{}).add(G.ID,e.user.id||this.hackleDeviceId).add(G.DEVICE,e.user.deviceId||this.hackleDeviceId).add(G.HACKLE_DEVICE,this.hackleDeviceId);s.isNotNullOrUndefined(e.user.userId)&&t.add(G.USER,e.user.userId);var r=t.build(),n=this.campaignParser.parse();return{identifiers:r,properties:f(f({},n),e.user.properties),hackleProperties:this.hackleProperties(),cohorts:e.cohorts.rawCohorts,targetEvents:e.targetEvents.rawEvents}},e.prototype.hackleProperties=function(){return"u">typeof window?l0.generate(window,this.pageManager.currentPage):{}},e.prototype.setUser=function(e){return this.updateUser(e).map(function(e){return e.user})},e.prototype.setUserId=function(e){var t=f(f({},this.context.user),{userId:e});return this.setUser(t)},e.prototype.setDeviceId=function(e){var t=f(f({},this.context.user),{deviceId:e});return this.setUser(t)},e.prototype.updateUserProperties=function(e){return this.operateProperties(e).map(function(e){return e.user})},e.prototype.resetUser=function(){var e=this;return this.updateContext(function(){return e.defaultUser}).map(function(e){return e.user})},e.prototype.changeUser=function(e,t,r){this.userListeners.forEach(function(n){n.onUserUpdated(e,t,r)})},e.prototype.saveUser=function(e){this.storage.saveUser(e)},e.prototype.updateContext=function(e){var t=this.context,r=t.user,n=e(r),i=this.context.with(n);return this.context=i,lB(r,n)||(this.changeUser(r,n,this.clock.currentMillis()),this.saveUser(n)),new l1(t,i)},e.prototype.updateUser=function(e){var t=this;return this.updateContext(function(r){var n;return lB(r,n=l6(e,t.hackleDeviceId))?f(f({},n),{properties:f(f({},r.properties),n.properties)}):n})},e.prototype.operateProperties=function(e){return this.updateContext(function(t){var r,n=null!=(r=t.properties)?r:{},i=e.operate(new Map(Object.entries(n)));return f(f({},t),{properties:s.fromMap(i)})})},e.prototype.sync=function(){return d(this,void 0,void 0,function(){return y(this,function(e){switch(e.label){case 0:return[4,Promise.all([this.syncCohort(),this.syncUserTarget()])];case 1:return e.sent(),[2]}})})},e.prototype.syncIfNeeded=function(e){return d(this,void 0,void 0,function(){return y(this,function(t){switch(t.label){case 0:return this.hasNewIdentifiers(e.previous,e.current)?[4,this.syncCohort()]:[3,2];case 1:t.sent(),t.label=2;case 2:return lB(e.previous,e.current)?[3,4]:[4,this.syncUserTarget()];case 3:t.sent(),t.label=4;case 4:return[2]}})})},e.prototype.syncCohort=function(){return d(this,void 0,void 0,function(){var e,t;return y(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.userCohortFetcher.fetch(this.currentUser)];case 1:return e=r.sent(),this.context=this.context.update(e,this.context.targetEvents),[3,3];case 2:return t=r.sent(),c.log.error("Failed to sync cohorts: ".concat(t)),[3,3];case 3:return[2]}})})},e.prototype.syncUserTarget=function(){return d(this,void 0,void 0,function(){var e,t;return y(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.userTargetFetcher.fetch(this.currentUser)];case 1:return e=r.sent(),this.context=this.context.update(this.context.cohorts,e),[3,3];case 2:return t=r.sent(),c.log.error("Failed to sync userTargets: ".concat(t)),[3,3];case 3:return[2]}})})},e.prototype.hasNewIdentifiers=function(e,t){var r=j(e);return Object.entries(j(t)).some(function(e){var t=e[0],n=e[1];return r[t]!==n})},e.prototype.close=function(){return d(this,void 0,void 0,function(){return y(this,function(e){return[2]})})},e}(),l3=function(){function e(e){this.storage=e}return e.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},e.prototype.saveUser=function(e){this.setDeviceId(e.deviceId||null),this.setUserId(e.userId||null)},Object.defineProperty(e.prototype,"deviceId",{get:function(){return this.storage.getItem("_hackle_did")}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userId",{get:function(){return this.storage.getItem("_hackle_uid")},enumerable:!1,configurable:!0}),e.prototype.setDeviceId=function(e){this.setId("_hackle_did",e)},e.prototype.setUserId=function(e){this.setId("_hackle_uid",e)},e.prototype.setId=function(e,t){s.isNotNullOrUndefined(t)?this.storage.setItem(e,t):this.storage.removeItem(e)},e}(),l5=function(){function e(e,t,r){this.user=e,this.cohorts=t,this.targetEvents=r}return e.of=function(t,r,n){return new e(t,r.filterBy(t),n)},e.prototype.with=function(t){return e.of(t,this.cohorts.filterBy(t),this.targetEvents)},e.prototype.update=function(t,r){var n=t.filterBy(this.user),i=this.cohorts.toBuilder().putAll(n).build();return e.of(this.user,i,r)},e}(),l6=function(e,t){return f(f({},e),{id:e.id||t,deviceId:e.deviceId||t})},l9=function(){function e(e,t){this.sessionPolicy=e,this.storage=t,this.sessionListeners=[],this._currentSessionId=null,this._lastEventTime=null,this.loadSession(),this.loadLastEventTime()}return Object.defineProperty(e.prototype,"currentSessionId",{get:function(){return this._currentSessionId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionId",{get:function(){var t;return null!=(t=this._currentSessionId)?t:e.EMPTY_SESSION_ID},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastEventTime",{get:function(){return this._lastEventTime},enumerable:!1,configurable:!0}),e.prototype.addListener=function(e){this.sessionListeners.push(e)},e.prototype.startNewSession=function(e,t,r){return e&&this.endSession(e),this.newSession(t,r)},e.prototype.startNewSessionIfNeeded=function(e){return this.shouldStartNewSession(e)?this.startNewSession(e.oldUser,e.newUser,e.timestamp):(this.updateLastEventTime(e.timestamp),this.sessionId)},e.prototype.updateLastEventTime=function(e){this._lastEventTime=e,this.storage.setItem("_hackle_last_event_ts","".concat(e))},e.prototype.shouldStartNewSession=function(e){if(null===this._currentSessionId)return!0;if(!lB(e.oldUser,e.newUser))try{if(!this.sessionPolicy.persistCondition(e.oldUser,e.newUser))return!0}catch(e){return c.log.warn("persistCondition threw an error, starting new session: ".concat(e)),!0}return this.isSessionTimedOut(e.timestamp)},e.prototype.isSessionTimedOut=function(e){return null===this._lastEventTime||e-this._lastEventTime>=this.sessionPolicy.timeoutMillis},e.prototype.endSession=function(e){var t=this._currentSessionId,r=this._lastEventTime;null!==t&&null!==r&&this.sessionListeners.forEach(function(n){return n.onSessionEnded(t,e,r)})},e.prototype.newSession=function(e,t){var r="".concat(t,".").concat(i.v4().slice(0,8));return this.saveSession(r),this.updateLastEventTime(t),this.sessionListeners.forEach(function(n){n.onSessionStarted(r,e,t)}),r},e.prototype.saveSession=function(e){this._currentSessionId=e,this.storage.setItem("_hackle_session_id",e)},e.prototype.loadSession=function(){this._currentSessionId=this.storage.getItem("_hackle_session_id")},e.prototype.loadLastEventTime=function(){var e=this.storage.getItem("_hackle_last_event_ts");if(null!==e){var t=Number.parseFloat(e);t>0&&(this._lastEventTime=t)}},e.prototype.onUserUpdated=function(e,t,r){this.startNewSessionIfNeeded({oldUser:e,newUser:t,timestamp:r})},e.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}},e.EMPTY_SESSION_ID="0.ffffffff",e}(),l8=function(){function e(){this.storage=window.localStorage}return e.prototype.getItem=function(e){var t,r;return null!=(r=null==(t=this.storage)?void 0:t.getItem(e))?r:null},e.prototype.removeItem=function(e){var t;null==(t=this.storage)||t.removeItem(e)},e.prototype.setItem=function(e,t){var r;null==(r=this.storage)||r.setItem(e,t)},e.prototype.clear=function(){var e;null==(e=this.storage)||e.clear()},e}(),l7=function(){function e(e,t){this.delegate=e,this.transform=t}return e.postfix=function(t,r){return new e(t,function(e){return"".concat(e).concat(r)})},e.prefix=function(t,r){return new e(t,function(e){return"".concat(r).concat(e)})},e.prototype.getItem=function(e){return this.delegate.getItem(this.transform(e))},e.prototype.removeItem=function(e){this.delegate.removeItem(this.transform(e))},e.prototype.setItem=function(e,t){this.delegate.setItem(this.transform(e),t)},e}(),he=function(){function e(e,t,r){void 0===r&&(r=4096);var n=this;this.delegate=e,this.listKey=t,this.encodedListCharLen=6,this.resolveMaxLength=function(e){var t=e-n.encodedListCharLen;return t<0?0:t},this.maxLength=this.resolveMaxLength(r)}return e.prototype.isEqualItem=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.prototype.getRemainListSize=function(){try{return this.maxLength-JSON.stringify(this.getList()).length}catch(e){return 0}},e.prototype.isAddableItem=function(e){try{return this.getRemainListSize()>JSON.stringify(e).length}catch(e){return!1}},e.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}},e.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[]}},e.prototype.entries=function(){return this.getList().flatMap(Object.entries)},e.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){}},e.prototype.getItem=function(e){var t=this,r=this.getList().find(function(r){return t.isEqualItem(r,e)});if(r&&r[e])return r[e]},e.prototype.removeItem=function(e){var t=this,r=this.getList();try{var n=r.filter(function(r){return!t.isEqualItem(r,e)}),i=JSON.stringify(n);this.delegate.setItem(this.listKey,i)}catch(e){}},e.prototype.clear=function(){this.delegate.removeItem(this.listKey)},e}(),ht=function(){function e(e,t,r,n){this.core=e,this.userManager=t,this.abOverrideStorage=r,this.ffOverrideStorage=n}return e.prototype.currentUser=function(){return this.userManager.resolve()},e.prototype.getAbTestDecisions=function(){return this.core.experiments(this.currentUser()).entr
1ies()},e.prototype.getAbTestOverrides=function(){return this.abOverrideStorage.getAll()},e.prototype.setAbTestOverride=function(e,t){this.abOverrideStorage.set(e,t),this.increment("AB_TEST","set")},e.prototype.resetAbTestOverride=function(e){this.abOverrideStorage.remove(e),this.increment("AB_TEST","reset")},e.prototype.resetAllAbTestOverride=function(){this.abOverrideStorage.clear(),this.increment("AB_TEST","reset.all")},e.prototype.getFeatureFlagDecisions=function(){return this.core.featureFlags(this.currentUser()).entries()},e.prototype.getFeatureFlagOverrides=function(){return this.ffOverrideStorage.getAll()},e.prototype.setFeatureFlagOverride=function(e,t){this.ffOverrideStorage.set(e,t),this.increment("FEATURE_FLAG","set")},e.prototype.resetFeatureFlagOverride=function(e){this.ffOverrideStorage.remove(e),this.increment("FEATURE_FLAG","reset")},e.prototype.resetAllFeatureFlagOverride=function(){this.ffOverrideStorage.clear(),this.increment("FEATURE_FLAG","reset.all")},e.prototype.increment=function(e,t){tb.counter("experiment.manual.override",{"experiment.type":e,operation:t}).increment()},e}(),hr=function(){function e(){}return e.serverFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},e.clientFetch=function(e,t){return"".concat(e,"/api/v2/workspaces/").concat(t,"/config")},e.userCohorts=function(e){return"".concat(e,"/api/v1/cohorts")},e.serverDispatch=function(e){return"".concat(e,"/api/v2/events")},e.clientDispatch=function(e){return"".concat(e,"/api/v2/w/events")},e.beaconDispatch=function(e,t){return"".concat(e,"/api/v2/w/").concat(t,"/events")},e.inAppMessageRenderer=function(e,t){return"".concat(e,"/sdk/iam-renderer/").concat(t,"/iam-renderer.js")},e.monitoring=function(e){return"".concat(e,"/metrics")},e.userTargets=function(e){return"".concat(e,"/api/v1/user-targets")},e}(),hn=function(){function e(e){this.storage=e}return e.prototype.exist=function(e,t){var r=this.key(e),n=this.storage.getItem(r);if(s.isNullOrUndefined(n))return!1;var i=Number.parseInt(n,10);return Number.isNaN(i)?(this.storage.removeItem(r),!1):t<=i||(this.storage.removeItem(r),!1)},e.prototype.put=function(e,t){this.storage.setItem(this.key(e),"".concat(t))},e.prototype.key=function(e){return"".concat(e.key)},e}(),hi=function(){function e(e){this.handlers=e}return e.prototype.get=function(e){return this.handlers.find(function(t){return t.supports(e)})},e}(),ho=function(){function e(){}return e.prototype.handle=function(e,t){e.close()},e.prototype.supports=function(e){return"CLOSE"===e.type},e}(),hs=function(){function e(e){this.urlHandler=e}return e.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){c.log.error("Invalid url: ".concat(t.value))}},e.prototype.supports=function(e){return"WEB_LINK"===e.type},e}(),ha=function(){function e(e){this.urlHandler=e}return e.prototype.handle=function(e,t){e.close();try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){c.log.error("Invalid url: ".concat(t.value))}},e.prototype.supports=function(e){return"LINK_AND_CLOSE"===e.type},e}(),hu=function(){function e(e,t){this.storage=e,this.clock=t}return e.prototype.handle=function(e,t){if(e.context.decisionReason!==D.OVERRIDDEN){var r=s.requiredNotNullOrUndefined(t.hideDurationMillis,function(){return"hideDurationMillis must not be null for HIDDEN action"}),n=this.clock.currentMillis()+r;this.storage.put(e.context.inAppMessage,n),e.close()}else e.close()},e.prototype.supports=function(e){return"HIDDEN"===e.type},e}(),hc=function(){function e(e){this.urlHandler=e}return e.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){c.log.error("Invalid url: ".concat(t.value))}},e.prototype.supports=function(e){return"LINK_NEW_WINDOW"===e.type},e}(),hp=function(){function e(e){this.urlHandler=e}return e.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){c.log.error("Invalid url: ".concat(t.value))}finally{e.close()}},e.prototype.supports=function(e){return"LINK_NEW_WINDOW_AND_CLOSE"===e.type},e}(),hl=function(){function e(e){this.urlHandler=e}return e.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){c.log.error("Invalid url: ".concat(t.value))}},e.prototype.supports=function(e){return"LINK_NEW_TAB"===e.type},e}(),hh=function(){function e(e){this.urlHandler=e}return e.prototype.handle=function(e,t){try{if(!t.value)return;this.urlHandler.open(new URL(t.value))}catch(e){c.log.error("Invalid url: ".concat(t.value))}finally{e.close()}},e.prototype.supports=function(e){return"LINK_NEW_TAB_AND_CLOSE"===e.type},e}(),hf=function(){function e(e){this.core=e}return e.prototype.track=function(e,t){var r=this.createTrackEvent(t,e);this.core.track(r,e.user,t.timestamp)},e.prototype.commonProperties=function(e){return f(f({},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)})},e.prototype.createTrackEvent=function(e,t){var r,n,i,o;switch(e.type){case"IMPRESSION":return{key:"$in_app_impression",properties:f(f({},this.commonProperties(t)),{title_text:null==(n=null==(r=t.message.text)?void 0:r.title)?void 0:n.text,body_text:null==(o=null==(i=t.message.text)?void 0:i.body)?void 0:o.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":return{key:"$in_app_action",properties:f(f({},this.commonProperties(t)),{action_type:e.action.type,action_area:e.area,action_value:e.action.value,button_text:e.buttonText,image_url:e.imageUrl,image_order:e.imageOrder,element_id:e.elementId})};case"IMAGE_IMPRESSION":return{key:"$in_app_image_impression",properties:f(f({},this.commonProperties(t)),{image_url:e.imageUrl,image_order:e.imageOrder})}}},e}(),hd=function(){function e(e,t,r,n,i){void 0===i&&(i=null),this.viewFactories=e,this.viewEventHandleProcessor=t,this.interactionHandlerFactory=r,this.clock=n,this.inAppMessageListener=i,this.currentMessageView=null,this.opening=!1}return e.prototype.setListener=function(e){this.inAppMessageListener=e},e.prototype.present=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){switch(r.label){case 0:if(this.currentMessageView||this.opening)return[2];this.opening=!0,t=null,r.label=1;case 1:return r.trys.push([1,3,4,5]),null===(t=s.requiredNotNullOrUndefined(this.viewFactories.get(e),function(){return"Unsupported InAppMessagePresentationContext[".concat(e.message.layout.displayType,"], Can't create message view")}).create(e,this))?[2]:(this.currentMessageView=t,[4,t.open()]);case 2:return r.sent(),[3,5];case 3:return r.sent(),null==t||t.close(),[3,5];case 4:return this.opening=!1,[7];case 5:return[2]}})})},e}(),hy=function(){function e(e,t){this.type=e,this.timestamp=t}return e.impression=function(e){return new hv(e)},e.close=function(e){return new hg(e)},e.action=function(e){return new hm(e.timestamp,e.action,e.area,e.buttonText,e.imageUrl,e.imageOrder,e.elementId)},e.imageImpression=function(e){return new hE(e.timestamp,e.imageUrl,e.imageOrder)},e}(),hv=function(e){function t(t){return e.call(this,"IMPRESSION",t)||this}return h(t,e),t}(hy),hg=function(e){function t(t){return e.call(this,"CLOSE",t)||this}return h(t,e),t}(hy),hm=function(e){function t(t,r,n,i,o,s,a){var u=e.call(this,"ACTION",t)||this;return u.action=r,u.area=n,u.buttonText=i,u.imageUrl=o,u.imageOrder=s,u.elementId=a,u}return h(t,e),t}(hy),hE=function(e){function t(t,r,n){var i=e.call(this,"IMAGE_IMPRESSION",t)||this;return i.imageUrl=r,i.imageOrder=n,i}return h(t,e),t}(hy),hw=function(){function e(e,t,r){this.context=e,this.ui=t,this.status=r,this.hackleInAppMessage=tZ.toPublic(e.inAppMessage)}return e.prototype.handle=function(e,t){void 0===t&&(t=["TRACK","ACTION"]),this.ui.viewEventHandleProcessor.process(this,e,t)},e.prototype.canOpen=function(){return this.status.canOpen()},e.prototype.handleOpenStarted=function(){var e,t;this.status.current="OPENING",null==(t=null==(e=this.ui.inAppMessageListener)?void 0:e.beforeInAppMessageOpen)||t.call(e,this.hackleInAppMessage)},e.prototype.handleOpenCompleted=function(){var e,t;this.handle(hy.impression(this.ui.clock.currentMillis())),this.status.current="OPENED",null==(t=null==(e=this.ui.inAppMessageListener)?void 0:e.afterInAppMessageOpen)||t.call(e,this.hackleInAppMessage)},e.prototype.handleOpenFailed=function(e){c.log.error("Failed to open inAppMessageView: ".concat(e)),this.destroy()}
1,e.prototype.canClose=function(){return this.status.canClose()},e.prototype.handleCloseStarted=function(){var e,t;null==(t=null==(e=this.ui.inAppMessageListener)?void 0:e.beforeInAppMessageClose)||t.call(e,this.hackleInAppMessage),this.status.current="CLOSING"},e.prototype.handleCloseCompleted=function(){var e,t;this.handle(hy.close(this.ui.clock.currentMillis())),this.destroy(),null==(t=null==(e=this.ui.inAppMessageListener)?void 0:e.afterInAppMessageClose)||t.call(e,this.hackleInAppMessage)},e.prototype.handleCloseFailed=function(e){var t,r;c.log.error("Failed to close inAppMessageView: ".concat(e)),this.destroy(),null==(r=null==(t=this.ui.inAppMessageListener)?void 0:t.afterInAppMessageClose)||r.call(t,this.hackleInAppMessage)},e}(),hb=function(e){function t(r,n,i,o,s,a){var u=e.call(this,n,i,s)||this;return u.scriptLoader=r,u.context=n,u.ui=i,u.renderTypeResolver=o,u.status=s,u.lifecycleRegistry=a,u.container=null,u.renderer=null,u.resolveLifecycleEnd=function(e){var t;if(e instanceof CustomEvent&&"string"==typeof(t=e).detail.id&&["OPEN","CLOSE"].includes(t.detail.type)){var r=e.detail,n=r.id,i=r.type,o=u.lifecycleRegistry.getAndRemove(i,n);null==o||o()}},u.handleInAppMessageInteraction=function(e){if(e instanceof CustomEvent&&e.type===t.HACKLE_IAM_INTERACTION_EVENT_TYPE){var r=e.detail;u.handleInteraction(r)}},u}return h(t,e),t.prototype.open=function(){return d(this,void 0,void 0,function(){var e,r,n,i,o=this;return y(this,function(s){switch(s.label){case 0:if(!this.canOpen())return c.log.debug("InAppMessage is already opened. (key=".concat(this.context.inAppMessage.key,")")),[2];s.label=1;case 1:return s.trys.push([1,4,,5]),this.handleOpenStarted(),window.addEventListener(t.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.addEventListener(t.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE,this.resolveLifecycleEnd),[4,this.scriptLoader.load()];case 2:return s.sent(),(e=this.addContainer()).style.display="none",e.classList.add("".concat(t.CONTAINER_CLASS_NAME,"--loading")),r=window.HackleInAppMessageRenderer,this.renderer=new r.HackleInAppMessageRenderer(e),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 s.sent(),e.classList.remove("".concat(t.CONTAINER_CLASS_NAME,"--loading")),e.style.display="block",this.handleInAppMessageLifecycle("OPEN",function(){o.handleOpenCompleted()},function(){o.handleOpenFailed(Error("Timeout expired."))}),[3,5];case 4:return i=s.sent(),this.handleOpenFailed(i),[3,5];case 5:return[2]}})})},t.prototype.close=function(){var e=this;if(this.canClose())try{this.handleCloseStarted(),this.handleInAppMessageLifecycle("CLOSE",function(){e.handleCloseCompleted()},function(){e.handleCloseFailed(Error("Timeout expired."))})}catch(e){this.handleCloseFailed(e)}else c.log.debug("InAppMessage is already closed. (key=".concat(this.context.inAppMessage.key,")"))},t.prototype.handleInAppMessageLifecycle=function(e,r,n){var i=this,o=this.lifecycleRegistry.register(e,r);window.dispatchEvent(new CustomEvent(t.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE,{detail:{type:e,id:o}})),setTimeout(function(){void 0===i.lifecycleRegistry.getAndRemove(e,o)||n()},t.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT)},t.prototype.destroy=function(){var e;window.removeEventListener(t.HACKLE_IAM_INTERACTION_EVENT_TYPE,this.handleInAppMessageInteraction),window.removeEventListener(t.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"},t.prototype.addContainer=function(){if(!this.container){var e=document.createElement("div");e.classList.add(t.CONTAINER_CLASS_NAME),this.container=e}return this.container.parentNode||document.body.appendChild(this.container),this.container},t.prototype.removeContainer=function(){var e;this.container&&(null==(e=this.container.parentNode)||e.removeChild(this.container),this.container=null)},t.prototype.handleInteraction=function(e){var t=this.ui.interactionHandlerFactory.get(e);t&&t.handle(this,e)},t.HACKLE_IAM_INTERACTION_EVENT_TYPE="hackle-iam-interaction",t.HACKLE_IAM_LIFECYCLE_START_EVENT_TYPE="hackle-iam-lifecycle-start",t.HACKLE_IAM_LIFECYCLE_END_EVENT_TYPE="hackle-iam-lifecycle-end",t.CONTAINER_CLASS_NAME="hackle-iam",t.LIFE_CYCLE_EVENT_LISTEN_TIMEOUT=5e3,t}(hw),hT=function(){function e(){this.mobileOSRegex=/(iOS|Android|iPad|iPhone)/g,this.mobileDeviceRegex=/(mobile|phone|tablet)/g}return e.prototype.isMobileOS=function(e){var t=e.user.hackleProperties.osName;return"string"==typeof t&&!!t.match(this.mobileOSRegex)},e.prototype.isMobileDeviceType=function(e){var t=e.user.hackleProperties.deviceType;return"string"==typeof t&&!!t.match(this.mobileDeviceRegex)},e.prototype.resolve=function(e){return this.isMobileOS(e)||this.isMobileDeviceType(e)?"mobile":"pc"},e}(),hI=function(){function e(e){void 0===e&&(e="CLOSED"),this.current=e}return e.prototype.canOpen=function(){return"OPENED"!==this.current&&"OPENING"!==this.current}
1,e.prototype.canClose=function(){return"CLOSED"!==this.current&&"CLOSING"!==this.current},e}(),hA=function(){function e(){this.record={}}return e.prototype.resolveKey=function(e,t){return"".concat(e,"_").concat(t)},e.prototype.register=function(e,t){var r=i.v4(),n=this.resolveKey(e,r);return this.record[n]=t,r},e.prototype.getAndRemove=function(e,t){var r=this.resolveKey(e,t),n=this.record,i=n[r],o=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(n,["symbol"==typeof r?r:r+""]);return this.record=o,i},e}(),h_=function(){function e(e){this.scriptLoader=e,this.supportedDisplayTypes=["MODAL","BANNER","BOTTOM_SHEET","NONE"]}return e.create=function(t){return new e(t)},e.prototype.create=function(e,t){var r=new hT,n=new hI,i=new hA;switch(e.message.layout.displayType){case"HTML":throw Error("Invalid displayType[HTML] found. Can't create InAppMessageView. (key=".concat(e.inAppMessage.key,")"));case"MODAL":case"BANNER":case"BOTTOM_SHEET":return new hb(this.scriptLoader,e,t,r,n,i);case"NONE":return null}},e.prototype.supports=function(e){return this.supportedDisplayTypes.some(function(t){return t===e.message.layout.displayType})},e}(),hN=function(){function e(e){this.scriptUrl=e}return e.prototype.load=function(){return d(this,void 0,void 0,function(){var e;return y(this,function(t){switch(t.label){case 0:return window.HackleInAppMessageRenderer?[2]:(e=this.createScript(),document.head.appendChild(e),[4,this.waitForLoad(e)]);case 1:return[2,t.sent()]}})})},e.prototype.createScript=function(){var e=document.createElement("script");return e.type="text/javascript",e.async=!0,e.src=this.scriptUrl,e},e.prototype.waitForLoad=function(e){return new Promise(function(t,r){var n=function(){o(),t(e)},i=function(e){o(),r(e.message)},o=function(){e.removeEventListener("error",i),e.removeEventListener("load",n)};e.addEventListener("load",n),e.addEventListener("error",i)})},e}(),hO=function(){function e(e){this.targetMatcher=e}return e.prototype.matches=function(e,t,r){var n=this;return t.eventTrigger.rules.some(function(i){return n.ruleMatches(e,r,t,i)})},e.prototype.ruleMatches=function(e,t,r,n){if(t.event.key!==n.eventKey)return!1;var i=hM.of(e,t,r);return this.targetMatcher.anyMatches(i,pR.create(),n.targets)},e}(),hM=function(){function e(e,t,r,n){this.key=e,this.workspace=t,this.user=r,this.event=n}return e.of=function(t,r,n){return new e(new pC("IN_APP_MESSAGE",n.id),t,r.user,r)},e}(),hP=function(){function e(e){this.storage=e}return e.prototype.get=function(e){var t=this.storage.getItem(e.id.toString());return s.isNullOrUndefined(t)?[]:JSON.parse(t)},e.prototype.set=function(e,t){this.storage.setItem(e.id.toString(),JSON.stringify(t))},e}(),hS=function(){function e(e){this.handlers=e}return e.prototype.get=function(e){return this.handlers.find(function(t){return t.supports(e)})},e}(),hC=function(){function e(e){this.eventTracker=e}return e.prototype.handle=function(e,t){this.eventTracker.track(e.context,t)},e.prototype.supports=function(e){return"TRACK"===e},e}(),hR=function(){function e(e){this.viewEventActorFactory=e}return e.prototype.handle=function(e,t){var r=this.viewEventActorFactory.get(t);null==r||r.action(e,t)},e.prototype.supports=function(e){return"ACTION"===e},e}(),hU=function(){function e(e){this.handlerFactory=e}return e.prototype.process=function(e,t,r){var n=this;r.forEach(function(r){var i=n.handlerFactory.get(r);null==i||i.handle(e,t)})},e}(),hk=function(){function e(e){this.ruleMatcher=e}return e.prototype.matches=function(e,t,r){return this.ruleMatcher.matches(e,t,r)},e}(),hx=function(){function e(e){this.handlers=e}return e.prototype.get=function(e){return this.handlers.find(function(t){return t.supports(e)})},e}(),hD=function(){function e(){}return e.prototype.handle=function(e,t){e.close()},e.prototype.supports=function(e){return"CLOSE"===e.type},e}(),hL=function(){function e(e){this.handleProcessor=e}return e.prototype.handle=function(e,t){var r=this.eventOrNull(e,t);r&&this.handleProcessor.process(e,r,["TRACK","ACTION"])},e.prototype.eventOrNull=function(e,t){var r=e1.fromJson(t.action);return r?hy.action({timestamp:e.ui.clock.currentMillis(),action:r,area:t.area,buttonText:t.buttonText,imageUrl:t.imageUrl,imageOrder:t.imageOrder}):null},e.prototype.supports=function(e){return"ACTION"===e.type},e}(),hF=function(){function e(e){this.handleProcessor=e}return e.prototype.handle=function(e,t){var r=hy.imageImpression({timestamp:e.ui.clock.currentMillis(),imageUrl:t.imageUrl,imageOrder:t.imageOrder});this.handleProcessor.process(e,r,["TRACK","ACTION"])},e.prototype.supports=function(e){return"IMAGE_IMPRESSION"===e.type},e}(),hV=function(){function e(){}return e.prototype.open=function(e){window.location.href=e.href},e}(),hK=function(){function e(){}return e.prototype.open=function(e){window.open(e.href,"Hackle","resizable:true")},e}(),hB=function(){function e(){}return e.prototype.open=function(e){window.open(e.href)},e}(),hH=function(){function e(){}return e.prototype.open=function(e){window.location.replace(e)},e}
1(),hG={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},hj={current:void 0,referrer:void 0},hW=function(e,t){return Object.keys(hG).every(function(r){return e[r]===t[r]})},hY=function(){function e(e,t,r,n){this.storage=e,this.parser=t,this.core=r,this.userManager=n}return e.prototype.startNewCampaign=function(e,t,r){for(var n=f(f({},hG),t),i=new tJ,o=0,s=Object.entries(n);o<s.length;o++){var a=s[o],u=a[0],c=a[1];c?i.set(u,c):i.unset(u)}var p=i.build(),l=p.toEvent(),h=this.userManager.toHackleUser(e);this.core.track(l,h,r),this.userManager.updateUserProperties(p)},e.prototype.startNewCampaignIfNeeded=function(e,t){var r=this.storage.get(),n=this.parser.parse(),i=this.parser.parseDomain();null!==r&&(hW(n,hG)&&i.current===i.referrer||hW(r,n))||(this.storage.set(n),this.startNewCampaign(e,n,t))},e.prototype.onSessionEnded=function(e,t,r){},e.prototype.onSessionStarted=function(e,t,r){this.startNewCampaignIfNeeded(t,r)},e}(),hJ=function(){function e(e){this.storage=e}return e.prototype.get=function(){var e=this.storage.getItem("_hackle_mkt");return e?JSON.parse(e):null},e.prototype.set=function(e){this.storage.setItem("_hackle_mkt",JSON.stringify(e))},e}(),hz=function(){function e(e){this.search=e}return e.prototype.getQueryParam=function(e){return this.getQueryParams(function(){return!0})[e]||""},e.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],s=i[1];if(!e||e(o,s)){var a=t7.tryDecodeURIComponent(s);a&&(t[o]=a)}}return t},e}(),hq=function(){function e(){}return e.extractDomain=function(e){var t=this.DOMAIN_MATCH_REGEX,r=e.split("."),n=r[r.length-1];(n.length>4||"com"===n||"org"===n)&&(t=this.SIMPLE_DOMAIN_MATCH_REGEX);var i=e.match(t);return i?i[0]:e},e.DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,e.SIMPLE_DOMAIN_MATCH_REGEX=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,e}(),hX=function(){function e(e){this.pageManager=e}return e.prototype.parse=function(e){var t=this.params(e);return this.resolve(t)},e.prototype.params=function(t){return new hz(s.isNotNullOrUndefined(t)?t:this.pageManager.currentPage.queryParameter).getQueryParams(e.CAMPAIGN_QUERY_CONDITION)},e.prototype.resolve=function(e){return{utm_campaign:e[h$],utm_content:e[hZ],utm_id:e[hQ],utm_medium:e[h0],utm_source:e[h1],utm_term:e[h2],gclid:e[h4],fbclid:e[h3]}},e.prototype.parseDomain=function(){var e=this;return"u"<typeof window?hj:{current:hq.extractDomain(this.pageManager.currentPage.hostname),referrer:function(){var t=e.pageManager.currentPage.referrer;if(t){var r=new URL(t).hostname;return hq.extractDomain(r)}}()}},e.CAMPAIGN_QUERY_CONDITION=function(e,t){return tT.isNotEmptyString(t)},e}(),h$="utm_campaign",hZ="utm_content",hQ="utm_id",h0="utm_medium",h1="utm_source",h2="utm_term",h4="gclid",h3="fbclid",h5=function(){function e(e,t){var r=this;this.userEventEmitter=e,this.determiner=t,this.onEvent=function(e){var t=r.determiner.determineTargetExposureOrNull(e);t&&r.send(t)},this.initialize()}return e.prototype.initialize=function(){this.userEventEmitter.on("event",this.onEvent)},e.prototype.send=function(e){var t=e.experiment.key,r=e.variationKey,n="HACKLE-EXPERIMENT_".concat(t,"_V").concat(e.experiment.version,"-").concat(r);try{window.gtag("event","experience_impression",{exp_variant_string:n})}catch(e){c.log.error("Unexpected exception while sending an event to Google Analytics with gtag: ".concat(e))}},e}(),h6=function(){function e(e){this.workspaceFetcher=e}return e.prototype.determineTargetExposureOrNull=function(e){var t=this.workspaceFetcher.get();return t&&t.getAttributes().integration_ga_experiment&&pE.isExposureEvent(e)?"RUNNING"!==e.experiment.status||e.decisionReason!==D.TRAFFIC_ALLOCATED?null:e:null},e}(),h9={ALWAYS_NEW_SESSION:function(e,t){return!1},NULL_TO_USER_ID:function(e,t){return s.isNullOrUndefined(e.userId)&&s.isNotNullOrUndefined(t.userId)}},h8={user:void 0,debug:!1,log_disabled:!1,automaticPageTracking:!0,automaticRouteTracking:!0,pollingIntervalMillis:-1,exposureEventDedupIntervalMillis:6e4,sessionPolicy:{timeoutMillis:18e5,persist
1Condition:h9.ALWAYS_NEW_SESSION},autoOpenDevTool:!1,sdkUrl:"https://sdk-api.hackle.io",eventUrl:"https://event-api.hackle.io",monitoringUrl:"https://monitoring.hackle.io",enableMonitoring:!0,cdnUrl:"https://static.hackle.io",sameSiteCookie:"LAX",secureCookie:!1,optOutTracking:!1,SDK_NAME_HEADER:"javascript-sdk_browser",SDK_VERSION_HEADER:"11.56.0",IAM_RENDERER_VERSION_HEADER:"0.0.12"},h7=function(){function e(){}return e.config=function(t){return f(f(f({},h8),t),{automaticPageTracking:e.resolveAutomaticPageTracking(t),sessionPolicy:e.resolveSessionPolicy(t)})},e.resolveSessionPolicy=function(t){return(null==t?void 0:t.sessionPolicy)?{timeoutMillis:e.resolveTimeoutMillis(t.sessionPolicy.timeoutMillis),persistCondition:e.resolvePersistCondition(t.sessionPolicy.persistCondition)}:t&&s.isNotNullOrUndefined(t.sessionTimeoutMillis)?{timeoutMillis:e.resolveTimeoutMillis(t.sessionTimeoutMillis),persistCondition:h9.ALWAYS_NEW_SESSION}:h8.sessionPolicy},e.resolveTimeoutMillis=function(e){var t=null!=e?e:18e5;return!Number.isFinite(t)||t<=0?(c.log.warn("Session policy timeoutMillis is invalid. Setting to default value[30m]."),18e5):t},e.resolvePersistCondition=function(e){return"function"==typeof e?e:(s.isNotNullOrUndefined(e)&&c.log.warn("Session policy persistCondition is not a function. Using default (ALWAYS_NEW_SESSION)."),h9.ALWAYS_NEW_SESSION)},e.resolveAutomaticPageTracking=function(e){return"boolean"!=typeof(null==e?void 0:e.automaticPageTracking)&&"boolean"!=typeof(null==e?void 0:e.auto_track_page_view)?h8.automaticPageTracking:!!e.automaticPageTracking||!!e.auto_track_page_view},e.logging=function(e){c.initCounter(function(e){return tb.counter("log",{level:e})}),c.setLogLevel(u.INFO),e.log_disabled?c.setLogLevel(u.DISABLE):e.debug&&c.setLogLevel(u.DEBUG)},e.sdk=function(e,t){return c.log.debug("SDK key: ".concat(e)),e||c.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}},e.isBeaconSupported=function(){var e=!1;return"u">typeof window&&(e=window&&window.navigator&&!!window.navigator.sendBeacon&&!0)&&c.log.debug("support sendBeacon API"),e},e.pollingIntervalMillis=function(e){return void 0===e.pollingIntervalMillis||"number"!=typeof e.pollingIntervalMillis||e.pollingIntervalMillis<=0?-1:Math.max(e.pollingIntervalMillis,6e4)},e.dedupIntervalMillis=function(e){return void 0===e.exposureEventDedupIntervalMillis||"number"!=typeof e.exposureEventDedupIntervalMillis?6e4:e.exposureEventDedupIntervalMillis<1e3||e.exposureEventDedupIntervalMillis>36e5?(c.log.warn("Exposure event dedup interval is outside allowed range[1_000ms..3_600_000ms]. Setting to default value[1m]."),6e4):e.exposureEventDedupIntervalMillis},e}(),fe=function(){function e(){this.synchronizers=[]}return e.prototype.add=function(e){this.synchronizers.push(e)},e.prototype.sync=function(){return d(this,void 0,void 0,function(){var e=this;return y(this,function(t){switch(t.label){case 0:return[4,Promise.all(this.synchronizers.map(function(t){return e.safe(t.sync())}))];case 1:return t.sent(),[2]}})})},e.prototype.close=function(){return d(this,void 0,void 0,function(){var e=this;return y(this,function(t){switch(t.label){case 0:return[4,Promise.all(this.synchronizers.map(function(t){return e.safe(t.close())}))];case 1:return t.sent(),[2]}})})},e.prototype.safe=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e];case 1:return r.sent(),[3,3];case 2:return t=r.sent(),c.log.error("Failed to sync: ".concat(t)),[3,3];case 3:return[2]}})})},e}(),ft=function(){function e(e,t,r){this.delegate=e,this.scheduler=t,this.intervalMillis=r,this.pollingJob=null}return e.prototype.sync=function(){return d(this,void 0,void 0,function(){var e;return y(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.delegate.sync()];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),c.log.error("Failed to sync: ".concat(e)),[3,3];case 3:return[2]}})})},e.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()}))},e.prototype.stop=function(){var e;-1!==this.intervalMillis&&(null==(e=this.pollingJob)||e.cancel(),this.pollingJob=null)},e.prototype.close=function(){return d(this,void 0,void 0,function(){return y(this,function(e){switch(e.label){case 0:return this.stop(),[4,this.delegate.close()];case 1:return e.sent(),[2]}})})},e}(),fr=function(){function e(e){this.scheduleType=e}return e.prototype.schedule=function(e,t){var r=new fn(e,t);return r.start(),r},e.prototype.schedulePeriodically=function(e,t,r){var n;switch(this.scheduleType){case"setTimeout":n=new fi(e,t,r);break;case"setInterval":n=new fo(e,t,r)}return n.start(),n},e}(),fn=function(){function e(e,t){this.delayMillis=e,this.task=t,this.timeout=null}return e.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){try{e.task()}catch(e){c.log.error("Failed to run task: ".concat(e))}finally{e.timeout=null}},this.delayMillis)},e.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}(),fi=function(){function e(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null}return e.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){return e.run()},this.delayMillis)},e.prototype.run=function(){var e=this;try{this.task()}catch(e){c.log.error("Failed to run task: ".concat(e))}this.timeout=setTimeout(function(){return e.run()},this.intervalMillis)},e.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}(),fo=function(){function e(e,t,r){this.delayMillis=e,this.intervalMillis=t,this.task=r,this.timeout=null,this.interval=null}return e.prototype.start=function(){var e=this;this.timeout=setTimeout(function(){e.run(),e.interval=setInterval(function(){return e.run()},e.intervalMillis)},this.delayMillis)},e.prototype.run=function(){try{this.task()}catch(e){c.log.error("Failed to run task: ".concat(e))}},e.prototype.cancel=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.interval&&(clearInterval(this.interval),this.interval=null)},e}(),fs=function(){function e(e,t){this.url=e,this.transport=t}return e.prototype.fetchIfModified=function(e){return d(this,void 0,void 0,function(){var t,r;return y(this,function(n){switch(n.label){case 0:return t=this.createRequest(e),[4,this.execute(t)];case 1:return r=n.sent(),[2,this.handleResponse(r)]}})})},e.prototype.createRequest=function(e){var t=tI.builder().url(this.url).method("GET");return null!==e&&t.addHeader(tN.IF_MODIFIED_SINCE,e),t.build()},e.prototype.execute=function(e){return d(this,void 0,void 0,function(){var t,r,n;return y(this,function(i){switch(i.label){case 0:t=tn.start(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.transport.send(e)];case 2:return r=i.sent(),tS.record("get.workspace",t,r),[2,r];case 3:throw n=i.sent(),tS.record("get.workspace",t,null),n;case 4:return[2]}})})},e.prototype.handleResponse=function(e){if(e.isNotModified())return null;if(!e.isSuccessful())throw Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw Error("Response body is empty");return{config:JSON.parse(e.body),lastModified:e.headers.get(tN.LAST_MODIFIED)}},e}(),fa=function(){function e(e,t){this.url=e,this.transport=t}return e.prototype.fetch=function(e){return d(this,void 0,void 0,function(){var t,r;return y(this,function(n){switch(n.label){case 0:return t=this.createRequest(e),[4,this.execute(t)];case 1:return r=n.sent(),[2,this.handleResponse(r)]}})})},e.prototype.createRequest=function(e){var t={identifiers:j(e)},r=o.Base64.encodeURL(JSON.stringify(t));return tI.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",r).build()},e.prototype.execute=function(e){return d(this,void 0,void 0,function(){var t,r,n;return y(this,function(i){switch(i.label){case 0:t=tn.start(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.transport.send(e)];case 2:return r=i.sent(),tS.record("get.cohorts",t,r),[2,r];case 3:throw n=i.sent(),tS.record("get.cohorts",t,null),n;case 4:return[2]}})})},e.prototype.handleResponse=function(e){if(!e.isSuccessful())throw Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw Error("Response body is null");var t=JSON.parse(e.body);return lH.fromDto(t)},e}(),fu=function(){function e(e,t){this.url=e,this.transport=t}return e.prototype.fetch=function(e){return d(this,void 0,void 0,function(){var t,r;return y(this,function(n){switch(n.label){case 0:return t=this.createRequest(e),[4,this.execute(t)];case 1:return r=n.sent(),[2,this.handleResponse(r)]}})})},e.prototype.createRequest=function(e){var t={identifiers:j(e)},r=o.Base64.encodeURL(JSON.stringify(t));return tI.builder().url(this.url).method("GET").addHeader("X-HACKLE-USER",r).build()},e.prototype.execute=function(e){return d(this,void 0,void 0,function(){var t,r,n;return y(this,function(i){switch(i.label){case 0:t=tn.start(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.transport.send(e)];case 2:return r=i.sent(),tS.record("get.user-targets",t,r),[2,r];case 3:throw n=i.sent(),tS.record("get.user-targets",t,null),n;case 4:return[2]}})})},e.prototype.handleResponse=function(e){if(!e.isSuccessful())throw Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw Error("Response body is null");var t=JSON.parse(e.body);return l2.fromDto(t)},e}(),fc=function(){function e(e,t,r,n,i,o,s,u,c,p,l){this.experiments=a.associateBy(e,function(e){return e.key}),this.splitUrlExperiments=a.associateBy(t,function(e){return e.key}),this.featureFlags=a.associateBy(r,function(e){return e.key}),this.buckets=a.associateBy(n,function(e){return e.id}),this.eventTypes=a.associateBy(i,function(e){return e.key}),this.segments=a.associateBy(o,function(e){return e.key}),this.containers=a.associateBy(s,function(e){return e.id}),this.parameterConfigurations=a.associateBy(u,function(e){return e.id}),this.remoteConfigParameters=a.associateBy(c,function(e){return e.key}),this.inAppMessages=a.associateBy(p,function(e){return e.key}),this.attributes=l}return e.prototype.getExperiments=function(){return Array.from(this.experiments.values())},e.prototype.getSplitUrlExperiments=function(){return Array.from(this.splitUrlExperiments.values())},e.prototype.getFeatureFlags=function(){return Array.from(this.featureFlags.values())},e.prototype.getInAppMessages=function(){return Array.from(this.inAppMessages.values())},e.prototype.getExperimentOrNull=function(e){return this.experiments.get(e)},e.prototype.getFeatureFlagOrNull=function(e){return this.featureFlags.get(e)},e.prototype.getBucketOrNull=function(e){return this.buckets.get(e)},e.prototype.getEventTypeOrNull=function(e){return this.eventTypes.get(e)},e.prototype.getSegmentOrNull=function(e){return this.segments.get(e)},e.prototype.getContainerOrNull=function(e){return this.containers.get(e)},e.prototype.getParameterConfigurationOrNull=function(e){return this.parameterConfigurations.get(e)},e.prototype.getRemoteConfigParameterOrNull=function(e){return this.remoteConfigParameters.get(e)},e.prototype.getInAppMessageOrNull=function(e){return this.inAppMessages.get(e)},e.prototype.getAttributes=function(){return this.attributes},e.from=function(t){var r=t.parameterConfigurations.map(x.fromJson);return new e(a.mapNotNullOrUndefined(t.experiments,function(e){return F.fromJson("AB_TEST",e,r)}),a.mapNotNullOrUndefined(t.experiments,function(e){return F.fromJson("AB_TEST",e,r)}).filter(function(e){return"SPLIT_URL"===e.implementationType}),a.mapNotNullOrUndefined(t.featureFlags,function(e){return F.fromJson("FEATURE_FLAG",e,r)}),t.buckets.map(K.fromJson),t.events.map(H.fromJson),a.mapNotNullOrUndefined(t.segments,Q.fromJson),t.containers.map(ee.fromJson),r,a.mapNotNullOrUndefined(t.remoteConfigParameters,er.fromJson),a.mapNotNullOrUndefined(t.inAppMessages,eO.fromJson),t.workspace.attributes)},e}(),fp=function(){function e(e,t){this.workspaceConfigStorage=e,this.workspaceFetcher=t,this.workspace=null,this.lastModified=null;var r=this.workspaceConfigStorage.get();r&&this.setConfig(r)}return e.prototype.setConfig=function(e){this.setWorkspace(e),this.lastModified=e.lastModified},e.prototype.setWorkspace=function(e){try{this.workspace=fc.from(e.config)}catch(e){c.log.error("Failed to set workspace: ".concat(e))}},e.prototype.get=function(){return this.workspace},e.prototype.sync=function(){return d(this,void 0,void 0,function(){var e,t;return y(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.workspaceFetcher.fetchIfModified(this.lastModified)];case 1:return(e=r.sent())&&(this.setConfig(e),this.workspaceConfigStorage.set(e)),[3,3];case 2:return t=r.sent(),c.log.error("Failed to sync workspace: ".concat(t)),[3,3];case 3:return[2]}})})},e.prototype.close=function(){return d(this,void 0,void 0,function(){return y(this,function(e){return[2]})})},e}(),fl=function(){function e(e,t,r){this.transport=e,this.synchronousTransport=t,this.retryManager=r}return e.prototype.dispatch=function(e,t){var r=e.map(function(e){return e.toDto()});return t?this.dispatchEventsSynchronously(r):this.dispatchEvents(r)},e.prototype.dispatchEventsSynchronously=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){switch(r.label){case 0:return[4,this.retryManager.add(e)];case 1:return r.sent(),[4,this.synchronousTransport.send(e)];case 2:return(t=r.sent()).isSuccessful()||t.isClientError()?[4,this.retryManager.delete(e)]:[3,4];case 3:r.sent(),r.label=4;case 4:return[2]}})})},e.prototype.dispatchEvents=function(e){return d(this,void 0,void 0,function(){var t;return y(this,function(r){switch(r.label){case 0:return[4,this.transport.send(e)];case 1:return(t=r.sent()).isSuccessful()||t.isClientError()?[2]:[4,this.retryManager.add(e)];case 2:return r.sent(),[2]}})})},e}(),fh=function(){function e(e,t){this.url=e,this.transport=t}return e.prototype.send=function(e){var t=this.createRequest(e);return this.execute(t)},e.prototype.createRequest=function(e){var t,r,n,i=(t=[],r=[],n=[],e.forEach(function(e){e instanceof pE?pE.isExposureEvent(e)?t.push(e.toDto()):pE.isTrackEvent(e)?r.push(e.toDto()):pE.isRemoteConfigEvent(e)&&n.push(e.toDto()):pE.isExposureEventDto(e)?t.push(e):pE.isTrackEventDto(e)?r.push(e):pE.isRemoteConfigEventDto(e)&&n.push(e)}),{exposureEvents:t,trackEvents:r,remoteConfigEvents:n});return tI.builder().url(this.url).method("POST").addHeader("Content-Type","application/json").body(JSON.stringify(i)).build()},e.prototype.execute=function(e){return d(this,void 0,void 0,function(){var t,r,n;return y(this,function(i){switch(i.label){case 0:t=tn.start(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.transport.send(e)];case 2:return r=i.sent(),tS.record("post.events",t,r),[2,r];case 3:throw n=i.sent(),tS.record("post.events",t,null),n;case 4:return[2]}})})},e}(),ff=function(){function e(e,t){this.repository=e,this.transport=t}return e.prototype.add=function(e){return this.repository.add(e)},e.prototype.delete=function(e){return this.repository.delete(e)},e.prototype.flush=function(){return d(this,void 0,void 0,function(){var e,t;return y(this,function(r){switch(r.label){case 0:return[4,this.repository.read()];case 1:return 0===(e=r.sent()).length?[2]:[4,this.transport.send(e)];case 2:return(t=r.sent()).isSuccessful()||t.isClientError()?[4,this.delete(e)]:[3,4];case 3:r.sent(),r.label=4;case 4:return[2]}})})},e.prototype.onLifecycleChanged=function(e,t){switch(e){case"visible":case"pageshow":return void this.flush().catch(function(e){return c.log.warn("Failed to flush retry events: ".concat(e))});case"blur":case"focus":case"hidden":case"locationChange":case"pagehide":return}},e}(),fd=function(e){function t(t,r,n,i,o){var s=e.call(this)||this;return s.eventDispatcher=t,s.eventDispatchMaxSize=r,s.flushScheduler
1=n,s.flushIntervalMillis=i,s.optOutManager=o,s.queue=[],s.flushingJob=null,s}return h(t,e),t.prototype.process=function(e){this.optOutManager.isOptOutTracking||this.enqueue(e),this.emit("event",e)},t.prototype.enqueue=function(e){0===this.queue.length&&this.scheduleFlush(),this.queue.push(e),this.queue.length>=this.eventDispatchMaxSize&&this.flush()},t.prototype.scheduleFlush=function(){var e,t=this;null==(e=this.flushingJob)||e.cancel(),this.flushingJob=this.flushScheduler.schedule(this.flushIntervalMillis,function(){return t.flush()})},t.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 c.log.warn("Failed to dispatch events: ".concat(e))}),this.queue=[])},t.prototype.close=function(){this.flush(!0)},t}(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t}(function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){this.listeners[e]=(this.listeners[e]||[]).concat(t)},e.prototype.off=function(e,t){this.listeners[e]=(this.listeners[e]||[]).filter(function(e){return e!==t})},e.prototype.emit=function(e,t){(this.listeners[e]||[]).forEach(function(e){e(t)})},e}())),fy=function(){function e(e,t,r){this.sdk=e,this.clock=t,this.delegate=r}return e.prototype.send=function(e){var t=e.toBuilder().addHeader("X-HACKLE-SDK-KEY",this.sdk.key).addHeader("X-HACKLE-SDK-NAME",this.sdk.name).addHeader("X-HACKLE-SDK-VERSION",this.sdk.version).addHeader("X-HACKLE-SDK-TIME",this.clock.currentMillis().toString()).build();return this.delegate.send(t)},e}(),fv=function(){function e(){}return e.intercept=function(e,t){return t instanceof fy?t:new fy(e,_.instance,t)},e}(),fg=function(){function e(){}return e.create=function(){return new e},e.prototype.send=function(e){return new Promise(function(t,r){var n=new XMLHttpRequest;e.options.timeoutMillis&&(n.timeout=e.options.timeoutMillis),n.open(e.method,e.url),n.onreadystatechange=function(){if(n.readyState===n.DONE)if(0!==n.status)t(new t_(n.status,n.responseText,function(e){var t=tN.builder(),r=e.getAllResponseHeaders();if(!r)return t.build();for(var n=0,i=r.split("\r\n");n<i.length;n++){var o=i[n],s=o.indexOf(": ");if(s>0){var a=o.slice(0,s),u=o.slice(s+2);t.add(a,u)}}return t.build()}(n)));else r(Error("Request Error"))},function(e,t){var r=t.headers.raw();for(var n in r)r.hasOwnProperty(n)&&e.setRequestHeader(n,r[n])}(n,e),n.send(e.body)})},e}(),fm=function(){function e(){}return e.create=function(){return new e},e.prototype.send=function(e){var t=this;return new Promise(function(r,n){var i=!1;if("u">typeof window&&(i=window&&window.navigator&&!!window.navigator.sendBeacon&&!0),!i)throw Error("BeaconTransport not supported.");var o=t.createBody(e);if(!window.navigator.sendBeacon(e.url,o))throw Error("Failed to sendBeacon");r(t_.ok())})},e.prototype.createBody=function(e){var t=new URLSearchParams,r=e.headers.get("X-HACKLE-SDK-KEY");r&&t.append("sdkKey",r),t.append("sdkName",e.headers.getOrDefault("X-HACKLE-SDK-NAME","unknown")),t.append("sdkVersion",e.headers.getOrDefault("X-HACKLE-SDK-VERSION","unknown"));var n=e.headers.get("X-HACKLE-SDK-TIME");return n&&t.append("sdkTime",n),e.body&&t.append("data",e.body),t},e}(),fE=function(){function e(e,t,r,n){this.determiner=e,this.redirector=t,this.userManager=r,this.core=n}return e.prototype.onPageStarted=function(e,t){var r=this.userManager.resolve(),n=this.determiner.determineOrNull(r);n&&(this.core.flush(!0),this.redirector.redirect(n))},e.prototype.onPageEnded=function(e,t){},e}(),fw=function(e,t,r,n){this.workspace=e,this.experiment=t,this.decision=r,this.user=n},fb=function(){function e(e,t,r,n){this.workspaceFetcher=e,this.splitUrlMatcher=t,this.splitUrlRedirectedCookieStorage=r,this.core=n}return e.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=n[r];if(this.splitUrlMatcher.matches(t,i,e)){var o=this.core.experiment(i.key,e,"A");return new fw(t,i,o,e)}}return null},e}(),fT=function(){function e(e){this.targetMatcher=e}return e.prototype.matches=function(e,t,r){if("SPLIT_URL"!==t.implementationType||!t.splitUrlTargets)return!1;var n=t.splitUrlTargets,i=fI.of(e,r);return!(n.excludeTargets.length>0&&this.targetMatcher.anyMatches(i,pR.create(),n.excludeTargets))&&n.includeTargets.length>0&&this.targetMatcher.anyMatches(i,pR.create(),n.includeTargets)},e}(),fI=function(){function e(e,t,r){this.key=e,this.user=t,this.workspace=r}return e.of=function(t,r){return new e(new pC("SPLIT_URL",i.v4()),r,t)},e}(),fA=function(){function e(e,t,r,n){this.urlResolver=e,this.urlHandler=t,this.splitUrlRedirectedCookieStorage=r,this.initializeEventDispatcher=n}return e.prototype.redirect=function(e){var t=this.urlResolver.resolveOrNull(e);t&&(this.initializeEventDispatcher.setNeedDispatch(!1),this.splitUrlRedirectedCookieStorage.setRedirected(!0),this.urlHandler.open(t))},e}(),f_=function(){function e(e){this.campaignParser=e}return e.prototype.resolveOrNull=function(t){try{var r=JSON.parse(t.decision.get(e.SPLIT_URL_CONFIG_KEY,"")),n=e7.fromDto(r);return n.needRedirect?this.resolveByRedirectType(n.redirectType,n.redirectUrl,t):null}catch(e){return null}},e.prototype.resolveByRedirectType=function(e,r,n){return r&&e===t.SplitUrlRedirectType.MANUAL?this.resolveManualRedirectUrl(r,n):null},e.prototype.resolveManualRedirectUrl=function(e,t){var r=t7.tryParse(e);return r?this.decorateCampaign(r,t):null},e.prototype.decorateCampaign=function(e,t){var r=t.user.hackleProperties.queryParameter;return tT.isNotEmptyString(r)?function(e,t){for(var r=0,n=Object.entries(e);r<n.length;r++){var i=n[r],o=i[0],s=i[1];tT.isNotEmptyString(s)&&t.searchParams.set(o,s)}return t}(this.campaignParser.parse(r),e):e},e.SPLIT_URL_CONFIG_KEY="redirectUrl",e}(),fN=function(){function e(e,t,r){this.storage=e,this.cookieKey=t,this.cookieStorageOptions=r}return e.prototype.alreadyRedirected=function(){try{var e=this.storage.getItem(this.cookieKey);return!s.isNullOrUndefined(e)&&!!JSON.parse(e)}catch(e){return!1}},e.prototype.clear=function(){this.storage.removeItem(this.cookieKey)},e.prototype.setRedirected=function(e){this.storage.setItem(this.cookieKey,String(e),this.cookieStorageOptions)},e}(),fO=function(){function e(){this.needDispatch=!0}return e.prototype.setNeedDispatch=function(e){this.needDispatch=e},e.prototype.dispatchDoneEventIfNeeded=function(){this.needDispatch&&window.dispatchEvent(new CustomEvent(e.HACKLE_INITIALIZE_DONE_EVENT_TYPE))},e.HACKLE_INITIALIZE_DONE_EVENT_TYPE="hackle-initialize-done",e}(),fM=function(){function e(e,t){this.sdk=e,this.storage=t}return e.prototype.get=function(){var e=this.storage.getItem("hackle-workspace-config");if(s.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}},e.prototype.set=function(e){var t=f(f({},e),{version:this.sdk.version});this.storage.setItem("hackle-workspace-config",JSON.stringify(t))},e.prototype.clear=function(){this.storage.removeItem("hackle-workspace-config")},e}(),fP=c.log,fS=function(){function e(e){void 0===e&&(e=_.instance),this.clock=e,this.listeners=[],this._initialized=!1}return e.prototype.install=function(t){void 0===t&&(t=null);try{var r,n,i=this.changeLifecycle.bind(this);window.addEventListener("pageshow",function(){return i("pageshow")}),window.addEventListener("pagehide",function(){return i("pagehide")}),document.addEventListener("visibilitychange",function(){return i(document.visibilityState)}),window.addEventListener("blur",function(){return i("blur")}),window.addEventListener("focus",function(){return i("focus")}),e.isSafariBrowser(t)&&window.addEventListener("beforeunload",function(){return i("hidden")}),history.pushState=(n=history.pushState,function(){try{var e=n.apply(history,arguments);return i("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&fP.error(e)}}),history.replaceState=(r=history.replaceState,function(){try{var e=r.apply(history,arguments);return i("locationChange"),e}catch(e){(e instanceof Error||"string"==typeof e)&&fP.error(e)}}),window.addEventListener("popstate",function(){try{i("locationChange")}catch(e){(e instanceof Error||"string"==typeof e)&&fP.error(e)}})}catch(e){(e instanceof Error||"string"==typeof e)&&fP.error(e)}},e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.initialize=function(){this._initialized=!0,this.changeLifecycle("pageshow")},e.prototype.changeLifecycle=function(e){this._initialized&&this.publish(e)},e.prototype.publish=function(e){var t=this.clock.currentMillis();
1this.listeners.forEach(function(r){r.onLifecycleChanged(e,t)})},e.isSafariBrowser=function(e){return!s.isNullOrUndefined(e)&&e.toLowerCase().includes("safari")},e}(),fC=function(){function e(e){this.limiter=e}return e.create=function(t,r,n){return void 0===n&&(n=_.instance),new e(new fR(n,t,r))},e.prototype.execute=function(e,t){return this.limiter.tryAcquire()?e():t()},e}(),fR=function(){function e(e,t,r){this.clock=e,this.intervalMillis=t,this.limit=r,this.currentScope=null}return e.prototype.tryAcquire=function(){var e=this.clock.currentMillis();return this.refreshScopeIfNeeded(e).tryAcquire()},e.prototype.refreshScopeIfNeeded=function(e){return(null==this.currentScope||this.currentScope.isExpired(e))&&(this.currentScope=new fU(e+this.intervalMillis,this.limit)),this.currentScope},e}(),fU=function(){function e(e,t){this.expirationTime=e,this.token=t}return e.prototype.isExpired=function(e){return this.expirationTime<e},e.prototype.tryAcquire=function(){return this.token>0&&(this.token-=1,!0)},e}(),fk=function(){function e(e){this.determiners=e}return e.prototype.isDedupTarget=function(e){var t=this.determiners.find(function(t){return t.supports(e)});return!!t&&t.isDedupTarget(e)},e}(),fx=function(){function e(e,t){this.dedupIntervalMillis=e,this.clock=t,this.cache={},this.currentUser=null}return e.prototype.isDedupTarget=function(e){if(-1===this.dedupIntervalMillis)return!1;E.isEquals(e.user.identifiers,null==(t=this.currentUser)?void 0:t.identifiers)||(this.currentUser=e.user,this.cache={});var t,r=this.cacheKey(e),n=this.clock.currentMillis(),i=this.cache[r];return void 0!==i&&n-i<=this.dedupIntervalMillis||(this.cache[r]=n,!1)},e}(),fD=function(e){function t(t,r){return void 0===r&&(r=_.instance),e.call(this,t,r)||this}return h(t,e),t.prototype.supports=function(e){return pE.isRemoteConfigEvent(e)},t.prototype.cacheKey=function(e){return[e.parameter.id,e.valueId,e.decisionReason].join("-")},t}(fx),fL=function(e){function t(t,r){return void 0===r&&(r=_.instance),e.call(this,t,r)||this}return h(t,e),t.prototype.supports=function(e){return pE.isExposureEvent(e)},t.prototype.cacheKey=function(e){return[e.experiment.id,e.variationId,e.variationKey,e.decisionReason].join("-")},t}(fx),fF=c.log,fV=function(){function e(e,t){this.core=e,this.userManager=t}return e.prototype.onPageStarted=function(e,t){this.track(e,t)},e.prototype.onPageEnded=function(e,t){},e.prototype.track=function(t,r){fF.debug("tracking page view");var n,i={key:e.PAGE_VIEW_EVENT_KEY,properties:f(f({},t.properties),((n={})[e.PAGE_NAME_PROPERTY_KEY]=t.pageName,n))};this.core.track(i,this.userManager.resolve(),r)},e.PAGE_VIEW_EVENT_KEY="$page_view",e.PAGE_NAME_PROPERTY_KEY="$page_name",e}(),fK=function(){function e(){this.listeners=[],this._currentPage=null}return Object.defineProperty(e.prototype,"currentPage",{get:function(){var e;return null!=(e=this._currentPage)?e:tX.createWithCurrentPage()},enumerable:!1,configurable:!0}),e.prototype.setCurrentPage=function(e){this.updatePage(e,_.instance.currentMillis(),!0)},e.prototype.updatePage=function(e,t,r){void 0===r&&(r=!1);var n=this._currentPage;!r&&n&&e.isEquals(n)||(n&&this.publishEnd(n,t),this._currentPage=e,this.publishStart(e,t))},e.prototype.publishStart=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageStarted(e,t)},e.prototype.publishEnd=function(e,t){for(var r=0,n=this.listeners;r<n.length;r++)n[r].onPageEnded(e,t)},e.prototype.onLifecycleChanged=function(e,t){switch(e){case"pageshow":case"locationChange":var r=tX.createWithCurrentPage();return this.updatePage(r,t);case"visible":case"pagehide":case"blur":case"focus":case"hidden":return}},e.prototype.addListener=function(e){this.listeners.push(e)},e}(),fB=c.log,fH=function(){function e(e,t){this.pageManager=e,this.minimumEngagementDurationMillis=t,this.listeners=[],this._lastEngagementTime=null}return Object.defineProperty(e.prototype,"lastEngagementTime",{get:function(){return this._lastEngagementTime},enumerable:!1,configurable:!0}),e.prototype.startEngagement=function(e){fB.debug("startEngagement timestamp:".concat(e,", page:").concat(this.pageManager.currentPage.url)),this._lastEngagementTime=e},e.prototype.endEngagement=function(e,t){if(!s.isNullOrUndefined(this._lastEngagementTime)){var r=this._lastEngagementTime;this._lastEngagementTime=null;var n=t-r;n<this.minimumEngagementDurationMillis||this.publish({page:e,durationMillis:n},t)}},e.prototype.publish=function(e,t){fB.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)},e.prototype.onPageStarted=function(e,t){this.startEngagement(t)},e.prototype.onPageEnded=function(e,t){this.endEngagement(e,t)},e.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}},e.prototype.addListener=function(e){this.listeners.push(e)},e}(),fG=function(){function e(e,t){this.core=e,this.userManager=t}return e.prototype.onEngagement=function(t,r){var n,i={key:e.ENGAGEMENT_EVENT_KEY,properties:f(f({},t.page.properties),((n={}
vendor: 2,783 bytes, line 1
1)[fV.PAGE_NAME_PROPERTY_KEY]=t.page.pageName,n[e.ENGAGEMENT_TIME_PROPERTY_KEY]=t.durationMillis,n))};this.core.track(i,this.userManager.resolve(),r)},e.ENGAGEMENT_EVENT_KEY="$engagement",e.ENGAGEMENT_TIME_PROPERTY_KEY="$engagement_time_ms",e}(),fj=function(){function e(e,t){this.core=e,this.userManager=t}return e.prototype.setPhoneNumber=function(t,r){var n=(new tJ).set(e.PHONE_NUMBER_PROPERTY_KEY,t.getValue()).build().toSecuredEvent();this.track(n,r)},e.prototype.unsetPhoneNumber=function(t){var r=(new tJ).unset(e.PHONE_NUMBER_PROPERTY_KEY).build().toSecuredEvent();this.track(r,t)},e.prototype.track=function(e,t){var r=this.userManager.resolve();this.core.track(e,r,t)},e.PHONE_NUMBER_PROPERTY_KEY="$phone_number",e}(),fW=function(){function e(){}return e.prototype.getBrowserProperties=function(e){return lZ.generate(window,null!=e?e:tX.createWithCurrentPage())},e}(),fY=function(){function e(e,t,r){this.schedule=e,this.scheduleType=t,this.requestedAt=r}return Object.defineProperty(e.prototype,"delayMillis",{get:function(){return this.schedule.time.deliverAt-this.requestedAt},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"InAppMessageScheduleRequest(scheduleType=".concat(this.scheduleType,", requestedAt=").concat(this.requestedAt,")")},e}(),fJ=function(){function e(e,t,r,n,i,o){this.dispatchId=e,this.inAppMessageKey=t,this.identifiers=r,this.time=n,this.reason=i,this.eventBasedContext=o}return e.prototype.toRequest=function(e,t){return new fY(this,e,t)},e.create=function(t){return new e(i.v4(),t.inAppMessage.key,t.event.user.identifiers,fz.of(t.inAppMessage,t.event.timestamp),t.reason,new fq(t.event.insertId,t.event.event))},e.fromDelayStorageEntity=function(t,r){return new e(t.schedule.dispatchId,t.schedule.inAppMessageKey,t.schedule.identifiers,new fz(r,t.schedule.time.deliverAt),t.schedule.reason,t.schedule.eventBasedContext)},e}(),fz=function(){function e(e,t){this.startedAt=e,this.deliverAt=t}return e.prototype.delayMillis=function(e){return this.deliverAt-e},e.of=function(t,r){return new e(r,t.eventTrigger.delay.deliverAt(r))},e}(),fq=function(e,t){this.insertId=e,this.event=t},fX=function(){function e(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()}return e.prototype.initialize=function(){var e=this;this.userEventEmitter.on("event",function(t){e.onEvent(t)})},e.prototype.destroy=function(){var e=this;this.userEventEmitter.off("event",function(t){e.onEvent(t)})},e.prototype.onEvent=function(e){this.triggerProcessor.process(e)},e.prototype.onUserUpdated=function(e,t,r){var n=j(e),i=j(t);this.resetProcessor.process({identifiers:n},{identifiers:i})},e.prototype.loadDelaySchedule=function(){var e=this;
1this.delayStorage.values().forEach(function(t){var r=e.clock.currentMillis(),n=fJ.fromDelayStorageEntity(t,r).toRequest("STORED",r);e.scheduleProcessor.process(n)})},e}(),f$=function(e){function t(t){return e.call(this,t)||this}return h(t,e),t.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},t}(lm),fZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t}(pN),fQ=function(){function e(e,t,r,n,i){this.request=e,this.reason=t,this.targetEvaluations=r,this.message=n,this.properties=i}return Object.defineProperty(e.prototype,"inAppMessage",{get:function(){return this.request.inAppMessage},enumerable:!1,configurable:!0}),e.of=function(t,r,n){return new e(t,D.IN_APP_MESSAGE_TARGET,r.targetEvaluations,n,r.properties)},e}(),f0=function(){function e(){}return Object.defineProperty(e.prototype,"key",{get:function(){return new pC("IN_APP_MESSAGE",this.inAppMessage.id)},enumerable:!1,configurable:!0}),e}(),f1=function(e){function t(t,r,n){var i=e.call(this)||this;return i.workspace=t,i.user=r,i.inAppMessage=n,i}return h(t,e),t.of=function(e){return e instanceof t?e:new t(e.workspace,e.user,e.inAppMessage)},t.prototype.toString=function(){return"InAppMessageLayoutRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")},t}(f0),f2=function(e){function t(t,r,n){var i=e.call(this)||this;return i.experimentEvaluator=t,i.selector=r,i.eventRecorder=n,i}return h(t,e),t.prototype.supports=function(e){return e instanceof f1},t.prototype.evaluateInternal=function(e,t){var r=e.inAppMessage.messageContext.experimentContext,n=null!==r?this.evaluateExperiment(e,t,r):this.evaluateDefault(e,t);return fQ.of(e,t,n)},t.prototype.evaluateDefault=function(e,t){var r=f4(e.inAppMessage.messageContext.defaultLang);return this.selector.select(e.inAppMessage,r)},t.prototype.evaluateExperiment=function(e,t,r){var n,i=s.requiredNotNullOrUndefined(e.workspace.getExperimentOrNull(r.key),function(){return"Experiment[key=".concat(r.key,"]")}),o=this.experimentEvaluator.evaluate(e,t,i),a=f4(e.inAppMessage.messageContext.defaultLang),u=(n=o.variationKey,function(e){return n===e.variationKey});return this.selector.select(e.inAppMessage,function(e){return a(e)&&u(e)})},t.prototype.record=function(e,t){this.eventRecorder.record(e,t)},t}(fZ);function f4(e){return function(t){return e===t.lang}}var f3,f5=function(){function e(){}return e.prototype.select=function(e,t){var r=e.messageContext.messages.find(t);return s.requiredNotNullOrUndefined(r,function(){return"InAppMessage must be decided [".concat(e.id,"]")})},e}(),f6=function(){function e(e){this.storage=e,this.STORE_MAX_SIZE=100}return e.prototype.record=function(e,t){if(e.reason!==D.OVERRIDDEN)try{this.doRecord(e)}catch(e){c.log.error("Failed to record InAppMessageImpression: ".concat(e))}},e.prototype.doRecord=function(e){var t=this.storage.get(e.inAppMessage),r={identifiers:e.user.identifiers,timestamp:e.requestedAt},n=v(v([],t,!0),[r],!1),i=n.length>this.STORE_MAX_SIZE?n.length-this.STORE_MAX_SIZE:0,o=n.slice(i);this.storage.set(e.inAppMessage,o)},e}(),f9=function(){function e(e,t){this.dispatchId=e,this.context=t}return e.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,")")},e.of=function(t,r){return new e(t.dispatchId,r)},e}(),f8=function(){function e(e,t,r,n,i,o,s){this.dispatchId=e,this.inAppMessage=t,this.message=r,this.user=n,this.decisionReason=i,this.properties=o,this.triggerEvent=s}return e.prototype.toString=function(){return"InAppMessagePresentationContext(dispatchId=".concat(this.dispatchId,", inAppMessage=").concat(this.inAppMessage,", message=").concat(this.message,", triggerEvent=").concat(this.triggerEvent.key,")")},e.of=function(t){return new e(t.dispatchId,t.inAppMessage,t.message,t.user,t.reason,t.properties,t.triggerEvent)},e}(),f7=function(){function e(e,t){this.presenter=e,this.recorder=t}return e.prototype.process=function(e){c.log.debug("InAppMessage Present Request: ".concat(e));var t=this.present(e);return this.recorder.record(e,t),c.log.debug("InAppMessage Present Response: ".concat(t)),t},e.prototype.present=function(e){var t=f8.of(e);return this.presenter.present(t),f9.of(e,t)},e}(),de=function(){function e(){}return e.prototype.isIdentifierChanged=function(e,t){var r=e[G.USER],n=t[G.USER];if(void 0!==r&&void 0!==n)return r!==n;var i=e[G.DEVICE],o=t[G.DEVICE];return void 0!==i&&void 0!==o&&i!==o},e}
1(),dt=function(){function e(e,t){this.clock=e,this.scheduler=t}return Object.defineProperty(e.prototype,"listener",{get:function(){return this._listener},set:function(e){this._listener=e},enumerable:!1,configurable:!0}),e.prototype.schedule=function(e){var t=this,r=this.scheduler.schedule(e.delayMillis,function(){return t.delayCommand(e)});return new dr(e,r)},e.prototype.delayCommand=function(e){var t,r=this.clock.currentMillis(),n=e.schedule.toRequest("DELAYED",r);null==(t=this.listener)||t.onSchedule(n)},e}(),dr=function(){function e(e,t){this.delay=e,this.job=t}return e.prototype.cancel=function(){this.job.cancel(),c.log.debug("InAppMessageDelay cancelled: ".concat(this.delay))},e}(),dn=function(){function e(e,t){this.schedule=e,this.requestedAt=t}return Object.defineProperty(e.prototype,"delayMillis",{get:function(){return this.schedule.time.delayMillis(this.requestedAt)},enumerable:!1,configurable:!0}),e.from=function(t){return new e(t.schedule,t.requestedAt)},e.prototype.toString=function(){return"InAppMessageDelay(dispatchId=".concat(this.schedule.dispatchId,", requestedAt=").concat(this.requestedAt,")")},e}(),di=function(){function e(e,t,r){this.scheduler=e,this.tasks=t,this.storage=r}return e.prototype.registerAndDelay=function(e){return this.storage.set(e.schedule.inAppMessageKey,e.schedule.dispatchId,dn.from(e)),this.delay(e)},e.prototype.delay=function(e){var t=dn.from(e),r=this.scheduler.schedule(t);return this.tasks.set(t.schedule.dispatchId,r),c.log.debug("InAppMessage Delay started: dispatchId=".concat(e.schedule.dispatchId)),t},e.prototype.delete=function(e){var t,r,n=null!=(r=null==(t=this.tasks.get(e.schedule.dispatchId))?void 0:t.delay)?r:null;return n&&c.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),n},e.prototype.cancelAll=function(){var e=Array.from(this.tasks.values());return e.forEach(function(e){return e.cancel()}),this.tasks.clear(),this.storage.clear(),c.log.debug("InAppMessage Delay clear."),e.map(function(e){return e.delay})},e}(),ds=function(){function e(e,t,r,n){this.dispatchId=e,this.inAppMessageKey=t,this.code=r,this.presentResponse=n}return e.prototype.toString=function(){return"InAppMessageDeliverResponse(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", code=").concat(this.code,")")},e.of=function(t,r,n){return void 0===n&&(n=null),new e(t.dispatchId,t.inAppMessageKey,r,n)},e}(),da=function(){function e(e,t,r,n,i,o,s,a){this.dispatchId=e,this.inAppMessage=t,this.message=r,this.user=n,this.requestedAt=i,this.reason=o,this.properties=s,this.triggerEvent=a}return e.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,", triggerEvent=").concat(this.triggerEvent.key,")")},e.of=function(t,r,n,i,o){return new e(t.dispatchId,r,o.message,n,t.requestedAt,i.reason,f(f({},t.properties),o.properties),t.triggerEvent)},e}(),du=function(e){function t(t,r,n,i){var o=e.call(this)||this;return o.workspace=t,o.user=r,o.inAppMessage=n,o.timestamp=i,o}return h(t,e),t.prototype.toString=function(){return"InAppMessageEligibilityRequest(type=".concat(this.key.type,", key=").concat(this.inAppMessage.key,")")},t}(f0),dc=function(){function e(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}return e.prototype.response=function(e){try{return this.deliver(e)}catch(t){return c.log.error("Failed to process InAppMessageDeliver: ".concat(t)),ds.of(e,"EXCEPTION")}},e.prototype.process=function(e){c.log.debug("InAppMessage Deliver Request: ".concat(e));var t=this.response(e);return c.log.debug("InAppMessage Deliver Response: ".concat(t)),t},e.prototype.deliver=function(e){var t=this.workspaceFetcher.get();if(!t)return ds.of(e,"WORKSPACE_NOT_FOUND");var r=t.getInAppMessageOrNull(e.inAppMessageKey);if(!r)return ds.of(e,"IN_APP_MESSAGE_NOT_FOUND");var n=this.userDecorator.decorate(this.userManager.resolve());if(this.identifierChecker.isIdentifierChanged(e.identifiers,n.identifiers))return ds.of(e,"IDENTIFIER_CHANGED");
1var i=this.layoutResolver.resolve(t,r,n),o=new du(t,n,r,e.requestedAt),s=this.evaluateProcessor.process("DELIVER",o);if(!s.isEligible)return ds.of(e,"INELIGIBLE");var a=da.of(e,r,n,s,i),u=this.presentProcessor.process(a);return ds.of(e,"PRESENT",u)},e}(),dp=function(){function e(e){this.schedulers=e}return e.prototype.get=function(e){return s.requiredNotNullOrUndefined(this.schedulers.find(function(t){return t.supports(e)}),function(){return"Unsupported InAppMessageScheduleType[".concat(e,"]")})},e}(),dl=function(){function e(e,t,r,n,i){this.dispatchId=e,this.inAppMessageKey=t,this.code=r,this.deliverResponse=n,this.delay=i}return e.prototype.toString=function(){return"InAppMessageScheduleResponse(dispatchId=".concat(this.dispatchId,", inAppMessageKey=").concat(this.inAppMessageKey,", code=").concat(this.code,")")},e.of=function(t,r,n,i){return void 0===n&&(n=null),void 0===i&&(i=null),new e(t.schedule.dispatchId,t.schedule.inAppMessageKey,r,n,i)},e}(),dh=function(){function e(e,t,r,n,i,o,s){this.dispatchId=e,this.inAppMessageKey=t,this.identifiers=r,this.requestedAt=n,this.reason=i,this.properties=o,this.triggerEvent=s}return e.of=function(t){var r=(new tk).add("$trigger_event_insert_id",t.schedule.eventBasedContext.insertId).build();return new e(t.schedule.dispatchId,t.schedule.inAppMessageKey,t.schedule.identifiers,t.requestedAt,t.schedule.reason,s.fromMap(r),t.schedule.eventBasedContext.event)},e.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,", triggerEvent=").concat(this.triggerEvent.key,")")},e}(),df=function(){function e(){}return e.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)}},e}(),dd=function(e){function t(t,r){var n=e.call(this)||this;return n.deliverProcessor=t,n.delayManager=r,n}return h(t,e),t.prototype.supports=function(e){return"DELAYED"===e},t.prototype.deliver=function(e){var t=this.delayManager.delete(e);s.requiredNotNullOrUndefined(t,function(){return"InAppMessageDelay not found (inAppMessageKey=".concat(e.schedule.inAppMessageKey,")")});var r=dh.of(e),n=this.deliverProcessor.process(r);return dl.of(e,"DELIVER",n)},t.prototype.delay=function(e){var t=this.delayManager.delay(e);return dl.of(e,"DELAY",null,t)},t.prototype.ignore=function(e){var t=this.delayManager.delete(e);return dl.of(e,"IGNORE",null,t)},t}(df),dy=function(e){function t(t,r){var n=e.call(this)||this;return n.deliverProcessor=t,n.delayManager=r,n}return h(t,e),t.prototype.supports=function(e){return"TRIGGERED"===e},t.prototype.deliver=function(e){var t=dh.of(e),r=this.deliverProcessor.process(t);return dl.of(e,"DELIVER",r)},t.prototype.delay=function(e){var t=this.delayManager.registerAndDelay(e);return dl.of(e,"DELAY",null,t)},t.prototype.ignore=function(e){return dl.of(e,"IGNORE")},t}(df),dv=function(){function e(e,t){this.actionDeterminer=e,this.schedulerFactory=t}return e.prototype.process=function(e){c.log.debug("InAppMessage Schedule Request: ".concat(e));var t=this.schedule(e);return c.log.debug("InAppMessage Schedule Response: ".concat(t)),t},e.prototype.schedule=function(e){try{var t=this.actionDeterminer.determine(e);return this.schedulerFactory.get(e.scheduleType).schedule(t,e)}catch(t){return c.log.error("Failed to process InAppMessageSchedule: ".concat(t)),dl.of(e,"EXCEPTION")}},e.prototype.onSchedule=function(e){this.process(e)},e}(),dg=function(){function e(){this.DELIVER_DURATION_THRESHOLD_MILLIS=-1e4}return e.prototype.shouldIgnoreRequest=function(e){return"STORED"===e.scheduleType&&e.delayMillis<0},e.prototype.determineAction=function(e){var t=e.delayMillis;if(t>0)return"DELAY";if(t>=this.DELIVER_DURATION_THRESHOLD_MILLIS)return"DELIVER";if(t<this.DELIVER_DURATION_THRESHOLD_MILLIS)return"IGNORE";throw Error("InAppMessageScheduleAction cannot be determined (key=".concat(e.schedule.inAppMessageKey,")"))},e.prototype.determine=function(e){if(this.shouldIgnoreRequest(e))return"IGNORE";var t=this.determineAction(e);return c.log.debug("InAppMessage ScheduleAction determined: action=".concat(t,", dispatchId=").concat(e.schedule.dispatchId)),t},e}(),dm=function(){function e(e,t,r){this.inAppMessage=e,this.reason=t,this.event=r}return e.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,")")},e}(),dE=function(){function e(e,t,r){this.workspaceFetcher=e,this.eventMatcher=t,this.evaluateProcessor=r}return e.prototype.determine=function(e){var t=pE.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 dm(o,s.reason,t)}}return null},e.prototype.evaluate=function(e,t,r){var n=new du(e,r.user,t,r.timestamp);return this.evaluateProcessor.process("TRIGGER",n)},e}(),dw=function(){function e(e){this.scheduleProcessor=e}return e.prototype.handle=function(e){var t=fJ.create(e).toRequest("TRIGGERED",e.event.timestamp);this.scheduleProcessor.process(t)},e}(),db=function(){function e(e,t){this.determiner=e,this.handler=t}return e.prototype.process=function(e){try{var t=this.determiner.determine(e);if(!t)return;c.log.debug("InAppMessage triggered: ".concat(t)),this.handler.handle(t)}catch(e){c.log.error("Failed to process InAppMessage event trigger: ".concat(e))}},e}(),dT=function(){function e(e,t){this.identifierChecker=e,this.delayManager=t}return e.prototype.process=function(e,t){try{this.identifierChecker.isIdentifierChanged(j(e),j(t))&&this.delayManager.cancelAll()}catch(e){c.log.error("Failed to reset InAppMessage: ".concat(e))}},e}(),dI=function(){function e(e){this.storage=e,this.storageKey="iam-delay"}return e.prototype.getDelayStorageItem=function(){var e=this.storage.getItem(this.storageKey);if(s.isNullOrUndefined(e))return null;try{return JSON.parse(e)}
1catch(e){return c.log.warn("Failed to get delay storage item: ".concat(e)),null}},e.prototype.get=function(e,t){var r,n,i=this.getDelayStorageItem();return s.isNullOrUndefined(i)?null:null!=(n=null==(r=i[e])?void 0:r.find(function(e){return e.schedule.dispatchId===t}))?n:null},e.prototype.set=function(e,t,r){var n,i,o=this.getDelayStorageItem();if(s.isNullOrUndefined(o))return c.log.debug("No delay storage item found. create new item"),void this.storage.setItem(this.storageKey,JSON.stringify(((n={})[e]=[r],n)));var a=null!=(i=o[e])?i:[];a.push(r),o[e]=a,this.storage.setItem(this.storageKey,JSON.stringify(o))},e.prototype.remove=function(e,t){var r=this.getDelayStorageItem(),n=null==r?void 0:r[e];s.isNullOrUndefined(r)||s.isNullOrUndefined(n)?c.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)))},e.prototype.values=function(){var e=this.getDelayStorageItem();return s.isNullOrUndefined(e)?(c.log.debug("No delay storage item found. do nothing"),[]):Object.values(e).flat()},e.prototype.clear=function(){this.storage.removeItem(this.storageKey)},e}(),dA=function(){function e(e){this.clock=e}return e.prototype.create=function(t,r){var n=this,i=this.clock.currentMillis(),o=[],s=this.createEvent(t,r,i,{});return s&&o.push(s),r.targetEvaluations.forEach(function(r){var s,a=((s={})[e.ROOT_TYPE]=t.key.type,s[e.ROOT_ID]=t.key.id,s),u=n.createEvent(t,r,i,a);u&&o.push(u)}),o},e.prototype.createEvent=function(t,r,n,i){var o;return r instanceof pO?(i[e.CONFIG_ID_PROPERTY_KEY]=null==(o=r.config)?void 0:o.id,i[e.EXPERIMENT_VERSION_KEY]=r.experiment.version,i[e.EXECUTION_VERSION_KEY]=r.experiment.executionVersion,pE.exposure(t.user,r,i,n)):r instanceof pP?pE.remoteConfig(t.user,r,f(f({},i),r.properties),n):null},e.ROOT_TYPE="$targetingRootType",e.ROOT_ID="$targetingRootId",e.CONFIG_ID_PROPERTY_KEY="$parameterConfigurationId",e.EXPERIMENT_VERSION_KEY="$experiment_version",e.EXECUTION_VERSION_KEY="$execution_version",e}(),d_=function(){function e(e,t){this.eventFactory=e,this.eventProcessor=t}return e.prototype.record=function(e,t){var r=this;this.eventFactory.create(e,t).forEach(function(e){r.eventProcessor.process(e)})},e}(),dN=function(){function e(e,t,r,n,i){this.reason=e,this.targetEvaluations=t,this.inAppMessage=r,this.isEligible=n,this.layoutEvaluation=i}return e.eligible=function(t,r,n){return e.of(t,r,n,!0)},e.ineligible=function(t,r,n){return e.of(t,r,n,!1)},e.of=function(t,r,n,i){return new e(String(n),r.targetEvaluations,t.inAppMessage,i,r.get(fQ))},e}(),dO=function(){function e(){}return e.prototype.evaluate=function(e,t,r){return e.inAppMessage.supports("WEB")?r.evaluate(e,t):dN.ineligible(e,t,D.UNSUPPORTED_PLATFORM)},e}(),dM=function(){function e(e){this.userOverrideMatcher=e}return e.prototype.evaluate=function(e,t,r){return this.userOverrideMatcher.matches(e,t)?dN.eligible(e,t,D.OVERRIDDEN):r.evaluate(e,t)},e}(),dP=function(){function e(){}return e.prototype.evaluate=function(e,t,r){return"DRAFT"===e.inAppMessage.status?dN.ineligible(e,t,D.IN_APP_MESSAGE_DRAFT):r.evaluate(e,t)},e}(),dS=function(){function e(){}return e.prototype.evaluate=function(e,t,r){return"PAUSE"===e.inAppMessage.status?dN.ineligible(e,t,D.IN_APP_MESSAGE_PAUSED):r.evaluate(e,t)},e}(),dC=function(){function e(){}return e.prototype.evaluate=function(e,t,r){return e.inAppMessage.period.within(e.timestamp)?r.evaluate(e,t):dN.ineligible(e,t,D.NOT_IN_IN_APP_MESSAGE_PERIOD)},e}(),dR=function(){function e(){}return e.prototype.evaluate=function(e,t,r){return e.inAppMessage.timetable.within(e.timestamp)?r.evaluate(e,t):dN.ineligible(e,t,D.NOT_IN_IN_APP_MESSAGE_TIMETABLE)},e}(),dU=function(){function e(e){this.hiddenMatcher=e}return e.prototype.evaluate=function(e,t,r){return this.hiddenMatcher.matches(e,t)?dN.ineligible(e,t,D.IN_APP_MESSAGE_HIDDEN):r.evaluate(e,t)},e}(),dk=function(){function e(e){this.targetMatcher=e}return e.prototype.evaluate=function(e,t,r){return this.targetMatcher.matches(e,t)?r.evaluate(e,t):dN.ineligible(e,t,D.NOT_IN_IN_APP_MESSAGE_TARGET)},e}(),dx=function(){function e(e){this.frequencyCapMatcher=e}return e.prototype.evaluate=function(e,t,r){return this.frequencyCapMatcher.matches(e,t)?dN.ineligible(e,t,D.IN_APP_MESSAGE_FREQUENCY_CAPPED):r.evaluate(e,t)},e}(),dD=function(){function e(){}return e.prototype.evaluate=function(e,t,r){return dN.eligible(e,t,D.IN_APP_MESSAGE_TARGET)},e}(),dL=function(){function e(e){this.layoutEvaluator=e}return e.prototype.evaluate=function(e,t,r){var n=f1.of(e),i=this.layoutEvaluator.evaluate(n,pR.create());return t.set(fQ,i),r.evaluate(e,t)},e}(),dF=function(){function e(){}return e.prototype.matches=function(e,t){var r=this;return e.inAppMessage.targetContext.overrides.some(function(t){return r.isUserOverridden(e,t)})},e.prototype.isUserOverridden=function(e,t){var r=e.user.identifiers[t.identifierType];return!s.isNullOrUndefined(r)&&t.identifiers.includes(r)},e}(),dV=function(){function e(e){this.targetMatcher=e}return e.prototype.matches=function(e,t){var r=this,n=e.inAppMessage.targetContext.targets;return 0===n.length||n.some(function(n){return r.targetMatcher.matches(e,t,n)})},e}(),dK=function(){function e(e){this.storage=e}return e.prototype.matches=function(e,t){return this.storage.exist(e.inAppMessage,e.timestamp)},e}(),dB=function(){function e(e){this.storage=e}return e.prototype.matches=function(e,t){var r=e.inAppMessage,n=e.user,i=e.timestamp;return this.isFrequencyCapped(r,n,i)},e.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;a<n.length;a++)if(n[a].matches(t,r,s))return!0;return!1},e.prototype.createMatchContexts=function(e){for(var t=[],r=0,n=e.identifierCaps;r<n.length;r++){var i=n[r];t.push(new dH(new dG(i)))}return e.durationCap&&t.push(new dH(new dj(e.durationCap))),t},e}(),dH=function(){function e(e){this.matchCount=0,this.predicate=e}return e.prototype.matches=function(e,t,r){return this.predicate.matches(e,t,r)&&(this.matchCount+=1),this.matchCount>=this.predicate.thresholdCount},e}(),dG=function(){function e(e){this.identifierCap=e}return Object.defineProperty(e.prototype,"thresholdCount",{get:function(){return this.identifierCap.count}
1,enumerable:!1,configurable:!0}),e.prototype.matches=function(e,t,r){var n=e.identifiers[this.identifierCap.identifierType];if(s.isNullOrUndefined(n))return!1;var i=r.identifiers[this.identifierCap.identifierType];return!s.isNullOrUndefined(i)&&n===i},e}(),dj=function(){function e(e){this.durationCap=e}return Object.defineProperty(e.prototype,"thresholdCount",{get:function(){return this.durationCap.count},enumerable:!1,configurable:!0}),e.prototype.matches=function(e,t,r){return t-r.timestamp<=this.durationCap.durationMillis},e}(),dW=function(){function e(e,t,r){this.layoutEvaluator=r;var n=pF.get("targetMatcher"),i=[new dM(new dF)],o=[new dO,new dM(new dF),new dP,new dS,new dC,new dR,new dk(new dV(n))],s=[new dL(this.layoutEvaluator)],a=[new dx(new dB(t)),new dU(new dK(e))],u=[new dD];this.triggerFlow=pB.of.apply(pB,v(v(v(v([],o,!1),s,!1),a,!1),u,!1)),this.deliverFlow=pB.of.apply(pB,v(v(v([],i,!1),a,!1),u,!1)),this.deliverReEvaluateFlow=pB.of.apply(pB,v(v(v([],o,!1),a,!1),u,!1))}return e.prototype.getTriggerFlow=function(){return this.triggerFlow},e.prototype.getDeliverFlow=function(e){return e?this.deliverReEvaluateFlow:this.deliverFlow},e}(),dY=function(e){function t(t,r){var n=e.call(this)||this;return n.evaluationFlow=t,n.eventRecorder=r,n}return h(t,e),t.prototype.supports=function(e){return void 0!==e.inAppMessage},t.prototype.evaluateInternal=function(e,t){var r;return null!=(r=this.evaluationFlow.evaluate(e,t))?r:dN.ineligible(e,t,D.NOT_IN_IN_APP_MESSAGE_TARGET)},t.prototype.record=function(e,t){this.eventRecorder.record(e,t),t.isEligible||null===t.layoutEvaluation||this.eventRecorder.record(t.layoutEvaluation.request,t.layoutEvaluation)},t}(fZ),dJ=function(){function e(e,t,r){this.core=e,this.flowFactory=t,this.eventRecorder=r}return e.prototype.process=function(e,t){var r=new dY(this.resolveFlow(e,t),this.eventRecorder);return this.core.inAppMessage(t,pR.create(),r)},e.prototype.resolveFlow=function(e,t){var r,n;return"TRIGGER"===e?this.flowFactory.getTriggerFlow():this.flowFactory.getDeliverFlow(null!=(n=null==(r=t.inAppMessage.evaluateContext)?void 0:r.atDeliverTime)&&n)},e}(),dz=function(){function e(e,t){this.core=e,this.layoutEvaluator=t}return e.prototype.resolve=function(e,t,r){var n=new f1(e,r,t);return this.core.inAppMessage(n,pR.create(),this.layoutEvaluator)},e}(),dq=function(e){function t(t,r){var n=e.call(this)||this;return n.deliverProcessor=t,n.delayManager=r,n}return h(t,e),t.prototype.supports=function(e){return"STORED"===e},t.prototype.deliver=function(e){var t=this.delayManager.delete(e);s.requiredNotNullOrUndefined(t,function(){return"InAppMessageDelay not found (inAppMessageKey=".concat(e.schedule.inAppMessageKey,")")});var r=dh.of(e),n=this.deliverProcessor.process(r);return dl.of(e,"DELIVER",n,t)},t.prototype.delay=function(e){var t=this.delayManager.delay(e);return c.log.debug("StoredDelay is scheduled (inAppMessageKey=".concat(e.schedule.inAppMessageKey,", delayMillis=").concat(e.delayMillis.toLocaleString(),")")),dl.of(e,"DELAY",null,t)},t.prototype.ignore=function(e){var t=this.delayManager.delete(e);return dl.of(e,"IGNORE",null,t)},t}(df),dX=function(){function e(e){this.sessionManager=e}return e.prototype.decorate=function(e){if(e.identifiers[G.SESSION])return e;var t=this.sessionManager.currentSessionId;if(s.isNullOrUndefined(t))return e;var r=(new W).addIdentifiers(e.identifiers).add(G.SESSION,t).build();return f(f({},e),{identifiers:r})},e}(),d$=function(){function e(e){this.sessionUserDecorator=e}return e.prototype.decorate=function(e){var t=this.sessionUserDecorator.decorate(e.user);return e.copyWithUser(t)},e}(),dZ=function(){function e(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)}return e.prototype.addPageListener=function(e){this.pageManager.addListener(e)},e.prototype.addEngagementListener=function(e){this.engagementManager.addListener(e)},e.prototype.addLifecycleListener=function(e){this.lifecycleManager.addListener(e)},e.prototype.initialize=function(){this.lifecycleManager.initialize()},e.prototype.install=function(e){this.pageManager.addListener(this.engagementManager),this.lifecycleManager.addListener(this.engagementManager),this.lifecycleManager.install(e)},e}(),dQ=function(){function e(e){this.listeners=[],this._isOptOutTracking=e}return Object.defineProperty(e.prototype,"isOptOutTracking",{get:function(){return this._isOptOutTracking}
1,enumerable:!1,configurable:!0}),e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.setOptOutTracking=function(e){this._isOptOutTracking!==e&&(this._isOptOutTracking=e,this.listeners.forEach(function(t){try{t.onOptOutChanged(e)}catch(e){c.log.error("Unexpected exception while notifying OptOutListener: ".concat(e))}}))},e}(),d0=function(){function e(e){this.factories=e}return e.prototype.get=function(e){var t;return null!=(t=this.factories.find(function(t){return t.supports(e)}))?t:null},e}(),d1=function(){function e(e){this.callback=e,this.isCalled=!1,this.cache=null}return e.prototype.run=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.cache=this.callback.apply(this,e),this.isCalled=!0,this.cache},e.prototype.once=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.isCalled?this.cache:this.run.apply(this,e)},e}(),d2=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t,r,n)||this;return a.context=t,a.ui=r,a.status=n,a.htmlResolver=i,a.renderer=o,a.bridge=s,a}return h(t,e),t.prototype.render=function(e){return d(this,void 0,void 0,function(){var t=this;return y(this,function(r){return[2,new Promise(function(r,n){var i=new d1(function(){r()});try{t.renderer.render(e,t.bridge,i)}catch(e){n(e)}})]})})},t.prototype.open=function(){return d(this,void 0,void 0,function(){var e,r;return y(this,function(n){switch(n.label){case 0:if(!this.canOpen())return c.log.debug("InAppMessage is already opened. (key=".concat(this.context.inAppMessage.key,")")),[2];n.label=1;case 1:return n.trys.push([1,4,,5]),this.handleOpenStarted(),[4,this.htmlResolver.resolve(this.context)];case 2:return e=n.sent(),[4,tq.timeout(this.render(e),t.OPEN_TIMEOUT_MILLIS)];case 3:return n.sent(),this.handleOpenCompleted(),[3,5];case 4:return r=n.sent(),this.handleOpenFailed(r),[3,5];case 5:return[2]}})})},t.prototype.close=function(){if(this.canClose())try{this.handleCloseStarted(),this.handleCloseCompleted()}catch(e){this.handleCloseFailed(e)}else c.log.debug("InAppMessage is already closed. (key=".concat(this.context.inAppMessage.key,")"))},t.prototype.destroy=function(){this.renderer.destroy(),this.ui.currentMessageView=null,this.status.current="CLOSED"},t.OPEN_TIMEOUT_MILLIS=5e3,t}(hw),d4=function(){function e(){this.WRAPPER_CLASS_NAME="hackle-iam-html__wrapper",this.IFRAME_CLASS_NAME="hackle-iam-html__iframe",this.$wrapper=null,this.$iframe=null}return e.prototype.createElement=function(){return this.$wrapper=document.createElement("div"),this.$iframe=document.createElement("iframe"),this.$wrapper.classList.add(this.WRAPPER_CLASS_NAME),this.$iframe.classList.add(this.IFRAME_CLASS_NAME),[this.$wrapper,this.$iframe]},e.prototype.attachToDOM=function(){if(this.$wrapper&&this.$iframe){var e=this.$wrapper,t=this.$iframe;e.contains(t)||e.appendChild(t),e.parentNode||document.body.appendChild(e)}},e.prototype.removeElement=function(){this.$wrapper&&(this.$wrapper.remove(),this.$wrapper=null,this.$iframe=null)},e.prototype.onLoad=function(e){this.$iframe&&(this.$iframe.onload=function(){e()})},e.prototype.getIframeContentWindow=function(){var e,t;return null!=(t=null==(e=this.$iframe)?void 0:e.contentWindow)?t:null},e}(),d3=function(){function e(){this.operations=new Map}return e.prototype.marketing=function(e){return this.operations.set("$marketing",e),this},e.prototype.information=function(e){return this.operations.set("$information",e),this},e.prototype.custom=function(e,t){return this.operations.set(e,t),this},e.prototype.build=function(){return new d5(this.operations)},e}(),d5=function(){function e(e){this.operations=e}return e.prototype.toEvent=function(e){var t=new tJ;return this.operations.forEach(function(e,r){t.set(r,e)}),{key:e,properties:s.fromMap(this.operations)}},e.prototype.toRecord=function(){var e={};return this.operations.forEach(function(t,r){e[r]=t}),e},e}();t.HackleSubscriptionStatus=void 0,(f3=t.HackleSubscriptionStatus||(t.HackleSubscriptionStatus={})).SUBSCRIBED="SUBSCRIBED",f3.UNSUBSCRIBED="UNSUBSCRIBED",f3.UNKNOWN="UNKNOWN";var d6,d9=function(){function e(){}return e.createBridgeReadyEvent=function(){return new CustomEvent(e.HACKLE_IAM_BRIDGE_READY_EVENT_NAME)},e.install=function(r,n){var i;r[e.HACKLE_IAM_SCRIPT_CONTAINER_NAME]=r[e.HACKLE_IAM_SCRIPT_CONTAINER_NAME]||{},Object.assign(r[e.HACKLE_IAM_SCRIPT_CONTAINER_NAME],((i={})[e.HACKLE_IAM_BRIDGE_FIELD_NAME]=n,i.PropertyOperationsBuilder=tJ,i.HackleSubscriptionOperationsBuilder=d3,i.HackleSubscriptionStatus=t.HackleSubscriptionStatus,i)),r.dispatchEvent(e.createBridgeReadyEvent())},e.isBridgeInstalled=function(t){return e.HACKLE_IAM_SCRIPT_CONTAINER_NAME in t&&void 0!==t[e.HACKLE_IAM_SCRIPT_CONTAINER_NAME][e.HACKLE_IAM_BRIDGE_FIELD_NAME]},e.HACKLE_IAM_SCRIPT_CONTAINER_NAME="Hackle",e.HACKLE_IAM_BRIDGE_FIELD_NAME="bridge",e.HACKLE_IAM_BRIDGE_READY_EVENT_NAME="hackleBridgeReady",e}(),d8=function(){function e(){}return e.beforeLoadedWrapperStyles=function(){return{position:"fixed",top:"0",left:"0",bottom:"0",right:"0",zIndex:"9999",opacity:"0",pointerEvents:"none",transition:"opacity 0.3s ease-in-out"}},e.afterLoadedWrapperStyles=function(){return{opacity:"1"}},e.beforeLoadedIframeStyles=function(){return{width:"100%",height:"100%",border:"none",pointerEvents:"none"}},e.afterLoadedIframeStyles=function(){return{pointerEvents:"auto"}},e}(),d7=function(){function e(e){this.domManager=e}return e.prototype.render=function(e,t,r){var n=this,i=this.domManager.createElement(),o=i[0],a=i[1];this.setStyle(a,d8.beforeLoadedIframeStyles()),this.setStyle(o,d8.beforeLoadedWrapperStyles()),this.domManager.onLoad(function(){var e=s.requiredNotNullOrUndefined(n.domManager.getIframeContentWindow(),function(){return"Failed to render HTML inAppMessage. (HTML inAppMessage's container element is not found.)"});d9.install(e,t),n.setStyle(a,d8.afterLoadedIframeStyles()),n.setStyle(o,d8.afterLoadedWrapperStyles()),r.once()}),this.renderHtmlString(a,e),this.domManager.attachToDOM()},e.prototype.destroy=function(){this.domManager.removeElement()},e.prototype.setStyle=function(e,t){Object.assign(e.style,t)},e.prototype.renderHtmlString=function(e,t){e.srcdoc=t},e}(),ye=function(){function e(e,t){this.htmlResolver=e,this.bridgeFactory=t}return e.create=function(t,r){return new e(t,r)},e.prototype.create=function(e,t){var r=new hI,n=new d7(new d4),i=this.bridgeFactory.create(t);return new d2(e,t,r,this.htmlResolver,n,i)},e.prototype.supports=function(e){return null!==e.message.html&&"HTML"===e.message.layout.displayType},e}(),yt=function(){function e(e){this.htmlFetcher=e}return e.prototype.resolve=function(e){return d(this,void 0,void 0,function(){var t,r;return y(this,function(n){switch(n.label){case 0:t=s.requiredNotNullOrUndefined(e.message.html,function(){return"HTML is not found in InAppMessagePresentationContext [".concat(e.inAppMessage.key,"]")}),n.label=1;case 1:switch(n.trys.push([1,7,,8]),t.resourceType){case"TEXT":return[3,2];case"PATH":return[3,3]}return[3,5];case 2:return[2,t.text];case 3:return[4,this.htmlFetcher.fetchHtmlContent(t.path)];case 4:return[2,n.sent()];case 5:throw Error("Unsupported HTML resource type: ".concat(null==t?void 0:t.resourceType));case 6:return[3,8];case 7:throw r=n.sent(),Error("Failed to get HTML for InAppMessage [".concat(e.inAppMessage.key,"]: ").concat(r));case 8:return[2]}})})},e}(),yr=function(){function e(e){this.transport=e,this.HTML_REQUEST_TIMEOUT_MILLIS=5e3}return e.prototype.fetchHtmlContent=function(e){return d(this,void 0,void 0,function(){var t,r;return y(this,function(n){switch(n.label){case 0:return t=this.createRequest(e),[4,this.execute(t)];case 1:return r=n.sent(),[2,this.handleResponse(r)]}})})},e.prototype.createRequest=function(e){return tI.builder().url(e).method("GET").timeoutMillis(this.HTML_REQUEST_TIMEOUT_MILLIS).build()},e.prototype.execute=function(e){return d(this,void 0,void 0,function(){var t,r,n;return y(this,function(i){switch(i.label){case 0:t=tn.start(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.transport.send(e)];case 2:return r=i.sent(),tS.record("get.iam-html",t,r),[2,r];case 3:throw n=i.sent(),tS.record("get.iam-html",t,null),n;case 4:return[2]}})})},e.prototype.handleResponse=function(e){if(!e.isSuccessful())throw Error("Http status code: ".concat(e.statusCode));if(null===e.body)throw Error("Response body is null");return e.body},e}(),yn=function(){function e(){this.client=null}return e.prototype.getOrNull=function(){return this.client},e.prototype.get=function(){if(null===this.client)throw Error("HackleClient is not initialized yet");return this.client},e.prototype.set=function(e){this.client=e},e}(),yi=function(){function e(e,t){this.invocationProcessor=e,this.browserPropertyProvider=t}return e.prototype.onEngagement=function(e,t){this.track(e,t)},e.prototype.track=function(t,r){var n,i={command:"track",parameters:{event:{key:e.ENGAGEMENT_EVENT_KEY,properties:f(f({},t.page.properties),((n={}
1)[fV.PAGE_NAME_PROPERTY_KEY]=t.page.pageName,n[e.ENGAGEMENT_TIME_PROPERTY_KEY]=t.durationMillis,n))},user:void 0},browserProperties:this.browserPropertyProvider.getBrowserProperties(t.page)};this.invocationProcessor.process(i)},e.ENGAGEMENT_EVENT_KEY="$engagement",e.ENGAGEMENT_TIME_PROPERTY_KEY="$engagement_time_ms",e}(),yo=function(){function e(e,t){this.invocationProcessor=e,this.browserPropertyProvider=t}return e.prototype.onPageStarted=function(e,t){this.track(e,t)},e.prototype.onPageEnded=function(e,t){},e.prototype.track=function(e,t){var r,n={command:"track",parameters:{event:{key:fV.PAGE_VIEW_EVENT_KEY,properties:f(f({},e.properties),((r={})[fV.PAGE_NAME_PROPERTY_KEY]=e.pageName,r))},user:void 0},browserProperties:this.browserPropertyProvider.getBrowserProperties(e)};this.invocationProcessor.process(n)},e}(),ys=function(e,t,r,n,i){this.sdkKey=e,this.config=t,this.invocationProcessor=r,this.browserPropertyProvider=n,this.lifecycleCompositeManager=i},ya={automaticRouteTracking:!0,automaticScreenTracking:!1,automaticEngagementTracking:!1},yu=c.log,yc=function(){function e(e){this.configResolver=e}return e.prototype.config=function(){var e=this.configResolver.resolve();return f(f({},ya),e)},e}(),yp=function(){function e(e){this.hackleApp=e}return e.prototype.supports=function(e){return"getWebViewConfig"in e&&s.isNotNullOrUndefined(e.getWebViewConfig)},e.prototype.resolveAutomaticRouteTracking=function(e){return"boolean"!=typeof e.automaticRouteTracking?ya.automaticRouteTracking:e.automaticRouteTracking},e.prototype.resolveAutomaticEngagementTracking=function(e){return"boolean"!=typeof e.automaticEngagementTracking?ya.automaticEngagementTracking:e.automaticEngagementTracking},e.prototype.resolveAutomaticScreenTracking=function(e){return"boolean"!=typeof e.automaticScreenTracking?ya.automaticScreenTracking:e.automaticScreenTracking},e.prototype.resolve=function(){try{if(!this.supports(this.hackleApp))return ya;var e=this.hackleApp.getWebViewConfig(),t=JSON.parse(e);return{automaticRouteTracking:this.resolveAutomaticRouteTracking(t),automaticEngagementTracking:this.resolveAutomaticEngagementTracking(t),automaticScreenTracking:this.resolveAutomaticScreenTracking(t)}}catch(e){return yu.warn("Failed to resolve web view config: ".concat(e)),ya}},e}(),yl=function(){function e(e){this.invocator=e}return e.prototype.createInvocationRequestDto=function(e){return{_hackle:{command:e.command,parameters:e.parameters,browserProperties:e.browserProperties}}},e.prototype.process=function(e){var t,r=this.createInvocationRequestDto(e);return null!=(t=this.invocator.invoke(r).data)?t:null},e}(),yh=function(){function e(e){this.invocationResponseResolver=e}return e.prototype.invoke=function(e){var t=window.prompt(JSON.stringify(e));return this.invocationResponseResolver.resolve(t)},e}(),yf=function(){function e(e){this.invocationResponseResolver=e}return e.prototype.invoke=function(e){if(!(null==(t=window._hackleApp)?void 0:t.invoke))throw Error("window._hackleApp.invoke is not implemented");var t,r=window._hackleApp.invoke(JSON.stringify(e));return this.invocationResponseResolver.resolve(r)},e}();(n=d6||(d6={})).prompt="prompt",n.function="function";var yd=function(){function e(){}return e.prototype.getInvocator=function(e,t){return e===d6.prompt?new yh(t):e===d6.function?new yf(t):null},e}(),yy=function(){function e(){}return e.prototype.isInvocatorResponse=function(e){return"object"==typeof e&&null!==e&&"success"in e&&"boolean"==typeof e.success&&"message"in e&&"string"==typeof e.message},e.prototype.resolve=function(e){var t=JSON.parse(null!=e?e:"");if(!this.isInvocatorResponse(t))throw Error("invalid invocator response data");if(!t.success)throw Error("failed response");return{message:t.message,success:t.success,data:t.data}},e}();function yv(e){var t=(new yd).getInvocator(e.getInvocationType(),new yy);if(null===t)throw Error("Failed to get invocator with invocationType:".concat(e.getInvocationType()));return new yl(t)}var yg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.create=function(e){var t=new rl(this.invocationProcessor,this.browserPropertyProvider,this.lifecycleCompositeManager.pageManager);return this.initialize(e),t},t.prototype.initialize=function(e){e.automaticRouteTracking&&this.lifecycleCompositeManager.addLifecycleListener(this.lifecycleCompositeManager.pageManager),e.automaticScreenTracking&&this.lifecycleCompositeManager.addPageListener(new yo(this.invocationProcessor,this.browserPropertyProvider)),e.automaticEngagementTracking&&this.lifecycleCompositeManager.addEngagementListener(new yi(this.invocationProcessor,this.browserPropertyProvider)),this.lifecycleCompositeManager.initialize()},t}(ys),ym=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t,r,n,i,o)||this;return a.browserClientFactory=s,a}return h(t,e),t.prototype.create=function(e){var t=new rh(this.browserClientFactory(this.sdkKey,this.config,this.lifecycleCompositeManager),new rl(this.invocationProcessor,this.browserPropertyProvider,this.lifecycleCompositeManager.pageManager));return this.initialize(t),t},t.prototype.initialize=function(e){e.syncUser()},t}(ys),yE=function(){function e(e,t,r,n,i,o){var s;this.sdkKey=e,this.config=t,this.browserPropertyProvider=r,this.lifecycleCompositeManager=n,this.browserClientFactory=i,this.invocationProcessor=o,this.factories=((s={})[ra.native]=new yg(this.sdkKey,this.config,this.invocationProcessor,this.browserPropertyProvider,this.lifecycleCompositeManager),s[ra.web_view_wrapper]=new ym(this.sdkKey,this.config,this.invocationProcessor,this.browserPropertyProvider,this.lifecycleCompositeManager,this.browserClientFactory),s)}return e.prototype.create=function(e,t){var r=this.factories[e];if(!r)throw Error("Unsupported HackleAppMode: ".concat(e));return r.create(t)},e}(),yw=function(){function e(){}return e.prototype.isOptOutTracking=function(){return!1},e.prototype.setOptOutTracking=function(e){},e.prototype.openUrl=function(e){},e.prototype.trackClick=function(e){},e.prototype.handleUrl=function(e,t){},e.prototype.closeInAppMessage=function(){},e.prototype.close=function(){},e.prototype.getSessionId=function(){return""},e.prototype.resetUser=function(){return Promise.resolve()},e.prototype.trackPageView=function(e){},e.prototype.setCurrentPage=function(e){},e.prototype.showUserExplorer=function(){},e.prototype.hideUserExplorer=function(){},e.prototype.fetch=function(){return Promise.resolve()},e.prototype.setInAppMessageListener=function(e){},e.prototype.getExperiment=function(e){},e.prototype.onReady=function(e,t){},e.prototype.onInitialized=function(e){return Promise.resolve({success:!0})},e.prototype.getUser=function(){return{}},e.prototype.setUser=function(e){return Promise.resolve()},e.prototype.setUserId=function(e){return Promise.resolve()},e.prototype.setDeviceId=function(e){return Promise.resolve()},e.prototype.setUserProperty=function(e,t){return Promise.resolve()},e.prototype.setUserProperties=function(e){return Promise.resolve()},e.prototype.updateUserProperties=function(e){return Promise.resolve()}
1,e.prototype.updatePushSubscriptions=function(e){return Promise.resolve()},e.prototype.updateSmsSubscriptions=function(e){return Promise.resolve()},e.prototype.updateKakaoSubscriptions=function(e){return Promise.resolve()},e.prototype.setPhoneNumber=function(e){return Promise.resolve()},e.prototype.unsetPhoneNumber=function(){return Promise.resolve()},e.prototype.track=function(e,t){},e.prototype.getDisplayedInAppMessageView=function(){return null},e.prototype.variation=function(e,t,r){return null!=r?r:"A"},e.prototype.variationDetail=function(e,t,r){return R.of(null!=r?r:"A",D.UNSUPPORTED_PLATFORM)},e.prototype.isFeatureOn=function(e,t){return!1},e.prototype.featureFlagDetail=function(e,t){return U.off(D.UNSUPPORTED_PLATFORM)},e.prototype.remoteConfig=function(e){return new k},e.prototype.getTriggerEvent=function(){},e.prototype.getTriggerEventProperty=function(e,t){return t},e}();function yb(e){return t3.toInternal({type:"LINK",link:"string"==typeof e?{url:e,target:"CURRENT",shouldCloseAfterLink:!0}:e})}function yT(){return t3.toInternal({type:"LINK"})}function yI(e){var t=e.url,r=e.elementId,n=e.timestamp;return hy.action({timestamp:n,action:t?yb(t):yT(),elementId:r})}var yA=function(){function e(e,t,r,n,i){this.viewId=e,this.webAppClient=t,this.invocationProcessor=r,this.browserPropertyProvider=n,this.triggerEvent=i,this.openUrl=this.openUrl.bind(this),this.trackClick=this.trackClick.bind(this),this.handleUrl=this.handleUrl.bind(this),this.closeInAppMessage=this.closeInAppMessage.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.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.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.setCurrentPage=this.setCurrentPage.bind(this),this.remoteConfig=this.remoteConfig.bind(this),this.showUserExplorer=this.showUserExplorer.bind(this),this.hideUserExplorer=this.hideUserExplorer.bind(this),this.fetch=this.fetch.bind(this),this.setInAppMessageListener=this.setInAppMessageListener.bind(this),this.getDisplayedInAppMessageView=this.getDisplayedInAppMessageView.bind(this),this.getExperiment=this.getExperiment.bind(this),this.onReady=this.onReady.bind(this),this.onInitialized=this.onInitialized.bind(this),this.close=this.close.bind(this),this.isOptOutTracking=this.isOptOutTracking.bind(this),this.setOptOutTracking=this.setOptOutTracking.bind(this),this.getTriggerEvent=this.getTriggerEvent.bind(this),this.getTriggerEventProperty=this.getTriggerEventProperty.bind(this)}return e.prototype.resolveViewId=function(){var e,t,r;return null!=(r=null!=(e=this.viewId)?e:null==(t=this.getCurrentInAppMessageView())?void 0:t.id)?r:null},e.prototype.getCurrentInAppMessageView=function(){var e={command:"getCurrentInAppMessageView",browserProperties:this.browserPropertyProvider.getBrowserProperties()};return this.invocationProcessor.process(e)},e.prototype.convertToEventDto=function(e){var t,r,n,i,o;return n=(t={url:e.url,elementId:e.elementId}).url,i=t.elementId,{type:"ACTION",action:{behavior:(o=n?yb(n):yT()).behavior,type:o.type,value:null!=(r=o.value)?r:null},element:{elementId:i}}},e.prototype.convertToHiddenEventDto=function(e){var t,r;return{type:"ACTION",action:{behavior:(r=t3.toInternal({type:"CLOSE",close:{hideDurationMillis:e}})).behavior,type:r.type,value:null!=(t=r.value)?t:null},element:{}}},e.prototype.openUrl=function(e){var t=this.resolveViewId();if(t){var r=this.convertToEventDto({url:e}),n={browserProperties:this.browserPropertyProvider.getBrowserProperties(),command:"handleInAppMessageView",parameters:{viewId:t,handleTypes:["ACTION"],event:r}};this.invocationProcessor.process(n)}else c.log.error("Failed to open url because current in-app message view is not found")},e.prototype.trackClick=function(e){var t=this.resolveViewId();if(t){var r=this.convertToEventDto({elementId:e}),n={browserProperties:this.browserPropertyProvider.getBrowserProperties(),command:"handleInAppMessageView",parameters:{viewId:t,handleTypes:["TRACK"],event:r}};this.invocationProcessor.process(n)}else c.log.error("Failed to track click because current in-app message view is not found")},e.prototype.handleUrl=function(e,t){var r=this.resolveViewId();if(r){var n=this.convertToEventDto({url:e,elementId:t}),i={browserProperties:this.browserPropertyProvider.getBrowserProperties(),command:"handleInAppMessageView",parameters:{viewId:r,handleTypes:["TRACK","ACTION"],event:n}};this.invocationProcessor.process(i)}else c.log.error("Failed to handle url because current in-app message view is not found")},e.prototype.closeInAppMessageView=function(){var e=this.resolveViewId();if(e){var t={browserProperties:this.browserPropertyProvider.getBrowserProperties(),command:"closeInAppMessageView",parameters:{viewId:e}};this.invocationProcessor.process(t)}else c.log.error("Failed to close in-app message because current in-app message view is not found")},e.prototype.hideInAppMessage=function(e){var t=this.resolveViewId();if(t){var r=this.convertToHiddenEventDto(e),n={browserProperties:this.browserPropertyProvider.getBrowserProperties(),command:"handleInAppMessageView",parameters:{viewId:t,handleTypes:["TRACK","ACTION"],event:r}};this.invocationProcessor.process(n)}else c.log.error("Failed to hide in-app message because current in-app message view is not found")},e.prototype.closeInAppMessage=function(e){switch(typeof e){case"boolean":e?this.hideInAppMessage(864e5):this.closeInAppMessageView();break;case"number":var t=A.minutesToUnit(e,"milliseconds");this.hideInAppMessage(t);break;default:this.closeInAppMessageView()}},e.prototype.getSessionId=function(){return this.webAppClient.getSessionId()},e.prototype.getUser=function(){return this.webAppClient.getUser()},e.prototype.setUser=function(e){return this.webAppClient.setUser(e)},e.prototype.setUserId=function(e){return this.webAppClient.setUserId(e)},e.prototype.setDeviceId=function(e){return this.webAppClient.setDeviceId(e)},e.prototype.setUserProperty=function(e,t){return this.webAppClient.setUserProperty(e,t)},e.prototype.setUserProperties=function(e){return this.webAppClient.setUserProperties(e)},e.prototype.updateUserProperties=function(e){return this.webAppClient.updateUserProperties(e)}
1,e.prototype.updatePushSubscriptions=function(e){return this.webAppClient.updatePushSubscriptions(e)},e.prototype.updateSmsSubscriptions=function(e){return this.webAppClient.updateSmsSubscriptions(e)},e.prototype.updateKakaoSubscriptions=function(e){return this.webAppClient.updateKakaoSubscriptions(e)},e.prototype.resetUser=function(){return this.webAppClient.resetUser()},e.prototype.setPhoneNumber=function(e){return this.webAppClient.setPhoneNumber(e)},e.prototype.unsetPhoneNumber=function(){return this.webAppClient.unsetPhoneNumber()},e.prototype.variation=function(e,t,r){return this.webAppClient.variation(e,t,r)},e.prototype.variationDetail=function(e,t,r){return this.webAppClient.variationDetail(e,t,r)},e.prototype.isFeatureOn=function(e,t){return this.webAppClient.isFeatureOn(e,t)},e.prototype.featureFlagDetail=function(e,t){return this.webAppClient.featureFlagDetail(e,t)},e.prototype.track=function(e,t){return this.webAppClient.track(e,t)},e.prototype.trackPageView=function(e){return this.webAppClient.trackPageView(e)},e.prototype.setCurrentPage=function(e){return this.webAppClient.setCurrentPage(e)},e.prototype.remoteConfig=function(e){return this.webAppClient.remoteConfig(e)},e.prototype.showUserExplorer=function(){return this.webAppClient.showUserExplorer()},e.prototype.hideUserExplorer=function(){return this.webAppClient.hideUserExplorer()},e.prototype.fetch=function(){return this.webAppClient.fetch()},e.prototype.setInAppMessageListener=function(e){return this.webAppClient.setInAppMessageListener(e)},e.prototype.getDisplayedInAppMessageView=function(){return this.webAppClient.getDisplayedInAppMessageView()},e.prototype.getExperiment=function(e){return this.webAppClient.getExperiment(e)},e.prototype.onReady=function(e,t){return this.webAppClient.onReady(e,t)},e.prototype.onInitialized=function(e){return this.webAppClient.onInitialized(e)},e.prototype.close=function(){return this.webAppClient.close()},e.prototype.isOptOutTracking=function(){return this.webAppClient.isOptOutTracking()},e.prototype.setOptOutTracking=function(e){return this.webAppClient.setOptOutTracking(e)},e.prototype.getTriggerEvent=function(){return this.triggerEvent},e.prototype.getTriggerEventProperty=function(e,t){var r,n,i;return null!=(i=null==(n=null==(r=this.getTriggerEvent())?void 0:r.properties)?void 0:n[e])?i:t},e}(),y_=c.log,yN=function(){function e(e){this.actors=e}return e.prototype.get=function(e){return this.actors.find(function(t){return t.supports(e)})},e}(),yO=function(){function e(){}return e.prototype.supports=function(e){return"IMPRESSION"===e.type},e.prototype.action=function(e,t){},e}(),yM=function(){function e(e){this.actionHandlerFactory=e}return e.prototype.supports=function(e){return"ACTION"===e.type},e.prototype.action=function(e,t){var r,n,i=this.actionHandlerFactory.get(t.action);!(null==(n=null==(r=e.ui.inAppMessageListener)?void 0:r.onInAppMessageClick)?void 0:n.call(r,tZ.toPublic(e.context.inAppMessage),tQ.toPublic(e),t3.toPublic(t.action)))&&e.status.canClose()&&(null==i||i.handle(e,t.action))},e}(),yP=function(){function e(){}return e.prototype.supports=function(e){return"CLOSE"===e.type},e.prototype.action=function(e,t){},e}(),yS=function(){function e(){}return e.prototype.supports=function(e){return"IMAGE_IMPRESSION"===e.type},e.prototype.action=function(e,t){},e}(),yC=function(){function e(e,t){this.hackleClient=e,this.inAppMessageUi=t,this.openUrl=this.openUrl.bind(this),this.trackClick=this.trackClick.bind(this),this.handleUrl=this.handleUrl.bind(this),this.closeInAppMessage=this.closeInAppMessage.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.setPhoneNumber=this.setPhoneNumber.bind(this),this.unsetPhoneNumber=this.unsetPhoneNumber.bind(this),this.track=this.track.bind(this),this.getDisplayedInAppMessageView=this.getDisplayedInAppMessageView.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.remoteConfig=this.remoteConfig.bind(this),this.getTriggerEvent=this.getTriggerEvent.bind(this),this.getTriggerEventProperty=this.getTriggerEventProperty.bind(this)}return e.prototype.getCurrentInAppMessageView=function(){return s.requiredNotNullOrUndefined(this.inAppMessageUi.currentMessageView,function(){return"Failed to get current in-app message view because current in-app message view is not found"})},e.prototype.openUrl=function(e){var t=this.getCurrentInAppMessageView(),r=yI({url:e,timestamp:t.ui.clock.currentMillis()});t.handle(r,["ACTION"])},e.prototype.trackClick=function(e){var t=this.getCurrentInAppMessageView(),r=yI({elementId:e,timestamp:t.ui.clock.currentMillis()});t.handle(r,["TRACK"])},e.prototype.handleUrl=function(e,t){var r=this.getCurrentInAppMessageView(),n=yI({url:e,elementId:t,timestamp:r.ui.clock.currentMillis()});r.handle(n,["TRACK","ACTION"])},e.prototype.hideInAppMessage=function(e){var t,r,n,i=this.getCurrentInAppMessageView(),o=(r=(t={timestamp:i.ui.clock.currentMillis(),hideDurationMillis:e}).timestamp,n=t.hideDurationMillis,hy.action({timestamp:r,action:t3.toInternal({type:"CLOSE",close:{hideDurationMillis:n}})}));i.handle(o,["TRACK","ACTION"])},e.prototype.closeInAppMessageView=function(){var e;null==(e=this.getCurrentInAppMessageView())||e.close()},e.prototype.closeInAppMessage=function(e){switch(typeof e){case"boolean":e?this.hideInAppMessage(864e5):this.closeInAppMessageView();break;case"number":var t=A.minutesToUnit(e,"milliseconds");this.hideInAppMessage(t);break;default:this.closeInAppMessageView()}},e.prototype.getUser=function(){return this.hackleClient.getUser()},e.prototype.setUser=function(e){return this.hackleClient.setUser(e)},e.prototype.setUserId=function(e){return this.hackleClient.setUserId(e)},e.prototype.setDeviceId=function(e){return this.hackleClient.setDeviceId(e)},e.prototype.setUserProperty=function(e,t){return this.hackleClient.setUserProperty(e,t)},e.prototype.setUserProperties=function(e){return this.hackleClient.setUserProperties(e)},e.prototype.updateUserProperties=function(e){return this.hackleClient.updateUserProperties(e)}
1,e.prototype.updatePushSubscriptions=function(e){return this.hackleClient.updatePushSubscriptions(e)},e.prototype.updateSmsSubscriptions=function(e){return this.hackleClient.updateSmsSubscriptions(e)},e.prototype.updateKakaoSubscriptions=function(e){return this.hackleClient.updateKakaoSubscriptions(e)},e.prototype.setPhoneNumber=function(e){return this.hackleClient.setPhoneNumber(e)},e.prototype.unsetPhoneNumber=function(){return this.hackleClient.unsetPhoneNumber()},e.prototype.track=function(e,t){this.hackleClient.track(e,t)},e.prototype.getDisplayedInAppMessageView=function(){return this.hackleClient.getDisplayedInAppMessageView()},e.prototype.variation=function(e,t,r){return this.hackleClient.variation(e,t,r)},e.prototype.variationDetail=function(e,t,r){return this.hackleClient.variationDetail(e,t,r)},e.prototype.isFeatureOn=function(e,t){return this.hackleClient.isFeatureOn(e,t)},e.prototype.featureFlagDetail=function(e,t){return this.hackleClient.featureFlagDetail(e,t)},e.prototype.remoteConfig=function(e){return this.hackleClient.remoteConfig(e)},e.prototype.getSessionId=function(){return this.hackleClient.getSessionId()},e.prototype.resetUser=function(){return this.hackleClient.resetUser()},e.prototype.showUserExplorer=function(){this.hackleClient.showUserExplorer()},e.prototype.hideUserExplorer=function(){this.hackleClient.hideUserExplorer()},e.prototype.isOptOutTracking=function(){return this.hackleClient.isOptOutTracking()},e.prototype.setOptOutTracking=function(e){this.hackleClient.setOptOutTracking(e)},e.prototype.getTriggerEvent=function(){try{return this.getCurrentInAppMessageView().context.triggerEvent}catch(e){return}},e.prototype.getTriggerEventProperty=function(e,t){var r,n,i;return null!=(i=null==(n=null==(r=this.getTriggerEvent())?void 0:r.properties)?void 0:n[e])?i:t},e.prototype.trackPageView=function(e){c.log.warn("trackPageView is not supported in WebIframeInAppMessageBridge")},e.prototype.setCurrentPage=function(e){c.log.warn("setCurrentPage is not supported in WebIframeInAppMessageBridge")},e.prototype.close=function(){c.log.warn("close is not supported in WebIframeInAppMessageBridge")},e.prototype.onReady=function(e,t){c.log.warn("onReady is not supported in WebIframeInAppMessageBridge")},e.prototype.onInitialized=function(e){return c.log.warn("onInitialized is not supported in WebIframeInAppMessageBridge"),Promise.resolve({success:!1})},e.prototype.getExperiment=function(e){c.log.warn("getExperiment is not supported in WebIframeInAppMessageBridge")},e.prototype.setInAppMessageListener=function(e){c.log.warn("setInAppMessageListener is not supported in WebIframeInAppMessageBridge")},e.prototype.fetch=function(){return c.log.warn("fetch is not supported in WebIframeInAppMessageBridge"),Promise.resolve()},e}(),yR=function(){function e(){}return e.createWebIframe=function(e){return new yU(e)},e}(),yU=function(){function e(e){this.hackleClientSupplier=e}return e.prototype.create=function(e){return new yC(this.hackleClientSupplier(),e)},e}(),yk=function(){function e(e,t){void 0===t&&(t=1e3);var r=new fS,n=new fK,i=new fH(n,t);this.compositeManager=new dZ(r,n,i,e),this.compositeManager.addLifecycleListener(this.compositeManager.pageManager)}return e.prototype.addPageListener=function(e){this.compositeManager.addPageListener(e)},e.prototype.addEngagementListener=function(e){this.compositeManager.addEngagementListener(e)},e.prototype.addLifecycleListener=function(e){this.compositeManager.addLifecycleListener(e)},e.prototype.initialize=function(){this.compositeManager.initialize()},e}(),yx=c.log,yD=new yn;function yL(e,t){var r,n,i,o,s,a,u,c,p,l,h,f,d,y,v,g=h7.config(t);h7.logging(g);var m=new fW,E=m.getBrowserProperties().browserName,w=new fK,b=new fS,T=new fH(w,1e3),I=new dZ(b,w,T,"string"==typeof E?E:null);try{if(rp(window)&&e===window._hackleApp.getAppSdkKey())return s=(r={sdkKey:e,browserConfig:g,hackleApp:window._hackleApp,lifecycleComposite:I,browserPropertyProvider:m,browserClientFactory:yF}).sdkKey,a=r.browserConfig,u=r.hackleApp,c=r.lifecycleComposite,p=r.browserPropertyProvider,l=r.browserClientFactory,h=yv(u),f=new yE(s,a,p,c,l,h),d=new yc(new yp(u)),y=null!=(o=null==(i=null==(n=u.getAppMode)?void 0:n.call(u))?void 0:i.toLowerCase())?o:ra.native,v=d.config(),f.create(y,v)}catch(e){yx.error("Unexpected exception while check WebApp client: ".concat(e))}return yF(e,g,I)}function yF(e,t,r){var n,i,o,s,a,u=h7.sdk(e,t),c=yD.getOrNull();if(c)return yx.debug("use already exists hackleClient"),c;var p=new rt;p.initialize();var l=new l8,h=re.getInstance({days:3650,isCrossSubdomain:!0,sameSite:t.sameSiteCookie,isSecure:t.secureCookie}),f=h7.isBeaconSupported(),d=fv.intercept(u,fg.create()),y=fv.intercept(u,fm.create()),v=d;f&&(v=y);var g=new fe,m=new ft(g,new fr("setTimeout"),h7.pollingIntervalMillis(t)),E=new fp(new fM(u,l7.postfix(l,"_".concat(e.slice(0,8)))),new fs(hr.clientFetch(t.sdkUrl,u.key),d));g.add(E);
1var w=new fu(hr.userTargets(t.sdkUrl),d),b=new fa(hr.userCohorts(t.sdkUrl),d),T=new hX(r.pageManager),I=new l3(l7.postfix(h,"_".concat(e))),A=I.getUser(),N=t.user||null,O=new l4(rr(),I,w,b,T,r.pageManager,_.instance,A,N);g.add(O);var M=new l9(t.sessionPolicy,l7.postfix(h,"_".concat(e.slice(8))));O.addListener(M);var P=new lK(l,"".concat("hackle-repository-storage","_").concat(e),100),S=new fh(hr.clientDispatch(t.eventUrl),d),C=S;f&&(C=new fh(hr.beaconDispatch(t.eventUrl,u.key),y));var R=new ff(P,S),U=new fl(S,C,R),k=new fk([new fD(h7.dedupIntervalMillis(t)),new fL(h7.dedupIntervalMillis(t))]),x=new dQ(t.optOutTracking),D=new fd(U,100,new fr("setTimeout"),500,x),L=new pA(D,k,M,O);x.addListener(L);var F=new dX(M),V=new d$(F);L.addDecorator(V);var K=new fO,B=new pD(new he(h,"".concat("hackle-manual-override_ab","_").concat(e.slice(0,8)))),H=new pD(new he(h,"".concat("hackle-manual-override_ff","_").concat(e.slice(0,8)))),G=new hn(l7.prefix(l,"".concat("hackle-iam-hide","_").concat(e.slice(0,8),"_"))),j=new hP(l7.prefix(l,"".concat("hackle-iam-impression","_").concat(e.slice(0,8),"_"))),W=new dA(_.instance),Y=new d_(W,L),J=lk.create(E,W,L,[B,H]),z=new fj(J,O),q=new hY(new hJ(l7.postfix(h,"_".concat(e.slice(0,8)))),T,J,O),X=new pI(O,J);M.addListener(q),M.addListener(X);var $=new hf(J),Z=new hi([new ho,new hs(new hV),new ha(new hV),new hu(G,_.instance),new hc(new hK),new hp(new hK),new hl(new hB),new hh(new hB)]),Q=new yN([new yO,new yM(Z),new yP,new yS]),ee=new hU(new hS([new hC($),new hR(Q)])),et=new hx([new hD,new hL(ee),new hF(ee)]),er=new hN(hr.inAppMessageRenderer(t.cdnUrl,t.IAM_RENDERER_VERSION_HEADER)),en=yR.createWebIframe(function(){return yD.get()}),ei=new hd(new d0([h_.create(er),ye.create(new yt(new yr(d)),en)]),ee,et,_.instance),eo=new f2(new f$(pF.get("delegatingEvaluator")),new f5,Y),es=new f7(ei,new f6(j)),ea=new de,eu=new dW(G,j,eo),ec=new dz(J,eo),ep=new dt(_.instance,new fr("setTimeout")),el=new dI(l7.prefix(l,"".concat("hackle-campaign-delay","_").concat(e.slice(0,8),"_"))),eh=new di(ep,new Map,el),ef=new dJ(J,eu,Y),ed=new dc(E,O,ea,ec,ef,es,F),ey=[new dd(ed,eh),new dy(ed,eh),new dq(ed,eh)],ev=new dv(new dg,new dp(ey));ep.listener=ev;var eg=new db(new dE(E,new hk(new hO(pF.get("targetMatcher"))),ef),new dw(ev)),em=new fX(ev,el,eg,new dT(ea,eh),D,_.instance);O.addListener(em),new h5(D,new h6(E));var eE=new fG(J,O);r.addEngagementListener(eE);var ew=new fV(J,O);t.automaticPageTracking&&r.addPageListener(ew),t.automaticRouteTracking&&r.addLifecycleListener(r.pageManager);var eb=new fT(pF.get("targetMatcher")),eT=new fN(h,"hackle-split-url-redirected",{days:3472222222222222e-20}),eI=new fE(new fb(E,eb,eT,J),new fA(new f_(T),new hH,eT,K),O,J);r.addPageListener(eI);var eA=new ht(J,O,B,H),e_=(null==(s=t.devTool)?void 0:s.userExplorer)&&"function"==typeof(null==(a=t.devTool)?void 0:a.userExplorer),eN=t.devTool&&e_?{manager:t.devTool,userExplorer:eA}:void 0;if(t.enableMonitoring){var eO=new tM(hr.monitoring(t.monitoringUrl),d,v,new fr("setTimeout"),6e4);tb.addRegistry(eO),r.addLifecycleListener(eO)}r.addLifecycleListener(M),r.addLifecycleListener(p),r.addLifecycleListener(R),r.addLifecycleListener(L),m.start();var eM=new t6(J,m,M,O,z,fC.create(6e4,1),r.pageManager,ei,x,eN);return yD.set(eM),(new lD).install(J,O),n=Date.now(),i=O.currentUser,o=M.currentSessionId,(A?M.startNewSessionIfNeeded({oldUser:A,newUser:i,timestamp:n}):M.startNewSession(null,i,n))===o&&q.startNewCampaignIfNeeded(i,n),eM.onReady(function(){t.autoOpenDevTool&&(t.devTool?eM.showUserExplorer():yx.error("DevTool is not provided")),r.initialize(),K.dispatchDoneEventIfNeeded(),em.loadDelaySchedule()}),eM}t.Bucket=K,t.Cohort=e8,t.Container=ee,t.ContainerGroup=et,t.CoreVersion=es,t.Decision=R,t.DecisionReason=D,t.DefaultBrowserPropertyProvider=fW,t.Delay=e3,t.EXPERIMENT_IMPLEMENTATION_TYPE=L,t.EmptyHackleRemoteConfig=k,t.EmptyParameterConfig=N,t.EventType=H,t.Experiment=F,t.FeatureFlagDecision=U,t.HackleSessionPersistConditions=h9,t.HackleSubscriptionOperations=d5,t.HackleSubscriptionOperationsBuilder=d3,t.IAM_ACTION_AREA=["BUTTON","IMAGE","MESSAGE","X_BUTTON"],t.IAM_ACTION_TYPE=eT,t.IAM_BEHAVIOR=eb,t.IAM_DISPLAY_TYPE=em,t.IAM_HORIZONTAL_ALIGNMENT=eA,t.IAM_HTML_RESOURCE_TYPE=eN,t.IAM_LAYOUT_TYPE=eE,t.IAM_ORIENTATION=ew,t.IAM_PLATFORM_TYPE=ev,t.IAM_STATUS=ey,t.IAM_TIMETABLE_TYPE=e_,t.IAM_TIMEUNIT=eg,t.IAM_VERTICAL_ALIGNMENT=eI,t.IdentifierType=G,t.IdentifiersBuilder=W,t.InAppMessage=eO,t.InAppMessageAction=e1,t.InAppMessageAfterCondition=e4,t.InAppMessageAlignment=eW,t.InAppMessageBackgroun
1d=e0,t.InAppMessageButton=e$,t.InAppMessageButtonStyle=eQ,t.InAppMessageContext=eB,t.InAppMessageContextLayout=ej,t.InAppMessageContextMessage=eG,t.InAppMessageDurationCap=eF,t.InAppMessageEvaluateContext=e2,t.InAppMessageEventFrequencyCap=eD,t.InAppMessageEventTrigger=ek,t.InAppMessageEventTriggerRule=ex,t.InAppMessageExperimentContext=eH,t.InAppMessageHtmlFactory=e9,t.InAppMessageHtmlPath=e6,t.InAppMessageHtmlText=e5,t.InAppMessageIdentifierCap=eL,t.InAppMessageImage=eY,t.InAppMessageImageAutoScroll=eJ,t.InAppMessagePeriodAlways=eM,t.InAppMessagePeriodCustom=eP,t.InAppMessagePositionalButton=eZ,t.InAppMessageTargetContext=eV,t.InAppMessageText=ez,t.InAppMessageTextAttribute=eq,t.InAppMessageTextStyle=eX,t.InAppMessageTimetable=eS,t.InAppMessageTimetableAll=eC,t.InAppMessageTimetableCustom=eR,t.InAppMessageTimetableSlot=eU,t.InAppMessageUserOverride=eK,t.Logger=c,t.MATCH_OPERATORS=ep,t.MATCH_TYPES=eu,t.MATCH_VALUE_TYPES=ec,t.MetaVersion=ea,t.ParameterConfiguration=x,t.PropertyOperations=tz,t.PropertyOperationsBuilder=tJ,t.RemoteConfigDecision=C,t.RemoteConfigParameter=er,t.RemoteConfigParameterValue=ei,t.RemoteConfigTargetRule=en,t.SEGMENT_TYPES=ef,t.Segment=Q,t.Slot=B,t.SplitUrlConfig=e7,t.SplitUrlTargets=te,t.TARGET_ACTION_TYPES=el,t.TARGET_KEY_TYPES=eh,t.Target=J,t.TargetAction=$,t.TargetCondition=z,t.TargetKey=q,t.TargetMatch=X,t.TargetRule=Z,t.TargetingType=ed,t.UserTargetEvent=tt,t.Variation=V,t.Version=eo,t.WebViewLifecycleCompositeManager=yk,t.createInstance=yL,t.default={createInstance:yL,getUserId:rr,setUserId:rn,removeUserId:ri,Logger:c},t.getUserId=rr,t.removeUserId=ri,t.resolveIdentifiers=j,t.sanitizeUser=Y,t.setAppWebViewInAppMessageBridge=function(){!function(e){var t=e.targetWindow,r=e.createClientBySdkKey;if(d9.isBridgeInstalled(t))y_.debug("AppWebViewInAppMessageBridge is already installed");else{var n=function(){var e,n;try{if(!rp(t))throw Error("AppWebViewInAppMessageBridge is only supported in WebApp integrated environment");var i=t._hackleApp,o=new fW,s=yv(i),a=r(i.getAppSdkKey()),u=null==(e=i.getInAppMessageViewId)?void 0:e.call(i);if(!u)throw Error("ViewId is not found");var c=function(e){if(e){var t;try{t=JSON.parse(e)}catch(e){return void y_.error("Failed to parse trigger event: ".concat(e))}if(null!==t&&"object"==typeof t&&!Array.isArray(t)&&"string"==typeof t.key)return{key:t.key,value:t.value,properties:t.properties};y_.error("Invalid trigger event shape: ".concat(e))}}(null==(n=i.getInAppMessageTriggerEvent)?void 0:n.call(i));return new yA(u,a,s,o,c)}catch(e){return y_.error("Failed to install AppWebViewInAppMessageBridge: ".concat(e)),new yw}}();d9.install(t,n)}}({targetWindow:window,createClientBySdkKey:function(e){return yL(e)}})},t.setUserId=rn}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.