@launchdarkly/session-replay 1.1.6 → 1.1.7

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { t as o, q as r } from "./index-DmBlfkX7.js";
1
+ import { t as o, q as r } from "./index-ggTLMSH6.js";
2
2
  export {
3
3
  o as LDRecord,
4
4
  r as default
package/dist/index.umd.js CHANGED
@@ -275,7 +275,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):l
275
275
  }
276
276
  }
277
277
  ${Zo}
278
- `,Ud=(e,t,i,n)=>e();function Kd(e,t=Ud){return{PushPayload(i,n){return t(s=>e.request(wd,i,B(B({},n),s)),"PushPayload","mutation",i)},PushSessionEvents(i,n){return t(s=>e.request(Io,i,B(B({},n),s)),"PushSessionEvents","mutation",i)},identifySession(i,n){return t(s=>e.request(xd,i,B(B({},n),s)),"identifySession","mutation",i)},addSessionProperties(i,n){return t(s=>e.request(Td,i,B(B({},n),s)),"addSessionProperties","mutation",i)},pushMetrics(i,n){return t(s=>e.request(Ld,i,B(B({},n),s)),"pushMetrics","mutation",i)},addSessionFeedback(i,n){return t(s=>e.request(Nd,i,B(B({},n),s)),"addSessionFeedback","mutation",i)},initializeSession(i,n){return t(s=>e.request(Jd,i,B(B({},n),s)),"initializeSession","mutation",i)},Ignore(i,n){return t(s=>e.request(Yd,i,B(B({},n),s)),"Ignore","query",i)},GetSamplingConfig(i,n){return t(s=>e.request(Fd,i,B(B({},n),s)),"GetSamplingConfig","query",i)}}}function Md(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function Od(){return Md()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const Ed="telemetry.sdk.name",zd="telemetry.sdk.version",So=1e3,Hd=1e3*2,Pd=4*60*60*1e3,us=15*60*1e3,Xo={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},Dd=100,Vo="app.highlight.io",Bd="https://app.launchdarkly.com",Qd={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},jd="/projects/default",Ad=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.5 | MIT */function Ji(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}var _d={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ds(e,t){function i(s,r,l){if(typeof document<"u"){l=Ji({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in l)l[a]&&(o+="; "+a,l[a]!==!0&&(o+="="+l[a].split(";")[0]));return document.cookie=s+"="+e.write(r,s)+o}}function n(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var r=document.cookie?document.cookie.split("; "):[],l={},o=0;o<r.length;o++){var a=r[o].split("="),c=a.slice(1).join("=");try{var u=decodeURIComponent(a[0]);if(l[u]=e.read(c,u),s===u)break}catch{}}return s?l[s]:l}}return Object.create({set:i,get:n,remove:function(s,r){i(s,"",Ji({},r,{expires:-1}))},withAttributes:function(s){return ds(this.converter,Ji({},this.attributes,s))},withConverter:function(s){return ds(Ji({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var hs=ds(_d,{path:"/"}),ps=(e=>(e.CLIENT_ID="highlightClientID",e))(ps||{});let Yi="localStorage",ms=!0,$d=class{constructor(){Kt(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var i;return(i=Object.keys(this.storage)[t])!=null?i:null}getItem(t){var i;return(i=this.storage[t])!=null?i:""}setItem(t,i){this.storage[t]=i}removeItem(t){delete this.storage[t]}},qd=class{getItem(t){var i;return(i=hs.get(t))!=null?i:""}setItem(t,i){if(!ms)return;const n=new Date;n.setTime(n.getTime()+us),hs.set(t,i,{expires:n})}removeItem(t){ms&&hs.remove(t)}};const gt=new $d,Fi=new qd,zt=()=>{let e=null;if(typeof window>"u")return gt;try{switch(Yi){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(it("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Yi}; using global storage`),e=gt)}catch(t){it("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=gt}return e},eh=e=>{Yi=e},Go=e=>{ms=e},Ge=e=>{try{return zt().getItem(e)}catch(t){return it("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),gt.getItem(e)}},Ee=(e,t)=>{Fi.setItem(e,t);try{return zt().setItem(e,t)}catch(i){return it("storage","setItem","debug",`failed to set item ${e}; using global storage`,i),gt.setItem(e,t)}},Ui=e=>{Fi.removeItem(e);try{return zt().removeItem(e)}catch(t){return it("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),gt.removeItem(e)}},th=e=>{if(Yi==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}if(typeof window>"u"){console.warn("highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[i,n]=arguments;e({keyName:i,keyValue:n}),t.apply(this,[i,n])}};var be=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(be||{});const Ki=e=>`${be.SESSION_DATA}_${e}`,ih=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Co()},nh=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Co=()=>{var e;return(e=Ge(be.SESSION_ID))!=null?e:""},Ht=e=>{Ee(be.SESSION_ID,e)},sh=e=>{const t=Ki(e);return JSON.parse(Ge(t)||"{}")},Mi=e=>{e||(e=Co());let t=sh(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<us)return t;Ui(Ki(e))},st=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;nh(t);const i=Ki(t);Ee(i,JSON.stringify(e)),oh(i)},rh=function(){const e=Fi.getItem(be.SESSION_ID);Ht(e);const t=Ki(e),i=Fi.getItem(t);try{st(JSON.parse(i))}catch{}};function oh(e){const t=`${be.SESSION_DATA}_`;for(let i=zt().length-1;i>=0;i--){const n=zt().key(i);if(n&&n.startsWith(t)&&n!==e)try{const s=JSON.parse(Ge(n)||"{}");s.lastPushTime!==void 0&&Date.now()-s.lastPushTime>=us&&(it("highlightSession","pruneSessionData","debug",`removing session data for stale key ${n}`),Ui(n))}catch(s){it("highlightSession","pruneSessionData","error",`failed to parse session data for key ${n}`,s)}}}var Ro=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(Ro||{});const lh=3,ah=1e3,ch=500,uh=[Ro.BillingQuotaExceeded.toString()],dh=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(i=>uh.includes(i.message)))===void 0},hh=()=>{const e=(t,i,n,s,r=0)=>pt(void 0,null,function*(){try{return yield t()}catch(l){if(l instanceof bt&&!dh(l))throw l;if(r<lh)return yield new Promise(o=>setTimeout(o,ah+ch*Math.pow(2,r))),yield e(t,i,n,s,r+1);throw console.error(`highlight.io: data request failed after ${r} retries`),l}});return e},Wo="feature_flag",vo="launchdarkly",ph=`${Wo}.set.id`,mh=`${Wo}.provider.name`,fh=`${vo}.application.id`,bh=`${vo}.application.version`,yh="$ld:telemetry:session:init",ko="$ld:telemetry:track";function wo(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function xo(e){return e.kind==="multi"}function To(e){return xo(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${wo(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${wo(e.key)}`:e.key}function gh(e){return xo(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,i)=>B(B({},t),i),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Zh=class{constructor(t,i){Kt(this,"client"),Kt(this,"metadata"),this.client=t,this.metadata=i}getHooks(t){return[]}init(t){this.client.track(yh,{sessionID:t})}recordGauge(t,i){}identify(t,i,n={},s){}error(t,i){}track(t,i){const n=i.event;this.client.track(n?`${ko}:${n}`:ko,Ci(B({},i),{sessionID:t}))}},Ih=class extends Qn{constructor(t,i){super(),Kt(this,"client"),this.client=new Zh(t,i)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(i,n,s)=>(this.load(this.client),n)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,i){return this._bufferCall("recordGauge",[t,i])}identify(t,i,n={},s){return this._bufferCall("identify",[t,i,n,s])}error(t,i){return this._bufferCall("error",[t,i])}track(t,i){return this._bufferCall("track",[t,i])}};const Sh=e=>{e(window.location.href);const t=history.pushState;history.pushState=(r=>function(){var l=r.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),l})(history.pushState);const i=history.replaceState;history.replaceState=(r=>function(){var l=r.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),l})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const s=function(){e(window.location.href)};return window.addEventListener("locationchange",s),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",s),history.pushState=t,history.replaceState=i}},Xh="10.1.2",Vh={version:Xh},Gh=Vh.version;function Lo(e,t){return Rh(e)}function Ch(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const i of e.classList)t.push(`.${i}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const Rh=e=>{let t="";const i=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(No(n,"#"))),i&&(t=t.concat(No(i,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},No=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,Wh=e=>{let t;const i=()=>{clearTimeout(t),t=setTimeout(()=>{var n,s;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(s=(n=window.screen.orientation)==null?void 0:n.angle)!=null?s:0})},500)};return window.addEventListener("resize",i),i(),()=>window.removeEventListener("resize",i)};var Jo={exports:{}};/**
278
+ `,Ud=(e,t,i,n)=>e();function Kd(e,t=Ud){return{PushPayload(i,n){return t(s=>e.request(wd,i,B(B({},n),s)),"PushPayload","mutation",i)},PushSessionEvents(i,n){return t(s=>e.request(Io,i,B(B({},n),s)),"PushSessionEvents","mutation",i)},identifySession(i,n){return t(s=>e.request(xd,i,B(B({},n),s)),"identifySession","mutation",i)},addSessionProperties(i,n){return t(s=>e.request(Td,i,B(B({},n),s)),"addSessionProperties","mutation",i)},pushMetrics(i,n){return t(s=>e.request(Ld,i,B(B({},n),s)),"pushMetrics","mutation",i)},addSessionFeedback(i,n){return t(s=>e.request(Nd,i,B(B({},n),s)),"addSessionFeedback","mutation",i)},initializeSession(i,n){return t(s=>e.request(Jd,i,B(B({},n),s)),"initializeSession","mutation",i)},Ignore(i,n){return t(s=>e.request(Yd,i,B(B({},n),s)),"Ignore","query",i)},GetSamplingConfig(i,n){return t(s=>e.request(Fd,i,B(B({},n),s)),"GetSamplingConfig","query",i)}}}function Md(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function Od(){return Md()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const Ed="telemetry.sdk.name",zd="telemetry.sdk.version",So=1e3,Hd=1e3*2,Pd=4*60*60*1e3,us=15*60*1e3,Xo={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},Dd=100,Vo="app.highlight.io",Bd="https://app.launchdarkly.com",Qd={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},jd="/projects/default",Ad=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.5 | MIT */function Ji(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}var _d={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ds(e,t){function i(s,r,l){if(typeof document<"u"){l=Ji({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),s=encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in l)l[a]&&(o+="; "+a,l[a]!==!0&&(o+="="+l[a].split(";")[0]));return document.cookie=s+"="+e.write(r,s)+o}}function n(s){if(!(typeof document>"u"||arguments.length&&!s)){for(var r=document.cookie?document.cookie.split("; "):[],l={},o=0;o<r.length;o++){var a=r[o].split("="),c=a.slice(1).join("=");try{var u=decodeURIComponent(a[0]);if(l[u]=e.read(c,u),s===u)break}catch{}}return s?l[s]:l}}return Object.create({set:i,get:n,remove:function(s,r){i(s,"",Ji({},r,{expires:-1}))},withAttributes:function(s){return ds(this.converter,Ji({},this.attributes,s))},withConverter:function(s){return ds(Ji({},this.converter,s),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var hs=ds(_d,{path:"/"}),ps=(e=>(e.CLIENT_ID="highlightClientID",e))(ps||{});let Yi="localStorage",ms=!0,$d=class{constructor(){Kt(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var i;return(i=Object.keys(this.storage)[t])!=null?i:null}getItem(t){var i;return(i=this.storage[t])!=null?i:""}setItem(t,i){this.storage[t]=i}removeItem(t){delete this.storage[t]}},qd=class{getItem(t){var i;return(i=hs.get(t))!=null?i:""}setItem(t,i){if(!ms)return;const n=new Date;n.setTime(n.getTime()+us),hs.set(t,i,{expires:n})}removeItem(t){ms&&hs.remove(t)}};const gt=new $d,Fi=new qd,zt=()=>{let e=null;if(typeof window>"u")return gt;try{switch(Yi){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(it("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Yi}; using global storage`),e=gt)}catch(t){it("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=gt}return e},eh=e=>{Yi=e},Go=e=>{ms=e},Ge=e=>{try{return zt().getItem(e)}catch(t){return it("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),gt.getItem(e)}},Ee=(e,t)=>{Fi.setItem(e,t);try{return zt().setItem(e,t)}catch(i){return it("storage","setItem","debug",`failed to set item ${e}; using global storage`,i),gt.setItem(e,t)}},Ui=e=>{Fi.removeItem(e);try{return zt().removeItem(e)}catch(t){return it("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),gt.removeItem(e)}},th=e=>{if(Yi==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}if(typeof window>"u"){console.warn("highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[i,n]=arguments;e({keyName:i,keyValue:n}),t.apply(this,[i,n])}};var be=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(be||{});const Ki=e=>`${be.SESSION_DATA}_${e}`,ih=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Co()},nh=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Co=()=>{var e;return(e=Ge(be.SESSION_ID))!=null?e:""},Ht=e=>{Ee(be.SESSION_ID,e)},sh=e=>{const t=Ki(e);return JSON.parse(Ge(t)||"{}")},Mi=e=>{e||(e=Co());let t=sh(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<us)return t;Ui(Ki(e))},st=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;nh(t);const i=Ki(t);Ee(i,JSON.stringify(e)),oh(i)},rh=function(){const e=Fi.getItem(be.SESSION_ID);Ht(e);const t=Ki(e),i=Fi.getItem(t);try{st(JSON.parse(i))}catch{}};function oh(e){const t=`${be.SESSION_DATA}_`;for(let i=zt().length-1;i>=0;i--){const n=zt().key(i);if(n&&n.startsWith(t)&&n!==e)try{const s=JSON.parse(Ge(n)||"{}");s.lastPushTime!==void 0&&Date.now()-s.lastPushTime>=us&&(it("highlightSession","pruneSessionData","debug",`removing session data for stale key ${n}`),Ui(n))}catch(s){it("highlightSession","pruneSessionData","error",`failed to parse session data for key ${n}`,s)}}}var Ro=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(Ro||{});const lh=3,ah=1e3,ch=500,uh=[Ro.BillingQuotaExceeded.toString()],dh=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(i=>uh.includes(i.message)))===void 0},hh=()=>{const e=(t,i,n,s,r=0)=>pt(void 0,null,function*(){try{return yield t()}catch(l){if(l instanceof bt&&!dh(l))throw l;if(r<lh)return yield new Promise(o=>setTimeout(o,ah+ch*Math.pow(2,r))),yield e(t,i,n,s,r+1);throw console.error(`highlight.io: data request failed after ${r} retries`),l}});return e},Wo="feature_flag",vo="launchdarkly",ph=`${Wo}.set.id`,mh=`${Wo}.provider.name`,fh=`${vo}.application.id`,bh=`${vo}.application.version`,yh="$ld:telemetry:session:init",ko="$ld:telemetry:track";function wo(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function xo(e){return e.kind==="multi"}function To(e){return xo(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${wo(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${wo(e.key)}`:e.key}function gh(e){return xo(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,i)=>B(B({},t),i),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Zh=class{constructor(t,i){Kt(this,"client"),Kt(this,"metadata"),this.client=t,this.metadata=i}getHooks(t){return[]}init(t){this.client.track(yh,{sessionID:t})}recordGauge(t,i){}identify(t,i,n={},s){}error(t,i){}track(t,i){const n=i.event;this.client.track(n?`${ko}:${n}`:ko,Ci(B({},i),{sessionID:t}))}},Ih=class extends Qn{constructor(t,i){super(),Kt(this,"client"),this.client=new Zh(t,i)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(i,n,s)=>(this.load(this.client),n)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,i){return this._bufferCall("recordGauge",[t,i])}identify(t,i,n={},s){return this._bufferCall("identify",[t,i,n,s])}error(t,i){return this._bufferCall("error",[t,i])}track(t,i){return this._bufferCall("track",[t,i])}};const Sh=e=>{e(window.location.href);const t=history.pushState;history.pushState=(r=>function(){var l=r.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),l})(history.pushState);const i=history.replaceState;history.replaceState=(r=>function(){var l=r.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),l})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const s=function(){e(window.location.href)};return window.addEventListener("locationchange",s),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",s),history.pushState=t,history.replaceState=i}},Xh="10.2.0",Vh={version:Xh},Gh=Vh.version;function Lo(e,t){return Rh(e)}function Ch(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const i of e.classList)t.push(`.${i}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const Rh=e=>{let t="";const i=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(No(n,"#"))),i&&(t=t.concat(No(i,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},No=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,Wh=e=>{let t;const i=()=>{clearTimeout(t),t=setTimeout(()=>{var n,s;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(s=(n=window.screen.orientation)==null?void 0:n.angle)!=null?s:0})},500)};return window.addEventListener("resize",i),i(),()=>window.removeEventListener("resize",i)};var Jo={exports:{}};/**
279
279
  * @preserve
280
280
  * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
281
281
  *