@launchdarkly/observability 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +57 -57
- package/CHANGELOG.md +0 -438
package/dist/index.umd.js
CHANGED
|
@@ -275,7 +275,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
277
|
${Vo}
|
|
278
|
-
`,Kl=(t,e,n,r)=>t();function Wl(t,e=Kl){return{PushPayload(n,r){return e(i=>t.request(Bl,n,N(N({},r),i)),"PushPayload","mutation",n)},PushSessionEvents(n,r){return e(i=>t.request($l,n,N(N({},r),i)),"PushSessionEvents","mutation",n)},identifySession(n,r){return e(i=>t.request(Fl,n,N(N({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(Vl,n,N(N({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(Hl,n,N(N({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(Gl,n,N(N({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(ql,n,N(N({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(zl,n,N(N({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(Xl,n,N(N({},r),i)),"GetSamplingConfig","query",n)}}}function Yl(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}function Jl(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(t)+")"),e=n+(e?">"+e:""),t=r}return e}function _r(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ho(t,e){if(e===0)return!0;const n=Object.keys(t);for(const r of n)if(_r(t[r])&&Ho(t[r],e-1))return!0;return!1}function gr(t,e){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);const r=[],i=[];return JSON.stringify(t,function(u,c){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?i.splice(s,1/0,u):i.push(u),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=Jl(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return _r(u)&&Object.keys(u).length>n.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(_r(u)&&Ho(u,n.depthOfLimit))}function a(u){let c=u.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}function Ql(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const Er="exception.message",Zl="exception.stacktrace",Tr="exception.type",Go="http.response.status_code",tp="server.address",ep="service.name",np="service.version",rp="telemetry.sdk.name",ip="telemetry.sdk.version",Re="url.full",qo="url.path",op="url.query",ap="user_agent.original",br=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function yn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var sp={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Or(t,e){function n(i,o,a){if(typeof document<"u"){a=yn({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+u}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=t.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",yn({},o,{expires:-1}))},withAttributes:function(i){return Or(this.converter,yn({},this.attributes,i))},withConverter:function(i){return Or(yn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Sr=Or(sp,{path:"/"});let wr="localStorage",Ar=!0,up=class{constructor(){Oe(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(e){var n;return(n=Object.keys(this.storage)[e])!=null?n:null}getItem(e){var n;return(n=this.storage[e])!=null?n:""}setItem(e,n){this.storage[e]=n}removeItem(e){delete this.storage[e]}},cp=class{getItem(e){var n;return(n=Sr.get(e))!=null?n:""}setItem(e,n){if(!Ar)return;const r=new Date;r.setTime(r.getTime()+br),Sr.set(e,n,{expires:r})}removeItem(e){Ar&&Sr.remove(e)}};const re=new up,mn=new cp,Ce=()=>{let t=null;if(typeof window>"u")return re;try{switch(wr){case"localStorage":t=window.localStorage;break;case"sessionStorage":t=window.sessionStorage;break}t||(bt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${wr}; using global storage`),t=re)}catch(e){bt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",e),t=re}return t},lp=t=>{wr=t},zo=t=>{Ar=t},Lr=t=>{try{return Ce().getItem(t)}catch(e){return bt("storage","getItem","debug",`failed to get item ${t}; using global storage`,e),re.getItem(t)}},Xo=(t,e)=>{mn.setItem(t,e);try{return Ce().setItem(t,e)}catch(n){return bt("storage","setItem","debug",`failed to set item ${t}; using global storage`,n),re.setItem(t,e)}},Ko=t=>{mn.removeItem(t);try{return Ce().removeItem(t)}catch(e){return bt("storage","removeItem","debug",`failed to remove item ${t}; using global storage`,e),re.removeItem(t)}};var ie=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(ie||{});const _n=t=>`${ie.SESSION_DATA}_${t}`,Ot=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Wo()},pp=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Wo=()=>{var t;return(t=Lr(ie.SESSION_ID))!=null?t:""},Yo=t=>{Xo(ie.SESSION_ID,t)},fp=t=>{const e=_n(t);return JSON.parse(Lr(e)||"{}")},hp=t=>{t||(t=Wo());let e=fp(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<br)return e;Ko(_n(t))},Jo=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;pp(e);const n=_n(e);Xo(n,JSON.stringify(t)),vp(n)},dp=function(){const t=mn.getItem(ie.SESSION_ID);Yo(t);const e=_n(t),n=mn.getItem(e);try{Jo(JSON.parse(n))}catch{}};function vp(t){const e=`${ie.SESSION_DATA}_`;for(let n=Ce().length-1;n>=0;n--){const r=Ce().key(n);if(r&&r.startsWith(e)&&r!==t)try{const i=JSON.parse(Lr(r)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=br&&(bt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${r}`),Ko(r))}catch(i){bt("highlightSession","pruneSessionData","error",`failed to parse session data for key ${r}`,i)}}}var Qo=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Qo||{});const Rr=3,Cr=1e3,Nr=500,yp=[Qo.BillingQuotaExceeded.toString()],mp=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>yp.includes(n.message)))===void 0},_p=()=>{const t=(e,n,r,i,o=0)=>Zt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof jo&&!mp(a))throw a;if(o<Rr)return yield new Promise(u=>setTimeout(u,Cr+Nr*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return t},J="feature_flag",Zo="launchdarkly",gp="evaluation",Ep=`${J}.set.id`,Tp=`${J}.key`,bp=`${J}.contextKeys`,Op=`${J}.context.id`,Sp=`${J}.result.value`,wp=`${J}.provider.name`,ta={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},Ap=`${J}.result.variationIndex`,Lp=`${Zo}.application.id`,Rp=`${Zo}.application.version`,Cp="$ld:telemetry:session:init",ea="$ld:telemetry:track",Np="document_load",xp="result.status";function na(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function ra(t){return t.kind==="multi"}function xr(t){return ra(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${na(t[e].key)}`).join(":"):"kind"in t&&t.kind==="user"?t.key:"kind"in t?`${t.kind}:${na(t.key)}`:t.key}function ia(t){return ra(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:t[e].key})).reduce((e,n)=>N(N({},e),n),{}):"kind"in t?{[t.kind]:t.key}:{user:t.key}}let Pp=class{constructor(e,n){Oe(this,"client"),Oe(this,"metadata"),this.client=e,this.metadata=n}getHooks(e){return[]}init(e){this.client.track(Cp,{sessionID:e})}recordGauge(e,n){}identify(e,n,r={},i){}error(e,n){}track(e,n){const r=n.event;this.client.track(r?`${ea}:${r}`:ea,on(N({},n),{sessionID:e}))}},Ip=class extends _o{constructor(e,n){super(),Oe(this,"client"),this.client=new Pp(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this._bufferCall("init",[e])}recordGauge(e,n){return this._bufferCall("recordGauge",[e,n])}identify(e,n,r={},i){return this._bufferCall("identify",[e,n,r,i])}error(e,n){return this._bufferCall("error",[e,n])}track(e,n){return this._bufferCall("track",[e,n])}};const Mp="9.27.1",kp={version:Mp},Dp=kp.version;function Up(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(const n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}const jp=t=>{let e;const n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var oa={exports:{}};/**
|
|
278
|
+
`,Kl=(t,e,n,r)=>t();function Wl(t,e=Kl){return{PushPayload(n,r){return e(i=>t.request(Bl,n,N(N({},r),i)),"PushPayload","mutation",n)},PushSessionEvents(n,r){return e(i=>t.request($l,n,N(N({},r),i)),"PushSessionEvents","mutation",n)},identifySession(n,r){return e(i=>t.request(Fl,n,N(N({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(Vl,n,N(N({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(Hl,n,N(N({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(Gl,n,N(N({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(ql,n,N(N({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(zl,n,N(N({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(Xl,n,N(N({},r),i)),"GetSamplingConfig","query",n)}}}function Yl(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}function Jl(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(t)+")"),e=n+(e?">"+e:""),t=r}return e}function _r(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ho(t,e){if(e===0)return!0;const n=Object.keys(t);for(const r of n)if(_r(t[r])&&Ho(t[r],e-1))return!0;return!1}function gr(t,e){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);const r=[],i=[];return JSON.stringify(t,function(u,c){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?i.splice(s,1/0,u):i.push(u),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=Jl(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return _r(u)&&Object.keys(u).length>n.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(_r(u)&&Ho(u,n.depthOfLimit))}function a(u){let c=u.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}function Ql(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const Er="exception.message",Zl="exception.stacktrace",Tr="exception.type",Go="http.response.status_code",tp="server.address",ep="service.name",np="service.version",rp="telemetry.sdk.name",ip="telemetry.sdk.version",Re="url.full",qo="url.path",op="url.query",ap="user_agent.original",br=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function yn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var sp={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Or(t,e){function n(i,o,a){if(typeof document<"u"){a=yn({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+u}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=t.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",yn({},o,{expires:-1}))},withAttributes:function(i){return Or(this.converter,yn({},this.attributes,i))},withConverter:function(i){return Or(yn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Sr=Or(sp,{path:"/"});let wr="localStorage",Ar=!0,up=class{constructor(){Oe(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(e){var n;return(n=Object.keys(this.storage)[e])!=null?n:null}getItem(e){var n;return(n=this.storage[e])!=null?n:""}setItem(e,n){this.storage[e]=n}removeItem(e){delete this.storage[e]}},cp=class{getItem(e){var n;return(n=Sr.get(e))!=null?n:""}setItem(e,n){if(!Ar)return;const r=new Date;r.setTime(r.getTime()+br),Sr.set(e,n,{expires:r})}removeItem(e){Ar&&Sr.remove(e)}};const re=new up,mn=new cp,Ce=()=>{let t=null;if(typeof window>"u")return re;try{switch(wr){case"localStorage":t=window.localStorage;break;case"sessionStorage":t=window.sessionStorage;break}t||(bt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${wr}; using global storage`),t=re)}catch(e){bt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",e),t=re}return t},lp=t=>{wr=t},zo=t=>{Ar=t},Lr=t=>{try{return Ce().getItem(t)}catch(e){return bt("storage","getItem","debug",`failed to get item ${t}; using global storage`,e),re.getItem(t)}},Xo=(t,e)=>{mn.setItem(t,e);try{return Ce().setItem(t,e)}catch(n){return bt("storage","setItem","debug",`failed to set item ${t}; using global storage`,n),re.setItem(t,e)}},Ko=t=>{mn.removeItem(t);try{return Ce().removeItem(t)}catch(e){return bt("storage","removeItem","debug",`failed to remove item ${t}; using global storage`,e),re.removeItem(t)}};var ie=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(ie||{});const _n=t=>`${ie.SESSION_DATA}_${t}`,Ot=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Wo()},pp=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Wo=()=>{var t;return(t=Lr(ie.SESSION_ID))!=null?t:""},Yo=t=>{Xo(ie.SESSION_ID,t)},fp=t=>{const e=_n(t);return JSON.parse(Lr(e)||"{}")},hp=t=>{t||(t=Wo());let e=fp(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<br)return e;Ko(_n(t))},Jo=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;pp(e);const n=_n(e);Xo(n,JSON.stringify(t)),vp(n)},dp=function(){const t=mn.getItem(ie.SESSION_ID);Yo(t);const e=_n(t),n=mn.getItem(e);try{Jo(JSON.parse(n))}catch{}};function vp(t){const e=`${ie.SESSION_DATA}_`;for(let n=Ce().length-1;n>=0;n--){const r=Ce().key(n);if(r&&r.startsWith(e)&&r!==t)try{const i=JSON.parse(Lr(r)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=br&&(bt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${r}`),Ko(r))}catch(i){bt("highlightSession","pruneSessionData","error",`failed to parse session data for key ${r}`,i)}}}var Qo=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(Qo||{});const Rr=3,Cr=1e3,Nr=500,yp=[Qo.BillingQuotaExceeded.toString()],mp=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>yp.includes(n.message)))===void 0},_p=()=>{const t=(e,n,r,i,o=0)=>Zt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof jo&&!mp(a))throw a;if(o<Rr)return yield new Promise(u=>setTimeout(u,Cr+Nr*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return t},J="feature_flag",Zo="launchdarkly",gp="evaluation",Ep=`${J}.set.id`,Tp=`${J}.key`,bp=`${J}.contextKeys`,Op=`${J}.context.id`,Sp=`${J}.result.value`,wp=`${J}.provider.name`,ta={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},Ap=`${J}.result.variationIndex`,Lp=`${Zo}.application.id`,Rp=`${Zo}.application.version`,Cp="$ld:telemetry:session:init",ea="$ld:telemetry:track",Np="document_load",xp="result.status";function na(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function ra(t){return t.kind==="multi"}function xr(t){return ra(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${na(t[e].key)}`).join(":"):"kind"in t&&t.kind==="user"?t.key:"kind"in t?`${t.kind}:${na(t.key)}`:t.key}function ia(t){return ra(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:t[e].key})).reduce((e,n)=>N(N({},e),n),{}):"kind"in t?{[t.kind]:t.key}:{user:t.key}}let Pp=class{constructor(e,n){Oe(this,"client"),Oe(this,"metadata"),this.client=e,this.metadata=n}getHooks(e){return[]}init(e){this.client.track(Cp,{sessionID:e})}recordGauge(e,n){}identify(e,n,r={},i){}error(e,n){}track(e,n){const r=n.event;this.client.track(r?`${ea}:${r}`:ea,on(N({},n),{sessionID:e}))}},Ip=class extends _o{constructor(e,n){super(),Oe(this,"client"),this.client=new Pp(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this._bufferCall("init",[e])}recordGauge(e,n){return this._bufferCall("recordGauge",[e,n])}identify(e,n,r={},i){return this._bufferCall("identify",[e,n,r,i])}error(e,n){return this._bufferCall("error",[e,n])}track(e,n){return this._bufferCall("track",[e,n])}};const Mp="9.28.0",kp={version:Mp},Dp=kp.version;function Up(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(const n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}const jp=t=>{let e;const n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var oa={exports:{}};/**
|
|
279
279
|
* @preserve
|
|
280
280
|
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
281
281
|
*
|