1import{d as ne,O as ue,r as B,e as E,R as z,L as l,y as e,f as t,D as Y,z as s,N as S,M as p,U as $e,E as Ce,a7 as P,S as ie,J as de,x as X,bL as Z,F as x,cE as ke,bN as re,be as me,A as w,_ as ce,G as Ue,w as Ae,k as ee}from"./index-BBJIvO17.js";import{V as pe}from"./VAvatar-DgZfLKTG.js";import{V as D}from"./VChip-Cdp629yn.js";import{c as ve,V as fe,a as be,b as ge}from"./VExpansionPanels-DUKvfI5y.js";import{V as Se}from"./VFileInput-Cq9WE0cx.js";import{V as we,a as Te,b as Pe,d as Be}from"./VList-DZM-_8EG.js";import{V as L}from"./VSheet-Bf2jnois.js";import{V as J,a as te,d as K}from"./VCard-C-Ev28XQ.js";import{V as Ie}from"./VCheckbox-Cd98GrIZ.js";import{V as ze}from"./VDivider-Cj24YOJB.js";import{V as Ne}from"./VForm-RKhBmJZm.js";import{V as y}from"./VCol-Dd_wX-XJ.js";import{V as _}from"./VRow-B5qRQ-CN.js";import{V as le}from"./VSelect-P00LGkXT.js";import{V as Me,a as ae,b as Ee,c as oe}from"./VTabs-DJfV7KOD.js";import{V as k}from"./VTextField-pL0r7pzC.js";import{V as G}from"./VTextarea-DJKflMy3.js";import"./VImg-a_3HwOJ4.js";import"./index-BEo7XoSI.js";import"./ssrBoot-A9-FfH3b.js";import"./VCheckboxBtn-RX7wQhUP.js";/* empty css */import"./VMenu-BqWkRW1I.js";import"./dialog-transition-BZZ0Sgjq.js";const Q=V=>{const i=[];let b="",f=!1;for(let m=0;m<V.length;m++){const g=V[m];g==='"'?f&&V[m+1]==='"'?(b+='"',m++):f=!f:g===","&&!f?(i.push(b),b=""):b+=g}return i.push(b),i},q=V=>{const i=String(V??"").replace(/[^0-9.]/g,"");if(!i)return null;const b=parseFloat(i);return Number.isFinite(b)?b:null},Re=(V,i=1)=>{const b=parseInt(String(V??""),10);return Number.isFinite(b)?b:i},Ve=V=>String(V??"").split("|").map(i=>i.trim()).filter(Boolean),se=V=>({title:V.variantTitle||"",cost:q(V.variantCost),stockQty:Re(V.variantStockQty),uid:V.variantSkuCode||"",imgs:Ve(V.variantImageUrls),attributes:[]}),W=(V,i)=>{!i.attributeName||!i.attributeValue||V.attributes.find(f=>f.Name===i.attributeName&&f.Value===i.attributeValue)||V.attributes.push({Name:i.attributeName,Value:i.attributeValue,img:i.attributeImage||""})},Fe=V=>{const i=V.split(` 2`).filter(g=>g.trim().length>0);if(i.length===0)return[];const b=Q(i[0]),f=[];let m=null;for(let g=1;g<i.length;g++){const T=Q(i[g]);if(T.length!==b.length)continue;const v={};if(b.forEach((A,d)=>{v[A]=T[d]||""}),v.title&&v.title.trim()){if(m&&f.push(m),m={title:v.title,brand:v.brand||"",maker:v.maker||"",cost:q(v.cost)||0,domesticShippingCost:q(v.domesticShippingCost),weight:q(v.weight),supplierCountryCode:v.supplierCountryCode||"US",productUrl:v.productUrl||"",description:v.description||"",imgs:Ve(v.imageUrls),tags:v.tags||"",isAdultProduct:v.isAdultProduct==="true"||v.isAdultProduct==="1",variants:[]},v.variantTitle||v.variantCost||v.attributeName){const A=se(v);W(A,v),m.variants.push(A)}}else if(m)if(v.variantTitle&&v.variantTitle.trim()||m.variants.length===0){const d=se(v);W(d,v),m.variants.push(d)}else{const d=m.variants[m.variants.length-1];W(d,v)}}return m&&f.push(m),f.forEach(g=>{g.variants.length===0&&g.variants.push({title:"",cost:null,stockQty:1,uid:"",imgs:[],attributes:[]})}),f},De={class:"bulk-add-toolbar"},Le={class:"section-kicker"},qe={class:"text-h6 font-weight-semibold"},Qe={class:"bulk-add-copy text-body-2 text-medium-emphasis"},je={class:"csv-guide-grid mb-4"},He={class:"csv-guide-item"},Oe={class:"csv-guide-item"},Je={class:"csv-guide-item"},Ke={class:"text-subtitle-2 font-weight-bold mb-1"},_e={class:"text-body-2 mb-0"},Ge={class:"upload-state"},We={class:"upload-state-copy"},Ye={class:"d-flex gap-3 justify-end flex-wrap mt-4"},Xe={class:"result-summary"},Ze={class:"section-kicker"},xe={class:"text-h6 font-weight-semibold"},et={class:"result-counts"},tt={class:"d-flex gap-3 justify-end flex-wrap mt-4"},lt=`title,cost,imageUrls,productUrl,domesticShippingCost,description,brand,maker,weight,supplierCountryCode,tags,isAdultProduct,variantTitle,variantCost,variantStockQty,variantSkuCode,variantImageUrls,attributeName,attributeValue,attributeImage 3"Sample Product 1",10.99,"https://placehold.co/600x400|https://placehold.co/600x400","https://www.amazon.com/dp/B00000000A",2.50,"This is a sample product description","Brand A","Maker A",0.5,US,"tag1,tag2",false,"Variant 1",10.99,10,"B00000000A","https://example.com/variant1.jpg","Color","Red","https://example.com/red.jpg" 4"Sample Product 2",25.00,"https://placehold.co/600x400","https://www.amazon.co.jp/dp/B00000000B",3.00,"Another product description","Brand B","Maker B",1.2,JP,"tag3,tag4",false,"Variant A",25.00,5,"B00000000B","https://example.com/variant2.jpg","Size","Large","" 5,,,,,,"","",,,,,"Variant B",30.00,3,"B00000000C","https://placehold.co/600x400","Size","Small","https://placehold.co/600x400" 6,,,,,,,,,,,,,,,,"","Color","Blue",""`,at=ne({__name:"ProductBulkAdd",setup(V){const{t:i}=ue(),b=de(),f=B(null),m=B(!1),g=B([]),T=B(!1),v=E(()=>{var n;return((n=f.value)==null?void 0:n.name)||i("productBulkAdd.fileReadyHint")}),A=E(()=>
6{if(!f.value)return"";const n=f.value.size/1024;return n>=1024?`${(n/1024).toFixed(1)} MB`:`${Math.max(1,Math.round(n))} KB`}),d=E(()=>g.value.filter(n=>n.success).length),R=E(()=>g.value.filter(n=>!n.success).length),F=n=>{const u=n.target;u.files&&u.files.length>0&&(f.value=u.files[0])},N=()=>{const n=new Blob([lt],{type:"text/csv;charset=utf-8;"}),u=document.createElement("a"),C=URL.createObjectURL(n);u.setAttribute("href",C),u.setAttribute("download","sample_products.csv"),u.style.visibility="hidden",document.body.appendChild(u),u.click(),document.body.removeChild(u)},j=async()=>{var n,u;if(!f.value){alert(i("pleaseSelectFile"));return}m.value=!0,g.value=[];try{const C=await f.value.text();if(!C||C.trim().length===0){alert(i("csvFileIsEmpty")),m.value=!1;return}const h=C.split(` 7`).filter(a=>a.trim().length>0);if(h.length<2){alert(i("csvMustHaveHeaderAndData")),m.value=!1;return}const I=Fe(C);if(console.log("Parsed products:",I),console.log("Number of products parsed:",I.length),I.length===0){const a=Q(h[0]);console.log("CSV Headers:",a);const o=a.includes("title"),r=a.includes("cost"),U=a.includes("supplierCountryCode");let c=i("noValidProductsFound")+` 8 9`+i("possibleReasons")+`: 10`;if(o||(c+="- "+i("missingTitleColumn")+` 11`),r||(c+="- "+i("missingCostColumn")+` 12`),U||(c+="- "+i("missingSupplierCountryCodeColumn")+` 13`),h.length===1)c+="- "+i("noDataRows")+` 14`;else{if(h.length>1){const M=Q(h[1]);console.log("First data row:",M);const $={};a.forEach((ye,he)=>{$[ye]=M[he]}),console.log("First data row as object:",$),console.log("Title value:",$.title,"Is empty?",!$.title||!$.title.trim())}c+="- "+i("allRowsHaveEmptyTitle")+` 15`}c+=` 16`+i("requiredColumns")+": title, cost, supplierCountryCode",c+=` 17 18Found headers: `+a.join(", "),alert(c),m.value=!1;return}for(const a of I)try{console.log("Uploading product:",JSON.stringify(a,null,2));const{data:o}=await re.post("/product/save-product",a);g.value.push({success:o.success,title:a.title,message:o.success?i("success"):o.error})}catch(o){g.value.push({success:!1,title:a.title,message:((u=(n=o.response)==null?void 0:n.data)==null?void 0:u.error)||o.message})}T.value=!0}catch(C){console.error("Error uploading CSV:",C),alert(C.message||i("errorUploadingCSV"))}finally{m.value=!1}},H=()=>{f.value=null,g.value=[],T.value=!1},O=()=>{b.push({path:me,query:{hasCode1:"0"}})};return(n,u)=>{const C=ke("v-simple-table");return w(),z(L,{class:"bulk-add-workbench"},{default:l(()=>[e("div",De,[e("div",null,[e("div",Le,s(n.$t("productBulkAdd.csvUploadKicker")),1),e("h6",qe,s(n.$t("bulkAddProducts")),1),e("p",Qe,s(n.$t("productBulkAdd.description")),1)]),t(S,{variant:"outlined",color:"primary","prepend-icon":"mdi-download",onClick:N,size:"small"},{default:l(()=>[p(s(n.$t("downloadSample")),1)]),_:1})]),e("div",je,[e("div",He,[e("strong",null,s(n.$t("required")),1),u[2]||(u[2]=e("span",null,"title, cost",-1))]),e("div",Oe,[e("strong",null,s(n.$t("productBulkAdd.imagesTitle")),1),e("span",null,s(n.$t("productBulkAdd.imagesHint")),1)]),e("div",Je,[e("strong",null,s(n.$t("productBulkAdd.optionsTitle")),1),e("span",null,s(n.$t("productBulkAdd.optionsHint")),1)])]),t($e,{type:"info",variant:"tonal",density:"compact",class:"mb-4 csv-guide-alert"},{default:l(()=>[e("div",Ke,s(n.$t("csvFormatInstructions")),1),e("ul",_e,[e("li",null,s(n.$t("csvInstruction1")),1),e("li",null,s(n.$t("csvInstruction2")),1),e("li",null,s(n.$t("csvInstruction3")),1),e("li",null,s(n.$t("csvInstruction4")),1),e("li",null,s(n.$t("csvInstruction5")),1)])]),_:1}),T.value?Y("",!0):(w(),z(L,{key:0,class:Ce(["upload-panel mb-4",{"upload-panel--ready":f.value}])},{default:l(()=>[e("div",Ge,[t(pe,{size:"42",class:"upload-icon"},{default:l(()=>[t(P,{size:"24"},{default:l(()=>[p(s(f.value?"mdi-file-check-outline":"mdi-file-delimited-outline"),1)]),_:1})]),_:1}),e("div",We,[e("strong",null,s(v.value),1),e("span",null,s(A.value||n.$t("productBulkAdd.csvOnlyHint")),1)])]),t(Se,{modelValue:f.value,"onUpdate:modelValue":u[0]||(u[0]=h=>f.value=h),label:n.$t("selectCSVFile"),accept:".csv",variant:"outlined","prepend-inner-icon":"mdi-paperclip","prepe
18nd-icon":"","show-size":"",density:"comfortable",onChange:F},null,8,["modelValue","label"]),e("div",Ye,[t(S,{variant:"outlined",color:"secondary",onClick:u[1]||(u[1]=h=>ie(b).back())},{default:l(()=>[p(s(n.$t("cancel")),1)]),_:1}),t(S,{color:"primary",loading:m.value,onClick:j,disabled:!f.value,"prepend-icon":"mdi-upload"},{default:l(()=>[p(s(n.$t("upload")),1)]),_:1},8,["loading","disabled"])])]),_:1},8,["class"])),T.value?(w(),z(L,{key:1,class:"result-panel mb-4"},{default:l(()=>[e("div",Xe,[e("div",null,[e("div",Ze,s(n.$t("uploadResults")),1),e("h6",xe,s(n.$t("productBulkAdd.processedSummary",{count:g.value.length})),1)]),e("div",et,[t(D,{size:"small",color:"success",variant:"tonal"},{default:l(()=>[p(s(n.$t("productBulkAdd.successCount",{count:d.value})),1)]),_:1}),t(D,{size:"small",color:"error",variant:"tonal"},{default:l(()=>[p(s(n.$t("productBulkAdd.failedCount",{count:R.value})),1)]),_:1})])]),t(we,{class:"result-list"},{default:l(()=>[(w(!0),X(x,null,Z(g.value,(h,I)=>(w(),z(Te,{key:I,class:"result-list-item"},{prepend:l(()=>[t(P,{color:h.success?"success":"error"},{default:l(()=>[p(s(h.success?"mdi-check-circle":"mdi-alert-circle"),1)]),_:2},1032,["color"])]),default:l(()=>[t(Pe,null,{default:l(()=>[p(s(h.title),1)]),_:2},1024),t(Be,null,{default:l(()=>[p(s(h.message),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),e("div",tt,[t(S,{variant:"outlined",color:"primary",onClick:H},{default:l(()=>[p(s(n.$t("uploadAnother")),1)]),_:1}),t(S,{color:"primary",onClick:O},{default:l(()=>[p(s(n.$t("viewCollected")),1)]),_:1})])]),_:1})):Y("",!0),t(ve,{class:"csv-reference"},{default:l(()=>[t(fe,null,{default:l(()=>[t(be,null,{default:l(()=>[t(P,{class:"mr-2"},{default:l(()=>u[3]||(u[3]=[p("mdi-information-outline")])),_:1}),p(" "+s(n.$t("csvFormatReference")),1)]),_:1}),t(ge,null,{default:l(()=>[t(C,{dense:""},{default:l(()=>[e("thead",null,[e("tr",null,[e("th",null,s(n.$t("columnName")),1),e("th",null,s(n.$t("required")),1),e("th",null,s(n.$t("description")),1),e("th",null,s(n.$t("example")),1)])]),e("tbody",null,[e("tr",null,[u[4]||(u[4]=e("td",null,[e("code",null,"title")],-1)),e("td",null,[t(D,{size:"x-small",color:"error"},{default:l(()=>[p(s(n.$t("required")),1)]),_:1})]),e("td",null,s(n.$t("productTitleDesc")),1),u[5]||(u[5]=e("td",null,"Sample Product",-1))]),e("tr",null,[u[6]||(u[6]=e("td",null,[e("code",null,"brand")],-1)),e("td",null,s(n.$t("optional")),1),e("td",null,s(n.$t("brandDesc")),1
18),u[7]||(u[7]=e("td",null,"Nike",-1))]),e("tr",null,[u[8]||(u[8]=e("td",null,[e("code",null,"maker")],-1)),e("td",null,s(n.$t("optional")),1),e("td",null,s(n.$t("makerDesc")),1),u[9]||(u[9]=e("td",null,"Maker Inc",-1))]),e("tr",null,[u[10]||(u[10]=e("td",null,[e("code",null,"cost")],-1)),e("td",null,[t(D,{size:"x-small",color:"error"},{default:l(()=>[p(s(n.$t("required")),1)]),_:1})]),e("td",null,s(n.$t("costDesc")),1),u[11]||(u[11]=e("td",null,"10.99",-1))]),e("tr",null,[u[12]||(u[12]=e("td",null,[e("code",null,"imageUrls")],-1)),e("td",null,s(n.$t("optional")),1),e("td",null,s(n.$t("imageUrlsDesc")),1),u[13]||(u[13]=e("td",null,"url1.jpg|url2.jpg",-1))]),e("tr",null,[u[14]||(u[14]=e("td",null,[e("code",null,"supplierCountryCode")],-1)),e("td",null,[t(D,{size:"x-small",color:"error"},{default:l(()=>[p(s(n.$t("required")),1)]),_:1})]),e("td",null,s(n.$t("supplierCountryCodeDesc")),1),u[15]||(u[15]=e("td",null,"US, JP, CN (supplier country)",-1))]),e("tr",null,[u[16]||(u[16]=e("td",null,[e("code",null,"productUrl")],-1)),e("td",null,s(n.$t("optional")),1),e("td",null,s(n.$t("productUrlDesc")),1),u[17]||(u[17]=e("td",null,"https://www.amazon.com/dp/B00000000A",-1))]),e("tr",null,[u[18]||(u[18]=e("td",null,[e("code",null,"variantSkuCode")],-1)),e("td",null,s(n.$t("optional")),1),e("td",null,s(n.$t("variantSkuCodeDesc")),1),u[19]||(u[19]=e("td",null,"VAR001, SKU123",-1))])])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),ot=ce(at,[["__scopeId","data-v-4a246831"]]),st={class:"product-add-heading"},nt={class:"section-kicker"},ut={class:"text-h5 font-weight-semibold text-truncate"},it={class:"product-add-description text-body-2 text-medium-emphasis"},dt={class:"product-add-current-mode"},rt={class:"form-section-title-main"},mt={class:"form-section-title-sub"},ct={class:"form-section-title-main"},pt={class:"variant-title"},vt={class:"attribute-toolbar"},ft={class:"text-subtitle-1 font-weight-semibold"},bt={class:"action-bar"},gt=ne({__name:"ProductAdd",setup(V){const{t:i}=ue(),b=Ue(),f=de(),m=B(b.query.tab==="excel"?"excel":"single"),g=a=>a==="excel"?"excel":"single",T=a=>{const o={...b.query};a==="single"?delete o.tab:o.tab="excel",(b.query.tab==="excel"?"excel":"single")!==a&&f.replace({query:o}).catch(()=>{})},v=a=>{const o=a==="excel"?"excel":"single";m.value=o,T(o)},A=E(()=>m.value==="single"?{label:i("productAddManualInput"),icon:"mdi-pencil-outline",title:i("productAddManualTitle"),detail:i("productAddManualDetail")}:{label:i("productAddExcelInput"),icon:"mdi-file-upload-outline",title:i("productAddExcelTitle"),detail:i("productAddExcelDetail")});Ae(()=>b.query.tab,a=>{const o=g(a);m.value!==o&&(m.value=o)},{immediate:!0});const d=B({title:"",description:"",brand:"",maker:"",cost:null,domesticShippingCost:null,img:"",imgs:[],supplierCode:"MNUL",countryCode:"KR",isAdultProduct:!1,tags:"",weight:null,stockQty:1,variants:[{title:"",cost:null,stockQty:1,img:"",imgs:[],attributes:[]}]}),R=B(!1),F=B(""),N=B([""]),j=[{value:"KR",text:"ð°ð· Korea"},{value:"US",text:"ðºð¸ United States"},{value:"JP",text:"ð¯ðµ Japan"},{value:"CN",text:"ð¨ð³ China"}],H=E(()=>[{value:"MNUL",text:i("productAddManualInput")},{value:"AMUS",text:"Amazon US"},{value:"AMJP",text:"Amazon JP"},{value:"COUP",text:"Coupang"},{value:"SMST",text:"Smart Store"},{value:"1688",text:"Alibaba"},{value:"TAOB",text:"Taobao"}]),O=()=>{d.value.variants.push({title:"",cost:null,stockQty:1,img:"",imgs:[],attributes:[]}),N.value.push("")},n=a=>{d.value.variants.length>1&&(d.value.variants.splice(a,1),N.value.splice(a,1))},u=a=>{d.value.variants[a].attributes.push({name:"",value:"",img:""})},C=(a,o)=>{d.value.variants[a].attributes.splice(o,1)},h=a=>a.split(` 19`).map(o=>o.trim()).filter(o=>o.length>0),I=async()=>{var a,o;if(!d.value.title||!d.value.cost){alert(i("pleaseFillRequired"));return}R.value=!0;try{const r=h(F.value);
19d.value.imgs=r,d.value.img=r[0]||"",d.value.variants.forEach((c,M)=>{const $=h(N.value[M]||"");c.imgs=$,c.img=$[0]||d.value.img,c.title||(c.title=d.value.title),c.cost||(c.cost=d.value.cost)});const{data:U}=await re.post("/product/save-product",d.value);U.success?(alert(i("productAddedSuccessfully")),f.push({path:me,query:{hasCode1:"0"}})):alert(U.error||i("errorAddingProduct"))}catch(r){console.error("Error adding product:",r),alert(((o=(a=r.response)==null?void 0:a.data)==null?void 0:o.error)||r.message||i("errorAddingProduct"))}finally{R.value=!1}};return(a,o)=>(w(),z(J,{elevation:"0",class:"inside-left-sidebar product-add-shell"},{default:l(()=>[t(K,{class:"pa-0"},{default:l(()=>[t(L,{class:"product-add-surface pa-4"},{default:l(()=>[t(L,{class:"product-add-header mb-3",color:"transparent"},{default:l(()=>[e("div",st,[t(pe,{size:"38",class:"product-add-mode-icon"},{default:l(()=>[t(P,{size:"22"},{default:l(()=>[p(s(A.value.icon),1)]),_:1})]),_:1}),e("div",null,[e("div",nt,s(a.$t("productAddKicker")),1),e("h5",ut,s(a.$t("addProduct")),1),e("p",it,s(A.value.title),1)])]),e("div",dt,[e("span",null,s(a.$t("productAddCurrentMode")),1),e("strong",null,s(A.value.label),1)])]),_:1}),t(Me,{modelValue:m.value,"onUpdate:modelValue":[o[0]||(o[0]=r=>m.value=r),v],class:"mode-switcher-tabs mb-4",grow:""},{default:l(()=>[t(ae,{value:"single"},{default:l(()=>[t(P,{start:"",size:"18"},{default:l(()=>o[15]||(o[15]=[p("mdi-pencil-outline")])),_:1}),p(" "+s(a.$t("productAddManualInput")),1)]),_:1}),t(ae,{value:"excel"},{default:l(()=>[t(P,{start:"",size:"18"},{default:l(()=>o[16]||(o[16]=[p("mdi-file-upload-outline")])),_:1}),p(" "+s(a.$t("productAddExcelInput")),1)]),_:1})]),_:1},8,["modelValue"]),t(Ee,{modelValue:m.value,"onUpdate:modelValue":o[14]||(o[14]=r=>m.value=r)},{default:l(()=>[t(oe,{value:"single"},{default:l(()=>[t(Ne,{onSubmit:ee(I,["prevent"])},{default:l(()=>[t(J,{class:"form-section mb-4",variant:"outlined",elevation:"0"},{default:l(()=>[t(te,{class:"form-section-title"},{default:l(()=>[e("span",rt,[t(P,{size:"18"},{default:l(()=>o[17]||(o[17]=[p("mdi-package-variant-closed")])),_:1}),p(" "+s(a.$t("productInformation")),1)]),e("span",mt,s(a.$t("productInformationHelp")),1)]),_:1}),t(K,{class:"form-section-body"},{default:l(()=>[t(_,{dense:""},{default:l(()=>[t(y,{cols:"12",md:"6"},{default:l(()=>[t(k,{modelValue:d.value.title,"onUpdate:modelValue":o[1]||(o[1]=r=>d.value.title=r),label:a.$t("productTitle")+" *",variant:"outlined",density:"comfortable",required:""},null,8,["modelValue","label"])]),_:1}),t(y,{cols:"12",md:"6"},{default:l(()=>[t(k,{modelValue:d.value.brand,"onUpdate:modelValue":o[2]||(o[2]=r=>d.value.brand=r),label:a.$t("brand"),variant:"outlined",density:"comfortable"},null,8,["modelValue","label"])]),_:1}),t(y,{cols:"12",md:"6"},{default:l(()=>[t(k,{modelValue:d.value.maker,"onUpdate:modelValue":o[3]||(o[3]=r=>d.value.maker=r),label:a.$t("maker"),variant:"outlined",density:"comfortable"},null,8,["modelValue","label"])]),_:1}),t(y,{cols:"12",md:"6"},{default:l(()=>[t(k,{modelValue:d.value.cost,"onUpdate:modelValue":o[4]||(o[4]=r=>d.value.cost=r),modelModifiers:{number:!0},label:a.$t("cost")+" *",type:"number",variant:"outlined",density:"comfortable",required:""},null,8,["modelValue","label"])]),_:1}),t(y,{cols:"12",md:"6"},{default:l(()=>[t(k,{modelValue:d.value.domesticShippingCost,"onUpdate:modelValue":o[5]||(o[5]=r=>d.value.domesticShippingCost=r),modelModifiers:{number:!0},label:a.$t("domesticShippingCost"),type:"number",variant:"outlined",density:"comfortable"},null,8,["modelValue","label"])]),_:1}),t(y,{cols:"12",md:"6"},{default:l(()=>[t(k,{modelValue:d.value.weight,"onUpdate:modelValue":o[6]||(o[6]=r=>d.value.weight=r),modelModifiers:{number:!0},label:a.$t("weight")+" (kg)",type:"number",step:"0.01",variant:"outlined",density:"comfortable"},null,8,["modelValue","label"])]),_:1}),t(y,{cols:"12",md:"6"},{default:l(()=>[t(le,{modelValue:d.value.countryCode,"onUpdate:modelValue":o[7]||(o[7]=r=>d.value.countryCode=r),items:j,"item-title":"text","item-value":"value",label:a.$t("country"),variant:"outlined",density:"comfortable"},null,8,["modelValue","label"])]),_:1}),t(y,{cols:"12",md:"6"},{default:l(()=>[t(le,{modelValue:d.value.supplierCode,"onUpdate:modelValue":o[8]||(o[8]=r=>d.value.supplierCode=r),items:H.value,"item-title":"text","item-value":"value",label:a.$t("platform"),variant:"outlined",density:"comfortable"},null,8,["modelValue","items","label"])]),_:1}),t(y,{cols:"12"},{default:l(()=>[t(G,{modelValue:d.value.description,"onUpdate:modelValue":o[9]||(o[9]=r=>d.value.description=r),label:a.$t("description"),variant:"outlined",rows:"3"},null,8,["modelValue","label"])]),_:1}),t(y,{cols:"12"},{default:l(()=>[t(G,{modelValue:F.value,"onUpdate:modelValue":o[10]||(o[10]=r=>F.value=r),label:a.$t("imageUrls")+" ("+a.$t("onePerLine")+")",variant:"outlined",rows:"3",hint:a.$t("enterImageUrlsOnePerLine"),"persistent-hint":""},null,8,["modelValue","label","hint"])]),_:1}),t(y,{cols:"12",md:"6"},{default:l(()=>[t(k,{modelValue:d.value.tags,"onUpdate:modelValue":o[11]||(o[11]=r=>d.value.tags=r),label:a.$t("tags"),variant:"outlined",density:"comfortable",hint:a.$t("commaSeparated"),"persistent-hint":""},null,8,["modelValue","label","hint"])]),_:1}),t(y,{cols:"12",md:"6"},{default:l(()=>[t(Ie,{modelValue:d.value.isAdultProduct,"onUpdate:modelValue":o[12]||(o[12]=r=>d.value.isAdultProduct=r),label:a.$t("isAdultProduct"),density:"comfortable"},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1})]),_:1}),t(J,{class:"form-section mb-4",variant:"outlined",elevation:"0"},{default:l(()=>[t(te,{class:"form-section-title form-section-title--with-action"},{default:l(()=>[e("span",ct,[t(P,{size:"18"},{default:l(()=>o[18]||(o[18]=[p("mdi-format-list-bulleted-type")])),_:1}),p(" "+s(a.$t("productVariants")),1)]),t(S,{size:"small",color:"primary",variant:"tonal",onClick:O,"prepe
19nd-icon":"mdi-plus"},{default:l(()=>[p(s(a.$t("addVariant")),1)]),_:1})]),_:1}),t(K,{class:"form-section-body"},{default:l(()=>[t(ve,{class:"variant-panels"},{default:l(()=>[(w(!0),X(x,null,Z(d.value.variants,(r,U)=>(w(),z(fe,{key:U,class:"variant-panel"},{default:l(()=>[t(be,null,{actions:l(()=>[d.value.variants.length>1?(w(),z(S,{key:0,size:"small",color:"error",variant:"text",icon:"mdi-delete",onClick:ee(c=>n(U),["stop"])},null,8,["onClick"])):Y("",!0)]),default:l(()=>[e("span",pt,[t(P,{size:"16"},{default:l(()=>o[19]||(o[19]=[p("mdi-tag-outline")])),_:1}),p(" "+s(a.$t("variant"))+" "+s(U+1),1)])]),_:2},1024),t(ge,null,{default:l(()=>[t(_,{dense:""},{default:l(()=>[t(y,{cols:"12",md:"6"},{default:l(()=>[t(k,{modelValue:r.title,"onUpdate:modelValue":c=>r.title=c,label:a.$t("variantTitle"),variant:"outlined",density:"comfortable",hint:a.$t("leaveEmptyToUseParentTitle"),"persistent-hint":""},null,8,["modelValue","onUpdate:modelValue","label","hint"])]),_:2},1024),t(y,{cols:"12",md:"3"},{default:l(()=>[t(k,{modelValue:r.cost,"onUpdate:modelValue":c=>r.cost=c,modelModifiers:{number:!0},label:a.$t("variantCost"),type:"number",variant:"outlined",density:"comfortable",hint:a.$t("leaveEmptyToUseParentCost"),"persistent-hint":""},null,8,["modelValue","onUpdate:modelValue","label","hint"])]),_:2},1024),t(y,{cols:"12",md:"3"},{default:l(()=>[t(k,{modelValue:r.stockQty,"onUpdate:modelValue":c=>r.stockQty=c,modelModifiers:{number:!0},label:a.$t("stockQuantity"),type:"number",variant:"outlined",density:"comfortable"},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024),t(y,{cols:"12"},{default:l(()=>[t(G,{modelValue:N.value[U],"onUpdate:modelValue":c=>N.value[U]=c,label:a.$t("variantImageUrls")+" ("+a.$t("onePerLine")+")",variant:"outlined",rows:"2",hint:a.$t("leaveEmptyToUseParentImages"),"persistent-hint":""},null,8,["modelValue","onUpdate:modelValue","label","hint"])]),_:2},1024),t(y,{cols:"12"},{default:l(()=>[t(ze,{class:"my-2"}),e("div",vt,[e("h6",ft,s(a.$t("attributes")),1),t(S,{size:"small",color:"primary",variant:"text",onClick:c=>u(U),"prepend-icon":"mdi-plus"},{default:l(()=>[p(s(a.$t("addAttribute")),1)]),_:2},1032,["onClick"])]),(w(!0),X(x,null,Z(r.attributes,(c,M)=>(w(),z(_,{key:M,dense:"",class:"mb-2"},{default:l(()=>[t(y,{cols:"12",md:"4"},{default:l(()=>[t(k,{modelValue:c.name,"onUpdate:modelValue":$=>c.name=$,label:a.$t("attributeName"),variant:"outlined",density:"compact",placeholder:a.$t("exampleColor")},null,8,["modelValue","onUpdate:modelValue","label","placeholder"])]),_:2},1024),t(y,{cols:"12",md:"4"},{default:l(()=>[t(k,{modelValue:c.value,"onUpdate:modelValue":$=>c.value=$,label:a.$t("attributeValue"),variant:"outlined",density:"compact",placeholder:a.$t("exampleRed")},null,8,["modelValue","onUpdate:modelValue","label","placeholder"])]),_:2},1024),t(y,{cols:"12",md:"3"},{default:l(()=>[t(k,{modelValue:c.img,"onUpdate:modelValue":$=>c.img=$,label:a.$t("attributeImage"),variant:"outlined",density:"compact"},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024),t(y,{cols:"12",md:"1",class:"d-flex align-center"},{default:l(()=>[t(S,{size:"small",color:"error",variant:"text",icon:"mdi-delete",onClick:$=>C(U,M)},null,8,["onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}),e("div",bt,[t(S,{variant:"outlined",color:"secondary",rounded:"lg",onClick:o[13]||(o[13]=r=>ie(f).back())},{default:l(()=>[p(s(a.$t("cancel")),1)]),_:1}),t(S,{type:"submit",color:"primary",rounded:"lg",loading:R.value},{default:l(()=>[p(s(a.$t("addProduct")),1)]),_:1},8,["loading"])])]),_:1})]),_:1}),t(oe,{value:"excel"},{default:l(()=>[t(ot)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}))}}),jt=ce(gt,[["__scopeId","data-v-12560202"]]);export{jt 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.