1import{r as y,a6 as _,j as P,w as h}from"../index-Cd7uS7_0.js";import{u as H,a as T,b as $,c as D,i as k,d as L,e as A,f as M,I as Q,g as U,h as B,T as w,j as F,k as G,l as K,m as q,n as N,o as V,p as z}from"./AlgoliaSearchWrapper-JnDP5Q82.js";function J(e){var t=H(),n=T(),r=n?.initialResults,s=$(),a=D(e),c=y.useMemo(function(){return k(a)},[a]),g=c.getHelper(),b=L();return A(function(){b()},[g,b]),M({widget:c,parentIndex:s,props:a,shouldSsr:!!(t||r),skipSuspense:!0}),c}var X=["children"];function Y(e,t){if(e==null)return{};var n=Z(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,a;for(a=0;a<r.length;a++)s=r[a],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function ue(e){var t=e.children,n=Y(e,X),r=J(n);return r.getHelper()===null?null:_.createElement(Q.Provider,{value:r},t)}function S(e){"@babel/helpers - typeof";return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(e)}function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(r){E(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function E(e,t,n){return t=ee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e){var t=te(e,"string");return S(t)=="symbol"?t:String(t)}function te(e,t){if(S(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(S(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var re=U({name:"hits",connector:!0});const ne=(function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:V;return B(t,re()),function(r){var s=r||{},a=s.escapeHTML,c=a===void 0?!0:a,g=s.transformItems,b=g===void 0?function(l){return l}:g,m,d;return{$$type:"ais.hits",init:function(i){t(f(f({},this.getWidgetRenderState(i)),{},{instantSearchInstance:i.instantSearchInstance}),!0)},render:function(i){var o=this.getWidgetRenderState(i);t(f(f({},o),{},{instantSearchInstance:i.instantSearchInstance}),!1),o.sendEvent("view:internal",o.items)},getRenderState:function(i,o){return f(f({},i),{},{hits:this.getWidgetRenderState(o)})},getWidgetRenderState:function(i){var o,p,v,u=i.results,I=i.helper,O=i.instantSearchInstance;if(m||(m=F({instantSearchInstance:O,helper:I,widgetType:this.$$type})),d||(d=G({helper:I,widgetType:this.$$type,instantSearchInstance:O})),!u)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:m,bindEvent:d,widgetParams:r};c&&u.hits.length>0&&(u.hits=K(u.hits));var R=q(u.hits,u.page,u.hitsPerPage),C=N(R,u.queryID),j=b(C,{results:u}),W=(o=u.renderingContent)===null||o===void 0||(p=o.widgets)===null||p===void 0||(v=p.banners)===null||v===void 0?void 0:v[0];return{hits:j,items:j,results:u,banner:W,sendEvent:m,bindEvent:d,widgetParams:r}},dispose:function(i){var o=i.state;return n(),c?o.setQueryParameters(Object.keys(w).reduce(function(p,v){return f(f({},p),{},E({},v,void 0))},{})):o},getWidgetSearchParameters:function(i,o){return c?i.setQueryParameters(w):i}}}});function se(e,t){return z(ne,e,t)}const ie=({title:e,showDetails:t,WrappedComponent:n,shouldTrackAlgoliaAnalytics:r=!1,skeletonSlot:s,isLoading:a,isIdle:c,...g})=>{const[b,m]=y.useState(!0),[d,l]=y.useState(!1),i=y.useCallback(p=>p?.map(v=>({...v,shouldTrackAlgoliaAnalytics:r})),[r]),{items:o}=se({transformItems:i});return y.useEffect(()=>{a&&l(!0),c&&d&&m(!1)},[a,c,d]),n?b&&s?s:(window.prerenderReady=!0,P.jsx(y.Suspense,{fallback:P.jsx("span",{}
1),children:P.jsx(n,{showDetails:t,items:o,title:e,...g})})):null};ie.propTypes={title:h.string,showDetails:h.bool,WrappedComponent:h.elementType,shouldTrackAlgoliaAnalytics:h.bool,skeletonSlot:h.node,isLoading:h.bool,isIdle:h.bool};export{ue as I,ie as S};
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.