PageSourceSearch

https://mitglieder.trafficinsider.academy/app/_next/static/chunks/pages/courses-bfd8b1eab608faa1.js

js trafficinsider.academy collected 2026-10-06 19:18:29 UTC 15,568 bytes, 2 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];if(null!=r)for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:mentortools-frontend":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2775edf1-8208-4e30-a1ff-e792c4d88a83",e._sentryDebugIdIdentifier="sentry-dbid-2775edf1-8208-4e30-a1ff-e792c4d88a83")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2182],{10760:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var s=r(89099),a=r(23877),n=r(48790),o=r(11313),i=r(14958),l=r(34020);let d=["id","description","title","payment_type_id","is_active","image_id","is_archived","course_category.*","order","launch_date_enabled","is_content_duration_shown","total_content_duration_s","is_file_transcription_shown","modules.id","modules.title","modules.order","modules.is_published","modules.available_at","modules.short_description","modules.public_description","modules.image_id","modules.course_id","modules.lessons.id","modules.lessons.title","modules.lessons.order","modules.lessons.available_at","modules.lessons.type_id","modules.lessons.module_id","modules.lessons.submodule_id","modules.lessons.image_id","modules.submodules.id","modules.submodules.title","modules.submodules.order"],u=(e,{hasAccess:t=!0},r)=>{let u=(0,s.useRouter)(),{user:c}=(0,i.A)(),{courseId:y,moduleId:p,lessonId:g,...m}=e;return(0,l.A)({queryDataKey:o.Ay.courses.all.queryKey,queryCountKey:o.Ay.courses.count.queryKey,queryDataFn:({limit:t,offset:s,order:a})=>n.A.getAll({columns:d,limit:r?.limit||t,offset:r?.offset||s,order_by:r?.order||a,filter_by:[{attribute:"portal_id",operator:"==",value:c?.portal?.id},{attribute:"is_archived",operator:"==",value:e.isArchived}],search_by:[{attribute:"title",operator:"ilike",value:e.search}]}),queryCountFn:()=>n.A.getCount({filter_by:[{attribute:"portal_id",operator:"==",value:c?.portal?.id},{attribute:"is_archived",operator:"==",value:e.isArchived}],search_by:[{attribute:"title",operator:"ilike",value:e.search}]}),enabled:t},{initialPage:parseInt(`${u.query?.page}`)||1,initialLimit:parseInt(`${u.query?.limit}`)||Number(localStorage.getItem(a.sk))||10,initialOrder:{column:u.query?.order?`${u.query?.order}`:"order",ascending:!u.query?.ascending||!!u.query?.ascending},searchQuery:m})}},38313:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/courses",function(){return r(42877)}])},42877:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>H,default:()=>K});var s=r(37876),a=r(14232),n=r(89099),o=r(74234),i=r(82179),l=r(26183),d=r(76747),u=r(84933),c=r(12772),y=r(5157),p=r(77205),g=r(10760),m=r(14673),h=r(61734),x=r(74359),A=r(11313),f=r(48790),_=r(99399),v=r(47847),C=r(55364),b=r(82592),j=r(66950),w=r(31941),I=r(64713),E=r(30942);let O=(0,I.Ay)(j.A)(({theme:e})=>({minHeight:e.spacing(112.5),display:"flex",flex:1,flexDirection:"column",justifyContent:"center",alignItems:"center",gap:e.spacing(6),padding:e.spacing(16,12),border:"1px solid",borderColor:e.palette.grey[200],borderRadius:e.spacing(4)})),q=(0,I.Ay)(j.A)(({theme:e})=>({alignItems:"center",borderRadius:100,bgcolor:e.palette.grey[200],display:"flex",justifyContent:"center",height:96,width:96})),S=(0,I.Ay)(j.A)(({theme:e})=>({alignItems:"center",display:"flex",flexDirection:"column",gap:e.spacing(2),maxWidth:500})),k=()=>{let{t:e}=(0,E.o)("translation",{keyPrefix:"NOT_FOUND"});return(0,s.jsxs)(O,{"data-sentry-element":"MainContentWrapperBox","data-sentry-component":"NoContentFoundWidget","data-sentry-source-file":"NoContentFoundWidget.tsx",children:[(0,s.jsx)(q,{"data-sentry-element":"InnerMainContentWrapperBox","data-sentry-source-file":"NoContentFoundWidget.tsx",children:(0,s.jsx)(y.A,{icon:"tabler:search",fontSize:48,"data-sentry-element":"Icon","data-sentry-source-file":"NoContentFoundWidget.tsx"})}),(0,s.jsxs)(S,{"data-sentry-element":"TextContentWrapperBox","data-sentry-source-file":"NoContentFoundWidget.tsx",children:[(0,s.jsx)(w.A,{variant:"h3","data-sentry-element":"Typography","data-sentry-source-file":"NoContentFoundWidget.tsx",children:e("courses")}),(0,s.jsx)(w.A,{textAlign:"center",variant:"body1","data-sentry-element":"Typography","data-sentry-source-file":"NoContentFoundWidget.tsx",children:e("course")})]})]})};var R=r(55576),$=r(19610),N=r(62902),W=r(90814);let D=()=>{let{t:e}=(0,E.o)(),t=(0,o.A)();return(0,s.jsx)($.A,{"data-sentry-element":"Card","data-sentry-component":"CourseOverviewGetStarted","data-sentry-source-file":"CourseOverviewGetStarted.tsx",children:(0,s.jsxs)(N.A,{alignItems:"center",justifyContent:"center",padding:t.spacing(8),gap:t.spacing(6),"data-sentry-element":"Stack","data-sentry-source-file":"CourseOverviewGetStarted.tsx",children:[(0,s.jsxs)(N.A,{textAlign:"center",gap:t.spacing(2),"data-sentry-element":"Stack","data-sentry-source-file":"CourseOverviewGetStarted.tsx",children:[(0,s.jsx)(w.A,{variant:"h2","data-sentry-element":"Typography","data-sentry-source-file":"CourseOverviewGetStarted.tsx",children:e("extracted.create_your_first_course")}),(0,s.jsx)(w.A,{variant:"body1",fontWeight:400,"data-sentry-element":"Typography","data-sentry-source-file":"CourseOverviewGetStarted.tsx",children:e("extracted.tailor_your_course")})]}),(0,s.jsx)(W.A,{"data-sentry-element":"NewCourseCards","data-sentry-source-file":"CourseOverviewGetStarted.tsx"})]})})};var P=r(85570),T=r(90623),M=r(23877),F=r(69348),G=r(82867),H=!0;let K=()=>{let e=(0,o.A)(),t=(0,n.useRouter)(),{data:r,hasAccess:j,hasCourseAccess:w}=(0,_.D)(),I=w(G.Qi.EDIT_COURSE,G.Qi.EDIT_ANY_COURSE),E=j(G.Qi.VIEW_ANY_COURSE)||(r?.team_member_role?.scopes?.course_ids?.length||0)>0,{searchQuery:O,onChangeSearchQuery:q,setParams:S}=(0,h.r)({isArchived:"true"===t.query.isArchived,search:t.query.search?`${t.query.search}`:"",course:t.query.course?`${t.query.course}`:"",module:t.query.module?`${t.query.module}`:"",lesson:t.query.lesson?`${t.query.lesson}`:""},!0),$=(0,u.d7)(O,500),{data:N=[],isLoading:W,query:H,itemsCount:K,pagesCount:U}
1=(0,g.A)($,{hasAccess:E}),{data:V,isLoading:Q}=((e=!0)=>(0,x.I)({queryKey:A.Ay.courses.overallCount.queryKey,queryFn:async()=>{let{data:{result:e}}=await f.A.getCount({filter_by:[{attribute:"is_archived",operator:"==",value:!1}]}),{data:{result:t}}=await f.A.getCount({filter_by:[{attribute:"is_archived",operator:"==",value:!0}]});return e+t||0},enabled:e}))(E),B=(0,p.A)(),{reorder:z}=(0,m.A)({items:N,offset:(H.page-1)*H.limit||0,mutationFn:f.A.reorder}),L=(0,a.useCallback)(e=>{I&&z(e)},[I,z]),Y=(0,a.useCallback)(e=>()=>{O.course===`${e.id}`?S({course:"",module:"",lesson:""},!0):S({course:`${e.id}`,module:"",lesson:""},!0)},[S,O.course]),X=(0,a.useCallback)(e=>{O.module===`${e.id}`?S({module:"",lesson:""},!0):S({module:`${e.id}`,lesson:""},!0)},[S,O.module]),J=(0,a.useRef)({}),Z=(0,a.useRef)({}),ee=(e,t="center")=>{let r=0,s=()=>{r++,e.current?e.current.scrollIntoView({behavior:"smooth",block:t}):r<10&&setTimeout(s,50)};s()},et=(0,a.useCallback)(()=>{let{course:e,module:r}=t.query,s=Array.isArray(e)?e[0]:e,a=Array.isArray(r)?r[0]:r;if(a&&N.length>0){let e=N.find(e=>e.modules.some(e=>`${e.id}`===a));if(e){O.course!==`${e.id}`&&q("course",`${e.id}`,!0),ee({current:Z.current[a]},"center");return}}s&&J.current[s]&&(O.course!==`${s}`&&q("course",`${s}`,!0),ee({current:J.current[s]},"start"))},[N,t.query?.course,t.query?.module]);(0,a.useEffect)(()=>{et()},[et]);let er=(0,a.useMemo)(()=>0!==V||W||Q?W||Q?(0,s.jsx)(i.A,{alignItems:"center",justifyContent:"center",children:(0,s.jsx)(c.A,{})}):0===K?(0,s.jsx)(k,{}):(0,s.jsx)(d.JY,{onDragEnd:L,children:(0,s.jsx)(d.gL,{droppableId:"courses",type:"courses",children:t=>(0,s.jsxs)(i.A,{gap:e.spacing(6),ref:t.innerRef,children:[N?.map((t,r)=>(0,s.jsx)(d.sx,{isDragDisabled:!I||O.course===`${t.id}`,draggableId:t.id.toString(),index:r,children:a=>(0,s.jsx)(i.A,{ref:e=>{a?.innerRef(e),J.current[t.id]=e},...a?.draggableProps,children:(0,s.jsx)(R.A,{index:r,course:t,queriesEnabled:E,isOpen:O.course===`${t.id}`,onOpen:Y(t),isModuleOpen:e=>O.module===`${e}`,onOpenModule:X,onCopy:()=>B.copy({course_id:t.id,course:t}),before:(0,s.jsx)(s.Fragment,{children:!t.is_archived&&(0,s.jsx)(T.f,{action:G.Qi.EDIT_COURSE,anyAction:G.Qi.EDIT_ANY_COURSE,courseId:t.id,children:(0,s.jsx)(l.A,{size:"small",...a.dragHandleProps,children:(0,s.jsx)(y.A,{color:e.palette.primary.main,icon:"tabler:grip-vertical"})})})}),moduleRefs:Z})})},t.id)),t.placeholder]})})}):(0,s.jsx)(D,{}),[V,W,Q,K,L,e,N,I,O.course,O.module,E,Y,X,B]);return E?(0,s.jsxs)(i.A,{gap:e.spacing(6.5),"data-sentry-element":"Stack","data-sentry-component":"CourseOverview","data-sentry-source-file":"index.tsx",children:[(0,s.jsx)(v.A,{isIntroduction:!!(0===V&&!W),search:O.search,onChangeSearch:e=>{q("search",e),H.onChangePage(1)},"data-sentry-element":"CourseOverviewHeader","data-sentry-source-file":"index.tsx"}),0!==V||W||Q?(0,s.jsxs)(i.A,{gap:e.spacing(6),children:[(0,s.jsxs)(P.I,{children:[(0,s.jsx)(C.W,{isArchived:O.isArchived,onChangeIsArchived:e=>{q("isArchived",e),H.onChangePage(1)}}),(0,s.jsx)(b.C,{itemsCount:K,pagesCount:U,onChangePage:H.onChangePage,onChangePageSize:e=>{H.onChangeLimit(e),localStorage.setItem(M.sk,`${e}`)},page:H.page,pageSize:H.limit})]}),er]}):(0,s.jsx)(D,{})]}):(0,s.jsx)(F.default,{isTeamMember:!0})}},47847:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var s=r(37876),a=r(48230),n=r.n(a),o=r(64713),i=r(74234),l=r(22208),d=r(82615),u=r(31941),c=r(54227),y=r(5157),p=r(4262),g=r(75542),m=r(30942),h=r(69884),x=r(90623),A=r(94356),f=r(82867);let _=(0,o.Ay)(c.A)(({theme:e})=>({display:"flex",alignItems:"center",flexDirection:"row",gap:e.spacing(16),[e.breakpoints.down("md")]:{flexDirection:"column",gap:e.spacing(3),paddingBottom:e.spacing(3)},paddingBottom:e.spacing(8),transition:"left .25s ease-in-out","& > button":{minWidth:e.spacing(53),minHeight:e.spacing(12)},"& > .MuiTypography-root":{minWidth:e.spacing(97),minHeight:e.spacing(12)},"& > .MuiFormControl-root":{flexGrow:1,minHeight:e.spacing(12),"& .MuiInputBase-root":{minHeight:"inherit"}},"& > h2, form":{flex:1}})),v=({isIntroduction:e=!1,search:t,onChangeSearch:r})=>{let a=(0,i.A)(),{t:o}=(0,m.o)(),{settings:c}=(0,p.t)();return(0,s.jsxs)(_,{left:c.navCollapsed?A.A.collapsedNavigationSize:A.A.navigationSize,"data-sentry-element":"HeaderBox","data-sentry-component":"CourseOverviewHeader","data-sentry-source-file":"CourseOverviewHeader.tsx",children:[(0,s.jsxs)(u.A,{variant:"h2","data-sentry-element":"Typography","data-sentry-source-file":"CourseOverviewHeader.tsx",children:[o("PAGE.COURSE_OVERVIEW.course_overview")," "]}),!e&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.Ay,{value:t,onChange:e=>r(e.target.value),fullWidth:!0,placeholder:o("PAGE.COURSE_OVERVIEW.search_courses"),InputProps:{endAdornment:(0,s.jsx)(d.A,{position:"start",children:(0,s.jsx)(y.A,{icon:"tabler:search"})})}}),(0,s.jsx)(x.f,{action:f.Qi.CREATE_COURSE,children:(0,s.jsx)(l.A,{LinkComponent:n(),href:h.C.createCourse,variant:"contained",endIcon:(0,s.jsx)(y.A,{icon:"tabler:plus"}),sx:{boxShadow:"light"===c.mode?a.shadow.grey.sm:a.shadow.primary.sm,minWidth:212,minHeight:48},children:o("ACTION.ENTITY.add_new_course")})})]})]})}},55364:(e,t,r)=>{"use strict";r.d(t,{W:()=>c});var s=r(37876),a=r(14232),n=r(74234),o=r(22208),i=r(62902),l=r(88414),d=r(4262),u=r(30942);let c=(0,a.memo)(e=>{let{isArchived:t,onChangeIsArchived:r}=e,a=(0,n.A)(),{settings:c}=(0,d.t)(),y=(0,l.A)(e=>e.breakpoints.down("md")),{t:p}=(0,u.o)();return(0,s.jsxs)(i.A,{gap:a.spacing(3),flexDirection:y?"column":"row",alignItems:"end",children:[(0,s.jsx)(o.A,{onClick:()=>r(!1),variant:t?"text":"contained",fullWidth:y,sx:t?{}:{boxShadow:"light"===c.mode?a.shadow.grey.sm:a.shadow.primary.sm},children:p("PAGE.COURSE_OVERVIEW.badge_course_label")}),(0,s.jsx)(o.A,{onClick:()=>r(!0),fullWidth:y,variant:t?"contained":"text",sx:t?{}:{boxShadow:"light"===c.mode?a.shadow.grey.sm:a.shadow.primary.sm},children:p("PAGE.COURSE_OVERVIEW.badge_archived_course_label")})]})})},61734:(e,t,r)=>{"use strict";r.d(t,{r:()=>o});var s=r(14232),a=r(89099),n=r(60880);let o=(e,t=!1)=>
1{let r=(0,a.useRouter)(),[o,i]=(0,s.useState)(e),l=(0,s.useRef)(e);(0,s.useEffect)(()=>{let r=l.current,s=Object.keys(e).some(t=>e[t]!==r[t]);t&&s&&(i(e),l.current=e)},[e,t]);let d=(0,s.useCallback)((e,t,s=!1)=>{i(r=>({...r,[e]:t})),r.replace(`${r.pathname}?${(0,n.O)({...r.query,...o,[e]:t})}`,void 0,{shallow:s})},[r,o]),u=(0,s.useCallback)((e,t=!1)=>{i(t=>({...t,...e})),r.replace(`${r.pathname}?${(0,n.O)({...r.query,...o,...e})}`,void 0,{shallow:t})},[r,o]);return(0,s.useMemo)(()=>({searchQuery:o,onChangeSearchQuery:d,setParams:u}),[d,o,u])}},77205:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var s=r(37876),a=r(14232),n=r(89099),o=r(67768),i=r(40097),l=r(16361),d=r(14958),u=r(66048),c=r(55576),y=r(91883),p=r(48790),g=r(11313);let m=()=>{let e=(0,n.useRouter)(),{notify:t}=(0,l.A)(),{user:r}=(0,d.A)(),m=(0,o.jE)(),{mutate:h,isPending:x,variables:A}=(0,i.n)({mutationFn:async e=>{let{data:{result:t}}=await p.A.getAll({columns:["id","order"],filter_by:[{attribute:"is_archived",value:!1}],order_by:[{column:"order",ascending:!0}]});t.pop();let{data:{result:r}}=await p.A.copy(e),s=[{id:r,order:t[0].order},...t.map(e=>({id:e.id,order:e.order+1}))];return p.A.reorder(s)},onSuccess:async()=>{await Promise.all([m.invalidateQueries({queryKey:g.Ay.courses.all.queryKey}),m.invalidateQueries({queryKey:g.Ay.courses.count.queryKey})]);let r=m.getQueryData(g.Ay.courses.count.queryKey),s=Math.ceil((r?.data.result?r?.data.result-1:0)/parseInt(`${e.query.limit}`)),a=parseInt(`${e.query.page}`);t("COURSE.duplicate");let{id:n,...o}=e.query;e.push({query:{...o,page:a>s?s:o.page}})},onError:e=>t(e.message||"unexpected",{type:"error"})}),f=(0,a.useCallback)(e=>{h(e)},[h]);return{placeholder:(0,s.jsx)(u.A,{pending:x,children:(0,s.jsx)(c.A,{course:A?.course||(0,y.W)({portalId:r?.portal.id})})}),copy:f}}},82592:(e,t,r)=>{"use strict";r.d(t,{C:()=>m});var s=r(37876),a=r(66950),n=r(31941),o=r(80013),i=r(64713),l=r(74234),d=r(62902),u=r(30942),c=r(90035);let y=(0,i.Ay)(a.A)({display:"flex",alignItems:"end",justifyContent:"center"}),p=(0,i.Ay)(y)(({theme:e})=>({flexGrow:1,gap:e.spacing(6),justifyContent:"end",flexDirection:"row",[e.breakpoints.down("md")]:{flexDirection:"column",gap:e.spacing(1)}})),g=[10,25,50,100],m=({page:e,pageSize:t,onChangePage:r,onChangePageSize:a,pagesCount:i,itemsCount:y})=>{let m=(0,l.A)(),{t:h}=(0,u.o)();return(0,s.jsx)(p,{"data-sentry-element":"Container","data-sentry-component":"CoursePagination","data-sentry-source-file":"CoursePagination.tsx",children:y>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(d.A,{direction:"row",gap:m.spacing(4),alignItems:"center",children:[(0,s.jsxs)(n.A,{variant:"h6",children:[y," ",h("extracted.course(s)")]}),(0,s.jsx)(o.A,{color:"primary",shape:"rounded",page:e,count:i,onChange:(e,t)=>
1r(t)})]}),(0,s.jsx)(c.A,{value:t,handleValueChange:e=>a?.(Number(`${e.target.value}`)),selectItems:g,labelText:h("PAGE.PAGINATION.item_per_page")})]})})}},85570:(e,t,r)=>{"use strict";r.d(t,{I:()=>n});var s=r(64713),a=r(66950);let n=(0,s.Ay)(a.A)(({theme:e})=>({display:"flex",gap:e.spacing(8),[e.breakpoints.down("sm")]:{flexDirection:"column",gap:e.spacing(2)}}))}},e=>{e.O(0,[1289,13,5236,3218,9838,4854,9273,6134,814,636,6593,8792],()=>e(e.s=38313)),_N_E=e.O()}]);
2//# sourceMappingURL=courses-bfd8b1eab608faa1.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.