vendor: 4,412 bytes, lines 1-2
1/*! For license information please see Resources-components-ResourceItem-vue.7e55f2ea.js.LICENSE.txt */ 2"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[5967],{47393:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),c=new L(n||[]);return i(a,"_invoke",{value:E(e,r,c)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var h={};function p(){}function m(){}function y(){}var v={};u(v,c,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(j([])));b&&b!==t&&r.call(b,c)&&(v=b);var w=y.prototype=p.prototype=Object.create(v);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function o(i,a,c,l){var s=f(e[i],e,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==n(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,c,l)}),(function(e){o("throw",e,c,l)})):t.resolve(d).then((function(e){u.value=e,c(u)}),(function(e){return o("throw",e,c,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return F()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=f(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function S(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function B(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(B,this),this.reset(!0)}function j(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:F}}function F(){return{value:void 0,done:!0}}return m.prototype=y,i(w,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:m,configurable:!0}),m.displayName=u(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},x(k.prototype),u(k.prototype,l,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Prom
2ise);var a=new k(d(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(w),u(w,s,"Generator"),u(w,c,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function i(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}r.d(t,{De:()=>p,VK:()=>m,aU:()=>y,ob:()=>h,qd:()=>l,wA:()=>u});var a=null,c=null;function l(e,t){a=e,t&&(c=t)}function s(){if("undefined"==typeof localStorage)return"ssr_anonymous";var e=localStorage.getItem("meilisearch_user_id");e||(e="user_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),localStorage.setItem("meilisearch_user_id",e));try{var t,r,n,o=(null===(t=window.Inertia)||void 0===t?void 0:t.page)||{},i=null==o||null===(r=o.props)||void 0===r||null===(n=r.auth)||void 0===n?void 0:n.user;i&&i.id&&(e="user_"+i.id)}catch(e){}return e}function u(){return s()}function d(e){return f.apply(this,arguments)}function f(){var e;return e=o().mark((function e(t){var r,n,i,l,u,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=s(),n=a,i=c,r&&n&&i){e.next=6;break}return("localhost"===window.location.hostname||window.location.search.includes("debug"))&&console.log("[Meilisearch Analytics] Skipping event (not yet initialized)",{eventType:t.eventType,hasUserId:!!r,hasApiKey:!!n,hasHost:!!i}),e.abrupt("return");case 6:return l={eventType:t.eventType,eventName:t.eventName||("click"===t.eventType?"Search Result Clicked":"Conversion"),indexUid:t.indexUid,userId:r,objectId:t.objectId},t.objectName&&(l.objectName=t.objectName),void 0!==t.position&&null!==t.position&&(l.position=t.position),t.queryUid&&(l.queryUid=t.queryUid),e.prev=10,u="".concat(i.replace(/\/$/,""),"/events"),e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n),"X-MS-USER-ID":r},body:JSON.stringify(l)});case 14:(d=e.sent).ok?console.log("[Meilisearch Analytics] Event sent successfully:",t.eventType,t.eventName):console.warn("[Meilisearch Analytics] Event failed:",d.status,d.statusText),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(10),console.warn("[Meilisearch Analytics] Failed to send event:",e.t0);case 21:case"end":return e.stop()}}),e,null,[[10,18]])})),f=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function c(e){i(a,n,o,c,l,"next",e)}function l(e){i(a,n,o,c,l,"throw",e)}c(void 0)}))},f.apply(this,arguments)}function h(e){d({eventType:"click",eventName:"Search Result Clicked",indexUid:e.indexUid,objectId:e.objectId,objectName:e.objectName,position:e.position,queryUid:e.queryUid})}function p(e){var t=e.indexUid,r=e.objectId,n=e.objectName,o=e.eventName,i=e.queryUid;i||(i=new URLSearchParams(window.location.search).get("queryUid"));d({eventType:"conversion",eventName:o||"Conversion",indexUid:t,objectId:r,objectName:n,queryUid:i})}function m(){return new URLSearchParams(window.location.search).get("queryUid")}function y(){try{var e,t,r,n=(null===(e=window.Inertia)||void 0===e?void 0:e.page)||{},o=(null==n||null===(t=n.props)||void 0===t||null===(r=t.integrations)||void 0===r?void 0:r.meilisearch)||{},i=window.location.pathname;return i.includes("/lesson-plans/")||i.includes("/external-resources/")?o.teachingMaterialsIndex||"teaching_materials":i.includes("/teacher-guides/")?o.teacherGuidesIndex||"teacher_guides":i.includes("/climate-change-explainers/")?o.climateExplainersIndex||"climate_explainers":i.includes("/professional-development/")?o.pdIndex||"professional_development":i.includes("/news/")?o.newsIndex||"news":null}catch(e){return null}}},87202:(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a={class:"overflow-hidden flex-shrink-0 bottom-0 left-0 pr-2 pl-1 -ml-1 -mb-1 absolute bg-white flex items-center justify-center rounded-tr-xl rounded-bl-xl text-sm z-10"},c={class:"w-full h-full resource-card duration-150 object-cover overflow-hidden rounded-bl-[13px] rounded-tr-xl rounded-tl-xl rounded-br-xl"},l=["src"],s=["href"],u={key:1,class:"line-clamp-3 mt-[12px] font-semibold"};var d=r(15973),f=r(76306),h=r(87879),p=r(72326),m=r(3754),y=r(47393);const v={components:{ItemCard:d.Z,AisHighlight:f.YE,Grades:m.Z},props:{resource:Object,isLoadedFromAlgolia:{default:!0,type:Boolean},position:{type:Number,default:null},queryUid:{type:String,default:null}},computed:{url:function(){if(this.resource.slug){var e;if(this.resource.is_external_resource?e=route("resources.show",this.resource.slug):this.resource.is_internal_resource?e=route("stc.show",this.resource.slug):this.resource.is_internal_unit_plan&&(e=route("stc.unit",this.resource.slug)),e&&this.queryUid){var t=e.includes("?")?"&":"?";return e+t+"queryUid="+encodeURIComponent(this.queryUid)}return e}return null},providerImageUrl:function(){var e;return null!==(e=this.resource.firstProviderCircleImageUrl)&&void 0!==e?e:this.resource.firstProviderImageUrl},imageUrl:function(){return this.resource.image_conversions&&this.resource.image_conversions[240]?this.resource.image_conversions[240]:this.resource.image_conversions&&this.resource.image_conversions[360]?this.resource.image_conversions[360]:this.resource.image}},methods:{notifyAlgoliaAboutClick:function(){var e=this.teachingMaterialsIndex||"teaching_materials";if((0,y.ob)({indexUid:e,objectId:String(this.resource.id),objectName:this.resource.title,position:this.position,queryUid:this.queryUid}),this.aa){var t=this.resource.id;this.aa("clickedObjectIDs",{objectIDs:[t.toString()],eventName:"External Resource Clicked",index:this.teachingMaterialsIndex})}},sortGradeBands:p.dP},setup:function(){var e,t,r,o,i=(0,n.inject)("initAndGetAlgoliaEventDispatcher")(),a=(0,h.qt)();return{aa:i,teachingMaterialsIndex:(null===(e=a.props.integrations)||void 0===e||null===(t=e.meilisearch)||void 0===t?void 0:t.teachingMaterialsIndex)||(null===(r=a.props.integrations)||void 0===r||null===(o=r.algolia)||void 0===o?void 0:o.teachingMaterialsIndex)||"teaching_materials"}}};const g=(0,r(83744).Z)(v,[["render",function(e,t,r,i,d,f){var h=(0,n.resolveComponent)("Grades"),p=(0,n.resolveComponent)("AisHighlight"),m=(0,n.resolveComponent)("PrimaryButton"),y=(0,n.resolveComponent)("ItemCard");return(0,n.openBlock)(),(0,n.createBlock)(y,{item:r.resource,imageUrl:f.imageUrl,bookmarkRoute:"tm.bookmark",actionUrl:f.url,onClick:t[1]||(t[1]=function(e){return f.notifyAlgoliaAboutClick()})},(0,n.createSlots)({badge:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",a,(0,n.toDisplayString)(r.resource.type),1)]})),image:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",c,[(0,n.createElementVNode)("img",{alt:"stc",class:"w-full h-full object-cover group-hover:scale-105 duration-150",src:f.imageUrl},null,8,l)])]})),bands:(0,n.withCtx)((function(){return[(0,n.createVNode)(h,{grades:r.resource.grades},null,8,["grades"])]})),title:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{href:f.url},[r.isLoadedFromAlgolia?((0,n.openBlock)(),(0,n.createBlock)(p,{key:0,attribute:"title",hit:r.resource,"class-names":{"ais-Highlight":"font-semibold line-clamp-3"}},null,8,["hit"])):((0,n.openBlock)(),(0,n.createElementBlock)("div",u,(0,n.toDisplayString)(r.resource.title),
21))],8,s)]})),tags:(0,n.withCtx)((function(){return[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.resource.subjects_list_short,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,class:"text-xs rounded-2xl bg-[#EEF1F6] px-2.5 py-0.5"},(0,n.toDisplayString)(e),1)})),128))]})),_:2},[f.url?{name:"action",fn:(0,n.withCtx)((function(){return[(0,n.createVNode)(m,{onClick:t[0]||(t[0]=function(e){return f.notifyAlgoliaAboutClick()}),href:f.url},{default:(0,n.withCtx)((function(){return o(t[2]||(t[2]=[(0,n.createElementVNode)("span",{class:"capitalize"},"View Resource",-1)]))})),_:1},8,["href"])]})),key:"0"}:void 0]),1032,["item","imageUrl","actionUrl"])}]])},85521:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a={width:"41",height:"45",viewBox:"0 0 41 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const c={},l=(0,r(83744).Z)(c,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("svg",a,o(t[0]||(t[0]=[(0,n.createStaticVNode)('<g filter="url(#filter0_d_1092_2850)"><path d="M4 0H20.5H37V33.7574C37 36.4301 33.7686 37.7686 31.8787 35.8787L22.6213 26.6213C21.4497 25.4497 19.5503 25.4497 18.3787 26.6213L9.12132 35.8787C7.23142 37.7686 4 36.4301 4 33.7574V0Z" fill="currentColor"></path><path d="M4.25 0.25H20.5H36.75V33.7574C36.75 36.2073 33.7879 37.4343 32.0555 35.7019L22.7981 26.4445C21.5289 25.1753 19.4711 25.1753 18.2019 26.4445L8.94454 35.7019C7.21214 37.4343 4.25 36.2073 4.25 33.7574V0.25Z" stroke="currentColor" stroke-width="0.5"></path></g><defs><filter id="filter0_d_1092_2850" x="0" y="0" width="41" height="44.7632" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1092_2850"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1092_2850" result="shape"></feBlend></filter></defs>',2)])))}]])},3754:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(41916),o={key:0},i={key:1,class:"flex flex-wrap gap-2"};var a=r(72326);function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const s={props:{grades:{type:Array,required:!0},showColors:{type:Boolean,default:!0},plain:{type:Boolean,default:!1}},computed:{processedGrades:function(){return this.grades?function(e){if(!e||e.length<=7)return c(e).sort(a.dP);for(var t=function(e){return-1===e?"PK":0===e?"K":13===e?"AP":e.toString()},r=c(e).sort(a.dP).map((function(e){return"PK"===e?-1:"K"===e?0:"AP"===e?13:parseInt(e)})),n=[],o=r[0],i=r[0],l=1;l<r.length;l++)r[l]===i+1||(o===i?n.push(t(o)):n.push("".concat(t(o),"-").concat(t(i))),o=r[l]),i=r[l];return o===i?n.push(t(o)):n.push("".concat(t(o),"-").concat(t(i))),n.sort(a.dP)}(this.grades):[]},nonK12Grades:function(){if(!this.processedGrades)return[];var e=["K","1","2","3","4","5","6","7","8","9","10","11","12"];return this.processedGrades.filter((function(t){return!e.includes(t)}))},plainGradesText:function(){return this.processedGrades.length?this.hasK12(this.processedGrades)?["K-12"].concat(c(this.nonK12Grades)).join(", "):this.processedGrades.join(", "):""}},methods:{gradeColorMap:function(e){return e?e.includes("-")?"#FFEDB8":{PK:"#FFEDB8",K:"#FFEDB8",1:"#FFEDB8",2:"#FFEDB8",3:"#FFEDB8",4:"#FFEDB8",5:"#FFEDB8",6:"#FFEDB8",7:"#FFEDB8",8:"#FFEDB8",9:"#FFEDB8",10:"#FFEDB8",11:"#FFEDB8",12:"#FFEDB8",AP:"#FFEDB8","K-12":"#FFEDB8"}[e]||"#FFEDB8":"#FFEDB8"},sortGradeBands:a.dP,hasK12:function(e){if(!e)return!1;return["K","1","2","3","4","5","6","7","8","9","10","11","12"].every((function(t){return e.includes(t)}))}}};const u=(0,r(83744).Z)(s,[["render",function(e,t,r,a,c,l){return r.plain?((0,n.openBlock)(),(0,n.createElementBlock)("span",o,(0,n.toDisplayString)(l.plainGradesText),1)):((0,n.openBlock)(),(0,n.createElementBlock)("div",i,[l.hasK12(l.processedGrades)?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createElementVNode)("span",{style:(0,n.normalizeStyle)({backgroundColor:r.showColors?l.gradeColorMap("K-12"):""}),class:"px-3 py-1.5 rounded-full uppercase text-xs font-medium whitespace-nowrap flex-shrink-0"}," K-12 ",4),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(l.nonK12Grades,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,style:(0,n.normalizeStyle)({backgroundColor:r.showColors?l.gradeColorMap(e):""}),class:"px-2 py-1.5 rounded-full uppercase text-xs font-medium whitespace-nowrap flex-shrink-0"},(0,n.toDisplayString)(e),5)})),128))],64)):((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,{key:1},(0,n.renderList)(l.processedGrades,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,style:(0,n.normalizeStyle)({backgroundColor:r.showColors?l.gradeColorMap(e):""}),class:"px-2 py-1.5 rounded-full uppercase text-xs font-medium whitespace-nowrap flex-shrink-0"},(0,n.toDisplayString)(e),5)})),128))]))}]])},15973:(e,t,r)=>{r.d(t,{Z:()=>_});var n=r(41916),o=["href"],i={class:"bg-white w-full rounded-xl overflow-hidden h-full shadow-lg group border flex flex-col relative group"},a={class:"p-[12px] pb-0 flex-shrink-0"},c={class:"relative w-full overflow-hidden h-32 rounded-r-xl rounded-tl-lg"},l=["src"],s={class:"flex flex-col flex-1 min-h-0"},u={class:"p-4 pb-0 border-b flex-1 flex flex-col"},d={class:"flex items-center space-x-1.5 flex-shrink-0"},f={class:"flex items-center my-3 flex-shrink-0"}
vendor: 4,180 bytes, line 2
2,h={class:"flex items-center min-h-[60px]"},p={class:"flex-shrink-0"},m={class:"p-4 flex items-center space-x-1.5 flex-shrink-0"};var y=r(76306),v=r(5121),g=r(72326),b=r(95785),w=r(85521),x=r(87879);function k(){k=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,o){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),c=new L(o||[]);return n(a,"_invoke",{value:x(e,r,c)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function h(){}function p(){}var m={};l(m,i,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==t&&r.call(v,i)&&(m=v);var g=p.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,i,a,c){var l=u(e[n],e,i);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==E(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,c)}))}c(l.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function x(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return F()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function S(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function B(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(B,this),this.reset(!0)}function j(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:F}}function F(){return{value:void 0,done:!0}}return h.prototype=p,n(g,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:h,configurable:!0}),h.displayName=l(p,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,c,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),l(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,i){void 0===i&&(i=Prom
2ise);var a=new w(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(g),l(g,c,"Generator"),l(g,i,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=j,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function S(e,t,r,n,o,i,a){try{var c=e[i](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,o)}const B={components:{AisHighlight:y.YE,BookmarkingIcon:w.Z,PrimaryButton:b.Z},data:function(){return{subjectsExpanded:!1,topicsExpanded:!1,bookmarked:this.isBookmarked}},methods:{removeTags:function(e){return null===e||""===e?null:(e=e.toString()).replace(/(<([^>]+)>)/gi,"")},toggleBookmark:function(){var e,t=this;return(e=k().mark((function e(){var r;return k().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.user&&("object"!==E(t.user)||t.user.id)){e.next=3;break}return window.location.href=route("login"),e.abrupt("return");case 3:return r=!t.isBookmarked,e.prev=4,t.bookmarked=r,e.next=8,v.Z.put(route(t.bookmarkRoute,t.item.id),{is_bookmarked:r}).then((function(e){return e.data}));case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),console.error(e.t0);case 13:return e.prev=13,t.$emit("bookmarkUpdated",{id:t.item.id,is_bookmarked:r}),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[4,10,13,16]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){S(i,n,o,a,c,"next",e)}function c(e){S(i,n,o,a,c,"throw",e)}a(void 0)}))})()}},computed:{user:function(){return(0,x.qt)().props.auth.user}},props:{item:Object,hitType:String,buttonTextColor:{type:String,defeault:"white"},isAlgoliaItem:{type:Boolean,default:!0},isBookmarked:{type:Boolean,default:!1},imageUrl:{type:String,default:"https://subjecttoclimate.nyc3.digitaloceanspaces.com/4365/conversions/adryan-ra-ysT-xbhhK2c-unsplash-thumb.jpg"},showBookMark:{type:Boolean,default:!0},bookmarkRoute:{type:String},actionUrl:{type:String,default:null}},setup:function(){return{mergeContinuousLevels:g.aV}}};const _=(0,r(83744).Z)(B,[["render",function(e,t,r,y,v,g){var b=(0,n.resolveComponent)("BookmarkingIcon");return(0,n.openBlock)(),(0,n.createElementBlock)("a",{href:r.actionUrl,class:"h-full block"},[(0,n.createElementVNode)("div",i,[r.showBookMark?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,onClick:t[0]||(t[0]=(0,n.withModifiers)((function(e){return g.toggleBookmark()}),["prevent"])),class:(0,n.normalizeClass)(["absolute top-0 right-4 z-10 hover:scale-105 duration-150 ",v.bookmarked?"text-[#FF8B8B]":"text-[#FFF4F4] hover:text-[#ffdddd]"])},[(0,n.createVNode)(b)],2)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",a,[(0,n.createElementVNode)("div",c,[(0,n.renderSlot)(e.$slots,"image",{},(function(){return[(0,n.createElementVNode)("img",{alt:"Avatar",class:"w-full absolute h-full duration-150 object-cover group-hover:scale-105",src:r.imageUrl},null,8,l)]})),(0,n.renderSlot)(e.$slots,"badge")])]),(0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("div",d,[(0,n.renderSlot)(e.$slots,"bands")]),(0,n.createElementVNode)("div",f,[(0,n.createElementVNode)("div",h,[(0,n.renderSlot)(e.$slots,"title")])]),(0,n.createElementVNode)("div",p,[(0,n.renderSlot)(e.$slots,"description")])]),(0,n.createElementVNode)("div",m,[(0,n.renderSlot)(e.$slots,"tags")])])])],8,o)}]])}}]); 3//# sourceMappingURL=Resources-components-ResourceItem-vue.7e55f2ea.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.