1import{a as u,b as v,c as h,d as L,e as d,g as q,h as U,l as Y,m as G}from"./chunk-7DPWKQTY.js";import{a as E}from"./chunk-T3P4IXPU.js";import{a as D,b as C,c as O,e as A}from"./chunk-JECSLSYU.js";import{a as $}from"./chunk-ZIGWUMSC.js";import"./chunk-VTS6UDNS.js";import{a as _}from"./chunk-EQ7NBNPU.js";import{p as I,v as F}from"./chunk-5BFOGE3O.js";import"./chunk-GK3KM6HO.js";import"./chunk-IQIR4NTD.js";import{h as P,k as T}from"./chunk-X53JTFRS.js";import{I as R,L as x,fa as S,q as y,ta as a,w as f}from"./chunk-FGJPAVU3.js";import{a as c,b as g,f as M}from"./chunk-5JJ6SBZ6.js";var w={};M(w,{dispatchOutageProductionListNavigation$:()=>k,loadOutageProductionList$:()=>z});var s=class{constructor(){this._http=a(T);this._appConfigService=a(E);this._apiUrl=this._appConfigService.getEndpointFor("api/outage-production")}filter(r,e,n){let i=new P().appendAll(g(c(c({},n),e),{searchText:r}));return this._http.get(`${this._apiUrl}/filter`,{params:i,observe:"response"})}findAllUnavailability(r,e){let n=new P().set("startDate",r.toISOString()).set("endDate",e.toISOString());return this._http.get(`${this._apiUrl}/unavailability`,{params:n,observe:"response"})}};function H(t){return`${t.eicCode}|${t.startDate}|${t.endDate}|${t.businessType??""}`}function N(t){let r=[],e=null,n,i;return t.forEach(o=>{let p=new Date(o.startDate),m=new Date(o.endDate),l=o.powerPlant===e&&n!==void 0&&i!==void 0&&p.getFullYear()>=n&&m.getFullYear()<=i?"":o.powerPlant;r.push({activityId:o.uniqueId,activities:[l,o.generator??""],startDate:o.startDate,endDate:o.endDate,color:X(o.powerPlant,o.generator??"")}),e=o.powerPlant,n=p.getFullYear(),i=m.getFullYear()}),r}var X=(t,r)=>{let e=Y.find(n=>n.match(t,r));return e?e.color:G};var k=D((t=a(C))=>t.pipe(O($),R(({payload:r})=>r.event.url==="/exclusion-plan/outage-production"),f(()=>h.outageProductionListNavigated())),{functional:!0}),z=D((t=a(C),r=a(s),e=a(I))=>t.pipe(O(u.searchTextChange,u.filterSubmit,u.filterCancel,u.pageChange,u.filterChipRemove,h.outageProductionListNavigated,L),_(()=>[e.select(d.selectSearchText),e.select(q),e.select(U)]),S(([,n,i,o])=>r.filter(n??"",i,o).pipe(f(p=>{let l=(p.body??[]).map(b=>g(c({},b),{uniqueId:H(b)})),j=N(l);return v.filterSuccess({items:l,ganttItems:j,count:Number.parseInt(p.headers.get("X-Total-Count")??"0",10)})}),x(()=>y(v.filterFailure()))))),{functional:!0});var vt=[{path:"",data:{pageTitle:"outageProduction.outageProduction"},providers:[F(d),A(w),s],loadComponent:()=>import("./chunk-MXFSP6FO.js").then(t=>t.OutageProductionComponent)}];export{vt as outageProductionRoute};
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.