1"use strict";(globalThis.webpackChunkipe_frontend=globalThis.webpackChunkipe_frontend||[]).push([[5098],{65098(e,t,s){s.r(t),s.d(t,{default:()=>O});var a=s(65043),o=s(73443),l=s(41442),c=s(36639),r=s(67509),i=s(51798),n=s(81580),d=s(82504),p=s(95490),u=s(73873),h=s(53494),m=s(73385),b=s(78114),y=s(68683),f=s(98365),g=s(76353),v=s(70264),x=s(60117),S=s(66473),j=s(69704),N=s(26287),w=s(7418),T=s(36649),A=s(69746),C=s(21902),k=(s(51808),s(70579));function E(e){var t;return String(null!==(t=null===e||void 0===e?void 0:e.id)&&void 0!==t?t:"")}function O(){const e=(0,g.Lc)(),{toast:t,showSuccess:s,showError:O,closeToast:_}=(0,x.O)(),{shopType:$}=(0,T.Ay)(),{categories:D,leafOptions:I,loading:L}=(0,A.A)($),[z,M]=(0,a.useState)(""),[P,R]=(0,a.useState)(""),[B,F]=(0,a.useState)(""),[J,V]=(0,a.useState)(""),[q,G]=(0,a.useState)(""),[H,K]=(0,a.useState)(""),[Q,U]=(0,a.useState)(""),[W,X]=(0,a.useState)("createdAt"),[Y,Z]=(0,a.useState)(""),[ee,te]=(0,a.useState)(""),[se,ae]=(0,a.useState)("createdAt"),[oe,le]=(0,a.useState)(""),[ce,re]=(0,a.useState)(""),[ie,ne]=(0,a.useState)(0),[de,pe]=(0,a.useState)(1),[ue,he]=(0,a.useState)(o.DV),[me,be]=(0,a.useState)(0),[ye,fe]=(0,a.useState)([]),[ge,ve]=(0,a.useState)(!1),[xe,Se]=(0,a.useState)(!1),[je,Ne]=(0,a.useState)(null),[we,Te]=(0,a.useState)(null),[Ae,Ce]=(0,a.useState)(()=>new Set),[ke,Ee]=(0,a.useState)(()=>new Set),Oe=(0,a.useRef)(new Map),[_e,$e]=(0,a.useState)(!1),[De,Ie]=(0,a.useState)(null),[Le,ze]=(0,a.useState)(!1),[Me,Pe]=(0,a.useState)(!1),[Re,Be]=(0,a.useState)(!1),[Fe,Je]=(0,a.useState)(!1),Ve=(0,a.useCallback)(async()=>{ve(!0);try{const e=await f.Er.listOfficialSheinAttributeTemplates({keyword:P||void 0,styleNo:J||void 0,productTypeId:Q||void 0,shopType:$,dateField:oe||ce?se:void 0,dateFrom:oe||void 0,dateTo:ce||void 0,page:de,pageSize:ue});fe(Array.isArray(null===e||void 0===e?void 0:e.items)?e.items:[]),be(Number(null===e||void 0===e?void 0:e.total)||0)}catch(e){fe([]),be(0),O((null===e||void 0===e?void 0:e.message)||"\u52a0\u8f7d\u5931\u8d25")}finally{ve(!1)}},[P,J,Q,se,oe,ce,de,ue,ie,$,O]);(0,a.useEffect)(()=>{Ve()},[Ve]),(0,a.useEffect)(()=>{pe(1),Ee(new Set),M(""),R(""),F(""),V(""),G(""),K(""),U(""),X("createdAt"),Z(""),te(""),ae("createdAt"),le(""),re("")},[$]),(0,a.useEffect)(()=>{const e=Oe.current;for(const t of[...e.keys()])ke.has(t)||e.delete(t);ye.forEach(t=>{const s=E(t);s&&ke.has(s)&&e.set(s,t)})},[ye,ke]);const qe=(0,a.useMemo)(()=>ye.filter(e=>(0,b.N6)(e)).map(E).filter(Boolean),[ye]),Ge=qe.length>0&&qe.every(e=>ke.has(e)),He=()=>{Ee(e=>(0,h.M)(e,qe,Ge))},Ke=e=>{Ee(t=>{const s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},Qe=()=>{R(z.trim()),V(B.trim()),U(H),ae(W||"createdAt"),le(Y),re(ee),pe(1),ne(e=>e+1)},Ue=(0,a.useCallback)(()=>{const e=Oe.current,t=Array.from(ke).map(t=>e.get(t)).filter(Boolean);return t.length?t:ye},[ke,ye]),{porting:We,onExportCsv:Xe,onExportJson:Ye,onImportJson:Ze}=(0,d.A)({type:m.jn.productAttributes,shopId:"official",filePrefix:"\u5b98\u65b9\u5c5e\u6027\u6a21\u677f",resolveExportRows:Ue,buildCsvRows:e=>e.map(e=>{var t,s;return{"\u4f18\u5148\u7ea7":null!==(t=e.sortOrder)&&void 0!==t?t:0,"\u6b3e\u53f7":e.styleNo||"","\u6a21\u677f\u540d\u79f0":e.name||"","\u5907\u6ce8":e.remark||"","\u7c7b\u76ee":e.categoryPathLabel||e.productTypeId||"","\u81ea\u52a8\u89c4\u5219":e.autoRuleEnabled?"\u5f00":"\u5173","\u5df2\u586b\u5c5e\u6027":null!==(s=e.filledAttrCount)&&void 0!==s?s:"","\u521b\u5efa\u65f6\u95f4":(0,p.T)(e.createdAt),"\u66f4\u65b0\u65f6\u95f4":(0,p.T)(e.updatedAt),"\u521b\u5efa\u4eba":e.createdByName||"","\u66f4\u65b0\u4eba":e.updatedByName||""}}),getOne:e=>f.Er.getOfficialSheinAttributeTemplate(e).then(e=>({item:(null===e||void 0===e?void 0:e.item)||e})),listByProductType:async e=>{const t=await f.Er.listOfficialSheinAttributeTemplates({productTypeId:e||void 0,shopType:$,page:1,pageSize:200});return Array.isArray(null===t||void 0===t?void 0:t.items)?t.items:[]},createOne:e=>f.Er.createOfficialSheinAttributeTemplate({...e,shopType:$}),batchCreate:e=>f.Er.batchCreateOfficialSheinAttributeTemplates({...e,shopType:$}),importTargetLabel:"\u5b98\u65b9\u6a21\u677f",onImported:async()=>{Ee(new Set),Oe.current.clear(),pe(1),ne(e=>e+1)}}),et=(0,a.useCallback)(()=>{const e=Oe.current;return Array.from(ke).map(t=>
1e.get(t)).filter(Boolean)},[ke]),tt=xe||We||Le||Me||Re,st=e?(0,C.x)({shopType:$,selectedCount:ke.size,onCopy:async t=>{if(!e||0===ke.size)return void O("\u8bf7\u5148\u52fe\u9009\u8981\u590d\u5236\u7684\u6a21\u677f");const a=et();if(!a.length)return void O("\u9009\u4e2d\u8bb0\u5f55\u7f3a\u5c11\u6570\u636e\uff0c\u65e0\u6cd5\u590d\u5236");const o=t||$;ze(!0);try{const e=await(0,C.T)({rows:a,runOne:e=>f.Er.copyOfficialSheinAttributeTemplate(e.id,{name:(0,u.J)(e.name),shopType:o})});s(o!==$?`\u5df2\u590d\u5236 ${e} \u6761\u5230${o}`:`\u5df2\u590d\u5236 ${e} \u6761`),Ee(new Set),Oe.current.clear(),pe(1),ne(e=>e+1)}catch(l){O((null===l||void 0===l?void 0:l.message)||"\u6279\u91cf\u590d\u5236\u5931\u8d25")}finally{ze(!1)}},onMove:async t=>{if(!e||0===ke.size||!t)return void O("\u8bf7\u5148\u52fe\u9009\u8981\u79fb\u52a8\u7684\u6a21\u677f");const a=et();if(!a.length)return void O("\u9009\u4e2d\u8bb0\u5f55\u7f3a\u5c11\u6570\u636e\uff0c\u65e0\u6cd5\u79fb\u52a8");if(await(0,c.j)({title:"\u6279\u91cf\u79fb\u52a8",message:`\u786e\u8ba4\u5c06 ${a.length} \u6761\u5c5e\u6027\u6a21\u677f\u79fb\u52a8\u5230\u300c${t}\u300d\uff1f`,confirmText:"\u79fb\u52a8"})){Pe(!0);try{const e=await(0,C.T)({rows:a,runOne:e=>f.Er.moveOfficialSheinAttributeTemplate(e.id,{shopType:t})});s(`\u5df2\u79fb\u52a8 ${e} \u6761\u5230${t}`),Ee(new Set),Oe.current.clear(),pe(1),ne(e=>e+1)}catch(o){O((null===o||void 0===o?void 0:o.message)||"\u6279\u91cf\u79fb\u52a8\u5931\u8d25")}finally{Pe(!1)}}},onChangeCategory:()=>{e&&0!==ke.size?et().length?Je(!0):O("\u9009\u4e2d\u8bb0\u5f55\u7f3a\u5c11\u6570\u636e\uff0c\u65e0\u6cd5\u66f4\u6362\u7c7b\u76ee"):O("\u8bf7\u5148\u52fe\u9009\u8981\u66f4\u6362\u7c7b\u76ee\u7684\u6a21\u677f")},onDelete:async()=>{if(!e||0===ke.size)return void O("\u8bf7\u5148\u52fe\u9009\u8981\u5220\u9664\u7684\u6a21\u677f");const t=[...ke].map(Number).filter(e=>Number.isFinite(e)&&e>0);if(await(0,c.j)({title:"\u6279\u91cf\u5220\u9664",message:`\u5c06\u5220\u9664 ${t.length} \u6761\u5c5e\u6027\u6a21\u677f\u3002`,tone:"danger",confirmText:"\u5220\u9664"})){Se(!0);try{const e=await f.Er.batchDeleteOfficialSheinAttributeTemplates(t);s(`\u5df2\u5220\u9664 ${Number(null===e||void 0===e?void 0:e.deleted)||t.length} \u6761`),Ee(new Set),Oe.current.clear(),await Ve()}catch(a){O((null===a||void 0===a?void 0:a.message)||"\u6279\u91cf\u5220\u9664\u5931\u8d25")}finally{Se(!1)}}},deleteDisabled:tt,changeCategoryDisabled:tt}):[],at=function(){Ie(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null),$e(!0)},ot=ge?"\u52a0\u8f7d\u4e2d\u2026":P||Q?"\u672a\u627e\u5230\u5339\u914d\u7684\u5c5e\u6027\u6a21\u677f":"\u6682\u65e0\u6a21\u677f";return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(v.A,{toast:t,onClose:_}),(0,k.jsx)("div",{className:"admin-shein-product-templates-host",children:(0,k.jsx)("div",{className:"shein-product-ops shein-product-ops--wide","data-testid":"admin-shein-attribute-templates",children:(0,k.jsx)("div",{className:"shein-product-ops__workspace",children:(0,k.jsxs)("div",{className:"shein-product-ops__content shein-product-ops__content--flush",children:[(0,k.jsx)(r.GM,{toolbar:(0,k.jsx)(l.A,{selectedCount:ke.size,busy:ge||tt,batchCopying:Le,batchMoving:Me||Re,exportLabel:"\u5bfc\u51fa",exportDisabled:ge||We||Le||Me||Re,exportMenu:[{key:"export-csv",label:"\u5bfc\u51fa CSV\uff08\u5217\u8868\uff09",disabled:ge||We,onClick:Xe},{key:"export-json",label:"\u5bfc\u51fa JSON\uff08\u5b8c\u6574\uff09",disabled:ge||We,onClick:Ye}],batchOpsMenu:st,extraActions:[...e?[{key:"import-json",label:We?"\u5bfc\u5165\u4e2d\u2026":"\u5bfc\u5165 JSON",disabled:ge||tt,onClick:Ze},{key:"create",label:"\u65b0\u5efa\u5c5e\u6027\u6a21\u677f",tone:"primary",disabled:ge||tt,onClick:()=>at(null)}]:[]]}),children:(0,k.jsxs)("div",{className:"spo-filter-bar",children:[(0,k.jsx)("div",{className:"spo-filter-bar__fields",children:(0,k.jsx)(j.A,{categories:D,categoryId:q,onCategoryChange:e=>{const t=I.find(t=>String(t.categoryId)===String(e)),s=null!==t&&void 0!==t&&t.productTypeId&&"0"!==String(t.productTypeId)?String(t.productTypeId):"";G(e?String(e):""),K(s)},styleNoDraft:B,onStyleNoChange:F,nameDraft:z,onNameChange:M,onEnter:Qe,disabled:ge,catalogLoading:L,dateFieldDraft:W,onDateFieldChange:X,dateFromDraft:Y,onDateFromChange:Z,dateToDraft:ee,onDateToChange:te})}),(0,k.jsxs)("div",{className:"spo-filter-bar__actions",children:[(0,k.jsx)("button",{type:"button",className:"spo-btn spo-btn--ghost spo-btn--sm",disabled:ge,onClick:()=>{M(""),R(""),F(""),V(""),G(""),K(""),U(""),X("createdAt"),Z(""),te(""),ae("createdAt"),le(""),re(""),pe(1),ne(e=>e+1)},children:"\u91cd\u7f6e"}),(0,k.jsx)("button",{type:"button",className:"spo-btn spo-btn--primary spo-btn--sm",disabled:ge,onClick:Qe,children:"\u67e5\u8be2"})]})]})}),(0,k.jsxs)(r.qD,{loading:ge,loadingLabel:"\u6b63\u5728\u67e5\u8be2\u2026",children:[(0,k.jsx)(S.A,{disabled:ge,ariaLabel:"\u5c5e\u6027\u6a21\u677f\u5e97\u94fa\u7c7b\u578b"}),(0,k.jsx)("div",{className:"spo-drafts__table-wrap spo-certs-table-wrap",children:(0,k.jsxs)("table",{className:"spo-publish__table spo-drafts__table spo-certs-table spo-tpl-table spo-tpl-table--attr",children:[(0,k.jsxs)("colgroup",{children:[(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--check"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--order"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--style-no"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--name"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--category"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--switch"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--switch"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--filled"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--createdAt"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--updatedAt"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--user"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--user"}),(0,k.jsx)("col",{className:"spo-certs-col spo-certs-col--ops"})]}),(0,k.jsx)("thead",{children:(0,k.jsxs)("tr",{children:[(0,k.jsx)("th",{scope:"col",className:"spo-certs-th spo-certs-th--check",onClick:()=>{ge||0===qe.length||He()},children:(0,k.jsx)("input",{type:"checkbox","aria-label":"\u5168\u9009",disabled:!e||ge||0===qe.length,checked:Ge,onClick:e=>e.stopPropagation(),onChange:He})}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th spo-certs-th--order",children:"\u4f18\u5148\u7ea7"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th",children:"\u6b3e\u53f7"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th",children:"\u6a21\u677f\u540d\u79f0"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th",children:"\u7c7b\u76ee"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th spo-certs-th--switch",children:"\u81ea\u52a8\u89c4\u5219"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th spo-certs-th--switch",children:"\u542f\u7528"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th",children:"\u5df2\u586b\u5c5e\u6027"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th",children:"\u521b\u5efa\u65f6\u95f4"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th",children:"\u66f4\u65b0\u65f6\u95f4"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th",children:"\u521b\u5efa\u4eba"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th",children:"\u66f4\u65b0\u4eba"}),(0,k.jsx)("th",{scope:"col",className:"spo-certs-th spo-certs-th--ops",children:"\u64cd\u4f5c"})]})}),(0,k.jsx)("tbody",{children:ge||0===ye.length?(0,k.jsx)("tr",{children:(0,k.jsx)("td",{colSpan:13,className:"spo-certs-empty-cell",children:(0,k.jsx)("div",{className:"spo-certs-empty",children:(0,k.jsx)("p",{className:"spo-certs-empty__title",children:ot})})})}):ye.map(t=>{var a,o;const l=E(t),r=(0,b.a_)(t),n=(0,b.N6)(t),d=(0,b.H)(t),h=n;return(0,k.jsxs)("tr",{className:h?"spo-row--clickable":void 0,onClick:e=>{h&&(e.target.closest("button, a, input, .shein-draft-actions, .admin-shein-tpl-ops")||Ke(l))},children:[(0,k.jsx)("td",{className:"spo-certs-td spo-certs-td--check",children:(0,k.jsx)("input",{type:"checkbox","aria-label":`\u9009\u62e9 ${t.name||l}`,disabled:!h,checked:ke.has(l),onClick:e=>e.stopPropagation(),onChange:()=>{h&&Ke(l)}})}),(0,k.jsx)("td",{className:"spo-certs-td spo-certs-td--order",children:null!==(a=t.sortOrder)&&void 0!==a?a:0}),(0,k.jsx)("td",{className:"spo-certs-td",children:t.styleNo||"\u2014"}),(0,k.jsxs)("td",{className:"spo-certs-td",title:t.name||"",children:[(0,k.jsx)("strong",{children:t.name||"\u2014"}),t.remark?(0,k.jsx)("div",{className:"spo-muted",children:t.remark}):null]}),(0,k.jsx)("td",{className:"spo-certs-td",children:t.categoryPathLabel||t.productTypeId||"\u2014"}),(0,k.jsx)("td",{className:"spo-certs-td spo-certs-td--switch",children:(0,k.jsx)(i.A,{checked:!!t.autoRuleEnabled,disabled:!r||xe||Ae.has(l),ariaLabel:`${t.name||"\u6a21\u677f"}\u81ea\u52a8\u89c4\u5219`,onChange:a=>(async(t,a)=>{if(!e||null===t||void 0===t||!t.id||!(0,b.a_)(t))return;const o=t.id,l=String(o),c=!0===t.autoRuleEnabled||1===t.autoRuleEnabled;Ce(e=>new Set(e).add(l)),fe(e=>e.map(e=>String(e.id)===l?{...e,autoRuleEnabled:a}:e));try{await f.Er.updateOfficialSheinAttributeTemplate(o,{autoRuleEnabled:a,version:t.version}),s(a?"\u5df2\u5f00\u542f\u81ea\u52a8\u89c4\u5219":"\u5df2\u5173\u95ed\u81ea\u52a8\u89c4\u5219")}catch(r){fe(e=>e.map(e=>String(e.id)===l?{...e,autoRuleEnabled:c}:e)),O((null===r||void 0===r?void 0:r.message)||"\u66f4\u65b0\u81ea\u52a8\u89c4\u5219\u5931\u8d25")}finally{Ce(e=>{const t=new Set(e);return t.delete(l),t})}})(t,a)})}),(0,k.jsx)("td",{className:"spo-certs-td spo-certs-td--switch",children:(0,k.jsx)(i.A,{checked:!1!==t.enabled&&0!==t.enabled,disabled:!r||xe||Ae.has(l),ariaLabel:`${t.name||"\u6a21\u677f"}\u542f\u7528`,onChange:a=>(async(t,a)=>{if(!e||null===t||void 0===t||!t.id||!(0,b.a_)(t))return;const o=t.id,l=String(o),c=!1!==t.enabled&&0!==t.enabled;Ce(e=>new Set(e).add(l)),fe(e=>e.map(e=>String(e.id)===l?{...e,enabled:a}:e));try{var r;const e=await f.Er.updateOfficialSheinAttributeTemplate(o,{enabled:a,version:t.version}),c=null===e||void 0===e||null===(r=e.item)||void 0===r?void 0:r.version;null!=c&&fe(e=>e.map(e=>String(e.id)===l?{...e,enabled:a,version:c}:e)),s(a?"\u5df2\u542f\u7528":"\u5df2\u505c\u7528")}catch(i){fe(e=>e.map(e=>String(e.id)===l?{...e,enabled:c}:e)),O((null===i||void 0===i?void 0:i.message)||"\u66f4\u65b0\u542f\u7528\u72b6\u6001\u5931\u8d25")}finally{Ce(e=>{const t=new Set(e);return t.delete(l),t})}})(t,a)})}),(0,k.jsx)("td",{className:"spo-certs-td",children:null!==(o=t.filledAttrCount)&&void 0!==o?o:0}),(0,k.jsx)("td",{className:"spo-certs-td spo-certs-td--time",children:(0,p.T)(t.createdAt)}),(0,k.jsx)("td",{className:"spo-certs-td spo-certs-td--time",children:(0,p.T)(t.updatedAt)}),(0,k.jsx)("td",{className:"spo-certs-td",children:t.createdByName||"\u2014"}),(0,k.jsx)("td",{className:"spo-certs-td",children:t.updatedByName||"\u2014"}),(0,k.jsx)("td",{className:"spo-certs-td spo-certs-td--ops",children:(0,k.jsx)(N.A,{currentShopType:$,canEdit:r,canCopy:d,canDelete:n,canMove:e&&r,busy:xe||null!=je||null!=we,copying:je===t.id,moving:we===t.id,onEdit:()=>at(t.id),onCopy:a=>(async(t,a)=>{if(e&&null!==t&&void 0!==t&&t.id&&!je){Ne(t.id);try{const e=a||$;await f.Er.copyOfficialSheinAttributeTemplate(t.id,{name:(0,u.J)(t.name),shopType:e}),s(e!==$?`\u5df2\u590d\u5236\u5230${e}`:"\u5df2\u590d\u5236\u6a21\u677f"),pe(1),ne(e=>e+1)}catch(o){O((null===o||void 0===o?void 0:o.message)||"\u590d\u5236\u5931\u8d25")}finally{Ne(null)}}})(t,a),onMove:a=>(async(t,a)=>{if(!e||null===t||void 0===t||!t.id||we||!a)return;
1if(await(0,c.j)({title:"\u79fb\u52a8\u6a21\u677f",message:`\u786e\u8ba4\u5c06\u300c${t.name||t.id}\u300d\u79fb\u52a8\u5230\u300c${a}\u300d\uff1f`,confirmText:"\u79fb\u52a8"})){Te(t.id);try{await f.Er.moveOfficialSheinAttributeTemplate(t.id,{shopType:a}),s(`\u5df2\u79fb\u52a8\u5230${a}`),ne(e=>e+1)}catch(o){O((null===o||void 0===o?void 0:o.message)||"\u79fb\u52a8\u5931\u8d25")}finally{Te(null)}}})(t,a),onDelete:()=>(async t=>{if(!e||null===t||void 0===t||!t.id)return;if(await(0,c.j)({title:"\u5220\u9664\u6a21\u677f",message:`\u786e\u8ba4\u5220\u9664\u300c${t.name||t.id}\u300d\uff1f`,tone:"danger",confirmText:"\u5220\u9664"})){Se(!0);try{await f.Er.deleteOfficialSheinAttributeTemplate(t.id),s("\u5df2\u5220\u9664"),Ee(e=>{const s=new Set(e);return s.delete(E(t)),s}),await Ve()}catch(a){O((null===a||void 0===a?void 0:a.message)||"\u5220\u9664\u5931\u8d25")}finally{Se(!1)}}})(t)})})]},l)})})]})}),(0,k.jsx)(o.Ay,{page:de,pageSize:ue,total:me,loading:ge,onPageChange:pe,onPageSizeChange:e=>{he(e),pe(1)},ariaLabel:"\u5c5e\u6027\u6a21\u677f\u5206\u9875"})]})]})})})}),(0,k.jsx)(n.A,{open:_e,officialMode:!0,shopType:$,templateId:De,templateScope:y.bO.official,onClose:()=>{$e(!1),Ie(null)},onSaved:()=>{Ee(new Set),ne(e=>e+1)}}),(0,k.jsx)(w.A,{open:Fe,selectedCount:ke.size,categories:D,catalogLoading:L,busy:Re,onClose:()=>{Re||Je(!1)},onConfirm:async e=>{let{categoryId:t,productTypeId:a,categoryPathLabel:o}=e;const l=et();if(l.length){Be(!0);try{const e=await(0,C.T)({rows:l,runOne:e=>f.Er.updateOfficialSheinAttributeTemplate(e.id,{categoryId:t,productTypeId:a,categoryPathLabel:o,version:e.version})});s(`\u5df2\u66f4\u6362 ${e} \u6761\u6a21\u677f\u7c7b\u76ee`),Je(!1),Ee(new Set),Oe.current.clear(),pe(1),ne(e=>e+1)}catch(c){O((null===c||void 0===c?void 0:c.message)||"\u6279\u91cf\u66f4\u6362\u7c7b\u76ee\u5931\u8d25")}finally{Be(!1)}}else O("\u9009\u4e2d\u8bb0\u5f55\u7f3a\u5c11\u6570\u636e\uff0c\u65e0\u6cd5\u66f4\u6362\u7c7b\u76ee")}})]})}}}]); 2//# sourceMappingURL=5098.b0c8d9f8.chunk.js.map
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.