PageSourceSearch

https://www.euhu.co.uk/_next/static/chunks/pages/content/editor/[i…/[[...sectionId]]-353bbc7279a248f5.js

js euhu.co.uk collected 2026-10-04 05:20:51 UTC 6,357 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2980],{96160:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/content/editor/[id]/[slug]/sections/[[...sectionId]]",function(){return n(66828)}])},97480:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var o=n(85893),s=n(64019),l=n(83421),i=n(94184),a=n.n(i),r=n(67294),c=n(38106),u=n(7920),d=n(17376),m=n(42255);let v={full:"min-h-full","fit-content":""},f={left:"mr-auto",top:"mb-auto",right:"ml-auto",bottom:"mt-auto",center:"justify-center items-center","top-left":"mb-auto mr-auto","top-right":"mb-auto ml-auto","bottom-left":"mt-auto mr-auto","bottom-right":"mt-auto ml-auto"};function h(e){let{show:t,onClose:n,title:i,modalClassName:h="max-w-lg",closeButtonClassName:x="",position:p="center",height:g="full",children:y,onCloseEnd:j}=e,b=a()("gtm-close-modal","ml-auto h-6 w-6 shrink-0","rounded-full","bg-red hover:bg-red/80 focus:bg-red/80 text-white",x);function S(){n&&n()}return(0,o.jsx)(s.u,{show:t,enter:"transition duration-100 ease-out",enterFrom:"transform scale-100 opacity-0",enterTo:"transform scale-100 opacity-100",leave:"transition duration-300 ease-out",leaveFrom:"transform scale-100 opacity-100",leaveTo:"transform scale-100 opacity-0",afterLeave:j,children:(0,o.jsxs)(l.V,{onClose:S,className:"fixed inset-0 z-50 overflow-y-auto",children:[(0,o.jsx)(s.u.Child,{enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,o.jsx)(c.Z,{})}),(0,o.jsx)(s.u.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-50",enterTo:"opacity-100 delay-100 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-50",children:(0,o.jsx)("div",{className:a()("flex",f[p],v[g]),children:(0,o.jsxs)(l.V.Panel,{as:u.s,disablePadding:!0,className:a()("relative z-10 mx-4 my-4 w-full px-6 pb-2 pt-4 sm:mx-10 sm:px-12 sm:pt-8 lg:mx-10",h),variant:n?"closable":"default",children:[(0,o.jsx)(l.V.Title,{className:"mb-6 text-h3 font-black",children:i}),n&&(0,o.jsx)(m.hU,{size:"custom",className:a()("absolute right-3 top-3",b),variant:"header",onClick:S,children:(0,o.jsx)(d.Tw,{className:"h-6 w-6"})}),(0,o.jsx)("div",{children:"function"==typeof y?y({onClose:S}):y})]})})})]})})}},66828:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return b}});var o=n(85893),s=n(91376),l=n(11163),i=n(67294),a=n(90048),r=n(22671),c=n(5678),u=n(36040);function d(e){let{isSaving:t,lastSavedTime:n,hasSaved:s}=e,[l,a]=(0,i.useState)(null);return((0,i.useEffect)(()=>{t||a(0)},[t]),(0,i.useEffect)(()=>{let e=e=>e&&n?Math.floor((Date.now()-n)/1e3):null,t=setInterval(()=>{n&&a(e(n)||null)},1e3);return()=>{clearTimeout(t)}},[n]),s)?(0,o.jsxs)("span",{className:"ml-auto mr-2 text-xs text-grey",children:[t&&"Saving...",!t&&null!==l&&"Last saved: ".concat(l,"s ago")]}):null}var m=n(77783),v=n(35800),f=n(2962),h=n(83915);function x(e){var t,n,s;let{lessonId:x,sectionId:p,lessonSlug:g}=e,y=(0,l.useRouter)(),j=(0,v.useErrorHandler)(),[b,S]=(0,i.useState)(null),w=(0,c.Nr)(b,2e3),[N,C]=(0,i.useState)(Date.now()),{mutateAsync:_,isLoading:I,...T}=h.h.lessons.updateSection.useMutation(),{refetch:k,data:E,isFetching:F,...L}=h.h.lessons.getLessonSectionById.useQuery({lessonId:null!=x?x:"",lessonSectionId:p},{enabled:!!(x&&p),retry:!1,onSuccess:e=>S(e.sectionContent||null),onError:e=>{var t,n;return j(new m.FZ(null===(t=e.data)||void 0===t?void 0:t.httpStatus,null===(n=e.shape)||void 0===n?void 0:n.type))}}),[P,Z]=(0,i.useState)(!1),z=(0,i.useCallback)(async(e,t,n)=>{await _({lessonId:n,lessonSlug:g,lessonSectionId:t,sectionContent:e},{onSuccess:()=>{k(),C(Date.now())}})},[g,k,_]);return(0,i.useEffect)(()=>{var e;let t=Date.now(),n=!!N&&t-N>2e3;(null==E?void 0:null===(e=E.sectionContent)||void 0===e?void 0:e.time)!==(null==w?void 0:w.time)&&w&&n&&z(w,p,x)},[w,N,x,z,null==E?void 0:null===(t=E.sectionContent)||void 0===t?void 0:t.time,p]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f.PB,{title:(null==E?void 0:E.name)||void 0,description:(null==E?void 0:E.description)||void 0}),(0,o.jsxs)("div",{className:"relative flex h-full flex-col justify-between",children:[(null==L?void 0:L.isLoading)&&(0,o.jsx)("div",{className:"h-96",children:(0,o.jsx)(u.Z,{position:"screen-center"})}),p&&!(null==L?void 0:L.isLoading)&&!!b&&(0,o.jsx)(r.M,{initialData:b,holderId:p,onChange:e=>{Z(!0),S(e)}},p),p&&(0,o.jsx)("div",{className:"sticky bottom-0 left-0 right-0 z-10 -mb-2 mt-10  bg-white pt-2",children:(0,o.jsxs)("div",{className:"mx-auto flex max-w-[650px] items-center gap-2",children:[(0,o.jsx)(a.zx,{disabled:I||F||!b||!P,loader:I,size:"md",className:"gtm-btn-section-save",onClick:()=>{b&&(Z(!1),z(b,p,x))},children:"Save Content"}),(0,o.jsx)(a.Qj,{variant:"outline",className:"gtm-btn-section-view",href:y.asPath.replace("/editor/","/viewer/"),children:"View"}),(0,o.jsx)(d,{hasSaved:!!(null===(s=T.variables)||void 0===s?void 0:null===(n=s.sectionContent)||void 0===n?void 0:n.time),isSaving:I,lastSavedTime:N})]})})]})]})}var p=n(46996),g=n(33299),y=n(55490);let j=()=>{var e,t,n;(0,g.useSession)({required:!0});let i=(0,l.useRouter)(),a="string"==typeof i.query.id?i.query.id:null,r=null===(e=i.query.sectionId)||void 0===e?void 0:e.toString(),c=null!==(n=null===(t=i.query.slug)||void 0===t?void 0:t.toString())&&void 0!==n?n:"";return a?(0,o.jsxs)("main",{className:"grid h-full md:grid-cols-[320px,_1fr]  lg:grid-cols-[400px,_1fr] xl:grid-cols-[480px,_1fr]",children:[(0,o.jsx)("div",{className:"relative h-full w-full bg-teal p-2",children:(0,o.jsx)(s.Z,{getSectionUrl:(e,t)=>
1(0,y.M)({type:"content",id:e,mode:"editor",slug:c,subSection:"sections",sectionId:t}),lessonId:a,lessonSlug:c,sectionId:r,onSectionCreated:e=>{i.push((0,y.M)({type:"content",id:null!=a?a:"",mode:"editor",subSection:"sections",sectionId:e,slug:c}))},onSectionDeleted:e=>{r===e&&i.push((0,y.M)({type:"content",id:null!=a?a:"",mode:"editor",subSection:"sections",sectionId:null,slug:c}))}})}),(0,o.jsx)("div",{className:"p-4",children:r?(0,o.jsx)(x,{lessonSlug:c,lessonId:a,sectionId:r},r):(0,o.jsx)(f.PB,{title:"Sections"})})]}):(0,o.jsx)(u.Z,{position:"screen-center"})};var b=j;j.getLayout=e=>(0,o.jsx)(p.Z,{children:e})}},function(e){e.O(0,[2946,6996,3678,2888,9774,179],function(){return e(e.s=96160)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.