PageSourceSearch

https://subjecttoclimate.org/js/tenant/pages/Search-components-ClimateChangeContentDirect-vue.c09dbea8.js

js subjecttoclimate.org collected 2026-09-24 09:09:08 UTC 72,551 bytes, 3 lines download raw bytes

vendor: 4,534 bytes, lines 1-2
1/*! For license information please see Search-components-ClimateChangeContentDirect-vue.c09dbea8.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[2124,2567,7163,2116],{9482:(e,t,r)=>{r.d(t,{x:()=>h});var n=r(41916),o=r(15229),i=r(87879),a=r(5121),l=r(47393),c=r(91440),s=r(72326);function u(e){return u="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},u(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:{},i=o.iterator||"@@iterator",a=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 s(e,t,r,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),l=new N(o||[]);return n(a,"_invoke",{value:E(e,r,l)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var h={};function p(){}function m(){}function v(){}var y={};c(y,i,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(B([])));b&&b!==t&&r.call(b,i)&&(y=b);var w=v.prototype=p.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,i,a,l){var c=f(e[n],e,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==u(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,l)}))}l(c.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=S(a,r);if(l){if(l===h)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===h)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")),h;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function B(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return m.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(x.prototype),c(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Prom
2ise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(w),c(w,l,"Generator"),c(w,i,(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=B,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(C),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function f(e,t,r,n,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}function h(e){var t,r,u,h,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=p.hitsPerPage,v=void 0===m?9:m,y=p.initialSearch,g=void 0===y||y,b=p.autoSearch,w=void 0===b||b,k=p.initialQuery,x=void 0===k?"":k,E=p.initialFilters,S=void 0===E?"":E,L=p.initialSort,C=void 0===L?"":L,N=p.facets,B=void 0===N?[]:N,_=p.aiSearchEnabled,j=void 0!==_&&_,I=p.aiSearchEndpoint,V=void 0===I?null:I,O=p.initialHits,P=void 0===O?[]:O,A=p.initialTotalHits,T=void 0===A?0:A,F=(0,i.qt)(),$=(null===(t=F.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",M=(null===(u=F.props.integrations)||void 0===u||null===(h=u.meilisearch)||void 0===h?void 0:h.key)||("undefined"!=typeof window?window.MEILISEARCH_KEY:void 0)||"";M&&(0,l.qd)(M,$);var q=(0,l.wA)(),U=new o.MeiliSearch({host:$,apiKey:M,requestConfig:{headers:{"X-MS-USER-ID":q}}}),D=(0,n.ref)(P),G=(0,n.ref)(T),R=(0,n.ref)(Math.ceil((T||0)/v)),Z=(0,n.ref)(1),H=(0,n.ref)(!1),z=(0,n.ref)(null),Q=(0,n.ref)(x),Y=(0,n.ref)(S),K=(0,n.ref)(C),J=(0,n.ref)({}),W=(0,n.ref)(0),X=(0,n.ref)(null),ee=(0,n.ref)({enabled:j,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,i,l,u,f,h,p,m,y,g,b,w,k=arguments;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k.length>0&&void 0!==k[0]&&k[0]||(H.value=!0),z.value=null,t.prev=3,n=(0,s.Bl)(Q.value),!(j&&V&&Q.value.trim())){t.next=24;break}return t.prev=6,t.next=9,a.Z.post(V,{query:Q.value,filters:Y.value||"",facets:B,sort:K.value,page:Z.value,per_page:v});case 9:return m=t.sent,y=m.data,D.value=y.hits||[],G.value=y.estimatedTotalHits||0,R.value=y.totalPages||Math.ceil(G.value/v),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===(i=y.ai)||void 0===i||!i.used),summary:(null===(l=y.ai)||void 0===l?void 0:l.summary)||null,match_quality:(null===(u=y.ai)||void 0===u?void 0:u.match_quality)||null,matched_themes:(null===(f=y.ai)||void 0===f?void 0:f.matched_themes)||[],result_reasons:(null===(h=y.ai)||void 0===h?void 0:h.result_reasons)||[],unmet_constraints:(null===(p=y.ai)||void 0===p?void 0:p.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=U.index(e),b={limit:v,offset:(Z.value-1)*v},n&&(b.q=n),Y.value&&(b.filter=Y.value),B.length>0&&(b.facets=B),K.value&&!Q.value&&(b.sort=Array.isArray(K.value)?K.value:[K.value]),t.next=32,g.search(n||"",b);case 32:w=t.sent,D.value=w.hits,G.value=w.estimatedTotalHits||0,R.value=Math.ceil(G.value/v),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:j,used:!1,summary:null,match_quality:null,matched_themes:[],result_reasons:[],unmet_constraints:[]},(0,c.j)({tenantId:F.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),z.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;return new Promise((function(n,o){var i=t.apply(e,r);function a(e){f(i,n,o,a,l,"next",e)}function l(e){f(i,n,o,a,l,"throw",e)}a(void 0)}))});return function(){return r.apply(this,arguments)}}();return g&&te(),{hits:D,totalHits:G,totalPages:R,currentPage:Z,isLoading:H,error:z,query:Q,filters:Y,sort:K,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];Q.value=e,r&&(Z.value=1),w&&t&&te()},setFilters:function(e){Y.value=e,Z.value=1,w&&te()},setSort:function(e){K.value=e,Z.value=1,w&&te()},goToPage:function(e){Z.value=e,w&&te()},setResults:function(e){e&&(D.value=e.hits||[],G.value=e.estimatedTotalHits||e.totalHits||0,R.value=Math.ceil(G.value/v),J.value=e.facetDistribution||{},W.value=e.processingTimeMs||0,Z.value=1,ee.value={enabled:j,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,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),l=new N(n||[]);return i(a,"_invoke",{value:E(e,r,l)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var h={};function p(){}function m(){}function v(){}var y={};u(y,l,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(B([])));b&&b!==t&&r.call(b,l)&&(y=b);var w=v.prototype=p.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}
vendor: 5,146 bytes, line 2
2))}function x(e,t){function o(i,a,l,c){var s=f(e[i],e,a);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==n(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,l,c)}),(function(e){o("throw",e,l,c)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return o("throw",e,l,c)}))}c(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=S(a,r);if(l){if(l===h)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===h)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")),h;var o=f(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function B(e){if(e){var t=e[l];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:_}}function _(){return{value:void 0,done:!0}}return m.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=u(v,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,s,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(x.prototype),u(x.prototype,c,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(d(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(w),u(w,s,"Generator"),u(w,l,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=B,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(C),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];
2if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}r.d(t,{De:()=>p,VK:()=>m,aU:()=>v,ob:()=>h,qd:()=>c,wA:()=>u});var a=null,l=null;function c(e,t){a=e,t&&(l=t)}function s(){if("undefined"==typeof localStorage)return"ssr_anonymous";var e=localStorage.getItem("meilisearch_user_id");e||(e="user_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),localStorage.setItem("meilisearch_user_id",e));try{var t,r,n,o=(null===(t=window.Inertia)||void 0===t?void 0:t.page)||{},i=null==o||null===(r=o.props)||void 0===r||null===(n=r.auth)||void 0===n?void 0:n.user;i&&i.id&&(e="user_"+i.id)}catch(e){}return e}function u(){return s()}function d(e){return f.apply(this,arguments)}function f(){var e;return e=o().mark((function e(t){var r,n,i,c,u,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=s(),n=a,i=l,r&&n&&i){e.next=6;break}return("localhost"===window.location.hostname||window.location.search.includes("debug"))&&console.log("[Meilisearch Analytics] Skipping event (not yet initialized)",{eventType:t.eventType,hasUserId:!!r,hasApiKey:!!n,hasHost:!!i}),e.abrupt("return");case 6:return 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,u="".concat(i.replace(/\/$/,""),"/events"),e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n),"X-MS-USER-ID":r},body:JSON.stringify(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 a=e.apply(t,r);function l(e){i(a,n,o,l,c,"next",e)}function c(e){i(a,n,o,l,c,"throw",e)}l(void 0)}))},f.apply(this,arguments)}function h(e){d({eventType:"click",eventName:"Search Result Clicked",indexUid:e.indexUid,objectId:e.objectId,objectName:e.objectName,position:e.position,queryUid:e.queryUid})}function p(e){var t=e.indexUid,r=e.objectId,n=e.objectName,o=e.eventName,i=e.queryUid;i||(i=new URLSearchParams(window.location.search).get("queryUid"));d({eventType:"conversion",eventName:o||"Conversion",indexUid:t,objectId:r,objectName:n,queryUid:i})}function m(){return new URLSearchParams(window.location.search).get("queryUid")}function v(){try{var e,t,r,n=(null===(e=window.Inertia)||void 0===e?void 0:e.page)||{},o=(null==n||null===(t=n.props)||void 0===t||null===(r=t.integrations)||void 0===r?void 0:r.meilisearch)||{},i=window.location.pathname;return i.includes("/lesson-plans/")||i.includes("/external-resources/")?o.teachingMaterialsIndex||"teaching_materials":i.includes("/teacher-guides/")?o.teacherGuidesIndex||"teacher_guides":i.includes("/climate-change-explainers/")?o.climateExplainersIndex||"climate_explainers":i.includes("/professional-development/")?o.pdIndex||"professional_development":i.includes("/news/")?o.newsIndex||"news":null}catch(e){return null}}},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,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}
2}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 a,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,a=e},f:function(){try{l||null==r.return||r.return()}finally{if(c)throw a}}}}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 i(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 a(e){var t=e.tenantId,r=e.indexes;if(t&&null!=r&&r.length){var o,a=n(r);try{for(a.s();!(o=a.n()).done;){i({tenantId:t,index:o.value,source:"multi"})}}catch(e){a.e(e)}finally{a.f()}}}r.d(t,{j:()=>i,p:()=>a})},91274:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".line-clamp-2[data-v-1d6d3356]{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.animate-pulse[data-v-1d6d3356]{animation:pulse-1d6d3356 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-1d6d3356{0%,to{opacity:1}50%{opacity:.5}}",""]);const i=o},38923:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(1519),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".animate-pulse[data-v-03bc7326]{animation:pulse-03bc7326 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse-03bc7326{0%,to{opacity:1}50%{opacity:.5}}",""]);const i=o},78662:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n=r(41916),o={class:"tracking-[.25px] text-base leading-[20px] font-normal text-[#49454F]"};var i=r(28415),a=r(93220),l=r(5121),c=r(87879);function s(){s=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",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 d(e,t,r,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),l=new N(o||[]);return n(a,"_invoke",{value:E(e,r,l)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var h={};function p(){}function m(){}function v(){}var y={};c(y,i,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(B([])));b&&b!==t&&r.call(b,i)&&(y=b);var w=v.prototype=p.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,i,a,l){var c=f(e[n],e,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==u(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,l)}))}l(c.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function E(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=S(a,r);if(l){if(l===h)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===h)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")),h;var o=f(n,e.iterator,t.arg);
2if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function L(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 C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function B(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return m.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:m,configurable:!0}),m.displayName=c(v,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(x.prototype),c(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(d(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(w),c(w,l,"Generator"),c(w,i,(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=B,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(C),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function u(e){return u="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},u(e)}function d(e,t,r,n,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}const f={components:{BaseCard:i.Z,ExplainerTag:a.default},props:{explainer:Object,isBookmarked:{type:Boolean,default:!1},bookmarkRoute:{type:String}},setup:function(){var e=(0,n.ref)("undefined"!=typeof window&&window.innerWidth<640),t=function(){e.value=window.innerWidth<640};return(0,n.onMounted)((function(){window.addEventListener("resize",t)})),(0,n.onUnmounted)((function(){window.removeEventListener("resize",t)})),{isMobile:e}},computed:{url:function(){return this.explainer.slug?route("climateChangeExplainers.show",this.explainer.slug):null},imageUrl:function(){return this.explainer.primaryImageUrl},timeToRead:function(){return"".concat(this.explainer.mins_to_read," minute read")},user:function(){return(0,c.qt)().props.auth.user}},methods:{notifyAlgoliaAboutClick:function(){var e=this.explainer.id;this.aa("clickedObjectIDs",{objectIDs:[e.toString()],eventName:"Explainer Clicked",index:this.climateChangeExplainersIndex})},toggleBookmark:function(){var e,t=this;return(e=s().mark((function e(){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.user&&("object"!==u(t.user)||t.user.id)){e.next=3;break}return window.location.href=route("login"),e.abrupt("return");case 3:return r=!t.isBookmarked,t.$emit("bookmarkUpdated",{id:t.explainer.id,is_bookmarked:r}),e.prev=5,e.next=8,l.Z.put(route(t.bookmarkRoute,t.explainer.id),{is_bookmarked:r});case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.error(e.t0);case 13:case"end":return e.stop()}}),e,null,[[5,10]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,l,"next",e)}function l(e){d(i,n,o,a,l,"throw",e)}a(void 0)}))})()}}};const h=(0,r(83744).Z)(f,[["render",function(e,t,r,i,a,l){var c=(0,n.resolveComponent)("BaseCard");return(0,n.openBlock)(),(0,n.createBlock)(c,{item:{title:r.explainer.title,image:l.imageUrl||"https://subjecttoclimate.nyc3.digitaloceanspaces.com/4365/conversions/adryan-ra-ysT-xbhhK2c-unsplash-thumb.jpg",subtitle:l.timeToRead},to:l.url,"is-bookmarked":r.isBookmarked,"show-stats":!1,"fallback-image":"/img/climate-explainers/placeholder.webp",view:i.isMobile?"mobile-grid":"desktop",onBookmark:l.toggleBookmark},{subtitle:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("p",o,(0,n.toDisplayString)(l.timeToRead),1)]})),_:1},8,["item","to","is-bookmarked","view","onBookmark"])}]])},93220:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(41916),o={class:"text-xl font-poppins bg-[#A4EBA2] rounded-b-xl px-[19.76px] py-[5px]"};const i={},a=(0,r(83744).Z)(i,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.renderSlot)(e.$slots,"default")])}]])},8953:(e,t,r)=>{r.r(t),r.d(t,{default:()=>q});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a={class:"lg:hidden space-y-4 px-4 bg-white"},l={class:"relative"},c={class:"space-y-2 rounded-lg shadow-lg"},s={key:0,class:"absolute bottom-0 left-0 right-0"},u={class:"absolute bottom-2 left-0 right-0 text-center"},d={key:0,class:"text-center mt-4"},f={class:"space-y-4"},h={key:0,class:"text-gray-600"},p={key:1,class:"text-gray-600"},m={key:0,class:"text-center py-8"},v={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"],k={class:"hidden lg:flex gap-8 px-4 py-4 sm:py-8"},x={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"},L={class:"flex-1"},C={class:"flex justify-between items-center mb-4"},N={class:"w-full"},B={key:0,class:"text-gray-600"},_={key:1,class:"text-gray-600"},j={key:0,class:"flex items-center gap-2"},I=["value","disabled"],V=["value"],O={key:0,class:"text-center py-8"},P={class:"flex justify-center mt-4"},A={class:"flex items-center space-x-1"},T=["disabled"],F=["onClick","disabled"],$=["disabled"];const M={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 i=Math.max(1,e-Math.floor(r/2)),a=i+r;a>t&&(a=t+1,i=Math.max(1,a-r));for(var l=i;l<a&&l<=t;l++)n.push(l)}return n}}};const q=(0,r(83744).Z)(M,[["render",function(e,t,r,i,M,q){return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createElementVNode)("div",a,[(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",M.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")]),M.showAllFilters?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",s,[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",u,[(0,n.createElementVNode)("a",{href:"#",onClick:t[0]||(t[0]=(0,n.withModifiers)((function(e){return M.showAllFilters=!M.showAllFilters}),["prevent"])),class:"text-blue-600 text-sm underline hover:text-blue-800"}," Show more filters ")])]))],2),M.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 M.showAllFilters=!M.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",h,"Loading...")):((0,n.openBlock)(),(0,n.createElementBlock)("p",p,"Showing "+(0,n.toDisplayString)(r.showing)+" out of "+(0,n.toDisplayString)(r.total)+" results",1))]})),r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",m,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",v,[(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",k,[(0,n.createElementVNode)("div",x,[(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",L,[(0,n.createElementVNode)("div",C,[(0,n.renderSlot)(e.$slots,"results-header",{},(function(){return[(0,n.createElementVNode)("div",N,[r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("p",B,"Loading...")):((0,n.openBlock)(),(0,n.createElementBlock)("p",_,"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",j,[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,V)})),128))],40,I)])):(0,n.createCommentVNode)("",!0)]}))]),r.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",O,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",P,[(0,n.createElementVNode)("div",A,[(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,T),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(q.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,F)})),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,$)])])]}))])])],64)}]])},18758:(e,t,r)=>{r.r(t),r.d(t,{default:()=>j});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a={class:"space-y-4"},l={class:"space-y-2"},c={class:"rounded-lg"},s=["value"],u=["href"],d={class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 text-gray-600"},f={key:0}
vendor: 4,500 bytes, line 2
2,h={key:1},p={class:"flex items-center gap-2"},m={key:0,class:"text-gray-400 hidden sm:inline"},v={key:1,class:"text-sm sm:text-base"},y={class:"font-medium"},g={class:"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-3 gap-4 sm:gap-6"};var b=r(87879),w=r(9482),k=r(8953),x=r(78662),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 L(){L=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",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 s(e,t,r,o){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),l=new N(o||[]);return n(a,"_invoke",{value:k(e,r,l)}),a}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function f(){}function h(){}function p(){}var m={};c(m,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(B([])));y&&y!==t&&r.call(y,i)&&(m=y);var g=p.prototype=f.prototype=Object.create(m);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,i,a,l){var c=u(e[n],e,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==S(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(d).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,l)}))}l(c.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function k(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=x(a,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=u(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 x(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,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=u(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function 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 C(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 B(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return h.prototype=p,n(g,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:h,configurable:!0}),h.displayName=c(p,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,l,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,i){void 0===i&&(i=Prom
2ise);var a=new w(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(g),c(g,l,"Generator"),c(g,i,(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=B,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(C),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(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;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:B(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}function C(e,t,r,n,o,i,a){try{var l=e[i](a),c=l.value}catch(e){return void r(e)}l.done?t(c):Promise.resolve(c).then(n,o)}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,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return B(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 B(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 B(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 _={name:"ClimateChangeContentDirect",components:{BaseTabContentDirect:k.default,ExplainerItem:x.default},props:{searchQuery:{type:String,required:!0},selectedField:{type:String,required:!0},selectedFieldLabel:{type:String,required:!0},explainerCategories:{type:Array,default:function(){return[]}},bookmarkedExplainerIds:{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,i,a,l=t.emit,c=(null===(r=(0,b.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.climateExplainersIndex)||(null===(i=(0,b.qt)().props.integrations)||void 0===i||null===(a=i.algolia)||void 0===a?void 0:a.climateExplainersIndex)||"climate_explainers",s=(0,n.ref)(e.bookmarkedExplainerIds||[]),u=new URLSearchParams("undefined"!=typeof window?window.location.search:""),d=(0,n.ref)(u.get("
2category")||""),f=(0,n.ref)(u.get("sort")||"published_at:desc"),h=function(){var e=new URL(window.location);d.value?e.searchParams.set("category",d.value):e.searchParams.delete("category"),f.value&&"published_at:desc"!==f.value?e.searchParams.set("sort",f.value):e.searchParams.delete("sort"),window.history.replaceState({},"",e)},p=(0,n.computed)((function(){var e="";return d.value&&(e="categoryId=".concat(d.value)),e})),m=(0,n.computed)((function(){var e=N(f.value.split(":"),2);return{attribute:e[0],direction:e[1]}})),v=(0,w.x)(c,{hitsPerPage:12,initialSearch:!1,initialQuery:e.searchQuery||"",initialFilters:p.value,initialSort:[m.value.attribute+":"+m.value.direction],facets:[],attributesToSearchOn:"all"===e.selectedField?["*"]:[e.selectedField]}),y=v.hits,g=v.totalHits,k=v.totalPages,x=v.currentPage,S=v.isLoading,B=v.error,_=v.facetDistribution,j=v.setQuery,I=v.setFilters,V=v.setSort,O=v.goToPage,P=v.search,A=v.setResults,T=function(){return!!d.value};e.initialResults&&!T()&&A(e.initialResults),(0,n.watch)((function(){return e.initialResults}),(function(e){e&&(T()?P():A(e))})),(0,n.watch)(p,(function(e){I(e)})),(0,n.watch)((function(){return e.searchQuery}),(function(e){j(e||"",!1,!1)}),{immediate:!0}),(0,n.watch)((function(){return e.selectedField}),(function(t){var r="all"===t?["*"]:[t];P(e.searchQuery,{attributesToSearchOn:r})})),(0,n.watch)(g,(function(e){l("update:hitCount",e)}),{immediate:!0});var F=(0,n.computed)((function(){return 0===g.value?0:12*(x.value-1)+1})),$=function(){var e,t=(e=L().mark((function e(t){var r,n;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=s.value.includes(t.id),e.next=4,E.Z.put(route("climateChangeExplainers.bookmark",t.id),{is_bookmarked:!r});case 4:r?(n=s.value.indexOf(t.id))>-1&&s.value.splice(n,1):s.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 i=e.apply(t,r);function a(e){C(i,n,o,a,l,"next",e)}function l(e){C(i,n,o,a,l,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();return{bookmarkedIds:s,selectedCategoryID:d,explainerCategories:e.explainerCategories,perPage:12,currentSort:f,sortOptions:[{value:"published_at:desc",label:"Newest"},{value:"published_at:asc",label:"Oldest"}],showing:F,hits:y,totalHits:g,totalPages:k,currentPage:x,isLoading:S,error:B,facetDistribution:_,goToPage:O,handleCategoryChange:function(){h()},handleSortChange:function(e){f.value=e;var t=N(e.split(":"),2),r=t[0],n=t[1];V([r+":"+n]),h()},handleBookmark:$}}};const j=(0,r(83744).Z)(_,[["render",function(e,t,r,i,b,w){var k=(0,n.resolveComponent)("ExplainerItem"),x=(0,n.resolveComponent)("BaseTabContentDirect");return(0,n.openBlock)(),(0,n.createBlock)(x,{showing:i.showing,total:i.totalHits,"current-page":i.currentPage,"total-pages":i.totalPages,"is-loading":i.isLoading,"supports-sorting":!0,"sort-options":i.sortOptions,"current-sort":i.currentSort,onPageChange:i.goToPage,onSortChange:i.handleSortChange},{filters:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",a,[(0,n.createElementVNode)("div",l,[(0,n.createElementVNode)("div",c,[(0,n.withDirectives)((0,n.createElementVNode)("select",{"onUpdate:modelValue":t[0]||(t[0]=function(e){return i.selectedCategoryID=e}),class:"flex items-center justify-between cursor-pointer select-none duration-150 rounded-lg border px-4 py-2.5 bg-white w-full border-gray-200 font-medium",onChange:t[1]||(t[1]=function(){return i.handleCategoryChange&&i.handleCategoryChange.apply(i,arguments)})},[t[2]||(t[2]=(0,n.createElementVNode)("option",{value:""},"All Categories",-1)),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.explainerCategories,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("option",{key:e.id,value:e.id},(0,n.toDisplayString)(e.title),9,s)})),128))],544),[[n.vModelSelect,i.selectedCategoryID]])])])])]})),"all-button":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{target:"_blank",href:e.route("climateChangeExplainers.index"),class:"block"},o(t[3]||(t[3]=[(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 Climate Change Explainers"),(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,u)]})),"results-header":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",d,[0===i.totalHits?((0,n.openBlock)(),(0,n.createElementBlock)("span",f,"0 results")):((0,n.openBlock)(),(0,n.createElementBlock)("span",h,"Showing "+(0,n.toDisplayString)(i.showing)+"-"+(0,n.toDisplayString)(Math.min(i.currentPage*i.perPage,i.totalHits))+" out of "+(0,n.toDisplayString)(i.totalHits)+" results",1)),(0,n.createElementVNode)("div",p,[r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("span",m,"|")):(0,n.createCommentVNode)("",!0),r.searchQuery?((0,n.openBlock)(),(0,n.createElementBlock)("p",v,[t[4]||(t[4]=(0,n.createTextVNode)(" Searching in ",-1)),(0,n.createElementVNode)("span",y,(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",g,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(i.hits,(function(e){return(0,n.openBlock)(),(0,n.createBlock)(k,{key:e.id,explainer:e,"is-bookmarked":i.bookmarkedIds.includes(e.id),onBookmark:function(t){return i.handleBookmark(e)}},null,8,["explainer","is-bookmarked","onBookmark"])})),128))])]})),_:1},8,["showing","total","current-page","total-pages","is-loading","sort-options","current-sort","onPageChange","onSortChange"])}]])},85521:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(41916);function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var a={width:"41",height:"45",viewBox:"0 0 41 45",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const l={},c=(0,r(83744).Z)(l,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("svg",a,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)])))}]])},28415:(e,t,r)=>{r.d(t,{Z:()=>M});var n=r(41916);var o={class:"bg-white rounded-xl overflow-hidden border border-gray-900/10 group flex h-28"},i={class:"overflow-hidden w-1/3"};var a=r(87879),l={class:"relative"},c={class:"absolute inset-0 bg-gray-200 animate-pulse"},s=["src","alt"];const u={props:{image:{type:String,required:!0},title:{type:String,required:!0},fallbackImage:{type:String,required:!0}},setup:function(e){var t=(0,n.ref)(!0);return{isLoading:t,handleImageError:function(r){r.target.src=e.fallbackImage,t.value=!1}}}};var d=r(93379),f=r.n(d),h=r(38923),p={insert:"head",singleton:!1};f()(h.Z,p);h.Z.locals;var m=r(83744);const v=(0,m.Z)(u,[["render",function(e,t,r,o,i,a){return(0,n.openBlock)(),(0,n.createElementBlock)("div",l,[(0,n.withDirectives)((0,n.createElementVNode)("div",c,null,512),[[n.vShow,o.isLoading]]),(0,n.createElementVNode)("img",{src:r.image,alt:r.title,onLoad:t[0]||(t[0]=function(e){return o.isLoading=!1}),onError:t[1]||(t[1]=function(){return o.handleImageError&&o.handleImageError.apply(o,arguments)}),class:(0,n.normalizeClass)(["w-full h-full object-cover group-hover:opacity-80 duration-150 group-hover:scale-105",{"opacity-0":o.isLoading}])},null,42,s)])}],["__scopeId","data-v-03bc7326"]]);function y(e){return function(e){if(Array.isArray(e))return g(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 g(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 g(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 g(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 b={class:"p-4"},w={key:0,class:"animate-pulse"};const k={props:{title:{type:String,required:!0},view:{type:String,required:!0,validator:function(e){return["mobile","mobile-grid","desktop"].includes(e)}},pretitle:{type:String,default:""},clampTitle:{type:Boolean,default:!0}},setup:function(){return{isLoading:(0,n.ref)(!1)}}};var x=r(91274),E={insert:"head",singleton:!1};f()(x.Z,E);x.Z.locals;const S=(0,m.Z)(k,[["render",function(e,t,r,o,i,a){return(0,n.openBlock)(),(0,n.createElementBlock)("div",b,[o.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",w,y(t[0]||(t[0]=[(0,n.createElementVNode)("div",{class:"h-4 bg-gray-200 rounded w-3/4 mb-2"},null,-1),(0,n.createElementVNode)("div",{class:"h-3 bg-gray-200 rounded w-1/4"},null,-1)])))):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[e.$slots.pretitle||r.pretitle?((0,n.openBlock)(),(0,n.createElementBlock)("div",{key:0,class:(0,n.normalizeClass)(["text-sm text-gray-600 mb-1","mobile-grid"===r.view?"text-xs":""])},[(0,n.renderSlot)(e.$slots,"pretitle",{},(function(){return[(0,n.createTextVNode)((0,n.toDisplayString)(r.pretitle),1)]}),!0)],2)):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("h3",{class:(0,n.normalizeClass)(["font-medium mb-2",r.clampTitle?"line-clamp-3":"","mobile"===r.view?"text-sm":"","mobile-grid"===r.view?"text-sm":"","desktop"===r.view?"text-lg group-hover:text-blue-600":""])},[(0,n.renderSlot)(e.$slots,"title",{},(function(){return[(0,n.createTextVNode)((0,n.toDisplayString)(r.title),
21)]}),!0)],2),(0,n.renderSlot)(e.$slots,"description",{},void 0,!0),(0,n.renderSlot)(e.$slots,"subtitle",{},void 0,!0)],64))])}],["__scopeId","data-v-1d6d3356"]]),L={components:{Link:a.rU,CardImage:v,CardContent:S},props:{item:{type:Object,required:!0},to:{type:String,required:!0},fallbackImage:{type:String,required:!0}},emits:["click"]},C=(0,m.Z)(L,[["render",function(e,t,r,a,l,c){var s=(0,n.resolveComponent)("CardImage"),u=(0,n.resolveComponent)("CardContent"),d=(0,n.resolveComponent)("Link");return(0,n.openBlock)(),(0,n.createElementBlock)("div",o,[(0,n.createVNode)(d,{href:r.to,class:"block w-full h-full flex",onClick:t[0]||(t[0]=function(t){return e.$emit("click")})},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",i,[(0,n.createVNode)(s,{image:r.item.image,title:r.item.title,"fallback-image":r.fallbackImage,class:"h-full"},null,8,["image","title","fallback-image"])]),(0,n.createVNode)(u,{title:r.item.title,view:"mobile",class:"flex-1"},{pretitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"pretitle")]})),subtitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"subtitle")]})),_:3},8,["title"])]})),_:3},8,["href"])])}]]);var N={class:"bg-white rounded-xl overflow-hidden border border-gray-900/10 group block"},B={class:"overflow-hidden w-full"};const _={components:{Link:a.rU,CardImage:v,CardContent:S},props:{item:{type:Object,required:!0},to:{type:String,required:!0},fallbackImage:{type:String,required:!0}},emits:["click"]},j=(0,m.Z)(_,[["render",function(e,t,r,o,i,a){var l=(0,n.resolveComponent)("CardImage"),c=(0,n.resolveComponent)("CardContent"),s=(0,n.resolveComponent)("Link");return(0,n.openBlock)(),(0,n.createElementBlock)("div",N,[(0,n.createVNode)(s,{href:r.to,class:"block w-full h-full flex flex-col",onClick:t[0]||(t[0]=function(t){return e.$emit("click")})},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",B,[(0,n.createVNode)(l,{image:r.item.image,title:r.item.title,"fallback-image":r.fallbackImage,style:{"aspect-ratio":"16/9"}},null,8,["image","title","fallback-image"])]),(0,n.createVNode)(c,{title:r.item.title,view:"mobile-grid",class:"flex-1"},{pretitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"pretitle")]})),subtitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"subtitle")]})),_:3},8,["title"])]})),_:3},8,["href"])])}]]);var I={class:"bg-white rounded-xl overflow-hidden border border-gray-900/10 group shadow-sm hover:border-gray-900/20 relative"},V={class:"overflow-hidden w-full"},O={key:0,class:"absolute top-3 left-3 bg-white/90 backdrop-blur-sm px-2 py-1 rounded-full items-center space-x-1 border border-gray-900/10 hidden lg:flex"},P={class:"text-sm text-gray-700"};var A=r(85521);const T={components:{Link:a.rU,CardImage:v,CardContent:S,BookmarkingIcon:A.Z},props:{item:{type:Object,required:!0},to:{type:String,required:!0},isBookmarked:{type:Boolean,default:!1},showBookmark:{type:Boolean,default:!0},showStats:{type:Boolean,default:!1},fallbackImage:{type:String,required:!0}},emits:["bookmark","click"]},F=(0,m.Z)(T,[["render",function(e,t,r,o,i,a){var l=(0,n.resolveComponent)("BookmarkingIcon"),c=(0,n.resolveComponent)("CardImage"),s=(0,n.resolveComponent)("CardContent"),u=(0,n.resolveComponent)("Link");return(0,n.openBlock)(),(0,n.createElementBlock)("div",I,[(0,n.createVNode)(u,{href:r.to,class:"block w-full h-full",onClick:t[1]||(t[1]=function(t){return e.$emit("click")})},{default:(0,n.withCtx)((function(){return[r.showBookmark?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,onClick:t[0]||(t[0]=(0,n.withModifiers)((function(t){return e.$emit("bookmark")}),["prevent","stop"])),class:"absolute top-0 right-0 w-8 h-8 flex items-center justify-center z-10 hidden sm:flex"},[(0,n.createVNode)(l,{class:(0,n.normalizeClass)(["absolute top-0 right-4 z-10 hover:scale-105 duration-150",r.isBookmarked?"text-[#FF8B8B]":"text-[#FFF4F4] hover:text-[#ffdddd]"])},null,8,["class"])])):(0,n.createCommentVNode)("",!0),(0,n.createElementVNode)("div",V,[(0,n.createVNode)(c,{image:r.item.image,title:r.item.title,"fallback-image":r.fallbackImage,style:{"aspect-ratio":"16/9"}}
2,null,8,["image","title","fallback-image"]),r.showStats?((0,n.openBlock)(),(0,n.createElementBlock)("div",O,[(0,n.renderSlot)(e.$slots,"stats-icon"),(0,n.createElementVNode)("span",P,[(0,n.renderSlot)(e.$slots,"stats-text")])])):(0,n.createCommentVNode)("",!0)]),(0,n.createVNode)(s,{title:r.item.title,view:"desktop"},{pretitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"pretitle")]})),subtitle:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"subtitle")]})),description:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"description")]})),_:3},8,["title"])]})),_:3},8,["href"])])}]]),$={props:{item:{type:Object,required:!0,validator:function(e){return e.title&&e.image}},to:{type:String,required:!0},view:{type:String,default:"mobile",validator:function(e){return["mobile","mobile-grid","desktop"].includes(e)}},isBookmarked:{type:Boolean,default:!1},showBookmark:{type:Boolean,default:!0},showStats:{type:Boolean,default:!1},fallbackImage:{type:String,default:"/img/placeholder.webp"}},emits:["bookmark","click"],setup:function(e){return{cardComponent:(0,n.computed)((function(){switch(e.view){case"mobile":default:return C;case"mobile-grid":return j;case"desktop":return F}}))}}},M=(0,m.Z)($,[["render",function(e,t,r,o,i,a){return(0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(o.cardComponent),{item:r.item,to:r.to,"is-bookmarked":r.isBookmarked,"show-bookmark":r.showBookmark,"show-stats":r.showStats,"fallback-image":r.fallbackImage,onBookmark:t[0]||(t[0]=function(t){return e.$emit("bookmark",r.item)}),onClick:t[1]||(t[1]=function(t){return e.$emit("click")})},(0,n.createSlots)({_:2},[e.$slots.pretitle?{name:"pretitle",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"pretitle")]})),key:"0"}:void 0,e.$slots["stats-icon"]?{name:"stats-icon",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"stats-icon")]})),key:"1"}:void 0,e.$slots["stats-text"]?{name:"stats-text",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"stats-text")]})),key:"2"}:void 0,e.$slots.description?{name:"description",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"description")]})),key:"3"}:void 0,e.$slots.subtitle?{name:"subtitle",fn:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"subtitle")]})),key:"4"}:void 0]),1064,["item","to","is-bookmarked","show-bookmark","show-stats","fallback-image"])}]])}}]);
3//# sourceMappingURL=Search-components-ClimateChangeContentDirect-vue.c09dbea8.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.