PageSourceSearch

https://www.combak.co/_next/static/chunks/pages/backoffice/seo/manage-models-9af583562533c240.js

js combak.co collected 2026-10-05 01:35:57 UTC 34,868 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6154],{13646:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/backoffice/seo/manage-models",function(){return i(79377)}])},22448:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});function r(e,t){if(!e)throw Error("Invariant failed")}},79377:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>et});var r=i(94458),n=i(68658),o=i(65238),s=i.n(o),a=i(11457),l=i(46390),d=i(95140),c=i(42293),h=i(76472),p=i(23451),m=i(83440),u=i(29661),g=i(29566),f=i(76897),x=i(50114),y=i(91601),j=i(86094),b=i(99556),A=i(51331),v=i(7737),S=i(38413),w=i(32631),k=i(8286),C=i(16281),z=i(39964),I=i(46155),D=i(85291),T=i(82850),M=i(37648),O=i(58771),P=i(26075),E=i(29518),N=i(98115),R=i(42903),B=i(57069),L=i(34356),F=i(95187),W=i(70750),H=i(33398),G=i(89043),_=i(46089),J=i(21091),q=i(49435),Y=i(4146),V=i(15488),X=i(90532);let{Title:K,Text:Q}=d.A,{TextArea:U}=c.A;function $(e,t){let i=e,r=e.toLowerCase(),n=t.toLowerCase();["google","samsung","xiaomi","motorola","huawei"].includes(n)&&!r.includes(n)&&(i="".concat(t," ").concat(e));let o="".concat(i," reconditionn\xe9 | Comparez toutes les offres");return o.length+10<=60?"".concat(o," - Combak"):o}function Z(e,t){let i=e,r=e.toLowerCase(),n=t.toLowerCase();["google","samsung","xiaomi","motorola","huawei"].includes(n)&&!r.includes(n)&&(i="".concat(t," ").concat(e));let o=["a","e","i","o","u","y"].includes(i[0].toLowerCase())?"d'":"de ";return"Les Meilleures offres ".concat(o).concat(i," reconditionn\xe9 sur Combak. Comparez toutes les offres ").concat(o).concat(i," reconditionn\xe9 au m\xeame endroit.")}function ee(){var e;
1let t=(0,Y.l)(),[i,o]=(0,n.useState)(""),[d,ee]=(0,n.useState)([]),[et,ei]=(0,n.useState)(!1),[er,en]=(0,n.useState)("standard"),[eo,es]=(0,n.useState)("all"),[ea,el]=(0,n.useState)(null),[ed,ec]=(0,n.useState)(""),[eh,ep]=(0,n.useState)(""),[em,eu]=(0,n.useState)(""),[eg,ef]=(0,n.useState)(""),[ex,ey]=(0,n.useState)(!0),[ej,eb]=(0,n.useState)(!0),[eA,ev]=(0,n.useState)([]),[eS,ew]=(0,n.useState)([]),[ek,eC]=(0,n.useState)([]),[ez,eI]=(0,n.useState)({}),[eD,eT]=(0,n.useState)(!1),[eM,eO]=(0,n.useState)(!1),[eP,eE]=(0,n.useState)(""),[eN,eR]=(0,n.useState)([]),[eB,eL]=(0,n.useState)(!1),[eF,eW]=(0,n.useState)([]),[eH,eG]=(0,n.useState)("description"),[e_,eJ]=(0,n.useState)(!1),[eq,eY]=(0,n.useState)(!1),[eV,eX]=(0,n.useState)(null),[eK,eQ]=(0,n.useState)(!1),eU=ea?$(ea.name,ea.brand):"",e$=ea?Z(ea.name,ea.brand):"",eZ=(0,n.useCallback)(async()=>{if("standard"!==er||i.trim()){if("not-in-sitemap"===er){ei(!0);try{let e=await fetch("/api/backoffice/seo/search-models-not-in-sitemap",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(!e.ok)throw Error("Erreur lors de la recherche");let t=await e.json();ee(t.models||[])}catch(e){eX(e.message),ee([])}finally{ei(!1)}return}if("no-description"===er||"no-additional-description"===er){ei(!0),eY(!1),eX(null);try{let e="no-description"===er?"description":"additionalDescription",t=await fetch("/api/backoffice/seo/search-models-missing-description",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({field:e})});if(!t.ok)throw Error("Erreur lors de la recherche");let i=await t.json();ee(i.models||[])}catch(e){eX(e.message),ee([])}finally{ei(!1)}return}ei(!0),eY(!1),eX(null);try{let e="too-long"===er?"/api/backoffice/seo/search-models-too-long":"/api/backoffice/seo/search-models",t=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:i})});if(!t.ok)throw Error("Erreur lors de la recherche");let r=await t.json();ee(r.models||[])}catch(e){eX(e.message),ee([])}finally{ei(!1)}}},[i,er]),e0=async e=>{eO(!0);try{var t,i,r,n;let o=await fetch("/api/backoffice/seo/get-similar-models?modelId=".concat(e));if(!o.ok)throw Error("Erreur lors du chargement des produits similaires");let s=await o.json();ev(s.customSimilarModels||[]),ew(s.automaticSimilarModels||[]),eC(s.automaticPasses||[]),eI({modelFamily:null==(t=s.model)?void 0:t.modelFamily,modelGeneration:null==(i=s.model)?void 0:i.modelGeneration,modelVariant:null==(r=s.model)?void 0:r.modelVariant,releaseYear:null==(n=s.model)?void 0:n.releaseYear}),eT(s.isCustom),eW((s.customSimilarModels||[]).map(e=>e.objectID))}catch(e){console.error("Error loading similar models:",e)}finally{eO(!1)}},e1=e=>{var t,i;el(e),ec(e.description||""),ep(e.additionalDescription||""),eu(e.customMetaTitle||""),ef(e.customMetaDescription||""),ey(null==(t=e.includeInSitemapForIndexation)||t),eb(null==(i=e.isSearchable)||i),eY(!1),eX(null),eE(""),eR([]),e0(e.objectID)},e4=e=>{"title"===e?eu(""):ef("")},e6=(0,n.useCallback)(async()=>{if(eP.trim()){eL(!0);try{let e=await fetch("/api/backoffice/seo/search-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:eP})});if(!e.ok)throw Error("Erreur lors de la recherche");let t=((await e.json()).models||[]).filter(e=>e.objectID!==(null==ea?void 0:ea.objectID)&&!eA.some(t=>t.objectID===e.objectID));eR(t)}catch(e){console.error(e)}finally{eL(!1)}}},[eP,ea,eA]),e8=async()=>{if(ea){eJ(!0),eY(!1),eX(null);try{let e=await fetch("/api/backoffice/seo/update-model",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({objectID:ea.objectID,description:ed,additionalDescription:eh,customMetaTitle:em||null,customMetaDescription:eg||null,includeInSitemapForIndexation:ex,isSearchable:ej})});if(!e.ok){let t=await e.json();throw Error(t.error||"Erreur lors de la sauvegarde")}if((()=>{let e=eA.map(e=>e.objectID);return e.length!==eF.length||e.some((e,t)=>e!==eF[t])})()){let e=eD&&eA.length>0?eA.map(e=>e.objectID):null,t=await fetch("/api/backoffice/seo/update-similar-models",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({modelId:ea.objectID,customSimilarModelIds:e})});if(!t.ok){let e=await t.json();throw Error(e.error||"Erreur lors de la sauvegarde des produits similaires")}eW(e||[])}eY(!0),h.Ay.success("Mod\xe8le mis \xe0 jour avec succ\xe8s"),ee(e=>e.map(e=>e.objectID===ea.objectID?{...e,description:ed,additionalDescription:eh,hasDescription:!!ed,hasAdditionalDescription:!!eh,customMetaTitle:em||null,customMetaDescription:eg||null,includeInSitemapForIndexation:ex,isSearchable:ej}:e)),el(e=>e?{...e,description:ed,additionalDescription:eh,customMetaTitle:em||null,customMetaDescription:eg||null,includeInSitemapForIndexation:ex,isSearchable:ej}:null)}catch(e){eX(e.message),h.Ay.error(e.message)}finally{eJ(!1)}}},e5=async()=>{var e;if(!ea)return;let t=(0,l.dP)(ea.category),i=(null==(e=ea.brand)?void 0:e.toLowerCase())||"",n=(0,l.j8)(t),o="".concat(n,"/").concat(i);p.A.confirm({title:"Supprimer ce mod\xe8le ?",content:(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{children:(0,r.jsx)("strong",{children:ea.name})}),(0,r.jsx)("p",{children:"Cette action va :"}),(0,r.jsxs)("ul",{children:[(0,r.jsx)("li",{children:"Supprimer le mod\xe8le de Typesense"}),(0,r.jsxs)("li",{children:["Cr\xe9er une redirection 301 vers ",(0,r.jsx)("code",{children:o})]}),(0,r.jsx)("li",{children:"Retirer les liens vers ce mod\xe8le dans les descriptions des autres mod\xe8les"})]}),(0,r.jsx)("p",{style:{color:"#ff4d4f"},children:"Cette action est irr\xe9versible !"})]}),okText:"Supprimer",okType:"danger",cancelText:"Annuler",onOk:async()=>{eQ(!0);try{let e=await fetch("/api/backoffice/seo/delete-model",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({objectID:ea.objectID})}
1),t=await e.json();if(!e.ok)throw Error(t.error||"Erreur lors de la suppression");let r=t.productPagePath||"".concat(n,"/").concat(i,"/").concat(ea.name.toLowerCase().replace(/\s+/g,"-"),"--").concat(ea.objectID);await fetch("/api/backoffice/seo/redirections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:r,destination:o,statusCode:301,type:"product",reason:"Mod\xe8le supprim\xe9: ".concat(ea.name)})});let s=await fetch("/api/backoffice/seo/cleanup-description-links",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({objectID:ea.objectID})});if(s.ok){let e=await s.json();e.cleaned>0?h.Ay.success("Mod\xe8le supprim\xe9, redirection cr\xe9\xe9e, et ".concat(e.cleaned," description(s) nettoy\xe9e(s)")):h.Ay.success("Mod\xe8le supprim\xe9 et redirection cr\xe9\xe9e vers ".concat(o))}else h.Ay.success("Mod\xe8le supprim\xe9 et redirection cr\xe9\xe9e vers ".concat(o)),h.Ay.warning("Le nettoyage des liens dans les descriptions a \xe9chou\xe9");ee(e=>e.filter(e=>e.objectID!==ea.objectID)),el(null)}catch(e){h.Ay.error(e.message),eX(e.message)}finally{eQ(!1)}}})},e2=em.length||eU.length,e9=eg.length||e$.length,e3=em.length>0,e7=eg.length>0,te=em||eU,tt=eg||e$,ti=ea?(0,l.dP)(ea.category):"smartphone",tr="not-in-sitemap"===er&&"all"!==eo?d.filter(e=>"with"===eo?e.hasRedirect:!e.hasRedirect):d,tn=[{title:"Mod\xe8le",key:"model",render:(e,t)=>(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[t.imageSrc&&(0,r.jsx)("img",{src:t.imageSrc,alt:t.name,style:{width:40,height:40,objectFit:"contain",borderRadius:4}}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Q,{strong:!0,children:t.name}),(0,r.jsx)("br",{}),(0,r.jsx)(Q,{type:"secondary",style:{fontSize:12},children:t.brand})]})]})},{title:"Cat\xe9gorie",dataIndex:"category",key:"category",render:e=>(0,r.jsx)(m.A,{children:e})},{title:"Offres",dataIndex:"nbOffers",key:"nbOffers",render:e=>e||0,width:70},{title:"Description",key:"desc",render:(e,t)=>(0,r.jsx)(m.A,{color:t.hasDescription?"green":"default",children:t.hasDescription?"Oui":"Non"}),width:90},..."no-description"===er||"no-additional-description"===er?[{title:"Add Desc",key:"addDesc",render:(e,t)=>(0,r.jsx)(m.A,{color:t.hasAdditionalDescription?"green":"default",children:t.hasAdditionalDescription?"Oui":"Non"}),width:90}]:[],{title:"Meta Title",key:"metaTitle",render:(e,t)=>{let i=t.customMetaTitle?t.customMetaTitle.length:$(t.name,t.brand).length;return(0,r.jsxs)(u.A,{size:4,children:[(0,r.jsx)(m.A,{color:t.customMetaTitle?"blue":"default",style:{fontSize:11},children:t.customMetaTitle?"Custom":"Auto"}),(0,r.jsx)(m.A,{color:i>60?"red":"green",style:{fontSize:11},children:i})]})},width:120},{title:"Meta Desc",key:"metaDesc",render:(e,t)=>{let i=t.customMetaDescription?t.customMetaDescription.length:Z(t.name,t.brand).length;return(0,r.jsxs)(u.A,{size:4,children:[(0,r.jsx)(m.A,{color:t.customMetaDescription?"blue":"default",style:{fontSize:11},children:t.customMetaDescription?"Custom":"Auto"}),(0,r.jsx)(m.A,{color:i>160?"red":"green",style:{fontSize:11},children:i})]})},width:120},{title:"Sitemap",key:"sitemap",render:(e,t)=>(0,r.jsx)(m.A,{color:!1!==t.includeInSitemapForIndexation?"blue":"default",children:!1!==t.includeInSitemapForIndexation?"Oui":"Non"}),width:70},{title:"Searchable",key:"searchable",render:(e,t)=>(0,r.jsx)(m.A,{color:!1!==t.isSearchable?"green":"default",children:!1!==t.isSearchable?"Oui":"Non"}),width:80},..."not-in-sitemap"===er?[{title:"Redirection",key:"redirect",render:(e,t)=>(0,r.jsx)(m.A,{color:t.hasRedirect?"green":"red",children:t.hasRedirect?"301 ✓":"Aucune"}),width:100}]:[],{title:"Actions",key:"actions",render:(e,t)=>(0,r.jsxs)(u.A,{children:[(0,r.jsx)(g.Ay,{type:"primary",size:"small",onClick:()=>e1(t),children:"\xc9diter"}),(0,r.jsx)(g.Ay,{type:"text",size:"small",icon:(0,r.jsx)(I.A,{size:14}),onClick:()=>{var e;let i=(0,l.dP)(t.category),r=(0,l.j8)(i);window.open("".concat(r,"/").concat(null==(e=t.brand)?void 0:e.toLowerCase(),"/").concat(t.name.toLowerCase().replace(/\s+/g,"-"),"--").concat(t.objectID),"_blank")}})]}),width:130}];return(0,r.jsxs)(a.U,{children:[(0,r.jsx)(s(),{children:(0,r.jsx)("title",{children:"Gestion Mod\xe8les | Backoffice"})}),(0,r.jsx)("div",{style:{padding:24},children:(0,r.jsxs)(u.A,{direction:"vertical",size:"large",style:{width:"100%"},children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(K,{level:2,style:{margin:0,display:"flex",alignItems:"center",gap:8},children:[(0,r.jsx)(D.A,{size:28}),"Gestion des Mod\xe8les"]}),(0,r.jsx)(Q,{type:"secondary",children:"Descriptions, meta SEO, produits similaires, param\xe8tres d'indexation, suppression"})]}),eV&&(0,r.jsx)(f.A,{message:"Erreur",description:eV,type:"error",showIcon:!0,closable:!0,onClose:()=>eX(null)}),eq&&(0,r.jsx)(f.A,{message:"Succ\xe8s",description:"Les modifications ont \xe9t\xe9 enregistr\xe9es",type:"success",showIcon:!0,closable:!0,onClose:()=>eY(!1)}),(0,r.jsx)(x.A,{children:(0,r.jsxs)(u.A,{direction:"vertical",style:{width:"100%"},size:"middle",children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:8},children:[(0,r.jsx)(Q,{strong:!0,children:"Rechercher un mod\xe8le"}),(0,r.jsxs)(u.A,{wrap:!0,children:[(0,r.jsx)(g.Ay,{size:"small",type:"standard"===er?"primary":"default",onClick:()=>{en("standard"),ee([]),es("all")},children:"Recherche standard"}),(0,r.jsx)(g.Ay,{size:"small",type:"too-long"===er?"primary":"default",onClick:()=>{en("too-long"),o("")},children:"Metas trop longues"}),(0,r.jsx)(g.Ay,{size:"small",type:"not-in-sitemap"===er?"primary":"default",style:"not-in-sitemap"===er?{background:"#ff4d4f",borderColor:"#ff4d4f"}:{},onClick:()=>{en("not-in-sitemap"),o("")},children:"Hors sitemap"}),(0,r.jsx)(g.Ay,{size:"small",type:"no-description"===er?"primary":"default",onClick:()=>{en("no-description"),o(""),ee([])},children:"Sans description"}),(0,r.jsx)(g.Ay,{size:"small",type:"no-additional-description"===er?"primary":"default",onClick:()=>{en("no-additional-description"),o(""),ee([])},children:"Sans desc. add."})]})]}),"standard"===er?(0,r.jsxs)(u.A,{wrap:!0,style:{width:"100%"},children:[(0,r.jsx)(c.A,{placeholder:"Rechercher un mod\xe8le (nom, marque, ID)...",value:i,onChange:e=>o(e.target.value),onPressEnter:eZ,prefix:(0,r.jsx)(T.A,{size:16}),style:{width:"100%",maxWidth:400}}),(0,r.jsx)(g.Ay,{type:"primary",onClick:eZ,loading:et,children:"Rechercher"})]}):"too-long"===er?(0,r.jsx)(f.A,{message:"Mode : Metas trop longues",description:"Affiche tous les mod\xe8les avec meta title > 60 caract\xe8res ou meta description > 160 caract\xe8res",type:"warning",showIcon:!0,action:(0,r.jsx)(g.Ay,{size:"small",type:"primary",onClick:eZ,loading:et,children:"Charger"})}):"no-description"===er?(0,r.jsx)(f.A,{message:"Mode : Sans description",description:"Mod\xe8les avec au moins 1 offre et sans description (hasDescription:false), tri\xe9s par nb d'offres d\xe9croissant",type:"info",showIcon:!0,action:(0,r.jsx)(g.Ay,{size:"small",type:"primary",onClick:eZ,loading:et,children:"Charger"})}):"no-additional-description"===er?(0,r.jsx)(f.A,{message:"Mode : Sans description additionnelle",description:"Mod\xe8les avec au moins 1 offre et sans description additionnelle (hasAdditionalDescription:false), tri\xe9s par nb d'offres d\xe9croissant",type:"info",showIcon:!0,action:(0,r.jsx)(g.Ay,{size:"small",type:"primary",onClick:eZ,loading:et,children:"Charger"})}):(0,r.jsxs)("div",{children:[(0,r.jsx)(f.A,{message:"Mode : Hors sitemap",description:"Mod\xe8les exclus du sitemap (includeInSitemapForIndexation = false)",type:"error",showIcon:!0,action:(0,r.jsx)(g.Ay,{size:"small",type:"primary",danger:!0,onClick:eZ,loading:et,children:"Charger"})}),d.length>0&&(0,r.jsx)("div",{style:{marginTop:12},children:(0,r.jsx)(y.A,{value:eo,onChange:e=>es(e),options:[{label:"Tous (".concat(d.length,")"),value:"all"},{label:"Avec redirection (".concat(d.filter(e=>e.hasRedirect).length,")"),value:"with"},{label:"Sans redirection (".concat(d.filter(e=>!e.hasRedirect).length,")"),value:"without"}]})})]})]})}),tr.length>0&&(0,r.jsx)(x.A,{title:"".concat(tr.length," r\xe9sultat(s)"),children:(0,r.jsx)(q.J,{dataSource:tr,columns:tn,rowKey:"objectID",pagination:{defaultPageSize:10,showSizeChanger:!0,pageSizeOptions:["10","20","50"]},size:"small",scroll:{x:900}})}),ea&&(0,r.jsxs)(x.A,{title:(0,r.jsxs)(u.A,{children:[(0,r.jsx)(M.A,{size:18}),"\xc9dition: ",ea.name,(0,r.jsx)(m.A,{children:ea.objectID})]}),extra:(0,r.jsxs)(u.A,{children:[(0,r.jsx)(g.Ay,{danger:!0,icon:(0,r.jsx)(O.A,{size:16}),onClick:e5,loading:eK,children:"Supprimer"}),(0,r.jsx)(g.Ay,{type:"primary",icon:(0,r.jsx)(P.A,{size:16}),onClick:e8,loading:e_,children:"Enregistrer"})]}),children:[(0,r.jsxs)("div",{style:{marginBottom:24,padding:16,background:"#f5f5f5",borderRadius:8},children:[(0,r.jsx)(K,{level:5,style:{marginTop:0},children:"Param\xe8tres d'indexation"}),(0,r.jsxs)(u.A,{size:"large",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(Q,{children:"Inclure dans le sitemap"}),(0,r.jsx)("br",{}
1),(0,r.jsx)(j.A,{checked:ex,onChange:ey,checkedChildren:"Oui",unCheckedChildren:"Non"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Q,{children:"Visible dans la recherche"}),(0,r.jsx)("br",{}),(0,r.jsx)(j.A,{checked:ej,onChange:eb,checkedChildren:"Oui",unCheckedChildren:"Non"})]})]})]}),(0,r.jsx)(b.A,{}),(0,r.jsx)(A.A,{activeKey:eH,onChange:eG,items:[{key:"description",label:(0,r.jsxs)(u.A,{children:[(0,r.jsx)(M.A,{size:14}),"Description",ed&&(0,r.jsx)(m.A,{color:"green",style:{marginLeft:4},children:"✓"})]}),children:(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:t?"1fr":"1fr 1fr",gap:16},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(Q,{strong:!0,children:"\xc9dition (Markdown)"}),(0,r.jsx)(_.c,{value:ed,onChange:ec,rows:15,style:{marginTop:8,fontFamily:"monospace",border:"1px solid #d9d9d9"}})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Q,{strong:!0,children:"Aper\xe7u"}),(0,r.jsx)("div",{style:{marginTop:8,padding:16,border:"1px solid #d9d9d9",borderRadius:4,minHeight:350,maxHeight:350,overflow:"auto",background:"#fafafa"},children:(0,r.jsx)(G.F,{markdown:ed||"*Aucune description*"})})]})]})},{key:"additionalDescription",label:(0,r.jsxs)(u.A,{children:[(0,r.jsx)(M.A,{size:14}),"Description Add.",eh&&(0,r.jsx)(m.A,{color:"green",style:{marginLeft:4},children:"✓"})]}),children:(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:t?"1fr":"1fr 1fr",gap:16},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(Q,{strong:!0,children:"\xc9dition (Markdown)"}),(0,r.jsx)(_.c,{value:eh,onChange:ep,rows:15,style:{marginTop:8,fontFamily:"monospace",border:"1px solid #d9d9d9"}})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Q,{strong:!0,children:"Aper\xe7u"}),(0,r.jsx)("div",{style:{marginTop:8,padding:16,border:"1px solid #d9d9d9",borderRadius:4,minHeight:350,maxHeight:350,overflow:"auto",background:"#fafafa"},children:(0,r.jsx)(G.F,{markdown:eh||"*Aucune description additionnelle*"})})]}),ea&&(0,r.jsx)("div",{style:{gridColumn:t?"auto":"1 / -1"},children:(0,r.jsx)(V.A,{modelId:ea.objectID,env:"prod"===X.In?"prod":"dev",currentText:ea.additionalDescription||"",onPublished:()=>{ea&&e1(ea)}})})]})},{key:"metaSeo",label:(0,r.jsxs)(u.A,{children:[(0,r.jsx)(E.A,{size:14}),"Meta SEO",(em||eg)&&(0,r.jsx)(m.A,{color:"blue",style:{marginLeft:4},children:"Custom"})]}),children:(0,r.jsxs)(u.A,{direction:"vertical",size:"large",style:{width:"100%"},children:[(0,r.jsxs)("div",{style:{padding:16,background:"#fff",border:"1px solid #e8e8e8",borderRadius:8},children:[(0,r.jsxs)(Q,{type:"secondary",style:{fontSize:12,marginBottom:8,display:"block"},children:[(0,r.jsx)(N.A,{size:14,style:{marginRight:4,verticalAlign:"middle"}}),"Pr\xe9visualisation Google"]}),(0,r.jsxs)("div",{style:{fontFamily:"Arial, sans-serif"},children:[(0,r.jsxs)("div",{style:{color:"#1a0dab",fontSize:18,marginBottom:4,cursor:"pointer"},children:[te.slice(0,60),te.length>60?"...":""]}),(0,r.jsxs)("div",{style:{color:"#006621",fontSize:13,marginBottom:4},children:["https://combak.co/",ti,"/",null==(e=ea.brand)?void 0:e.toLowerCase(),"/",ea.name.toLowerCase().replace(/\s+/g,"-"),"--",ea.objectID]}),(0,r.jsxs)("div",{style:{color:"#545454",fontSize:13,lineHeight:1.4},children:[tt.slice(0,160),tt.length>160?"...":""]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,r.jsxs)(u.A,{children:[(0,r.jsx)(Q,{strong:!0,children:"Meta Title"}),(0,r.jsx)(m.A,{color:e3?"blue":"default",children:e3?"Personnalis\xe9":"Par d\xe9faut"}),(0,r.jsxs)(Q,{type:e2>60?"danger":"secondary",children:[e2," / 60 caract\xe8res"]})]}),e3&&(0,r.jsx)(v.A,{title:"R\xe9initialiser au titre par d\xe9faut",children:(0,r.jsx)(g.Ay,{size:"small",icon:(0,r.jsx)(R.A,{size:14}),onClick:()=>e4("title"),children:"R\xe9initialiser"})})]}),(0,r.jsx)(c.A,{value:em,onChange:e=>eu(e.target.value),placeholder:eU,status:e2>60?"warning":void 0}),!e3&&(0,r.jsxs)(Q,{type:"secondary",style:{fontSize:12,marginTop:4,display:"block"},children:["Valeur par d\xe9faut : ",eU]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,r.jsxs)(u.A,{children:[(0,r.jsx)(Q,{strong:!0,children:"Meta Description"}),(0,r.jsx)(m.A,{color:e7?"blue":"default",children:e7?"Personnalis\xe9e":"Par d\xe9faut"}),(0,r.jsxs)(Q,{type:e9>160?"danger":"secondary",children:[e9," / 160 caract\xe8res"]})]}),e7&&(0,r.jsx)(v.A,{title:"R\xe9initialiser \xe0 la description par d\xe9faut",children:(0,r.jsx)(g.Ay,{size:"small",icon:(0,r.jsx)(R.A,{size:14}),onClick:()=>e4("description"),children:"R\xe9initialiser"})})]}),(0,r.jsx)(U,{value:eg,onChange:e=>ef(e.target.value),placeholder:e$,rows:3,status:e9>160?"warning":void 0}),!e7&&(0,r.jsxs)(Q,{type:"secondary",style:{fontSize:12,marginTop:4,display:"block"},children:["Valeur par d\xe9faut : ",e$]})]})]})},{key:"similarModels",label:(0,r.jsxs)(u.A,{children:[(0,r.jsx)(B.A,{size:14}
1),"Produits Similaires",(0,r.jsx)(S.A,{count:eD?"Custom":"Auto",style:{backgroundColor:eD?"#6f57ff":"#8c8c8c",fontSize:10}})]}),children:eM?(0,r.jsxs)("div",{style:{textAlign:"center",padding:40},children:[(0,r.jsx)(w.A,{size:"large"}),(0,r.jsx)(Q,{type:"secondary",style:{display:"block",marginTop:16},children:"Chargement des produits similaires..."})]}):(0,r.jsxs)(u.A,{direction:"vertical",size:"large",style:{width:"100%"},children:[ez.modelFamily&&(0,r.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:8},children:[(0,r.jsxs)(m.A,{color:"purple",children:["Famille: ",ez.modelFamily]}),ez.modelGeneration&&(0,r.jsxs)(m.A,{color:"blue",children:["G\xe9n\xe9ration: ",ez.modelGeneration]}),ez.modelVariant&&(0,r.jsxs)(m.A,{color:"cyan",children:["Variante: ",ez.modelVariant]}),ez.releaseYear&&(0,r.jsxs)(m.A,{color:"orange",children:["Ann\xe9e: ",ez.releaseYear]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(Q,{strong:!0,children:"Algorithme production (5 passes, arr\xeat d\xe8s ≥ 1 r\xe9sultat)"}),ek.length>0?(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:12,marginTop:12},children:ek.map(e=>{let t=ek.find(e=>e.isProductionStopPoint),i=(null==t?void 0:t.passNumber)===e.passNumber&&e.models.length>0,n=t&&e.passNumber>t.passNumber,o=ek.filter(t=>t.passNumber<=e.passNumber).reduce((e,t)=>e+t.models.length,0);return(0,r.jsxs)("div",{style:{padding:"8px 12px",borderRadius:8,border:i?"2px solid #ff4d4f":"1px solid #f0f0f0",background:i?"#fff2f0":n?"#fafafa":"#fff",opacity:n?.6:1},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6*(e.models.length>0)},children:[(0,r.jsxs)(m.A,{color:e.models.length>0?"green":"default",style:{margin:0},children:["Pass ",e.passNumber]}),(0,r.jsx)(Q,{type:"secondary",style:{fontSize:12,flex:1},children:e.label}),(0,r.jsxs)(m.A,{style:{margin:0},children:[e.models.length," r\xe9sultat",e.models.length>1?"s":""]}),i&&(0,r.jsx)(m.A,{color:"red",style:{margin:0},children:"STOP PROD"}),n&&(0,r.jsx)(m.A,{color:"default",style:{margin:0,fontSize:10},children:"ignor\xe9 en prod"}),o>0&&(0,r.jsxs)(g.Ay,{size:"small",type:"link",icon:(0,r.jsx)(L.A,{size:12}),onClick:()=>{var t;return t=e.passNumber,void(ev(ek.filter(e=>e.passNumber<=t).flatMap(e=>e.models).slice(0,10)),eT(!0))},style:{padding:"0 4px",fontSize:11},children:["Copier P1",e.passNumber>1?"-".concat(e.passNumber):""," (",o,")"]})]}),e.models.length>0&&(0,r.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:e.models.map(e=>(0,r.jsxs)(m.A,{style:{padding:"2px 8px"},children:[e.imageSrc&&(0,r.jsx)(k.A,{src:e.imageSrc,size:16,style:{marginRight:4}}),e.brand," ",e.name]},e.objectID))})]},e.passNumber)})}):(0,r.jsx)(Q,{type:"secondary",style:{display:"block",marginTop:8},children:"Aucun produit similaire trouv\xe9 automatiquement"})]}),(0,r.jsx)(b.A,{style:{margin:"16px 0"}}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[(0,r.jsxs)(u.A,{children:[(0,r.jsx)(Q,{strong:!0,children:"Produits similaires personnalis\xe9s"}),(0,r.jsxs)(m.A,{color:eD?"blue":"default",children:[eA.length," mod\xe8le",eA.length>1?"s":""]})]}),eD&&(0,r.jsx)(g.Ay,{size:"small",icon:(0,r.jsx)(R.A,{size:14}),onClick:()=>{ev([]),eT(!1)},danger:!0,children:"R\xe9initialiser (automatique)"})]}),eA.length>0?(0,r.jsx)(J.JY,{onDragEnd:e=>{if(!e.destination)return;let t=Array.from(eA),[i]=t.splice(e.source.index,1);t.splice(e.destination.index,0,i),ev(t)},children:(0,r.jsx)(J.gL,{droppableId:"similar-models",children:e=>(0,r.jsxs)("div",{...e.droppableProps,ref:e.innerRef,style:{border:"1px solid #f0f0f0",borderRadius:8,background:"#fafafa"},children:[eA.map((e,t)=>(0,r.jsx)(J.sx,{draggableId:e.objectID,index:t,children:(i,n)=>(0,r.jsxs)("div",{ref:i.innerRef,...i.draggableProps,style:{padding:"8px 12px",borderBottom:t<eA.length-1?"1px solid #f0f0f0":"none",background:n.isDragging?"#e6f4ff":"transparent",display:"flex",alignItems:"center",gap:12,...i.draggableProps.style},children:[(0,r.jsx)("div",{...i.dragHandleProps,children:(0,r.jsx)(F.A,{size:16,color:"#bfbfbf",style:{cursor:"grab"}})}),(0,r.jsx)(m.A,{children:t+1}),e.imageSrc&&(0,r.jsx)(k.A,{src:e.imageSrc,size:"small",shape:"square"}),(0,r.jsxs)("div",{style:{flex:1},children:[(0,r.jsx)(Q,{strong:!0,children:e.brand}),(0,r.jsx)(Q,{style:{marginLeft:8},children:e.name})]}),(0,r.jsxs)(Q,{type:"secondary",style:{fontSize:12},children:[e.nbOffers||0," offres"]}),(0,r.jsx)(v.A,{title:"Supprimer",children:(0,r.jsx)(g.Ay,{type:"text",size:"small",danger:!0,icon:(0,r.jsx)(W.A,{size:14}),onClick:()=>{var t;return t=e.objectID,void ev(e=>e.filter(e=>e.objectID!==t))}})})]})},e.objectID)),e.placeholder]})})}):(0,r.jsx)(C.A,{image:C.A.PRESENTED_IMAGE_SIMPLE,description:(0,r.jsx)(Q,{type:"secondary",children:eD?"Aucun produit similaire personnalis\xe9. Ajoutez-en ci-dessous.":"Mode automatique activ\xe9. Les produits similaires sont c
1alcul\xe9s par l'algorithme."})})]}),(0,r.jsx)(b.A,{style:{margin:"16px 0"}}),(0,r.jsxs)("div",{children:[(0,r.jsxs)(K,{level:5,style:{marginBottom:12},children:[(0,r.jsx)(H.A,{size:16,style:{marginRight:8,verticalAlign:"middle"}}),"Ajouter un produit similaire"]}),(0,r.jsxs)(u.A.Compact,{style:{width:"100%",maxWidth:500},children:[(0,r.jsx)(c.A,{size:"small",value:eP,onChange:e=>eE(e.target.value),onPressEnter:e6,placeholder:"Rechercher un mod\xe8le \xe0 ajouter...",prefix:(0,r.jsx)(T.A,{size:14,color:"#bfbfbf"})}),(0,r.jsx)(g.Ay,{size:"small",onClick:e6,loading:eB,children:"Rechercher"})]}),eN.length>0&&(0,r.jsx)(z.A,{style:{marginTop:12,maxHeight:300,overflow:"auto"},size:"small",bordered:!0,dataSource:eN,renderItem:e=>(0,r.jsx)(z.A.Item,{actions:[(0,r.jsx)(g.Ay,{type:"primary",size:"small",icon:(0,r.jsx)(H.A,{size:14}),onClick:()=>(e=>{let t={objectID:e.objectID,name:e.name,brand:e.brand,imageSrc:e.imageSrc,minPrice:e.minPrice,nbOffers:e.nbOffers};ev(e=>[...e,t]),eT(!0),eR(t=>t.filter(t=>t.objectID!==e.objectID))})(e),children:"Ajouter"},"add")],children:(0,r.jsx)(z.A.Item.Meta,{avatar:e.imageSrc&&(0,r.jsx)(k.A,{src:e.imageSrc,shape:"square"}),title:"".concat(e.brand," ").concat(e.name),description:"".concat(e.nbOffers||0," offres")})})})]})]})}]})]})]})})]})}ee.getLayout=e=>e;let et=ee},87908:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});let r=function(e){var t=[],i=null,r=function(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];t=n,i||(i=requestAnimationFrame(function(){i=null,e.apply(void 0,t)}))};return r.cancel=function(){i&&(cancelAnimationFrame(i),i=null)},r}},89043:(e,t,i)=>{"use strict";i.d(t,{F:()=>a});var r=i(94458),n=i(73670),o=i(80183);function s(e){let{children:t}=e;return(0,r.jsx)("div",{className:"rich-text",children:(0,r.jsx)("div",{className:"tableau-container",children:(0,r.jsx)("table",{children:t})})})}function a(e){let{markdown:t}=e;return(0,r.jsx)(n.oz,{remarkPlugins:[o.A],components:{table:s},children:t})}},94672:(e,t,i)=>{"use strict";i.d(t,{SQ:()=>h,YH:()=>m,a:()=>p,cY:()=>c,fT:()=>o,ge:()=>l,l:()=>n});var r=i(22448),n=function(e){var t=e.top,i=e.right,r=e.bottom,n=e.left;return{top:t,right:i,bottom:r,left:n,width:i-n,height:r-t,x:n,y:t,center:{x:(i+n)/2,y:(r+t)/2}}},o=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},s=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},a={top:0,right:0,bottom:0,left:0},l=function(e){var t=e.borderBox,i=e.margin,r=void 0===i?a:i,l=e.border,d=void 0===l?a:l,c=e.padding,h=void 0===c?a:c,p=n(o(t,r)),m=n(s(t,d)),u=n(s(m,h));return{marginBox:p,borderBox:n(t),paddingBox:m,contentBox:u,margin:r,border:d,padding:h}},d=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var i=Number(t);return isNaN(i)&&(0,r.A)(!1),i},c=function(e,t){var i=e.borderBox,r=e.border,n=e.margin,o=e.padding;return l({borderBox:{top:i.top+t.y,left:i.left+t.x,bottom:i.bottom+t.y,right:i.right+t.x},border:r,margin:n,padding:o})},h=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),c(e,t)},p=function(e,t){return l({borderBox:e,margin:{top:d(t.marginTop),right:d(t.marginRight),bottom:d(t.marginBottom),left:d(t.marginLeft)},padding:{top:d(t.paddingTop),right:d(t.paddingRight),bottom:d(t.paddingBottom),left:d(t.paddingLeft)},border:{top:d(t.borderTopWidth),right:d(t.borderRightWidth),bottom:d(t.borderBottomWidth),left:d(t.borderLeftWidth)}})},m=function(e){return p(e.getBoundingClientRect(),window.getComputedStyle(e))}},99556:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});var r=i(68658),n=i(46001),o=i.n(n),s=i(35011),a=i(15056),l=i(60101),d=i(15976),c=i(62316);let h=(0,d.OF)("Divider",e=>[(e=>{let{componentCls:t,sizePaddingEdgeHorizontal:i,colorSplit:r,lineWidth:n,textPaddingInline:o,orientationMargin:s,verticalMarginInline:d}=e;return{[t]:Object.assign(Object.assign({},(0,l.dF)(e)),{borderBlockStart:"".concat((0,a.zA)(n)," solid ").concat(r),"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:d,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:"".concat((0,a.zA)(n)," solid ").concat(r)},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:"".concat((0,a.zA)(e.dividerHorizontalGutterMargin)," 0")},["&-horizontal".concat(t,"-with-text")]:{display:"flex",alignItems:"center",margin:"".concat((0,a.zA)(e.dividerHorizontalWithTextGutterMargin)," 0"),color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:"0 ".concat(r),"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:"".concat((0,a.zA)(n)," solid transparent"),borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},["&-horizontal".concat(t,"-with-text-left")]:{"&::before":{width:"calc(".concat(s," * 100%)")},"&::after":{width:"calc(100% - ".concat(s," * 100%)")}},["&-horizontal".concat(t,"-with-text-right")]:{"&::before":{width:"calc(100% - ".concat(s," * 100%)")},"&::after":{width:"calc(".concat(s," * 100%)")}},["".concat(t,"-inner-text")]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:"".concat((0,a.zA)(n)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dashed")]:{"&::before, &::after":{borderStyle:"dashed none none"}},["&-vertical".concat(t,"-dashed")]:{borderInlineStartWidth:n,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:"".concat((0,a.zA)(n)," 0 0")},["&-horizontal".concat(t,"-with-text").concat(t,"-dotted")]:{"&::before, &::after":{borderStyle:"dotted none none"}},["&-vertical".concat(t,"-dotted")]:{borderInlineStartWidth:n,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},["&-plain".concat(t,"-with-text")]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},["&-horizontal".concat(t,"-with-text-left").concat(t,"-no-default-orientation-margin-left")]:{"&::before":{width:0},"&::after":{width:"100%"},["".concat(t,"-inner-text")]:{paddingInlineStart:i}}
1,["&-horizontal".concat(t,"-with-text-right").concat(t,"-no-default-orientation-margin-right")]:{"&::before":{width:"100%"},"&::after":{width:0},["".concat(t,"-inner-text")]:{paddingInlineEnd:i}}})}})((0,c.oX)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0}))],e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}});var p=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)0>t.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]]);return i};let m=e=>{let{getPrefixCls:t,direction:i,divider:n}=r.useContext(s.QO),{prefixCls:a,type:l="horizontal",orientation:d="center",orientationMargin:c,className:m,rootClassName:u,children:g,dashed:f,variant:x="solid",plain:y,style:j}=e,b=p(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style"]),A=t("divider",a),[v,S,w]=h(A),k=!!g,C="left"===d&&null!=c,z="right"===d&&null!=c,I=o()(A,null==n?void 0:n.className,S,w,"".concat(A,"-").concat(l),{["".concat(A,"-with-text")]:k,["".concat(A,"-with-text-").concat(d)]:k,["".concat(A,"-dashed")]:!!f,["".concat(A,"-").concat(x)]:"solid"!==x,["".concat(A,"-plain")]:!!y,["".concat(A,"-rtl")]:"rtl"===i,["".concat(A,"-no-default-orientation-margin-left")]:C,["".concat(A,"-no-default-orientation-margin-right")]:z},m,u),D=r.useMemo(()=>"number"==typeof c?c:/^\d+$/.test(c)?Number(c):c,[c]),T=Object.assign(Object.assign({},C&&{marginLeft:D}),z&&{marginRight:D});return v(r.createElement("div",Object.assign({className:I,style:Object.assign(Object.assign({},null==n?void 0:n.style),j)},b,{role:"separator"}),g&&"vertical"!==l&&r.createElement("span",{className:"".concat(A,"-inner-text"),style:T},g)))}}},e=>{e.O(0,[4619,7112,4584,2631,560,5471,1602,8925,4742,5140,3451,515,1672,6094,1601,97,8413,3670,9964,183,1457,923,8557,636,6593,8792],()=>e(e.s=13646)),_N_E=e.O()}]);

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.