PageSourceSearch

https://www.hoopladigital.com/_next/static/chunks/6541.3093773c4608c7cf.js

js hoopladigital.com collected 2026-09-24 08:41:44 UTC 4,647 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6541],{6541:function(e,t,i){i.r(t),i.d(t,{default:function(){return c},refreshFeatureFlags:function(){return v}});var r=i(61844),s=i(38844),n=i(67825),l=i(89380),h=i(82401),u=i(87681),o=i(61131);class a{constructor(e,t=!1,i={},r){this.id=e,this.enabled=t,this.properties=i,this.trackingString=r,this.id=e,this.enabled=t,this.properties=i,this.trackingString=r}he(e,t,i){let r=this.properties[e];return null==r?(this.ye(e),null):t(r)?r.value:(this.Pe(i),null)}getStringProperty(e){return this.he(e,this.be,"string")}getNumberProperty(e){return this.he(e,this.Ie,"number")}getBooleanProperty(e){return this.he(e,this.de,"boolean")}getImageProperty(e){return this.he(e,this.Te,"image")}getJsonProperty(e){return this.he(e,this.Ee,"jsonobject")}getTimestampProperty(e){return this.he(e,this.Ne,"datetime")}bs(){let e={};return e[a.qt.Et]=this.id,e[a.qt.le]=this.enabled,e[a.qt.pe]=this.properties,e[a.qt.Fe]=this.trackingString,e}Pe(e){s.Z.info(`Property is not of type ${e}.`)}ye(e){s.Z.info(`${e} not found in feature flag properties.`)}be(e){return"string"===e.type&&"string"==typeof e.value}Ie(e){return"number"===e.type&&"number"==typeof e.value}de(e){return"boolean"===e.type&&"boolean"==typeof e.value}Te(e){return"image"===e.type&&"string"==typeof e.value}Ee(e){return"jsonobject"===e.type&&"object"==typeof e.value&&e.value.constructor==Object}Ne(e){return"datetime"===e.type&&"number"==typeof e.value}}a.qt={Et:"id",le:"e",pe:"pr",Fe:"fts"},a.li={Et:"id",le:"enabled",pe:"properties",Fe:"fts"};var f=i(14548);class p extends n.Z{constructor(e,t,i,s){super(),this.B=e,this.S=t,this.C=i,this.T=s,this.je=[],this.we=0,this.B=e,this.S=t,this.C=i,this.T=s,this.Ce=null,this.Re=new h.Z,this.R=10,this.I=null,this.q=null,r.ZP.N(this.Re)}U(e){var t;if((null===(t=this.B)||void 0===t?void 0:t.De())&&null!=e&&e.feature_flags){for(let t of(this.je=[],e.feature_flags)){let e=function(e){if(e[a.li.Et]&&"boolean"==typeof e[a.li.le])return new a(e[a.li.Et],e[a.li.le],e[a.li.pe],e[a.li.Fe]);s.Z.info(`Unable to create feature flag from ${JSON.stringify(e,null,2)}`)}(t);e&&this.je.push(e)}this.we=new Date().getTime(),this.Se(),this.Re.X(this.je)}}qe(){let e={};this.C&&(e=this.C.vs(l.I.gs.xe));let t={};for(let i in e){let r=function(e){if(e[a.qt.Et]&&"boolean"==typeof e[a.qt.le])return new a(e[a.qt.Et],e[a.qt.le],e[a.qt.pe],e[a.qt.Fe]);s.Z.info(`Unable to deserialize feature flag from ${JSON.stringify(e,null,2)}`)}(e[i]);r&&(t[r.id]=r)}return t}ze(){var e;return(null===(e=this.C)||void 0===e?void 0:e.vs(l.I.gs.$e))||{}}ke(e){this.C&&this.C.Bs(l.I.gs.$e,e)}qs(e){return this.Re.Fs(e)}refreshFeatureFlags(e,t,i=!1,r=!0){let s=()=>{"function"==typeof t&&t(),this.Re.X(this.je)};if(!this.Be(i))return!this.Ce&&this.B&&(this.Ce=this.B.Me(()=>{this.refreshFeatureFlags(e,t)})),void s();let n=this.S;if(!n)return void s();r&&this.G();let l=n.H({},!0),h=n.J(l,f.Z.O.Ue),a=!1;n.V(l,(r=-1)=>{let n=this.S;if(!n)return void s();let p=new Date().valueOf();f.Z.W(this.C,f.Z.O.Ue,p),-1!==r&&h.push(["X-Braze-Req-Tokens-Remaining",r.toString()]),o.Z.Y({url:`${n.Z()}/feature_flags/sync`,headers:h,data:l,ss:t=>{if(!n.ts(l,t,h))return a=!0,void s();n.es(),this.U(t),a=!1,"function"==typeof e&&e()},error:e=>{n.ns(e,"retrieving feature flags"),a=!0,s()},rs:(r,s)=>{let l;if(a){let e=this.I;(null==e||e<1e3*this.R)&&(e=1e3*this.R),l=Math.min(3e5,(0,u.R)(1e3*this.R,3*e))}n.os(s,()=>{this.refreshFeatureFlags(e,t,i,!0)},f.Z.O.Ue,e=>this.hs(e),()=>this.G(),l)}})},f.Z.O.Ue,t)}G(){null!=this.q&&(clearTimeout(this.q),this.q=null)}hs(e){this.G(),this.q=e}Be(e){if(!this.B)return!1;if(!e){let e=this.B.Xe();if(null==e)return!1;let t=!1;if(!isNaN(e)){if(-1===e)return s.Z.info("Feature flag refreshes not allowed"),!1;t=new Date().getTime()>=(this.we||0)+1e3*e}if(!t)return s.Z.info(`Feature flag refreshes were rate limited to ${e} seconds`),!1}return this.B.De()}_e(){var e;return(null===(e=this.C)||void 0===e?void 0:e.vs(l.I.gs.Ae))||null}Ge(){var e,t;null===(e=this.C)||void 0===e||e.Bs(l.I.gs.Ae,null===(t=this.T)||void 0===t?void 0:t.Ss())}He(){var e;let t=null===(e=this.T)||void 0===e?void 0:e.Ss(),i=this._e();return null==i||t===i}Se(){if(!this.C)return;let e={};for(let t of this.je){let i=t.bs();e[t.id]=i}this.C.Bs(l.I.gs.xe,e),this.C.Bs(l.I.gs.Je,this.we),this.Ge()}}let g={l:!1,provider:null,m:()=>(g.p(),g.provider||(g.provider=new p(r.ZP.v(),r.ZP.g(),r.ZP.j(),r.ZP.P()),r.ZP._(g.provider)),g.provider),p:()=>{g.l||(r.ZP.h(g),g.l=!0)},destroy:()=>{g.provider=null,g.l=!1}};function d(e,t,i=!1){if(r.ZP.rr())return g.m().refreshFeatureFlags(e,t,i)}function v(e,t){d(e,t)}var c=d}}]);

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.