PageSourceSearch

https://to-teach.ai/build/_shared/chunk-ARMD5XUB.js

js to-teach.ai collected 2026-09-25 20:13:55 UTC 2,337 bytes, 6 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d3650067-4799-510d-bfad-5b069cd09ef3")}catch(e){}}();
3import{d as k}from"/build/_shared/chunk-724ZYNWG.js";import{e as b}from"/build/_shared/chunk-DEKGQOL6.js";import{b as p}from"/build/_shared/chunk-RHVYXGRK.js";import{i as w}from"/build/_shared/chunk-O5I3LZC6.js";import{d as h}from"/build/_shared/chunk-MZ7LOFLQ.js";import{o as f,z as y}from"/build/_shared/chunk-UD7E76NL.js";import{a as g}from"/build/_shared/chunk-33YEX55G.js";import{a as v}from"/build/_shared/chunk-6VLJMAZL.js";import{e as l}from"/build/_shared/chunk-OFX6S7NS.js";var u=l(v());var n=l(g()),A=t=>{let s=t.videoHost??t.content?.metadata?.videoHost,e=typeof t.url=="string"?t.url:typeof t.path=="string"?t.path:void 0,d=e?k(e):null;return t.type==="video"&&s==="youtube"&&d?{...t,h5pType:t.type,type:"youtube",externalId:d,url:e,path:e}:{...t,h5pType:t.type}};function D(){let{t}=h(),s=y(),e=(0,u.useRef)(new Set),d=(0,u.useRef)(new Map);return{addToWorksheet:async(c,r)=>{let o=A(c),a=o.id??o.url??o.path??o.title??"",i=`${r.id}:${a}`,T=d.current.get(i)??0;if(e.current.has(i)||Date.now()-T<5e3)return;e.current.add(i);let m=new FormData;m.append("content",JSON.stringify(o));try{(await fetch(`/collection/worksheets/${r.id}/add-collection`,{method:"POST",body:m})).ok?(d.current.set(i,Date.now()),p(()=>(0,n.jsxs)(f,{to:`/collection/worksheets/${r.id}`,className:"flex gap-2 items-center",children:[(0,n.jsx)(w,{className:"w-5 text-green-500"}),(0,n.jsxs)("div",{className:"border-gray-500 border-b flex gap-1 items-center",children:[(0,n.jsx)("span",{children:t("Exercise was added")}),(0,n.jsx)(b,{className:"w-3"})]})]}),{duration:3e3})):p.error(t("Something went wrong"),{duration:3e3})}finally{e.current.delete(i)}},createWorksheet:async({title:c,description:r,arRefImage:o})=>{let a=new FormData;a.append("title",c),r&&a.append("description",r),o&&a.append("arRefImage",o),s.submit(a,{method:"POST",action:"/collection/worksheets?index"})},result:s.data?.worksheet,state:s.state}}export{D as a};
4//# sourceMappingURL=/build/_shared/chunk-ARMD5XUB.js.map
5
6//# debugId=d3650067-4799-510d-bfad-5b069cd09ef3

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.