1import{o as ae}from"./BNNRdYrd.js";import{w as re}from"./cuyG0F5-.js";import{t as oe}from"./DO2LzrW8.js";import{W as X,p as S}from"./DlXDTFIU.js";import{Il as ne,Ll as se}from"./D-nchjvc.js";import{t as b}from"./BfQ2-vvd.js";import{$ as ie,A as I,Bt as c,D as R,F as p,Jt as a,L as W,O as le,P as E,St as ue,Tt as A,Y as ce,Z as de,b as me,gt as pe,k as d,rt as m,s as G,xt as h,yt as M}from"./Lt2xSFvm.js";import{t as z}from"./K9rsuiWd.js";import{t as _e}from"./B8-ycQ-02.js";import{t as ge}from"./DTl-FRk4.js";import{t as v}from"./hSZj3kD4.js";import{t as fe}from"./TPYUBE0e2.js";import{D as ve,l as Se}from"./MzGk9v7b.js";import{t as Me}from"./BSkl2582.js";import{t as be}from"./BehnLFca.js";import{t as Ee}from"./BB9JGYHu.js";import{n as he,t as Ce}from"./C5ZELAor.js";import{t as F}from"./BjQp8F4r2.js";import{l as B}from"./Bx6Sdt7Y2.js";import{c as De,l as Pe,m as Oe,t as Ne}from"./CsyZSz-d2.js";import{n as Y,t as ye}from"./DfuPQKZo2.js";import{n as j}from"./CwJXUaHz2.js";import{n as Re,t as Te}from"./vByyUoSy2.js";import{t as we}from"./4o0xoJMi.js";import{t as Ie}from"./DyN8Hkcj.js";import{t as L}from"./BPtbFq3W.js";G();var xe=W({__name:"WbOzonMatchingPriceSegmentChart",setup(k){const{sendMetriks:u}=F(B.NICHES),e=L(),i=c({datasets:[],labels:[]}),s=c([]),o=c([]),l=pe("chartRef"),_=ye({seriesData:R(()=>i.value.datasets),isShowGain:!0}),C=()=>[...s.value.map(t=>({...t,label:`${t.label}_${t.compareGroup||X.wb}`})),...o.value.map(t=>({...t,label:`${t.label}_${t.compareGroup||X.oz}`}))],D=()=>{const t=e.priceSegmentData,{labels:r}=Oe(t);s.value=Pe(t),o.value=De(t),i.value.datasets=C(),i.value.labels=r},P=t=>{s.value=t,O(),u("пеÑеклÑÑение показаÑелей на гÑаÑике WB")},T=t=>{o.value=t,O(),u("пеÑеклÑÑение показаÑелей на гÑаÑике OZON")},O=()=>{if(!l.value)return;const t=C();i.value.datasets=t;const r={};t.forEach(N=>{r[N.label]=!N.isHidden}),l.value.updateSeriesVisibility(r)};return M(()=>e.priceSegmentData,()=>D()),(t,r)=>(m(),d(a(b),{direction:"col"},{default:h(()=>[a(e).isLoadingPriceSegment?(m(),d(a(b),{key:0,class:A(t.$style.loader)},{default:h(()=>[p(a(_e))]),_:1},8,["class"])):I("",!0),r[2]||(r[2]=E()),ue(le("div",null,[p(a(b),{direction:"col",gap:"g8"},{default:h(()=>[s.value.length?(m(),d(Y,{key:0,"legend-data":s.value,onUpdateSeries:P},null,8,["legend-data"])):I("",!0),r[0]||(r[0]=E()),o.value.length&&!a(e).isOnlyWb?(m(),d(Y,{key:1,title:"Ozon","legend-data":o.value,"only-border":"",onUpdateSeries:T},null,8,["legend-data"])):I("",!0)]),_:1}),r[1]||(r[1]=E()),p(ge,{ref_key:"chartRef",ref:l,"chart-data":i.value,"grid-bottom":100,"local-storage-id":"Echarts-wb-ozon-matching-price-segment-chart","hide-legend":"","custom-tooltip-composable":a(_),"axis-label-formatter":a(Ne)},null,8,["chart-data","custom-tooltip-composable","axis-label-formatter"])],512),[[me,a(e).isLoadedPriceSegment]])]),_:1}))}}),We="_5xaFZ5Xx",Ae="gk0XwPse",Ge={loader:We,chart:Ae},ze={$style:Ge},Fe=z(xe,[["__cssModules",ze]]);G();var x=ae(re()),Be=W({__name:"WbOzonMatchingPriceSegmentGrid",setup(k,{expose:u}){const e=L(),i=ne(),s=se(),{showError:o}=oe(),{sendMetriks:l}=F(B.NICHES),{columnDefs:_}=we(),{isShowNoData:C,hasFilterModel:D,noDataDescription:P,checkNoDataClientSide:T,resetFilterNoDataClientSide:O,onFilterChangedNoDataClientSide:t}=Ee(),r=c(),N=c({groupHeaderHeight:30,headerHeight:60,floatingFiltersHeight:32}),q=R(()=>({ExportButtonsComponent:{statusPanel:"ExportButtonsComponent",align:"left",statusPanelParams:{sendMetriks:(0,x.default)(()=>l(S.GRID_EXPORT_METRIKA))}}})),y=c([]),H=c([]),g=c(!1),w=c(!1),J=R(()=>Se("СÑавнение WB + OZON - СводнÑй оÑÑÐµÑ Ð¿Ð¾ ниÑе - Ð¦ÐµÐ½Ð¾Ð²Ð°Ñ ÑегменÑаÑÐ¸Ñ -",e.periodRange)),Q=R(()=>({title:()=>"ÐÐµÑ Ð´Ð°Ð½Ð½ÑÑ
",description:()=>P.value,buttonText:()=>D.value?"СбÑоÑиÑÑ":"ÐовÑй оÑÑеÑ",buttonFn:()=>{D.value?O():$()}})),$=()=>{s.push({name:v.WB_OZON_MATCHING_INDEX})};ce(()=>{g.value=!0}),ie(()=>{g.value=!1});const K=async()=>{if(w.value)return;w.value=!0,r.value.clearCellSelection(),r.value.setGridOption("loading",!0);const n={api:r.value,description:"ТоваÑÑ Ð´Ð»Ñ Ð¾ÑÑеÑа не найденÑ. ÐзмениÑе пеÑиод оÑÑеÑа, ÑилÑÑÑÑ Ð¸Ð»Ð¸ вÑбеÑиÑе дÑÑгÑÑ Ð½Ð¸ÑÑ"};try{await e.getWbOzonMatchingPriceSegment(String(i.query.id)),U(),n.data=y.value}catch(f){o(f,"ÐÑоизоÑла оÑибка")}n.status=e.priceSegmentStatus,T(n),r.value.setGridOption("loading",!1),w.value=!1,g.value=!0},U=()=>{y.value=e.priceSegmentData,Z(y.value)},ee=({api:n})=>{r.value=n,e.loadData(v.WB_OZON_MATCHING_PRICE_SEGMENT),he(n,l)},Z=n=>
1{H.value=Te({data:n,periodDiff:e.periodDiff,totalField:"min_range_price",fieldsArray:{wb:j,oz:j},totalsExcludeKey:ve,isNestedStructure:!0})},te=n=>{const f=[];n.api.forEachNode(V=>{V.displayed&&f.push(V.data)}),Z(f),t()};return M(()=>[e.periodRange,i.query.fbs],()=>{e.resetCachedPages()}),M(()=>e.byDaysPeriods,(0,x.default)(()=>{K()})),M(()=>e.chosenNiches,(0,x.default)(n=>{g.value&&(e.isOnlyWb=!n.length,e.isOnlyWb?(e.setOnlyWbData(),U(),g.value=!0):e.loadData(v.WB_OZON_MATCHING_PRICE_SEGMENT))},2e3)),M(()=>[e.priceSegmentRangeCurrentMin,e.priceSegmentRangeCurrentMax,e.priceSegmentSegmentsCount,e.priceSegmentPriceStep],()=>{e.isPriceSegmentFilterSet&&e.loadData(v.WB_OZON_MATCHING_PRICE_SEGMENT)}),de(()=>{Ce(r.value,l)}),u({NoDataRenderer:be}),e.setDataLoadCallback(K,v.WB_OZON_MATCHING_PRICE_SEGMENT),(n,f)=>a(C)?(m(),d(a(b),{key:0,padding:"p20",bg:"default"},{default:h(()=>[p(fe,{title:"ÐÐµÑ Ð´Ð°Ð½Ð½ÑÑ
",description:a(P),class:A(n.$style.noData),"button-text":"ÐовÑй оÑÑеÑ","button-fn":$},null,8,["description","class"])]),_:1})):(m(),d(Me,{key:1,class:"w35 ag-grid-header-normal","column-defs":a(_),"row-data":y.value,"grid-options":N.value,"status-panel-components":q.value,pagination:!1,"no-init-auto-size":"","animate-rows":"","allow-filter-preset":!1,"export-file-name":J.value,"enable-browser-tooltips":"",prefix:"/am",postfix:"wb-ozon-matching-price-segment",version:4,"no-rows-overlay-component":"NoDataRenderer","no-rows-overlay-component-params":Q.value,"pinned-bottom-row-data":H.value,"get-row-style":a(Re),onGridReady:ee,onFilterChanged:te},null,8,["column-defs","row-data","grid-options","status-panel-components","export-file-name","no-rows-overlay-component-params","pinned-bottom-row-data","get-row-style"]))}}),Le="jbYRaF3F",ke={noData:Le},He={$style:ke},$e=z(Be,[["__cssModules",He]]);G();var Ke=W({__name:"WbOzonMatchingPriceSegment",setup(k){const{sendMetriks:u}=F(B.NICHES),e=L(),i=({min:s,max:o,segmentsCount:l,priceStep:_})=>{e.priceSegmentRangeCurrentMin!==s&&u(S.PRICE_SEGMENT_MIN_METRIKA),e.priceSegmentRangeCurrentMax!==o&&u(S.PRICE_SEGMENT_MAX_METRIKA),e.priceSegmentSegmentsCount!==l&&u(S.PRICE_SEGMENT_COUNT_METRIKA),e.priceSegmentPriceStep!==_&&u(S.PRICE_STEP_METRIKA),e.priceSegmentRangeCurrentMin=s,e.priceSegmentRangeCurrentMax=o,e.priceSegmentSegmentsCount=l,e.priceSegmentPriceStep=_};return(s,o)=>(m(),d(a(b),{direction:"col",gap:"g20"},{default:h(()=>[p(Fe),o[0]||(o[0]=E()),p(Ie,{class:A(s.$style.filter),min:a(e).priceSegmentRangeMin,max:a(e).priceSegmentRangeMax,"segments-count":a(e).priceSegmentSegmentsCount,"price-step":a(e).priceSegmentPriceStep,disabled:a(e).isLoadingPriceSegment,onApplyFilterParams:i},null,8,["class","min","max","segments-count","price-step","disabled"]),o[1]||(o[1]=E()),p($e)]),_:1}))}}),Ue="NTjCQnJQ",Ze={filter:Ue},Ve={$style:Ze},Dt=z(Ke,[["__cssModules",Ve]]);export{Dt as default};
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.