1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[95525],{95525:(e,t,r)=>{let n;r.r(t),r.d(t,{evaluateTargeting:()=>ep});var a,o=r(91579),i=r(51920).Buffer,s=function(e,t){return(s=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)},c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function u(e,t,r,n){return new(r||(r=Promise))(function(a,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}c((n=n.apply(e,t||[])).next())})}function l(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){var u=[s,c];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}"function"==typeof SuppressedError&&SuppressedError;var h="is not",p="contains",v="does not contain",d="less",y="less or equal",g="greater",m="greater or equal",b="version less",w="version less or equal",x="version greater",_="version greater or equal",S="set is",A="set is not",C="set contains",T="set does not contain",E="set contains any",F="set does not contain any",k=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var a=e.charCodeAt(n);a<128?t[r++]=a:(a<2048?t[r++]=a>>6|192:((64512&a)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++n)),t[r++]=a>>18|240,t[r++]=a>>12&63|128):t[r++]=a>>12|224,t[r++]=a>>6&63|128),t[r++]=63&a|128)}return Uint8Array.from(t)},O=function(e,t){void 0===t&&(t=0);for(var r=k(e),n=r.length,a=n>>2,o=t,i=0;i<a;
1i++)o=N(M(r,i<<2),o);var s=a<<2,c=0;switch(n-s){case 3:c^=r[s+2]<<16,c^=r[s+1]<<8,c^=r[s],o^=c=Math.imul(c=j(c=Math.imul(c,-0x3361d2af),15),0x1b873593);break;case 2:c^=r[s+1]<<8,c^=r[s],o^=c=Math.imul(c=j(c=Math.imul(c,-0x3361d2af),15),0x1b873593);break;case 1:c^=r[s],o^=c=Math.imul(c=j(c=Math.imul(c,-0x3361d2af),15),0x1b873593)}return I(o^=n)>>>0},N=function(e,t){var r=e,n=t;return n^=r=Math.imul(r=j(r=Math.imul(r,-0x3361d2af),15),0x1b873593),(n=Math.imul(n=j(n,13),5))+-0x19ab949c|0},I=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-0x7a143595),t^=t>>>13,t=Math.imul(t,-0x3d4d51cb),t^=t>>>16},j=function(e,t,r){void 0===r&&(r=32),t>r&&(t%=r);var n=(e&0xffffffff<<r-t>>>0)>>>0>>>r-t>>>0;return(e<<t|n)>>>0},M=function(e,t){return void 0===t&&(t=0),R(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},R=function(e){return(-0x1000000&e)>>>24|(0xff0000&e)>>>8|(65280&e)<<8|(255&e)<<24},P=function(e,t){var r,n;if(t&&0!==t.length){try{for(var a=f(t),o=a.next();!o.done;o=a.next()){var i=o.value;if(!i||!e||"object"!=typeof e)return;e=e[i]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}if(!e)return;return e}},K="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),U=function(){function e(e,t,r,n){void 0===n&&(n=void 0),this.major=e,this.minor=t,this.patch=r,this.preRelease=n}return e.parse=function(t){if(t){var r=new RegExp(K).exec(t);if(r){var n=Number(r[1]),a=Number(r[2]);if(!(isNaN(n)||isNaN(a)))return new e(n,a,Number(r[4])||0,r[5]||void 0)}}},e.prototype.compareTo=function(e){if(this.major>e.major)return 1;if(this.major<e.major)return -1;if(this.minor>e.minor)return 1;if(this.minor<e.minor)return -1;if(this.patch>e.patch)return 1;if(this.patch<e.patch||this.preRelease&&!e.preRelease)return -1;if(!this.preRelease&&e.preRelease)return 1;if(this.preRelease&&e.preRelease){if(this.preRelease>e.preRelease)return 1;if(this.preRelease<e.preRelease)return -1}return 0},e}(),q=function(){function e(){}return e.prototype.evaluate=function(e,t){var r,n,a={},o={context:e,result:a};try{for(var i=f(t),s=i.next();!s.done;s=i.next()){var c=s.value,u=this.evaluateFlag(o,c);u&&(a[c.key]=u)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a},e.prototype.evaluateFlag=function(e,t){try{for(var r,n,a,o=f(t.segments),i=o.next();!i.done;i=o.next()){var s=i.value;if(a=this.evaluateSegment(e,t,s)){var u=c(c(c({},t.metadata),s.metadata),a.metadata);a=c(c({},a),{metadata:u});break}}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},e.prototype.evaluateSegment=function(e,t,r){var n,a,o,i;if(!r.conditions){var s=this.bucket(e,r);return void 0!==s?t.variants[s]:void 0}try{for(var c=f(r.conditions),u=c.next();!u.done;u=c.next()){var l=u.value,h=!0;try{for(var p=(o=void 0,f(l)),v=p.next();!v.done;v=p.next()){var d=v.value;if(!(h=this.matchCondition(e,d)))break}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(h){var s=this.bucket(e,r);if(void 0!==s)return t.variants[s];return}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}},e.prototype.matchCondition=function(e,t){var r=P(e,t.selector);if(!r)return this.matchNull(t.op,t.values);if(this.isSetOperator(t.op)){var n=this.coerceStringArray(r);return!!n&&this.matchSet(n,t.op,t.values)}var a=this.coerceString(r);return void 0!==a&&this.matchString(a,t.op,t.values)},e.prototype.getHash=function(e){return O(e)},e.prototype.bucket=function(e,t){if(!t.bucket)return t.variant;var r,n,a,o,i=this.coerceString(P(e,t.bucket.selector));if(!i||0===i.length)return t.variant;var s="".concat(t.bucket.salt,"/").concat(i),c=this.getHash(s),u=c%100,l=Math.floor(c/100);try{for(var h=f(t.bucket.allocations),p=h.next();!p.done;p=h.next()){var v=p.value,d=v.range[0],y=v.range[1];if(u>=d&&u<y)try{for(var g=(a=void 0,f(v.distributions)),m=g.next();!m.done;m=g.next()){var b=m.value,w=b.range[0],x=b.range[1];if(l>=w&&l<x)return b.variant}}catch(e){a={error:e}}finally{try{m&&!m.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}return t.variant},e.prototype.matchNull=function(e,t){var r=this.containsNone(t);switch(e){case"is":case p:case d:case y:case g:case m:case b:case w:case x:case _:case S:case C:case E:return r;case h:case v:case T:case F:return!r;default:return!1}},e.prototype.matchSet=function(e,t,r){switch(t){case S:return this.setEquals(e,r);case A:return!this.setEquals(e,r);case C:return this.matchesSetContainsAll(e,r);case T:return!this.matchesSetContainsAll(e,r);case E:return this.matchesSetContainsAny(e,r);case F:return!this.matchesSetContainsAny(e,r);default:return!1}},e.prototype.matchString=function(e,t,r){var n=this;switch(t){case"is":return this.matchesIs(e,r);case h:return!this.matchesIs(e,r);case p:return this.matchesContains(e,r);case v:return!this.matchesContains(e,r);case d:case y:case g:case m:return this.matchesComparable(e,t,r,function(e){return n.parseNumber(e)},this.comparator);case b:case w:case x:case _:return this.matchesComparable(e,t,r,function(e){return U.parse(e)},this.versionComparator);case"regex match":return this.matchesRegex(e,r);case"regex does not match":return!this.matchesRegex(e,r);default:return!1}},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var r=e.toLowerCase();if("true"===r||"false"===r)return t.some(function(e){return e.toLowerCase()===r})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var r,n;try{for(var a=f(t),o=a.next();!o.done;o=a.next()){var i=o.value;if(e.toLowerCase().includes(i.toLowerCase()))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!1},e.prototype.matchesComparable=function(e,t,r,n,a){var o=this,i=n(e),s=r.map(function(e){return n(e)}).filter(function(e){return void 0!==e});return void 0===i||0===s.length?r.some(function(r){return o.comparator(e,t,r)}):s.some(function(e){return a(i,t,e)})},e.prototype.comparator=function(e,t,r){switch(t){case d:case b:return e<r;case y:case w:return e<=r;case g:case x:return e>r;case m:case _:return e>=r;default:return!1}},e.prototype.versionComparator=function(e,t,r){var n=e.compareTo(r);switch(t){case d:case b:return n<0;case y:case w:return n<=0;case g:case x:return n>0;case m:case _:return n>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return!!new RegExp(t).exec(e)})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!=(t=Number(e))?t:void 0},e.prototype.coerceString=function(e){if(e)return"object"==typeof e?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e)){var r=e;return r.map(function(e){return t.coerceString(e)}
1).filter(Boolean)}var n=String(e);try{var a=JSON.parse(n);if(!Array.isArray(a))return;var r=e;return r.map(function(e){return t.coerceString(e)}).filter(Boolean)}catch(e){return}},e.prototype.isSetOperator=function(e){switch(e){case S:case A:case C:case T:case E:case F:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var r=new Set(e),n=new Set(t);return r.size===n.size&&(function(e,t,r){if(r||2==arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))})([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}(n),!1).every(function(e){return r.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var r,n;if(e.length<t.length)return!1;try{for(var a=f(t),o=a.next();!o.done;o=a.next()){var i=o.value;if(!this.matchesIs(i,e))return!1}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var r,n;try{for(var a=f(t),o=a.next();!o.done;o=a.next()){var i=o.value;if(this.matchesIs(i,e))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return!1},e}();let B="function"==typeof atob,D="function"==typeof btoa,z="function"==typeof i,L="function"==typeof TextDecoder?new TextDecoder:void 0,J="function"==typeof TextEncoder?new TextEncoder:void 0,X=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Z=(n={},X.forEach((e,t)=>n[e]=t),n),G=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,V=String.fromCharCode.bind(String),H="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),$=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),Q=D?e=>btoa(e):z?e=>i.from(e,"binary").toString("base64"):e=>{let t,r,n,a,o="",i=e.length%3;for(let i=0;i<e.length;){if((r=e.charCodeAt(i++))>255||(n=e.charCodeAt(i++))>255||(a=e.charCodeAt(i++))>255)throw TypeError("invalid character found");o+=X[(t=r<<16|n<<8|a)>>18&63]+X[t>>12&63]+X[t>>6&63]+X[63&t]}return i?o.slice(0,i-3)+"===".substring(i):o},W=z?e=>i.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(V.apply(null,e.subarray(r,r+4096)));return Q(t.join(""))},Y=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?V(192|t>>>6)+V(128|63&t):V(224|t>>>12&15)+V(128|t>>>6&63)+V(128|63&t)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return V(240|t>>>18&7)+V(128|t>>>12&63)+V(128|t>>>6&63)+V(128|63&t)},ee=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,et=z?e=>i.from(e,"utf8").toString("base64"):J?e=>W(J.encode(e)):e=>Q(e.replace(ee,Y)),er=(e,t=!1)=>t?$(et(e)):et(e),en=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ea=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return V((t>>>10)+55296)+V((1023&t)+56320);case 3:return V((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return V((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},eo=B?e=>atob(e.replace(/[^A-Za-z0-9\+\/]/g,"")):z?e=>i.from(e,"base64").toString("binary"):e=>{if(e=e.replace(/\s+/g,""),!G.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r="",n,a;for(let o=0;o<e.length;)t=Z[e.charAt(o++)]<<18|Z[e.charAt(o++)]<<12|(n=Z[e.charAt(o++)])<<6|(a=Z[e.charAt(o++)]),r+=64===n?V(t>>16&255):64===a?V(t>>16&255,t>>8&255):V(t>>16&255,t>>8&255,255&t);return r},ei=z?e=>H(i.from(e,"base64")):e=>H(eo(e).split("").map(e=>e.charCodeAt(0))),es=z?e=>i.from(e,"base64").toString("utf8"):L?e=>L.decode(ei(e)):e=>eo(e).replace(en,ea);var ec=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}function r(t,n){var a=e.call(this,n)||this;return a.statusCode=t,Object.setPrototypeOf(a,r.prototype),a}return s(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t),r}(Error);(function(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}).prototype.getVariants=function(e,t){return u(this,void 0,void 0,function(){var r,n,a;return l(this,function(o){switch(o.label){case 0:return r=er(JSON.stringify(e),!0),n={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":r},(null==t?void 0:t.flagKeys)&&(n["X-Amp-Exp-Flag-Keys"]=er(JSON.stringify(t.flagKeys),!0)),(null==t?void 0:t.trackingOption)&&(n["X-Amp-Exp-Track"]=t.trackingOption),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/vardata?v=0"),method:"GET",headers:n,timeoutMillis:null==t?void 0:t.t
1imeoutMillis})];case 1:if(200!=(a=o.sent()).status)throw new ec(a.status,"Fetch error response: status=".concat(a.status));return[2,JSON.parse(a.body)]}})})},(function(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}).prototype.getFlags=function(e){return u(this,void 0,void 0,function(){var t,r;return l(this,function(n){switch(n.label){case 0:return t={Authorization:"Api-Key ".concat(this.deploymentKey)},(null==e?void 0:e.libraryName)&&(null==e?void 0:e.libraryVersion)&&(t["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags"),method:"GET",headers:t,timeoutMillis:null==e?void 0:e.timeoutMillis})];case 1:if(200!=(r=n.sent()).status)throw Error("Flags error response: status=".concat(r.status));return[2,JSON.parse(r.body).reduce(function(e,t){return e[t.key]=t,e},{})]}})})};var eu="u">typeof globalThis?globalThis:r.g||self;function el(e,t){this.poller=void 0,this.action=e,this.ms=t}el.prototype.start=function(){this.poller||(this.poller=eu.setInterval(this.action,this.ms),this.action())},el.prototype.stop=function(){this.poller&&(eu.clearInterval(this.poller),this.poller=void 0)};var ef=r(82984),eh=new function(){var e=this;this.dbs={},this.createStore=function(t){return(0,o.__awaiter)(e,void 0,void 0,function(){return(0,o.__generator)(this,function(e){switch(e.label){case 0:return[4,(0,ef.P2)(t,1,{upgrade:function(e){e.objectStoreNames.contains("eventTypesForSession")||e.createObjectStore("eventTypesForSession",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return(0,o.__awaiter)(e,void 0,void 0,function(){var e,r;return(0,o.__generator)(this,function(n){switch(n.label){case 0:if(this.dbs&&this.dbs[t])return[2,this.dbs[t]];return e="".concat(t.substring(0,10),"_amp_targeting"),[4,this.createStore(e)];case 1:return r=n.sent(),this.dbs[t]=r,[2,r]}})})},this.updateEventListForSession=function(t){var r=t.sessionId,n=t.eventType,a=t.eventTime,i=t.loggerProvider,s=t.tx;return(0,o.__awaiter)(e,void 0,void 0,function(){var e,t,c,u,l,f,h;return(0,o.__generator)(this,function(p){switch(p.label){case 0:return p.trys.push([0,3,,4]),[4,s.store.get(r)];case 1:return c=(t=(e=p.sent())?e.eventTypes:{})[n]||{},u=(0,o.__assign)((0,o.__assign)({},t),((f={})[n]=(0,o.__assign)((0,o.__assign)({},c),((h={})[a]={event_type:n},h)),f)),[4,s.store.put({sessionId:r,eventTypes:u})];case 2:return p.sent(),[2,u];case 3:return l=p.sent(),i.warn("Failed to store events for targeting ".concat(r,": ").concat(l)),[3,4];case 4:return[2,void 0]}})})},this.deleteOldSessionEventTypes=function(t){var r=t.currentSessionId,n=t.loggerProvider,a=t.tx;return(0,o.__awaiter)(e,void 0,void 0,function(){var e,t,i,s,c;return(0,o.__generator)(this,function(o){switch(o.label){case 0:return o.trys.push([0,6,,7]),[4,a.store.getAll()];case 1:e=o.sent(),t=0,o.label=2;case 2:if(!(t<e.length))return[3,5];if(i=e[t],s=Date.now()-i.sessionId,!(i.sessionId!==r&&s>1728e5))return[3,4];return[4,a.store.delete(i.sessionId)];case 3:o.sent(),o.label=4;case 4:return t++,[3,2];case 5:return[3,7];case 6:return c=o.sent(),n.warn("Failed to clear old session events for targeting: ".concat(c)),[3,7];case 7:return[2]}})})},this.storeEventTypeForSession=function(t){var r=t.loggerProvider,n=t.sessionId,a=t.eventType,i=t.eventTime,s=t.apiKey;return(0,o.__awaiter)(e,void 0,void 0,function(){var e,t,c;return(0,o.__generator)(this,function(o){switch(o.label){case 0:return o.trys.push([0,5,,6]),[4,this.openOrCreateDB(s)];case 1:if(!(e=o.sent().transaction("eventTypesForSession","readwrite")))return[2];return[4,this.updateEventListForSession({sessionId:n,tx:e,loggerProvider:r,eventType:a,eventTime:i})];case 2:return t=o.sent(),[4,this.deleteOldSessionEventTypes({currentSessionId:n,tx:e,loggerProvider:r})];case 3:return o.sent(),[4,e.done];case 4:return o.sent(),[2,t];case 5:return c=o.sent(),r.warn("Failed to store events for targeting ".concat(n,": ").concat(c)),[3,6];case 6:return[2,void 0]}})})}},ep={evaluateTargeting:(a=new function(){var e=this;this.evaluateTargeting=function(t){var r=t.apiKey,n=t.loggerProvider,a=t.event,i=t.sessionId,s=t.userProperties,c=t.deviceId,u=t.flag;return(0,o.__awaiter)(e,void 0,void 0,function(){var e,t,l,f;return(0,o.__generator)(this,function(o){switch(o.label){case 0:if(!(a&&a.time))return[3,2];return[4,eh.storeEventTypeForSession({loggerProvider:n,apiKey:r,sessionId:i,eventType:a.event_type,eventTime:a.time})];case 1:return t=o.sent(),[3,3];case 2:t=void 0,o.label=3;case 3:return f={session_id:i,event:a,event_types:(l=(e=t)&&new Set(Object.keys(e)))&&Array.from(l),user:{device_id:c,user_properties:s}},[2,this.evaluationEngine.evaluate(f,[u])]}})})},this.evaluationEngine=new q}).evaluateTargeting.bind(a)}.evaluateTargeting}}]);
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.