vendor: 5,172 bytes, lines 1-2
1/*! For license information please see Search-components-ProfessionalDevelopmentContentDirect-vue.1c32c89e.js.LICENSE.txt */ 2"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[9050,2116,7941,7930],{9482:(e,t,r)=>{r.d(t,{x:()=>p});var n=r(41916),o=r(15229),a=r(87879),i=r(5121),l=r(47393),c=r(91440),u=r(72326);function s(e){return s="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},s(e)}function d(){d=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:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,o){var a=t&&t.prototype instanceof h?t:h,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:E(e,r,l)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function h(){}function v(){}function m(){}var y={};c(y,a,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(j([])));b&&b!==t&&r.call(b,a)&&(y=b);var w=m.prototype=h.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function o(n,a,i,l){var c=f(e[n],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==s(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(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,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=S(i,r);if(l){if(l===p)continue;return l}}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 c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.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")),p;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function C(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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function j(e){if(e){var t=e[a];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:L}}function L(){return{value:void 0,done:!0}}return v.prototype=m,n(w,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:v,configurable:!0}),v.displayName=c(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,c(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},x(k.prototype),c(k.prototype,i,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(u(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(w),c(w,l,"Generator"),c(w,a,(function(){return this})),c(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,N.prototype={constructor:N,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.forEac
2h(B),!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 i.type="throw",i.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 a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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 a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},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),p},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),B(r),p}},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;B(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),p}},e}function f(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function p(e){var t,r,s,p,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},v=h.hitsPerPage,m=void 0===v?9:v,y=h.initialSearch,g=void 0===y||y,b=h.autoSearch,w=void 0===b||b,x=h.initialQuery,k=void 0===x?"":x,E=h.initialFilters,S=void 0===E?"":E,C=h.initialSort,B=void 0===C?"":C,N=h.facets,j=void 0===N?[]:N,L=h.aiSearchEnabled,F=void 0!==L&&L,V=h.aiSearchEndpoint,O=void 0===V?null:V,A=h.initialHits,I=void 0===A?[]:A,_=h.initialTotalHits,P=void 0===_?0:_,D=(0,a.qt)(),T=(null===(t=D.props.integrations)||void 0===t||null===(r=t.meilisearch)||void 0===r?void 0:r.host)||("undefined"!=typeof window?window.MEILISEARCH_HOST:void 0)||"http://localhost:7700",R=(null===(s=D.props.integrations)||void 0===s||null===(p=s.meilisearch)||void 0===p?void 0:p.key)||("undefined"!=typeof window?window.MEILISEARCH_KEY:void 0)||"";R&&(0,l.qd)(R,T);var M=(0,l.wA)(),G=new o.MeiliSearch({host:T,apiKey:R,requestConfig:{headers:{"X-MS-USER-ID":M}}}),U=(0,n.ref)(I),q=(0,n.ref)(P),Z=(0,n.ref)(Math.ceil((P||0)/m)),$=(0,n.ref)(1),H=(0,n.ref)(!1),K=(0,n.ref)(null),z=(0,n.ref)(k),Q=(0,n.ref)(S),Y=(0,n.ref)(B),J=(0,n.ref)({}),W=(0,n.ref)(0),X=(0,n.ref)(null),ee=(0,n.ref)({enabled:F,used:!1,summary:null,match_quality:null,matched_themes:[],result_reasons:[],unmet_constraints:[]}),te=function(){var t,r=(t=d().mark((function t(){var r,n,o,a,l,s,f,p,h,v,y,g,b,w,x=arguments;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(x.length>0&&void 0!==x[0]&&x[0]||(H.value=!0),K.value=null,t.prev=3,n=(0,u.Bl)(z.value),!(F&&O&&z.value.trim())){t.next=24;break}return t.prev=6,t.next=9,i.Z.post(O,{query:z.value,filters:Q.value||"",facets:j,sort:Y.value,page:$.value,per_page:m});case 9:return v=t.sent,y=v.data,U.value=y.hits||[],q.value=y.estimatedTotalHits||0,Z.value=y.totalPages||Math.ceil(q.value/m),W.value=y.processingTimeMs||0,J.value=y.facetDistribution||{},X.value=y.queryUid||null,ee.value={enabled:!(null===(o=y.ai)||void 0===o||!o.enabled),used:!(null===(a=y.ai)||void 0===a||!a.used),summary:(null===(l=y.ai)||void 0===l?void 0:l.summary)||null,match_quality:(null===(s=y.ai)||void 0===s?void 0:s.match_quality)||null,matched_themes:(null===(f=y.ai)||void 0===f?void 0:f.matched_themes)||[],result_reasons:(null===(p=y.ai)||void 0===p?void 0:p.result_reasons)||[],unmet_constraints:(null===(h=y.ai)||void 0===h?void 0:h.unmet_constraints)||[]},t.abrupt("return");case 21:t.prev=21,t.t0=t.catch(6),console.warn("[useMeilisearch] AI search unavailable, falling back to Meilisearch.",t.t0);case 24:return g=G.index(e),b={limit:m,offset:($.value-1)*m},n&&(b.q=n),Q.value&&(b.filter=Q.value),j.length>0&&(b.facets=j),Y.value&&!z.value&&(b.sort=Array.isArray(Y.value)?Y.value:[Y.value]),t.next=32,g.search(n||"",b);case 32:w=t.sent,U.value=w.hits,q.value=w.estimatedTotalHits||0,Z.value=Math.ceil(q.value/m),W.value=w.processingTimeMs,J.value=w.facetDistribution||{},X.value=(null===(r=w.metadata)||void 0===r?void 0:r.queryUid)||null,ee.value={enabled:F,used:!1,summary:null,match_quality:null,matched_themes:[],result_reasons:[],unmet_constraints:[]},(0,c.j)({tenantId:D.props.tenantId,index:e,source:"single"}),t.next=47;break;case 43:t.prev=43,t.t1=t.catch(3),console.error("[useMeilisearch] Search error:",t.t1),K.value=t.t1;case 47:return t.prev=47,H.value=!1,t.finish(47);case 50:case"end":return t.stop()}}),t,null,[[3,43,47,50],[6,21]])})),function(){var e=this,r=arguments;
2return new Promise((function(n,o){var a=t.apply(e,r);function i(e){f(a,n,o,i,l,"next",e)}function l(e){f(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(){return r.apply(this,arguments)}}();return g&&te(),{hits:U,totalHits:q,totalPages:Z,currentPage:$,isLoading:H,error:K,query:z,filters:Q,sort:Y,facetDistribution:J,processingTimeMs:W,queryUid:X,aiMeta:ee,search:te,setQuery:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];z.value=e,r&&($.value=1),w&&t&&te()},setFilters:function(e){Q.value=e,$.value=1,w&&te()},setSort:function(e){Y.value=e,$.value=1,w&&te()},goToPage:function(e){$.value=e,w&&te()},setResults:function(e){e&&(U.value=e.hits||[],q.value=e.estimatedTotalHits||e.totalHits||0,Z.value=Math.ceil(q.value/m),J.value=e.facetDistribution||{},W.value=e.processingTimeMs||0,$.value=1,ee.value={enabled:F,used:!1,summary:null,match_quality:null,matched_themes:[],result_reasons:[],unmet_constraints:[]})}}}},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,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),l=new N(n||[]);return a(i,"_invoke",{value:E(e,r,l)}),i}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 p={};function h(){}function v(){}function m(){}var y={};s(y,l,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(j([])));b&&b!==t&&r.call(b,l)&&(y=b);var w=m.prototype=h.prototype=Object.create(y);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function o(a,i,l,c){var u=f(e[a],e,i);if("throw"!==u.type){var s=u.arg,d=s.value;return d&&"object"==n(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,l,c)}),(function(e){o("throw",e,l,c)})):t.resolve(d).then((function(e){s.value=e,l(s)}),(function(e){return o("throw",e,l,c)}))}c(u.arg)}var i;a(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 E(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=S(i,r);if(l){if(l===p)continue;return l}}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 c=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.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")),p;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function C(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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);
2if("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:L}}function L(){return{value:void 0,done:!0}}return v.prototype=m,a(w,"constructor",{value:m,configurable:!0}),a(m,"constructor",{value:v,configurable:!0}),v.displayName=s(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},x(k.prototype),s(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(d(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},x(w),s(w,u,"Generator"),s(w,l,(function(){return this})),s(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,N.prototype={constructor:N,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(B),!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 i.type="throw",i.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 a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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 a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},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),p},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),B(r),p}},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;B(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),p}},e}function a(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}r.d(t,{De:()=>h,VK:()=>v,aU:()=>m,ob:()=>p,qd:()=>c,wA:()=>s});var i=null,l=null;function c(e,t){i=e,t&&(l=t)}function u(){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)||{},a=null==o||null===(r=o.props)||void 0===r||null===(n=r.auth)||void 0===n?void 0:n.user;a&&a.id&&(e="user_"+a.id)}catch(e){}return e}function s(){return u()}function d(e){return f.apply(this,arguments)}function f(){var e;return e=o().mark((function e(t){var r,n,a,c,s,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=u(),n=i,a=l,r&&n&&a){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:!!a}),e.abrupt("return");case 6:return c={eventType:t.eventType,eventName:t.eventName||("click"===t.eventType?"Search Result Clicked":"Conversion"),indexUid:t.indexUid,userId:r,objectId:t.objectId},t.objectName&&(c.objectName=t.objectName),void 0!==t.position&&null!==t.position&&(c.position=t.position),t.queryUid&&(c.queryUid=t.queryUid),e.prev=10,s="".concat(a.replace(/\/$/,""),"/events"),e.next=14,fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n),"X-MS-USER-ID":r},body:JSON.stringify(c)});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 i=e.apply(t,r);function l(e){a(i,n,o,l,c,"next",e)}function c(e){a(i,n,o,l,c,"throw",e)}l(void 0)}))},f.apply(this,arguments)}function p(e){d({eventType:"click",eventName:"Search Result Clicked",indexUid:e.indexUid,objectId:e.objectId,objectName:e.objectName,position:e.position,queryUid:e.queryUid})}function h(e){var t=e.indexUid,r=e.objectId,n=e.objectName,o=e.eventName,a=e.queryUid;a||(a=new URLSearchParams(window.location.search).get("queryUid"));d({eventType:"conversion",eventName:o||"Conversion",indexUid:t,objectId:r,objectName:n,queryUid:a})}function v(){return new URLSearchParams(window.location.search).get("queryUid")}function m(){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)||{},a=window.location.pathname;return a.includes("/lesson-plans/")||a.includes("/external-resources/")?o.teachingMaterialsIndex||"teaching_materials":a.includes("/teacher-guides/")?o.teacherGuidesIndex||"teacher_guides":a.includes("/climate-change-explainers/")?o.climateExplainersIndex||"climate_explainers":a.includes("/professional-development/")?o.pdIndex||"opportunities":a.includes("/news/")?o.newsIndex||"news":null}catch(e){return null}}},91440:(e,t,r)=>{function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(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 o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){c=!0,i=e},f:function(){try{l||null==r.return||r.return()}finally{if(c)throw i}}}}function o(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}function a(e){var t=e.tenantId,r=e.index,n=e.source,o=void 0===n?"single":n;t&&r&&fetch("/api/track-ms-request",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tenant_id:t,index:r,source:o})}).catch((function(){}))}function i(e){var t=e.tenantId,r=e.indexes;if(t&&null!=r&&r.length){var o,i=n(r);try{for(i.s();!(o=i.n()).done;){a({tenantId:t,index:o.value,source:"multi"})}}catch(e){i.e(e)}finally{i.f()}}}r.d(t,{j:()=>a,p:()=>i})},23044:(e,t,r)=>{function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}
2finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(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 o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(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}r.d(t,{K:()=>c,U:()=>l});var a=null,i=1e3;function l(e){var t=e.tenantId,r=e.query,n=void 0===r?null:r,o=e.filters,l=void 0===o?{}:o;a&&clearTimeout(a),a=setTimeout((function(){u({tenantId:t,query:n,filters:l})}),i)}function c(e){var t=e.tenantId,r=e.query,n=void 0===r?null:r,o=e.filters;u({tenantId:t,query:n,filters:void 0===o?{}:o})}function u(e){for(var t,r=e.tenantId,o=e.query,a=e.filters,i={},l=0,c=Object.entries(a);l<c.length;l++){var u=n(c[l],2),s=u[0],d=u[1];d&&(!Array.isArray(d)||d.length>0)&&(i[s]=d)}(o||0!==Object.keys(i).length)&&fetch("/api/track-search",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":(null===(t=document.querySelector('meta[name="csrf-token"]'))||void 0===t?void 0:t.getAttribute("content"))||""},body:JSON.stringify({tenant_id:r,query:o||null,filters:i})}).catch((function(){}))}},90222:(e,t,r)=>{r.d(t,{O:()=>o,T:()=>n});var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">";return e.split(t).slice(-1)[0]},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">";return e.split(t).length}},57264:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".filter-expand-enter-active[data-v-19d7f00a],.filter-expand-leave-active[data-v-19d7f00a]{max-height:1000px;transition:all .3s ease-in-out}.filter-expand-enter-from[data-v-19d7f00a],.filter-expand-leave-to[data-v-19d7f00a]{max-height:0;opacity:0;transform:translateY(-10px)}.filter-expand-enter-to[data-v-19d7f00a],.filter-expand-leave-from[data-v-19d7f00a]{max-height:1000px;opacity:1;transform:translateY(0)}",""]);const a=o},69026:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".filter-expand-enter-active[data-v-16607474],.filter-expand-leave-active[data-v-16607474]{max-height:500px;transition:all .3s ease-in-out}.filter-expand-enter-from[data-v-16607474],.filter-expand-leave-to[data-v-16607474]{max-height:0;opacity:0;transform:translateY(-10px)}.filter-expand-enter-to[data-v-16607474],.filter-expand-leave-from[data-v-16607474]{max-height:500px;opacity:1;transform:translateY(0)}",""]);const a=o},8953:(e,t,r)=>{r.r(t),r.d(t,{default:()=>M});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(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 a(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 a(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 a(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 i={class:"lg:hidden space-y-4 px-4 bg-white"},l={class:"relative"},c={class:"space-y-2 rounded-lg shadow-lg"},u={key:0,class:"absolute bottom-0 left-0 right-0"},s={class:"absolute bottom-2 left-0 right-0 text-center"},d={key:0,class:"text-center mt-4"},f={class:"space-y-4"},p={key:0,class:"text-gray-600"},h={key:1,class:"text-gray-600"},v={key:0,class:"text-center py-8"},m={class:"flex justify-center"},y={class:"sm:hidden flex justify-between items-center w-full space-x-4"},g=["disabled"],b={class:"text-sm"},w=["disabled"],x={class:"hidden lg:flex gap-8 px-4 py-4 sm:py-8"},k={class:"w-64 flex-shrink-0 mt-12 space-y-6"},E={key:0,class:"bg-white p-4 rounded-lg border"},S={class:"space-y-2"},C={class:"flex-1"},B={class:"flex justify-between items-center mb-4"},N={class:"w-full"},j={key:0,class:"text-gray-600"},L={key:1,class:"text-gray-600"},F={key:0,class:"flex items-center gap-2"},V=["value","disabled"],O=["value"],A={key:0,class:"text-center py-8"},I={class:"flex justify-center mt-4"},_={class:"flex items-center space-x-1"},P=["disabled"],D=["onClick","disabled"],T=["disabled"];const R={name:"BaseTabContentDirect",props:{showing:{type:Number,default:0},total:{type:Number,default:0},currentPage:{type:Number,default:1},totalPages:{type:Number,default:1},isLoading:{type:Boolean,default:!1},supportsSorting:{type:Boolean,default:!0},sortOptions:{type:Array,default:function(){return[]}},currentSort:{type:String,default:""}},emits:["page-change","sort-change"],data:function(){return{showAllFilters:!1}},computed:{visiblePages:function(){return this.getVisiblePages(this.currentPage,this.totalPages,10)}},methods:{getVisiblePages:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=[];if(t<=r)for(var o=1;o<=t;o++)n.push(o);else{var a=Math.max(1,e-Math.floor(r/2)),i=a+r;i>t&&(i=t+1,a=Math.max(1,i-r));for(var l=a;l<i&&l<=t;l++)n.push(l)}return n}}};const M=(0,r(83744).Z)(R,[["render",function(e,t,r,a,R,M){return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createElementVNode)("div",i,[(0,n.renderSlot)(e.$slots,"selected-keywords"),(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["transition-all duration-300 overflow-hidden relative",R.showAllFilters?"max-h-[1000px]":"max-h-[60px]"])},[(0,n.createElementVNode)("div",c,[t[7]||(t[7]=(0,n.createElementVNode)("h3",{class:"font-medium mb-4"},"Refine Search Results",-1)),(0,n.renderSlot)(e.$slots,"filters")]),R.showAllFilters?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",u,[t[8]||(t[8]=(0,n.createElementVNode)("div",{class:"h-20 bg-gradient-to-t from-white via-white/80 to-transparent pointer-events-none"},null,-1)),(0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("a",{href:"#",onClick:t[0]||(t[0]=(0,n.withModifiers)((function(e){return R.showAllFilters=!R.showAllFilters}),["prevent"])),class:"text-blue-600 text-sm underline hover:text-blue-800"}," Show more filters ")])]))],2),R.showAllFilters?((0,n.openBlock)(),(0,n.createElementBlock)("div",d,[(0,n.createElementVNode)("a",{href:"#",onClick:t[1]||(t[1]=(0,n.withModifiers)((function(e){return R.showAllFilters=!R.showAllFilters}),["prevent"])),class:"text-blue-600 text-sm underline hover:text-blue-800"}," Hide Filters ")])):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",f,[(0,n.renderSlot)(e.$slots,"results-header",{},(function(){return[r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("p",p,"Loading...")):((0,n.openBlock)(),(0,n.createElementBlock)("p",h,"Showing "+(0,n.toDisplayString)(r.showing)+" out of "+(0,n.toDisplayString)(r.total)+" results",1))]})),r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",v,o(t[9]||(t[9]=[(0,n.createElementVNode)("p",{class:"text-gray-500"},"Searching...",-1)])))):(0,n.renderSlot)(e.$slots,"results-grid",{key:1}),(0,n.renderSlot)(e.$slots,"pagination",{},(function(){return[(0,n.createElementVNode)("div",m,[(0,n.createElementVNode)("div",y,[(0,n.createElementVNode)("button",{disabled:1===r.currentPage||r.isLoading,onClick:t[2]||(t[2]=function(t){return e.$emit("page-change",r.currentPage-1)}),class:"p-2 border rounded-md disabled:opacity-50 disabled:cursor-not-allowed"},o(t[10]||(t[10]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])),8,g),(0,n.createElementVNode)("span",b," Page "+(0,n.toDisplayString)(r.currentPage)+" of "+(0,n.toDisplayString)(r.totalPages),1),(0,n.createElementVNode)("button",{disabled:r.currentPage===r.totalPages||r.isLoading,onClick:t[3]||(t[3]=function(t){return e.$emit("page-change",r.currentPage+1)}),class:"p-2 border rounded-md disabled:opacity-50 disabled:cursor-not-allowed"},o(t[11]||(t[11]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])),8,w)])])]}))])]),(0,n.createElementVNode)("div",x,[(0,n.createElementVNode)("div",k,[(0,n.renderSlot)(e.$slots,"selected-keywords"),e.$slots.filters?((0,n.openBlock)(),(0,n.createElementBlock)("div",E,[t[12]||(t[12]=(0,n.createElementVNode)("h3",{class:"font-medium mb-4"},"Refine Search Results",-1)),(0,n.createElementVNode)("div",S,[(0,n.renderSlot)(e.$slots,"filters")])])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",null,[(0,n.renderSlot)(e.$slots,"all-button")]
2)]),(0,n.createElementVNode)("div",C,[(0,n.createElementVNode)("div",B,[(0,n.renderSlot)(e.$slots,"results-header",{},(function(){return[(0,n.createElementVNode)("div",N,[r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("p",j,"Loading...")):((0,n.openBlock)(),(0,n.createElementBlock)("p",L,"Showing "+(0,n.toDisplayString)(r.showing)+" out of "+(0,n.toDisplayString)(r.total)+" results",1))])]})),(0,n.renderSlot)(e.$slots,"sort-by",{class:"flex items-center gap-2"},(function(){return[r.supportsSorting&&r.sortOptions.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",F,[t[13]||(t[13]=(0,n.createElementVNode)("span",{class:"text-gray-600"},"Sort By:",-1)),(0,n.createElementVNode)("select",{value:r.currentSort,onChange:t[4]||(t[4]=function(t){return e.$emit("sort-change",t.target.value)}),disabled:r.isLoading,class:"border border-gray-200 rounded pl-2 pr-8 py-1 disabled:opacity-50"},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.sortOptions,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("option",{key:e.value,value:e.value},(0,n.toDisplayString)(e.label),9,O)})),128))],40,V)])):(0,n.createCommentVNode)("",!0)]}))]),r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",A,o(t[14]||(t[14]=[(0,n.createElementVNode)("p",{class:"text-gray-500"},"Searching...",-1)])))):(0,n.renderSlot)(e.$slots,"results-grid",{key:1}),(0,n.renderSlot)(e.$slots,"pagination",{},(function(){return[(0,n.createElementVNode)("div",I,[(0,n.createElementVNode)("div",_,[(0,n.createElementVNode)("button",{disabled:1===r.currentPage||r.isLoading,onClick:t[5]||(t[5]=function(t){return e.$emit("page-change",r.currentPage-1)}),class:"px-3 py-2 border rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50"},o(t[15]||(t[15]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])),8,P),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(M.visiblePages,(function(t){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{key:t,onClick:function(r){return e.$emit("page-change",t)},disabled:r.isLoading,class:(0,n.normalizeClass)(["px-4 py-2 border rounded-md",t===r.currentPage?"bg-blue-500 text-white border-blue-500":"hover:bg-gray-50 disabled:opacity-50"])},(0,n.toDisplayString)(t),11,D)})),128)),(0,n.createElementVNode)("button",{disabled:r.currentPage===r.totalPages||r.isLoading,onClick:t[6]||(t[6]=function(t){return e.$emit("page-change",r.currentPage+1)}),class:"px-3 py-2 border rounded-md disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50"},o(t[16]||(t[16]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)])),8,T)])])]}))])])],64)}]])},23270:(e,t,r)=>{r.r(t),r.d(t,{default:()=>A});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(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 a(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 a(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 a(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 i={class:"space-y-2"},l=["href"],c={class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 text-gray-600"},u={key:0},s={key:1},d={class:"flex items-center gap-2"},f={key:0,class:"text-gray-400 hidden sm:inline"},p={key:1,class:"text-sm sm:text-base"},h={class:"font-medium"},v={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6"};var m=r(87879),y=r(9482),g=r(23044),b=r(8953),w=r(2708),x=r(62662),k=r(38320),E=r(5121);function S(e){return S="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},S(e)}function C(){C=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:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:x(e,r,l)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function f(){}function p(){}function h(){}var v={};c(v,a,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(j([])));y&&y!==t&&r.call(y,a)&&(v=y);var g=h.prototype=f.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 5,146 bytes, line 2
2))}function w(e,t){function o(n,a,i,l){var c=s(e[n],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==S(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(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 x(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=k(i,r);if(l){if(l===d)continue;return l}}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 c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function k(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,k(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=s(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function E(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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function j(e){if(e){var t=e[a];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:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(g,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(u(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(g),c(g,l,"Generator"),c(g,a,(function(){return this})),c(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,N.prototype={constructor:N,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(B),!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 i.type="throw",i.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 a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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 a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},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];
2if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),B(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;B(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 B(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function L(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==S(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===S(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return V(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 V(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(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 O={name:"ProfessionalDevelopmentContentDirect",components:{BaseTabContentDirect:b.default,OpportunityItem:w.default,GenericFacetFilter:x.Z,RegionsFilterDirect:k.default},props:{searchQuery:{type:String,required:!0},selectedField:{type:String,required:!0},selectedFieldLabel:{type:String,required:!0},bookmarkedProfessionalOpportunitiesIds:{type:Array,default:function(){return[]}},initialResults:{type:Object,default:null},isFederatedLoading:{type:Boolean,default:!1}},emits:["update:searchQuery","update:hitCount"],setup:function(e,t){var r,o,a,i,l=t.emit,c=(0,m.qt)().props.tenantId,u=(null===(r=(0,m.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.pdIndex)||(null===(a=(0,m.qt)().props.integrations)||void 0===a||null===(i=a.algolia)||void 0===i?void 0:i.pdIndex)||"professional_opportunities",s=(0,n.ref)("undefined"!=typeof window&&window.innerWidth<640),d=(0,n.ref)(e.bookmarkedProfessionalOpportunitiesIds||[]),f="undefined"!=typeof window?new URLSearchParams(window.location.search):new URLSearchParams,p={},h=["type","formats","cost","credit","months","grades","subjects"];h.forEach((function(e){var t=f.get(e);t&&(p[e]=t.split(","))}));var v=(0,n.ref)(p),b=(0,n.ref)(f.get("regions")||""),w=(0,n.computed)((function(){var e="enabled=1 AND tenant_ids IN [".concat(c,"]");return Object.entries(v.value).forEach((function(t){var r=F(t,2),n=r[0],o=r[1];if(o&&o.length>0){var a=o.map((function(e){return"".concat(n,"='").concat(e.replace(/'/g,"\\'"),"'")})).join(" OR ");e+=" AND (".concat(a,")")}})),b.value&&(e+=" AND ".concat(b.value)),e})),x=(0,y.x)(u,{hitsPerPage:12,initialSearch:!1,initialQuery:e.searchQuery||"",initialFilters:w.value,facets:["type","formats","cost","credit","months","grades","subjects","regions.level1","regions.level2","regions.level3","regi
2ons.level4","regions.level5"],attributesToSearchOn:"all"===e.selectedField?["*"]:[e.selectedField]}),k=x.hits,S=x.totalHits,N=x.totalPages,V=x.currentPage,O=x.isLoading,A=x.error,I=x.facetDistribution,_=x.setQuery,P=x.setFilters,D=x.goToPage,T=x.search,R=x.setResults,M=function(){return Object.keys(v.value).some((function(e){var t;return(null===(t=v.value[e])||void 0===t?void 0:t.length)>0}))||b.value};e.initialResults&&!M()&&R(e.initialResults),(0,n.watch)((function(){return e.initialResults}),(function(e){e&&(M()?T():R(e))}));(0,n.watch)(w,(function(e){P(e)})),(0,n.watch)((function(){return e.searchQuery}),(function(e){_(e||"",!1,!1)}),{immediate:!0}),(0,n.watch)((function(){return e.selectedField}),(function(t){var r="all"===t?["*"]:[t];T(e.searchQuery,{attributesToSearchOn:r})})),(0,n.watch)(S,(function(e){l("update:hitCount",e)}),{immediate:!0});var G=(0,n.computed)((function(){return 0===S.value?0:12*(V.value-1)+1})),U=function(){var e,t=(e=C().mark((function e(t){var r,n;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=d.value.includes(t.id),e.next=4,E.Z.put(route("plos.bookmark",t.id),{is_bookmarked:!r});case 4:r?(n=d.value.indexOf(t.id))>-1&&d.value.splice(n,1):d.value.push(t.id),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error toggling bookmark:",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){B(a,n,o,i,l,"next",e)}function l(e){B(a,n,o,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}();return"undefined"!=typeof window&&window.addEventListener("resize",(function(){s.value=window.innerWidth<640})),{isMobileView:s,bookmarkedIds:d,selectedFacets:v,regionsFilterString:b,perPage:12,showing:G,hits:k,totalHits:S,totalPages:N,currentPage:V,isLoading:O,error:A,facetDistribution:I,goToPage:D,sortGrades:function(e,t){var r=F(e,1)[0],n=F(t,1)[0];if("PK"===r)return-1;if("PK"===n)return 1;if("K"===r)return-1;if("K"===n)return 1;var o=parseInt(r),a=parseInt(n);return isNaN(o)||isNaN(a)?r.localeCompare(n):o-a},sortMonths:function(e,t){var r=F(e,1)[0],n=F(t,1)[0],o=["January","February","March","April","May","June","July","August","September","October","November","December"],a=o.indexOf(r),i=o.indexOf(n);return-1!==a&&-1!==i?a-i:-1!==a?-1:-1!==i?1:r.localeCompare(n)},handleFacetFilterChange:function(e){var t=e.attribute,r=e.values,n=e.filterString;void 0!==n?("regions"===t&&(b.value=n),n&&(0,g.K)({tenantId:c,filters:L({},t,[n])})):void 0!==r&&(v.value=j(j({},v.value),{},L({},t,r)),r&&r.length>0&&(0,g.K)({tenantId:c,filters:L({},t,r)})),function(){if("undefined"!=typeof window){var e=new URL(window.location);h.forEach((function(t){return e.searchParams.delete(t)})),Object.entries(v.value).forEach((function(t){var r=F(t,2),n=r[0],o=r[1];o&&o.length>0&&e.searchParams.set(n,o.join(","))})),b.value?e.searchParams.set("regions",b.value):e.searchParams.delete("regions"),window.history.replaceState({},"",e)}}()},handleBookmark:U}}};const A=(0,r(83744).Z)(O,[["render",function(e,t,r,a,m,y){var g=(0,n.resolveComponent)("GenericFacetFilter"),b=(0,n.resolveComponent)("RegionsFilterDirect"),w=(0,n.resolveComponent)("OpportunityItem"),x=(0,n.resolveComponent)("BaseTabContentDirect");return(0,n.openBlock)(),(0,n.createBlock)(x,{showing:a.showing,total:a.totalHits,"current-page":a.currentPage,"total-pages":a.totalPages,"is-loading":a.isLoading,"supports-sorting":!1,onPageChange:a.goToPage},{filters:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,[a.facetDistribution.type?((0,n.openBlock)(),(0,n.createBlock)(g,{key:0,title:"Opportunity type",attribute:"type",facets:a.facetDistribution.type,"current-filters":a.selectedFacets.type||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.formats?((0,n.openBlock)(),(0,n.createBlock)(g,{key:1,title:"Format",attribute:"formats",facets:a.facetDistribution.formats,"current-filters":a.selectedFacets.formats||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution["regions.level1"]?((0,n.openBlock)(),(0,n.createBlock)(b,{key:2,"facets-level1":a.facetDistribution["regions.level1"],"facets-level2":a.facetDistribution["regions.level2"]||{},"facets-level3":a.facetDistribution["regions.level3"]||{},"facets-level4":a.facetDistribution["regions.level4"]||{},"facets-level5":a.facetDistribution["regions.level5"]||{}
2,"current-filters":a.regionsFilterString,"single-select":!0,onFilterChange:a.handleFacetFilterChange},null,8,["facets-level1","facets-level2","facets-level3","facets-level4","facets-level5","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.cost?((0,n.openBlock)(),(0,n.createBlock)(g,{key:3,title:"Cost",attribute:"cost",facets:a.facetDistribution.cost,"current-filters":a.selectedFacets.cost||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.credit?((0,n.openBlock)(),(0,n.createBlock)(g,{key:4,title:"Credit",attribute:"credit",facets:a.facetDistribution.credit,"current-filters":a.selectedFacets.credit||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.months?((0,n.openBlock)(),(0,n.createBlock)(g,{key:5,title:"Dates",attribute:"months",facets:a.facetDistribution.months,"current-filters":a.selectedFacets.months||[],"sort-function":a.sortMonths,onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","sort-function","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.grades?((0,n.openBlock)(),(0,n.createBlock)(g,{key:6,title:"Grades",attribute:"grades",facets:a.facetDistribution.grades,"current-filters":a.selectedFacets.grades||[],"sort-function":a.sortGrades,onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","sort-function","onFilterChange"])):(0,n.createCommentVNode)("",!0),a.facetDistribution.subjects?((0,n.openBlock)(),(0,n.createBlock)(g,{key:7,title:"Subjects",attribute:"subjects",facets:a.facetDistribution.subjects,"current-filters":a.selectedFacets.subjects||[],onFilterChange:a.handleFacetFilterChange},null,8,["facets","current-filters","onFilterChange"])):(0,n.createCommentVNode)("",!0)])]})),"all-button":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{target:"_blank",href:e.route("plos.index"),class:"block"},o(t[0]||(t[0]=[(0,n.createElementVNode)("div",{class:"flex items-center justify-between p-4 bg-white rounded-lg border border-gray-200 hover:border-gray-300 transition-colors duration-200"},[(0,n.createElementVNode)("span",{class:"font-medium text-gray-900 text-sm"},"Go to all Professional Development"),(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor"},[(0,n.createElementVNode)("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})])],-1)])),8,l)]})),"results-header":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",c,[0===a.totalHits?((0,n.openBlock)(),(0,n.createElementBlock)("span",u,"0 results")):((0,n.openBlock)(),(0,n.createElementBlock)("span",s,"Showing "+(0,n.toDisplayString)(a.showing)+"-"+(0,n.toDisplayString)(Math.min(a.currentPage*a.perPage,a.totalHits))+" out of "+(0,n.toDisplayString)(a.totalHits)+" results",1)),(0,n.createElementVNode)("div",d,[r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("span",f,"|")):(0,n.createCommentVNode)("",!0),r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("p",p,[t[1]||(t[1]=(0,n.createTextVNode)(" Searching in ",-1)),(0,n.createElementVNode)("span",h,(0,n.toDisplayString)(r.selectedFieldLabel),1),(0,n.createTextVNode)(' for "'+(0,n.toDisplayString)(r.searchQuery)+'" ',1)])):(0,n.createCommentVNode)("",!0)])])]})),"results-grid":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",v,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.hits,(function(e,t){return(0,n.openBlock)(),(0,n.createBlock)(w,{key:e.id,opportunity:e,isAlgolia:!1,level:a.isMobileView?"mobile":"desktop",isBookmarked:a.bookmarkedIds.includes(e.id),onBookmarkUpdated:a.handleBookmark},null,8,["opportunity","level","isBookmarked","onBookmarkUpdated"])})),128))])]})),_:1},8,["showing","total","current-page","total-pages","is-loading","onPageChange"])}]])},2708:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(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 a(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 a(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 a(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 i={class:"overflow-hidden flex-shrink-0 bottom-0 left-0 pr-2 pl-1 pb-0.5 -ml-1 -mb-1 absolute bg-white flex items-center justify-center rounded-tr-xl rounded-bl-xl text-sm z-10"},l={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"},c=["src"],u=["href"],s={key:1,class:"line-clamp-3 mt-[12px] font-semibold"},d={class:"space-x-1 mb-[12px] flex items-center"},f={key:0,class:"text-[12px]"},p={key:1,class:"text-[12px]"},h={class:"-m-4 p-[12px] space-x-2 overflow-x-scroll",style:{"-ms-overflow-style":"none","scrollbar-width":"none"}},v={class:"text-xs rounded-2xl bg-[#EEF1F6] px-2.5 py-0.5 whitespace-nowrap"};var m=r(15973),y=r(76306),g=r(87879),b=r(72326),w=r(3754),x=r(47393);function k(e){return function(e){if(Array.isArray(e))return E(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 E(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 E(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 E(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}function S(e){return S="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},S(e)}const C={components:{ItemCard:m.Z,AisHighlight:y.YE,Grades:w.Z},props:{opportunity:Object,isAlgolia:{default:!0,type:Boolean},tenantState:{type:String,default:null},position:{type:Number,default:null},queryUid:{type:String,default:null}},computed:{url:function(){var e,t=route("plos.show",null!==(e=this.opportunity.slug)&&void 0!==e?e:this.opportunity.id);if(t&&this.queryUid){var r=t.includes("?")?"&":"?";return t+r+"queryUid="+encodeURIComponent(this.queryUid)}return t},normalizedStates:function(){return this.opportunity.states?Array.isArray(this.opportunity.states)?this.opportunity.states:"object"===S(this.opportunity.states)?Object.values(this.opportunity.states):[]:[]},sortedStates:function(){var e=this;if(!this.normalizedStates.length)return[];var t=this.normalizedStates.find((function(t){return t===e.tenantState}));return t?[t].concat(k(this.normalizedStates.filter((function(t){return t!==e.tenantState})))):this.normalizedStates},dateRangeText:function(){var e;return null!==(e=this.opportunity)&&void 0!==e&&e.starts_at?this.opportunity.ends_at?"".concat(this.opportunity.starts_at," - ").concat(this.opportunity.ends_at):this.opportunity.starts_at:null},mergedGrades:function(){return this.opportunity.grades.map((function(e){return"object"===S(e)?e.name:e}))},opportunityType:function(){return"object"===S(this.opportunity.type)?this.opportunity.type.name:this.opportunity.type}},methods:{notifyAlgoliaAboutClick:function(){var e=this.pdIndex||"professional_opportunities";if((0,x.ob)({indexUid:e,objectId:String(this.opportunity.id),objectName:this.opportunity.name,position:this.position,queryUid:this.queryUid}),this.aa){var t=this.opportunity.id;this.aa("clickedObjectIDs",{objectIDs:[t.toString()],eventName:"Professional Development Clicked",index:this.teachingMaterialsIndex})}},sortGradeBands:b.dP},setup:function(){var e,t,r,o,a,i,l=(0,n.inject)("initAndGetAlgoliaEventDispatcher")(),c=(0,g.qt)();return{aa:l,teachingMaterialsIndex:(null===(e=c.props.integrations)||void 0===e||null===(t=e.algolia)||void 0===t?void 0:t.teachingMaterialsIndex)||"teaching_materials",pdIndex:(null===(r=c.props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.pdIndex)||(null===(a=c.props.integrations)||void 0===a||null===(i=a.algolia)||void 0===i?void 0:i.pdIndex)||"professional_opportunities"}}};const B=(0,r(83744).Z)(C,[["render",function(e,t,r,a,m,y){var g=(0,n.resolveComponent)("Grades"),b=(0,n.resolveComponent)("AisHighlight"),w=(0,n.resolveComponent)("PrimaryButton"),x=(0,n.resolveComponent)("ItemCard");return(0,n.openBlock)(),(0,n.createBlock)(x,{item:r.opportunity,imageUrl:r.opportunity.thumbnailUrl,bookmarkRoute:"plos.bookmark",actionUrl:y.url,onClick:t[1]||(t[1]=function(e){return y.notifyAlgoliaAboutClick()})},(0,n.createSlots)({badge:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,(0,n.toDisplayString)(y.opportunityType)+" - "+(0,n.toDisplayString)(r.opportunity.is_online?"Online":"In Person"),1)]})),image:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("img",{alt:"Thumbn
2ail",class:"w-full h-full object-cover group-hover:scale-105 duration-150",src:r.opportunity.thumbnailUrl},null,8,c)])]})),bands:(0,n.withCtx)((function(){return[(0,n.createVNode)(g,{grades:y.mergedGrades},null,8,["grades"])]})),title:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{href:y.url},[r.isAlgolia?((0,n.openBlock)(),(0,n.createBlock)(b,{key:0,attribute:"name",hit:r.opportunity,"class-names":{"ais-Highlight":"font-semibold line-clamp-3"}},null,8,["hit"])):((0,n.openBlock)(),(0,n.createElementBlock)("div",s,(0,n.toDisplayString)(r.opportunity.name),1))],8,u)]})),description:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",d,[t[2]||(t[2]=(0,n.createElementVNode)("svg",{width:"12",height:"14",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,n.createElementVNode)("path",{d:"M2.16667 17.3334C1.70833 17.3334 1.31597 17.1702 0.989583 16.8438C0.663194 16.5174 0.5 16.1251 0.5 15.6667V4.00008C0.5 3.54175 0.663194 3.14939 0.989583 2.823C1.31597 2.49661 1.70833 2.33341 2.16667 2.33341H3V1.50008C3 1.26397 3.07986 1.06605 3.23958 0.906331C3.39931 0.746609 3.59722 0.666748 3.83333 0.666748C4.06944 0.666748 4.26736 0.746609 4.42708 0.906331C4.58681 1.06605 4.66667 1.26397 4.66667 1.50008V2.33341H11.3333V1.50008C11.3333 1.26397 11.4132 1.06605 11.5729 0.906331C11.7326 0.746609 11.9306 0.666748 12.1667 0.666748C12.4028 0.666748 12.6007 0.746609 12.7604 0.906331C12.9201 1.06605 13 1.26397 13 1.50008V2.33341H13.8333C14.2917 2.33341 14.684 2.49661 15.0104 2.823C15.3368 3.14939 15.5 3.54175 15.5 4.00008V15.6667C15.5 16.1251 15.3368 16.5174 15.0104 16.8438C14.684 17.1702 14.2917 17.3334 13.8333 17.3334H2.16667ZM2.16667 15.6667H13.8333V7.33341H2.16667V15.6667ZM2.16667 5.66675H13.8333V4.00008H2.16667V5.66675ZM8 10.6667C7.76389 10.6667 7.56597 10.5869 7.40625 10.4272C7.24653 10.2674 7.16667 10.0695 7.16667 9.83341C7.16667 9.5973 7.24653 9.39939 7.40625 9.23966C7.56597 9.07994 7.76389 9.00008 8 9.00008C8.23611 9.00008 8.43403 9.07994 8.59375 9.23966C8.75347 9.39939 8.83333 9.5973 8.83333 9.83341C8.83333 10.0695 8.75347 10.2674 8.59375 10.4272C8.43403 10.5869 8.23611 10.6667 8 10.6667ZM4.66667 10.6667C4.43056 10.6667 4.23264 10.5869 4.07292 10.4272C3.91319 10.2674 3.83333 10.0695 3.83333 9.83341C3.83333 9.5973 3.91319 9.39939 4.07292 9.23966C4.23264 9.07994 4.43056 9.00008 4.66667 9.00008C4.90278 9.00008 5.10069 9.07994 5.26042 9.23966C5.42014 9.39939 5.5 9.5973 5.5 9.83341C5.5 10.0695 5.42014 10.2674 5.26042 10.4272C5.10069 10.5869 4.90278 10.6667 4.66667 10.6667ZM11.3333 10.6667C11.0972 10.6667 10.8993 10.5869 10.7396 10.4272C10.5799 10.2674 10.5 10.0695 10.5 9.83341C10.5 9.5973 10.5799 9.39939 10.7396 9.23966C10.8993 9.07994 11.0972 9.00008 11.3333 9.00008C11.5694 9.00008 11.7674 9.07994 11.9271 9.23966C12.0868 9.39939 12.1667 9.5973 12.1667 9.83341C12.1667 10.0695 12.0868 10.2674 11.9271 10.4272C11.7674 10.5869 11.5694 10.6667 11.3333 10.6667ZM8 14.0001C7.76389 14.0001 7.56597 13.9202 7.40625 13.7605C7.24653 13.6008 7.16667 13.4029 7.16667 13.1667C7.16667 12.9306 7.24653 12.7327 7.40625 12.573C7.56597 12.4133 7.76389 12.3334 8 12.3334C8.23611 12.3334 8.43403 12.4133 8.59375 12.573C8.75347 12.7327 8.83333 12.9306 8.83333 13.1667C8.83333 13.4029 8.75347 13.6008 8.59375 13.7605C8.43403 13.9202 8.23611 14.0001 8 14.0001ZM4.66667 14.0001C4.43056 14.0001 4.23264 13.9202 4.07292 13.7605C3.91319 13.6008 3.83333 13.4029 3.83333 13.1667C3.83333 12.9306 3.91319 12.7327 4.07292 12.573C4.23264 12.4133 4.43056 12.3334 4.66667 12.3334C4.90278 12.3334 5.10069 12.4133 5.26042 12.573C5.42014 12.7327 5.5 12.9306 5.5 13.1667C5.5 13.4029 5.42014 13.6008 5.26042 13.7605C5.10069 13.9202 4.90278 14.0001 4.66667 14.0001ZM11.3333 14.0001C11.0972 14.0001 10.8993 13.9202 10.7396 13.7605C10.5799 13.6008 10.5 13.4029 10.5 13.1667C10.5 12.9306 10.5799 12.7327 10.7396 12.573C10.8993 12.4133 11.0972 12.3334 11.3333 12.3334C11.5694 12.3334 11.7674 12.4133 11.9271 12.573C12.0868 12.7327 12.1667 12.9306 12.1667 13.1667C12.1667 13.4029 12.0868 13.6008 11.9271 13.7605C11.7674 13.9202 11.5694 14.0001 11.3333 14.0001Z",fill:"#1C1B1F"})],-1)),y.dateRangeText?((0,n.openBlock)(),(0,n.createElementBlock)("span",f,(0,n.toDisplayString)(y.dateRangeText),1)):((0,n.openBlock)(),(0,n.createElementBlock)("span",p,"Ongoing"))])]})),_:2},[y.url?{name:"action",fn:(0,n.withCtx)((function(){return[(0,n.createVNode)(w,{onClick:t[0]||(t[0]=function(e){return y.notifyAlgoliaAboutClick()}),href:y.url},{default:(0,n.withCtx)((function(){return o(t[3]||(t[3]=[(0,n.createElementVNode)("span",{class:"capitalize"},"View Resource",-1)]))})),_:1},8,["href"])]})),key:"0"}:void 0,y.normalizedStates.length>0?{name:"tags",fn:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",h,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(y.sortedStates,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",v,(0,n.toDisplayString)(e),1)})),256))])]})),key:"1"}:void 0]),1032,["item","imageUrl","actionUrl"])}]])},38320:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var n=r(41916),o={class:(0,n.normalizeClass)(["rounded-xl bg-primary-100 relative group"])},a={class:""}
2,i={xmlns:"http://www.w3.org/2000/svg",height:"24",fill:"currentColor",viewBox:"0 96 960 960",width:"24"},l={key:0,class:"",d:"m296 711-56-56 240-240 240 240-56 56-184-184-184 184Z"},c={key:1,class:"",d:"M480 711 240 471l56-56 184 184 184-184 56 56-240 240Z"},u={class:"px-[13px] py-[19px] -mt-2 text-lg overflow-hidden"},s={class:"group"},d={class:"flex space-x-2"},f=["id","value","checked","onChange"],p=["onClick"],h={class:"text-xs"},v={key:0,class:"ml-2"},m={class:"flex space-x-4 mt-1"},y=["id","value","checked","onChange"],g=["onClick"],b={class:"text-xs"},w={key:0,class:"ml-2"},x={class:"flex space-x-4 mt-1"},k=["id","value","checked","onChange"],E=["onClick"],S={class:"text-xs"},C={key:0,class:"ml-2"},B={class:"flex space-x-4 mt-1"},N=["id","value","checked","onChange"],j=["onClick"],L={class:"text-xs"},F={key:0,class:"ml-2"},V={class:"flex space-x-4 mt-1"},O=["id","value","checked","onChange"],A=["onClick"],I={class:"text-xs"};function _(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(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 P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||D(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}function T(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 R={name:"RegionsFiltererDirect",props:{facetsLevel1:{type:Object,default:function(){return{}}},facetsLevel2:{type:Object,default:function(){return{}}},facetsLevel3:{type:Object,default:function(){return{}}},facetsLevel4:{type:Object,default:function(){return{}}},facetsLevel5:{type:Object,default:function(){return{}}},currentFilters:{type:Object,default:function(){return{}}},extraHeaderContainerClasses:{type:String,default:""},singleSelect:{type:Boolean,default:!1}},emits:["filter-change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(!1),a=(0,n.ref)([]),i=(0,n.ref)(""),l=(0,n.computed)((function(){return Object.entries(e.facetsLevel1||{}).map((function(e){var t=P(e,2);return{value:t[0],count:t[1]}})).sort((function(e,t){return e.value.localeCompare(t.value)}))})),c=function(t,r){var n=[],o={};switch(r){case 2:o=e.facetsLevel2||{};break;case 3:o=e.facetsLevel3||{};break;case 4:o=e.facetsLevel4||{};break;case 5:o=e.facetsLevel5||{};break;default:return[]}return Object.entries(o).forEach((function(e){var r=P(e,2),o=r[0],a=r[1],i=o.split(" > "),l=t.split(" > ");i.length===l.length+1&&o.startsWith(t+" > ")&&n.push({value:o,count:a})})),n.sort((function(e,t){return e.value.localeCompare(t.value)}))},u=function(e){return a.value.includes(e)};return{expanded:o,selectedRegions:a,sortedRegionsLevel1:l,getSubRegions:c,getRegionLabel:function(e){var t=e.split(" > ");return t[t.length-1]},isRegionSelected:u,shouldExpandParent:function(e){return!!u(e)||c(e,2).some((function(e){return u(e.value)}))},toggleRegion:function(t){if(a.value.includes(t))a.value=a.value.filter((function(e){return e!==t})),a.value=a.value.filter((function(e){return!e.startsWith(t+" > ")}));else if(e.singleSelect){a.value=[t];for(var n=t.split(" > "),o=1;o<n.length;o++){var l=n.slice(0,o).join(" > ");a.value.push(l)}}else{a.value=_(new Set(a.value)),a.value.includes(t)||a.value.push(t);for(var c=t.split(" > "),u=1;u<c.length;u++){var s=c.slice(0,u).join(" > ");a.value.includes(s)||a.value.push(s)}}if(console.log("[REG-FILTER-08] Final selectedRegions:",a.value),a.value.length>0){console.log("[REG-FILTER-09] Building filter, selectedRegions length:",a.value.length);var d=a.value.map((function(e){return(e.match(/>/g)||[]).length})),f=Math.max.apply(Math,_(d));console.log("[REG-FILTER-10] Max level:",f);var p=a.value.filter((function(e){return(e.match(/>/g)||[]).length===f}));console.log("[REG-FILTER-11] Deepest level selections:",p);var h=a.value.filter((function(e){return(e.match(/>/g)||[]).length<f})).filter((function(e){return!a.value.some((function(t){return t.startsWith(e+" > ")}))}));console.log("[REG-FILTER-12] Parents without children:",h),p=_(new Set([].concat(_(p),_(h)))),console.log("[REG-FILTER-13] Final deepest level selections (deduplicated):",p);var v=p.map((function(e){var t=(e.match(/>/g)||[]).length+1;return"regions.level".concat(t,"='").concat(e.replace(/'/g,"\\'"),"'")}));console.log("[REG-FILTER-14] Filter parts:",v);var m=v.join(" OR ");i.value=m,console.log("[REG-FILTER-14b] Storing lastEmittedFilter:",i.value),r("filter-change",{attribute:"regions",filterString:m})}else i.value="",r("filter-change",{attribute:"regions",filterString:""})}}}};var M=r(93379),G=r.n(M),U=r(57264),q={insert:"head",singleton:!1};G()(U.Z,q);U.Z.locals;const Z=(0,r(83744).Z)(R,[["render",function(e,t,r,_,P,D){return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createElementVNode)("div",{onClick:t[0]||(t[0]=function(e){return _.expanded=!_.expanded}),class:(0,n.normalizeClass)(["flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg border px-4 py-2.5 bg-white"])},[t[1]||(t[1]=(0,n.createElementVNode)("span",{class:"text-base font-medium"},"Locations",-1)),(0,n.createElementVNode)("button",a,[((0,n.openBlock)(),(0,n.createElementBlock)("svg",i,[_.expanded?((0,n.openBlock)(),(0,n.createElementBlock)("path",l)):((0,n.openBlock)(),(0,n.createElementBlock)("path",c))]))])]),(0,n.createVNode)(n.Transition,{name:"filter-expand"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("div",s,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.sortedRegionsLevel1,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value,class:"group"},[(0,n.createElementVNode)("div",d,[(0,n.createElementVNode)("input",{ref_for:!0,ref:"topLevelCheckbox",type:"checkbox",class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500",i
2d:"region-".concat(e.value),value:e.value,checked:_.isRegionSelected(e.value),onChange:function(t){return _.toggleRegion(e.value)}},null,40,f),(0,n.createElementVNode)("span",{onClick:function(t){return _.toggleRegion(e.value)},class:"line-clamp-2 cursor-pointer"},[(0,n.createTextVNode)((0,n.toDisplayString)(e.value)+" ",1),(0,n.createElementVNode)("span",h,"("+(0,n.toDisplayString)(e.count)+")",1)],8,p)]),_.shouldExpandParent(e.value)&&_.getSubRegions(e.value,2).length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",v,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.getSubRegions(e.value,2),(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value},[(0,n.createElementVNode)("div",m,[(0,n.createElementVNode)("input",{type:"checkbox",id:"region-".concat(e.value),value:e.value,checked:_.isRegionSelected(e.value),onChange:function(t){return _.toggleRegion(e.value)},class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500"},null,40,y),(0,n.createElementVNode)("span",{class:"line-clamp-2 cursor-pointer",onClick:function(t){return _.toggleRegion(e.value)}},[(0,n.createTextVNode)((0,n.toDisplayString)(_.getRegionLabel(e.value))+" ",1),(0,n.createElementVNode)("span",b,"("+(0,n.toDisplayString)(e.count)+")",1)],8,g)]),_.shouldExpandParent(e.value)&&_.getSubRegions(e.value,3).length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",w,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.getSubRegions(e.value,3),(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value},[(0,n.createElementVNode)("div",x,[(0,n.createElementVNode)("input",{type:"checkbox",id:"region-".concat(e.value),value:e.value,checked:_.isRegionSelected(e.value),onChange:function(t){return _.toggleRegion(e.value)},class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500"},null,40,k),(0,n.createElementVNode)("span",{class:"line-clamp-2 cursor-pointer",onClick:function(t){return _.toggleRegion(e.value)}},[(0,n.createTextVNode)((0,n.toDisplayString)(_.getRegionLabel(e.value))+" ",1),(0,n.createElementVNode)("span",S,"("+(0,n.toDisplayString)(e.count)+")",1)],8,E)]),_.shouldExpandParent(e.value)&&_.getSubRegions(e.value,4).length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",C,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.getSubRegions(e.value,4),(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value},[(0,n.createElementVNode)("div",B,[(0,n.createElementVNode)("input",{type:"checkbox",id:"region-".concat(e.value),value:e.value,checked:_.isRegionSelected(e.value),onChange:function(t){return _.toggleRegion(e.value)},class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500"},null,40,N),(0,n.createElementVNode)("span",{class:"line-clamp-2 cursor-pointer",onClick:function(t){return _.toggleRegion(e.value)}},[(0,n.createTextVNode)((0,n.toDisplayString)(_.getRegionLabel(e.value))+" ",1),(0,n.createElementVNode)("span",L,"("+(0,n.toDisplayString)(e.count)+")",1)],8,j)]),_.shouldExpandParent(e.value)&&_.getSubRegions(e.value,5).length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",F,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(_.getSubRegions(e.value,5),(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e.value},[(0,n.createElementVNode)("div",V,[(0,n.createElementVNode)("input",{type:"checkbox",id:"region-".concat(e.value),value:e.value,checked:_.isRegionSelected(e.value),onChange:function(t){return _.toggleRegion(e.value)},class:"rounded bg-transparent mt-[5px] checked:text-primary-500 focus:outline-primary-500"},null,40,O),(0,n.createElementVNode)("span",{class:"line-clamp-2 cursor-pointer",onClick:function(t){return _.toggleRegion(e.value)}},[(0,n.createTextVNode)((0,n.toDisplayString)(_.getRegionLabel(e.value))+" ",1),(0,n.createElementVNode)("span",I,"("+(0,n.toDisplayString)(e.count)+")",1)],8,A)])])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))])):(0,n.createCommentVNode)("",!0)])})),128))])],512),[[n.vShow,_.expanded]])]})),_:1})])}],["__scopeId","data-v-19d7f00a"]])},85521:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return a(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 a(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 a(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 a(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 i={width:"41",height:"45",viewBox:"0 0 41 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const l={},c=(0,r(83744).Z)(l,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("svg",i,o(t[0]||(t[0]=[(0,n.createStaticVNode)('<g filter="url
2(#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:()=>s});var n=r(41916),o={key:0},a={key:1,class:"flex flex-wrap gap-2"};var i=r(72326);function l(e){return function(e){if(Array.isArray(e))return c(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 c(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 c(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 c(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 u={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 l(e).sort(i.dP);for(var t=function(e){return-1===e?"PK":0===e?"K":13===e?"AP":e.toString()},r=l(e).sort(i.dP).map((function(e){return"PK"===e?-1:"K"===e?0:"AP"===e?13:parseInt(e)})),n=[],o=r[0],a=r[0],c=1;c<r.length;c++)r[c]===a+1||(o===a?n.push(t(o)):n.push("".concat(t(o),"-").concat(t(a))),o=r[c]),a=r[c];return o===a?n.push(t(o)):n.push("".concat(t(o),"-").concat(t(a))),n.sort(i.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(l(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:i.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 s=(0,r(83744).Z)(u,[["render",function(e,t,r,i,l,c){return r.plain?((0,n.openBlock)(),(0,n.createElementBlock)("span",o,(0,n.toDisplayString)(c.plainGradesText),1)):((0,n.openBlock)(),(0,n.createElementBlock)("div",a,[c.hasK12(c.processedGrades)?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createElementVNode)("span",{style:(0,n.normalizeStyle)({backgroundColor:r.showColors?c.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)(c.nonK12Grades,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,style:(0,n.normalizeStyle)({backgroundColor:r.showColors?c.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)(c.processedGrades,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("span",{key:e,style:(0,n.normalizeStyle)({backgroundColor:r.showColors?c.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:()=>B});var n=r(41916),o=["href"],a={class:"bg-white w-full rounded-xl overflow-hidden h-full shadow-lg group border flex flex-col relative group"},i={class:"p-[12px] pb-0 flex-shrink-0"},l={class:"relative w-full overflow-hidden h-32 rounded-r-xl rounded-tl-lg"},c=["src"],u={class:"flex flex-col flex-1 min-h-0"},s={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,808 bytes, line 2
2,p={class:"flex items-center min-h-[60px]"},h={class:"flex-shrink-0"},v={class:"p-4 flex items-center space-x-1.5 flex-shrink-0"};var m=r(76306),y=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:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,o){var a=t&&t.prototype instanceof f?t:f,i=Object.create(a.prototype),l=new N(o||[]);return n(i,"_invoke",{value:x(e,r,l)}),i}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function f(){}function p(){}function h(){}var v={};c(v,a,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(j([])));y&&y!==t&&r.call(y,a)&&(v=y);var g=h.prototype=f.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(n,a,i,l){var c=s(e[n],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==E(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,l)}))}l(c.arg)}var a;n(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 x(e,t,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var l=S(i,r);if(l){if(l===d)continue;return l}}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 c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.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=s(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function C(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 B(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function j(e){if(e){var t=e[a];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:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,n(g,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,l,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(u(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(g),c(g,l,"Generator"),c(g,a,(function(){return this})),c(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,N.prototype={constructor:N,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.forEac
2h(B),!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 i.type="throw",i.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 a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.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 a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},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),B(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;B(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,a,i){try{var l=e[a](i),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}const C={components:{AisHighlight:m.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,y.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 a=e.apply(t,r);function i(e){S(a,n,o,i,l,"next",e)}function l(e){S(a,n,o,i,l,"throw",e)}i(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 B=(0,r(83744).Z)(C,[["render",function(e,t,r,m,y,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",a,[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 ",y.bookmarked?"text-[#FF8B8B]":"text-[#FFF4F4] hover:text-[#ffdddd]"])},[(0,n.createVNode)(b)],2)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",i,[(0,n.createElementVNode)("div",l,[(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,c)]})),(0,n.renderSlot)(e.$slots,"badge")])]),(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("div",d,[(0,n.renderSlot)(e.$slots,"bands")]),(0,n.createElementVNode)("div",f,[(0,n.createElementVNode)("div",p,[(0,n.renderSlot)(e.$slots,"title")])]),(0,n.createElementVNode)("div",h,[(0,n.renderSlot)(e.$slots,"description")])]),(0,n.createElementVNode)("div",v,[(0,n.renderSlot)(e.$slots,"tags")])])])],8,o)}]])},62662:(e,t,r)=>{r.d(t,{Z:()=>N});var n=r(41916);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}
2finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(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 a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(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 i={class:(0,n.normalizeClass)(["rounded-lg bg-primary-100"])},l={class:"text-base font-medium whitespace-nowrap"},c={class:""},u={xmlns:"http://www.w3.org/2000/svg",height:"24",fill:"currentColor",viewBox:"0 96 960 960",width:"24"},s={key:0,class:"",d:"m296 711-56-56 240-240 240 240-56 56-184-184-184 184Z"},d={key:1,class:"",d:"M480 711 240 471l56-56 184 184 184-184 56 56-240 240Z"},f={class:"p-2 overflow-hidden"},p={key:0,class:"mb-2"},h={class:"flex space-x-2"},v=["id","value","checked","onChange"],m={class:"text-xs"};var y=r(90222);function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(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 w(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}function x(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 k={name:"GenericFacetFilter",props:{title:{type:String,required:!0},attribute:{type:String,required:!0},facets:{type:Object,default:function(){return{}}},currentFilters:{type:Array,default:function(){return[]}},extraHeaderContainerClasses:{type:String,default:""},sortFunction:{type:Function,default:null},showSearch:{type:Boolean,default:!1},maxItems:{type:Number,default:0}},emits:["filter-change"],setup:function(e,t){var r=t.emit,o=(0,n.ref)(!1),a=(0,n.ref)([]),i=(0,n.ref)(""),l=(0,n.ref)(!1);(0,n.watch)((function(){return e.currentFilters}),(function(e){a.value=b(e||[])}),{immediate:!0,deep:!0}),(0,n.watch)(o,(function(e){e||(i.value="",l.value=!1)}));var c=(0,n.computed)((function(){var t=Object.entries(e.facets||{}),r=e.sortFunction||function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0};return t.sort(r)})),u=(0,n.computed)((function(){if(!i.value.trim())return c.value;var e=i.value.toLowerCase();return c.value.filter((function(t){var r=g(t,1)[0];return(0,y.T)(r).toLowerCase().includes(e)}))})),s=(0,n.computed)((function(){return e.maxItems<=0||l.value||i.value.trim()?u.value:u.value.slice(0,e.maxItems)})),d=(0,n.computed)((function(){return e.maxItems>0&&!l.value&&!i.value.trim()&&u.value.length>e.maxItems}));return{expanded:o,selectedValues:a,searchQuery:i,showAll:l,sortedFacets:c,filteredFacets:u,displayedFacets:s,hasMoreItems:d,toggleValue:function(t){a.value.includes(t)?a.value=a.value.filter((function(e){return e!==t})):a.value.push(t),r("filter-change",{attribute:e.attribute,values:b(a.value)})},getLeafItem:y.T,nestCount:y.O}}};var E=r(93379),S=r.n(E),C=r(69026),B={insert:"head",singleton:!1};S()(C.Z,B);C.Z.locals;const N=(0,r(83744).Z)(k,[["render",function(e,t,r,a,y,g){return(0,n.openBlock)(),(0,n.createElementBlock)("div",i,[(0,n.createElementVNode)("div",{onClick:t[0]||(t[0]=function(e){return a.expanded=!a.expanded}),class:(0,n.normalizeClass)(["flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg shadow py-2 px-4 bg-white",r.extraHeaderContainerClasses])},[(0,n.createElementVNode)("h3",l,(0,n.toDisplayString)(r.title),
21),(0,n.createElementVNode)("button",c,[((0,n.openBlock)(),(0,n.createElementBlock)("svg",u,[a.expanded?((0,n.openBlock)(),(0,n.createElementBlock)("path",s)):((0,n.openBlock)(),(0,n.createElementBlock)("path",d))]))])],2),(0,n.createVNode)(n.Transition,{name:"filter-expand"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",f,[r.showSearch?((0,n.openBlock)(),(0,n.createElementBlock)("div",p,[(0,n.withDirectives)((0,n.createElementVNode)("input",{"onUpdate:modelValue":t[1]||(t[1]=function(e){return a.searchQuery=e}),type:"text",placeholder:"Search...",class:"w-full px-2 py-1 text-sm border border-gray-300 rounded focus:outline-none focus:border-primary-500"},null,512),[[n.vModelText,a.searchQuery]])])):(0,n.createCommentVNode)("",!0),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(a.displayedFacets,(function(e){var t=o(e,2),i=t[0],l=t[1];return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:i,class:(0,n.normalizeClass)(["flex mr-2",(a.nestCount(i),""),2==a.nestCount(i)?"mt-2 mb-1":"",3==a.nestCount(i)?"mt-2 mb-1":""]),style:(0,n.normalizeStyle)({marginLeft:"".concat(a.nestCount(i),"rem")})},[(0,n.createElementVNode)("div",h,[(0,n.createElementVNode)("input",{type:"checkbox",class:"rounded bg-transparent mt-[2px] checked:text-primary-500 focus:outline-primary-500",id:"".concat(r.attribute,"-").concat(i),value:i,checked:a.selectedValues.includes(i),onChange:function(e){return a.toggleValue(i)}},null,40,v),(0,n.createElementVNode)("h3",{class:(0,n.normalizeClass)(["text-base",a.nestCount(i)>1?"text-sm":"","leading-5"])},[(0,n.createTextVNode)((0,n.toDisplayString)(a.getLeafItem(i))+" ",1),(0,n.createElementVNode)("span",m,"("+(0,n.toDisplayString)(l)+")",1)],2)])],6)})),128)),a.hasMoreItems?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:1,onClick:t[2]||(t[2]=function(e){return a.showAll=!0}),class:"mt-2 text-sm text-primary-600 hover:text-primary-800 underline cursor-pointer"},"Show more ("+(0,n.toDisplayString)(a.filteredFacets.length-r.maxItems)+")",1)):(0,n.createCommentVNode)("",!0),a.showAll&&r.maxItems>0&&a.filteredFacets.length>r.maxItems?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:2,onClick:t[3]||(t[3]=function(e){return a.showAll=!1}),class:"mt-2 text-sm text-primary-600 hover:text-primary-800 underline cursor-pointer"},"Show less")):(0,n.createCommentVNode)("",!0)],512),[[n.vShow,a.expanded]])]})),_:1})])}],["__scopeId","data-v-16607474"]])}}]); 3//# sourceMappingURL=Search-components-ProfessionalDevelopmentContentDirect-vue.1c32c89e.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.