PageSourceSearch

https://app.hrone.cloud/session-manager.b3be2cda4ba25c40.js

js hrone.cloud collected 2026-09-24 10:25:20 UTC 6,966 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkHROneV5=self.webpackChunkHROneV5||[]).push([[50967],{17303(k,y,o){o.r(y),o.d(y,{setupAgentSession:()=>H});var D=o(83797),c=o(68308),T=o(43740),d=o(33286),l=o(91198),v=o(9217),m=o(89016),a=o(69664),x=o(3637),E=o(88947);class O extends v.M{constructor(e,t){super(e,t),this.onPause="function"==typeof e.onPause?e.onPause:()=>{},this.onRefresh="function"==typeof e.onRefresh?e.onRefresh:()=>{},this.onResume="function"==typeof e.onResume?e.onResume:()=>{},this.readStorage=e.readStorage,this.remainingMs=void 0,e.refreshEvents||(e.refreshEvents=["click","keydown","scroll"]);try{this.abortController=new AbortController}catch{}if(m.RI&&e.ee){if(e.ee){this.ee=e.ee;const s=(0,E.s)(this.refresh.bind(this),500,{leading:!0});this.refreshHandler=r=>{e.refreshEvents.includes(r?.[0]?.type)&&s()},e.ee.on("fn-end",this.refreshHandler)}(0,x.u)(s=>{"hidden"===s?this.pause():this.resume()},!1,this.abortController?.signal)}}abort(){this.clear(),this.abortController?.abort(),this.refreshHandler&&(this.ee.removeEventListener("fn-end",this.refreshHandler),this.refreshHandler=this.ee=null)}pause(){this.onPause(),clearTimeout(this.timer),this.remainingMs=this.initialMs-(Date.now()-this.startTimestamp)}resume(){try{const t=this.readStorage(),s="string"==typeof t?JSON.parse(t):t;e(s.expiresAt)||e(s.inactiveAt)?this.end():(this.refresh(),this.onResume())}catch{this.end()}function e(t){return Date.now()>t}}refresh(e,t){this.clear(),this.timer=this.create(e,t),this.startTimestamp=Date.now(),this.remainingMs=void 0,this.onRefresh()}}var R=o(80033),A=o(7496),S=o(34190),g=o(53047),p=o(40898),b=o(30888);const u={value:"",inactiveAt:0,expiresAt:0,updatedAt:Date.now(),sessionReplayMode:null,sessionReplaySentFirstChunk:!1,sessionTraceMode:null,traceHarvestStarted:!1,loggingMode:null,logApiMode:null,serverTimeDiff:null,custom:{},numOfResets:0,consent:!1,cachedRumResponse:null};class w{constructor(e){const{agentRef:t,key:s,storage:r}=e;if(!t||!s||!r)throw new Error("Missing required field(s):".concat(t?"":" agentRef").concat(s?"":" key").concat(r?"":" storage"));this.agentRef=t,this.storage=r,this.state={},this.key=s,this.ee=t.ee,(0,R.u)(this.ee,t),this.setup(e),m.RI&&(0,b.sp)("storage",i=>{if(i.key===this.lookupKey){const h="string"==typeof i.newValue?JSON.parse(i.newValue):i.newValue;this.sync(h),this.ee.emit(a.tS.UPDATE,[a.iL.CROSS_TAB,this.state])}})}setup({value:e=(0,T.LA)(16),expiresMs:t=a.wk,inactiveMs:s=a.BB,numOfResets:r=0}){const i={serverTimeDiff:this.state.serverTimeDiff||u.serverTimeDiff,consent:this.state.consent||u.consent};this.state={},this.sync({...u,...i}),this.state.value=e,this.expiresMs=t,this.inactiveMs=s;const h=this.read();t?(this.state.expiresAt=h?.expiresAt||this.getFutureTimestamp(t),this.state.numOfResets=h?.numOfResets||r,this.expiresTimer=new v.M({onEnd:()=>{this.collectSM("expired"),this.collectSM("duration"),this.reset()}},this.state.expiresAt-Date.now())):this.state.expiresAt=1/0,s?(this.state.inactiveAt=h?.inactiveAt||this.getFutureTimestamp(s),this.inactiveTimer=new O({onEnd:()=>{this.collectSM("inactive"),this.collectSM("duration"),this.reset()},onRefresh:this.refresh.bind(this),onResume:()=>{this.ee.emit(a.tS.RESUME)},onPause:()=>{this.initialized&&this.ee.emit(a.tS.PAUSE),this.write((0,A.a)(this.state,u))},ee:this.ee,refreshEvents:["click","keydown","scroll"],readStorage:()=>this.storage.get(this.lookupKey)},this.state.inactiveAt-Date.now())):this.state.inactiveAt=1/0,this.isNew||=!Object.keys(h).length,this.isNew?this.write((0,A.a)(this.state,u),!0):this.sync(h),this.initialized=!0,this.ee.emit(a.tS.STARTED,[this.isNew])}get lookupKey(){return"".concat(a.Wt).concat(this.key)}sync(e){Object.assign(this.state,e)}read(){try{const e=this.storage.get(this.lookupKey);if(!e)return{};const t="string"==typeof e?JSON.parse(e):e;return this.isInvalid(t)?{}:this.isExpired(t.expiresAt)?(this.collectSM("expired"),this.collectSM("duration",t,!0),this.reset()):this.isExpired(t.inactiveAt)?(this.collectSM("inactive"),this.collectSM("duration",t,!0),this.reset()):t}catch(e){return(0,d.R)(10,e),{}}}write(e){try{return e&&"object"==typeof e?(e.updatedAt=Date.now(),this.sync(e),this.storage.set(this.lookupKey,(0,l.A)(this.state)),this.ee.emit(a.tS.UPDATE,[a.iL.SAME_TAB,this.state]),e):void 0}catch(t){return(0,d.R)(11,t),null}}reset(){try{return(0,d.R)(66),this.initialized&&(this.ee.emit(a.tS.RESET),this.state.numOfResets++),this.storage.remove(this.lookupKey),this.inactiveTimer?.abort?.(),this.expiresTimer?.clear?.(),delete this.isNew,this.setup({key:this.key,storage:this.storage,expiresMs:this.expiresMs,inactiveMs:this.inactiveMs,numOfResets:this.state.numOfResets}),this.read()}catch{return{}}}refresh(){const e=this.read();this.write({...e,inactiveAt:this.getFutureTimestamp(this.inactiveMs)})}isExpired(e){return Date.now()>e}isInvalid(e){return!Object.keys(u).every(s=>Object.keys(e).includes(s))}collectSM(e,t,s){let r,i;"duration"===e&&(r=this.getDuration(t,s),i="Session/Duration/Ms"),"expired"===e&&(i="Session/Expired/Seen"),"inactive"===e&&(i="Session/Inactive/Seen"),i&&(0,S.p)(g.xV,[i,r],void 0,p.K7.metrics,this.ee)}getDuration(e=this.state,t){const s=e.expiresAt-this.expiresMs;return(t?Date.now():e.updatedAt)-s}getFutureTimestamp(e){return Date.now()+e}
1syncCustomAttribute(e,t){if(m.RI)if(null===t){const s=this.read();s.custom&&(delete s.custom[e],this.write({...s}))}else{const s=this.read();this.custom={...s?.custom||{},[e]:t},this.write({...s,custom:this.custom})}}}class I{get(e){try{return localStorage.getItem(e)||void 0}catch{return""}}set(e,t){try{return null==t?this.remove(e):localStorage.setItem(e,t)}catch{}}remove(e){try{localStorage.removeItem(e)}catch{}}}var j=o(31087),C=o(44193),M=o(9891),P=o(53528);function H(n){if(n.runtime.session)return n.runtime.session;const e=n.init.session,t=(0,j.Y)(n.info.licenseKey,n.info.applicationID);n.runtime.session=new w({agentRef:n,key:t,storage:new I,expiresMs:e?.expiresMs,inactiveMs:e?.inactiveMs});const s=n.runtime.session.state.custom;s&&Object.keys(s).length&&(n.info=(0,C.D)({...n.info,jsAttributes:{...s,...n.info.jsAttributes}})),n.runtime.jsAttributesMetadata=function K(n,e){const t=n[e]??={},s={bytes:Object.keys(t).reduce((r,i)=>r+i.length+(0,l.A)(t[i]).length,0)};return n[e]=new Proxy(t,{set:(r,i,h)=>(s.bytes+=i.length+(0,l.A)(h).length,r[i]=h,!0),deleteProperty:(r,i)=>(s.bytes-=i.length+(0,l.A)(r[i]).length,delete r[i])}),s}(n.info,"jsAttributes");const r=n.ee;return(0,c.i)("api-setCustomAttribute",(i,h,f)=>{n.runtime.session.syncCustomAttribute(h,f)},"session",r),(0,c.i)("api-setUserId",(i,h,f)=>{n.runtime.session.syncCustomAttribute(h,f)},"session",r),(0,c.i)("api-setUserIdAndResetSession",i=>{n.runtime.session.reset(),(0,S.p)(g.xV,["API/"+M.Dl+"/resetSession/called"],void 0,p.K7.metrics,r),(0,P.U)(n,"enduser.id",i,M.Dl,!0)},"session",r),(0,c.i)("api-consent",i=>{n.runtime.session.write({consent:void 0===i||i})},"session",r),(0,D.Ze)(n,"session"),n.runtime.session}}}]);

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.