Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bentoproject/list

Package Overview
Dependencies
Maintainers
3
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bentoproject/list - npm Package Compare versions

Comparing version 1.2204121632.0 to 1.2204122000.0

2

dist/component-preact.js
;
var r=Object.create,e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(r){return e(r,"__esModule",{value:!0})},a=function(a){return function(r,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),f=0,l=c.length;f<l;f++)a=c[f],u.call(r,a)||"default"===a||e(r,a,{get:function(r){return o[r]}.bind(null,a),enumerable:!(i=n(o,a))||i.enumerable});return r}(i(e(null!=a?r(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function f(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function l(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){c(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function s(r){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function v(r,e,n,t,o,u,i){try{var a=r[u](i),c=a.value}catch(r){return void n(r)}a.done?e(c):Promise.resolve(c).then(t,o)}function d(r){return function(){var e=this,n=arguments;return new Promise((function(t,o){var u=r.apply(e,n);function i(r){v(u,t,o,i,a,"next",r)}function a(r){v(u,t,o,i,a,"throw",r)}i(void 0)}))}}!function(r,n){for(var t in i(r),n)e(r,t,{get:n[t],enumerable:!0})}(exports,{BentoList:function(){return K},BentoListWithRef:function(){return H}});var b=a(require("./@bentoproject/core")),p=a(require("./@bentoproject/core")),m=a(require("./@bentoproject/core")),y=a(require("./@bentoproject/core"));function g(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function h(r,e){if(r){if("string"==typeof r)return g(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(r,e):void 0}}function j(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,u=[],i=!0,a=!1;try{for(n=n.call(r);!(i=(t=n.next()).done)&&(u.push(t.value),!e||u.length!==e);i=!0);}catch(r){a=!0,o=r}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return u}}(r,e)||h(r,e)||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.")}()}Array.isArray;var w=Object.prototype;function O(r){return(r.ownerDocument||r).defaultView}function M(r){return r.parent&&r.parent!=r}function S(r,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=n.needsRootBounds,o=n.rootMargin,u=n.threshold,i=M(e)&&(t||o)?e.document:void 0;return new e.IntersectionObserver(r,{threshold:u,root:i,rootMargin:o})}w.hasOwnProperty,w.toString;var k=new WeakMap,x=new WeakMap;function A(r){for(var e=new Set,n=r.length-1;n>=0;n--){var t=r[n],o=t.target;if(!e.has(o)){e.add(o);var u=x.get(o);if(u)for(var i=0;i<u.length;i++)(0,u[i])(t)}}}var q=a(require("./@bentoproject/core")),P=a(require("./@bentoproject/core"));function I(r){return function(r){if(Array.isArray(r))return g(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||h(r)||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.")}()}var R=a(require("./@bentoproject/core")),L=a(require("./@bentoproject/core")),T=a(require("./@bentoproject/core")),B={loading:!1,error:null,pages:[],hasMore:!0},C={fetchJson:function(r,e){return this.fetch(r,e).then((function(r){return r.json()}))},fetch:function(r,e){return d(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,self.fetch(r,e);case 2:if((t=n.sent).ok){n.next=5;break}throw new Error(t.statusText);case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),n)})))()}},E={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},W=("url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><defs><linearGradient id="grad"><stop stop-color="rgb(51,51,51)" stop-opacity=".75"></stop><stop offset="100%" stop-color="rgb(51,51,51)" stop-opacity="0"></stop></linearGradient></defs><path d="M11,4.4 A18,18, 0,1,0, 38,20" fill="none" stroke="url(%23grad)" stroke-width="1.725"></path></svg>',"')"),"url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path></svg>',"')"),["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"]),G=function(r){return b.createElement("div",null,String(r))},J=function(r){return b.createElement("div",null,r)},N=function(r,e){return b.createElement("div",null,"Unable to Load More ",b.createElement("button",{"load-more-retry":!0},b.createElement("label",null,b.createElement("span",{class:r.loadMoreIcon})," Retry")))},U=function(){return b.createElement("div",null,b.createElement("button",{"load-more-button":!0},b.createElement("label",null,"See More")))},_=function(r){return b.createElement("div",null,b.createElement("span",{"aria-label":"Loading",class:r.loadMoreSpinner}))};function z(r,e){return e.split(".").reduce((function(r,e){return r&&""!==e?r[e]:r}),r)}function H(r,e){var n,t=r.src,o=void 0===t?null:t,u=r.fetchJson,i=void 0===u?C.fetchJson:u,a=r.itemsKey,c=void 0===a?"items":a,f=r.maxItems,v=void 0===f?0:f,m=r.loadMore,g=void 0===m?"none":m,h=r.loadMoreBookmark,w=void 0===h?"load-more-src":h,M=r.viewportBuffer,H=void 0===M?2:M,K=r.template,$=void 0===K?G:K,D=r.wrapperTemplate,F=void 0===D?J:D,Q=r.loadMoreTemplate,X=void 0===Q?U:Q,Y=r.loadingTemplate,Z=void 0===Y?_:Y,rr=r.errorTemplate,er=void 0===rr?N:rr,nr=function(r,e){if(null==r)return{};var n,t,o={},u=Object.keys(r);for(t=0;t<u.length;t++)n=u[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,W),tr=(0,P.useAmpContext)().renderable,or=(0,p.useMemo)((function(){var r=Math.floor(100*H);return{rootMargin:"0% 0% ".concat(r,"% 0%"),threshold:0}}),[H]),ur=(0,p.useRef)(null),ir=function(r,e){var n=j((0,q.useState)(!1),2),t=n[0],o=n[1];return(0,q.useEffect)((function(){var n=r.current;if(n)return function(r,e,n){var t=O(r);if(n){var o=S((function(r){e(r[r.length-1])}),t,n);return o.observe(r),function(){o.unobserve(r)}}var u=k.get(t);u||k.set(t,u=S(A,t));var i=x.get(r);return i||(i=[],x.set(r,i)),i.push(e),u.observe(r),function(){!function(r,e){var n,t,o,u=x.get(r);if(u&&(t=e,-1!=(o=(n=u).indexOf(t))&&(n.splice(o,1),1)&&!u.length)){var i=O(r),a=k.get(i);null==a||a.unobserve(r),x.delete(r)}}(r,e)}}(n,(function(r){o(r.isIntersecting)}),e)}),[r,e]),t}(ur,or),ar=function(r){var e=r.fetchPage,n=r.getNextPageParam,t=function(r){var e=(0,T.useRef)(!1);(0,T.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]);var n=j((0,T.useState)(r),2),t=n[0],o=n[1];return[t,(0,T.useCallback)((function(r){e.current&&o(r)}),[o])]}(B),o=j(t,2),u=o[0],i=o[1],a=(0,L.useValueRef)({fetchPage:e,getNextPageParam:n,state:u}),c=(0,R.useRef)(0),f=(0,R.useCallback)(d(regeneratorRuntime.mark((function r(){var e,n,t,o,u,f,s,v,d,b,p=arguments;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=p.length>0&&void 0!==p[0]&&p[0],n=a.current,t=n.fetchPage,o=n.getNextPageParam,u=n.state,e||!u.loading){r.next=4;break}return r.abrupt("return");case 4:return f=++c.current,i((function(r){return l(l({},r),{},{loading:!0})})),s=e?[]:u.pages,v=s.length?s[s.length-1]:void 0,r.prev=8,r.next=11,t({pageParam:v?o(v):void 0});case 11:if(d=r.sent,f===c.current){r.next=14;break}return r.abrupt("return");case 14:b=o(d),i({loading:!1,error:null,pages:[].concat(I(s),[d]),hasMore:null!=b}),r.next=23;break;case 18:if(r.prev=18,r.t0=r.catch(8),f===c.current){r.next=22;break}return r.abrupt("return");case 22:i((function(e){return l(l({},e),{},{loading:!1,error:r.t0})}));case 23:case"end":return r.stop()}}),r,null,[[8,18]])}))),[a,i]),s=(0,R.useCallback)((function(){return f(!0)}),[f]);return l(l({},u),{},{loadMore:f,reset:s})}({fetchPage:(n=d(regeneratorRuntime.mark((function r(e){var n,t,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.pageParam,t=void 0===n?o:n,tr){r.next=3;break}return r.abrupt("return",null);case 3:return r.next=5,i(t);case 5:return u=r.sent,r.abrupt("return",u);case 7:case"end":return r.stop()}}),r)}))),function(r){return n.apply(this,arguments)}),getNextPageParam:function(r){return function(r,e){return z(r,e)}(r,w)}}),cr=ar.error,fr=ar.hasMore,lr=ar.loadMore,sr=ar.loading,vr=ar.pages,dr=ar.reset;(0,p.useEffect)((function(){dr()}),[o,tr,w,dr]);var br=tr&&"auto"===g&&ir&&!sr&&fr;(0,p.useEffect)((function(){br&&lr()}),[br,lr]);var pr=(0,p.useMemo)((function(){var r=vr.flatMap((function(r){return function(r,e){if(!r)return[];var n=z(r,e);return n?(Array.isArray(n)||(n=[n]),n):[]}(r,c)}));return v>0&&r.length>v&&(r=r.slice(0,v)),r.map((function(r,e){var n=$(r);return n&&"object"===s(n)&&"string"==typeof n.__html&&(n=b.createElement("span",{dangerouslySetInnerHTML:n})),V(n,{"key":e,"role":"listitem"})}))}),[vr,c,v,$]),mr=sr,yr=0!==pr.length,gr="manual"===g&&fr&&!sr;(0,p.useImperativeHandle)(e,(function(){return{refresh:dr}}),[dr]);var hr=E;return b.createElement(y.ContainWrapper,l(l({"aria-live":"polite"},nr),{},{onClick:function(r){r.target.closest("[load-more-button], [load-more-retry]")&&lr()}}),b.createElement(p.Fragment,{"test-id":"contents"},yr&&V(F(pr),{"role":"list"}),mr&&Z(hr),gr&&X(hr),cr&&er(hr,cr),"auto"===g&&b.createElement("span",{ref:ur})))}var K=(0,m.forwardRef)(H);function V(r,e){return(0,p.isValidElement)(r)?(0,p.cloneElement)(r,l(l({},e),r.props)):r}
var r=Object.create,e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(r){return e(r,"__esModule",{value:!0})},a=function(a){return function(r,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),f=0,l=c.length;f<l;f++)a=c[f],u.call(r,a)||"default"===a||e(r,a,{get:function(r){return o[r]}.bind(null,a),enumerable:!(i=n(o,a))||i.enumerable});return r}(i(e(null!=a?r(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function f(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function l(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){c(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function s(r){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function v(r,e,n,t,o,u,i){try{var a=r[u](i),c=a.value}catch(r){return void n(r)}a.done?e(c):Promise.resolve(c).then(t,o)}function d(r){return function(){var e=this,n=arguments;return new Promise((function(t,o){var u=r.apply(e,n);function i(r){v(u,t,o,i,a,"next",r)}function a(r){v(u,t,o,i,a,"throw",r)}i(void 0)}))}}!function(r,n){for(var t in i(r),n)e(r,t,{get:n[t],enumerable:!0})}(exports,{BentoList:function(){return K},BentoListWithRef:function(){return H}});var b=a(require("@bentoproject/core")),p=a(require("@bentoproject/core")),m=a(require("@bentoproject/core")),y=a(require("@bentoproject/core"));function g(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function h(r,e){if(r){if("string"==typeof r)return g(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(r,e):void 0}}function j(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,u=[],i=!0,a=!1;try{for(n=n.call(r);!(i=(t=n.next()).done)&&(u.push(t.value),!e||u.length!==e);i=!0);}catch(r){a=!0,o=r}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return u}}(r,e)||h(r,e)||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.")}()}Array.isArray;var w=Object.prototype;function O(r){return(r.ownerDocument||r).defaultView}function M(r){return r.parent&&r.parent!=r}function S(r,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=n.needsRootBounds,o=n.rootMargin,u=n.threshold,i=M(e)&&(t||o)?e.document:void 0;return new e.IntersectionObserver(r,{threshold:u,root:i,rootMargin:o})}w.hasOwnProperty,w.toString;var k=new WeakMap,x=new WeakMap;function A(r){for(var e=new Set,n=r.length-1;n>=0;n--){var t=r[n],o=t.target;if(!e.has(o)){e.add(o);var u=x.get(o);if(u)for(var i=0;i<u.length;i++)(0,u[i])(t)}}}var q=a(require("@bentoproject/core")),P=a(require("@bentoproject/core"));function I(r){return function(r){if(Array.isArray(r))return g(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||h(r)||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.")}()}var R=a(require("@bentoproject/core")),L=a(require("@bentoproject/core")),T=a(require("@bentoproject/core")),B={loading:!1,error:null,pages:[],hasMore:!0},C={fetchJson:function(r,e){return this.fetch(r,e).then((function(r){return r.json()}))},fetch:function(r,e){return d(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,self.fetch(r,e);case 2:if((t=n.sent).ok){n.next=5;break}throw new Error(t.statusText);case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),n)})))()}},E={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},W=("url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><defs><linearGradient id="grad"><stop stop-color="rgb(51,51,51)" stop-opacity=".75"></stop><stop offset="100%" stop-color="rgb(51,51,51)" stop-opacity="0"></stop></linearGradient></defs><path d="M11,4.4 A18,18, 0,1,0, 38,20" fill="none" stroke="url(%23grad)" stroke-width="1.725"></path></svg>',"')"),"url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path></svg>',"')"),["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"]),G=function(r){return b.createElement("div",null,String(r))},J=function(r){return b.createElement("div",null,r)},N=function(r,e){return b.createElement("div",null,"Unable to Load More ",b.createElement("button",{"load-more-retry":!0},b.createElement("label",null,b.createElement("span",{class:r.loadMoreIcon})," Retry")))},U=function(){return b.createElement("div",null,b.createElement("button",{"load-more-button":!0},b.createElement("label",null,"See More")))},_=function(r){return b.createElement("div",null,b.createElement("span",{"aria-label":"Loading",class:r.loadMoreSpinner}))};function z(r,e){return e.split(".").reduce((function(r,e){return r&&""!==e?r[e]:r}),r)}function H(r,e){var n,t=r.src,o=void 0===t?null:t,u=r.fetchJson,i=void 0===u?C.fetchJson:u,a=r.itemsKey,c=void 0===a?"items":a,f=r.maxItems,v=void 0===f?0:f,m=r.loadMore,g=void 0===m?"none":m,h=r.loadMoreBookmark,w=void 0===h?"load-more-src":h,M=r.viewportBuffer,H=void 0===M?2:M,K=r.template,$=void 0===K?G:K,D=r.wrapperTemplate,F=void 0===D?J:D,Q=r.loadMoreTemplate,X=void 0===Q?U:Q,Y=r.loadingTemplate,Z=void 0===Y?_:Y,rr=r.errorTemplate,er=void 0===rr?N:rr,nr=function(r,e){if(null==r)return{};var n,t,o={},u=Object.keys(r);for(t=0;t<u.length;t++)n=u[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,W),tr=(0,P.useAmpContext)().renderable,or=(0,p.useMemo)((function(){var r=Math.floor(100*H);return{rootMargin:"0% 0% ".concat(r,"% 0%"),threshold:0}}),[H]),ur=(0,p.useRef)(null),ir=function(r,e){var n=j((0,q.useState)(!1),2),t=n[0],o=n[1];return(0,q.useEffect)((function(){var n=r.current;if(n)return function(r,e,n){var t=O(r);if(n){var o=S((function(r){e(r[r.length-1])}),t,n);return o.observe(r),function(){o.unobserve(r)}}var u=k.get(t);u||k.set(t,u=S(A,t));var i=x.get(r);return i||(i=[],x.set(r,i)),i.push(e),u.observe(r),function(){!function(r,e){var n,t,o,u=x.get(r);if(u&&(t=e,-1!=(o=(n=u).indexOf(t))&&(n.splice(o,1),1)&&!u.length)){var i=O(r),a=k.get(i);null==a||a.unobserve(r),x.delete(r)}}(r,e)}}(n,(function(r){o(r.isIntersecting)}),e)}),[r,e]),t}(ur,or),ar=function(r){var e=r.fetchPage,n=r.getNextPageParam,t=function(r){var e=(0,T.useRef)(!1);(0,T.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]);var n=j((0,T.useState)(r),2),t=n[0],o=n[1];return[t,(0,T.useCallback)((function(r){e.current&&o(r)}),[o])]}(B),o=j(t,2),u=o[0],i=o[1],a=(0,L.useValueRef)({fetchPage:e,getNextPageParam:n,state:u}),c=(0,R.useRef)(0),f=(0,R.useCallback)(d(regeneratorRuntime.mark((function r(){var e,n,t,o,u,f,s,v,d,b,p=arguments;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=p.length>0&&void 0!==p[0]&&p[0],n=a.current,t=n.fetchPage,o=n.getNextPageParam,u=n.state,e||!u.loading){r.next=4;break}return r.abrupt("return");case 4:return f=++c.current,i((function(r){return l(l({},r),{},{loading:!0})})),s=e?[]:u.pages,v=s.length?s[s.length-1]:void 0,r.prev=8,r.next=11,t({pageParam:v?o(v):void 0});case 11:if(d=r.sent,f===c.current){r.next=14;break}return r.abrupt("return");case 14:b=o(d),i({loading:!1,error:null,pages:[].concat(I(s),[d]),hasMore:null!=b}),r.next=23;break;case 18:if(r.prev=18,r.t0=r.catch(8),f===c.current){r.next=22;break}return r.abrupt("return");case 22:i((function(e){return l(l({},e),{},{loading:!1,error:r.t0})}));case 23:case"end":return r.stop()}}),r,null,[[8,18]])}))),[a,i]),s=(0,R.useCallback)((function(){return f(!0)}),[f]);return l(l({},u),{},{loadMore:f,reset:s})}({fetchPage:(n=d(regeneratorRuntime.mark((function r(e){var n,t,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.pageParam,t=void 0===n?o:n,tr){r.next=3;break}return r.abrupt("return",null);case 3:return r.next=5,i(t);case 5:return u=r.sent,r.abrupt("return",u);case 7:case"end":return r.stop()}}),r)}))),function(r){return n.apply(this,arguments)}),getNextPageParam:function(r){return function(r,e){return z(r,e)}(r,w)}}),cr=ar.error,fr=ar.hasMore,lr=ar.loadMore,sr=ar.loading,vr=ar.pages,dr=ar.reset;(0,p.useEffect)((function(){dr()}),[o,tr,w,dr]);var br=tr&&"auto"===g&&ir&&!sr&&fr;(0,p.useEffect)((function(){br&&lr()}),[br,lr]);var pr=(0,p.useMemo)((function(){var r=vr.flatMap((function(r){return function(r,e){if(!r)return[];var n=z(r,e);return n?(Array.isArray(n)||(n=[n]),n):[]}(r,c)}));return v>0&&r.length>v&&(r=r.slice(0,v)),r.map((function(r,e){var n=$(r);return n&&"object"===s(n)&&"string"==typeof n.__html&&(n=b.createElement("span",{dangerouslySetInnerHTML:n})),V(n,{"key":e,"role":"listitem"})}))}),[vr,c,v,$]),mr=sr,yr=0!==pr.length,gr="manual"===g&&fr&&!sr;(0,p.useImperativeHandle)(e,(function(){return{refresh:dr}}),[dr]);var hr=E;return b.createElement(y.ContainWrapper,l(l({"aria-live":"polite"},nr),{},{onClick:function(r){r.target.closest("[load-more-button], [load-more-retry]")&&lr()}}),b.createElement(p.Fragment,{"test-id":"contents"},yr&&V(F(pr),{"role":"list"}),mr&&Z(hr),gr&&X(hr),cr&&er(hr,cr),"auto"===g&&b.createElement("span",{ref:ur})))}var K=(0,m.forwardRef)(H);function V(r,e){return(0,p.isValidElement)(r)?(0,p.cloneElement)(r,l(l({},e),r.props)):r}
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */K.displayName="List";
//# sourceMappingURL=component-preact.js.map

@@ -41,6 +41,6 @@ var __create = Object.create;

});
var Preact = __toModule(require("./@bentoproject/core"));
var import_preact = __toModule(require("./@bentoproject/core"));
var import_compat = __toModule(require("./@bentoproject/core"));
var import_component2 = __toModule(require("./@bentoproject/core"));
var Preact = __toModule(require("@bentoproject/core"));
var import_preact = __toModule(require("@bentoproject/core"));
var import_compat = __toModule(require("@bentoproject/core"));
var import_component2 = __toModule(require("@bentoproject/core"));

@@ -154,3 +154,3 @@ // src/core/types/array.js

// src/preact/component/intersection-observer.js
var import__2 = __toModule(require("./@bentoproject/core"));
var import__2 = __toModule(require("@bentoproject/core"));
function useIsInViewport(ref, ioOptions) {

@@ -172,10 +172,10 @@ var _useState = (0, import__2.useState)(false), isInViewport = _useState[0], setIsInViewport = _useState[1];

// extensions/amp-list/1.0/component.js
var import_context = __toModule(require("./@bentoproject/core"));
var import_context = __toModule(require("@bentoproject/core"));
// src/preact/hooks/useInfiniteQuery.ts
var import__4 = __toModule(require("./@bentoproject/core"));
var import_component = __toModule(require("./@bentoproject/core"));
var import__4 = __toModule(require("@bentoproject/core"));
var import_component = __toModule(require("@bentoproject/core"));
// src/preact/hooks/useStateSafe.ts
var import__3 = __toModule(require("./@bentoproject/core"));
var import__3 = __toModule(require("@bentoproject/core"));
function useStateSafe(initialState2) {

@@ -182,0 +182,0 @@ var isMounted = (0, import__3.useRef)(false);

@@ -25,6 +25,6 @@ var __async = (__this, __arguments, generator) => {

createElement
} from "./@bentoproject/core";
import { Fragment, cloneElement, isValidElement, useEffect as useEffect3, useImperativeHandle, useMemo, useRef as useRef4 } from "./@bentoproject/core";
import { forwardRef } from "./@bentoproject/core";
import { ContainWrapper } from "./@bentoproject/core";
} from "@bentoproject/core";
import { Fragment, cloneElement, isValidElement, useEffect as useEffect3, useImperativeHandle, useMemo, useRef as useRef4 } from "@bentoproject/core";
import { forwardRef } from "@bentoproject/core";
import { ContainWrapper } from "@bentoproject/core";

@@ -141,3 +141,3 @@ // src/core/types/array.js

// src/preact/component/intersection-observer.js
import { useCallback, useEffect, useRef, useState } from "./@bentoproject/core";
import { useCallback, useEffect, useRef, useState } from "@bentoproject/core";
function useIsInViewport(ref, ioOptions) {

@@ -159,10 +159,10 @@ const [isInViewport, setIsInViewport] = useState(false);

// extensions/amp-list/1.0/component.js
import { useAmpContext } from "./@bentoproject/core";
import { useAmpContext } from "@bentoproject/core";
// src/preact/hooks/useInfiniteQuery.ts
import { useCallback as useCallback3, useRef as useRef3 } from "./@bentoproject/core";
import { useValueRef } from "./@bentoproject/core";
import { useCallback as useCallback3, useRef as useRef3 } from "@bentoproject/core";
import { useValueRef } from "@bentoproject/core";
// src/preact/hooks/useStateSafe.ts
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "./@bentoproject/core";
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "@bentoproject/core";
function useStateSafe(initialState2) {

@@ -169,0 +169,0 @@ const isMounted = useRef2(false);

;
var e=(e,t,r)=>new Promise(((o,n)=>{var a=e=>{try{l(r.next(e))}catch(e){n(e)}},c=e=>{try{l(r.throw(e))}catch(e){n(e)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,c);l((r=r.apply(e,t)).next())}));function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function o(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?r(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}import{createElement as n}from"./@bentoproject/core";import{Fragment as a,cloneElement as c,isValidElement as l,useEffect as i,useImperativeHandle as u,useMemo as s,useRef as f}from"./@bentoproject/core";import{forwardRef as m}from"./@bentoproject/core";import{ContainWrapper as p}from"./@bentoproject/core";var{hasOwnProperty:d,toString:b}=Object.prototype;function g(e){return(e.ownerDocument||e).defaultView}function h(e,t,r={}){const{needsRootBounds:o,rootMargin:n,threshold:a}=r,c=function(e){return e.parent&&e.parent!=e}(t)&&(o||n)?t.document:void 0;return new t.IntersectionObserver(e,{threshold:a,root:c,rootMargin:n})}var j=new WeakMap,v=new WeakMap;function M(e){const t=new Set;for(let r=e.length-1;r>=0;r--){const o=e[r],{target:n}=o;if(t.has(n))continue;t.add(n);const a=v.get(n);if(a)for(let e=0;e<a.length;e++)(0,a[e])(o)}}import{useCallback as y,useEffect as P,useRef as O,useState as w}from"./@bentoproject/core";import{useAmpContext as k}from"./@bentoproject/core";import{useCallback as T,useRef as x}from"./@bentoproject/core";import{useValueRef as S}from"./@bentoproject/core";import{useCallback as B,useEffect as R,useRef as I,useState as L}from"./@bentoproject/core";var N={loading:!1,error:null,pages:[],hasMore:!0},C={fetchJson(e,t){return this.fetch(e,t).then((e=>e.json()))},fetch(t,r){return e(this,null,(function*(){const e=yield self.fetch(t,r);if(!e.ok)throw new Error(e.statusText);return e}))}},E={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},J=["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"],K=e=>n("div",null,String(e)),W=e=>n("div",null,e),A=(e,t)=>n("div",null,"Unable to Load More ",n("button",{"load-more-retry":!0},n("label",null,n("span",{class:e.loadMoreIcon})," Retry"))),H=()=>n("div",null,n("button",{"load-more-button":!0},n("label",null,"See More"))),U=e=>n("div",null,n("span",{"aria-label":"Loading",class:e.loadMoreSpinner}));function $(e,t){return t.split(".").reduce(((e,t)=>e&&""!==t?e[t]:e),e)}function q(t,r){let{src:c=null,fetchJson:l=C.fetchJson,itemsKey:m="items",maxItems:d=0,loadMore:b="none",loadMoreBookmark:y="load-more-src",viewportBuffer:O=2,template:q=K,wrapperTemplate:z=W,loadMoreTemplate:F=H,loadingTemplate:G=U,errorTemplate:Q=A}=t,V=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(t,J);const{renderable:X}=k(),Y=s((()=>({rootMargin:`0% 0% ${Math.floor(100*O)}% 0%`,threshold:0})),[O]),Z=f(null),_=function(e,t){const[r,o]=w(!1);return P((()=>{const r=e.current;if(r)return function(e,t,r){const o=g(e);if(r){const n=h((e=>{t(e[e.length-1])}),o,r);return n.observe(e),()=>{n.unobserve(e)}}let n=j.get(o);n||j.set(o,n=h(M,o));let a=v.get(e);return a||(a=[],v.set(e,a)),a.push(t),n.observe(e),()=>{!function(e,t){const r=v.get(e);if(!r)return;if(!function(e,t){const r=e.indexOf(t);return-1!=r&&(e.splice(r,1),!0)}(r,t))return;if(r.length)return;const o=g(e),n=j.get(o);null==n||n.unobserve(e),v.delete(e)}(e,t)}}(r,(e=>{o(e.isIntersecting)}),t)}),[e,t]),r}(Z,Y),{error:ee,hasMore:te,loadMore:re,loading:oe,pages:ne,reset:ae}=function({fetchPage:t,getNextPageParam:r}){const[n,a]=function(e){const t=I(!1);R((()=>(t.current=!0,()=>{t.current=!1})),[]);const[r,o]=L(e);return[r,B((e=>{t.current&&o(e)}),[o])]}(N),c=S({fetchPage:t,getNextPageParam:r,state:n}),l=x(0),i=T(((t=!1)=>e(this,null,(function*(){const{fetchPage:e,getNextPageParam:r,state:n}=c.current;if(!t&&n.loading)return;const i=++l.current;a((e=>o(o({},e),{},{loading:!0})));const u=t?[]:n.pages,s=u.length?u[u.length-1]:void 0;try{const t=yield e({pageParam:s?r(s):void 0});if(i!==l.current)return;const o=r(t);a({loading:!1,error:null,pages:[...u,t],hasMore:null!=o})}catch(e){if(i!==l.current)return;a((t=>o(o({},t),{},{loading:!1,error:e})))}}))),[c,a]),u=T((()=>i(!0)),[i]);return o(o({},n),{},{loadMore:i,reset:u})}({fetchPage:t=>e(this,[t],(function*({pageParam:e=c}){return X?yield l(e):null})),getNextPageParam:e=>function(e,t){return $(e,t)}(e,y)});i((()=>{ae()}),[c,X,y,ae]);const ce=X&&"auto"===b&&_&&!oe&&te;i((()=>{ce&&re()}),[ce,re]);const le=s((()=>{let e=ne.flatMap((e=>function(e,t){if(!e)return[];let r=$(e,t);return r?(Array.isArray(r)||(r=[r]),r):[]}(e,m)));return d>0&&e.length>d&&(e=e.slice(0,d)),e.map(((e,t)=>{let r=q(e);return r&&"object"==typeof r&&"string"==typeof r.__html&&(r=n("span",{dangerouslySetInnerHTML:r})),D(r,{"key":t,"role":"listitem"})}))}),[ne,m,d,q]),ie=oe,ue=0!==le.length,se="manual"===b&&te&&!oe;u(r,(()=>({refresh:ae})),[ae]);const fe=E;return n(p,o(o({"aria-live":"polite"},V),{},{onClick:e=>{e.target.closest("[load-more-button], [load-more-retry]")&&re()}}),n(a,{"test-id":"contents"},ue&&D(z(le),{"role":"list"}),ie&&G(fe),se&&F(fe),ee&&Q(fe,ee),"auto"===b&&n("span",{ref:Z})))}var z=m(q);function D(e,t){return l(e)?c(e,o(o({},t),e.props)):e}z.displayName="List";export{z as BentoList,q as BentoListWithRef};
var e=(e,t,r)=>new Promise(((o,n)=>{var a=e=>{try{l(r.next(e))}catch(e){n(e)}},c=e=>{try{l(r.throw(e))}catch(e){n(e)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,c);l((r=r.apply(e,t)).next())}));function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function o(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?r(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}import{createElement as n}from"@bentoproject/core";import{Fragment as a,cloneElement as c,isValidElement as l,useEffect as i,useImperativeHandle as u,useMemo as s,useRef as f}from"@bentoproject/core";import{forwardRef as m}from"@bentoproject/core";import{ContainWrapper as p}from"@bentoproject/core";var{hasOwnProperty:d,toString:b}=Object.prototype;function g(e){return(e.ownerDocument||e).defaultView}function h(e,t,r={}){const{needsRootBounds:o,rootMargin:n,threshold:a}=r,c=function(e){return e.parent&&e.parent!=e}(t)&&(o||n)?t.document:void 0;return new t.IntersectionObserver(e,{threshold:a,root:c,rootMargin:n})}var j=new WeakMap,v=new WeakMap;function M(e){const t=new Set;for(let r=e.length-1;r>=0;r--){const o=e[r],{target:n}=o;if(t.has(n))continue;t.add(n);const a=v.get(n);if(a)for(let e=0;e<a.length;e++)(0,a[e])(o)}}import{useCallback as y,useEffect as P,useRef as O,useState as w}from"@bentoproject/core";import{useAmpContext as k}from"@bentoproject/core";import{useCallback as T,useRef as x}from"@bentoproject/core";import{useValueRef as S}from"@bentoproject/core";import{useCallback as B,useEffect as R,useRef as I,useState as L}from"@bentoproject/core";var N={loading:!1,error:null,pages:[],hasMore:!0},C={fetchJson(e,t){return this.fetch(e,t).then((e=>e.json()))},fetch(t,r){return e(this,null,(function*(){const e=yield self.fetch(t,r);if(!e.ok)throw new Error(e.statusText);return e}))}},E={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},J=["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"],K=e=>n("div",null,String(e)),W=e=>n("div",null,e),A=(e,t)=>n("div",null,"Unable to Load More ",n("button",{"load-more-retry":!0},n("label",null,n("span",{class:e.loadMoreIcon})," Retry"))),H=()=>n("div",null,n("button",{"load-more-button":!0},n("label",null,"See More"))),U=e=>n("div",null,n("span",{"aria-label":"Loading",class:e.loadMoreSpinner}));function $(e,t){return t.split(".").reduce(((e,t)=>e&&""!==t?e[t]:e),e)}function q(t,r){let{src:c=null,fetchJson:l=C.fetchJson,itemsKey:m="items",maxItems:d=0,loadMore:b="none",loadMoreBookmark:y="load-more-src",viewportBuffer:O=2,template:q=K,wrapperTemplate:z=W,loadMoreTemplate:F=H,loadingTemplate:G=U,errorTemplate:Q=A}=t,V=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(t,J);const{renderable:X}=k(),Y=s((()=>({rootMargin:`0% 0% ${Math.floor(100*O)}% 0%`,threshold:0})),[O]),Z=f(null),_=function(e,t){const[r,o]=w(!1);return P((()=>{const r=e.current;if(r)return function(e,t,r){const o=g(e);if(r){const n=h((e=>{t(e[e.length-1])}),o,r);return n.observe(e),()=>{n.unobserve(e)}}let n=j.get(o);n||j.set(o,n=h(M,o));let a=v.get(e);return a||(a=[],v.set(e,a)),a.push(t),n.observe(e),()=>{!function(e,t){const r=v.get(e);if(!r)return;if(!function(e,t){const r=e.indexOf(t);return-1!=r&&(e.splice(r,1),!0)}(r,t))return;if(r.length)return;const o=g(e),n=j.get(o);null==n||n.unobserve(e),v.delete(e)}(e,t)}}(r,(e=>{o(e.isIntersecting)}),t)}),[e,t]),r}(Z,Y),{error:ee,hasMore:te,loadMore:re,loading:oe,pages:ne,reset:ae}=function({fetchPage:t,getNextPageParam:r}){const[n,a]=function(e){const t=I(!1);R((()=>(t.current=!0,()=>{t.current=!1})),[]);const[r,o]=L(e);return[r,B((e=>{t.current&&o(e)}),[o])]}(N),c=S({fetchPage:t,getNextPageParam:r,state:n}),l=x(0),i=T(((t=!1)=>e(this,null,(function*(){const{fetchPage:e,getNextPageParam:r,state:n}=c.current;if(!t&&n.loading)return;const i=++l.current;a((e=>o(o({},e),{},{loading:!0})));const u=t?[]:n.pages,s=u.length?u[u.length-1]:void 0;try{const t=yield e({pageParam:s?r(s):void 0});if(i!==l.current)return;const o=r(t);a({loading:!1,error:null,pages:[...u,t],hasMore:null!=o})}catch(e){if(i!==l.current)return;a((t=>o(o({},t),{},{loading:!1,error:e})))}}))),[c,a]),u=T((()=>i(!0)),[i]);return o(o({},n),{},{loadMore:i,reset:u})}({fetchPage:t=>e(this,[t],(function*({pageParam:e=c}){return X?yield l(e):null})),getNextPageParam:e=>function(e,t){return $(e,t)}(e,y)});i((()=>{ae()}),[c,X,y,ae]);const ce=X&&"auto"===b&&_&&!oe&&te;i((()=>{ce&&re()}),[ce,re]);const le=s((()=>{let e=ne.flatMap((e=>function(e,t){if(!e)return[];let r=$(e,t);return r?(Array.isArray(r)||(r=[r]),r):[]}(e,m)));return d>0&&e.length>d&&(e=e.slice(0,d)),e.map(((e,t)=>{let r=q(e);return r&&"object"==typeof r&&"string"==typeof r.__html&&(r=n("span",{dangerouslySetInnerHTML:r})),D(r,{"key":t,"role":"listitem"})}))}),[ne,m,d,q]),ie=oe,ue=0!==le.length,se="manual"===b&&te&&!oe;u(r,(()=>({refresh:ae})),[ae]);const fe=E;return n(p,o(o({"aria-live":"polite"},V),{},{onClick:e=>{e.target.closest("[load-more-button], [load-more-retry]")&&re()}}),n(a,{"test-id":"contents"},ue&&D(z(le),{"role":"list"}),ie&&G(fe),se&&F(fe),ee&&Q(fe,ee),"auto"===b&&n("span",{ref:Z})))}var z=m(q);function D(e,t){return l(e)?c(e,o(o({},t),e.props)):e}z.displayName="List";export{z as BentoList,q as BentoListWithRef};
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
//# sourceMappingURL=component-preact.module.js.map
;
var r=Object.create,e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(r){return e(r,"__esModule",{value:!0})},a=function(a){return function(r,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),f=0,l=c.length;f<l;f++)a=c[f],u.call(r,a)||"default"===a||e(r,a,{get:function(r){return o[r]}.bind(null,a),enumerable:!(i=n(o,a))||i.enumerable});return r}(i(e(null!=a?r(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function f(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function l(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){c(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function s(r){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function v(r,e,n,t,o,u,i){try{var a=r[u](i),c=a.value}catch(r){return void n(r)}a.done?e(c):Promise.resolve(c).then(t,o)}function d(r){return function(){var e=this,n=arguments;return new Promise((function(t,o){var u=r.apply(e,n);function i(r){v(u,t,o,i,a,"next",r)}function a(r){v(u,t,o,i,a,"throw",r)}i(void 0)}))}}!function(r,n){for(var t in i(r),n)e(r,t,{get:n[t],enumerable:!0})}(exports,{BentoList:function(){return K},BentoListWithRef:function(){return H}});var b=a(require("./@bentoproject/core")),m=a(require("./@bentoproject/core")),p=a(require("react")),y=a(require("./@bentoproject/core"));function g(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function h(r,e){if(r){if("string"==typeof r)return g(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(r,e):void 0}}function j(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,u=[],i=!0,a=!1;try{for(n=n.call(r);!(i=(t=n.next()).done)&&(u.push(t.value),!e||u.length!==e);i=!0);}catch(r){a=!0,o=r}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return u}}(r,e)||h(r,e)||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.")}()}Array.isArray;var w=Object.prototype;function O(r){return(r.ownerDocument||r).defaultView}function M(r){return r.parent&&r.parent!=r}function S(r,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=n.needsRootBounds,o=n.rootMargin,u=n.threshold,i=M(e)&&(t||o)?e.document:void 0;return new e.IntersectionObserver(r,{threshold:u,root:i,rootMargin:o})}w.hasOwnProperty,w.toString;var k=new WeakMap,x=new WeakMap;function A(r){for(var e=new Set,n=r.length-1;n>=0;n--){var t=r[n],o=t.target;if(!e.has(o)){e.add(o);var u=x.get(o);if(u)for(var i=0;i<u.length;i++)(0,u[i])(t)}}}var q=a(require("./@bentoproject/core")),P=a(require("./@bentoproject/core"));function I(r){return function(r){if(Array.isArray(r))return g(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||h(r)||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.")}()}var R=a(require("./@bentoproject/core")),L=a(require("./@bentoproject/core")),T=a(require("./@bentoproject/core")),B={loading:!1,error:null,pages:[],hasMore:!0},C={fetchJson:function(r,e){return this.fetch(r,e).then((function(r){return r.json()}))},fetch:function(r,e){return d(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,self.fetch(r,e);case 2:if((t=n.sent).ok){n.next=5;break}throw new Error(t.statusText);case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),n)})))()}},N={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},E=("url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><defs><linearGradient id="grad"><stop stop-color="rgb(51,51,51)" stop-opacity=".75"></stop><stop offset="100%" stop-color="rgb(51,51,51)" stop-opacity="0"></stop></linearGradient></defs><path d="M11,4.4 A18,18, 0,1,0, 38,20" fill="none" stroke="url(%23grad)" stroke-width="1.725"></path></svg>',"')"),"url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path></svg>',"')"),["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"]),W=function(r){return b.createElement("div",null,String(r))},G=function(r){return b.createElement("div",null,r)},J=function(r,e){return b.createElement("div",null,"Unable to Load More ",b.createElement("button",{"load-more-retry":!0},b.createElement("label",null,b.createElement("span",{className:r.loadMoreIcon})," Retry")))},U=function(){return b.createElement("div",null,b.createElement("button",{"load-more-button":!0},b.createElement("label",null,"See More")))},_=function(r){return b.createElement("div",null,b.createElement("span",{"aria-label":"Loading",className:r.loadMoreSpinner}))};function z(r,e){return e.split(".").reduce((function(r,e){return r&&""!==e?r[e]:r}),r)}function H(r,e){var n,t=r.src,o=void 0===t?null:t,u=r.fetchJson,i=void 0===u?C.fetchJson:u,a=r.itemsKey,c=void 0===a?"items":a,f=r.maxItems,v=void 0===f?0:f,p=r.loadMore,g=void 0===p?"none":p,h=r.loadMoreBookmark,w=void 0===h?"load-more-src":h,M=r.viewportBuffer,H=void 0===M?2:M,K=r.template,$=void 0===K?W:K,D=r.wrapperTemplate,F=void 0===D?G:D,Q=r.loadMoreTemplate,X=void 0===Q?U:Q,Y=r.loadingTemplate,Z=void 0===Y?_:Y,rr=r.errorTemplate,er=void 0===rr?J:rr,nr=function(r,e){if(null==r)return{};var n,t,o={},u=Object.keys(r);for(t=0;t<u.length;t++)n=u[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,E),tr=(0,P.useAmpContext)().renderable,or=(0,m.useMemo)((function(){var r=Math.floor(100*H);return{rootMargin:"0% 0% ".concat(r,"% 0%"),threshold:0}}),[H]),ur=(0,m.useRef)(null),ir=function(r,e){var n=j((0,q.useState)(!1),2),t=n[0],o=n[1];return(0,q.useEffect)((function(){var n=r.current;if(n)return function(r,e,n){var t=O(r);if(n){var o=S((function(r){e(r[r.length-1])}),t,n);return o.observe(r),function(){o.unobserve(r)}}var u=k.get(t);u||k.set(t,u=S(A,t));var i=x.get(r);return i||(i=[],x.set(r,i)),i.push(e),u.observe(r),function(){!function(r,e){var n,t,o,u=x.get(r);if(u&&(t=e,-1!=(o=(n=u).indexOf(t))&&(n.splice(o,1),1)&&!u.length)){var i=O(r),a=k.get(i);null==a||a.unobserve(r),x.delete(r)}}(r,e)}}(n,(function(r){o(r.isIntersecting)}),e)}),[r,e]),t}(ur,or),ar=function(r){var e=r.fetchPage,n=r.getNextPageParam,t=function(r){var e=(0,T.useRef)(!1);(0,T.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]);var n=j((0,T.useState)(r),2),t=n[0],o=n[1];return[t,(0,T.useCallback)((function(r){e.current&&o(r)}),[o])]}(B),o=j(t,2),u=o[0],i=o[1],a=(0,L.useValueRef)({fetchPage:e,getNextPageParam:n,state:u}),c=(0,R.useRef)(0),f=(0,R.useCallback)(d(regeneratorRuntime.mark((function r(){var e,n,t,o,u,f,s,v,d,b,m=arguments;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=m.length>0&&void 0!==m[0]&&m[0],n=a.current,t=n.fetchPage,o=n.getNextPageParam,u=n.state,e||!u.loading){r.next=4;break}return r.abrupt("return");case 4:return f=++c.current,i((function(r){return l(l({},r),{},{loading:!0})})),s=e?[]:u.pages,v=s.length?s[s.length-1]:void 0,r.prev=8,r.next=11,t({pageParam:v?o(v):void 0});case 11:if(d=r.sent,f===c.current){r.next=14;break}return r.abrupt("return");case 14:b=o(d),i({loading:!1,error:null,pages:[].concat(I(s),[d]),hasMore:null!=b}),r.next=23;break;case 18:if(r.prev=18,r.t0=r.catch(8),f===c.current){r.next=22;break}return r.abrupt("return");case 22:i((function(e){return l(l({},e),{},{loading:!1,error:r.t0})}));case 23:case"end":return r.stop()}}),r,null,[[8,18]])}))),[a,i]),s=(0,R.useCallback)((function(){return f(!0)}),[f]);return l(l({},u),{},{loadMore:f,reset:s})}({fetchPage:(n=d(regeneratorRuntime.mark((function r(e){var n,t,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.pageParam,t=void 0===n?o:n,tr){r.next=3;break}return r.abrupt("return",null);case 3:return r.next=5,i(t);case 5:return u=r.sent,r.abrupt("return",u);case 7:case"end":return r.stop()}}),r)}))),function(r){return n.apply(this,arguments)}),getNextPageParam:function(r){return function(r,e){return z(r,e)}(r,w)}}),cr=ar.error,fr=ar.hasMore,lr=ar.loadMore,sr=ar.loading,vr=ar.pages,dr=ar.reset;(0,m.useEffect)((function(){dr()}),[o,tr,w,dr]);var br=tr&&"auto"===g&&ir&&!sr&&fr;(0,m.useEffect)((function(){br&&lr()}),[br,lr]);var mr=(0,m.useMemo)((function(){var r=vr.flatMap((function(r){return function(r,e){if(!r)return[];var n=z(r,e);return n?(Array.isArray(n)||(n=[n]),n):[]}(r,c)}));return v>0&&r.length>v&&(r=r.slice(0,v)),r.map((function(r,e){var n=$(r);return n&&"object"===s(n)&&"string"==typeof n.__html&&(n=b.createElement("span",{dangerouslySetInnerHTML:n})),V(n,{"key":e,"role":"listitem"})}))}),[vr,c,v,$]),pr=sr,yr=0!==mr.length,gr="manual"===g&&fr&&!sr;(0,m.useImperativeHandle)(e,(function(){return{refresh:dr}}),[dr]);var hr=N;return b.createElement(y.ContainWrapper,l(l({"aria-live":"polite"},nr),{},{onClick:function(r){r.target.closest("[load-more-button], [load-more-retry]")&&lr()}}),b.createElement(m.Fragment,{"test-id":"contents"},yr&&V(F(mr),{"role":"list"}),pr&&Z(hr),gr&&X(hr),cr&&er(hr,cr),"auto"===g&&b.createElement("span",{ref:ur})))}var K=(0,p.forwardRef)(H);function V(r,e){return(0,m.isValidElement)(r)?(0,m.cloneElement)(r,l(l({},e),r.props)):r}
var r=Object.create,e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(r){return e(r,"__esModule",{value:!0})},a=function(a){return function(r,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),f=0,l=c.length;f<l;f++)a=c[f],u.call(r,a)||"default"===a||e(r,a,{get:function(r){return o[r]}.bind(null,a),enumerable:!(i=n(o,a))||i.enumerable});return r}(i(e(null!=a?r(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function f(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function l(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){c(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function s(r){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function v(r,e,n,t,o,u,i){try{var a=r[u](i),c=a.value}catch(r){return void n(r)}a.done?e(c):Promise.resolve(c).then(t,o)}function d(r){return function(){var e=this,n=arguments;return new Promise((function(t,o){var u=r.apply(e,n);function i(r){v(u,t,o,i,a,"next",r)}function a(r){v(u,t,o,i,a,"throw",r)}i(void 0)}))}}!function(r,n){for(var t in i(r),n)e(r,t,{get:n[t],enumerable:!0})}(exports,{BentoList:function(){return K},BentoListWithRef:function(){return H}});var b=a(require("@bentoproject/core")),m=a(require("@bentoproject/core")),p=a(require("react")),y=a(require("@bentoproject/core"));function g(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function h(r,e){if(r){if("string"==typeof r)return g(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(r,e):void 0}}function j(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,u=[],i=!0,a=!1;try{for(n=n.call(r);!(i=(t=n.next()).done)&&(u.push(t.value),!e||u.length!==e);i=!0);}catch(r){a=!0,o=r}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return u}}(r,e)||h(r,e)||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.")}()}Array.isArray;var w=Object.prototype;function O(r){return(r.ownerDocument||r).defaultView}function M(r){return r.parent&&r.parent!=r}function S(r,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=n.needsRootBounds,o=n.rootMargin,u=n.threshold,i=M(e)&&(t||o)?e.document:void 0;return new e.IntersectionObserver(r,{threshold:u,root:i,rootMargin:o})}w.hasOwnProperty,w.toString;var k=new WeakMap,x=new WeakMap;function A(r){for(var e=new Set,n=r.length-1;n>=0;n--){var t=r[n],o=t.target;if(!e.has(o)){e.add(o);var u=x.get(o);if(u)for(var i=0;i<u.length;i++)(0,u[i])(t)}}}var q=a(require("@bentoproject/core")),P=a(require("@bentoproject/core"));function I(r){return function(r){if(Array.isArray(r))return g(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||h(r)||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.")}()}var R=a(require("@bentoproject/core")),L=a(require("@bentoproject/core")),T=a(require("@bentoproject/core")),B={loading:!1,error:null,pages:[],hasMore:!0},C={fetchJson:function(r,e){return this.fetch(r,e).then((function(r){return r.json()}))},fetch:function(r,e){return d(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,self.fetch(r,e);case 2:if((t=n.sent).ok){n.next=5;break}throw new Error(t.statusText);case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),n)})))()}},N={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},E=("url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><defs><linearGradient id="grad"><stop stop-color="rgb(51,51,51)" stop-opacity=".75"></stop><stop offset="100%" stop-color="rgb(51,51,51)" stop-opacity="0"></stop></linearGradient></defs><path d="M11,4.4 A18,18, 0,1,0, 38,20" fill="none" stroke="url(%23grad)" stroke-width="1.725"></path></svg>',"')"),"url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path></svg>',"')"),["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"]),W=function(r){return b.createElement("div",null,String(r))},G=function(r){return b.createElement("div",null,r)},J=function(r,e){return b.createElement("div",null,"Unable to Load More ",b.createElement("button",{"load-more-retry":!0},b.createElement("label",null,b.createElement("span",{className:r.loadMoreIcon})," Retry")))},U=function(){return b.createElement("div",null,b.createElement("button",{"load-more-button":!0},b.createElement("label",null,"See More")))},_=function(r){return b.createElement("div",null,b.createElement("span",{"aria-label":"Loading",className:r.loadMoreSpinner}))};function z(r,e){return e.split(".").reduce((function(r,e){return r&&""!==e?r[e]:r}),r)}function H(r,e){var n,t=r.src,o=void 0===t?null:t,u=r.fetchJson,i=void 0===u?C.fetchJson:u,a=r.itemsKey,c=void 0===a?"items":a,f=r.maxItems,v=void 0===f?0:f,p=r.loadMore,g=void 0===p?"none":p,h=r.loadMoreBookmark,w=void 0===h?"load-more-src":h,M=r.viewportBuffer,H=void 0===M?2:M,K=r.template,$=void 0===K?W:K,D=r.wrapperTemplate,F=void 0===D?G:D,Q=r.loadMoreTemplate,X=void 0===Q?U:Q,Y=r.loadingTemplate,Z=void 0===Y?_:Y,rr=r.errorTemplate,er=void 0===rr?J:rr,nr=function(r,e){if(null==r)return{};var n,t,o={},u=Object.keys(r);for(t=0;t<u.length;t++)n=u[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,E),tr=(0,P.useAmpContext)().renderable,or=(0,m.useMemo)((function(){var r=Math.floor(100*H);return{rootMargin:"0% 0% ".concat(r,"% 0%"),threshold:0}}),[H]),ur=(0,m.useRef)(null),ir=function(r,e){var n=j((0,q.useState)(!1),2),t=n[0],o=n[1];return(0,q.useEffect)((function(){var n=r.current;if(n)return function(r,e,n){var t=O(r);if(n){var o=S((function(r){e(r[r.length-1])}),t,n);return o.observe(r),function(){o.unobserve(r)}}var u=k.get(t);u||k.set(t,u=S(A,t));var i=x.get(r);return i||(i=[],x.set(r,i)),i.push(e),u.observe(r),function(){!function(r,e){var n,t,o,u=x.get(r);if(u&&(t=e,-1!=(o=(n=u).indexOf(t))&&(n.splice(o,1),1)&&!u.length)){var i=O(r),a=k.get(i);null==a||a.unobserve(r),x.delete(r)}}(r,e)}}(n,(function(r){o(r.isIntersecting)}),e)}),[r,e]),t}(ur,or),ar=function(r){var e=r.fetchPage,n=r.getNextPageParam,t=function(r){var e=(0,T.useRef)(!1);(0,T.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]);var n=j((0,T.useState)(r),2),t=n[0],o=n[1];return[t,(0,T.useCallback)((function(r){e.current&&o(r)}),[o])]}(B),o=j(t,2),u=o[0],i=o[1],a=(0,L.useValueRef)({fetchPage:e,getNextPageParam:n,state:u}),c=(0,R.useRef)(0),f=(0,R.useCallback)(d(regeneratorRuntime.mark((function r(){var e,n,t,o,u,f,s,v,d,b,m=arguments;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=m.length>0&&void 0!==m[0]&&m[0],n=a.current,t=n.fetchPage,o=n.getNextPageParam,u=n.state,e||!u.loading){r.next=4;break}return r.abrupt("return");case 4:return f=++c.current,i((function(r){return l(l({},r),{},{loading:!0})})),s=e?[]:u.pages,v=s.length?s[s.length-1]:void 0,r.prev=8,r.next=11,t({pageParam:v?o(v):void 0});case 11:if(d=r.sent,f===c.current){r.next=14;break}return r.abrupt("return");case 14:b=o(d),i({loading:!1,error:null,pages:[].concat(I(s),[d]),hasMore:null!=b}),r.next=23;break;case 18:if(r.prev=18,r.t0=r.catch(8),f===c.current){r.next=22;break}return r.abrupt("return");case 22:i((function(e){return l(l({},e),{},{loading:!1,error:r.t0})}));case 23:case"end":return r.stop()}}),r,null,[[8,18]])}))),[a,i]),s=(0,R.useCallback)((function(){return f(!0)}),[f]);return l(l({},u),{},{loadMore:f,reset:s})}({fetchPage:(n=d(regeneratorRuntime.mark((function r(e){var n,t,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.pageParam,t=void 0===n?o:n,tr){r.next=3;break}return r.abrupt("return",null);case 3:return r.next=5,i(t);case 5:return u=r.sent,r.abrupt("return",u);case 7:case"end":return r.stop()}}),r)}))),function(r){return n.apply(this,arguments)}),getNextPageParam:function(r){return function(r,e){return z(r,e)}(r,w)}}),cr=ar.error,fr=ar.hasMore,lr=ar.loadMore,sr=ar.loading,vr=ar.pages,dr=ar.reset;(0,m.useEffect)((function(){dr()}),[o,tr,w,dr]);var br=tr&&"auto"===g&&ir&&!sr&&fr;(0,m.useEffect)((function(){br&&lr()}),[br,lr]);var mr=(0,m.useMemo)((function(){var r=vr.flatMap((function(r){return function(r,e){if(!r)return[];var n=z(r,e);return n?(Array.isArray(n)||(n=[n]),n):[]}(r,c)}));return v>0&&r.length>v&&(r=r.slice(0,v)),r.map((function(r,e){var n=$(r);return n&&"object"===s(n)&&"string"==typeof n.__html&&(n=b.createElement("span",{dangerouslySetInnerHTML:n})),V(n,{"key":e,"role":"listitem"})}))}),[vr,c,v,$]),pr=sr,yr=0!==mr.length,gr="manual"===g&&fr&&!sr;(0,m.useImperativeHandle)(e,(function(){return{refresh:dr}}),[dr]);var hr=N;return b.createElement(y.ContainWrapper,l(l({"aria-live":"polite"},nr),{},{onClick:function(r){r.target.closest("[load-more-button], [load-more-retry]")&&lr()}}),b.createElement(m.Fragment,{"test-id":"contents"},yr&&V(F(mr),{"role":"list"}),pr&&Z(hr),gr&&X(hr),cr&&er(hr,cr),"auto"===g&&b.createElement("span",{ref:ur})))}var K=(0,p.forwardRef)(H);function V(r,e){return(0,m.isValidElement)(r)?(0,m.cloneElement)(r,l(l({},e),r.props)):r}
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */K.displayName="List";
//# sourceMappingURL=component-react.js.map

@@ -41,6 +41,6 @@ var __create = Object.create;

});
var Preact = __toModule(require("./@bentoproject/core"));
var import_preact = __toModule(require("./@bentoproject/core"));
var Preact = __toModule(require("@bentoproject/core"));
var import_preact = __toModule(require("@bentoproject/core"));
var import_compat = __toModule(require("react"));
var import_component2 = __toModule(require("./@bentoproject/core"));
var import_component2 = __toModule(require("@bentoproject/core"));

@@ -154,3 +154,3 @@ // src/core/types/array.js

// src/preact/component/intersection-observer.js
var import__2 = __toModule(require("./@bentoproject/core"));
var import__2 = __toModule(require("@bentoproject/core"));
function useIsInViewport(ref, ioOptions) {

@@ -172,10 +172,10 @@ var _useState = (0, import__2.useState)(false), isInViewport = _useState[0], setIsInViewport = _useState[1];

// extensions/amp-list/1.0/component.js
var import_context = __toModule(require("./@bentoproject/core"));
var import_context = __toModule(require("@bentoproject/core"));
// src/preact/hooks/useInfiniteQuery.ts
var import__4 = __toModule(require("./@bentoproject/core"));
var import_component = __toModule(require("./@bentoproject/core"));
var import__4 = __toModule(require("@bentoproject/core"));
var import_component = __toModule(require("@bentoproject/core"));
// src/preact/hooks/useStateSafe.ts
var import__3 = __toModule(require("./@bentoproject/core"));
var import__3 = __toModule(require("@bentoproject/core"));
function useStateSafe(initialState2) {

@@ -182,0 +182,0 @@ var isMounted = (0, import__3.useRef)(false);

@@ -25,6 +25,6 @@ var __async = (__this, __arguments, generator) => {

createElement
} from "./@bentoproject/core";
import { Fragment, cloneElement, isValidElement, useEffect as useEffect3, useImperativeHandle, useMemo, useRef as useRef4 } from "./@bentoproject/core";
} from "@bentoproject/core";
import { Fragment, cloneElement, isValidElement, useEffect as useEffect3, useImperativeHandle, useMemo, useRef as useRef4 } from "@bentoproject/core";
import { forwardRef } from "react";
import { ContainWrapper } from "./@bentoproject/core";
import { ContainWrapper } from "@bentoproject/core";

@@ -141,3 +141,3 @@ // src/core/types/array.js

// src/preact/component/intersection-observer.js
import { useCallback, useEffect, useRef, useState } from "./@bentoproject/core";
import { useCallback, useEffect, useRef, useState } from "@bentoproject/core";
function useIsInViewport(ref, ioOptions) {

@@ -159,10 +159,10 @@ const [isInViewport, setIsInViewport] = useState(false);

// extensions/amp-list/1.0/component.js
import { useAmpContext } from "./@bentoproject/core";
import { useAmpContext } from "@bentoproject/core";
// src/preact/hooks/useInfiniteQuery.ts
import { useCallback as useCallback3, useRef as useRef3 } from "./@bentoproject/core";
import { useValueRef } from "./@bentoproject/core";
import { useCallback as useCallback3, useRef as useRef3 } from "@bentoproject/core";
import { useValueRef } from "@bentoproject/core";
// src/preact/hooks/useStateSafe.ts
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "./@bentoproject/core";
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "@bentoproject/core";
function useStateSafe(initialState2) {

@@ -169,0 +169,0 @@ const isMounted = useRef2(false);

;
var e=(e,t,r)=>new Promise(((o,n)=>{var a=e=>{try{l(r.next(e))}catch(e){n(e)}},c=e=>{try{l(r.throw(e))}catch(e){n(e)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,c);l((r=r.apply(e,t)).next())}));function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function o(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?r(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}import{createElement as n}from"./@bentoproject/core";import{Fragment as a,cloneElement as c,isValidElement as l,useEffect as i,useImperativeHandle as u,useMemo as s,useRef as f}from"./@bentoproject/core";import{forwardRef as m}from"react";import{ContainWrapper as p}from"./@bentoproject/core";var{hasOwnProperty:d,toString:b}=Object.prototype;function g(e){return(e.ownerDocument||e).defaultView}function h(e,t,r={}){const{needsRootBounds:o,rootMargin:n,threshold:a}=r,c=function(e){return e.parent&&e.parent!=e}(t)&&(o||n)?t.document:void 0;return new t.IntersectionObserver(e,{threshold:a,root:c,rootMargin:n})}var j=new WeakMap,v=new WeakMap;function M(e){const t=new Set;for(let r=e.length-1;r>=0;r--){const o=e[r],{target:n}=o;if(t.has(n))continue;t.add(n);const a=v.get(n);if(a)for(let e=0;e<a.length;e++)(0,a[e])(o)}}import{useCallback as y,useEffect as P,useRef as O,useState as w}from"./@bentoproject/core";import{useAmpContext as k}from"./@bentoproject/core";import{useCallback as T,useRef as x}from"./@bentoproject/core";import{useValueRef as S}from"./@bentoproject/core";import{useCallback as N,useEffect as B,useRef as R,useState as I}from"./@bentoproject/core";var L={loading:!1,error:null,pages:[],hasMore:!0},C={fetchJson(e,t){return this.fetch(e,t).then((e=>e.json()))},fetch(t,r){return e(this,null,(function*(){const e=yield self.fetch(t,r);if(!e.ok)throw new Error(e.statusText);return e}))}},E={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},J=["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"],K=e=>n("div",null,String(e)),W=e=>n("div",null,e),A=(e,t)=>n("div",null,"Unable to Load More ",n("button",{"load-more-retry":!0},n("label",null,n("span",{className:e.loadMoreIcon})," Retry"))),H=()=>n("div",null,n("button",{"load-more-button":!0},n("label",null,"See More"))),U=e=>n("div",null,n("span",{"aria-label":"Loading",className:e.loadMoreSpinner}));function $(e,t){return t.split(".").reduce(((e,t)=>e&&""!==t?e[t]:e),e)}function q(t,r){let{src:c=null,fetchJson:l=C.fetchJson,itemsKey:m="items",maxItems:d=0,loadMore:b="none",loadMoreBookmark:y="load-more-src",viewportBuffer:O=2,template:q=K,wrapperTemplate:z=W,loadMoreTemplate:F=H,loadingTemplate:G=U,errorTemplate:Q=A}=t,V=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(t,J);const{renderable:X}=k(),Y=s((()=>({rootMargin:`0% 0% ${Math.floor(100*O)}% 0%`,threshold:0})),[O]),Z=f(null),_=function(e,t){const[r,o]=w(!1);return P((()=>{const r=e.current;if(r)return function(e,t,r){const o=g(e);if(r){const n=h((e=>{t(e[e.length-1])}),o,r);return n.observe(e),()=>{n.unobserve(e)}}let n=j.get(o);n||j.set(o,n=h(M,o));let a=v.get(e);return a||(a=[],v.set(e,a)),a.push(t),n.observe(e),()=>{!function(e,t){const r=v.get(e);if(!r)return;if(!function(e,t){const r=e.indexOf(t);return-1!=r&&(e.splice(r,1),!0)}(r,t))return;if(r.length)return;const o=g(e),n=j.get(o);null==n||n.unobserve(e),v.delete(e)}(e,t)}}(r,(e=>{o(e.isIntersecting)}),t)}),[e,t]),r}(Z,Y),{error:ee,hasMore:te,loadMore:re,loading:oe,pages:ne,reset:ae}=function({fetchPage:t,getNextPageParam:r}){const[n,a]=function(e){const t=R(!1);B((()=>(t.current=!0,()=>{t.current=!1})),[]);const[r,o]=I(e);return[r,N((e=>{t.current&&o(e)}),[o])]}(L),c=S({fetchPage:t,getNextPageParam:r,state:n}),l=x(0),i=T(((t=!1)=>e(this,null,(function*(){const{fetchPage:e,getNextPageParam:r,state:n}=c.current;if(!t&&n.loading)return;const i=++l.current;a((e=>o(o({},e),{},{loading:!0})));const u=t?[]:n.pages,s=u.length?u[u.length-1]:void 0;try{const t=yield e({pageParam:s?r(s):void 0});if(i!==l.current)return;const o=r(t);a({loading:!1,error:null,pages:[...u,t],hasMore:null!=o})}catch(e){if(i!==l.current)return;a((t=>o(o({},t),{},{loading:!1,error:e})))}}))),[c,a]),u=T((()=>i(!0)),[i]);return o(o({},n),{},{loadMore:i,reset:u})}({fetchPage:t=>e(this,[t],(function*({pageParam:e=c}){return X?yield l(e):null})),getNextPageParam:e=>function(e,t){return $(e,t)}(e,y)});i((()=>{ae()}),[c,X,y,ae]);const ce=X&&"auto"===b&&_&&!oe&&te;i((()=>{ce&&re()}),[ce,re]);const le=s((()=>{let e=ne.flatMap((e=>function(e,t){if(!e)return[];let r=$(e,t);return r?(Array.isArray(r)||(r=[r]),r):[]}(e,m)));return d>0&&e.length>d&&(e=e.slice(0,d)),e.map(((e,t)=>{let r=q(e);return r&&"object"==typeof r&&"string"==typeof r.__html&&(r=n("span",{dangerouslySetInnerHTML:r})),D(r,{"key":t,"role":"listitem"})}))}),[ne,m,d,q]),ie=oe,ue=0!==le.length,se="manual"===b&&te&&!oe;u(r,(()=>({refresh:ae})),[ae]);const fe=E;return n(p,o(o({"aria-live":"polite"},V),{},{onClick:e=>{e.target.closest("[load-more-button], [load-more-retry]")&&re()}}),n(a,{"test-id":"contents"},ue&&D(z(le),{"role":"list"}),ie&&G(fe),se&&F(fe),ee&&Q(fe,ee),"auto"===b&&n("span",{ref:Z})))}var z=m(q);function D(e,t){return l(e)?c(e,o(o({},t),e.props)):e}z.displayName="List";export{z as BentoList,q as BentoListWithRef};
var e=(e,t,r)=>new Promise(((o,n)=>{var a=e=>{try{l(r.next(e))}catch(e){n(e)}},c=e=>{try{l(r.throw(e))}catch(e){n(e)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,c);l((r=r.apply(e,t)).next())}));function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function o(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?r(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}import{createElement as n}from"@bentoproject/core";import{Fragment as a,cloneElement as c,isValidElement as l,useEffect as i,useImperativeHandle as u,useMemo as s,useRef as f}from"@bentoproject/core";import{forwardRef as m}from"react";import{ContainWrapper as p}from"@bentoproject/core";var{hasOwnProperty:d,toString:b}=Object.prototype;function g(e){return(e.ownerDocument||e).defaultView}function h(e,t,r={}){const{needsRootBounds:o,rootMargin:n,threshold:a}=r,c=function(e){return e.parent&&e.parent!=e}(t)&&(o||n)?t.document:void 0;return new t.IntersectionObserver(e,{threshold:a,root:c,rootMargin:n})}var j=new WeakMap,v=new WeakMap;function M(e){const t=new Set;for(let r=e.length-1;r>=0;r--){const o=e[r],{target:n}=o;if(t.has(n))continue;t.add(n);const a=v.get(n);if(a)for(let e=0;e<a.length;e++)(0,a[e])(o)}}import{useCallback as y,useEffect as P,useRef as O,useState as w}from"@bentoproject/core";import{useAmpContext as k}from"@bentoproject/core";import{useCallback as T,useRef as x}from"@bentoproject/core";import{useValueRef as S}from"@bentoproject/core";import{useCallback as N,useEffect as B,useRef as R,useState as I}from"@bentoproject/core";var L={loading:!1,error:null,pages:[],hasMore:!0},C={fetchJson(e,t){return this.fetch(e,t).then((e=>e.json()))},fetch(t,r){return e(this,null,(function*(){const e=yield self.fetch(t,r);if(!e.ok)throw new Error(e.statusText);return e}))}},E={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},J=["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"],K=e=>n("div",null,String(e)),W=e=>n("div",null,e),A=(e,t)=>n("div",null,"Unable to Load More ",n("button",{"load-more-retry":!0},n("label",null,n("span",{className:e.loadMoreIcon})," Retry"))),H=()=>n("div",null,n("button",{"load-more-button":!0},n("label",null,"See More"))),U=e=>n("div",null,n("span",{"aria-label":"Loading",className:e.loadMoreSpinner}));function $(e,t){return t.split(".").reduce(((e,t)=>e&&""!==t?e[t]:e),e)}function q(t,r){let{src:c=null,fetchJson:l=C.fetchJson,itemsKey:m="items",maxItems:d=0,loadMore:b="none",loadMoreBookmark:y="load-more-src",viewportBuffer:O=2,template:q=K,wrapperTemplate:z=W,loadMoreTemplate:F=H,loadingTemplate:G=U,errorTemplate:Q=A}=t,V=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(t,J);const{renderable:X}=k(),Y=s((()=>({rootMargin:`0% 0% ${Math.floor(100*O)}% 0%`,threshold:0})),[O]),Z=f(null),_=function(e,t){const[r,o]=w(!1);return P((()=>{const r=e.current;if(r)return function(e,t,r){const o=g(e);if(r){const n=h((e=>{t(e[e.length-1])}),o,r);return n.observe(e),()=>{n.unobserve(e)}}let n=j.get(o);n||j.set(o,n=h(M,o));let a=v.get(e);return a||(a=[],v.set(e,a)),a.push(t),n.observe(e),()=>{!function(e,t){const r=v.get(e);if(!r)return;if(!function(e,t){const r=e.indexOf(t);return-1!=r&&(e.splice(r,1),!0)}(r,t))return;if(r.length)return;const o=g(e),n=j.get(o);null==n||n.unobserve(e),v.delete(e)}(e,t)}}(r,(e=>{o(e.isIntersecting)}),t)}),[e,t]),r}(Z,Y),{error:ee,hasMore:te,loadMore:re,loading:oe,pages:ne,reset:ae}=function({fetchPage:t,getNextPageParam:r}){const[n,a]=function(e){const t=R(!1);B((()=>(t.current=!0,()=>{t.current=!1})),[]);const[r,o]=I(e);return[r,N((e=>{t.current&&o(e)}),[o])]}(L),c=S({fetchPage:t,getNextPageParam:r,state:n}),l=x(0),i=T(((t=!1)=>e(this,null,(function*(){const{fetchPage:e,getNextPageParam:r,state:n}=c.current;if(!t&&n.loading)return;const i=++l.current;a((e=>o(o({},e),{},{loading:!0})));const u=t?[]:n.pages,s=u.length?u[u.length-1]:void 0;try{const t=yield e({pageParam:s?r(s):void 0});if(i!==l.current)return;const o=r(t);a({loading:!1,error:null,pages:[...u,t],hasMore:null!=o})}catch(e){if(i!==l.current)return;a((t=>o(o({},t),{},{loading:!1,error:e})))}}))),[c,a]),u=T((()=>i(!0)),[i]);return o(o({},n),{},{loadMore:i,reset:u})}({fetchPage:t=>e(this,[t],(function*({pageParam:e=c}){return X?yield l(e):null})),getNextPageParam:e=>function(e,t){return $(e,t)}(e,y)});i((()=>{ae()}),[c,X,y,ae]);const ce=X&&"auto"===b&&_&&!oe&&te;i((()=>{ce&&re()}),[ce,re]);const le=s((()=>{let e=ne.flatMap((e=>function(e,t){if(!e)return[];let r=$(e,t);return r?(Array.isArray(r)||(r=[r]),r):[]}(e,m)));return d>0&&e.length>d&&(e=e.slice(0,d)),e.map(((e,t)=>{let r=q(e);return r&&"object"==typeof r&&"string"==typeof r.__html&&(r=n("span",{dangerouslySetInnerHTML:r})),D(r,{"key":t,"role":"listitem"})}))}),[ne,m,d,q]),ie=oe,ue=0!==le.length,se="manual"===b&&te&&!oe;u(r,(()=>({refresh:ae})),[ae]);const fe=E;return n(p,o(o({"aria-live":"polite"},V),{},{onClick:e=>{e.target.closest("[load-more-button], [load-more-retry]")&&re()}}),n(a,{"test-id":"contents"},ue&&D(z(le),{"role":"list"}),ie&&G(fe),se&&F(fe),ee&&Q(fe,ee),"auto"===b&&n("span",{ref:Z})))}var z=m(q);function D(e,t){return l(e)?c(e,o(o({},t),e.props)):e}z.displayName="List";export{z as BentoList,q as BentoListWithRef};
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
//# sourceMappingURL=component-react.module.js.map
;
var r=Object.create,e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(r){return e(r,"__esModule",{value:!0})},a=function(a){return function(r,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),f=0,l=c.length;f<l;f++)a=c[f],u.call(r,a)||"default"===a||e(r,a,{get:function(r){return o[r]}.bind(null,a),enumerable:!(i=n(o,a))||i.enumerable});return r}(i(e(null!=a?r(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(r,e){return(c=Object.setPrototypeOf||function(r,e){return r.__proto__=e,r})(r,e)}function f(r){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(r)}function l(r){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function s(r,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}!function(r,n){for(var t in i(r),n)e(r,t,{get:n[t],enumerable:!0})}(exports,{defineElement:function(){return Y}});var v=a(require("./@bentoproject/core"));function b(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function d(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function p(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){b(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function m(r,e,n,t,o,u,i){try{var a=r[u](i),c=a.value}catch(r){return void n(r)}a.done?e(c):Promise.resolve(c).then(t,o)}function y(r){return function(){var e=this,n=arguments;return new Promise((function(t,o){var u=r.apply(e,n);function i(r){m(u,t,o,i,a,"next",r)}function a(r){m(u,t,o,i,a,"throw",r)}i(void 0)}))}}var h=a(require("./@bentoproject/core")),g=a(require("./@bentoproject/core")),j=a(require("./@bentoproject/core")),w=a(require("./@bentoproject/core"));function O(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function M(r,e){if(r){if("string"==typeof r)return O(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(r,e):void 0}}function k(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,u=[],i=!0,a=!1;try{for(n=n.call(r);!(i=(t=n.next()).done)&&(u.push(t.value),!e||u.length!==e);i=!0);}catch(r){a=!0,o=r}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return u}}(r,e)||M(r,e)||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.")}()}Array.isArray;var S=Object.prototype;function x(r){return(r.ownerDocument||r).defaultView}function R(r){return r.parent&&r.parent!=r}function q(r,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=n.needsRootBounds,o=n.rootMargin,u=n.threshold,i=R(e)&&(t||o)?e.document:void 0;return new e.IntersectionObserver(r,{threshold:u,root:i,rootMargin:o})}S.hasOwnProperty,S.toString;var A=new WeakMap,P=new WeakMap;function I(r){for(var e=new Set,n=r.length-1;n>=0;n--){var t=r[n],o=t.target;if(!e.has(o)){e.add(o);var u=P.get(o);if(u)for(var i=0;i<u.length;i++)(0,u[i])(t)}}}var T=a(require("./@bentoproject/core")),B=a(require("./@bentoproject/core"));function E(r){return function(r){if(Array.isArray(r))return O(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||M(r)||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.")}()}var L=a(require("./@bentoproject/core")),C=a(require("./@bentoproject/core")),G=a(require("./@bentoproject/core")),J={loading:!1,error:null,pages:[],hasMore:!0},K={fetchJson:function(r,e){return this.fetch(r,e).then((function(r){return r.json()}))},fetch:function(r,e){return y(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,self.fetch(r,e);case 2:if((t=n.sent).ok){n.next=5;break}throw new Error(t.statusText);case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),n)})))()}},N={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},U=("url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><defs><linearGradient id="grad"><stop stop-color="rgb(51,51,51)" stop-opacity=".75"></stop><stop offset="100%" stop-color="rgb(51,51,51)" stop-opacity="0"></stop></linearGradient></defs><path d="M11,4.4 A18,18, 0,1,0, 38,20" fill="none" stroke="url(%23grad)" stroke-width="1.725"></path></svg>',"')"),"url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path></svg>',"')"),["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"]),W=function(r){return h.createElement("div",null,String(r))},_=function(r){return h.createElement("div",null,r)},z=function(r,e){return h.createElement("div",null,"Unable to Load More ",h.createElement("button",{"load-more-retry":!0},h.createElement("label",null,h.createElement("span",{class:r.loadMoreIcon})," Retry")))},D=function(){return h.createElement("div",null,h.createElement("button",{"load-more-button":!0},h.createElement("label",null,"See More")))},H=function(r){return h.createElement("div",null,h.createElement("span",{"aria-label":"Loading",class:r.loadMoreSpinner}))};function V(r,e){return e.split(".").reduce((function(r,e){return r&&""!==e?r[e]:r}),r)}var $=(0,j.forwardRef)((function(r,e){var n,t=r.src,o=void 0===t?null:t,u=r.fetchJson,i=void 0===u?K.fetchJson:u,a=r.itemsKey,c=void 0===a?"items":a,f=r.maxItems,s=void 0===f?0:f,v=r.loadMore,b=void 0===v?"none":v,d=r.loadMoreBookmark,m=void 0===d?"load-more-src":d,j=r.viewportBuffer,O=void 0===j?2:j,M=r.template,S=void 0===M?W:M,R=r.wrapperTemplate,$=void 0===R?_:R,Q=r.loadMoreTemplate,X=void 0===Q?D:Q,Y=r.loadingTemplate,Z=void 0===Y?H:Y,rr=r.errorTemplate,er=void 0===rr?z:rr,nr=function(r,e){if(null==r)return{};var n,t,o={},u=Object.keys(r);for(t=0;t<u.length;t++)n=u[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,U),tr=(0,B.useAmpContext)().renderable,or=(0,g.useMemo)((function(){var r=Math.floor(100*O);return{rootMargin:"0% 0% ".concat(r,"% 0%"),threshold:0}}),[O]),ur=(0,g.useRef)(null),ir=function(r,e){var n=k((0,T.useState)(!1),2),t=n[0],o=n[1];return(0,T.useEffect)((function(){var n=r.current;if(n)return function(r,e,n){var t=x(r);if(n){var o=q((function(r){e(r[r.length-1])}),t,n);return o.observe(r),function(){o.unobserve(r)}}var u=A.get(t);u||A.set(t,u=q(I,t));var i=P.get(r);return i||(i=[],P.set(r,i)),i.push(e),u.observe(r),function(){!function(r,e){var n,t,o,u=P.get(r);if(u&&(t=e,-1!=(o=(n=u).indexOf(t))&&(n.splice(o,1),1)&&!u.length)){var i=x(r),a=A.get(i);null==a||a.unobserve(r),P.delete(r)}}(r,e)}}(n,(function(r){o(r.isIntersecting)}),e)}),[r,e]),t}(ur,or),ar=function(r){var e=r.fetchPage,n=r.getNextPageParam,t=function(r){var e=(0,G.useRef)(!1);(0,G.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]);var n=k((0,G.useState)(r),2),t=n[0],o=n[1];return[t,(0,G.useCallback)((function(r){e.current&&o(r)}),[o])]}(J),o=k(t,2),u=o[0],i=o[1],a=(0,C.useValueRef)({fetchPage:e,getNextPageParam:n,state:u}),c=(0,L.useRef)(0),f=(0,L.useCallback)(y(regeneratorRuntime.mark((function r(){var e,n,t,o,u,f,l,s,v,b,d=arguments;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=d.length>0&&void 0!==d[0]&&d[0],n=a.current,t=n.fetchPage,o=n.getNextPageParam,u=n.state,e||!u.loading){r.next=4;break}return r.abrupt("return");case 4:return f=++c.current,i((function(r){return p(p({},r),{},{loading:!0})})),l=e?[]:u.pages,s=l.length?l[l.length-1]:void 0,r.prev=8,r.next=11,t({pageParam:s?o(s):void 0});case 11:if(v=r.sent,f===c.current){r.next=14;break}return r.abrupt("return");case 14:b=o(v),i({loading:!1,error:null,pages:[].concat(E(l),[v]),hasMore:null!=b}),r.next=23;break;case 18:if(r.prev=18,r.t0=r.catch(8),f===c.current){r.next=22;break}return r.abrupt("return");case 22:i((function(e){return p(p({},e),{},{loading:!1,error:r.t0})}));case 23:case"end":return r.stop()}}),r,null,[[8,18]])}))),[a,i]),l=(0,L.useCallback)((function(){return f(!0)}),[f]);return p(p({},u),{},{loadMore:f,reset:l})}({fetchPage:(n=y(regeneratorRuntime.mark((function r(e){var n,t,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.pageParam,t=void 0===n?o:n,tr){r.next=3;break}return r.abrupt("return",null);case 3:return r.next=5,i(t);case 5:return u=r.sent,r.abrupt("return",u);case 7:case"end":return r.stop()}}),r)}))),function(r){return n.apply(this,arguments)}),getNextPageParam:function(r){return function(r,e){return V(r,e)}(r,m)}}),cr=ar.error,fr=ar.hasMore,lr=ar.loadMore,sr=ar.loading,vr=ar.pages,br=ar.reset;(0,g.useEffect)((function(){br()}),[o,tr,m,br]);var dr=tr&&"auto"===b&&ir&&!sr&&fr;(0,g.useEffect)((function(){dr&&lr()}),[dr,lr]);var pr=(0,g.useMemo)((function(){var r=vr.flatMap((function(r){return function(r,e){if(!r)return[];var n=V(r,e);return n?(Array.isArray(n)||(n=[n]),n):[]}(r,c)}));return s>0&&r.length>s&&(r=r.slice(0,s)),r.map((function(r,e){var n=S(r);return n&&"object"===l(n)&&"string"==typeof n.__html&&(n=h.createElement("span",{dangerouslySetInnerHTML:n})),F(n,{"key":e,"role":"listitem"})}))}),[vr,c,s,S]),mr=sr,yr=0!==pr.length,hr="manual"===b&&fr&&!sr;(0,g.useImperativeHandle)(e,(function(){return{refresh:br}}),[br]);var gr=N;return h.createElement(w.ContainWrapper,p(p({"aria-live":"polite"},nr),{},{onClick:function(r){r.target.closest("[load-more-button], [load-more-retry]")&&lr()}}),h.createElement(g.Fragment,{"test-id":"contents"},yr&&F($(pr),{"role":"list"}),mr&&Z(gr),hr&&X(gr),cr&&er(gr,cr),"auto"===b&&h.createElement("span",{ref:ur})))}));function F(r,e){return(0,g.isValidElement)(r)?(0,g.cloneElement)(r,p(p({},e),r.props)):r}$.displayName="List";var Q=function(r){!function(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&c(r,e)}(o,v.PreactBaseElement);var e,n,t=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(r){return!1}}(),function(){var r,t=f(e);if(n){var o=f(this).constructor;r=Reflect.construct(t,arguments,o)}else r=t.apply(this,arguments);return s(this,r)});function o(){return t.apply(this,arguments)}return o}();Q.Component=$,Q.props={"src":{attr:"src"},"itemsKey":{attr:"items"},"maxItems":{attr:"max-items",type:"number"},"loadMore":{attr:"load-more"},"loadMoreBookmark":{attr:"load-more-bookmark"},"viewportBuffer":{attr:"viewport-buffer",type:"number"}},Q.layoutSizeDefined=!0,Q.usesShadowDom=!0,Q.usesTemplate=!0;var X=a(require("./@bentoproject/core"));function Y(r){(0,X.defineBentoElement)("bento-list",Q,r)}
var r=Object.create,e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(r){return e(r,"__esModule",{value:!0})},a=function(a){return function(r,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),f=0,l=c.length;f<l;f++)a=c[f],u.call(r,a)||"default"===a||e(r,a,{get:function(r){return o[r]}.bind(null,a),enumerable:!(i=n(o,a))||i.enumerable});return r}(i(e(null!=a?r(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(r,e){return(c=Object.setPrototypeOf||function(r,e){return r.__proto__=e,r})(r,e)}function f(r){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(r)}function l(r){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function s(r,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(r)}!function(r,n){for(var t in i(r),n)e(r,t,{get:n[t],enumerable:!0})}(exports,{defineElement:function(){return Y}});var v=a(require("@bentoproject/core"));function b(r,e,n){return e in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function d(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function p(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){b(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function m(r,e,n,t,o,u,i){try{var a=r[u](i),c=a.value}catch(r){return void n(r)}a.done?e(c):Promise.resolve(c).then(t,o)}function y(r){return function(){var e=this,n=arguments;return new Promise((function(t,o){var u=r.apply(e,n);function i(r){m(u,t,o,i,a,"next",r)}function a(r){m(u,t,o,i,a,"throw",r)}i(void 0)}))}}var h=a(require("@bentoproject/core")),g=a(require("@bentoproject/core")),j=a(require("@bentoproject/core")),w=a(require("@bentoproject/core"));function O(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}function M(r,e){if(r){if("string"==typeof r)return O(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(r,e):void 0}}function k(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,u=[],i=!0,a=!1;try{for(n=n.call(r);!(i=(t=n.next()).done)&&(u.push(t.value),!e||u.length!==e);i=!0);}catch(r){a=!0,o=r}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return u}}(r,e)||M(r,e)||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.")}()}Array.isArray;var S=Object.prototype;function x(r){return(r.ownerDocument||r).defaultView}function R(r){return r.parent&&r.parent!=r}function q(r,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},t=n.needsRootBounds,o=n.rootMargin,u=n.threshold,i=R(e)&&(t||o)?e.document:void 0;return new e.IntersectionObserver(r,{threshold:u,root:i,rootMargin:o})}S.hasOwnProperty,S.toString;var A=new WeakMap,P=new WeakMap;function I(r){for(var e=new Set,n=r.length-1;n>=0;n--){var t=r[n],o=t.target;if(!e.has(o)){e.add(o);var u=P.get(o);if(u)for(var i=0;i<u.length;i++)(0,u[i])(t)}}}var T=a(require("@bentoproject/core")),B=a(require("@bentoproject/core"));function E(r){return function(r){if(Array.isArray(r))return O(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||M(r)||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.")}()}var L=a(require("@bentoproject/core")),C=a(require("@bentoproject/core")),G=a(require("@bentoproject/core")),J={loading:!1,error:null,pages:[],hasMore:!0},K={fetchJson:function(r,e){return this.fetch(r,e).then((function(r){return r.json()}))},fetch:function(r,e){return y(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,self.fetch(r,e);case 2:if((t=n.sent).ok){n.next=5;break}throw new Error(t.statusText);case 5:return n.abrupt("return",t);case 6:case"end":return n.stop()}}),n)})))()}},N={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},U=("url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><defs><linearGradient id="grad"><stop stop-color="rgb(51,51,51)" stop-opacity=".75"></stop><stop offset="100%" stop-color="rgb(51,51,51)" stop-opacity="0"></stop></linearGradient></defs><path d="M11,4.4 A18,18, 0,1,0, 38,20" fill="none" stroke="url(%23grad)" stroke-width="1.725"></path></svg>',"')"),"url('data:image/svg+xml;charset=utf-8,".concat('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path></svg>',"')"),["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"]),W=function(r){return h.createElement("div",null,String(r))},_=function(r){return h.createElement("div",null,r)},z=function(r,e){return h.createElement("div",null,"Unable to Load More ",h.createElement("button",{"load-more-retry":!0},h.createElement("label",null,h.createElement("span",{class:r.loadMoreIcon})," Retry")))},D=function(){return h.createElement("div",null,h.createElement("button",{"load-more-button":!0},h.createElement("label",null,"See More")))},H=function(r){return h.createElement("div",null,h.createElement("span",{"aria-label":"Loading",class:r.loadMoreSpinner}))};function V(r,e){return e.split(".").reduce((function(r,e){return r&&""!==e?r[e]:r}),r)}var $=(0,j.forwardRef)((function(r,e){var n,t=r.src,o=void 0===t?null:t,u=r.fetchJson,i=void 0===u?K.fetchJson:u,a=r.itemsKey,c=void 0===a?"items":a,f=r.maxItems,s=void 0===f?0:f,v=r.loadMore,b=void 0===v?"none":v,d=r.loadMoreBookmark,m=void 0===d?"load-more-src":d,j=r.viewportBuffer,O=void 0===j?2:j,M=r.template,S=void 0===M?W:M,R=r.wrapperTemplate,$=void 0===R?_:R,Q=r.loadMoreTemplate,X=void 0===Q?D:Q,Y=r.loadingTemplate,Z=void 0===Y?H:Y,rr=r.errorTemplate,er=void 0===rr?z:rr,nr=function(r,e){if(null==r)return{};var n,t,o={},u=Object.keys(r);for(t=0;t<u.length;t++)n=u[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,U),tr=(0,B.useAmpContext)().renderable,or=(0,g.useMemo)((function(){var r=Math.floor(100*O);return{rootMargin:"0% 0% ".concat(r,"% 0%"),threshold:0}}),[O]),ur=(0,g.useRef)(null),ir=function(r,e){var n=k((0,T.useState)(!1),2),t=n[0],o=n[1];return(0,T.useEffect)((function(){var n=r.current;if(n)return function(r,e,n){var t=x(r);if(n){var o=q((function(r){e(r[r.length-1])}),t,n);return o.observe(r),function(){o.unobserve(r)}}var u=A.get(t);u||A.set(t,u=q(I,t));var i=P.get(r);return i||(i=[],P.set(r,i)),i.push(e),u.observe(r),function(){!function(r,e){var n,t,o,u=P.get(r);if(u&&(t=e,-1!=(o=(n=u).indexOf(t))&&(n.splice(o,1),1)&&!u.length)){var i=x(r),a=A.get(i);null==a||a.unobserve(r),P.delete(r)}}(r,e)}}(n,(function(r){o(r.isIntersecting)}),e)}),[r,e]),t}(ur,or),ar=function(r){var e=r.fetchPage,n=r.getNextPageParam,t=function(r){var e=(0,G.useRef)(!1);(0,G.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]);var n=k((0,G.useState)(r),2),t=n[0],o=n[1];return[t,(0,G.useCallback)((function(r){e.current&&o(r)}),[o])]}(J),o=k(t,2),u=o[0],i=o[1],a=(0,C.useValueRef)({fetchPage:e,getNextPageParam:n,state:u}),c=(0,L.useRef)(0),f=(0,L.useCallback)(y(regeneratorRuntime.mark((function r(){var e,n,t,o,u,f,l,s,v,b,d=arguments;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=d.length>0&&void 0!==d[0]&&d[0],n=a.current,t=n.fetchPage,o=n.getNextPageParam,u=n.state,e||!u.loading){r.next=4;break}return r.abrupt("return");case 4:return f=++c.current,i((function(r){return p(p({},r),{},{loading:!0})})),l=e?[]:u.pages,s=l.length?l[l.length-1]:void 0,r.prev=8,r.next=11,t({pageParam:s?o(s):void 0});case 11:if(v=r.sent,f===c.current){r.next=14;break}return r.abrupt("return");case 14:b=o(v),i({loading:!1,error:null,pages:[].concat(E(l),[v]),hasMore:null!=b}),r.next=23;break;case 18:if(r.prev=18,r.t0=r.catch(8),f===c.current){r.next=22;break}return r.abrupt("return");case 22:i((function(e){return p(p({},e),{},{loading:!1,error:r.t0})}));case 23:case"end":return r.stop()}}),r,null,[[8,18]])}))),[a,i]),l=(0,L.useCallback)((function(){return f(!0)}),[f]);return p(p({},u),{},{loadMore:f,reset:l})}({fetchPage:(n=y(regeneratorRuntime.mark((function r(e){var n,t,u;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.pageParam,t=void 0===n?o:n,tr){r.next=3;break}return r.abrupt("return",null);case 3:return r.next=5,i(t);case 5:return u=r.sent,r.abrupt("return",u);case 7:case"end":return r.stop()}}),r)}))),function(r){return n.apply(this,arguments)}),getNextPageParam:function(r){return function(r,e){return V(r,e)}(r,m)}}),cr=ar.error,fr=ar.hasMore,lr=ar.loadMore,sr=ar.loading,vr=ar.pages,br=ar.reset;(0,g.useEffect)((function(){br()}),[o,tr,m,br]);var dr=tr&&"auto"===b&&ir&&!sr&&fr;(0,g.useEffect)((function(){dr&&lr()}),[dr,lr]);var pr=(0,g.useMemo)((function(){var r=vr.flatMap((function(r){return function(r,e){if(!r)return[];var n=V(r,e);return n?(Array.isArray(n)||(n=[n]),n):[]}(r,c)}));return s>0&&r.length>s&&(r=r.slice(0,s)),r.map((function(r,e){var n=S(r);return n&&"object"===l(n)&&"string"==typeof n.__html&&(n=h.createElement("span",{dangerouslySetInnerHTML:n})),F(n,{"key":e,"role":"listitem"})}))}),[vr,c,s,S]),mr=sr,yr=0!==pr.length,hr="manual"===b&&fr&&!sr;(0,g.useImperativeHandle)(e,(function(){return{refresh:br}}),[br]);var gr=N;return h.createElement(w.ContainWrapper,p(p({"aria-live":"polite"},nr),{},{onClick:function(r){r.target.closest("[load-more-button], [load-more-retry]")&&lr()}}),h.createElement(g.Fragment,{"test-id":"contents"},yr&&F($(pr),{"role":"list"}),mr&&Z(gr),hr&&X(gr),cr&&er(gr,cr),"auto"===b&&h.createElement("span",{ref:ur})))}));function F(r,e){return(0,g.isValidElement)(r)?(0,g.cloneElement)(r,p(p({},e),r.props)):r}$.displayName="List";var Q=function(r){!function(r,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&c(r,e)}(o,v.PreactBaseElement);var e,n,t=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(r){return!1}}(),function(){var r,t=f(e);if(n){var o=f(this).constructor;r=Reflect.construct(t,arguments,o)}else r=t.apply(this,arguments);return s(this,r)});function o(){return t.apply(this,arguments)}return o}();Q.Component=$,Q.props={"src":{attr:"src"},"itemsKey":{attr:"items"},"maxItems":{attr:"max-items",type:"number"},"loadMore":{attr:"load-more"},"loadMoreBookmark":{attr:"load-more-bookmark"},"viewportBuffer":{attr:"viewport-buffer",type:"number"}},Q.layoutSizeDefined=!0,Q.usesShadowDom=!0,Q.usesTemplate=!0;var X=a(require("@bentoproject/core"));function Y(r){(0,X.defineBentoElement)("bento-list",Q,r)}
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
//# sourceMappingURL=web-component.js.map

@@ -40,9 +40,9 @@ var __create = Object.create;

// extensions/amp-list/1.0/base-element.js
var import_base_element = __toModule(require("./@bentoproject/core"));
var import_base_element = __toModule(require("@bentoproject/core"));
// extensions/amp-list/1.0/component.js
var Preact = __toModule(require("./@bentoproject/core"));
var import_preact = __toModule(require("./@bentoproject/core"));
var import_compat = __toModule(require("./@bentoproject/core"));
var import_component2 = __toModule(require("./@bentoproject/core"));
var Preact = __toModule(require("@bentoproject/core"));
var import_preact = __toModule(require("@bentoproject/core"));
var import_compat = __toModule(require("@bentoproject/core"));
var import_component2 = __toModule(require("@bentoproject/core"));

@@ -156,3 +156,3 @@ // src/core/types/array.js

// src/preact/component/intersection-observer.js
var import__2 = __toModule(require("./@bentoproject/core"));
var import__2 = __toModule(require("@bentoproject/core"));
function useIsInViewport(ref, ioOptions) {

@@ -174,10 +174,10 @@ var _useState = (0, import__2.useState)(false), isInViewport = _useState[0], setIsInViewport = _useState[1];

// extensions/amp-list/1.0/component.js
var import_context = __toModule(require("./@bentoproject/core"));
var import_context = __toModule(require("@bentoproject/core"));
// src/preact/hooks/useInfiniteQuery.ts
var import__4 = __toModule(require("./@bentoproject/core"));
var import_component = __toModule(require("./@bentoproject/core"));
var import__4 = __toModule(require("@bentoproject/core"));
var import_component = __toModule(require("@bentoproject/core"));
// src/preact/hooks/useStateSafe.ts
var import__3 = __toModule(require("./@bentoproject/core"));
var import__3 = __toModule(require("@bentoproject/core"));
function useStateSafe(initialState2) {

@@ -700,3 +700,3 @@ var isMounted = (0, import__3.useRef)(false);

// extensions/amp-list/1.0/build/web-component.js
var import_bento_ce = __toModule(require("./@bentoproject/core"));
var import_bento_ce = __toModule(require("@bentoproject/core"));
function defineElement(win) {

@@ -703,0 +703,0 @@ (0, import_bento_ce.defineBentoElement)("bento-list", BaseElement, win);

@@ -23,3 +23,3 @@ var __async = (__this, __arguments, generator) => {

// extensions/amp-list/1.0/base-element.js
import { PreactBaseElement } from "./@bentoproject/core";
import { PreactBaseElement } from "@bentoproject/core";

@@ -29,6 +29,6 @@ // extensions/amp-list/1.0/component.js

createElement
} from "./@bentoproject/core";
import { Fragment, cloneElement, isValidElement, useEffect as useEffect3, useImperativeHandle, useMemo, useRef as useRef4 } from "./@bentoproject/core";
import { forwardRef } from "./@bentoproject/core";
import { ContainWrapper } from "./@bentoproject/core";
} from "@bentoproject/core";
import { Fragment, cloneElement, isValidElement, useEffect as useEffect3, useImperativeHandle, useMemo, useRef as useRef4 } from "@bentoproject/core";
import { forwardRef } from "@bentoproject/core";
import { ContainWrapper } from "@bentoproject/core";

@@ -145,3 +145,3 @@ // src/core/types/array.js

// src/preact/component/intersection-observer.js
import { useCallback, useEffect, useRef, useState } from "./@bentoproject/core";
import { useCallback, useEffect, useRef, useState } from "@bentoproject/core";
function useIsInViewport(ref, ioOptions) {

@@ -163,10 +163,10 @@ const [isInViewport, setIsInViewport] = useState(false);

// extensions/amp-list/1.0/component.js
import { useAmpContext } from "./@bentoproject/core";
import { useAmpContext } from "@bentoproject/core";
// src/preact/hooks/useInfiniteQuery.ts
import { useCallback as useCallback3, useRef as useRef3 } from "./@bentoproject/core";
import { useValueRef } from "./@bentoproject/core";
import { useCallback as useCallback3, useRef as useRef3 } from "@bentoproject/core";
import { useValueRef } from "@bentoproject/core";
// src/preact/hooks/useStateSafe.ts
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "./@bentoproject/core";
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2, useState as useState2 } from "@bentoproject/core";
function useStateSafe(initialState2) {

@@ -516,3 +516,3 @@ const isMounted = useRef2(false);

// extensions/amp-list/1.0/build/web-component.js
import { defineBentoElement } from "./@bentoproject/core";
import { defineBentoElement } from "@bentoproject/core";
function defineElement(win) {

@@ -519,0 +519,0 @@ defineBentoElement("bento-list", BaseElement, win);

;
var e=(e,t,r)=>new Promise(((o,n)=>{var a=e=>{try{l(r.next(e))}catch(e){n(e)}},c=e=>{try{l(r.throw(e))}catch(e){n(e)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,c);l((r=r.apply(e,t)).next())}));import{PreactBaseElement as t}from"./@bentoproject/core";function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}import{createElement as a}from"./@bentoproject/core";import{Fragment as c,cloneElement as l,isValidElement as i,useEffect as u,useImperativeHandle as s,useMemo as f,useRef as m}from"./@bentoproject/core";import{forwardRef as p}from"./@bentoproject/core";import{ContainWrapper as d}from"./@bentoproject/core";var{hasOwnProperty:b,toString:g}=Object.prototype;function h(e){return(e.ownerDocument||e).defaultView}function j(e,t,r={}){const{needsRootBounds:o,rootMargin:n,threshold:a}=r,c=function(e){return e.parent&&e.parent!=e}(t)&&(o||n)?t.document:void 0;return new t.IntersectionObserver(e,{threshold:a,root:c,rootMargin:n})}var v=new WeakMap,M=new WeakMap;function y(e){const t=new Set;for(let r=e.length-1;r>=0;r--){const o=e[r],{target:n}=o;if(t.has(n))continue;t.add(n);const a=M.get(n);if(a)for(let e=0;e<a.length;e++)(0,a[e])(o)}}import{useCallback as P,useEffect as w,useRef as O,useState as k}from"./@bentoproject/core";import{useAmpContext as x}from"./@bentoproject/core";import{useCallback as T,useRef as B}from"./@bentoproject/core";import{useValueRef as S}from"./@bentoproject/core";import{useCallback as I,useEffect as R,useRef as L,useState as N}from"./@bentoproject/core";var C={loading:!1,error:null,pages:[],hasMore:!0},E={fetchJson(e,t){return this.fetch(e,t).then((e=>e.json()))},fetch(t,r){return e(this,null,(function*(){const e=yield self.fetch(t,r);if(!e.ok)throw new Error(e.statusText);return e}))}},J={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},K=["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"],W=e=>a("div",null,String(e)),A=e=>a("div",null,e),H=(e,t)=>a("div",null,"Unable to Load More ",a("button",{"load-more-retry":!0},a("label",null,a("span",{class:e.loadMoreIcon})," Retry"))),U=()=>a("div",null,a("button",{"load-more-button":!0},a("label",null,"See More"))),$=e=>a("div",null,a("span",{"aria-label":"Loading",class:e.loadMoreSpinner}));function q(e,t){return t.split(".").reduce(((e,t)=>e&&""!==t?e[t]:e),e)}var z=p((function(t,r){let{src:o=null,fetchJson:l=E.fetchJson,itemsKey:i="items",maxItems:p=0,loadMore:b="none",loadMoreBookmark:g="load-more-src",viewportBuffer:P=2,template:O=W,wrapperTemplate:z=A,loadMoreTemplate:F=U,loadingTemplate:G=$,errorTemplate:Q=H}=t,V=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(t,K);const{renderable:X}=x(),Y=f((()=>({rootMargin:`0% 0% ${Math.floor(100*P)}% 0%`,threshold:0})),[P]),Z=m(null),_=function(e,t){const[r,o]=k(!1);return w((()=>{const r=e.current;if(r)return function(e,t,r){const o=h(e);if(r){const n=j((e=>{t(e[e.length-1])}),o,r);return n.observe(e),()=>{n.unobserve(e)}}let n=v.get(o);n||v.set(o,n=j(y,o));let a=M.get(e);return a||(a=[],M.set(e,a)),a.push(t),n.observe(e),()=>{!function(e,t){const r=M.get(e);if(!r)return;if(!function(e,t){const r=e.indexOf(t);return-1!=r&&(e.splice(r,1),!0)}(r,t))return;if(r.length)return;const o=h(e),n=v.get(o);null==n||n.unobserve(e),M.delete(e)}(e,t)}}(r,(e=>{o(e.isIntersecting)}),t)}),[e,t]),r}(Z,Y),{error:ee,hasMore:te,loadMore:re,loading:oe,pages:ne,reset:ae}=function({fetchPage:t,getNextPageParam:r}){const[o,a]=function(e){const t=L(!1);R((()=>(t.current=!0,()=>{t.current=!1})),[]);const[r,o]=N(e);return[r,I((e=>{t.current&&o(e)}),[o])]}(C),c=S({fetchPage:t,getNextPageParam:r,state:o}),l=B(0),i=T(((t=!1)=>e(this,null,(function*(){const{fetchPage:e,getNextPageParam:r,state:o}=c.current;if(!t&&o.loading)return;const i=++l.current;a((e=>n(n({},e),{},{loading:!0})));const u=t?[]:o.pages,s=u.length?u[u.length-1]:void 0;try{const t=yield e({pageParam:s?r(s):void 0});if(i!==l.current)return;const o=r(t);a({loading:!1,error:null,pages:[...u,t],hasMore:null!=o})}catch(e){if(i!==l.current)return;a((t=>n(n({},t),{},{loading:!1,error:e})))}}))),[c,a]),u=T((()=>i(!0)),[i]);return n(n({},o),{},{loadMore:i,reset:u})}({fetchPage:t=>e(this,[t],(function*({pageParam:e=o}){return X?yield l(e):null})),getNextPageParam:e=>function(e,t){return q(e,t)}(e,g)});u((()=>{ae()}),[o,X,g,ae]);const ce=X&&"auto"===b&&_&&!oe&&te;u((()=>{ce&&re()}),[ce,re]);const le=f((()=>{let e=ne.flatMap((e=>function(e,t){if(!e)return[];let r=q(e,t);return r?(Array.isArray(r)||(r=[r]),r):[]}(e,i)));return p>0&&e.length>p&&(e=e.slice(0,p)),e.map(((e,t)=>{let r=O(e);return r&&"object"==typeof r&&"string"==typeof r.__html&&(r=a("span",{dangerouslySetInnerHTML:r})),D(r,{"key":t,"role":"listitem"})}))}),[ne,i,p,O]),ie=oe,ue=0!==le.length,se="manual"===b&&te&&!oe;s(r,(()=>({refresh:ae})),[ae]);const fe=J;return a(d,n(n({"aria-live":"polite"},V),{},{onClick:e=>{e.target.closest("[load-more-button], [load-more-retry]")&&re()}}),a(c,{"test-id":"contents"},ue&&D(z(le),{"role":"list"}),ie&&G(fe),se&&F(fe),ee&&Q(fe,ee),"auto"===b&&a("span",{ref:Z})))}));function D(e,t){return i(e)?l(e,n(n({},t),e.props)):e}z.displayName="List";var F=class extends t{};F.Component=z,F.props={"src":{attr:"src"},"itemsKey":{attr:"items"},"maxItems":{attr:"max-items",type:"number"},"loadMore":{attr:"load-more"},"loadMoreBookmark":{attr:"load-more-bookmark"},"viewportBuffer":{attr:"viewport-buffer",type:"number"}},F.layoutSizeDefined=!0,F.usesShadowDom=!0,F.usesTemplate=!0;import{defineBentoElement as G}from"./@bentoproject/core";function Q(e){G("bento-list",F,e)}export{Q as defineElement};
var e=(e,t,r)=>new Promise(((o,n)=>{var a=e=>{try{l(r.next(e))}catch(e){n(e)}},c=e=>{try{l(r.throw(e))}catch(e){n(e)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,c);l((r=r.apply(e,t)).next())}));import{PreactBaseElement as t}from"@bentoproject/core";function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}import{createElement as a}from"@bentoproject/core";import{Fragment as c,cloneElement as l,isValidElement as i,useEffect as u,useImperativeHandle as s,useMemo as f,useRef as m}from"@bentoproject/core";import{forwardRef as p}from"@bentoproject/core";import{ContainWrapper as d}from"@bentoproject/core";var{hasOwnProperty:b,toString:g}=Object.prototype;function h(e){return(e.ownerDocument||e).defaultView}function j(e,t,r={}){const{needsRootBounds:o,rootMargin:n,threshold:a}=r,c=function(e){return e.parent&&e.parent!=e}(t)&&(o||n)?t.document:void 0;return new t.IntersectionObserver(e,{threshold:a,root:c,rootMargin:n})}var v=new WeakMap,M=new WeakMap;function y(e){const t=new Set;for(let r=e.length-1;r>=0;r--){const o=e[r],{target:n}=o;if(t.has(n))continue;t.add(n);const a=M.get(n);if(a)for(let e=0;e<a.length;e++)(0,a[e])(o)}}import{useCallback as P,useEffect as w,useRef as O,useState as k}from"@bentoproject/core";import{useAmpContext as x}from"@bentoproject/core";import{useCallback as T,useRef as B}from"@bentoproject/core";import{useValueRef as S}from"@bentoproject/core";import{useCallback as I,useEffect as R,useRef as L,useState as N}from"@bentoproject/core";var C={loading:!1,error:null,pages:[],hasMore:!0},E={fetchJson(e,t){return this.fetch(e,t).then((e=>e.json()))},fetch(t,r){return e(this,null,(function*(){const e=yield self.fetch(t,r);if(!e.ok)throw new Error(e.statusText);return e}))}},J={loadMoreSpinner:"load-more-spinner-cc33818",loadMoreIcon:"load-more-icon-cc33818"},K=["src","fetchJson","itemsKey","maxItems","loadMore","loadMoreBookmark","viewportBuffer","template","wrapperTemplate","loadMoreTemplate","loadingTemplate","errorTemplate"],W=e=>a("div",null,String(e)),A=e=>a("div",null,e),H=(e,t)=>a("div",null,"Unable to Load More ",a("button",{"load-more-retry":!0},a("label",null,a("span",{class:e.loadMoreIcon})," Retry"))),U=()=>a("div",null,a("button",{"load-more-button":!0},a("label",null,"See More"))),$=e=>a("div",null,a("span",{"aria-label":"Loading",class:e.loadMoreSpinner}));function q(e,t){return t.split(".").reduce(((e,t)=>e&&""!==t?e[t]:e),e)}var z=p((function(t,r){let{src:o=null,fetchJson:l=E.fetchJson,itemsKey:i="items",maxItems:p=0,loadMore:b="none",loadMoreBookmark:g="load-more-src",viewportBuffer:P=2,template:O=W,wrapperTemplate:z=A,loadMoreTemplate:F=U,loadingTemplate:G=$,errorTemplate:Q=H}=t,V=function(e,t){if(null==e)return{};var r,o,n={},a=Object.keys(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(t,K);const{renderable:X}=x(),Y=f((()=>({rootMargin:`0% 0% ${Math.floor(100*P)}% 0%`,threshold:0})),[P]),Z=m(null),_=function(e,t){const[r,o]=k(!1);return w((()=>{const r=e.current;if(r)return function(e,t,r){const o=h(e);if(r){const n=j((e=>{t(e[e.length-1])}),o,r);return n.observe(e),()=>{n.unobserve(e)}}let n=v.get(o);n||v.set(o,n=j(y,o));let a=M.get(e);return a||(a=[],M.set(e,a)),a.push(t),n.observe(e),()=>{!function(e,t){const r=M.get(e);if(!r)return;if(!function(e,t){const r=e.indexOf(t);return-1!=r&&(e.splice(r,1),!0)}(r,t))return;if(r.length)return;const o=h(e),n=v.get(o);null==n||n.unobserve(e),M.delete(e)}(e,t)}}(r,(e=>{o(e.isIntersecting)}),t)}),[e,t]),r}(Z,Y),{error:ee,hasMore:te,loadMore:re,loading:oe,pages:ne,reset:ae}=function({fetchPage:t,getNextPageParam:r}){const[o,a]=function(e){const t=L(!1);R((()=>(t.current=!0,()=>{t.current=!1})),[]);const[r,o]=N(e);return[r,I((e=>{t.current&&o(e)}),[o])]}(C),c=S({fetchPage:t,getNextPageParam:r,state:o}),l=B(0),i=T(((t=!1)=>e(this,null,(function*(){const{fetchPage:e,getNextPageParam:r,state:o}=c.current;if(!t&&o.loading)return;const i=++l.current;a((e=>n(n({},e),{},{loading:!0})));const u=t?[]:o.pages,s=u.length?u[u.length-1]:void 0;try{const t=yield e({pageParam:s?r(s):void 0});if(i!==l.current)return;const o=r(t);a({loading:!1,error:null,pages:[...u,t],hasMore:null!=o})}catch(e){if(i!==l.current)return;a((t=>n(n({},t),{},{loading:!1,error:e})))}}))),[c,a]),u=T((()=>i(!0)),[i]);return n(n({},o),{},{loadMore:i,reset:u})}({fetchPage:t=>e(this,[t],(function*({pageParam:e=o}){return X?yield l(e):null})),getNextPageParam:e=>function(e,t){return q(e,t)}(e,g)});u((()=>{ae()}),[o,X,g,ae]);const ce=X&&"auto"===b&&_&&!oe&&te;u((()=>{ce&&re()}),[ce,re]);const le=f((()=>{let e=ne.flatMap((e=>function(e,t){if(!e)return[];let r=q(e,t);return r?(Array.isArray(r)||(r=[r]),r):[]}(e,i)));return p>0&&e.length>p&&(e=e.slice(0,p)),e.map(((e,t)=>{let r=O(e);return r&&"object"==typeof r&&"string"==typeof r.__html&&(r=a("span",{dangerouslySetInnerHTML:r})),D(r,{"key":t,"role":"listitem"})}))}),[ne,i,p,O]),ie=oe,ue=0!==le.length,se="manual"===b&&te&&!oe;s(r,(()=>({refresh:ae})),[ae]);const fe=J;return a(d,n(n({"aria-live":"polite"},V),{},{onClick:e=>{e.target.closest("[load-more-button], [load-more-retry]")&&re()}}),a(c,{"test-id":"contents"},ue&&D(z(le),{"role":"list"}),ie&&G(fe),se&&F(fe),ee&&Q(fe,ee),"auto"===b&&a("span",{ref:Z})))}));function D(e,t){return i(e)?l(e,n(n({},t),e.props)):e}z.displayName="List";var F=class extends t{};F.Component=z,F.props={"src":{attr:"src"},"itemsKey":{attr:"items"},"maxItems":{attr:"max-items",type:"number"},"loadMore":{attr:"load-more"},"loadMoreBookmark":{attr:"load-more-bookmark"},"viewportBuffer":{attr:"viewport-buffer",type:"number"}},F.layoutSizeDefined=!0,F.usesShadowDom=!0,F.usesTemplate=!0;import{defineBentoElement as G}from"@bentoproject/core";function Q(e){G("bento-list",F,e)}export{Q as defineElement};
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
//# sourceMappingURL=web-component.module.js.map
{
"name": "@bentoproject/list",
"version": "1.2204121632.0",
"version": "1.2204122000.0",
"description": "Bento list Component",

@@ -45,4 +45,4 @@ "author": "Bento Authors",

"dependencies": {
"@bentoproject/core": "0.2204121632.0"
"@bentoproject/core": "0.2204122000.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc