1import{o as e}from"./DAXXjFlN.chunk.js";import{H as t,Nt as n,St as r,Vt as i,r as a}from"./CMDJWWg3.chunk.js";import{n as o}from"./DPtsihFR.chunk.js";import{C as s,S as c,_ as l,r as u,u as d,x as f}from"./BftnFbcr.chunk.js";import"./DFZS3Ffo.chunk.js";import{O as p,d as m,g as h,h as g,l as _,y as v}from"./BHvdJc9z.chunk.js";a();var y=e(o(),1),b=function(e){return e.Inlet=`event:inlet`,e.Outlet=`event:outlet`,e}({}),x={ANALYTICS:`global:analytics`},S=function(e){return e.Analytics=`AnalyticsService`,e.Context=`ContextService`,e.PageView=`PageViewService`,e.ProfileApiClient=`ProfileApiClient`,e}({}),C=5,w=new class extends u{constructor(...e){super(...e),this.contextHistory=[]}get name(){return S.Context}static get Instance(){return this.instance||=new this}initialize(){this.listenTo(s.SHELL,c.ROUTE,this.setContext)}setContext(e){this.contextHistory.length>=C&&this.contextHistory.unshift(),this.contextHistory.push({pageLoad:!this.contextHistory.length,appLink:e})}getCurrentContext(){if(this.contextHistory.length)return this.contextHistory[this.contextHistory.length-1]}fromPageLoad(){return this.contextHistory.length===1}},T=m.V2,E=class{constructor(e,t,n,r){this.type=e,this.data=t,this.actionContext=n,this.eventVersion=r||T}isType(e){return e===this.type}enrich(e,t){this.validateKey(e),this[e]=t}get(e){if(e&&this[e])return this[e]}validateKey(e){(e===`type`||e===`data`)&&l.throw(new d(`${e} is not a valid key`)),this[e]&&l.throw(new d(`Event already contains an enrichment named ${e}`))}},D={log(e,t,n,r){y.default.channel(x.ANALYTICS).trigger(b.Inlet,new E(e,t,n,r))}};function O(){let{appLink:e}=w.getCurrentContext();return i(e)||l.throw(new d(`Applink does not exist. Check current context.`)),M(e.application)}function k(e={}){let{location:t,entity:n,workflowPhase:r=null,descriptor:i=null}=e;return t||l.throw(new d(`location must be set.`)),n||l.throw(new d(`entity must be set.`)),{productArea:e.productArea??O(),location:t,entity:n,descriptor:i,workflowPhase:r}}function A(e){return!!(n(e)&&t(e,e=>i(e))||i(e))}function j(){return f.GetCurrentPath()+f.GetCurrentQueryString()}function M(e){return e.replace(`:`,`-`)}var N={logUserAction(e,t){if(!A(e)||!i(t))return;let{userAction:n,action:r,eventVersion:a}=N.buildUserActionEvent(t);D.log(n,e,r,a)},mergeOptions(e,t){return Array.isArray(t)||(t=[t]),r({},e,...t)},buildActionContext(e={}){return k(e)},buildUserActionEvent(e={}){let{actionType:t,eventVersion:n}=e;return{userAction:t,action:k(e),eventVersion:n}},buildCurrentLocation(){return j()},buildSearchEvent(e,t){return{data:{query:e},action:k({entity:_.Video,location:v.SearchBar,descriptor:t})}},buildInstantSearchEvent(e,t,n){let r;n===p.Series&&(r=_.Series),n===p.Folder&&(r=_.Folder),n===p.Tags&&(r=_.Tag),n===p.Video&&(r=_.Video),n===p.Clip&&(r=_.Clip),n===p.Interactive&&(r=_.Interactive),n===p.Subjects&&(r=_.Classification);let i={instant:{},query:e};return t.id&&(i.instant.selectedId=t.id),t.name&&(i.instant.selectedName=t.name),{data:i,action:k({entity:r,location:v.SearchBar})}},mapInteractionType(e){switch(e){case g.DragDrop:return h.DragDrop;case g.FileSelect:return h.FileSelect;default:return}}};export{x as a,S as i,M as n,b as o,w as r,N as t}; 2//# sourceMappingURL=hQ9iY4r0.chunk.js.map
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.