PageSourceSearch

https://hahow.in/static/js/9443.620149be.chunk.js

js hahow.in collected 2026-10-01 12:30:48 UTC 15,174 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkhh_frontend_react=self.webpackChunkhh_frontend_react||[]).push([[9443],{47884:(e,t,n)=>{n.d(t,{S:()=>_});var r=n(1413),i=n(45987),o=n(77609),a=n(66359),s=n(63605),l=n(75751),c=n(74948),d=n(16206),u=n(65437),p=n(93433),v=n(79271),h=n(62269),g=n(11500),y=function(e){var t,n,r=function(e){var t,n=e.products,r=e.coverImage,i=e.squareCoverImage;return n.reduce((function(e,t){var n=t.coverImage,r=t.squareCoverImage||n;return{coverImageURLs:n?[].concat((0,p.Z)(e.coverImageURLs),[n.url]):e.coverImageURLs,squareCoverImageURLs:r?[].concat((0,p.Z)(e.squareCoverImageURLs),[r.url]):e.squareCoverImageURLs}}),{coverImageURLs:[r.url],squareCoverImageURLs:[null!==(t=null===i||void 0===i?void 0:i.url)&&void 0!==t?t:r.url]})}(e),i=r.squareCoverImageURLs,o=r.coverImageURLs;return{id:e._id,title:e.title,href:(0,v.Gn)(h.WD8,{collectionId:e._id}),description:e.previewDescription,coverImageURL:o,squareCoverImageURL:i,currencyCode:null!==(t=e.currencyCode)&&void 0!==t?t:"TWD",price:e.price,isBought:e.hasBought,productCategoryCounter:(0,g.V_)(e.products),discountTag:e.bestDiscount?{type:e.bestDiscount.info.discountType,percentage:e.bestDiscount.info.discountedPercentage}:void 0,quota:null===(n=e.quota)||void 0===n?void 0:n.quota}},f=n(62597),m=n(73528),b=n.n(m),w=n(67208),C=n(59403),k=function(e){var t,n,i,o={id:e._id,title:e.title,href:(0,v.Gn)(h.KtW,{liveEventId:e._id}),squareCoverImageURL:null!==(t=null===(n=e.squareCoverImage)||void 0===n?void 0:n.url)&&void 0!==t?t:e.coverImage.url,coverImageURL:e.coverImage.url,creator:{name:e.creators[0].name,href:(0,w.i)(e.creators[0])},isSubscribed:e.hasSubscribed,subscribedCount:e.subscribedCount,startAt:new Date(e.startAt),endAt:new Date(e.endAt),playbackStartAt:new Date(e.playbackStartAt)};if("FREE"===e.type)return(0,r.Z)((0,r.Z)({},o),{},{type:e.type,status:C.Rv.getStatus({currentTime:new Date,startAt:new Date(e.startAt),endAt:new Date(e.endAt),playbackStartAt:new Date(e.playbackStartAt),playbackEndAt:new Date(e.playbackEndAt)}),playbackEndAt:C.Rv.getReplayEndAt({playbackEndAt:new Date(e.playbackEndAt)})});var a=e.liveReplay?{viewEndAt:new Date(e.liveReplay.viewEndAt),sellEndAt:new Date(e.liveReplay.sellEndAt),price:e.liveReplay.price,currencyCode:e.liveReplay.currencyCode}:void 0,s=C.F7.getStatus({currentTime:new Date,startAt:new Date(e.startAt),endAt:new Date(e.endAt),playbackStartAt:new Date(e.playbackStartAt),playbackEndAt:new Date(e.playbackEndAt),isBought:e.hasBought,isBoughtLiveReplay:e.hasBoughtLiveReplay,hasLiveReplaySell:e.hasLiveReplaySell,liveReplay:a,allowedToWatchPlayback:e.allowedToWatchPlayback});return(0,r.Z)((0,r.Z)({},o),{},{type:e.type,status:s,playbackEndAt:C.F7.getReplayEndAt({playbackEndAt:new Date(e.playbackEndAt),isBoughtLiveReplay:e.hasBoughtLiveReplay,isBought:e.hasBought,hasLiveReplaySell:e.hasLiveReplaySell,liveReplay:a}),price:function(){switch(s){case"AFTER_BROADCASTING":case"PLAYBACK":case"AFTER_PLAYBACK":return e.hasLiveReplaySell&&e.liveReplay&&b()().isBefore(e.liveReplay.sellEndAt)?e.liveReplay.price:e.price;default:return e.price}}(),currencyCode:e.currencyCode,liveReplaySellEndAt:null!==(i=e.liveReplay)&&void 0!==i&&i.sellEndAt?new Date(e.liveReplay.sellEndAt):new Date,discountTag:e.bestDiscount?{type:e.bestDiscount.info.discountType,percentage:e.bestDiscount.info.discountedPercentage}:void 0})},E=n(72426),I=n.n(E),A=n(47826),R=function(e){var t=e.saleStartAt,n=e.saleExpiredAt,r=e.quota,i=I()();return i.isBefore(t)?A.$.COMING_SOON:n&&i.isAfter(n)?A.$.END_OF_SALE:void 0!==r&&0===r?A.$.SOLD_OUT:void 0!==r&&r<=10?A.$.LIMITED_STOCK_REMAINING:A.$.FOR_SALE},D=function(e){var t,n=e.purchasePlan.startAt?new Date(e.purchasePlan.startAt):new Date,r=e.purchasePlan.expiredAt?new Date(e.purchasePlan.expiredAt):void 0,i=null!==(t=e.purchasePlan.quota)&&void 0!==t?t:void 0;return{id:e._id,href:(0,v.Gn)(h.AUz,{productId:e._id}),squareCoverImageURL:e.squareCoverImage?e.squareCoverImage.url:e.coverImage.url,coverImageURL:e.coverImage.url,title:e.title,creator:{name:e.owner.name,href:(0,w.i)(e.owner)}
1,isBought:e.hasBought,price:e.purchasePlan.price,originalPrice:e.purchasePlan.originalPrice,currencyCode:e.purchasePlan.currencyCode,saleStartAt:n,saleExpiredAt:r,discountTag:e.bestDiscount?{type:e.bestDiscount.info.discountType,percentage:e.bestDiscount.info.discountedPercentage}:void 0,quota:i,status:R({saleStartAt:n,saleExpiredAt:r,quota:i})}},L=n(80184),S=["className","product","lazyLoad","tracking","onClick"],_=function(e){var t,n=e.className,p=e.product,v=e.lazyLoad,h=e.tracking,g=e.onClick,m=(0,i.Z)(e,S),b=(0,s.P)().me,w=(0,a.B)("course"===p.category?"courses":"articles",p.data._id),C=w.bookmarked,E=w.toggleBookmarked;return(0,L.jsx)(o.Il,(0,r.Z)((0,r.Z)({"data-testid":"salesProductCard"},m),{},{className:n,isBookmarkActive:C,lazyLoad:v,product:(t=p,"liveEvent"===t.category?(0,r.Z)((0,r.Z)({},t),{},{data:k(t.data)}):"collection"===t.category?(0,r.Z)((0,r.Z)({},t),{},{data:y(t.data)}):"service"===t.category?(0,r.Z)((0,r.Z)({},t),{},{data:D(t.data)}):(0,r.Z)((0,r.Z)({},t),{},{data:(0,f.I)(t.data)})),onBookmarkToggle:function(){E(),"course"===p.c
1ategory&&(u.jY.sendEvent({location:"collection",action:C?"cancel":"add",course:p.data}),C||l.E.Bookmark.sendEvent({uid:null===b||void 0===b?void 0:b._id,products:(0,d.Y0)(p.data)}))},onClick:function(e){if(null!==h&&void 0!==h&&h.forCDP&&l.E.ClickProduct.sendEvent({uid:null===b||void 0===b?void 0:b._id,p:h.forCDP.p,products:(0,c.vO)(p),misoId:h.forCDP.misoId}),null!==h&&void 0!==h&&h.forMixpanel)switch(p.category){case"course":u.pp.sendEvent((0,r.Z)({course:p.data},h.forMixpanel));break;case"collection":u.fI.sendEvent((0,r.Z)({collection:p.data},h.forMixpanel));break;case"liveEvent":u.MZ.sendEvent((0,r.Z)({liveEvent:p.data},h.forMixpanel));break;case"service":u.$7.sendEvent((0,r.Z)({service:p.data},h.forMixpanel))}null===g||void 0===g||g(e)}}))}},99443:(e,t,n)=>{n.r(t),n.d(t,{PersonalizedCourses:()=>L,PurePersonalizedCourses:()=>D});var r=n(1413),i=n(25634),o=n(72791),a=n(12169),s=n(54270),l=n(19348),c=n(79271),d=n(47884),u=n(62269),p=n(63605),v=n(46560),h=n(75751),g=n(74948),y=n(26024),f=n(45753),m=n(78320),b=n(50150),w=n(35739),C=n(80184),k=i.ZP.div.withConfig({componentId:"sc-145l8hc-0"})([""]),E=i.ZP.section.withConfig({componentId:"sc-145l8hc-1"})(["padding:32px 0;"]),I=i.ZP.h2.withConfig({componentId:"sc-145l8hc-2"})(["margin:0;color:",";",""],(function(e){return e.theme.sys.color.text.emphasize.value}),(function(e){return e.theme.style.typography.title["title3-bold"]})),A=i.ZP.div.withConfig({componentId:"sc-145l8hc-3"})(["margin-top:24px;display:grid;align-items:start;grid-template-rows:repeat(3,auto);grid-template-columns:auto;row-gap:16px;@media (min-width:","px){grid-template-columns:repeat(3,1fr);grid-template-rows:auto;row-gap:0;column-gap:16px;}@media (min-width:","px){grid-template-columns:repeat(4,1fr);}"],f.yJ.sm+1,f.yJ.md+1),R=(0,i.ZP)(d.S).withConfig({componentId:"sc-145l8hc-4"})([":not(:last-child){padding-bottom:16px;border-bottom:solid 1px ",";}@media (min-width:","px){:not(:last-child){border:none;padding:0;}}"],(function(e){return e.theme.sys.color.border.default.value}),f.yJ.sm+1),D=function(e){var t=e.className,n=e.recentlyViewedCourses,r=e.recommendedCourses,i=e.recentlyViewedTitle,o=e.recommendedTitle,a=(0,v.i)().width,s=a<=f.yJ.sm?"horizontalSmall":"vertical",c=a<=f.yJ.md?n.slice(0,3):n.slice(0,4),d=a<=f.yJ.md?r.slice(0,3):r.slice(0,4),u=function(e){return function(t){a<=f.yJ.sm&&t&&e&&h.E.ViewableImpressions.sendEvent({category:"COURSE",products:[e]})}},p=(0,l.YD)({threshold:.5,onChange:function(e){a>f.yJ.sm&&e&&(null===d||void 0===d?void 0:d.length)>0&&h.E.ViewableImpressions.sendEvent({category:"COURSE",products:d})}}).ref;return(0,C.jsxs)(k,{className:t,children:[c.length>0&&(0,C.jsxs)(E,{children:[(0,C.jsx)(I,{children:i}),(0,C.jsx)(A,{children:c.map((function(e){return(0,C.jsx)(R,{layoutVariant:s,product:{category:"course",data:e},tracking:{forCDP:{p:"course sale page"},forMixpanel:{location:"salePage",subLocation:"historyViewed"}}},e._id)}))})]}),(0,C.jsxs)(E,{children:[(0,C.jsx)(I,{children:o}),(0,C.jsx)(A,{ref:p,children:d.map((function(e){return(0,C.jsx)(l.df,{as:"div",threshold:.5,onChange:u(e),children:(0,C.jsx)(R,{layoutVariant:s,product:{category:"course",data:e},tracking:{forCDP:{p:"course sale page"},forMixpanel:{location:"salePage",subLocation:"recommend"}}})},e._id)}))})]})]})},L=function(e){var t,n,i=function(){var e=(0,p.P)().isLogin,t=(0,b.a)({queryKey:[w.aIL.GET_MY_VIEW_RECORDS,{queryString:{limit:4},params:{category:"COURSE"}}],enabled:e}),n=t.data,i=t.isLoading,a=t.isFetching,s=(0,o.useMemo)((function(){return null===n||void 0===n?void 0:n.map((function(e){var t=e.data;return(0,r.Z)({},t)}))}),[n]);return(0,o.useMemo)((function(){return{isLoading:i,isFetching:a,courses:null!==s&&void 0!==s?s:[]}}),[s,i,a])}(),l=i.courses,d=i.isFetching,v=function(e){var t=e.limit,n=e.anonymousId,r=e.affiliateCoursesOnly,i=(0,b.a)({queryKey:[w.aIL.GET_RECOMMENDED_COURSES,{queryString:{limit:t,anonymousId:n,affiliateCoursesOnly:r}}]}),a=i.data,s=i.isLoading,l=i.isFetching;return(0,o.useMemo)((function(){var e;return{isLoading:s,isFetching:l,courses:null!==(e=null===a||void 0===a?void 0:a.data)&&void 0!==e?e:[]}}),[s,l,a])}({limit:4,affiliateCoursesOnly:!!y.l.isMarketAmerica.get(),anonymousId:null===(t=window.miso)||void 0===t||null===(n=t.context)||void 0===n?void 0:n.anonymous_id}),f=v.courses,k=v.isFetching,E=(0,p.P)().me,I=(0,a.qM)("features/course").t,A={recentlyViewedTitle:I("PersonalizedCourses.RecentlyViewedTitle","\u6700\u8fd1\u700f\u89bd"),recommendedTitle:I("PersonalizedCourses.RecommendedTitle","\u731c\u4f60\u559c\u6b61")},R=(0,m.z)().rawCourse,L=function(e){var t=(0,c.Gn)(u.MRy,{courseId:e._id});return"".concat(window.location.origin).concat(t)};return(0,o.useEffect)((function(){!k&&f.length>0&&h.E.ProductImpressions.sendEvent({p:"course sale page",uid:null===E||void 0===E?void 0:E._id,impressions:(0,g.sk)(f,"recommended courses")})}),[null===R||void 0===R?void 0:R._id,k,f,null===E||void 0===E?void 0:E._id]),(0,o.useEffect)((function(){!d&&l.length>0&&h.E.ProductImpressions.sendEvent({p:"course sale page",uid:null===E||void 0===E?void 0:E._id,impressions:(0,g.sk)(l,"recently viewed")})}
1),[null===R||void 0===R?void 0:R._id,d,l,null===E||void 0===E?void 0:E._id]),(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s.q,{script:[{type:"application/ld+json",innerHTML:JSON.stringify({"@context":"https://schema.org","@type":"ItemList",itemListElement:f.map((function(e,t){return{"@type":"ListItem",position:t+1,url:L(e),name:e.title}}))})}]}),(0,C.jsx)(D,(0,r.Z)((0,r.Z)((0,r.Z)({},A),e),{},{recentlyViewedCourses:l,recommendedCourses:f}))]})}},19348:(e,t,n)=>{n.d(t,{YD:()=>b,df:()=>m});var r=n(29439),i=n(15671),o=n(43144),a=n(53640),s=n(60136),l=n(72791);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}var d=new Map,u=new WeakMap,p=0,v=void 0;function h(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return"".concat(t,"_").concat("root"===t?(n=e.root)?(u.has(n)||(p+=1,u.set(n,p.toString())),u.get(n)):"0":e[t]);var n})).toString()}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:v;if("undefined"===typeof window.IntersectionObserver&&void 0!==r){var i=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"===typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),function(){}}var o=function(e){var t=h(e),n=d.get(t);if(!n){var r,i=new Map,o=new IntersectionObserver((function(t){t.forEach((function(t){var n,o=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&"undefined"===typeof t.isVisible&&(t.isVisible=o),null==(n=i.get(t.target))||n.forEach((function(e){e(o,t)}))}))}),e);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:i},d.set(t,n)}return n}(n),a=o.id,s=o.observer,l=o.elements,c=l.get(e)||[];return l.has(e)||l.set(e,c),c.push(t),s.observe(e),function(){c.splice(c.indexOf(t),1),0===c.length&&(l.delete(e),s.unobserve(e)),0===l.size&&(s.disconnect(),d.delete(a))}}var y=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function f(e){return"function"!==typeof e.children}var m=function(e){function t(e){var n;return(0,i.Z)(this,t),(n=(0,a.Z)(this,t,[e])).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),f(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!e.initialInView,entry:void 0},n}return(0,s.Z)(t,e),(0,o.Z)(t,[{key:"componentDidUpdate",value:function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())}},{key:"componentWillUnmount",value:function(){this.unobserve(),this.node=null}},{key:"observeNode",value:function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,i=e.trackVisibility,o=e.delay,a=e.fallbackInView;this._unobserveCb=g(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:i,delay:o},a)}}},{key:"unobserve",value:function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}},{key:"render",value:function(){if(!f(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}
1var r=this.props,i=r.children,o=r.as,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,y);return l.createElement(o||"div",c({ref:this.handleNode},a),i)}}])}(l.Component);function b(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.threshold,i=t.delay,o=t.trackVisibility,a=t.rootMargin,s=t.root,c=t.triggerOnce,d=t.skip,u=t.initialInView,p=t.fallbackInView,v=t.onChange,h=l.useState(null),y=(0,r.Z)(h,2),f=y[0],m=y[1],b=l.useRef(),w=l.useState({inView:!!u,entry:void 0}),C=(0,r.Z)(w,2),k=C[0],E=C[1];b.current=v,l.useEffect((function(){var e;if(!d&&f)return e=g(f,(function(t,n){E({inView:t,entry:n}),b.current&&b.current(t,n),n.isIntersecting&&c&&e&&(e(),e=void 0)}),{root:s,rootMargin:a,threshold:n,trackVisibility:o,delay:i},p),function(){e&&e()}}),[Array.isArray(n)?n.toString():n,f,s,a,c,d,o,p,i]);var I=null==(e=k.entry)?void 0:e.target,A=l.useRef();f||!I||c||d||A.current===I||(A.current=I,E({inView:!!u,entry:void 0}));var R=[m,k.inView,k.entry];return R.ref=R[0],R.inView=R[1],R.entry=R[2],R}}}]);
2//# sourceMappingURL=9443.620149be.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.