1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4207],{84207:(e,a,t)=>{t.r(a),t.d(a,{default:()=>b});var s=t(95155),l=t(12115),r=t(5917),i=t(75426),n=t(95740),o=t(71360),c=t(73161),d=t(27329),m=t(56367),x=t(49498),p=t(518);function u(e){let{row:a,copiedKey:t,onCopy:l}=e,n=t===a.key;return(0,s.jsxs)("article",{className:(0,x.cn)("rounded-[1.7rem] border-4 p-4 shadow-[0_18px_44px_-34px_rgba(15,23,42,0.2)] transition sm:p-5",a.recommended?"border-emerald-200 bg-emerald-50/55":"border-slate-100 bg-slate-50/85"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("div",{className:(0,x.cn)("inline-flex rounded-full px-3 py-1 text-xs font-black uppercase tracking-[0.14em]",a.toneClassName),children:a.label}),a.recommended?(0,s.jsx)("span",{className:"inline-flex rounded-full border-4 border-emerald-100 bg-white px-2.5 py-1 text-[0.68rem] font-black uppercase tracking-[0.16em] text-emerald-700",children:"Recommand\xe9"}):null]}),(0,s.jsx)("p",{className:"mt-2 text-sm font-medium leading-relaxed text-slate-600",children:a.description})]}),(0,s.jsx)(c.$,{type:"button",variant:"ghost",size:"icon",onClick:()=>l(a.key,a.output),disabled:!a.output,"aria-label":"Copier ".concat(a.label),className:"size-11 shrink-0 rounded-full border-4 border-white bg-white text-slate-600 hover:bg-white hover:text-slate-950",children:n?(0,s.jsx)(r.A,{className:"size-5 text-emerald-600"}):(0,s.jsx)(i.A,{className:"size-5"})})]}),(0,s.jsx)("div",{className:"mt-4 rounded-[1.35rem] border-4 border-white bg-white px-4 py-4",children:(0,s.jsx)("p",{className:"min-h-[3.85rem] whitespace-pre-wrap break-words font-mono text-[1.05rem] font-black leading-relaxed text-slate-950 sm:min-h-[4.5rem] sm:text-[1.18rem]",children:a.output||"Tapez dans la zone de gauche pour voir le r\xe9sultat."})})]})}function b(e){let{currentPath:a=""}=e,t=(0,l.useRef)(null),[b,h]=(0,l.useState)(p.Bw),[f,g]=(0,l.useState)("bold"),[j,v]=(0,l.useState)(""),[N,w]=(0,l.useState)(""),k=(0,l.useDeferredValue)(b),y=(0,p.tv)(k,f),_=(0,p._h)(f),C=(0,p.xm)(b),z=(0,p.oU)(b),T="social-format-tab-".concat(f),L="social-format-panel",A=[{label:"Chars",value:C},{label:"Mots",value:z},{label:"Style",value:_.shortLabel},{label:"Vars",value:y.length}];function F(e,a){v(e),w(a),t.current&&window.clearTimeout(t.current),t.current=window.setTimeout(()=>{v(""),w("")},1800)}async function E(e,a){if(a)try{var t,s;await navigator.clipboard.writeText(a),F(e,"".concat(null!=(s=null==(t=y.find(a=>a.key===e))?void 0:t.label)?s:"Texte"," copi\xe9."))}catch(e){v(""),w("La copie a \xe9chou\xe9 dans ce navigateur.")}}async function S(){let e=(0,p.hV)(k,f);if(e)try{await navigator.clipboard.writeText(e),F("all-".concat(f),"Toutes les variantes ".concat(_.label.toLowerCase()," ont \xe9t\xe9 copi\xe9es."))}catch(e){v(""),w("La copie a \xe9chou\xe9 dans ce navigateur.")}}return(0,l.useEffect)(()=>()=>{t.current&&window.clearTimeout(t.current)},[]),(0,s.jsx)("section",{className:"mx-auto mt-5 w-full max-w-[96rem]",id:"tool",children:(0,s.jsx)("div",{className:"rounded-[2.65rem] border-[6px] border-slate-950 bg-white/90 p-4 shadow-[0_40px_120px_-50px_rgba(15,23,42,0.32)] sm:p-5 lg:rounded-[3.15rem] lg:p-7",children:(0,s.jsxs)("div",{className:"grid gap-5 xl:grid-cols-[minmax(0,1.03fr)_minmax(0,0.97fr)]",children:[(0,s.jsxs)("section",{className:"rounded-[2rem] border-2 border-slate-100 bg-white p-5 shadow-[0_18px_50px_-40px_rgba(15,23,42,0.24)] sm:p-6 lg:p-7",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("label",{htmlFor:"social-media-formatter-input",className:"text-sm font-black uppercase tracking-[0.14em] text-slate-500",children:"Votre texte"}),(0,s.jsx)("p",{id:"social-media-formatter-help",className:"mt-1 text-sm font-medium leading-relaxed text-slate-600 sm:text-base",children:"Collez une phrase, puis comparez les sorties pr\xeates \xe0 copier pour Facebook."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 text-[0.68rem] font-black uppercase tracking-[0.16em] text-slate-500",children:[(0,s.jsx)("span",{className:"rounded-full border-4 border-emerald-100 bg-emerald-50 px-3 py-1.5 text-emerald-700",children:"Posts"}),(0,s.jsx)("span",{className:"rounded-full border-4 border-slate-100 bg-slate-50 px-3 py-1.5",children:"Commentaires"}),(0,s.jsx)("span",{className:"rounded-full border-4 border-slate-100 bg-slate-50 px-3 py-1.5",children:"Profil"}),(0,s.jsx)("span",{className:"rounded-full border-4 border-slate-100 bg-slate-50 px-3 py-1.5",children:"Messenger"})]})]}),(0,s.jsxs)("div",{className:"relative mt-4",children:[(0,s.jsx)(m.T,{id:"social-media-formatter-input",value:b,maxLength:p.in,onChange:e=>h(e.target.value.slice(0,p.in)),"data-mobile-full-height":"true","aria-describedby":"social-media-formatter-help social-media-formatter-counter social-media-formatter-note",placeholder:"Tapez ou collez votre texte Facebook ici...",className:"min-h-[220px] resize-none rounded-[1.55rem] border-2 border-emerald-500 px-5 py-4 pb-14 font-mono text-[1.1rem] font-medium leading-[1.45] text-slate-950 shadow-none placeholder:text-slate-300 focus-visible:border-emerald-600 focus-visible:ring-0 sm:min-h-[248px] sm:text-[1.46rem] sm:leading-[1.35] lg:min-h-[272px] lg:text-[1.72rem]"}),(0,s.jsxs)("div",{id:"social-media-formatter-counter",className:"pointer-events-none absolute bottom-4 right-4 text-sm font-black tracking-tight text-slate-500 sm:text-base",children:[C," / ",p.in]})]}),(0,s.jsxs)("div",{className:"mt-5 rounded-[1.35rem] border border-slate-200/80 bg-slate-50/60 px-4 py-3",children:[(0,s.jsxs)("div",{className:"grid gap-x-3 gap-y-2 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center",children:[(0,s.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1.5",children:A.map((e,a)=>(0,s.jsxs)(l.Fragment,{children:[a>0?(0,s.jsx)("span",{"aria-hidden":"true",className:"hidden h-3.5 w-px bg-slate-200 md:block"}):null,(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1 whitespace-nowrap",children:[(0,s.jsxs)("span",{className:"text-[10px] font-medium uppercase tracking-[0.1em] text-slate-400",children:[e.label,":"]}
1),(0,s.jsx)("span",{className:"text-xs font-semibold text-slate-900 sm:text-[13px]",children:e.value})]})]},e.label))}),(0,s.jsxs)("div",{className:"flex items-center justify-start gap-1.5 lg:justify-end",children:[(0,s.jsxs)(c.$,{type:"button",onClick:function(){var e;w(""),null==(e=document.getElementById("social-format-results"))||e.scrollIntoView({behavior:"smooth",block:"nearest"})},"aria-label":"Afficher les variantes ".concat(_.label.toLowerCase()),className:"h-9 rounded-xl border border-emerald-800 bg-emerald-700 px-3 text-xs font-semibold text-white shadow-[0_10px_24px_-18px_rgba(4,120,87,0.8)] transition duration-200 hover:bg-emerald-800 hover:shadow-[0_14px_28px_-18px_rgba(6,95,70,0.85)] active:scale-[0.98] sm:px-3.5 sm:text-[13px]",children:[(0,s.jsx)(n.A,{className:"size-4"}),"Formatter le texte"]}),(0,s.jsxs)(c.$,{type:"button",variant:"ghost","aria-label":"Effacer le texte saisi",onClick:()=>{h(""),v(""),w("")},className:"h-9 rounded-xl px-2.5 text-xs font-semibold text-slate-600 transition duration-200 hover:bg-white hover:text-slate-950 active:scale-[0.98] sm:px-3 sm:text-[13px]",children:[(0,s.jsx)(o.A,{className:"size-4"}),"Effacer"]})]})]}),(0,s.jsxs)("p",{id:"social-media-formatter-note",className:"mt-2.5 text-[11px] font-medium leading-relaxed text-slate-500",children:["Commencez par le mode ",(0,s.jsx)("span",{className:"font-black",children:"Gras"})," si vous voulez le rendu le plus proche de ce que les gens attendent sur Facebook."]})]})]}),(0,s.jsxs)("section",{id:"social-format-results",className:"rounded-[2rem] border-2 border-slate-100 bg-white p-5 shadow-[0_18px_50px_-40px_rgba(15,23,42,0.24)] sm:p-6 lg:p-7",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-black uppercase tracking-[0.14em] text-slate-500",children:"R\xe9sultats"}),(0,s.jsx)("h2",{className:"mt-1 text-3xl font-black tracking-tighter text-slate-950",children:_.heading}),(0,s.jsx)("p",{className:"mt-2 text-sm font-medium leading-relaxed text-slate-600 sm:text-base",children:_.description})]}),(0,s.jsxs)(c.$,{type:"button",variant:"outline",onClick:S,"aria-label":"Copier toutes les variantes ".concat(_.label.toLowerCase()),className:"h-11 rounded-full border-4 border-slate-200 bg-white px-5 text-sm font-black text-slate-950 hover:bg-slate-50 sm:text-base",children:[j==="all-".concat(f)?(0,s.jsx)(r.A,{className:"size-5 text-emerald-600"}):(0,s.jsx)(i.A,{className:"size-5"}),"Copier tout"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",role:"tablist","aria-label":"Choisir un style Facebook",children:p.b3.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>g(e.key),role:"tab",id:"social-format-tab-".concat(e.key),"aria-selected":f===e.key,"aria-controls":L,tabIndex:f===e.key?0:-1,className:(0,x.cn)("rounded-full border-4 px-4 py-2 text-sm font-black uppercase tracking-[0.12em] transition sm:px-5 sm:py-3",f===e.key?"border-slate-900 bg-slate-900 text-white shadow-[0_14px_30px_-20px_rgba(15,23,42,0.45)]":"border-slate-100 bg-slate-50 text-slate-700 hover:bg-white hover:text-slate-950"),children:e.label},e.key))})]}),(0,s.jsx)("div",{id:L,role:"tabpanel","aria-labelledby":T,tabIndex:0,className:"mt-5 grid gap-3 focus:outline-none",children:y.map(e=>(0,s.jsx)(u,{row:e,copiedKey:j,onCopy:E},e.key))}),(0,s.jsxs)("div",{className:"mt-5 rounded-[1.6rem] border-4 border-slate-100 bg-slate-50/80 p-4",children:[(0,s.jsx)("p",{className:"text-[0.68rem] font-black uppercase tracking-[0.16em] text-slate-400",children:"Compatibilit\xe9"}),(0,s.jsx)("p",{className:"mt-2 text-sm font-medium leading-relaxed text-slate-600 sm:text-base",children:"Le rendu peut varier selon l'application, la police syst\xe8me et l'appareil. Testez toujours le collage avant de publier."}),(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsx)("p",{className:"text-[0.68rem] font-black uppercase tracking-[0.16em] text-slate-400",children:"Le plus souvent recopi\xe9 vers"}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:p.xM.map(e=>(0,s.jsx)("span",{className:"rounded-full border-4 border-white bg-white px-3 py-2 text-[0.72rem] font-black uppercase tracking-[0.14em] text-slate-600",children:e},e))})]})]}),a?(0,s.jsx)(d.Ay,{currentPath:a}):null,(0,s.jsx)("p",{role:"status","aria-live":"polite",className:"mt-4 min-h-6 text-sm font-medium text-emerald-700",children:N})]})]})})})}}}]);
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.