1import{_ as K}from"./CCOthRJu.js";import{_ as M}from"./FOg-Jkk5.js";import{_ as D}from"./Cg1hh4iN.js";import{n as G,M as U,a1 as Y,y as O,h as r,l as $,a4 as T,L as t,P as L,E as f,d as j,A as s,k as n,f as q,b as z,e as l,K as k,F as x,G as C,g as F,c as H}from"./387-YfpR.js";import{_ as J}from"./DK37LWyq.js";import{u as Q}from"./C9wr4_Km.js";import{d as W,b as X}from"./Cj-Sdtbj.js";import"./DdnHrjyZ.js";import"./CTZvYLbk.js";import"./yBMYP3zE.js";import"./CFRvOZHG.js";import"./nAUFc139.js";import"./TwSN4X1i.js";import"./CuNARbKH.js";const Z={class:"page page--form"},ee={key:0,class:"well well--loading"},te={key:1,class:"tool-list"},oe={class:"tool-list__subhed"},le={key:2,class:"tool-list"},ne={key:3,class:"tool-list tool-list--requests"},se={class:"tool-list__subhed"},ae={key:4,class:"tool-list"},ue=G({__name:"name",setup(re){Q();const S=U(),{formKey:N,previousStep:P,nextStep:I,currentStep:R,steps:A}=W();N.value="name";const y=f(!1);let w=null;const g=f(null),i=f(null),h=f(null),d=f(null),m=f(null),p=X(["tool_request_name"]),B=j(()=>!!p.tool_request_name.value);Y(()=>p.tool_request_name.value,o=>{(!o||o.length<=2)&&(y.value=!1,g.value=null,d.value=null,i.value=null,m.value=null),w&&clearTimeout(w),w=setTimeout(V,700)}),O(()=>{setTimeout(V,500)});const E=o=>{o.code==="Enter"&&o.preventDefault()},V=async()=>{const o=p.tool_request_name.value;if(o&&o.length>2&&g.value!==o){y.value=!0,g.value=o,d.value=null,i.value=null,m.value=null;const[{data:{tools:e=[]}={}},{data:c=[]}]=await Promise.all([h.value===null?S.getTools():Promise.resolve({data:{tools:h.value}}),S.getToolRequests({"filter[tool_name]":o}),new Promise(u=>setTimeout(u,1e3))]);e&&e.length&&(h.value=e),d.value=h.value?.slice().filter(u=>u.name.toLowerCase().includes(o?.toLowerCase()))||null,m.value=h.value?.slice().reduce((u,_)=>{const v=_.alternate_tools&&_.alternate_tools.length&&_.alternate_tools.find(b=>b.name&&b.name.toLowerCase().includes(o?.toLowerCase()));return v&&u.push({..._,explanation:v&&v.description}),u},[])||null,c&&c.length&&(i.value=c),y.value=!1}};return(o,e)=>{const c=K,u=M,_=D,v=z,b=J;return s(),r("div",Z,[$(b,{"is-submittable":t(B),"back-path":t(P)?t(P).path(o._.provides[L]||o.$route):null,"next-path":t(I)?t(I).path(o._.provides[L]||o.$route):null,title:t(R)?t(R).title:null,steps:t(A)},{default:T(()=>[$(c,{modelValue:t(p).tool_request_name.value,"onUpdate:modelValue":e[0]||(e[0]=a=>t(p).tool_request_name.value=a),required:!0,autocomplete:"off",name:"tool_request_name",label:"Tool Name",onKeydown:E},{helpAfter:T(()=>[...e[1]||(e[1]=[n(` 2 Please enter the toolâs name as spelled by the provider. This will 3 help us determine if we already know about this tool. 4 `,-1)])]),_:1},8,["modelValue"]),e[20]||(e[20]=n()),t(p).tool_request_name.value?.length>2?(s(),q(v,{key:0},{default:T(()=>[t(y)?(s(),r("div",ee,[...e[2]||(e[2]=[l("div",{class:"circleloader","data-is-spinning":""},null,-1),n(),l("div",null,"Checking our library...",-1)])])):t(d)&&t(d).length>0?(s(),r("aside",te,[l("header",null,[l("h3",null,` 5 Is `+k(t(d).length>1?"one of these":"this")+` the tool youâd 6 like to request? 7 `,1),e[3]||(e[3]=n()),l("p",oe,` 8 Good news! 9 `+k(t(d).length>1?"These tools are":"This tool is")+` 10 currently licensed. 11 `,1),e[4]||(e[4]=n()),e[5]||(e[5]=l("p",{class:"tool-list__instructions"},` 12 Select the tool to learn more about how you can access and use it, 13 how it can enhance teaching and learning, and how you can get 14 help. 15 `,-1))]),e[6]||(e[6]=n()),(s(!0),r(x,null,C(t(d),a=>(s(),q(u,{key:`tool-${a.id}`,tool:a},null,8,["tool"]))),128)),e[7]||(e[7]=n()),e[8]||(e[8]=l("p",{class:"tool-list__instructions"},` 16 If you donât see the tool youâre looking for, or if the tool isnât 17 currently available in your school or department, please continue 18 submitting your request. 19 `,-1))])):t(m)&&t(m).length>0?(s(),r("aside",le,[e[9]||(e[9]=l("header",null,[l("h3",null,"Similar Tools"),n(),l("p",{class:"tool-list__instructions"},` 20 Select the tool to learn more about how you can access and use it, 21 how it can enhance teaching and learning, and how you can get 22 help. 23 `)],-1)),e[10]||(e[10]=n()),(s(!0),r(x,null,C(t(m),a=>(s(),q(u,{key:`tool-${a.id}`,tool:a,explanation:a.explanation},null,8,["tool","explanation"]))),128)),e[11]||(e[11]=n()),e[12]||(e[12]=l("p",{class:"tool-list__instructions"},` 24 If you donât see the tool youâre looking for, or if the tool isnât 25 currently available in your school or department, please continue 26 submitting your request. 27 `,-1))])):t(i)&&t(i).length>0?(s(),r("aside",ne,[l("header",null,[l("h3",null,` 28 Is `+k(t(i).length>1?"one of these":"this")+` the 29 tool youâd like to request? 30 `,1),e[13]||(e[13]=n()),l("p",se,` 31 Youâre not alone: others have already requested 32 `+k(t(i).length>1?"these tools":"this tool")+`. 33 `,1),e[14]||(e[14]=n()),e[15]||(e[15]=l("p",{class:"tool-list__instructions"},` 34 Select the request to learn more about its status. You can add
35 your support and subscribe to receive status updates. 36 `,-1))]),e[16]||(e[16]=n()),(s(!0),r(x,null,C(t(i),a=>(s(),q(_,{key:`tool-request-${a.id}`,"tool-request":a,"view-mode":"full"},null,8,["tool-request"]))),128)),e[17]||(e[17]=n()),e[18]||(e[18]=l("p",{class:"tool-list__instructions"},` 37 If you donât see the tool youâre looking for, please continue 38 submitting your request. 39 `,-1))])):t(g)?(s(),r("div",ae,[...e[19]||(e[19]=[l("h3",null,"It looks like we havenât received any requests for this tool.",-1),n(),l("p",{class:"tool-list__subhed"},"Please continue with your request.",-1)])])):F("",!0)]),_:1})):F("",!0)]),_:1},8,["is-submittable","back-path","next-path","title","steps"])])}}}),we=H(ue,[["__scopeId","data-v-e77f11b7"]]);export{we as default};
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.