vendor: 4,520 bytes, lines 1-2
1/*! For license information please see Search-components-NewsContentDirect-vue.967f74a3.js.LICENSE.txt */ 2"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[6825,2116,4453],{9482:(e,t,r)=>{r.d(t,{x:()=>p});var n=r(41916),o=r(15229),i=r(87879),a=r(5121),l=r(47393),s=r(91440),c=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 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 c(e,t,r,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new L(o||[]);return n(a,"_invoke",{value:S(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=c;var p={};function h(){}function m(){}function v(){}var y={};s(y,i,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(B([])));w&&w!==t&&r.call(w,i)&&(y=w);var b=v.prototype=h.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,i,a,l){var s=f(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.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){c.value=e,a(c)}),(function(e){return o("throw",e,a,l)}))}l(s.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 S(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=E(a,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 s=f(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function E(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,E(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 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,p):i:(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 N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,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(b,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:m,configurable:!0}),m.displayName=s(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,s(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},k(x.prototype),s(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(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},k(b),s(b,l,"Generator"),s(b,i,(function(){return this})),s(b,"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,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(N),!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"),s=r.call(i,"finallyLoc");if(l&&s){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(!s)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,p):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),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),N(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;N(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),p}},e}function f(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function p(e){var t,r,u,p,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=h.hitsPerPage,v=void 0===m?9:m,y=h.initialSearch,g=void 0===y||y,w=h.autoSearch,b=void 0===w||w,k=h.initialQuery,x=void 0===k?"":k,S=h.initialFilters,E=void 0===S?"":S,C=h.initialSort,N=void 0===C?"":C,L=h.facets,B=void 0===L?[]:L,_=h.aiSearchEnabled,V=void 0!==_&&_,j=h.aiSearchEndpoint,I=void 0===j?null:j,A=h.initialHits,O=void 0===A?[]:A,P=h.initialTotalHits,T=void 0===P?0:P,$=(0,i.qt)(),M=(null===(t=$.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",q=(null===(u=$.props.integrations)||void 0===u||null===(p=u.meilisearch)||void 0===p?void 0:p.key)||("undefined"!=typeof window?window.MEILISEARCH_KEY:void 0)||"";q&&(0,l.qd)(q,M);var F=(0,l.wA)(),U=new o.MeiliSearch({host:M,apiKey:q,requestConfig:{headers:{"X-MS-USER-ID":F}}}),D=(0,n.ref)(O),G=(0,n.ref)(T),Z=(0,n.ref)(Math.ceil((T||0)/v)),H=(0,n.ref)(1),R=(0,n.ref)(!1),z=(0,n.ref)(null),Q=(0,n.ref)(x),Y=(0,n.ref)(E),K=(0,n.ref)(N),J=(0,n.ref)({}),W=(0,n.ref)(0),X=(0,n.ref)(null),ee=(0,n.ref)({enabled:V,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,p,h,m,y,g,w,b,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]||(R.value=!0),z.value=null,t.prev=3,n=(0,c.Bl)(Q.value),!(V&&I&&Q.value.trim())){t.next=24;break}return t.prev=6,t.next=9,a.Z.post(I,{query:Q.value,filters:Y.value||"",facets:B,sort:K.value,page:H.value,per_page:v});case 9:return m=t.sent,y=m.data,D.value=y.hits||[],G.value=y.estimatedTotalHits||0,Z.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===(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=U.index(e),w={limit:v,offset:(H.value-1)*v},n&&(w.q=n),Y.value&&(w.filter=Y.value),B.length>0&&(w.facets=B),K.value&&!Q.value&&(w.sort=Array.isArray(K.value)?K.value:[K.value]),t.next=32,g.search(n||"",w);case 32:b=t.sent,D.value=b.hits,G.value=b.estimatedTotalHits||0,Z.value=Math.ceil(G.value/v),W.value=b.processingTimeMs,J.value=b.facetDistribution||{},X.value=(null===(r=b.metadata)||void 0===r?void 0:r.queryUid)||null,ee.value={enabled:V,used:!1,summary:null,match_quality:null,matched_themes:[],result_reasons:[],unmet_constraints:[]},(0,s.j)({tenantId:$.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,R.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:Z,currentPage:H,isLoading:R,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&&(H.value=1),b&&t&&te()},setFilters:function(e){Y.value=e,H.value=1,b&&te()},setSort:function(e){K.value=e,H.value=1,b&&te()},goToPage:function(e){H.value=e,b&&te()},setResults:function(e){e&&(D.value=e.hits||[],G.value=e.estimatedTotalHits||e.totalHits||0,Z.value=Math.ceil(G.value/v),J.value=e.facetDistribution||{},W.value=e.processingTimeMs||0,H.value=1,ee.value={enabled:V,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",s=a.asyncIterator||"@@asyncIterator",c=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 h?t:h,a=Object.create(o.prototype),l=new L(n||[]);return i(a,"_invoke",{value:S(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 p={};function h(){}function m(){}function v(){}var y={};u(y,l,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(B([])));w&&w!==t&&r.call(w,l)&&(y=w);var b=v.prototype=h.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,s){var c=f(e[i],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==n(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,l,s)}),(function(e){o("throw",e,l,s)})):t.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return o("throw",e,l,s)}))}s(c.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 S(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=E(a,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 s=f(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function E(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,E(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 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,p):i:(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 N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,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(b,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:m,configurable:!0}),m.displayName=u(v,c,"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,c,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},k(x.prototype),u(x.prototype,s,(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(b),u(b,c,"Generator"),u(b,l,(function(){return this})),u(b,"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,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(N),!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"),s=r.call(i,"finallyLoc");if(l&&s){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(!s)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,p):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),p},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),N(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;N(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),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}r.d(t,{De:()=>h,VK:()=>m,aU:()=>v,ob:()=>p,qd:()=>s,wA:()=>u});var a=null,l=null;function s(e,t){a=e,t&&(l=t)}function c(){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 c()}function d(e){return f.apply(this,arguments)}function f(){var e;return e=o().mark((function e(t){var r,n,i,s,u,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c(),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 s={eventType:t.eventType,eventName:t.eventName||("click"===t.eventType?"Search Result Clicked":"Conversion"),indexUid:t.indexUid,userId:r,objectId:t.objectId},t.objectName&&(s.objectName=t.objectName),void 0!==t.position&&null!==t.position&&(s.position=t.position),t.queryUid&&(s.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(s)});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,s,"next",e)}function s(e){i(a,n,o,l,s,"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,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||"opportunities":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,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){s=!0,a=e},f:function(){try{l||null==r.return||r.return()}finally{if(s)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})},48365:(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-75873320]{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}",""]);const i=o},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},8953:(e,t,r)=>{r.r(t),r.d(t,{default:()=>F});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"},s={class:"space-y-2 rounded-lg shadow-lg"},c={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"},p={key:0,class:"text-gray-600"},h={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"],w={class:"text-sm"},b=["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"},S={key:0,class:"bg-white p-4 rounded-lg border"},E={class:"space-y-2"},C={class:"flex-1"},N={class:"flex justify-between items-center mb-4"},L={class:"w-full"},B={key:0,class:"text-gray-600"},_={key:1,class:"text-gray-600"},V={key:0,class:"flex items-center gap-2"},j=["value","disabled"],I=["value"],A={key:0,class:"text-center py-8"},O={class:"flex justify-center mt-4"},P={class:"flex items-center space-x-1"},T=["disabled"],$=["onClick","disabled"],M=["disabled"];const q={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 F=(0,r(83744).Z)(q,[["render",function(e,t,r,i,q,F){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",q.showAllFilters?"max-h-[1000px]":"max-h-[60px]"])},[(0,n.createElementVNode)("div",s,[t[7]||(t[7]=(0,n.createElementVNode)("h3",{class:"font-medium mb-4"},"Refine Search Results",-1)),(0,n.renderSlot)(e.$slots,"filters")]),q.showAllFilters?(0,n.createCommentVNode)("",!0):((0,n.openBlock)(),(0,n.createElementBlock)("div",c,[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 q.showAllFilters=!q.showAllFilters}),["prevent"])),class:"text-blue-600 text-sm underline hover:text-blue-800"}," Show more filters ")])]))],2),q.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 q.showAllFilters=!q.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",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",w," 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,b)])])]}))])]),(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",S,[t[12]||(t[12]=(0,n.createElementVNode)("h3",{class:"font-medium mb-4"},"Refine Search Results",-1)),(0,n.createElementVNode)("div",E,[(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",N,[(0,n.renderSlot)(e.$slots,"results-header",{},(function(){return[(0,n.createElementVNode)("div",L,[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",V,[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,I)})),128))],40,j)])):(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",O,[(0,n.createElementVNode)("div",P,[(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)(F.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,$)})),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,M)])])]}))])])],64)}]])},46365:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});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"},s={class:"rounded-lg"},c=["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,485 bytes, line 2
2,p={key:1},h={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-1 sm:grid-cols-2 gap-4 sm:gap-6"};var w=r(87879),b=r(9482),k=r(8953),x=r(30379),S=r(5121);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 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:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.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 c(e,t,r,o){var i=t&&t.prototype instanceof f?t:f,a=Object.create(i.prototype),l=new L(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=c;var d={};function f(){}function p(){}function h(){}var m={};s(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=h.prototype=f.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function o(n,i,a,l){var s=u(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==E(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){c.value=e,a(c)}),(function(e){return o("throw",e,a,l)}))}l(s.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 s=u(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.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 S(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 N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,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 p.prototype=h,n(g,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=s(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,s(e,l,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},w(b.prototype),s(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Prom
2ise);var a=new b(c(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(g),s(g,l,"Generator"),s(g,i,(function(){return this})),s(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,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(N),!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"),s=r.call(i,"finallyLoc");if(l&&s){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(!s)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),N(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;N(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 N(e,t,r,n,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,o)}function L(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=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)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:"NewsContentDirect",components:{BaseTabContentDirect:k.default,NewsCard:x.default},props:{searchQuery:{type:String,required:!0},selectedField:{type:String,required:!0},selectedFieldLabel:{type:String,required:!0},newsCategories:{type:Array,default:function(){return[]}},bookmarkedNewsIds:{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,s=(null===(r=(0,w.qt)().props.integrations)||void 0===r||null===(o=r.meilisearch)||void 0===o?void 0:o.newsIndex)||(null===(i=(0,w.qt)().props.integrations)||void 0===i||null===(a=i.algolia)||void 0===a?void 0:a.newsIndex)||"news",c=(0,n.ref)("undefined"!=typeof window&&window.innerWidth<640),u=(0,n.ref)(e.bookmarkedNewsIds||[]),d=new URLSearchParams("undefined"!=typeof window?window.location.search:""),f=(0,n.ref)(d.get("category")||""),p=(0,n.ref)(d.get("sort")||"publish_at:desc"),h=function(){var e=new URL(window.location);f.value?e.searchParams.set("category",f.value):e.searchParams.delete("category"),p.value&&"publish_at:desc"!==p.value?e.searchParams.set("sort",p.value):e.searchParams.delete("sort"),window.history.replaceState({},"",e)},m=(0,n.computed)((function(){var e="";return f.value&&(e="categoryIds=".concat(f.value)),e})),v=(0,n.computed)((function(){var e=L(p.value.split(":"),2);return{attribute:e[0],direction:e[1]}})),y=(0,b.x)(s,{hitsPerPage:12,initialSearch:!1,initialQuery:e.searchQuery||"",initialFilters:m.value,initialSort:[v.value.attribute+":"+v.value.direction],facets:[],attributesToSearchOn:"all"===e.selectedField?["*"]:[e.selectedField]}),g=y.hits,k=y.totalHits,x=y.totalPages,E=y.currentPage,B=y.isLoading,_=y.error,V=y.facetDistribution,j=y.setQuery,I=y.setFilters,A=y.setSort,O=y.goToPage,P=y.search,T=y.setResults,$=function(){return!!f.value};e.initialResults&&!$()&&T(e.initialResults),(0,n.watch)((function(){return e.initialResults}),(function(e){e&&($()?P():T(e))}));(0,n.watch)(m,(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)(k,(function(e){l("update:hitCount",e)}),{immediate:!0});var M=(0,n.computed)((function(){return 0===k.value?0:12*(E.value-1)+1})),q=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=u.value.includes(t.id),e.next=4,S.Z.put(route("news.bookmark",t.id),{is_bookmarked:!r});case 4:r?(n=u.value.indexOf(t.id))>-1&&u.value.splice(n,1):u.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){N(i,n,o,a,l,"next",e)}function l(e){N(i,n,o,a,l,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}();return"undefined"!=typeof window&&window.addEventListener("resize",(function(){c.value=window.innerWidth<640})),{isMobileView:c,bookmarkedIds:u,selectedCategory:f,newsCategories:e.newsCategories,perPage:12,currentSort:p,sortOptions:[{value:"publish_at:desc",label:"Newest"},{value:"publish_at:asc",label:"Oldest"}],showing:M,hits:g,totalHits:k,totalPages:x,currentPage:E,isLoading:B,error:_,facetDistribution:V,goToPage:O,handleCategoryChange:function(){h()},handleSortChange:function(e){p.value=e;var t=L(e.split(":"),2),r=t[0],n=t[1];A([r+":"+n]),h()},handleBookmark:q,formatArticle:function(e){return{id:e.id,title:e.title,image:e.primaryImageUrl,date:new Date(e.publish_at).toLocaleDateString(),slug:e.slug,views:e.views||0,description:e.description,nbVisits:e.nbVisits||0,is_bookmarked:u.value.includes(e.id)}}}}};const V=(0,r(83744).Z)(_,[["render",function(e,t,r,i,w,b){var k=(0,n.resolveComponent)("NewsCard"),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",s,[(0,n.withDirectives)((0,n.createElementVNode)("select",{"onUpdate:modelValue":t[0]||(t[0]=function(e){return i.selectedCategory=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.newsCategories,(function(e){return(0,n.openBlock)(),(0,n.createElementBlock)("option",{key:e.id,value:e.id},(0,n.toDisplayString)(e.name),9,c)})),128))],544),[[n.vModelSelect,i.selectedCategory]])])])])]})),"all-button":(0,n.withCtx)((function(){return[(0,n.createElementVNode)("a",{target:"_blank",href:e.route("news.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 News for Students"),(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",p,"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",h,[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,article:i.formatArticle(e),"is-bookmarked":i.bookmarkedIds.includes(e.id),view:i.isMobileView?"mobile":"desktop",onBookmark:i.handleBookmark},null,8,["article","is-bookmarked","view","onBookmark"])})),128))])]})),_:1},8,["showing","total","current-page","total-pages","is-loading","sort-options","current-sort","onPageChange","onSortChange"])}]])},30379:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});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:"text-sm text-gray-500"},l=["innerHTML"];var s=r(28415),c=r(47393),u=r(87879);const d={components:{BaseCard:s.Z},props:{article:{type:Object,required:!0},view:{type:String,default:"mobile",validator:function(e){return["mobile","mobile-grid","desktop"].includes(e)}},isBookmarked:{type:Boolean,default:!1},position:{type:Number,default:null},queryUid:{type:String,default:null}},emits:["bookmark"],setup:function(e){var t,r,n,o,i={title:e.article.title,image:e.article.image,subtitle:e.article.date,description:e.article.description},a=(0,u.qt)();return{formattedArticle:i,newsIndex:(null===(t=a.props.integrations)||void 0===t||null===(r=t.meilisearch)||void 0===r?void 0:r.newsIndex)||(null===(n=a.props.integrations)||void 0===n||null===(o=n.algolia)||void 0===o?void 0:o.newsIndex)||"news"}},computed:{articleUrl:function(){var e=route("news.show",this.article.slug);
2if(e&&this.queryUid){var t=e.includes("?")?"&":"?";return e+t+"queryUid="+encodeURIComponent(this.queryUid)}return e}},methods:{stripHtmlTags:function(e){return e.replace(/<[^>]*>/g,"").replace(/ /g," ")},handleClick:function(){(0,c.ob)({indexUid:this.newsIndex,objectId:String(this.article.id),objectName:this.article.title,position:this.position,queryUid:this.queryUid})}}};var f=r(93379),p=r.n(f),h=r(48365),m={insert:"head",singleton:!1};p()(h.Z,m);h.Z.locals;const v=(0,r(83744).Z)(d,[["render",function(e,t,r,i,s,c){var u=(0,n.resolveComponent)("BaseCard");return(0,n.openBlock)(),(0,n.createBlock)(u,{item:i.formattedArticle,view:r.view,"is-bookmarked":r.isBookmarked,"show-stats":!0,"clamp-title":!1,to:c.articleUrl,"fallback-image":"/img/news/placeholder.webp",onBookmark:t[0]||(t[0]=function(t){return e.$emit("bookmark",r.article)}),onClick:c.handleClick},{"stats-icon":(0,n.withCtx)((function(){return o(t[1]||(t[1]=[(0,n.createElementVNode)("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)]))})),pretitle:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("p",a,(0,n.toDisplayString)(r.article.date),1)]})),"stats-text":(0,n.withCtx)((function(){return[(0,n.createTextVNode)((0,n.toDisplayString)(r.article.nbVisits),1)]})),description:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("p",{innerHTML:c.stripHtmlTags(r.article.description),class:"text-sm text-gray-600 mb-2"},null,8,l)]})),subtitle:(0,n.withCtx)((function(){return o(t[2]||(t[2]=[]))})),_:1},8,["item","view","is-bookmarked","to","onClick"])}],["__scopeId","data-v-75873320"]])},85521:(e,t,r)=>{r.d(t,{Z:()=>s});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={},s=(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(#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>
2<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:()=>q});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"},s={class:"absolute inset-0 bg-gray-200 animate-pulse"},c=["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),p=r(38923),h={insert:"head",singleton:!1};f()(p.Z,h);p.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",s,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,c)])}],["__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 w={class:"p-4"},b={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),S={insert:"head",singleton:!1};f()(x.Z,S);x.Z.locals;const E=(0,m.Z)(k,[["render",function(e,t,r,o,i,a){return(0,n.openBlock)(),(0,n.createElementBlock)("div",w,[o.isLoading?((0,n.openBlock)(),(0,n.createElementBlock)("div",b,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),1)]}),!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"]]),C={components:{Link:a.rU,CardImage:v,CardContent:E},props:{item:{type:Object,required:!0},to:{type:String,required:!0},fallbackImage:{type:String,required:!0}},emits:["click"]},N=(0,m.Z)(C,[["render",function(e,t,r,a,l,s){var c=(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)(c,{image:r.item.image,title:r.item.title,"fallback-image":r.fallbackImage,class:"h-full"}
2,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 L={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:E},props:{item:{type:Object,required:!0},to:{type:String,required:!0},fallbackImage:{type:String,required:!0}},emits:["click"]},V=(0,m.Z)(_,[["render",function(e,t,r,o,i,a){var l=(0,n.resolveComponent)("CardImage"),s=(0,n.resolveComponent)("CardContent"),c=(0,n.resolveComponent)("Link");return(0,n.openBlock)(),(0,n.createElementBlock)("div",L,[(0,n.createVNode)(c,{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)(s,{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 j={class:"bg-white rounded-xl overflow-hidden border border-gray-900/10 group shadow-sm hover:border-gray-900/20 relative"},I={class:"overflow-hidden w-full"},A={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"},O={class:"text-sm text-gray-700"};var P=r(85521);const T={components:{Link:a.rU,CardImage:v,CardContent:E,BookmarkingIcon:P.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"]},$=(0,m.Z)(T,[["render",function(e,t,r,o,i,a){var l=(0,n.resolveComponent)("BookmarkingIcon"),s=(0,n.resolveComponent)("CardImage"),c=(0,n.resolveComponent)("CardContent"),u=(0,n.resolveComponent)("Link");return(0,n.openBlock)(),(0,n.createElementBlock)("div",j,[(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",I,[(0,n.createVNode)(s,{image:r.item.image,title:r.item.title,"fallback-image":r.fallbackImage,style:{"aspect-ratio":"16/9"}},null,8,["image","title","fallback-image"]),r.showStats?((0,n.openBlock)(),(0,n.createElementBlock)("div",A,[(0,n.renderSlot)(e.$slots,"stats-icon"),(0,n.createElementVNode)("span",O,[(0,n.renderSlot)(e.$slots,"stats-text")])])):(0,n.createCommentVNode)("",!0)]),(0,n.createVNode)(c,{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"])])}]]),M={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 N;case"mobile-grid":return V;
2case"desktop":return $}}))}}},q=(0,m.Z)(M,[["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-NewsContentDirect-vue.967f74a3.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.