PageSourceSearch

https://creasia.vn/_next/static/chunks/3688.a2313eb89763fddc.js

js creasia.vn collected 2026-10-07 06:59:37 UTC 7,199 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3688],{30836:function(e,s,a){var l=a(57437);const t=(0,a(2265).forwardRef)(((e,s)=>{let{className:a,errors:t,label:i,multiple:n,rightItem:r,minHeight:c=130,...o}=e;var d,m,u,h;return(0,l.jsxs)("div",{className:a,children:[(0,l.jsxs)("div",{className:"label",children:[(0,l.jsx)("span",{className:"label-text font-semibold",children:i}),(0,l.jsx)("span",{className:"label-text-alt",children:r})]}),n?(0,l.jsx)("textarea",{ref:s,...o,id:"f-"+o.name,className:"textarea textarea-bordered mt-1 h-24 w-full rounded-md",style:{minHeight:c}}):(0,l.jsx)("input",{ref:s,...o,id:"f-"+o.name,className:"input input-bordered mt-1 w-full rounded-md"}),(null===t||void 0===t||null===(d=t[null===(m=o.name)||void 0===m?void 0:m.substr(o.name.lastIndexOf(".")+1)])||void 0===d?void 0:d.message)&&(0,l.jsx)("div",{className:"label",children:(0,l.jsx)("span",{className:"label-text-alt text-error",children:null===t||void 0===t||null===(u=t[null===(h=o.name)||void 0===h?void 0:h.substr(o.name.lastIndexOf(".")+1)])||void 0===u?void 0:u.message})})]})}));s.Z=t},63688:function(e,s,a){a.r(s);var l=a(57437),t=a(2265),i=a(76446),n=a(65125),r=a(61865),c=a(89701),o=a(6734),d=a(5925),m=a(2890),u=a.n(m),h=a(72990),x=a(65093),v=a(12949),f=a(78191),g=a(17394),p=a(14277),b=a(30836),j=a(95279),N=a(65045);const w={slug:"",title:"",category:0,meta:"",content:"",image:"",sort:0,published:!1,imageFile:null};s.default=e=>{const{data:s}=e,[a,m]=(0,t.useState)(!1),{quill:y,quillRef:C}=(0,i.p)(a?n.q_:null),{quill:_,quillRef:S}=(0,i.p)(a?n.q_:null),[Z,E]=(0,t.useState)(!1),[I,k]=(0,t.useState)({name:"",content:"",image:"",position:""}),[L,q]=(0,t.useState)({name:"",content:"",image:"",position:""}),O=g.articleValidateSchema,{formState:A,handleSubmit:F,reset:H,watch:P,setValue:R}=(0,r.cI)({mode:"onSubmit",defaultValues:w,resolver:(0,c.X)(O)}),{isLoading:D,isSubmitting:V}=A,{...X}=P(),J=async e=>{e.image=((null===e||void 0===e?void 0:e.image)||"").replace(x.Z.FILE_BASE_URL,""),e.type="about";const s=await o.Z.createArticle(e);s.error&&d.Am.error(s.error)},M=async(e,s)=>{const a=await j.Z.uploadFile(e);if(a.error)return void d.Am.error(a.error);"function"===typeof s&&s(a)},T=(e,s)=>{k((a=>({...a,[s]:e})))},B=(e,s)=>{q((a=>({...a,[s]:e})))},U=D||V||Z,z=(0,t.useCallback)(u().debounce((()=>{E(!1),F(J)()}),5e3),[F]),G=(0,t.useCallback)(u().debounce((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=JSON.stringify(e);R("content",s)}),2e3),[R]);(0,t.useLayoutEffect)((()=>{m(!0)}),[]),(0,t.useLayoutEffect)((()=>{s&&a?H({...u().cloneDeep(s),image:(null===s||void 0===s?void 0:s.image)||""}):a&&H(u().cloneDeep(w))}),[s,a]),(0,t.useEffect)((()=>{if(s){const t=JSON.parse((null===s||void 0===s?void 0:s.content)||"{}");if(t[0]&&t[1]){k(t[0]||{...I}),q(t[1]||{...L});try{var e,a;(0,N.v)(y,null===(e=t[0])||void 0===e?void 0:e.content),(0,N.v)(_,null===(a=t[1])||void 0===a?void 0:a.content)}catch(l){return void d.Am.error(l)}}}}),[y,_,null===s||void 0===s?void 0:s.content]),(0,t.useEffect)((()=>{y&&y.on("text-change",(()=>{k((e=>({...e,content:y.root.innerHTML})))}))}),[k,y]),(0,t.useEffect)((()=>{_&&_.on("text-change",(()=>{q((e=>({...e,content:_.root.innerHTML})))}))}),[q,_]),(0,t.useEffect)((()=>{z()}),[X.content]),(0,t.useEffect)((()=>{E(!0);const e=u().cloneDeep({0:I,1:L});G(e)}),[I,L]);const K=(0,l.jsxs)("div",{className:"col-span-6",children:[(0,l.jsx)("p",{className:"text-base font-semibold",children:"Leadership 1"}),(0,l.jsxs)("div",{className:"flex flex-wrap",children:[(0,l.jsx)("div",{className:"w-1/2 pe-2",children:(0,l.jsx)(b.Z,{value:I.name,onChange:e=>T(e.target.value,"name"),label:"Name"})}),(0,l.jsx)("div",{className:"w-1/2 ps-2",children:(0,l.jsx)(b.Z,{value:I.position,onChange:e=>T(e.target.value,"position"),label:"Position"})}),(0,l.jsxs)("div",{className:"relative w-1/2 pe-2",children:[(0,l.jsx)("p",{className:"px-1 text-sm",children:"Content"}),(0,l.jsx)("div",{ref:C,className:"mb-2 h-[300px_!important]"}),U?(0,l.jsx)("div",{className:"absolute bottom-2 right-2 flex h-10 w-10 items-center justify-center",children:(0,l.jsx)(f.Z,{})}):(0,l.jsx)("div",{className:"absolute bottom-2 right-2 flex h-10 w-10 items-center justify-center",children:(0,l.jsx)(p.Z,{})})]}),(0,l.jsxs)("div",{className:"w-1/2 ps-2",children:[(0,l.jsx)("p",{className:"px-1 text-sm",children:"Image"}),(0,l.jsxs)("div",{className:"relative flex flex-wrap",children:[!I.image&&(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsx)("input",{id:"addImage_1",type:"file",hidden:!0,accept:"image/*",onChange:e=>{let{target:{files:s}}=e;s[0]&&M(s[0],(e=>{k((s=>({...s,image:e})))}))}}),(0,l.jsx)("label",{className:"btn btn-lg btn-block",htmlFor:"addImage_1",children:(0,l.jsx)(v.sOP,{className:"h-8 w-8"})})]}),I.image&&(0,l.jsxs)("div",{className:"relative h-[30vh] w-full overflow-hidden rounded-lg",children:[(0,l.jsx)("img",{src:(0,h.qm)(I.image),alt:"",className:"h-full w-full bg-gray-200 object-contain"}),(0,l.jsx)("button",{className:"absolute right-0 top-0 h-8 w-8 rounded-lg bg-red-500/80 text-white shadow-md hover:bg-red-500",type:"button",onClick:()=>k((e=>({...e,image:""}))),children:"X"})]})]})]})]})]}),Q=(0,l.jsxs)("div",{className:"col-span-6",children:[(0,l.jsx)("p",{className:"text-base font-semibold",children:"Leadership 2"}),(0,l.jsxs)("div",{className:"flex flex-wrap",children:[(0,l.jsx)("div",{className:"w-1/2 pe-2",children:(0,l.jsx)(b.Z,{value:L.name,onChange:e=>B(e.target.value,"name"),label:"Name"})}),(0,l.jsx)("div",{className:"w-1/2 ps-2",children:(0,l.jsx)(b.Z,{value:L.position,onChange:e=>B(e.target.value,"position"),label:"Position"})}),(0,l.jsxs)("div",{className:"relative w-1/2 pe-2",children:[(0,l.jsx)("p",{className:"px-1 text-sm",children:"Content"}),(0,l.jsx)("div",{ref:S,className:"mb-2 h-[300px_!important]"}),U?(0,l.jsx)("div",{className:"absolute bottom-2 right-2 flex h-10 w-10 items-center justify-center",children:(0,l.jsx)(f.Z,{})}):(0,l.jsx)("div",{className:"absolute bottom-2 right-2 flex h-10 w-10 items-center justify-center",children:(0,l.jsx)(p.Z,{})})]}),(0,l.jsxs)("div",{className:"w-1/2 ps-2",children:[(0,l.jsx)("p",{className:"px-1 text-sm",children:"Image"}),(0,l.jsxs)("div",{className:"relative flex flex-wrap",children:[!L.image&&(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsx)("input",{id:"addImage_2",type:"file",hidden:!0,accept:"image/*",onChange:e=>{let{target:{files:s}}=e;s[0]&&M(s[0],(e=>{q((s=>({...s,image:e})))}))}}),(0,l.jsx)("label",{className:"btn btn-lg btn-block",htmlFor:"addImage_2",children:(0,l.jsx)(v.sOP,{className:"h-8 w-8"})})]}),L.image&&(0,l.jsxs)("div",{className:"relative h-[30vh] w-full overflow-hidden rounded-lg",children:[(0,l.jsx)("img",{src:(0,h.qm)(L.image),alt:"",className:"h-full w-full bg-gray-200 object-contain"}),(0,l.jsx)("button",{className:"absolute right-0 top-0 h-8 w-8 rounded-lg bg-red-500/80 text-white shadow-md hover:bg-red-500",type:"button",onClick:()=>q((e=>({...e,image:""}))),children:"X"})]})]})]})]})]});return(0,l.jsxs)("div",{className:"grid w-full grid-cols-6",children:[(0,l.jsx)("p",{className:"text-lg font-semibold",children:"Leadership"}),K,Q]})}}}]);

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.