@innofulfill/hubops-shipment-tracking 0.1.74 → 0.1.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,4 +56,4 @@
|
|
|
56
56
|
}
|
|
57
57
|
`,Zt=s=>{const{csp:t,prefixCls:n,layer:a}=x.useContext(tt);let o=Pt;n&&(o=o.replace(/anticon/g,n)),a&&(o=`@layer ${a} {
|
|
58
58
|
${o}
|
|
59
|
-
}`),x.useEffect(()=>{const r=s.current,g=Lt(r);Bt(o,"@ant-design-icons",{prepend:!a,csp:t,attachTo:g})},[])},ie={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Yt({primaryColor:s,secondaryColor:t}){ie.primaryColor=s,ie.secondaryColor=t||dt(s),ie.calculated=!!t}function Vt(){return{...ie}}const J=s=>{const{icon:t,className:n,onClick:a,style:o,primaryColor:r,secondaryColor:g,...m}=s,h=E.useRef(null);let j=ie;if(r&&(j={primaryColor:r,secondaryColor:g||dt(r)}),Zt(h),Gt(Ke(t),`icon should be icon definiton, but got ${t}`),!Ke(t))return null;let C=t;return C&&typeof C.icon=="function"&&(C={...C,icon:C.icon(j.primaryColor,j.secondaryColor)}),De(C.icon,`svg-${C.name}`,{className:n,onClick:a,style:o,"data-icon":C.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...m,ref:h})};J.displayName="IconReact";J.getTwoToneColors=Vt;J.setTwoToneColors=Yt;function ut(s){const[t,n]=ht(s);return J.setTwoToneColors({primaryColor:t,secondaryColor:n})}function Kt(){const s=J.getTwoToneColors();return s.calculated?[s.primaryColor,s.secondaryColor]:s.primaryColor}var Jt={};function Re(){return Re=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Re.apply(this,arguments)}ut(Ie.primary);const q=E.forwardRef((s,t)=>{const{className:n,icon:a,spin:o,rotate:r,tabIndex:g,onClick:m,twoToneColor:h,...j}=s,{prefixCls:C="anticon",rootClassName:M}=E.useContext(tt),D=yt(M,C,{[`${C}-${a.name}`]:!!a.name,[`${C}-spin`]:!!o||a.name==="loading"},n);let _=g;_===void 0&&m&&(_=-1);const X=r?{msTransform:`rotate(${r}deg)`,transform:`rotate(${r}deg)`}:void 0,[$,G]=ht(h);return E.createElement("span",Re({role:"img","aria-label":a.name},j,{ref:t,tabIndex:_,onClick:m,className:D}),E.createElement(J,{icon:a,primaryColor:$,secondaryColor:G,style:X}))});q.getTwoToneColor=Kt;q.setTwoToneColor=ut;Jt.NODE_ENV!=="production"&&(q.displayName="AntdIcon");var Xt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},$t={};function Ee(){return Ee=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Ee.apply(this,arguments)}const es=(s,t)=>E.createElement(q,Ee({},s,{ref:t,icon:Xt})),gt=E.forwardRef(es);$t.NODE_ENV!=="production"&&(gt.displayName="ArrowLeftOutlined");var ts={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},ss={};function _e(){return _e=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},_e.apply(this,arguments)}const ns=(s,t)=>E.createElement(q,_e({},s,{ref:t,icon:ts})),pt=E.forwardRef(ns);ss.NODE_ENV!=="production"&&(pt.displayName="CalendarOutlined");var as={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},is={};function Oe(){return Oe=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Oe.apply(this,arguments)}const os=(s,t)=>E.createElement(q,Oe({},s,{ref:t,icon:as})),mt=E.forwardRef(os);is.NODE_ENV!=="production"&&(mt.displayName="FileTextOutlined");var rs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},ls={};function Be(){return Be=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Be.apply(this,arguments)}const cs=(s,t)=>E.createElement(q,Be({},s,{ref:t,icon:rs})),xt=E.forwardRef(cs);ls.NODE_ENV!=="production"&&(xt.displayName="UserOutlined");const Fe="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%202C20.1647%202%2022%203.81484%2022%206.01659C22%208.25341%2020.1348%209.82312%2018.412%2010.8905C18.2864%2010.9623%2018.1445%2011%2018%2011C17.8555%2011%2017.7136%2010.9623%2017.588%2010.8905C15.8684%209.8127%2014%208.26115%2014%206.01659C14%203.81484%2015.8353%202%2018%202Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M18%206H18.009'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5%2022C6.65685%2022%208%2020.6569%208%2019C8%2017.3431%206.65685%2016%205%2016C3.34315%2016%202%2017.3431%202%2019C2%2020.6569%203.34315%2022%205%2022Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%207H9.5C7.567%207%206%208.34315%206%2010C6%2011.6569%207.567%2013%209.5%2013H12.5C14.433%2013%2016%2014.3431%2016%2016C16%2017.6569%2014.433%2019%2012.5%2019H11'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",oe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1667%2016.6668C15.0871%2016.6668%2015.8333%2015.9206%2015.8333%2015.0002C15.8333%2014.0797%2015.0871%2013.3335%2014.1667%2013.3335C13.2462%2013.3335%2012.5%2014.0797%2012.5%2015.0002C12.5%2015.9206%2013.2462%2016.6668%2014.1667%2016.6668Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M5.83464%2016.6663C6.75511%2016.6663%207.5013%2015.9201%207.5013%2014.9997C7.5013%2014.0792%206.75511%2013.333%205.83464%2013.333C4.91416%2013.333%204.16797%2014.0792%204.16797%2014.9997C4.16797%2015.9201%204.91416%2016.6663%205.83464%2016.6663Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M4.16797%2014.9767C3.25404%2014.9312%202.68389%2014.7952%202.27816%2014.3895C1.87244%2013.9838%201.73649%2013.4136%201.69093%2012.4997M7.5013%2014.9997H12.5013M15.8346%2014.9767C16.7485%2014.9312%2017.3187%2014.7952%2017.7245%2014.3895C18.3346%2013.7793%2018.3346%2012.7972%2018.3346%2010.833V9.16634H14.418C13.7975%209.16634%2013.4873%209.16634%2013.2363%209.08476C12.7289%208.91992%2012.3311%208.52209%2012.1662%208.0147C12.0846%207.76365%2012.0846%207.45343%2012.0846%206.83301C12.0846%205.90237%2012.0846%205.43705%2011.9623%205.06047C11.715%204.29937%2011.1183%203.70266%2010.3572%203.45537C9.98063%203.33301%209.5153%203.33301%208.58463%203.33301H1.66797'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66797%206.66699H6.66797'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66797%209.16699H5.0013'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.082%205H13.5997C14.8125%205%2015.4189%205%2015.9124%205.29476C16.4059%205.58952%2016.6934%206.12343%2017.2684%207.19125L18.332%209.16667'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",re="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='%23F8FAFC'/%3e%3cpath%20d='M23.5%2011.8335V16.0002M8.5%2011.8335C8.5%2014.3872%208.5%2019.9787%208.5%2020.3012C8.5%2021.4533%2010.1214%2022.1382%2013.3641%2023.5081C14.6668%2024.0583%2015.3182%2024.3335%2016%2024.3335V15.4625'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.5%2021.8333C18.5%2021.8333%2019.2292%2021.8333%2019.9583%2023.5C19.9583%2023.5%2022.2745%2019.3333%2024.3333%2018.5'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9383%2014.076L10.5039%2012.898C9.16797%2012.2516%208.5%2011.9284%208.5%2011.4165C8.5%2010.9046%209.16797%2010.5814%2010.5039%209.93496L12.9383%208.75702C14.4407%208.03001%2015.1919%207.6665%2016%207.6665C16.8081%207.6665%2017.5593%208.03%2019.0617%208.75702L21.4961%209.93496C22.832%2010.5814%2023.5%2010.9046%2023.5%2011.4165C23.5%2011.9284%2022.832%2012.2516%2021.4961%2012.898L19.0617%2014.076C17.5593%2014.803%2016.8081%2015.1665%2016%2015.1665C15.1919%2015.1665%2014.4407%2014.803%2012.9383%2014.076Z'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%2016L12.6667%2016.8333'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.1654%209.33301L11.832%2013.4997'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ft="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17%2021C18.1046%2021%2019%2020.1046%2019%2019C19%2017.8954%2018.1046%2017%2017%2017C15.8954%2017%2015%2017.8954%2015%2019C15%2020.1046%2015.8954%2021%2017%2021Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M7%2021C8.10457%2021%209%2020.1046%209%2019C9%2017.8954%208.10457%2017%207%2017C5.89543%2017%205%2017.8954%205%2019C5%2020.1046%205.89543%2021%207%2021Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M2%209V13.947C2%2016.329%202%2017.52%202.73223%2018.26C3.2191%2018.7521%203.90328%2018.9169%205%2018.9722M12.4271%205C13.3404%205.2999%2014.0564%206.02354%2014.3532%206.94654C14.5%207.40322%2014.5%207.96753%2014.5%209.09613C14.5%209.84853%2014.5%2010.2248%2014.5979%2010.5292C14.7957%2011.1445%2015.2731%2011.627%2015.882%2011.8269C16.1832%2011.9258%2016.5555%2011.9258%2017.3%2011.9258H22V13.947C22%2016.329%2022%2017.52%2021.2678%2018.26C20.7809%2018.7521%2020.0967%2018.9169%2019%2018.9722M9%2019H15'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.5%207H16.3212C17.7766%207%2018.5042%207%2019.0964%207.35371C19.6886%207.70742%2020.0336%208.34812%2020.7236%209.6295L22%2012'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.32653%208L8.81309%206.82583C9.60436%206.20083%2010%205.88833%2010%205.5M10%205.5C10%205.11168%209.60436%204.79918%208.81309%204.17418L7.32653%203M10%205.5H2'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ct="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2022H6C4.11438%2022%203.17157%2022%202.58579%2021.4142C2%2020.8284%202%2019.8856%202%2018V16C2%2014.1144%202%2013.1716%202.58579%2012.5858C3.17157%2012%204.11438%2012%206%2012H8C9.88562%2012%2010.8284%2012%2011.4142%2012.5858C12%2013.1716%2012%2014.1144%2012%2016V18C12%2019.8856%2012%2020.8284%2011.4142%2021.4142C10.8284%2022%209.88562%2022%208%2022Z'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6%2015H8'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18%202C15.7909%202%2014%203.80892%2014%206.04033C14%207.31626%2014.5%208.30834%2015.5%209.1945C16.2049%209.81911%2017.0588%2010.8566%2017.5714%2011.6975C17.8173%2012.1008%2018.165%2012.1008%2018.4286%2011.6975C18.9672%2010.8733%2019.7951%209.81911%2020.5%209.1945C21.5%208.30834%2022%207.31626%2022%206.04033C22%203.80892%2020.2091%202%2018%202Z'%20stroke='%23003371'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M18%2015V18C18%2019.8856%2018%2020.8284%2017.5314%2021.4142C17.0839%2021.9735%2016.3761%2021.9988%2015%2021.9999'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.007%206H17.998'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Xe="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.875%207.9165C11.875%206.60483%2010.8117%205.5415%209.5%205.5415C8.18829%205.5415%207.125%206.60483%207.125%207.9165C7.125%209.22822%208.18829%2010.2915%209.5%2010.2915C10.8117%2010.2915%2011.875%209.22822%2011.875%207.9165Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.4577%2014.2503C13.4577%2012.0642%2011.6855%2010.292%209.49935%2010.292C7.31322%2010.292%205.54102%2012.0642%205.54102%2014.2503'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.625%2010.2917V8.70833C16.625%205.72277%2016.625%204.22999%2015.6975%203.30249C14.77%202.375%2013.2772%202.375%2010.2917%202.375H8.70833C5.72277%202.375%204.22999%202.375%203.30249%203.30249C2.375%204.22999%202.375%205.72277%202.375%208.70833V10.2917C2.375%2013.2772%202.375%2014.77%203.30249%2015.6975C4.22999%2016.625%205.72277%2016.625%208.70833%2016.625H10.2917C13.2772%2016.625%2014.77%2016.625%2015.6975%2015.6975C16.625%2014.77%2016.625%2013.2772%2016.625%2010.2917Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='square'%20stroke-linejoin='round'/%3e%3c/svg%3e",$e="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.98047%205.9375V10.6875C1.98047%2013.673%201.98047%2015.1659%202.90796%2016.0933C3.83546%2017.0208%205.32824%2017.0208%208.3138%2017.0208H9.5013M17.0221%209.89583V5.9375'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M3.06433%204.20772L1.98047%205.93783H17.0221L16.0308%204.28564C15.355%203.15924%2015.0171%202.59604%2014.4726%202.28777C13.9281%201.97949%2013.2713%201.97949%2011.9578%201.97949H7.08966C5.8042%201.97949%205.16148%201.97949%204.62474%202.2766C4.088%202.57372%203.74678%203.11839%203.06433%204.20772Z'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9.5%205.93734V1.979'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.91797%208.3125H11.0846'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.4805%2015.4372C11.4805%2015.4372%2012.2721%2015.4372%2013.0638%2017.0205C13.0638%2017.0205%2014.7869%2013.0622%2017.0221%2012.2705'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ds="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6673%2010.0002V12.5928C12.6673%2014.076%2012.1769%2014.6668%2010.5933%2014.6668H5.40806C3.92476%2014.6668%203.33398%2014.1764%203.33398%2012.5928V10.0002C3.33398%207.42283%205.42332%205.3335%208.00065%205.3335C10.578%205.3335%2012.6673%207.42283%2012.6673%2010.0002Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.6673%2010.0002C10.6673%208.52743%209.47338%207.3335%208.00065%207.3335C6.52789%207.3335%205.33398%208.52743%205.33398%2010.0002'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M8%2011.3333L8.66667%2010'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.8743%203.3335H5.12439C4.53532%203.3335%204.24079%203.3335%203.98162%203.23214C3.89554%203.19847%203.81319%203.15682%203.73579%203.10782C3.50277%202.96028%203.3394%202.72872%203.01264%202.2656C2.75798%201.90466%202.63066%201.72419%202.67455%201.57663C2.68844%201.52994%202.71294%201.48668%202.74635%201.44986C2.85194%201.3335%203.08148%201.3335%203.54058%201.3335H12.4581C12.9172%201.3335%2013.1467%201.3335%2013.2523%201.44986C13.2857%201.48668%2013.3103%201.52994%2013.3241%201.57663C13.368%201.72419%2013.2407%201.90466%2012.9861%202.2656C12.6593%202.72872%2012.4959%202.96029%2012.2629%203.10782C12.1855%203.15682%2012.1031%203.19847%2012.0171%203.23214C11.7579%203.3335%2011.4634%203.3335%2010.8743%203.3335Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M9.33268%205.3335V3.3335M6.66602%205.3335V3.3335'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e",hs="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.19033%202.28511C7.10013%201.37531%207.55507%200.9204%208.06253%200.7102C8.73913%200.429933%209.4994%200.429933%2010.1761%200.7102C10.6835%200.9204%2011.1384%201.37531%2012.0482%202.28511C12.958%203.19492%2013.4129%203.64983%2013.6231%204.15729C13.9034%204.83392%2013.9034%205.59417%2013.6231%206.2708C13.4129%206.77827%2012.958%207.2332%2012.0482%208.143L8.143%2012.0482C7.2332%2012.958%206.77827%2013.4129%206.2708%2013.6231C5.59417%2013.9034%204.83392%2013.9034%204.15729%2013.6231C3.64983%2013.4129%203.19492%2012.958%202.28511%2012.0482C1.37531%2011.1384%200.9204%2010.6835%200.7102%2010.1761C0.429933%209.4994%200.429933%208.73913%200.7102%208.06253C0.9204%207.55507%201.37531%207.10013%202.28511%206.19033L6.19033%202.28511Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",us="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2014.6665C7.45453%2014.6665%206.93347%2014.4464%205.89129%2014.0062C3.29709%2012.9103%202%2012.3624%202%2011.4407C2%2011.1826%202%206.7095%202%204.6665M8%2014.6665C8.54547%2014.6665%209.06653%2014.4464%2010.1087%2014.0062C12.7029%2012.9103%2014%2012.3624%2014%2011.4407V4.6665M8%2014.6665V7.5697'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.55061%206.46108L3.60315%205.51873C2.53438%205.00156%202%204.74298%202%204.3335C2%203.92401%202.53438%203.66543%203.60315%203.14826L5.55061%202.20591C6.75253%201.6243%207.35353%201.3335%208%201.3335C8.64647%201.3335%209.24747%201.6243%2010.4494%202.20591L12.3969%203.14826C13.4656%203.66543%2014%203.92401%2014%204.3335C14%204.74298%2013.4656%205.00156%2012.3969%205.51873L10.4494%206.46108C9.24747%207.0427%208.64647%207.3335%208%207.3335C7.35353%207.3335%206.75253%207.0427%205.55061%206.46108Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4%208L5.33333%208.66667'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.3327%202.6665L4.66602%205.99984'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",gs="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.0026%201.33398C11.6845%201.33398%2014.6693%204.31875%2014.6693%208.00064C14.6693%2011.6826%2011.6845%2014.6673%208.0026%2014.6673C4.3207%2014.6673%201.33594%2011.6826%201.33594%208.00064M5.94194%201.65856C5.26927%201.87697%204.6435%202.19942%204.08362%202.60692M2.60889%204.08165C2.20131%204.64164%201.87882%205.26753%201.6604%205.94033'%20stroke='%23175EB6'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.0026%205.33398V10.6673M10.6693%208.00064H5.33594'%20stroke='%23175EB6'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";var ps={};function ve(s){if(!s||s==="-"||s==="—")return"--";const t=new Date(s);return isNaN(t.getTime())?"--":t.toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}function b(s){return s==null?s:String(s).replace(/[_-]+/g," ").replace(/\s+/g," ").trim().toLowerCase().replace(/\b\w/g,n=>n.toUpperCase())}function ae({label:s,value:t}){return e.jsxs("div",{className:"ho-kv",children:[e.jsx("span",{className:"ho-kv__label",children:s}),e.jsx("span",{className:"ho-kv__value",children:t})]})}function z(s){if(!s)return"—";const t=new Date(s);if(isNaN(t.getTime()))return"—";const n=a=>String(a).padStart(2,"0");return n(t.getDate())+"-"+n(t.getMonth()+1)+"-"+t.getFullYear()+" "+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())}function ke({icon:s,label:t,value:n,isAudit:a=!1}){return e.jsxs("div",{className:"ho-kv ho-kv--withTag",children:[e.jsxs("span",{className:"ho-kv__label_audit",style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,fontFamily:"Roboto"},children:[s&&e.jsx("img",{src:s,alt:"",className:"ho-kv__icon"}),t]}),e.jsx("span",{className:a?"ho-kv__tag_audit":"ho-kv__tag",children:n})]})}function ms({endpoint:s,awbNumber:t}){const[n,a]=x.useState(!1),[o,r]=x.useState(!1),[g,m]=x.useState(null),[h,j]=x.useState(null),[C,M]=x.useState(!1),D=ge.useLocation(),_=ge.useNavigate(),[X,$]=x.useState(!1),[G,xe]=x.useState(!1),[fe,ee]=x.useState(!1),[P,O]=x.useState(!1),T=x.useRef(null),[H,le]=x.useState(!1),ce=new URLSearchParams(D.search).get("endpoint"),F=s||ce||ps.REACT_APP_TRACKING_ENDPOINT||"/api/v1/shipment-tracking/search",U=x.useMemo(()=>{if(t)return t;const i=new URLSearchParams(D.search);return i.get("awb")||i.get("awbNumber")||""},[t,D.search]);x.useEffect(()=>{let i=!1;return(async()=>{try{if(M(!0),!U){i||j(null);return}const N=`${F}?awbNumber=${encodeURIComponent(U)}`,w=await fetch(N);if(!w.ok)throw new Error("Request failed");const f=await w.json();i||j(f)}catch{i||j(null)}finally{i||M(!1)}})(),()=>{i=!0}},[F,U]);const Ce=h?.shipmentTracking?.isRTO===!0,p=h?.shipmentTracking?.bookingInfoDto,I=h?.shipmentTracking?.auditInfo||[],Z=h?.shipmentTracking?.latestOperation,l=h?.shipmentTracking?.supportTicketInfo,d={sourceCity:p?.sourceCity||"—",destinationCity:p?.destinationCity||"—",bookingTime:p?.bookingDate||"—",shipmentNumber:p?.awbNumber||"—",isRTO:Ce,isMCN:p?.mcn,bagId:p?.bagId||"—",fromPincode:p?.fromPincode||"—",senderPincode:p?.senderPincode||"—",receiverPincode:p?.receiverPincode||"—",estimatedDeliveryDate:p?.estimatedDeliveryDate||"—",revisedEstimatedDeliveryDate:p?.revisedEstimatedDeliveryDate||"—",actualDeliveryDate:p?.actualDeliveryDate||"—",sourceHubName:p?.sourceHubName||"—",destinationHubName:p?.destinationHubName||"—",source:{city:p?.senderName||"—",pincode:p?.fromPincode||"—"},destination:{city:p?.receiverName||"—",pincode:p?.receiverPincode||"—"},bookingType:p?.bookingType||"—",shipmentType:p?.shipmentType?`${p.shipmentType?.toUpperCase()} | ${p.travelType?.toUpperCase()}`:"—",serviceType:p?.serviceType||"—",awb:p?.tplAwbNumber||"",partner:p?.partnerCode||"",eway:(()=>{const i=h?.shipmentTracking?.ewayInfo?.[0];return i?{id:i.eway_bill_id,no:i.ewaybill_no,created:i.eway_bill_crt_date,expiry:i.ewb_bill_exp_date}:{id:"—",no:"—",created:"—",expiry:"—"}})(),sender:{name:p?.senderName||"—",address:p?.booking_cp_address||"—"},receiver:{name:p?.receiverName||"—",address:p?.recipient_cp_address||"—"},pkg:{weight:p?.weight&&`${p.weight} Kg`||"—",dimensions:p?.length||p?.width||p?.height?`${p.length} x ${p.width} x ${p.height} cm`:"—",volumetric:p?.volumetricWeight||"—"},status:p?.status||"—",parentAwbNumber:p?.parentAwbNumber||""},A=(()=>{const i=h?.shipmentTracking?.travelDtos||[],c=f=>{if(!f)return"";try{const y=f.split(" ")[0]?.split("-");return y?.length===3?`${y[2]}-${y[1]}-${y[0]}`:f}catch{return f}},N=f=>{const y=(f||"").toLowerCase(),B=i.find(Q=>(Q?.premiseName||"").toLowerCase().includes(y)||y.includes((Q?.premiseName||"").toLowerCase())||(Q?.toPremisename||Q?.topremisename||"").toLowerCase().includes(y)||y.includes((Q?.toPremisename||Q?.topremisename||"").toLowerCase()))||null;return c(B?.date)},w=h?.shipmentTracking?.route_info;return Array.isArray(w)&&w.length?w.map((f,y,B)=>({hub:f,date:N(f),type:y===0?"source":y===B.length-1?"to":"transit"})):[]})();x.useEffect(()=>{if(!T.current||A.length<=5){le(!1);return}const i=T.current,c=()=>{const N=Array.from(i.querySelectorAll(".ho-route__row"));if(N.length===0)return!1;let w=0;return N.forEach(f=>{w+=f.offsetHeight+24}),w>i.clientHeight};requestAnimationFrame(()=>{const N=c();le(N)})},[A.length]),x.useMemo(()=>A.find(c=>c.type==="source")?.hub||"—",[A,d.source.city]),x.useMemo(()=>A.find(c=>c.type==="to")?.hub||"—",[A,d.destination.city]);const S=h?.shipmentTracking?.travelDtos?.map((i,c)=>({key:c,time:i.date,location:(i.status||"").toUpperCase()==="RETURN_INITIATED"&&i.driverName&&i.driverName.trim()!==""?i.toPremisename||i.toPremiseName||"—":["FORCE_BAG_ATTEMPTED","RETURN_INITIATED","RETURN_REVOKED","IN_BAG_OUTSCAN_TO_CP","OUT_SCAN_TO_CP","BAGGED","INSCANNED","IN-BAG-OUTSCAN","IN-BAG-INSCAN","INSCANNED_AT_TRANSIT","ATTEMPTED","HUB-OUTSCAN","HUB-IN-SCANNED","REMOVED_FROM_BAG","SCHEDULED_FOR_TRIP","FORCE_BAG","MIS_ROUTED","REROUTED","PINCODE_AUDITED","FORCE_HUB_OUTSCAN","EXCESS_INSCAN","MODE_AUDITED","REMOVED_FROM_LCR","OUT_SCAN_TO_3PL"].includes((i.status||"").toUpperCase())?i.premiseName||"—":i.toPremisename||i.toPremiseName||"—",locationPremiseName:["IN_BAG_OUTSCAN_TO_CP","OUT_SCAN_TO_CP"].includes((i.status||"").toUpperCase())?i.toPremisename||i.toPremiseName:"-",process:i.status,bag:i.bagBarCode,user:(i.status||"").toUpperCase()==="RETURN_INITIATED"&&i.driverName?.trim()||["ATTEMPTED","OUT_FOR_DELIVERY","DELIVERED","RTO_OUT_FOR_DELIVERY","RETURN_REVOKED","RTO_DELIVERED","INSCANNED_AT_CP","UNDELIVERED"].includes((i.status||"").toUpperCase())&&i.driverName?.trim()?i.driverName:i.user?.trim()||"_",exception:i.exception||(i.isException,"-"),remark:(()=>{const N=(i.status||"").toString().toUpperCase();if(!["SCHEDULED_FOR_TRIP","IN-BAG-OUTSCAN"].includes(N))return i.remarks||"-";const f=i.lcrnum||i.lcrNum||i.lcr_no||i.lcrNo||"",B=`${N==="SCHEDULED_FOR_TRIP"?"Scheduled Outscan":"Outscan"} from ${b(i.premiseName||"")} to ${b(i.toPremisename||i.topremisename||"")}`;return f?`${B} — LCR No: ${f}`:B})(),coLoader:i.coLoader||i.co_loader||i.coLoaderName||i.co_loader_name||i.coLoader_code||"—",transportType:i.travelBy||i.transportType||i.transport_type||i.mode||"—",flightName:i.flightName||i.flight_no||i.flight||i.flightNum||"",vehicleNo:i.vehicleNo||i.vehicleNum||i.vehicle_no||i.truckNo||i.truck_no||"—",driverName:i.driverName||i.driver_name||"—"}))||[],R=x.useMemo(()=>[{title:"Date and Time",dataIndex:"time",key:"time",render:i=>e.jsx("span",{className:"ho-nowrap",children:z(i)})},{title:"Location",dataIndex:"location",key:"location",render:i=>i?b(i):"—"},{title:"Process",dataIndex:"process",key:"process",render:(i,c)=>{const N=(i||"").toString().toUpperCase(),f=["REMOVED_FROM_BAG","REMOVED_FROM_LCR","ATTEMPTED","MIS_ROUTED","UNDELIVERED"].includes(N),y=f?{color:"#e14949",borderColor:"#ffd5d5",background:"#ffecec"}:{color:"#1f7a48",borderColor:"#cfeede",background:"#e9fff1"},B=`ho-tag ${f?"ho-tag--danger":"ho-tag--success"}`,je=N==="OUT_SCAN_TO_CP"||N==="IN_BAG_OUTSCAN_TO_CP"?`${i} (${b(c?.locationPremiseName||"")})`:i;return e.jsx(u.Tag,{style:y,className:B,children:je})}},{title:"Bag No",dataIndex:"bag",key:"bag",render:i=>i?e.jsx("a",{className:"ho-link",onClick:()=>_(`/bag-details-ui?awb=${encodeURIComponent(i)}`),children:i}):"-"},{title:"User",dataIndex:"user",key:"user"},{title:"Exception",dataIndex:"exception",key:"exception",render:i=>i||"-"},{title:"Remark",dataIndex:"remark",key:"remark",render:(i,c)=>{if(!i)return"-";if((c?.process||"").toUpperCase()==="MIS_ROUTED"){const V=String(i),W=V.length>40?`${V.slice(0,40)}…`:V;return e.jsx(u.Tooltip,{title:V,children:e.jsx("span",{className:"ho-remark-ellipsis",children:W})})}const w=["SCHEDULED_FOR_TRIP","IN-BAG-OUTSCAN"].includes((c?.process||c?.status||"").toString().toUpperCase()),f=i.indexOf("LCR No:"),y=f>=0,B=y?i.slice(0,f):i,Q=y?i.slice(f):"",he=y?(Q.replace(/^[^:]*:\s*/i,"")||"").trim():"",je=V=>{const W=[],te=String(V||""),Qe=/(https?:\/\/[^\s]+|www\.[^\s]+)/gi;let se=0,Ne,Ae=0;for(;(Ne=Qe.exec(te))!==null;){const ze=Ne.index,jt=Qe.lastIndex;ze>se&&W.push(e.jsx("span",{children:te.slice(se,ze)},`rmk-t-${Ae++}`));const ye=Ne[0],Nt=ye.startsWith("http")?ye:`https://${ye}`;W.push(e.jsx("a",{className:"ho-link",href:Nt,target:"_blank",rel:"noreferrer",children:"View"},`rmk-a-${Ae++}`)),se=jt}return se<te.length&&W.push(e.jsx("span",{children:te.slice(se)},`rmk-t-${Ae++}`)),W.length?W:te||"-"};return e.jsxs("span",{children:[je(B),y&&e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"ho-remark-strong",children:"LCR No: "}),he&&e.jsx("a",{className:"ho-link",onClick:()=>{sessionStorage.setItem("LCR_REPORT_RECORD",JSON.stringify({vehicle_lcr_id:he})),window.open(window.location.origin+"/lcr-report","_blank")},children:he})]}),w&&e.jsx(u.Tooltip,{placement:"top",title:e.jsxs("div",{children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Co-loader:"})," ",b(c.coLoader||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Transport type:"})," ",b(c.transportType||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Flight Name:"})," ",c.flightName||"N/A"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Vehicle No:"})," ",c.vehicleNo||"—"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Driver Name:"})," ",b(c.driverName||"—")]})]}),children:e.jsx("span",{className:"ho-alert-dot"})})]})}}],[_]);x.useMemo(()=>(h?.shipmentTracking?.ewayInfo||[]).map(c=>c?.ewaybill_no).filter(c=>!!c),[h]),x.useMemo(()=>I.length?[{key:"audit-master",label:`Audit (${I.length})`,children:I.map((i,c)=>({key:`audit-${c}`,title:`Audit ${c+1} - ${i.auditType||"WEIGHT"}`,auditData:i}))}]:[],[I]);const Y=x.useRef(!1);x.useEffect(()=>{!Y.current&&I.length>0&&(m("audit-master"),Y.current=!0)},[I]),x.useMemo(()=>{if(g&&g.startsWith("audit-")){const i=parseInt(g.split("-")[1]),c=I[i];if(!c)return null;const N={auditedBy:c.auditMethod||"—",hub:c.auditedHubName||c.sourceHubName||"—",date:d.bookingTime},w={actual:c.bookedWeight??"—",volumetric:c.volumetricBookedValue??"—",lwh:`${c.bookedLength??"—"},${c.bookedWidth??"—"},${c.bookedHeight??"—"}`},f={actual:c.auditedWeight??"—",volumetric:c.volumetricAuditedValue??"—",lwh:`${c.auditedLength??"—"},${c.auditedWidth??"—"},${c.auditedHeight??"—"}`},y=c.weightDiff!=null?`Audited actual weight is ${c.weightDiff>=0?"higher":"lower"} by ${Math.abs(c.weightDiff)}%.`:"";return{header:N,bookingValue:w,auditedValue:f,note:y,index:i+1}}return null},[g,I,d.bookingTime]),x.useMemo(()=>{const i=h?.shipmentTracking?.travelDtos||[];for(let c=i.length-1;c>=0;c--){const N=(i[c]?.status||"").toUpperCase();if(N.includes("IN-BAG-INSCAN"))return"Bag In";if(N.includes("BAGGED"))return"Bagged"}return null},[h]);const de=!!(h?.shipmentTracking&&(h?.shipmentTracking?.bookingInfoDto||Array.isArray(h?.shipmentTracking?.route_info)&&h?.shipmentTracking?.route_info.length||Array.isArray(h?.shipmentTracking?.travelDtos)&&h?.shipmentTracking?.travelDtos.length)),L=!!l,be=()=>{const i=sessionStorage.getItem("token")||localStorage.getItem("token")||"",c=sessionStorage.getItem("email")||localStorage.getItem("email")||"",N=sessionStorage.getItem("userId")||localStorage.getItem("userId")||"",w=sessionStorage.getItem("premiseId")||sessionStorage.getItem("smcs-premise-id")||"",f=new URLSearchParams;f.append("source","HUBOPS"),i&&f.append("token",i),c&&f.append("email",c),N&&f.append("userId",N),w&&f.append("premiseId",w);const B=window.location.hostname.includes("qa")?"https://qasupport.innofulfill.com":"https://support.innofulfill.com";window.open(`${B}?${f.toString()}`,"_blank")};return!C&&!de?e.jsx(u.Spin,{spinning:C&&!h,indicator:e.jsx("img",{src:pe,style:{height:"100px",width:"100px"}}),children:e.jsx("div",{className:"shipment-details-page",children:e.jsx("div",{className:"bag-empty",children:e.jsxs(u.Card,{className:"ho-card bag-empty__card",children:[e.jsx("div",{className:"ho-section-title bag-empty__title",children:e.jsx("span",{className:"ho-title",children:"Details Not Found"})}),e.jsxs("div",{className:"bag-empty__text",children:["No details found for the provided AWB number ",U,". Please check the AWB number and try again."]})]})})})}):e.jsx(u.Spin,{spinning:C&&!h,indicator:e.jsx("img",{src:pe,style:{height:"100px",width:"100px"}}),children:e.jsx("div",{className:"shipment-details-page",children:e.jsxs(u.Row,{gutter:[16,16],className:"ho-row-equal",children:[e.jsx(u.Col,{xs:24,lg:10,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",style:{height:"644px"},bodyStyle:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",padding:"12px"},children:[e.jsxs("div",{className:"ho-section-title",style:{marginTop:"10px"},children:[e.jsxs("div",{className:"ho-title-left",children:[d.parentAwbNumber?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",background:"#ECFDF3",padding:"6px 12px",borderRadius:"8px",cursor:"pointer",color:"#027A48",fontWeight:500,fontSize:"14px"},onClick:()=>_(`/shipment-details-ui?awb=${encodeURIComponent(d.parentAwbNumber)}&endpoint=${encodeURIComponent(F)}`),children:[e.jsx(gt,{}),d.parentAwbNumber]}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:Ct,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Shipment Info"})]}),d.bagId!=="—"&&e.jsx(u.Badge,{status:"processing",text:e.jsx("span",{className:"ho-badge-text",children:d.bagId})})]}),e.jsxs("div",{className:"ho-title-right",children:[e.jsxs("div",{className:"ho-chip",children:[e.jsx("span",{className:"ho-chip__label",children:"Booked At:"}),e.jsx("span",{className:"ho-chip__value",children:z(d.bookingTime)})]}),e.jsxs("div",{className:"ho-chip ho-chip--ticket",onClick:be,style:{cursor:"pointer"},children:[e.jsx("img",{src:gs,alt:""}),e.jsx("span",{className:"ho-chip__label",children:"Raise Ticket"})]})]})]}),e.jsxs("div",{className:"ho-scrollable-content",children:[e.jsx("div",{className:"ho-subheader",children:e.jsx("div",{className:"ho-subheader-left-row",style:{width:"100%"},children:(()=>{const i=Z&&e.jsx(u.Tag,{className:"ho-badge",style:{...Z?.replace(/_/g," ")?.toUpperCase()==="DELIVERED"?{background:"#e9fff1",color:"#027A48",border:"1px solid #cfeede",fontWeight:600,fontFamily:"Roboto"}:Z?.replace(/_/g," ")?.toUpperCase()==="UNDELIVERED"?{background:"#ffecec",color:"#d64545",border:"1px solid #ffd5d5",fontWeight:600,fontFamily:"Roboto"}:{},flexShrink:0},children:Z?.replace(/_/g," ")?.toUpperCase()}),c=e.jsx(u.Tag,{className:"ho-badge",style:{...d.isRTO?{background:"#e3250b",color:"#f7f3f2",border:"1px solid #cfeede",fontWeight:600,fontFamily:"Roboto"}:d.status.toUpperCase()==="UNDELIVERED"?{background:"#ffecec",color:"#d64545",border:"1px solid #ffd5d5",fontWeight:600,fontFamily:"Roboto"}:{},flexShrink:0},children:d.isRTO?"RETURN":"FORWARD"}),N=d.isMCN?e.jsx(u.Tag,{color:"#FFD32C",className:"ho-chip",style:{color:"#FFFFFF",fontWeight:600,flexShrink:0},children:"3PL"}):null,w=d?.shipmentType&&d.shipmentType!=="—"?e.jsx(u.Tag,{color:"#E9F2FF",className:"ho-chip",style:{flexShrink:0,marginLeft:"auto"},children:b(d.shipmentType)}):null,f={display:"flex",alignItems:"center",flexWrap:"nowrap",whiteSpace:"nowrap",width:"100%",gap:"1px"};return d.parentAwbNumber?e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"100%"},children:[e.jsx("span",{style:{fontSize:"16px",color:"#667085",fontWeight:400},children:"Child Shipment number"}),e.jsxs("div",{style:f,children:[e.jsx("span",{className:"ho-eway-value-bold",style:{fontSize:"18px",flex:"0 0 auto",marginRight:"8px"},children:d.shipmentNumber}),i,c,N,w]})]}):e.jsxs("div",{style:f,children:[e.jsx("span",{className:"ho-eway-value-bold",style:{flex:"0 0 auto",marginRight:"8px"},children:d.shipmentNumber}),i,c,N,w]})})()})}),e.jsxs("div",{className:"ho-subheader__route",children:[e.jsxs("span",{className:"ho-kv-stack ho-route-dest",children:[e.jsx("span",{className:"ho-stat__label",children:"Source"}),e.jsx("span",{className:"ho-stat__value",children:b(d.sourceHubName)+" ,"+b(d.sourceCity)})]}),e.jsxs("span",{className:"ho-kv-stack ho-route-dest",children:[e.jsx("span",{className:"ho-stat__label",children:"Destination"}),e.jsx("span",{className:"ho-stat__value",children:b(d.destinationHubName)+" ,"+b(d.destinationCity)})]})]}),e.jsxs("div",{style:{marginTop:"16px",padding:"16px",background:"#F8F9FA",borderRadius:"12px",display:"flex",alignItems:"center",gap:"10px",flexWrap:"wrap"},children:[e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx(u.Tag,{color:"#DFF5E1",style:{padding:"4px 12px",borderRadius:"8px",color:"#0F8A41",fontWeight:600},children:"● Planned EDD"}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:ve(d.estimatedDeliveryDate)})]}),e.jsx("div",{style:{height:"40px",width:"1px",background:"#DDD"}}),e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx(u.Tag,{color:"#FFE8D6",style:{padding:"4px 12px",borderRadius:"8px",color:"#D96A1B",fontWeight:600},children:"● Revised EDD"}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:ve(d.revisedEstimatedDeliveryDate)})]}),e.jsx("div",{style:{height:"40px",width:"1px",background:"#DDD"}}),e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx(u.Tag,{color:"#E8F2FF",style:{padding:"4px 12px",borderRadius:"8px",color:"#1A6FDB",fontWeight:600},children:"● Delivered Date"}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:ve(d.actualDeliveryDate)})]})]}),e.jsx("div",{style:{height:"10px"}}),e.jsx("div",{className:"ho-box ho-box--flush",children:e.jsxs("div",{className:"ho-stats",children:[e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Booking Type"}),e.jsx("div",{className:"ho-stat__value",children:b(d.bookingType)})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Service Type"}),e.jsx("div",{className:"ho-stat__value",children:b(d.serviceType)})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"From PinCode"}),e.jsx("div",{className:"ho-stat__value",children:`${d.fromPincode}`})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"To PinCode"}),e.jsx("div",{className:"ho-stat__value",children:`${d.receiverPincode}`})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"3PL / Partner"}),e.jsx("div",{className:"ho-stat__value",children:`${d.awb?b(d.awb):" "} — ${d.partner?b(d.partner):" "}`})]})]})}),h?.shipmentTracking?.childInfoDto&&h?.shipmentTracking?.childInfoDto.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ho-box ho-box--flush",style:{paddingTop:"0px"},children:[e.jsxs("div",{className:"ho-subtitle ho-subtitle--primary",style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"4px",marginBottom:"0px"},children:[e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:$e,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Child Shipment Info"})]}),e.jsxs(u.Tag,{color:"#F0F9FF",className:"ho-chip",style:{display:"flex",cursor:"pointer",alignItems:"center",gap:"4px",paddingTop:"0px"},onClick:()=>O(!0),children:[h?.shipmentTracking?.childInfoDto.length+" Child Shipments",e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(180deg)"},children:e.jsx("path",{d:"M14.9987 6.00071H3.13972L6.76939 1.64111C6.93912 1.43691 7.02077 1.17365 6.99639 0.909247C6.97202 0.644844 6.8436 0.400955 6.63941 0.231232C6.43521 0.0615082 6.17195 -0.0201464 5.90755 0.00423112C5.64314 0.0286087 5.39925 0.157022 5.22953 0.36122L0.229979 6.36068C0.196343 6.4084 0.166264 6.45853 0.139987 6.51067C0.139987 6.56066 0.139988 6.59066 0.0699939 6.64066C0.0246714 6.75531 0.000941037 6.87735 0 7.00063C0.000941037 7.1239 0.0246714 7.24594 0.0699939 7.36059C0.0699939 7.41059 0.0699936 7.44059 0.139987 7.49058C0.166264 7.54272 0.196343 7.59285 0.229979 7.64057L5.22953 13.64C5.32354 13.7529 5.44127 13.8437 5.57435 13.9059C5.70742 13.9681 5.85256 14.0002 5.99946 14C6.23309 14.0005 6.45951 13.9191 6.63941 13.77C6.74065 13.6861 6.82435 13.583 6.88569 13.4666C6.94704 13.3503 6.98483 13.223 6.99691 13.0921C7.00898 12.9611 6.9951 12.829 6.95606 12.7034C6.91702 12.5778 6.85359 12.4612 6.76939 12.3601L3.13972 8.00054H14.9987C15.2638 8.00054 15.5182 7.89519 15.7057 7.70767C15.8932 7.52015 15.9986 7.26582 15.9986 7.00063C15.9986 6.73543 15.8932 6.4811 15.7057 6.29358C15.5182 6.10606 15.2638 6.00071 14.9987 6.00071Z",fill:"#026AA2"})})]})]}),e.jsx("div",{className:"ho-table-responsive-wrapper",children:e.jsxs("table",{className:"ho-eway-table",style:{borderCollapse:"collapse",borderSpacing:"0",marginTop:"0px",width:"100%"},children:[e.jsx("thead",{style:{borderBottom:"none",padding:"0",margin:"0"},children:e.jsxs("tr",{style:{border:"none",padding:"0",margin:"0"},children:[e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0 8px 10px",textAlign:"left"},children:"AWB Number"}),e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0",textAlign:"left"},children:"Current Hub"}),e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0",textAlign:"left"},children:"Status"})]})}),e.jsx("tbody",{style:{padding:"0",margin:"0"},children:(X?h?.shipmentTracking?.childInfoDto:h?.shipmentTracking?.childInfoDto.slice(0,1))?.map((i,c)=>e.jsxs("tr",{style:{padding:"0",margin:"0"},children:[e.jsx("td",{style:{padding:"8px 0 8px 10px",margin:"0"},className:"ho-table-value",children:e.jsx("span",{className:"ho-link-underline",onClick:()=>_(`/shipment-details-ui?awb=${encodeURIComponent(i.awbNumber)}`,{replace:!0,state:{parentAwb:U}}),children:i.awbNumber})}),e.jsx("td",{className:"ho-table-value",style:{padding:"8px 0",margin:"0",paddingRight:"20px"},children:b(i.currentHub||"—")}),e.jsx("td",{className:"ho-table-value",style:{padding:"8px 0",margin:"0"},children:e.jsx(u.Tag,{className:"ho-badge ho-badge--blue ho-table-value",children:b(i.status||"—")})})]},c))})]})})]}),e.jsx("div",{style:{marginBottom:"16px"}})]}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsxs("div",{className:"ho-subtitle ho-subtitle--primary",style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"4px",marginBottom:"0px"},children:[e.jsxs("span",{className:"ho-title-left",style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("img",{src:Xe,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"E-way Bill Info"})]}),h?.shipmentTracking?.ewayInfo?.length>0&&e.jsxs(u.Tag,{color:"#F0F9FF",className:"ho-chip",style:{display:"flex",cursor:"pointer",alignItems:"center",gap:"4px",paddingTop:"0px"},onClick:()=>xe(!0),children:[h?.shipmentTracking?.ewayInfo?.length+" E-way Bills",e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(180deg)"},children:e.jsx("path",{d:"M14.9987 6.00071H3.13972L6.76939 1.64111C6.93912 1.43691 7.02077 1.17365 6.99639 0.909247C6.97202 0.644844 6.8436 0.400955 6.63941 0.231232C6.43521 0.0615082 6.17195 -0.0201464 5.90755 0.00423112C5.64314 0.0286087 5.39925 0.157022 5.22953 0.36122L0.229979 6.36068C0.196343 6.4084 0.166264 6.45853 0.139987 6.51067C0.139987 6.56066 0.139988 6.59066 0.0699939 6.64066C0.0246714 6.75531 0.000941037 6.87735 0 7.00063C0.000941037 7.1239 0.0246714 7.24594 0.0699939 7.36059C0.0699939 7.41059 0.0699936 7.44059 0.139987 7.49058C0.166264 7.54272 0.196343 7.59285 0.229979 7.64057L5.22953 13.64C5.32354 13.7529 5.44127 13.8437 5.57435 13.9059C5.70742 13.9681 5.85256 14.0002 5.99946 14C6.23309 14.0005 6.45951 13.9191 6.63941 13.77C6.74065 13.6861 6.82435 13.583 6.88569 13.4666C6.94704 13.3503 6.98483 13.223 6.99691 13.0921C7.00898 12.9611 6.9951 12.829 6.95606 12.7034C6.91702 12.5778 6.85359 12.4612 6.76939 12.3601L3.13972 8.00054H14.9987C15.2638 8.00054 15.5182 7.89519 15.7057 7.70767C15.8932 7.52015 15.9986 7.26582 15.9986 7.00063C15.9986 6.73543 15.8932 6.4811 15.7057 6.29358C15.5182 6.10606 15.2638 6.00071 14.9987 6.00071Z",fill:"#026AA2"})})]})]}),(!h?.shipmentTracking?.ewayInfo||h?.shipmentTracking?.ewayInfo.length===0)&&e.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"80px",fontFamily:"Roboto",fontSize:"14px",color:"#6B7280",width:"100%"},children:"No E-Way Bill Data Available"}),h?.shipmentTracking?.ewayInfo?.length>0&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"ho-table-responsive-wrapper",children:e.jsxs("table",{className:"ho-eway-table",style:{borderCollapse:"collapse",width:"100%"},children:[e.jsx("thead",{style:{borderBottom:"none"},children:e.jsxs("tr",{style:{border:"none"},children:[e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0 8px 10px"},children:"E-Way Bill No"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Created"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Updated"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Expiry Date"})]})}),e.jsx("tbody",{children:h?.shipmentTracking?.ewayInfo?.slice(0,1)?.map((i,c)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-stat__value",style:{padding:"8px 0 8px 10px"},children:i.ewaybill_no||"—"}),e.jsx("td",{className:"ho-stat__value",children:z(i.eway_bill_crt_date)||"—"}),e.jsx("td",{className:"ho-stat__value",children:z(i.update_date||"-")}),e.jsx("td",{className:"ho-stat__value",children:z(i.ewb_bill_exp_date)||"—"})]},c))})]})})})]}),e.jsx(u.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",color:"#003371"},children:"Child Shipments"}),open:P,footer:null,onCancel:()=>O(!1),width:800,children:e.jsxs("table",{className:"ho-eway-table",style:{width:"100%"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"AWB Number"}),e.jsx("th",{children:"Current Hub"}),e.jsx("th",{children:"Status"})]})}),e.jsx("tbody",{children:h?.shipmentTracking?.childInfoDto?.map((i,c)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-table-value",children:e.jsx("span",{className:"ho-link-underline",onClick:()=>{_(`/shipment-details-ui?awb=${encodeURIComponent(i.awbNumber)}`,{replace:!0,state:{parentAwb:U}}),O(!1)},style:{cursor:"pointer"},children:i.awbNumber})}),e.jsx("td",{className:"ho-table-value",children:b(i.currentHub||"—")}),e.jsx("td",{className:"ho-table-value",children:e.jsx(u.Tag,{className:"ho-badge ho-badge--blue",children:b(i.status||"—")})})]},c))})]})}),e.jsx(u.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:"Route"}),open:fe,onCancel:()=>ee(!1),footer:null,width:450,children:e.jsx("div",{className:"ho-route",style:{maxHeight:"70vh",overflowY:"auto",paddingRight:"10px"},children:A.length===0?e.jsx("div",{className:"ho-route__empty",children:"Route not available"}):A.map((i,c)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:c===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:""})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",c]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:b(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},c))})}),e.jsx(u.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:"E-way Bill Info"}),open:G,footer:null,onCancel:()=>xe(!1),width:900,children:e.jsxs("table",{className:"ho-eway-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"E-Way Bill No"}),e.jsx("th",{children:"Created"}),e.jsx("th",{children:"Updated"}),e.jsx("th",{children:"Expiry Date"})]})}),e.jsx("tbody",{children:h?.shipmentTracking?.ewayInfo?.map((i,c)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-stat__value",children:i.ewaybill_no||"—"}),e.jsx("td",{className:"ho-stat__value",children:z(i.eway_bill_crt_date)||"—"}),e.jsx("td",{className:"ho-stat__value",children:z(i.update_date||"-")}),e.jsx("td",{className:"ho-stat__value",children:z(i.ewb_bill_exp_date)||"—"})]},c))})]})}),e.jsxs("div",{className:"ho-grid ho-grid--2",children:[e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle ho-subtitle--primary",children:e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:Xe,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Sender / Receiver Info"})]})}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ae,{label:"S - Name :",value:b(d.sender.name)}),e.jsx(ae,{label:"R - Name :",value:b(d.receiver.name)})]})]}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle ho-subtitle--primary",children:e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:$e,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Package Information"})]})}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ae,{label:"Weight :",value:d.pkg.weight}),e.jsx(ae,{label:"Dimensions:",value:d.pkg.dimensions}),e.jsx(ae,{label:"Volumetric Wt(Kg) :",value:d.pkg.volumetric})]})]})]})]})]})}),e.jsx(u.Col,{xs:24,lg:14,children:e.jsxs(u.Row,{gutter:[16,16],children:[e.jsx(u.Col,{xs:24,lg:12,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",style:{height:L?"484px":"644px"},children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Fe,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Route"})]})}),e.jsx("div",{ref:T,className:`ho-route ${A.length===0?"ho-route--empty":""}`,style:A.length===0?{display:"flex",alignItems:"center",justifyContent:"center",minHeight:L?"400px":"560px",textAlign:"center"}:{maxHeight:L?"420px":"580px",overflow:"hidden",position:"relative"},children:A.length===0?e.jsx("span",{style:{color:"#6B7280",fontSize:"14px",fontFamily:"Roboto"},children:"Route not available"}):e.jsxs(e.Fragment,{children:[H?A.slice(0,5).map((i,c)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:c===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",c]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:b(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},c)):A.map((i,c)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:c===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",c]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:b(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},c)),H&&e.jsxs("div",{className:"ho-route__more",onClick:()=>ee(!0),children:[e.jsx("span",{className:"ho-route__more-text",children:"View More"}),e.jsx("span",{className:"ho-route__more-caret",children:"▾"})]})]})})]})}),e.jsx(u.Col,{xs:24,lg:12,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",style:{height:L?"484px":"644px"},bodyStyle:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Fe,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Audit Info"})]}),I.length>0&&e.jsxs(u.Tag,{color:"#E9F2FF",className:"ho-chip",children:[I.length," Audit",I.length!==1?"s":""]})]}),e.jsxs("div",{className:"ho-list",style:{flex:1,display:"flex",flexDirection:"column",gap:"12px",overflow:"hidden"},children:[!I.length&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"auto",textAlign:"center",width:"100%",fontFamily:"Roboto",fontSize:"14px",color:"#6B7280"},children:"No audit info available"}),I.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"ho-list__item",onClick:()=>m(g==="audit-master"?null:"audit-master"),children:[e.jsxs("span",{className:"ho-strong",children:["Weight(",I.length,")"]}),e.jsx("span",{className:`ho-list__chevron ${g==="audit-master"?"ho-open":""}`,children:"▾"})]}),g==="audit-master"&&e.jsx("div",{className:"ho-expand-block",style:{flex:1,overflowY:"auto",maxHeight:"none",display:"flex",flexDirection:"column",gap:"10px"},children:I.map((i,c)=>e.jsxs(u.Card,{className:"ho-subcard ho-mt-10",children:[e.jsxs("div",{className:"ho-grid ho-grid--3",style:{justifyContent:"space-between"},children:[e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Audited By"}),e.jsx(u.Tooltip,{title:b(i.auditMethod||"—"),children:e.jsx("span",{className:"ho-stat__value--audit",style:{maxWidth:"140px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",verticalAlign:"bottom",cursor:"pointer"},children:b(i.auditMethod||"—")})})]}),e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Audited Hub"}),e.jsx(u.Tooltip,{title:b(i.auditedHubName||"—"),children:e.jsx("span",{className:"ho-stat__value--audit",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",verticalAlign:"bottom",cursor:"pointer"},children:i.auditedHubName&&i.auditedHubName.length>15?b(i.auditedHubName.substring(0,15))+"...":b(i.auditedHubName||"—")})})]}),e.jsxs("div",{className:"ho-kv-stack",style:{textAlign:"right"},children:[e.jsx("span",{className:"ho-stat__label",children:"Audited Date"}),e.jsx("span",{className:"ho-stat__value--audit",children:i.auditTimestamp?i.auditTimestamp.replace(" "," | "):"—"})]})]}),e.jsx("div",{style:{height:"12px"}}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle-audit",children:"Audited Value"}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ke,{label:"Actual",value:i.auditedWeight||"—",isAudit:!0,icon:ds},`ah-${c}`),e.jsx(ke,{label:"Volumetric",value:i.volumetricAuditedValue||"—",isAudit:!0,icon:us},`sh-${c}`),e.jsx(ke,{label:"LWH(cm)",value:i.auditedLength+","+i.auditedWidth+","+i.auditedHeight||"—",icon:hs},`sh-${c}`)]})]}),e.jsxs("div",{className:"ho-note",children:[e.jsx("span",{style:{color:"#000",fontWeight:600},children:"Note:"})," ","Audited actual weight is"," ",i.weightDiff!=null?`${i.weightDiff>=0?"higher":"lower"} by ${Math.abs(i.weightDiff).toFixed(2)} %.`:"—"]})]},`audit-card-${c}`))})]})]})]})}),L&&e.jsx(u.Col,{xs:24,lg:24,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",style:{height:"136px",borderRadius:"24px",width:"100%"},children:[L&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"18px",fontWeight:700,color:"#003371"},children:l?.ticketNumber||"N/A"}),e.jsxs("div",{style:{marginTop:"8px",fontSize:"14px",color:"#344054"},children:[e.jsx("span",{style:{color:"#667085"},children:"Title : "}),e.jsx("span",{style:{fontWeight:600,color:"#003371"},children:l?.title||"—"})]})]}),e.jsxs(u.Tag,{color:"#FFF8EB",style:{color:"#B54708",border:"1px solid #FEDF89",borderRadius:"16px",padding:"4px 12px",fontWeight:600,display:"flex",alignItems:"center",gap:"6px",fontSize:"12px"},children:[e.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#F79009"}}),l?.status?.name||"In Progress"]})]}),L&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{margin:"12px 0",borderBottom:"1px dashed #D0D5DD"}}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",alignItems:"center",color:"#667085",fontSize:"13px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(xt,{})," Reported By ",b(l?.reportedBy||"—")]}),l?.reportedDate&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#D0D5DD"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(pt,{})," ",l.reportedDate]})]}),e.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#D0D5DD"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(mt,{})," Assigned To ",l?.assignedTo?b(l.assignedTo):"—"]})]})]})]})})]})}),e.jsx(u.Col,{span:24,children:e.jsxs(u.Card,{className:"ho-card",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ft,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Travel Info"})]})}),e.jsx(u.Table,{className:"ho-table",columns:R,dataSource:S,pagination:!1,scroll:{x:1e3}})]})})]})})})}const et="data:image/svg+xml,%3csvg%20width='16'%20height='14'%20viewBox='0%200%2016%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9987%206.00071H3.13972L6.76939%201.64111C6.93912%201.43691%207.02077%201.17365%206.99639%200.909247C6.97202%200.644844%206.8436%200.400955%206.63941%200.231232C6.43521%200.0615082%206.17195%20-0.0201464%205.90755%200.00423112C5.64314%200.0286087%205.39925%200.157022%205.22953%200.36122L0.229979%206.36068C0.196343%206.4084%200.166264%206.45853%200.139987%206.51067C0.139987%206.56066%200.139988%206.59066%200.0699939%206.64066C0.0246714%206.75531%200.000941037%206.87735%200%207.00063C0.000941037%207.1239%200.0246714%207.24594%200.0699939%207.36059C0.0699939%207.41059%200.0699936%207.44059%200.139987%207.49058C0.166264%207.54272%200.196343%207.59285%200.229979%207.64057L5.22953%2013.64C5.32354%2013.7529%205.44127%2013.8437%205.57435%2013.9059C5.70742%2013.9681%205.85256%2014.0002%205.99946%2014C6.23309%2014.0005%206.45951%2013.9191%206.63941%2013.77C6.74065%2013.6861%206.82435%2013.583%206.88569%2013.4666C6.94704%2013.3503%206.98483%2013.223%206.99691%2013.0921C7.00898%2012.9611%206.9951%2012.829%206.95606%2012.7034C6.91702%2012.5778%206.85359%2012.4612%206.76939%2012.3601L3.13972%208.00054H14.9987C15.2638%208.00054%2015.5182%207.89519%2015.7057%207.70767C15.8932%207.52015%2015.9986%207.26582%2015.9986%207.00063C15.9986%206.73543%2015.8932%206.4811%2015.7057%206.29358C15.5182%206.10606%2015.2638%206.00071%2014.9987%206.00071Z'%20fill='%23231F20'/%3e%3c/svg%3e",xs="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6654%209.99967V12.5923C12.6654%2014.0755%2012.175%2014.6663%2010.5913%2014.6663H5.4061C3.92281%2014.6663%203.33203%2014.1759%203.33203%2012.5923V9.99967C3.33203%207.42234%205.42137%205.33301%207.9987%205.33301C10.576%205.33301%2012.6654%207.42234%2012.6654%209.99967Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.6654%209.99967C10.6654%208.52694%209.47143%207.33301%207.9987%207.33301C6.52594%207.33301%205.33203%208.52694%205.33203%209.99967'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M8%2011.3333L8.66667%2010'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.8762%203.33301H5.12634C4.53728%203.33301%204.24274%203.33301%203.98358%203.23165C3.89749%203.19798%203.81514%203.15633%203.73774%203.10733C3.50472%202.95979%203.34135%202.72823%203.0146%202.26511C2.75994%201.90417%202.63261%201.7237%202.6765%201.57614C2.6904%201.52945%202.7149%201.48619%202.7483%201.44937C2.8539%201.33301%203.08344%201.33301%203.54253%201.33301H12.4601C12.9192%201.33301%2013.1487%201.33301%2013.2543%201.44937C13.2877%201.48619%2013.3122%201.52945%2013.3261%201.57614C13.37%201.7237%2013.2426%201.90417%2012.988%202.26511C12.6612%202.72823%2012.4979%202.9598%2012.2648%203.10733C12.1874%203.15633%2012.1051%203.19798%2012.019%203.23165C11.7598%203.33301%2011.4653%203.33301%2010.8762%203.33301Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M9.33464%205.33301V3.33301M6.66797%205.33301V3.33301'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e",fs="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.66699%205.33333L8.00033%202.66667L13.3337%205.33333V10.6667L8.00033%2013.3333L2.66699%2010.6667V5.33333Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8%206V10'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.667%207.33333V9.33333'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M5.33301%207.33301V9.33301'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e";var Me={};function k(s){if(s==null)return"";const t=String(s).replace(/[_-]+/g," ").replace(/\s+/g," ").trim().toLowerCase();return t?t.replace(/\b\w/g,n=>n.toUpperCase()):""}function bt(s){if(!s)return"—";const t=new Date(s);if(isNaN(t.getTime()))return"—";const n=a=>String(a).padStart(2,"0");return n(t.getDate())+"-"+n(t.getMonth()+1)+"-"+t.getFullYear()+" "+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())}const Cs=[{title:"Date and Time",dataIndex:"time",key:"time",render:s=>e.jsx("span",{className:"ho-nowrap",children:s?bt(s):"—"})},{title:"Location",dataIndex:"location",key:"location",render:s=>s?k(s):"—"},{title:"Process",dataIndex:"process",key:"process",render:(s,t)=>{const n=(s||"").toString().toUpperCase(),o=["REMOVED_FROM_BAG","REMOVED_FROM_LCR","ATTEMPTED","MIS_ROUTED","UNDELIVERED"].includes(n),r=n==="OUT_SCAN_TO_CP"||n==="IN_BAG_OUT_CP",g=t?.toPremisename&&t.toPremisename!=="-"?k(t.toPremisename):"",m=r?`${k(s)} → ${g}`:k(s),h=o?{color:"#e14949",borderColor:"#ffd5d5",background:"#ffecec"}:{color:"#1f7a48",borderColor:"#cfeede",background:"#e9fff1"},j=`ho-tag ${o?"ho-tag--danger":"ho-tag--success"}`;return e.jsx(u.Tag,{style:h,className:j,children:m})}},{title:"User",dataIndex:"user",key:"user"},{title:"Exception",dataIndex:"exception",key:"exception",render:s=>s||"-"},{title:"Remark",dataIndex:"remark",key:"remark",render:(s,t)=>{if(!s)return"-";const n=(t?.process||"").toString().toUpperCase(),a=n.includes("OUTSCAN")&&n!=="HUB-OUTSCAN"||n==="SCHEDULED_FOR_TRIP",o=s.indexOf("LCR No:"),r=o>=0,g=r?s.slice(0,o):s,m=r?s.slice(o):"",h=r?(m.replace(/^[^:]*:\s*/i,"")||"").trim():"";return e.jsxs("span",{children:[g,r?e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"ho-remark-strong",children:"LCR No: "}),e.jsx("a",{className:"ho-link",onClick:()=>{sessionStorage.setItem("LCR_REPORT_RECORD",JSON.stringify({vehicle_lcr_id:h})),window.open(window.location.origin+"/lcr-report","_blank")},children:h})]}):null,a?e.jsx(u.Tooltip,{placement:"top",title:e.jsxs("div",{children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Co-loader:"})," ",k(t.coLoader||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Transport type:"})," ",k(t.transportType||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Flight Name:"})," ",t.flightName?k(t.flightName):"N/A"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Vehicle No:"})," ",t.vehicleNo||"—"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Driver Name:"})," ",k(t.driverName||"—")]})]}),children:e.jsx("span",{className:"ho-alert-dot"})}):null]})}}];function bs({endpoint:s,awbNumber:t,showBackArrow:n=!1}){const a=ge.useNavigate(),o=ge.useLocation(),[r,g]=x.useState(null),[m,h]=x.useState(!1),[j,C]=x.useState(!1),[M,D]=x.useState(!1),_=x.useRef(Me.NODE_ENV==="development"),[X,$]=x.useState(!1),G=()=>{window.history.length<=1?window.close():a(-1)},fe=new URLSearchParams(o.search).get("endpoint"),ee=s||fe||Me.REACT_APP_TRACKING_ENDPOINT,P=x.useMemo(()=>{if(t)return t;const l=new URLSearchParams(o.search);return l.get("awb")||l.get("awbNumber")||""},[t,o.search]);x.useEffect(()=>{let l=!1;return Me.NODE_ENV==="development"&&_.current?(_.current=!1,()=>{l=!0}):((async()=>{try{if(h(!0),!P){g(null);return}const A=`${ee}?awbNumber=${encodeURIComponent(P)}`,S=await fetch(A);if(!S.ok)throw new Error("Request failed");const R=await S.json();l||g(R)}catch{l||g(null)}finally{l||h(!1)}})(),()=>{l=!0})},[ee,P]);const O=r?.baggingTracking,T=O?.baggingInfo,H=O?.travelInfoDto||r?.shipmentTracking?.travelDtos||[],le=T?.bag_barcode||H.find(l=>(l?.bagBarCode||l?.bagbarcode)&&(l?.bagBarCode||l?.bagbarcode)!=="-")?.bagBarCode||"—",ce=x.useMemo(()=>{try{return(H||[]).filter(d=>(d?.status||"").toUpperCase()==="BAG_CREATED").map(d=>d?.date).filter(Boolean).sort()[0]||null}catch{return null}},[H]),F=(()=>{const l=O?.route_info||r?.shipmentTracking?.route_info;if(!l)return[];const d=Array.isArray(l)?l.filter(S=>S&&S!=="null"&&S!==""):[];if(d.length===0)return[];const A=S=>{if(!S)return"";try{const R=S.split(" ")[0].split("-");return`${R[2]}-${R[1]}-${R[0]}`}catch{return S}};return d.map((S,R,Y)=>({hub:S,date:A(O?.travelInfoDto?.[R]?.date),type:R===0?"source":R===Y.length-1?"to":"transit"}))})(),U=l=>{const d=I[l];return d?d.bagIn&&!d.bagOut?"bag-chip--in":!d.bagIn&&d.bagOut?"bag-chip--out":"ho-badge--blue":"ho-badge--blue"},Ce=(Array.isArray(H)?H:[]).map((l,d)=>{const A=l?.status||l?.process||l?.event||"-",S=(A||"").toUpperCase(),R=l?.premisename||l?.location||"",Y=l?.topremisename||l?.toPremisename||l?.toPremiseName||"",de=`Scheduled Outscan from ${k(R)} to ${k(Y)}`,L=l.lcrnum||l.lcrNum||l.lcr_no||l.lcrNo||"",be=L?`${de} — LCR No: ${L}`:de;return{key:d,time:l?.date||"-",location:l?.premisename||l?.location||"-",toPremisename:l?.topremisename||l?.toPremiseName||"-",process:A,bag:l?.bagBarCode||"-",user:l?.user||"-",exception:l.exception||(l.isException,"-"),remark:S==="SCHEDULED_FOR_TRIP"?be:l?.remarks||"-",coLoader:l?.coloader||"—",transportType:l?.travelby||"—",flightName:l?.flightnum||"N/A",vehicleNo:l?.vehiclenum||"—",driverName:l?.drivername||"—"}}),p=O?.bagShipmentNo||r?.shipmentTracking?.children?.map(l=>l.awbNumber)||[],I=x.useMemo(()=>{const l=O?.bagShipmentDetails||[],d={};return l.forEach(A=>{d[A.barcode]={bagIn:A.bagIn,bagOut:A.bagOut}}),d},[O]),Z=O&&(T||F.length||H.length||p.length);return!m&&!Z?e.jsx(u.Spin,{spinning:m&&!r,indicator:e.jsx("img",{src:pe,style:{height:"100px",width:"100px"}}),children:e.jsxs("div",{className:"bag-details-page",children:[e.jsxs("p",{className:"master-title-head",style:{marginBottom:"5px"},children:[n&&e.jsx("img",{src:et,onClick:G,className:"pointer"}),e.jsx("span",{children:"Bag Details"})]}),e.jsx("div",{className:"bag-empty",children:e.jsxs(u.Card,{className:"ho-card bag-empty__card",children:[e.jsx("div",{className:"ho-section-title bag-empty__title",children:e.jsx("span",{className:"ho-title",children:"Details Not Found"})}),e.jsxs("div",{className:"bag-empty__text",children:["No details found for the provided Bag number:",e.jsxs("strong",{children:[" ",P?.replace(/\+/g,"/")," "]}),e.jsx("br",{}),"Please check the Bag number and try again."]})]})})]})}):e.jsx(u.Spin,{spinning:m&&!r,indicator:e.jsx("img",{src:pe,style:{height:"100px",width:"100px"}}),children:e.jsxs("div",{className:"bag-details-page",children:[e.jsxs("p",{className:"master-title-head",style:{marginBottom:"5px",marginTop:"6px"},children:[n&&e.jsx("img",{src:et,onClick:G,className:"pointer"}),e.jsx("span",{children:"Bag Details"})]}),e.jsxs(u.Row,{gutter:[16,16],children:[e.jsx(u.Col,{xs:24,lg:12,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-subheader__value",children:[e.jsxs("span",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-muted",children:"Bag number"}),e.jsx("span",{className:"ho-strong",children:le})]}),e.jsx(u.Tag,{className:"ho-badge ho-badge--blue",children:"Bag Created"})]}),e.jsx("div",{className:"ho-chip",children:e.jsxs("span",{className:"ho-chip__value",style:{display:"flex",gap:6,whiteSpace:"nowrap"},children:[e.jsx("span",{style:{color:"#344054"},children:"Bag Created:"}),e.jsx("span",{children:ce?bt(ce):"—"})]})})]}),e.jsx("div",{className:"ho-box ho-box--flush",children:e.jsxs("div",{className:"ho-stats",children:[e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Content Type"}),e.jsx("div",{className:"ho-stat__value",children:k(T?.contentType||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Type"}),e.jsx("div",{className:"ho-stat__value",children:k(T?.bagType||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Mode"}),e.jsx("div",{className:"ho-stat__value",children:k(T?.mode||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Product"}),e.jsx("div",{className:"ho-stat__value",children:k(T?.product||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:T?.cpId?"Destination CP":"Destination Hub"}),e.jsx("div",{className:"ho-stat__value",children:T?.cpId?k(T?.cpName||"—"):k(T?.destinationHubName||"—")})]})]})}),e.jsx("div",{className:"ho-box",children:e.jsxs("div",{className:"ho-grid",children:[e.jsxs("div",{className:"ho-metric",style:{display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{className:"ho-kv__label",children:[e.jsx("img",{src:xs,className:"ho-kv-icon",alt:""}),"Bag Weight :"]}),e.jsx("span",{className:"ho-kv__value",style:{color:"#027A48",fontWeight:600},children:T?.bagWeight??"—"})]}),e.jsxs("div",{className:"ho-metric",style:{display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{className:"ho-kv__label",children:[e.jsx("img",{src:fs,className:"ho-kv-icon",alt:""}),"Total Volumetric Weight :"]}),e.jsx("span",{className:"ho-kv__value",style:{color:"#027A48",fontWeight:600},children:T?.totalWeight??"—"})]})]})})]})}),e.jsx(u.Col,{xs:24,lg:12,children:e.jsxs(u.Row,{gutter:[16,16],children:[e.jsx(u.Col,{span:24,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Fe,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Bag Route"})]})}),e.jsx("div",{className:`ho-route ${F.length===0?"ho-route--empty":""}`,children:F.length===0?e.jsx("div",{className:"ho-route__empty",children:"Bag Route not available"}):e.jsxs(e.Fragment,{children:[F.slice(0,4).map((l,d)=>e.jsxs("div",{className:`ho-route__row ${l.type==="to"?"ho-route__row--to":""}`,children:[e.jsx("div",{children:d===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--transit",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):l.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",d]})}),e.jsx("div",{className:"ho-route__content",children:e.jsx("span",{className:"ho-route__title",children:k(l.hub)})})]},d)),F.length>4&&e.jsxs("div",{className:"ho-route__more",onClick:()=>D(!0),children:[e.jsx("span",{className:"ho-route__more-text",children:"View More"}),e.jsx("span",{className:"ho-route__more-caret",children:"▾"})]})]})}),e.jsx(u.Modal,{open:M,title:"Bag Route",footer:null,onCancel:()=>D(!1),width:420,children:e.jsx("div",{className:"shipment-route-modal",children:F.map((l,d)=>e.jsxs("div",{className:"shipment-route-item",children:[e.jsxs("div",{className:"shipment-route-timeline",children:[e.jsx("div",{className:`route-dot route-dot--circle ${l.type}`,children:l.type==="source"?e.jsx("img",{src:oe,alt:"Source Hub"}):l.type==="to"?e.jsx("img",{src:re,alt:"To Hub"}):e.jsxs("span",{className:"ho-route__tag--transit",children:["T",d]})}),d!==F.length-1&&e.jsx("div",{className:"route-line"})]}),e.jsx("div",{className:"shipment-route-content ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-route__title",children:k(l.hub)}),l.type==="source"&&e.jsx("span",{className:"route-badge route-badge--source",children:"Source Hub"}),l.type==="to"&&e.jsx("span",{className:"route-badge route-badge--to",children:"To Hub"})]})})]},d))})})]})}),e.jsx(u.Col,{span:24,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ft,className:"ho-title-icon",alt:""}),e.jsxs("span",{style:{fontFamily:"Roboto",fontWeight:700,fontSize:"20px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:["Shipments ",p.length>0&&`(${p.length})`]})]}),p.length>0&&e.jsxs("div",{className:"ho-inline",children:[e.jsx("span",{className:"ho-chip bag-chip bag-chip--in",children:"Bag In"}),e.jsx("span",{className:"ho-chip bag-chip bag-chip--out",children:"Bag Out"})]})]}),e.jsx("div",{className:"ho-inline",style:{flexWrap:"wrap",gap:8,width:"100%",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"40px"},children:p.length===0?e.jsx("div",{style:{textAlign:"center",color:"#667085",fontSize:"14px",fontWeight:400},children:"Shipment not available"}):e.jsxs(e.Fragment,{children:[p.slice(0,5).map((l,d)=>e.jsx(u.Tag,{className:`ho-badge pointer ${U(l)}`,style:{marginBottom:8,textDecoration:"underline"},onClick:()=>a(`/shipment-tracker?awb=${l}`),children:l},d)),p.length>5&&e.jsx("span",{onClick:()=>$(!0),style:{cursor:"pointer",color:"#0066CC",textDecoration:"underline",marginLeft:10,fontWeight:600},children:"View More ▾"})]})})]})}),e.jsx(u.Modal,{open:X,title:e.jsxs("div",{style:{fontFamily:"Roboto",fontWeight:700,fontSize:"20px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:["Shipments ",p.length>0&&`(${p.length})`]}),footer:null,onCancel:()=>$(!1),width:450,children:e.jsx("div",{style:{maxHeight:"400px",overflowY:"auto",padding:"10px 5px"},children:p.map((l,d)=>e.jsx(u.Tag,{className:`ho-badge pointer ${U(l)}`,style:{marginBottom:8,display:"inline-block",textDecoration:"underline"},onClick:()=>a(`/shipment-tracker?awb=${l}`),children:l},d))})})]})}),e.jsx(u.Col,{span:24,children:e.jsxs(u.Card,{className:"ho-card",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Ct,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Travel Info"})]})}),e.jsx(u.Table,{className:"ho-table",columns:Cs,dataSource:Ce,rowKey:"key",pagination:!1})]})})]})]})})}exports.BagDetailsUI=bs;exports.ShipmentDetailsUI=ms;
|
|
59
|
+
}`),x.useEffect(()=>{const r=s.current,g=Lt(r);Bt(o,"@ant-design-icons",{prepend:!a,csp:t,attachTo:g})},[])},ie={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Yt({primaryColor:s,secondaryColor:t}){ie.primaryColor=s,ie.secondaryColor=t||dt(s),ie.calculated=!!t}function Vt(){return{...ie}}const J=s=>{const{icon:t,className:n,onClick:a,style:o,primaryColor:r,secondaryColor:g,...m}=s,h=E.useRef(null);let j=ie;if(r&&(j={primaryColor:r,secondaryColor:g||dt(r)}),Zt(h),Gt(Ke(t),`icon should be icon definiton, but got ${t}`),!Ke(t))return null;let C=t;return C&&typeof C.icon=="function"&&(C={...C,icon:C.icon(j.primaryColor,j.secondaryColor)}),De(C.icon,`svg-${C.name}`,{className:n,onClick:a,style:o,"data-icon":C.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...m,ref:h})};J.displayName="IconReact";J.getTwoToneColors=Vt;J.setTwoToneColors=Yt;function ut(s){const[t,n]=ht(s);return J.setTwoToneColors({primaryColor:t,secondaryColor:n})}function Kt(){const s=J.getTwoToneColors();return s.calculated?[s.primaryColor,s.secondaryColor]:s.primaryColor}var Jt={};function Re(){return Re=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Re.apply(this,arguments)}ut(Ie.primary);const q=E.forwardRef((s,t)=>{const{className:n,icon:a,spin:o,rotate:r,tabIndex:g,onClick:m,twoToneColor:h,...j}=s,{prefixCls:C="anticon",rootClassName:M}=E.useContext(tt),D=yt(M,C,{[`${C}-${a.name}`]:!!a.name,[`${C}-spin`]:!!o||a.name==="loading"},n);let _=g;_===void 0&&m&&(_=-1);const X=r?{msTransform:`rotate(${r}deg)`,transform:`rotate(${r}deg)`}:void 0,[$,G]=ht(h);return E.createElement("span",Re({role:"img","aria-label":a.name},j,{ref:t,tabIndex:_,onClick:m,className:D}),E.createElement(J,{icon:a,primaryColor:$,secondaryColor:G,style:X}))});q.getTwoToneColor=Kt;q.setTwoToneColor=ut;Jt.NODE_ENV!=="production"&&(q.displayName="AntdIcon");var Xt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},$t={};function Ee(){return Ee=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Ee.apply(this,arguments)}const es=(s,t)=>E.createElement(q,Ee({},s,{ref:t,icon:Xt})),gt=E.forwardRef(es);$t.NODE_ENV!=="production"&&(gt.displayName="ArrowLeftOutlined");var ts={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},ss={};function _e(){return _e=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},_e.apply(this,arguments)}const ns=(s,t)=>E.createElement(q,_e({},s,{ref:t,icon:ts})),pt=E.forwardRef(ns);ss.NODE_ENV!=="production"&&(pt.displayName="CalendarOutlined");var as={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},is={};function Oe(){return Oe=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Oe.apply(this,arguments)}const os=(s,t)=>E.createElement(q,Oe({},s,{ref:t,icon:as})),mt=E.forwardRef(os);is.NODE_ENV!=="production"&&(mt.displayName="FileTextOutlined");var rs={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},ls={};function Be(){return Be=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(s[a]=n[a])}return s},Be.apply(this,arguments)}const cs=(s,t)=>E.createElement(q,Be({},s,{ref:t,icon:rs})),xt=E.forwardRef(cs);ls.NODE_ENV!=="production"&&(xt.displayName="UserOutlined");const Fe="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%202C20.1647%202%2022%203.81484%2022%206.01659C22%208.25341%2020.1348%209.82312%2018.412%2010.8905C18.2864%2010.9623%2018.1445%2011%2018%2011C17.8555%2011%2017.7136%2010.9623%2017.588%2010.8905C15.8684%209.8127%2014%208.26115%2014%206.01659C14%203.81484%2015.8353%202%2018%202Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M18%206H18.009'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5%2022C6.65685%2022%208%2020.6569%208%2019C8%2017.3431%206.65685%2016%205%2016C3.34315%2016%202%2017.3431%202%2019C2%2020.6569%203.34315%2022%205%2022Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%207H9.5C7.567%207%206%208.34315%206%2010C6%2011.6569%207.567%2013%209.5%2013H12.5C14.433%2013%2016%2014.3431%2016%2016C16%2017.6569%2014.433%2019%2012.5%2019H11'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",oe="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1667%2016.6668C15.0871%2016.6668%2015.8333%2015.9206%2015.8333%2015.0002C15.8333%2014.0797%2015.0871%2013.3335%2014.1667%2013.3335C13.2462%2013.3335%2012.5%2014.0797%2012.5%2015.0002C12.5%2015.9206%2013.2462%2016.6668%2014.1667%2016.6668Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M5.83464%2016.6663C6.75511%2016.6663%207.5013%2015.9201%207.5013%2014.9997C7.5013%2014.0792%206.75511%2013.333%205.83464%2013.333C4.91416%2013.333%204.16797%2014.0792%204.16797%2014.9997C4.16797%2015.9201%204.91416%2016.6663%205.83464%2016.6663Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M4.16797%2014.9767C3.25404%2014.9312%202.68389%2014.7952%202.27816%2014.3895C1.87244%2013.9838%201.73649%2013.4136%201.69093%2012.4997M7.5013%2014.9997H12.5013M15.8346%2014.9767C16.7485%2014.9312%2017.3187%2014.7952%2017.7245%2014.3895C18.3346%2013.7793%2018.3346%2012.7972%2018.3346%2010.833V9.16634H14.418C13.7975%209.16634%2013.4873%209.16634%2013.2363%209.08476C12.7289%208.91992%2012.3311%208.52209%2012.1662%208.0147C12.0846%207.76365%2012.0846%207.45343%2012.0846%206.83301C12.0846%205.90237%2012.0846%205.43705%2011.9623%205.06047C11.715%204.29937%2011.1183%203.70266%2010.3572%203.45537C9.98063%203.33301%209.5153%203.33301%208.58463%203.33301H1.66797'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66797%206.66699H6.66797'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M1.66797%209.16699H5.0013'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.082%205H13.5997C14.8125%205%2015.4189%205%2015.9124%205.29476C16.4059%205.58952%2016.6934%206.12343%2017.2684%207.19125L18.332%209.16667'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",re="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='32'%20height='32'%20rx='16'%20fill='%23F8FAFC'/%3e%3cpath%20d='M23.5%2011.8335V16.0002M8.5%2011.8335C8.5%2014.3872%208.5%2019.9787%208.5%2020.3012C8.5%2021.4533%2010.1214%2022.1382%2013.3641%2023.5081C14.6668%2024.0583%2015.3182%2024.3335%2016%2024.3335V15.4625'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.5%2021.8333C18.5%2021.8333%2019.2292%2021.8333%2019.9583%2023.5C19.9583%2023.5%2022.2745%2019.3333%2024.3333%2018.5'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.9383%2014.076L10.5039%2012.898C9.16797%2012.2516%208.5%2011.9284%208.5%2011.4165C8.5%2010.9046%209.16797%2010.5814%2010.5039%209.93496L12.9383%208.75702C14.4407%208.03001%2015.1919%207.6665%2016%207.6665C16.8081%207.6665%2017.5593%208.03%2019.0617%208.75702L21.4961%209.93496C22.832%2010.5814%2023.5%2010.9046%2023.5%2011.4165C23.5%2011.9284%2022.832%2012.2516%2021.4961%2012.898L19.0617%2014.076C17.5593%2014.803%2016.8081%2015.1665%2016%2015.1665C15.1919%2015.1665%2014.4407%2014.803%2012.9383%2014.076Z'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11%2016L12.6667%2016.8333'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M20.1654%209.33301L11.832%2013.4997'%20stroke='%23003371'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ft="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17%2021C18.1046%2021%2019%2020.1046%2019%2019C19%2017.8954%2018.1046%2017%2017%2017C15.8954%2017%2015%2017.8954%2015%2019C15%2020.1046%2015.8954%2021%2017%2021Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M7%2021C8.10457%2021%209%2020.1046%209%2019C9%2017.8954%208.10457%2017%207%2017C5.89543%2017%205%2017.8954%205%2019C5%2020.1046%205.89543%2021%207%2021Z'%20stroke='%23003371'%20stroke-width='1.5'/%3e%3cpath%20d='M2%209V13.947C2%2016.329%202%2017.52%202.73223%2018.26C3.2191%2018.7521%203.90328%2018.9169%205%2018.9722M12.4271%205C13.3404%205.2999%2014.0564%206.02354%2014.3532%206.94654C14.5%207.40322%2014.5%207.96753%2014.5%209.09613C14.5%209.84853%2014.5%2010.2248%2014.5979%2010.5292C14.7957%2011.1445%2015.2731%2011.627%2015.882%2011.8269C16.1832%2011.9258%2016.5555%2011.9258%2017.3%2011.9258H22V13.947C22%2016.329%2022%2017.52%2021.2678%2018.26C20.7809%2018.7521%2020.0967%2018.9169%2019%2018.9722M9%2019H15'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14.5%207H16.3212C17.7766%207%2018.5042%207%2019.0964%207.35371C19.6886%207.70742%2020.0336%208.34812%2020.7236%209.6295L22%2012'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.32653%208L8.81309%206.82583C9.60436%206.20083%2010%205.88833%2010%205.5M10%205.5C10%205.11168%209.60436%204.79918%208.81309%204.17418L7.32653%203M10%205.5H2'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ct="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2022H6C4.11438%2022%203.17157%2022%202.58579%2021.4142C2%2020.8284%202%2019.8856%202%2018V16C2%2014.1144%202%2013.1716%202.58579%2012.5858C3.17157%2012%204.11438%2012%206%2012H8C9.88562%2012%2010.8284%2012%2011.4142%2012.5858C12%2013.1716%2012%2014.1144%2012%2016V18C12%2019.8856%2012%2020.8284%2011.4142%2021.4142C10.8284%2022%209.88562%2022%208%2022Z'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6%2015H8'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18%202C15.7909%202%2014%203.80892%2014%206.04033C14%207.31626%2014.5%208.30834%2015.5%209.1945C16.2049%209.81911%2017.0588%2010.8566%2017.5714%2011.6975C17.8173%2012.1008%2018.165%2012.1008%2018.4286%2011.6975C18.9672%2010.8733%2019.7951%209.81911%2020.5%209.1945C21.5%208.30834%2022%207.31626%2022%206.04033C22%203.80892%2020.2091%202%2018%202Z'%20stroke='%23003371'%20stroke-width='2'%20stroke-linejoin='round'/%3e%3cpath%20d='M18%2015V18C18%2019.8856%2018%2020.8284%2017.5314%2021.4142C17.0839%2021.9735%2016.3761%2021.9988%2015%2021.9999'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M18.007%206H17.998'%20stroke='%23003371'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Xe="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.875%207.9165C11.875%206.60483%2010.8117%205.5415%209.5%205.5415C8.18829%205.5415%207.125%206.60483%207.125%207.9165C7.125%209.22822%208.18829%2010.2915%209.5%2010.2915C10.8117%2010.2915%2011.875%209.22822%2011.875%207.9165Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13.4577%2014.2503C13.4577%2012.0642%2011.6855%2010.292%209.49935%2010.292C7.31322%2010.292%205.54102%2012.0642%205.54102%2014.2503'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.625%2010.2917V8.70833C16.625%205.72277%2016.625%204.22999%2015.6975%203.30249C14.77%202.375%2013.2772%202.375%2010.2917%202.375H8.70833C5.72277%202.375%204.22999%202.375%203.30249%203.30249C2.375%204.22999%202.375%205.72277%202.375%208.70833V10.2917C2.375%2013.2772%202.375%2014.77%203.30249%2015.6975C4.22999%2016.625%205.72277%2016.625%208.70833%2016.625H10.2917C13.2772%2016.625%2014.77%2016.625%2015.6975%2015.6975C16.625%2014.77%2016.625%2013.2772%2016.625%2010.2917Z'%20stroke='%23003371'%20stroke-width='1.5'%20stroke-linecap='square'%20stroke-linejoin='round'/%3e%3c/svg%3e",$e="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.98047%205.9375V10.6875C1.98047%2013.673%201.98047%2015.1659%202.90796%2016.0933C3.83546%2017.0208%205.32824%2017.0208%208.3138%2017.0208H9.5013M17.0221%209.89583V5.9375'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M3.06433%204.20772L1.98047%205.93783H17.0221L16.0308%204.28564C15.355%203.15924%2015.0171%202.59604%2014.4726%202.28777C13.9281%201.97949%2013.2713%201.97949%2011.9578%201.97949H7.08966C5.8042%201.97949%205.16148%201.97949%204.62474%202.2766C4.088%202.57372%203.74678%203.11839%203.06433%204.20772Z'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9.5%205.93734V1.979'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M7.91797%208.3125H11.0846'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.4805%2015.4372C11.4805%2015.4372%2012.2721%2015.4372%2013.0638%2017.0205C13.0638%2017.0205%2014.7869%2013.0622%2017.0221%2012.2705'%20stroke='%23003371'%20stroke-width='1.1875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",ds="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6673%2010.0002V12.5928C12.6673%2014.076%2012.1769%2014.6668%2010.5933%2014.6668H5.40806C3.92476%2014.6668%203.33398%2014.1764%203.33398%2012.5928V10.0002C3.33398%207.42283%205.42332%205.3335%208.00065%205.3335C10.578%205.3335%2012.6673%207.42283%2012.6673%2010.0002Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.6673%2010.0002C10.6673%208.52743%209.47338%207.3335%208.00065%207.3335C6.52789%207.3335%205.33398%208.52743%205.33398%2010.0002'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M8%2011.3333L8.66667%2010'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.8743%203.3335H5.12439C4.53532%203.3335%204.24079%203.3335%203.98162%203.23214C3.89554%203.19847%203.81319%203.15682%203.73579%203.10782C3.50277%202.96028%203.3394%202.72872%203.01264%202.2656C2.75798%201.90466%202.63066%201.72419%202.67455%201.57663C2.68844%201.52994%202.71294%201.48668%202.74635%201.44986C2.85194%201.3335%203.08148%201.3335%203.54058%201.3335H12.4581C12.9172%201.3335%2013.1467%201.3335%2013.2523%201.44986C13.2857%201.48668%2013.3103%201.52994%2013.3241%201.57663C13.368%201.72419%2013.2407%201.90466%2012.9861%202.2656C12.6593%202.72872%2012.4959%202.96029%2012.2629%203.10782C12.1855%203.15682%2012.1031%203.19847%2012.0171%203.23214C11.7579%203.3335%2011.4634%203.3335%2010.8743%203.3335Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M9.33268%205.3335V3.3335M6.66602%205.3335V3.3335'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e",hs="data:image/svg+xml,%3csvg%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.19033%202.28511C7.10013%201.37531%207.55507%200.9204%208.06253%200.7102C8.73913%200.429933%209.4994%200.429933%2010.1761%200.7102C10.6835%200.9204%2011.1384%201.37531%2012.0482%202.28511C12.958%203.19492%2013.4129%203.64983%2013.6231%204.15729C13.9034%204.83392%2013.9034%205.59417%2013.6231%206.2708C13.4129%206.77827%2012.958%207.2332%2012.0482%208.143L8.143%2012.0482C7.2332%2012.958%206.77827%2013.4129%206.2708%2013.6231C5.59417%2013.9034%204.83392%2013.9034%204.15729%2013.6231C3.64983%2013.4129%203.19492%2012.958%202.28511%2012.0482C1.37531%2011.1384%200.9204%2010.6835%200.7102%2010.1761C0.429933%209.4994%200.429933%208.73913%200.7102%208.06253C0.9204%207.55507%201.37531%207.10013%202.28511%206.19033L6.19033%202.28511Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",us="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2014.6665C7.45453%2014.6665%206.93347%2014.4464%205.89129%2014.0062C3.29709%2012.9103%202%2012.3624%202%2011.4407C2%2011.1826%202%206.7095%202%204.6665M8%2014.6665C8.54547%2014.6665%209.06653%2014.4464%2010.1087%2014.0062C12.7029%2012.9103%2014%2012.3624%2014%2011.4407V4.6665M8%2014.6665V7.5697'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.55061%206.46108L3.60315%205.51873C2.53438%205.00156%202%204.74298%202%204.3335C2%203.92401%202.53438%203.66543%203.60315%203.14826L5.55061%202.20591C6.75253%201.6243%207.35353%201.3335%208%201.3335C8.64647%201.3335%209.24747%201.6243%2010.4494%202.20591L12.3969%203.14826C13.4656%203.66543%2014%203.92401%2014%204.3335C14%204.74298%2013.4656%205.00156%2012.3969%205.51873L10.4494%206.46108C9.24747%207.0427%208.64647%207.3335%208%207.3335C7.35353%207.3335%206.75253%207.0427%205.55061%206.46108Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4%208L5.33333%208.66667'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.3327%202.6665L4.66602%205.99984'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",gs="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.0026%201.33398C11.6845%201.33398%2014.6693%204.31875%2014.6693%208.00064C14.6693%2011.6826%2011.6845%2014.6673%208.0026%2014.6673C4.3207%2014.6673%201.33594%2011.6826%201.33594%208.00064M5.94194%201.65856C5.26927%201.87697%204.6435%202.19942%204.08362%202.60692M2.60889%204.08165C2.20131%204.64164%201.87882%205.26753%201.6604%205.94033'%20stroke='%23175EB6'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8.0026%205.33398V10.6673M10.6693%208.00064H5.33594'%20stroke='%23175EB6'%20stroke-width='1.25'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";var ps={};function ve(s){if(!s||s==="-"||s==="—")return"--";const t=new Date(s);return isNaN(t.getTime())?"--":t.toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})}function b(s){return s==null?s:String(s).replace(/[_-]+/g," ").replace(/\s+/g," ").trim().toLowerCase().replace(/\b\w/g,n=>n.toUpperCase())}function ae({label:s,value:t}){return e.jsxs("div",{className:"ho-kv",children:[e.jsx("span",{className:"ho-kv__label",children:s}),e.jsx("span",{className:"ho-kv__value",children:t})]})}function z(s){if(!s)return"—";const t=new Date(s);if(isNaN(t.getTime()))return"—";const n=a=>String(a).padStart(2,"0");return n(t.getDate())+"-"+n(t.getMonth()+1)+"-"+t.getFullYear()+" "+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())}function ke({icon:s,label:t,value:n,isAudit:a=!1}){return e.jsxs("div",{className:"ho-kv ho-kv--withTag",children:[e.jsxs("span",{className:"ho-kv__label_audit",style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"14px",fontWeight:500,fontFamily:"Roboto"},children:[s&&e.jsx("img",{src:s,alt:"",className:"ho-kv__icon"}),t]}),e.jsx("span",{className:a?"ho-kv__tag_audit":"ho-kv__tag",children:n})]})}function ms({endpoint:s,awbNumber:t}){const[n,a]=x.useState(!1),[o,r]=x.useState(!1),[g,m]=x.useState(null),[h,j]=x.useState(null),[C,M]=x.useState(!1),D=ge.useLocation(),_=ge.useNavigate(),[X,$]=x.useState(!1),[G,xe]=x.useState(!1),[fe,ee]=x.useState(!1),[P,O]=x.useState(!1),T=x.useRef(null),[H,le]=x.useState(!1),ce=new URLSearchParams(D.search).get("endpoint"),F=s||ce||ps.REACT_APP_TRACKING_ENDPOINT||"/api/v1/shipment-tracking/search",U=x.useMemo(()=>{if(t)return t;const i=new URLSearchParams(D.search);return i.get("awb")||i.get("awbNumber")||""},[t,D.search]);x.useEffect(()=>{let i=!1;return(async()=>{try{if(M(!0),!U){i||j(null);return}const N=`${F}?awbNumber=${encodeURIComponent(U)}`,w=await fetch(N);if(!w.ok)throw new Error("Request failed");const f=await w.json();i||j(f)}catch{i||j(null)}finally{i||M(!1)}})(),()=>{i=!0}},[F,U]);const Ce=h?.shipmentTracking?.isRTO===!0,p=h?.shipmentTracking?.bookingInfoDto,I=h?.shipmentTracking?.auditInfo||[],Z=h?.shipmentTracking?.latestOperation,l=h?.shipmentTracking?.supportTicketInfo,d={sourceCity:p?.sourceCity||"—",destinationCity:p?.destinationCity||"—",bookingTime:p?.bookingDate||"—",shipmentNumber:p?.awbNumber||"—",isRTO:Ce,isMCN:p?.mcn,bagId:p?.bagId||"—",fromPincode:p?.fromPincode||"—",senderPincode:p?.senderPincode||"—",receiverPincode:p?.receiverPincode||"—",estimatedDeliveryDate:p?.estimatedDeliveryDate||"—",revisedEstimatedDeliveryDate:p?.revisedEstimatedDeliveryDate||"—",actualDeliveryDate:p?.actualDeliveryDate||"—",sourceHubName:p?.sourceHubName||"—",destinationHubName:p?.destinationHubName||"—",source:{city:p?.senderName||"—",pincode:p?.fromPincode||"—"},destination:{city:p?.receiverName||"—",pincode:p?.receiverPincode||"—"},bookingType:p?.bookingType||"—",shipmentType:p?.shipmentType?`${p.shipmentType?.toUpperCase()} | ${p.travelType?.toUpperCase()}`:"—",serviceType:p?.serviceType||"—",awb:p?.tplAwbNumber||"",partner:p?.partnerCode||"",eway:(()=>{const i=h?.shipmentTracking?.ewayInfo?.[0];return i?{id:i.eway_bill_id,no:i.ewaybill_no,created:i.eway_bill_crt_date,expiry:i.ewb_bill_exp_date}:{id:"—",no:"—",created:"—",expiry:"—"}})(),sender:{name:p?.senderName||"—",address:p?.booking_cp_address||"—"},receiver:{name:p?.receiverName||"—",address:p?.recipient_cp_address||"—"},pkg:{weight:p?.weight&&`${p.weight} Kg`||"—",dimensions:p?.length||p?.width||p?.height?`${p.length} x ${p.width} x ${p.height} cm`:"—",volumetric:p?.volumetricWeight||"—"},status:p?.status||"—",parentAwbNumber:p?.parentAwbNumber||""},A=(()=>{const i=h?.shipmentTracking?.travelDtos||[],c=f=>{if(!f)return"";try{const y=f.split(" ")[0]?.split("-");return y?.length===3?`${y[2]}-${y[1]}-${y[0]}`:f}catch{return f}},N=f=>{const y=(f||"").toLowerCase(),B=i.find(Q=>(Q?.premiseName||"").toLowerCase().includes(y)||y.includes((Q?.premiseName||"").toLowerCase())||(Q?.toPremisename||Q?.topremisename||"").toLowerCase().includes(y)||y.includes((Q?.toPremisename||Q?.topremisename||"").toLowerCase()))||null;return c(B?.date)},w=h?.shipmentTracking?.route_info;return Array.isArray(w)&&w.length?w.map((f,y,B)=>({hub:f,date:N(f),type:y===0?"source":y===B.length-1?"to":"transit"})):[]})();x.useEffect(()=>{if(!T.current||A.length<=5){le(!1);return}const i=T.current,c=()=>{const N=Array.from(i.querySelectorAll(".ho-route__row"));if(N.length===0)return!1;let w=0;return N.forEach(f=>{w+=f.offsetHeight+24}),w>i.clientHeight};requestAnimationFrame(()=>{const N=c();le(N)})},[A.length]),x.useMemo(()=>A.find(c=>c.type==="source")?.hub||"—",[A,d.source.city]),x.useMemo(()=>A.find(c=>c.type==="to")?.hub||"—",[A,d.destination.city]);const S=h?.shipmentTracking?.travelDtos?.map((i,c)=>({key:c,time:i.date,location:(i.status||"").toUpperCase()==="RETURN_INITIATED"&&i.driverName&&i.driverName.trim()!==""?i.toPremisename||i.toPremiseName||"—":["FORCE_BAG_ATTEMPTED","RETURN_INITIATED","RETURN_REVOKED","IN_BAG_OUTSCAN_TO_CP","OUT_SCAN_TO_CP","BAGGED","INSCANNED","IN-BAG-OUTSCAN","IN-BAG-INSCAN","INSCANNED_AT_TRANSIT","ATTEMPTED","HUB-OUTSCAN","HUB-IN-SCANNED","REMOVED_FROM_BAG","SCHEDULED_FOR_TRIP","FORCE_BAG","MIS_ROUTED","REROUTED","PINCODE_AUDITED","FORCE_HUB_OUTSCAN","EXCESS_INSCAN","MODE_AUDITED","REMOVED_FROM_LCR","OUT_SCAN_TO_3PL"].includes((i.status||"").toUpperCase())?i.premiseName||"—":i.toPremisename||i.toPremiseName||"—",locationPremiseName:["IN_BAG_OUTSCAN_TO_CP","OUT_SCAN_TO_CP"].includes((i.status||"").toUpperCase())?i.toPremisename||i.toPremiseName:"-",process:i.status,bag:i.bagBarCode,user:(i.status||"").toUpperCase()==="RETURN_INITIATED"&&i.driverName?.trim()||["ATTEMPTED","OUT_FOR_DELIVERY","DELIVERED","RTO_OUT_FOR_DELIVERY","RETURN_REVOKED","RTO_DELIVERED","INSCANNED_AT_CP","UNDELIVERED"].includes((i.status||"").toUpperCase())&&i.driverName?.trim()?i.driverName:i.user?.trim()||"_",exception:i.exception||(i.isException,"-"),remark:(()=>{const N=(i.status||"").toString().toUpperCase();if(!["SCHEDULED_FOR_TRIP","IN-BAG-OUTSCAN"].includes(N))return i.remarks||"-";const f=i.lcrnum||i.lcrNum||i.lcr_no||i.lcrNo||"",B=`${N==="SCHEDULED_FOR_TRIP"?"Scheduled Outscan":"Outscan"} from ${b(i.premiseName||"")} to ${b(i.toPremisename||i.topremisename||"")}`;return f?`${B} — LCR No: ${f}`:B})(),coLoader:i.coLoader||i.co_loader||i.coLoaderName||i.co_loader_name||i.coLoader_code||"—",transportType:i.travelBy||i.transportType||i.transport_type||i.mode||"—",flightName:i.flightName||i.flight_no||i.flight||i.flightNum||"",vehicleNo:i.vehicleNo||i.vehicleNum||i.vehicle_no||i.truckNo||i.truck_no||"—",driverName:i.driverName||i.driver_name||"—"}))||[],R=x.useMemo(()=>[{title:"Date and Time",dataIndex:"time",key:"time",render:i=>e.jsx("span",{className:"ho-nowrap",children:z(i)})},{title:"Location",dataIndex:"location",key:"location",render:i=>i?b(i):"—"},{title:"Process",dataIndex:"process",key:"process",render:(i,c)=>{const N=(i||"").toString().toUpperCase(),f=["REMOVED_FROM_BAG","REMOVED_FROM_LCR","ATTEMPTED","MIS_ROUTED","UNDELIVERED"].includes(N),y=f?{color:"#e14949",borderColor:"#ffd5d5",background:"#ffecec"}:{color:"#1f7a48",borderColor:"#cfeede",background:"#e9fff1"},B=`ho-tag ${f?"ho-tag--danger":"ho-tag--success"}`,je=N==="OUT_SCAN_TO_CP"||N==="IN_BAG_OUTSCAN_TO_CP"?`${i} (${b(c?.locationPremiseName||"")})`:i;return e.jsx(u.Tag,{style:y,className:B,children:je})}},{title:"Bag No",dataIndex:"bag",key:"bag",render:i=>i?e.jsx("a",{className:"ho-link",onClick:()=>_(`/bag-details-ui?awb=${encodeURIComponent(i)}`),children:i}):"-"},{title:"User",dataIndex:"user",key:"user"},{title:"Exception",dataIndex:"exception",key:"exception",render:i=>i||"-"},{title:"Remark",dataIndex:"remark",key:"remark",render:(i,c)=>{if(!i)return"-";if((c?.process||"").toUpperCase()==="MIS_ROUTED"){const V=String(i),W=V.length>40?`${V.slice(0,40)}…`:V;return e.jsx(u.Tooltip,{title:V,children:e.jsx("span",{className:"ho-remark-ellipsis",children:W})})}const w=["SCHEDULED_FOR_TRIP","IN-BAG-OUTSCAN"].includes((c?.process||c?.status||"").toString().toUpperCase()),f=i.indexOf("LCR No:"),y=f>=0,B=y?i.slice(0,f):i,Q=y?i.slice(f):"",he=y?(Q.replace(/^[^:]*:\s*/i,"")||"").trim():"",je=V=>{const W=[],te=String(V||""),Qe=/(https?:\/\/[^\s]+|www\.[^\s]+)/gi;let se=0,Ne,Ae=0;for(;(Ne=Qe.exec(te))!==null;){const ze=Ne.index,jt=Qe.lastIndex;ze>se&&W.push(e.jsx("span",{children:te.slice(se,ze)},`rmk-t-${Ae++}`));const ye=Ne[0],Nt=ye.startsWith("http")?ye:`https://${ye}`;W.push(e.jsx("a",{className:"ho-link",href:Nt,target:"_blank",rel:"noreferrer",children:"View"},`rmk-a-${Ae++}`)),se=jt}return se<te.length&&W.push(e.jsx("span",{children:te.slice(se)},`rmk-t-${Ae++}`)),W.length?W:te||"-"};return e.jsxs("span",{children:[je(B),y&&e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"ho-remark-strong",children:"LCR No: "}),he&&e.jsx("a",{className:"ho-link",onClick:()=>{sessionStorage.setItem("LCR_REPORT_RECORD",JSON.stringify({vehicle_lcr_id:he})),window.open(window.location.origin+"/lcr-report","_blank")},children:he})]}),w&&e.jsx(u.Tooltip,{placement:"top",title:e.jsxs("div",{children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Co-loader:"})," ",b(c.coLoader||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Transport type:"})," ",b(c.transportType||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Flight Name:"})," ",c.flightName||"N/A"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Vehicle No:"})," ",c.vehicleNo||"—"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Driver Name:"})," ",b(c.driverName||"—")]})]}),children:e.jsx("span",{className:"ho-alert-dot"})})]})}}],[_]);x.useMemo(()=>(h?.shipmentTracking?.ewayInfo||[]).map(c=>c?.ewaybill_no).filter(c=>!!c),[h]),x.useMemo(()=>I.length?[{key:"audit-master",label:`Audit (${I.length})`,children:I.map((i,c)=>({key:`audit-${c}`,title:`Audit ${c+1} - ${i.auditType||"WEIGHT"}`,auditData:i}))}]:[],[I]);const Y=x.useRef(!1);x.useEffect(()=>{!Y.current&&I.length>0&&(m("audit-master"),Y.current=!0)},[I]),x.useMemo(()=>{if(g&&g.startsWith("audit-")){const i=parseInt(g.split("-")[1]),c=I[i];if(!c)return null;const N={auditedBy:c.auditMethod||"—",hub:c.auditedHubName||c.sourceHubName||"—",date:d.bookingTime},w={actual:c.bookedWeight??"—",volumetric:c.volumetricBookedValue??"—",lwh:`${c.bookedLength??"—"},${c.bookedWidth??"—"},${c.bookedHeight??"—"}`},f={actual:c.auditedWeight??"—",volumetric:c.volumetricAuditedValue??"—",lwh:`${c.auditedLength??"—"},${c.auditedWidth??"—"},${c.auditedHeight??"—"}`},y=c.weightDiff!=null?`Audited actual weight is ${c.weightDiff>=0?"higher":"lower"} by ${Math.abs(c.weightDiff)}%.`:"";return{header:N,bookingValue:w,auditedValue:f,note:y,index:i+1}}return null},[g,I,d.bookingTime]),x.useMemo(()=>{const i=h?.shipmentTracking?.travelDtos||[];for(let c=i.length-1;c>=0;c--){const N=(i[c]?.status||"").toUpperCase();if(N.includes("IN-BAG-INSCAN"))return"Bag In";if(N.includes("BAGGED"))return"Bagged"}return null},[h]);const de=!!(h?.shipmentTracking&&(h?.shipmentTracking?.bookingInfoDto||Array.isArray(h?.shipmentTracking?.route_info)&&h?.shipmentTracking?.route_info.length||Array.isArray(h?.shipmentTracking?.travelDtos)&&h?.shipmentTracking?.travelDtos.length)),L=!!l,be=()=>{const i=sessionStorage.getItem("token")||localStorage.getItem("token")||"",c=sessionStorage.getItem("email")||localStorage.getItem("email")||"",N=sessionStorage.getItem("userId")||localStorage.getItem("userId")||"",w=sessionStorage.getItem("premiseId")||sessionStorage.getItem("smcs-premise-id")||"",f=new URLSearchParams;f.append("source","HUBOPS"),i&&f.append("token",i),c&&f.append("email",c),N&&f.append("userId",N),w&&f.append("premiseId",w);const B=window.location.hostname.includes("qa")?"https://qasupport.innofulfill.com":"https://support.innofulfill.com";window.open(`${B}?${f.toString()}`,"_blank")};return!C&&!de?e.jsx(u.Spin,{spinning:C&&!h,indicator:e.jsx("img",{src:pe,style:{height:"100px",width:"100px"}}),children:e.jsx("div",{className:"shipment-details-page",children:e.jsx("div",{className:"bag-empty",children:e.jsxs(u.Card,{className:"ho-card bag-empty__card",children:[e.jsx("div",{className:"ho-section-title bag-empty__title",children:e.jsx("span",{className:"ho-title",children:"Details Not Found"})}),e.jsxs("div",{className:"bag-empty__text",children:["No details found for the provided AWB number ",U,". Please check the AWB number and try again."]})]})})})}):e.jsx(u.Spin,{spinning:C&&!h,indicator:e.jsx("img",{src:pe,style:{height:"100px",width:"100px"}}),children:e.jsx("div",{className:"shipment-details-page",children:e.jsxs(u.Row,{gutter:[16,16],className:"ho-row-equal",children:[e.jsx(u.Col,{xs:24,lg:10,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",style:{height:"644px"},bodyStyle:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",padding:"12px"},children:[e.jsxs("div",{className:"ho-section-title",style:{marginTop:"10px"},children:[e.jsxs("div",{className:"ho-title-left",children:[d.parentAwbNumber?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",background:"#ECFDF3",padding:"6px 12px",borderRadius:"8px",cursor:"pointer",color:"#027A48",fontWeight:500,fontSize:"14px"},onClick:()=>_(`/shipment-details-ui?awb=${encodeURIComponent(d.parentAwbNumber)}&endpoint=${encodeURIComponent(F)}`),children:[e.jsx(gt,{}),d.parentAwbNumber]}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:Ct,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Shipment Info"})]}),d.bagId!=="—"&&e.jsx(u.Badge,{status:"processing",text:e.jsx("span",{className:"ho-badge-text",children:d.bagId})})]}),e.jsxs("div",{className:"ho-title-right",children:[e.jsxs("div",{className:"ho-chip",children:[e.jsx("span",{className:"ho-chip__label",children:"Booked At:"}),e.jsx("span",{className:"ho-chip__value",children:z(d.bookingTime)})]}),e.jsxs("div",{className:"ho-chip ho-chip--ticket",onClick:be,style:{cursor:"pointer"},children:[e.jsx("img",{src:gs,alt:""}),e.jsx("span",{className:"ho-chip__label",children:"Raise Ticket"})]})]})]}),e.jsxs("div",{className:"ho-scrollable-content",children:[e.jsx("div",{className:"ho-subheader",children:e.jsx("div",{className:"ho-subheader-left-row",style:{width:"100%"},children:(()=>{const i=Z&&e.jsx(u.Tag,{className:"ho-badge",style:{...Z?.replace(/_/g," ")?.toUpperCase()==="DELIVERED"?{background:"#e9fff1",color:"#027A48",border:"1px solid #cfeede",fontWeight:600,fontFamily:"Roboto"}:Z?.replace(/_/g," ")?.toUpperCase()==="UNDELIVERED"?{background:"#ffecec",color:"#d64545",border:"1px solid #ffd5d5",fontWeight:600,fontFamily:"Roboto"}:{},flexShrink:0},children:Z?.replace(/_/g," ")?.toUpperCase()}),c=e.jsx(u.Tag,{className:"ho-badge",style:{...d.isRTO?{background:"#e3250b",color:"#f7f3f2",border:"1px solid #cfeede",fontWeight:600,fontFamily:"Roboto"}:d.status.toUpperCase()==="UNDELIVERED"?{background:"#ffecec",color:"#d64545",border:"1px solid #ffd5d5",fontWeight:600,fontFamily:"Roboto"}:{},flexShrink:0},children:d.isRTO?"RETURN":"FORWARD"}),N=d.isMCN?e.jsx(u.Tag,{color:"#FFD32C",className:"ho-chip",style:{color:"#FFFFFF",fontWeight:600,flexShrink:0},children:"3PL"}):null,w=d?.shipmentType&&d.shipmentType!=="—"?e.jsx(u.Tag,{color:"#E9F2FF",className:"ho-chip",style:{flexShrink:0,marginLeft:"auto"},children:b(d.shipmentType)}):null,f={display:"flex",alignItems:"center",flexWrap:"nowrap",whiteSpace:"nowrap",width:"100%",gap:"1px"};return d.parentAwbNumber?e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"100%"},children:[e.jsx("span",{style:{fontSize:"16px",color:"#667085",fontWeight:400},children:"Child Shipment number"}),e.jsxs("div",{style:f,children:[e.jsx("span",{className:"ho-eway-value-bold",style:{fontSize:"18px",flex:"0 0 auto",marginRight:"8px"},children:d.shipmentNumber}),i,c,N,w]})]}):e.jsxs("div",{style:f,children:[e.jsx("span",{className:"ho-eway-value-bold",style:{flex:"0 0 auto",marginRight:"8px"},children:d.shipmentNumber}),i,c,N,w]})})()})}),e.jsxs("div",{className:"ho-subheader__route",children:[e.jsxs("span",{className:"ho-kv-stack ho-route-dest",children:[e.jsx("span",{className:"ho-stat__label",children:"Source"}),e.jsx("span",{className:"ho-stat__value",children:b(d.sourceHubName)+" ,"+b(d.sourceCity)})]}),e.jsxs("span",{className:"ho-kv-stack ho-route-dest",children:[e.jsx("span",{className:"ho-stat__label",children:"Destination"}),e.jsx("span",{className:"ho-stat__value",children:b(d.destinationHubName)+" ,"+b(d.destinationCity)})]})]}),e.jsxs("div",{style:{marginTop:"16px",padding:"16px",background:"#F8F9FA",borderRadius:"12px",display:"flex",alignItems:"center",gap:"10px",flexWrap:"wrap"},children:[e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx(u.Tag,{color:"#DFF5E1",style:{padding:"4px 12px",borderRadius:"8px",color:"#0F8A41",fontWeight:600},children:"● Planned EDD"}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:ve(d.estimatedDeliveryDate)})]}),e.jsx("div",{style:{height:"40px",width:"1px",background:"#DDD"}}),e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx(u.Tag,{color:"#FFE8D6",style:{padding:"4px 12px",borderRadius:"8px",color:"#D96A1B",fontWeight:600},children:"● Revised EDD"}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:ve(d.revisedEstimatedDeliveryDate)})]}),e.jsx("div",{style:{height:"40px",width:"1px",background:"#DDD"}}),e.jsxs("div",{style:{textAlign:"center"},children:[e.jsx(u.Tag,{color:"#E8F2FF",style:{padding:"4px 12px",borderRadius:"8px",color:"#1A6FDB",fontWeight:600},children:"● Delivered Date"}),e.jsx("div",{style:{marginTop:"6px",fontSize:"14px",color:"#555"},children:ve(d.actualDeliveryDate)})]})]}),e.jsx("div",{style:{height:"10px"}}),e.jsx("div",{className:"ho-box ho-box--flush",children:e.jsxs("div",{className:"ho-stats",children:[e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Booking Type"}),e.jsx("div",{className:"ho-stat__value",children:b(d.bookingType)})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Service Type"}),e.jsx("div",{className:"ho-stat__value",children:b(d.serviceType)})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"From PinCode"}),e.jsx("div",{className:"ho-stat__value",children:`${d.fromPincode}`})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"To PinCode"}),e.jsx("div",{className:"ho-stat__value",children:`${d.receiverPincode}`})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"3PL / Partner"}),e.jsx("div",{className:"ho-stat__value",children:`${d.awb?b(d.awb):" "} — ${d.partner?b(d.partner):" "}`})]})]})}),h?.shipmentTracking?.childInfoDto&&h?.shipmentTracking?.childInfoDto.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ho-box ho-box--flush",style:{paddingTop:"0px"},children:[e.jsxs("div",{className:"ho-subtitle ho-subtitle--primary",style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"4px",marginBottom:"0px"},children:[e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:$e,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Child Shipment Info"})]}),e.jsxs(u.Tag,{color:"#F0F9FF",className:"ho-chip",style:{display:"flex",cursor:"pointer",alignItems:"center",gap:"4px",paddingTop:"0px"},onClick:()=>O(!0),children:[h?.shipmentTracking?.childInfoDto.length+" Child Shipments",e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(180deg)"},children:e.jsx("path",{d:"M14.9987 6.00071H3.13972L6.76939 1.64111C6.93912 1.43691 7.02077 1.17365 6.99639 0.909247C6.97202 0.644844 6.8436 0.400955 6.63941 0.231232C6.43521 0.0615082 6.17195 -0.0201464 5.90755 0.00423112C5.64314 0.0286087 5.39925 0.157022 5.22953 0.36122L0.229979 6.36068C0.196343 6.4084 0.166264 6.45853 0.139987 6.51067C0.139987 6.56066 0.139988 6.59066 0.0699939 6.64066C0.0246714 6.75531 0.000941037 6.87735 0 7.00063C0.000941037 7.1239 0.0246714 7.24594 0.0699939 7.36059C0.0699939 7.41059 0.0699936 7.44059 0.139987 7.49058C0.166264 7.54272 0.196343 7.59285 0.229979 7.64057L5.22953 13.64C5.32354 13.7529 5.44127 13.8437 5.57435 13.9059C5.70742 13.9681 5.85256 14.0002 5.99946 14C6.23309 14.0005 6.45951 13.9191 6.63941 13.77C6.74065 13.6861 6.82435 13.583 6.88569 13.4666C6.94704 13.3503 6.98483 13.223 6.99691 13.0921C7.00898 12.9611 6.9951 12.829 6.95606 12.7034C6.91702 12.5778 6.85359 12.4612 6.76939 12.3601L3.13972 8.00054H14.9987C15.2638 8.00054 15.5182 7.89519 15.7057 7.70767C15.8932 7.52015 15.9986 7.26582 15.9986 7.00063C15.9986 6.73543 15.8932 6.4811 15.7057 6.29358C15.5182 6.10606 15.2638 6.00071 14.9987 6.00071Z",fill:"#026AA2"})})]})]}),e.jsx("div",{className:"ho-table-responsive-wrapper",children:e.jsxs("table",{className:"ho-eway-table",style:{borderCollapse:"collapse",borderSpacing:"0",marginTop:"0px",width:"100%"},children:[e.jsx("thead",{style:{borderBottom:"none",padding:"0",margin:"0"},children:e.jsxs("tr",{style:{border:"none",padding:"0",margin:"0"},children:[e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0 8px 10px",textAlign:"left"},children:"AWB Number"}),e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0",textAlign:"left"},children:"Current Hub"}),e.jsx("th",{style:{width:"33.33%",border:"none",padding:"8px 0",textAlign:"left"},children:"Status"})]})}),e.jsx("tbody",{style:{padding:"0",margin:"0"},children:(X?h?.shipmentTracking?.childInfoDto:h?.shipmentTracking?.childInfoDto.slice(0,1))?.map((i,c)=>e.jsxs("tr",{style:{padding:"0",margin:"0"},children:[e.jsx("td",{style:{padding:"8px 0 8px 10px",margin:"0"},className:"ho-table-value",children:e.jsx("span",{className:"ho-link-underline",onClick:()=>_(`/shipment-details-ui?awb=${encodeURIComponent(i.awbNumber)}`,{replace:!0,state:{parentAwb:U}}),children:i.awbNumber})}),e.jsx("td",{className:"ho-table-value",style:{padding:"8px 0",margin:"0",paddingRight:"20px"},children:b(i.currentHub||"—")}),e.jsx("td",{className:"ho-table-value",style:{padding:"8px 0",margin:"0"},children:e.jsx(u.Tag,{className:"ho-badge ho-badge--blue ho-table-value",children:b(i.status||"—")})})]},c))})]})})]}),e.jsx("div",{style:{marginBottom:"16px"}})]}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsxs("div",{className:"ho-subtitle ho-subtitle--primary",style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"4px",marginBottom:"0px"},children:[e.jsxs("span",{className:"ho-title-left",style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("img",{src:Xe,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"E-way Bill Info"})]}),h?.shipmentTracking?.ewayInfo?.length>0&&e.jsxs(u.Tag,{color:"#F0F9FF",className:"ho-chip",style:{display:"flex",cursor:"pointer",alignItems:"center",gap:"4px",paddingTop:"0px"},onClick:()=>xe(!0),children:[h?.shipmentTracking?.ewayInfo?.length+" E-way Bills",e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:"rotate(180deg)"},children:e.jsx("path",{d:"M14.9987 6.00071H3.13972L6.76939 1.64111C6.93912 1.43691 7.02077 1.17365 6.99639 0.909247C6.97202 0.644844 6.8436 0.400955 6.63941 0.231232C6.43521 0.0615082 6.17195 -0.0201464 5.90755 0.00423112C5.64314 0.0286087 5.39925 0.157022 5.22953 0.36122L0.229979 6.36068C0.196343 6.4084 0.166264 6.45853 0.139987 6.51067C0.139987 6.56066 0.139988 6.59066 0.0699939 6.64066C0.0246714 6.75531 0.000941037 6.87735 0 7.00063C0.000941037 7.1239 0.0246714 7.24594 0.0699939 7.36059C0.0699939 7.41059 0.0699936 7.44059 0.139987 7.49058C0.166264 7.54272 0.196343 7.59285 0.229979 7.64057L5.22953 13.64C5.32354 13.7529 5.44127 13.8437 5.57435 13.9059C5.70742 13.9681 5.85256 14.0002 5.99946 14C6.23309 14.0005 6.45951 13.9191 6.63941 13.77C6.74065 13.6861 6.82435 13.583 6.88569 13.4666C6.94704 13.3503 6.98483 13.223 6.99691 13.0921C7.00898 12.9611 6.9951 12.829 6.95606 12.7034C6.91702 12.5778 6.85359 12.4612 6.76939 12.3601L3.13972 8.00054H14.9987C15.2638 8.00054 15.5182 7.89519 15.7057 7.70767C15.8932 7.52015 15.9986 7.26582 15.9986 7.00063C15.9986 6.73543 15.8932 6.4811 15.7057 6.29358C15.5182 6.10606 15.2638 6.00071 14.9987 6.00071Z",fill:"#026AA2"})})]})]}),(!h?.shipmentTracking?.ewayInfo||h?.shipmentTracking?.ewayInfo.length===0)&&e.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"80px",fontFamily:"Roboto",fontSize:"14px",color:"#6B7280",width:"100%"},children:"No E-Way Bill Data Available"}),h?.shipmentTracking?.ewayInfo?.length>0&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"ho-table-responsive-wrapper",children:e.jsxs("table",{className:"ho-eway-table",style:{borderCollapse:"collapse",width:"100%"},children:[e.jsx("thead",{style:{borderBottom:"none"},children:e.jsxs("tr",{style:{border:"none"},children:[e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0 8px 10px"},children:"E-Way Bill No"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Created"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Updated"}),e.jsx("th",{style:{borderBottom:"none",borderTop:"none",padding:"8px 0"},children:"Expiry Date"})]})}),e.jsx("tbody",{children:h?.shipmentTracking?.ewayInfo?.slice(0,1)?.map((i,c)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-stat__value",style:{padding:"8px 0 8px 10px"},children:i.ewaybill_no||"—"}),e.jsx("td",{className:"ho-stat__value",children:z(i.eway_bill_crt_date)||"—"}),e.jsx("td",{className:"ho-stat__value",children:z(i.update_date||"-")}),e.jsx("td",{className:"ho-stat__value",children:z(i.ewb_bill_exp_date)||"—"})]},c))})]})})})]}),e.jsx(u.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",color:"#003371"},children:"Child Shipments"}),open:P,footer:null,onCancel:()=>O(!1),width:800,children:e.jsxs("table",{className:"ho-eway-table",style:{width:"100%"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"AWB Number"}),e.jsx("th",{children:"Current Hub"}),e.jsx("th",{children:"Status"})]})}),e.jsx("tbody",{children:h?.shipmentTracking?.childInfoDto?.map((i,c)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-table-value",children:e.jsx("span",{className:"ho-link-underline",onClick:()=>{_(`/shipment-details-ui?awb=${encodeURIComponent(i.awbNumber)}`,{replace:!0,state:{parentAwb:U}}),O(!1)},style:{cursor:"pointer"},children:i.awbNumber})}),e.jsx("td",{className:"ho-table-value",children:b(i.currentHub||"—")}),e.jsx("td",{className:"ho-table-value",children:e.jsx(u.Tag,{className:"ho-badge ho-badge--blue",children:b(i.status||"—")})})]},c))})]})}),e.jsx(u.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:"Route"}),open:fe,onCancel:()=>ee(!1),footer:null,width:450,children:e.jsx("div",{className:"ho-route",style:{maxHeight:"70vh",overflowY:"auto",paddingRight:"10px"},children:A.length===0?e.jsx("div",{className:"ho-route__empty",children:"Route not available"}):A.map((i,c)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:c===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:""})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",c]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:b(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},c))})}),e.jsx(u.Modal,{title:e.jsx("span",{style:{fontFamily:"Roboto",fontWeight:500,fontSize:"16px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:"E-way Bill Info"}),open:G,footer:null,onCancel:()=>xe(!1),width:900,children:e.jsxs("table",{className:"ho-eway-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"E-Way Bill No"}),e.jsx("th",{children:"Created"}),e.jsx("th",{children:"Updated"}),e.jsx("th",{children:"Expiry Date"})]})}),e.jsx("tbody",{children:h?.shipmentTracking?.ewayInfo?.map((i,c)=>e.jsxs("tr",{children:[e.jsx("td",{className:"ho-stat__value",children:i.ewaybill_no||"—"}),e.jsx("td",{className:"ho-stat__value",children:z(i.eway_bill_crt_date)||"—"}),e.jsx("td",{className:"ho-stat__value",children:z(i.update_date||"-")}),e.jsx("td",{className:"ho-stat__value",children:z(i.ewb_bill_exp_date)||"—"})]},c))})]})}),e.jsxs("div",{className:"ho-grid ho-grid--2",children:[e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle ho-subtitle--primary",children:e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:Xe,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Sender / Receiver Info"})]})}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ae,{label:"S - Name :",value:b(d.sender.name)}),e.jsx(ae,{label:"R - Name :",value:b(d.receiver.name)})]})]}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle ho-subtitle--primary",children:e.jsxs("span",{className:"ho-title-left",children:[e.jsx("img",{src:$e,className:"ho-title-icon",alt:""}),e.jsx("span",{children:"Package Information"})]})}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ae,{label:"Weight :",value:d.pkg.weight}),e.jsx(ae,{label:"Dimensions:",value:d.pkg.dimensions}),e.jsx(ae,{label:"Volumetric Wt(Kg) :",value:d.pkg.volumetric})]})]})]})]})]})}),e.jsx(u.Col,{xs:24,lg:14,children:e.jsxs(u.Row,{gutter:[16,16],children:[e.jsx(u.Col,{xs:24,lg:12,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",style:{height:L?"484px":"644px"},children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Fe,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Route"})]})}),e.jsx("div",{ref:T,className:`ho-route ${A.length===0?"ho-route--empty":""}`,style:A.length===0?{display:"flex",alignItems:"center",justifyContent:"center",minHeight:L?"400px":"560px",textAlign:"center"}:{maxHeight:L?"420px":"580px",overflow:"hidden",position:"relative"},children:A.length===0?e.jsx("span",{style:{color:"#6B7280",fontSize:"14px",fontFamily:"Roboto"},children:"Route not available"}):e.jsxs(e.Fragment,{children:[H?A.slice(0,5).map((i,c)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:c===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",c]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:b(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},c)):A.map((i,c)=>e.jsxs("div",{className:"ho-route__row",children:[e.jsx("div",{className:`ho-route__node ho-route__node--${i.type}`,children:c===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):i.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",c]})}),e.jsx("div",{className:"ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-table-value",children:b(i.hub)}),i.type==="source"&&e.jsx("span",{className:"ho-pill ho-pill--source",children:"Source Hub"}),i.type==="to"&&e.jsx("span",{className:"ho-pill ho-pill--to",children:"To Hub"})]})})]},c)),H&&e.jsxs("div",{className:"ho-route__more",onClick:()=>ee(!0),children:[e.jsx("span",{className:"ho-route__more-text",children:"View More"}),e.jsx("span",{className:"ho-route__more-caret",children:"▾"})]})]})})]})}),e.jsx(u.Col,{xs:24,lg:12,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",style:{height:L?"484px":"644px"},bodyStyle:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Fe,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Audit Info"})]}),I.length>0&&e.jsxs(u.Tag,{color:"#E9F2FF",className:"ho-chip",children:[I.length," Audit",I.length!==1?"s":""]})]}),e.jsxs("div",{className:"ho-list",style:{flex:1,display:"flex",flexDirection:"column",gap:"12px",overflow:"hidden"},children:[!I.length&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flex:1,height:"auto",textAlign:"center",width:"100%",fontFamily:"Roboto",fontSize:"14px",color:"#6B7280"},children:"No audit info available"}),I.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"ho-list__item",onClick:()=>m(g==="audit-master"?null:"audit-master"),children:[e.jsxs("span",{className:"ho-strong",children:["Weight(",I.length,")"]}),e.jsx("span",{className:`ho-list__chevron ${g==="audit-master"?"ho-open":""}`,children:"▾"})]}),g==="audit-master"&&e.jsx("div",{className:"ho-expand-block",style:{flex:1,overflowY:"auto",maxHeight:"none",display:"flex",flexDirection:"column",gap:"10px"},children:I.map((i,c)=>e.jsxs(u.Card,{className:"ho-subcard ho-mt-10",children:[e.jsxs("div",{className:"ho-grid ho-grid--3",style:{justifyContent:"space-between"},children:[e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Audited By"}),e.jsx(u.Tooltip,{title:b(i.auditMethod||"—"),children:e.jsx("span",{className:"ho-stat__value--audit",style:{maxWidth:"140px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",verticalAlign:"bottom",cursor:"pointer"},children:b(i.auditMethod||"—")})})]}),e.jsxs("div",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-stat__label",children:"Audited Hub"}),e.jsx(u.Tooltip,{title:b(i.auditedHubName||"—"),children:e.jsx("span",{className:"ho-stat__value--audit",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",verticalAlign:"bottom",cursor:"pointer"},children:i.auditedHubName&&i.auditedHubName.length>7?b(i.auditedHubName.substring(0,7))+"...":b(i.auditedHubName||"—")})})]}),e.jsxs("div",{className:"ho-kv-stack",style:{textAlign:"right"},children:[e.jsx("span",{className:"ho-stat__label",children:"Audited Date"}),e.jsx("span",{className:"ho-stat__value--audit",children:i.auditTimestamp?i.auditTimestamp.replace(" "," | "):"—"})]})]}),e.jsx("div",{style:{height:"12px"}}),e.jsxs("div",{className:"ho-box ho-box--flush",children:[e.jsx("div",{className:"ho-subtitle-audit",children:"Audited Value"}),e.jsxs("div",{className:"ho-grid",children:[e.jsx(ke,{label:"Actual",value:i.auditedWeight||"—",isAudit:!0,icon:ds},`ah-${c}`),e.jsx(ke,{label:"Volumetric",value:i.volumetricAuditedValue||"—",isAudit:!0,icon:us},`sh-${c}`),e.jsx(ke,{label:"LWH(cm)",value:i.auditedLength+","+i.auditedWidth+","+i.auditedHeight||"—",icon:hs},`sh-${c}`)]})]}),e.jsxs("div",{className:"ho-note",children:[e.jsx("span",{style:{color:"#000",fontWeight:600},children:"Note:"})," ","Audited actual weight is"," ",i.weightDiff!=null?`${i.weightDiff>=0?"higher":"lower"} by ${Math.abs(i.weightDiff).toFixed(2)} %.`:"—"]})]},`audit-card-${c}`))})]})]})]})}),L&&e.jsx(u.Col,{xs:24,lg:24,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",style:{height:"136px",borderRadius:"24px",width:"100%"},children:[L&&e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:"18px",fontWeight:700,color:"#003371"},children:l?.ticketNumber||"N/A"}),e.jsxs("div",{style:{marginTop:"8px",fontSize:"14px",color:"#344054"},children:[e.jsx("span",{style:{color:"#667085"},children:"Title : "}),e.jsx("span",{style:{fontWeight:600,color:"#003371"},children:l?.title||"—"})]})]}),e.jsxs(u.Tag,{color:"#FFF8EB",style:{color:"#B54708",border:"1px solid #FEDF89",borderRadius:"16px",padding:"4px 12px",fontWeight:600,display:"flex",alignItems:"center",gap:"6px",fontSize:"12px"},children:[e.jsx("span",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#F79009"}}),l?.status?.name||"In Progress"]})]}),L&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{margin:"12px 0",borderBottom:"1px dashed #D0D5DD"}}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"10px",alignItems:"center",color:"#667085",fontSize:"13px"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(xt,{})," Reported By ",b(l?.reportedBy||"—")]}),l?.reportedDate&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#D0D5DD"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(pt,{})," ",l.reportedDate]})]}),e.jsx("div",{style:{width:"4px",height:"4px",borderRadius:"50%",backgroundColor:"#D0D5DD"}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsx(mt,{})," Assigned To ",l?.assignedTo?b(l.assignedTo):"—"]})]})]})]})})]})}),e.jsx(u.Col,{span:24,children:e.jsxs(u.Card,{className:"ho-card",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ft,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Travel Info"})]})}),e.jsx(u.Table,{className:"ho-table",columns:R,dataSource:S,pagination:!1,scroll:{x:1e3}})]})})]})})})}const et="data:image/svg+xml,%3csvg%20width='16'%20height='14'%20viewBox='0%200%2016%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9987%206.00071H3.13972L6.76939%201.64111C6.93912%201.43691%207.02077%201.17365%206.99639%200.909247C6.97202%200.644844%206.8436%200.400955%206.63941%200.231232C6.43521%200.0615082%206.17195%20-0.0201464%205.90755%200.00423112C5.64314%200.0286087%205.39925%200.157022%205.22953%200.36122L0.229979%206.36068C0.196343%206.4084%200.166264%206.45853%200.139987%206.51067C0.139987%206.56066%200.139988%206.59066%200.0699939%206.64066C0.0246714%206.75531%200.000941037%206.87735%200%207.00063C0.000941037%207.1239%200.0246714%207.24594%200.0699939%207.36059C0.0699939%207.41059%200.0699936%207.44059%200.139987%207.49058C0.166264%207.54272%200.196343%207.59285%200.229979%207.64057L5.22953%2013.64C5.32354%2013.7529%205.44127%2013.8437%205.57435%2013.9059C5.70742%2013.9681%205.85256%2014.0002%205.99946%2014C6.23309%2014.0005%206.45951%2013.9191%206.63941%2013.77C6.74065%2013.6861%206.82435%2013.583%206.88569%2013.4666C6.94704%2013.3503%206.98483%2013.223%206.99691%2013.0921C7.00898%2012.9611%206.9951%2012.829%206.95606%2012.7034C6.91702%2012.5778%206.85359%2012.4612%206.76939%2012.3601L3.13972%208.00054H14.9987C15.2638%208.00054%2015.5182%207.89519%2015.7057%207.70767C15.8932%207.52015%2015.9986%207.26582%2015.9986%207.00063C15.9986%206.73543%2015.8932%206.4811%2015.7057%206.29358C15.5182%206.10606%2015.2638%206.00071%2014.9987%206.00071Z'%20fill='%23231F20'/%3e%3c/svg%3e",xs="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6654%209.99967V12.5923C12.6654%2014.0755%2012.175%2014.6663%2010.5913%2014.6663H5.4061C3.92281%2014.6663%203.33203%2014.1759%203.33203%2012.5923V9.99967C3.33203%207.42234%205.42137%205.33301%207.9987%205.33301C10.576%205.33301%2012.6654%207.42234%2012.6654%209.99967Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.6654%209.99967C10.6654%208.52694%209.47143%207.33301%207.9987%207.33301C6.52594%207.33301%205.33203%208.52694%205.33203%209.99967'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M8%2011.3333L8.66667%2010'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.8762%203.33301H5.12634C4.53728%203.33301%204.24274%203.33301%203.98358%203.23165C3.89749%203.19798%203.81514%203.15633%203.73774%203.10733C3.50472%202.95979%203.34135%202.72823%203.0146%202.26511C2.75994%201.90417%202.63261%201.7237%202.6765%201.57614C2.6904%201.52945%202.7149%201.48619%202.7483%201.44937C2.8539%201.33301%203.08344%201.33301%203.54253%201.33301H12.4601C12.9192%201.33301%2013.1487%201.33301%2013.2543%201.44937C13.2877%201.48619%2013.3122%201.52945%2013.3261%201.57614C13.37%201.7237%2013.2426%201.90417%2012.988%202.26511C12.6612%202.72823%2012.4979%202.9598%2012.2648%203.10733C12.1874%203.15633%2012.1051%203.19798%2012.019%203.23165C11.7598%203.33301%2011.4653%203.33301%2010.8762%203.33301Z'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M9.33464%205.33301V3.33301M6.66797%205.33301V3.33301'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e",fs="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.66699%205.33333L8.00033%202.66667L13.3337%205.33333V10.6667L8.00033%2013.3333L2.66699%2010.6667V5.33333Z'%20stroke='%23003371'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M8%206V10'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M10.667%207.33333V9.33333'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3cpath%20d='M5.33301%207.33301V9.33301'%20stroke='%23003371'%20stroke-linecap='round'/%3e%3c/svg%3e";var Me={};function k(s){if(s==null)return"";const t=String(s).replace(/[_-]+/g," ").replace(/\s+/g," ").trim().toLowerCase();return t?t.replace(/\b\w/g,n=>n.toUpperCase()):""}function bt(s){if(!s)return"—";const t=new Date(s);if(isNaN(t.getTime()))return"—";const n=a=>String(a).padStart(2,"0");return n(t.getDate())+"-"+n(t.getMonth()+1)+"-"+t.getFullYear()+" "+n(t.getHours())+":"+n(t.getMinutes())+":"+n(t.getSeconds())}const Cs=[{title:"Date and Time",dataIndex:"time",key:"time",render:s=>e.jsx("span",{className:"ho-nowrap",children:s?bt(s):"—"})},{title:"Location",dataIndex:"location",key:"location",render:s=>s?k(s):"—"},{title:"Process",dataIndex:"process",key:"process",render:(s,t)=>{const n=(s||"").toString().toUpperCase(),o=["REMOVED_FROM_BAG","REMOVED_FROM_LCR","ATTEMPTED","MIS_ROUTED","UNDELIVERED"].includes(n),r=n==="OUT_SCAN_TO_CP"||n==="IN_BAG_OUT_CP",g=t?.toPremisename&&t.toPremisename!=="-"?k(t.toPremisename):"",m=r?`${k(s)} → ${g}`:k(s),h=o?{color:"#e14949",borderColor:"#ffd5d5",background:"#ffecec"}:{color:"#1f7a48",borderColor:"#cfeede",background:"#e9fff1"},j=`ho-tag ${o?"ho-tag--danger":"ho-tag--success"}`;return e.jsx(u.Tag,{style:h,className:j,children:m})}},{title:"User",dataIndex:"user",key:"user"},{title:"Exception",dataIndex:"exception",key:"exception",render:s=>s||"-"},{title:"Remark",dataIndex:"remark",key:"remark",render:(s,t)=>{if(!s)return"-";const n=(t?.process||"").toString().toUpperCase(),a=n.includes("OUTSCAN")&&n!=="HUB-OUTSCAN"||n==="SCHEDULED_FOR_TRIP",o=s.indexOf("LCR No:"),r=o>=0,g=r?s.slice(0,o):s,m=r?s.slice(o):"",h=r?(m.replace(/^[^:]*:\s*/i,"")||"").trim():"";return e.jsxs("span",{children:[g,r?e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:"ho-remark-strong",children:"LCR No: "}),e.jsx("a",{className:"ho-link",onClick:()=>{sessionStorage.setItem("LCR_REPORT_RECORD",JSON.stringify({vehicle_lcr_id:h})),window.open(window.location.origin+"/lcr-report","_blank")},children:h})]}):null,a?e.jsx(u.Tooltip,{placement:"top",title:e.jsxs("div",{children:[e.jsxs("div",{children:[e.jsx("strong",{children:"Co-loader:"})," ",k(t.coLoader||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Transport type:"})," ",k(t.transportType||"—")]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Flight Name:"})," ",t.flightName?k(t.flightName):"N/A"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Vehicle No:"})," ",t.vehicleNo||"—"]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Driver Name:"})," ",k(t.driverName||"—")]})]}),children:e.jsx("span",{className:"ho-alert-dot"})}):null]})}}];function bs({endpoint:s,awbNumber:t,showBackArrow:n=!1}){const a=ge.useNavigate(),o=ge.useLocation(),[r,g]=x.useState(null),[m,h]=x.useState(!1),[j,C]=x.useState(!1),[M,D]=x.useState(!1),_=x.useRef(Me.NODE_ENV==="development"),[X,$]=x.useState(!1),G=()=>{window.history.length<=1?window.close():a(-1)},fe=new URLSearchParams(o.search).get("endpoint"),ee=s||fe||Me.REACT_APP_TRACKING_ENDPOINT,P=x.useMemo(()=>{if(t)return t;const l=new URLSearchParams(o.search);return l.get("awb")||l.get("awbNumber")||""},[t,o.search]);x.useEffect(()=>{let l=!1;return Me.NODE_ENV==="development"&&_.current?(_.current=!1,()=>{l=!0}):((async()=>{try{if(h(!0),!P){g(null);return}const A=`${ee}?awbNumber=${encodeURIComponent(P)}`,S=await fetch(A);if(!S.ok)throw new Error("Request failed");const R=await S.json();l||g(R)}catch{l||g(null)}finally{l||h(!1)}})(),()=>{l=!0})},[ee,P]);const O=r?.baggingTracking,T=O?.baggingInfo,H=O?.travelInfoDto||r?.shipmentTracking?.travelDtos||[],le=T?.bag_barcode||H.find(l=>(l?.bagBarCode||l?.bagbarcode)&&(l?.bagBarCode||l?.bagbarcode)!=="-")?.bagBarCode||"—",ce=x.useMemo(()=>{try{return(H||[]).filter(d=>(d?.status||"").toUpperCase()==="BAG_CREATED").map(d=>d?.date).filter(Boolean).sort()[0]||null}catch{return null}},[H]),F=(()=>{const l=O?.route_info||r?.shipmentTracking?.route_info;if(!l)return[];const d=Array.isArray(l)?l.filter(S=>S&&S!=="null"&&S!==""):[];if(d.length===0)return[];const A=S=>{if(!S)return"";try{const R=S.split(" ")[0].split("-");return`${R[2]}-${R[1]}-${R[0]}`}catch{return S}};return d.map((S,R,Y)=>({hub:S,date:A(O?.travelInfoDto?.[R]?.date),type:R===0?"source":R===Y.length-1?"to":"transit"}))})(),U=l=>{const d=I[l];return d?d.bagIn&&!d.bagOut?"bag-chip--in":!d.bagIn&&d.bagOut?"bag-chip--out":"ho-badge--blue":"ho-badge--blue"},Ce=(Array.isArray(H)?H:[]).map((l,d)=>{const A=l?.status||l?.process||l?.event||"-",S=(A||"").toUpperCase(),R=l?.premisename||l?.location||"",Y=l?.topremisename||l?.toPremisename||l?.toPremiseName||"",de=`Scheduled Outscan from ${k(R)} to ${k(Y)}`,L=l.lcrnum||l.lcrNum||l.lcr_no||l.lcrNo||"",be=L?`${de} — LCR No: ${L}`:de;return{key:d,time:l?.date||"-",location:l?.premisename||l?.location||"-",toPremisename:l?.topremisename||l?.toPremiseName||"-",process:A,bag:l?.bagBarCode||"-",user:l?.user||"-",exception:l.exception||(l.isException,"-"),remark:S==="SCHEDULED_FOR_TRIP"?be:l?.remarks||"-",coLoader:l?.coloader||"—",transportType:l?.travelby||"—",flightName:l?.flightnum||"N/A",vehicleNo:l?.vehiclenum||"—",driverName:l?.drivername||"—"}}),p=O?.bagShipmentNo||r?.shipmentTracking?.children?.map(l=>l.awbNumber)||[],I=x.useMemo(()=>{const l=O?.bagShipmentDetails||[],d={};return l.forEach(A=>{d[A.barcode]={bagIn:A.bagIn,bagOut:A.bagOut}}),d},[O]),Z=O&&(T||F.length||H.length||p.length);return!m&&!Z?e.jsx(u.Spin,{spinning:m&&!r,indicator:e.jsx("img",{src:pe,style:{height:"100px",width:"100px"}}),children:e.jsxs("div",{className:"bag-details-page",children:[e.jsxs("p",{className:"master-title-head",style:{marginBottom:"5px"},children:[n&&e.jsx("img",{src:et,onClick:G,className:"pointer"}),e.jsx("span",{children:"Bag Details"})]}),e.jsx("div",{className:"bag-empty",children:e.jsxs(u.Card,{className:"ho-card bag-empty__card",children:[e.jsx("div",{className:"ho-section-title bag-empty__title",children:e.jsx("span",{className:"ho-title",children:"Details Not Found"})}),e.jsxs("div",{className:"bag-empty__text",children:["No details found for the provided Bag number:",e.jsxs("strong",{children:[" ",P?.replace(/\+/g,"/")," "]}),e.jsx("br",{}),"Please check the Bag number and try again."]})]})})]})}):e.jsx(u.Spin,{spinning:m&&!r,indicator:e.jsx("img",{src:pe,style:{height:"100px",width:"100px"}}),children:e.jsxs("div",{className:"bag-details-page",children:[e.jsxs("p",{className:"master-title-head",style:{marginBottom:"5px",marginTop:"6px"},children:[n&&e.jsx("img",{src:et,onClick:G,className:"pointer"}),e.jsx("span",{children:"Bag Details"})]}),e.jsxs(u.Row,{gutter:[16,16],children:[e.jsx(u.Col,{xs:24,lg:12,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-subheader__value",children:[e.jsxs("span",{className:"ho-kv-stack",children:[e.jsx("span",{className:"ho-muted",children:"Bag number"}),e.jsx("span",{className:"ho-strong",children:le})]}),e.jsx(u.Tag,{className:"ho-badge ho-badge--blue",children:"Bag Created"})]}),e.jsx("div",{className:"ho-chip",children:e.jsxs("span",{className:"ho-chip__value",style:{display:"flex",gap:6,whiteSpace:"nowrap"},children:[e.jsx("span",{style:{color:"#344054"},children:"Bag Created:"}),e.jsx("span",{children:ce?bt(ce):"—"})]})})]}),e.jsx("div",{className:"ho-box ho-box--flush",children:e.jsxs("div",{className:"ho-stats",children:[e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Content Type"}),e.jsx("div",{className:"ho-stat__value",children:k(T?.contentType||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Type"}),e.jsx("div",{className:"ho-stat__value",children:k(T?.bagType||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Mode"}),e.jsx("div",{className:"ho-stat__value",children:k(T?.mode||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:"Product"}),e.jsx("div",{className:"ho-stat__value",children:k(T?.product||"—")})]}),e.jsxs("div",{className:"ho-stat",children:[e.jsx("div",{className:"ho-stat__label",children:T?.cpId?"Destination CP":"Destination Hub"}),e.jsx("div",{className:"ho-stat__value",children:T?.cpId?k(T?.cpName||"—"):k(T?.destinationHubName||"—")})]})]})}),e.jsx("div",{className:"ho-box",children:e.jsxs("div",{className:"ho-grid",children:[e.jsxs("div",{className:"ho-metric",style:{display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{className:"ho-kv__label",children:[e.jsx("img",{src:xs,className:"ho-kv-icon",alt:""}),"Bag Weight :"]}),e.jsx("span",{className:"ho-kv__value",style:{color:"#027A48",fontWeight:600},children:T?.bagWeight??"—"})]}),e.jsxs("div",{className:"ho-metric",style:{display:"flex",justifyContent:"space-between"},children:[e.jsxs("span",{className:"ho-kv__label",children:[e.jsx("img",{src:fs,className:"ho-kv-icon",alt:""}),"Total Volumetric Weight :"]}),e.jsx("span",{className:"ho-kv__value",style:{color:"#027A48",fontWeight:600},children:T?.totalWeight??"—"})]})]})})]})}),e.jsx(u.Col,{xs:24,lg:12,children:e.jsxs(u.Row,{gutter:[16,16],children:[e.jsx(u.Col,{span:24,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Fe,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Bag Route"})]})}),e.jsx("div",{className:`ho-route ${F.length===0?"ho-route--empty":""}`,children:F.length===0?e.jsx("div",{className:"ho-route__empty",children:"Bag Route not available"}):e.jsxs(e.Fragment,{children:[F.slice(0,4).map((l,d)=>e.jsxs("div",{className:`ho-route__row ${l.type==="to"?"ho-route__row--to":""}`,children:[e.jsx("div",{children:d===0?e.jsx("span",{className:"ho-route__tag ho-route__tag--transit",children:e.jsx("img",{src:oe,alt:"",className:"ho-route__truck"})}):l.type==="to"?e.jsx("span",{className:"ho-route__tag ho-route__tag--plain",children:e.jsx("img",{src:re,alt:"",className:"ho-route__dest"})}):e.jsxs("span",{className:"ho-route__tag ho-route__tag--transit",children:["T",d]})}),e.jsx("div",{className:"ho-route__content",children:e.jsx("span",{className:"ho-route__title",children:k(l.hub)})})]},d)),F.length>4&&e.jsxs("div",{className:"ho-route__more",onClick:()=>D(!0),children:[e.jsx("span",{className:"ho-route__more-text",children:"View More"}),e.jsx("span",{className:"ho-route__more-caret",children:"▾"})]})]})}),e.jsx(u.Modal,{open:M,title:"Bag Route",footer:null,onCancel:()=>D(!1),width:420,children:e.jsx("div",{className:"shipment-route-modal",children:F.map((l,d)=>e.jsxs("div",{className:"shipment-route-item",children:[e.jsxs("div",{className:"shipment-route-timeline",children:[e.jsx("div",{className:`route-dot route-dot--circle ${l.type}`,children:l.type==="source"?e.jsx("img",{src:oe,alt:"Source Hub"}):l.type==="to"?e.jsx("img",{src:re,alt:"To Hub"}):e.jsxs("span",{className:"ho-route__tag--transit",children:["T",d]})}),d!==F.length-1&&e.jsx("div",{className:"route-line"})]}),e.jsx("div",{className:"shipment-route-content ho-route__content",children:e.jsxs("div",{className:"ho-route__name",children:[e.jsx("span",{className:"ho-route__title",children:k(l.hub)}),l.type==="source"&&e.jsx("span",{className:"route-badge route-badge--source",children:"Source Hub"}),l.type==="to"&&e.jsx("span",{className:"route-badge route-badge--to",children:"To Hub"})]})})]},d))})})]})}),e.jsx(u.Col,{span:24,children:e.jsxs(u.Card,{className:"ho-card ho-card--equal",children:[e.jsxs("div",{className:"ho-section-title",children:[e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:ft,className:"ho-title-icon",alt:""}),e.jsxs("span",{style:{fontFamily:"Roboto",fontWeight:700,fontSize:"20px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:["Shipments ",p.length>0&&`(${p.length})`]})]}),p.length>0&&e.jsxs("div",{className:"ho-inline",children:[e.jsx("span",{className:"ho-chip bag-chip bag-chip--in",children:"Bag In"}),e.jsx("span",{className:"ho-chip bag-chip bag-chip--out",children:"Bag Out"})]})]}),e.jsx("div",{className:"ho-inline",style:{flexWrap:"wrap",gap:8,width:"100%",display:"flex",justifyContent:"center",alignItems:"center",minHeight:"40px"},children:p.length===0?e.jsx("div",{style:{textAlign:"center",color:"#667085",fontSize:"14px",fontWeight:400},children:"Shipment not available"}):e.jsxs(e.Fragment,{children:[p.slice(0,5).map((l,d)=>e.jsx(u.Tag,{className:`ho-badge pointer ${U(l)}`,style:{marginBottom:8,textDecoration:"underline"},onClick:()=>a(`/shipment-tracker?awb=${l}`),children:l},d)),p.length>5&&e.jsx("span",{onClick:()=>$(!0),style:{cursor:"pointer",color:"#0066CC",textDecoration:"underline",marginLeft:10,fontWeight:600},children:"View More ▾"})]})})]})}),e.jsx(u.Modal,{open:X,title:e.jsxs("div",{style:{fontFamily:"Roboto",fontWeight:700,fontSize:"20px",lineHeight:"100%",letterSpacing:"0px",color:"#003371"},children:["Shipments ",p.length>0&&`(${p.length})`]}),footer:null,onCancel:()=>$(!1),width:450,children:e.jsx("div",{style:{maxHeight:"400px",overflowY:"auto",padding:"10px 5px"},children:p.map((l,d)=>e.jsx(u.Tag,{className:`ho-badge pointer ${U(l)}`,style:{marginBottom:8,display:"inline-block",textDecoration:"underline"},onClick:()=>a(`/shipment-tracker?awb=${l}`),children:l},d))})})]})}),e.jsx(u.Col,{span:24,children:e.jsxs(u.Card,{className:"ho-card",children:[e.jsx("div",{className:"ho-section-title",children:e.jsxs("div",{className:"ho-title-left",children:[e.jsx("img",{src:Ct,className:"ho-title-icon",alt:""}),e.jsx("span",{className:"ho-title",children:"Travel Info"})]})}),e.jsx(u.Table,{className:"ho-table",columns:Cs,dataSource:Ce,rowKey:"key",pagination:!1})]})})]})]})})}exports.BagDetailsUI=bs;exports.ShipmentDetailsUI=ms;
|
|
@@ -2298,7 +2298,7 @@ function jn({ endpoint: n, awbNumber: t }) {
|
|
|
2298
2298
|
verticalAlign: "bottom",
|
|
2299
2299
|
cursor: "pointer"
|
|
2300
2300
|
},
|
|
2301
|
-
children: o.auditedHubName && o.auditedHubName.length >
|
|
2301
|
+
children: o.auditedHubName && o.auditedHubName.length > 7 ? b(o.auditedHubName.substring(0, 7)) + "..." : b(o.auditedHubName || "—")
|
|
2302
2302
|
}
|
|
2303
2303
|
) })
|
|
2304
2304
|
] }),
|