PageSourceSearch

https://pharma.extendeal.com/_next/static/chunks/3274-86e33c492bbfef90.js

js extendeal.com collected 2026-10-08 08:29:30 UTC 227,805 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3274],{97870:function(e,r,t){"use strict";t.d(r,{J:function(){return ExCheckpicker_ExCheckpicker}});var a=t(85893),n=t(67294),l=t(22569),i=t(14182),o=t(50053),s=t(72618),d=t(51745),c=t(47114),u=t.n(c);let matchesSearchKeyword=(e,r,t)=>{if(!r.trim())return!0;let a=r.toLocaleLowerCase(),n=null==e?void 0:e[t];return"string"==typeof n||"number"==typeof n?"".concat(n).toLocaleLowerCase().indexOf(a)>=0:"string"==typeof(null==e?void 0:e.labelText)&&e.labelText.toLocaleLowerCase().indexOf(a)>=0};var ExCheckpicker_ExCheckpicker=function(e){let{data:r,value:t,onChange:c,valueKey:p="value",labelKey:_="label",withSelectAll:h=!0,withApplyButton:m=!0,withClearButton:x=!1,selectAllLabel:g="Seleccionar todo",applyLabel:v="Aplicar",clearLabel:C="Limpiar",onApply:f,onClear:w,placeholderText:y="Seleccionar...",customRenderValue:j,...b}=e,S=(0,n.useRef)(null),[D,k]=(0,n.useState)(t||[]),[N,P]=(0,n.useState)("");(0,n.useEffect)(()=>{k(t||[])},[t]);let L=(0,n.useMemo)(()=>Array.isArray(r)?r.map(e=>e[p]):[],[r,p]),O=(0,n.useMemo)(()=>d.Qt&&N.trim()&&Array.isArray(r)?r.filter(e=>matchesSearchKeyword(e,N,_)).map(e=>e[p]):L,[r,N,L,_,p]),F=d.Qt?O:L,E=F.filter(e=>D.includes(e)).length,B=F.length>0&&E===F.length,R=E>0&&E<F.length,handleSelectAll=(e,r)=>{if(d.Qt){let e;if(r)e=Array.from(new Set([...D||[],...O]));else{let r=new Set(O);e=D.filter(e=>!r.has(e))}k(e),m||c(e);return}let t=r?L:[];k(t),m||c(t)},closePicker=()=>{S.current&&"function"==typeof S.current.close&&S.current.close()},handleApply=e=>{e&&"function"==typeof e.preventDefault&&e.preventDefault(),c(D),f&&f(D),closePicker()},handleClear=()=>{k([]),c([]),w&&w(),closePicker()},T=j||((e,r)=>{if(!e||0===e.length)return(0,a.jsx)("span",{className:u().placeholder,children:y});let t=e.map(e=>{let t=r.find(r=>r[p]===e);return t?t[_]:null}).filter(Boolean),n=t[0]||"",l=t.length>1?"".concat(n,", ..."):n;return(0,a.jsxs)("span",{className:u()["value-container"],children:[(0,a.jsx)("span",{className:u()["value-text"],title:t.join(", "),children:l}),(0,a.jsx)("span",{className:u()["value-counter"],children:e.length})]})});return(0,a.jsx)(s.Z,{ref:S,data:r,value:D,onChange:e=>{k(e),m||c(e)},valueKey:p,labelKey:_,renderValue:T,renderExtraFooter:()=>h||m||x?(0,a.jsxs)("div",{className:u().footer,children:[h&&(0,a.jsx)(l.Z,{className:u()["select-all-checkbox"],indeterminate:R,checked:B,onChange:handleSelectAll,children:g}),(m||x)&&(0,a.jsxs)(i.Z,{className:u()["footer-buttons"],children:[x&&(0,a.jsx)(o.Z,{appearance:"subtle",size:"sm",onClick:handleClear,children:C}),m&&(0,a.jsx)(o.Z,{appearance:"primary",size:"sm",onClick:handleApply,children:v})]})]}):null,placeholder:y,...b,onSearch:(e,r)=>{var t;d.Qt&&P(e),null===(t=b.onSearch)||void 0===t||t.call(b,e,r)},onClose:()=>{var e;d.Qt&&P(""),null===(e=b.onClose)||void 0===e||e.call(b)}})}},2336:function(e,r,t){"use strict";t.d(r,{M:function(){return ButtonFal_ButtonFal}});var a=t(85893),n=t(90928),l=t(81955),Icon_Icon=e=>{let{disabled:r,loading:t}=e;return(0,a.jsx)("img",{src:"/assets/images/download_".concat(r?"disabled":"file_blue",".svg"),width:16,height:16,alt:"icon download",style:{color:r?"#ACAEC4":"#0171E6",display:t?"none":"block"},draggable:!1})},i=t(87301),o=t(70031),s=t.n(o),ButtonFal_ButtonFal=e=>{let{disabled:r,gtagClass:t,loading:o,handleOnClick:d,text:c,country:u}=e;return(0,a.jsx)(n.j,{className:"".concat(t," ").concat(u===i.s.BR||u===i.s.US?s()["button-fal-max"]:s()["button-fal"]),disabled:r,size:"md",type:"button",appearance:"outline",IconComponent:(0,a.jsx)(Icon_Icon,{disabled:r,loading:o}),onClick:()=>d(),children:o?(0,a.jsx)(l.v,{size:"xs"}):c})}},2466:function(e,r,t){"use strict";t.d(r,{W:function(){return DropdownOrder_DropdownOrder}});var a=t(85893),n=t(4642),l=t(184),i=t.n(l),Content_Content=e=>{let{data:r,showIcon:t=!0}=e;return(0,a.jsx)(a.Fragment,{children:null==r?void 0:r.map((e,r)=>{let l={...e,key:r+1,id:null==e?void 0:e.type};return t&&(l.icon=(0,a.jsx)("img",{src:"/assets/images/download_file.svg",width:20,height:20,alt:"icon download",draggable:!1,className:i()["item-icon"]})),(0,a.jsx)(n.Z.Item,{...l,children:(0,a.jsx)("span",{children:null==e?void 0:e.text})})})})},o=t(81955),s=t(96170),d=t.n(s),Title_Title=e=>{let{loading:r,title:t,disabled:n,showIcon:l=!0}=e;return(0,a.jsx)(a.Fragment,{children:r?(0,a.jsx)("div",{className:d().loader,children:(0,a.jsx)(o.v,{size:"xs"})}):(0,a.jsxs)("div",{className:d().placeholder,children:[l&&(0,a.jsx)("img",{src:"Comprobantes"===t?"/assets/images/receipt_long.svg":"/assets/images/download_".concat(n?"disabled":"file_blue",".svg"),width:16,height:16,alt:"icon download",draggable:!1}),t]})})}
1,c=t(4211),u=t.n(c),DropdownOrder_DropdownOrder=e=>{let{loading:r,title:t,data:l,onSelect:i,disabled:o,dropdownOrderRef:s,gtagClass:d,showIcon:c}=e;return(0,a.jsx)(n.Z,{ref:s,title:(0,a.jsx)(Title_Title,{loading:r,title:t,disabled:o,showIcon:c}),className:"".concat(d," ").concat(u().dropdown," ").concat("Descargar"===t||"Comprobantes"===t?u().dropdownDownload:""),onSelect:i,disabled:o,noCaret:r,placement:"bottomEnd",children:(0,a.jsx)(Content_Content,{data:l,showIcon:"Comprobantes"!==t&&c})})}},3735:function(e,r,t){"use strict";t.d(r,{j:function(){return Banner_Banner}});var a=t(85893),n=t(34736),l=t(14182),i=t(50053),o=t(57425),s=t.n(o),Banner_Banner=e=>{let{image:r,styleImage:t,vector:o,title:d,subtitle:c,label:u,onClick:p,styleTitle:_,gtagClass:h}=e;return(0,a.jsxs)(n.Z,{children:[(0,a.jsx)("div",{className:s()["wrapper-container-images"],children:(0,a.jsx)("div",{className:s()["image-container"],children:(0,a.jsxs)("div",{className:s()["wrapper-images"],children:[(0,a.jsx)("img",{src:r,className:t,alt:""}),!!o&&(0,a.jsx)("div",{className:s()["image-vector"],children:(0,a.jsx)("img",{src:o,alt:""})})]})})}),(0,a.jsxs)("div",{className:s()["container-text"],children:[(0,a.jsx)("p",{className:s()["title-out-of-orders"],style:_,children:d}),(0,a.jsx)("p",{className:s()["subtitle-out-of-orders"],children:c}),!!u&&(0,a.jsx)(l.Z,{children:(0,a.jsx)(i.Z,{appearance:"primary",className:"".concat(h," ").concat(s()["action-button"]),onClick:p,children:u})})]})]})}},63171:function(e,r,t){"use strict";var a=t(85893);t(67294);
1var n=t(38442),l=t.n(n),i=t(74721);r.Z=function(e){let{children:r,backgroundColor:t,IconColor:n}=e;return(0,a.jsxs)("div",{className:l()["alert-message"],style:{background:t},children:[(0,a.jsx)(i.Z,{className:l().icon,style:{color:n}}),r]})}},1590:function(e,r,t){"use strict";t.d(r,{Z:function(){return SelectInput_SelectInput}});var a=t(85893),n=t(67294),l=t(3718),i=t(87523),o=t(25907),s=t.n(o),d=t(98168),icons=function(e){let{color:r}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,a.jsx)("path",{d:"M9.5 16C7.68333 16 6.14583 15.3708 4.8875 14.1125C3.62917 12.8542 3 11.3167 3 9.5C3 7.68333 3.62917 6.14583 4.8875 4.8875C6.14583 3.62917 7.68333 3 9.5 3C11.3167 3 12.8542 3.62917 14.1125 4.8875C15.3708 6.14583 16 7.68333 16 9.5C16 10.2333 15.8833 10.925 15.65 11.575C15.4167 12.225 15.1 12.8 14.7 13.3L20.3 18.9C20.4833 19.0833 20.575 19.3167 20.575 19.6C20.575 19.8833 20.4833 20.1167 20.3 20.3C20.1167 20.4833 19.8833 20.575 19.6 20.575C19.3167 20.575 19.0833 20.4833 18.9 20.3L13.3 14.7C12.8 15.1 12.225 15.4167 11.575 15.65C10.925 15.8833 10.2333 16 9.5 16ZM9.5 14C10.75 14 11.8125 13.5625 12.6875 12.6875C13.5625 11.8125 14 10.75 14 9.5C14 8.25 13.5625 7.1875 12.6875 6.3125C11.8125 5.4375 10.75 5 9.5 5C8.25 5 7.1875 5.4375 6.3125 6.3125C5.4375 7.1875 5 8.25 5 9.5C5 10.75 5.4375 11.8125 6.3125 12.6875C7.1875 13.5625 8.25 14 9.5 14Z",fill:r})})},c=t(50594),u=t(58822),p=t(56255),_=t(45965),SelectInput_SelectInput=e=>
1{let{placeholder:r,placeholderLarge:t,setSearchTerms:o,currentSearch:h,setCurrentSearch:m,timerSkeleton:x,gtagClass:g,onSearchToggle:v,forceClose:C}=e,[f,w]=(0,n.useState)(!1),[y,j]=(0,n.useState)(!1),{user:b}=(0,p.aF)({}),S=(0,n.useRef)(null),D=(0,n.useRef)(null);(0,n.useEffect)(()=>{let checkScreenSize=()=>{w(window.innerWidth>1366)};return checkScreenSize(),window.addEventListener("resize",checkScreenSize),()=>window.removeEventListener("resize",checkScreenSize)},[]);let handlerCurrentSearch=()=>o(h),handleDeleteValue=()=>{m(""),o("")};return(0,n.useEffect)(()=>{""===h&&o("")},[h,o]),(0,n.useEffect)(()=>{v&&v(y)},[y,v]),(0,n.useEffect)(()=>{y&&setTimeout(()=>{var e;let r=null===(e=S.current)||void 0===e?void 0:e.querySelector("input");r&&r.focus()},200)},[y]),(0,a.jsx)("div",{ref:S,className:"".concat(g," ").concat(s()["container-input"]," ").concat(s()["search-container"]," ").concat(y?s()["search-expanded"]:s()["search-collapsed"]),children:y?(0,a.jsxs)(l.Z,{inside:!0,size:"lg",className:"".concat(g," ").concat(s()["input-group-expanded"]),disabled:x,children:[(0,a.jsx)(l.Z.Button,{className:s()["search-button"],onClick:()=>{h?handleDeleteValue():handlerCurrentSearch()},children:(0,a.jsx)(icons,{color:x?"#ACAEC4":"#0171e6"})}),(0,a.jsx)(i.Z,{ref:D,disabled:x,placeholder:f&&t?t:r,className:"".concat(g," ").concat(s()["input-search-expanded"]),onChange:e=>m(e),onKeyDown:e=>{"Enter"===e.key&&handlerCurrentSearch()},onFocus:()=>{var e;d.B({action:"input__search-orders",category:"my-orders",label:"input__search-orders",value:0,client_id:null==b?void 0:null===(e=b.client)||void 0===e?void 0:e.id,user_role:(0,_.xQ)(null==b?void 0:b.role_id)})},value:h}),(0,a.jsx)(l.Z.Button,{className:s()["close-button"],onClick:()=>{j(!1),m(""),o("")},children:(0,a.jsx)(c.Z,{className:s()["close-icon"]})})]}):(0,a.jsx)("button",{type:"button",className:s()["search-button-collapsed"],onClick:()=>{j(!y),y?h||(m(""),o("")):setTimeout(()=>{var e;let r=null===(e=S.current)||void 0===e?void 0:e.querySelector("input");r&&r.focus()},300)},disabled:x,children:(0,a.jsx)(u.Z,{className:s()["search-icon"],style:{color:x?"#ACAEC4":"#0171e6"}})})})}},87214:function(e,r,t){"use strict";t.d(r,{Z:function(){return PromotionBadge_PromotionBadge}});var a=t(85893);t(67294);var n=t(51202),l=t.n(n),PromotionBadge_PromotionBadge=e=>{let{text:r}=e;return(0,a.jsx)("div",{className:l().badge,children:(0,a.jsx)("p",{className:l().text,children:r})})}},25793:function(e,r,t){"use strict";t.d(r,{_:function(){return EmptyListV2_EmptyListV2}});var a=t(85893),n=t(90928),l=t(79070),i=t.n(l),o=t(25675),s=t.n(o),d=t(36609),c=t(98168),u=t(45965),p=t(56255),EmptyListV2_EmptyListV2=e=>{let{onClickButtonByCode:r,currentSearch:t}=e,{user:l}=(0,p.aF)({});return(0,a.jsxs)("div",{className:i().container,children:[(0,a.jsx)("div",{className:i()["container-images"],children:(0,a.jsx)("div",{className:i()["image-vector"],children:(0,a.jsx)("img",{alt:"",src:"/assets/images/codigo_barras.svg",className:i()["vector-img"]})})}),(0,a.jsx)("div",{className:i()["container-without-search"],children:(0,a.jsxs)("div",{className:i()["without-search-text"],children:[(0,a.jsx)("p",{className:i()["title-without-searching"],children:(0,d.t)("search.one",{value:t})}),(0,a.jsx)("span",{className:i()["subtitle-without-searching"],children:(0,d.t)("search.two")}),(0,a.jsx)("span",{children:(0,a.jsx)("div",{className:"".concat(i()["container-button"]),children:(0,a.jsx)("span",{children:(0,a.jsx)(n.j,{IconComponent:(0,a.jsx)(s(),{src:"/assets/images/outline.svg",width:24,height:24,alt:"icon search",draggable:!1}),appearance:"link",onClick:e=>{var t;e.stopPropagation(),c.B({action:"textlink__search-code",category:"efficient-purchase",label:"textlink__search-code",value:0,client_id:null==l?void 0:null===(t=l.client)||void 0===t?void 0:t.id,user_role:(0,u.xQ)(null==l?void 0:l.role_id)}),r()},children:(0,d.t)("search.three")})})})})]})})]})}},66549:function(e,r,t){"use strict";t.d(r,{pe:function(){return PaginationList_PaginationList}});var a=t(85893);t(11163),t(67294),t(18587),t(78524),t(51210);var n=t(51745);t(45965),t(56255),t(98168),t(74702),t(340);
1var l=t(85466),i=t(60736),o=t(1903),s=t(94351),d=t.n(s),c=t(67421),PaginationList_PaginationList=e=>{let{total:r,activePage:t,onChangePage:s,onChangeLimit:u,limit:p,pages:_,isLoading:h}=e,{t:m}=(0,c.$G)(),x=[{value:20,label:20},{value:50,label:50},{value:100,label:100}];return(0,a.jsx)("div",{className:d()["container-pagination"],children:h?(0,a.jsxs)("div",{className:d()["wrapper-pagination"],children:[(0,a.jsx)(l.Z,{className:d().pagination,size:"sm",prev:!0,next:!0,ellipsis:!0,total:r,activePage:t,boundaryLinks:!0,maxButtons:5,limit:p,limitOptions:[20,50,100],layout:["pager"],onChangeLimit:u,onChangePage:s,pages:_,disabled:h}),(0,a.jsx)("span",{className:d()["text-seeing"],children:n.$f?m("shoppingCart.labelIsShowing"):"Mostrando"}),(0,a.jsx)(i.Z,{caretAs:()=>(0,a.jsx)(o.Z,{}),searchable:!1,data:x,placement:"topStart",menuClassName:"menu",className:d()["select-picker-container"],cleanable:!1,defaultValue:50,onChange:u})]}):(0,a.jsxs)("div",{className:d()["wrapper-pagination"],children:[(0,a.jsx)(l.Z,{className:d().pagination,size:"sm",prev:!0,next:!0,ellipsis:!0,total:r,activePage:t,boundaryLinks:!0,maxButtons:5,limit:p,limitOptions:[20,50,100],layout:["pager"],onChangeLimit:u,onChangePage:s,pages:_}),(0,a.jsxs)("span",{className:d()["text-seeing"],children:["  ",n.$f?m("shoppingCart.labelIsShowing"):"Mostrando"]}),(0,a.jsx)(i.Z,{caretAs:()=>(0,a.jsx)(o.Z,{}),searchable:!1,data:x,placement:"topStart",menuClassName:"menu",className:d()["select-picker-container"],cleanable:!1,defaultValue:50,onChange:u})]})})};t(25793)},5648:function(e,r,t){"use strict";t.d(r,{m:function(){return formatTableCurrency}});var a=t(36609),n=t(51745),l=t(7738);let i=null,o=null,s="",d=new Map;function resolveCurrency(){if(!n.u_){let e=(0,a.t)("currency.country"),r=(0,a.t)("currency.isoCode");return{locale:"currency.country"===e?"es-AR":e,isoCode:"currency.isoCode"===r?"ARS":r}}return(0,l.h)()}function syncFormatterCurrency(){let{locale:e,isoCode:r}=resolveCurrency(),t="".concat(e,"|").concat(r);return s!==t&&(i=null,o=null,d.clear(),s=t),t}function buildFormatter(e){let{locale:r,isoCode:t}=resolveCurrency();return new Intl.NumberFormat(r,{style:"currency",currency:t,useGrouping:!0,maximumFractionDigits:e})}function formatTableCurrency(e){var r;let{value:t,digitsValidation:l}=e,s=null!==(r=null==t?void 0:t.toString())&&void 0!==r?r:"",c=s.includes(".")?s.split(".")[0]:s,u=!!l&&c.length>l,p=n.u_?syncFormatterCurrency():"",_=n.u_?"".concat(p,"|").concat(t,"|").concat(u?"0":"2"):"".concat(t,"|").concat(u?"0":"2");if(d.has(_))return d.get(_);let h=(n.u_&&syncFormatterCurrency(),u)?(o||(o=buildFormatter(0)),o):(i||(i=buildFormatter(2)),i),m=h.formatToParts(+t),x="",g="",v="",C="";for(let e of m)"integer"===e.type||"group"===e.type?x+=e.value:"decimal"===e.type?g=e.value:"fraction"===e.type?v=e.value:"currency"===e.type&&(C=e.value);let f=(0,a.t)("currency.labelTax"),w={fullValue:h.format(+t),taxLabel:"currency.taxLabel"===f?"+ IVA":f,detailedValues:{mainInteger:x,decimalSeparator:g,cents:v,currencySymbol:C},currencyParts:m,originalValue:t};return d.set(_,w),w}},18586:function(e,r,t){"use strict";t.d(r,{Cf:function(){return l},aL:function(){return i},ee:function(){return n}});var a=t(85893);let n=(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,a.jsx)("path",{d:"M3.33333 14C2.96667 14 2.65278 13.8694 2.39167 13.6083C2.13056 13.3472 2 13.0333 2 12.6667V3.33333C2 2.96667 2.13056 2.65278 2.39167 2.39167C2.65278 2.13056 2.96667 2 3.33333 2H7.33333C7.52222 2 7.68056 2.06389 7.80833 2.19167C7.93611 2.31944 8 2.47778 8 2.66667C8 2.85556 7.93611 3.01389 7.80833 3.14167C7.68056 3.26944 7.52222 3.33333 7.33333 3.33333H3.33333V12.6667H12.6667V8.66667C12.6667 8.47778 12.7306 8.31944 12.8583 8.19167C12.9861 8.06389 13.1444 8 13.3333 8C13.5222 8 13.6806 8.06389 13.8083 8.19167C13.9361 8.31944 14 8.47778 14 8.66667V12.6667C14 13.0333 13.8694 13.3472 13.6083 13.6083C13.3472 13.8694 13.0333 14 12.6667 14H3.33333ZM12.6667 4.26667L6.93333 10C6.81111 10.1222 6.65556 10.1833 6.46667 10.1833C6.27778 10.1833 6.12222 10.1222 6 10C5.87778 9.87778 5.81667 9.72222 5.81667 9.53333C5.81667 9.34444 5.87778 9.18889 6 9.06667L11.7333 3.33333H10C9.81111 3.33333 9.65278 3.26944 9.525 3.14167C9.39722 3.01389 9.33333 2.85556 9.33333 2.66667C9.33333 2.47778 9.39722 2.31944 9.525 2.19167C9.65278 2.06389 9.81111 2 10 2H14V6C14 6.18889 13.9361 6.34722 13.8083 6.475C13.6806 6.60278 13.5222 6.66667 13.3333 6.66667C13.1444 6.66667 12.9861 6.60278 12.8583 6.475C12.7306 6.34722 12.6667 6.18889 12.6667 6V4.26667Z",fill:"#646464"})}),l=(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",children:(0,a.jsx)("path",{d:"M8.50065 11.3334C8.68954 11.3334 8.84787 11.2695 8.97565 11.1417C9.10343 11.
10139 9.16732 10.8556 9.16732 10.6667C9.16732 10.4778 9.10343 10.3195 8.97565 10.1917C8.84787 10.0639 8.68954 10 8.50065 10C8.31176 10 8.15343 10.0639 8.02565 10.1917C7.89787 10.3195 7.83398 10.4778 7.83398 10.6667C7.83398 10.8556 7.89787 11.0139 8.02565 11.1417C8.15343 11.2695 8.31176 11.3334 8.50065 11.3334ZM8.50065 8.66671C8.68954 8.66671 8.84787 8.60282 8.97565 8.47504C9.10343 8.34726 9.16732 8.18893 9.16732 8.00004V5.33337C9.16732 5.14449 9.10343 4.98615 8.97565 4.85837C8.84787 4.7306 8.68954 4.66671 8.50065 4.66671C8.31176 4.66671 8.15343 4.7306 8.02565 4.85837C7.89787 4.98615 7.83398 5.14449 7.83398 5.33337V8.00004C7.83398 8.18893 7.89787 8.34726 8.02565 8.47504C8.15343 8.60282 8.31176 8.66671 8.50065 8.66671ZM8.50065 14.6667C7.57843 14.6667 6.71176 14.4917 5.90065 14.1417C5.08954 13.7917 4.38398 13.3167 3.78398 12.7167C3.18398 12.1167 2.70898 11.4112 2.35898 10.6C2.00898 9.78893 1.83398 8.92226 1.83398 8.00004C1.83398 7.07782 2.00898 6.21115 2.35898 5.40004C2.70898 4.58893 3.18398 3.88337 3.78398 3.28337C4.38398 2.68337 5.08954 2.20837 5.90065 1.85837C6.71176 1.50837 7.57843 1.33337 8.50065 1.33337C9.42287 1.33337 10.2895 1.50837 11.1007 1.85837C11.9118 2.20837 12.6173 2.68337 13.2173 3.28337C13.8173 3.88337 14.2923 4.58893 14.6423 5.40004C14.9923 6.21115 15.1673 7.07782 15.1673 8.00004C15.1673 8.92226 14.9923 9.78893 14.6423 10.6C14.2923 11.4112 13.8173 12.1167 13.2173 12.7167C12.6173 13.3167 11.9118 13.7917 11.1007 14.1417C10.2895 14.4917 9.42287 14.6667 8.50065 14.6667ZM8.50065 13.3334C9.98954 13.3334 11.2507 12.8167 12.284 11.7834C13.3173 10.75 13.834 9.48893 13.834 8.00004C13.834 6.51115 13.3173 5.25004 12.284 4.21671C11.2507 3.18337 9.98954 2.66671 8.50065 2.66671C7.01176 2.66671 5.75065 3.18337 4.71732 4.21671C3.68398 5.25004 3.16732 6.51115 3.16732 8.00004C3.16732 9.48893 3.68398 10.75 4.71732 11.7834C5.75065 12.8167 7.01176 13.3334 8.50065 13.3334Z",fill:"#E22E2E"})}),i=(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,a.jsx)("path",{d:"M10 12.9792C9.88893 12.9792 9.78476 12.9618 9.68754 12.9271C9.59032 12.8924 9.50004 12.8333 9.41671 12.75L6.41671 9.75001C6.25004 9.58334 6.17018 9.3889 6.17712 9.16668C6.18407 8.94445 6.26393 8.75001 6.41671 8.58334C6.58337 8.41668 6.78129 8.32987 7.01046 8.32293C7.23962 8.31598 7.43754 8.39584 7.60421 8.56251L9.16671 10.125V4.16668C9.16671 3.93057 9.24657 3.73265 9.40629 3.57293C9.56601 3.4132 9.76393 3.33334 10 3.33334C10.2362 3.33334 10.4341 3.4132 10.5938 3.57293C10.7535 3.73265 10.8334 3.93057 10.8334 4.16668V10.125L12.3959 8.56251C12.5625 8.39584 12.7605 8.31598 12.9896 8.32293C13.2188 8.32987 13.4167 8.41668 13.5834 8.58334C13.7362 8.75001 13.816 8.94445 13.823 9.16668C13.8299 9.3889 13.75 9.58334 13.5834 9.75001L10.5834 12.75C10.5 12.8333 10.4098 12.8924 10.3125 12.9271C10.2153 12.9618 10.1112 12.9792 10 12.9792ZM5.00004 16.6667C4.54171 16.6667 4.14935 16.5035 3.82296 16.1771C3.49657 15.8507 3.33337 15.4583 3.33337 15V13.3333C3.33337 13.0972 3.41324 12.8993 3.57296 12.7396C3.73268 12.5799 3.9306 12.5 4.16671 12.5C4.40282 12.5 4.60074 12.5799 4.76046 12.7396C4.92018 12.8993 5.00004 13.0972 5.00004 13.3333V15H15V13.3333C15 13.0972 15.0799 12.8993 15.2396 12.7396C15.3993 12.5799 15.5973 12.5 15.8334 12.5C16.0695 12.5 16.2674 12.5799 16.4271 12.7396C16.5868 12.8993 16.6667 13.0972 16.6667 13.3333V15C16.6667 15.4583 16.5035 15.8507 16.1771 16.1771C15.8507 16.5035 15.4584 16.6667 15 16.6667H5.00004Z",fill:"#646464"})})},53274:function(e,r,t){"use strict";t.d(r,{t5:function(){return t3},PO:function(){return tK},We:function(){return tG}});var a,n,l,i,o,s,d=t(85893),c=t(67294),u=t(11163),p=t(36609),_=t(14182),h=t(4647),m=t(50053),x=t(51745),g=t(67421);let btnAtributtes=()=>{let{t:e}=(0,g.$G)(),r=e("myOrders.toggleToOrdersByDrugstore"),t=x.$f?e("myOrders.toggleToMyOrders"):"Mis pedidos";return[{label:t,value:1,tag:"myOrders",gtagClass:"button__my-orders"},{label:r,value:2,tag:"ordersByDrugmanufacturer",gtagClass:"button__purchase-orders"}]};var v=t(5403),C=t.n(v),f=t(98168),w=t(56255),y=t(45965),TabSelector_TabSelector=e=>{let{handlerSelectOrders:r,selectorList:t,setSelectorList:a}=e,{user:n}=(0,w.aF)({}),selectorOrders=(e,t,a)=>{var l,i;"myOrders"===t?f.B({action:"button__my-orders",category:"my-orders",label:"button__my-orders",value:0,client_id:null==n?void 0:null===(l=n.client)||void 0===l?void 0:l.id,user_role:(0,y.xQ)(null==n?void 0:n.role_id)}):f.B({action:"button__purchase-orders",category:"my-orders",label:"button__purchase-orders",value:0,client_id:null==n?void 0:null===(i=n.client)||void 0===i?void 0:i.id,user_role:(0,y.xQ)(null==n?void 0:n.role_id)}),r(e,t,a)},handleSelectTab=(e,r,t)=>{selectorOrders(e,r,t),localStorage.setItem("tabSelected",e)};return(0,d.jsx)("div",{className:C().container,children:(0,d.jsx)(_.Z,{children:(0,d.jsx)(h.Z,{children:btnAtributtes().map((e,r)=>{let{label:n,value:l,tag:i,gtagClass:o}=e;return(0,d.jsx)(m.Z,{className:"".concat(o," ").concat(C()["button-action"]),active:l===t.value,style:{backgroundColor:l===t.value?"#fff":"transparent",color:l===t.value?"#0171E6":"#40435B",borderRadius:0===r?"8px 0px 0px 8px":"0px 8px 8px 0px"},appearance:"subtle",onClick:()=>handleSelectTab(l,i,a),children:n},l)})})})})},j=t(41664),b=t.n(j),S=t(88078),Skeletons_Skeletons=e=>{let{animation:r,variant:t,width:a,height:n,bgcolor:l}=e;return(0,d.jsx)(S.Z,{animation:r,variant:t,width:a,height:n,sx:{bgcolor:l}})},D=t(84418),k=t(84117),N=t(35014),P=t(92297),L=t(96210),O=t(70897),F=t(8362),E=t(26215),B=t(83575),R=t.n(B);(a=i||(i={})).typeOne="myOrders",a.typeTwo="ordersByDrugmanufacturer";var T=t(27484),Z=t.n(T);let A=["rgba(255, 48, 48, 0.15)","rgba(7, 173, 75, 0.15)","rgba(255, 99, 0, 0.15)"],M=["#8F0000","#023B1A","#662700"],I=[];function getIndexColor(e){let r=e%3;return 0===r?2:Math.abs(r-1)}let backgroundColorChange=e=>{let r=Math.floor(Math.random()*A.length),t=null==I?void 0:I.findIndex(r=>(null==r?void 0:r.name)===e),a=A[r],n=M[r];return -1!==t?(a=A[getIndexColor(t)],n=M[getIndexColor(t)]):(I[I.length]={name:e},a=A[I.length],n=M[I.length]),{backgroundColor:a,textColor:n}};var H=t(87301),W=t(94595),V=t(68243),z=t(20572),q=t.n(z);let Badge_Badge=e=>{let{label:r}=e;return(0,d.jsx)("span",{className:q().badge,children:(0,d.jsx)("p",{className:q().text,children:r})})};var U=t(69773),G=t.n(U);let PurchaseModeIcon=e=>{let{variant:r="primary"}=e;return(0,d.jsx)(V.D,{placement:"top",trigger:"hover",text:(0,p.t)("automaticPurchaseTooltip"),marginTop:-8,minWidth:"200px",width:"200px",padding:"4px 12px",fontSize:14,textAlign:"left",children:(0,d.jsx)("div",{className:"".concat(G().container," ").concat(G()["container--".concat(r)]),children:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",children:(0,d.jsx)("path",{d:"M3.96238 7.29167L0.506127 6.85417C0.263072 6.825 0.105086 6.69375 0.0321691 6.46042C-0.0407475 6.22708 0.0102941 6.02778 0.185294 5.8625L6.14988 0.145833C6.19849 0.0972222 6.25682 0.0607639 6.32488 0.0364583C6.39293 0.0121528 6.48529 0 6.60196 0C6.79641 0 6.94467 0.0826389 7.04675 0.247917C7.14884 0.413194 7.15127 0.583333 7.05404 0.758333L5.12904 4.375L8.58529 4.8125C8.82835 4.84167 8.98634 4.97292 9.05925 5.20625C9.13217 5.43958 9.08113 5.63889 8.90613 5.80417L2.94154 11.5208C2.89293 11.5694 2.8346 11.6059 2.76654 11.6302C2.69849 11.6545 2.60613 11.6667 2.48946 11.6667C2.29502 11.6667 2.14675 11.584 2.04467 11.4188C1.94259 11.2535 1.94016 11.0833 2.03738 10.9083L3.96238 7.29167Z",fill:"white"})})})})};var Q=t(77643),Y=t.n(Q);let RetryButton=()=>(0,d.jsxs)("div",{className:Y().container,children:[(0,d.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:Y().icon,children:(0,d.jsx)("path",{d:"M8 14.5728C7.16667 14.5728 6.38611 14.4145 5.65833 14.0978C4.93056 13.7811 4.29722 13.3534 3.75833 12.8145C3.21944 12.2756 2.79167 11.6422 2.475 10.9145C2.15833 10.1867 2 9.40614 2 8.5728C2 8.38391 2.06389 8.22558 2.19167 8.0978C2.31944 7.97002 2.47778 7.90614 2.66667 7.90614C2.85556 7.90614 3.01389 7.97002 3.14167 8.0978C3.26944 8.22558 3.33333 8.38391 3.33333 8.5728C3.33333 9.8728 3.78611 10.9756 4.69167 11.8811C5.59722 12.7867 6.7 13.2395 8 13.2395C9.3 13.2395 10.4028 12.7867 11.3083 11.8811C12.2139 10.9756 12.6667 9.8728 12.6667 8.5728C12.6667 7.2728 12.2139 6.17002 11.3083 5.26447C10.4028 4.35891 9.3 3.90614 8 3.90614H7.9L8.46667 4.4728C8.6 4.60614 8.66389 4.76169 8.65833 4.93947C8.65278 5.11725 8.58889 5.2728 8.46667 5.40614C8.33333 5.53947 8.175 5.60891 7.99167 5.61447C7.80833 5.62002 7.65 5.55614 7.51667 5.4228L5.8 3.70614C5.66667 3.5728 5.6 3.41725 5.6 3.23947C5.6 3.06169 5.66667 2.90614 5.8 2.7728L7.51667 1.05614C7.65 0.922802 7.80833 0.858914 7.99167 0.864469C8.175 0.870025 8.33333 0.939469 8.46667 1.0728C8.58889 1.20614 8.65278 1.36169 8.65833 1.53947C8.66389 1.71725 8.6 1.8728 8.46667 2.00614L7.9 2.5728H8C8.83333 2.5728 9.61389 2.73114 10.3417 3.0478C11.0694 3.36447 11.7028 3.79225 12.2417 4.33114C12.7806 4.87002 13.2083 5.50336 13.525 6.23
1114C13.8417 6.95891 14 7.73947 14 8.5728C14 9.40614 13.8417 10.1867 13.525 10.9145C13.2083 11.6422 12.7806 12.2756 12.2417 12.8145C11.7028 13.3534 11.0694 13.7811 10.3417 14.0978C9.61389 14.4145 8.83333 14.5728 8 14.5728Z",fill:"currentColor"})}),(0,d.jsx)("span",{className:Y().label,children:"Reintentar"})]}),$=t(67763),X=t(25054),K=t(57548);var OrderCards_OrderCardsExtendealPlus=e=>{var r;let{dateTime:t,orderNumber:a,drugmanufactur:n,value:l,avatar:o,noMedicinals:s,client:c,oneDrugmanufacturerName:u,imageOneDrugmanufacturer:p,drugmanufacturers:_,selectorList:h,timerSkeleton:m,initialLettersDrugmanufName:v,orderNumberByDrugmanufact:C,referencePointOfSale:f,drug_manufacturer_id:y,status:j,has_invoice:S,automatic_purchase_in_process:B,is_automatic:T,has_receipts:A,purchase_failure:M=!1,automatic_purchase_error:I=null}=e,{t:z}=(0,g.$G)(),{user:q,userLocaleCountryCode:U}=(0,w.aF)({}),{formatCurrency:G}=(0,W.Z)();Z().locale(U===H.s.US?X:U===H.s.BR?K:$);let{first_name:Q,last_name:Y}=q,J=o==="".concat(Q[0]).concat(Y[0]),ee="",er="";if(!J){let{backgroundColor:e,textColor:r}=backgroundColorChange(o);ee=e,er=r}let et=C&&C.split("-"),ea=h.tag===i.typeTwo?"my-orders/deliveries/".concat(a,"/").concat(et[0]):"my-orders/details/".concat(a),{detailedValues:{currencySymbol:en}}=G({value:0}),el=M?"".concat(en," -"):void 0===l?G({value:l}).fullValue.replace("NaN","-"):G({value:l}).fullValue,ei=new Set([1,2]),eo=null==I?void 0:I.error_type_id,es=!x.O1||ei.has(eo),ed=(null==h?void 0:h.tag)===i.typeTwo?"card__purchase-order-detail":"",ec=(e=>{switch(e){case 1:return{text:"En progreso",backgroundColor:"#E3F2FD",color:"#1976D2",borderColor:"#BBDEFB"};case 2:case 5:return{text:"Aceptada",backgroundColor:"var(--Semantic-Success-50, #EBF9F3)",color:"var(--Semantic-Success-600, #07AD4B)",borderColor:"#A5D6A7"};case 3:case 4:return{text:"Env\xedo manual",backgroundColor:"var(--Semantic-Warning-50, #FFF9E6)",color:"#9F7100",borderColor:"#FFF176"};case 6:return{text:"Rechazada",backgroundColor:"var(--Semantic-Error-50, #FFEBEB)",color:"var(--Semantic-Error-700, #C62828)",borderColor:"#FFCDD2"};case 7:return{text:"Procesando",backgroundColor:"#E8F5E8",color:"#2E7D32",borderColor:"#C8E6C9"};case 8:return{text:"Pagada",backgroundColor:"var(--Semantic-Success-100, #DDF6E2)",color:"var(--Semantic-Success-800, #146D3B)",borderColor:"#A5D6A7"};case 9:return{text:"Pr\xf3xima a vencer",backgroundColor:"var(--Semantic-Warning-100, #FFEA9F)",color:"var(--Secondary-800, #0B2033)",borderColor:"#FFF59D"};case 10:return{text:"Vencida",backgroundColor:"var(--Semantic-Error-100, #F8CBCB)",color:"var(--Semantic-Error-700, #C62828)",borderColor:"#FFCDD2"};default:return{text:"Desconocido",backgroundColor:"#F5F5F5",color:"#757575",borderColor:"#E0E0E0"}}})((null==j?void 0:j.id)||0),eu=(null==j?void 0:j.id)===4;return(0,d.jsx)("div",{className:R().container,children:(0,d.jsx)(D.Z,{children:(0,d.jsx)(b(),{href:"/".concat(null==q?void 0:null===(r=q.client)||void 0===r?void 0:r.id,"/").concat(ea),className:"".concat(ed," ").concat(R()["container-link"]),onClick:()=>{h.tag===i.typeOne?localStorage.setItem("urlRedirect",ea):localStorage.setItem("urlRedirect","")},children:(0,d.jsx)(k.Z,{xs:24,className:ed,children:(0,d.jsxs)("div",{className:R()["wrapper-card"],children:[(0,d.jsxs)(N.Z,{className:R()["panel-card"],children:[(0,d.jsxs)("div",{className:R()["container-footer"],children:[(0,d.jsx)(k.Z,{xs:8,children:m?(0,d.jsx)(Skeletons_Skeletons,{width:32,height:12,animation:"wave"}):(0,d.jsxs)("p",{className:R()["text-date-time"],children:[U===H.s.US&&Z()(t).format("MMM D, YYYY - hh:mm A"),U!==H.s.US&&Z()(t).format("D [de] MMMM YYYY - HH:mm [hs]")]})}),(0,d.jsxs)("div",{className:R()["wrapper-footer"],children:[(0,d.jsx)(k.Z,{xs:8}),(0,d.jsx)(k.Z,{xs:8}),(0,d.jsx)(k.Z,{xs:5,children:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"flex-end",marginRight:"56px"},children:[T&&(0,d.jsx)(PurchaseModeIcon,{variant:M?"error":"primary"}),T&&M&&(0,d.jsx)(Badge_Badge,{label:"Fall\xf3"}),T&&M&&es&&(0,d.jsx)(RetryButton,{}),(0,d.jsx)("div",{style:{padding:"4px 8px",display:"flex",alignItems:"center",width:eu?"100px":"80px"},children:ec.text.length>11&&!eu?(0,d.jsx)(P.Z,{placement:"top",speaker:(0,d.jsx)(L.Z,{className:R()["badge-tooltip"],children:ec.text}),children:(0,d.jsx)(O.Z,{content:ec.text,className:R()["badge-status"],style:{borderRadius:"8px",backgroundColor:ec.backgroundColor,color:ec.color,border:"1px solid ".concat(ec.borderColor),fontFamily:'"Source Sans Pro"',fontSize:"12px",fontWeight:600,lineHeight:"18px",overflow:"hidden",textOverflow:"ellipsis",fontFeatureSettings:'"liga" off, "clig" off',whiteSpace:"nowrap",maxWidth:"100%"}})}):(0,d.jsx)(O.Z,{content:ec.text,className:R()["badge-status"],style:{borderRadius:"8px",backgroundColor:ec.backgroundColor,color:ec.color,border:"1px solid ".concat(ec.borderColor),fontFamily:'"Source Sans Pro"',fontSize:"12px",fontWeight:600,lineHeight:"18px",overflow:eu?"visible":"hidden",textOverflow:eu?"clip":"ellipsis",fontFeatureSettings:'"liga" off, "clig" off',whiteSpace:"nowrap",maxWidth:eu?"none":"100%"}})}),A&&(0,d.jsx)(V.D,{text:"Comprobantes adjuntos",placement:"top",trigger:"hover",marginTop:-8,fontSize:14,children:(0,d.jsx)("div",{onClick:e=>e.stopPropagation(),style:{borderRadius:"4px",border:"0.5px solid #DCEDFF",background:"#EBF5FF",display:"flex",width:"24px",height:"24px",justifyContent:"center",alignItems:"center",gap:"10px",aspectRatio:"1/1"},children:(0,d.jsx)("img",{src:"/assets/images/receipt_long.svg",alt:"receipt"})})})]})})]})]}),m?(0,d.jsx)(Skeletons_Skeletons,{width:160,height:14,animation:"wave"}
1):h.tag===i.typeOne&&(0,d.jsxs)("p",{className:R()["text-order-number"],children:["# ",a]})||h.tag===i.typeTwo&&(0,d.jsxs)("p",{className:R()["text-order-number"],children:["# ",C]}),m?(0,d.jsx)(Skeletons_Skeletons,{width:120,height:12,animation:"wave"}):(0,d.jsxs)("div",{className:R()["row-container-name"],children:[f&&(0,d.jsx)("span",{className:R()["text-subtitle"],children:n}),(0,d.jsx)("span",{className:R()["text-drugmanufactur-title"],children:f||n})]}),m?(0,d.jsx)(Skeletons_Skeletons,{width:120,height:12,animation:"wave"}):!!s&&(0,d.jsx)("p",{className:R()["text-no-medicinals"],children:s}),(0,d.jsxs)("div",{className:R()["container-footer"],children:[(0,d.jsxs)(k.Z,{xs:8,children:[h.tag===i.typeOne&&(0,d.jsx)(MyOrdersList_MyOrdersList,{drugmanufacturers:_,timerSkeleton:m,initialLettersDrugmanufName:v}),h.tag===i.typeTwo&&(0,d.jsx)(OrdersByDrugmanufacturer_OrdersByDrugmanufacturer,{image:p,name:u,timerSkeleton:m,drug_manufacturer_id:y})]}),(0,d.jsxs)("div",{className:R()["wrapper-footer"],children:[(0,d.jsx)(k.Z,{xs:8,children:(0,d.jsx)("div",{className:R()["avatar-container-wrapper"],style:{display:"flex",alignItems:"center",gap:"8px"},children:m?(0,d.jsx)(Skeletons_Skeletons,{width:100,height:14,animation:"wave"}):(0,d.jsx)(d.Fragment,{children:(0,d.jsx)("p",{className:R()["total-value"],children:el})})})}),(0,d.jsx)(k.Z,{xs:5,children:(0,d.jsx)(P.Z,{placement:"bottom",speaker:(0,d.jsx)(L.Z,{className:R()["client-tooltip-label"],children:c}),children:m?(0,d.jsx)(Skeletons_Skeletons,{width:24,height:24,animation:"wave",variant:"circular"}):(0,d.jsx)(F.Z,{size:"sm",circle:!0,className:R()["avatar-icon"],style:{backgroundColor:J?"#FFF4D9":ee,color:J?"#A16205":er},children:o})})})]})]})]}),(0,d.jsx)("div",{className:R()["icon-arrow"],children:(0,d.jsx)(E.Z,{className:R().icon})})]})})})})})};
1let J=t(67763),ee=t(25054),er=t(57548);var OrderCards_OrderCards=e=>{var r;let{dateTime:t,orderNumber:a,drugmanufactur:n,value:l,avatar:o,noMedicinals:s,client:c,oneDrugmanufacturerName:u,imageOneDrugmanufacturer:_,drugmanufacturers:h,selectorList:m,timerSkeleton:g,initialLettersDrugmanufName:v,orderNumberByDrugmanufact:C,referencePointOfSale:f,drug_manufacturer_id:y,status:j,has_complete_stock:S,has_invoice:O,has_receipts:B,automatic_purchase_in_process:T,is_automatic:A,purchase_failure:M=!1,automatic_purchase_error:I=null,ca_total_credit:V=null}=e,{user:z,userLocaleCountryCode:q}=(0,w.aF)({}),{formatCurrency:U}=(0,W.Z)();Z().locale(q===H.s.US?ee:q===H.s.BR?er:J);let{first_name:G,last_name:Q}=z,Y=o==="".concat(G[0]).concat(Q[0]),$="",X="";if(!Y){let{backgroundColor:e,textColor:r}=backgroundColorChange(o);$=e,X=r}let K=C&&C.split("-"),et=m.tag===i.typeTwo?"my-orders/deliveries/".concat(a,"/").concat(K[0]):"my-orders/details/".concat(a),{detailedValues:{currencySymbol:ea}}=U({value:0}),en=M?"".concat(ea," -"):void 0===l?U({value:l}).fullValue.replace("NaN","-"):U({value:l}).fullValue,el=new Set([1,2]),ei=null==I?void 0:I.error_type_id,eo=!x.O1||el.has(ei),es=(null==m?void 0:m.tag)===i.typeTwo?"card__purchase-order-detail":"";return y===+x.Y7?(0,d.jsx)(OrderCards_OrderCardsExtendealPlus,{dateTime:t,orderNumber:a,drugmanufactur:n,value:l,avatar:o,noMedicinals:s,client:c,oneDrugmanufacturerName:u,imageOneDrugmanufacturer:_,drugmanufacturers:h,selectorList:m,timerSkeleton:g,initialLettersDrugmanufName:v,orderNumberByDrugmanufact:C,referencePointOfSale:f,drug_manufacturer_id:y,status:j,has_invoice:O,has_receipts:B,is_automatic:A,purchase_failure:M,automatic_purchase_error:x.O1?I:null}):(0,d.jsx)("div",{className:R().container,children:(0,d.jsx)(D.Z,{children:(0,d.jsx)(b(),{href:"/".concat(null==z?void 0:null===(r=z.client)||void 0===r?void 0:r.id,"/").concat(et),className:"".concat(es," ").concat(R()["container-link"]),onClick:()=>{m.tag===i.typeOne?localStorage.setItem("urlRedirect",et):localStorage.setItem("urlRedirect","")},children:(0,d.jsx)(k.Z,{xs:24,className:es,children:(0,d.jsxs)("div",{className:R()["wrapper-card"],children:[(0,d.jsxs)(N.Z,{className:R()["panel-card"],children:[g?(0,d.jsx)(Skeletons_Skeletons,{width:32,height:12,animation:"wave"}):(0,d.jsxs)("div",{className:R()["header-wrapper"],children:[(0,d.jsxs)("p",{className:R()["text-date-time"],children:[q===H.s.US&&Z()(t).format("MMM D, YYYY - hh:mm A"),q!==H.s.US&&Z()(t).format("D [de] MMMM YYYY - HH:mm [hs]")]}),(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"flex-end",marginRight:"56px"},children:[A&&(0,d.jsx)(PurchaseModeIcon,{variant:M?"error":"primary"}),(null==j?void 0:j.id)&&!T&&(0,d.jsx)(StatusBadge_StatusBadge,{statusId:j.id}),A&&M&&(0,d.jsx)(Badge_Badge,{label:"Fall\xf3"}),A&&M&&eo&&(0,d.jsx)(RetryButton,{}),T?(0,d.jsxs)("p",{className:R()["label-in_process"],children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,d.jsx)("path",{d:"M7.33333 6.4V4C7.33333 3.81111 7.26944 3.65278 7.14167 3.525C7.01389 3.39722 6.85556 3.33333 6.66667 3.33333C6.47778 3.33333 6.31944 3.39722 6.19167 3.525C6.06389 3.65278 6 3.81111 6 4V6.65C6 6.73889 6.01667 6.825 6.05 6.90833C6.08333 6.99167 6.13333 7.06667 6.2 7.13333L8.4 9.33333C8.52222 9.45556 8.67778 9.51667 8.86667 9.51667C9.05556 9.51667 9.21111 9.45556 9.33333 9.33333C9.45556 9.21111 9.51667 9.05556 9.51667 8.86667C9.51667 8.67778 9.45556 8.52222 9.33333 8.4L7.33333 6.4ZM6.66667 13.3333C5.74444 13.3333 4.87778 13.1583 4.06667 12.8083C3.25556 12.4583 2.55 11.9833 1.95 11.3833C1.35 10.7833 0.875 10.0778 0.525 9.26667C0.175 8.45556 0 7.58889 0 6.66667C0 5.74444 0.175 4.87778 0.525 4.06667C0.875 3.25556 1.35 2.55 1.95 1.95C2.55 1.35 3.25556 0.875 4.06667 0.525C4.87778 0.175 5.74444 0 6.66667 0C7.58889 0 8.45556 0.175 9.26667 0.525C10.0778 0.875 10.7833 1.35 11.3833 1.95C11.9833 2.55 12.4583 3.25556 12.8083 4.06667C13.1583 4.87778 13.3333 5.74444 13.3333 6.66667C13.3333 7.58889 13.1583 8.45556 12.8083 9.26667C12.4583 10.0778 11.9833 10.7833 11.3833 11.3833C10.7833 11.9833 10.0778 12.4583 9.26667 12.8083C8.45556 13.1583 7.58889 13.3333 6.66667 13.3333ZM6.66667 12C8.14444 12 9.40278 11.4806 10.4417 10.4417C11.48
106 9.40278 12 8.14444 12 6.66667C12 5.18889 11.4806 3.93056 10.4417 2.89167C9.40278 1.85278 8.14444 1.33333 6.66667 1.33333C5.18889 1.33333 3.93056 1.85278 2.89167 2.89167C1.85278 3.93056 1.33333 5.18889 1.33333 6.66667C1.33333 8.14444 1.85278 9.40278 2.89167 10.4417C3.93056 11.4806 5.18889 12 6.66667 12Z",fill:"#0056B0"})}),(0,p.t)("orderInProcess.label")]}):!1===S&&(0,d.jsx)("p",{className:R().shortage,children:(0,p.t)("comparative.withFaultsText")})]})]}),g?(0,d.jsx)(Skeletons_Skeletons,{width:160,height:14,animation:"wave"}):m.tag===i.typeOne&&(0,d.jsxs)("p",{className:R()["text-order-number"],children:["# ",a]})||m.tag===i.typeTwo&&(0,d.jsxs)("p",{className:R()["text-order-number"],children:["# ",C]}),g?(0,d.jsx)(Skeletons_Skeletons,{width:120,height:12,animation:"wave"}):(0,d.jsxs)("div",{className:R()["row-container-name"],children:[f&&(0,d.jsx)("span",{className:R()["text-subtitle"],children:n}),(0,d.jsx)("span",{className:R()["text-drugmanufactur-title"],children:f||n})]}),g?(0,d.jsx)(Skeletons_Skeletons,{width:120,height:12,animation:"wave"}):!!s&&(0,d.jsx)("p",{className:R()["text-no-medicinals"],children:s}),(0,d.jsxs)("div",{className:R()["container-footer"],children:[(0,d.jsxs)(k.Z,{xs:8,children:[m.tag===i.typeOne&&(0,d.jsx)(MyOrdersList_MyOrdersList,{drugmanufacturers:h,timerSkeleton:g,initialLettersDrugmanufName:v}),m.tag===i.typeTwo&&(0,d.jsx)(OrdersByDrugmanufacturer_OrdersByDrugmanufacturer,{image:_,name:u,timerSkeleton:g,drug_manufacturer_id:y,ca_total_credit:V})]}),(0,d.jsxs)("div",{className:R()["wrapper-footer"],children:[(0,d.jsx)(k.Z,{xs:8,children:(0,d.jsx)("div",{className:R()["avatar-container-wrapper"],children:g?(0,d.jsx)(Skeletons_Skeletons,{width:100,height:14,animation:"wave"}):(0,d.jsx)("p",{className:R()["total-value"],children:en})})}),(0,d.jsx)(k.Z,{xs:5,children:(0,d.jsx)(P.Z,{placement:"bottom",speaker:(0,d.jsx)(L.Z,{className:R()["client-tooltip-label"],children:c}),children:g?(0,d.jsx)(Skeletons_Skeletons,{width:24,height:24,animation:"wave",variant:"circular"}):(0,d.jsx)(F.Z,{size:"sm",circle:!0,className:R()["avatar-icon"],style:{backgroundColor:Y?"#FFF4D9":$,color:Y?"#A16205":X},children:o})})})]})]})]}),(0,d.jsx)("div",{className:R()["icon-arrow"],children:(0,d.jsx)(E.Z,{className:R().icon})})]})})})})})},et=t(36319),ea=t(98407),en=JSON.parse('{"asoprofarma":"asoprofarma.png","disval":"disval.png","20 de junio":"20dejunio.png","droguer\xeda sur":"drogueriasur.png","monroe americana":"monroe.png","acofar":"acofar.png","cofarsur":"cofarsur.png","droguer\xeda del sud":"drogueriadelsud.png","kellerhoff":"kellerhoff.png","suizo argentina":"suizo.png","cofaloza":"cofaloza.png","cofaral":"cofaral.png","casamarzam":"casamarzam.png","cofarmen":"cofarmen.png","suiza de tucum\xe1n":"dsuizo.png","fanasa":"fanasa.png","jufec":"jufec.png","levic":"levic.png","medicinarosario":"medicinarosario.png","nadro":"nadro.png","coop. farmaceutica del litoral ltda.":"cofalit.png"}');let addImageManufactured=(e,r)=>{let t="/assets/images/";switch(r){case"orders":return null==e?void 0:e.map(e=>{let{name:r,id:a}=e,n=r;r.includes("/")&&(n=r.split("/")[0].trim());let l=en[n.toLowerCase()],i=l?"".concat(t).concat(l):null;return{id:a,name:r,image:i}});case"list":{if(!e)return{id:"",name:"",image:""};let{name:r,id:a}=e,n=r;r.includes("/")&&(n=r.split("/")[0].trim());let l=en[n.toLowerCase()],i=l?"".concat(t).concat(l):null;return{id:a,name:r,image:i}}}};var el=t(81977),ei=t.n(el),eo=t(57712),MyOrdersList_MyOrdersList=e=>{let{drugmanufacturers:r,timerSkeleton:t,initialLettersDrugmanufName:a}=e;return(0,d.jsx)("div",{children:(0,d.jsxs)(et.Z,{stack:!0,children:[!!r&&(null==r?void 0:r.length)>0&&r.filter((e,r)=>r<4).map((e,r)=>{let a=addImageManufactured(e,"list");return(0,d.jsx)(P.Z,{placement:"bottom",speaker:(0,d.jsx)(L.Z,{className:ei()["drug-tooltip-label"],children:a.name}),children:t?(0,d.jsx)(Skeletons_Skeletons,{width:24,height:24,animation:"wave",variant:"circular"}):(0,d.jsx)(F.Z,{circle:!0,size:"sm",className:a.id===+x.Y7?ei()["not-image-avatar-extendeal-plus"]:ei()["not-image-avatar"],children:(0,d.jsx)("span",{className:a.id===+x.Y7?ei()["not-image-text-extendeal-plus"]:ei()["not-image-text"],children:(0,eo.Z)(a.name,!1,a.id)})})},r)}),(null==r?void 0:r.length)-4>0&&(0,d.jsx)(P.Z,{placement:"bottomStart",speaker:(0,d.jsx)(ea.Z,{arrow:!1,className:ei()["wrapper-popover"],children:!!r&&r.length>0&&r.slice(-(r.length-4)).map((e,r)=>(0,d.jsxs)("div",{className:ei()["popover-container"],children:[4-r>4&&(0,d.jsx)("div",{className:ei()["line-container"],children:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"130",height:"2",viewBox:"0 0 130 2",fill:"none",children:(0,d.jsx)("path",{d:"M0 1H130",stroke:"#E0E1E9","stroke-width":"0.5"})})}),(0,d.jsxs)("div",{style:{display:"flex"},children:[(0,d.jsx)(F.Z,{circle:!0,size:"sm",className:e.id===+x.Y7?ei()["not-image-avatar-extendeal-plus"]:ei()["not-image-avatar-list"],children:(0,d.jsx)("span",{className:e.id===+x.Y7?ei()["not-image-text-extendeal-plus"]:ei()["not-image-text"],children:(0,eo.Z)(e.name,!1,e.id)})}),(0,d.jsxs)("p",{className:ei()["popover-text"],children:[e.name," "]})]})]},r))}),children:t?(0,d.jsx)(Skeletons_Skeletons,{animation:"wave",variant:"circular",width:24,height:24}):(0,d.jsx)(F.Z,{className:ei()["avatar-moreQuantity"],children:(0,d.jsxs)("span",{className:ei().text_avatarMoreQuantity,children:["+",(0,p.t)("orderList.moreDrugManufacturerText",{value:r.length-4})]})})})]})})},es=t(75691),ed=t.n(es),ec=t(44645),eu=t.n(ec),ep=t(5648),OrdersByDrugmanufacturer_C
1ommercialAgreementCreditBadge=e=>{let{caTotalCredit:r,className:t}=e,a=(0,ep.m)({value:r,digitsValidation:7});return r?(0,d.jsx)("span",{className:t,children:(0,p.t)("creditAmount",{value:null==a?void 0:a.fullValue})}):null},OrdersByDrugmanufacturer_OrdersByDrugmanufacturerExtendealPlus=e=>{let{image:r,name:t,timerSkeleton:a,drug_manufacturer_id:n,ca_total_credit:l}=e;return(0,d.jsxs)("div",{className:eu()["wrapper-by-orders"],children:[(0,d.jsx)("div",{children:a?(0,d.jsx)(Skeletons_Skeletons,{animation:"wave",variant:"circular",width:24,height:24}):(0,d.jsx)(F.Z,{className:eu().name_avatarDrug,children:(0,d.jsx)("span",{className:eu().text_nameAvatarDrug,children:(0,eo.Z)(t,!1,n)})})}),a?(0,d.jsx)(Skeletons_Skeletons,{animation:"wave"}):(0,d.jsx)("p",{className:eu()["text-by-orders"],children:(0,d.jsxs)("span",{className:eu()["name-wrapper"],children:[t,(0,d.jsx)(OrdersByDrugmanufacturer_CommercialAgreementCreditBadge,{caTotalCredit:l,className:eu()["badge-credit"]})]})})]})},OrdersByDrugmanufacturer_OrdersByDrugmanufacturer=e=>{let{image:r,name:t,timerSkeleton:a,drug_manufacturer_id:n,ca_total_credit:l}=e;return n===+x.Y7?(0,d.jsx)(OrdersByDrugmanufacturer_OrdersByDrugmanufacturerExtendealPlus,{image:r,name:t,timerSkeleton:a,drug_manufacturer_id:n,ca_total_credit:l}):(0,d.jsxs)("div",{className:ed()["wrapper-by-orders"],children:[(0,d.jsx)("div",{children:a?(0,d.jsx)(Skeletons_Skeletons,{animation:"wave",variant:"circular",width:24,height:24}):(0,d.jsx)(F.Z,{className:ed().name_avatarDrug,children:(0,d.jsx)("span",{className:ed().text_nameAvatarDrug,children:(0,eo.Z)(t,!1,n)})})}),a?(0,d.jsx)(Skeletons_Skeletons,{animation:"wave"}):(0,d.jsx)("p",{className:ed()["text-by-orders"],children:(0,d.jsxs)("span",{className:ed()["name-wrapper"],children:[t,(0,d.jsx)(OrdersByDrugmanufacturer_C
1ommercialAgreementCreditBadge,{caTotalCredit:l,className:ed()["badge-credit"]})]})})]})},EmptyOrderCard_EmptyOrderCard=()=>(0,d.jsx)(OrderCards_OrderCards,{dateTime:"",orderNumber:"",drugmanufactur:"",value:"",avatar:"",noMedicinals:"",referencePointOfSale:null,client:"",selectorList:"",drugmanufacturers:[],imageOneDrugmanufacturer:"",oneDrugmanufacturerName:"",timerSkeleton:!0,initialLettersDrugmanufName:"",orderNumberByDrugmanufact:""}),e_=t(69971),eh=t.n(e_),em=t(57324),ex=t.n(em),eg=t(34736),ev=t(80172),eC=t(53130),ef=t(41785),ew=t(62465),ey=t.n(ew);let currencyTotal_currencyFormatter=e=>new Intl.NumberFormat("es-AR",{maximumFractionDigits:2,minimumFractionDigits:2}).format(e);var ej=t(19791),Body_BodyDeliveries=function(e){var r,t,a,n;let{order_deliveries:l}=e,{t:i}=(0,g.$G)(),{user:o}=(0,w.aF)({}),s=currencyTotal_currencyFormatter(null==l?void 0:null===(r=l.ca_grouped_credit)||void 0===r?void 0:r.total),c=currencyTotal_currencyFormatter(null==l?void 0:null===(t=l.ca_grouped_increment)||void 0===t?void 0:t.total),u=currencyTotal_currencyFormatter(null==l?void 0:l.total_with_adjustments),p=currencyTotal_currencyFormatter(null==l?void 0:l.purchased_products_total_price),_=(null==l?void 0:l.purchased_products)>1?"".concat(null==l?void 0:l.purchased_products," ").concat(x.$f?i("efficientPurchasing.comparative.labelFooterProducts"):"productos"):"".concat(null==l?void 0:l.purchased_products," ").concat(x.$f?i("efficientPurchasing.comparative.labelFooterProduct"):"producto"),h=(null==l?void 0:l.purchased_products_quantity)+((null==l?void 0:l.free_unit_products_quantity)||0),m=h>1?"".concat(h," ").concat(x.$f?i("myOrders.labelUnits"):"unidades"):"".concat(h," ").concat(x.$f?i("myOrders.labelUnit"):"unidad"),v=(null==l?void 0:l.products_quantity)+((null==l?void 0:l.free_unit_products_quantity)||0),C=v>1?"".concat(v," ").concat(x.$f?i("myOrders.labelUnits"):"unidades"):"".concat(v," ").concat(x.$f?i("myOrders.labelUnit"):"unidad");return(0,d.jsxs)(k.Z,{xs:24,children:[(0,d.jsxs)(D.Z,{style:{fontSize:12,color:"#6B6F93"},children:[(0,d.jsxs)(k.Z,{xs:24,sm:12,children:[(0,d.jsx)("div",{className:ey().title,style:{fontWeight:700,color:"#282A3C",fontSize:14},children:i("myOrders.labelTotal")}),(0,d.jsxs)("p",{children:[(0,d.jsx)("span",{className:ey().product_quantity,children:_})," ",(0,d.jsxs)("span",{className:ey().unit_quantity,children:[" ","| ".concat((null==l?void 0:l.purchased_products_quantity)?m:C,"\n                            ")]})]})]}),(0,d.jsx)(k.Z,{xs:24,sm:12,style:{display:"flex",justifyContent:"flex-end",fontWeight:700,color:"#282A3C",fontSize:14},children:i("myOrders.cardDeliveriesBody.totalPriceProducts",{valueMoney:p})})]}),((null==l?void 0:l.credit_for_agreements)>0||(null==l?void 0:l.ca_grouped_credit)!=null||(null==l?void 0:l.ca_grouped_increment)!=null)&&(null==o?void 0:o.role_id)!==ef.uU.Buyer&&(0,d.jsxs)(D.Z,{style:{marginTop:8},children:[(0,d.jsxs)(k.Z,{xs:24,sm:12,style:{fontSize:12,color:"#6B6F93",display:"flex",flexDirection:"column",gap:4},children:[(null==l?void 0:l.ca_grouped_credit)!=null&&(0,d.jsxs)("div",{children:[x.$f?i("myOrders.labelAgreementsAndCredit"):"Cr\xe9dito por acuerdos",(null==l?void 0:null===(a=l.ca_grouped_credit)||void 0===a?void 0:a.percentage)!=null&&(0,d.jsxs)("span",{children:[" ( - ",l.ca_grouped_credit.percentage,"%)"]})]}),(null==l?void 0:l.ca_grouped_increment)!=null&&(0,d.jsxs)("div",{children:["Incremento por acuerdos",(null==l?void 0:null===(n=l.ca_grouped_increment)||void 0===n?void 0:n.percentage)!=null&&(0,d.jsxs)("span",{children:[" ( + ",l.ca_grouped_increment.percentage,"%)"]})]}),((null==l?void 0:l.ca_grouped_credit)!=null||(null==l?void 0:l.ca_grouped_increment)!=null)&&(0,d.jsx)("div",{className:ey().totalAgreements,children:"Total con descuentos e incrementos por acuerdos"})]}),(0,d.jsxs)(k.Z,{xs:24,sm:12,style:{display:"flex",flexDirection:"column",alignItems:"flex-end",fontWeight:700,color:"#6B6F93",fontSize:14},children:[(null==l?void 0:l.ca_grouped_credit)!=null&&(0,d.jsx)("span",{children:i("myOrders.cardDeliveriesBody.creditForAgreements",{valueMoney:s})}),(null==l?void 0:l.ca_grouped_increment)!=null&&(0,d.jsx)("span",{children:"$ ".concat(c)}),((null==l?void 0:l.ca_grouped_credit)!=null||(null==l?void 0:l.ca_grouped_increment)!=null)&&(0,d.jsx)("span",{children:"$ ".concat(u)})]})]}),l.payment_method_name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(D.Z,{children:(0,d.jsx)(eC.Z,{style:{margin:"8px"}})}),(0,d.jsx)(D.Z,{children:(0,d.jsx)(k.Z,{xs:24,children:(0,d.jsxs)("div",{className:ey().label,children:[(0,d.jsx)(ej.Z,{className:ey().icon}),(0,d.jsx)("span",{children:i("paymentMethodSelection.label")}),(0,d.jsx)("span",{className:ey().paymentMethod,children:l.payment_method_name})]})})})]})]})}
1,eb=t(3041),eS=t(19310),DetailsDeliveries_Footer=function(e){var r;let{delivery_id:t,order_number:a}=e,{t:n}=(0,g.$G)(),{user:l}=(0,w.aF)({}),i=(0,u.useRouter)(),{savePrevUrl:o,urlPrev:s}=(0,eb.R)(),handleOrderDetail=()=>{var e;f.B({action:"button__order-detail",category:"my-orders",label:"button__order-detail",value:0,client_id:null==l?void 0:null===(e=l.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==l?void 0:l.role_id)})};return(0,d.jsx)(k.Z,{xs:24,sm:24,style:{display:"flex",justifyContent:"flex-end"},children:(0,d.jsx)(b(),{href:"/".concat(null==l?void 0:null===(r=l.client)||void 0===r?void 0:r.id,"/my-orders/deliveries/").concat(t,"/").concat(a),onClick:()=>{handleOrderDetail(),o(i.asPath)},children:(0,d.jsx)(eS.oe,{icon:"",text:x.$f?n("myOrders.labelshowDetails"):"Ver detalle",width:88,height:32,detailType:!0,disabled:!1,gtagClass:"button__order-detail"})})})},eD=t(36471),ek=t.n(eD),eN=t(41120),eP=t(43281);let eL=(0,eN.Z)(e=>({title:{fontSize:(0,eP.hO)("32px"),color:e.palette.neutral[900],textAlign:"center",fontWeight:600,fontFamily:"Source Sans Pro"},headerWrapper:{paddingLeft:(0,eP.hO)("20px"),paddingTop:"16px"},headerBoxShadows:{boxShadow:"0px 2px 6px #00000040"},newSubtitleTotalResume:{color:"#40435B",fontFamily:"Source Sans Pro",fontSize:18,fontWeight:700},drugManufacturerListItemWrapper:{width:"100%",boxShadow:"".concat(e.shadows[1]),borderTop:"".concat((0,eP.hO)("4px")," solid  #0171E6"),padding:"".concat((0,eP.hO)("17px")," ").concat((0,eP.hO)("32px")),borderRadius:(0,eP.hO)("4px")},gridContainer:{borderBottom:r=>{let{EX4904:t}=r;return t?"":"".concat((0,eP.hO)("2px")," solid ").concat(e.palette.neutral[500])},padding:e=>{let{EX4904:r}=e;return r?"":"10px 0px 10px 0px"}},gridContainerNew:{backgroundColor:"#ACAEC4",height:"0.5px",width:"100%",padding:"16px 0px"},orderSummaryWrapper:{position:"relative",width:"100%",backgroundColor:"".concat((0,eP.m4)(e.palette.neutral[300],.5)),borderRadius:(0,eP.hO)("8px"),padding:"".concat((0,eP.hO)("16px")," ").concat((0,eP.hO)("20px")),minWidth:(0,eP.hO)("370px")},wrapperContainer:{position:"fixed",maxWidth:544,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},newOrderSummaryWrapper:{width:"100%",backgroundColor:"#E3ECFF",borderRadius:"8px 8px 0px 0px",padding:"".concat((0,eP.hO)("16px")," ").concat((0,eP.hO)("20px")),minWidth:(0,eP.hO)("370px")},bottomSummaryWrapper:{position:"relative",bottom:-12},cardPercentageContainer:{padding:" 1px 12px 2px 12px",borderRadius:" 20px",backgroundColor:" rgba(1, 113, 230, 0.15)",marginRight:" 8px",marginLeft:" 8px"},newCardPercentageContainer:{borderRadius:4,border:"0.5px solid #BED0E5",background:"#F0F5FF",display:"flex",padding:"2px 8px",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",marginRight:8},alertWrapper:{position:"absolute",bottom:(0,eP.hO)("-96px"),left:0,right:0},fullQuantity:{color:"#6B6F93",fontSize:14,fontWeight:600},totalQuantity:{color:"#6B6F93",fontSize:14,fontWeight:400},subtitleTotalResume:{color:"#40435B",fontFamily:"Source Sans Pro",fontSize:16,fontWeight:600},totalQuantityPrice:{color:"#6B6F93",fontFamily:"Source Sans Pro",fontSize:14,fontWeight:600},panelContainer:{borderTop:"2px solid  #0171E6",borderRadius:8,background:"white","&.rs-panel-body":{padding:"0px !important"}},titleNewResume:{color:"#40435B",fontSize:20,fontWeight:600,position:"fixed",paddingLeft:20},titleNew:{color:"#40435B",fontSize:20,fontWeight:600},panelLine:{borderTop:"0.5px solid #ACAEC4 !important",marginBottom:"16px !important"},avatar:{width:32,height:32,background:"#EBF5FF",color:"#0171E6",fontSize:12,fontWeight:600,textTransform:"uppercase",marginRight:8},price:{color:"#40435B",fontSize:16,fontWeight:700},decimals:{color:"#40435B",fontSize:12,fontWeight:700},secondPrice:{color:"#40435B",fontSize:16,fontWeight:600},secondDecimals:{color:"#40435B",fontSize:12,fontWeight:600},lineTotal:{width:464,height:2,backgroundColor:"red"},tooltip:{marginLeft:4,display:"flex",alignItems:"center",justifyContent:"center",position:"relative",top:"-1px"},truncate:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"280px",display:"block",fontWeight:400},drugManufacturerName:{display:"flex",justifyContent:"center",alignItems:"center",gap:8,fontWeight:400,fontSize:16,color:"#E22E2E"},tagFreeQuantity:{borderRadius:4,border:"0.5px solid #DDF6E2",background:"#EBF9F3",display:"flex",padding:"0px 4px",justifyContent:"center",alignItems:"center"},textTagFreeQuantity:{color:"#40435B",fontSize:12,fontStyle:"normal",fontWeight:400,marginLeft:4},textFreeQuantity:{color:"#07AD4B",fontSize:14,fontWeight:600},containerNameChipDelivery:{textTransform:"uppercase",marginRight:"8px",flexDirection:"row",display:"flex",alignItems:"center"}}));var eO=t(41545),eF=t.n(eO),eE=t(49720),eB=t(87214);let ProductNameWithBadge=e=>{let{description:r,badgeText:t,has2x1:a}=e,n=(0,c.useRef)(null),[l,i]=(0,c.useState)(!1);(0,c.useLayoutEffect)(()=>{let e=n.current;e&&i(e.scrollHeight>e.clientHeight+1)},[r,l]);let o=(0,eE.M)(r);return(0,d.jsxs)("div",{className:eF()["wrapper-stacked"],children:[(0,d.jsx)(V.D,{text:o,placement:"top",trigger:"hover",width:"400px",minWidth:"400px",marginTop:-4,fontSize:12,textAlign:"left",padding:"4px 12px",customStyle:{height:"44px",fontWeight:400,lineHeight:"18px"},disabled:!l,children:(0,d.jsx)("div",{className:eF()["name-container"],children:(0,d.jsx)("p",{ref:n,className:eF()["text-stacked"],children:o})})}),a&&(0,d.jsx)("span",{className:eF()["badge-below"],children:(0,d.jsx)(eB.Z,{text:t})})]})};var eR=t(60171);let getQuantityLabel=e=>e>1?x.$f?(0,p.t)("myOrders.labelUnits"):"unidades":x.$f?(0,p.t)("myOrders.labelUnit"):"unidad",ProductRow=e=>{let{product:r,classes:t,isTransfers:a=!1}=e;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(D.Z,{className:ek()["product-row"],children:[(0,d.jsxs)(k.Z,{sm:12,md:8,lg:12,children:[(0,d.jsx)("p",{className:ek()["product-barco
1de"],children:null==r?void 0:r.barcode}),(0,d.jsx)(ProductNameWithBadge,{description:null==r?void 0:r.description,badgeText:null==r?void 0:r.applied_offer_label,has2x1:!!(null==r?void 0:r.applied_offer_label)})]}),(0,d.jsx)(k.Z,{sm:24,md:8,lg:5,className:ek()["product-count"],style:{justifyContent:"flex-end",fontSize:14,fontWeight:400,color:"#282A3C"},children:"".concat(null==r?void 0:r.quantity," ").concat(getQuantityLabel(null==r?void 0:r.quantity))}),(0,d.jsxs)(k.Z,{sm:12,md:8,lg:7,className:"".concat(ek()["product-total-stacked"]).concat(a?" ".concat(ek()["product-total-stacked-top"]):""),children:[(0,d.jsx)("p",{children:(0,p.t)("myOrders.orderDetails.currencySymbol",{valueMoney:currencyTotal_currencyFormatter(null==r?void 0:r.total)})}),!a&&!!(null==r?void 0:r.applied_offer_label)&&!!(null==r?void 0:r.total_price_without_discount)&&(0,d.jsx)("p",{className:ek()["product-price-without-discount"],children:(0,p.t)("myOrders.orderDetails.currencySymbol",{valueMoney:currencyTotal_currencyFormatter(null==r?void 0:r.total_price_without_discount)})})]})]}),(null==r?void 0:r.free_quantity)>0&&(0,d.jsxs)(D.Z,{className:ek()["product-row"],children:[(0,d.jsxs)(k.Z,{sm:12,md:8,lg:12,children:[(0,d.jsx)("p",{className:ek()["product-name"],children:null==r?void 0:r.description}),(0,d.jsx)("p",{className:ek()["product-code"],children:null==r?void 0:r.barcode})]}),(0,d.jsx)(k.Z,{sm:24,md:8,lg:5,className:ek()["product-count"],children:"".concat(null==r?void 0:r.free_quantity," ").concat(getQuantityLabel(null==r?void 0:r.free_quantity))}),(0,d.jsx)(k.Z,{sm:12,md:8,lg:7,className:ek()["product-count"],children:(null==r?void 0:r.free_quantity)>0&&(0,d.jsx)("p",{className:t.textFreeQuantity,children:"GRATIS"})})]})]})},groupProductsByLaboratory=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=[],t=new Map;return e.forEach(e=>{var a;let n=(null==e?void 0:null===(a=e.laboratory)||void 0===a?void 0:a.trim())||"";if(!t.has(n)){t.set(n,r.length),r.push({laboratory:n,products:[e]});return}r[t.get(n)].products.push(e)}),r};var ListProducts_ListProducts=function(e){let{products:r,drugManufacturerId:t}=e,a=eL({EX4904:!0}),n=Number(t)===eR.E.Transfers,l=(0,c.useMemo)(()=>n?groupProductsByLaboratory(null!=r?r:[]):[],[n,r]);return n?(0,d.jsx)(d.Fragment,{children:l.map(e=>(0,d.jsxs)("div",{className:ek()["laboratory-group"],children:[!!e.laboratory&&(0,d.jsx)("p",{className:ek()["laboratory-header"],children:e.laboratory}),e.products.map((e,r)=>(0,d.jsx)(c.Fragment,{children:(0,d.jsx)(ProductRow,{product:e,classes:a,isTransfers:!0})},"".concat(null==e?void 0:e.barcode,"-").concat(r)))]},e.laboratory||"without-lab"))}):(0,d.jsx)(d.Fragment,{children:(null!=r?r:[]).map((e,r)=>(0,d.jsx)(c.Fragment,{children:(0,d.jsx)(ProductRow,{product:e,classes:a})},"".concat(null==e?void 0:e.barcode,"-").concat(r)))})};let handleFilename=e=>{if(!e)return null;{let r=null==e?void 0:e.split("/"),t=r[(null==r?void 0:r.length)-1];return t}};var eT=t(63171),eZ=t(93007),eA=t.n(eZ);(n=o||(o={})).MANUAL="Manual delivery",n.AUTOMATIC="automatic";var eM=t(82627),DeliveryNumber_DeliveryNumber=e=>{let{text:r,label:t,hash:a,containerClassName:n,labelClassName:l,deliveryNumberClassName:i,location:o}=e;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:n,children:[(0,d.jsx)(V.D,{text:r,width:"200px",minWidth:"0px",marginTop:10,placement:"bottom",trigger:"hover",children:(0,d.jsx)(eM.Z,{})}),(0,d.jsx)("p",{className:l,children:t})," ",!!o&&(0,d.jsx)("span",{children:a})]}),!o&&(0,d.jsx)("div",{className:i,children:(0,d.jsx)("p",{children:a})})]})},eI=t(18586),eH=t(76470),hooks_useTooltipError=e=>{let{typeError:r}=e,t=(0,c.useRef)(null),[a,n]=(0,c.useState)("insufficientCredit.label.viewErrorReason"),[l,i]=(0,c.useState)(null),[o,s]=(0,c.useState)("#E22E2E"),[u,_]=(0,c.useState)(eI.Cf);return(0,c.useEffect)(()=>{if(r){var e;(null==r?void 0:null===(e=r.cause)||void 0===e?void 0:e.id)===eH.Q.CREDIT_LIMIT_REACHED?i((0,d.jsxs)("p",{children:[(0,p.t)("efficientPurchasing.errorSuccessOrder.errorReason"),(0,d.jsx)("br",{}),(0,p.t)("insufficientCredit.tooltip.drugstoreErrorInsufficientCredit")]})):i((0,d.jsxs)("p",{children:[(0,p.t)("efficientPurchasing.errorSuccessOrder.errorReason"),(0,d.jsx)("br",{}),null==r?void 0:r.user_message]}))}},[r]),(0,c.useEffect)(()=>{var e;let checkScroll=()=>{(null==t?void 0:t.current)&&t.current.close()},r=null===(e=document)||void 0===e?void 0:e.getElementById("content-id");if(r)return null==r||r.addEventListener("scroll",checkScroll),()=>{null==r||r.removeEventListener("scroll",checkScroll)}},[t]),{alertIconRef:t,textError:a,textTootip:l,color:o,icon:u}},eW=t(32261),eV=t.n(eW),TooltipError_TooltipError=e=>{let{typeError:r}=e,{alertIconRef:t,textError:a,textTootip:n,color:l,icon:i}=hooks_useTooltipError({typeError:r});return(0,d.jsxs)("div",{className:eV().container,children:[(0,d.jsx)(P.Z,{ref:t,trigger:"hover",placement:"bottomStart",controlId:"control-id-".concat(n),speaker:(0,d.jsx)(L.Z,{className:eV().root,style:{marginTop:4,textAlign:"left"},children:n}),children:(0,d.jsx)("span",{className:eV()["alert-icon"],style:{color:l},ref:t,children:i})}),(0,d.jsx)("p",{className:eV()["error-text"],style:{color:l},children:(0,p.t)(a)})]})};(l=s||(s={}))[l.IN_PROGRESS=1]="IN_PROGRESS",l[l.SENT=2]="SENT",l[l.NOT_SENT=3]="NOT_SENT",l[l.MANUAL_SENT=4]="MANUAL_SENT",l[l.ACCEPTED=5]="ACCEPTED",l[l.REJECTED=6]="REJECTED",l[l.PROCESSESING_ORDER=7]="PROCESSESING_ORDER";var ez=t(2466),eq=t(14850),eU=t.n(eq);let eG=(0,eN.Z)(e=>({title:{fontSize:(0,eP.hO)("32px"),color:e.palette.neutral[900],textAlign:"center",fontWeight:600,fontFamily:"Source Sans Pro"},headerWrapper:{paddingLeft:(0,eP.hO)("20px"),paddingTop:"16px"},headerBoxShadows:{boxShadow:"0px 2px 6px #00000040"},newSubtitleTotalResume:{color:"#40435B",fontFamily:"Source Sans Pro",fontSize:18,fontWeight:700},drugManufacturerListItemWrapper:{width:"100%",boxShadow:"".concat(e.shadows[1]),borderTop:"".concat((0,eP.hO)("4px")," solid  #0171E6"),padding:"".concat((0,eP.hO)("17px")," ").concat((0,eP.hO)("32px")),borderRadius:(0,eP.hO)("4px")},gridContainer:{borderBottom:r=>{let{EX4904:t}=r;return t?"":"".concat((0,eP.hO)("2px")," solid ").concat(e.palette.neutral[500])},padding:e=>{let{EX4904:r}=e;return r?"":"10px 0px 10px 0px"}}
1,gridContainerNew:{backgroundColor:"#ACAEC4",height:"0.5px",width:"100%",padding:"16px 0px"},orderSummaryWrapper:{position:"relative",width:"100%",backgroundColor:"".concat((0,eP.m4)(e.palette.neutral[300],.5)),borderRadius:(0,eP.hO)("8px"),padding:"".concat((0,eP.hO)("16px")," ").concat((0,eP.hO)("20px")),minWidth:(0,eP.hO)("370px")},wrapperContainer:{position:"fixed",maxWidth:544,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},newOrderSummaryWrapper:{width:"100%",backgroundColor:"#E3ECFF",borderRadius:"8px 8px 0px 0px",padding:"".concat((0,eP.hO)("16px")," ").concat((0,eP.hO)("20px")),minWidth:(0,eP.hO)("370px")},bottomSummaryWrapper:{position:"relative",bottom:-12},cardPercentageContainer:{padding:" 1px 12px 2px 12px",borderRadius:" 20px",backgroundColor:" rgba(1, 113, 230, 0.15)",marginRight:" 8px",marginLeft:" 8px"},newCardPercentageContainer:{borderRadius:4,border:"0.5px solid #BED0E5",background:"#F0F5FF",display:"flex",padding:"2px 8px",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",marginRight:8},alertWrapper:{position:"absolute",bottom:(0,eP.hO)("-96px"),left:0,right:0},fullQuantity:{color:"#6B6F93",fontSize:14,fontWeight:600},totalQuantity:{color:"#6B6F93",fontSize:14,fontWeight:400},subtitleTotalResume:{color:"#40435B",fontFamily:"Source Sans Pro",fontSize:16,fontWeight:600},totalQuantityPrice:{color:"#6B6F93",fontFamily:"Source Sans Pro",fontSize:14,fontWeight:600},panelContainer:{borderTop:"2px solid  #0171E6",borderRadius:8,background:"white","&.rs-panel-body":{padding:"0px !important"}},titleNewResume:{color:"#40435B",fontSize:20,fontWeight:600,position:"fixed",paddingLeft:20},titleNew:{color:"#40435B",fontSize:20,fontWeight:600},panelLine:{borderTop:"0.5px solid #ACAEC4 !important",marginBottom:"16px !important"},avatar:{width:32,height:32,background:"#EBF5FF",color:"#0171E6",fontSize:12,fontWeight:600,textTransform:"uppercase",marginRight:8},price:{color:"#40435B",fontSize:16,fontWeight:700},decimals:{color:"#40435B",fontSize:12,fontWeight:700},secondPrice:{color:"#40435B",fontSize:16,fontWeight:600},secondDecimals:{color:"#40435B",fontSize:12,fontWeight:600},lineTotal:{width:464,height:2,backgroundColor:"red"},tooltip:{marginLeft:4,display:"flex",alignItems:"center",justifyContent:"center",position:"relative",top:"-1px"},truncate:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"280px",display:"block",fontWeight:400},drugManufacturerName:{display:"flex",justifyContent:"center",alignItems:"center",gap:8,fontWeight:400,fontSize:16,color:"#E22E2E"},tagFreeQuantity:{borderRadius:4,border:"0.5px solid #DDF6E2",background:"#EBF9F3",display:"flex",padding:"0px 4px",justifyContent:"center",alignItems:"center"},textTagFreeQuantity:{color:"#40435B",fontSize:12,fontStyle:"normal",fontWeight:400,marginLeft:4},textFreeQuantity:{color:"#07AD4B",fontSize:14,fontWeight:600},containerNameChipDelivery:{textTransform:"uppercase",marginRight:"8px",flexDirection:"row",display:"flex",alignItems:"center"}}));var ExtendealPlusListProducts_ExtendealPlusListProducts=function(e){let{products:r}=e,{t}=(0,g.$G)(),{user:a}=(0,w.aF)({}),n=eG({EX4904:!0});return(0,d.jsx)(d.Fragment,{children:r.map((e,a)=>{let l=a===r.length-1,i=(null==e?void 0:e.free_quantity)>0;return(0,d.jsxs)(c.Fragment,{children:[(0,d.jsxs)(D.Z,{className:0===a?eU()["product-row-first"]:l&&!i?eU()["product-row-last"]:eU()["product-row"],children:[(0,d.jsxs)(k.Z,{sm:12,md:8,lg:12,children:[(0,d.jsx)("p",{className:eU()["product-code"],children:null==e?void 0:e.barcode}),(0,d.jsx)("p",{className:eU()["product-name"],children:(0,eE.M)(null==e?void 0:e.description)})]}),(0,d.jsx)(k.Z,{sm:24,md:8,lg:5,className:eU()["product-count"],children:"".concat(null==e?void 0:e.quantity," ").concat((null==e?void 0:e.quantity)>1?x.$f?t("myOrders.labelUnits"):"unidades":x.$f?t("myOrders.labelUnit"):"unidad")}),(0,d.jsx)(k.Z,{sm:12,md:8,lg:7,className:eU()["product-count"],children:t("myOrders.orderDetails.currencySymbol",{valueMoney:currencyTotal_currencyFormatter(null==e?void 0:e.total)})})]}),i&&(0,d.jsxs)(D.Z,{className:l?eU()["product-row-last"]:eU()["product-row"],children:[(0,d.jsxs)(k.Z,{sm:12,md:8,lg:12,children:[(0,d.jsx)("p",{className:eU()["product-name"],children:null==e?void 0:e.description}),(0,d.jsx)("p",{className:eU()["product-code"],children:null==e?void 0:e.barcode})]}),(0,d.jsx)(k.Z,{sm:24,md:8,lg:5,className:eU()["product-count"],children:"".concat(null==e?void 0:e.free_quantity," ").concat((null==e?void 0:e.free_quantity)>1?x.$f?t("myOrders.labelUnits"):"unidades":x.$f?t("myOrders.labelUnit"):"unidad")}),(0,d.jsx)(k.Z,{sm:12,md:8,lg:7,className:eU()["product-count"],children:(null==e?void 0:e.free_quantity)>0&&(0,d.jsx)("p",{className:n.textFreeQuantity,children:"GRATIS"})})]})]},(null==e?void 0:e.id)||a)})})},DetailsDeliveries_DetailsDeliveriesExtendealPlus=function(e){var r,t,a,n,l,i,_,h;let{order_deliveries:m,type:g,deliveryDetail:v}=e,{pathname:C}=(0,u.useRouter)(),{user:j}=(0,w.aF)({}),b="/[clientId]/my-orders/details/[order]"===C,S=b?g===o.MANUAL:(null==m?void 0:null===(r=m.delivery_status)||void 0===r?void 0:r.id)!==s.SENT;L.Z,S?x.$f&&(0,p.t)("myOrders.labelDownloadTxt"):x.$f&&(0,p.t)("myOrders.labelDownloadPdf");let N=(0,u.useRouter)(),{order:P}=N.query,E=S?null==m?void 0:m.order_file:null==m?void 0:m.order_pdf,B=null==m?void 0:m.drug_manufacturer.toLowerCase().includes("nadro");handleFilename(E);let getStatusBadgeConfig=e=>{switch(e){case 1:return{text:"En progreso",backgroundColor:"#E3F2FD",color:"#1976D2",borderColor:"#BBDEFB"};case 2:case 5:return{text:"Aceptada",backgroundColor:"var(--Semantic-Success-50, #EBF9F3)",color:"var(--Semantic-Success-600, #07AD4B)",borderColor:"#A5D6A7"};case 3:case 4:return{text:"Env\xedo manual",backgroundColor:"var(--Semantic-Warning-50, #FFF9E6)",color:"#9F7100",borderColor:"#FFF176"};case 6:return{text:"Rechazada",backgroundColor:"var(--Semantic-Error-50, #FFEBEB)",color:"var(--Semantic-Error-700, #C62828)",borderColor:"#FFCDD2"};case 7:return{text:"Procesando",backgroundColor:"#E8F5E8",color:"#2E7D32",borderColor:"#C8E6C9"};case 8:return{text:"Pagada",backgroundColor:"var(--Semantic-Success-100, #DDF6E2)",color:"var(--Semantic-Success-800, #146D3B)",borderColor:"#A5D6A7"};case 9:return{text:"Pr\xf3xima a vencer",backgroundColor:"var(--Semantic-Warning-100, #FFEA9F)",color:"var(--Secondary-800, #0B2033)",borderColor:"#FFF59D"};case 10:return{text:"Vencida",backgroundColor:"var(--Semantic-Error-100, #F8CBCB)",color:"var(--Semantic-Error-700, #C62828)",borderColor:"#FFCDD2"};default:return{text:"Desconocido",backgroundColor:"#F5F5F5",color:"#757575",borderColor:"#E0E0E0"}}},R=(0,c.useMemo)(()=>{var e;if(B&&(null==m?void 0:m.track_id)==="Llama a Nadro para reconfirmar")return{text:"Enviada: Llama a Nadro para reconfirmar",backgroundColor:"var(--Semantic-Error-50, #FFEBEB)",color:"var(--Semantic-Error-700, #C62828)",borderColor:"#FFCDD2"};let r=null==m?void 0:null===(e=m.delivery_status)||void 0===e?void 0:e.id;if(r===s.ACCEPTED)return getStatusBadgeConfig(5);if(r===s.PROCESSESING_ORDER)return getStatusBadgeConfig(7);if(r===s.REJECTED)return getStatusBadgeConfig(6);if(r===s.MANUAL_SENT)return getStatusBadgeConfig(4);if(r===s.SENT)return getStatusBadgeConfig(2);if(r===s.NOT_SENT)return getStatusBadgeConfig(3);
1if(r===s.IN_PROGRESS)return getStatusBadgeConfig(1);else if(8===r)return getStatusBadgeConfig(8);else if(9===r)return getStatusBadgeConfig(9);else if(10===r)return getStatusBadgeConfig(10);else if(S)return getStatusBadgeConfig(4);else return getStatusBadgeConfig(2)},[B,S,x.n9,null==m?void 0:null===(t=m.delivery_status)||void 0===t?void 0:t.id]),DownloadFile=async(e,r)=>{try{let t=await fetch(e);if(!t.ok)throw Error("Error al descargar el archivo");let a=await t.blob(),n=window.URL.createObjectURL(a),l=document.createElement("a");l.href=n,l.setAttribute("download",r),document.body.appendChild(l),l.click(),l.remove(),window.URL.revokeObjectURL(n)}catch(r){window.open(e,"_blank")}},handleDownloadTxt=()=>{if(null==m?void 0:m.order_file){var e;let r=handleFilename(m.order_file);f.B({action:"icon__download-txt-1",category:"my-orders",label:"icon__download-txt-1",value:0,client_id:null==j?void 0:null===(e=j.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==j?void 0:j.role_id)}),DownloadFile(m.order_file,r)}},getFileExtension=e=>{var r;if(!e)return"txt";let t=null===(r=e.split(".").pop())||void 0===r?void 0:r.toLowerCase();return"csv"===t?"csv":"ped"===t?"ped":"txt"},getFileLabel=e=>{let r=getFileExtension(e);return"Orden.".concat(r)},handleDownloadPdf=()=>{if(null==m?void 0:m.order_pdf){var e;let r=handleFilename(m.order_pdf);f.B({action:"icon__download-pdf-1",category:"my-orders",label:"icon__download-pdf-1",value:0,client_id:null==j?void 0:null===(e=j.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==j?void 0:j.role_id)}),DownloadFile(m.order_pdf,r)}},handleDownloadPed=()=>{if((null==m?void 0:m.order_file)&&"ped"===getFileExtension(m.order_file)){var e;let r=handleFilename(m.order_file);f.B({action:"icon__download-ped-1",category:"my-orders",label:"icon__download-ped-1",value:0,client_id:null==j?void 0:null===(e=j.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==j?void 0:j.role_id)}),DownloadFile(m.order_file,r)}},T=(null==N?void 0:N.pathname)!=="/[clientId]/my-orders/deliveries/[delivery]/[order]",Z=(0,c.useRef)(null),A=(0,c.useMemo)(()=>{let e="object"==typeof v&&null!==v&&!Array.isArray(v);if(e&&"purchased_products"in v){let e=void 0!==v.purchased_products?Number(v.purchased_products):0,r=void 0!==v.purchased_products_quantity?Number(v.purchased_products_quantity):0,t=void 0!==v.purchased_products_total_price?Number(v.purchased_products_total_price):0,a=void 0!==v.free_unit_products_quantity?Number(v.free_unit_products_quantity):0,n=void 0!==v.credit_for_agreements&&null!==v.credit_for_agreements?Number(v.credit_for_agreements):0,l={...m,purchased_products:e,purchased_products_total_price:t,purchased_products_quantity:r,free_unit_products_quantity:a,products_quantity:r+a,credit_for_agreements:n};return l}let r=(null==m?void 0:m.extendeal_plus)||[];if(!r||0===r.length)return{...m,purchased_products:(null==m?void 0:m.purchased_products)||0,purchased_products_total_price:(null==m?void 0:m.purchased_products_total_price)||0,purchased_products_quantity:(null==m?void 0:m.purchased_products_quantity)||0,free_unit_products_quantity:(null==m?void 0:m.free_unit_products_quantity)||0,products_quantity:((null==m?void 0:m.purchased_products_quantity)||0)+((null==m?void 0:m.free_unit_products_quantity)||0),credit_for_agreements:(null==m?void 0:m.credit_for_agreements)||0,payment_method_name:(null==m?void 0:m.delivery_payment_method_name)||null};let t=r.flatMap(e=>e.products),a=t.length,n=t.reduce((e,r)=>e+(r.total||0),0),l=t.reduce((e,r)=>e+(r.quantity||0),0),i=t.reduce((e,r)=>e+(r.free_quantity||0),0);return{...m,purchased_products:a,purchased_products_total_price:n,purchased_products_quantity:l,free_unit_products_quantity:i,products_quantity:l+i,credit_for_agreements:(null==m?void 0:m.credit_for_agreements)||0}},[m,v]),M=(0,c.useMemo)(()=>{let e=[];
1if(null==m?void 0:m.order_file){let r=getFileExtension(m.order_file);"ped"===r?e.push({eventKey:"ped",type:"ped",text:getFileLabel(m.order_file)}):e.push({eventKey:"txt",type:"txt",text:getFileLabel(m.order_file)})}return(null==m?void 0:m.order_pdf)&&e.push({eventKey:"pdf",type:"pdf",text:"Orden.pdf"}),e},[null==m?void 0:m.order_file,null==m?void 0:m.order_pdf]),I=(null==m?void 0:null===(n=m.status)||void 0===n?void 0:null===(a=n.cause)||void 0===a?void 0:a.id)===eH.Q.CREDIT_LIMIT_REACHED||!!(null==m?void 0:null===(l=m.status)||void 0===l?void 0:l.user_message);return(0,d.jsxs)(eg.Z,{fluid:!0,className:eA()["details-card-extendeal-plus"],children:[(0,d.jsxs)(D.Z,{children:[(0,d.jsx)(k.Z,{xs:24,sm:12,children:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)(F.Z,{className:eA()["avatar_nameDrug-extendeal-plus"],children:(0,d.jsxs)("p",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:["E",(0,d.jsx)("span",{className:eA()["extendeal-plus-tag"],children:"+"})]})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("p",{className:eA()["card-title-extendeal-plus"],children:["Extendeal",(0,d.jsx)("span",{className:eA()["extendeal-plus-tag"],children:"+"})]}),(0,d.jsx)(O.Z,{content:R.text,style:{backgroundColor:R.backgroundColor,color:R.color,borderColor:R.borderColor,border:"1px solid",fontWeight:600}})]})]})}),(0,d.jsx)(k.Z,{xs:24,sm:12,style:{display:"flex",justifyContent:"flex-end"},children:(0,d.jsxs)("div",{className:eA()["container-button"],children:[(null==N?void 0:N.pathname)!=="/[clientId]/my-orders/deliveries/[delivery]/[order]"&&!S&&(null==m?void 0:m.track_id)!=="Llama a Nadro para reconfirmar"&&(null==m?void 0:null===(i=m.status)||void 0===i?void 0:i.id)!==s.PROCESSESING_ORDER&&!!(null==m?void 0:m.track_id)&&(0,d.jsx)("div",{className:eA()["container-delivery"],children:(0,d.jsx)(DeliveryNumber_DeliveryNumber,{hash:null==m?void 0:m.track_id,label:(0,p.t)("trackingOne"),text:(0,p.t)("trackingTwo"),containerClassName:eA()["container-delivery-number"],labelClassName:eA().label,deliveryNumberClassName:eA()["hash-container"]})}),I&&(null==m?void 0:null===(_=m.status)||void 0===_?void 0:_.id)!==s.PROCESSESING_ORDER&&(0,d.jsx)(TooltipError_TooltipError,{typeError:null==m?void 0:m.status}),M.length>0&&(0,d.jsx)(ez.W,{dropdownOrderRef:Z,title:"Descargar",data:M,disabled:!1,onSelect:(e,r)=>{"txt"===e?handleDownloadTxt():"pdf"===e?handleDownloadPdf():"ped"===e&&handleDownloadPed()},loading:!1,gtagClass:"".concat(T?S?"":"icon__download-pdf-1":S?"icon__download-txt-2":"icon__download-pdf-2"," ").concat(eA()["dropdown-download"]),showIcon:!1})]})})]}),!b&&S&&(0,d.jsx)("div",{style:{margin:"24px 0px"},children:(0,d.jsx)(eT.Z,{children:(0,d.jsx)("span",{children:(0,p.t)("myOrders.orderDetails.textHelperDownloadTxt")}),backgroundColor:"#F3E8FF",IconColor:"#8B3CFF"})}),(0,d.jsx)(D.Z,{className:eA()["container-body-extendeal-plus"],children:(0,d.jsx)(Body_BodyDeliveries,{order_deliveries:A})}),null===(h=m.extendeal_plus)||void 0===h?void 0:h.map(e=>{var r,t;return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:eA()["download-invoice-container"],children:[(0,d.jsx)("p",{className:eA()["download-invoice-name"],children:e.name}),(null==e?void 0:null===(r=e.receipts)||void 0===r?void 0:r.length)?(0,d.jsx)(ez.W,{dropdownOrderRef:null,title:"Comprobantes",data:null==e?void 0:null===(t=e.receipts)||void 0===t?void 0:t.map((e,r)=>({type:r+1,text:null==e?void 0:e.name,eventKey:null==e?void 0:e.url})),disabled:!1,onSelect:(e,r)=>DownloadFile(e,null==r?void 0:r.target),loading:!1,gtagClass:"".concat(eA().vouchers),showIcon:!0}):null]}),(!0===v||"object"==typeof v&&null!==v)&&(0,d.jsx)(D.Z,{children:(0,d.jsx)(ExtendealPlusListProducts_ExtendealPlusListProducts,{products:e.products})})]},e.id)}),!1===v&&(0,d.jsx)(D.Z,{children:(0,d.jsx)(DetailsDeliveries_Footer,{delivery_id:null==m?void 0:m.delivery_id,order_number:P})})]})},eQ=t(11762),eY=t.n(eQ),ObservationsText_ObservationsText=e=>{let{text:r}=e;return(0,d.jsxs)("div",{className:eY().container,children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,d.jsx)("path",{d:"M5.99996 11.9997H9.99996C10.1888 11.9997 10.3472 11.9358 10.475 11.808C10.6027 11.6802 10.6666 11.5219 10.6666 11.333C10.6666 11.1441 10.6027 10.9858 10.475 10.858C10.3472 10.7302 10.1888 10.6663 9.99996 10.6663H5.99996C5.81107 10.6663 5.65274 10.7302 5.52496 10.858C5.39718 10.9858 5.33329 11.1441 5.33329 11.333C5.33329 11.5219 5.39718 11.6802 5.52496 11.808C5.65274 11.9358 5.81107 11.9997 5.99996 11.9997ZM5.99996 9.33301H9.99996C10.1888 9.33301 10.3472 9.26912 10.475 9.14134C10.
16027 9.01356 10.6666 8.85523 10.6666 8.66634C10.6666 8.47745 10.6027 8.31912 10.475 8.19134C10.3472 8.06356 10.1888 7.99967 9.99996 7.99967H5.99996C5.81107 7.99967 5.65274 8.06356 5.52496 8.19134C5.39718 8.31912 5.33329 8.47745 5.33329 8.66634C5.33329 8.85523 5.39718 9.01356 5.52496 9.14134C5.65274 9.26912 5.81107 9.33301 5.99996 9.33301ZM3.99996 14.6663C3.63329 14.6663 3.3194 14.5358 3.05829 14.2747C2.79718 14.0136 2.66663 13.6997 2.66663 13.333V2.66634C2.66663 2.29967 2.79718 1.98579 3.05829 1.72467C3.3194 1.46356 3.63329 1.33301 3.99996 1.33301H8.78329C8.96107 1.33301 9.13051 1.36634 9.29163 1.43301C9.45274 1.49967 9.5944 1.59412 9.71663 1.71634L12.95 4.94967C13.0722 5.0719 13.1666 5.21356 13.2333 5.37467C13.3 5.53579 13.3333 5.70523 13.3333 5.88301V13.333C13.3333 13.6997 13.2027 14.0136 12.9416 14.2747C12.6805 14.5358 12.3666 14.6663 12 14.6663H3.99996ZM8.66663 5.33301V2.66634H3.99996V13.333H12V5.99967H9.33329C9.1444 5.99967 8.98607 5.93579 8.85829 5.80801C8.73051 5.68023 8.66663 5.5219 8.66663 5.33301Z",fill:"#84C0FE"})}),(0,d.jsxs)("p",{className:eY().text,children:[(0,p.t)("confirmationOrder.observation.text"),": ",(0,d.jsx)("span",{className:eY().observations,children:r})]})]})},DeliveriesCard_DetailsDeliveries=function(e){var r,t,a,n,l,i,_;let{order_deliveries:h,type:m,deliveryDetail:g}=e,{pathname:v}=(0,u.useRouter)(),{user:C}=(0,w.aF)({}),j="/[clientId]/my-orders/details/[order]"===v,S=(null==h?void 0:h.drug_manufacturer_id)===+x.Y7;if(S)return(0,d.jsx)(DetailsDeliveries_DetailsDeliveriesExtendealPlus,{order_deliveries:h,type:m,deliveryDetail:g});let N=j?m===o.MANUAL:(null==h?void 0:null===(r=h.delivery_status)||void 0===r?void 0:r.id)!==s.SENT;L.Z,N?x.$f&&(0,p.t)("myOrders.labelDownloadTxt"):x.$f&&(0,p.t)("myOrders.labelDownloadPdf");let P=(0,u.useRouter)(),{order:O}=P.query,E=N?null==h?void 0:h.order_file:null==h?void 0:h.order_pdf,B=null==h?void 0:h.drug_manufacturer.toLowerCase().includes("nadro");handleFilename(E);let R=(0,c.useMemo)(()=>{var e,r;if(B&&(null==h?void 0:h.track_id)==="Llama a Nadro para reconfirmar")return{text:"Enviada: Llama a Nadro para reconfirmar",color:"red"};let t=j?null==h?void 0:null===(e=h.status)||void 0===e?void 0:e.id:null==h?void 0:null===(r=h.delivery_status)||void 0===r?void 0:r.id;return t===s.ACCEPTED?{text:(0,p.t)("successPage.labelAccepted"),color:"#157840"}:t===s.PROCESSESING_ORDER?{text:"Procesando Env\xedo",color:"#C62828"}:t===s.REJECTED?{text:(0,p.t)("successPage.labelRejected"),color:"#C62828"}:N?{text:(0,p.t)("review.labelManualShipping"),color:"#9F7100"}:{text:(0,p.t)("successPage.labelSent"),color:"#07AD4B"}},[B,N,x.n9]),DownloadFile=async(e,r)=>{try{let t=await fetch(e);if(!t.ok)throw Error("Error al descargar el archivo");let a=await t.blob(),n=window.URL.createObjectURL(a),l=document.createElement("a");l.href=n,l.setAttribute("download",r),document.body.appendChild(l),l.click(),l.remove(),window.URL.revokeObjectURL(n)}catch(r){window.open(e,"_blank")}},handleDownloadTxt=()=>{if(null==h?void 0:h.order_file){var e;let r=handleFilename(h.order_file);f.B({action:"icon__download-txt-1",category:"my-orders",label:"icon__download-txt-1",value:0,client_id:null==C?void 0:null===(e=C.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==C?void 0:C.role_id)}),DownloadFile(h.order_file,r)}},getFileExtension=e=>{var r;if(!e)return"txt";let t=null===(r=e.split(".").pop())||void 0===r?void 0:r.toLowerCase();return"csv"===t?"csv":"ped"===t?"ped":"txt"},getFileLabel=e=>{let r=getFileExtension(e);return"Orden.".concat(r)},handleDownloadPdf=()=>{if(null==h?void 0:h.order_pdf){var e;let r=handleFilename(h.order_pdf);f.B({action:"icon__download-pdf-1",category:"my-orders",label:"icon__download-pdf-1",value:0,client_id:null==C?void 0:null===(e=C.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==C?void 0:C.role_id)}),DownloadFile(h.order_pdf,r)}},handleDownloadPed=()=>{if((null==h?void 0:h.order_file)&&"ped"===getFileExtension(h.order_file)){var e;let r=handleFilename(h.order_file);f.B({action:"icon__download-ped-1",category:"my-orders",label:"icon__download-ped-1",value:0,client_id:null==C?void 0:null===(e=C.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==C?void 0:C.role_id)}),DownloadFile(h.order_file,r)}},handleWebButton=()=>{var e;f.B({action:"icon__open-in-web-1",category:"my-orders",label:"icon__open-in-web-1",value:0,client_id:null==C?void 0:null===(e=C.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==C?void 0:C.role_id)})},T=(null==P?void 0:P.pathname)!=="/[clientId]/my-orders/deliveries/[delivery]/[order]",Z=(0,c.useRef)(null),A=(0,c.useMemo)(()=>{let e=[];
1if(null==h?void 0:h.order_file){let r=getFileExtension(h.order_file);"ped"===r?e.push({eventKey:"ped",type:"ped",text:getFileLabel(h.order_file)}):e.push({eventKey:"txt",type:"txt",text:getFileLabel(h.order_file)})}return(null==h?void 0:h.order_pdf)&&e.push({eventKey:"pdf",type:"pdf",text:"Orden.pdf"}),e},[null==h?void 0:h.order_file,null==h?void 0:h.order_pdf]),M=(null==h?void 0:null===(a=h.status)||void 0===a?void 0:null===(t=a.cause)||void 0===t?void 0:t.id)===eH.Q.CREDIT_LIMIT_REACHED||!!(null==h?void 0:null===(n=h.status)||void 0===n?void 0:n.user_message);return(0,d.jsxs)(eg.Z,{fluid:!0,className:ex()["details-card"],children:[(0,d.jsxs)(D.Z,{children:[(0,d.jsx)(k.Z,{xs:24,sm:12,children:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)(F.Z,{className:S?ex().avatar_nameDrug_extendeal_plus:ex().avatar_nameDrug,children:(0,eo.Z)(null==h?void 0:h.drug_manufacturer,!1,null==h?void 0:h.id)}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:ex()["card-title"],children:null==h?void 0:h.drug_manufacturer}),(0,d.jsx)("p",{className:ex()["card-type"],style:{color:R.color,fontWeight:600},children:R.text})]})]})}),(0,d.jsx)(k.Z,{xs:24,sm:12,style:{display:"flex",justifyContent:"flex-end"},children:(0,d.jsxs)("div",{className:ex()["container-button"],children:[(null==P?void 0:P.pathname)!=="/[clientId]/my-orders/deliveries/[delivery]/[order]"&&!N&&(null==h?void 0:h.track_id)!=="Llama a Nadro para reconfirmar"&&(null==h?void 0:null===(l=h.status)||void 0===l?void 0:l.id)!==s.PROCESSESING_ORDER&&!!(null==h?void 0:h.track_id)&&(0,d.jsx)("div",{className:ex()["container-delivery"],children:(0,d.jsx)(DeliveryNumber_DeliveryNumber,{hash:null==h?void 0:h.track_id,label:(0,p.t)("trackingOne"),text:(0,p.t)("trackingTwo"),containerClassName:ex()["container-delivery-number"],labelClassName:ex().label,deliveryNumberClassName:ex()["hash-container"]})}),M&&(null==h?void 0:null===(i=h.status)||void 0===i?void 0:i.id)!==s.PROCESSESING_ORDER&&(0,d.jsx)(TooltipError_TooltipError,{typeError:null==h?void 0:h.status}),N&&(null==h?void 0:h.drug_manufacturer_link)!=="https://"&&(0,d.jsxs)(b(),{target:"_blank",className:"".concat(T?"icon__open-in-web-1":"icon__open-in-web-2"," ").concat(ex()["button-web"]),onClick:()=>handleWebButton(),href:null==h?void 0:h.drug_manufacturer_link,children:[(0,d.jsx)(ev.Z,{style:{width:16,height:16,color:"#0171E6",marginRight:4}}),(0,d.jsx)("span",{style:{textDecoration:"underline"},children:"Web"})]}),A.length>0&&(0,d.jsx)(ez.W,{dropdownOrderRef:Z,title:"Descargar",data:A,disabled:!1,onSelect:(e,r)=>{"txt"===e?handleDownloadTxt():"pdf"===e?handleDownloadPdf():"ped"===e&&handleDownloadPed()},loading:!1,gtagClass:"".concat(T?N?"":"icon__download-pdf-1":N?"icon__download-txt-2":"icon__download-pdf-2"," ").concat(ex()["dropdown-download"]),showIcon:!1})]})})]}),!j&&N&&(0,d.jsx)("div",{style:{margin:"24px 0px"},children:(0,d.jsx)(eT.Z,{children:(0,d.jsx)("span",{children:(0,p.t)("myOrders.orderDetails.textHelperDownloadTxt")}),backgroundColor:"#FFF9E6",IconColor:"#FFC700"})}),(0,d.jsx)(D.Z,{className:ex()["container-body"],children:(0,d.jsx)(Body_BodyDeliveries,{order_deliveries:h})}),"/[clientId]/my-orders/deliveries/[delivery]/[order]"===P.pathname&&(null==h?void 0:h.observation)&&(null==h?void 0:null===(_=h.observation)||void 0===_?void 0:_.length)>0&&(0,d.jsx)(D.Z,{className:ex()["container-observations"],children:(0,d.jsx)(ObservationsText_ObservationsText,{text:(null==h?void 0:h.observation)||""})}),g?(0,d.jsxs)(D.Z,{children:[(0,d.jsx)(ListProducts_ListProducts,{products:null==h?void 0:h.products,drugManufacturerId:null==h?void 0:h.drug_manufacturer_id}),(0,d.jsx)("div",{className:ex().line})]}):(0,d.jsx)(D.Z,{children:(0,d.jsx)(DetailsDeliveries_Footer,{delivery_id:null==h?void 0:h.delivery_id,order_number:O})})]})},e$=t(82206),eX=t(37903),eK=t.n(eX),DeliveriesCard_Header=e=>{let{total_orders_send:r,type:t}=e,{pathname:a}=(0,u.useRouter)();return(0,d.jsx)(eg.Z,{fluid:!0,children:r?(0,d.jsxs)(D.Z,{style:{padding:4},children:[r&&(0,d.jsx)("span",{className:eK().title,children:"Manual delivery"===t?x.$f?(0,p.t)("myOrders.drugmanufacturersWithManualDispatch",{total_orders_send:r}):"".concat(r," con env\xedo manual"):"".concat(r," enviadas")}),(0,d.jsx)("div",{className:eK().line,style:{marginBottom:"Manual delivery"===t?24:4}}),"/[clientId]/my-orders/details/[order]"===a&&"Manual delivery"===t&&(0,d.jsx)(eT.Z,{children:(0,d.jsx)("span",{children:(0,p.t)("myOrders.orderDetails.textHelperDownloadTxt")}),backgroundColor:"#FFF9E6",IconColor:"#FFC700"})]}):(0,d.jsx)("div",{style:{padding:8},children:(0,d.jsx)(e$.Z.Paragraph,{})})})},DeliveriesCard_DeliveriesCard=function(e){let{order_deliveries:r,type:t}=e;return(0,d.jsx)(N.Z,{shaded:!0,className:eh()["wrapper-card"],style:{borderTopColor:t===o.MANUAL?"#FFC700":"#07AD4B"},header:(0,d.jsx)(DeliveriesCard_Header,{total_orders_send:null==r?void 0:r.length,type:t}),children:null==r?void 0:r.map(e=>(0,d.jsx)(DeliveriesCard_DetailsDeliveries,{order_deliveries:e,type:t,deliveryDetail:!1}))})},eJ=t(73906),e0=t.n(eJ);t(67763);var e1=t(40025),e6=t.n(e1),Header_SkeletonHeader=function(){return(0,d.jsxs)("div",{children:[(0,d.jsx)(Skeletons_Skeletons,{bgcolor:"#E0E1E9",width:40,height:14}),(0,d.jsx)(Skeletons_Skeletons,{bgcolor:"#E0E1E9",width:400,height:14})]})},DetailsCard_Header_Header=e=>
1{let{orderId:r,date:t,isInProgress:a=!1,isPurchaseFailure:n=!1}=e,{t:l,i18n:i}=(0,g.$G)(),o=i.language||"es";Z().locale(o);let s={es:"DD [de] MMMM HH:mm [hs]","en-US":"MMMM DD [at] hh:mm A","pt-br":"DD [de] MMMM [\xe0s] HH:mm [h]"},c=Z()(t).format(s[o]||s.es);return(0,d.jsx)(eg.Z,{fluid:!0,className:r&&t?e6().header:e6()["header-load"],children:r&&t?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(D.Z,{children:(0,d.jsxs)("span",{className:e6()["sub-title"],children:["#",r]})}),(0,d.jsx)(D.Z,{children:(0,d.jsxs)("p",{className:e6().title,children:[n&&(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",children:(0,d.jsx)("path",{d:"M4.52843 8.33333L0.578431 7.83333C0.300654 7.8 0.120098 7.65 0.0367647 7.38333C-0.0465686 7.11667 0.0117647 6.88889 0.211765 6.7L7.02843 0.166667C7.08399 0.111111 7.15065 0.0694444 7.22843 0.0416667C7.30621 0.0138889 7.41176 0 7.5451 0C7.76732 0 7.93676 0.0944444 8.05343 0.283333C8.1701 0.472222 8.17288 0.666667 8.06176 0.866667L5.86176 5L9.81177 5.5C10.0895 5.53333 10.2701 5.68333 10.3534 5.95C10.4368 6.21667 10.3784 6.44444 10.1784 6.63333L3.36176 13.1667C3.30621 13.2222 3.23954 13.2639 3.16176 13.2917C3.08399 13.3194 2.97843 13.3333 2.8451 13.3333C2.62288 13.3333 2.45343 13.2389 2.33676 13.05C2.2201 12.8611 2.21732 12.6667 2.32843 12.4667L4.52843 8.33333Z",fill:"white"})}),l(n?"automaticPurchaseFailed":a?"orderInProcess.statusLabel":"myOrders.labelOrderDone")," | ",c]})})]}):(0,d.jsx)(Header_SkeletonHeader,{})})},e3=t(55486),e2=t(2336),e7=t(76933),e8=t(38554),e5=t.n(e8),Footer_Header_Header=e=>{var r,t,a,n;let{res_link:l,fal_link:i,has_complete_stock:o,erp_id:s}=e,{user:_}=(0,w.aF)({}),h=(0,u.useRouter)(),{query:m}=h,x=m.order,g=null==_?void 0:null===(r=_.client)||void 0===r?void 0:r.country_alfa_2,[v,C]=(0,c.useState)(!1),j=[ef.lB.ZETTI,ef.lB.GESTOR].includes(s),[b,S]=(0,c.useState)(!1),[N,P]=(0,c.useState)(!1),downloadFile=async(e,r)=>{await e(x).then(e=>{let t=new Blob([null==e?void 0:e.data],{type:r}),a=e.headers["content-disposition"].split("filename=")[1],n=document.createElement("a");n.href=window.URL.createObjectURL(t),n.download=a,n.click(),n.remove(),S(!1),P(!1)})},handleDownloadMissing=async(e,r)=>{S(!0),j?await downloadFile(e,r):(await (0,e7.X)({order_ids:[+x]}),S(!1))},L=(0,c.useRef)(null),downloadOrderComplete=e=>{(0,e3.Tv)(+x,e).then(e=>{var r;let t=new Blob([null==e?void 0:e.data],{type:null==e?void 0:null===(r=e.data)||void 0===r?void 0:r.type}),a=e.headers["content-disposition"].split("filename=")[1],n=document.createElement("a");n.href=window.URL.createObjectURL(t),n.download=a,n.click(),n.remove()}).catch(e=>console.error(e)).finally(()=>P(!1))},O=g===H.s.AR?[{eventKey:"res",type:"res",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"RES"})},{eventKey:"xlsx",type:"xlsx",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"XLSX"})},{eventKey:"csv",type:"csv",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"CSV"})}]:[{eventKey:"txt",type:"txt",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"TXT"})},{eventKey:"xlsx",type:"xlsx",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"XLSX"})},{eventKey:"csv",type:"csv",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"CSV"})}];return(0,d.jsx)(k.Z,{xs:24,style:{paddingBottom:20},children:(0,d.jsxs)(D.Z,{className:e5()["row-container"],children:[(0,d.jsx)(k.Z,{xs:24,sm:24,md:(null==_?void 0:null===(t=_.client)||void 0===t?void 0:t.country_alfa_2)!==H.s.AR?12:14,children:(0,d.jsxs)("span",{className:e5()["footer-header"],children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{marginRight:8},children:(0,d.jsx)("path",{d:"M9 12.75C9.2125 12.75 9.39063 12.6781 9.53438 12.5344C9.67813 12.3906 9.75 12.2125 9.75 12V9C9.7
15 8.7875 9.67813 8.60938 9.53438 8.46563C9.39063 8.32188 9.2125 8.25 9 8.25C8.7875 8.25 8.60938 8.32188 8.46563 8.46563C8.32188 8.60938 8.25 8.7875 8.25 9V12C8.25 12.2125 8.32188 12.3906 8.46563 12.5344C8.60938 12.6781 8.7875 12.75 9 12.75ZM9 6.75C9.2125 6.75 9.39063 6.67813 9.53438 6.53438C9.67813 6.39062 9.75 6.2125 9.75 6C9.75 5.7875 9.67813 5.60938 9.53438 5.46563C9.39063 5.32188 9.2125 5.25 9 5.25C8.7875 5.25 8.60938 5.32188 8.46563 5.46563C8.32188 5.60938 8.25 5.7875 8.25 6C8.25 6.2125 8.32188 6.39062 8.46563 6.53438C8.60938 6.67813 8.7875 6.75 9 6.75ZM9 16.5C7.9625 16.5 6.9875 16.3031 6.075 15.9094C5.1625 15.5156 4.36875 14.9813 3.69375 14.3063C3.01875 13.6313 2.48438 12.8375 2.09063 11.925C1.69688 11.0125 1.5 10.0375 1.5 9C1.5 7.9625 1.69688 6.9875 2.09063 6.075C2.48438 5.1625 3.01875 4.36875 3.69375 3.69375C4.36875 3.01875 5.1625 2.48438 6.075 2.09063C6.9875 1.69688 7.9625 1.5 9 1.5C10.0375 1.5 11.0125 1.69688 11.925 2.09063C12.8375 2.48438 13.6313 3.01875 14.3063 3.69375C14.9813 4.36875 15.5156 5.1625 15.9094 6.075C16.3031 6.9875 16.5 7.9625 16.5 9C16.5 10.0375 16.3031 11.0125 15.9094 11.925C15.5156 12.8375 14.9813 13.6313 14.3063 14.3063C13.6313 14.9813 12.8375 15.5156 11.925 15.9094C11.0125 16.3031 10.0375 16.5 9 16.5ZM9 15C10.675 15 12.0938 14.4188 13.2563 13.2563C14.4188 12.0938 15 10.675 15 9C15 7.325 14.4188 5.90625 13.2563 4.74375C12.0938 3.58125 10.675 3 9 3C7.325 3 5.90625 3.58125 4.74375 4.74375C3.58125 5.90625 3 7.325 3 9C3 10.675 3.58125 12.0938 4.74375 13.2563C5.90625 14.4188 7.325 15 9 15Z",fill:"#0171E6"})})," ",(0,p.t)("myOrders.orderDetails.registerOrderOnPOS")]})}),(0,d.jsxs)(k.Z,{xs:24,sm:24,md:(null==_?void 0:null===(a=_.client)||void 0===a?void 0:a.country_alfa_2)!==H.s.AR?12:10,style:{display:"flex",justifyContent:"flex-end",gap:12},children:[(0,d.jsx)(ez.W,{dropdownOrderRef:L,title:N?"":(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseFive"),data:O,disabled:!1,onSelect:(e,r)=>{P(!0),downloadOrderComplete(e)},loading:N,gtagClass:"button__download-complete-order-1"}),(0,d.jsx)(e2.M,{loading:b,disabled:j?!i:!1!==o,text:(0,p.t)("myOrders.faults"),handleOnClick:()=>{var e;f.B({action:"button__download-missing-products-2",category:"my-orders",label:"button__download-missing-products-2",value:0,client_id:null==_?void 0:null===(e=_.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==_?void 0:_.role_id)}),handleDownloadMissing(e3.mT,"application/text")},country:null==_?void 0:null===(n=_.client)||void 0===n?void 0:n.country_alfa_2,gtagClass:""})]})]})})},e4=t(50786),e9=t.n(e4),DetailsCard_Footer_Footer=e=>{let{res_link:r,fal_link:t,has_complete_stock:a=null,erp_id:n=null}=e;return(0,d.jsx)(N.Z,{className:e9().container,header:(0,d.jsx)(Footer_Header_Header,{fal_link:t,res_link:r,has_complete_stock:a,erp_id:n})})},re=t(5152),rr=t.n(re),rt=t(51939),ra=t(88679),rn=t.n(ra),CardDrop_Header_Header=()=>{let{t:e}=(0,g.$G)(),{user:r}=(0,w.aF)({}),handlerDropHeader=()=>{var e;f.B({action:"expand__purchase-rate-1",category:"my-orders",label:"expand__purchase-rate-1",value:0,client_id:null==r?void 0:null===(e=r.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==r?void 0:r.role_id)})};return(0,d.jsxs)("span",{className:"expand__purchase-rate-1 ".concat(rn().title),onClick:()=>handlerDropHeader(),children:[(0,d.jsx)("img",{src:"/assets/images/monitoring.svg",alt:"",style:{height:18,width:18,marginRight:8}}),e("myOrders.orderDetails.percentageBuyedByDrugstore")]})};let Options=e=>{let{drugmanufacturers:r}=e;return{chart:{type:"bar",renderTo:"container",margin:0,gridLineWidth:0,borderRadius:4,marginBottom:24,events:{load(){this.yAxis[0].update({visible:!1}),this.xAxis[0].update({visible:!1})}}},tooltip:{headerFormat:null,valueSuffix:"%"},xAxis:{groupPadding:0},yAxis:{min:0,title:{text:null},gridLineWidth:0,labels:{enabled:!0},minorTickLength:0,tickLength:0,minPadding:0,maxPadding:0},layout:{padding:{left:-10}},credits:{enabled:!1},legend:{reversed:!0,align:"left"},title:{text:""},plotOptions:{series:{stacking:"percent",minPointLength:1,pointPadding:0,groupPadding:.2,pointWidth:0,cursor:"pointer",animation:{duration:2e3}},bar:{borderRadius:8,groupPadding:.1,pointWidth:20,pointPadding:0,borderWidth:0,dataLabels:{enabled:!0,formatter:function(){let e=this.y+"%";return e},style:{color:"white",fontSize:"12px",textOutline:"none"},align:"center"}}},series:r}};var rl=t(15942),ri=t.n(rl);let ro=rr()(()=>Promise.all([t.e(6898),t.e(2603)]).then(t.bind(t,92603)),{loadableGenerated:{webpack:()=>[92603]},ssr:!1});var CardDrop_CardDrop=e=>{let{drugmanufacturers:r}
1=e,[t,a]=c.useState();return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(rt.Z,{className:"expand__purchase-rate-1 ".concat(ri()["title-svg"]),accordion:!0,bordered:!0,onSelect:()=>{let e=[];null==r||r.map(r=>{e.push({name:r.name,data:[r.percentage]})});let t=Options({drugmanufacturers:e});a(t)},style:{borderLeft:"1px solid white",borderRight:"1px solid white",borderRadius:0},children:(0,d.jsx)(N.Z,{header:(0,d.jsx)(CardDrop_Header_Header,{}),children:(0,d.jsx)(ro,{optionsChart:t})})})})},rs=t(32769),Tooltip_Tooltip=e=>{let{text:r,icon:t}=e,a=(0,d.jsx)(L.Z,{arrow:!1,style:{padding:"8px 16px"},children:(0,d.jsx)("span",{style:{fontSize:14,fontWeight:400,lineHeight:0},children:r})});return(0,d.jsx)(P.Z,{placement:"bottomEnd",controlId:"control-id-active",trigger:"hover",speaker:a,children:t})},rd=t(65145),rc=t.n(rd),CardRow_CardRow=e=>{let{name:r,value:t,haveTooltip:a,icon:n,text:l,total_products:i,products_quantity:o}=e,{t:s}=(0,g.$G)(),{user:c}=(0,w.aF)({}),u="Total"===r,p=i>1?"".concat(i," ").concat(x.n9?s("myOrders.labelProducts"):"productos"):"".concat(i," ").concat(x.n9?s("myOrders.labelProduct"):"producto"),_=o>1?"".concat(o,"  ").concat(x.$f?s("myOrders.labelUnits"):"unidades"," "):"".concat(o," ").concat(x.$f?s("myOrders.labelUnit"):"unidad");return(null==c?void 0:c.role_id)!==ef.uU.Buyer||"Cr\xe9dito por acuerdos"!==r?(0,d.jsx)(k.Z,{xs:24,style:{padding:"16px 0px 0px 0px"},children:(0,d.jsxs)(D.Z,{children:[(0,d.jsxs)(k.Z,{xs:24,sm:24,md:12,children:[(0,d.jsxs)("span",{className:rc()["first-col"],children:[(0,d.jsx)("div",{className:u&&rc()["first-row-title"],children:r}),a&&(0,d.jsx)(Tooltip_Tooltip,{icon:n,text:l})]}),u&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:rc().total_products,children:p}),(0,d.jsxs)("span",{className:rc().unit_products,children:[" | ",_]})]})]}),(0,d.jsx)(k.Z,{xs:24,sm:24,md:12,children:(0,d.jsx)("span",{className:rc()["second-col"],style:{color:"Ahorro estimado"===r||"Cr\xe9dito por acuerdos"===r?"#057634":"#40435B"},children:t})})]})}):(0,d.jsx)(d.Fragment,{})},ru=t(89307),rp=t.n(ru),CardBody_CardBody=e=>{var r;let{credit_for_agreements:t,estimated_savings:a,total_products:n,total_price_products:l,products_quantity:i,free_unit_products_quantity:o}=e,{t:s}=(0,g.$G)(),{user:c}=(0,w.aF)({}),u=null==c?void 0:null===(r=c.client)||void 0===r?void 0:r.country_alfa_2,{formatCurrency:p}=(0,W.Z)(),_=s("myOrders.orderDetails.textTooltipCreditAgreements"),h=p({value:a}).fullValue,m=p({value:t}).fullValue,v=p({value:l}).fullValue,{symbol:C}=function(e,r){try{let t=e.split(","),a="$ ",n="+ IVA";switch(r){case H.s.AR:case H.s.CO:case H.s.MX:break;case H.s.BR:a="R$ ",n="c/imp.";break;case H.s.ES:a=" €";break;case H.s.US:a="$ ",n="+ tax"}return{symbol:a,integer:t[0],decimal:t[1],tax:n}}catch(e){}}(v,u),f=i+(o||0),y=[{name:"Total",total_products:n,products_quantity:f,value:v,haveTooltip:!1},{name:s("efficientPurchasing.comparative.text.areYouSaving"),value:h,haveTooltip:!0,icon:(0,d.jsx)(rs.Z,{style:{color:"#646464",height:16,width:16,marginLeft:4}}),tooltip:s("efficientPurchasing.comparative.tooltip.areYouSaving")},{name:x.$f?s("myOrders.labelAgreementsAndCredit"):"Cr\xe9dito por acuerdos",value:m,haveTooltip:!0,icon:(0,d.jsx)(rs.Z,{style:{color:"#646464",height:16,width:16,marginLeft:4}}),tooltip:_}];return(0,d.jsxs)(D.Z,{style:{padding:"0px 24px"},children:[a?y.map(e=>(0,d.jsx)(CardRow_CardRow,{name:e.name,value:e.value,haveTooltip:e.haveTooltip,products_quantity:f,total_products:n,icon:e.icon,text:e.tooltip})):(0,d.jsx)(e$.Z.Paragraph,{style:{paddingBottom:24}}),(0,d.jsx)(k.Z,{xs:24,className:rp()["cardbody-footer"],children:x.$f?u===H.s.ES?s("myOrders.labelValuesWithoutTax")+" "+C:C+" "+s("myOrders.labelValuesWithoutTax"):C+"(Los valores no incluyen IVA)"})]})},r_=t(84523),rh=t.n(r_),Card_SkeletonCard=function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:rh()["first-row"],children:(0,d.jsx)(Skeletons_Skeletons,{width:320,height:14})}),(0,d.jsxs)("div",{className:rh()["second-row"],children:[(0,d.jsxs)("div",{className:rh()["secondRow-line"],children:[(0,d.jsx)(Skeletons_Skeletons,{width:200,height:14}),(0,d.jsx)(Skeletons_Skeletons,{width:104,height:14})]}),(0,d.jsxs)("div",{className:rh()["secondRow-line"],children:[(0,d.jsx)(Skeletons_Skeletons,{width:200,height:14}),(0,d.jsx)(Skeletons_Skeletons,{width:104,height:14})]}),(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,d.jsx)(Skeletons_Skeletons,{width:200,height:14}),(0,d.jsx)(Skeletons_Skeletons,{width:104,height:14})]})]}),(0,d.jsx)("div",{style:{padding:24,borderBottom:"1px solid #D1D1D1"},children:(0,d.jsx)(Skeletons_Skeletons,{width:240,height:14})}),(0,d.jsxs)("div",{className:rh()["third-row"],children:[(0,d.jsx)(Skeletons_Skeletons,{width:320,height:14}),(0,d.jsxs)("div",{style:{display:"flex"},children:[(0,d.jsx)("div",{className:rh()["thirdRow-button"],style:{marginRight:12}}),(0,d.jsx)("div",{className:rh()["thirdRow-button"]})]})]})]})},Card=e=>{let{details:r,deliveryDetail:t,isInProgress:a=!1}=e;return(0,d.jsx)(N.Z,{shaded:!0,header:(0,d.jsx)(DetailsCard_Header_Header,{orderId:null==r?void 0:r.order_id,date:null==r?void 0:r.created_at,isInProgress:a}),className:e0()["wrapper-card"],classPrefix:e0().header,children:r?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(eg.Z,{fluid:!0,className:e0()["firts-row"],children:[(0,d.jsxs)("span",{className:e0().col,style:{marginRight:24},children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",className:e0().icon,children:(0,d.jsx)("path",{d:"M3.3499 14C2.98323 14 2.66934 13.8694 2.40823 13.6083C2.14712 13.3472 2.01656 13.0333 2.01656 12.6667V7.36667C1.76101 7.13333 1.56378 6.83333 1.4249 6.46667C1.28601 6.1 1.28323 5.7 1.41656 5.26667L2.11656 3C2.20545 2.71111 2.36378 2.47222 2.59156 2.28333C2.81934 2.09444 3.08323 2 3.38323 2H12.6499C12.9499 2 13.211 2.09167 13.4332 2.275C13.6555 2.45833 13.8166 2.7 13.9166 3L14.6166 5.26667C14.7499 5.7 14.7471 6.09444 
114.6082 6.45C14.4693 6.80556 14.2721 7.11111 14.0166 7.36667V12.6667C14.0166 13.0333 13.886 13.3472 13.6249 13.6083C13.3638 13.8694 13.0499 14 12.6832 14H3.3499ZM9.48323 6.66667C9.78323 6.66667 10.011 6.56389 10.1666 6.35833C10.3221 6.15278 10.3832 5.92222 10.3499 5.66667L9.98323 3.33333H8.68323V5.8C8.68323 6.03333 8.76101 6.23611 8.91656 6.40833C9.07212 6.58056 9.26101 6.66667 9.48323 6.66667ZM6.48323 6.66667C6.73879 6.66667 6.94712 6.58056 7.10823 6.40833C7.26934 6.23611 7.3499 6.03333 7.3499 5.8V3.33333H6.0499L5.68323 5.66667C5.63879 5.93333 5.69712 6.16667 5.85823 6.36667C6.01934 6.56667 6.22767 6.66667 6.48323 6.66667ZM3.51656 6.66667C3.71656 6.66667 3.89156 6.59444 4.04156 6.45C4.19156 6.30556 4.28323 6.12222 4.31656 5.9L4.68323 3.33333H3.38323L2.71656 5.56667C2.6499 5.78889 2.68601 6.02778 2.8249 6.28333C2.96378 6.53889 3.19434 6.66667 3.51656 6.66667ZM12.5166 6.66667C12.8388 6.66667 13.0721 6.53889 13.2166 6.28333C13.361 6.02778 13.3943 5.78889 13.3166 5.56667L12.6166 3.33333H11.3499L11.7166 5.9C11.7499 6.12222 11.8416 6.30556 11.9916 6.45C12.1416 6.59444 12.3166 6.66667 12.5166 6.66667ZM3.3499 12.6667H12.6832V7.96667C12.6277 7.98889 12.5916 8 12.5749 8H12.5166C12.2166 8 11.9527 7.95 11.7249 7.85C11.4971 7.75 11.2721 7.58889 11.0499 7.36667C10.8499 7.56667 10.6221 7.72222 10.3666 7.83333C10.111 7.94444 9.83879 8 9.5499 8C9.2499 8 8.96934 7.94444 8.70823 7.83333C8.44712 7.72222 8.21656 7.56667 8.01656 7.36667C7.82767 7.56667 7.60823 7.72222 7.35823 7.83333C7.10823 7.94444 6.83879 8 6.5499 8C6.22767 8 5.93601 7.94444 5.6749 7.83333C5.41379 7.72222 5.18323 7.56667 4.98323 7.36667C4.7499 7.6 4.51934 7.76389 4.29156 7.85833C4.06379 7.95278 3.80545 8 3.51656 8H3.44156C3.41378 8 3.38323 7.98889 3.3499 7.96667V12.6667Z",fill:"#0171E6"})}),null==r?void 0:r.point_of_sale_name]}),(0,d.jsxs)("span",{className:e0().col,children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",className:e0().icon,children:(0,d.jsx)("path",{d:"M3.89992 11.3997C4.46659 10.9663 5.09992 10.6247 5.79992 10.3747C6.49992 10.1247 7.23325 9.99967 7.99992 9.99967C8.76659 9.99967 9.49992 10.1247 10.1999 10.3747C10.8999 10.6247 11.5333 10.9663 12.0999 11.3997C12.4888 10.9441 12.7916 10.4275 13.0083 9.84968C13.2249 9.2719 13.3333 8.65523 13.3333 7.99967C13.3333 6.5219 12.8138 5.26356 11.7749 4.22467C10.736 3.18579 9.4777 2.66634 7.99992 2.66634C6.52214 2.66634 5.26381 3.18579 4.22492 4.22467C3.18603 5.26356 2.66659 6.5219 2.66659 7.99967C2.66659 8.65523 2.77492 9.2719 2.99159 9.84968C3.20825 10.4275 3.51103 10.9441 3.89992 11.3997ZM7.99992 8.66634C7.34436 8.66634 6.79159 8.44134 6.34159 7.99134C5.89159 7.54134 5.66659 6.98856 5.66659 6.33301C5.66659 5.67745 5.89159 5.12467 6.34159 4.67467C6.79159 4.22467 7.34436 3.99967 7.99992 3.99967C8.65547 3.99967 9.20825 4.22467 9.65825 4.67467C10.1083 5.12467 10.3333 5.67745 10.3333 6.33301C10.3333 6.98856 10.1083 7.54134 9.65825 7.99134C9.20825 8.44134 8.65547 8.66634 7.99992 8.66634ZM7.99992 14.6663C7.0777 14.6663 6.21103 14.4913 5.39992 14.1413C4.58881 13.7913 3.88325 13.3163 3.28325 12.7163C2.68325 12.1163 2.20825 11.4108 1.85825 10.5997C1.50825 9.78856 1.33325 8.9219 1.33325 7.99967C1.33325 7.07745 1.50825 6.21079 1.85825 5.39967C2.20825 4.58856 2.68325 3.88301 3.28325 3.28301C3.88325 2.68301 4.58881 2.20801 5.39992 1.85801C6.21103 1.50801 7.0777 1.33301 7.99992 1.33301C8.92214 1.33301 9.78881 1.50801 10.5999 1.85801C11.411 2.20801 12.1166 2.68301 12.7166 3.28301C13.3166 3.88301 13.7916 4.58856 14.1416 5.39967C14.4916 6.21079 14.6666 7.07745 14.6666 7.99967C14.6666 8.9219 14.4916 9.78856 14.1416 10.5997C13.7916 11.4108 13.3166 12.1163 12.7166 12.7163C12.1166 13.3163 11.411 13.7913 10.5999 14.1413C9.78881 14.4913 8.92214 14.6663 7.99992 14.6663ZM7.99992 13.333C8.58881 13.333 9.14436 13.2469 9.66659 13.0747C10.1888 12.9025 10.6666 12.6552 11.0999 12.333C10.6666 12.0108 10.1888 11.7636 9.66659 11.5913C9.14436 11.4191 8.58881 11.333 7.99992 11.333C7.41103 11.333 6.85547 11.4191 6.33325 11.5913C5.81103 11.7636 5.33325 12.0108 4.89992 12.333C5.33325 12.6552 5.81103 12.9025 6.33325 13.0747C6.85547 13.2469 7.41103 13.333 7.99992 13.333ZM7.99992 7.33301C8.28881 7.33301 8.5277 7.23856 8.71659 7.04967C8.90547 6.86079 8.99992 6.6219 8.99992 6.33301C8.99992 6.04412 8.90547 5.80523 8.71659 5.61634C8.5277 5.42745 8.28881 5.33301 7.99992 5.33301C7.71103 5.33301 7.47214 5.42745 7.28325 5.61634C7.09436 5.80523 6.99992 6.04412 6.99992 6.33301C6.99992 6.6219 7.09436 6.86079 7.28325 7.04967C7.47214 7.23856 7.71103 7.33301 7.99992 7.33301Z",fill:"#0171E6"})}),null==r?void 0:r.full_name_buyer_user]})]}),!t&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(CardBody_CardBody,{credit_for_agreements:null==r?void 0:r.credit_for_agreements,estimated_savings:null==r?void 0:r.estimated_savings,total_products:null==r?void 0:r.products_quantity,total_price_products:null==r?void 0:r.total_price_products,products_quantity:null==r?void 0:r.unit_products_quantity,free_unit_products_quantity:null==r?void 0:r.free_unit_products_quantity}),(0,d.jsx)(CardDrop_CardDrop,{drugmanufacturers:null==r?void 0:r.purchased_amount_percentage}),(0,d.jsx)(DetailsCard_Footer_Footer,{fal_link:null==r?void 0:r.fal_link,res_link:null,has_complete_stock:null==r?void 0:r.has_complete_stock,erp_id:null==r?void 0:r.erp_id})]})]}):(0,d.jsx)(Card_SkeletonCard,{})})},rm=t(80242),rx=t.n(rm),DetailsCard_SkeletonDetailsCard=function(){return(0,d.jsxs)("div",{className:rx().container,children:[(0,d.jsx)(Skeletons_Skeletons,{width:104,height:14}),(0,d.jsx)("div",{className:rx().line}),(0,d.jsxs)("div",{className:rx().card,children:[(0,d.jsxs)("div",{style:{display:"flex"},children:[(0,d.jsx)(Skeletons_Skeletons,{width:32,height:32,variant:"circular"}),(0,d.jsxs)("div",{style:{marginLeft:16},children:[(0,d.jsx)(Skeletons_Skeletons,{width:200,height:14}),(0,d.jsx)(Skeletons_Skeletons,{width:80,height:14})]})]}),(0,d.jsx)("div",{className:rx()["secondRow-card"],children:(0,d.jsx)(Skeletons_Skeletons,{width:104,height:14})}),(0,d.jsx)("div",{className:rx()["button-container"],children:(0,d.jsx)("div",{className:rx().button})})]})]})},rg=t(74702),rv=t(34492),rC=t.n(rv);let Row_Row=e=>{let{product:r}
1=e,[t,a]=(0,c.useState)(!0);return(0,d.jsxs)("div",{className:rC()["product-row"],children:[(0,d.jsx)("div",{children:(0,d.jsx)(rg.q,{identifier:(null==r?void 0:r.barcode)||"",folder:"TWO",alt:"imagen medicamento",width:61,height:61,showPlaceholder:t,placeholderStyle:{width:61,height:61,minWidth:61,minHeight:61,maxWidth:61,maxHeight:61,display:"flex",alignItems:"center",overflow:"hidden"},className:rC()["image-icon-product"],onLoadComplete:()=>{a(!1)}})}),(0,d.jsxs)("div",{className:rC()["product-wrapper-descriptions"],children:[(0,d.jsxs)("div",{className:rC()["product-descriptions-row"],children:[(0,d.jsx)("p",{className:rC()["product-description"],children:(null==r?void 0:r.description)||"-"}),(0,d.jsxs)("p",{className:rC()["product-units"],children:[r.quantity||"-"," unidades"]}),(0,d.jsx)("p",{className:rC()["product-cash"],children:"$ -"})]}),(0,d.jsx)("div",{children:(0,d.jsx)("p",{className:rC()["product-ean"],children:(null==r?void 0:r.barcode)||"-"})})]})]})};var rf=t(85466),rw=t(60736),ry=t(92106),rj=t.n(ry),PaginationProducts_PaginationProducts=e=>{let{total:r,activePage:t,onChangePage:a,onChangeLimit:n,limit:l,pages:i,isLoading:o}=e,s=[{value:20,label:20},{value:50,label:50},{value:100,label:100}];return(0,d.jsx)("div",{className:rj()["container-pagination"],children:o?(0,d.jsxs)("div",{className:rj()["wrapper-pagination"],children:[(0,d.jsx)(rf.Z,{className:rj().pagination,size:"sm",prev:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M10.8 12.0008L14.7 15.9008C14.8834 16.0841 14.975 16.3174 14.975 16.6008C14.975 16.8841 14.8834 17.1174 14.7 17.3008C14.5167 17.4841 14.2834 17.5758 14 17.5758C13.7167 17.5758 13.4834 17.4841 13.3 17.3008L8.70005 12.7008C8.60005 12.6008 8.52922 12.4924 8.48755 12.3758C8.44588 12.2591 8.42505 12.1341 8.42505 12.0008C8.42505 11.8674 8.44588 11.7424 8.48755 11.6258C8.52922 11.5091 8.60005 11.4008 8.70005 11.3008L13.3 6.70078C13.4834 6.51745 13.7167 6.42578 14 6.42578C14.2834 6.42578 14.5167 6.51745 14.7 6.70078C14.8834 6.88411 14.975 7.11745 14.975 7.40078C14.975 7.68411 14.8834 7.91745 14.7 8.10078L10.8 12.0008Z",fill:"#ACAEC4"})}),next:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M12.6 12.0008L8.70005 8.10078C8.51672 7.91745 8.42505 7.68411 8.42505 7.40078C8.42505 7.11745 8.51672 6.88411 8.70005 6.70078C8.88338 6.51745 9.11672 6.42578 9.40005 6.42578C9.68338 6.42578 9.91672 6.51745 10.1 6.70078L14.7 11.3008C14.8 11.4008 14.8709 11.5091 14.9125 11.6258C14.9542 11.7424 14.975 11.8674 14.975 12.0008C14.975 12.1341 14.9542 12.2591 14.9125 12.3758C14.8709 12.4924 14.8 12.6008 14.7 12.7008L10.1 17.3008C9.91672 17.4841 9.68338 17.5758 9.40005 17.5758C9.11672 17.5758 8.88338 17.4841 8.70005 17.3008C8.51672 17.1174 8.42505 16.8841 8.42505 16.6008C8.42505 16.3174 8.51672 16.0841 8.70005 15.9008L12.6 12.0008Z",fill:"#0171E6"})}),ellipsis:!0,total:r,activePage:t,boundaryLinks:!0,maxButtons:5,limit:l,limitOptions:[20,50,100],layout:["pager"],onChangeLimit:n,onChangePage:a,pages:i,disabled:o}),(0,d.jsx)("p",{className:rj().label,children:(0,p.t)("myOrders.labelShowing")}),(0,d.jsx)(rw.Z,{caretAs:()=>(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M12 14.9504C11.8667 14.9504 11.7417 14.9296 11.625 14.8879C11.5084 14.8462 11.4 14.7754 11.3 14.6754L6.70005 10.0754C6.51672 9.89206 6.42505 9.65872 6.42505 9.37539C6.42505 9.09206 6.51672 8.85872 6.70005 8.67539C6.88338 8.49206 7.11672 8.40039 7.40005 8.40039C7.68338 8.40039 7.91672 8.49206 8.10005 8.67539L12 12.5754L15.9 8.67539C16.0834 8.49206 16.3167 8.40039 16.6 8.40039C16.8834 8.40039 17.1167 8.49206 17.3 8.67539C17.4834 8.85872 17.575 9.09206 17.575 9.37539C17.575 9.65872 17.4834 9.89206 17.3 10.0754L12.7 14.6754C12.6 14.7754 12.4917 14.8462 12.375 14.8879C12.2584 14.9296 12.1334 14.9504 12 14.9504Z",fill:"#6B6F93"})}),searchable:!1,data:s,placement:"topStart",menuClassName:"menu",className:rj()["select-picker-container"],cleanable:!1,defaultValue:20,onChange:n,disabled:o})]}):(0,d.jsxs)("div",{className:rj()["wrapper-pagination"],children:[(0,d.jsx)(rf.Z,{className:rj().pagination,size:"sm",prev:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M10.8 12.0008L14.7 15.9008C14.8834 16.0841 14.975 16.3174 14.975 16.6008C14.975 16.8841 14.8834 17.1174 14.7 17.3008C14.5167 17.4841 14.2834 17.5758 14 17.5758C13.7167 17.5758 13.4834 17.4841 13.3 17.3008L8.70005 12.7008C8.60005 12.6008 8.52922 12.4924 8.48755 12.3758C8.44588 12.2591 8.42505 12.1341 8.42505 12.0008C8.42505 11.8674 8.44588 11.7424 8.48755 11.6258C8.52922 11.5091 8.60005 11.4008 8.70005 11.3008L13.3 6.70078C13.4834 6.51745 13.7167 6.42578 14 6.42578C14.2834 6.42578 14.5167 6.51745 14.7 6.70078C14.8834 6.88411 14.975 7.11745 14.975 7.40078C14.975 7.68411 14.8834 7.91745 14.7 8.10078L10.8 12.0008Z",fill:"#ACAEC4"})}),next:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M12.6 12.0008L8.70005 8.10078C8.51672 7.91745 8.42505 7.68411 8.42505 7.40078C8.42505 7.11745 8.51672 6.88411 8.70005 6.70078C8.88338 6.51745 9.11672 6.42578 9.40005 6.42578C9.68338 6.42578 9.91672 6.51745 10.1 6.70078L14.7 11.3008C14.8 11.4008 14.8709 11.5091 14.9125 11.6258C14.9542 11.7424 14.975 11.8674 14.975 12.0008C14.975 12.1341 14.9542 12.2591 14.9125 12.3758C14.8709 12.4924 14.8 12.6008 14.7 12.7008L10.1 17.3008C9.91672 17.4841 9.68338 17.5758 9.40005 17.5758C9.11672 17.5758 8.88338 17.4841 8.70005 17.3008C8.51672 17.1174 8.42505 16.8841 8.42505 16.6008C8.42505 16.3174 8.51672 16.0841 8.70005 15.9008L12.6 12.0008Z",fill:"#0171E6"})}),ellipsis:!0,total:r,activePage:t,boundaryLinks:!0,maxButtons:5,limit:l,limitOptions:[20,50,100],layout:["pager"],onChangeLimit:n,onChangePage:e=>{e!==t&&a(e)},pages:i}),(0,d.jsx)("p",{className:rj().label,children:(0,p.t)("myOrders.labelShowing")}),(0,d.jsx)(rw.Z,{caretAs:()=>(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M12 14.9504C11.8667 14.9504 11.7417 14.9296 11.625 14.8879C11.5084 14.8462 11.4 14.7754 11.3 14.6754L6.70005 10.0754C6.51672 9.89206 6.42505 9.65872 6.42505 9.37539C6.42505 9.09206 6.51672 8.85872 6.70005 8.67539C6.88338 8.49206 7.11672 8.40039 7.40005 8.40039C7.68338 8.40039 7.91672 8.49206 8.10005 8.67539L12 12.5754L15.9 8.67539C16.0834 8.49206 16.3167 8.40039 16.6 8.40039C16.8834 8.40039 17.1167 8.49206 17.3 8.67539C17.4834 8.85872 17.575 9.09206 17.575 9.37539C17.575 9.65872 17.4834 9.89206 17.3 10.
10754L12.7 14.6754C12.6 14.7754 12.4917 14.8462 12.375 14.8879C12.2584 14.9296 12.1334 14.9504 12 14.9504Z",fill:"#6B6F93"})}),searchable:!1,data:s,placement:"topStart",menuClassName:"menu",className:rj()["select-picker-container"],cleanable:!1,defaultValue:l,onChange:n,disabled:1===i&&20===l})]})})},rb=t(50370),rS=t.n(rb),SkeletonRows_SkeletonRows=()=>(0,d.jsxs)("div",{className:rS().wrapper,children:[(0,d.jsx)(e$.Z.Paragraph,{graph:"image",active:!0,rows:2,className:rS().product,rowMargin:10}),(0,d.jsx)(e$.Z.Paragraph,{rows:1,className:rS().units}),(0,d.jsx)(e$.Z.Paragraph,{rows:1,className:rS().price})]}),hooks_useDeliveryCard=e=>{let{orderId:r}=e,[t,a]=(0,c.useState)([]),[n,l]=(0,c.useState)(1),[i,o]=(0,c.useState)(1),[s,d]=(0,c.useState)(!1),[u,p]=(0,c.useState)(20),[_,h]=(0,c.useState)(20),[m,x]=(0,c.useState)(null),handleGetProducts=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(r){var n,i,s;d(!0);let c=await (0,e3.Lp)({rows:e,page:t,orderId:r});if(null==c?void 0:null===(s=c.data)||void 0===s?void 0:null===(i=s.meta)||void 0===i?void 0:null===(n=i.pagination)||void 0===n?void 0:n.total_pages){let{current_page:e,count:r,per_page:t,total:a,total_pages:n}=c.data.meta.pagination;o(e),p(r),l(n),h(t),null===m&&x(a)}(null==c?void 0:c.data)&&a(c.data.data),d(!1)}};return(0,c.useEffect)(()=>{handleGetProducts(20,1)},[]),{data:t,perPage:_,isLoading:s,totalRows:u,currentPage:i,totalPages:n,totalProducts:m,handleGetProducts}},rD=t(64289),rk=t.n(rD);let DeliveryCardInProgress=e=>{let{details:r,isPurchaseFailure:t}=e,{data:a,perPage:n,isLoading:l,totalRows:i,currentPage:o,totalPages:s,totalProducts:c,handleGetProducts:u}=hooks_useDeliveryCard({orderId:null==r?void 0:r.order_id}),{formatCurrency:_}=(0,W.Z)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(N.Z,{shaded:!0,className:rk()["wrapper-card"],style:{border:"none"},header:null,children:[(0,d.jsxs)("div",{className:rk()["header-box"],children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{children:(0,d.jsx)("p",{className:rk().title,children:(0,p.t)("myOrders.labelTotal")})}),(0,d.jsx)("div",{children:(0,d.jsxs)("p",{className:rk().quantity,children:[null==r?void 0:r.products_quantity," ",(null==r?void 0:r.products_quantity)===1?(0,p.t)("myOrders.labelProduct"):(0,p.t)("myOrders.labelProducts")," ",(0,d.jsx)("span",{className:rk().separate,children:"|"})," ",(0,d.jsxs)("span",{className:rk().units,children:[null==r?void 0:r.unit_products_quantity," ",(null==r?void 0:r.unit_products_quantity)===1?(0,p.t)("myOrders.labelUnit"):(0,p.t)("myOrders.labelUnits")]})]})})]}),(0,d.jsx)("div",{className:rk().cash,children:_({value:void 0}).fullValue.replace("NaN","-")})]}),(0,d.jsx)("div",{className:rk()["wrapper-products"],children:l?Array.from({length:5}).map((e,r)=>(0,d.jsx)(SkeletonRows_SkeletonRows,{},r)):null==a?void 0:a.map(e=>(0,d.jsx)(Row_Row,{product:e},e.id))})]}),(0,d.jsx)("div",{className:rk()["wrapper-pagination"],children:(0,d.jsx)(PaginationProducts_PaginationProducts,{total:i,activePage:o,limit:n,onChangePage:e=>u(n,e),onChangeLimit:e=>u(e,1),pages:s,isLoading:l})})]})};var rN=t(20199),rP=t.n(rN),rL=t(87655),rO=t.n(rL),CardInfoFailedPurchase_SkeletonCard=function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:rO()["first-row"],children:(0,d.jsx)(Skeletons_Skeletons,{width:320,height:14})}),(0,d.jsxs)("div",{className:rO()["second-row"],children:[(0,d.jsxs)("div",{className:rO()["secondRow-line"],children:[(0,d.jsx)(Skeletons_Skeletons,{width:200,height:14}),(0,d.jsx)(Skeletons_Skeletons,{width:104,height:14})]}),(0,d.jsxs)("div",{className:rO()["secondRow-line"],children:[(0,d.jsx)(Skeletons_Skeletons,{width:200,height:14}),(0,d.jsx)(Skeletons_Skeletons,{width:104,height:14})]}),(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,d.jsx)(Skeletons_Skeletons,{width:200,height:14}),(0,d.jsx)(Skeletons_Skeletons,{width:104,height:14})]})]}),(0,d.jsx)("div",{style:{padding:24,borderBottom:"1px solid #D1D1D1"},children:(0,d.jsx)(Skeletons_Skeletons,{width:240,height:14})}),(0,d.jsxs)("div",{className:rO()["third-row"],children:[(0,d.jsx)(Skeletons_Skeletons,{width:320,height:14}),(0,d.jsxs)("div",{style:{display:"flex"},children:[(0,d.jsx)("div",{className:rO()["thirdRow-button"],style:{marginRight:12}}),(0,d.jsx)("div",{className:rO()["thirdRow-button"]})]})]})]})},CardInfoFailedPurchase_CardInfoFailedPurchase=e=>{let{details:r}=e;return(0,d.jsx)(N.Z,{shaded:!0,header:(0,d.jsx)(DetailsCard_Header_Header,{orderId:null==r?void 0:r.order_id,date:null==r?void 0:r.created_at,isInProgress:!0,isPurchaseFailure:!0}),className:rP()["wrapper-card"],classPrefix:rP().header,children:r?(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(eg.Z,{fluid:!0,className:rP()["firts-row"],children:[(0,d.jsxs)("span",{className:rP().col,style:{marginRight:24},children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",className:rP().icon,children:(0,d.jsx)("path",{d:"M3.3499 14C2.98323 14 2.66934 13.8694 2.40823 13.6083C2.14712 13.3472 2.01656 13.0333 2.01656 12.6667V7.36667C1.76101 7.13333 1.56378 6.83333 1.4249 6.46667C1.28601 6.1 1.28323 5.7 1.41656 5.26667L2.11656 3C2.20545 2.71111 2.36378 2.47222 2.59156 2.28333C2.81934 2.09444 3.08323 2 3.38323 2H12.6499C12.9499 2 13.211 2.09167 13.4332 2.275C13.6555 2.45833 13.8166 2.7 13.9166 3L14.6166 5.26667C14.7499 5.7 14.7471 6.09444 
114.6082 6.45C14.4693 6.80556 14.2721 7.11111 14.0166 7.36667V12.6667C14.0166 13.0333 13.886 13.3472 13.6249 13.6083C13.3638 13.8694 13.0499 14 12.6832 14H3.3499ZM9.48323 6.66667C9.78323 6.66667 10.011 6.56389 10.1666 6.35833C10.3221 6.15278 10.3832 5.92222 10.3499 5.66667L9.98323 3.33333H8.68323V5.8C8.68323 6.03333 8.76101 6.23611 8.91656 6.40833C9.07212 6.58056 9.26101 6.66667 9.48323 6.66667ZM6.48323 6.66667C6.73879 6.66667 6.94712 6.58056 7.10823 6.40833C7.26934 6.23611 7.3499 6.03333 7.3499 5.8V3.33333H6.0499L5.68323 5.66667C5.63879 5.93333 5.69712 6.16667 5.85823 6.36667C6.01934 6.56667 6.22767 6.66667 6.48323 6.66667ZM3.51656 6.66667C3.71656 6.66667 3.89156 6.59444 4.04156 6.45C4.19156 6.30556 4.28323 6.12222 4.31656 5.9L4.68323 3.33333H3.38323L2.71656 5.56667C2.6499 5.78889 2.68601 6.02778 2.8249 6.28333C2.96378 6.53889 3.19434 6.66667 3.51656 6.66667ZM12.5166 6.66667C12.8388 6.66667 13.0721 6.53889 13.2166 6.28333C13.361 6.02778 13.3943 5.78889 13.3166 5.56667L12.6166 3.33333H11.3499L11.7166 5.9C11.7499 6.12222 11.8416 6.30556 11.9916 6.45C12.1416 6.59444 12.3166 6.66667 12.5166 6.66667ZM3.3499 12.6667H12.6832V7.96667C12.6277 7.98889 12.5916 8 12.5749 8H12.5166C12.2166 8 11.9527 7.95 11.7249 7.85C11.4971 7.75 11.2721 7.58889 11.0499 7.36667C10.8499 7.56667 10.6221 7.72222 10.3666 7.83333C10.111 7.94444 9.83879 8 9.5499 8C9.2499 8 8.96934 7.94444 8.70823 7.83333C8.44712 7.72222 8.21656 7.56667 8.01656 7.36667C7.82767 7.56667 7.60823 7.72222 7.35823 7.83333C7.10823 7.94444 6.83879 8 6.5499 8C6.22767 8 5.93601 7.94444 5.6749 7.83333C5.41379 7.72222 5.18323 7.56667 4.98323 7.36667C4.7499 7.6 4.51934 7.76389 4.29156 7.85833C4.06379 7.95278 3.80545 8 3.51656 8H3.44156C3.41378 8 3.38323 7.98889 3.3499 7.96667V12.6667Z",fill:"#0171E6"})}),null==r?void 0:r.point_of_sale_name]}),(0,d.jsxs)("span",{className:rP().col,children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",className:rP().icon,children:(0,d.jsx)("path",{d:"M3.89992 11.3997C4.46659 10.9663 5.09992 10.6247 5.79992 10.3747C6.49992 10.1247 7.23325 9.99967 7.99992 9.99967C8.76659 9.99967 9.49992 10.1247 10.1999 10.3747C10.8999 10.6247 11.5333 10.9663 12.0999 11.3997C12.4888 10.9441 12.7916 10.4275 13.0083 9.84968C13.2249 9.2719 13.3333 8.65523 13.3333 7.99967C13.3333 6.5219 12.8138 5.26356 11.7749 4.22467C10.736 3.18579 9.4777 2.66634 7.99992 2.66634C6.52214 2.66634 5.26381 3.18579 4.22492 4.22467C3.18603 5.26356 2.66659 6.5219 2.66659 7.99967C2.66659 8.65523 2.77492 9.2719 2.99159 9.84968C3.20825 10.4275 3.51103 10.9441 3.89992 11.3997ZM7.99992 8.66634C7.34436 8.66634 6.79159 8.44134 6.34159 7.99134C5.89159 7.54134 5.66659 6.98856 5.66659 6.33301C5.66659 5.67745 5.89159 5.12467 6.34159 4.67467C6.79159 4.22467 7.34436 3.99967 7.99992 3.99967C8.65547 3.99967 9.20825 4.22467 9.65825 4.67467C10.1083 5.12467 10.3333 5.67745 10.3333 6.33301C10.3333 6.98856 10.1083 7.54134 9.65825 7.99134C9.20825 8.44134 8.65547 8.66634 7.99992 8.66634ZM7.99992 14.6663C7.0777 14.6663 6.21103 14.4913 5.39992 14.1413C4.58881 13.7913 3.88325 13.3163 3.28325 12.7163C2.68325 12.1163 2.20825 11.4108 1.85825 10.5997C1.50825 9.78856 1.33325 8.9219 1.33325 7.99967C1.33325 7.07745 1.50825 6.21079 1.85825 5.39967C2.20825 4.58856 2.68325 3.88301 3.28325 3.28301C3.88325 2.68301 4.58881 2.20801 5.39992 1.85801C6.21103 1.50801 7.0777 1.33301 7.99992 1.33301C8.92214 1.33301 9.78881 1.50801 10.5999 1.85801C11.411 2.20801 12.1166 2.68301 12.7166 3.28301C13.3166 3.88301 13.7916 4.58856 14.1416 5.39967C14.4916 6.21079 14.6666 7.07745 14.6666 7.99967C14.6666 8.9219 14.4916 9.78856 14.1416 10.5997C13.7916 11.4108 13.3166 12.1163 12.7166 12.7163C12.1166 13.3163 11.411 13.7913 10.5999 14.1413C9.78881 14.4913 8.92214 14.6663 7.99992 14.6663ZM7.99992 13.333C8.58881 13.333 9.14436 13.2469 9.66659 13.0747C10.1888 12.9025 10.6666 12.6552 11.0999 12.333C10.6666 12.0108 10.1888 11.7636 9.66659 11.5913C9.14436 11.4191 8.58881 11.333 7.99992 11.333C7.41103 11.333 6.85547 11.4191 6.33325 11.5913C5.81103 11.7636 5.33325 12.0108 4.89992 12.333C5.33325 12.6552 5.81103 12.9025 6.33325 13.0747C6.85547 13.2469 7.41103 13.333 7.99992 13.333ZM7.99992 7.33301C8.28881 7.33301 8.5277 7.23856 8.71659 7.04967C8.90547 6.86079 8.99992 6.6219 8.99992 6.33301C8.99992 6.04412 8.90547 5.80523 8.71659 5.61634C8.5277 5.42745 8.28881 5.33301 7.99992 5.33301C7.71103 5.33301 7.47214 5.42745 7.28325 5.61634C7.09436 5.80523 6.99992 6.04412 6.99992 6.33301C6.99992 6.6219 7.09436 6.86079 7.28325 7.04967C7.47214 7.23856 7.71103 7.33301 7.99992 7.33301Z",fill:"#0171E6"})}),null==r?void 0:r.full_name_buyer_user]})]})}):(0,d.jsx)(CardInfoFailedPurchase_SkeletonCard,{})})},hooks_useHeaderFailedPurchase=e=>{var r;let{orderId:t}=e,{user:a}=(0,w.aF)({}),n=null==a?void 0:null===(r=a.client)||void 0===r?void 0:r.country_alfa_2,[l,
1i]=(0,c.useState)(!1),o=(0,c.useRef)(null),s=n===H.s.AR?[{eventKey:"res",type:"res",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"RES"})},{eventKey:"xlsx",type:"xlsx",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"XLSX"})},{eventKey:"csv",type:"csv",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"CSV"})}]:[{eventKey:"txt",type:"txt",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"TXT"})},{eventKey:"xlsx",type:"xlsx",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"XLSX"})},{eventKey:"csv",type:"csv",text:(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseSeventeen",{fileFormat:"CSV"})}],downloadOrderComplete=e=>{(0,e3.Tv)(t,e).then(e=>{var r;let t=new Blob([null==e?void 0:e.data],{type:null==e?void 0:null===(r=e.data)||void 0===r?void 0:r.type}),a=e.headers["content-disposition"].split("filename=")[1],n=document.createElement("a");n.href=window.URL.createObjectURL(t),n.download=a,n.click(),n.remove()}).catch(e=>console.error(e)).finally(()=>i(!1))};return{dropdownOrderRef:o,downloadOrder:l,DOWNLOAD_FORMAT:s,onSelect:e=>{i(!0),downloadOrderComplete(e)}}},rF=t(86243),rE=t.n(rF);let HeaderFailedPurchase=e=>{let{details:r}=e,{dropdownOrderRef:t,downloadOrder:a,DOWNLOAD_FORMAT:n,onSelect:l}=hooks_useHeaderFailedPurchase({orderId:null==r?void 0:r.order_id});return(0,d.jsxs)("div",{className:rE().wrapper,children:[(0,d.jsx)("div",{className:rE().info,children:(0,d.jsxs)("p",{className:rE()["wrapper-products-quantity"],children:[null==r?void 0:r.products_quantity," ",(null==r?void 0:r.products_quantity)===1?(0,p.t)("myOrders.labelProduct"):(0,p.t)("myOrders.labelProducts")," ",(0,d.jsx)("span",{children:"|"})," ",(0,d.jsxs)("span",{className:rE()["wrapper-units-quantity"],children:[null==r?void 0:r.unit_products_quantity," ",(null==r?void 0:r.unit_products_quantity)===1?(0,p.t)("myOrders.labelUnit"):(0,p.t)("myOrders.labelUnits")]})]})}),(0,d.jsx)(ez.W,{dropdownOrderRef:t,title:a?"":(0,p.t)("efficientPurchasing.sendingPurchase.efficientPurchasing_sendingPurchaseFive"),data:n,disabled:!1,onSelect:l,loading:a,gtagClass:"button__download-complete-order-1"})]})};var rB=t(90928),rR=t(96306),rT=t.n(rR);let rZ={1:(0,p.t)("failureCardPriorityDrugstoreTitle"),2:(0,p.t)("failureCardNoResponseTitle"),3:(0,p.t)("failureCardNoStockTitle")},ElectricBoltIcon=()=>(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"white",children:(0,d.jsx)("path",{d:"M11 21h-1l1-7H7.5c-.58 0-.57-.32-.38-.66.19-.34.05-.08.07-.12C8.48 10.94 10.42 7.54 13 3h1l-1 7h3.5c.49 0 .56.33.47.51l-.07.15C12.96 17.55 11 21 11 21z"})}),ReplayIcon=()=>(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white",children:(0,d.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"})}),rA=new Set([1,2,3]),FailureReasonCard=e=>{let{errorTypeId:r,isRetrying:t,onRetry:a}=e;if(null==r)return null;let n=rA.has(r),l=n?rZ[r]:(0,p.t)("failureCardGenericTitle"),i=3===r,o=!n;return(0,d.jsxs)("div",{className:rT().wrapper,children:[(0,d.jsxs)("div",{className:rT().content,children:[(0,d.jsxs)("div",{className:rT().header,children:[(0,d.jsx)("div",{className:rT().iconWrapper,children:(0,d.jsx)(ElectricBoltIcon,{})}),(0,d.jsx)("p",{className:rT().title,children:l})]}),1===r&&(0,d.jsxs)("p",{className:rT().description,children:[(0,p.t)("failureCardPriorityDrugstoreDesc")," ",(0,d.jsx)("strong",{className:rT().descriptionBold,children:(0,p.t)("failureCardPriorityDrugstoreBold")})]}),2===r&&(0,d.jsxs)("p",{className:rT().description,children:[(0,p.t)("failureCardNoResponseDesc")," ",(0,d.jsx)("strong",{className:rT().descriptionBold,children:(0,p.t)("failureCardNoResponseBold")})]}),i&&(0,d.jsx)("p",{className:rT().description,children:(0,p.t)("failureCardNoStockDesc1")}),o&&(0,d.jsx)("p",{className:rT().description,children:(0,p.t)("failureCardGenericDesc")})]}),!i&&!o&&(0,d.jsx)("div",{className:rT().actions,children:(0,d.jsxs)(rB.j,{className:rT().retryButton,onClick:a,loading:t,disabled:t,type:"button",children:[(0,d.jsx)(ReplayIcon,{}),(0,d.jsx)("span",{className:rT().retryButtonText,children:(0,p.t)("failureCardRetryButton")})]})})]})};var rM=t(72617),rI=t.n(rM);let Row_Row_Row=e=>{let{product:r}
1=e,[t,a]=(0,c.useState)(!0);return(0,d.jsxs)("div",{className:rI()["product-row"],children:[(0,d.jsx)("div",{children:(0,d.jsx)(rg.q,{identifier:(null==r?void 0:r.barcode)||"",folder:"TWO",alt:"imagen medicamento",width:61,height:61,showPlaceholder:t,placeholderStyle:{width:61,height:61,minWidth:61,minHeight:61,maxWidth:61,maxHeight:61,display:"flex",alignItems:"center",overflow:"hidden"},className:rI()["image-icon-product"],onLoadComplete:()=>{a(!1)}})}),(0,d.jsxs)("div",{className:rI()["product-wrapper-descriptions"],children:[(0,d.jsxs)("div",{className:rI()["product-descriptions-row"],children:[(0,d.jsx)("p",{className:rI()["product-description"],children:(null==r?void 0:r.description)||"-"}),(0,d.jsxs)("p",{className:rI()["product-units"],children:[r.quantity||"-"," unidades"]}),(0,d.jsx)("p",{className:rI()["product-cash"],children:"$ -"})]}),(0,d.jsx)("div",{children:(0,d.jsx)("p",{className:rI()["product-ean"],children:(null==r?void 0:r.barcode)||"-"})})]})]})};var rH=t(18594),rW=t.n(rH),DeliveryListFailed_PaginationProducts_PaginationProducts=e=>{let{total:r,activePage:t,onChangePage:a,onChangeLimit:n,limit:l,pages:i,isLoading:o}=e,s=[{value:20,label:20},{value:50,label:50},{value:100,label:100}];return(0,d.jsx)("div",{className:rW()["container-pagination"],children:o?(0,d.jsxs)("div",{className:rW()["wrapper-pagination"],children:[(0,d.jsx)(rf.Z,{className:rW().pagination,size:"sm",prev:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M10.8 12.0008L14.7 15.9008C14.8834 16.0841 14.975 16.3174 14.975 16.6008C14.975 16.8841 14.8834 17.1174 14.7 17.3008C14.5167 17.4841 14.2834 17.5758 14 17.5758C13.7167 17.5758 13.4834 17.4841 13.3 17.3008L8.70005 12.7008C8.60005 12.6008 8.52922 12.4924 8.48755 12.3758C8.44588 12.2591 8.42505 12.1341 8.42505 12.0008C8.42505 11.8674 8.44588 11.7424 8.48755 11.6258C8.52922 11.5091 8.60005 11.4008 8.70005 11.3008L13.3 6.70078C13.4834 6.51745 13.7167 6.42578 14 6.42578C14.2834 6.42578 14.5167 6.51745 14.7 6.70078C14.8834 6.88411 14.975 7.11745 14.975 7.40078C14.975 7.68411 14.8834 7.91745 14.7 8.10078L10.8 12.0008Z",fill:"#ACAEC4"})}),next:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M12.6 12.0008L8.70005 8.10078C8.51672 7.91745 8.42505 7.68411 8.42505 7.40078C8.42505 7.11745 8.51672 6.88411 8.70005 6.70078C8.88338 6.51745 9.11672 6.42578 9.40005 6.42578C9.68338 6.42578 9.91672 6.51745 10.1 6.70078L14.7 11.3008C14.8 11.4008 14.8709 11.5091 14.9125 11.6258C14.9542 11.7424 14.975 11.8674 14.975 12.0008C14.975 12.1341 14.9542 12.2591 14.9125 12.3758C14.8709 12.4924 14.8 12.6008 14.7 12.7008L10.1 17.3008C9.91672 17.4841 9.68338 17.5758 9.40005 17.5758C9.11672 17.5758 8.88338 17.4841 8.70005 17.3008C8.51672 17.1174 8.42505 16.8841 8.42505 16.6008C8.42505 16.3174 8.51672 16.0841 8.70005 15.9008L12.6 12.0008Z",fill:"#0171E6"})}),ellipsis:!0,total:r,activePage:t,boundaryLinks:!0,maxButtons:5,limit:l,limitOptions:[20,50,100],layout:["pager"],onChangeLimit:n,onChangePage:a,pages:i,disabled:o}),(0,d.jsx)("p",{className:rW().label,children:(0,p.t)("myOrders.labelShowing")}),(0,d.jsx)(rw.Z,{caretAs:()=>(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M12 14.9504C11.8667 14.9504 11.7417 14.9296 11.625 14.8879C11.5084 14.8462 11.4 14.7754 11.3 14.6754L6.70005 10.0754C6.51672 9.89206 6.42505 9.65872 6.42505 9.37539C6.42505 9.09206 6.51672 8.85872 6.70005 8.67539C6.88338 8.49206 7.11672 8.40039 7.40005 8.40039C7.68338 8.40039 7.91672 8.49206 8.10005 8.67539L12 12.5754L15.9 8.67539C16.0834 8.49206 16.3167 8.40039 16.6 8.40039C16.8834 8.40039 17.1167 8.49206 17.3 8.67539C17.4834 8.85872 17.575 9.09206 17.575 9.37539C17.575 9.65872 17.4834 9.89206 17.3 10.0754L12.7 14.6754C12.6 14.7754 12.4917 14.8462 12.375 14.8879C12.2584 14.9296 12.1334 14.9504 12 14.9504Z",fill:"#6B6F93"})}),searchable:!1,data:s,placement:"topStart",menuClassName:"menu",className:rW()["select-picker-container"],cleanable:!1,defaultValue:20,onChange:n,disabled:o})]}):(0,d.jsxs)("div",{className:rW()["wrapper-pagination"],children:[(0,d.jsx)(rf.Z,{className:rW().pagination,size:"sm",prev:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M10.8 12.0008L14.7 15.9008C14.8834 16.0841 14.975 16.3174 14.975 16.6008C14.975 16.8841 14.8834 17.1174 14.7 17.3008C14.5167 17.4841 14.2834 17.5758 14 17.5758C13.7167 17.5758 13.4834 17.4841 13.3 17.3008L8.70005 12.7008C8.60005 12.6008 8.52922 12.4924 8.48755 12.3758C8.44588 12.2591 8.42505 12.1341 8.42505 12.0008C8.42505 11.8674 8.44588 11.7424 8.48755 11.6258C8.52922 11.5091 8.60005 11.4008 8.70005 11.3008L13.3 6.70078C13.4834 6.51745 13.7167 6.42578 14 6.42578C14.2834 6.42578 14.5167 6.51745 14.7 6.70078C14.8834 6.88411 14.975 7.11745 14.975 7.40078C14.975 7.68411 14.8834 7.91745 14.7 8.10078L10.8 12.0008Z",fill:"#ACAEC4"})}),next:(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M12.6 12.0008L8.70005 8.10078C8.51672 7.91745 8.42505 7.68411 8.42505 7.40078C8.42505 7.11745 8.51672 6.88411 8.70005 6.70078C8.88338 6.51745 9.11672 6.42578 9.40005 6.42578C9.68338 6.42578 9.91672 6.51745 10.1 6.70078L14.7 11.3008C14.8 11.4008 14.8709 11.5091 14.9125 11.6258C14.9542 11.7424 14.975 11.8674 14.975 12.0008C14.975 12.1341 14.9542 12.2591 14.9125 12.3758C14.8709 12.4924 14.8 12.6008 14.7 12.7008L10.1 17.3008C9.91672 17.4841 9.68338 17.5758 9.40005 17.5758C9.11672 17.5758 8.88338 17.4841 8.70005 17.3008C8.51672 17.1174 8.42505 16.8841 8.42505 16.6008C8.42505 16.3174 8.51672 16.0841 8.70005 15.9008L12.6 12.0008Z",fill:"#0171E6"})}),ellipsis:!0,total:r,activePage:t,boundaryLinks:!0,maxButtons:5,limit:l,limitOptions:[20,50,100],layout:["pager"],onChangeLimit:n,onChangePage:e=>{e!==t&&a(e)},pages:i}),(0,d.jsx)("p",{className:rW().label,children:(0,p.t)("myOrders.labelShowing")}),(0,d.jsx)(rw.Z,{caretAs:()=>(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,d.jsx)("path",{d:"M12 14.9504C11.8667 14.9504 11.7417 14.9296 11.625 14.8879C11.5084 14.8462 11.4 14.7754 11.3 14.6754L6.70005 10.0754C6.51672 9.89206 6.42505 9.65872 6.42505 9.37539C6.42505 9.09206 6.51672 8.85872 6.70005 8.67539C6.88338 8.49206 7.11672 8.40039 7.40005 8.40039C7.68338 8.40039 7.91672 8.49206 8.10005 8.67539L12 12.5754L15.9 8.67539C16.0834 8.49206 16.3167 8.40039 16.6 8.40039C16.8834 8.40039 17.1167 8.49206 17.3 8.67539C17.4834 8.85872 17.575 9.09206 17.575 9.37539C17.575 9.65872 17.4834 9.89206 17.3 10.
10754L12.7 14.6754C12.6 14.7754 12.4917 14.8462 12.375 14.8879C12.2584 14.9296 12.1334 14.9504 12 14.9504Z",fill:"#6B6F93"})}),searchable:!1,data:s,placement:"topStart",menuClassName:"menu",className:rW()["select-picker-container"],cleanable:!1,defaultValue:l,onChange:n,disabled:1===i&&20===l})]})})},rV=t(76752),rz=t.n(rV),DeliveryListFailed_SkeletonRows_SkeletonRows=()=>(0,d.jsxs)("div",{className:rz().wrapper,children:[(0,d.jsx)(e$.Z.Paragraph,{graph:"image",active:!0,rows:2,className:rz().product,rowMargin:10}),(0,d.jsx)(e$.Z.Paragraph,{rows:1,className:rz().units}),(0,d.jsx)(e$.Z.Paragraph,{rows:1,className:rz().price})]}),DeliveryListFailed_hooks_useDeliveryCard=e=>{let{orderId:r}=e,[t,a]=(0,c.useState)([]),[n,l]=(0,c.useState)(1),[i,o]=(0,c.useState)(1),[s,d]=(0,c.useState)(!1),[u,p]=(0,c.useState)(20),[_,h]=(0,c.useState)(20),[m,x]=(0,c.useState)(null),handleGetProducts=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(r){var n,i,s;d(!0);let c=await (0,e3.Lp)({rows:e,page:t,orderId:r});if(null==c?void 0:null===(s=c.data)||void 0===s?void 0:null===(i=s.meta)||void 0===i?void 0:null===(n=i.pagination)||void 0===n?void 0:n.total_pages){let{current_page:e,count:r,per_page:t,total:a,total_pages:n}=c.data.meta.pagination;o(e),p(r),l(n),h(t),null===m&&x(a)}(null==c?void 0:c.data)&&a(c.data.data),d(!1)}};return(0,c.useEffect)(()=>{handleGetProducts(20,1)},[]),{data:t,perPage:_,isLoading:s,totalRows:u,currentPage:i,totalPages:n,totalProducts:m,handleGetProducts}},rq=t(34639),rU=t.n(rq);let DeliveryListFailed=e=>{let{details:r}=e,{data:t,perPage:a,isLoading:n,totalRows:l,currentPage:i,totalPages:o,handleGetProducts:s}=DeliveryListFailed_hooks_useDeliveryCard({orderId:null==r?void 0:r.order_id});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(N.Z,{shaded:!0,className:rU()["wrapper-card"],style:{border:"none"},header:null,children:(0,d.jsx)("div",{className:rU()["wrapper-products"],children:n?Array.from({length:5}).map((e,r)=>(0,d.jsx)(DeliveryListFailed_SkeletonRows_SkeletonRows,{},r)):null==t?void 0:t.map(e=>(0,d.jsx)(Row_Row_Row,{product:e},e.id))})}),(0,d.jsx)("div",{className:rU()["wrapper-pagination"],children:(0,d.jsx)(DeliveryListFailed_PaginationProducts_PaginationProducts,{total:l,activePage:i,limit:a,onChangePage:e=>s(a,e),onChangeLimit:e=>s(e,1),pages:o,isLoading:n})})]})};var rG=t(82367),rQ=t(16722),rY=t.n(rQ);let ScheduleIcon=()=>(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"#07AD4B",children:(0,d.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67V7z"})}),OrderProcessingModal=e=>{let{open:r,onClose:t}=e;return(0,d.jsxs)(rG.Z,{className:rY().modal,backdropClassName:rY().backdrop,open:r,onClose:t,children:[(0,d.jsx)(rG.Z.Body,{className:rY().body,children:(0,d.jsx)("div",{className:rY().content,children:(0,d.jsxs)("div",{className:rY().head,children:[(0,d.jsx)("div",{className:rY().iconContainer,children:(0,d.jsx)("div",{className:rY().iconWrapper,children:(0,d.jsx)(ScheduleIcon,{})})}),(0,d.jsxs)("div",{className:rY().titleGroup,children:[(0,d.jsx)("p",{className:rY().title,children:(0,p.t)("orderProcessingModalTitle")}),(0,d.jsx)("p",{className:rY().subtitle,children:(0,p.t)("orderProcessingModalSubtitle")})]})]})})}),(0,d.jsx)(rG.Z.Footer,{className:rY().footer,children:(0,d.jsx)(rB.j,{fullWidth:!0,block:!0,className:rY().button,onClick:t,children:(0,d.jsx)("span",{className:rY().buttonText,children:(0,p.t)("orderProcessingModalButton")})})})]})};var hooks_useRetryAutomaticPurchase=e=>{let{orderId:r,onSuccess:t}=e,[a,n]=(0,c.useState)(!1),{mutateUser:l}=(0,w.aF)({}),handleRetry=async()=>{n(!0);try{let e=await (0,e3.Wy)(r);(null==e?void 0:e.status)===200&&(l(),t())}catch(e){}finally{n(!1)}};return{isRetrying:a,handleRetry}};let PurchaseFailureSection=e=>{var r;let{details:t}=e,a=(0,u.useRouter)(),[n,l]=(0,c.useState)(!1),{isRetrying:i,handleRetry:o}=hooks_useRetryAutomaticPurchase({orderId:t.order_id,onSuccess:()=>l(!0)});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(CardInfoFailedPurchase_CardInfoFailedPurchase,{details:t}),(0,d.jsx)(HeaderFailedPurchase,{details:t}),(0,d.jsx)(FailureReasonCard,{errorTypeId:null==t?void 0:null===(r=t.automatic_purchase_error)||void 0===r?void 0:r.error_type_id,isRetrying:i,onRetry:o}),(0,d.jsx)(DeliveryListFailed,{details:t}),(0,d.jsx)(OrderProcessingModal,{open:n,onClose:()=>{l(!1),a.push("/".concat(a.query.clientId,"/my-orders"))}})]})};var DetailsCard_DetailsCard=function(e){var r,t,a,n,l;let{details:i}=e,s=!!i&&Array.isArray(null==i?void 0:i.order_deliveries)&&(null==i?void 0:null===(r=i.order_deliveries)||void 0===r?void 0:r.length)===0,c=!!i&&!!(null==i?void 0:i.automatic_purchase_error);return(0,d.jsxs)(k.Z,{xs:24,children:[!c&&(0,d.jsx)(Card,{details:i,deliveryDetail:!!s,isInProgress:s}),c&&(0,d.jsx)(PurchaseFailureSection,{details:i}
1),s&&!c&&(0,d.jsx)(DeliveryCardInProgress,{details:i,isPurchaseFailure:c}),!s&&(null==i?void 0:null===(t=i.order_deliveries)||void 0===t?void 0:t.manual_delivery.length)>0&&(0,d.jsx)(DeliveriesCard_DeliveriesCard,{order_deliveries:null==i?void 0:null===(a=i.order_deliveries)||void 0===a?void 0:a.manual_delivery,type:o.MANUAL}),!s&&(null==i?void 0:null===(n=i.order_deliveries)||void 0===n?void 0:n.automatic_delivery.length)>0&&(0,d.jsx)(DeliveriesCard_DeliveriesCard,{order_deliveries:null==i?void 0:null===(l=i.order_deliveries)||void 0===l?void 0:l.automatic_delivery,type:o.AUTOMATIC}),!i&&(0,d.jsx)(DetailsCard_SkeletonDetailsCard,{})]})},r$=t(46573),rX=t.n(r$),rK=t(38496),rJ=t.n(rK),r0=t(3690),r1=t.n(r0),DeliveriesCard_Header_Header=e=>{let{deliveryId:r,date:t,delivery_type:a,track_id:n}=e,l=(0,u.useRouter)(),{query:i,pathname:o}=l,{user:s}=(0,w.aF)({}),{t:c,i18n:p}=(0,g.$G)(),_=p.language||"es";Z().locale(_);let h={es:"DD [de] MMMM HH:mm [hs]","en-US":"MMMM DD [at] hh:mm A","pt-br":"DD [de] MMMM [\xe0s] HH:mm [h]"},m=x.qC?Z()(t).format(h[_]||h.es):Z()(t).locale("es").format("DD [de] MMMM HH:mm [hs]"),v="Manual delivery"===a?x.qC?c("myOrders.detailsDeliveryTypeOne"):"O.C. con env\xedo manual":x.qC?c("myOrders.detailsDeliveryTypeTwo"):"O.C. emitida";return r&&t?(0,d.jsx)(eg.Z,{fluid:!0,className:r1().header,style:{height:"Manual delivery"===a?"93px":"113px"},children:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(D.Z,{children:[(0,d.jsx)(k.Z,{xs:24,sm:12,children:(0,d.jsxs)("span",{className:r1()["sub-title"],children:["#",i.order,"-",r]})}),(0,d.jsx)(k.Z,{xs:24,sm:12,children:"Manual delivery"!==a&&!!n&&(0,d.jsx)(DeliveryNumber_DeliveryNumber,{label:c("trackingOne"),text:c("trackingTwo"),hash:n,containerClassName:r1()["delivery-number-container"],labelClassName:r1().label,deliveryNumberClassName:r1()["delivery-number"]})})]}),(0,d.jsx)(D.Z,{children:(0,d.jsxs)("p",{className:r1().title,children:[v," | ",m]})})]})}):(0,d.jsx)(d.Fragment,{})},DeliveriesDetails_DeliveriesCard_DeliveriesCard=function(e){let{deliveries:r}=e;return(0,d.jsx)(N.Z,{shaded:!0,header:(0,d.jsx)(DeliveriesCard_Header_Header,{deliveryId:null==r?void 0:r.id,date:null==r?void 0:r.order_created_at,delivery_type:null==r?void 0:r.delivery_type,track_id:null==r?void 0:r.track_id}),className:rJ()["wrapper-card"],classPrefix:rJ().header,children:(0,d.jsxs)(eg.Z,{fluid:!0,className:rJ()["firts-row"],children:[(0,d.jsxs)("span",{className:rJ().col,style:{marginRight:24},children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{marginRight:8},children:(0,d.jsx)("path",{d:"M3.3499 14C2.98323 14 2.66934 13.8694 2.40823 13.6083C2.14712 13.3472 2.01656 13.0333 2.01656 12.6667V7.36667C1.76101 7.13333 1.56378 6.83333 1.4249 6.46667C1.28601 6.1 1.28323 5.7 1.41656 5.26667L2.11656 3C2.20545 2.71111 2.36378 2.47222 2.59156 2.28333C2.81934 2.09444 3.08323 2 3.38323 2H12.6499C12.9499 2 13.211 2.09167 13.4332 2.275C13.6555 2.45833 13.8166 2.7 13.9166 3L14.6166 5.26667C14.7499 5.7 14.7471 6.09444 14.6082 6.45C14.4693 6.80556 14.2721 7.11111 14.0166 7.36667V12.6667C14.0166 13.0333 13.886 13.3472 13.6249 13.6083C13.3638 13.8694 13.0499 14 12.6832 14H3.3499ZM9.48323 6.66667C9.78323 6.66667 10.011 6.56389 10.1666 6.35833C10.3221 6.15278 10.3832 5.92222 10.3499 5.66667L9.98323 3.33333H8.68323V5.8C8.68323 6.03333 8.76101 6.23611 8.91656 6.40833C9.07212 6.58056 9.26101 6.66667 9.48323 6.66667ZM6.48323 6.66667C6.73879 6.66667 6.94712 6.58056 7.10823 6.40833C7.26934 6.23611 7.3499 6.03333 7.3499 5.8V3.33333H6.0499L5.68323 5.66667C5.63879 5.93333 5.69712 6.16667 5.85823 6.36667C6.01934 6.56667 6.22767 6.66667 6.48323 6.66667ZM3.51656 6.66667C3.71656 6.66667 3.89156 6.59444 4.04156 6.45C4.19156 6.30556 4.28323 6.12222 4.31656 5.9L4.68323 3.33333H3.38323L2.71656 5.56667C2.6499 5.78889 2.68601 6.02778 2.8249 6.28333C2.96378 6.53889 3.19434 6.66667 3.51656 6.66667ZM12.5166 6.66667C12.8388 6.66667 13.0721 6.53889 13.2166 6.28333C13.361 6.02778 13.3943 5.78889 13.3166 5.56667L12.6166 3.33333H11.3499L11.7166 5.9C11.7499 6.12222 11.8416 6.30556 11.9916 6.45C12.1416 6.59444 12.3166 6.66667 12.5166 6.66667ZM3.3499 12.6667H12.6832V7.96667C12.6277 7.98889 12.5916 8 12.5749 8H12.5166C12.2166 8 11.9527 7.95 11.7249 7.85C11.4971 7.75 11.2721 7.58889 11.0499 7.36667C10.8499 7.56667 10.6221 7.72222 10.3666 7.83333C10.111 7.94444 9.83879 8 9.5499 8C9.2499 8 8.96934 7.94444 8.70823 7.83333C8.44712 7.72222 8.21656 7.56667 8.01656 7.36667C7.82767 7.56667 7.60823 7.72222 7.35823 7.83333C7.10823 7.94444 6.83879 8 6.5499 8C6.22767 8 5.93601 7.94444 5.6749 7.83333C5.41379 7.72222 5.18323 7.56667 4.98323 7.36667C4.7499 7.6 4.51934 7.76389 4.29156 7.85833C4.06379 7.95278 3.80545 8 3.51656 8H3.44156C3.41378 8 3.38323 7.98889 3.3499 7.96667V12.6667Z",fill:"#0171E6"})}),null==r?void 0:r.point_of_sale_name]}),(0,d.jsxs)("span",{className:rJ().col,children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{marginRight:8},children:(0,d.jsx)("path",{d:"M3.90004 11.3997C4.46671 10.9663 5.10004 10.6247 5.80004 10.3747C6.50004 10.1247 7.23337 9.99967 8.00004 9.99967C8.76671 9.99967 9.50004 10.1247 10.2 10.3747C10.9 10.6247 11.5334 10.9663 12.1 11.3997C12.4889 10.9441 12.7917 10.4275 13.0084 9.84968C13.225 9.2719 13.3334 8.65523 13.3334 7.99967C13.3334 6.5219 12.8139 5.26356 11.775 4.22467C10.7362 3.18579 9.47782 2.66634 8.00004 2.66634C6.52226 2.66634 5.26393 3.18579 4.22504 4.22467C3.18615 5.26356 2.66671 6.5219 2.66671 7.99967C2.66671 8.65523 2.77504 9.2719 2.99171 9.84968C3.20837 10.4275 3.51115 10.9441 3.90004 11.3997ZM8.00004 8.66634C7.34449 8.66634 6.79171 8.44134 6.34171 7.99134C5.89171 7.54134 5.66671 6.98856 5.66671 6.33301C5.66671 5.67745 5.89171 5.12467 6.34171 4.67467C6.79171 4.22467 7.34449 3.99967 8.00004 3.99967C8.6556 3.99967 9.20837 4.22467 9.65837 4.67467C10.1084 5.12467 10.3334 5.67745 10.3334 6.33301C10.3334 6.98856 10.1084 7.54134 9.65837 7.99134C9.20837 8.44134 8.6556 8.66634 8.00004 8.66634ZM8.00004 14.6663C7.07782 14.6663 
16.21115 14.4913 5.40004 14.1413C4.58893 13.7913 3.88337 13.3163 3.28337 12.7163C2.68337 12.1163 2.20837 11.4108 1.85837 10.5997C1.50837 9.78856 1.33337 8.9219 1.33337 7.99967C1.33337 7.07745 1.50837 6.21079 1.85837 5.39967C2.20837 4.58856 2.68337 3.88301 3.28337 3.28301C3.88337 2.68301 4.58893 2.20801 5.40004 1.85801C6.21115 1.50801 7.07782 1.33301 8.00004 1.33301C8.92226 1.33301 9.78893 1.50801 10.6 1.85801C11.4112 2.20801 12.1167 2.68301 12.7167 3.28301C13.3167 3.88301 13.7917 4.58856 14.1417 5.39967C14.4917 6.21079 14.6667 7.07745 14.6667 7.99967C14.6667 8.9219 14.4917 9.78856 14.1417 10.5997C13.7917 11.4108 13.3167 12.1163 12.7167 12.7163C12.1167 13.3163 11.4112 13.7913 10.6 14.1413C9.78893 14.4913 8.92226 14.6663 8.00004 14.6663ZM8.00004 13.333C8.58893 13.333 9.14449 13.2469 9.66671 13.0747C10.1889 12.9025 10.6667 12.6552 11.1 12.333C10.6667 12.0108 10.1889 11.7636 9.66671 11.5913C9.14449 11.4191 8.58893 11.333 8.00004 11.333C7.41115 11.333 6.8556 11.4191 6.33337 11.5913C5.81115 11.7636 5.33337 12.0108 4.90004 12.333C5.33337 12.6552 5.81115 12.9025 6.33337 13.0747C6.8556 13.2469 7.41115 13.333 8.00004 13.333ZM8.00004 7.33301C8.28893 7.33301 8.52782 7.23856 8.71671 7.04967C8.9056 6.86079 9.00004 6.6219 9.00004 6.33301C9.00004 6.04412 8.9056 5.80523 8.71671 5.61634C8.52782 5.42745 8.28893 5.33301 8.00004 5.33301C7.71115 5.33301 7.47226 5.42745 7.28337 5.61634C7.09449 5.80523 7.00004 6.04412 7.00004 6.33301C7.00004 6.6219 7.09449 6.86079 7.28337 7.04967C7.47226 7.23856 7.71115 7.33301 8.00004 7.33301Z",fill:"#0171E6"})}),null==r?void 0:r.full_name_buyer_user]})]})})},DeliveriesDetails_DeliveriesDetails=function(e){let{details:r,deliveries:t}=e,{t:a}=(0,g.$G)(),n=c.useMemo(()=>{if(!(null==r?void 0:r.order_deliveries)||!(null==t?void 0:t.delivery_id))return null;let e="Manual delivery"===t.delivery_type||"manual_delivery"===t.delivery_type,a=e?r.order_deliveries.manual_delivery:r.order_deliveries.automatic_delivery;return Array.isArray(a)&&a.find(e=>e.delivery_id===t.delivery_id)||null},[r,t]),l=c.useMemo(()=>{var e,r,a,l,i,o,s,d,c;if(!t)return null;let u=n||{};return{...t,purchased_products_total_price:null!==(e=u.purchased_products_total_price)&&void 0!==e?e:t.purchased_products_total_price,total_with_adjustments:null!==(r=u.total_with_adjustments)&&void 0!==r?r:t.total_with_adjustments,purchased_products:null!==(a=u.purchased_products)&&void 0!==a?a:t.purchased_products,purchased_products_quantity:null!==(l=u.purchased_products_quantity)&&void 0!==l?l:t.purchased_products_quantity,free_unit_products_quantity:null!==(i=u.free_unit_products_quantity)&&void 0!==i?i:t.free_unit_products_quantity,ca_grouped_credit:null!==(o=u.ca_grouped_credit)&&void 0!==o?o:t.ca_grouped_credit,ca_grouped_increment:null!==(s=u.ca_grouped_increment)&&void 0!==s?s:t.ca_grouped_increment,payment_method_name:null!==(c=null!==(d=t.delivery_payment_method_name)&&void 0!==d?d:t.payment_method_name)&&void 0!==c?c:null}},[t,n]);return(0,d.jsx)("section",{className:rX()["container-out-of-orders"],children:(0,d.jsx)("div",{className:rX()["container-banner"],style:{paddingBottom:50},children:(0,d.jsxs)(k.Z,{xs:24,children:[(0,d.jsx)(DeliveriesDetails_DeliveriesCard_DeliveriesCard,{deliveries:t}),(0,d.jsx)("div",{className:rX().margin}),(null==l?void 0:l.drug_manufacturer)&&(0,d.jsx)(DeliveriesCard_DetailsDeliveries,{order_deliveries:l,type:null==l?void 0:l.delivery_type,deliveryDetail:!0}),(0,d.jsxs)("div",{className:rX()["container-disclaimer"],children:["* ",a("disclaimerOrder")]})]})})})};let getStatusBadgeConfig=e=>{switch(e){case 1:return{text:"En progreso",backgroundColor:"#E3F2FD",color:"#1976D2",borderColor:"#BBDEFB"};case 2:case 5:return{text:"Aceptada",backgroundColor:"var(--Semantic-Success-50, #EBF9F3)",color:"var(--Semantic-Success-600, #07AD4B)",borderColor:"#A5D6A7"};case 3:case 4:return{text:"Env\xedo manual",backgroundColor:"var(--Semantic-Warning-50, #FFF9E6)",color:"#9F7100",borderColor:"#FFF176"};case 6:return{text:"Rechazada",backgroundColor:"var(--Semantic-Error-50, #FFEBEB)",color:"var(--Semantic-Error-700, #C62828)",borderColor:"#FFCDD2"};case 7:return{text:"Procesando",backgroundColor:"#E8F5E8",color:"#2E7D32",borderColor:"#C8E6C9"};case 8:return{text:"Pagada",backgroundColor:"var(--Semantic-Success-100, #DDF6E2)",color:"var(--Semantic-Success-800, #146D3B)",borderColor:"#A5D6A7"};case 9:return{text:"Pr\xf3xima a vencer",backgroundColor:"var(--Semantic-Warning-100, #FFEA9F)",color:"var(--Secondary-800, #0B2033)",borderColor:"#FFF59D"};case 10:return{text:"Vencida",backgroundColor:"var(--Semantic-Error-100, #F8CBCB)",color:"var(--Semantic-Error-700, #C62828)",borderColor:"#FFCDD2"};default:return{text:"Desconocido",backgroundColor:"#F5F5F5",color:"#757575",borderColor:"#E0E0E0"}}},shouldShowTooltip=e=>e.length>11;var StatusBadge_StatusBadge=e=>{let{statusId:r}=e,t=getStatusBadgeConfig(r),a=4===r;return(0,d.jsx)("div",{style:{padding:"4px 8px",display:"flex",alignItems:"center",justifyContent:"flex-end",width:a?"100px":"80px"},children:shouldShowTooltip(t.text)&&!a?(0,d.jsx)(P.Z,{placement:"top",speaker:(0,d.jsx)(L.Z,{className:R()["badge-tooltip"],children:t.text}),children:(0,d.jsx)(O.Z,{content:t.text,className:R()["badge-status"],style:{borderRadius:"8px",backgroundColor:t.backgroundColor,color:t.color,border:"1px solid ".concat(t.borderColor),fontFamily:'"Source Sans Pro"',fontSize:"12px",fontWeight:600,lineHeight:"18px",overflow:"hidden",textOverflow:"ellipsis",fontFeatureSettings:'"liga" off, "clig" off',whiteSpace:"nowrap",maxWidth:"100%"}})}):(0,d.jsx)(O.Z,{content:t.text,className:R()["badge-status"],style:{borderRadius:"8px",backgroundColor:t.backgroundColor,color:t.color,border:"1px solid ".concat(t.borderColor),fontFamily:'"Source Sans Pro"',fontSize:"12px",fontWeight:600,lineHeight:"18px",overflow:a?"visible":"hidden",textOverflow:a?"clip":"ellipsis",fontFeatureSettings:'"liga" off, "clig" off',whiteSpace:"nowrap",maxWidth:a?"none":"100%"}})})},r6=t(97587),r3=t.n(r6);let SavingsIcon=()=>(0,d.jsx)("svg",{className:r3().icon,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M16 11C16.2833 11 16.5208 10.9042 16.7125 10.7125C16.9042 10.5208 17 10.2833 17 10C17 9.71667 16.9042 9.47917 16.7125 9.2875C16.5208 9.09583 16.2833 9 16 9C15.7167 9 15.4792 9.09583 15.2875 9.2875C15.0958 9.47917 15 9.71667 15 10C15 10.2833 15.0958 10.5208 15.2875 10.7125C15.4792 10.9042 15.7167 11 16 11ZM9 9H12C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7H9C8.71667 7 8.47917 7.09583 8.2875 7.2875C8.09583 7.47917 8 7.71667 8 8C8 8.28333 8.09583 8.52083 8.2875 8.7125C8.47917 8.90417 8.71667 9 9 9ZM5.925 21C5.54167 21 5.17083 20.8667 4.8125 20.6C4.45417 20.3333 4.21667 20.0083 4.1 19.625C3.68333 18.225 3.34167 17.0125 3.075 15.9875C2.80833 14.9625 2.59583 14.0625 2.4375 13.2875C2.27917 12.5125 2.16667 11.825 2.1 11.225C2.03333 10.625 2 10.05 2 9.5C2 7.96667 2.53333 6.66667 3.6 5.6C4.66667 4.53333 5.96667 4 7.5 4H12.5C12.95 3.4 13.5208 2.91667 14.2125 2.55C14.9042 2.18333 15.6667 2 16.5 2C16.9167 2 17.2708 2.14583 17.5625 2.4375C17.8542 2.72917 18 3.08333 18 3.5C18 3.6 17.9875 3.7 17.9625 3.8C17.9375 3.9 17.9083 3.99167 17.875 4.075C17.8083 4.25833 17.7458 4.44167 17.6875 4.625C17.6292 4.80833 17.5833 5.00833 17.55 5.225L19.825 7.5H21C21.2833 7.5 21.5208 7.59583 21.7125 7.7875C21.9042 7.97917 22 8.21667 22 8.5V13.75C22 13.9667 21.9375 14.1583 21.8125 14.325C21.6875 14.4917 21.5167 14.6167 21.3 14.7L19.175 15.4L17.925 19.575C17.7917 20.0083 17.55 20.3542 17.2 20.6125C16.85 20.8708 16.45 21 16 21H14C13.45 21 12.9792 20.8042 12.5875 20.4125C12.1958 20.0208 12 19.55 12 19H10C10 19.55 9.80417 20.0208 9.4125 20.4125C9.02083 20.8042 8.55 21 8 21H5.925ZM6 19H8V17H14V19H16L17.55 13.85L20 13.025V9.5H19L15.5 6C15.5 5.66667 15.5208 5.34167 15.5625 5.025C15.6042 4.70833 15.6667 4.4 15.75 4.1C15.2667 4.23333 14.8417 4.4625 14.475 4.7875C14.1083 5.1125 13.8417 5.51667 13.675 6H7.5C6.53333 6 5.70833 6.34167 5.025 7.025C4.34167 7.70833 4 8.53333 4 9.5C4 10.1833 4.175 11.3542 4.525 13.0125C4.875 14.6708 5.36667 16.6667 6 19Z",fill:"#146D3B"})});var CommercialAgreementBanner_CommercialAgreementBanner=e=>{let{ordersLabel:r,creditLabel:t,creditAmount:a}=e;return(0,d.jsxs)("div",{className:r3().banner,children:[(0,d.jsxs)("div",{className:r3().left,children:[(0,d.jsx)(SavingsIcon,{}),(0,d.jsx)("p",{className:r3().ordersLabel,children:r})]}),(0,d.jsxs)("p",{className:r3().credit,children:[t,(0,d.jsxs)("span",{className:r3().creditAmount,children:[" ",a]})]})]})};let obtainInitialsLetter=e=>{let r=e.split(" "),t=r.map(e=>e.charAt(0).toUpperCase());return t.join("")},obtainReferenceOfPointOfSale=(e,r)=>{var t;return null===(t=e.find(e=>e.id===r))||void 0===t?void 0:t.reference_name},newOrdersArray=e=>e&&Array.isArray(e)&&0!==e.length?e.map(e=>{var r,t;let a=null===(r=e.deliveries)||void 0===r?void 0:r.reduce((e,r)=>{let t=e.totalOrders+r.total,a=[...e.drugManufacturers,r.drug_manufacturer];return{totalOrders:t,drugManufacturers:a}},{totalOrders:0,drugManufacturers:[]});return{...e,deliveries:null==e?void 0:null===(t=e.deliveries)||void 0===t?void 0:t.map(e=>({...e})),drug_manufacturer_orders:null==a?void 0:a.drugManufacturers,totalOrders:null==a?void 0:a.totalOrders}}):[],handlerSelectOrders=(e,r,t)=>{t({tag:r,value:e})};var r2=t(75889),r7=t.n(r2),r8=t(3735),r5=t(4145),r4=t.n(r5),OutOfOrders_OutOfOrders=e=>{let{handlerClearFilters:r,customsFilters:t}=e,{t:a}=(0,g.$G)(),{user:n}=(0,w.aF)({});return(0,d.jsx)("section",{className:r4()["container-out-of-orders"],children:(0,d.jsx)("div",{className:r4()["container-banner"],children:(0,d.jsx)(r8.j,{image:"/images/Group.svg",vector:"/images/Vector.svg",title:t?x.qC?a("myOrders.customFiltersViewOne"):"Lo siento, no pudimos encontrar ning\xfan resultado para tu b\xfasqueda":x.qC?a("myOrders.customFiltersViewTwo"):"No encontramos pedidos en los \xfaltimos 7 d\xedas",subtitle:t?x.$f?a("myOrders.textHelperCheckFilters"):"Revis\xe1 los filtros aplicad
1os o realiz\xe1 una nueva b\xfasqueda. Record\xe1 que podes buscar por n\xfamero de pedido, puntos de venta, usuarios y drogueria.":a("myOrders.textHelperNotFoundOrdersLastSearch"),label:t?x.qC?a("myOrders.clearFiltersLabel"):"Limpiar filtros":"",onClick:()=>{var e;f.B({action:"button__clean-filters-1",category:"my-orders",label:"button__clean-filters-1",value:0,client_id:null==n?void 0:null===(e=n.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==n?void 0:n.role_id)}),r("all",!0)},styleTitle:{width:t?"360px":"260px "},gtagClass:"button__clean-filters-1"})})})},ListOrders_ListOrders=e=>{let{orders:r,deliveries:t,ordersPagination:a,deliveriesPagination:n,selectorList:l,setSelectorList:i,timerSkeleton:o,itemRow:s,setItemRow:u,pages:_,setPages:h,shouldOutOfOrders:m,listTagTerms:g,listDrugTerms:v,searchTerms:C,handlerClearFilters:j}=e,b=(0,c.useRef)(null),{user:S}=(0,w.aF)({}),{pagination:D}=a||n||[],k="false"===localStorage.getItem("selectedFilter"),N=g.length>0||v.length>0||C.length>0||k,P=newOrdersArray(r),L="myOrders"===l.tag?Array.isArray(P)&&P.length>0:Array.isArray(t)&&t&&t.length>0,O=m||!o&&!L,handlerOrdersContainer=()=>{var e;f.B({action:"card__order-detail",category:"my-orders",label:"card__order-detail",value:0,client_id:null==S?void 0:null===(e=S.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==S?void 0:S.role_id)})};return(0,d.jsx)("div",{className:r7()["container-list"],children:(0,d.jsxs)(eg.Z,{fluid:!0,children:[O?"":(0,d.jsx)(TabSelector_TabSelector,{handlerSelectOrders:handlerSelectOrders,selectorList:l,setSelectorList:i}),O&&(0,d.jsx)(OutOfOrders_OutOfOrders,{handlerClearFilters:j,customsFilters:N}),O?"":(0,d.jsx)(eg.Z,{children:o?(0,d.jsxs)(d.Fragment,{children:["myOrders"===l.tag&&(0,d.jsx)(d.Fragment,{children:Array.from({length:5},(e,r)=>(0,d.jsx)("div",{className:r7()["wrapper-orders-cards"],ref:0===r?b:null,style:{cursor:"not-allowed",pointerEvents:"none"},children:(0,d.jsx)(EmptyOrderCard_EmptyOrderCard,{})},r))}),"ordersByDrugmanufacturer"===l.tag&&(0,d.jsx)(d.Fragment,{children:Array.from({length:5},(e,r)=>(0,d.jsx)("div",{className:r7()["wrapper-orders-cards"],ref:0===r?b:null,style:{cursor:"not-allowed",pointerEvents:"none"},children:(0,d.jsx)(EmptyOrderCard_EmptyOrderCard,{})},r))})]}):(0,d.jsxs)(d.Fragment,{children:["myOrders"===l.tag&&(null==P?void 0:P.map((e,r)=>{let{created_at:t,user:a,point_of_sale_id:n,point_of_sale_name:i,totalOrders:o,drug_manufacturer_orders:s,id:c,has_complete_stock:u,automatic_purchase_in_process:p=!1,status:_,is_automatic:h,automatic_purchase_error:m=null}=e,{first_name:g,last_name:v,pointsOfSale:C}=a,f=obtainInitialsLetter("".concat(g," ").concat(v)),w=obtainReferenceOfPointOfSale(C,n),y=addImageManufactured(s,"orders"),j=null==y?void 0:y.map(e=>{let{name:r}=e;return obtainInitialsLetter(r)});return(0,d.jsx)("div",{className:r7()["wrapper-orders-cards"],ref:0===r?b:null,onClick:()=>handlerOrdersContainer(),children:(0,d.jsx)(OrderCards_OrderCards,{dateTime:t,orderNumber:c,referencePointOfSale:w,drugmanufactur:i,value:o,avatar:f,client:"".concat(g," ").concat(v),selectorList:l,drugmanufacturers:s,timerSkeleton:!1,initialLettersDrugmanufName:j,has_complete_stock:u,automatic_purchase_in_process:p,is_automatic:h,purchase_failure:(null==_?void 0:_.id)===4,automatic_purchase_error:x.O1?m:null},r)})})),"ordersByDrugmanufacturer"===l.tag&&!!(null==n?void 0:n.accumulated_ca_credit)&&!!(null==n?void 0:n.deliveries_with_ca)&&(0,d.jsx)(CommercialAgreementBanner_CommercialAgreementBanner,{ordersLabel:(0,p.t)("commercialAgreementOrdersCount",{count:null==n?void 0:n.deliveries_with_ca}),creditLabel:(0,p.t)("accumulatedCreditLabel"),creditAmount:(0,ep.m)({value:null==n?void 0:n.accumulated_ca_credit,digitsValidation:7}).fullValue}),"ordersByDrugmanufacturer"===l.tag&&(0,d.jsx)(ListDeliveries_ListDeliveries,{deliveries:t,selectorList:l,timerSkeleton:!1,firstElement:b}),(0,d.jsx)(ListOrdersFooter_ListOrdersFooter,{pagination:D,setItemRow:u,setPages:h,timerSkeleton:o})]})})]})})};let handlerChangeItemsRow=(e,r,t)=>{r(1),t(e)},newHandlerChangePage=(e,r)=>{r(e)};var r9=t(85167),te=t.n(r9),tr=t(66549),ListOrdersFooter_ListOrdersFooter=e=>{let{pagination:r,setPages:t,setItemRow:a,timerSkeleton:n}=e;return(0,d.jsx)(D.Z,{children:(0,d.jsx)("div",{className:te()["wrapper-row"],children:(0,d.jsx)(k.Z,{xs:24,sm:24,children:(0,d.jsx)("div",{className:te()["col-wrapper"],children:(0,d.jsx)("div",{className:te()["wrapper-paginator"],children:(0,d.jsx)(tr.pe,{total:null==r?void 0:r.total,activePage:null==r?void 0:r.current_page,limit:null==r?void 0:r.per_page,onChangePage:e=>{newHandlerChangePage(e,t)},onChangeLimit:e=>
1{handlerChangeItemsRow(e,t,a)},pages:null==r?void 0:r.total_pages,isLoading:n})})})})})})},tt=t(34381),ta=t.n(tt),ListDeliveries_ListDeliveries=e=>{let{deliveries:r,selectorList:t,timerSkeleton:a,firstElement:n}=e,{user:l}=(0,w.aF)({}),handlerDeliveriesContainer=()=>{var e;f.B({action:"card__purchase-order-detail",category:"my-orders",label:"card__purchase-order-detail",value:0,client_id:null==l?void 0:null===(e=l.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==l?void 0:l.role_id)})};return(0,d.jsx)(d.Fragment,{children:!!r&&r.length>0&&(null==r?void 0:r.map((e,r)=>{let{number:l,total:i,drug_manufacturer:o,order:s,id:c,drug_manufacturer_id:u,status:p,has_invoice:_,has_receipts:h=!1,ca_total_credit:m=null}=e,x=addImageManufactured(o,"list"),{first_name:g,last_name:v,pointsOfSale:C}=null==s?void 0:s.user,{point_of_sale_id:f,point_of_sale_name:w,is_automatic:y}=s,j=obtainInitialsLetter("".concat(g," ").concat(v)),b=obtainReferenceOfPointOfSale(C,f);return(0,d.jsx)("div",{className:ta()["wrapper-orders-cards"],ref:0===r?n:null,onClick:()=>handlerDeliveriesContainer(),children:(0,d.jsx)(OrderCards_OrderCards,{drug_manufacturer_id:u,referencePointOfSale:b,dateTime:null==s?void 0:s.created_at,orderNumber:c,drugmanufactur:w,value:i,avatar:j,client:"".concat(g," ").concat(v),selectorList:t,imageOneDrugmanufacturer:x.image,oneDrugmanufacturerName:x.name,timerSkeleton:a,initialLettersDrugmanufName:x.name,orderNumberByDrugmanufact:l,status:p,has_invoice:_,has_receipts:h,is_automatic:y,ca_total_credit:m},r)},r)}))})},tn=t(86472),tl=t(15902),ti=t(78524),to=t(91508),ts=t(64751),td=t(7069);
1let cleanFilters=(e,r,t,a,n,l,i,o,s,d,c,u,p,_,h,m,x,g)=>{switch(e){case"drugs":r.length>0&&(a([]),h&&(n([]),l(!0)));break;case"pos":o.length>0&&(s([]),h&&(i([]),l(!0)));break;case"date":_({}),u({}),l(!0);break;case"all":{r.length>0&&(a([]),n([]),l(!0)),o.length>0&&(i([]),s([]),l(!0)),d.length>0&&(c(""),t(""),l(!0)),m&&(m([]),l(!0)),x&&(x([]),l(!0)),g&&(g(null),l(!0));let e=[(0,td.Z)(new Date,6),new Date],[p,h]=e.map(e=>(0,ts.sG)(e)),v={from:p,to:h};u({from:v.from,to:v.to}),_(v)}}},gettingOrders=async(e,r,t)=>{try{let{data:a}=await (0,e3.AU)(e,r,t);return{data:a.data,meta:a.meta}}catch(e){return{data:[],meta:null}}},gettingDeliveries=async(e,r,t)=>{try{let{data:a}=await (0,e3.nb)(e,r,t);return{data:a.data,meta:a.meta}}catch(e){return{data:null,meta:null}}},gettingReport=async e=>{try{let r=await (0,e3.wv)(e),t=new Blob([r.data],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),a=window.URL.createObjectURL(t),n=document.createElement("a");n.href=a,n.download="reporte.xlsx",document.body.appendChild(n),n.click(),n.remove(),window.URL.revokeObjectURL(a)}catch(e){}};var tc=t(40780),tu=t(1590),tp=t(65192),t_=t(43202),th=t.n(t_),tm=t(584),tx=t(67090),tg=t(77349),tv=t(43703),tC=t(35026),tf=t(95866),tw=t(69599);let predefinedRanges=()=>{let{t:e}=(0,g.$G)();return[{label:x.$f?e("myOrders.lastSevenDays"):"\xdaltimos 7 d\xedas",closeOverlay:!1,value:[(0,td.Z)(new Date,6),new Date],placement:"left",className:"shorcut__last-7-days-1"},{label:x.$f?e("myOrders.thisWeek"):"Semana Actual",closeOverlay:!1,value:[(0,tm.Z)(new Date),(0,tx.Z)(new Date)],placement:"left",className:"shorcut__current-week-1"},{label:x.$f?e("myOrders.lastWeek"):"Semana pasada",closeOverlay:!1,value:e=>{let[r=new Date]=e||[];return[(0,tg.Z)((0,tm.Z)(r,{weekStartsOn:0}),-7),(0,tg.Z)((0,tx.Z)(r,{weekStartsOn:0}),-7)]},placement:"left",className:"shorcut__past-week-1"},{label:x.$f?e("myOrders.ThisMonth"):"Mes actual",closeOverlay:!1,value:[(0,tv.Z)(new Date),new Date],placement:"left",className:"shorcut__current-month-1"},{label:x.$f?e("myOrders.lastMonth"):"Mes pasado",closeOverlay:!1,value:[(0,td.Z)(new Date,29),new Date],placement:"left",className:"shorcut__past-month-1"}]},formatUserSelectionDate=e=>{let r=new Date(e);return(0,td.Z)(r,-1)},locale=()=>{let{t:e}=(0,g.$G)();return{sunday:"Dom",monday:"Lun",tuesday:"Mar",wednesday:"Mi\xe9",thursday:"Jue",friday:"Vie",saturday:"S\xe1b",ok:x.$f?e("myOrders.labelApply"):"Aplicar"}},parseDate=e=>{let r=(0,tf.Z)(e,"America/Argentina/Buenos_Aires"),t=(0,tw.Z)(r,"America/Argentina/Buenos_Aires");return(0,tC.Z)(t,"yyyy-MM-dd")},shouldDisableDate=e=>{let r=new Date,t=new Date(r);t.setDate(r.getDate()+1);let a=new Date(r);return a.setMonth(r.getMonth()+1,1),function(e){let r=new Date,t=new Date;return t.setFullYear(r.getFullYear()-1),e<t}(e)||e>=a||e>=t};function equalsArray(e,r){for(let t=0;t<e.length;t++)if(e[t]!==r[t])return!1;return!0}let handleWeekDay=(e,r)=>{let t=e[0].toString().split(" ").slice(0,4),a=r[0].toString().split(" ").slice(0,4),n=e[1].toString().split(" ").slice(0,4),l=r[1].toString().split(" ").slice(0,4);equalsArray(a,t)&&equalsArray(n,l)?localStorage.setItem("selectedFilter","true"):localStorage.setItem("selectedFilter","false")};var DateInput_DateInput=e=>{let{placeholder:r,icon:t,setDateTerms:a,dateTerms:n,handlerClearFilters:l,selectedDate:i,setSelectedDate:o,value:s,timerSkeleton:u,limitMaxWidth:p=!1}=e,_=predefinedRanges(),h=locale(),[m,x]=(0,c.useState)([formatUserSelectionDate(n.from),formatUserSelectionDate(n.to)]),{user:g}=(0,w.aF)({}),handlerSetDate=e=>{let[r,t]=e.map(e=>parseDate(e)),n={from:r,to:t};o({from:n.from,to:n.to}),a({from:n.from,to:n.to}),x([formatUserSelectionDate(n.from),formatUserSelectionDate(n.to)])},setDate=e=>{var r;f.B({action:"button__apply-filter-date-1",category:"my-orders",label:"button__apply-filter-date-1",value:0,client_id:null==g?void 0:null===(r=g.client)||void 0===r?void 0:r.id,user_role:(0,y.xQ)(null==g?void 0:g.role_id)}),handlerSetDate(e),setTimeout(function(){handleWeekDay(e,[(0,td.Z)(new Date,6),new Date])},1e3)};(0,c.useEffect)(()=>{x([formatUserSelectionDate(n.from),formatUserSelectionDate(n.to)])},[n]);let[v,C]=(0,c.useState)("selected-filter-0"),j=Array.from(document.querySelectorAll(".rs-btn.rs-btn-link.rs-btn-sm")),handleSelecFilter=()=>
1{j.forEach(function(e){v===e.classList[3]?e.classList.add("selected-filter"):e.classList.remove("selected-filter")})},handleShourtCut=()=>{let e=Array.from(document.querySelectorAll(".rs-btn.rs-btn-link.rs-btn-sm"));e.map(function(e,r){e.classList.add("selected-filter-".concat(r))}),handleSelecFilter()},handleClickEvent=e=>{var r;(null==e?void 0:e.classList[0])==="rs-calendar-table-cell-day"||(null==e?void 0:e.classList[0])==="rs-calendar-table-cell-content"?C(""):(null==e?void 0:null===(r=e.classList[3])||void 0===r?void 0:r.includes("selected-filter"))&&C(null==e?void 0:e.classList[3])};return(0,d.jsx)("div",{className:"".concat(th()["container-wrapper-form"]," ").concat(p?"".concat(th()["container-wrapper-form-capped"]):""),children:(0,d.jsxs)("div",{className:th()["wrapper-container"],onClick:e=>handleClickEvent(null==e?void 0:e.target),children:[(0,d.jsx)(tp.Z,{disabled:u,onClean:()=>l("date",!0),size:"lg",placeholder:(0,d.jsx)("span",{className:th()["placeholder-text"],children:r}),className:th()["date-picker"],format:"dd/MM/yyyy",placement:"bottomStart",character:" - ",ranges:_,editable:!1,isoWeek:!0,locale:h,caretAs:()=>{handleSelecFilter()},onOpen:()=>handleShourtCut(),onOk:e=>{setDate(e)},shouldDisableDate:shouldDisableDate,cleanable:!1,value:m}),(0,d.jsxs)("div",{className:th()["container-icon"],children:[" ",t," "]})]})})},ty=t(97870);let fillingInput=e=>e.map(e=>{let{name:r,id:t,reference_name:a}=e;return{reference_name:a,label:r,value:t}});var tj=t(55751),tb=t.n(tj),CheckPickerPointOfSale_CheckPickerPointOfSale=e=>{let{placeholder:r,icon:t,setListTagTerms:a,listTagTerms:n,handlerClearFilters:l,selectedTag:i,setSelectedTag:o,timerSkeleton:s,limitMaxWidth:u=!1}=e,{user:p}=(0,w.aF)({}),{t:_}=(0,g.$G)(),[h,m]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=i||n;e&&e.length>0?m(!0):m(!1)},[i,n]);let handleApply=e=>{a(e),m(e.length>0)},v=fillingInput((null==p?void 0:p.pointsOfSale)||[]),handleRowPointOfSale=e=>(0,d.jsx)("div",{className:tb()["row-container"],children:e.reference_name?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:tb()["name-withReference"],children:e.label}),(0,d.jsx)("span",{className:tb().referenceName,children:e.reference_name})]}):(0,d.jsx)("span",{className:tb().name,children:e.label})}),C=x.$f?_("myOrders.labelSelectAll"):"Seleccionar todo",j=x.$f?_("myOrders.labelApply"):"Aplicar";return(0,d.jsxs)("div",{className:tb()["wrapper-container"],children:[(0,d.jsx)(ty.J,{data:v,value:i||n,onChange:e=>{o(e)},disabled:s,size:"lg",className:"".concat(tb()["select-picker"]).concat(u?" ".concat(tb()["select-picker-capped"]):""),placement:"bottom",placeholderText:r,placeholder:(0,d.jsx)("span",{className:tb()["placeholder-text"],children:r}),withSelectAll:!0,withApplyButton:!0,withClearButton:!1,selectAllLabel:C,applyLabel:j,onApply:e=>{var r;f.B({action:"button__apply-filter-pos-1",category:"my-orders",label:"button__apply-filter-pos-1",value:0,client_id:null==p?void 0:null===(r=p.client)||void 0===r?void 0:r.id,user_role:(0,y.xQ)(null==p?void 0:p.role_id)}),handleApply(e)},onClear:()=>{l("pos",h),setTimeout(()=>{m(!1)},1e3)},onClean:()=>{l("pos",h),setTimeout(()=>{m(!1)},1e3)},renderMenuItem:(e,r)=>handleRowPointOfSale(r)}),(0,d.jsx)("div",{className:tb()["container-icon"],children:t})]})};let fillSelector=e=>null==e?void 0:e.data.map(e=>{let{id:r,name:t}=e;return{label:t,value:r}});var tS=t(65057),tD=t.n(tS),CheckPickerDrugmanufacturer_CheckPickerDrugmanufacturer=e=>{var r;let{placeholder:t,icon:a,setListDrugTerms:n,listDrugTerms:l,handlerClearFilters:i,selectedItem:o,setSelectedItem:s,timerSkeleton:u,limitMaxWidth:p=!1}=e,{user:_}=(0,w.aF)({}),{t:h}=(0,g.$G)(),[m,v]=(0,c.useState)(!1),{drugManufacturers:C}=(0,w.PQ)(null==_?void 0:null===(r=_.client)||void 0===r?void 0:r.id,!1,"with_operations"),j=fillSelector(C);(0,c.useEffect)(()=>{let e=o||l;e&&e.length>0?v(!0):v(!1)},[o,l]);let handleApply=e=>{n(e),v(e.length>0)},handleRowDrugmanufacturer=e=>(0,d.jsx)("div",{className:tD()["row-container"],children:(0,d.jsx)("span",{className:tD().name,children:e.label})}),b=x.$f?h("myOrders.labelSelectAll"):"Seleccionar todo",S=x.$f?h("myOrders.labelApply"):"Aplicar";return(0,d.jsxs)("div",{className:tD()["wrapper-container"],children:[(0,d.jsx)(ty.J,{data:j||[],value:o||l,onChange:e=>{s(e)},disabled:u,size:"lg",className:"".concat(tD()["select-picker"]).concat(p?" ".concat(tD()["select-picker-capped"]):""),placement:"bottom",placeholderText:t,placeholder:(0,d.jsx)("span",{className:tD()["placeholder-text"],children:t}),withSelectAll:!0,withApplyButton:!0,withClearButton:!1,selectAllLabel:b,applyLabel:S,onApply:e=>{var r;f.B({action:"button__apply-filter-drugstore-1",category:"my-orders",label:"button__apply-filter-drugstore-1",value:0,client_id:null==_?void 0:null===(r=_.client)||void 0===r?void 0:r.id,user_role:(0,y.xQ)(null==_?void 0:_.role_id)}),handleApply(e)},onClear:()=>{i("drugs",m),setTimeout(()=>{v(!1)},1e3)},onClean:()=>{i("drugs",m),setTimeout(()=>{v(!1)},1e3)},renderMenuItem:(e,r)=>handleRowDrugmanufacturer(r)}),(0,d.jsx)("div",{className:tD()["container-icon"],children:a})]})},tk=t(46299),tN=t.n(tk);let tP=[{label:"Env\xedo manual",value:4},{label:"Aceptada",value:5},{label:"Rechazada",value:6},{label:"En proceso",value:7},{label:"Pagada",value:8},{label:"Pr\xf3xima a vencer",value:9},{label:"Vencida",value:10}],tL=[{label:"Env\xedo manual",value:4},{label:"Aceptada",value:5},{label:"Rechazada",value:6},{label:"En proceso",value:7}],tO=[{label:"Con faltas",labelText:"Con faltas",value:30},{label:(0,d.jsxs)("p",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",children:(0,d.jsx)("path",{d:"M4.52843 8.33333L0.578431 7.83333C0.300654 7.8 0.120098 7.65 0.0367647 7.38333C-0.0465686 7.11667 0.0117647 6.88889 0.211765 6.7L7.02843 0.166667C7.08399 0.111111 7.15065 0.0694444 7.22843 0.0416667C7.30621 0.0138889 7.41176 0 7.5451 0C7.76732 0 7.93676 0.0944444 8.05343 0.283333C8.1701 0.472222 8.17288 0.666667 8.06176 0.866667L5.86176 5L9.81177 5.5C10.0895 5.53333 10.2701 5.
168333 10.3534 5.95C10.4368 6.21667 10.3784 6.44444 10.1784 6.63333L3.36176 13.1667C3.30621 13.2222 3.23954 13.2639 3.16176 13.2917C3.08399 13.3194 2.97843 13.3333 2.8451 13.3333C2.62288 13.3333 2.45343 13.2389 2.33676 13.05C2.2201 12.8611 2.21732 12.6667 2.32843 12.4667L4.52843 8.33333Z",fill:"#6B6F93"})}),"Fallo"]}),labelText:"Fallo",value:31}];function CheckPickerInvoiceStatus(e){var r;let{timerSkeleton:t,value:a,onChange:n,isTypeOne:l=!1}=e,[i,o]=(0,c.useState)(!1),{user:s}=(0,w.aF)({}),{drugManufacturers:u}=(0,w.PQ)(null==s?void 0:null===(r=s.client)||void 0===r?void 0:r.id,!1,"with_operations"),p=(0,c.useMemo)(()=>null!=u&&!!u.data&&u.data.some(e=>e.id===+x.Y7),[u]),_=(0,c.useMemo)(()=>!!p||!!Array.isArray(a)&&a.some(e=>8===e||9===e||10===e),[p,a]),h=(0,c.useMemo)(()=>l?tO:_?tP:tL,[l,_]),m=(0,c.useMemo)(()=>Array.isArray(a)?a.filter(e=>h.some(r=>r.value===e)):[],[a,h]);return(0,c.useEffect)(()=>{Array.isArray(a)&&m.length<a.length&&(!x.vR||!l)&&(null==n||n(m))},[a,m,n,l]),(0,c.useEffect)(()=>{o(m.length>0)},[m]),(0,d.jsx)("div",{className:tN().wrapperContainer,children:(0,d.jsx)(ty.J,{data:h,value:m,onChange:e=>null==n?void 0:n(e),disabled:!!t,size:"lg",className:tN().selectPicker,placement:"bottomEnd",placeholderText:"Estado",placeholder:(0,d.jsx)("span",{className:tN().placeholderText,children:"Estado"}),withSelectAll:!0,withApplyButton:!0,withClearButton:!1,selectAllLabel:"Seleccionar todo",applyLabel:"Aplicar",onApply:e=>{o(e.length>0),null==n||n(e)},onClear:()=>{o(!1)},onClean:()=>{null==n||n([]),o(!1)},customRenderValue:(e,r)=>{var t;if(!(null==e?void 0:e.length))return(0,d.jsx)("span",{className:tN().placeholderText,children:"Estado"});let a=e.map(e=>h.find(r=>r.value===e)).filter(Boolean),n=a.map(e=>{var r;return null!==(r=null==e?void 0:e.labelText)&&void 0!==r?r:"string"==typeof(null==e?void 0:e.label)?e.label:""}),l=null===(t=a[0])||void 0===t?void 0:t.label;return(0,d.jsxs)("div",{className:tN().tagContainer,children:[(0,d.jsx)("div",{className:tN().tagLeftGroup,children:(0,d.jsx)("span",{className:tN().selectedText,title:n.join(", "),children:a.length>1?(0,d.jsxs)(d.Fragment,{children:[l,", ..."]}):l})}),(0,d.jsx)("span",{className:tN().tagCounter,children:e.length})]})},menuClassName:tN().menuDropdown,menuMaxHeight:260,menuAutoWidth:!0})})}var tF=t(56115),tE=t.n(tF);let tB=[{label:"Compra autom\xe1tica",value:1},{label:"Comparativa",value:2}];function CheckPickerPurchaseMode(e){let{timerSkeleton:r,value:t,onChange:a}=e,n=Array.isArray(t)?t:[];return(0,d.jsx)("div",{className:tE().wrapperContainer,children:(0,d.jsx)(ty.J,{data:tB,value:n,onChange:e=>null==a?void 0:a(e),disabled:!!r,size:"lg",className:tE().selectPicker,placement:"bottomEnd",placeholderText:"Modo de co...",placeholder:(0,d.jsx)("span",{className:tE().placeholderText,children:"Modo de co..."}),withSelectAll:!0,withApplyButton:!0,withClearButton:!1,selectAllLabel:"Seleccionar todo",applyLabel:"Aplicar",onApply:e=>{null==a||a(e)},onClear:()=>{null==a||a([])},customRenderValue:(e,r)=>{if(!(null==e?void 0:e.length))return(0,d.jsx)("span",{className:tE().placeholderText,children:"Modo de co..."});let t=e.map(e=>{var r;return null===(r=tB.find(r=>r.value===e))||void 0===r?void 0:r.label}).filter(Boolean),a=t[0]||"",n=a;"Compra autom\xe1tica"===n&&(n="Compra aut...");let l=n.includes("...");return(0,d.jsxs)("div",{className:tE().tagContainer,children:[(0,d.jsx)("div",{className:tE().tagLeftGroup,children:(0,d.jsx)("span",{className:"".concat(tE().selectedText," ").concat(l?tE().selectedTextNoEllipsis:""),title:t.join(", "),children:n})}),(0,d.jsx)("span",{className:tE().tagCounter,children:e.length})]})},menuClassName:tE().menuDropdown,menuMaxHeight:260,menuAutoWidth:!0})})}var tR=t(4642),tT=t(64810),tZ=t.n(tT),DownloadButton_DownloadButton=e=>{let{onDownloadReport:r,onDownloadShortages:t,disabledDownloadShortage:a=!1,hideTextOnNarrowViewport:n=!1}=e,[l,i]=(0,c.useState)(!1);return(0,d.jsx)("div",{className:"".concat(tZ().wrapper).concat(n?" ".concat(tZ().wrapperCompact):""),children:(0,d.jsxs)(tR.Z,{renderToggle:(e,r)=>(0,d.jsxs)("div",{...e,ref:r,className:tZ().downloadButton,children:[(0,d.jsx)("img",{src:"/assets/images/download_file_blue.svg",alt:"Download",className:tZ().downloadIcon}),(0,d.jsx)("span",{className:tZ().downloadText,children:"Descargar"}),(0,d.jsx)("svg",{className:"".concat(tZ().chevron," ").concat(l?tZ().chevronOpen:""),width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,d.jsx)("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"#1976D2",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),noCaret:!0,trigger:"click",placement:n?"bottomEnd":"bottomStart",open:l,onToggle:e=>i(e),children:[(0,d.jsx)(tR.Z.Item,{eventKey:"purchase-report",onClick:()=>r(),children:(0,p.t)("comparative.downloadReportText")}),(0,d.jsx)(tR.Z.Item,{eventKey:"download-shortages",onSelect:()=>t(),disabled:a,children:(0,p.t)("comparative.downloadFaultsText")})]})})},tA=t(30441),tM=t(253),tI=t(43920),tH=t.n(tI);let tW="Acuerdo comercial",tV=tM.KA.map(e=>({...e,value:String(e.value)})),getPickerValue=e=>!0===e?"true":!1===e?"false":null,getFilterValue=e=>"true"===e||"false"!==e&&null,CommercialAgreementIcon=()=>(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"21",viewBox:"0 0 22 21",fill:"none","aria-hidden":"true",children:(0,d.jsx)("path",{d:"M7.6 21L5.7 17.8L2.1 17L2.45 13.3L0 10.5L2.45 7.7L2.1 4L5.7 3.2L7.6 0L11 1.45L14.4 0L16.3 3.2L19.9 4L19.55 7.7L22 10.5L19.55 13.3L19.9 17L16.3 17.8L14.4 21L11 19.55L7.6 21ZM8.45 18.45L11 17.35L13.6 18.45L15 16.05L17.75 15.4L17.5 12.6L19.35 10.5L17.5 8.35L17.75 5.55L15 4.95L13.55 2.55L11 3.65L8.4 2.55L7 4.95L4.25 5.55L4.5 8.35L2.65 10.5L4.5 12.6L4.25 15.45L7 16.05L8.45 18.45ZM9.95 14.05L15.6 8.4L14.2 6.95L9.95 11.2L7.8 9.1L6.4 10.5L9.95 14.05Z",fill:"#ACAEC4"})});function CheckPickerCommercialAgreement(e){let{timerSkeleton:r,value:t,onChange:a}=e,n=(0,c.useRef)(null),l=getPickerValue(t),handleChange=e=>{null==a||a(getFilterValue(e))},handleClear=e=>{var r,t;null==e||e.preventDefault(),null==e||e.stopPropagation(),null!=l&&(handleChange(null),null===(t=n.current)||void 0===t||null===(r=t.close)||void 0===r||r.call(t))},renderToggleContent=(e,r)=>(0,d.jsxs)("span",{className:tH().toggleContent,children:[(0,d.jsx)("span",{className:tH().toggleIcon,children:(0,d.jsx)(CommercialAgreementIcon,{})}),(0,d.jsx)("span",{className:r,children:e})]});return(0,d.jsx)("div",{className:tH().wrapperContainer,children:(0,d.jsx)(rw.Z,{ref:n,data:tV,value:l,onCh
1ange:handleChange,disabled:!!r,size:"lg",className:tH().selectPicker,placement:"bottomEnd",searchable:!1,cleanable:!0,onClean:handleClear,placeholder:renderToggleContent(tW,tH().placeholderText),renderValue:e=>{var r;if(null==e)return renderToggleContent(tW,tH().placeholderText);let t=null===(r=tV.find(r=>r.value===e))||void 0===r?void 0:r.label;return renderToggleContent(t,tH().selectedText)},renderMenuItem:(e,r)=>(0,d.jsx)("div",{className:tH().menuItem,children:(0,d.jsx)(tA.Z,{checked:l===r.value,readOnly:!0,children:(0,d.jsx)("span",{className:tH().menuItemLabel,children:e})})}),renderMenu:e=>(0,d.jsxs)("div",{className:tH().menuContainer,children:[(0,d.jsx)("div",{className:tH().menuItems,children:e}),(0,d.jsx)("div",{className:tH().footer,children:(0,d.jsx)("button",{type:"button",className:tH().clearFilterLink,onMouseDown:e=>e.preventDefault(),onClick:handleClear,children:"Limpiar filtro"})})]}),menuClassName:tH().menuDropdown,menuMaxHeight:96,menuAutoWidth:!1})})}var tz=t(90900),tq=t.n(tz);let tU={date:180,pointOfSale:190,drugmanufacturer:190,invoiceStatus:165,purchaseMode:165,commercialAgreement:165};var OrderToolbar_OrderToolbar=e=>{let{setSearchTerms:r,currentSearch:t,setCurrentSearch:a,timerSkeleton:n=!1,setDateTerms:l,dateTerms:o,setSelectedDate:s,selectedDate:u,handlerClearFilters:_,setListTagTerms:h,listTagTerms:m,selectedTag:g,setSelectedTag:v,setListDrugTerms:C,listDrugTerms:f,selectedItem:w,setSelectedItem:y,invoiceStatusTerms:j,setInvoiceStatusTerms:b,purchaseTypeTerms:S,setPurchaseTypeTerms:D,withCommercialAgreement:k,setWithCommercialAgreement:N,selectorList:P,onDownloadReport:L,onDownloadShortages:O,disabledDownloadShortage:F}=e,[E,B]=(0,c.useState)(!1),R=x.$K&&(null==P?void 0:P.tag)===i.typeTwo,T=(0,c.useMemo)(()=>{let e=[l&&s&&_&&tU.date,h&&v&&_&&tU.pointOfSale,C&&y&&_&&tU.drugmanufacturer,b&&tU.invoiceStatus,(null==P?void 0:P.tag)!==i.typeOne&&D&&tU.purchaseMode,(null==P?void 0:P.tag)!==i.typeOne&&N&&tU.commercialAgreement].filter(
1Boolean),r=e.reduce((e,r)=>e+r+16,0)-(e.length?16:0);return 56+r},[l,s,_,h,v,C,y,b,D,N,null==P?void 0:P.tag]);return(0,d.jsxs)("div",{className:[tq().container,R?tq().containerCompact:"",R&&E?tq().containerSearchOpen:""].filter(Boolean).join(" "),children:[r&&a&&"string"==typeof t&&(0,d.jsx)("div",{className:"".concat(tq()["search-wrap"]," ").concat(E?tq()["search-wrap-expanded"]:""),style:E&&!R?{minWidth:T}:void 0,children:(0,d.jsx)("div",{className:E?tq()["search-bar-inner"]:void 0,style:E?{width:"100%"}:void 0,children:(0,d.jsx)(tu.Z,{timerSkeleton:n,placeholder:(0,p.t)("search.placeholder"),placeholderLarge:(0,p.t)("search.placeholder"),setSearchTerms:r,currentSearch:t,setCurrentSearch:a,gtagClass:"input__search-orders",onSearchToggle:B})})}),l&&s&&_&&!E&&(0,d.jsx)(DateInput_DateInput,{timerSkeleton:n,placeholder:"Fecha",icon:(0,d.jsx)("img",{src:"/assets/images/calendar-grey.svg",alt:"calendar"}),setDateTerms:l,dateTerms:o,handlerClearFilters:_,setSelectedDate:s,selectedDate:u,limitMaxWidth:R}),h&&v&&_&&!E&&(0,d.jsx)(CheckPickerPointOfSale_CheckPickerPointOfSale,{timerSkeleton:n,placeholder:(0,p.t)("myOrders.labelPointOfSales"),icon:(0,d.jsx)("img",{src:"/assets/images/storefront-grey.svg",alt:"pos"}),setListTagTerms:h,listTagTerms:m,handlerClearFilters:_,setSelectedTag:v,selectedTag:g,limitMaxWidth:R}),C&&y&&_&&!E&&(0,d.jsx)(CheckPickerDrugmanufacturer_CheckPickerDrugmanufacturer,{timerSkeleton:n,placeholder:(0,p.t)("myOrders.selectListPlaceHolder"),icon:(0,d.jsx)("img",{src:"/assets/images/local_pharmacy-grey.svg",alt:"droguer\xedas"}),setListDrugTerms:C,listDrugTerms:f,handlerClearFilters:_,setSelectedItem:y,selectedItem:w,limitMaxWidth:R}),b&&!E&&(0,d.jsx)(CheckPickerInvoiceStatus,{timerSkeleton:n,value:j,onChange:b,isTypeOne:(null==P?void 0:P.tag)===i.typeOne}),(null==P?void 0:P.tag)!==i.typeOne&&D&&!E&&(0,d.jsx)(CheckPickerPurchaseMode,{timerSkeleton:n,value:S,onChange:D}),(null==P?void 0:P.tag)!==i.typeOne&&N&&!E&&(0,d.jsx)(CheckPickerCommercialAgreement,{timerSkeleton:n,value:k,onChange:N}),L&&O&&(0,d.jsx)("div",{className:tq()["download-wrap"],children:(0,d.jsx)(DownloadButton_DownloadButton,{onDownloadReport:L,onDownloadShortages:O,disabledDownloadShortage:F,hideTextOnNarrowViewport:R})})]})},tG=(0,tn.FR)(()=>{let e=(0,u.useRouter)(),{urlPrev:r,savePrevUrl:t}=(0,eb.R)(),{listTagTerms:a,setListTagTerms:n,listDrugTerms:l,setListDrugTerms:i,searchTerms:o,setSearchTerms:s,dateTerms:p,setDateTerms:_,invoiceStatusTerms:h,setInvoiceStatusTerms:m,purchaseTypeTerms:g,setPurchaseTypeTerms:v,withCommercialAgreement:C,setWithCommercialAgreement:j}=(0,tc.P)(),{openModalDelete:b,setOpenModalDelete:S,emptyCart:D}=(0,ti.o)(),{pointOfSale:k}=(0,tl.g)(),[N,P]=(0,c.useState)([]),[L,O]=(0,c.useState)([]),[F,E]=(0,c.useState)([]),[B,R]=(0,c.useState)([]),[T,Z]=(0,c.useState)(p),[A,M]=(0,c.useState)(!1),[I,H]=(0,c.useState)(!1),[W,V]=(0,c.useState)(()=>x.vR&&"2"===localStorage.getItem("tabSelected")?{tag:"ordersByDrugmanufacturer",value:2}:{tag:"myOrders",value:1}),[z,q]=(0,c.useState)("20"),[U,G]=(0,c.useState)(1),[Q,Y]=(0,c.useState)(!1),[$,X]=(0,c.useState)(l),[K,J]=(0,c.useState)(a),[ee,er]=(0,c.useState)([]),[et,ea]=(0,c.useState)([]),[en,el]=(0,c.useState)(null),ei=x.vR?h:ee,eo=x.vR?m:er,es=x.vR?g:et,ed=x.vR?v:ea,ec=x.vR?C:en,eu=x.vR?j:el,[ep,e_]=(0,c.useState)(""),[eh,em]=(0,c.useState)(!0),[ex,eg]=(0,c.useState)(""),{user:ev,mutateUser:eC}=(0,w.aF)({}),ordersGetter=async(e,r,t)=>{try{let[a,n]=await Promise.all([gettingOrders(e,r,t),gettingDeliveries(e,r,t)]);P(Array.isArray(null==a?void 0:a.data)?a.data:[]),E((null==a?void 0:a.meta)||null),O(Array.isArray(null==n?void 0:n.data)?n.data:[]),R((null==n?void 0:n.meta)||null),M(!1),em(!1),Y(!1),"all"===ex&&localStorage.setItem("selectedFilter","true")}catch(e){P([]),O([]),E(null),R(null),M(!1),em(!1),H(!1)}};(0,c.useEffect)(()=>{localStorage.setItem("selectedFilter","true"),eC()},[]),(0,c.useLayoutEffect)(()=>{if(!x.vR)return;let e=JSON.parse(localStorage.getItem("filters")||"{}");localStorage.setItem("filters",JSON.stringify({...e,invoiceStatusTerms:ei,purchaseTypeTerms:es,with_commercial_agreement:ec}))},[ei,es,ec]);let ef=(0,ts.bj)(o,p,l,a,ei,es,ec);(0,c.useEffect)(()=>{M(!0),H(!0),(async()=>{""!==ef?await ordersGetter(ef,z,U):await ordersGetter("",z,U),H(!1)})(),localStorage.setItem("filters",JSON.stringify({dateTerms:p,searchTerms:o,listDrugTerms:l,listTagTerms:a,invoiceStatusTerms:ei,purchaseTypeTerms:es,with_commercial_agreement:ec}))},[o,p,l,a,ei,es,ec,z,U,Q]),(0,c.useEffect)(()=>
1{if(r&&"deliveries"===r.split("/")[2]||"2"===localStorage.getItem("tabSelected")){V({tag:"ordersByDrugmanufacturer",value:2}),t("");return}V({tag:"myOrders",value:1}),t("")},[]),(0,c.useEffect)(()=>{let handleSidebarTabChange=e=>{let{tab:r}=e.detail;r!==W.value&&(2===r?V({tag:"ordersByDrugmanufacturer",value:2}):V({tag:"myOrders",value:1}))};return window.addEventListener("sidebarTabChange",handleSidebarTabChange),()=>window.removeEventListener("sidebarTabChange",handleSidebarTabChange)},[W.value]),(0,c.useEffect)(()=>{let r=JSON.parse(localStorage.getItem("filters"))||{},{pos:t,status:a,attr:l}=e.query,o=e.query["filters[from_date]"],s=e.query["filters[to_date]"],d=(0,tM.Hh)(e.query),c=e.query[tM.tR];if(t||a||l||o||s||d||c){if(e_(""),X([]),J([]),eo([]),ed([]),eu(null),l){let e=Array.isArray(l)?parseInt(l[0]):parseInt(l);isNaN(e)||(2===e?(V({tag:"ordersByDrugmanufacturer",value:2}),localStorage.setItem("tabSelected","2")):(V({tag:"myOrders",value:1}),localStorage.setItem("tabSelected","1")))}if(t){let e=Array.isArray(t)?t[0]:t,r=parseInt(e);isNaN(r)||(n([r]),J([r]))}if(a){let e=Array.isArray(a)?parseInt(a[0]):parseInt(a);isNaN(e)||eo([e])}if(o&&s){let e={from:o,to:s};_(e),Z(e)}d&&(i([d]),X([d]));let e=(0,tM.mi)(c);null!==e&&eu(e)}else if(e_(r.searchTerms||""),X(r.listDrugTerms||[]),J(r.listTagTerms||[]),x.vR){let e=(null==h?void 0:h.length)>0||(null==g?void 0:g.length)>0||null!==C;e||(eo(r.invoiceStatusTerms||[]),ed(r.purchaseTypeTerms||[]),eu((0,tM.X$)(r)))}else eo(r.invoiceStatusTerms||[]),ed(r.purchaseTypeTerms||[]),eu((0,tM.X$)(r))},[e.query]);let handlerClearFilters=(e,r)=>{eg(e),cleanFilters(e,$,s,X,i,Y,n,K,J,ep,e_,Z,T,_,r,ed,eo,eu)},ew=Array.isArray(N)&&N.length>0,ey=Array.isArray(L)&&L.length>0;return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(to.F,{order:N,dely:L,handlerClearFilters:handlerClearFilters,children:[(0,d.jsx)(OrderToolbar_OrderToolbar,{setSearchTerms:s,currentSearch:ep,setCurrentSearch:e_,timerSkeleton:I,setDateTerms:_,dateTerms:p,setSelectedDate:Z,selectedDate:T,handlerClearFilters:handlerClearFilters,setListTagTerms:n,listTagTerms:a,selectedTag:K,setSelectedTag:J,setListDrugTerms:i,listDrugTerms:l,selectedItem:$,setSelectedItem:X,invoiceStatusTerms:ei,setInvoiceStatusTerms:eo,purchaseTypeTerms:es,setPurchaseTypeTerms:ed,withCommercialAgreement:ec,setWithCommercialAgreement:eu,selectorList:W,onDownloadReport:()=>{try{var e;return f.B({action:"button__download-report",category:"my-orders",label:"button__download-report",value:0,client_id:null==ev?void 0:null===(e=ev.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==ev?void 0:ev.role_id)}),gettingReport(ef)}catch(e){}},onDownloadShortages:()=>{var e;f.B({action:"button__orders-missing-download",category:"my-orders",label:"button__orders-missing-download",value:0,client_id:null==ev?void 0:null===(e=ev.client)||void 0===e?void 0:e.id,user_role:(0,y.xQ)(null==ev?void 0:ev.role_id)}),(0,e7.X)({dateTerms:p,selectedTag:K})},disabledDownloadShortage:!(null==N?void 0:N.some(e=>(null==e?void 0:e.has_complete_stock)===!1))}),(0,d.jsx)(ListOrders_ListOrders,{shouldOutOfOrders:!A&&!I&&!eh&&!ew&&!ey,listTagTerms:a,listDrugTerms:l,searchTerms:o,handlerClearFilters:handlerClearFilters,orders:N,deliveries:L,ordersPagination:F,deliveriesPagination:B,selectorList:W,setSelectorList:V,timerSkeleton:I,itemRow:z,setItemRow:q,pages:U,setPages:G})]})})}),tQ=t(37783),tY=t.n(tQ),OrderDetails_OrderDetails=e=>{let{details:r}=e;return(0,d.jsx)("section",{className:tY()["container-out-of-orders"],children:(0,d.jsx)("div",{className:tY()["container-banner"],style:{paddingBottom:50},children:(0,d.jsx)(DetailsCard_DetailsCard,{details:r})})})},t$=t(48105),tX=t.n(t$),tK=(0,tn.FR)(()=>{let e=(0,u.useRouter)(),{order:r,from:t}=null==e?void 0:e.query,{user:a}=(0,w.aF)({}),[n,l]=(0,c.useState)();return(0,c.useEffect)(()=>{var e,n;if("email"===t&&f.B({action:"button__email-missing-download",category:"email",label:"button__email-missing-download",value:0,client_id:null==a?void 0:null===(n=a.client)||void 0===n?void 0:n.id,user_role:(0,y.xQ)(null==a?void 0:a.role_id)}),null===(e=localStorage)||void 0===e||e.removeItem("redirectFromEmail"),!r)return;let fetchData=async()=>{let{data:e}=await (0,e3.s$)(r);l(null==e?void 0:e.data)};fetchData()},[t,r]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(to.F,{orders:r,detailsOrders:n,children:(0,d.jsx)("div",{className:tX()["container-list"],children:(0,d.jsx)(eg.Z,{fluid:!0,children:(0,d.jsx)("div",{className:tX()["container-order-details"],children:(0,d.jsx)(OrderDetails_OrderDetails,{details:n})})})})})})}),tJ=t(17275),t0=t.n(tJ),t1=t(68706),t6=t.n(t1),Deliveries_SkeletonDeliveries=function(){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("section",{className:t6()["container-out-of-orders"],children:(0,d.jsxs)("div",{className:t6()["container-header"],children:[(0,d.jsx)("div",{className:t6().header,children:(0,d.jsx)(Skeletons_Skeletons,{width:320,height:14})}),(0,d.jsx)("div",{className:t6()["header-body"],children:(0,d.jsx)(Skeletons_Skeletons,{width:320,height:14})})]})}),(0,d.jsx)("section",{className:t6()["container-out-of-orders"],children:(0,d.jsxs)("div",{className:t6().body,children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,d.jsx)(Skeletons_Skeletons,{width:32,height:32,variant:"circular"}),(0,d.jsxs)("div",{style:{marginLeft:16},children:[(0,d.jsx)(Skeletons_Skeletons,{width:200,height:12}),(0,d.jsx)(Skeletons_Skeletons,{width:80,height:12})]})]}),(0,d.jsxs)("div",{className:t6()["firstRow-body"],children:[(0,d.jsx)(Skeletons_Skeletons,{width:104,height:12}),(0,d.jsx)(Skeletons_Skeletons,{width:104,height:12})]}),(0,d.jsx)("div",{className:t6().line}),Array.from({length:6},()=>(0,d.jsxs)("div",{className:t6()["row-data"],children:[(0,d.jsxs)("div",{children:[(0,d.jsx)(Skeletons_Skeletons,{width:200,height:14}),(0,d.jsx)(Skeletons_Skeletons,{width:80,height:14})]}),(0,d.jsx)("div",{children:(0,d.jsx)(Skeletons_Skeletons,{width:80,height:14})}),(0,d.jsx)("div",{children:(0,d.jsx)(Skeletons_Skeletons,{width:80,height:14})})]}))]})})]})},t3=(0,tn.FR)(()=>{let e=(0,u.useRouter)(),{delivery:r,order:t}=e.query,[a,n]=(0,c.useState)(),[l,i]=(0,c.useState)({}),orderDeliveries=async()=>{try{let{data:e}=await (0,e3.s$)(t);n(e.data)}catch(e){}},handleDetails=async()=>{let e=await (0,e3.$h)(r,t);i(e.data.data)};return(0,c.useEffect)(()=>{t&&r&&((async()=>await orderDeliveries())(),handleDetails())},[t,r]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(to.F,{delivery:r,orders:t,children:(0,d.jsx)("div",{className:t0()["container-list"],children:(0,d.jsx)(eg.Z,{fluid:!0,children:l&&a?(0,d.jsx)(DeliveriesDetails_DeliveriesDetails,{details:a,deliveries:l}):(0,d.jsx)(Deliveries_SkeletonDeliveries,{})})})})})})},340:function(e,r,t){"use strict";t.d(r,{Z:function(){return LoadingBody_LoadingBody}});var a=t(85893),n=t(84418),l=t(84117),i=t(82206),o=t(53130),s=t(19295),d=t.n(s),c=t(82289),u=t(66821),p=t.n(u),SearchResultsLoader_SearchResultsLoader=()=>(0,a.jsx)(l.Z,{xs:22,children:(0,a.jsxs)(n.Z,{style:{padding:"3px 16px"},children:[(0,a.jsx)(l.Z,{xs:2,children:(0,a.jsx)(c.Z,{graph:"image",className:p().paragraphLoaderImage,rows:0})}),(0,a.jsxs)(l.Z,{xs:22,children:[(0,a.jsx)(c.Z,{rows:1,rowHeight:15,active:!0}),(0,a.jsx)(c.Z,{rows:1,rowHeight:15,active:!0})]})]})}),DrawerBodyLoader_DrawerBodyLoader=()=>(0,a.jsx)(l.Z,{xs:17,children:(0,a.jsx)(n.Z,{children:(0,a.jsxs)(l.Z,{xs:24,children:[(0,a.jsx)(c.Z,{rows:1,rowHeight:15,active:!0}),(0,a.jsx)(c.Z,{rows:1,rowHeight:15,active:!0})]})})}),LoadingBody_LoadingBody=e=>{let{isSearchResults:r,rows:t=5}=e,s=r?2:7,c=r?"search-results-container":"container";return(0,a.jsx)(a.Fragment,{children:Array.from({length:t},(e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)(n.Z,{className:d()[c],children:[r?(0,a.jsx)(SearchResultsLoader_SearchResultsLoader,{}):(0,a.jsx)(DrawerBodyLoader_DrawerBodyLoader,{}),(0,a.jsx)(l.Z,{className:d().button,xs:s,children:(0,a.jsx)(i.Z.Graph,{style:{marginTop:6,height:45},active:!0})})]}),!r&&(0,a.jsx)(o.Z,{style:{margin:0}})]},t+1))})}},82289:function(e,r,t){"use strict";var a=t(85893),n=t(82206),l=t(31567),i=t.n(l);r.Z=e=>(0,a.jsx)("div",{className:i()["wrapper-paragraph"],children:(0,a.jsx)(n.Z.Paragraph,{...e})})},40780:function(e,r,t){"use strict";t.d(r,{P:function(){return useFiltersContext},W:function(){return FiltersProvider}});var a=t(85893),n=t(67294),l=t(7069),i=t(64751),o=t(51745);let s=(0,n.createContext)(null),FiltersProvider=e=>{let{children:r}=e,t={from:(0,i.sG)((0,l.Z)(new Date,6)),to:(0,i.sG)(new Date)}
1,[d,c]=(0,n.useState)([]),[u,p]=(0,n.useState)([]),[_,h]=(0,n.useState)(""),[m,x]=(0,n.useState)(t),[g,v]=(0,n.useState)([]),[C,f]=(0,n.useState)([]),[w,y]=(0,n.useState)(null);return(0,a.jsx)(s.Provider,{value:{listTagTerms:d,setListTagTerms:c,listDrugTerms:u,setListDrugTerms:p,searchTerms:_,setSearchTerms:h,dateTerms:m,setDateTerms:x,...o.vR?{invoiceStatusTerms:g,setInvoiceStatusTerms:v,purchaseTypeTerms:C,setPurchaseTypeTerms:f,withCommercialAgreement:w,setWithCommercialAgreement:y}:{}},children:r})},useFiltersContext=()=>(0,n.useContext)(s)},3041:function(e,r,t){"use strict";t.d(r,{R:function(){return useUrlContext},h:function(){return UrlProvider}});var a=t(85893),n=t(67294);let l=(0,n.createContext)(null),UrlProvider=e=>{let{children:r}=e,[t,i]=(0,n.useState)("");return(0,a.jsx)(l.Provider,{value:{urlPrev:t,savePrevUrl:e=>{i(e)}},children:r})},useUrlContext=()=>(0,n.useContext)(l)},57712:function(e,r,t){"use strict";t.d(r,{Z:function(){return stringAvatar}});var a=t(41785);let extractTextInQuotes=e=>{let r=null==e?void 0:e.match(/"([^"]*)"\s*([^"]*)$/);return r?"".concat(r[1]," ").concat(r[2]).trim():e};function stringAvatar(e,r,t){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=a?e:extractTextInQuotes(e);switch(r){case!0:{let e=null,r=null==n?void 0:n.split(" "),a=null==r?void 0:r.filter(e=>!e.includes("%"));for(let t of r)t.includes("%")&&(e=t);let l=handleAvatarName(a,n,t);return"".concat(l," ").concat(e?"".concat(e):"")}case!1:return handleAvatarName(null==n?void 0:n.split(" "),n,t);case void 0:return null}}let handleAvatarName=(e,r,t)=>(null==e?void 0:e.length)===1&&t===a.EC.Kellerhoff?"KE":(null==e?void 0:e.length)>=3?"".concat(r.split(" ")[0][0]).concat(r.split(" ")[1][0]).concat(r.split(" ")[2][0]):(null==e?void 0:e.length)>2?"".concat(r.split(" ")[0][0]).concat(r.split(" ")[2][0]):(null==e?void 0:e.length)>1?"".concat(r.split(" ")[0][0]).concat(r.split(" ")[1][0]):(null==e?void 0:e.length)===1&&t===a.EC.Asoprofarma?"ASP":"".concat(null==r?void 0:r.split(" ")[0][0])},76933:function(e,r,t){"use strict";t.d(r,{X:function(){return handleDownloadShortages}});var a=t(55486);let handleDownloadShortages=async e=>{let{dateTerms:r,selectedTag:t=[],order_ids:n=[]}=e;try{var l,i;let e={...(null==r?void 0:r.from)&&(null==r?void 0:r.to)&&{from_date:null==r?void 0:r.from,to_date:null==r?void 0:r.to},...(null==t?void 0:t.length)>0&&{point_of_sale_ids:t},...(null==n?void 0:n.length)>0&&{order_ids:n}},o=await (0,a.sJ)(e);if(200!==o.status)throw Error("Error al descargar faltas");let s=new Blob([o.data],{type:o.headers["content-type"]||"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),d=new Date,c="".concat(d.getFullYear()).concat(String(d.getMonth()+1).padStart(2,"0")).concat(String(d.getDate()).padStart(2,"0")).concat(String(d.getHours()).padStart(2,"0")).concat(String(d.getMinutes()).padStart(2,"0")),u=(null==r?void 0:null===(l=r.from)||void 0===l?void 0:l.replace(/-/g,""))||"sin_fecha",p=(null==r?void 0:null===(i=r.to)||void 0===i?void 0:i.replace(/-/g,""))||"sin_fecha",_=(null==n?void 0:n.length)>0&&"sin_fecha"===u&&"sin_fecha"===p?"".concat(c,"_faltas_").concat(n[0],".xlsx"):"".concat(c,"_faltas_").concat(u,"_").concat(p,".xlsx"),h=window.URL.createObjectURL(s),m=document.createElement("a");m.href=h,m.download=_,document.body.appendChild(m),m.click(),m.remove(),window.URL.revokeObjectURL(h)}catch(e){}}},47114:function(e){e.exports={placeholder:"ExCheckpicker_placeholder__ZWuYD","value-container":"ExCheckpicker_value-container__8mAPq","value-text":"ExCheckpicker_value-text__Ejbze","value-counter"
1:"ExCheckpicker_value-counter__xpW2J",footer:"ExCheckpicker_footer__H9Agd","footer-buttons":"ExCheckpicker_footer-buttons__eucbw","select-all-checkbox":"ExCheckpicker_select-all-checkbox__9TKfa"}},70031:function(e){e.exports={"button-fal":"ButtonFal_button-fal__m5hit","button-fal-max":"ButtonFal_button-fal-max__ZaDOk"}},184:function(e){e.exports={"item-icon":"Content_item-icon__3v7_T"}},4211:function(e){e.exports={dropdown:"DropdownOrder_dropdown__Infig",dropdownDownload:"DropdownOrder_dropdownDownload__n7CWo"}},96170:function(e){e.exports={loader:"Title_loader__TsIg2",placeholder:"Title_placeholder__6cwEC"}},57425:function(e){e.exports={"wrapper-container-images":"Banner_wrapper-container-images__aNrqQ","image-container":"Banner_image-container__GVG2q","image-vector":"Banner_image-vector__A2Zur","container-text":"Banner_container-text__NrGqN","title-out-of-orders":"Banner_title-out-of-orders__RJ_5C","subtitle-out-of-orders":"Banner_subtitle-out-of-orders__nNkdX","action-button":"Banner_action-button__kbHEB"}},43920:function(e){e.exports={selectPicker:"CheckPickerCommercialAgreement_selectPicker__kP34p",wrapperContainer:"CheckPickerCommercialAgreement_wrapperContainer__dtAaW",toggleContent:"CheckPickerCommercialAgreement_toggleContent__RB3ux",toggleIcon:"CheckPickerCommercialAgreement_toggleIcon__Mzech",placeholderText:"CheckPickerCommercialAgreement_placeholderText__SjtAS",selectedText:"CheckPickerCommercialAgreement_selectedText___hmiG",menuDropdown:"CheckPickerCommercialAgreement_menuDropdown__dWVzy",menuContainer:"CheckPickerCommercialAgreement_menuContainer__Oqx89",menuItems:"CheckPickerCommercialAgreement_menuItems__axbPJ",menuItem:"CheckPickerCommercialAgreement_menuItem__lgfUf",menuItemLabel:"CheckPickerCommercialAgreement_menuItemLabel__6YtvJ",footer:"CheckPickerCommercialAgreement_footer__gQFos",clearFilterLink:"CheckPickerCommercialAgreement_clearFilterLink__X10HQ"}},65057:function(e){e.exports={"select-picker":"CheckPickerDrugmanufacturer_select-picker__NrRdV","select-picker-capped":"CheckPickerDrugmanufacturer_select-picker-capped__Wbl54","wrapper-container":"CheckPickerDrugmanufacturer_wrapper-container__hCX12","placeholder-text":"CheckPickerDrugmanufacturer_placeholder-text__JYQjJ","container-icon":"CheckPickerDrugmanufacturer_container-icon__Gck6l","row-container":"CheckPickerDrugmanufacturer_row-container__HCuaS",name:"CheckPickerDrugmanufacturer_name__ek4xr"}},46299:function(e){e.exports={selectPicker:"CheckPickerInvoiceStatus_selectPicker__69_b4",wrapperContainer:"CheckPickerInvoiceStatus_wrapperContainer__4wR1z",placeholderText:"CheckPickerInvoiceStatus_placeholderText__5K5Wq",menuDropdown:"CheckPickerInvoiceStatus_menuDropdown__40DPC",tagContainer:"CheckPickerInvoiceStatus_tagContainer__L4e2T",tagLeftGroup:"CheckPickerInvoiceStatus_tagLeftGroup__0IUS6",selectedText:"CheckPickerInvoiceStatus_selectedText__BovPw",tagCounter:"CheckPickerInvoiceStatus_tagCounter__A9lgT"}},55751:function(e){e.exports={"select-picker":"CheckPickerPointOfSale_select-picker__NakSB","select-picker-capped":"CheckPickerPointOfSale_select-picker-capped__WxkZz","wrapper-container":"CheckPickerPointOfSale_wrapper-container__HhHhw","placeholder-text":"CheckPickerPointOfSale_placeholder-text__IWRtD","container-icon":"CheckPickerPointOfSale_container-icon__jv3l8","row-container":"CheckPickerPointOfSale_row-container__8tJTN","name-withReference":"CheckPickerPointOfSale_name-withReference__WGPuc",referenceName:"CheckPickerPointOfSale_referenceName__NoW69",name:"CheckPickerPointOfSale_name__mYsiH"}},56115:function(e){e.exports={selectPicker:"CheckPickerPurchaseMode_selectPicker__ZkIc5",wrapperContainer:"CheckPickerPurchaseMode_wrapperContainer__9H_8g",placeholderText:"CheckPickerPurchaseMode_placeholderText__DMAT_",menuDropdown:"CheckPickerPurchaseMode_menuDropdown__wx8hm",tagContainer:"CheckPickerPurchaseMode_tagContainer__2HDH5",tagLeftGroup:"CheckPickerPurchaseMode_tagLeftGroup__NJ6CJ",selectedText:"CheckPickerPurchaseMode_selectedText__hVuez",selectedTextNoEllipsis:"CheckPickerPurchaseMode_selectedTextNoEllipsis__6Cr7u",tagCounter:"CheckPickerPurchaseMode_tagCounter__mP744"}},43202:function(e){e.exports={"container-wrapper-form":"DateInput_container-wrapper-form__gN8fV","container-wrapper-form-capped":"DateInput_container-wrapper-form-capped__XwJ5m","date-picker":"DateInput_date-picker__ePjDC","wrapper-container":"DateInput_wrapper-container__1d_Ca","container-icon":"DateInput_container-icon__pjdLg","placeholder-text":"DateInput_placeholder-text__GHO_q"}},64810:function(e){e.exports={wrapper:"DownloadButton_wrapper__va4jb",wrapperCompact:"DownloadButton_wrapperCompact__H3784",downloadButton:"DownloadButton_downloadButton__vWhWX",downloadIcon:"DownloadButton_downloadIcon__jcntO",downloadText:"DownloadButton_downloadText__IrKEJ",chevron:"DownloadButton_chevron__oSHsb",chevronOpen:"DownloadButton_chevronOpen__LlzHs"}},38442:function(e){e.exports={"alert-message":"InfoMessage_alert-message__RUQ_P",icon:"InfoMessage_icon__N03hR"}},20572:function(e){e.exports={badge:"Badge_badge__lDmzy",text:"Badge_text__8BiXZ"}},20199:function(e){e.exports={"wrapper-card":"CardInfoFailedPurchase_wrapper-card__lG3Uj",header:"CardInfoFailedPurchase_header__XXcad","firts-row":"CardInfoFailedPurchase_firts-row__cWXL5",col:"CardInfoFailedPurchase_col__6q3aH",icon:"CardInfoFailedPurchase_icon__yEPLj",svg:"CardInfoFailedPurchase_svg__sHWIG"}},87655:function(e){e.exports={"first-row":"SkeletonCard_first-row__FwyOy","second-row":"SkeletonCard_second-row__9EZiW","secondRow-line":"SkeletonCard_secondRow-line__WEaO1","third-row":"SkeletonCard_third-row__PY51r","thirdRow-button":"SkeletonCard_thirdRow-button__3IV2o"}},69971:function(e){e.exports={"wrapper-card":"DeliveriesCard_wrapper-card__7woIA"}},62465:function(e){e.exports={title:"BodyDeliveries_title__ehrkN",product_quantity:"BodyDeliveries_product_quantity__UaXDn",unit_quantity:"BodyDeliveries_unit_quantity__7tSOz",label:"BodyDeliveries_label__TADcs",paymentMethod:"BodyDeliveries_paymentMethod__Gk44l",icon:"BodyDeliveries_icon__hexi1",totalAgreements:"BodyDeliveries_totalAgreements__Bpm9y",agreementsPercentage:"BodyDeliveries_agreementsPercentage__uTpqB"}},57324:function(e){e.exports={"wrapper-card":"DetailsDeliveries_wrapper-card__2TWav","details-card":"DetailsDeliveries_details-card__9V6e8","card-title":"DetailsDeliveries_card-title__PCLf7","card-type":"DetailsDeliveries_card-type__ROVC5","container-button":"DetailsDeliveries_container-button__CGySJ","button-web"
1:"DetailsDeliveries_button-web__ISLjW","button-download":"DetailsDeliveries_button-download__KndlX",pulse:"DetailsDeliveries_pulse__x3UZO",avatar_nameDrug:"DetailsDeliveries_avatar_nameDrug__S9JlD",avatar_nameDrug_extendeal_plus:"DetailsDeliveries_avatar_nameDrug_extendeal_plus__yr_Bw","container-delivery-number":"DetailsDeliveries_container-delivery-number__XkU9t",label:"DetailsDeliveries_label__a_10n","hash-container":"DetailsDeliveries_hash-container__zmGTO","container-delivery":"DetailsDeliveries_container-delivery__6E1Ex","container-body":"DetailsDeliveries_container-body__22jTJ",line:"DetailsDeliveries_line__3AR_f","container-observations":"DetailsDeliveries_container-observations__MMKdH","dropdown-download":"DetailsDeliveries_dropdown-download__tbCZM","product-wrapper":"DetailsDeliveries_product-wrapper__N6IfF","product-row":"DetailsDeliveries_product-row__pqxvZ","product-wrapper-descriptions":"DetailsDeliveries_product-wrapper-descriptions__IrpVe","product-descriptions-row":"DetailsDeliveries_product-descriptions-row__xOhIZ","product-description":"DetailsDeliveries_product-description__NL6LI","product-units":"DetailsDeliveries_product-units__zCxLv","product-cash":"DetailsDeliveries_product-cash__NR9wi","product-ean":"DetailsDeliveries_product-ean__1YDW_"}},93007:function(e){e.exports={"wrapper-card":"DetailsDeliveriesExtendealPlus_wrapper-card__aAaYO","details-card-extendeal-plus":"DetailsDeliveriesExtendealPlus_details-card-extendeal-plus__ti2bh","card-title-extendeal-plus":"DetailsDeliveriesExtendealPlus_card-title-extendeal-plus__D4pL0","card-type":"DetailsDeliveriesExtendealPlus_card-type__op7as","container-button":"DetailsDeliveriesExtendealPlus_container-button__1L_y2","button-web":"DetailsDeliveriesExtendealPlus_button-web__p5THU","button-download-extendeal-plus":"DetailsDeliveriesExtendealPlus_button-download-extendeal-plus__sSnAc",pulseExtendealPlus:"DetailsDeliveriesExtendealPlus_pulseExtendealPlus__6kcZp","avatar_nameDrug-extendeal-plus":"DetailsDeliveriesExtendealPlus_avatar_nameDrug-extendeal-plus__sxuIz","extendeal-plus-tag":"DetailsDeliveriesExtendealPlus_extendeal-plus-tag__O2fxG","container-delivery-number":"DetailsDeliveriesExtendealPlus_container-delivery-number__ZMgWX",label:"DetailsDeliveriesExtendealPlus_label__vkRMw","hash-container":"DetailsDeliveriesExtendealPlus_hash-container__rENSP","container-delivery":"DetailsDeliveriesExtendealPlus_container-delivery__FmD22","container-body-extendeal-plus":"DetailsDeliveriesExtendealPlus_container-body-extendeal-plus__Icpbq",line:"DetailsDeliveriesExtendealPlus_line__0syjh","download-invoice-container":"DetailsDeliveriesExtendealPlus_download-invoice-container__eHKoz","download-invoice-name":"DetailsDeliveriesExtendealPlus_download-invoice-name__Yb841","download-invoice-button":"DetailsDeliveriesExtendealPlus_download-invoice-button__oYvqs","dropdown-download":"DetailsDeliveriesExtendealPlus_dropdown-download___z2ef",vouchers:"DetailsDeliveriesExtendealPlus_vouchers__p695i"}},11762:function(e){e.exports={container:"ObservationText_container__Dishe",text:"ObservationText_text__HyZ7h",observations:"ObservationText_observations___r1TP"}},37903:function(e){e.exports={title:"Header_title__kfhsw",line:"Header_line__9bsXD"}},46573:function(e){e.exports={"container-out-of-orders":"DeliveriesDetails_container-out-of-orders__s19O0","container-banner":"DeliveriesDetails_container-banner__FPJ_u",margin:"DeliveriesDetails_margin__wFoqB","container-disclaimer":"DeliveriesDetails_container-disclaimer__iD9jj"}},14850:function(e){e.exports={"product-row":"ExtendealPlusListProducts_product-row__M97PT","product-row-first":"ExtendealPlusListProducts_product-row-first__CDam_","product-row-last":"ExtendealPlusListProducts_product-row-last__B3Vma","product-name":"ExtendealPlusListProducts_product-name__JPZmp","product-code":"ExtendealPlusListProducts_product-code__CxQmd","product-count":"ExtendealPlusListProducts_product-count__xTeNH"}},36471:function(e){e.exports={"product-row":"ListProducts_product-row__ZEKO2","laboratory-group":"ListProducts_laboratory-group__jPNso","laboratory-header":"ListProducts_laboratory-header__j479L","product-barco
1de":"ListProducts_product-barcode__9lb28","product-name":"ListProducts_product-name__YEb_3","product-code":"ListProducts_product-code__lvolr","product-count":"ListProducts_product-count__4z_tJ","product-total-stacked":"ListProducts_product-total-stacked__0UKUI","product-total-stacked-top":"ListProducts_product-total-stacked-top__ma7fY","product-price-without-discount":"ListProducts_product-price-without-discount__rwQqa"}},41545:function(e){e.exports={wrapper:"ProductNameWithBadge_wrapper__sMUVU","wrapper-stacked":"ProductNameWithBadge_wrapper-stacked__d9zku","name-container":"ProductNameWithBadge_name-container__2SZuJ",text:"ProductNameWithBadge_text__bJMAA","text-truncated":"ProductNameWithBadge_text-truncated__xNVp8","text-stacked":"ProductNameWithBadge_text-stacked__AKN5n","badge-inline":"ProductNameWithBadge_badge-inline__NDjzM","badge-below":"ProductNameWithBadge_badge-below__6DN2J","badge-absolute":"ProductNameWithBadge_badge-absolute__da81I"}},64289:function(e){e.exports={"wrapper-card":"DeliveryCardInProgress_wrapper-card__OLY94","wrapper-pagination":"DeliveryCardInProgress_wrapper-pagination__N7rDU","wrapper-products":"DeliveryCardInProgress_wrapper-products__fmx12","header-box":"DeliveryCardInProgress_header-box__Uut5d",title:"DeliveryCardInProgress_title__EIsbK",quantity:"DeliveryCardInProgress_quantity__MoYMB",separate:"DeliveryCardInProgress_separate__n3gh9",units:"DeliveryCardInProgress_units__oV1rI",cash:"DeliveryCardInProgress_cash__3SO30"}},92106:function(e){e.exports={"container-pagination":"PaginationProducts_container-pagination__r4JiD",pagination:"PaginationProducts_pagination__WXcDv","wrapper-pagination":"PaginationProducts_wrapper-pagination__OCA_c",menu:"PaginationProducts_menu__MYTKk","select-picker-container":"PaginationProducts_select-picker-container__9Wa_a",label:"PaginationProducts_label__279Qr"}},34492:function(e){e.exports={"product-row":"Row_product-row__VNoTf","product-wrapper-descriptions":"Row_product-wrapper-descriptions__6ORf8","product-descriptions-row":"Row_product-descriptions-row__slazE","product-description":"Row_product-description__j71xC","product-units":"Row_product-units__ZxZoT","product-cash":"Row_product-cash__Y9Rc9","product-ean":"Row_product-ean__vNSK7"}},50370:function(e){e.exports={wrapper:"SkeletonRows_wrapper__e_uFn",product:"SkeletonRows_product__7YfdD",units:"SkeletonRows_units___YPzA",price:"SkeletonRows_price__IVHvG"}},34639:function(e){e.exports={"wrapper-card":"DeliveryListFailed_wrapper-card__CaCx_","wrapper-pagination":"DeliveryListFailed_wrapper-pagination__VXpBz","wrapper-products":"DeliveryListFailed_wrapper-products__lx1ht"}},18594:function(e){e.exports={"container-pagination":"PaginationProducts_container-pagination__cSNYI",pagination:"PaginationProducts_pagination__L_GL6","wrapper-pagination":"PaginationProducts_wrapper-pagination__s5RKf",menu:"PaginationProducts_menu__2FM78","select-picker-container":"PaginationProducts_select-picker-container__8PUe4",label:"PaginationProducts_label__J13Cx"}},72617:function(e){e.exports={"product-row":"Row_product-row__9tmy4","product-wrapper-descriptions":"Row_product-wrapper-descriptions__1Or_z","product-descriptions-row":"Row_product-descriptions-row__5G_Yi","product-description":"Row_product-description__GYusg","product-units":"Row_product-units__alLmt","product-cash":"Row_product-cash__4tmUt","product-ean":"Row_product-ean__7ww_s"}},76752:function(e){e.exports={wrapper:"SkeletonRows_wrapper__80S7h",product:"SkeletonRows_product__MlMRK",units:"SkeletonRows_units__2WLja",price:"SkeletonRows_price__lIsWp"}},73906:function(e){e.exports={"wrapper-card":"Card_wrapper-card__LvGi2",header:"Card_header__GGqGy","firts-row":"Card_firts-row__eiBLv",col:"Card_col__ycY_u",icon:"Card_icon__e3vM8",svg:"Card_svg__DF42D"}},84523:function(e){e.exports={"first-row":"SkeletonCard_first-row__zxrST","second-row":"SkeletonCard_second-row__hva1Q","secondRow-line":"SkeletonCard_secondRow-line__H4YXE","third-row":"SkeletonCard_third-row__CmI
vendor: 5,334 bytes, line 1
17h","thirdRow-button":"SkeletonCard_thirdRow-button__0Cs0p"}},89307:function(e){e.exports={"cardbody-footer":"CardBody_cardbody-footer__ooa0q"}},15942:function(e){e.exports={"title-svg":"CardDrop_title-svg__M8EYo","rs-panel-header":"CardDrop_rs-panel-header__iLxIV"}},88679:function(e){e.exports={title:"Header_title__m4sOA"}},65145:function(e){e.exports={"first-col":"CardRow_first-col__YhkKq","second-col":"CardRow_second-col__J42AG",total_products:"CardRow_total_products__MtXPx",unit_products:"CardRow_unit_products__umnwj","first-row-title":"CardRow_first-row-title__HPMA4"}},50786:function(e){e.exports={container:"Footer_container__cMUKy"}},38554:function(e){e.exports={"footer-header":"Header_footer-header__Isk6U","icon-style":"Header_icon-style__D7WN7","button-style":"Header_button-style__1sB7X",pulse:"Header_pulse__gGfci","row-container":"Header_row-container__jv9s7","button-style-download":"Header_button-style-download__jGkWL","button-style-download-disabled":"Header_button-style-download-disabled__Vdwzy",disabled:"Header_disabled__7rha7"}},40025:function(e){e.exports={header:"Header_header__QVaW4","header-load":"Header_header-load__HCsTq",title:"Header_title__dfH5v","sub-title":"Header_sub-title__AOheO","rs-placeholder-paragraph":"Header_rs-placeholder-paragraph__J1Dkj"}},80242:function(e){e.exports={container:"SkeletonDetailsCard_container__2noQr",line:"SkeletonDetailsCard_line__N7Oib",card:"SkeletonDetailsCard_card__nakSk","secondRow-card":"SkeletonDetailsCard_secondRow-card__dGwlG","button-container":"SkeletonDetailsCard_button-container__t3mhH",button:"SkeletonDetailsCard_button__J7KlB"}},96306:function(e){e.exports={wrapper:"FailureReasonCard_wrapper__VFTaV",content:"FailureReasonCard_content__wfbAh",header:"FailureReasonCard_header__wYkzg",iconWrapper:"FailureReasonCard_iconWrapper__fhl1v",title:"FailureReasonCard_title__YGwXw",description:"FailureReasonCard_description__AfToK",descriptionBold:"FailureReasonCard_descriptionBold__KHuQ5",actions:"FailureReasonCard_actions__lt2Ch",retryButton:"FailureReasonCard_retryButton__bUa9Y",retryButtonText:"FailureReasonCard_retryButtonText__WIzAU",textLink:"FailureReasonCard_textLink__JXYgy",textLinkLabel:"FailureReasonCard_textLinkLabel___2zeu"}},86243:function(e){e.exports={wrapper:"HeaderFailedPurchase_wrapper__trJH3",info:"HeaderFailedPurchase_info__dVlNp","wrapper-products-quantity":"HeaderFailedPurchase_wrapper-products-quantity__pgScw","wrapper-units-quantity":"HeaderFailedPurchase_wrapper-units-quantity__6cx77"}},81977:function(e){e.exports={"drug-tooltip-label":"MyOrdersList_drug-tooltip-label__X9wxe","image-icon":"MyOrdersList_image-icon__5z3JY","avatar-images-icon":"MyOrdersList_avatar-images-icon__hFe87","popover-container":"MyOrdersList_popover-container__IW8jB","popover-text":"MyOrdersList_popover-text__aRxz4","wrapper-popover":"MyOrdersList_wrapper-popover__BRwE_","not-image-avatar":"MyOrdersList_not-image-avatar__6DWaz","not-image-avatar-list":"MyOrdersList_not-image-avatar-list__IREF7","not-image-text":"MyOrdersList_not-image-text__iBzjv","not-image-avatar-extendeal-plus":"MyOrdersList_not-image-avatar-extendeal-plus__mlUK_","not-image-text-extendeal-plus":"MyOrdersList_not-image-text-extendeal-plus__Ld_xN","avatar-moreQuantity":"MyOrdersList_avatar-moreQuantity__Xd76M",text_avatarMoreQuantity:"MyOrdersList_text_avatarMoreQuantity__LVuBX","line-container":"MyOrdersList_line-container__0DF79"}},83575:function(e){e.exports={container:"OrderCards_container__52sZW","text-date-time":"OrderCards_text-date-time__f5UiD","text-order-number":"OrderCards_text-order-number__W1ECu","row-container-name":"OrderCards_row-container-name__9EaiJ","text-drugmanufactur-title":"OrderCards_text-drugmanufactur-title__k8HVo","text-subtitle":"OrderCards_text-subtitle__fvAQZ","text-no-medicinals":"OrderCards_text-no-medicinals__eEJPB","total-value":"OrderCards_total-value__1a_wR","avatar-icon":"OrderCards_avatar-icon__U62M9","image-icon":"OrderCards_image-icon__5dI1O","container-footer":"OrderCards_container-footer__uOTxO","wrapper-card":"OrderCards_wrapper-card__dzUIW","panel-card":"OrderCards_panel-card__WAWPn","wrapper-footer":"OrderCards_wrapper-footer__iVPo3","avatar-images-icon":"OrderCards_avatar-images-icon__otnH_","icon-arrow":"OrderCards_icon-arrow___0u6H",icon:"OrderCards_icon__5JM0O","client-tooltip-label":"OrderCards_client-tooltip-label__spT_k","drug-tooltip-label":"OrderCards_drug-tooltip-label__uMGAh","container-link":"OrderCards_container-link__eJogs","avatar-container-wrapper":"OrderCards_avatar-container-wrapper__Mfe1T","badge-status":"OrderCards_badge-status__Tffyq","header-wrapper":"OrderCards_header-wrapper__G0610",shortage:"OrderCards_shortage__XASFE","label-in_process":"OrderCards_label-in_process__soCe3","automatic-purchase-badge":"OrderCards_automatic-purchase-badge__V1Nk4"}},16722:function(e){e.exports={modal:"OrderProcessingModal_modal__XEJmV",backdrop:"OrderProcessingModal_backdrop__7d1bY",body:"OrderProcessingModal_body__z9vQo",content:"OrderProcessingModal_content__2lxwv",head:"OrderProcessingModal_head__ZQOY5",iconContainer:"OrderProcessingModal_iconContainer__dU7Vt",iconWrapper:"OrderProcessingModal_iconWrapper__cPLT9",titleGroup:"OrderProcessingModal_titleGroup__fMck0",title:"OrderProcessingModal_title__EMYb6",subtitle:"OrderProcessingModal_subtitle__zCvxU",footer
1:"OrderProcessingModal_footer__YHFih",button:"OrderProcessingModal_button__W1VfI",buttonText:"OrderProcessingModal_buttonText__QCgof"}},75691:function(e){e.exports={"wrapper-by-orders":"OrdersByDrugmanufacturer_wrapper-by-orders__3IWLC","image-icon":"OrdersByDrugmanufacturer_image-icon__x3n_3","text-by-orders":"OrdersByDrugmanufacturer_text-by-orders__8xy9n","name-wrapper":"OrdersByDrugmanufacturer_name-wrapper__zBrGC",name_avatarDrug:"OrdersByDrugmanufacturer_name_avatarDrug__wkmiK",text_nameAvatarDrug:"OrdersByDrugmanufacturer_text_nameAvatarDrug__OztGA","badge-credit":"OrdersByDrugmanufacturer_badge-credit__6MUqn"}},44645:function(e){e.exports={"wrapper-by-orders":"OrdersByDrugmanufacturerExtendealPlus_wrapper-by-orders__MoDbY","image-icon":"OrdersByDrugmanufacturerExtendealPlus_image-icon__67g_T","text-by-orders":"OrdersByDrugmanufacturerExtendealPlus_text-by-orders__mJGy9","name-wrapper":"OrdersByDrugmanufacturerExtendealPlus_name-wrapper__B_X8k",name_avatarDrug:"OrdersByDrugmanufacturerExtendealPlus_name_avatarDrug__bAPLS",text_nameAvatarDrug:"OrdersByDrugmanufacturerExtendealPlus_text_nameAvatarDrug__ICBId","badge-credit":"OrdersByDrugmanufacturerExtendealPlus_badge-credit__4k3q6"}},69773:function(e){e.exports={container:"PurchaseModeIcon_container__tF7g6","container--primary":"PurchaseModeIcon_container--primary__VAUq_","container--error":"PurchaseModeIcon_container--error___KjSQ"}},77643:function(e){e.exports={container:"RetryButton_container__AR60_",icon:"RetryButton_icon__HxwES",label:"RetryButton_label__klx46"}},25907:function(e){e.exports={"text-field-component":"SelectInput_text-field-component__iZTQK",input:"SelectInput_input__oCuaA","search-button":"SelectInput_search-button__0PVxt","icon-svg":"SelectInput_icon-svg__C4SbY","icon-svg-disabled":"SelectInput_icon-svg-disabled__QGltw","input-search":"SelectInput_input-search__jTjV6","container-input":"SelectInput_container-input__Cn9vS","search-container":"SelectInput_search-container__29gV9","input-group":"SelectInput_input-group__wH_00","search-expanded":"SelectInput_search-expanded__cXXTA","search-collapsed":"SelectInput_search-collapsed___MmqY","search-button-collapsed":"SelectInput_search-button-collapsed__Oq9_t","search-icon":"SelectInput_search-icon__AjpKJ","input-group-expanded":"SelectInput_input-group-expanded__LW4GA","input-search-expanded":"SelectInput_input-search-expanded__fVxTt","close-button":"SelectInput_close-button__ZMAa8","close-icon":"SelectInput_close-icon__7EaDz"}},5403:function(e){e.exports={container:"TabSelector_container__dTF_O","button-action":"TabSelector_button-action__v5Huv"}},51202:function(e){e.exports={badge:"PromotionBadge_badge__IVLOP",text:"PromotionBadge_text__gGXN2"}},79070:function(e){e.exports={container:"EmptyListV2_container__GcnMh","container-without-search":"EmptyListV2_container-without-search__QFU6p","without-search-text":"EmptyListV2_without-search-text___zHXG","title-without-searching":"EmptyListV2_title-without-searching__3kUdB","subtitle-without-searching":"EmptyListV2_subtitle-without-searching__uqr_O","container-images":"EmptyListV2_container-images__Zqfnl","image-vector":"EmptyListV2_image-vector__6bvJ4","vector-img":"EmptyListV2_vector-img__uAJub","framer-icon":"EmptyListV2_framer-icon__Yt_rb","container-button":"EmptyListV2_container-button__SMLpA"}},94351:function(e){e.exports={"container-pagination":"PaginationList_container-pagination__EqsIW",pagination:"PaginationList_pagination__NvzeN","wrapper-pagination":"PaginationList_wrapper-pagination__a2QlY",menu:"PaginationList_menu__uRwnp","text-seeing":"PaginationList_text-seeing___Qb3B","select-picker-container":"PaginationList_select-picker-container__4Nary"}},97587:function(e){e.exports={banner:"CommercialAgreementBanner_banner__JP58y",left:"CommercialAgreementBanner_left__Uwmqw",icon:"CommercialAgreementBanner_icon__rme58",ordersLabel:"CommercialAgreementBanner_ordersLabel__gQYow",credit:"CommercialAgreementBanner_credit__H96to",creditAmount:"CommercialAgreementBanner_creditAmount__sFV88"}},34381:function(e){e.exports={"wrapper-orders-cards":"ListDelivieries_wrapper-orders-cards__1BgUM"}},75889:function(e){e.exports={"container-list":"ListOrders_container-list__2Y8Nt","container-scrollbar":"ListOrders_container-scrollbar__J2qST","wrapper-orders-cards":"ListOrders_wrapper-orders-cards__tJsCZ"}},85167:function(e){e.exports={"wrapper-row":"ListOrdersFooter_wrapper-row__ns6zB","col-wrapper":"ListOrdersFooter_col-wrapper__CsLOd","wrapper-paginator":"ListOrdersFooter_wrapper-paginator__BY4YO","wrapper-button":"ListOrdersFooter_wrapper-button__5rXXV"}},37783:function(e){e.exports={"container-out-of-orders":"OrderDetails_container-out-of-orders__YeqJ2","container-banner":"OrderDetails_container-banner__kPsyN"}},90900:function(e){e.exports={container:"OrderToolbar_container__iXUQE",containerCompact:"OrderToolbar_containerCompact__4vb96","search-wrap":"OrderToolbar_search-wrap__UNLEV","search-wrap-expanded":"OrderToolbar_search-wrap-expanded__1_PK4","search-bar-inner":"OrderToolbar_search-bar-inner__E_GoB","download-wrap":"OrderToolbar_download-wrap__mnVf_",containerSearchOpen:"OrderToolbar_containerSearchOpen__nVyMH"}},17275:function(e){e.exports={"container-list":"Deliveries_container-list__Z_n1R","container-scrollbar":"Deliveries_container-scrollbar__fxYuo","wrapper-orders-cards":"Deliveries_wrapper-orders-cards__0VUp2","scroll-bar":"Deliveries_scroll-bar__bg60O"}},68706:function(e){e.exports={header:"SkeletonDeliveries_header__8Cu34","container-out-of-orders":"SkeletonDeliveries_container-out-of-orders__tZ0rC","container-header":"SkeletonDeliveries_container-header__CVhez","header-body":"SkeletonDeliveries_header-body__84yIT",body:"SkeletonDeliveries_body__vQwL3","firstRow-body":"SkeletonDeliveries_firstRow-body___kRBc",line:"SkeletonDeliveries_line__Q3X_t","row-data":"SkeletonDeliveries_row-data__efacB"}},48105:function(e){e.exports={"container-list":"Details_container-list__Flxmw","container-scrollbar":"Details_container-scrollbar__4nfDX","wrapper-orders-cards":"Details_wrapper-orders-cards__b_x3n","scroll-bar":"Details_scroll-bar__VDYcn","container-order-details":"Details_container-order-details__4X_Aw"}},32261:function(e){e.exports={container:"TooltipError_container__A9OYx","alert-icon":"TooltipError_alert-icon__sEYMh","error-text":"TooltipError_error-text__OgpOe",root:"TooltipError_root__BAjX2"}},4145:function(e){e.exports={"container-out-of-orders":"OutOfOrders_container-out-of-orders__6T3OO"}},19295:function(e){e.exports={"search-results-container":"LoadingBody_search-results-container__sPMxT",container:"LoadingBody_container__pIKl_","wrapper-paragraph":"LoadingBody_wrapper-paragraph__KRcFe",button:"LoadingBody_button__CaHAh"}},31567:function(e){e.exports={"wrapper-paragraph":"ParagraphLoader_wrapper-paragraph__9kU9N"}},66821:function(e){e.exports={paragraphLoaderImage:"SearchResults_paragraphLoaderImage__XPdRA"}},38496:function(e){e.exports={"wrapper-card":"DeliveriesCard_wrapper-card__AxQAP",header:"DeliveriesCard_header__55Hqf","firts-row":"DeliveriesCard_firts-row___G1r0",col:"DeliveriesCard_col__perBX",icon:"DeliveriesCard_icon__KC6oQ"}},3690:function(e){e.exports={header:"Header_header__ttCgF",title:"Header_title__49_VG","sub-title":"Header_sub-title__XSRpa","rs-placeholder-paragraph":"Header_rs-placeholder-paragraph__F5kkM","delivery-number-container":"Header_delivery-number-container__QvewG",label:"Header_label__QDD_O","delivery-number":"Header_delivery-number__ownjQ"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.