var __extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),PostType,DataWrapper;(function(n){n[n.OnLoad=0]="OnLoad";n[n.OnBeforeUnload=1]="OnBeforeUnload";n[n.OnAbort=2]="OnAbort";n[n.Flush=3]="Flush"})(PostType||(PostType={}));DataWrapper=function(){function n(){this.hasErrors=!1;this._appErrors=null;this.hasIndicators=!1;this._indicators=null;this.hasTracepoints=!1;this._tracepoints=null}return n.prototype.addError=function(n,t){this.hasErrors||(this._appErrors={},this.hasErrors=!0);this._appErrors[n]=t},n.prototype.getErrors=function(){return this._appErrors},n.prototype.addIndicator=function(n){this.hasIndicators||(this._indicators={},this.hasIndicators=!0);for(var t in n)this._indicators[t]=n[t]},n.prototype.getIndicators=function(){return this._indicators},n.prototype.addTracepoint=function(n){this.hasTracepoints||(this._tracepoints={},this.hasTracepoints=!0);for(var t in n)this._tracepoints[t]=n[t]},n.prototype.getTracepoints=function(){return this._tracepoints},n}(),function(){var l,i;if(document.getElementById&&(window.attachEvent||window.addEventListener)){var t=parent.window,h=t.location,n=t.RProfiler,e=t.WindowEvent,v=h.protocol+"//";if(e&&n){var o=!!t.performance&&typeof t.performance=="object",s=o&&typeof t.performance.getEntriesByType=="function",c={Load:e.Load,BeforeUnload:e.BeforeUnload,Unload:e.Unload,Abort:e.Abort,Error:e.Error},nt="test",tt="v3.3.10",u={sampleRate:50,waterfallSampleRate:10,postUrl:v+"r.3gl.net/hawklogserver/r.p",siteId:7823,debugParameter:"GlimpseDebug",debugUrl:"g.3gl.net/jp/v3.3.10/D",waterfallParameter:"GlimpseWaterfall",sendOnLoad:!1,clearResources:!0,ajaxDomains:""},y=function(){return(new Date).getTime()};!t.__cpPostUrl||(u.postUrl=t.__cpPostUrl.trim());!t.__cpSendOnLoad||(u.sendOnLoad=t.__cpSendOnLoad===!0);var p=function(){function n(){}return n.save=function(i){if(n.canUseLocalStorage()){t.localStorage.setItem(n.storeKey,i);return}n.setCookie(i)},n.read=function(){if(n.canUseLocalStorage()){var i=t.localStorage.getItem(n.storeKey);if(i)return i}return this.readCookie()},n.canUseLocalStorage=function(){var r=!0,i,u,f;try{i=n.storeKey+"delete";u=i+0;t.localStorage.setItem(i,u);f=t.localStorage.getItem(i);r=u===f;r&&t.localStorage.removeItem(i)}catch(e){r=!1}return r},n.setCookie=function(i){var r=new Date;r.setTime(r.getTime()+n.cookieExpireDays*864e5);var e="; expires="+r.toUTCString(),u=t.document.domain.split("."),f=u.length,o=u[f-2]+"."+u[f-1];document.cookie=n.storeKey+"="+encodeURIComponent(i)+e+"; path=/; domain="+o+"; SameSite=Lax;"},n.readCookie=function(){for(var i,f=t.document.cookie.split(";"),e=n.storeRegex,r=0,u=f;r=0&&n>=t&&t>=0){var r=n-t;return Math.round(r)}}else return null},r.getRoundedValue=function(n){return n?Math.round(n):n},r.addScriptTag=function(n,t){var i=t.document.createElement("script");i.type="text/javascript";i.src=v+n;t.document.body.appendChild(i)},r.getQueryStringValue=function(n){for(var u=h.search.substring(1),r=u.split("&"),t,i=0;i=i.waitTime?i.performanceObserver.disconnect():i.setLongTaskTime(r)}};this.setLongTaskTime=function(n){var t=Math.round(n.startTime+n.duration);i.longTaskEndTime=t};this.getLongTaskTime=function(){return i.longTaskEndTime};this.performanceLongTaskTiming&&(this.isSoftnav=n,this.nowTime=t.performance.now(),u=this.getDomContentLoad(),n||(this.longTaskEndTime=u),this.observe(["longtask"],this.observeLongTask))}return n.prototype.observe=function(n,t){this.performanceObserverApi&&(this.performanceObserver=new this.performanceObserverApi(function(n){var i=n.getEntries();t(i)}),this.performanceObserver.observe({entryTypes:n}))},n}(),f;(function(n){n.UserId="u";n.SessionId="s";n.SessionTime="t";n.PageViewCount="c";n.UrlCheckSum="k";n.PostFlag="f"})(f||(f={})),function(n){n[n.GET=0]="GET";n[n.POST=1]="POST";n[n.HEAD=2]="HEAD";n[n.DELETE=3]="DELETE";n[n.OPTIONS=4]="OPTIONS";n[n.PUT=5]="PUT";n[n.TRACE=6]="TRACE";n[n.CONNECT=7]="CONNECT"}(l||(l={})),function(n){n[n.DNS=0]="DNS";n[n.Connect=1]="Connect";n[n.Load=2]="Load";n[n.Wait=3]="Wait";n[n.Start=4]="Start";n[n.Redirect=5]="Redirect";n[n.Duration=6]="Duration";n[n.SSL=7]="SSL"}(i||(i={}));var it=function(){function n(){this.userId=-1;this.sessionId=0;this.sessionTime=0;this.pageViewCount=0;this.viewCount=0;this.pageViewId=0;this.postFlag=-1;this.sendWaterfall=!1;this.exitToEntry=0}return n.prototype.resetViewCount=function(){this.viewCount=1},n.prototype.save=function(){var n=this.getText();p.save(n)},n.prototype.load=function(){var e=p.read(),o,r,u,s,i,t,h,n;if(!e)return!1;for(o=e.split(","),r=0,u=o;rthis.sessionExpire&&(this.store.sessionId=0);this.store.sessionTime=n;this.updateStore()}},i.prototype.updateStore=function(){this.store&&this.store.save()},i.prototype.initStore=function(){var n=this.store.load();!n},i.prototype.checkAndResetPostFlags=function(){var n,t;if(this.store.postFlag=0,u.sampleRate<0){this.store.postFlag=-1;return}n=this.getUserId(u.sampleRate/100);this.store.userId<=n&&(this.store.postFlag=1,t=n/(100/u.waterfallSampleRate),this.store.sendWaterfall=this.store.userId<=t)},i.prototype.getReferrer=function(n){for(var i=this.getHostName(n).replace(":","-"),r=n.indexOf("?"),u=0,t=i.length;tthis.sessionExpire?(this.store.sessionId=Math.floor(1+Math.random()*((Math.pow(2,32)-2)/2)),this.store.pageViewCount=1):(this.store.pageViewCount<65535&&this.store.pageViewCount++,this.getReferrer(t.document.referrer)==this.store.urlCheckSum&&this.store.sessionTime>0&&(this.store.exitToEntry=i-this.store.sessionTime)),this.store.sessionTime=(new Date).getTime(),this.store.pageViewId=Math.floor(1+Math.random()*((Math.pow(2,16)-2)/2)),this.store.urlCheckSum=this.getReferrer(t.location.href),this.store.resetViewCount(),this.updateStore(),this.store.load()},i.prototype.getUserId=function(n){n===void 0&&(n=Math.random());return Math.floor(1+n*((Math.pow(2,64)-2)/2))},i.prototype.shouldPost=function(){return this.store.postFlag==1},i}(),b=function(){function n(n){this.char=n;this.children=[]}return n}(),k=function(){function n(){this.root=new b("");this.isReversed=!0}return n.prototype.add=function(n,t){var u,i,f,e,r;for(n===void 0&&(n=this.root),u=n.children,i=0,f=u;i1,i={},u,r,f;if(i.v=tt,i.pt=this.postType,i.ui=this.userId,i.si=this.sessionId,i.di=this.siteId,i.pi=this.pageViewId,i.jsc=this.jsErrorCount||0,i.rf=this.referrer,i.pc=this.pageViewCount,i.vc=this.viewCount,i.rc=this.redirectCount||0,this.jsErrors&&this.jsErrors.length>0){for(u=[],r=0;r=0;o--)a=f[o],e=p.add(e,a);e.data=r[f].summary.translateForPost()}w=new k;for(f in r){for(e=undefined,o=f.length-1;o>=0;o--)a=f[o],e=w.add(e,a);e.data=r[f].waterfall.translateForPost()}return{summary:p.toObject(),waterfall:w.toObject()}},t.prototype.filterAjaxResources=function(n){if(u.ajaxDomains===""||u.ajaxDomains===undefined)return n;var r=function(n){var t=/^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)/.exec(n);if(t!==null)return t[1]},t=function(n){var t=/([a-z\-0-9]{2,63})\.([a-z\.]{2,5})$/.exec(n);return t&&t[0]},i=function(n){var t=/(http|https)?:\/\/(\S+)/g.test(n);return t?n:"https://"+n},f=u.ajaxDomains.split(",");return n.filter(function(n){var u=r(n.url),e=i(n.url),o=new URL(e).host,s=t(o);return f.some(function(n){var o=i(n),r=new URL(o).host,f=r.replace("www.",""),e=t(r),h=f!==e;return h?f===u:s===e})})},t}(DataWrapper),ot=function(){function i(){var i=this,v,f,e,h,l;if(this.visitor=new rt,this.postUrl=u.postUrl,this.didSendInitial=!1,this.isDebugging=!1,this.countResourcesSent=0,this.didSoftNavigation=!1,this.currentUrl="",this.softNavigationStart=0,this.MaxNumberOfPerformanceMarks=1e3,this.updatePerformanceMetrics=function(n){var t=r.getNavigationTime();if(t){var f=t,i=r.getNavigationStart(t),e=f.loadEventEnd,u=t.responseStart;n.dns=u?t.domainLookupEnd-t.domainLookupStart:null;n.fullConnect=u?t.connectEnd-t.connectStart:null;n.wait=u?t.responseStart-t.requestStart:null;n.load=u?t.responseEnd-t.responseStart:null;n.domInteractive=r.getMetricValue(t.domInteractive,i);n.domLoaded=r.getMetricValue(t.domContentLoadedEventStart,i);n.docComplete=r.getMetricValue(t.domComplete,i);n.response=r.getMetricValue(t.responseEnd,i);n.contentLoad=r.getMetricValue(t.loadEventStart,e);n.redirect=t.redirectEnd-t.redirectStart;t.secureConnectionStart&&(n.secureConnect=t.connectEnd-t.secureConnectionStart)}},this.updateResources=function(n,r){if(o){var f=[];s&&(f=t.performance.getEntriesByType("resource"));n!=PostType.OnLoad&&(i.setClearResources(),u.clearResources&&t.performance.clearResourceTimings?(r.resources=f,t.performance.clearResourceTimings()):(r.resources=f.slice(i.countResourcesSent),i.countResourcesSent=f.length))}},this.getTimeOnPage=function(n){var t=i.getFocusAwayTime(),r=i.getNavigationStart(n);return y()-r-t},this.getVisuallyComplete=function(n){if(t.CPVisuallyComplete){var i=t.CPVisuallyComplete.getValue(n);if(typeof i=="number"&&i>=0)return i}},this.updateEngagementMetrics=function(u,f){var e,o;if(s&&(e=t.performance.getEntriesByType("paint"),e&&e.length>0&&(u.firstPaint=i.getPaintTimings(e,"first-paint"),u.firstContentPaint=i.getPaintTimings(e,"first-contentful-paint"))),o=r.getNavigationTime(),o){var l=r.getNavigationStart(o),h=r.getMetricValue(o.domContentLoadedEventEnd,l),c=a.getLongTaskTime();u.timeToInteract=f?c||i.getVisuallyComplete(f):h&&h0&&(f.exitToEntry=h.exitToEntry),c=n.data.loadTime-n.data.start,c>0&&(f.entryToOnLoad=c),document.webkitVisibilityState==="prerender"&&(f.prerender=1),o&&(e=void 0,s&&(e=t.performance.getEntriesByType("resource"),f.resources=e),i!=PostType.OnLoad&&(this.setClearResources(),u.clearResources&&t.performance.clearResourceTimings?t.performance.clearResourceTimings():this.countResourcesSent=e.length)),f},i.prototype.createDiffPostObject=function(i,r){var u=this.createBasePostObj(i,!1,r),e,f,o;return this.updateResources(i,u),this.updateEngagementMetrics(u,r),this.addPerformanceMarksToPostData(t.performance,u),e=this.getVisuallyComplete(r),e&&(u.visComplete=e),n&&n.getCPWebVitals&&(f=n.getCPWebVitals(),f.cls&&(u.cls=f.cls),f.lcp&&(u.lcp=f.lcp),f.inp&&(u.inp=f.inp)),n.data.jsCount>0&&(u.jsErrorCount=n.data.jsCount,u.jsErrors=n.data.jsErrors,n.clearErrors()),n&&n.getAjaxRequests&&(o=n.getAjaxRequests(),o&&(u.ajaxRequests=o.slice(),n.clearAjaxRequests())),u},i.prototype.createBasePostObj=function(i,r,f){var e=new et,o;return e.postType=i,e.isNewPageView=r,e.siteId=u.siteId,e.referrer=encodeURI(decodeURI(t.location.href)),e.sampleRate=u.sampleRate,e.waterfallSampleRate=u.waterfallSampleRate,o=this.visitor.store,e.userId=o.userId,e.sessionId=o.sessionId,e.pageViewId=o.pageViewId,e.pageViewCount=o.pageViewCount,e.viewCount=o.viewCount,e.screenHeight=screen.height,e.screenWidth=screen.width,this.currentUrl=e.referrer,e.referrer=i===PostType.OnBeforeUnload||i===PostType.OnAbort?this.currentUrl||encodeURI(decodeURI(t.location.href)):encodeURI(decodeURI(t.location.href)),f&&(e.isNewView=i==PostType.OnLoad),n.hasInsight&&(this.addInsightForPost(e),n.clearInfo()),e},i.prototype.addPerformanceMarksToPostData=function(n,t){var i,f,e,r,u,s;if(o&&n.getEntriesByType&&(i=n.getEntriesByType("mark"),i&&i.length>0&&i.length=f}),r=0,u=e;r0&&i[0].startTime)return Math.round(i[0].startTime)},i.prototype.setClearResources=function(){!t.__cpPreventResourceClear||(u.clearResources=t.__cpPreventResourceClear===!1)},i.prototype.addInsightForPost=function(t){var f=n.info,r,s,o,e,u,h,c,i;for(r in f)switch(r){case"appError":if(i=f[r],i&&typeof i=="object")for(e in i)(o=Number(e),isNaN(o))||(u=i[e],u&&typeof u=="string"&&(s=u,s.length>32&&(s=s.substring(0,32)),t.addError(e,s)));break;case"conversion":if(i=f[r],t.isConversion=!0,i&&typeof i=="object")for(e in i)(o=Number(e),isNaN(o))||(u=i[e],u&&typeof u=="number"&&(t.revenue=o,t.revenueItems=u));break;case"indicator":h=this.buildInsight(f[r],0);h[0]&&t.addIndicator(h[1]);break;case"tracepoint":c=this.buildInsight(f[r],"");c[0]&&t.addTracepoint(c[1]);break;case"pageGroup":i=f[r];i!==undefined&&typeof i=="string"&&(t.pageGroup=i);break;case"variation":i=f[r];i!==undefined&&typeof i=="string"&&(t.variation=i)}},i.prototype.buildInsight=function(n,t){var f={},i=!1,r,u;if(n&&typeof n=="object")for(r in n)r&&(u=n[r],u!=null&&typeof u==typeof t&&(f[r]=u,i=!0));return i?[i,f]:[i,f]},i.prototype.makeRequest=function(n,i,r){var f=i.toString(n,r),u;t.navigator&&typeof t.navigator.sendBeacon=="function"?t.navigator.sendBeacon(this.postUrl,f):(u=new XMLHttpRequest,window.XDomainRequest&&(u=new window.XDomainRequest,u.timeout=0,u.onload=function(){},u.onerror=function(){},u.ontimeout=function(){},u.onprogress=function(){}),u.open("POST",this.postUrl,!1),u.setRequestHeader?u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"):null,u.send(f),u=null)},i}(),st=new ot}}}();var windowItem=parent.window||window;windowItem.CPVisuallyComplete=function(){var t=function(){function n(){var n=this;this.targetWindow=windowItem;this.mutationObserver=undefined;this.start=0;this.waitMs=2e3;this.maxResourceTiming=0;this.mutationObserverVal=0;this.scroll="scroll";this.click="click";this.maxDiffBetweenMutation=1e3;this.sinceLastXHR=500;this.disconnectObserverTimeout=5e3;this.hasPerformance=typeof this.targetWindow.performance=="object"&&typeof this.targetWindow.performance.getEntriesByType=="function";this.removeListeners=function(){document.removeEventListener(n.scroll,n.clear);document.removeEventListener(n.click,n.clear)};this.addListeners=function(){document.addEventListener(n.scroll,n.clear);document.addEventListener(n.click,n.clear)};this.imageListener=function(t){for(var r=n.targetWindow.performance.getEntriesByType("resource"),u=undefined,i=0;i1&&t[1];if(i&&!i.startsWith("data"))return i}return null},s=[],t=0;t=8&&i.right>=0&&i.bottom>=0&&i.left<=n.targetWindow.innerWidth&&i.top<=n.targetWindow.innerHeight&&!t.hidden&&t.type!=="hidden",r;return u?(r=window.getComputedStyle(t),r.display!=="none"&&r.visibility!=="hidden"&&r.visibility!=="collapse"&&+r.opacity>0):!1};this.mutationCallback=function(t){t.forEach(function(t){var i,u,f,e,r;if(t.type==="childList"&&t.addedNodes.length>0){if(i=t.addedNodes[0],n.isVisible(i)){for(i.nodeName.toLowerCase()==="img"&&i.addEventListener("load",n.imageListener),i.nodeName.toLowerCase()==="video"&&i.addEventListener("canplay",n.videoListener),u=n.getPerformanceTime(),n.isSoftNav&&n.resetValueOnSoftNav(),f=n.targetWindow.performance.getEntriesByType("resource"),e=undefined,r=0;r0&&(t=n.filter(function(n){return n.name==="first-paint"}),t&&t.length>0&&t[0].startTime&&(r=Math.round(t[0].startTime)),i=n.filter(function(n){return n.name==="first-contentful-paint"}),i&&i.length>0&&i[0].startTime&&(r=Math.round(i[0].startTime)))}catch(u){}return r},n}(),n=new t;return{getValue:n.getValue,onComplete:n.onComplete,reset:n.reset}}();