(window["webpackJsonp-ae-fe/cosmos-1"]=window["webpackJsonp-ae-fe/cosmos-1"]||[]).push([[43],{1248:function(e,t,n){"use strict";n.r(t);var r=n(170),o=n(4),i=n.n(o),a=n(17),c=n.n(a),u=n(38),l=n.n(u),s=n(81),f=n.n(s),d=n(83),m=n.n(d),v=n(506);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){m()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(e,t){return l.a.createElement(v.a,b(b({},e),{},{ref:t}))},w=Object(u.forwardRef)(y),O=(n(299),n(624),n(169)),j=n(625),h=n.n(j),g=n(172),S=n(108),A=["data","className","columnNum","onVisible","autoSize"];var C=function(e){var t=e.data,n=e.className,r=e.columnNum,o=e.onVisible,a=(e.autoSize,c()(e,A)),s=Object(u.useRef)({}),d=Object(u.useContext)(S.a),m=d.infinite,v=d.scene,p=Object(u.useState)(""),b=p[0],y=p[1],j=null==t?void 0:t.some((function(e){return"pc_new_card"===e.itemCardType||"app_us_local_card"===e.itemCardType})),C=Object(g.a)(r||6,j),E=C.column,_=C.ref;Object(u.useEffect)((function(){if(_.current){var e=_.current.querySelector(".slick-slide");e&&setTimeout((function(){y((null==e?void 0:e.offsetWidth)<=269?h.a.miniCardContainerBtm:"")}))}}),[t,E]);var T=function(e){s.current[e.productId]||null==o||o(e,{isLoadMore:e.index===t.length-1}),s.current[e.productId]=!0};return l.a.createElement("div",{ref:_,"data-spm":v},(null==t?void 0:t.length)>0&&l.a.createElement(w,{className:f()(h.a.container,n,j?h.a.containerBtm:"",b),infinite:void 0===m||m,lazyLoad:"ondemand",slidesToScroll:E,slidesToShow:E},null==t?void 0:t.filter((function(e){return"rmdproductV3"===e.itemType||"productV3"===e.itemType})).map((function(e,t){return l.a.createElement("div",{key:e.productId,className:h.a.cardContainer},l.a.createElement(O.a,i()({className:f()(h.a.card,"slider-card-item"),show:!0,openHover:!e.rainbow,slider:j,data:e,index:t,onVisible:T},a)))}))))},E=Object(r.a)(C);t.default=E},172:function(e,t,n){"use strict";var r=n(5),o=n(38),i=function(){var e;return!r.isSSR&&"function"==typeof(null===(e=window)||void 0===e?void 0:e.requestAnimationFrame)};var a=function(e){var t,n=!0;return Object(o.useCallback)((function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var c=function(e,n){return i()?(window.cancelAnimationFrame(t),window.requestAnimationFrame(e)):setTimeout(e,n)};n&&(n=!1,t=c((function(){n=!0,e.apply(void 0,o)}),66))}),[])};function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l=r.isSSR?o.useEffect:o.useLayoutEffect;t.a=function(e,t){void 0===t&&(t=!1);var n=Object(o.useRef)(null),r=Object(o.useState)(e),i=r[0],u=r[1],s=a((function(e){var t,n=null==e||null===(t=e.contentRect)||void 0===t?void 0:t.width;n&&u(n>1150?6:5)}));return l((function(){if(t){if(!n.current)return null;if(!window.ResizeObserver)return null;var e=new ResizeObserver((function(e){for(var t,n=c(e);!(t=n()).done;){var r=t.value;s(r)}}));return e.observe(n.current),function(){return e.disconnect()}}return function(){}})),{ref:n,column:i}}},299:function(e,t,n){},624:function(e,t,n){},625:function(e,t,n){e.exports={containerBtm:"_1mKg7",container:"_2vJwD",cardContainer:"_3D2WI",card:"_3uAF4",miniCardContainerBtm:"_1XWjs"}}}]);