(()=>{(self.webpackChunkics_operations=self.webpackChunkics_operations||[]).push([[179],{1843:(C,l,e)=>{"use strict";e.d(l,{Z:()=>f});var t=e(5881),r=e.n(t),o=e(2354),i=e.n(o),n=i()(r());n.push([C.id,"",""]),n.locals={"brand-primary-navy":"#182d55","brand-primary-teal":"#6ec6aa","brand-secondary-buttercup":"#f2a71e","brand-secondary-cornflowerblue":"#3e8ccc","brand-secondary-seagull":"#85d3ea","brand-secondary-apple":"#7dc242","brand-secondary-tropicalrainforest":"#007d59","brand-neutral-athensgray":"#eff0f3","brand-neutral-westar":"#e3e1dd","brand-neutral-iceberg":"#daf0f4","grayscale-white":"#fff","grayscale-gray200":"#f8f8f8","grayscale-gray300":"#e4e4e4","grayscale-gray400":"#cecece","grayscale-gray600":"#adadad","grayscale-gray700":"#6c6c6c","grayscale-gray800":"#333","grayscale-black":"#000","status-positive-main":"#319b51","status-positive-light":"#50fd84","status-positive-dark":"#277c41","status-positive-darker":"#1c5934","status-negative-main":"#df5d5f","status-negative-light":"#ef5350","status-negative-dark":"#d1292c","status-negative-darker":"#991e20","status-information-main":"#3e8ccc","status-information-light":"#1294ff","status-information-dark":"#2d71a9","status-information-darker":"#21547d","status-warning-main":"#f2a71e","status-warning-light":"#f7a50f","status-warning-dark":"#bc7e0b","status-warning-darker":"#6b4705"};const f=n},400:(C,l,e)=>{"use strict";e.d(l,{Z:()=>f});var t=e(5881),r=e.n(t),o=e(2354),i=e.n(o),n=i()(r());n.push([C.id,"",""]),n.locals={fontFamily:"Tahoma,Calibri,Arial"};const f=n},7030:(C,l,e)=>{"use strict";e.d(l,{dZ:()=>f,Mw:()=>E});var t=e(3755),r=e(6902);const o=A=>A.query({query:({itemId:d,inventoryGroup:h})=>`/item/${d}/inventorygroup/${h}/parts`});var i=e(9665);const n=A=>A.mutation({query:({itemId:d,body:h})=>({url:`/items/${d}/ct-petroleum-tax`,method:"PUT",body:h})}),f=(0,i.LC)({reducerPath:"catalogApi",baseQuery:(0,t.s)(r.D.api.catalog),endpoints:A=>({catalogParts:o(A),updateCtPetroleumTax:n(A)})}),{useCatalogPartsQuery:p,useUpdateCtPetroleumTaxMutation:E}=f},3755:(C,l,e)=>{"use strict";e.d(l,{s:()=>f});var t=e(4119),r=e(3452),o=e(1732);const i=p=>async E=>{try{const{accessToken:A}=await r.U.acquireTokenSilent({scopes:[p]});if(!A){const d=new Error("Empty access token received from acquireTokenSilent");throw console.error("[appendAuthToken] Empty access token",{scope:p}),d}return E.set("Authorization",`Bearer ${A}`),E}catch(A){const d=(0,o.h)(A);throw console.error("[appendAuthToken] Token acquisition failed",{scope:p,name:d.name,code:d.errorCode||d.code,message:d.message}),A}};var n=e(6902);const f=(p,E={})=>{const{scope:A=n.D.scope,injectCompanyHeader:d=!0}=E;return(0,t.ni)({baseUrl:p,prepareHeaders:async(h,T)=>{try{const m=await i(A)(h);if(d){const W=T.getState().session?.selectedCompanyId;W&&m.set("Tcmis-Company-ID",W)}return m}catch(F){const m=(0,o.h)(F);throw console.error("[baseQueryWithAuth] Failed to prepare auth headers",{baseUrl:p,scope:A,name:m.name,code:m.errorCode||m.code,message:m.message}),F}}})}},4009:(C,l,e)=>{"use strict";e.d(l,{_S:()=>g,Ml:()=>G,l0:()=>_,dn:()=>V,A6:()=>H,Ub:()=>ae,xJ:()=>U,Hi:()=>$,OL:()=>se});var t=e(3755),r=e(6902),o=e(9665);const i=D=>D.query({query:N=>{const j=new URLSearchParams;return N["delivery-date-max"]&&j.append("delivery-date-max",N["delivery-date-max"]),N["delivery-date-min"]&&j.append("delivery-date-min",N["delivery-date-min"]),N.facilityId&&j.append("facility-id",N.facilityId),N.page!==void 0&&j.append("page",N.page.toString()),N.shipment!==void 0&&j.append("shipment",N.shipment.toString()),N.size!==void 0&&j.append("size",N.size.toString()),N.sort&&N.sort.forEach(Q=>j.append("sort",Q)),N.workArea&&j.append("work-area",N.workArea),{url:"/put-away-errors",params:j}}});var n=e(1386);const f=!1,p={content:[{vendorId:"securastock",vendorCabinetId:"6408231608",facilityId:"TestHub",facilityName:"Test Hub",cabinetDescription:"Test Work Area 1",cabinetName:"TestHostWorkArea1",cabinetId:8813573,inventoryGroup:"TestInventoryGroup",inventoryGroupName:"Test Inventory Group"},{vendorId:"securastock",vendorCabinetId:"6408231609",facilityId:"TestHub",facilityName:"Test Hub",cabinetDescription:"Test Work Area 2",cabinetName:"TestHostWorkArea2",cabinetId:8813574,inventoryGroup:"TestInventoryGroup",inventoryGroupName:"Test Inventory Group"},{vendorId:"securastock",vendorCabinetId:"6408231610",facilityId:"TestHub",facilityName:"Test Hub",cabinetDescription:"Test Work Area 3",cabinetName:"TestHostWorkArea3",cabinetId:8813575,inventoryGroup:"TestInventoryGroup",inventoryGroupName:"Test Inventory Group"}],pageable:{pageNumber:0,pageSize:20,sort:{unsorted:!0,sorted:!1,empty:!0},offset:0,unpaged:!1,paged:!0},totalPages:1,totalElements:3,last:!0,numberOfElements:3,first:!0,size:20,number:0,sort:{unsorted:!0,sorted:!1,empty:!0},empty:!1},E=D=>window.location.host.startsWith("localhost")&&f?(console.warn("[DEV] Using mocked /facilities/:facilityId/work-areas response"),D.query({queryFn:async Q=>(await new Promise(oe=>setTimeout(oe,400)),(0,n.Cv)(`[DEV] Returning ${p.totalElements} work areas for facilityId=${Q}`),{data:p})})):D.query({query:Q=>({url:`/facilities/${Q}/work-areas`})}),A=D=>D.mutation({query:N=>({url:"/counts",method:"POST",body:N})}),d=D=>D.query({query:()=>"/ct-petroleum-tax-errors"}),h=!1,T=[{problemCount:4,autoResolved:null,totalCount:4,facilityId:null,facilityName:null,recipientList:["TCMIS@TCMIS.COM"],problems:[{shipToLocationId:"TESTHUB",issueId:98703,companyId:"HOSTCOMPANY",countryAbbrev:null,stateAbbrev:"TX",addressLine1:"101 MY STREET",addressLine2:null,addressLine3:null,city:"AUSTIN",zip:"78759",locationDesc:"TEST HUB LOCATION"},{shipToLocationId:"DALLASDC",issueId:98704,companyId:"HOSTCOMPANY",countryAbbrev:null,stateAbbrev:"TX",addressLine1:"500 COMMERCE ST",addressLine2:"SUITE 100",addressLine3:null,city:"DALLAS",zip:"75201",locationDesc:"DALLAS DISTRIBUTION CENTER"},{shipToLocationId:"HOUSTONWH",issueId:98705,companyId:"HOSTCOMPANY",countryAbbrev:"MEX",stateAbbrev:null,addressLine1:"999 ENERGY BLVD",addressLine2:null,addressLine3:"BLDG C",city:"HOUSTON",zip:"77001",locationDesc:"HOUSTON WAREHOUSE"},{shipToLocationId:"NYOFFICE",issueId:98706,companyId:"EASTCOMPANY",countryAbbrev:null,stateAbbrev:"NY",addressLine1:"1 BROADWAY",addressLine2:null,addressLine3:null,city:"NEW YORK",zip:"10004",locationDesc:"NEW YORK OFFICE"}]}],F=D=>window.location.host.startsWith("localhost")&&h?(console.warn("[DEV] Using mocked /country-abbr-errors response"),D.query({queryFn:async()=>(await new Promise(Q=>setTimeout(Q,300)),(0,n.Cv)("[DEV] Returning mocked country abbrev errors"),{data:T})})):D.query({query:()=>"/country-abbr-errors"}),m=D=>D.mutation({query:({locationId:N,body:j})=>({url:`/locations/${N}/country-abbr`,method:"PUT",body:j})}),I=!1,W=[{problemCount:7,autoResolved:null,totalCount:7,facilityId:null,facilityName:null,recipientList:["TCMIS@TCMIS.COM"],problems:[{shipToLocationId:"TESTHUB",issueId:98703,companyId:"HOSTCOMPANY",countryAbbrev:null,stateAbbrev:null,addressLine1:"101 MY STREET",addressLine2:null,addressLine3:null,city:"AUSTIN",zip:"78759",locationDesc:"TEST HUB LOCATION"},{shipToLocationId:"DALLASDC",issueId:98704,companyId:"HOSTCOMPANY",countryAbbrev:"USA",stateAbbrev:null,addressLine1:"500 COMMERCE ST",addressLine2:"SUITE 100",addressLine3:null,city:"DALLAS",zip:"75201",locationDesc:"DALLAS DISTRIBUTION CENTER"},{shipToLocationId:"HOUSTONWH",issueId:98705,companyId:"HOSTCOMPANY",countryAbbrev:"USA",stateAbbrev:null,addressLine1:"999 ENERGY BLVD",addressLine2:null,addressLine3:"BLDG C",city:"HOUSTON",zip:"77001",locationDesc:"HOUSTON WAREHOUSE"},{shipToLocationId:"NYOFFICE",issueId:98706,companyId:"EASTCOMPANY",countryAbbrev:"USA",stateAbbrev:null,addressLine1:"1 BROADWAY",addressLine2:null,addressLine3:null,city:"NEW YORK",zip:"10004",locationDesc:"NEW YORK OFFICE"},{shipToLocationId:"MEXHUB1",issueId:98707,companyId:"MEXCOMPANY",countryAbbrev:"MEX",stateAbbrev:null,addressLine1:"AV. INSURGENTES 100",addressLine2:null,addressLine3:null,city:"MEXICO CITY",zip:"06600",locationDesc:"MEXICO HUB"}]}],b=D=>window.location.host.startsWith("localhost")&&I?(console.warn("[DEV] Using mocked /state-abbr-errors response"),D.query({queryFn:async()=>(await new Promise(Q=>setTimeout(Q,300)),(0,n.Cv)("[DEV] Returning mocked state abbrev errors"),{data:W})})):D.query({query:()=>"/state-abbr-errors"}),R=D=>D.mutation({query:({locationId:N,body:j})=>({url:`/locations/${N}/state-abbr`,method:"PUT",body:j})}),g=(0,o.LC)({reducerPath:"customerOpsApi",baseQuery:(0,t.s)(r.D.api.customerOps),endpoints:D=>({getPutAwayErrors:i(D),getWorkAreasByFacility:E(D),createCount:A(D),getCtPetroleumTaxErrors:d(D),getCountryAbbrevErrors:F(D),updateCountryAbbrev:m(D),getStateAbbrevErrors:b(D),updateStateAbbrev:R(D)})}),{useGetPutAwayErrorsQuery:B,useLazyGetPutAwayErrorsQuery:H,useGetWorkAreasByFacilityQuery:S,useLazyGetWorkAreasByFacilityQuery:U,useCreateCountMutation:G,useGetCtPetroleumTaxErrorsQuery:L,useLazyGetCtPetroleumTaxErrorsQuery:V,useLazyGetCountryAbbrevErrorsQuery:_,useUpdateCountryAbbrevMutation:$,useLazyGetStateAbbrevErrorsQuery:ae,useUpdateStateAbbrevMutation:se}=g},1781:(C,l,e)=>{"use strict";e.d(l,{AK:()=>h,R0:()=>T,iM:()=>m});var t=e(3755),r=e(6902),o=e(9665),i=e(1386);const n=!1,f=[{countryAbbrev:"USA",countryName:"United States of America",internetCode:"us",countryCodeFips:"US",iso3166Code:"US",defaultLocale:"en-US",taxCurrencyId:"USD",vatExempt:"N",jdeCountryCode:"US"},{countryAbbrev:"CAN",countryName:"Canada",internetCode:"ca",countryCodeFips:"CA",iso3166Code:"CA",defaultLocale:"en-CA",taxCurrencyId:"CAD",vatExempt:"N",jdeCountryCode:"CA"},{countryAbbrev:"MEX",countryName:"Mexico",internetCode:"mx",countryCodeFips:"MX",iso3166Code:"MX",defaultLocale:"es-MX",taxCurrencyId:"MXN",vatExempt:"N",jdeCountryCode:"MX"},{countryAbbrev:"GBR",countryName:"United Kingdom",internetCode:"gb",countryCodeFips:"UK",iso3166Code:"GB",defaultLocale:"en-GB",taxCurrencyId:"GBP",vatExempt:"N",jdeCountryCode:"UK"},{countryAbbrev:"ESP",countryName:"Spain",internetCode:"es",countryCodeFips:"SP",iso3166Code:"ES",defaultLocale:"es-ES",taxCurrencyId:"EUR",vatExempt:"N",jdeCountryCode:"SP"},{countryAbbrev:"DEU",countryName:"Germany",internetCode:"de",countryCodeFips:"GM",iso3166Code:"DE",defaultLocale:"de-DE",taxCurrencyId:"EUR",vatExempt:"N",jdeCountryCode:"GM"},{countryAbbrev:"FRA",countryName:"France",internetCode:"fr",countryCodeFips:"FR",iso3166Code:"FR",defaultLocale:"fr-FR",taxCurrencyId:"EUR",vatExempt:"N",jdeCountryCode:"FR"},{countryAbbrev:"AUS",countryName:"Australia",internetCode:"au",countryCodeFips:"AS",iso3166Code:"AU",defaultLocale:"en-AU",taxCurrencyId:"AUD",vatExempt:"N",jdeCountryCode:"AS"}],p=I=>window.location.host.startsWith("localhost")&&n?(console.warn("[DEV] Using mocked /countries response"),I.query({queryFn:async()=>(await new Promise(R=>setTimeout(R,200)),(0,i.Cv)("[DEV] Returning mocked countries"),{data:f})})):I.query({query:()=>"/countries"}),E=!1,A={USA:[{stateAbbrev:"AL",stateName:"Alabama",sapRegion:"AL"},{stateAbbrev:"AK",stateName:"Alaska",sapRegion:"AK"},{stateAbbrev:"AZ",stateName:"Arizona",sapRegion:"AZ"},{stateAbbrev:"AR",stateName:"Arkansas",sapRegion:"AR"},{stateAbbrev:"CA",stateName:"California",sapRegion:"CA"},{stateAbbrev:"CO",stateName:"Colorado",sapRegion:"CO"},{stateAbbrev:"CT",stateName:"Connecticut",sapRegion:"CT"},{stateAbbrev:"DE",stateName:"Delaware",sapRegion:"DE"},{stateAbbrev:"FL",stateName:"Florida",sapRegion:"FL"},{stateAbbrev:"GA",stateName:"Georgia",sapRegion:"GA"},{stateAbbrev:"HI",stateName:"Hawaii",sapRegion:"HI"},{stateAbbrev:"ID",stateName:"Idaho",sapRegion:"ID"},{stateAbbrev:"IL",stateName:"Illinois",sapRegion:"IL"},{stateAbbrev:"IN",stateName:"Indiana",sapRegion:"IN"},{stateAbbrev:"IA",stateName:"Iowa",sapRegion:"IA"},{stateAbbrev:"KS",stateName:"Kansas",sapRegion:"KS"},{stateAbbrev:"KY",stateName:"Kentucky",sapRegion:"KY"},{stateAbbrev:"LA",stateName:"Louisiana",sapRegion:"LA"},{stateAbbrev:"ME",stateName:"Maine",sapRegion:"ME"},{stateAbbrev:"MD",stateName:"Maryland",sapRegion:"MD"},{stateAbbrev:"MA",stateName:"Massachusetts",sapRegion:"MA"},{stateAbbrev:"MI",stateName:"Michigan",sapRegion:"MI"},{stateAbbrev:"MN",stateName:"Minnesota",sapRegion:"MN"},{stateAbbrev:"MS",stateName:"Mississippi",sapRegion:"MS"},{stateAbbrev:"MO",stateName:"Missouri",sapRegion:"MO"},{stateAbbrev:"MT",stateName:"Montana",sapRegion:"MT"},{stateAbbrev:"NE",stateName:"Nebraska",sapRegion:"NE"},{stateAbbrev:"NV",stateName:"Nevada",sapRegion:"NV"},{stateAbbrev:"NH",stateName:"New Hampshire",sapRegion:"NH"},{stateAbbrev:"NJ",stateName:"New Jersey",sapRegion:"NJ"},{stateAbbrev:"NM",stateName:"New Mexico",sapRegion:"NM"},{stateAbbrev:"NY",stateName:"New York",sapRegion:"NY"},{stateAbbrev:"NC",stateName:"North Carolina",sapRegion:"NC"},{stateAbbrev:"ND",stateName:"North Dakota",sapRegion:"ND"},{stateAbbrev:"OH",stateName:"Ohio",sapRegion:"OH"},{stateAbbrev:"OK",stateName:"Oklahoma",sapRegion:"OK"},{stateAbbrev:"OR",stateName:"Oregon",sapRegion:"OR"},{stateAbbrev:"PA",stateName:"Pennsylvania",sapRegion:"PA"},{stateAbbrev:"RI",stateName:"Rhode Island",sapRegion:"RI"},{stateAbbrev:"SC",stateName:"South Carolina",sapRegion:"SC"},{stateAbbrev:"SD",stateName:"South Dakota",sapRegion:"SD"},{stateAbbrev:"TN",stateName:"Tennessee",sapRegion:"TN"},{stateAbbrev:"TX",stateName:"Texas",sapRegion:"TX"},{stateAbbrev:"UT",stateName:"Utah",sapRegion:"UT"},{stateAbbrev:"VT",stateName:"Vermont",sapRegion:"VT"},{stateAbbrev:"VA",stateName:"Virginia",sapRegion:"VA"},{stateAbbrev:"WA",stateName:"Washington",sapRegion:"WA"},{stateAbbrev:"WV",stateName:"West Virginia",sapRegion:"WV"},{stateAbbrev:"WI",stateName:"Wisconsin",sapRegion:"WI"},{stateAbbrev:"WY",stateName:"Wyoming",sapRegion:"WY"}],SVK:[{stateAbbrev:"AL",stateName:"Alabama",sapRegion:"AL"},{stateAbbrev:"AK",stateName:"Alaska",sapRegion:"AK"},{stateAbbrev:"AZ",stateName:"Arizona",sapRegion:"AZ"},{stateAbbrev:"AR",stateName:"Arkansas",sapRegion:"AR"},{stateAbbrev:"CA",stateName:"California",sapRegion:"CA"},{stateAbbrev:"CO",stateName:"Colorado",sapRegion:"CO"},{stateAbbrev:"CT",stateName:"Connecticut",sapRegion:"CT"},{stateAbbrev:"DE",stateName:"Delaware",sapRegion:"DE"},{stateAbbrev:"FL",stateName:"Florida",sapRegion:"FL"},{stateAbbrev:"GA",stateName:"Georgia",sapRegion:"GA"},{stateAbbrev:"HI",stateName:"Hawaii",sapRegion:"HI"},{stateAbbrev:"ID",stateName:"Idaho",sapRegion:"ID"},{stateAbbrev:"IL",stateName:"Illinois",sapRegion:"IL"},{stateAbbrev:"IN",stateName:"Indiana",sapRegion:"IN"},{stateAbbrev:"IA",stateName:"Iowa",sapRegion:"IA"},{stateAbbrev:"KS",stateName:"Kansas",sapRegion:"KS"},{stateAbbrev:"KY",stateName:"Kentucky",sapRegion:"KY"},{stateAbbrev:"LA",stateName:"Louisiana",sapRegion:"LA"},{stateAbbrev:"ME",stateName:"Maine",sapRegion:"ME"},{stateAbbrev:"MD",stateName:"Maryland",sapRegion:"MD"},{stateAbbrev:"MA",stateName:"Massachusetts",sapRegion:"MA"},{stateAbbrev:"MI",stateName:"Michigan",sapRegion:"MI"},{stateAbbrev:"MN",stateName:"Minnesota",sapRegion:"MN"},{stateAbbrev:"MS",stateName:"Mississippi",sapRegion:"MS"},{stateAbbrev:"MO",stateName:"Missouri",sapRegion:"MO"},{stateAbbrev:"MT",stateName:"Montana",sapRegion:"MT"},{stateAbbrev:"NE",stateName:"Nebraska",sapRegion:"NE"},{stateAbbrev:"NV",stateName:"Nevada",sapRegion:"NV"},{stateAbbrev:"NH",stateName:"New Hampshire",sapRegion:"NH"},{stateAbbrev:"NJ",stateName:"New Jersey",sapRegion:"NJ"},{stateAbbrev:"NM",stateName:"New Mexico",sapRegion:"NM"},{stateAbbrev:"NY",stateName:"New York",sapRegion:"NY"},{stateAbbrev:"NC",stateName:"North Carolina",sapRegion:"NC"},{stateAbbrev:"ND",stateName:"North Dakota",sapRegion:"ND"},{stateAbbrev:"OH",stateName:"Ohio",sapRegion:"OH"},{stateAbbrev:"OK",stateName:"Oklahoma",sapRegion:"OK"},{stateAbbrev:"OR",stateName:"Oregon",sapRegion:"OR"},{stateAbbrev:"PA",stateName:"Pennsylvania",sapRegion:"PA"},{stateAbbrev:"RI",stateName:"Rhode Island",sapRegion:"RI"},{stateAbbrev:"SC",stateName:"South Carolina",sapRegion:"SC"},{stateAbbrev:"SD",stateName:"South Dakota",sapRegion:"SD"},{stateAbbrev:"TN",stateName:"Tennessee",sapRegion:"TN"},{stateAbbrev:"TX",stateName:"Texas",sapRegion:"TX"},{stateAbbrev:"UT",stateName:"Utah",sapRegion:"UT"},{stateAbbrev:"VT",stateName:"Vermont",sapRegion:"VT"},{stateAbbrev:"VA",stateName:"Virginia",sapRegion:"VA"},{stateAbbrev:"WA",stateName:"Washington",sapRegion:"WA"},{stateAbbrev:"WV",stateName:"West Virginia",sapRegion:"WV"},{stateAbbrev:"WI",stateName:"Wisconsin",sapRegion:"WI"},{stateAbbrev:"WY",stateName:"Wyoming",sapRegion:"WY"}],MEX:[{stateAbbrev:"AGU",stateName:"Aguascalientes",sapRegion:"AGU"},{stateAbbrev:"BCN",stateName:"Baja California",sapRegion:"BCN"},{stateAbbrev:"BCS",stateName:"Baja California Sur",sapRegion:"BCS"},{stateAbbrev:"CAM",stateName:"Campeche",sapRegion:"CAM"},{stateAbbrev:"CHP",stateName:"Chiapas",sapRegion:"CHP"},{stateAbbrev:"CHH",stateName:"Chihuahua",sapRegion:"CHH"},{stateAbbrev:"COA",stateName:"Coahuila",sapRegion:"COA"},{stateAbbrev:"COL",stateName:"Colima",sapRegion:"COL"},{stateAbbrev:"DIF",stateName:"Mexico City",sapRegion:"DIF"},{stateAbbrev:"DUR",stateName:"Durango",sapRegion:"DUR"},{stateAbbrev:"GUA",stateName:"Guanajuato",sapRegion:"GUA"},{stateAbbrev:"GRO",stateName:"Guerrero",sapRegion:"GRO"},{stateAbbrev:"HID",stateName:"Hidalgo",sapRegion:"HID"},{stateAbbrev:"JAL",stateName:"Jalisco",sapRegion:"JAL"},{stateAbbrev:"MEX",stateName:"Mexico State",sapRegion:"MEX"},{stateAbbrev:"MIC",stateName:"Michoacan",sapRegion:"MIC"},{stateAbbrev:"MOR",stateName:"Morelos",sapRegion:"MOR"},{stateAbbrev:"NAY",stateName:"Nayarit",sapRegion:"NAY"},{stateAbbrev:"NLE",stateName:"Nuevo Leon",sapRegion:"NLE"},{stateAbbrev:"OAX",stateName:"Oaxaca",sapRegion:"OAX"},{stateAbbrev:"PUE",stateName:"Puebla",sapRegion:"PUE"},{stateAbbrev:"QUE",stateName:"Queretaro",sapRegion:"QUE"},{stateAbbrev:"ROO",stateName:"Quintana Roo",sapRegion:"ROO"},{stateAbbrev:"SLP",stateName:"San Luis Potosi",sapRegion:"SLP"},{stateAbbrev:"SIN",stateName:"Sinaloa",sapRegion:"SIN"},{stateAbbrev:"SON",stateName:"Sonora",sapRegion:"SON"},{stateAbbrev:"TAB",stateName:"Tabasco",sapRegion:"TAB"},{stateAbbrev:"TAM",stateName:"Tamaulipas",sapRegion:"TAM"},{stateAbbrev:"TLA",stateName:"Tlaxcala",sapRegion:"TLA"},{stateAbbrev:"VER",stateName:"Veracruz",sapRegion:"VER"},{stateAbbrev:"YUC",stateName:"Yucatan",sapRegion:"YUC"},{stateAbbrev:"ZAC",stateName:"Zacatecas",sapRegion:"ZAC"}],CAN:[{stateAbbrev:"AB",stateName:"Alberta",sapRegion:"AB"},{stateAbbrev:"BC",stateName:"British Columbia",sapRegion:"BC"},{stateAbbrev:"MB",stateName:"Manitoba",sapRegion:"MB"},{stateAbbrev:"NB",stateName:"New Brunswick",sapRegion:"NB"},{stateAbbrev:"NL",stateName:"Newfoundland and Labrador",sapRegion:"NL"},{stateAbbrev:"NS",stateName:"Nova Scotia",sapRegion:"NS"},{stateAbbrev:"NT",stateName:"Northwest Territories",sapRegion:"NT"},{stateAbbrev:"NU",stateName:"Nunavut",sapRegion:"NU"},{stateAbbrev:"ON",stateName:"Ontario",sapRegion:"ON"},{stateAbbrev:"PE",stateName:"Prince Edward Island",sapRegion:"PE"},{stateAbbrev:"QC",stateName:"Quebec",sapRegion:"QC"},{stateAbbrev:"SK",stateName:"Saskatchewan",sapRegion:"SK"},{stateAbbrev:"YT",stateName:"Yukon",sapRegion:"YT"}]},d=I=>window.location.host.startsWith("localhost")&&E?(console.warn("[DEV] Using mocked /states response"),I.query({queryFn:async R=>(await new Promise(g=>setTimeout(g,150)),(0,i.Cv)("[DEV] Returning mocked states for",R),{data:A[R]??[]})})):I.query({query:R=>`/states?countryCode=${encodeURIComponent(R)}`}),h=(0,o.LC)({reducerPath:"globalApi",baseQuery:(0,t.s)(r.D.api.global),endpoints:I=>({getCountries:p(I),getStates:d(I)})}),{useGetCountriesQuery:T,useLazyGetCountriesQuery:F,useLazyGetStatesQuery:m}=h},7110:(C,l,e)=>{"use strict";e.d(l,{GW:()=>U,T:()=>ae,Pg:()=>_,bt:()=>j,of:()=>oe});var t=e(3755);const r=P=>P.query({query:()=>({url:"/user"})});var o=e(6902),i=e(9665);const n=P=>P.query({query:({role:X})=>({url:"/users",params:{role:X}})});var f=e(1386);const p=!1,E="multiple",A=[{companyId:"HostCompany",personnelId:1027356,status:"A",defaultFacilityId:"FAC_DE_01",defaultHub:"HUB_DE_01",adminRole:"User",dataSource:"TCMIS",lockoutDate:null,defaultOpsEntityId:"OPS_DE_01",itarRole:"User",msdsQcRole:"User"},{companyId:"ACME_US",personnelId:1027356,status:"A",defaultFacilityId:"FAC_US_01",defaultHub:"HUB_US_01",adminRole:"Admin",dataSource:"TCMIS",lockoutDate:null,defaultOpsEntityId:"OPS_US_01",itarRole:"Admin",msdsQcRole:"Admin"},{companyId:"BOEING_UK",personnelId:1027356,status:"A",defaultFacilityId:"FAC_UK_01",defaultHub:"HUB_UK_01",adminRole:"User",dataSource:"TCMIS",lockoutDate:null,defaultOpsEntityId:"OPS_UK_01",itarRole:"User",msdsQcRole:"User"}],d=P=>window.location.host.startsWith("localhost")&&p?(console.warn(`[DEV] Using mocked /user/companies response (mode: ${E})`),P.query({queryFn:async()=>{await new Promise(Y=>setTimeout(Y,400));let O;return E==="none"?O=[]:E==="single"?O=[A[0]]:O=A,(0,f.Cv)(`[DEV] Returning ${O.length} companies`),{data:O}}})):P.query({query:()=>({url:"/user/companies"})}),h=!1,T=P=>window.location.host.startsWith("localhost")&&h?(console.warn("[DEV] Using mocked /users/:personnelId/companies response"),P.query({queryFn:async()=>(await new Promise(O=>setTimeout(O,400)),{data:[]})})):P.query({query:O=>({url:`/users/${O}/companies`})}),F=!1,m=[{personnelId:1027356,companyId:"HostCompany",facilityId:"testfacility1",facilityName:"Test Facility 1",preferredAccountSysId:"testaccountsys1",preferredAccountSysDesc:"Test Preferred Account System",defaultApplication:"DefaultApp1",defaultApplicationDesc:"Default Application 1",adminRole:"Admin"}],I=P=>window.location.host.startsWith("localhost")&&F?(console.warn("[DEV] Using mocked /users/:personnelId/facilities response"),P.query({queryFn:async O=>(await new Promise(Y=>setTimeout(Y,400)),(0,f.Cv)(`[DEV] Returning ${m.length} facilities for personnelId=${O}`),{data:m})})):P.query({query:O=>({url:`/users/${O}/facilities`})}),W=!1,b=P=>window.location.host.startsWith("localhost")&&W?(console.warn("[DEV] Using mocked /users/:personnelId/companies/:companyId/facilities response"),P.query({queryFn:async()=>(await new Promise(O=>setTimeout(O,400)),{data:[]})})):P.query({query:({personnelId:O,companyId:Y})=>({url:`/users/${O}/companies/${Y}/facilities`})}),R=!1,g="all",B=[{companyId:"HostCompany",personnelId:1027356,pageId:"invoice-problem-management",adminRole:null},{companyId:"HostCompany",personnelId:1027356,pageId:"secura-stock",adminRole:null},{companyId:"HostCompany",personnelId:1027356,pageId:"inbound-quality",adminRole:null}],H=[{companyId:"HostCompany",personnelId:1027356,pageId:"invoice-problem-management",adminRole:null}],S=P=>window.location.host.startsWith("localhost")&&R?(console.warn(`[DEV] Using mocked /users/:userId/companies/:companyId/pages response (mode: ${g})`),P.query({queryFn:async()=>{await new Promise(Y=>setTimeout(Y,400));let O;return g==="none"?O=[]:g==="partial"?O=H:O=B,(0,f.Cv)(`[DEV] Returning ${O.length} pages`),{data:O}}})):P.query({query:({userId:O,companyId:Y})=>({url:`/users/${O}/companies/${Y}/pages`})}),U=(0,i.LC)({reducerPath:"iamApi",baseQuery:(0,t.s)(o.D.api.iam),endpoints:P=>({getUserWorkContext:r(P),getAuthorizedUsersForRoles:n(P),getUserCompanies:d(P),getUserCompaniesByPersonnelId:T(P),getUserFacilities:I(P),getUserFacilitiesByCompany:b(P),getUserPages:S(P)})}),{useGetUserWorkContextQuery:G,useGetAuthorizedUsersForRolesQuery:L,useGetUserCompaniesQuery:V,useLazyGetUserCompaniesQuery:_,useGetUserCompaniesByPersonnelIdQuery:$,useLazyGetUserCompaniesByPersonnelIdQuery:ae,useGetUserFacilitiesQuery:se,useLazyGetUserFacilitiesQuery:D,useGetUserFacilitiesByCompanyQuery:N,useLazyGetUserFacilitiesByCompanyQuery:j,useGetUserPagesQuery:Q,useLazyGetUserPagesQuery:oe}=U},4890:(C,l,e)=>{"use strict";e.d(l,{wU:()=>F,_o:()=>b,hr:()=>m});var t=e(3755),r=e(6902);const o=r.D.api.logistics,i=null,n={Prefer:"code=200, dynamic=true",Accept:"application/json"},f={Prefer:"code=200",Accept:"application/json"},p=R=>R.query({query:({receiptId:g})=>{console.log("[getReceipt] Fetching receipt with ID:",g);const B={url:`${o}/receipts/${g}`,headers:n};return console.log("[getReceipt] Request configuration:",{url:B.url,headers:Object.keys(B.headers||{})}),B},transformResponse:(g,B,H)=>(console.log("[getReceipt] Successfully received receipt data for ID:",H.receiptId),console.log("[getReceipt] Response data:",{receiptId:g?.id||"N/A",status:g?.returnReceiptId||"N/A",responseSize:JSON.stringify(g).length}),g),transformErrorResponse:(g,B,H)=>{const S=g;return console.log("[getReceipt] Error fetching receipt with ID:",H.receiptId),console.log("[getReceipt] Error details:",{status:S.status,error:S.error,data:S.data}),g}}),E=R=>R.query({query:()=>({url:"/receipts/documenttypes"})}),A=null,d=R=>R.query({query:({assignedTo:g,hub:B,operatingEntity:H,receivingStatus:S,assignedToUser:U,inventoryGroups:G=[]})=>{const L=new URLSearchParams;L.append("operatingEntity",H),L.append("hub",B),L.append("assignedTo",g);for(let V=0;VR.query({query:g=>{console.log("[getReceiptStatusViewsById] Starting query with receiptId:",g);const B=`/receipts/views/status/${g}`;return console.log("[getReceiptStatusViewsById] Generated URL:",B),{url:B}},transformResponse:g=>(console.log("[getReceiptStatusViewsById] Raw response received:",g),g),transformErrorResponse:g=>(console.log("[getReceiptStatusViewsById] Error response:",g),g)});var T=e(9665);const F=(0,T.LC)({reducerPath:"logisticsApi",baseQuery:(0,t.s)(r.D.api.logistics),endpoints:R=>({getReceipt:p(R),getReceiptStatusViews:d(R),getReceiptStatusViewsById:h(R),getReceiptDocumentTypes:E(R)})}),{useGetReceiptQuery:m,useLazyGetReceiptStatusViewsQuery:I,useLazyGetReceiptStatusViewsByIdQuery:W,useGetReceiptDocumentTypesQuery:b}=F},3239:(C,l,e)=>{"use strict";e.d(l,{L:()=>n,r:()=>f});var t=e(3755),r=e(6902),o=e(9665),i=e(7260);const n=(0,o.LC)({reducerPath:"microsoftGraphApi",baseQuery:(0,t.s)(r.D.api.microsoftGraph,{scope:i.f1,injectCompanyHeader:!1}),endpoints:p=>({currentUser:p.query({query:()=>"me"})})}),{useCurrentUserQuery:f}=n},3452:(C,l,e)=>{"use strict";e.d(l,{U:()=>n});var t=e(1825),r=e(9600),o=e(6902);const i={auth:{clientId:o.D.authentication.clientId,authority:o.D.authentication.authority,redirectUri:window.location.origin,postLogoutRedirectUri:window.location.origin},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1}},n=new t.L(i);n.handleRedirectPromise().then(f=>{f&&n.setActiveAccount(f.account)}).catch(f=>{console.error("Redirect authentication error:",f)}),n.addEventCallback(f=>{if(f.eventType===r.t.LOGIN_SUCCESS&&f.payload){const E=f.payload.account;n.setActiveAccount(E)}})},7260:(C,l,e)=>{"use strict";e.d(l,{X3:()=>i,f1:()=>o,s5:()=>n});const t=null,r={prod:"api://b42aa4a0-7833-4601-91e0-cd9e26b96401/ICSService.DefaultScope",dev:"api://a390d735-8347-4ef1-8a65-875d1410e88c/ICSService.DefaultScope",localhost:"api://a390d735-8347-4ef1-8a65-875d1410e88c/ICSService.DefaultScope"},o="User.Read",i=f=>r[f]||r.prod,n=f=>[i(f),o]},3168:(C,l,e)=>{"use strict";e.d(l,{$:()=>t});const t={INVOICE_PROBLEM_MANAGEMENT:"invoice-problem-management",SECURA_STOCK:"secura-stock"}},888:(C,l,e)=>{"use strict";e.d(l,{V:()=>t});const t=(r,o)=>{if(console.log(`[getEnvironmentFromHost] Input host: "${r}"`),console.log(`[getEnvironmentFromHost] Input namespace: "${o}"`),r.startsWith("localhost"))return console.log("[getEnvironmentFromHost] Localhost detected - returning dev environment"),"localhost";const i=r.split(".")[0];console.log(`[getEnvironmentFromHost] Host part: "${i}"`);let n;return i==="chemops"?n="prod":i.startsWith("chemops-")?n=i.replace("chemops-",""):n="prod",console.log(`[getEnvironmentFromHost] Determined environment: "${n}"`),n}},6902:(C,l,e)=>{"use strict";e.d(l,{D:()=>p});var t=e(888),r=e(7260);const o={namespace:"ics-operations-app",authentication:{clientId:"18a25ed5-b469-4694-a8a6-475fdf28e31a",authority:"https://login.microsoftonline.com/c7354023-f985-41a6-966e-da42877461b4"},api:{microsoftGraph:"https://graph.microsoft.com/v1.0",logistics:"https://chemops-dev.incora.com/chemicals/api/logistics",iam:"https://chemops-dev.incora.com/chemicals/api/iam",customerOps:"https://chemops-dev.incora.com/chemicals/api/customer-ops",catalog:"https://chemops-dev.incora.com/chemicals/api/catalog",global:"https://chemops-dev.incora.com/chemicals/api/global"},scope:(0,r.X3)("dev")},i={namespace:"ics-operations-app",authentication:{clientId:"a14295c2-fc21-4cf7-892d-73bd92cf2086",authority:"https://login.microsoftonline.com/c7354023-f985-41a6-966e-da42877461b4"},api:{microsoftGraph:"https://graph.microsoft.com/v1.0",logistics:"https://chemops.incora.com/chemicals/api/logistics",iam:"https://chemops.incora.com/chemicals/api/iam",customerOps:"https://chemops.incora.com/chemicals/api/customer-ops",catalog:"https://chemops.incora.com/chemicals/api/catalog",global:"https://chemops.incora.com/chemicals/api/global"},scope:(0,r.X3)("prod")},n={namespace:"ics-operations-app",authentication:{clientId:"18a25ed5-b469-4694-a8a6-475fdf28e31a",authority:"https://login.microsoftonline.com/c7354023-f985-41a6-966e-da42877461b4"},api:{microsoftGraph:"https://graph.microsoft.com/v1.0",logistics:"https://chemops-dev.incora.com/chemicals/api/logistics",iam:"https://chemops-dev.incora.com/chemicals/api/iam",customerOps:"https://chemops-dev.incora.com/chemicals/api/customer-ops",catalog:"https://chemops-dev.incora.com/chemicals/api/catalog",global:"https://chemops-dev.incora.com/chemicals/api/global"},scope:(0,r.X3)("dev")},p=(()=>{if(console.log("Configuration initialization started"),console.log("Current host:",window.location.host),console.log("Full location:",window.location.href),window.location.host.startsWith("localhost"))return console.log("Localhost detected - using development configuration"),console.log("Development configuration loaded:",o),{...o,scope:(0,r.X3)("localhost")};console.log("Non-localhost environment detected");const E=(0,t.V)(window.location.host,"ics-operations-app");console.log("Environment detected:",E);let A,d;return E==="prod"?(console.log("Loading production configuration"),A=i,d=(0,r.X3)("prod")):(console.log("Loading development configuration"),A=n,d=(0,r.X3)(E)||(0,r.X3)("dev")),console.log("Final configuration loaded:",A),{...A,scope:d}})()},8242:(C,l,e)=>{"use strict";e.d(l,{mA:()=>f,I0:()=>r,rM:()=>H,Tt:()=>p,TE:()=>b,v9:()=>o});var t=e(3583);const r=t.I0,o=t.v9;var i=e(9288),n=e(8051);const f=()=>{const{instance:S,accounts:U}=(0,i.Fp)(),[G,L]=(0,n.useState)(S.getActiveAccount()??U[0]??null);return(0,n.useEffect)(()=>{const V=S.getActiveAccount();if(V){L(V);return}U.length>0?(S.setActiveAccount(U[0]),L(U[0])):L(null)},[U,S]),G},p=S=>{(0,n.useEffect)(()=>{document.title=S},[S])};var E=(S=>(S.Default="Default",S.QATechnician="ics-qa-technician",S.QASupervisor="ics-qa-supervisor",S.InventoryManager="Inventory Manager",S))(E||{});const{Default:A,QATechnician:d,QASupervisor:h,InventoryManager:T}=E,F={"user.read":[A],"user.write":[A],"sds.read":[A],"warehouse-operations.read":[d,h,T],"inbound-quality.read":[d,h],"inbound-quality.assign":[h],"receiving.read":[d,h,T],"qvr.read":[d,h]},m=S=>Object.entries(F).reduce((U,[G,L])=>((L.includes(S)||L.includes(E.Default))&&U.push(G),U),[]),I=S=>S.reduce((G,L)=>[...G,...m(L)],[]).filter((G,L,V)=>V.indexOf(G)===L),W=S=>!S||S.length===0?[E.Default]:S,b=()=>{const S=f(),U=W(S?.idTokenClaims?.roles),G=I(U);return{hasPermission:$=>($||($="user.read"),!0),hasRole:$=>U.includes($),getPermissions:()=>G}};var R=e(8343),g=e(8868),B=e(5029);const H=()=>{const S=(0,g.v9)(B.hV);return{hasPageAccess:G=>S.some(L=>L.pageId===G)}}},8343:(C,l,e)=>{"use strict";e.d(l,{Q:()=>A});var t=e(8051),r=e(8868),o=e(9288),i=e(7110),n=e(5029),f=e(3168),p=e(1386),E=e(1732);const A=()=>{const d=(0,r.I0)(),{accounts:h}=(0,o.Fp)(),{isInitialized:T}=(0,r.v9)(W=>W.session),[F]=(0,i.Pg)(),[m]=(0,i.of)(),I=(0,t.useRef)(!1);(0,t.useEffect)(()=>((0,p.Cv)("[BOOTSTRAP MOUNT]"),()=>{(0,p.Cv)("[BOOTSTRAP UNMOUNT]")}),[]),(0,t.useEffect)(()=>{if((0,p.Cv)("[BOOTSTRAP EFFECT] Running initialization check"),h.length===0){(0,p.Cv)("[SessionBootstrap] No authenticated accounts, skipping initialization");return}if(T){(0,p.Cv)("[SessionBootstrap] Session already initialized");return}if(I.current){(0,p.Cv)("[SessionBootstrap] Initialization already attempted");return}(0,p.Cv)("[SessionBootstrap] Starting session initialization..."),I.current=!0,(async()=>{try{(0,p.Cv)("[SessionBootstrap] Fetching companies...");const b=await F().unwrap();if(!b||!Array.isArray(b)){(0,p.H)("[SessionBootstrap] Invalid companies response:",b),d((0,n.o4)("Unable to retrieve your company access. Please contact support."));return}if((0,p.Cv)("[SessionBootstrap] Companies fetched:",b.length),b.length===0){(0,p.Ki)("[SessionBootstrap] User has no companies"),d((0,n.o4)("You do not have access to any companies. Please contact your administrator."));return}const R=b[0].personnelId;if(typeof R!="number"){(0,p.H)("[SessionBootstrap] Invalid personnelId for company:",b[0].companyId),d((0,n.o4)("Your user profile is incomplete. Please contact your administrator."));return}(0,p.Cv)("[SessionBootstrap] Setting personnelId:",R),d((0,n.y8)(R)),(0,p.Cv)("[SessionBootstrap] Auto-selecting first company:",b[0].companyId),d((0,n.ht)(b[0])),(0,p.Cv)("[SessionBootstrap] Fetching user pages for company:",b[0].companyId);const g=await m({userId:R,companyId:b[0].companyId}).unwrap();if(!Array.isArray(g)){(0,p.H)("[SessionBootstrap] Invalid pages response:",g),d((0,n.o4)("Unable to retrieve your page access. Please contact support."));return}if(g.length===0){(0,p.Ki)("[SessionBootstrap] User has no accessible pages"),d((0,n.o4)("You do not have access to any pages. Please contact your administrator."));return}(0,p.Cv)("[SessionBootstrap] User pages fetched:",g.length);const B=Object.values(f.$);g.forEach(H=>{B.includes(H.pageId)||(0,p.Ki)("[SessionBootstrap] Unknown pageId returned by backend \u2014 check PAGE_IDS registry for drift:",H.pageId)}),d((0,n.QQ)(g)),d((0,n.Uv)(b)),(0,p.Cv)("[SessionBootstrap] Session initialization complete")}catch(b){(0,p.H)("[SessionBootstrap] Error during initialization:",b);let R="Unable to complete session initialization. Please try again or contact support.";const g=(0,E.h)(b);g.name==="TypeError"||g.message&&(g.message.includes("fetch")||g.message.includes("network"))?R="Network error: Unable to connect to the service. Please check your internet connection.":g.status===401||g.status===403?R="You do not have permission to access this application. Please contact support.":g.status!==void 0&&g.status>=500?R="Service unavailable. Please try again later.":g.dataMessage?R=g.dataMessage:g.message&&g.message.length<200&&(R=g.message),d((0,n.o4)(R))}})()},[h.length,T,d,F,m])}},2747:(C,l,e)=>{"use strict";var t=e(9470),r=e(8051),o=e(8236),i=e(1632),n=e(7924);const f=({children:a})=>(0,t.jsx)(n.Z,{sx:{display:"flex"},children:a});var p=e(2522),E=e(2097),A=e(6367),d=e(5344),h=e(366),T=e(5909),F=e(1155),m=e(8242),I=e(3813),W=e(9951),b=e(2485),R=e(2322);const g=(0,I.ZP)(W.Z)(()=>({"& .MuiTypography-root":{fontSize:"0.875rem"}})),B=({icon:a,label:y,path:x})=>{const u=(0,m.v9)(Z=>Z.portal.sideNavOpen),K=(0,i.s0)(),{pathname:J}=(0,i.TH)();return(0,t.jsxs)(b.Z,{disableRipple:!0,selected:J===x,onClick:()=>K(x),sx:Z=>({minHeight:48,justifyContent:u?"space-evenly":"center",margin:"0.25rem","&.MuiButtonBase-root.MuiListItemButton-root":{borderRadius:"0.25rem",":hover:not(.Mui-selected)":{backgroundColor:Z.palette.primary.light,filter:"brightness(1.2)",opacity:.8,"& .MuiListItemIcon-root, .MuiListItemText-root":{color:Z.palette.grey[400]}},"&.Mui-selected":{backgroundColor:Z.palette.primary.main,"& .MuiListItemIcon-root, .MuiListItemText-root":{color:Z.palette.getContrastText(Z.palette.primary.main)}}}}),children:[(0,t.jsx)(R.Z,{sx:{minWidth:0,mr:u?"0.5rem":"auto",justifyContent:"center",opacity:u?.7:1},children:a}),(0,t.jsx)(g,{primary:y,sx:{opacity:u?1:0}})]},y)},H=({links:a})=>{const{hasPermission:y}=(0,m.TE)(),{hasPageAccess:x}=(0,m.rM)();return(0,t.jsx)(t.Fragment,{children:a.map(u=>!y(u.permission)||u.pageId!==void 0&&!x(u.pageId)?null:(0,t.jsx)(B,{...u},u.label))})};var S=e(3192);const U="15rem",G=a=>({width:U,transition:a.transitions.create("width",{easing:a.transitions.easing.sharp,duration:a.transitions.duration.enteringScreen}),overflowX:"hidden"}),L=a=>({transition:a.transitions.create("width",{easing:a.transitions.easing.sharp,duration:a.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${a.spacing(7)} + 1px)`,[a.breakpoints.up("sm")]:{width:`calc(${a.spacing(8)} + 1px)`}}),V=(0,I.ZP)(S.ZP,{shouldForwardProp:a=>a!=="open"})(({theme:a,open:y})=>({width:U,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...y&&{...G(a),"& .MuiDrawer-paper":G(a)},...!y&&{...L(a),"& .MuiDrawer-paper":L(a)}})),_=(0,I.ZP)("div")(({theme:a})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",backgroundColor:a.palette.primary.light,padding:a.spacing(0,1),...a.mixins.toolbar}));var $=e(3841);const ae={sideNavOpen:!0},se=(0,$.oM)({name:"portal",initialState:ae,reducers:{toggleDrawer(a){a.sideNavOpen=!a.sideNavOpen}}}),{toggleDrawer:D}=se.actions,N=se.reducer;var j=e(1233),Q=e(8095),oe=e(6974),P=e(3070),X=e(3168);const ee=[{label:"Warehouse Operations",links:[{icon:(0,t.jsx)(j.Z,{}),label:"Invoice Problem Management",path:"/warehouse-operations/invoice-problem-management",permission:"user.write",pageId:X.$.INVOICE_PROBLEM_MANAGEMENT},{icon:(0,t.jsx)(Q.Z,{}),label:"SecuraStock",path:"/warehouse-operations/secura-stock",permission:"user.write",pageId:X.$.SECURA_STOCK}]}],O={links:[{icon:(0,t.jsx)(oe.Z,{}),label:"Account",path:"/account"},{icon:(0,t.jsx)(P.Z,{}),label:"Logout",path:"/logout"}]};var Y=e(7150),Ae=e(5444);const he=({label:a,open:y})=>(0,t.jsx)(Ae.Z,{fontWeight:"bold",fontSize:"0.6rem",sx:y?{m:"1rem",opacity:.8}:{m:"1rem",textAlign:"center",visibility:"hidden"},children:a.toUpperCase()},a),le=()=>(0,t.jsx)(p.Z,{sx:{marginTop:"0.75rem"}}),Ce=()=>{const a=(0,m.v9)(u=>u.portal.sideNavOpen),y=(0,m.I0)(),x=(0,i.s0)();return(0,t.jsxs)(V,{variant:"permanent",open:a,sx:{fontSize:"0.875rem"},children:[(0,t.jsx)(_,{children:a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E.Z,{onClick:()=>x("/"),sx:{marginRight:"4rem"},children:(0,t.jsx)("img",{alt:"Incora Logo",src:Y,style:{maxHeight:"2.0rem"}})}),(0,t.jsx)(A.Z,{onClick:()=>y(D()),children:(0,t.jsx)(h.Z,{})})]}):(0,t.jsx)(A.Z,{color:"inherit","aria-label":"open drawer",onClick:()=>y(D()),sx:{marginRight:"0.25rem"},children:(0,t.jsx)(T.Z,{})})}),(0,t.jsx)(p.Z,{}),(0,t.jsxs)(d.Z,{component:"nav","data-testid":"side-nav",children:[(0,t.jsx)(B,{icon:(0,t.jsx)(F.Z,{}),path:"/",label:"Home"}),(0,t.jsx)(le,{}),ee.map(u=>(0,t.jsxs)("div",{children:[u?.label?(0,t.jsx)(he,{label:u.label,open:a}):null,(0,t.jsx)(H,{...u}),(0,t.jsx)(le,{})]},u.label))]}),(0,t.jsx)(d.Z,{sx:{mt:"auto"},component:"nav",children:(0,t.jsx)(H,{...O})})]})};var de=e(9902);const Ee=({children:a})=>(0,t.jsx)(de.Z,{disableGutters:!0,maxWidth:!1,sx:{maxWidth:"100%",height:"100vh",overflow:"auto"},children:a}),Re=({children:a})=>(0,t.jsxs)(f,{children:[(0,t.jsx)(Ce,{}),(0,t.jsx)(Ee,{children:a})]}),q=a=>(0,t.jsx)(Re,{children:a});var s=e(9540),c=e(4776),v=e(3661);const k=(0,I.ZP)(v.Z)(({theme:a})=>({backgroundColor:a.palette.primary.light,boxShadow:"none",zIndex:a.zIndex.drawer+1})),ue=a=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(k,{position:"relative",children:(0,t.jsx)(c.Z,{children:(0,t.jsx)("img",{alt:"Incora Logo",src:Y,style:{maxHeight:"2rem",paddingLeft:"2rem"}})})}),(0,t.jsx)(n.Z,{sx:{pt:1},children:a.children})]}),re=a=>(0,t.jsx)(ue,{children:a});var w=e(5110);const we=(0,w.ZP)(()=>Promise.all([e.e(962),e.e(156),e.e(937),e.e(110),e.e(216),e.e(267)]).then(e.bind(e,4640)),{resolveComponent:a=>a.Form}),$e=(0,w.ZP)(()=>e.e(713).then(e.bind(e,9648)),{resolveComponent:a=>a.Summary}),Xe=(0,w.ZP)(()=>e.e(12).then(e.bind(e,8960)),{resolveComponent:a=>a.Specifications}),ke=(0,w.ZP)(()=>Promise.all([e.e(962),e.e(156),e.e(216),e.e(567)]).then(e.bind(e,632)),{resolveComponent:a=>a.ReceiptDetails}),Je=(0,w.ZP)(()=>Promise.all([e.e(962),e.e(156),e.e(216),e.e(47)]).then(e.bind(e,8306)),{resolveComponent:a=>a.Notes}),qe=[{id:"qvr",path:"/qvr/:receiptId",children:[{id:"qvr-form",index:!0,element:re((0,t.jsx)(we,{}))},{id:"qvr-summary",path:"summary",element:re((0,t.jsx)($e,{}))},{id:"qvr-specification",path:"specification",element:re((0,t.jsx)(Xe,{}))},{id:"qvr-receipt-details",path:"receipt-details",element:re((0,t.jsx)(ke,{}))},{id:"qvr-notes",path:"notes",element:re((0,t.jsx)(Je,{}))}]}],_e=(0,w.ZP)(()=>Promise.all([e.e(962),e.e(937),e.e(216),e.e(378)]).then(e.bind(e,1982)),{resolveComponent:a=>a.Account}),et=[{id:"account",path:"/account",element:q((0,t.jsx)(_e,{}))}];var tt=e(8810),at=e(5236),st=e(2743);const xe=()=>((0,m.Tt)("Unauthorized"),(0,t.jsx)(de.Z,{sx:{pt:5},children:(0,t.jsx)(tt.Z,{children:(0,t.jsxs)(at.Z,{severity:"error",children:[(0,t.jsx)(st.Z,{children:"Authorization"}),"You are not authorized to view this content."]})})})),Ue=({children:a,permission:y,pageId:x})=>{const{hasPermission:u}=(0,m.TE)(),{hasPageAccess:K}=(0,m.rM)();return u(y)?x!==void 0&&!K(x)?(0,t.jsx)(xe,{}):a:(0,t.jsx)(xe,{})},ot=(0,w.ZP)(()=>Promise.all([e.e(962),e.e(156),e.e(937),e.e(110),e.e(216),e.e(763)]).then(e.bind(e,4342)),{resolveComponent:a=>a.InvoiceProblemManagementPage}),nt=(0,w.ZP)(()=>Promise.all([e.e(962),e.e(156),e.e(937),e.e(110),e.e(216),e.e(618)]).then(e.bind(e,7055)),{resolveComponent:a=>a.SecuraStockPage}),rt=[{id:"warehouse-operations",path:"/warehouse-operations",children:[{id:"warehouse-operations",index:!0,element:q((0,t.jsx)(s.LoadableNotFound,{}))},{id:"invoice-problem-management",path:"invoice-problem-management",element:q((0,t.jsx)(Ue,{permission:"user.write",pageId:X.$.INVOICE_PROBLEM_MANAGEMENT,children:(0,t.jsx)(ot,{})}))},{id:"secura-stock",path:"secura-stock",element:q((0,t.jsx)(Ue,{permission:"user.write",pageId:X.$.SECURA_STOCK,children:(0,t.jsx)(nt,{})}))}]}];var it=e(8868),Ie=e(9288),be=e(1240),z=e(1386);const ct=({children:a})=>{const y=(0,i.s0)(),x=(0,i.TH)(),{accounts:u}=(0,Ie.Fp)();(0,z.Cv)(`[GUARD] path=${x.pathname}`);const{selectedCompanyId:K,isInitialized:J,initError:Z}=(0,it.v9)(Le=>Le.session);return(0,r.useEffect)(()=>{if(u.length===0){(0,z.Cv)("[CompanyGuard] No authenticated accounts, skipping guard logic");return}if(!J){(0,z.Cv)("[CompanyGuard] Session not initialized yet, waiting...");return}if((0,z.Cv)("[CompanyGuard] Guard check:",{path:x.pathname,isInitialized:J,initError:Z,selectedCompanyId:K}),Z){(0,z.Cv)("[CompanyGuard] Initialization error detected, redirecting to login"),y("/login",{replace:!0});return}},[J,Z,K,u.length,x.pathname,y]),J?Z?((0,z.Cv)("[CompanyGuard] Init error present, redirecting..."),(0,t.jsx)(n.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:(0,t.jsx)(be.Z,{})})):K?((0,z.Cv)("[CompanyGuard] Rendering children (init successful, company selected)"),(0,t.jsx)(t.Fragment,{children:a})):((0,z.Cv)("[CompanyGuard] Waiting for company auto-selection..."),(0,t.jsxs)(n.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100vh",gap:2},children:[(0,t.jsx)(be.Z,{}),(0,t.jsx)(n.Z,{sx:{color:"text.secondary"},children:"Loading your account..."})]})):((0,z.Cv)("[CompanyGuard] Rendering loading spinner (not initialized)"),(0,t.jsxs)(n.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100vh",gap:2},children:[(0,t.jsx)(be.Z,{}),(0,t.jsx)(n.Z,{sx:{color:"text.secondary"},children:"Loading your account..."})]}))},lt=(0,w.ZP)(()=>Promise.all([e.e(216),e.e(177)]).then(e.bind(e,6490)),{resolveComponent:a=>a.Home}),dt=(0,w.ZP)(()=>e.e(227).then(e.bind(e,5107)),{resolveComponent:a=>a.SDS}),ut=(0,w.ZP)(()=>Promise.all([e.e(962),e.e(156),e.e(216),e.e(535)]).then(e.bind(e,7219)),{resolveComponent:a=>a.Login}),mt=(0,w.ZP)(()=>e.e(170).then(e.bind(e,9841)),{resolveComponent:a=>a.Logout}),pt=[{id:"login",path:"/login",element:(0,t.jsx)(ut,{})},{id:"logout",path:"/logout",element:(0,t.jsx)(mt,{})},{id:"protected",element:(0,t.jsx)(ct,{children:(0,t.jsx)(i.j3,{})}),children:[{id:"home",path:"/",element:q((0,t.jsx)(lt,{}))},{id:"sds",path:"/sds",element:q((0,t.jsx)(dt,{}))},...qe,...et,...rt,{id:"not-found",path:"*",element:q((0,t.jsx)(s.LoadableNotFound,{}))}]}],gt=()=>(0,i.V$)(pt);var vt=e(8343);const yt=({children:a})=>((0,vt.Q)(),(0,t.jsx)(t.Fragment,{children:a})),ft=()=>{const a=(0,m.mA)(),y=(0,i.TH)(),x=(0,i.s0)(),{inProgress:u}=(0,Ie.Fp)(),K=(0,r.useRef)(!1),J=(0,m.v9)(Ye=>Ye.session.initError);(0,z.Cv)(`[APP] path=${y.pathname}, account=${a?"true":"false"}, inProgress=${u}`);const Z=y.pathname==="/login",Le=y.pathname==="/logout",Qe=Z||Le;return(0,r.useEffect)(()=>{if((0,z.Cv)("[APP EFFECT] Running navigation logic"),K.current&&(Z||y.pathname==="/")&&(K.current=!1,(0,z.Cv)("[APP] Navigation completed, flag reset")),u!=="none"){(0,z.Cv)("[APP EFFECT] Skipping - MSAL in progress");return}if(K.current){(0,z.Cv)("[APP EFFECT] Skipping - navigation already performed");return}if(!a&&!Qe){(0,z.Cv)("[APP NAVIGATE] -> /login (not authenticated)"),K.current=!0,x("/login");return}if(a&&Z&&!J){(0,z.Cv)("[APP NAVIGATE] -> / (authenticated on login page)"),K.current=!0,x("/");return}(0,z.Cv)("[APP EFFECT] No navigation needed")},[a,y.pathname,u,J,Z,Qe,x]),u!=="none"&&Z?null:(0,t.jsx)("div",{"data-testid":"app-test-id",children:(0,t.jsx)(yt,{children:(0,t.jsx)(gt,{})})})};var me=e(280);typeof document<"u"&&(document.cookie="i18next=; Max-Age=0; Path=/; SameSite=Strict; Secure"),me.z2.use((0,me.Xf)((a,y)=>e(2071)(`./${a.replace("-","_")}/${y}.json`))).use(me.qB).use(me.Db).init({fallbackLng:"en-US",debug:!1,load:"currentOnly",ns:["translation"],defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","queryString","navigator","htmlTag"],caches:["localStorage"],cookieOptions:{secure:!0,sameSite:"strict"}}});const qt=null;var At=e(6588),ht=e(5527),Ct=e(2204),Et=e(8346),te=e(3683),Rt=e(3379),Be=e.n(Rt),It=e(7795),je=e.n(It),bt=e(569),Fe=e.n(bt),St=e(3565),Ge=e.n(St),Dt=e(9216),We=e.n(Dt),Nt=e(4589),Ve=e.n(Nt),pe=e(1843),ie={};ie.styleTagTransform=Ve(),ie.setAttributes=Ge(),ie.insert=Fe().bind(null,"head"),ie.domAPI=je(),ie.insertStyleElement=We();var _t=Be()(pe.Z,ie);const M=pe.Z&&pe.Z.locals?pe.Z.locals:void 0;var ge=e(400),ce={};ce.styleTagTransform=Ve(),ce.setAttributes=Ge(),ce.insert=Fe().bind(null,"head"),ce.domAPI=je(),ce.insertStyleElement=We();var ea=Be()(ge.Z,ce);const Pt=ge.Z&&ge.Z.locals?ge.Z.locals:void 0;var Ke=e(3834);const Mt=a=>{switch(a){case"ar_AE":return te.gP;case"de_DE":return te.y1;case"fr_FR":return te.gQ;case"it_IT":return te.KL;case"pl_PL":return te.sv;case"tr_TR":return te.Xl;case"zh_CN":return te.U1;default:return te._z}},Tt=({children:a})=>{const[,y]=(0,Ke.$G)(),x=(0,Ct.Z)({typography:{fontFamily:Pt.fontFamily},palette:{common:{black:M["grayscale-black"],white:M["grayscale-white"]},primary:{main:M["brand-primary-navy"],contrastText:M["grayscale-white"]},secondary:{main:M["brand-primary-teal"]},neutral:{main:M["grayscale-gray700"],dark:M["grayscale-gray800"]},error:{main:M["status-negative-main"],light:M["status-negative-light"],dark:M["status-negative-dark"],darker:M["status-negative-darker"]},warning:{main:M["status-warning-main"],light:M["status-warning-light"],dark:M["status-warning-dark"],darker:M["status-warning-darker"]},info:{main:M["status-information-main"],light:M["status-information-light"],dark:M["status-information-dark"],darker:M["status-information-darker"]},success:{main:M["status-positive-main"],light:M["status-positive-light"],dark:M["status-positive-dark"],darker:M["status-positive-darker"]},grey:{200:M["grayscale-gray200"],300:M["grayscale-gray300"],400:M["grayscale-gray400"],600:M["grayscale-gray600"],700:M["grayscale-gray700"],800:M["grayscale-gray800"]},background:{default:"rgb(239, 240, 243)",paper:M["grayscale-white"]}},components:{MuiTab:{styleOverrides:{root:({theme:u})=>({background:u.palette.common.white,borderRadius:".4rem",boxShadow:u.shadows[1],borderBottom:".1rem",borderBottomColor:u.palette.grey[400],borderBottomStyle:"solid",fontWeight:"bold","&.Mui-selected":{backgroundColor:u.palette.secondary.main,color:u.palette.common.white}})}},MuiDataGrid:{styleOverrides:{root:({theme:u})=>({"& .Mui-even":{backgroundColor:u.palette.grey[200]},"& .MuiDataGrid-pinnedColumnHeaders .MuiDataGrid-columnHeader":{backgroundColor:u.palette.primary.main},"& .MuiDataGrid-columnHeader":{backgroundColor:u.palette.primary.light,color:u.palette.common.white},"& .MuiDataGrid-columnHeader--dragging":{color:u.palette.common.black},"& .MuiDataGrid-iconSeparator":{color:u.palette.common.white},"& .MuiDataGrid-sortIcon":{color:u.palette.common.white},"& .MuiDataGrid-menuIconButton":{color:u.palette.common.white},"& .MuiDataGrid-cell:focus-within":{outline:"none"},"& .MuiDataGrid-cell:focus":{outline:"none"},"& .row-status--greyed":{backgroundColor:u.palette.grey[600]}," & .row-status--greyed:hover":{backgroundColor:u.palette.grey[400]}})}},MuiInputBase:{styleOverrides:{input:({theme:u})=>({"&.MuiFilledInput-input.Mui-disabled":{WebkitTextFillColor:u.palette.grey[700]}})}},MuiInputLabel:{styleOverrides:{root:({theme:u})=>({"&.MuiInputLabel-root.Mui-disabled":{color:u.palette.grey[700]}})}},MuiDrawer:{styleOverrides:{paper:({theme:u})=>({backgroundColor:u.palette.grey[400]})}}}},Mt(y.resolvedLanguage));return(0,t.jsx)(Et.Z,{theme:x,children:a})};var Ot=e(7262),Lt=e(9488);const xt=({children:a})=>{const[,y]=(0,Ke.$G)(),x=y.language.toLowerCase().replace("_","-");return(0,t.jsx)(Ot._,{dateAdapter:Lt.Y,adapterLocale:x,dateFormats:{monthShort:"MMM M"},children:a})};var Ut=e(1846);const Bt=({children:a})=>(0,t.jsx)(Ut.VK,{children:a});var jt=e(4119),Se=e(7030),Ft=e(3755);const Gt=a=>a.query({query:({itemId:y,radianPo:x,poLine:u})=>`/item/${y}/po/${x}/poline/${u}/customernotes`});var Wt=e(9665);const ve=(0,Wt.LC)({reducerPath:"fulfillmentApi",baseQuery:(0,Ft.s)("https://stoplight.io/mocks/incora/fulfillment-api/73869180"),endpoints:a=>({customerNotes:Gt(a)})}),{useCustomerNotesQuery:ta}=ve;var De=e(1781),Ne=e(4890),Pe=e(3239),Vt=e(9545);const ye={InReceiving:"In Receiving",QaReady:"QA Ready",SentForReimaging:"Sent for Reimaging",PutAwayReady:"Put Away Ready"},aa=[ye.InReceiving,ye.QaReady,ye.SentForReimaging,ye.PutAwayReady],fe={All:"All",MyAssignments:"My Assignments",Unassigned:"Unassigned"},sa=[fe.All,fe.MyAssignments,fe.Unassigned],Kt={operatingEntity:{selected:"",error:!1},distributionCenter:{selected:"",error:!1,inventoryGroups:{selected:[]}},statuses:{selected:[],error:!1},assignment:{selected:fe.All,error:!1},receiptIdSearchValue:void 0},He=(0,$.oM)({name:"inboundQuality",initialState:Kt,reducers:{setOperatingEntity:(a,y)=>({...a,operatingEntity:{...a.operatingEntity,selected:y.payload,error:!1},distributionCenter:{...a.distributionCenter,selected:"",inventoryGroups:{...a.distributionCenter.inventoryGroups}}}),setDistributionCenter:(a,y)=>({...a,distributionCenter:{...a.distributionCenter,selected:y.payload,error:!1,inventoryGroups:{...a.distributionCenter.inventoryGroups}}}),setInventoryGroups:(a,y)=>{a.distributionCenter.inventoryGroups.selected=y.payload},setStatuses:(a,y)=>{a.statuses.selected=y.payload,a.statuses.error=!1},setAssignment:(a,y)=>{a.assignment.selected=y.payload,a.assignment.error=!1},setReceiptIdSearchValue:(a,y)=>{a.receiptIdSearchValue=y.payload,a.isReceiptIdSearch=!0},setOperatingEntityError:(a,y)=>{a.operatingEntity.error=y.payload},setDistributionCenterError:(a,y)=>{a.distributionCenter.error=y.payload},setStatusesError:(a,y)=>{a.statuses.error=y.payload},setIsReceiptIdSearch:(a,y)=>{a.isReceiptIdSearch=y.payload},setReceiptIdSearchError:(a,y)=>{a.isReceiptIdSearchError=y.payload}}}),{setOperatingEntity:oa,setDistributionCenter:na,setInventoryGroups:ra,setStatuses:ia,setAssignment:ca,setReceiptIdSearchValue:la,setOperatingEntityError:da,setDistributionCenterError:ua,setStatusesError:ma,setIsReceiptIdSearch:pa,setReceiptIdSearchError:ga}=He.actions,Ht=He.reducer;var zt=e(6606),Zt=e(8979),Me=e(4009),Te=e(7110),Qt=e(5029);const ze=(0,$.xC)({reducer:{portal:N,qvrForm:Vt.ZP,inboundQuality:Ht,invoiceProblemManagement:zt.ZP,securaStock:Zt.ZP,session:Qt.ZP,[Se.dZ.reducerPath]:Se.dZ.reducer,[ve.reducerPath]:ve.reducer,[De.AK.reducerPath]:De.AK.reducer,[Ne.wU.reducerPath]:Ne.wU.reducer,[Pe.L.reducerPath]:Pe.L.reducer,[Te.GW.reducerPath]:Te.GW.reducer,[Me._S.reducerPath]:Me._S.reducer},middleware:a=>a({serializableCheck:{ignoredActions:["qvrForm/uploadDocuments"]}}).concat([Se.dZ.middleware,ve.middleware,De.AK.middleware,Ne.wU.middleware,Pe.L.middleware,Te.GW.middleware,Me._S.middleware])});(0,jt.sj)(ze.dispatch);var Yt=e(3583);const wt=({children:a})=>(0,t.jsx)(Yt.zt,{store:ze,children:a});var ne=e(3452),Oe=e(9600);const $t=({children:a})=>((0,r.useEffect)(()=>{if(!ne.U.getActiveAccount()){const u=ne.U.getAllAccounts();u.length===1&&ne.U.setActiveAccount(u[0])}const x=ne.U.addEventCallback(u=>{if(u.eventType===Oe.t.LOGIN_SUCCESS||u.eventType===Oe.t.ACQUIRE_TOKEN_SUCCESS||u.eventType===Oe.t.SSO_SILENT_SUCCESS){const K=u.payload;if(K&&typeof K=="object"&&"account"in K&&K.account){const J=K.account;J&&(ne.U.setActiveAccount(J),(0,z.Cv)("[AuthContextProvider] Active account set after login:",J.username))}}});return()=>{x&&ne.U.removeEventCallback(x)}},[]),(0,t.jsx)(Ie.rL,{instance:ne.U,children:a})),Xt=({children:a})=>(0,t.jsx)(wt,{children:(0,t.jsx)($t,{children:(0,t.jsx)(Bt,{children:(0,t.jsx)(At.Z,{injectFirst:!0,children:(0,t.jsx)(xt,{children:(0,t.jsxs)(Tt,{children:[(0,t.jsx)(ht.ZP,{}),a]})})})})})});var kt=e(1442),Jt=e(4553);Jt.T.setLicenseKey("d8e46f3df97261c934293ecedb7e6280Tz02Mjk3NyxFPTE3MTE2NDc2ODY5MDMsUz1wcmVtaXVtLExNPXN1YnNjcmlwdGlvbixLVj0y");const Ze=document.getElementById("root");if(!Ze)throw new Error("Failed to find the root element");(0,o.s)(Ze).render((0,t.jsx)(r.StrictMode,{children:(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)(kt.g,{}),children:(0,t.jsx)(Xt,{children:(0,t.jsx)(ft,{})})})}))},8815:(C,l,e)=>{"use strict";e.d(l,{ou:()=>t.ou});var t=e(6928)},280:(C,l,e)=>{"use strict";e.d(l,{Db:()=>r.Db,Xf:()=>n.Z,ei:()=>t.$,qB:()=>i.Z,z2:()=>o.ZP});var t=e(9089),r=e(1336),o=e(6894),i=e(1660),n=e(3477)},9288:(C,l,e)=>{"use strict";e.d(l,{Fp:()=>t.Fp,rL:()=>t.rL});var t=e(3047)},3583:(C,l,e)=>{"use strict";e.d(l,{I0:()=>t.I0,v9:()=>t.v9,zt:()=>t.zt});var t=e(8868)},3834:(C,l,e)=>{"use strict";e.d(l,{$G:()=>r,iu:()=>o,y4:()=>i});var t=e(280);const r=t.ei,o=Object.freeze({"ar-AE":"\u0639\u0631\u0628\u064A","de-DE":"Deutsch","en-US":"English (US)","en-GB":"English (UK)","fr-FR":"Fran\xE7ais","it-IT":"Italiano","pl-PL":"Polski","tr-TR":"T\xFCrk","zh-CN":"\u4E2D\u56FD\u4EBA"}),i=Object.keys(o)},1442:(C,l,e)=>{"use strict";e.d(l,{g:()=>i});var t=e(9470),r=e(493),o=e(1240);const i=()=>(0,t.jsx)(r.Z,{open:!0,sx:{height:"100vh",width:"100vw",position:"fixed",top:0,left:0,zIndex:1e4,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,t.jsx)(o.Z,{size:"10em"})})},9540:(C,l,e)=>{"use strict";e.r(l),e.d(l,{LoadableNotFound:()=>A,NotFound:()=>E});var t=e(9470),r=e(7362),o=e(5236),i=e(2743),n=e(3834),f=e(8242),p=e(5110);const E=()=>{(0,f.Tt)("Not Found");const[d]=(0,n.$G)();return(0,t.jsxs)(r.ZP,{container:!0,spacing:3,children:[(0,t.jsx)(r.ZP,{item:!0,xs:!0}),(0,t.jsx)(r.ZP,{item:!0,xs:6,children:(0,t.jsxs)(o.Z,{severity:"error",sx:{marginTop:"3em"},children:[(0,t.jsx)(i.Z,{children:d("missingpage.title","Content Not Found")}),d("noKey.message"," Sorry it seems that the content you are looking for is not available.")]})}),(0,t.jsx)(r.ZP,{item:!0,xs:!0})]})},A=(0,p.ZP)(()=>Promise.resolve().then(e.bind(e,9540)),{resolveComponent:d=>d.NotFound})},2697:()=>{"use strict"},9545:(C,l,e)=>{"use strict";e.d(l,{kx:()=>b,ZP:()=>q,iH:()=>N,zF:()=>_,Fv:()=>V,sb:()=>j,bv:()=>he,j:()=>Y,z3:()=>P,oE:()=>oe,RU:()=>Q,g$:()=>se,aQ:()=>ae,Ub:()=>ee,w1:()=>le,on:()=>Ae,L9:()=>$,Ik:()=>de,I0:()=>O,dx:()=>Ee,mz:()=>X,_l:()=>Ce,Ws:()=>Re,GA:()=>D});var t=e(3841);const o={catalogPartShelfLifeVerification:[{id:"",company:"",catalog:"",catalogPartNumber:"",perMfg:"",basis:"",duration:"",customerStorageTemperature:"",partVerified:!1,receiptPartExpireDate:"",verified:!1}]},i={ghsLabelRequirements:[],specifications:[],nonConformanceCodes:[]},n={id:0,type:"",flowDown:0,description:"",reviewDate:"",catalog:"",company:""},f={id:"",date:"",link:"",type:"",name:"",company:"",delete:!1,file:void 0},p={description:{value:"",verified:!1},notes:{internal:"",external:""},flowDowns:[n]};var E=e(2697);const T={receiptData:{itemVerification:p,inboundDocuments:[f],receivedVerification:{quantity:{ordered:"",received:"",verified:!1},manufacturerLot:{value:"",verified:!1},deliveryTicket:{value:"",verified:!1}},shelfLifeBasis:{dateOfReceipt:""}},complianceChecks:i,catalogPartData:o},F={submitted:!1,current:!1};var m=e(8815),I=e(7939),W=e(4890);const b=[{name:"Receipt Data",steps:["Verify Item","Review & Categorize Inbound Documents","Verify Received","Shelf Life Basis Date"]},{name:"Compliance Checks",steps:["GHS Label Requirements","Verify Specifications","Non-Conformance Codes"]},{name:"Compliance Checks",steps:["Catalog Part Shelf Life Verification"]}],R={initialized:!1,form:T,section:0,step:0},g=(0,t.oM)({name:"qvrForm",initialState:R,reducers:{initializeQVRForm(s,c){s.initialized||(s.initialized=!0,s.form=c.payload)},setQVRForm(s,c){s.form=c.payload},setSectionAndStep(s,c){if(c.payload.section<0||c.payload.section>b.length-1)return;const v=b[c.payload.section].steps;c.payload.step<0||c.payload.step>v.length-1||(s.section=c.payload.section,s.step=c.payload.step)},setSection(s,c){c.payload<0||c.payload>b.length-1||(s.section=c.payload)},setStep(s,c){const v=b[s.section].steps;c.payload<0||c.payload>v.length-1||(s.step=c.payload)},previousStep(s){s.step>0?s.step-=1:s.section>0&&(s.section-=1,s.step=b[s.section].steps.length-1)},nextStep(s){const c=b[s.section].steps;s.step({id:crypto.randomUUID(),date:m.ou.fromMillis(k.lastModified).toISODate(),name:k.name,file:"File"}));s.form.receiptData.inboundDocuments.push(...v)},deleteDocument(s,c){const v=[...s.form.receiptData.inboundDocuments],k=v.findIndex(w=>w.id===c.payload),ue=v[k];ue.delete=!0,ue.file!==void 0&&v.splice(k,1),s.form.receiptData.inboundDocuments=v},restoreDocument(s,c){s.form.receiptData.inboundDocuments=s.form.receiptData.inboundDocuments.map(v=>(v.id===c.payload&&(v.delete=!1),v))},setDocumentType(s,c){s.form.receiptData.inboundDocuments=s.form.receiptData.inboundDocuments.map(v=>(v.id===c.payload.id&&(v.type=c.payload.type,(0,I.E)(v.name)&&(v.name=c.payload.type)),v))},setDocumentName(s,c){s.form.receiptData.inboundDocuments=s.form.receiptData.inboundDocuments.map(v=>(v.id===c.payload.id&&(v.name=c.payload.name),v))},setDocumentCompany(s,c){s.form.receiptData.inboundDocuments=s.form.receiptData.inboundDocuments.map(v=>(v.id===c.payload.id&&(v.company=c.payload.company),v))},toggleQuantityReceivedVerified(s){s.form.receiptData.receivedVerification.quantity.verified=!s.form.receiptData.receivedVerification.quantity.verified},setManufacturerLot(s,c){s.form.receiptData.receivedVerification.manufacturerLot.value=c.payload},toggleManufacturerLotVerified(s){s.form.receiptData.receivedVerification.manufacturerLot.verified=!s.form.receiptData.receivedVerification.manufacturerLot.verified},setDeliveryTicket(s,c){s.form.receiptData.receivedVerification.deliveryTicket.value=c.payload},toggleDeliveryTicketVerified(s){s.form.receiptData.receivedVerification.deliveryTicket.verified=!s.form.receiptData.receivedVerification.deliveryTicket.verified},setDateOfReceipt(s,c){s.form.receiptData.shelfLifeBasis.dateOfReceipt=c.payload},setReceiptPartExpireDate(s,c){s.form.catalogPartData.catalogPartShelfLifeVerification=s.form.catalogPartData.catalogPartShelfLifeVerification.map(v=>(v.id===c.payload.id&&(v.receiptPartExpireDate=c.payload.date),v))},toggleReceiptPartVerified(s,c){s.form.catalogPartData.catalogPartShelfLifeVerification=s.form.catalogPartData.catalogPartShelfLifeVerification.map(v=>(v.id===c.payload&&(v.verified=!v.verified),v))},toggleGhsLabelVerified(s,c){s.form.complianceChecks.ghsLabelRequirements.includes(c.payload)?s.form.complianceChecks.ghsLabelRequirements=s.form.complianceChecks.ghsLabelRequirements.filter(v=>v!==c.payload):s.form.complianceChecks.ghsLabelRequirements=[...s.form.complianceChecks.ghsLabelRequirements,c.payload]},toggleNonConformanceCodes(s,c){const v=s.form.complianceChecks.nonConformanceCodes.findIndex(k=>k.id===c.payload);s.form.complianceChecks.nonConformanceCodes[v].isApplied=!s.form.complianceChecks.nonConformanceCodes[v].isApplied},toggleSpecifications(s,c){const v=s.form.complianceChecks.specifications.findIndex(k=>k.id===c.payload.id);s.form.complianceChecks.specifications[v].verifiedCertificates.includes(c.payload.certificate)?s.form.complianceChecks.specifications[v].verifiedCertificates=s.form.complianceChecks.specifications[v].verifiedCertificates.filter(k=>k!==c.payload.certificate):s.form.complianceChecks.specifications[v].verifiedCertificates=[...s.form.complianceChecks.specifications[v].verifiedCertificates,c.payload.certificate]}},extraReducers:s=>{s.addMatcher(W.wU.endpoints.getReceipt.matchFulfilled,(c,{payload:v})=>{B(c,v)})}}),B=(s,c)=>{s.form.complianceChecks.ghsLabelRequirements?.length===0&&(s.form.complianceChecks.ghsLabelRequirements=c.quality?.ghsLabels.verified??[]),s.form.complianceChecks.nonConformanceCodes?.length===0&&(s.form.complianceChecks.nonConformanceCodes=c.quality?.nonConformanceCodes??[]),s.form.complianceChecks.specifications?.length===0&&(s.form.complianceChecks.specifications=c.quality?.specifications.map(v=>({id:v.purchasedSpecification.specificationRef.id,verifiedCertificates:v.latestVerifiedCertificates??[]}))??[])},{initializeQVRForm:H,setQVRForm:S,setSection:U,setStep:G,setSectionAndStep:L,previousStep:V,nextStep:_,toggleDescriptionVerified:$,setInternalNote:ae,setExternalNote:se,uploadDocuments:D,deleteDocument:N,restoreDocument:j,setDocumentType:Q,setDocumentName:oe,setDocumentCompany:P,toggleQuantityReceivedVerified:X,setManufacturerLot:ee,toggleManufacturerLotVerified:O,setDeliveryTicket:Y,toggleDeliveryTicketVerified:Ae,setDateOfReceipt:he,setReceiptPartExpireDate:le,toggleReceiptPartVerified:Ce,toggleGhsLabelVerified:de,toggleNonConformanceCodes:Ee,toggleSpecifications:Re}=g.actions,q=g.reducer},6606:(C,l,e)=>{"use strict";e.d(l,{Hl:()=>i,V6:()=>f,Z5:()=>n,ZP:()=>E,p$:()=>p});var t=e(3841);const r={tabIndex:0,selection:[],showFilters:!1,filtersByTab:{}},o=(0,t.oM)({name:"invoiceProblemManagement",initialState:r,reducers:{setTabIndex(A,d){A.tabIndex=d.payload,A.selection=[]},setSelection(A,d){A.selection=d.payload},setShowFilters(A,d){A.showFilters=d.payload},setTabFilter(A,d){A.filtersByTab[d.payload.tabKey]=d.payload.filters}}}),{setTabIndex:i,setSelection:n,setShowFilters:f,setTabFilter:p}=o.actions,E=o.reducer},8979:(C,l,e)=>{"use strict";e.d(l,{DQ:()=>E,E6:()=>n,Gx:()=>p,WZ:()=>i,ZP:()=>d,gn:()=>f});var t=e(3841);const r={selectedCompanyId:null,selectedFacilityId:null,selectedRowId:null,showResults:!1},o=(0,t.oM)({name:"securaStock",initialState:r,reducers:{setSelectedCompanyId(h,T){h.selectedCompanyId=T.payload,h.selectedFacilityId=null,h.showResults=!1,h.selectedRowId=null},setSelectedFacilityId(h,T){h.selectedFacilityId=T.payload,h.showResults=!1,h.selectedRowId=null},setSelectedRowId(h,T){h.selectedRowId=T.payload},setShowResults(h,T){h.showResults=T.payload},resetResults(h){h.showResults=!1,h.selectedRowId=null},reset(h){h.selectedCompanyId=null,h.selectedFacilityId=null,h.selectedRowId=null,h.showResults=!1}}}),{setSelectedCompanyId:i,setSelectedFacilityId:n,setSelectedRowId:f,setShowResults:p,resetResults:E,reset:A}=o.actions,d=o.reducer},5029:(C,l,e)=>{"use strict";e.d(l,{CB:()=>h,Mi:()=>A,Ov:()=>d,QQ:()=>p,Uv:()=>n,ZP:()=>F,hV:()=>T,ht:()=>f,o4:()=>E,y8:()=>i});var t=e(3841);const r={personnelId:null,companies:[],selectedCompanyId:null,userPages:[],isInitialized:!1,initError:null},o=(0,t.oM)({name:"session",initialState:r,reducers:{setPersonnelId(m,I){m.personnelId=I.payload},setCompanies(m,I){m.companies=I.payload,m.isInitialized=!0},setSelectedCompany(m,I){m.selectedCompanyId=I.payload.companyId},setUserPages(m,I){m.userPages=I.payload},setInitializationError(m,I){m.initError=I.payload,m.isInitialized=!0},clearInitError(m){m.initError=null},clearSession(m){m.personnelId=null,m.companies=[],m.selectedCompanyId=null,m.userPages=[],m.isInitialized=!1,m.initError=null}}}),{setPersonnelId:i,setCompanies:n,setSelectedCompany:f,setUserPages:p,setInitializationError:E,clearInitError:A,clearSession:d}=o.actions,h=m=>{const{selectedCompanyId:I,companies:W}=m.session;return I?W.find(b=>b.companyId===I)??null:null},T=m=>m.session.userPages,F=o.reducer},1732:(C,l,e)=>{"use strict";e.d(l,{h:()=>r});function t(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}function r(o){const i={};return t(o)&&(typeof o.name=="string"&&(i.name=o.name),typeof o.message=="string"&&(i.message=o.message),(typeof o.code=="string"||typeof o.code=="number")&&(i.code=o.code),(typeof o.errorCode=="string"||typeof o.errorCode=="number")&&(i.errorCode=o.errorCode),typeof o.status=="number"&&(i.status=o.status),o.data!==void 0&&(i.data=o.data,t(o.data)&&typeof o.data.message=="string"&&(i.dataMessage=o.data.message))),i}},7939:(C,l,e)=>{"use strict";e.d(l,{E:()=>t});const t=r=>!r||r.trim().length===0},1386:(C,l,e)=>{"use strict";e.d(l,{Cv:()=>r,H:()=>i,Ki:()=>o});const t=window.location.host.startsWith("localhost"),r=(...n)=>{t&&console.log(...n)},o=(...n)=>{t&&console.warn(...n)},i=(...n)=>{console.error(...n)}},2071:(C,l,e)=>{var t={"./ar_AE/translation.json":[6611,611],"./de_DE/translation.json":[9061,61],"./en_GB/translation.json":[9758,758],"./en_US/translation.json":[5916,916],"./fr_FR/translation.json":[6779,606],"./it_IT/translation.json":[1640,640],"./pl_PL/translation.json":[4778,778],"./tr_TR/translation.json":[6908,908],"./zh_CN/translation.json":[9871,871]};function r(o){if(!e.o(t,o))return Promise.resolve().then(()=>{var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f});var i=t[o],n=i[0];return e.e(i[1]).then(()=>e.t(n,19))}r.keys=()=>Object.keys(t),r.id=2071,C.exports=r},7150:(C,l,e)=>{"use strict";C.exports=e.p+"bffc5e001d7d9eab09d5.png"}},C=>{var l=t=>C(C.s=t);C.O(0,[363,328,216],()=>l(2747));var e=C.O()}]);})();