1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1836],{11836:(e,t,n)=>{n.r(t),n.d(t,{default:()=>eE});var i=n(95155);n(50391);var l=n(82159),r=n(73392),a=n(83694),s=n(60475),o=n(9239),c=n(59265),d=n(27337),u=n(55987),h=n(13238),m=n(14198),p=n(5989),f=n(76065),g=n(43203),x=n(6268),b=n(76865),A=n(12115),v=n(60668),j=n(48022),w=n(4071),y=n(23805),C=n(80322),k=n(27374),z=n(40888),S=n(84249),N=n(37721),T=n(44751),L=n(41264),M=n(60192),E=n(83954),D=n(57990),R=n(25444),H=n(45228),W=n(68459),I=n(38699),F=n(58124),O=n(498),B=n(11552),P=n(61164),U=n(15748),X=n(14192),$=n(77740),_=n(23947),K=n(52458),G=n(96380),q=n(14769),V=n(29657),J=n(72602),Y=n(55032),Q=n(68426),Z=n(55791),ee=n(36101),et=n(70184),en=n(48945),ei=n(49826),el=n(83464),er=n(75582),ea=n(26971),es=n(31246),eo=n(80519),ec=n(30960),ed=n(59687),eu=n(62216),eh=n(86989),em=n(47499),ep=n(16395),ef=n(5823);let eg="news-editor-open-image-props",ex=[{name:"Äen",hex:"#111827"},{name:"X\xe1m",hex:"#6b7280"},{name:"Äá»",hex:"#dc2626"},{name:"Xanh l\xe1",hex:"#16a34a"},{name:"Xanh dương",hex:"#2563eb"},{name:"Cam",hex:"#ea580c"},{name:"T\xedm",hex:"#7c3aed"},{name:"Brand",hex:"#0d9488"}];function eb(e){return!!e?.types?.length&&Array.from(e.types).includes("Files")}function eA(e){if(!e)return[];let t=[];for(let n of e.files||[])n&&t.push(n);if(0===t.length)for(let n of e.items||[]){if("file"!==n.kind)continue;let e=n.getAsFile();e&&t.push(e)}return t.filter(e=>{let t=(e.type||"").toLowerCase();if(t.startsWith("image/")||t.startsWith("video/"))return!0;let n=(e.name||"").toLowerCase();return/\.(jpe?g|png|gif|webp|bmp|svg|heic|heif|mp4|webm|mov)$/i.test(n)})}async function ev(e,t){for(let n of t)try{await e(n)}catch{}}function ej(e){if(null==e||""===e)return"";if("number"==typeof e&&Number.isFinite(e))return`${Math.round(e)}px`;let t=String(e).trim();return/^\d+(\.\d+)?$/.test(t)?`${t}px`:t}function ew(e){return"center"===e||"right"===e||"justify"===e?e:"left"}function ey(e){e.preventDefault()}function eC(e,t,n,i){let l=ew(i);e.setAttribute("data-align",l),"justify"===l?(Object.assign(e.style,{display:"flex",width:"100%",maxWidth:"100%",boxSizing:"border-box",justifyContent:"stretch"}),Object.assign(t.style,{display:"inline-block",verticalAlign:"middle",width:"100%",maxWidth:"100%"}),Object.assign(n.style,{width:"100%",height:"auto",maxWidth:"100%"})):(Object.assign(e.style,{display:"flex",width:"100%",maxWidth:"100%",boxSizing:"border-box",justifyContent:"center"===l?"center":"right"===l?"flex-end":"flex-start"}),Object.assign(t.style,{display:"inline-block",verticalAlign:"middle",width:"",maxWidth:"100%"}))}let ek=d.Ay.extend({addAttributes(){return{...this.parent?.(),caption:{default:null,parseHTML:e=>e.getAttribute("data-caption"),renderHTML:e=>{let t=e.caption;return null==t||""===String(t).trim()?{}:{"data-caption":String(t)}}},showCaption:{default:!1,parseHTML:e=>"true"===e.getAttribute("data-show-caption"),renderHTML:e=>!0===e.showCaption?{"data-show-caption":"true"}:{}},textAlign:{default:"justify",parseHTML:e=>{let t=e.getAttribute("data-align");return"center"===t||"right"===t||"justify"===t?t:"left"===t?"left":"justify"},renderHTML:e=>{let t=ew(e.textAlign);return"left"===t?{}:{"data-align":t}}}}},parseHTML(){return[{tag:"figure",priority:60,getAttrs:e=>{let t=e.querySelector("img");if(!t)return!1;let n=t.getAttribute("src");if(!n)return!1;let i=e.querySelector("figcaption"),l=t.getAttribute("data-align"),r="justify";("left"===l||"center"===l||"right"===l||"justify"===l)&&(r=l);let a=t.getAttribute("width"),s=t.getAttribute("height"),o=i?.textContent?.trim()||null,c=t.getAttribute("data-caption");return{src:n,alt:t.getAttribute("alt"),title:t.getAttribute("title"),width:a?parseInt(a,10):null,height:s?parseInt(s,10):null,textAlign:r,showCaption:!!i||"true"===t.getAttribute("data-show-caption"),caption:o||c}}},...this.parent?.()??[]]},renderHTML({node:e,HTMLAttributes:t}){let n=(0,l.KV)(this.options.HTMLAttributes,t),i=!0===e.attrs.showCaption,r=String(e.attrs.caption||"").trim(),a=String(e.attrs.alt||"").trim(),s=r||a;return i&&s?["figure",{class:"news-content-figure"},["img",n],["figcaption",{class:"news-content-figcaption"},s]]:["img",n]},addNodeView:()=>({node:e,editor:t,getPos:n})=>{let i=document.createElement("div");i.className="news-editor-image-wrapper",Object.assign(i.style,{position:"relative"});
1let l=document.createElement("figure");l.className="news-editor-image-inner",Object.assign(l.style,{position:"relative",display:"inline-block",margin:"0"});let r=document.createElement("img");r.src=(0,v.zN)(e.attrs.src||"")||e.attrs.src||"",r.alt=e.attrs.alt||"",e.attrs.title&&r.setAttribute("title",e.attrs.title),r.draggable=!1,l.appendChild(r);let a=document.createElement("figcaption");a.className="news-editor-image-caption";let s=e=>{let t=!0===e.attrs.showCaption,n=String(e.attrs.caption||"").trim(),i=String(e.attrs.alt||"").trim(),l=t?n||i:"";t&&l?(a.textContent=l,a.style.display="block"):(a.textContent="",a.style.display="none")},o=document.createElement("div");o.className="news-editor-image-dim",o.setAttribute("aria-hidden","true");let c=document.createElement("span");c.className="news-editor-image-props",c.setAttribute("role","button"),c.setAttribute("tabindex","0"),c.setAttribute("aria-label","Thuá»c t\xednh ảnh (hoặc chuá»t phải tr\xean ảnh)"),c.title="Thuá»c t\xednh ảnh â hoặc chuá»t phải tr\xean ảnh",c.textContent="Sá»a ảnh",c.setAttribute("contenteditable","false"),c.style.cssText="box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:34px!important;padding:6px 14px!important;border:2px solid #fff!important;border-radius:6px!important;background-color:#ea580c!important;color:#ffffff!important;font-size:13px!important;font-weight:800!important;font-family:system-ui,sans-serif!important;line-height:1.2!important;cursor:pointer!important;box-shadow:0 2px 10px rgba(0,0,0,0.5)!important;flex-shrink:0!important;min-width:96px!important;position:relative!important;z-index:7!important;visibility:visible!important;opacity:1!important;max-width:none!important;width:auto!important;user-select:none!important";let d=()=>{let e="function"==typeof n?n():void 0;"number"==typeof e&&(t.chain().focus().setNodeSelection(e).run(),window.dispatchEvent(new CustomEvent(eg,{detail:{pos:e}})))},u=e=>{e.preventDefault(),e.stopPropagation(),d()};c.addEventListener("click",u),c.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),u(e))}),r.addEventListener("dblclick",e=>{e.preventDefault(),e.stopPropagation(),d()});let h=document.createElement("button");h.type="button",h.className="news-editor-image-delete",h.setAttribute("aria-label","X\xf3a ảnh"),h.innerHTML="\xd7",h.style.cssText="display:flex!important;align-items:center!important;justify-content:center!important;width:32px!important;height:32px!important;padding:0!important;border:none!important;border-radius:6px!important;background-color:#dc2626!important;color:#ffffff!important;font-size:18px!important;line-height:1!important;cursor:pointer!important;flex-shrink:0!important;position:relative!important;z-index:6!important",h.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation();let i="function"==typeof n?n():void 0;"number"==typeof i&&t.chain().focus().setNodeSelection(i).deleteSelection().run()});let m=document.createElement("span");m.className="news-editor-image-drag-handle",m.setAttribute("aria-label","K\xe9o Äá» di chuyá»n"),m.innerHTML="â®â®";let p=document.createElement("div");p.className="news-editor-image-toolbar-actions",Object.assign(p.style,{display:"flex",alignItems:"center",gap:"8px",marginLeft:"auto",flexShrink:"0",maxWidth:"none"}),p.appendChild(c),p.appendChild(h);let f=document.createElement("div");f.className="news-editor-image-toolbar",f.appendChild(m),f.appendChild(p),l.appendChild(o);let g=document.createElement("div");g.className="news-editor-image-resize-handle",g.setAttribute("aria-label","K\xe9o g\xf3c Äá» Äá»i k\xedch thưá»c"),g.setAttribute("contenteditable","false"),Object.assign(g.style,{position:"absolute",right:"8px",bottom:"8px",width:"24px",height:"24px",boxSizing:"border-box",backgroundColor:"#0d9488",border:"2px solid #ffffff",borderRadius:"4px",cursor:"nwse-resize",zIndex:"4",opacity:"1",boxShadow:"0 2px 8px rgba(0,0,0,0.45)",pointerEvents:"auto",touchAction:"none"}
1),l.appendChild(g),l.appendChild(a),g.addEventListener("pointerdown",e=>{let l,a;e.preventDefault(),e.stopPropagation();let s="function"==typeof n?n():void 0;if("number"!=typeof s)return;t.chain().focus().setNodeSelection(s).run();let o=e.clientX,c=r.getBoundingClientRect(),d=c.width,u=Math.max(c.height,1),h=d/u,m=(l=i.closest(".prose"),(a=l?.getBoundingClientRect().width??i.parentElement?.getBoundingClientRect().width)?Math.min(2400,Math.floor(a)):2400),p=e=>{let t=Math.round(Math.min(m,Math.max(48,d+(e.clientX-o)))),n=Math.round(t/h);Object.assign(r.style,{width:`${t}px`,height:`${n}px`})},f=()=>{document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",f),document.removeEventListener("pointercancel",f),Object.assign(document.body.style,{cursor:"",userSelect:""}),i.classList.remove("news-editor-image-resizing");let e=r.style.width,n=r.style.height,l=e?parseFloat(e):d,a=n?parseFloat(n):u;t.chain().focus().setNodeSelection(s).updateAttributes("image",{width:Math.round(l),height:Math.round(a)}).run()};i.classList.add("news-editor-image-resizing"),Object.assign(document.body.style,{cursor:"nwse-resize",userSelect:"none"}),document.addEventListener("pointermove",p),document.addEventListener("pointerup",f),document.addEventListener("pointercancel",f)}),i.appendChild(l),i.appendChild(f),i.addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation(),d()});let x=ew(e.attrs.textAlign);if(eC(i,l,r,x),"justify"!==x){let t=ej(e.attrs.width),n=ej(e.attrs.height);(t||n)&&Object.assign(r.style,{...t?{width:t}:{},...n?{height:n}:{}})}return s(e),{dom:i,update(t){if(t.type!==e.type)return!1;r.src=(0,v.zN)(t.attrs.src||"")||t.attrs.src||"",r.alt=t.attrs.alt||"",t.attrs.title?r.setAttribute("title",t.attrs.title):r.removeAttribute("title");let n=ew(t.attrs.textAlign);eC(i,l,r,n);let a=ej(t.attrs.width),o=ej(t.attrs.height);return"justify"===n?Object.assign(r.style,{width:"100%",height:"auto"}):Object.assign(r.style,{width:a||"",height:o||""}),s(t),!0}}}}),ez=l.YY.create({name:"fontSize",addGlobalAttributes:()=>[{types:["textStyle"],attributes:{fontSize:{default:null,parseHTML:e=>e.style.fontSize?.replace(/['"]+/g,"")||null,renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]}),eS=[{label:"Default",value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Times New Roman",value:'"Times New Roman", serif'},{label:"Courier New",value:'"Courier New", monospace'},{label:"Roboto",value:"Roboto, sans-serif"},{label:"Open Sans",value:'"Open Sans", sans-serif'}],eN=[{label:"12",value:"12px"},{label:"14",value:"14px"},{label:"16",value:"16px"},{label:"18",value:"18px"},{label:"20",value:"20px"},{label:"24",value:"24px"},{label:"28",value:"28px"},{label:"32",value:"32px"},{label:"36",value:"36px"}],eT=[{label:"B\xecnh thưá»ng",labelEn:"Normal",value:0},{label:"Heading 1",labelEn:"Heading 1",value:1},{label:"Heading 2",labelEn:"Heading 2",value:2},{label:"Heading 3",labelEn:"Heading 3",value:3},{label:"Heading 4",labelEn:"Heading 4",value:4}],eL=[r.A.configure({heading:{levels:[1,2,3,4]}}),a.A,s.xJ,ez,h.A.configure({types:["textStyle"]}),o.A,m.Ay.configure({multicolor:!0}),u.A.configure({types:["heading","paragraph"]}),c.Ay.configure({openOnClick:!1}),p.XI.configure({resizable:!0,renderWrapper:!0}),f.A,x.h,g.A,ek.configure({allowBase64:!0})],eM=(0,A.forwardRef)(function({value:e,onChange:t,locale:n,onInsertMedia:r,mediaUploading:a=!1,onUploadMediaFile:s,fillHeight:o=!1,stickyToolbar:c=!1},d){let u=(0,A.useRef)(null),h=(0,A.useRef)(null),m=(0,A.useRef)(null),[p,f]=(0,A.useState)(null),[,g]=(0,A.useState)(0),[x,v]=(0,A.useState)(!1),[ej,eC]=(0,A.useState)(null),[ek,ez]=(0,A.useState)(!1),[eM,eE]=(0,A.useState)({src:"",alt:"",caption:"",showCaption:!1,width:"",height:"",textAlign:"justify"}),[eD,eR]=(0,A.useState)(!0),eH=(0,A.useRef)(1),eW=(0,A.useRef)(0),eI=(0,A.useRef)(!1),eF=(0,A.useRef)(t),eO=(0,A.useRef)(null),eB=(0,A.useRef)(null);eF.current=t;let eP=(0,A.useRef)(s);eP.current=s;let eU=(0,A.useCallback)(()=>{null!=eB.current&&(window.cancelAnimationFrame(eB.current),eB.current=null);let e=eO.current;null!=e&&(eO.current=null,eI.current=!0,eF.current(e))},[]),eX=(0,A.useCallback)(e=>{eO.current=e,null==eB.current&&(eB.current=window.requestAnimationFrame(()=>{eB.current=null;let e=eO.current;null!=e&&(eO.current=null,eI.current=!0,eF.current(e))}))},[]);(0,A.useLayoutEffect)(()=>
1{if(!u.current)return;let t=u.current,n=new l.KE({element:t,extensions:eL,content:(e||"").trim()||"<p></p>",editorProps:{attributes:{class:o?"prose prose-sm max-w-none min-h-[200px] px-4 py-3 outline-none":"prose prose-sm max-w-none min-h-[280px] px-4 py-3 outline-none"},handleDOMEvents:{dragenter:(e,t)=>!!eP.current&&!!eb(t.dataTransfer)&&(t.preventDefault(),!0),dragover:(e,t)=>!!eP.current&&!!eb(t.dataTransfer)&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="copy"),!0)},handleDrop:(e,t)=>{let n=eP.current;if(!n)return!1;let i=eA(t.dataTransfer);return 0!==i.length&&(t.preventDefault(),t.stopPropagation(),ev(n,i),!0)},handlePaste:(e,t)=>{let n=eP.current;if(!n)return!1;let i=eA(t.clipboardData);return 0!==i.length&&(t.preventDefault(),t.stopPropagation(),ev(n,i),!0)}},onUpdate:({editor:e})=>{eX(e.getHTML())}});h.current=n,f(n);let i=()=>g(e=>e+1);return n.on("selectionUpdate",i),()=>{eU(),n.off("selectionUpdate",i),n.destroy(),h.current=null,f(null)}},[eU,eX]),(0,A.useEffect)(()=>{let t=h.current;if(!t)return;let n=t.getHTML(),i=(e||"").trim()||"<p></p>";i===n||eI.current||t.commands.setContent(i,{emitUpdate:!1}),eI.current=!1},[e,p]),(0,A.useEffect)(()=>{if(!x)return;let e=()=>{eW.current=0,v(!1)};return window.addEventListener("dragend",e),()=>window.removeEventListener("dragend",e)},[x]),(0,A.useImperativeHandle)(d,()=>({insertContent(e){let t=h.current;t&&("string"==typeof e?t.chain().focus().insertContent(e,{parseOptions:{preserveWhitespace:!0}}).run():t.chain().focus().insertContent(e).run())}}),[]);let e$=!!p&&!!(0,l.KP)(e=>"table"===e.type.name)(p.state.selection),e_=n.startsWith("vi"),eK=(0,A.useCallback)(e=>{let t=h.current;if(!t||"number"!=typeof e)return;let n=t.state.doc.nodeAt(e);if(!n||"image"!==n.type.name)return;m.current=e,t.chain().focus().setNodeSelection(e).run();let i=n.attrs.width,l=n.attrs.height,r="number"==typeof i&&Number.isFinite(i)?i:null!=i&&""!==i?parseFloat(String(i)):NaN,a="number"==typeof l&&Number.isFinite(l)?l:null!=l&&""!==l?parseFloat(String(l)):NaN,s=1;Number.isFinite(r)&&Number.isFinite(a)&&a>0&&(s=r/a),eH.current=s,eE({src:String(n.attrs.src||""),alt:String(n.attrs.alt||""),caption:String(n.attrs.caption||""),showCaption:!!n.attrs.showCaption,width:Number.isFinite(r)?String(Math.round(r)):"",height:Number.isFinite(a)?String(Math.round(a)):"",textAlign:ew(n.attrs.textAlign)}),eR(Number.isFinite(r)&&Number.isFinite(a)&&r>0&&a>0),ez(!0)},[]),eG=()=>{if(!p)return;let e=p.state.selection;e instanceof b.nh&&"image"===e.node.type.name&&eK(e.from)};(0,A.useEffect)(()=>{let e=e=>{let t=e.detail?.pos;"number"==typeof t&&eK(t)};return window.addEventListener(eg,e),()=>window.removeEventListener(eg,e)},[eK]);let eq=(0,A.useCallback)(()=>{m.current=null,ez(!1)},[]),eV=p?.state.selection,eJ=eV instanceof b.nh&&("image"===eV.node.type.name||"video"===eV.node.type.name),eY=eV instanceof b.nh&&"image"===eV.node.type.name,eQ=eY&&eV instanceof b.nh?ew(eV.node.attrs.textAlign):"left",eZ=function(e){if(!e)return"";let{state:t}=e,{selection:n}=t,i=e=>{let t=e.find(e=>e?.type?.name==="link"),n=t?.attrs?.href;return"string"==typeof n?n.trim():""};if(!n.empty){let e="";if(t.doc.nodesBetween(n.from,n.to,t=>{!e&&t.isText&&(e=i(Array.from(t.marks??[])))}),e)return e}let l=i([...n.$from.marks()||[],...t.storedMarks||[],...n.$from.nodeBefore?.marks||[],...n.$from.nodeAfter?.marks||[]]);if(l)return l;let r=e.getAttributes("link")?.href;if("string"==typeof r&&r.trim())return r.trim();{let e=window.getSelection(),t=e?.anchorNode??null,n=null;t&&(n=t instanceof Element?t:t.parentElement);let i=n?.closest("a[href]"),l=(i?.getAttribute("href")||"").trim();if(l)return l}return""}(p),e0=(()=>{if(!p||!eJ||!(eV instanceof b.nh))return!1;let e=p.state.doc.resolve(eV.from);return e.index(e.depth)>0})(),e1=(()=>{if(!p||!eJ||!(eV instanceof b.nh))return!1;let e=p.state.doc.resolve(eV.from),t=e.depth;return e.index(t)<e.node(t).childCount-1})(),e2=s?(0,i.jsx)(j.A,{variant:"caption",sx:{display:"block",flexShrink:0,px:2,py:.75,bgcolor:"grey.50",color:"text.secondary",borderBottom:1,borderColor:"divider"},children:e_?"K\xe9o thả ảnh/video v\xe0o khung soạn (hoặc d\xe1n). Tr\xean ảnh: n\xfat cam \xabSá»a ảnh\xbb, Ä\xfap chuá»t v\xe0o ảnh, hoặc chuá»t phải â Äá» chá»nh URL, alt, k\xedch thưá»c, cÄn chá»nh.":"Drag/drop or paste media. On an image: orange \xabSá»a ảnh\xbb, doubleâclick the image, or rightâclick â for URL, alt, size, alignment."}):null;return(0,i.jsxs)(w.A,{onDragEnter:s?e=>{!eP.current||eb(e.dataTransfer)&&(e.preventDefault(),e.stopPropagation(),eW.current+=1,1===eW.current&&v(!0))}:void 0,onDragLeave:s?e=>{eb(e.dataTransfer)&&(e.preventDefault(),eW.current=Math.max(0,eW.current-1),0===eW.current&&v(!1))}:void 0,onDragOver:s?e=>{!eP.current||eb(e.dataTransfer)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="copy")}:void 0,onDrop:s?e=>{eW.current=0,v(!1);let t=eP.current;if(!t)return;let n=eA(e.dataTransfer);0!==n.length&&(e.preventDefault(),e.stopPropagation(),ev(t,n))}:void 0,sx:{border:1,borderColor:x&&s?"primary.main":"divider",borderStyle:x&&s?"dashed":"solid",borderRadius:2,overflow:o?"hidden":"visible",bgcolor:"background.paper",...o?{display:"flex",flexDirection:"column",flex:1,minHeight:0,minWidth:0,alignSelf:"stretch"}:{},"& .news-editor-image-wrapper":{maxWidth:"100%",position:"relative",curs
1or:"grab",overflow:"visible","&:active":{cursor:"grabbing"}},"& .news-editor-image-inner":{position:"relative",display:"inline-block",overflow:"visible"},"& .news-editor-image-inner img":{display:"block",maxWidth:"100%",height:"auto",verticalAlign:"middle"},"& .tableWrapper":{overflowX:"auto",margin:"1em 0"},"& .tableWrapper table":{borderCollapse:"collapse",width:"100%",tableLayout:"fixed",margin:0},"& table":{borderCollapse:"collapse",width:"100%",tableLayout:"fixed",margin:"1em 0"},"& th, & td":{border:"1px solid",borderColor:"divider",padding:"8px 12px",minWidth:60,verticalAlign:"top"},"& th":{bgcolor:"grey.100",fontWeight:600},"& .news-editor-image-caption":{margin:0,marginTop:"6px",fontSize:"0.8125rem",lineHeight:1.4,color:"text.secondary"}},children:[e2,p?(0,i.jsxs)(w.A,{className:c?"news-editor-toolbar-sticky":void 0,sx:{flexShrink:0,bgcolor:"grey.100",borderBottom:"1px solid",borderColor:"divider",...c?{position:"sticky",top:8,zIndex:30,boxShadow:"0 2px 8px rgba(15, 23, 42, 0.08)"}:{}},children:[(0,i.jsxs)(w.A,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.25,p:.5},children:[(0,i.jsx)(y.A,{size:"small",value:p.isActive("heading",{level:1})?1:p.isActive("heading",{level:2})?2:p.isActive("heading",{level:3})?3:4*!!p.isActive("heading",{level:4}),onChange:e=>{let t=Number(e.target.value);0===t?p.chain().focus().setParagraph().run():p.chain().focus().toggleHeading({level:t}).run()},sx:{minWidth:110,height:30,fontSize:12,"& .MuiSelect-select":{py:.25}},children:eT.map(e=>(0,i.jsx)(C.A,{value:e.value,sx:{fontSize:12},children:e_?e.label:e.labelEn},e.value))}),(0,i.jsx)(y.A,{size:"small",value:p.getAttributes("textStyle").fontFamily||"",onChange:e=>{let t=e.target.value;t?p.chain().focus().setFontFamily(t).run():p.chain().focus().unsetFontFamily().run()},displayEmpty:!0,sx:{minWidth:90,height:30,fontSize:12,"& .MuiSelect-select":{py:.25}},children:eS.map(e=>(0,i.jsx)(C.A,{value:e.value,sx:{fontSize:12,fontFamily:e.value||"inherit"},children:e.label},e.value))}),(0,i.jsxs)(y.A,{size:"small",value:p.getAttributes("textStyle").fontSize||"",onChange:e=>{let t=e.target.value;t?p.chain().focus().setMark("textStyle",{fontSize:t}).run():p.chain().focus().unsetMark("textStyle").run()},displayEmpty:!0,sx:{minWidth:60,height:30,fontSize:12,"& .MuiSelect-select":{py:.25}},renderValue:e=>e?e.replace("px",""):"â",children:[(0,i.jsx)(C.A,{value:"",sx:{fontSize:12},children:e_?"Mặc Äá»nh":"Default"}),eN.map(e=>(0,i.jsx)(C.A,{value:e.value,sx:{fontSize:12},children:e.label},e.value))]}),(0,i.jsx)(k.A,{orientation:"vertical",flexItem:!0,sx:{mx:.5}}),(0,i.jsx)(z.A,{title:e_?"In Äáºm":"Bold",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().toggleBold().run(),className:p.isActive("bold")?"is-active":"",children:(0,i.jsx)(X.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"In nghi\xeang":"Italic",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().toggleItalic().run(),className:p.isActive("italic")?"is-active":"",children:(0,i.jsx)($.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Gạch ch\xe2n":"Underline",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().toggleUnderline().run(),className:p.isActive("underline")?"is-active":"",children:(0,i.jsx)(_.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Gạch ngang":"Strikethrough",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().toggleStrike().run(),className:p.isActive("strike")?"is-active":"",children:(0,i.jsx)(K.A,{fontSize:"small"})})}),(0,i.jsx)(k.A,{orientation:"vertical",flexItem:!0,sx:{mx:.5}}),ex.map(e=>(0,i.jsx)(z.A,{title:`${e_?"M\xe0u chữ":"Text color"}: ${e.name}`,children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().setColor(e.hex).run(),sx:{width:22,height:22,minWidth:0,p:0,border:"1px solid",borderColor:"divider",borderRadius:.5,bgcolor:e.hex,"&:hover":{opacity:.9,bgcolor:e.hex}}})},e.hex)),(0,i.jsx)(z.A,{title:"Highlight",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().toggleHighlight({color:"#fef08a"}).run(),className:p.isActive("highlight")?"is-active":"",children:(0,i.jsx)(G.A,{fontSize:"small"})})}),(0,i.jsx)(k.A,{orientation:"vertical",flexItem:!0,sx:{mx:.5}}),(0,i.jsx)(z.A,{title:e_?"CÄn tr\xe1i":"Align left",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().setTextAlign("left").run(),className:p.isActive({textAlign:"left"})?"is-active":"",children:(0,i.jsx)(q.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"CÄn giữa":"Align center",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().setTextAlign("center").run(),className:p.isActive({textAlign:"center"})?"is-active":"",children:(0,i.jsx)(V.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"CÄn phải":"Align right",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().setTextAlign("right").run(),className:p.isActive({textAlign:"right"})?"is-active":"",children:(0,i.jsx)(J.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"CÄn Äá»u":"Justify",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().setTextAlign("justify").run(),className:p.isActive({textAlign:"justify"})?"is-active":"",children:(0,i.jsx)(Y.A,{fontSize:"small"})})}),(0,i.jsx)(k.A,{orientation:"vertical",flexItem:!0,sx:{mx:.5}}),(0,i.jsx)(z.A,{title:e_?"Danh s\xe1ch bullet":"Bullet list",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().toggleBulletList().run(),className:p.isActive("bulletList")?"is-active":"",children:(0,i.jsx)(Q.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Danh s\xe1ch sá»":"Numbered list",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().toggleOrderedList().run(),className:p.isActive("orderedList")?"is-active":"",children:(0,i.jsx)(Z.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Tr\xedch dẫn":"Quote",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().toggleBlockquote().run(),className:p.isActive("blockquote")?"is-active":"",children:(0,i.jsx)(ee.A,{fontSize:"small"})})}),(0,i.jsx)(k.A,{orientation:"vertical",flexItem:!0,sx:{mx:.5}}),(0,i.jsx)(z.A,{title:e_?"Li\xean kết":"Link",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>{let e,t=eZ||"https://",n=window.prompt(eZ?e_?"Sá»a URL li\xean kết:":"Edit link URL:":e_?"Nháºp URL:":"Enter URL:",t);if(null==n)return;if(!n.trim())return void p.chain().focus().extendMarkRange("link").unsetLink().run();let i=(e=n.trim())?/^(https?:\/\/|mailto:|tel:)/i.test(e)?e:`https://${e}`:"";
1if(i){if(p.state.selection.empty){if(eZ&&p.chain().focus().extendMarkRange("link").setLink({href:i,target:"_blank",rel:"noopener noreferrer"}).run())return;p.chain().focus().insertContent({type:"text",text:i,marks:[{type:"link",attrs:{href:i,target:"_blank",rel:"noopener noreferrer"}}]}).run();return}p.chain().focus().extendMarkRange("link").setLink({href:i,target:"_blank",rel:"noopener noreferrer"}).run()}},className:p.isActive("link")?"is-active":"",children:(0,i.jsx)(et.A,{fontSize:"small"})})}),eZ&&(0,i.jsx)(z.A,{title:eZ,children:(0,i.jsx)(N.A,{size:"small",variant:"outlined",href:eZ,target:"_blank",rel:"noopener noreferrer",onMouseDown:ey,sx:{textTransform:"none",maxWidth:320,minWidth:0,ml:.25,px:1,fontSize:12,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:`Link: ${eZ}`})}),(0,i.jsx)(z.A,{title:e_?"M\xe3 code":"Code",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().toggleCode().run(),className:p.isActive("code")?"is-active":"",children:(0,i.jsx)(en.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"ÄÆ°á»ng kẻ ngang":"Horizontal rule",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().setHorizontalRule().run(),children:(0,i.jsx)(ei.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Bảng â ch\xe8n hoặc th\xeam h\xe0ng / cá»t":"Table â insert or add rows/columns",children:(0,i.jsx)(S.A,{size:"small",onMouseDown:ey,onClick:e=>eC(e.currentTarget),className:e$?"is-active":"",children:(0,i.jsx)(el.A,{fontSize:"small"})})}),(0,i.jsxs)(T.A,{anchorEl:ej,open:!!ej,onClose:()=>eC(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{list:{dense:!0,sx:{minWidth:260}}},children:[(0,i.jsx)(L.A,{disableSticky:!0,sx:{bgcolor:"background.paper",fontSize:11,lineHeight:"28px",fontWeight:700},children:e_?"Ch\xe8n":"Insert"}),(0,i.jsx)(C.A,{onClick:()=>{p?.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),eC(null)},children:e_?"Bảng má»i (3\xd73, c\xf3 h\xe0ng ti\xeau Äá»)":"New table (3\xd73, with header)"}),(0,i.jsx)(k.A,{}),(0,i.jsx)(L.A,{disableSticky:!0,sx:{bgcolor:"background.paper",fontSize:11,lineHeight:"28px",fontWeight:700},children:e_?"Bảng Äang chá»n (Äặt con trá» trong \xf4)":"Current table (cursor in a cell)"}),!e$&&(0,i.jsx)(C.A,{disabled:!0,sx:{fontSize:12,whiteSpace:"normal",opacity:.75},children:e_?"Click v\xe0o má»t \xf4 trong bảng rá»i má» lại menu Äá» th\xeam/x\xf3a h\xe0ng hoặc cá»t.":"Click a table cell, then reopen this menu to add/remove rows or columns."}),(0,i.jsx)(C.A,{disabled:!e$,onClick:()=>{p?.chain().focus().addRowBefore().run(),eC(null)},children:e_?"â Th\xeam h\xe0ng ph\xeda tr\xean":"â Add row above"}),(0,i.jsx)(C.A,{disabled:!e$,onClick:()=>{p?.chain().focus().addRowAfter().run(),eC(null)},children:e_?"â Th\xeam h\xe0ng ph\xeda dưá»i":"â Add row below"}),(0,i.jsx)(C.A,{disabled:!e$,onClick:()=>{p?.chain().focus().addColumnBefore().run(),eC(null)},children:e_?"â Th\xeam cá»t b\xean tr\xe1i":"â Add column left"}),(0,i.jsx)(C.A,{disabled:!e$,onClick:()=>{p?.chain().focus().addColumnAfter().run(),eC(null)},children:e_?"â Th\xeam cá»t b\xean phải":"â Add column right"}),(0,i.jsx)(k.A,{}),(0,i.jsx)(C.A,{disabled:!e$,onClick:()=>{p?.chain().focus().deleteRow().run(),eC(null)},children:e_?"X\xf3a h\xe0ng hiá»n tại":"Delete current row"}),(0,i.jsx)(C.A,{disabled:!e$,onClick:()=>{p?.chain().focus().deleteColumn().run(),eC(null)},children:e_?"X\xf3a cá»t hiá»n tại":"Delete current column"}),(0,i.jsx)(C.A,{disabled:!e$,onClick:()=>{p?.chain().focus().deleteTable().run(),eC(null)},sx:{color:"error.main"},children:e_?"X\xf3a cả bảng":"Delete entire table"})]}),eY&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(N.A,{variant:"outlined",size:"small",onMouseDown:ey,onClick:eG,sx:{textTransform:"none",fontSize:12,py:.25,px:1,flexShrink:0},children:e_?"Thuá»c t\xednh ảnh":"Image properties"}),(0,i.jsx)(k.A,{orientation:"vertical",flexItem:!0,sx:{mx:.5}}),(0,i.jsx)(z.A,{title:e_?"Thuá»c t\xednh ảnh (URL, k\xedch thưá»c, ch\xfa th\xedchâ¦)":"Image properties (URL, size, captionâ¦)",children:(0,i.jsx)(S.A,{size:"small",onMouseDown:ey,onClick:eG,children:(0,i.jsx)(er.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Ảnh: cÄn tr\xe1i":"Image: align left",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().updateAttributes("image",{textAlign:"left"}
1).run(),className:"left"===eQ?"is-active":"",children:(0,i.jsx)(q.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Ảnh: cÄn giữa":"Image: align center",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().updateAttributes("image",{textAlign:"center"}).run(),className:"center"===eQ?"is-active":"",children:(0,i.jsx)(V.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Ảnh: cÄn phải":"Image: align right",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().updateAttributes("image",{textAlign:"right"}).run(),className:"right"===eQ?"is-active":"",children:(0,i.jsx)(J.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Ảnh: cÄn Äá»u (full khung)":"Image: full width",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>p.chain().focus().updateAttributes("image",{textAlign:"justify"}).run(),className:"justify"===eQ?"is-active":"",children:(0,i.jsx)(Y.A,{fontSize:"small"})})})]}),eJ&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.A,{orientation:"vertical",flexItem:!0,sx:{mx:.5}}),(0,i.jsx)(z.A,{title:e_?"X\xf3a ảnh/video":"Delete image/video",children:(0,i.jsx)(S.A,{size:"small",color:"error",onClick:()=>{p&&eJ&&p.chain().focus().deleteSelection().run()},children:(0,i.jsx)(ea.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"ÄÆ°a l\xean":"Move up",children:(0,i.jsx)("span",{children:(0,i.jsx)(S.A,{size:"small",onClick:()=>{if(!p||!eJ||!(eV instanceof b.nh))return;let{state:e,view:t}=p,{from:n,to:i}=eV,l=e.doc.resolve(n),r=l.depth,a=l.index(r);if(0===a)return;let s=e.doc.slice(n,i),o=n-l.node(r).child(a-1).nodeSize,c=e.tr.delete(n,i).insert(o,s.content);t.dispatch(c),p.chain().focus()},disabled:!e0,children:(0,i.jsx)(es.A,{fontSize:"small"})})})}),(0,i.jsx)(z.A,{title:e_?"ÄÆ°a xuá»ng":"Move down",children:(0,i.jsx)("span",{children:(0,i.jsx)(S.A,{size:"small",onClick:()=>{if(!p||!eJ||!(eV instanceof b.nh))return;let{state:e,view:t}=p,{from:n,to:i}=eV,l=e.doc.resolve(n),r=l.depth,a=l.index(r),s=l.node(r);if(a>=s.childCount-1)return;let o=e.doc.slice(n,i),c=s.child(a+1),d=e.tr.delete(n,i).insert(n+c.nodeSize,o.content);t.dispatch(d),p.chain().focus()},disabled:!e1,children:(0,i.jsx)(eo.A,{fontSize:"small"})})})})]}),(0,i.jsx)(w.A,{sx:{flex:1}}),r&&(0,i.jsx)(N.A,{variant:"text",size:"small",onClick:r,disabled:a,startIcon:a?(0,i.jsx)(M.A,{size:16}):(0,i.jsx)(ec.A,{}),sx:{textTransform:"none",minWidth:"auto",px:1},children:a?e_?"Äang tải...":"Uploading...":e_?"Ch\xe8n ảnh / video":"Insert image/video"})]}),e$&&(0,i.jsxs)(w.A,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.25,px:.5,py:.75,borderTop:"1px solid",borderColor:"divider",bgcolor:"action.hover"},children:[(0,i.jsx)(j.A,{component:"span",variant:"caption",sx:{fontWeight:600,color:"text.secondary",pr:.5},children:e_?"Bảng:":"Table:"}),(0,i.jsx)(z.A,{title:e_?"Th\xeam h\xe0ng ph\xeda tr\xean":"Add row above",children:(0,i.jsx)(S.A,{size:"small",onMouseDown:ey,onClick:()=>p.chain().focus().addRowBefore().run(),children:(0,i.jsx)(es.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Th\xeam h\xe0ng ph\xeda dưá»i":"Add row below",children:(0,i.jsx)(S.A,{size:"small",onMouseDown:ey,onClick:()=>p.chain().focus().addRowAfter().run(),children:(0,i.jsx)(eo.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Th\xeam cá»t b\xean tr\xe1i":"Add column left",children:(0,i.jsx)(S.A,{size:"small",onMouseDown:ey,onClick:()=>p.chain().focus().addColumnBefore().run(),children:(0,i.jsx)(ed.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"Th\xeam cá»t b\xean phải":"Add column right",children:(0,i.jsx)(S.A,{size:"small",onMouseDown:ey,onClick:()=>p.chain().focus().addColumnAfter().run(),children:(0,i.jsx)(eu.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"X\xf3a h\xe0ng hiá»n tại":"Delete current row",children:(0,i.jsx)(S.A,{size:"small",onMouseDown:ey,onClick:()=>p.chain().focus().deleteRow().run(),children:(0,i.jsx)(eh.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"X\xf3a cá»t hiá»n tại":"Delete current column",children:(0,i.jsx)(S.A,{size:"small",onMouseDown:ey,onClick:()=>p.chain().focus().deleteColumn().run(),children:(0,i.jsx)(em.A,{fontSize:"small"})})}),(0,i.jsx)(z.A,{title:e_?"X\xf3a cả bảng":"Delete table",children:(0,i.jsx)(S.A,{size:"small",color:"error",onMouseDown:ey,onClick:()=>p.chain().focus().deleteTable().run(),children:(0,i.jsx)(ea.A,{fontSize:"small"})})})]})]}):(0,i.jsx)(w.A,{className:c?"news-editor-toolbar-sticky":void 0,sx:{p:1,flexShrink:0,borderBottom:"1px solid",borderColor:"divider",bgcolor:"grey.100",minHeight:48,display:"flex",alignItems:"center",color:"text.secondary",fontSize:12,...c?{position:"sticky",top:8,zIndex:30,boxShadow:"0 2px 8px rgba(15, 23, 42, 0.08)"}:{}},children:e_?"Äang tải thanh c\xf4ng cụâ¦":"Loading toolbarâ¦"}),(0,i.jsx)(w.A,{sx:{flex:o?1:void 0,minHeight:o?0:void 0,overflow:o?"auto":"visible",WebkitOverflowScrolling:"touch"},children:(0,i.jsx)("div",{ref:u,style:{minHeight:o?200:280}})}),(0,i.jsxs)(E.A,{open:ek,onClose:eq,maxWidth:"sm",fullWidth:!0,children:[(0,i.jsxs)(D.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pr:1},children:[e_?"Thuá»c t\xednh ảnh":"Image properties",(0,i.jsx)(S.A,{size:"small","aria-label":"close",onClick:eq,children:(0,i.jsx)(j.A,{component:"span",sx:{fontSize:18,lineHeight:1},children:"\xd7"})})]}),(0,i.jsxs)(R.A,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:[(0,i.jsx)(H.A,{label:e_?"ÄÆ°á»ng dẫn (URL)":"URL",value:eM.src,onChange:e=>eE(t=>({...t,src:e.target.value})),size:"small",fullWidth:!0}),(0,i.jsx)(H.A,{label:e_?"M\xf4 tả / alt (trợ nÄng, SEO)":"Alt text (accessibility)",value:eM.alt,onChange:e=>eE(t=>({...t,alt:e.target.value})),size:"small",fullWidth:!0}),(0,i.jsx)(H.A,{label:e_?"Ch\xfa th\xedch hiá»n thá» (t\xf9y chá»n, ưu ti\xean hÆ¡n alt dưá»i ảnh)":"Visible caption (optional)",value:eM.caption,onChange:e=>eE(t=>({...t,caption:e.target.value})),size:"small",fullWidth:!0,helperText:e_?"Nếu Äá» trá»ng v\xe0 báºt ch\xfa th\xedch dưá»i ảnh, sẽ d\xf9ng alt.":"If empty and caption is shown below, alt is used."}),(0,i.jsx)(W.A,{control:(0,i.jsx)(I.A,{checked:eM.showCaption,onChange:e=>eE(t=>({...t,showCaption:e.target.checked}))}),label:e_?"Hiá»n thá» ch\xfa th\xedch dưá»i ảnh":"Show caption below image"}),(0,i.jsxs)(w.A,{sx:{display:"flex",gap:1,alignItems:"flex-start",flexWrap:"wrap"},children:[(0,i.jsx)(H.A,{label:e_?"Rá»ng (px)":"Width (px)",value:eM.width,onChange:e=>{let t=e.target.value;eE(e=>{if(!eD||!e.height)return{...e,width:t};let n=parseFloat(t),i=eH.current;if(!Number.isFinite(n)||i<=0)return{...e,width:t};let l=Math.round(n/i);return{...e,width:t,height:String(l)}})},size:"small",sx:{width:120},type:"number",inputProps:{min:48,max:2400}}),(0,i.jsx)(H.A,{label:e_?"Cao (px)":"Height (px)",value:eM.height,onChange:e=>{let t=e.target.value;eE(e=>{if(!eD||!e.width)return{...e,height:t};let n=parseFloat(t),i=eH.current;if(!Number.isFinite(n)||i<=0)return{...e,height:t};let l=Math.round(n*i);return{...e,height:t,width:String(l)}})},size:"small",sx:{width:120},type:"number",inputProps:{min:48,max:2400}}),(0,i.jsx)(z.A,{title:e_?eD?"Kh\xf3a tá»· lá» khung h\xecnh":"Má» kh\xf3a tá»· lá»":eD?"Lock aspect ratio":"Unlock aspect ratio",children:(0,i.jsx)(S.A,{size:"small",onClick:()=>eR(e=>!e),sx:{mt:.5},children:eD?(0,i.jsx)(ep.A,{fontSize:"small"}):(0,i.jsx)(ef.A,{fontSize:"small"})})})]}),(0,i.jsxs)(F.A,{children:[(0,i.jsx)(O.A,{sx:{fontSize:13,mb:.5},children:e_?"Vá» tr\xed":"Alignment"}),(0,i.jsxs)(B.A,{row:!0,value:eM.textAlign,onChange:e=>eE(t=>({...t,textAlign:ew(e.target.value)})),children:[(0,i.jsx)(W.A,{value:"justify",control:(0,i.jsx)(P.A,{size:"small"}),label:e_?"Mặc Äá»nh (full khung)":"Default (full width)"}),(0,i.jsx)(W.A,{value:"left",control:(0,i.jsx)(P.A,{size:"small"}),label:e_?"Tr\xe1i":"Left"}),(0,i.jsx)(W.A,{value:"center",control:(0,i.jsx)(P.A,{size:"small"}),label:e_?"Giữa":"Center"}),(0,i.jsx)(W.A,{value:"right",control:(0,i.jsx)(P.A,{size:"small"}),label:e_?"Phải":"Right"})]})]})]}
1),(0,i.jsxs)(U.A,{sx:{px:3,pb:2},children:[(0,i.jsx)(N.A,{variant:"outlined",color:"inherit",onClick:eq,children:e_?"Hủy":"Cancel"}),(0,i.jsx)(N.A,{variant:"contained",onClick:()=>{let e=h.current;if(!e)return;let t=m.current;if("number"!=typeof t)return;let n=e.state.doc.nodeAt(t);if(!n||"image"!==n.type.name)return void eq();let i=parseInt(eM.width,10),l=parseInt(eM.height,10),r=ew(eM.textAlign);e.chain().focus().setNodeSelection(t).updateAttributes("image",{src:eM.src.trim()||null,alt:eM.alt.trim()||null,caption:eM.caption.trim()||null,showCaption:eM.showCaption,width:Number.isFinite(i)?i:null,height:Number.isFinite(l)?l:null,textAlign:r}).run()&&(m.current=null,ez(!1))},children:e_?"\xc1p dụng":"Apply"})]})]})]})});eM.displayName="NewsContentEditorCore";let eE=eM}}]);
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.