1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2730506f-508c-42e4-9542-8f1c7b041d66",e._sentryDebugIdIdentifier="sentry-dbid-2730506f-508c-42e4-9542-8f1c7b041d66")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"2026-10-07-e42bdd47"},(self.webpackChunkfront=self.webpackChunkfront||[]).push([[5908],{64060:function(e,n,t){"use strict";t.d(n,{s:function(){return s},b:function(){return o}});var r=t.p+"static/images/step-1-0da79953.png",i=t.p+"static/images/step-2-b6a3d730.png",a=t.p+"static/images/step-3-856e1200.png",s={transitionModalDismissed:"platformFlowTransitionModalDismissed",newTasksModalDismissed:"platformFlowNewTasksModalDismissed"},o=[{image:r,titleKey:"platformFlowNewTasksModal.slides.step1.title",textKey:"platformFlowNewTasksModal.slides.step1.text"},{image:i,titleKey:"platformFlowNewTasksModal.slides.step2.title",textKey:"platformFlowNewTasksModal.slides.step2.text"},{image:a,titleKey:"platformFlowNewTasksModal.slides.step3.title",textKey:"platformFlowNewTasksModal.slides.step3.text"}]},814:function(e,n,t){"use strict";t.d(n,{s:function(){return f}});var r=t(3872),i=t.n(r),a=t(6054),s=t.n(a),o=t(2870),l=t(76e3),c=t(12442),u=t
1(46804),d=t(89227),p=t(81403),f=function PlatformFlowBanner(e){var n,t,r,a,f=e.className,h=(0,c.LM)();if(h.hasFeature("dodo"))return null;var g=(null===h||void 0===h||null===(n=h.company)||void 0===n?void 0:n.data.global_banners)||[],m=i()(g).call(g,function(e){return!!e.platform_flow_new_tasks}),v=(0,l.T)({content:(null!==(t=null===m||void 0===m?void 0:m.title)&&void 0!==t?t:"")+"|"+(null!==(r=null===m||void 0===m?void 0:m.body)&&void 0!==r?r:""),uuid:null===m||void 0===m?void 0:m.uuid,kind:null===m||void 0===m?void 0:m.kind}),x=v.isOpen,y=v.handleClose;if(!m||!x)return null;var j=(0,u.G)(m.body||""),w=(0,u.M)(m.body||""),b=d.b[m.banner_color];return(0,p.jsx)(o.jL,{variant:"inline",color:b,title:null!==(a=m.title)&&void 0!==a?a:"",description:w,image:"doc",actions:j.length>0?(0,p.jsx)("div",{className:"flex gap-2 flex-wrap",children:s()(j).call(j,function(e){return(0,p.jsx)(o.zx,{variant:"default",onClick:function onClick(){return function handleLinkClick(e){window.open(e,"_blank","noopener,noreferrer")}(e.url)},children:e.label},e.url)})}):void 0,onClose:m.closeable?y:void 0,className:f})}},55479:function(e,n,t){"use strict";t.d(n,{g:function(){return l}});var r=t(56289),i=t.n(r),a=(t(95008),t(35293),t(85152),t(21695)),s=t(88962),o=t(81403),l=function TableNavBar(e){var n=e.className,t=e.search,r=i()(e),l=e.filterPreset,c=e.rightSide;return(0,s.k)().isMobile?(0,o.jsxs)("div",{className:(0,a.Z)("my-5 flex flex-col gap-[10px]",n),children:[(0,o.jsx)("div",{className:"flex-1",children:t}),l&&(0,o.jsx)("div",{className:"flex-1 overflow-x-auto [&::-webkit-scrollbar]:hidden",children:l}),(0,o.jsxs)("div",{className:"flex-1 flex items-center justify-between gap-2",children:[(0,o.jsx)("div",{children:r}),(0,o.jsx)("div",{className:"flex gap-[10px]",children:c})]}),(0,o.jsx)("div",{id:"portalFilters",className:"flex flex-wrap gap-2 [&>div]:block [&>div]:w-auto min-h-0 [&:empty]:hidden"})]}):(0,o.jsxs)("div",{className:(0,a.Z)("my-5 flex flex-col gap-[10px]",n),children:[(0,o.jsxs)("div",{className:"flex-1 flex items-center justify-between gap-2",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[t,(0,o.jsx)("div",{className:"flex items-center",children:r})]}),(0,o.jsx)("div",{className:"flex items-center gap-2",children:c})]}),l&&(0,o.jsx)("div",{className:"flex-1 overflow-x-auto [&::-webkit-scrollbar]:hidden",children:l}),(0,o.jsx)("div",{id:"portalFilters",className:"flex flex-wrap gap-2 [&>div]:block [&>div]:w-auto min-h-0 [&:empty]:hidden"})]})}},1329:function(e,n,t){"use strict";t.d(n,{U:function(){return a}});var r=t(88729),i=t(61372),a=function useKonsolPlatformName(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).localized,n=void 0===e||e,t=(0,r.$G)().t,a=(0,i.Iu)().isKonsolHrm;return n?t(a?"wl.konsolHrm":"wl.konsol"):t(a?"wl.konsolHrm":"wl.konsol",{lng:"ru"})}},79164:function(e,n,t){"use strict";t.d(n,{Z:function(){return d}});var r=t(29365),i=t(32319),a=t(85152),s=t(53053),o=t(21695),l="Card-systemCard-b8ca0f22",c=t(81403),u=["systemStyles","size"],d=(0,a.forwardRef)(function(e,n){var t=e.systemStyles,a=e.size,d=(0,i.Z)(e,u),p="number"===typeof a,f=p&&a?{padding:a}:void 0;return(0,c.jsx)(s.Z,(0,r.Z)((0,r.Z)({},d),{},{size:p?void 0:a,className:t?(0,o.Z)(l,d.className):d.className,bodyStyle:f,ref:n}))})},12391:function(e,n,t){"use strict";t.d(n,{M:function(){return x}});var r=t(29365),i=t(6054),a=t.n(i),s=t(20390),o=t.n(s),l=t(29122),c=t.n(l),u=t(85152),d=t(96315),p=t(62430),f=t.n(p),h="DatePicker-range-f764b0a4",g=t(81403),m=d.Z.RangePicker,v=d.Z.TimePicker;var x=c()(function DatePickerComponent(e){var n=e.format||"DD.MM.YYYY",t=(0,u.useMemo)(function(){var e;if("string"===typeof n)return f()(a()(e=n.split("")).call(e,function(e,n){return(e=e.toUpperCase())>="A"&&e<="Z"?null:n}))},[n]);return(0,g.jsx)(d.Z,(0,r.Z)((0,r.Z)({},e),{},{onKeyDown:function onKeyDown(r,i){var a;if(null===(a=e.onKeyDown)||void 0===a||a.call(e,r,i),!r.isPropagationStopped()&&"string"===typeof n&&t){var s=r.key;if(!(s.length>1||r.altKey||r.ctrlKey)){var l=r.currentTarget,c=l.value,u=l.selectionStart,d=l.selectionEnd,p=c.length;if(p>=n.length&&r.preventDefault(),u===d&&d===p){var f=s>="0"&&s<="9",h=o()(t).call(t,p)?n[p]:void 0;h?(r.currentTarget.value=c+h,f||r.preventDefault()):f||r.preventDefault()}}}}}))},{RangePicker:function RangePicker(e){var n;return(0,g.jsx)(m,(0,r.Z)({popupClassName:h,placement:null!==(n=e.placement)&&void 0!==n?n:"bottomRight"},e))},TimePicker:v})},16767:function(e,n,t){"use strict";t.d(n,{m:function(){return c}});var r=t(29365),i=t(32319),a=(t(17244),t(85152),"PageHeader-root-5f338e37"),s=t(43529),o=t(81403),l=["children","className","divider","sticky"],c=function PageHeader(e){var n=e.children,t=e.className,c=e.divider,u=(e.sticky,(0,i.Z)(e,l));return(0,o.jsx)("div",(0,r.Z)((0,r.Z)({className:(0,s.m6)(a,"flex items-center justify-between",c&&"border-b [border-bottom-style:solid] border-[var(--colorBorderSecondary)]",t)},u),{},{children:n}))}},58583:function(e,n,t){"use strict";t.d(n,{X:function(){return c}});var r=t(29365),i=t(32319),a=(t(85152),"PageLayout-root-31219801"),s=t(43529),o=t(81403),l=["children","className"],c=function PageLayout(e){var n=e.children,t=e.className,c=(0,i.Z)(e,l);return(0,o.jsx)("div",(0,r.Z)((0,r.Z)({className:(0,s.m6)(a,"flex flex-col",t)},c),{},{children:n}))}},10117:function(e,n,t){"use strict";t.d(n,{t:function(){return o}});var r=t(29365),i=(t(85152),t(59513)),a=t(81403),s=function customItemRender(e,n){return function(t,r,i){var s="";return"page"===r?s=1===t?"first-page":t===Math.ceil(e/n)?"last-page":"page-".concat(t):"prev"===r?s="prev-page":"next"===r?s="next-page":"jump-prev"===r?s="prev-five":"jump-next"===r&&(s="next-five"),(0,a.jsx)("span",{"data-testid":s,children:i})}},o=function Pagination(e){return(0,a.jsx)(i.Z,(0,r.Z)((0,r.Z)({},e),{},{itemRender:s(e.total||0,e.pageSize||10),"data-testid":"paginator"}))}},79621:function(e,n,t){"use strict";t.d(n,{X:function(){return Row}});var r=t(29365),i=t(32319),a=(t(85152),t(68305)),s=t(81403),o=["width"];function Row(e){var n=e.width,t=(0,i.Z)(e,o);return(0,s.jsx)(a.Z,(0,r.Z)({style:{width:n}},t))}},26378:function(e,n,t){"use strict";t.d(n,{i:function(){return Table}});var r=t(32319),i=t(29365),a=t(6054),s=t.n(a),o=t(85152),l=t(57257),c=t(2
11695),u=t(80656),d=t(90707),p={background:"CellLink-background-6f696142",content:"CellLink-content-157d0648"},f=t(81403);function CellLink(e){var n=e.to,t=e.children;return n?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.rU,{to:n,className:p.background}),(0,f.jsx)(d.rU,{to:n,className:p.content,children:t})]}):t}function DynamicLink(e){var n=e.Link,t=e.item,r=e.children,i=(0,o.useState)(),a=(0,u.Z)(i,2),s=a[0],l=a[1],c=(0,o.useCallback)(function(e){l(e)},[]);return(0,f.jsxs)(CellLink,{to:s,children:[(0,f.jsx)(n,{item:t,onLink:c}),r]})}var h={table:"Table-table-d284666b",hideStickyScrollbar:"Table-hideStickyScrollbar-e595c070",loadingTable:"Table-loadingTable-4244699f"},g=["link","systemStyles","hideStickyScrollbar","columns"];function fixColumn(e,n){var t,r=null!==(t=(e=(0,i.Z)({},e)).link)&&void 0!==t?t:n,a=e.render;return a&&r&&(e.render=function(e,n,t){return function renderTableLink(e,n,t,r){if(n)return(0,f.jsx)(DynamicLink,{Link:n,item:t,children:r});var i=null===e||void 0===e?void 0:e(t);return i?(0,f.jsx)(CellLink,{to:i,children:r}):r}(r,void 0,n,a(e,n,t))}),e}function Table(e){var n=e.link,t=e.systemStyles,a=void 0===t||t,u=e.hideStickyScrollbar,d=void 0!==u&&u,p=e.columns,m=(0,r.Z)(e,g),v=(0,o.useMemo)(function(){return null===p||void 0===p?void 0:s()(p).call(p,function(e){return fixColumn(e,n)})},[p,n]),x=(0,c.Z)(m.className,a&&h.table,a&&d&&h.hideStickyScrollbar,a&&m.loading&&h.loadingTable);return(0,f.jsx)(l.Z,(0,i.Z)((0,i.Z)({},m),{},{columns:v,className:x}))}},17079:function(e,n,t){"use strict";t.d(n,{x:function(){return T}});var r=t(29365),i=t(32319),a=t(85152),s=t(60307),o=t(21695),l=t(80656),c=t(2870),u=t(58477),d=t(77357),p="Copy-text-9b6c1291",f="Copy-overlay-9ac25f6d",h=t(81403),g=["copy","data-testid"],m=(0,a.forwardRef)(function(e,n){var t=e.copy,o=e["data-testid"],m=(0,i.Z)(e,g),v=(0,a.useRef)(),x=(0,a.useState)(!1),y=(0,l.Z)(x,2),j=y[0],w=y[1];return(0,h.jsx)(u.Z,{trigger:"hover",placement:"right",content:function popover(){return(0,h.jsx)(c.JO,{icon:j?"DoneIcon":"CopyIcon",size:14,className:"align-[-0.125em]"})},className:p,destroyTooltipOnHide:!0,arrow:!1,overlayClassName:f,overlayInnerStyle:{padding:"0 4px"},children:(0,h.jsx)(s.Z,(0,r.Z)((0,r.Z)({},m),{},{ref:n,onClick:function onClick(e){var n;e.preventDefault(),e.stopPropagation(),(0,d.z)(t).then(function(){clearTimeout(v.current),w(!0),v.current=setTimeout(function(){return w(!1)},1e3)}),null===(n=m.onClick)||void 0===n||n.call(m,e)},"data-testid":o}))})}),v="Text-text-d358c320",x="Text-inline-3b1b429b",y="Text-center-0fe87755",j="Text-bold-e500099d",w="Text-normal-cd88401a",b="Text-inherit-d5f7bcfd",_="Text-nowrap-bdb5be55",C="Text-wrap-0cac8af3",k="Text-warning-854deae5",Z=["inline","secondary","bold","warning","center","type","normal","nowrap","width","copy","style","children","inherit","data-testid","wrap"];var T=(0,a.forwardRef)(function(e,n){var t,a=e.inline,l=e.secondary,c=e.bold,u=e.warning,d=e.center,p=e.type,f=e.normal,g=e.nowrap,T=e.width,S=e.copy,N=e.style,B=e.children,E=e.inherit,P=e["data-testid"],R=e.wrap,D=(0,i.Z)(e,Z);p=l?"secondary":p,N=null!==(t=N)&&void 0!==t?t:{},T&&(N.width=T);var I=(0,o.Z)(D.className,v,a&&x,d&&y,c&&j,f&&w,g&&_,u&&k,E&&b,R&&C);S=function getCopyText(e,n){return e?e&&"string"===typeof e?e:n&&"string"===typeof n?n:void 0:void 0}(S,B);var F=(0,r.Z)((0,r.Z)({},D),{},{className:I,style:N,type:p,children:B,ref:n});return S?(0,h.jsx)(m,(0,r.Z)((0,r.Z)({},F),{},{copy:S,"data-testid":P})):(0,h.jsx)(s.Z.Text,(0,r.Z)((0,r.Z)({},F),{},{"data-testid":P}))})},88744:function(e,n,t){"use strict";t.d(n,{D:function(){return u}});var r=t(29365),i=t(32319),a=(t(85152),t(60307)),s=t(21695),o={title:"Title-title-2b8c3a07"},l=t(81403),c=["wrap","data-testid"],u=function Title(e){var n=e.wrap,t=e["data-testid"],u=(0,i.Z)(e,c);return(0,l.jsx)(a.Z.Title,(0,r.Z)((0,r.Z)({},u),{},{className:(0,s.Z)(o.title,u.className,n&&o.wrap),"data-testid":t}))}},12248:function(e,n,t){"use strict";t.d(n,{h:function(){return h}});var r=t(6054),i=t.n(r),a=(t(95008),t(24757),t(35293),t(10807),t(13454),t(17244),t(65595),t(73983),t(85152)),s=t(4577),o=t.n(s),l=t(12762),c=t.n(l),u=t
1(92522),d=t.n(u),p="highlight-text-highlight-54b601e7",f=t(81403);var h=function HighlightedText(e){var n=e.text,t=e.search,r=(0,a.useMemo)(function(){var e=c()(t);if(o()(e))return(0,f.jsx)("span",{children:n});var r=d()(e),a=function escapeRegExp(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e),s=new RegExp("(".concat(a,")"),"gi"),l=n.split(s),u=!1;return(0,f.jsx)(f.Fragment,{children:i()(l).call(l,function(e,n){return d()(e)!==r||u?e:(u=!0,(0,f.jsx)("span",{className:p,children:e},n))})})},[n,t]);return(0,f.jsx)(f.Fragment,{children:r})}},62708:function(e,n,t){"use strict";t.d(n,{V:function(){return a}});var r=t(2870),i=t(81403),a=function CurrentCompanyCaption(e){var n=e.title,t=e.companyName;return(0,i.jsx)(r.Zb,{variant:"gray",padding:"xs",radius:"2xl",className:"w-full",children:(0,i.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,i.jsx)(r.ZT,{variant:"p2",textColor:"secondary",weight:"medium",children:n}),(0,i.jsx)(r.ZT,{variant:"p2",weight:"medium",className:"break-words",children:t})]})})}},69386:function(e,n,t){"use strict";t.d(n,{y:function(){return i}});var r=t(85152),i=function useDebouncedCallback(e,n){var t=(0,r.useRef)();return(0,r.useEffect)(function(){return function(){return clearTimeout(t.current)}},[]),(0,r.useCallback)(function(r){clearTimeout(t.current),t.current=setTimeout(function later(){clearTimeout(t.current),e(r)},n)},[e,n])}},88478:function(e,n,t){"use strict";t.d(n,{lr:function(){return useSearchParams}});var r=t(50759),i=t(31236),a=(t(75970),t(19257),t(83229),t(95008),t(35293),t(24757),t(29525)),s=t.n(a),o=t(18045),l=t.n(o),c=t(74171),u=t.n(c),d=t(12767),p=t.n(d),f=t(6054),h=t.n(f),g=t(57962),m=t.n(g),v=t(56289),x=t.n(v),y=t(11201),j=t.n(y),w=t(85152),b=t(67393);function createSearchParams(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new(s())("string"===typeof n||Array.isArray(n)||n instanceof s()?n:l()(e=u()(n)).call(e,function(e,t){var r=n[t];return p()(e).call(e,Array.isArray(r)?h()(r).call(r,function(e){return[t,e]}):[[t,r]])},[]))}function useSearchParams(e){!function warning(e,n){if(!e){"undefined"!==typeof console&&console.warn(n);try{throw new Error(n)}catch(t){}}}("undefined"!==typeof s(),"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params\n\nIf you're unsure how to load polyfills, we recommend you check out https://polyfill.io/v3/ which provides some recommendations about how to load polyfills only for users that need them, instead of for every user.");var n=(0,w.useRef)(createSearchParams(e)),t=(0,w.useRef)(!1),a=(0,b.TH)(),o=(0,w.useMemo)(function(){return function getSearchParamsForLocation(e,n){var t=createSearchParams(e);if(n){var r,a=(0,i.Z)(m()(n).call(n));try{var s=function _loop(){var e=r.value;t.has(e)||n.getAll(e).forEach(function(n){t.append(e,n)})};for(a.s();!(r=a.n()).done;)s()}catch(o){a.e(o)}finally{a.f()}}return t}(a.search,t.current?null:n.current)},[a.search]),l=(0,b.k6)(),c=(0,w.useCallback)(function(e,n){var i,a=createSearchParams("function"===typeof e?e(o):e);t.current=!0,x()(i=(0,r.Z)(j()(a).call(a))).call(i,Boolean).length>0?l.replace("?"+a,n):l.replace(l.location.pathname,n)},[l,o]);return[o,c]}},39970:function(e,n,t){"use strict";t.d(n,{E:function(){return _},Jk:function(){return m},ah:function(){return b},fd:function(){return w},o6:function(){return v}});var r=t(43658),i=t.n(r),a=t(56289),s=t.n(a),o=t(6054),l=t.n(o),c=t(9272),u=t.n(c),d=t(20390),p=t.n(d),f=t(12767),h=t.n(f),g=new(i())(["pending_preprocessing","preprocessing","preprocessed_with_errors","failed"]),m=function hasBundleTotals(e){return!e.is_loading&&"string"===typeof e.amount},v=function hasBundleProgress(e){var n,t;return!e.is_loading&&"number"===typeof e.count&&"number"===typeof(null===(n=e.progress)||void 0===n?void 0:n.accepted)&&"number"===typeof(null===(t=e.progress)||void 0===t?void 0:t.paid)},x=function getBundleErrorMessage(e){return"string"===typeof e?e:e.message},y=function getBundleWarningsCount(e){var n,t;return"number"===typeof e.warnings_count&&e.warnings_count>0?e.warnings_count:null!==(n=null===(t=e.warnings)||void 0===t?void 0:t.length)&&void 0!==n?n:0},j=function getBundleErrorsCount(e){var n,t,r,i=y(e);if(i>0)return i;var a=function getBundlePreprocessingErrorsCount(e){var n,t;return"number"===typeof e.preprocessing_errors_count&&e.preprocessing_errors_count>0?e.preprocessing_errors_count:null!==(n=null===(t=e.preprocessing_errors)||void 0===t?void 0:t.length)&&void 0!==n?n:0}(e);return a>0?a:null!==(n=e.errors_count)&&void 0!==n?n:e.is_loading?0:null!==(t=null===(r=e.progress)||void 0===r?void 0:r.errors)&&void 0!==t?t:0},w=function hasBundleErrors(e){return Boolean(e.has_errors)||j(e)>0},b=function shouldShowBundleProcessIncomplete(e){var n;return function isPreprocessingBundleStatus(e){return Boolean(e.status&&g.has(e.status))}(e)||Boolean(null===(n=e.actions)||void 0===n?void 0:p()(n).call(n,"preprocessing_polling"))},_=function getBundleErrorsStatusText(e,n,t){var r,i,a;if(!w(e))return null;var o=y(e);if(o>0)return h()(r="".concat(n,": ")).call(r,t(o));var c=function getBundlePreprocessingErrorsText(e){var n,t,r,i=null===(n=e.preprocessing_errors)||void 0===n?void 0:s()(t=l()(r=l()(n).call(n,x)).call(r,function(e){return u()(e).call(e)})).call(t,Boolean);return null!==i&&void 0!==i&&i.length?i.join("; "):null}(e);if(c)return h()(i="".concat(n,": ")).call(i,c);var d=j(e);return d<=0?n:h()(a="".concat(n,": ")).call(a,t(d))}},54410:function(e,n,t){"use strict";t.r(n),t.d(n,{BundlesPage:function(){return pt}});var r,i=t(61249),a=t(45144),s=t(29365),o=t(80656),l=t(64487),c=(t(95008),t(35293),t(86123),t(24757),t(75970),t(19257),t(65595),t(89e3)),u=t.n(c),d=t(20390
1),p=t.n(d),f=t(9272),h=t.n(f),g=t(29525),m=t.n(g),v=t(45790),x=t.n(v),y=t(85152),j=t(69386),w=t(67393),b=t(58583),_=t(69845),C=t(88478),k=t(12767),Z=t.n(k),T=t(35302),S=t(55893),N=t(38623),B=new S.K({baseURL:Z()(r="".concat(T.A.Base,"/")).call(r,N.me.role)}),E=function(e){return e.signedRatio="signed_ratio",e.paidRatio="paid_ratio",e}({}),P=function getBundles(e){var n=e.page,t=e.query;return B.get({url:"bundles/page/".concat(n),config:{params:t}})},R=t(3872),D=t.n(R),I=t(6054),F=t.n(I),z=(t(48108),t(88729)),M=t(2705),U=t(88962),A=t(33731),L=t(26378),W=t(10117),O=t(25812),$=t(79621),K=t(63641),q=t(75545),H=t(62708),V=t(17079),J="Errors-table-0964e2f9",X=t(81403),G=(0,M.Pi)(function(e){var n=e.store,t=[{title:"\u0421\u0442\u0440\u043e\u043a\u0430",width:64,render:function render(e,n){return(0,X.jsx)(V.x,{type:"secondary",children:n.row})},onCell:function onCell(){return{style:{verticalAlign:"top"}}}},{title:"\u041e\u0448\u0438\u0431\u043a\u0430",render:function render(e,n){var t;return(0,X.jsx)(q.w,{size:0,children:F()(t=n.messages).call(t,function(e){return(0,X.jsx)(V.x,{children:e})})})}}];return(0,X.jsx)(L.i,{dataSource:n.warnings,columns:t,pagination:!1,className:J,scroll:{y:250}})}),Y=t(2870),Q=t(78284);function getAlertMessage(e){var n,t,r,i=e.quantity,a=i.total,s=i.pending,o=(0,Q.H)("\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d","\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043e","\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043e")(s),l=(0,Q.H)("\u0430\u043a\u0442","\u0430\u043a\u0442\u0430","\u0430\u043a\u0442\u043e\u0432")(s);return Z()(n=Z()(t=Z()(r="\u0412\xa0\u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b\xa0\u043e\u0448\u0438\u0431\u043a\u0438, \u0431\u0443\u0434\u0435\u0442\xa0".concat(o," ")).call(r,s,"\xa0")).call(t,l," \u0438\u0437\xa0")).call(n,a)}var ee=(0,M.Pi)(function(e){var n=e.store;return(0,X.jsx)(Y.bZ,{variant:"warning",title:getAlertMessage(n)})}),ne=t(46298),te=t(12442),re=t(61372),ie=t(37580);function Help(){var e,n=null!==(e=(0,ie.I)().config.links.knowledgeBase)&&void 0!==e?e:{},t=n.bundleSignAndPay,r=n.actBundles;return t||r?(0,X.jsxs)(V.x,{children:[t&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)("span",{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 "}),(0,X.jsx)(Y.rU,{target:"_blank",href:t,children:"\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u043f\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0430\u043a\u0442\u043e\u0432"})]}),t&&r&&(0,X.jsx)("span",{children:", \u0430 \u0442\u0430\u043a\u0436\u0435 "}),r&&(0,X.jsxs)(X.Fragment,{children:[!t&&(0,X.jsx)("span",{children:"\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 "}),(0,X.jsx)(Y.rU,{target:"_blank",href:r,children:"\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0440\u0435\u0435\u0441\u0442\u0440\u0430"})]})]}):null}var ae="BundleUploadDialog-downloadLinkWrapper-4717bb20";function getSubmitText(e,n){var t,r=n||e,i=(0,Q.H)("\u0430\u043a\u0442","\u0430\u043a\u0442\u0430","\u0430\u043a\u0442\u043e\u0432")(r);return Z()(t="\u0421\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c ".concat(n," ")).call(t,i)}var se=(0,M.Pi)(function(e){var n,t,r,s,o,l,c,u=e.store,d=(0,z.$G)().t,p=(0,te.LM)(),f=null===(n=(0,re.Iu)().config.links.knowledgeBase)||void 0===n?void 0:n.bundleRegistryTemplates,h=(0,ne.L)({onError:function onError(e){console.error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f:",e)}}),g=null===(t=p.company)||void 0===t?void 0:t.data,m=null===g||void 0===g?void 0:g.id,v=null===g||void 0===g?void 0:g.name,x=(null!==(r=null===(s=p.user)||void 0===s||null===(o=s.data.companies)||void 0===o?void 0:o.items.length)&&void 0!==r?r:0)>1;if(!u.open)return null;function _handleDownload(){return(_handleDownload=(0,a.Z)((0,i.Z)().mark(function _callee(){return(0,i.Z)().wrap(function _callee$(e){for(;;)switch(e.prev=e.next){case 0:m&&v&&h.mutate({data:{event:"acts_bundles_import_download_warnings",additional_data:{company_id:m,company_name:v}}}),u.downloadWarnings();case 2:case"end":return e.stop()}},_callee)}))).apply(this,arguments)}function _handleErrorsDownload(){return(_handleErrorsDownload=(0,a.Z)((0,i.Z)().mark(function _callee2(){return(0,i.Z)().wrap(function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:m&&v&&h.mutate({data:{event:"acts_bundles_import_download_errors",additional_data:{company_id:m,company_name:v}}}),u.downloadErrors();case 2:case"end":return e.stop()}},_callee2)}
1))).apply(this,arguments)}function _handleOriginalFileDownload(){return(_handleOriginalFileDownload=(0,a.Z)((0,i.Z)().mark(function _callee3(){return(0,i.Z)().wrap(function _callee3$(e){for(;;)switch(e.prev=e.next){case 0:u.downloadOriginalFile();case 1:case"end":return e.stop()}},_callee3)}))).apply(this,arguments)}var y=u.file,j=u.filename,w=u.percent,b=u.state,_=u.warnings,C=u.hasPartialErrors,k=u.hasErrorsReport,T=u.hasOriginalFileReport,S=u.hasWarningsReport,N=u.dutyTemplatesUsed,B=u.canImport,E=u.isBundleStateView,P=u.partialErrorsText;var R="done"===b,D="processing"===b,I="error"===b,F=_.length>0,M=S||k||T,U=u.quantity,A=U.total,L=U.pending,W=x?v:void 0,$=null!=P?Z()(l="".concat(d("pages.actBundlesPage.status.processedWithErrors"),": ")).call(l,P):u.partialErrorsCount>0?Z()(c="".concat(d("pages.actBundlesPage.status.processedWithErrors"),": ")).call(c,d("pages.actBundlesPage.status.errorsCount",{count:u.partialErrorsCount})):d("pages.actBundlesPage.status.processedWithErrors");return(0,X.jsxs)(Y.Ms,{width:"md",open:!0,onOpenChange:function onCancel(){u.open=!1},children:[(0,X.jsx)(Y.Ms.Title,{children:d("common.uploadRegistry")}),(0,X.jsx)(Y.Ms.Content,{children:(0,X.jsxs)(q.w,{size:16,children:[W&&(0,X.jsx)(H.V,{title:d("common.currentCompanyCaptionTitle"),companyName:W}),!E&&(0,X.jsx)(Y.Qm,{accept:".csv,.xlsx",files:y&&j?[{id:"bundle-upload-file",name:j,size:y.size,file:y,status:"error"===b?"error":"done"===b?"success":void 0}]:[],onUpload:function onChangeFiles(e){e[0]&&u.upload(e[0])},onDelete:function onRemoveFile(){u.cancel()},isUploading:("uploading"===b||"processing"===b)&&w>0||void 0,uploadProgress:w,dropzoneText:d("components.fileDrop.description"),hint:d("components.fileDrop.supportedFormats",{formats:d("components.fileDrop.formats")}),align:"center",classNames:{container:"h-auto",dropzoneContainer:"w-[270px]",dropzoneText:"text-center [&_div:first-child]:py-0.5"}}),D&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Y.bZ,{variant:"info",title:d("pages.actBundlesPage.status.processingFile")}),E&&(0,X.jsx)(Y.Ex,{value:w})]}),I&&(0,X.jsx)(Y.bZ,{variant:"warning",title:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b"}),F&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ee,{store:u}),(0,X.jsx)(G,{store:u})]}),R&&C&&!F&&(0,X.jsx)(Y.bZ,{variant:"warning",title:$}),M&&(0,X.jsxs)(O.T,{wide:!0,size:0,className:ae,children:[S&&(0,X.jsx)(Y.rU,{onClick:function handleDownload(){return _handleDownload.apply(this,arguments)},children:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442"}),k&&(0,X.jsx)(Y.rU,{onClick:function handleErrorsDownload(){return _handleErrorsDownload.apply(this,arguments)},children:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0430\u043a\u0442\u044b \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438"}),T&&(0,X.jsx)(Y.rU,{onClick:function handleOriginalFileDownload(){return _handleOriginalFileDownload.apply(this,arguments)},children:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u0435\u0441\u0442\u0440"})]}),R&&!F&&!C&&!B&&(0,X.jsx)(Y.bZ,{variant:"success",title:"\u041f\u0430\u0447\u043a\u0430 \u0430\u043a\u0442\u043e\u0432 \u043f\u0440\u0438\u043d\u044f\u0442\u0430, \u0430\u043a\u0442\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f"}),N&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Y.iz,{}),(0,X.jsx)(Y.bZ,{variant:"warning",title:"\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0439\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0447\u0435\u043a\u0438",description:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)("div",{children:["\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u0443\u0441\u043b\u0443\u0433 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0447\u0435\u043a\u043e\u0432, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0445 \u0424\u041d\u0421.",(0,X.jsx)("br",{})," \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0440\u0438\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u0432 \u0442\u0440\u0443\u0434\u043e\u0432\u044b\u0435."]}),f&&(0,X.jsx)(Y.rU,{target:"_blank",href:f,children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435"})]})})]}),(0,X.jsx)(Y.iz,{}),!R&&(0,X.jsx)(Help,{})]})}),(0,X.jsx)(Y.Ms.Footer,{children:(0,X.jsx)("div",{className:"flex flex-row gap-2 justify-end w-full",children:R&&(0,X.jsxs)(O.T,{right:!0,children:[(0,X.jsx)(Y.zx,{variant:"default",onClick:function onClickClose(){u.open=!1},children:"\u041e\u0442\u043c\u0435\u043d\u0430"}),B&&L>0&&(0,X.jsx)(Y.zx,{variant:"primary",onClick:function onClickSubmit(){if(m&&v){var e=_.length>0?"acts_bundles_import_after_errors":"acts_bundles_import_without_errors";h.mutate({data:{event:e,additional_data:{company_id:m,company_name:v}}})}u.importBundle()},children:getSubmitText(A,L)})]})})})]})}),oe=t(35527),le=t(52797),ce=t(77576),ue=t.n(ce),de=t(56289),pe=t.n(de),fe=(t(83229),t(57535)),he=t.n(fe),ge=t(430),me=t(83190),ve=t(52064),xe=t(48057),ye=t(39711);function extractWarning(e){var n,t,r,i=null!==(n=/<strong>\u0421\u0442\u0440\u043e\u043a\u0430 (\d+)<\/strong>: (.*)/.exec(e.message))&&void 0!==n?n:[];return{row:null!==(t=(0,ye.Lk)(i[1]))&&void 0!==t?t:0,messages:[null!==(r=i[2])&&void 0!==r?r:e.message]}}function getResponseWarningsCount(e){var n,t;return"number"===typeof e.warnings_count&&e.warnings_count>0?e.warnings_count:null!==(n=null===(t=e.warnings)||void 0===t?void 0:t.length)&&void 0!==n?n:0}function getPreprocessingErrorMessage(e){return"string"===typeof e?e:e.message}function getResponsePartialErrorsCount(e){var n,t=getResponseWarningsCount(e);
1if(t>0)return t;var r=function getResponsePreprocessingErrorsCount(e){var n,t;return"number"===typeof e.preprocessing_errors_count&&e.preprocessing_errors_count>0?e.preprocessing_errors_count:null!==(n=null===(t=e.preprocessing_errors)||void 0===t?void 0:t.length)&&void 0!==n?n:0}(e);return r>0?r:null!==(n=e.errors_count)&&void 0!==n?n:0}function hasResponseErrors(e){return Boolean(e.has_errors)||getResponsePartialErrorsCount(e)>0}var je=function(){function BundleUploadStore(){var e=this;(0,oe.Z)(this,BundleUploadStore),this._options=void 0,this._promise=void 0,this._open=!1,this._id=void 0,this._filename=void 0,this._file=void 0,this._state="uploading",this._percent=0,this._warnings=[],this._quantity=void 0,this._partialErrorsCount=0,this._partialErrorsText=void 0,this._hasPartialErrors=!1,this._hasErrorsReport=!1,this._hasWarningsReport=!1,this._hasOriginalFileReport=!1,this._canImport=!1,this._dutyTemplatesUsed=!1,this._isBundleStateView=!1,this._pollingTimeout=void 0,(0,ge.ky)(this),(0,ge.U5)(function(){return e.open},function(n){n||e.cancel()})}return(0,le.Z)(BundleUploadStore,[{key:"options",value:function options(e){this._options=e}},{key:"open",get:function get(){return this._open},set:function set(e){this._open=e}},{key:"id",get:function get(){return this._id}},{key:"filename",get:function get(){return this._filename}},{key:"file",get:function get(){return this._file}},{key:"percent",get:function get(){return this._percent}},{key:"state",get:function get(){return this._state}},{key:"warnings",get:function get(){return this._warnings}},{key:"quantity",get:function get(){return this._quantity||{total:0,pending:0}}},{key:"hasErrorsReport",get:function get(){return this._hasErrorsReport}},{key:"hasPartialErrors",get:function get(){return this._hasPartialErrors}},{key:"partialErrorsCount",get:function get(){return this._partialErrorsCount}},{key:"partialErrorsText",get:function get(){return this._partialErrorsText}},{key:"hasWarningsReport",get:function get(){return this._hasWarningsReport}},{key:"hasOriginalFileReport",get:function get(){return this._hasOriginalFileReport}},{key:"isBundleStateView",get:function get(){return this._isBundleStateView}},{key:"canImport",get:function get(){return this._canImport}},{key:"dutyTemplatesUsed",get:function get(){return this._dutyTemplatesUsed}},{key:"cancel",value:function cancel(){var e;this.clearPollingTimeout(),this._id=void 0,this._filename=void 0,this._file=void 0,this._state="uploading",this._percent=0,this._warnings=[],this._quantity=void 0,this._partialErrorsCount=0,this._partialErrorsText=void 0,this._hasPartialErrors=!1,this._hasErrorsReport=!1,this._hasWarningsReport=!1,this._hasOriginalFileReport=!1,this._canImport=!1,this._isBundleStateView=!1,null===(e=this._promise)||void 0===e||e.cancel()}},{key:"upload",value:function upload(e){var n=this;this.clearPollingTimeout(),this._filename=e.name,this._file=e,this._percent=0,this._state="uploading",this._warnings=[],this._quantity=void 0,this._partialErrorsCount=0,this._partialErrorsText=void 0,this._hasPartialErrors=!1,this._hasErrorsReport=!1,this._hasWarningsReport=!1,this._hasOriginalFileReport=!1,this._canImport=!1,this._dutyTemplatesUsed=!1,this._isBundleStateView=!1;this.promise(me.m.uploadBundle(e,(0,ge.aD)(function onProgress(e){n._percent=Math.round(20*e)}))).then((0,ge.aD)(function(e){var t=e.id;n._id=t,n._state="processing",n._percent=20,n.check(t)})).catch((0,ge.aD)(function(e){n._state="error",K.A.error(e,{defaultMessage:"\u0427\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u0438\u043c\u043f\u043e\u0440\u0442\u0430"})}))}},{key:"openBundleState",value:function openBundleState(e,n){this.clearPollingTimeout(),this._open=!0,this._id=e,this._filename=n,this._file=void 0,this._state="processing",this._percent=20,this._warnings=[],this._quantity=void 0,this._partialErrorsCount=0,this._partialErrorsText=void 0,this._hasPartialErrors=!1,this._hasErrorsReport=!1,this._hasWarningsReport=!1,this._hasOriginalFileReport=!1,this._canImport=!1,this._dutyTemplatesUsed=!1,this._isBundleStateView=!0,this.check(e)}},{key:"downloadWarnings",value:function downloadWarnings(){null!=this.id&&this.promise(me.m.downloadWarnings(this.id)).then((0,ge.aD)(function(e){e.filename;var n=e.blob;(0,xe.Z)(n,"act-bundle-results.xlsx")}
1)).catch((0,ge.aD)(function(e){K.A.error(e,{defaultMessage:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043a\u0430\u0447\u0430\u0442\u044c"})}))}},{key:"downloadErrors",value:function downloadErrors(){null!=this.id&&this.promise(me.m.downloadErrors(this.id)).then((0,ge.aD)(function(e){e.filename;var n=e.blob;(0,xe.Z)(n,"act-bundle-errors.xlsx")})).catch((0,ge.aD)(function(e){K.A.error(e,{defaultMessage:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043a\u0430\u0447\u0430\u0442\u044c"})}))}},{key:"downloadOriginalFile",value:function downloadOriginalFile(){null!=this.id&&this.promise(me.m.downloadOriginalFile(this.id)).then((0,ge.aD)(function(e){var n=e.filename,t=e.blob,r=function fixOriginalFileName(e){return e||"act-bundle-original.xlsx"}(n);(0,xe.Z)(t,r)})).catch((0,ge.aD)(function(e){K.A.error(e,{defaultMessage:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043a\u0430\u0447\u0430\u0442\u044c"})}))}},{key:"importBundle",value:function importBundle(){var e=this;null!=this.id&&this.promise(me.m.importBundle(this.id)).then((0,ge.aD)(function(n){var t;if(!n.success)throw new Error;e.open=!1,null===(t=e._options)||void 0===t||t.onSuccess(),(0,ve.Au)("task-bundle-uploaded")})).catch((0,ge.aD)(function(n){e._state="error",K.A.error(n,{defaultMessage:"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u044b"})}))}},{key:"check",value:function check(e){var n=this;this.promise(me.m.getBundleErrors(e)).then((0,ge.aD)(function(t){var r,i,a,s;if(function isFailedResponse(e){return"failed"===e.status}(t)&&!hasResponseErrors(t))throw new Error;if(function isPreprocessingResponse(e){var n;return Boolean(e.is_loading)||"pending_preprocessing"===e.status||"preprocessing"===e.status||Boolean(null===(n=e.actions)||void 0===n?void 0:p()(n).call(n,"preprocessing_polling"))}(t))return n._state="processing",n._percent=Math.max(n._percent,60),void n.scheduleCheck(e);n.clearPollingTimeout(),n._state="done",n._percent=100,n._warnings=function extractWarnings(e){var n,t=F()(e).call(e,extractWarning),r=he()(t,function(e){return e.row});return F()(n=x()(r)).call(n,function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return{row:+t,messages:ue()(r).call(r,function(e){return e.messages})}})}(null!==(r=t.warnings)&&void 0!==r?r:[]),n._partialErrorsCount=getResponsePartialErrorsCount(t),n._partialErrorsText=getResponseWarningsCount(t)>0?void 0:function getResponsePreprocessingErrorsText(e){var n,t,r,i=null===(n=e.preprocessing_errors)||void 0===n?void 0:pe()(t=F()(r=F()(n).call(n,getPreprocessingErrorMessage)).call(r,function(e){return h()(e).call(e)})).call(t,Boolean);return null!==i&&void 0!==i&&i.length?i.join("; "):void 0}(t),n._hasPartialErrors=hasResponseErrors(t),n._hasWarningsReport=p()(i=t.actions).call(i,"download_warnings"),n._hasErrorsReport=p()(a=t.actions).call(a,"download_errors"),n._hasOriginalFileReport=p()(s=t.actions).call(s,"download_original_file"),n._canImport=t.valid_acts_count>0&&(getResponseWarningsCount(t)>0||function isReadyForManualImportResponse(e){return"initial"===e.status}(t)),n._quantity={total:t.acts_count,pending:t.valid_acts_count},n._dutyTemplatesUsed=!t.duty_templates_used})).catch((0,ge.aD)(function(e){n._state="error",K.A.error(e,{defaultMessage:"\u0427\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u0430"})}))}},{key:"scheduleCheck",value:function scheduleCheck(e){var n=this;this.clearPollingTimeout(),this._pollingTimeout=setTimeout(function(){return n.check(e)},3e3)}},{key:"clearPollingTimeout",value:function clearPollingTimeout(){this._pollingTimeout&&(clearTimeout(this._pollingTimeout),this._pollingTimeout=void 0)}},{key:"promise",value:function promise(e){var n;return null===(n=this._promise)||void 0===n||n.cancel(),this._promise=e,e}}]),BundleUploadStore}(),we=t(32319),be=t(79164),_e=t(97588),Ce=t(40562),ke=t(50752),Ze="\u041f\u0430\u0447\u043a\u0438 \u0430\u043a\u0442\u043e\u0432",Te="\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0430\u0447\u043a\u0438",Se={name:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435",actsCount:"\u0410\u043a\u0442\u043e\u0432",cost:"\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c",date:"\u0414\u0430\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f",signedCount:"\u041f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u044b",paidCount:"\u041e\u043f\u043b\u0430\u0447\u0435\u043d\u044b"},Ne={actsCount:"\u0430\u043a\u0442\u043e\u0432",oneAct:"\u0430\u043a\u0442",twoAct:"\u0430\u043a\u0442\u0430",signedCount:"\u041f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e",paidCount:"\u041e\u043f\u043b\u0430\u0447\u0435\u043d\u043e"},Be="C \u0443\u0447\u0435\u0442\u043e\u043c \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u0438",Ee={countBundles:"\u043d\u0430 \u0441\u0442\u0440.",goTo:"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430",page:"\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443"},Pe=t(39970),Re=function getProgressPercent(e,n){return!n||n<=0||!e||e<=0?0:e/n*100},De="BundleCard-root-6c071d02",Ie="BundleCard-head-f20deaaa",Fe="BundleCard-titleWrapper-3773d638",ze="BundleCard-title-80f445d3",Me="BundleCard-number-1b4abd5a",Ue="BundleCard-processIncompleteStick-0d03dd7b",Ae="Bu
1ndleCard-info-36d7363b",Le="BundleCard-divider-ce043bfa",We="BundleCard-amount-1be522d7",Oe="BundleCard-tooltip-df21d73d",$e="BundleCard-progress-3e4bb454",Ke=["onClick"],qe="\u2014",He=function BundleCard(e){var n,t,r,i,a,s,o,l,c=e.onClick,u=(0,we.Z)(e,Ke),d=(0,z.$G)().t,p=u.title,f=u.number,h=u.created,g=u.is_loading,m=(0,Ce.yl)(h),v=(0,Pe.Jk)(u),x=(0,Pe.o6)(u),y=(0,Pe.E)(u,d("pages.actBundlesPage.status.processedWithErrors"),function(e){return d("pages.actBundlesPage.status.errorsCount",{count:e})}),j=(0,Pe.ah)(u),w=v&&"string"===typeof u.amount_with_commission?(0,_e.dN)((0,_e.Kt)(u.amount_with_commission,null!==(n=N.me.currency)&&void 0!==n?n:"RUB")):null;return(0,X.jsxs)(be.Z,{className:De,onClick:function handleClickCard(){c(u)},children:[(0,X.jsxs)("div",{className:Ie,children:[(0,X.jsxs)("span",{className:Fe,children:[j&&(0,X.jsx)(Y.pn,{children:(0,X.jsxs)(Y.u,{children:[(0,X.jsx)(Y.aJ,{asChild:!0,children:(0,X.jsx)("span",{className:Ue,children:"!"})}),(0,X.jsx)(Y._v,{side:"top",children:d("pages.actBundlesPage.status.processNotCompleted")})]})}),(0,X.jsx)("span",{className:ze,children:p})]}),(0,X.jsxs)("span",{className:Me,children:["\u2116 ",null!==f&&void 0!==f?f:qe]})]}),g?(0,X.jsxs)("div",{className:"[&>:first-child]:mr-2",children:[(0,X.jsx)(Y.$j,{}),(0,X.jsx)("div",{children:d("pages.actBundlesPage.status.processing")})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)("div",{className:Ae,children:[(0,X.jsxs)("div",{children:[(0,X.jsx)("span",{children:x?(0,ke.Z)(u.count,{one:Ne.oneAct,two:Ne.twoAct,many:Ne.actsCount}):qe}),(0,X.jsx)("span",{className:Le,children:"\u2022"}),(0,X.jsxs)("span",{className:We,children:[v?(0,_e.dN)(null!==(t=(0,_e.Kt)(u.amount,null!==(r=N.me.currency)&&void 0!==r?r:"RUB"))&&void 0!==t?t:""):qe,w?(0,X.jsx)(Y.pn,{children:(0,X.jsxs)(Y.u,{className:Oe,children:[(0,X.jsx)(Y.aJ,{asChild:!0,children:(0,X.jsx)("span",{className:"inline-flex align-[-0.125em]",children:(0,X.jsx)(Y.JO,{icon:"InfoIcon",className:"text-[length:inherit]!"})})}),(0,X.jsx)(Y._v,{side:"bottom",children:Z()(i="".concat(Be,": ")).call(i,w)})]})}):null]})]}),(0,X.jsx)("span",{children:m})]}),y?(0,X.jsx)(Y.ZT,{variant:"p1",textColor:"destructive",children:y}):null,(0,X.jsxs)("div",{className:$e,children:[(0,X.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,X.jsx)(Y.ZT,{variant:"p1",textColor:"secondary",children:Z()(a="".concat(Ne.signedCount," ")).call(a,x?Z()(s="".concat(u.progress.accepted," \u0438\u0437 ")).call(s,u.count):qe)}),x?(0,X.jsx)(Y.Ex,{value:Re(u.progress.accepted,u.count)}):null]}),(0,X.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,X.jsx)(Y.ZT,{variant:"p1",textColor:"secondary",children:Z()(o="".concat(Ne.paidCount," ")).call(o,x?Z()(l="".concat(u.progress.paid," \u0438\u0437 ")).call(l,u.count):qe)}),x?(0,X.jsx)(Y.Ex,{value:Re(u.progress.paid,u.count)}):null,(0,Pe.fd)(u)&&!y?(0,X.jsx)(Y.ZT,{variant:"p1",textColor:"destructive",children:d("pages.actBundlesPage.status.processedWithErrors")}):null]})]})]})]})},Ve=t(21695),Je=t(12248),Xe="BundlesList-table-42cb39af",Ge="BundlesList-tableCol-ec18abaa",Ye="BundlesList-tableColAmountTooltip-1593409d",Qe="BundlesList-tableColBase-659a40b0",en="BundlesList-tableColGrey-4902a90d",nn="BundlesList-paginationMobile-8ce8bf75",tn="BundlesList-paginationDesktop-c13255ba",rn="BundlesList-columnNoWrap-74982931",an="BundlesList-errorStatus-437b0f4b",sn="BundlesList-titleCell-05ec5ad5",on="BundlesList-titleText-12e9659a",ln="BundlesList-processIncompleteStick-e6beced5",cn={"progress.accepted":E.signedRatio,"progress.paid":E.paidRatio},un=function getColumnSortOrder(e,n){return(null===n||void 0===n?void 0:n.field)===cn[e]?n.direction:void 0},dn=function renderGreyColumn(e){return(0,X.jsx)(Y.ZT,{className:(0,Ve.Z)(en,Ge,rn),children:e})},pn=function renderBaseColumn(e){return(0,X.jsx)(Y.ZT,{className:(0,Ve.Z)(Qe,Ge),children:e})},fn=function renderPlaceholderColumn(){return dn("\u2014")},hn=function renderBundleErrorsStatus(e,n){var t=(0,Pe.E)(e,n("pages.actBundlesPage.status.processedWithErrors"),function(e){return n("pages.actBundlesPage.status.errorsCount",{count:e})});return t?(0,X.jsx)(Y.ZT,{variant:"p1",textColor:"destructive",className:an,children:t}):null},gn=function renderProcessIncompleteStick(e,n){return(0,Pe.ah)(e)?(0,X.jsx)(Y.pn,{children:(0,X.jsxs)(Y.u,{children:[(0,X.jsx)(Y.aJ,{asChild:!0,children:(0,X.jsx)("span",{className:ln,children:"!"})}),(0,X.jsx)(Y._v,{side:"top",children:n("pages.actBundlesPage.status.processNotCompleted")})]})}):null},mn=function renderBundleNumberColumn(e){return dn(null!==e&&void 0!==e?e:"\u2014")},vn=function renderDateColumn(e,n){return n.is_loading?null:dn((0,Ce.yl)(e))},xn=function renderProgressAcceptedCountColumn(e,n){var t;return n.is_loading?null:(0,Pe.o6)(n)?(0,X.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,X.jsx)(Y.ZT,{variant:"p1",textColor:"secondary",children:Z()(t="".concat(n.progress.accepted," \u0438\u0437 ")).call(t,n.count)}
1),(0,X.jsx)(Y.Ex,{value:Re(n.progress.accepted,n.count)})]}):fn()},yn=function renderAmountColumn(e,n){var t,r,i,a;if(n.is_loading)return null;if(!(0,Pe.Jk)(n))return fn();var s=n.amount_with_commission,o="string"===typeof s?(0,_e.dN)((0,_e.Kt)(s,null!==(t=N.me.currency)&&void 0!==t?t:"RUB")):null;return(0,X.jsxs)("div",{className:"flex items-center",children:[(0,X.jsx)(Y.ZT,{children:pn(null!==(r=(0,_e.dN)((0,_e.Kt)(null!==e&&void 0!==e?e:n.amount,null!==(i=N.me.currency)&&void 0!==i?i:"RUB")))&&void 0!==r?r:"")}),o?(0,X.jsx)(Y.pn,{children:(0,X.jsxs)(Y.u,{className:Ye,children:[(0,X.jsx)(Y.aJ,{asChild:!0,children:(0,X.jsx)("span",{className:"flex",children:(0,X.jsx)(Y.JO,{icon:"InfoIcon",size:12})})}),(0,X.jsx)(Y._v,{side:"bottom",children:Z()(a="".concat(Be,": ")).call(a,o)})]})}):null]})},jn=function generateColumnsBundles(e,n,t){return[{title:"\u2116",dataIndex:"number",key:"number",width:55,render:mn},{title:Se.name,dataIndex:"title",key:"title",render:function render(n,r){return function renderTitleColumn(e,n,t,r){return(0,X.jsxs)("div",{className:sn,children:[gn(n,r),(0,X.jsx)("span",{className:on,children:(0,X.jsx)(Je.h,{text:e,search:t})})]})}(n,r,e,t)}},{title:Se.cost,dataIndex:"amount",key:"amount",width:150,render:yn},{title:Se.signedCount,dataIndex:["progress","accepted"],key:"progress.accepted",width:180,sorter:!0,sortDirections:["desce
1nd","ascend"],sortOrder:un("progress.accepted",n),render:xn},{title:Se.paidCount,dataIndex:["progress","paid"],key:"progress.paid",width:180,sorter:!0,sortDirections:["descend","ascend"],sortOrder:un("progress.paid",n),render:function render(e,n){return function renderProgressPaidCountColumn(e,n,t){var r;return n.is_loading?null:(0,Pe.o6)(n)?(0,X.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,X.jsx)(Y.ZT,{variant:"p1",textColor:"secondary",children:Z()(r="".concat(n.progress.paid," \u0438\u0437 ")).call(r,n.count)}),(0,X.jsx)(Y.Ex,{value:Re(n.progress.paid,n.count)}),hn(n,t)]}):(0,X.jsxs)("div",{className:"flex flex-col gap-2",children:[fn(),hn(n,t)]})}(0,n,t)}},{title:Se.actsCount,dataIndex:"count",key:"count",width:80,onCell:function onCell(e){return{colSpan:e.is_loading?2:1}},render:function render(e,n){return function renderActCountsColumn(e,n,t){return n.is_loading?(0,X.jsxs)("div",{className:"flex items-center [&>:first-child]:mr-2",children:[(0,X.jsx)(Y.$j,{}),(0,X.jsx)("div",{className:"flex",children:t("pages.actBundlesPage.status.processing")})]}):"number"===typeof e?dn(e):fn()}(e,n,t)}},{title:Se.date,dataIndex:"created",key:"created",width:160,className:rn,render:vn}]},wn=t(51060),bn=wn.z.object({message:wn.z.string()}).passthrough(),_n=wn.z.object({id:wn.z.number().finite(),number:wn.z.number().finite().nullable(),title:wn.z.string(),description:wn.z.string().nullable(),created:wn.z.string(),is_loading:wn.z.boolean(),amount:wn.z.string().optional(),amount_with_commission:wn.z.string().nullable().optional(),count:wn.z.number().finite().optional(),progress:wn.z.object({accepted:wn.z.number().finite(),errors:wn.z.number().finite(),paid:wn.z.number().finite()}).passthrough().optional(),actions:wn.z.array(wn.z.string()).optional(),errors_count:wn.z.number().finite().optional(),errors_details:wn.z.array(wn.z.string()).optional(),has_errors:wn.z.boolean().optional(),preprocessing_errors:wn.z.array(wn.z.union([wn.z.string(),bn])).optional(),preprocessing_errors_count:wn.z.number().finite().optional(),status:wn.z.string().optional(),warnings:wn.z.array(wn.z.union([wn.z.string(),bn])).optional(),warnings_count:wn.z.number().finite().optional()}).passthrough(),Cn=["items"],kn=function(){function BundlesStore(){(0,oe.Z)(this,BundlesStore),this.pollingInterval=null,this.lastRequestParam
1s=null,this.isBundlesLoading=!0,this.list=[],this.pagination={page:1,total_count:0,total_pages:1,per_page:10},(0,ge.ky)(this)}return(0,le.Z)(BundlesStore,[{key:"getBundlesList",value:function(){var e=(0,a.Z)((0,i.Z)().mark(function _callee(e){var n,t,r,a,s=this;return(0,i.Z)().wrap(function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,this.lastRequestParams=e,i.next=4,P(e);case 4:if(n=i.sent,t=n.data,r=t.items,a=(0,we.Z)(t,Cn),Array.isArray(r)&&r.every(function(e){return _n.safeParse(e).success})&&[a.page,a.per_page,a.total_pages,a.total_count].every(Number.isFinite)){i.next=8;break}throw new Error("Invalid bundles page response");case 8:(0,ge.z)(function(){s.list=r,s.pagination=a}),this.startPolling(),i.next=15;break;case 12:i.prev=12,i.t0=i.catch(0),console.error(i.t0);case 15:return i.prev=15,this.isBundlesLoading=!1,i.finish(15);case 18:case"end":return i.stop()}},_callee,this,[[0,12,15,18]])}));return function getBundlesList(n){return e.apply(this,arguments)}}()},{key:"startPolling",value:function startPolling(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15e3;
1this.pollingInterval&&this.stopPolling(),this.lastRequestParams&&(this.pollingInterval=setInterval(function(){e.getBundlesList(e.lastRequestParams)},n))}},{key:"stopPolling",value:function stopPolling(){this.pollingInterval&&(clearInterval(this.pollingInterval),this.pollingInterval=null)}},{key:"updateBundle",value:function updateBundle(e){var n;this.list=F()(n=this.list).call(n,function(n){return n.id===e.id?e:n})}}]),BundlesStore}(),Zn=new kn,Tn={"progress.accepted":E.signedRatio,"progress.paid":E.paidRatio},Sn=(0,M.Pi)(function(e){var n,t=e.isLoading,r=e.onChangePagination,i=e.onSort,a=e.page,o=e.search,l=e.sorting,c=(0,U.k)().isDesktop,u=(0,z.$G)().t,d=(0,w.k6)(),f=(0,y.useMemo)(function(){return new je},[]);(0,y.useEffect)(function(){f.options({onSuccess:function onSuccess(){Zn.getBundlesList({page:a,query:{search:o||void 0}})}})},[f,a,o]);var h={position:["bottomLeft"],pageSize:Zn.pagination.per_page,total:Zn.pagination.total_count,onChange:r,hideOnSinglePage:!0,showSizeChanger:!1,showQuickJumper:!1,responsive:!c,disabled:t,locale:{jump_to:Ee.goTo,page:Ee.page,items_per_page:Ee.countBundles},current:a},g=(0,y.useMemo)(function(){return jn(o,l,u)},[o,l,u]),m=(0,y.useCallback)(function(e,n,t){var r,a=null!==(r=Array.isArray(t)?t[0]:t)&&void 0!==r?r:{},s=a.columnKey,o=a.order,l=s?Tn[String(s)]:void 0;i(l,o)},[i]);(0,A.ho)("update-bundle",function(e){var n,t=D()(n=Zn.list).call(n,function(n){return n.id===e.id});t&&(t.is_loading&&!e.is_loading&&((0,Pe.fd)(e)?K.A.warning("\u041f\u0430\u0447\u043a\u0430 \u0430\u043a\u0442\u043e\u0432 \u2116".concat(t.number," \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438")):K.A.success("\u0410\u043a\u0442\u044b \u0432 \u043f\u0430\u0447\u043a\u0435 \u2116".concat(t.number," \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b"))),Zn.updateBundle(e))});var v=(0,y.useCallback)(function(e){if((0,Pe.ah)(e))f.openBundleState(e.id,e.title);else if(!e.is_loading&&null!=e.number){var n=e.number;d.push("/bundles/".concat(n))}},[f,d]),x=(0,y.useCallback)(function(e){return{onClick:function onClick(){return v(e)}}},[v]),j=(0,y.useMemo)(function(){return{table:function table(e){return(0,X.jsx)("table",(0,s.Z)((0,s.Z)({},e),{},{"data-testid":"bundles-table"}))},body:{row:function row(e){var n,t=null===(n=e.className)||void 0===n?void 0:p()(n).call(n,"ant-table-placeholder");return(0,X.jsx)("tr",(0,s.Z)((0,s.Z)({},e),{},{"data-testid":t?"placeholder":"item"}))}}}},[]);return c?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(L.i,{sticky:{offsetHeader:80},className:Xe,onRow:x,onChange:m,columns:g,dataSource:Zn.list,loading:t,pagination:!1,components:j}),(0,X.jsx)(W.t,(0,s.Z)((0,s.Z)({},h),{},{className:tn})),(0,X.jsx)(se,{store:f})]}):(0,X.jsxs)(O.T,{direction:"vertical",size:24,children:[(0,X.jsx)($.X,{gutter:[0,12],wrap:!0,children:F()(n=Zn.list).call(n,function(e){return(0,y.createElement)(He,(0,s.Z)((0,s.Z)({onClick:v},e),{},{key:e.id}))})}),(0,X.jsx)($.X,{justify:"center",className:nn,children:(0,X.jsx)(W.t,(0,s.Z)({},h))}),(0,X.jsx)(se,{store:f})]})}),Nn=t(16767),Bn=t(88744),En=t(20528),Pn=t(53964),Rn=(0,M.Pi)(function Component(e){var n=e.onClick,t=e.status;return(0,X.jsxs)(X.Fragment,{children:[t===Pn.x.allowed&&(0,X.jsx)(Y.pn,{children:(0,X.jsxs)(Y.u,{children:[(0,X.jsx)(Y.aJ,{asChild:!0,children:(0,X.jsx)(Y.zx,{variant:"default",disabled:!0,children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437 \u0414\u043e\u0434\u043e IS"})}),(0,X.jsx)(Y._v,{side:"top",children:"\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0414\u043e\u0434\u043e IS \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \xab\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438\xbb."})]})}),t===Pn.x.active&&(0,X.jsx)(Y.zx,{variant:"primary",onClick:n,children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437 \u0414\u043e\u0434\u043e IS"})]})}),Dn=t(6095),In=t.n(Dn),Fn=t(12391),zn=t(16555),Mn=t(1329),Un=t(83334),An=function CreateRegistryModal(e){var n=e.open,t=e.width,r=e.title,i=e.onCancel,a=e.children;e.centered,e.mask;return(0,X.jsxs)(Y.Ms,{open:null===n||void 0===n||n,onOpenChange:function onOpenChange(e){return!e&&function handleClose(){return i({})}()},width:function mapWidth(){var e=null!==t&&void 0!==t?t:400;return e>=900?"full":e>=700?"lg":e>=500?"md":"sm"}(),children:[r&&(0,X.jsx)(Y.Ms.Title,{children:r}),(0,X.jsx)(Y.Ms.Content,{children:a})]})},Ln="CreateRegistryDialog-rangePicker-8900ff8e",Wn="CreateRegistryDialog-checkBox-a6cfc724",On="CreateRegistryDialog-chooseAllLink-d8202647",$n=Fn.M.RangePicker,Kn=(0,M.Pi)(function Component(e){var n,t,r,i,a=e.close,s=e.switchDialog,l=(0,z.$G)().t,c=(0,Mn.U)(),u=(0,y.useState)(null),d=(0,o.Z)(u,2),p=d[0],f=d[1],h=(0,zn.m)().createRegistryStore,g=h.steps,m=g[Un.d.init],v=g[Un.d.process],x=g[Un.d.success],j=g[Un.d.error],w=null===(n=window.userStore)||void 0===n||null===(t=n.company)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.id,b=(0,y.useReducer)(function(e){return!e},!1),_=(0,o.Z)(b,2),C=_[0],k=_[1],Z=function handleCancel(){h.saveSelectedUnits(w),a()};return(0,y.useEffect)(function(){return h.restoreSelectedUnits(w),h.getUnits(""),h.reset},[]),(0,y.useEffect)(function(){x&&Z()},[h.steps]),(0,X.jsxs)(An,{title:(0,X.jsx)(Bn.D,{level:4,children:(0,X.jsx)(O.T,{centered:v,children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u0437 \u0414\u043e\u0434\u043e IS"})}),onCancel:Z,width:520,centered:!0,children:[m&&(0,X.jsxs)(q.w,{size:12,children:[(0,X.jsxs)(q.w,{children:[(0,X.jsx)(V.x,{children:"\u0414\u0430\u0442\u0430"}),(0,X.jsx)($n,{format:"YYYY-MM-DD",onChange:function onChangeRangeDate(e,n){return f(n.length>1?n:null)},placeholder:["\u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433","\u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433"],className:Ln}
1)]}),(0,X.jsxs)(q.w,{children:[(0,X.jsx)(V.x,{children:"\u041f\u043e\u0434\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f"}),(0,X.jsx)(Y.CS,{placeholder:l("modules.dodo.createRegistryDialog.searchPlaceholder"),fullWidth:!0,clearable:!0,onChange:function onChange(e){return h.setSelectedUnits(F()(e).call(e,function(e){return e.value}))},value:h.selectedUnits,onSearch:h.filterUnits,onOpenChange:function onDropdownVisibleChange(e){e||h.resetFilterUnits()},getLabel:function getLabel(e){return e.label},getKey:function getKey(e){return e.value},onClear:function onClear(){return h.setSelectedUnits([])},children:(0,X.jsxs)(Y.CS.List,{children:[h.units.length>0&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)("div",{className:On,children:(0,X.jsx)(Y.rU,{onClick:h.handleSelectAll,children:l("modules.dodo.createRegistryDialog.selectAllFound")})}),(0,X.jsx)(Y.iz,{})]}),F()(i=h.unitsOptions).call(i,function(e){return(0,X.jsx)(Y.CS.Item,{option:e,children:(0,X.jsx)(Y.ZT,{children:e.label})},e.value)})]})})]}),(0,X.jsx)(q.w,{children:(0,X.jsx)(Y.XZ,{checked:C,onCheckedChange:k,className:Wn,label:"\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u043e\u0437\u043d\u0430\u0433\u0440\u0430\u0436\u0434\u0435\u043d\u0438\u0435"})}),(0,X.jsxs)(O.T,{right:!0,children:[(0,X.jsx)(Y.zx,{variant:"text",onClick:Z,children:"\u041e\u0442\u043c\u0435\u043d\u0430"}),(0,X.jsx)(Y.zx,{variant:"primary",onClick:function handleSubmit(){return h.saveSelectedUnits(w),p?h.sendRequest({rangeDate:p,includePremiums:C}).then(function(e){e&&s(e)}):In().resolve()},disabled:!(null!==p&&void 0!==p&&p.length)||!h.selectedUnits.length,children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c"})]})]}),v&&(0,X.jsxs)(q.w,{size:12,children:[(0,X.jsx)(O.T,{centered:!0,children:(0,X.jsx)(Y.$j,{})}),(0,X.jsxs)(q.w,{children:[(0,X.jsx)(O.T,{centered:!0,children:"\u0421\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445"}),(0,X.jsx)(O.T,{centered:!0,children:l("pages.customerCompanyPage.integrationsSection.dodoSection.processing",{platform:c})})]})]}),j&&(0,X.jsxs)(q.w,{size:12,children:[(0,X.jsx)(Y.bZ,{variant:"error",title:"\u041e\u0448\u0438\u0431\u043a\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438"}),(0,X.jsxs)(V.x,{secondary:!0,children:["\u041a\u0430\u0436\u0435\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a ",(0,X.jsx)("br",{}),"\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u0437\u0430 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443."]}),(0,X.jsx)(O.T,{right:!0,children:(0,X.jsx)(Y.zx,{variant:"text",onClick:Z,children:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c"})})]})]})}),qn=function(e){return e.createRegistry="createRegistry",e.uploadFromFile="uploadFromFile",e}(qn||{}),Hn=function dialogReducer(e,n){return e===n?null:n},Vn="BundleDodoUploadDialog-downloadLinkWrapper-e661e73d",Jn="BundleDodoUploadDialog-downloadFileWrapper-d017587c";function BundleDodoUploadDialog_getSubmitText(e,n){var t,r=n||e,i=(0,Q.H)("\u0430\u043a\u0442","\u0430\u043a\u0442\u0430","\u0430\u043a\u0442\u043e\u0432")(r);return Z()(t="\u0421\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c ".concat(n," ")).call(t,i)}var Xn,Gn=(0,M.Pi)(function(e){var n=e.actsRegistryId,t=e.actsBundleId,r=(0,z.$G)().t,s=(0,Mn.U)(),o=(0,zn.m)().bundleDodoUploadStore,l=o.steps,c=l[Un.d.process],u=l[Un.d.success],d=l[Un.d.error],p=o.warnings,f=o.hasRejectList,h=o.quantity,g=h.total,m=h.pending;function onCancel(){o.open=!1}function _handleWarningsDownload(){return(_handleWarningsDownload=(0,a.Z)((0,i.Z)().mark(function _callee(){return(0,i.Z)().wrap(function _callee$(e){for(;;)switch(e.prev=e.next){case 0:o.downloadWarnings();case 1:case"end":return e.stop()}},_callee)}))).apply(this,arguments)}function _handleErrorsDownload(){return(_handleErrorsDownload=(0,a.Z)((0,i.Z)().mark(function _callee2(){return(0,i.Z)().wrap(function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:o.downloadErrors();case 1:case"end":return e.stop()}},_callee2)}
1))).apply(this,arguments)}return(0,y.useEffect)(function(){return o.checkRegistryStatus({id:n,actsBundleId:t}),o.reset},[]),o.open?(0,X.jsx)(An,{title:(0,X.jsx)(Bn.D,{level:4,children:(0,X.jsx)(O.T,{children:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u0437 \u0414\u043e\u0434\u043e IS"})}),onCancel:onCancel,width:520,centered:!0,children:(0,X.jsxs)(q.w,{size:16,children:[u&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(O.T,{className:Jn,opposite:!0,children:[(0,X.jsxs)(O.T,{align:"start",children:[(0,X.jsx)(q.w,{children:(0,X.jsx)(Y.JO,{icon:"AttachFileIcon"})}),(0,X.jsx)(Y.rU,{href:o.url,children:o.filename})]}),(0,X.jsx)(Y.rU,{href:o.url,children:(0,X.jsx)(Y.zx,{variant:"text",iconOnly:!0,icon:"DownloadIcon",className:"py-3 px-0"})})]}),!!p.length&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ee,{store:o}),(0,X.jsx)(G,{store:o}),f&&(0,X.jsxs)(O.T,{wide:!0,size:0,className:Vn,children:[(0,X.jsx)(Y.rU,{onClick:function handleWarningsDownload(){return _handleWarningsDownload.apply(this,arguments)},children:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442"}),(0,X.jsx)(Y.rU,{onClick:function handleErrorsDownload(){return _handleErrorsDownload.apply(this,arguments)},children:"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0430\u043a\u0442\u044b \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438"})]})]}),!p.length&&(0,X.jsx)(Y.bZ,{variant:"success",title:"\u0410\u043a\u0442\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b"}),p.length>0&&(0,X.jsx)(Y.iz,{}),(0,X.jsxs)(O.T,{right:!0,wide:!p.length,children:[(0,X.jsx)(Y.zx,{variant:"text",onClick:onCancel,children:"\u041e\u0442\u043c\u0435\u043d\u0430"}),m>0&&(0,X.jsx)(Y.zx,{variant:"primary",onClick:function onClickSubmit(){o.importBundle(t)},children:BundleDodoUploadDialog_getSubmitText(g,m)})]})]}),c&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(O.T,{centered:!0,children:(0,X.jsx)(Y.$j,{})}),(0,X.jsxs)(q.w,{children:[(0,X.jsx)(O.T,{centered:!0,children:"\u0421\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445"}),(0,X.jsx)(O.T,{centered:!0,children:r("pages.customerCompanyPage.integrationsSection.dodoSection.processing",{platform:s})})]})]}),d&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Y.bZ,{variant:"error",title:"\u041e\u0448\u0438\u0431\u043a\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438"}),(0,X.jsxs)(V.x,{secondary:!0,children:["\u041a\u0430\u0436\u0435\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a ",(0,X.jsx)("br",{}),"\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u0437\u0430 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443."]}),(0,X.jsx)(O.T,{right:!0,children:(0,X.jsx)(Y.zx,{variant:"text",onClick:onCancel,children:"\u0417\u0430\u043a\u0440\u044b\u0442\u044c"})})]})]})}):null}),Yn="BundlesPage-headerTitle-82e80a26",Qn="BundlesPage-list-010ad570",et="BundlesPage-navBar-cf7002d6",nt=t(87353),tt=(0,M.Pi)(function Component(e){var n=e.onImportSuccess,t=(0,z.$G)().t,r=(0,U.k)().isMobile,i=(0,zn.m)(),a=i.dodoStore,s=a.status,l=a.getStatus,c=a.reset,u=i.bundleDodoUploadStore,d=(0,te.LM)(),p=d.hasPermission("acts_bundles.create"),f=d.hasFeature("platform_flow")&&!d.hasRootFeature(nt.G.ActsWithoutTasksPF),h=(0,y.useReducer)(Hn,null),g=(0,o.Z)(h,2),m=g[0],v=g[1],x=(0,y.useState)(null),j=(0,o.Z)(x,2),w=j[0],b=j[1],_=(0,y.useState)(""),C=(0,o.Z)(_,2),k=C[0],Z=C[1],T=(0,y.useMemo)(function(){return l(),new je},[]),S=function handleCreateRegistryDialog(){return v(qn.createRegistry)},N=function handleUploadFromFileDialog(){T.open=!0,v(qn.uploadFromFile)};return(0,y.useEffect)(function(){T.options({onSuccess:n}),u.options({onSuccess:n})},[n,T,u]),(0,y.useEffect)(function(){return c},[]),(0,X.jsxs)(Nn.m,{divider:!0,className:"sticky top-0 bg-white z-10 -ml-4 p-4 w-screen md:ml-0 md:px-0 md:w-auto",children:[(0,X.jsx)(Bn.D,{className:Yn,"data-testid":"main-title",children:Ze}),r?!f&&(0,X.jsxs)(Y.C5,{children:[(0,X.jsx)(Y.M3,{disabled:!p,onClick:N,children:t("common.uploadRegistry")}),s===Pn.x.allowed&&(0,X.jsx)(Y.pn,{children:(0,X.jsxs)(Y.u,{children:[(0,X.jsx)(Y.aJ,{asChild:!0,children:(0,X.jsx)(Y.M3,{disabled:!0,children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437 \u0414\u043e\u0434\u043e IS"})}),(0,X.jsx)(Y._v,{side:"right",children:"\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 \u0414\u043e\u0434\u043e IS \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \xab\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438\xbb."})]})}),s===Pn.x.active&&(0,X.jsx)(Y.M3,{onClick:S,children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0438\u0437 \u0414\u043e\u0434\u043e IS"})]}):(0,X.jsxs)("div",{className:"flex gap-2.5",children:[(0,X.jsx)(Rn,{status:s,onClick:S}),!f&&(0,X.jsx)(En.z,{button:!0,action:"acts_bundles.create",onClick:N,variant:"primary",icon:"AddIcon","data-testid":"import-bundle-button",children:t("common.uploadRegistry")})]}),m===qn.createRegistry&&(0,X.jsx)(Kn,{close:S,switchDialog:function handleSwitchDialog(e){var n=e.id,t=e.actsBundleId;S(),Z(n),b(t),u.open=!0}}),(0,X.jsx)(se,{store:T}),u.open&&w&&(0,X.jsx)(Gn,{actsRegistryId:k,actsBundleId:w})]})}),rt=t(55479),it=(0,M.Pi)(function(){var e=Zn.pagination.total_count,n=(0,Q.H)("\u043f\u0430\u0447\u043a\u0430","\u043f\u0430\u0447\u043a\u0438","\u043f\u0430\u0447\u0435\u043a")(e),t=(0,Q.H)("\u0430\u043a\u0442\u043e\u0432","\u0430\u043a\u0442\u043e\u0432","\u0430\u043a\u0442\u043e\u0432")(e);return Zn.isBundlesLoading?(0,X.jsx)("div",{className:"flex items-start justify-start mb-2",children:(0,X.jsx)(Y.$j,{})}):0===e?null:(0,X.jsxs)(Y.ZT,{weight:"medium",variant:"p3",className:"mb-3","data-testid":"table-items-counter",children:[e," ",n," ",t]})}),at=t(814),st=t(64060),ot=t.p+"static/images/backbround-d7142d28.png",lt=function PlatformFlowTransitionModal(e){var n=e.open,t=e.onOpenChange,r=(0,te.LM)(),i=(0,z.$G)().t,a=(0,w.k6)(),s=(0,ie.I)().isKonsol;
1if(!r.hasFeature("platform_flow")||r.hasRootFeature(nt.G.ActsWithoutTasksPF)||r.hasFeature("dodo")||!s)return null;var o=function handleDismiss(){sessionStorage.setItem(st.s.transitionModalDismissed,"true"),t(!1)};return(0,X.jsxs)(Y.yX.Dialog,{open:n,onOpenChange:o,children:[(0,X.jsx)(Y.yX.Overlay,{}),(0,X.jsx)(Y.yX.Portal,{children:(0,X.jsxs)(Y.yX.Container,{width:"sm",className:"[&]:!p-0 [&]:!pt-0 [&]:!pr-0 [&]:!pb-0 [&]:!pl-0 md:[&]:!p-0 bg-[#F4F0FF] md:rounded-b-4xl",children:[(0,X.jsx)("div",{className:"flex flex-col h-[260px]",children:(0,X.jsx)("img",{src:ot,alt:"platform-flow-transition",className:"w-full h-full object-cover rounded-t-xl"})}),(0,X.jsx)(Y.yX.Close,{"aria-label":"close",className:"absolute !top-6 !right-6",onClick:o}),(0,X.jsxs)(Y.yX.Content,{className:"rounded-t-2xl md:rounded-2xl bg-white",children:[(0,X.jsxs)("div",{className:"flex flex-col gap-2.5 pt-4 pl-4 pr-4 pb-0 md:pt-6 md:pl-6 md:pr-6 md:pb-0",children:[(0,X.jsx)(Y.ZT,{variant:"h1",children:i("platformFlowTransitionModal.title")}),(0,X.jsx)(Y.ZT,{variant:"p2",children:i("platformFlowTransitionModal.description")})]}),(0,X.jsx)(Y.yX.Footer,{children:(0,X.jsx)("div",{className:"flex justify-between w-full gap-4 p-4",children:(0,X.jsx)(Y.zx,{variant:"primary",onClick:function handleButtonClick(){sessionStorage.setItem(st.s.transitionModalDismissed,"true"),t(!1),a.push("/tasks")},className:"w-full",size:"lg",children:i("platformFlowTransitionModal.button")})})})]})]})})]})},ct=u()(E),ut={ascend:_.As.asc,descend:_.As.desc},dt=(Xn={},(0,l.Z)(Xn,_.As.asc,"ascend"),(0,l.Z)(Xn,_.As.desc,"descend"),Xn),pt=function BundlesPage(){var e=(0,y.useState)(function(){return"true"!==sessionStorage.getItem(st.s.transitionModalDismissed)}),n=(0,o.Z)(e,2),t=n[0],r=n[1],l=(0,C.lr)(window.location.search),c=(0,o.Z)(l,2),d=c[0],f=c[1],g=(0,y.useState)(!0),v=(0,o.Z)(g,2),k=v[0],Z=v[1],T=(0,y.useState)(Number(d.get("page"))||1),S=(0,o.Z)(T,2),N=S[0],B=S[1],E=(0,y.useState)(function getInitialSorting(e){var n,t=e.get("sort"),r=e.get("direction");if(t&&r&&p()(ct).call(ct,t)&&p()(n=u()(_.As)).call(n,r))return{field:t,direction:r}}(d)),P=(0,o.Z)(E,2),R=P[0],D=P[1],I=(0,y.useState)(d.get("search")||""),F=(0,o.Z)(I,2),z=F[0],M=F[1],U=(0,y.useState)(function(){var e,n,t=h()(e=null!==(n=d.get("search"))&&void 0!==n?n:"").call(e).replace(/\s+/g," ");return t.length>=3||0===t.length?t:""}),A=(0,o.Z)(U,2),L=A[0],W=A[1],O=(0,w.k6)(),$=(0,y.useCallback)(function(e){var n=new(m())(window.location.search);x()(e).forEach(function(e){var t=(0,o.Z)(e,2),r=t[0],i=t[1];void 0!==i?n.set(r,i):n.delete(r)}),f(n),O.replace("/bundles?".concat(n.toString()))},[O,f]),K=(0,j.y)(function(e){var n,t=h()(n=null!==e&&void 0!==e?e:"").call(n).replace(/\s+/g," ");if(!(t.length>0&&t.length<3)){var r=t.length>=3||0===t.length?t:"";W(r),B(1),$({search:r,page:1..toString()})}},500),q=(0,y.useCallback)(function(e){var n=e.target.value;M(n),K(n)},[K]),H=(0,y.useCallback)(function(e){B(e),$((0,s.Z)({page:e.toString()},L&&{search:L}))},[L,$]),V=(0,y.useCallback)(function(e,n){var t=n?ut[n]:void 0,r=e&&t?{field:e,direction:t}:void 0;D(r),$({sort:null===r||void 0===r?void 0:r.field,direction:null===r||void 0===r?void 0:r.direction})},[$]);(0,y.useEffect)(function(){return function(){Zn.stopPolling()}},[]);var J=(0,y.useCallback)((0,a.Z)((0,i.Z)().mark(function _callee(){return(0,i.Z)().wrap(function _callee$(e){for(;;)switch(e.prev=e.next){case 0:return Z(!0),e.next=3,Zn.getBundlesList({page:N,query:{search:L||void 0,sort:null===R||void 0===R?void 0:R.field,direction:null===R||void 0===R?void 0:R.direction}});case 3:Z(!1);case 4:case"end":return e.stop()}},_callee)})),[L,N,R]);return(0,y.useEffect)(function(){J()},[J]),(0,X.jsxs)(b.X,{children:[(0,X.jsx)(tt,{onImportSuccess:J}),(0,X.jsx)(at.s,{className:"mb-4"}),(0,X.jsx)(rt.g,{className:et,search:(0,X.jsx)(Y.Vr,{className:"w-full md:min-w-100",fullWidthContainer:!0,placeholder:Te,onChange:q,value:z,"data-testid":"bundles_search_input"})}),(0,X.jsxs)("div",{className:"flex flex-col ".concat(Qn),children:[(0,X.jsx)(it,{}),(0,X.jsx)(Sn,{onChangePagination:H,onSort:V,isLoading:k,page:N,search:L,sorting:R&&{field:R.field,direction:dt[R.direction]}})]}),(0,X.jsx)(lt,{open:t,onOpenChange:r})]})}}
1,77357:function(e,n,t){"use strict";t.d(n,{z:function(){return copyText}});var r=t(61249),i=t(45144);function copyText(e){return _copyText.apply(this,arguments)}function _copyText(){return(_copyText=(0,i.Z)((0,r.Z)().mark(function _callee(e){var n;return(0,r.Z)().wrap(function _callee$(t){for(;;)switch(t.prev=t.next){case 0:if(!navigator.clipboard||!navigator.permissions){t.next=9;break}return t.prev=1,t.next=4,navigator.clipboard.writeText(e);case 4:return t.abrupt("return");case 7:t.prev=7,t.t0=t.catch(1);case 9:n=document.createElement("textarea"),document.body.append(n),n.value=e,n.select(),document.execCommand("copy"),document.body.removeChild(n);case 15:case"end":return t.stop()}},_callee,null,[[1,7]])}))).apply(this,arguments)}},78284:function(e,n,t){"use strict";t.d(n,{H:function(){return i},n:function(){return r}});var r=function declinations(e){var n=[e.one,e.two,e.few];return function(e){var t;e=null!==(t=e)&&void 0!==t?t:0;return n[e%100>4&&e%100<20?2:[2,0,1,1,1,2][e%10<5?e%10:5]]}},i=function plural(e,n,t){return r({one:e,two:n,few:t})}},50752:function(e,n,t){"use strict";var r=t(12767),i=t.n(r),a=t(68635);n.Z=function numForm(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1?arguments[1]:void 0;return i()(e=i()(n="".concat(t)).call(n,a.vk)).call(e,function getNumForm(e,n){var t=n.one,r=n.two,i=n.many;if(0===e||e>=11&&e<20)return i;var a=e%10;return 0===a?i:1===a?t:a<5?r:i}(t,r))}},97766:function(e,n,t){"use strict";t.d(n,{kr:function(){return createContext},jM:function(){return createImmutable},qp:function(){return useContext}});var r=t(24477),i=t(9222),a=t(47591),s=t(56005),o=t(85152),l=t(63890);function createContext(e){var n=o.createContext(void 0);return{Context:n,Provider:function Provider(e){var t=e.value,i=e.children,s=o.useRef(t);s.current=t;var c=o.useState(function(){return{getValue:function getValue(){return s.current},listeners:new Set}}),u=(0,r.Z)(c,1)[0];return(0,a.Z)(function(){(0,l.unstable_batchedUpdates)(function(){u.listeners.forEach(function(e){e(t)})})},[t]),o.createElement(n.Provider,{value:u},i)},defaultValue:e}}function useContext(e,n){var t=(0,i.Z)("function"===typeof n?n:function(e){if(void 0===n)return e;if(!Array.isArray(n))return e[n];var t={};return n.forEach(function(n){t[n]=e[n]}),t}),l=o.useContext(null===e||void 0===e?void 0:e.Context),c=l||{},u=c.listeners,d=c.getValue,p=o.useRef();p.current=t(l?d():null===e||void 0===e?void 0:e.defaultValue);var f=o.useState({}),h=(0,r.Z)(f,2)[1];return(0,a.Z)(function(){if(l)return u.add(trigger),function(){u.delete(trigger)};function trigger(e){var n=t(e);(0,s.Z)(p.current,n,!0)||h({})}},[l]),p.current}var c=t(87288),u=t(24626);function createImmutable(){var e=o.createContext(null);function useImmutableMark(){return o.useContext(e)}return{makeImmutable:function makeImmutable(n,t){var r=(0,u.Yr)(n),i=function ImmutableComponent(i,a){var s=r?{ref:a}:{},l=o.useRef(0),u=o.useRef(i);return null!==useImmutableMark()?o.createElement(n,(0,c.Z)({},i,s)):(t&&!t(u.current,i)||(l.current+=1),u.current=i,o.createElement(e.Provider,{value:l.current},o.createElement(n,(0,c.Z)({},i,s))))};return r?o.forwardRef(i):i},responseImmutable:function responseImmutable(e,n){var t=(0,u.Yr)(e),r=function ImmutableComponent(n,r){var i=t?{ref:r}:{};return useImmutableMark(),o.createElement(e,(0,c.Z)({},n,i))};return t?o.memo(o.forwardRef(r),n):o.memo(r,n)},useImmutableMark:useImmutableMark}}var d=createImmutable();d.makeImmutable,d.responseImmutable,d.useImmutableMark},55441:function(e,n,t){"use strict";var r=t(45917),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function copy(e,n){var t,a,s,o,l,c,u=!1;n||(n={}),t=n.debug||!1;try{if(s=r(),o=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",function(r){if(r.stopPropagation(),n.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=i[n.format]||i.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(n.format,e);n.onCopy&&(r.preventDefault(),n.onCopy(r.clipboardData))}),document.body.appendChild(c),o.selectNodeContents(c),l.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(d){t&&console.error("unable to copy using execCommand: ",d),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),u=!0}catch(d){t&&console.error("unable to copy using clipboardData: ",d),t&&console.error("falling back to prompt"),a=function format(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(o):l.removeAllRanges()),c&&document.body.removeChild(c),s()}return u}},45917:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],r=0;r<e.rangeCount;r++)t.push(e.getRangeAt(r));switch(n.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":n.blur();break;default:n=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||t.forEach(function(n){e.addRange(n)}),n&&n.focus()}}},57962:function(e,n,t){e.exports=t(17971)},10289:function(e,n,t){"use strict";function _objectDestructuringEmpty(e){if(null==e)throw new TypeError("Cannot destructure "+e)}t.d(n,{Z:function(){return _objectDestructuringEmpty}})},72993:function(e,n,t){"use strict";t.d(n,{Z:function(){return _toArray}});var r=t(27597),i=t(59829),a=t(35652),s=t(15865);function _toArray(e){return(0,r.Z)(e)||(0,i.Z)(e)||(0,a.Z)(e)||(0,s.Z)()}}}]);
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.