1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[755],{7755:function(e,t,r){r.r(t),r.d(t,{initClientObservability:function(){return y}});var n=r(908),i=r(8943),o=r(3669);Symbol.for("xsf.observability.skipConsoleTelemetry");var a=r(4406);let s=Symbol.for("xsf.observability.skipConsoleTelemetry"),l={debug:n._.Verbose,log:n._.Information,info:n._.Information,warn:n._.Warning,error:n._.Error},c=["debug","log","info","warn","error"],f=!1,u=["url","uri","target","refUri","requestUrl"],g=new Set(["authorization","cookie","set-cookie","x-api-key","x-csrf-token"]),p={RemoteDependencyData:"dependency",PageviewData:"pageView",PageviewPerformanceData:"pageView",MessageData:"trace",ExceptionData:"exception",RequestData:"request"},v={trace:n._.Verbose,debug:n._.Verbose,info:n._.Information,warn:n._.Warning,error:n._.Error};function b(e){let t={};for(let[r,n]of Object.entries(e))if(null!=n&&!(n instanceof Error)){if("string"==typeof n||"boolean"==typeof n){t[r]=n;continue}if("number"==typeof n){t[r]=Number.isFinite(n)?n:String(n);continue}try{"bigint"==typeof n?t[r]=n.toString():Array.isArray(n)||"object"==typeof n?t[r]=JSON.stringify(n):t[r]=String(n)}catch{t[r]=String(n)}}return t}let d=!1;function y(e){var t;if("undefined"==typeof window||d)return;let r=function(e){let t=void 0!==a?parseFloat(a.env.NEXT_PUBLIC_SAMPLING_RATE??"1"):1,r=Number.isFinite(t)?Math.min(1,Math.max(0,t)):1;return{connectionString:e?.connectionString??(void 0!==a?a.env.NEXT_PUBLIC_APPLICATIONINSIGHTS_CONNECTION_STRING??"":""),serviceName:e?.serviceName??(void 0!==a?a.env.NEXT_PUBLIC_OTEL_SERVICE_NAME??"next-app-browser":"next-app-browser"),serviceVersion:e?.serviceVersion??(void 0!==a?a.env.NEXT_PUBLIC_OTEL_SERVICE_VERSION??"0.0.0":"0.0.0"),enabled:e?.enabled??(void 0===a||"false"!==a.env.NEXT_PUBLIC_OBSERVABILITY_ENABLED),sanitize:e?.sanitize??(void 0===a||"false"!==a.env.NEXT_PUBLIC_OBSERVABILITY_SANITIZE),verboseTelemetry:e?.verboseTelemetry??(void 0!==a&&"true"===a.env.NEXT_PUBLIC_OBSERVABILITY_VERBOSE),samplingRate:e?.samplingRate??r,urlFilters:e?.urlFilters??[]}}(e);if(!r.enabled)return;if(!r.connectionString){console.warn("[@xsf/observability] No connection string found â client telemetry disabled. Set NEXT_PUBLIC_APPLICATIONINSIGHTS_CONNECTION_STRING or pass connectionString in config.");return}let y=new i.R({config:{connectionString:r.connectionString,samplingPercentage:100*r.samplingRate,distributedTracingMode:o.vp.AI_AND_W3C,enableCorsCorrelation:!0,disableFetchTracking:!1,enableRequestHeaderTracking:!r.sanitize,enableResponseHeaderTracking:!r.sanitize,enableAjaxPerfTracking:!0,enableAutoRouteTracking:!0,disableExceptionTracking:!1}});y.loadAppInsights(),y.addTelemetryInitializer(e=>{e.tags&&(e.tags["ai.cloud.role"]=r.serviceName,e.tags["ai.cloud.roleInstance"]=r.serviceName,e.tags["ai.application.ver"]=r.serviceVersion)}),r.urlFilters.length>0&&y.addTelemetryInitializer((t=r.urlFilters,e=>{if(!t.length)return;let r=e.baseType?p[e.baseType]:void 0;if(!r)return;let n=function(e){let t=e.baseData;if(t)return("string"==typeof t.data?t.data:void 0)??("string"==typeof t.uri?t.uri:void 0)??("string"==typeof t.url?t.url:void 0)??("string"==typeof t.target?t.target:void 0)??("string"==typeof t.name?t.name:void 0)}(e);if(n&&function(e,t,r){for(let i of e){var n;if("string"==typeof(n=i.urlPattern)?!!t.includes(n):n instanceof RegExp?!!n.test(t):!!n(t)){if(!i.eventTypes||0===i.eventTypes.length)return!0;return i.eventTypes.includes(r)}}return!1}(t,n,r))return!1})),r.sanitize&&y.addTelemetryInitializer(function(e){let t=e?.verboseTelemetry??!1;return e=>{let r=e.baseData;if(!r)return;if(!t)for(let e of u){let t=r[e];"string"==typeof t&&(r[e]=function(e){let t=e.indexOf("?");return t>=0?e.substring(0,t):e}(t))}let n=r.properties;if(n)for(let e of Object.keys(n)){let t=e.toLowerCase();g.has(t)&&(n[e]="[REDACTED]")}}}({verboseTelemetry:r.verboseTelemetry})),function(e){if(!f)for(let t of(f=!0,c)){let r=console[t].bind(console);console[t]=(...i)=>{if(r(...i),!i.some(e=>"object"==typeof e&&null!==e&&!0===e[s]))try{let r=i.map(e=>"string"==typeof e?e:JSON.stringify(e)).join(" ");e.trackTrace({message:r,severityLevel:l[t]??n._.Information},{source:"console"})}catch{}}}}(y),y.trackPageView(),d=!0,console.info(`[@xsf/observability] Client telemetry initialised (service=${r.serviceName})`)}}}]);
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.