1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[223],{70223:function(e,t,s){s.d(t,{Z:function(){return ew}});var l=s(85893),a=s(67294),i=s(22789),n=s(27662),r=s(54929),o=s(93237),c=s(24433),d=e=>{let{onUpdate:t,defaultTitle:s=""}=e,a=(0,c.Z)(),i=(0,n.jE)({extensions:[r.Z,o.Z.configure({placeholder:a.pageSubmission["New post title hereâ¦"]})],editorProps:{attributes:{class:"focus:outline-none max-w-screen-md mx-auto text-neutral-900 font-semibold text-2xl sm:text-3xl lg:text-4xl xl:leading-[115%] xl:text-[2.75rem] dark:text-neutral-100"}},immediatelyRender:!1,content:s,onUpdate:e=>{let{editor:s}=e;t(s)}});return(0,l.jsx)(n.kg,{className:"focus:outline-none",editor:i})},u=s(23279),m=s.n(u),h=s(73359),g=s(48405),v=s(38714),p=s(35199),x=s(8532);let f=x.NC_SITE_SETTINGS["submissions-settings"]?.max_tags_allowed||5;var w=e=>{let{onChange:t,defaultValue:s}=e,n=(0,c.Z)(),[r,{loading:o,error:d,data:u,fetchMore:m,called:x}]=(0,h.t)(v.Gi,{notifyOnNetworkStatusChange:!0,context:{fetchOptions:{method:"GET"}},variables:{first:50}}),[w,b]=(0,a.useState)(""),j=(0,a.useRef)(null),k=(0,a.useRef)(null),[y,S]=(0,a.useState)(!1),[C,N]=(0,a.useState)(s||[]);(0,a.useEffect)(()=>{y&&r()},[y]),(0,a.useEffect)(()=>{C.length>=f&&S(!1),t(C)},[C.length]);let H=e=>C.some(t=>t.name===e.name),z=e=>{let t=(e.name||"").replace(/,/g,"").trim();t&&(H({...e,name:t})||N(s=>[...s,{...e,name:t}]),b(""),k.current?.focus())};(0,a.useEffect)(()=>(_&&document.removeEventListener("click",_),y&&document.addEventListener("click",_),()=>{document.removeEventListener("click",_)}),[y]);let _=e=>{!y||!j.current||j.current.contains(e.target)||k.current?.contains(e.target)||S(!1)},M=e=>{N(C.filter(t=>t.name!==e.name)),setTimeout(()=>{k.current?.focus()},100)},A=u?.tags?.nodes||[],Z=C.length>=f;return(0,l.jsxs)("div",{className:"relative w-full text-xs sm:text-sm",children:[(0,l.jsxs)("ul",{className:"flex flex-wrap gap-1.5",children:[C.map(e=>(0,l.jsxs)("li",{className:"flex items-center justify-center rounded-lg bg-neutral-100 px-3 py-2 dark:bg-neutral-800",children:["# ",e.name,(0,l.jsx)("button",{className:"ms-1 flex items-center justify-center px-1 text-base hover:text-neutral-900 dark:hover:text-neutral-50",onClick:()=>M(e),title:"Remove tag",children:(0,l.jsx)(p.Z,{className:"h-4 w-4"})})]},e.databaseId)),!Z&&(0,l.jsx)("li",{children:(0,l.jsx)("input",{ref:k,value:w,onChange:e=>{let t=e.target.value;if(t.endsWith(",")){z({databaseId:Date.now(),name:t,__typename:"Tag"}),b("");return}/^[a-zA-Z0-9\s]*$/.test(t)&&b(t)},className:`${C.length?"px-3":"px-0"} h-full border-none bg-transparent py-2 text-base text-neutral-600 hover:text-neutral-900 focus:outline-none focus:ring-0 disabled:cursor-not-allowed dark:text-neutral-400 dark:hover:text-neutral-300`,type:"text",placeholder:C.length?`${n.pageSubmission["Add tag"]} (${C.length}/${f})`:`${n.pageSubmission["Add tags"]} (${C.length}/${f})...`,onFocus:function(){S(!0)},onKeyUp:e=>{("Enter"===e.key||"Tab"===e.key)&&(z({databaseId:Date.now(),name:e.currentTarget.value,__typename:"Tag"}),b(""))}})})]}),(0,l.jsxs)("i",{className:"my-1 text-[10px] sm:hidden",children:["(For add a tag, press the ",(0,l.jsx)("code",{children:'"Enter"'})," or ",(0,l.jsx)("code",{children:'","'})," key after typing.)"]}),y&&(0,l.jsxs)("div",{ref:j,className:"absolute inset-x-0 top-full z-50 mt-4 space-y-5 rounded-2xl bg-white p-5 shadow-lg ring-1 ring-black/[0.03] dark:bg-neutral-800",children:[(0,l.jsx)("h3",{className:"text-xl font-semibold",children:n.Tags}),(0,l.jsx)("div",{className:"w-full border-b border-neutral-300 dark:border-neutral-700"}),!!d&&(0,l.jsx)("p",{className:"text-red-500",children:d.message}),!!o&&!A.length&&(0,l.jsx)(g.Z,{}),A.length?(0,l.jsx)("ul",{className:"flex flex-wrap gap-2",children:A.map(e=>{let t=H(e);return(0,l.jsx)("li",{children:(0,l.jsxs)("button",{className:`flex items-center justify-center rounded-lg px-3 py-2 ${t?"bg-neutral-900 text-neutral-50":"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-700 dark:hover:bg-neutral-600"}`,onClick:()=>{if(t){M(e);return}Z||z(e)},children:["#"," ",e.name," (",e.count||0,")"]})},e.databaseId)})}):null,u?.tags?.pageInfo.hasNextPage?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"w-full border-b border-neutral-300 dark:border-neutral-700"}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(i.Z,{loading:o,onClick:()=>{m({variables:{after:u?.tags?.pageInfo?.endCursor},updateQuery:(e,t)=>{let{fetchMoreResult:s}=t;return s&&s?.tags?.nodes?{tags:{...s.tags,nodes:[...e?.tags?.nodes||[],...s.tags.nodes]}}:e}})},children:n.pageSubmission["Load more tags"]})})]}):null]})]})},b=s(53195),j=s(76415);let k=x.NC_SITE_SETTINGS["submissions-settings"]?.max_categories_allowed||5;var y=e=>{let{onChange:t,defaultValue:s}=e,n=(0,c.Z)(),[r,{loading:o,error:d,data:u,fetchMore:m,called:p}]=(0,h.t)(v.yr,{notifyOnNetworkStatusChange:!0,context:{fetchOptions:{method:"GET"}},variables:{first:50}}),x=(0,a.useRef)(null),f=(0,a.useRef)(null),[w,y]=(0,a.useState)(!1),[S,C]=(0,a.useState)(s||[]);(0,a.useEffect)(()=>{w&&r()},[w]),(0,a.useEffect)(()=>{t(S)},[S.length]);let N=e=>S.some(t=>
1t.databaseId===e.databaseId),H=e=>{N(e)||C(t=>[...t,e]),f.current&&(f.current.value="",f.current.focus())},z=e=>{C(S.filter(t=>t.databaseId!==e.databaseId)),setTimeout(()=>{f.current?.focus()},100)};(0,a.useEffect)(()=>(_&&document.removeEventListener("click",_),w&&document.addEventListener("click",_),()=>{document.removeEventListener("click",_)}),[w]);let _=e=>{!w||!x.current||x.current.contains(e.target)||f.current?.contains(e.target)||y(!1)},M=u?.categories?.nodes||[],A=S.length>=k;return(0,l.jsx)("div",{className:"relative w-full text-xs sm:text-sm",children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("ul",{className:"flex flex-wrap gap-1.5",children:[S.map(e=>(0,l.jsxs)("li",{className:"flex items-center justify-center rounded-lg bg-neutral-100 px-3 py-2 dark:bg-neutral-800",children:[e.name,(0,l.jsx)("button",{className:"ms-1 flex items-center justify-center px-1 text-base hover:text-neutral-900 dark:hover:text-neutral-50",onClick:()=>z(e),title:n.pageSubmission["Remove category"],children:(0,l.jsx)(j.Z,{className:"h-4 w-4"})})]},e.databaseId)),(0,l.jsx)("li",{children:(0,l.jsx)("button",{ref:f,onClick:function(){y(!0)},className:`${S.length?"px-3":""} h-full border-none bg-transparent py-2 text-base text-neutral-600 hover:text-neutral-900 focus:outline-none focus:ring-0 disabled:cursor-not-allowed dark:text-neutral-400 dark:hover:text-neutral-300`,type:"button",disabled:A,children:`${n.pageSubmission["Add categories"]} (${S.length}/${k})`})})]}),(0,l.jsx)(b.u,{as:a.Fragment,show:!A&&w,children:(0,l.jsxs)("div",{ref:x,className:"absolute inset-x-0 top-full z-50 mt-4 space-y-5 rounded-2xl bg-white p-5 shadow-lg ring-1 ring-black/[0.03] dark:bg-neutral-800",children:[(0,l.jsx)("h3",{className:"text-xl font-semibold",children:n.pageSubmission.Categories}),(0,l.jsx)("div",{className:"w-full border-b border-neutral-300 dark:border-neutral-700"}),!!d&&(0,l.jsx)("p",{className:"text-red-500",children:d.message}),!!o&&!M.length&&(0,l.jsx)(g.Z,{}),M.length?(0,l.jsx)("ul",{className:"flex flex-wrap gap-2",children:M.map(e=>{let t=N(e);return(0,l.jsx)("li",{children:(0,l.jsxs)("button",{className:`flex items-center justify-center rounded-lg px-3 py-2 ${t?"bg-neutral-900 text-neutral-50":"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-700 dark:hover:bg-neutral-600"}`,onClick:()=>{if(t){z(e);return}A||H(e)},children:[e.name," (",e.count||0,")"]})},e.databaseId)})}):null,u?.categories?.pageInfo.hasNextPage?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"w-full border-b border-neutral-300 dark:border-neutral-700"}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(i.Z,{loading:o,onClick:()=>{m({variables:{after:u?.categories?.pageInfo?.endCursor},updateQuery:(e,t)=>{let{fetchMoreResult:s}=t;return s&&s?.categories?.nodes?{categories:{...s.categories,nodes:[...e?.categories?.nodes||[],...s.categories.nodes]}}:e}})},fontSize:"text-sm font-medium",children:n.pageSubmission["Load more categories"]})})]}):null]})})]})})},S=s(93091),C=s(99203),N=s(4194),H=s(65433),z=s(35357),_=s(60008),M=s(17936),A=s(904),Z=s(96958),I=s(67777),L=s(86501);let T=["standard","video","audio","gallery"],V=[{id:1,name:"style1",title:"Style 1"},{id:2,name:"style2",title:"Style 2"},{id:3,name:"style3",title:"Style 3"},{id:4,name:"style4",title:"Style 4"}];var B=e=>{let{onSubmit:t,defaultData:s}=e,n=(0,c.Z)(),[r,o]=(0,a.useState)(s.postFormatsSelected||"standard"),[d,u]=(0,a.useState)(s.timeSchedulePublication),[h,g]=(0,a.useState)(s.excerptText),[v,p]=(0,a.useState)(s.videoUrl),[f,w]=(0,a.useState)(s.audioUrl),[j,k]=(0,a.useState)(s.objGalleryImgs),[y,B]=(0,a.useState)(s.isAllowComments),[F,U]=(0,a.useState)(!!s.showRightSidebar),[P,E]=(0,a.useState)(V.find(e=>e.name===(s.postStyleSelected||"style1"))),G=m()(function(e){g(e)},200),R=m()(function(e){p(e)},200),$=m()(function(e){w(e)},200),O=()=>{t({postFormatsSelected:r,excerptText:h,videoUrl:v,audioUrl:f,objGalleryImgs:j,isAllowComments:y,timeSchedulePublication:d,showRightSidebar:F,postStyleSelected:P?.name||"style1"}),L.ZP.success("Post options applied!")},D=()=>{},Y=()=>{let e=e=>{let t=e.replace(/^post-format-/g,""),s=x.NC_SITE_SETTINGS["submissions-settings"]?.post_options?.filter(e=>e?.name==="Post_Format")[0];if(!s)return!0;let l=s?.options?.filter(e=>e?.name===t)[0];return!l||!l.enable};return(0,l.jsxs)("div",{children:[(0,l.jsx)(z.Z,{className:"block capitalize",title:n.pageSubmission["Post format"],children:n.pageSubmission["Post format"]}),(0,l.jsx)(S.Ri,{value:r,onChange:o,children:(0,l.jsxs)("div",{className:"relative z-10 mt-1",children:[(0,l.jsx)(S.Y4,{as:"div",children:(0,l.jsxs)(A.Z,{pattern:"third",fontSize:"text-sm font-medium",children:[(0,l.jsx)("span",{className:"block truncate capitalize",children:r.replace(/^post-format-/g,"")}),(0,l.jsx)(I.Z,{className:"-me-1 ms-2 h-4 w-4","aria-hidden":"true"})]})}),(0,l.jsx)(b.u,{as:a.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,l.jsx)(S.O_,{anchor:{to:"bottom start",ga
1p:"4px"},className:"absolute end-0 z-50 mt-2 max-h-96 w-52 overflow-auto rounded-xl bg-white py-1 text-sm text-neutral-900 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-neutral-900 dark:text-neutral-200 dark:ring-neutral-700",children:T.map((t,s)=>e(t)?null:(0,l.jsx)(S.wt,{className:"relative cursor-default select-none py-2 pe-4 ps-10 data-[focus]:bg-primary-50 data-[focus]:text-primary-700 dark:data-[focus]:bg-neutral-700 dark:data-[focus]:text-neutral-200",value:t,children:e=>{let{selected:s}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:`block truncate capitalize ${s?"font-medium":"font-normal"}`,children:t.replace(/^post-format-/g,"")}),s?(0,l.jsx)("span",{className:"absolute inset-y-0 start-0 flex items-center ps-3 text-primary-700 dark:text-neutral-200",children:(0,l.jsx)(N.Z,{className:"h-5 w-5","aria-hidden":"true"})}):null]})}},s))})})]})})]})},q=()=>(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-base font-semibold",children:n.pageSubmission["Gallery images"]}),(0,l.jsx)("div",{className:"customScrollBar flex snap-x gap-x-2.5 overflow-x-auto py-2",children:["image1","image2","image3","image4","image5","image6","image7","image8"].map((e,t)=>(0,l.jsxs)("div",{className:"flex h-full w-48 flex-shrink-0 snap-start flex-col",children:[(0,l.jsx)(z.Z,{children:`${n.Image} ${t+1}`}),(0,l.jsx)(M.Z,{defaultImage:j?.[e]||void 0,onChangeImage:t=>{k(s=>({...s||{},[e]:t}))},contentClassName:"p-3"})]},e))})]}),W=()=>{let e=h?.trim()?.replace(/^<[^>]+>|<\/[^>]+>$/g,"")||"";return(0,l.jsxs)("div",{children:[(0,l.jsx)(z.Z,{htmlFor:"excerpt",className:"block capitalize",children:n.pageSubmission["Write an excerpt (optional)"]}),(0,l.jsx)(_.Z,{onChange:e=>{G(e.currentTarget.value)},defaultValue:e,className:"mt-1",placeholder:"...",name:"excerpt",id:"excerpt"})]})},J=()=>(0,l.jsxs)("div",{children:[(0,l.jsxs)(z.Z,{htmlFor:"Schedule-time",children:[n.pageSubmission["Schedule Publication"]," (UTC+0)"]}),(0,l.jsx)(H.Z,{onChange:e=>{u(e.currentTarget.value)},defaultValue:d,className:"mt-1",type:"datetime-local",id:"Schedule-time",name:"Schedule-time",min:new Date().toISOString().slice(0,16)})]}),Q=()=>(0,l.jsxs)("div",{children:[(0,l.jsx)(z.Z,{htmlFor:"video-url",className:"block capitalize",title:n.pageSubmission["Video URL (Youtube, Vimeo, mp4 ... )"],children:n.pageSubmission["Video URL (Youtube, Vimeo, mp4 ... )"]}),(0,l.jsx)(H.Z,{onChange:e=>{R(e.currentTarget.value)},defaultValue:v,className:"mt-1",placeholder:n.pageSubmission["Video url..."],type:"url",name:"video-url",id:"video-url"})]}),K=()=>{let e="mp3/mp4/Youtube";return(0,l.jsxs)("div",{children:[(0,l.jsx)(z.Z,{className:"block capitalize",title:`Audio URL (${e})`,htmlFor:"audio-url",children:`Audio URL (${e})`}),(0,l.jsx)(H.Z,{onChange:e=>{$(e.currentTarget.value)},defaultValue:f,className:"mt-1",placeholder:n.pageSubmission["Audio url..."],type:"url",name:"audio-url",id:"audio-url"})]})},X=()=>(0,l.jsxs)("div",{className:"flex items-center gap-3 sm:gap-8",children:[(0,l.jsx)(z.Z,{htmlFor:"allow-comments",className:"block capitalize",children:n.pageSubmission["Allow comments"]}),(0,l.jsxs)(C.rs,{checked:y,onChange:B,className:`${y?"bg-primary-700":"bg-gray-700"} relative inline-flex h-[38px] w-[74px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,name:"allow-comments",id:"allow-comments",children:[(0,l.jsx)("span",{className:"sr-only",children:"Allow comments"}),(0,l.jsx)("span",{"aria-hidden":"true",className:`${y?"translate-x-9 rtl:-translate-x-9":"translate-x-0"} pointer-events-none inline-block h-[34px] w-[34px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})]}),ee=()=>(0,l.jsxs)("div",{children:[(0,l.jsx)(z.Z,{className:"block capitalize",title:n.pageSubmission["Post style"],children:n.pageSubmission["Post style"]}),(0,l.jsx)(S.Ri,{value:P,onChange:e=>{E(e)},children:(0,l.jsxs)("div",{className:"relative z-10 mt-1",children:[(0,l.jsx)(S.Y4,{as:"div",children:(0,l.jsxs)(A.Z,{pattern:"third",fontSize:"text-sm font-medium capitalize",children:[P?.title||V[0].title,(0,l.jsx)(I.Z,{className:"-me-1 ms-2 h-4 w-4","aria-hidden":"true"})]})}),(0,l.jsx)(b.u,{as:a.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,l.jsx)(S.O_,{anchor:{to:"bottom start",ga
1p:"4px"},className:"absolute end-0 z-50 mt-2 max-h-96 w-52 overflow-auto rounded-xl bg-white py-1 text-sm text-neutral-900 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-neutral-900 dark:text-neutral-200 dark:ring-neutral-700",children:V.map((e,t)=>(0,l.jsx)(S.wt,{className:"relative cursor-default select-none py-2 pe-4 ps-10 data-[focus]:bg-primary-50 data-[focus]:text-primary-700 dark:data-[focus]:bg-neutral-700 dark:data-[focus]:text-neutral-200",value:e,children:t=>{let{selected:s}=t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:`${s?"font-medium":"font-normal"} block truncate capitalize`,children:e.title}),s?(0,l.jsx)("span",{className:"absolute inset-y-0 start-0 flex items-center ps-3 text-primary-700 dark:text-neutral-200",children:(0,l.jsx)(N.Z,{className:"h-5 w-5","aria-hidden":"true"})}):null]})}},t))})}),(0,l.jsx)("span",{children:(0,l.jsx)("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:n.pageSubmission["Choose the post style. Only applies to Standard format!"]})})]})})]}),et=()=>(0,l.jsxs)("div",{className:"flex items-center gap-3 sm:gap-8",children:[(0,l.jsx)(z.Z,{htmlFor:"show-right-sidebar",className:"block capitalize",children:n.pageSubmission["Show right sidebar"]}),(0,l.jsxs)(C.rs,{checked:F,onChange:U,className:`${F?"bg-primary-700":"bg-gray-700"} relative inline-flex h-[38px] w-[74px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,name:"show-right-sidebar",id:"show-right-sidebar",children:[(0,l.jsx)("span",{className:"sr-only",children:"Show right sidebar"}),(0,l.jsx)("span",{"aria-hidden":"true",className:`${F?"translate-x-9 rtl:-translate-x-9":"translate-x-0"} pointer-events-none inline-block h-[34px] w-[34px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})]}),es=e=>(x.NC_SITE_SETTINGS["submissions-settings"]?.post_options?.filter(t=>t?.name===e&&t?.enable)?.length||0)>0;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Z.Z,{containerClassName:"flex",contentPaddingClass:"",contentExtraClass:"max-w-screen-md",renderContent:()=>(0,l.jsx)("div",{className:"",children:(0,l.jsxs)("div",{className:"relative flex flex-col space-y-5 px-5 py-6",children:[W(),es("Schedule_Publication")&&J(),es("Post_Format")&&Y(),es("Allow_Comments")&&X(),"gallery"===r&&q(),"video"===r&&Q(),"audio"===r&&K(),"standard"===r&&es("Post_Style")&&ee(),es("Show_Right_Sidebar")&&et()]})}),renderTrigger:e=>(0,l.jsx)(A.Z,{sizeClass:"px-3 sm:px-4",className:"flex-shrink-0 !rounded-2xl",title:n.pageSubmission["Post options"],pattern:"third",onClick:e,children:(0,l.jsxs)("svg",{className:"h-6 w-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M12.0002 22.6298C11.3302 22.6298 10.6502 22.4798 10.1202 22.1698L4.62023 18.9998C2.38023 17.4898 2.24023 17.2598 2.24023 14.8898V9.1098C2.24023 6.7398 2.37023 6.5098 4.57023 5.0198L10.1102 1.8198C11.1602 1.2098 12.8102 1.2098 13.8602 1.8198L19.3802 4.9998C21.6202 6.5098 21.7602 6.7398 21.7602 9.1098V14.8798C21.7602 17.2498 21.6302 17.4798 19.4302 18.9698L13.8902 22.1698C13.3502 22.4798 12.6702 22.6298 12.0002 22.6298ZM12.0002 2.8698C11.5802 2.8698 11.1702 2.9498 10.8802 3.1198L5.38023 6.2998C3.75023 7.3998 3.75023 7.3998 3.75023 9.1098V14.8798C3.75023 16.5898 3.75023 16.5898 5.42023 17.7198L10.8802 20.8698C11.4702 21.2098 12.5402 21.2098 13.1302 20.8698L18.6302 17.6898C20.2502 16.5898 20.2502 16.5898 20.2502 14.8798V9.1098C20.2502 7.3998 20.2502 7.3998 18.5802 6.2698L13.1202 3.1198C12.8302 2.9498 12.4202 2.8698 12.0002 2.8698Z",fill:"currentColor"}),(0,l.jsx)("path",{d:"M12 15.75C9.93 15.75 8.25 14.07 8.25 12C8.25 9.93 9.93 8.25 12 8.25C14.07 8.25 15.75 9.93 15.75 12C15.75 14.07 14.07 15.75 12 15.75ZM12 9.75C10.76 9.75 9.75 10.76 9.75 12C9.75 13.24 10.76 14.25 12 14.25C13.24 14.25 14.25 13.24 14.25 12C14.25 10.76 13.24 9.75 12 9.75Z",fill:"currentColor"})]})}),modalTitle:"Post options",renderFooter:e=>(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(A.Z,{pattern:"link",onClick:()=>{D(),e()},children:n.Cancel}),(0,l.jsx)(i.Z,{type:"submit",onClick:()=>{O(),e()},children:n.Apply})]})})})},F=s(5865),U=s(25424),P=s(48510),E=s(85915),G=s(96279),R=s(26761),$=s(60363),O=s(33991),D=s(658),Y=s(43626),q=s(8045),W=F.NB.create({name:"iframe",group:"block",atom:!0,addOptions:()=>({allowFullscreen:!0,HTMLAttributes:{class:"nc-iframe-wrapper"}}),addAttributes(){return{src:{default:null},frameborder:{default:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML:()=>[{tag:"iframe"}],renderHTML(e){let{HTMLAttributes:t}=e;return["div",this.options.HTMLAttributes,["iframe",{...t,width:640,height:360}]]},addCommands(){return{setIframe:e=>t=>{let{tr:s,dispatch:l}=t,{selection:a}=s,i=this.type.create(e);return l&&s.replaceRangeWith(a.from,a.to,i),!0}}}}),J=s(52678),Q=e=>{let{action:t,children:s}=e,[i,n]=(0,a.useState)(!1);function r(){n(!1)}return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"inline-flex",onClick:function(){n(!0)},children:s}),(0,l.jsx)(J.Z,{onClickApply:e=>{let{url:s,alt:l}=e;t({url:s,alt:l}),r()},open:i,hanldeClose:r,onDelete:()=>{t({url:"",alt:""}),r()}})]})},K=e=>{let{icon:t,action:s,title:a,isActive:i,className:n="flex-shrink-0 mr-2"}=e;return"image"===a?(0,l.jsx)(Q,{action:s,children:(0,l.jsx)("button",{className:`menu-item ${n} ${i&&i()?"is-active":""}`,title:a,children:(0,l.jsx)("div",{className:"menu-item-svg",dangerouslySetInnerHTML:{__html:t}})})}):(0,l.jsx)("button",{className:`menu-item ${n} ${i&&i()?"is-active":""}`,onClick:s,title:a,children:(0,l.jsx)("div",{className:"menu-item-svg",dangerouslySetInnerHTML:{__html:t}})})},X=s(69026),ee=e=>{let{data:t=[],editor:s}=e;return(0,l.jsxs)(X.v2,{as:"div",className:"relative ms-auto hidden text-start lg:inline-block",children:[(0,l.jsx)(X.j2,{className:"menu-item ms-auto",title:"more",children:(0,l.jsx)("div",{className:"menu-item-svg",children:(0,l.jsx)("svg",{className:"crayons-icon c-btn__icon","aria-hidden":"true",focusable:"false",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 17a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm0-7a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm2-5a2 2 0 1 0-4 0 2 2
10 0 0 4 0Z"})})})}),(0,l.jsx)(b.u,{as:a.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,l.jsx)(X.sd,{className:"absolute end-0 top-0 z-40 w-auto origin-top-right divide-y divide-neutral-100 rounded-2xl bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none rtl:origin-top-left dark:bg-neutral-900 dark:ring-white dark:ring-opacity-10",children:(0,l.jsx)("div",{className:"flex items-center p-2.5 text-sm text-neutral-600 dark:text-neutral-300",children:t.map((e,t)=>(0,l.jsx)(X.sN,{as:"div",children:"divider"===e.type?(0,l.jsx)("div",{className:"divider"}):(0,l.jsx)(K,{icon:e.icon,action:e.action,title:e.title,isActive:e.isActive,className:"mr-0.5"})},t))})})})]})},et=e=>{let{action:t,icon:s,title:i,isActive:n,editor:r}=e,[o]=(0,a.useState)([{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z"/></svg>',title:"Heading 1",action:()=>r.chain().focus().toggleHeading({level:1}).run(),isActive:()=>r.isActive("heading",{level:1})},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z"/></svg>',title:"Heading 2",action:()=>r.chain().focus().toggleHeading({level:2}).run(),isActive:()=>r.isActive("heading",{level:2})},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"/></svg>',title:"Heading 3",action:()=>r.chain().focus().toggleHeading({level:3}).run(),isActive:()=>r.isActive("heading",{level:3})},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z"/></svg>',title:"Heading 4",action:()=>r.chain().focus().toggleHeading({level:4}).run(),isActive:()=>r.isActive("heading",{level:4})},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"/></svg>',title:"Heading 5",action:()=>r.chain().focus().toggleHeading({level:5}).run(),isActive:()=>r.isActive("heading",{level:5})},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z"/></svg>',title:"Heading 6",action:()=>r.chain().focus().toggleHeading({level:6}).run(),isActive:()=>r.isActive("heading",{level:6})}]);return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(X.v2,{as:"div",className:"relative inline-block text-left",children:[(0,l.jsx)(X.j2,{as:"div",children:(0,l.jsx)(K,{icon:s,title:i,isActive:n,action:t})}),(0,l.jsx)(b.u,{as:a.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,l.jsx)(X.sd,{anchor:"bottom",portal:!0,className:"absolute right-0 my-5 w-44 rounded-2xl bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:w-52 dark:bg-neutral-800",children:(0,l.jsx)("div",{className:"grid grid-cols-3 gap-1 p-3",children:o.map(e=>(0,l.jsx)(X.sN,{children:t=>{let{focus:s}=t;return(0,l.jsx)("button",{className:`${s||e.isActive&&e.isActive()?"bg-primary-100 text-primary-900 dark:bg-neutral-700":""} flex w-full items-center justify-center rounded-lg p-1.5 text-sm text-neutral-900 hover:bg-primary-100 hover:text-primary-900 sm:p-2 sm:text-base dark:text-white dark:hover:bg-neutral-700`,onClick:e.action,children:(0,l.jsx)("div",{className:"menu-item-svg flex h-5 w-5 flex-shrink-0 items-center justify-center sm:h-6 sm:w-6",dangerouslySetInnerHTML:{__html:e.icon}})})}},e.title))})})})]})})},es=e=>{let{show:t,onCloseModal:s,onSubmit:n}=e,[r,o]=(0,a.useState)(""),d=(0,c.Z)(),u=e=>{e.preventDefault(),n(r),s()};return(0,l.jsx)(Z.Z,{renderTrigger:()=>null,isOpenProp:t,renderContent:()=>(0,l.jsxs)("form",{action:"/#",onSubmit:u,children:[(0,l.jsx)(z.Z,{children:d.pageSubmission["Type the URL of the iframe you want to embed"]}),(0,l.jsx)(H.Z,{required:!0,className:"mt-1",type:"url",onChange:e=>o(e.currentTarget.value),autoFocus:!0,"data-autofocus":!0}),(0,l.jsxs)("div",{className:"mt-6 flex justify-between space-x-3",children:[(0,l.jsx)(A.Z,{pattern:"link",type:"button",onClick:s,children:d.Cancel}),(0,l.jsx)(i.Z,{type:"submit",children:d.Apply})]})]}),onCloseModal:s,contentExtraClass:"max-w-screen-sm",modalTitle:d.pageSubmission["Iframe URL"]})},el=e=>{let{onSubmit:t,isOpen:s,onCloseModal:n,defaultLink:r}=e,o=(0,c.Z)(),[d,u]=(0,a.useState)(""),[m,h]=(0,a.useState)(!1);function g(){n()}(0,a.useEffect)(()=>{u(r)},[r]);let v=()=>{t(d,m),g()},p=()=>{t("",!1),g()},x=()=>(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("form",{className:"block",onSubmit:e=>{e.preventDefault(),v()},action:"/#",children:[(0,l.jsx)(z.Z,{htmlFor:"url",children:"Paste or type a link"}),(0,l.jsx)(H.Z,{className:"mt-1",rounded:"rounded-xl",type:"url",onChange:e=>u(e.target.value),defaultValue:d,id:"url",autoFocus:!0,"data-autofocus":!0}),(0,l.jsxs)("div",{className:"mt-5 flex items-center space-x-2 text-sm text-neutral-700",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded-md text-primary-500 focus:ring-primary-500 dark:focus:ring-primary-400",id:"open-in-new-tab",checked:m,onChange:e=>h(e.target.checked)}),(0,l.jsx)(z.Z,{htmlFor:"open-in-new-tab",children:"Open in new tab"})]})]})});return(0,l.jsx)(Z.Z,{contentPaddingClass:"",isOpenProp:s,onCloseModal:g,contentExtraClass:"max-w-screen-md",renderContent:()=>(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"relative flex flex-col space-y-5 px-5 py-6",children:x()}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 bg-neutral-50 p-5 dark:border-t dark:border-neutral-800 dark:bg-neutral-900",children:[(0,l.jsx)(A.Z,{pattern:"link",onClick:g,children:o.Cancel}),(0,l.jsxs)("div",{className:"flex gap-2.5",children:[(0,l.jsx)(A.Z,{pattern:"third",onClick:p,children:o.pageSubmission["Unset link"]}),(0,l.jsx)(i.Z,{onClick:v,children:o.Apply})]})]})]}),renderTrigger:()=>null,modalTitle:""})},ea=e=>{let{show:t,onCloseModal:s,onSubmit:n}=e,[r,o]=(0,a.useState)(""),[d,u]=(0,a.useState)(640),[m,h]=(0,a.useState)(480),g=(0,c.Z)(),v=e=>{e.preventDefault(),n({url:r,width:d,height:m}),s()};return(0,l.jsx)(Z.Z,{renderTrigger:()=>null,isOpenProp:t,renderContent:()=>(0,l.jsxs)("form",{action:"/#",className:"grid grid-cols-1 gap-x-2 gap-y-4",onSubmit:v,children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-x-2 gap-y-4 sm:grid-cols-2",children:[(0,l.jsxs)("div",{className:"col-span-2",children:[(0,l.jsx)(z.Z,{children:g.pageSubmission["Youtube URL"]}),(0,l.jsx)(H.Z,{required:!0,className:"mt-1",type:"url",onChange:e=>o(e.currentTarget.value),placeholder:"https://www.youtube.com/watch?v=abc",autoF
1ocus:!0,"data-autofocus":!0})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(z.Z,{children:g.Width}),(0,l.jsx)(H.Z,{required:!0,className:"mt-1",type:"number",placeholder:"640",defaultValue:640,onChange:e=>{u(Number(e.currentTarget.value)||640)}})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(z.Z,{children:g.Height}),(0,l.jsx)(H.Z,{required:!0,className:"mt-1",type:"number",placeholder:"480",defaultValue:480,onChange:e=>{h(Number(e.currentTarget.value)||480)}})]})]}),(0,l.jsxs)("div",{className:"mt-4 flex justify-between space-x-3",children:[(0,l.jsx)(A.Z,{pattern:"link",type:"button",onClick:s,children:g.Cancel}),(0,l.jsx)(i.Z,{type:"submit",children:g.Apply})]})]}),onCloseModal:s,contentExtraClass:"max-w-screen-sm",modalTitle:g.pageSubmission["Youtube URL"]})},ei=s(48784),en=e=>{let{editor:t}=e,[s]=(0,a.useState)([{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"/></svg>',title:"Bold",action:()=>t.chain().focus().toggleBold().run(),isActive:()=>t.isActive("bold")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"/></svg>',title:"Italic",action:()=>t.chain().focus().toggleItalic().run(),isActive:()=>t.isActive("italic")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"/></svg>',title:"Link",action:()=>v(),isActive:()=>t.isActive("link")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M17 11V4h2v17h-2v-8H7v8H5V4h2v7z"/></svg>',title:"Heading",action:()=>{},isActive:()=>t.isActive("heading")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"/></svg>',title:"Blockquote",action:()=>t.chain().focus().toggleBlockquote().run(),isActive:()=>t.isActive("blockquote")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M8 4h13v2H8V4zm-5-.5h3v3H3v-3zm0 7h3v3H3v-3zm0 7h3v3H3v-3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"/></svg>',title:"Bullet List",action:()=>t.chain().focus().toggleBulletList().run(),isActive:()=>t.isActive("bulletList")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"/></svg>',title:"Ordered List",action:()=>t.chain().focus().toggleOrderedList().run(),isActive:()=>t.isActive("orderedList")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"/></svg>',title:"Code",action:()=>t.chain().focus().toggleCode().run(),isActive:()=>t.isActive("code")},{icon:`<svg class="w-5 h-5 sm:w-6 sm:h-6" width="24" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 2 <path fill="none" d="M9 22H15C20 22 22 20 22 15V9C22 4 20 2 15 2H9C4 2 2 4 2 9V15C2 20 4 22 9 22Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 3 <path fill="none" d="M9.60002 8.96997L7.11002 11.46C6.82002 11.75 6.82002 12.24 7.11002 12.53L9.60002 15.02" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> 4 <path fill="none" d="M14.4 8.96997L16.89 11.46C17.18 11.75 17.18 12.24 16.89 12.53L14.4 15.02" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> 5 </svg> 6 `,title:"Code Block",action:()=>t.chain().focus().toggleCodeBlock().run(),isActive:()=>t.isActive("codeBlock")},{icon:`<svg class="w-5 h-5 sm:w-6 sm:h-6" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> 7 <path fill="none" d="M9 22H15C20 22 22 20 22 15V9C22 4 20 2 15 2H9C4 2 2 4 2 9V15C2 20 4 22 9 22Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 8 <path fill="none" d="M9 10C10.1046 10 11 9.10457 11 8C11 6.89543 10.1046 6 9 6C7.89543 6 7 6.89543 7 8C7 9.10457 7.89543 10 9 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 9 <path fill="none" d="M2.67004 18.9501L7.60004 15.6401C8.39004 15.1101 9.53004 15.1701 10.24 15.7801L10.57 16.0701C11.35 16.7401 12.61 16.7401 13.39 16.0701L17.55 12.5001C18.33 11.8301 19.59 11.8301 20.37 12.5001L22 13.9001" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> 10 </svg> 11 `,title:"image",action:e=>{let{url:t,alt:s,title:l}=e;return p({url:t,alt:s,title:l})},isActive:()=>t.isActive("addImage")}]),[i]=(0,a.useState)([{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z"/></svg>',title:"align left",action:()=>t.chain().focus().setTextAlign("left").run(),isActive:()=>t.isActive({textAlign:"left"})},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z"/></svg>',title:"align center",action:()=>t.chain().focus().setTextAlign("center").run(),isActive:()=>t.isActive({textAlign:"center"})},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z"/>
11</svg>',title:"align right",action:()=>t.chain().focus().setTextAlign("right").run(),isActive:()=>t.isActive({textAlign:"right"})},{type:"divider"},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z"/></svg>',title:"Underline",action:()=>t.chain().focus().toggleUnderline().run(),isActive:()=>t.isActive("underline")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M17.154 14c.23.516.346 1.09.346 1.72 0 1.342-.524 2.392-1.571 3.147C14.88 19.622 13.433 20 11.586 20c-1.64 0-3.263-.381-4.87-1.144V16.6c1.52.877 3.075 1.316 4.666 1.316 2.551 0 3.83-.732 3.839-2.197a2.21 2.21 0 0 0-.648-1.603l-.12-.117H3v-2h18v2h-3.846zm-4.078-3H7.629a4.086 4.086 0 0 1-.481-.522C6.716 9.92 6.5 9.246 6.5 8.452c0-1.236.466-2.287 1.397-3.153C8.83 4.433 10.271 4 12.222 4c1.471 0 2.879.328 4.222.984v2.152c-1.2-.687-2.515-1.03-3.946-1.03-2.48 0-3.719.782-3.719 2.346 0 .42.218.786.654 1.099.436.313.974.562 1.613.75.62.18 1.297.414 2.03.699z"/></svg>',title:"Strike",action:()=>t.chain().focus().toggleStrike().run(),isActive:()=>t.isActive("strike")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M15.95 2.393l5.657 5.657a1 1 0 0 1 0 1.414l-7.779 7.779-2.12.707-1.415 1.414a1 1 0 0 1-1.414 0l-4.243-4.243a1 1 0 0 1 0-1.414l1.414-1.414.707-2.121 7.779-7.779a1 1 0 0 1 1.414 0zm.707 3.536l-6.364 6.364 1.414 1.414 6.364-6.364-1.414-1.414zM4.282 16.889l2.829 2.829-1.414 1.414-4.243-1.414 2.828-2.829z"/></svg>',title:"Highlight",action:()=>t.chain().focus().toggleHighlight().run(),isActive:()=>t.isActive("highlight")},{icon:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 sm:w-6 sm:h-6" > 12 <path fill="none" stroke-linecap="round" stroke-linejoin="round" d="m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z" /> 13 </svg> 14 `,title:"iframe",action:()=>h(),isActive:()=>t.isActive("addIframe")},{icon:`<svg width="24" height="24" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6" fill="none" xmlns="http://www.w3.org/2000/svg"> 15 <path fill="none" d="M17 20H7C4 20 2 18 2 15V9C2 6 4 4 7 4H17C20 4 22 6 22 9V15C22 18 20 20 17 20Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> 16 <path fill="none" d="M11.4001 9.50006L13.9001 11.0001C14.8001 11.6001 14.8001 12.5001 13.9001 13.1001L11.4001 14.6001C10.4001 15.2001 9.6001 14.7001 9.6001 13.6001V10.6001C9.6001 9.30006 10.4001 8.90006 11.4001 9.50006Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/> 17 </svg>`,title:"Youtube",action:()=>g(),isActive:()=>t.isActive("addYoutube")},{type:"divider"},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z"/></svg>',title:"Horizontal Rule",action:()=>t.chain().focus().setHorizontalRule().run()},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M15 18h1.5a2.5 2.5 0 1 0 0-5H3v-2h13.5a4.5 4.5 0 1 1 0 9H15v2l-4-3 4-3v2zM3 4h18v2H3V4zm6 14v2H3v-2h6z"/></svg>',title:"Hard Break",action:()=>t.chain().focus().setHardBreak().run()},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M12.651 14.065L11.605 20H9.574l1.35-7.661-7.41-7.41L4.93 3.515 20.485 19.07l-1.414 1.414-6.42-6.42zm-.878-6.535l.27-1.53h-1.8l-2-2H20v2h-5.927L13.5 9.257 11.773 7.53z"/></svg>',title:"Clear Format",action:()=>t.chain().focus().clearNodes().unsetAllMarks().run()},{type:"divider"},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M8 7v4L2 6l6-5v4h5a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H8z"/></svg>',title:"Undo",action:()=>
17t.chain().focus().undo().run()},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 sm:w-6 sm:h-6"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.172 7H11a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h7.172l-2.536-2.536L17.05 1.05 22 6l-4.95 4.95-1.414-1.414L18.172 7z"/></svg>',title:"Redo",action:()=>t.chain().focus().redo().run()}]),[n]=(0,a.useState)(document.getElementById("wpadminbar")?.clientHeight||0),[r,o]=(0,a.useState)(!1),[c,d]=(0,a.useState)(!1),[u,m]=(0,a.useState)(!1),h=()=>{o(!0)},g=()=>{m(!0)},v=()=>{d(!0)},p=e=>{let{url:s,alt:l,title:a}=e;s&&t.chain().focus().setImage({src:s,alt:l,title:a}).run()},{width:x}=(0,ei.i)(),f=x||window.innerWidth,w=f<=1024?[...s,...i]:s;return(0,l.jsx)("div",{className:"editor__header sticky z-10 flex justify-center overflow-hidden bg-neutral-100 px-2 py-5 lg:overflow-visible lg:px-0 dark:bg-neutral-800",style:{top:f<=600?0:n},children:(0,l.jsx)("div",{className:"w-full max-w-screen-md",children:(0,l.jsxs)("div",{className:"hiddenScrollbar -mx-2.5 flex items-center overflow-x-auto px-2.5 lg:overflow-x-visible lg:px-0",children:[w.map((e,s)=>(0,l.jsx)(a.Fragment,{children:"divider"===e.type?(0,l.jsx)("div",{className:"divider"}):"Heading"===e.title?(0,l.jsx)(et,{...e,editor:t}):(0,l.jsx)(K,{...e})},s)),(0,l.jsx)(es,{show:r,onSubmit:e=>{e&&t.chain().focus().setIframe({src:e}).run()},onCloseModal:()=>o(!1)}),(0,l.jsx)(ea,{show:u,onSubmit:e=>{let{url:s,width:l,height:a}=e;if(s){t.commands.setYoutubeVideo({src:s,width:l,height:a});return}},onCloseModal:()=>m(!1)}),(0,l.jsx)(el,{onCloseModal:()=>d(!1),isOpen:c,onSubmit:(e,s)=>{if(null!==e){if(""===e){t.chain().focus().extendMarkRange("link").unsetLink().run();return}t.chain().focus().extendMarkRange("link").setLink({href:e,target:s?"_blank":"_self"}).run()}},defaultLink:t.getAttributes("link").href&&"string"==typeof t.getAttributes("link").href&&t.getAttributes("link").href||""}),(0,l.jsx)(ee,{data:i,editor:t})]})})})},er=e=>{let{editor:t}=e,[s]=(0,a.useState)([{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 "><path fill="none" d="M0 0h24v24H0z"/><path d="M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"/></svg>',title:"Bold",action:()=>t.chain().focus().toggleBold().run(),isActive:()=>t.isActive("bold")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 "><path fill="none" d="M0 0h24v24H0z"/><path d="M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"/></svg>',title:"Italic",action:()=>t.chain().focus().toggleItalic().run(),isActive:()=>t.isActive("italic")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 "><path fill="none" d="M0 0h24v24H0z"/><path d="M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"/></svg>',title:"Link",action:()=>o(),isActive:()=>t.isActive("link")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 "><path fill="none" d="M0 0h24v24H0z"/><path d="M17 17h5v2h-3v3h-2v-5zM7 7H2V5h3V2h2v5zm11.364 8.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"/></svg>',title:"Unlink",action:()=>t.chain().focus().unsetLink().run(),isActive:()=>t.isActive("unlink")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 "><path fill="none" d="M0 0h24v24H0z"/><path d="M4.583 17.321C3.553 16.227 3 15 3 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179zm10 0C13.553 16.227 13 15 13 13.011c0-3.5 2.457-6.637 6.03-8.188l.893 1.378c-3.335 1.804-3.987 4.145-4.247 5.621.537-.278 1.24-.375 1.929-.311 1.804.167 3.226 1.648 3.226 3.489a3.5 3.5 0 0 1-3.5 3.5c-1.073 0-2.099-.49-2.748-1.179z"/></svg>',title:"Blockquote",action:()=>t.chain().focus().toggleBlockquote().run(),isActive:()=>t.isActive("blockquote")},{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="w-5 h-5 "><path fill="none" d="M0 0h24v24H0z"/><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"/></svg>',title:"Code",action:()=>t.chain().focus().toggleCode().run(),isActive:()=>t.isActive("code")}]),[i,r]=(0,a.useState)(!1),o=()=>{r(!0)},c=e=>(0,l.jsx)("button",{className:`p-1.5 ${e.isActive&&e.isActive()?"is-active text-green-500":"text-neutral-400 hover:text-white dark:text-neutral-600 dar
17k:hover:text-black"}`,onClick:e.action,title:e.title,children:(0,l.jsx)("div",{className:"menu-item-svg",dangerouslySetInnerHTML:{__html:e.icon}})});return(0,l.jsxs)("div",{children:[(0,l.jsx)(n.NM,{editor:t,tippyOptions:{duration:100},shouldShow:e=>{let{editor:t,view:s,state:l,oldState:a,from:i,to:n}=e;return i!=n&&!t.isActive("image")},children:(0,l.jsx)("div",{className:`flex items-center justify-center rounded-xl bg-neutral-800 p-1.5 dark:bg-neutral-100 ${i?"invisible -z-50 opacity-0":""}`,children:s.map((e,t)=>(0,l.jsxs)(a.Fragment,{children:[!!t&&(0,l.jsx)("div",{className:"mx-[1px] h-4 w-[1px] bg-neutral-600 dark:bg-neutral-300"}),c(e)]},e.title))})}),(0,l.jsx)(el,{onCloseModal:()=>r(!1),isOpen:i,onSubmit:(e,s)=>{if(null!==e){if(""===e){t.chain().focus().extendMarkRange("link").unsetLink().run();return}t.chain().focus().extendMarkRange("link").setLink({href:e,target:s?"_blank":"_self"}).run()}},defaultLink:t.getAttributes("link").href&&"string"==typeof t.getAttributes("link").href&&t.getAttributes("link").href||""})]})},eo=e=>{let{onUpdate:t,defaultContent:s=""}=e,a=(0,c.Z)(),i=R.ZP.extend({renderHTML(e){let{node:t,HTMLAttributes:s}=e;return["figure",{class:"proseMirror__image-wrapper wp-block-image"},["img",(0,F.P1)(this.options.HTMLAttributes,s)]]}}),d=(0,n.jE)({extensions:[r.Z,U.ZP,P.Z,$.ZP,D.Z,Y.Z,O.Z,W,E.ZP.configure({openOnClick:!1,linkOnPaste:!0}),o.Z.configure({placeholder:a.pageSubmission["Write your post content hereâ¦"],showOnlyCurrent:!1}),G.Z.configure({types:["heading","paragraph"]}),i.configure({allowBase64:!0,HTMLAttributes:{class:"ncmaz-custom-img-editor rounded"},inline:!0}),q.Z.configure({controls:!1})],editorProps:{attributes:{class:"focus:outline-none prose prose-neutral lg:prose-lg dark:prose-invert max-w-screen-md mx-auto min-h-[500px]"}},content:s,immediatelyRender:!1,onUpdate:e=>{let{editor:s}=e;t(s)}});return(0,l.jsx)("div",{className:"nc-TiptapEditor",children:(0,l.jsxs)("div",{className:"editor",children:[d&&(0,l.jsx)(er,{editor:d}),d&&(0,l.jsx)(en,{editor:d}),(0,l.jsx)(n.kg,{className:"editor__content focus:outline-none",editor:d})]})})},ec=s(50319),ed=s(22788),eu=s(12980),em=s(55277),eh=s(11163),eg=s(37289),ev=s(41664),ep=s.n(ev),ex=s(20762),ef=s(45007),ew=e=>{let{isEditingPostId:t,isEditingPage:s,isSubmittingPage:n,defaultTitle:r="",defaultContent:o="",defaultFeaturedImage:u={sourceUrl:"",altText:""},defaultTags:h=[],defaultCategories:g=[],defaultPostOptionsData:v={audioUrl:"",videoUrl:"",excerptText:"",postFormatsSelected:"",objGalleryImgs:void 0,isAllowComments:!0,timeSchedulePublication:void 0,showRightSidebar:!1}}=e,{isReady:p,isAuthenticated:f}=(0,ef.v9)(e=>e.viewer.authorizedUser),b=(0,em.pp)(),j=(0,eh.useRouter)(),k=(0,c.Z)(),S=n?"submission_page__new":"submission_page__edit__"+(t||"none"),[C,N]=(0,a.useState)(()=>JSON.parse(localStorage.getItem(S)||"{}").titleContent||r),[H,_]=(0,a.useState)(()=>JSON.parse(localStorage.getItem(S)||"{}").contentHTML||o),[I,T]=(0,a.useState)(()=>JSON.parse(localStorage.getItem(S)||"{}").featuredImage||u),[V,F]=(0,a.useState)(()=>JSON.parse(localStorage.getItem(S)||"{}").tags||h),[U,P]=(0,a.useState)(()=>JSON.parse(localStorage.getItem(S)||"{}").categories||g),[E,G]=(0,a.useState)(()=>JSON.parse(localStorage.getItem(S)||"{}").postOptionsData||v),[R,$]=(0,a.useState)(""),[O,D]=(0,a.useState)(!1),Y=(0,a.useRef)(!1),q=(e,t)=>{Y.current||localStorage.setItem(S,JSON.stringify({titleContent:C,contentHTML:H,featuredImage:I,tags:V,categories:U,postOptionsData:E,[e]:t}))},W=()=>{localStorage.removeItem(S),j.reload()};(0,a.useEffect)(()=>{if(localStorage.getItem(S)){let e=JSON.parse(localStorage?.getItem?.(S)||"");e&&(N(e.titleContent||r),_(e.contentHTML||o),T(e.featuredImage||u),F(e.tags||h),P(e.categories||g),G(e.postOptionsData||v))}},[]);let[J,{error:Q,data:K,loading:X}]=(0,ec.D)(eg.ql,{client:b,onCompleted:e=>{if(Y.current=!0,localStorage.removeItem(S),D(!0),L.ZP.success(k.pageSubmission["Created new post successfully"]),e.createPost?.post?.status!=="publish"){j.push(`/preview${e?.createPost?.post?.uri}&preview=true&previewPathname=post`);return}j.replace(e?.createPost?.post?.uri||"")},onError:e=>{(0,ex.Z)(e)}}),[ee,{error:et,data:es,loading:el}]=(0,ec.D)(eg.bW,{client:b,onCompleted:e=>{Y.current=!0,localStorage.removeItem(S),D(!0),L.ZP.success(k.pageSubmission["Update post successfully"]),$(`/?p=${e?.updatePost?.post?.databaseId}`)},onError:e=>{(0,ex.Z)(e)}}),ea=m()(function(e){N(e.getText()),q("titleContent",e.getText())},300),ei=m()(function(e){_(e.getHTML()),q("contentHTML",e.getHTML())},400);(0,a.useEffect)(()=>{O&&localStorage.removeItem(S)},[O]),(0,a.useEffect)(()=>{let e=Object.keys(localStorage).filter(e=>e.startsWith("submission_page__edit__"));e.length>
172&&e.forEach(e=>{e!==S&&localStorage.removeItem(e)})},[]);let en=e=>{if(x.h){L.ZP.error("Sorry, post submission is disabled on the demo site!");return}n?J({variables:{status:e,title:C,content:H,categoryNodes:U.map(e=>({id:e.databaseId.toString()})),ncTags:V.map(e=>e.name).join(","),featuredImg_alt:I?.altText??null,featuredImg_url:I?.sourceUrl??null,date:E.timeSchedulePublication||null,img_1_alt:E.objGalleryImgs?.image1?.altText??null,img_2_alt:E.objGalleryImgs?.image2?.altText??null,img_3_alt:E.objGalleryImgs?.image3?.altText??null,img_4_alt:E.objGalleryImgs?.image4?.altText??null,img_5_alt:E.objGalleryImgs?.image5?.altText??null,img_6_alt:E.objGalleryImgs?.image6?.altText??null,img_7_alt:E.objGalleryImgs?.image7?.altText??null,img_8_alt:E.objGalleryImgs?.image8?.altText??null,img_1_url:E.objGalleryImgs?.image1?.sourceUrl??null,img_2_url:E.objGalleryImgs?.image2?.sourceUrl??null,img_3_url:E.objGalleryImgs?.image3?.sourceUrl??null,img_4_url:E.objGalleryImgs?.image4?.sourceUrl??null,img_5_url:E.objGalleryImgs?.image5?.sourceUrl??null,img_6_url:E.objGalleryImgs?.image6?.sourceUrl??null,img_7_url:E.objGalleryImgs?.image7?.sourceUrl??null,img_8_url:E.objGalleryImgs?.image8?.sourceUrl??null,commentStatus:E.isAllowComments?"open":"closed",excerpt:E.excerptText??null,ncmazAudioUrl:E.audioUrl??null,ncmazVideoUrl:E.videoUrl??null,postFormatName:""!==E.postFormatsSelected?E.postFormatsSelected:null,showRightSidebar:E.showRightSidebar?"1":"0",postStyle:E.postStyleSelected}}):s&&ee({variables:{id:t||"",status:e,title:C,content:H,categoryNodes:U.map(e=>({id:e.databaseId.toString()})),ncTags:V.map(e=>e.name).join(","),featuredImg_alt:I?.altText??null,featuredImg_url:I?.sourceUrl??null,date:E.timeSchedulePublication||null,img_1_alt:E.objGalleryImgs?.image1?.altText??null,img_2_alt:E.objGalleryImgs?.image2?.altText??null,img_3_alt:E.objGalleryImgs?.image3?.altText??null,img_4_alt:E.objGalleryImgs?.image4?.altText??null,img_5_alt:E.objGalleryImgs?.image5?.altText??null,img_6_alt:E.objGalleryImgs?.image6?.altText??null,img_7_alt:E.objGalleryImgs?.image7?.altText??null,img_8_alt:E.objGalleryImgs?.image8?.altText??null,img_1_url:E.objGalleryImgs?.image1?.sourceUrl??null,img_2_url:E.objGalleryImgs?.image2?.sourceUrl??null,img_3_url:E.objGalleryImgs?.image3?.sourceUrl??null,img_4_url:E.objGalleryImgs?.image4?.sourceUrl??null,img_5_url:E.objGalleryImgs?.image5?.sourceUrl??null,img_6_url:E.objGalleryImgs?.image6?.sourceUrl??null,img_7_url:E.objGalleryImgs?.image7?.sourceUrl??null,img_8_url:E.objGalleryImgs?.image8?.sourceUrl??null,commentStatus:E.isAllowComments?"open":"closed",excerpt:E.excerptText??null,ncmazAudioUrl:E.audioUrl??null,ncmazVideoUrl:E.videoUrl??null,postFormatName:""!==E.postFormatsSelected?E.postFormatsSelected:null,showRightSidebar:E.showRightSidebar?"1":"0",postStyle:E.postStyleSelected}})},er=X||el,ev=Q||et,ew=!!localStorage.getItem(S)?.length;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"nc-CreateNewPostEditor relative flex-1",children:(0,l.jsxs)("div",{className:"absolute inset-0 flex h-full flex-col",children:[(0,l.jsxs)("div",{className:"hiddenScrollbar flex-1 overflow-y-auto",children:[(0,l.jsx)("div",{className:"w-full px-2.5 pb-10 pt-2.5 lg:py-10",children:(0,l.jsxs)("div",{className:"mx-auto w-full max-w-screen-md space-y-5",children:[(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)(z.Z,{className:"text-sm",children:k.pageSubmission["Featured image"]}),(0,l.jsx)(M.Z,{defaultImage:I,onChangeImage:e=>{T(e),q("featuredImage",e)}})]}),(0,l.jsx)(y,{defaultValue:U,onChange:e=>{e.length!==U.length&&(P(e),q("categories",e))}}),(0,l.jsx)(d,{defaultTitle:C,onUpdate:ea}),(0,l.jsx)(w,{defaultValue:V,onChange:e=>{e.length!==V.length&&(F(e),q("tags",e))}}),ev&&(0,l.jsx)(ed.Z,{containerClassName:"text-sm",type:"error",children:ev.message})]})}),(0,l.jsx)(eo,{defaultContent:H,onUpdate:ei})]}),(0,l.jsx)("div",{className:"w-full flex-shrink-0 border-t border-neutral-200 px-2.5 dark:border-neutral-600",children:(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-screen-md flex-wrap gap-2 py-4 pt-[18px] sm:gap-3",children:[(0,l.jsx)(i.Z,{fontSize:"text-base font-medium",onClick:()=>
17{if(f||p){if(E.timeSchedulePublication){en(eu.vh.Future);return}en(eu.vh.Publish)}},loading:er,disabled:er,children:E.timeSchedulePublication?k.pageSubmission.Schedule:k.pageSubmission.Publish}),(0,l.jsx)(A.Z,{fontSize:"text-base font-medium",onClick:()=>{(f||p)&&en(eu.vh.Draft)},loading:er,disabled:er,pattern:"third",children:s?k.pageSubmission["Move to draft"]:k.pageSubmission["Save draft"]}),(0,l.jsx)(B,{defaultData:E,onSubmit:e=>{G(e),q("postOptionsData",e)}}),ew?(0,l.jsx)(A.Z,{fontSize:"text-sm font-medium",onClick:()=>{confirm("Are you sure you want to revert new changes?")&&W()},loading:er,disabled:er,pattern:"link",sizeClass:"py-3 px-4",children:k.pageSubmission["Revert new changes"]}):null]})})]})}),!!s&&(0,l.jsx)(Z.Z,{renderTrigger:()=>null,isOpenProp:!!R,renderContent:()=>(0,l.jsxs)("div",{className:"py-5",children:[(0,l.jsx)("div",{className:"font-medium",children:k.pageSubmission["Congratulations! You have successfully updated the post!"]}),(0,l.jsxs)("div",{className:"mt-2.5 text-sm text-neutral-700",children:[k.pageSubmission["These changes will be applied to the post in about 15 minutes."]," ",(0,l.jsx)("br",{}),k.pageSubmission["You can"]," ",(0,l.jsx)(ep(),{href:`/preview${R}&preview=true&previewPathname=post`,className:"font-medium underline",children:k.pageSubmission["preview the post"]})," ",k.pageSubmission["by clicking the button below."]]})]}),onCloseModal:()=>$(""),contentExtraClass:"max-w-screen-sm",modalTitle:"Update post successfully",renderFooter:()=>(0,l.jsx)("div",{className:"flex justify-end",children:(0,l.jsx)(i.Z,{href:`/preview${R}&preview=true&previewPathname=post`,onClick:()=>{$("")},children:k.pageSubmission["Preview post"]})})})]})}},48784:function(e,t,s){s.d(t,{i:function(){return a}});var l=s(67294);function a(){let[e,t]=(0,l.useState)({width:window.innerWidth,height:window.innerHeight});return(0,l.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}}}]); 18//# sourceMappingURL=223-36c792e7a5e694bf.js.map
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.