1"use strict";(globalThis["webpackChunkgk_jss_app"]=globalThis["webpackChunkgk_jss_app"]||[]).push([[7017],{97017:(t,e,s)=>{s.d(e,{default:()=>y});var i=s(25),r=s(16238),h=s(94188),n=s(90663),l=s(2861),o=s(74956),u=s(49303),a=s(73220);class f extends a.z{constructor(t,e=!1,s={},i){super(s),this.id=t,this.enabled=e,this.trackingString=i,this.id=t,this.enabled=e,this.trackingString=i}dt(){const t={};return t[f.ss.rs]=this.id,t[f.ss.Fe]=this.enabled,t[f.ss.we]=this.properties,t[f.ss.xe]=this.trackingString,t}}function d(t){if(t[f.ui.rs]&&"boolean"==typeof t[f.ui.Fe])return new f(t[f.ui.rs],t[f.ui.Fe],t[f.ui.we],t[f.ui.xe]);r.A.info(`Unable to create feature flag from ${JSON.stringify(t,null,2)}`)}function c(t){if(t[f.ss.rs]&&"boolean"==typeof t[f.ss.Fe])return new f(t[f.ss.rs],t[f.ss.Fe],t[f.ss.we],t[f.ss.xe]);r.A.info(`Unable to deserialize feature flag from ${JSON.stringify(t,null,2)}`)}f.ss={rs:"id",Fe:"e",we:"pr",xe:"fts"},f.ui={rs:"id",Fe:"enabled",we:"properties",xe:"fts"};var g=s(47927);class v extends h.A{constructor(t,e,s,r){super(),this.h=t,this.B=e,this.j=s,this.C=r,this.he=[],this.je=0,this.h=t,this.B=e,this.j=s,this.C=r,this.ye=null,this.Ce=new l.A,this.S=10,this.T=null,this.I=null,i.Ay.q(this.Ce)}N(t){var e;if((null===(e=this.h)||void 0===e?void 0:e.Re())&&null!=t&&t.feature_flags){this.he=[];for(const e of t.feature_flags){const t=d(e);t&&this.he.push(t)}this.je=(new Date).getTime(),this.Te(),this.Ce.L(this.he)}}De(){let t={};this.j&&(t=this.j.lt(n.d.ct.Ie));const e={};for(const s in t){const i=c(t[s]);i&&(e[i.id]=i)}return e}Se(){var t;return(null===(t=this.j)||void 0===t?void 0:t.lt(n.d.ct.qe))||{}}Ne(t){this.j&&this.j.ft(n.d.ct.qe,t)}St(t){return this.Ce.wt(t)}refreshFeatureFlags(t,e,s=!1,i=!0){const r=()=>{"function"==typeof e&&e(),this.Ce.L(this.he)};if(!this.ze(s))return!this.ye&&this.h&&(this.ye=this.h.Ue((()=>{this.refreshFeatureFlags(t,e)}))),void r();const h=this.B;if(!h)return void r();i&&this.X();const n=h.$({},!0),l=h.A(n,g.A.H.$e);let a=!1;h.J(n,((i=-1)=>{const h=this.B;if(!h)return void r();const f=(new Date).valueOf();g.A.K(this.j,g.A.H.$e,f),-1!==i&&l.push(["X-Braze-Req-Tokens-Remaining",i.toString()]),u.A.O({url:`${h.V()}/feature_flags/sync`,headers:l,data:n,W:e=>{if(!h.Y(n,e,l))return a=!0,void r();h.Z(),this.N(e),a=!1,"function"==typeof t&&t()},error:t=>{h._(t,"retrieving feature flags"),a=!0,r()},tt:(i,r)=>{let n;if(a){let t=this.T;(null==t||t<1e3*this.S)&&(t=1e3*this.S),n=Math.min(3e5,(0,o.C)(1e3*this.S,3*t))}h.st(r,(()=>{this.refreshFeatureFlags(t,e,s,!0)}),g.A.H.$e,(t=>this.it(t)),(()=>this.X()),n)}})}),g.A.H.$e,e)}X(){null!=this.I&&(clearTimeout(this.I),this.I=null)}it(t){this.X(),this.I=t}ze(t){if(!this.h)return!1;if(!t){const t=this.h.ke();if(null==t)return!1;let e=!1;if(!isNaN(t)){if(-1===t)return r.A.info("Feature flag refreshes not allowed"),!1;e=(new Date).getTime()>=(this.je||0)+1e3*t}if(!e)return r.A.info(`Feature flag refreshes were rate limited to ${t} seconds`),!1}return this.h.Re()}Be(){var t;return(null===(t=this.j)||void 0===t?void 0:t.lt(n.d.ct.Me))||null}Xe(){var t,e;null===(t=this.j)||void 0===t||t.ft(n.d.ct.Me,null===(e=this.C)||void 0===e?void 0:e.bt())}_e(){var t;const e=null===(t=this.C)||void 0===t?void 0:t.bt(),s=this.Be();return null==s||e===s}Te(){if(!this.j)return;const t={};for(const e of this.he){const s=e.dt();t[e.id]=s}this.j.ft(n.d.ct.Ie,t),this.j.ft(n.d.ct.Ae,this.je),this.Xe()}changeUser(){this.X()}clearData(){this.X()}}const p={i:!1,provider:null,o:()=>(p.t(),p.provider||(p.provider=new v(i.Ay.l(),i.Ay.m(),i.Ay.p(),i.Ay.u()),i.Ay.v(p.provider)),p.provider),t:()=>{p.i||(i.Ay.g(p),p.i=!0)},destroy:()=>{p.provider=null,p.i=!1}},A=p;function j(t,e,s=!1){if(i.Ay.rr())return A.o().refreshFeatureFlags(t,e,s)}const y=j}}]); 2//# sourceMappingURL=7017.9cb297d3.js.map
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.