Files
004_comission/_utils/_comment_backup/louis coding's Reviews on Carousell Hong Kong_files/a5e797d8e0101001.min.js.download
louiscklaw 6c60a73f30 update,
2025-01-31 19:15:17 +08:00

6 lines
12 KiB
Plaintext

"use strict";
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c575f9da-87b8-5cbd-b564-da9cc5c7b61f")}catch(e){}}();
(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[27],{751:(t,s,n)=>{n.d(s,{Z:()=>r});var i=n(0),e=n(99),o=n(1);class a extends i.PureComponent{render(){const{className:t,color:s,size:n}=this.props,i=this.context;return(0,o.jsx)("svg",{className:t,fill:s??i.urbanGrey90,fillRule:"nonzero",height:n,viewBox:"0 0 24 24",width:n,xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M10.867 14.996H3a1 1 0 0 1-.768-1.64l10-11.996c.639-.767 1.884-.227 1.76.764l-.86 6.874H21a1 1 0 0 1 .768 1.64l-10 11.996c-.639.767-1.884.226-1.76-.764l.86-6.874zm.718-9.737l-6.45 7.737H12a1 1 0 0 1 .992 1.124l-.577 4.614 6.45-7.737H12a1 1 0 0 1-.992-1.124l.577-4.614z",id:"iconBumpOutlined"})})}}a.defaultProps={className:"",size:24},a.contextType=e.WE;const r=a},752:(t,s,n)=>{n.d(s,{Z:()=>r});var i=n(0),e=n(99),o=n(1);class a extends i.PureComponent{render(){const t=this.context,{className:s,color:n,size:i}=this.props;return(0,o.jsx)("svg",{className:s,fill:n??t.orchidPurple40,fillRule:"nonzero",height:i,viewBox:"0 0 24 24",width:i,xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M8.707 11.707a1 1 0 1 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L12 8.414l-3.293 3.293zm0 6a1 1 0 1 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L12 14.414l-3.293 3.293z",id:"IconSpotlight"})})}}a.defaultProps={className:"",size:24},a.contextType=e.WE;const r=a},1022:(t,s,n)=>{n.d(s,{Kt:()=>R,LS:()=>B,SF:()=>L,WC:()=>P,X5:()=>_,_8:()=>C,ah:()=>T,cv:()=>w,dp:()=>q,qQ:()=>z,yp:()=>h});var i=n(6),e=n(4),o=n(1117),a=n(11),r=n(12),l=n(41),c=n(39),g=n(5),u=n(7),p=n(1936);(0,i.PH)(`${o.q5}/listingStatsInsightsGetRequest`);const h=(0,i.PH)(`${o.q5}/listingStatsSpotlightGetRequest`),d=(0,i.oM)({initialState:{activeListingID:null,listingInsights:{},listingInsightsBack:"DEFAULT",listingInsightsError:!1,listingInsightsLoading:!1,spotlightStats:{},spotlightStatsError:!1,spotlightStatsLoading:!1},name:o.q5,reducers:{listingStatsInsightsGetFailure(t,s){t.listingInsightsError=!0,t.listingInsightsLoading=!1},listingStatsInsightsGetPending(t){t.listingInsightsLoading=!0},listingStatsInsightsGetSuccess(t,s){const{listingInsightsStats:n}=s.payload;t.listingInsights[n.listingID]=n,t.listingInsightsLoading=!1},listingStatsInsightsModalShow(t,s){const{listingInsightsBack:n}=s.payload;t.listingInsightsBack=n},listingStatsSpotlightGetFailure(t,s){t.spotlightStatsError=!0,t.spotlightStatsLoading=!1},listingStatsSpotlightGetPending(t,s){t.spotlightStatsLoading=!0},listingStatsSpotlightGetSuccess(t,s){const{spotlightStatsData:n,listingID:i}=s.payload;t.spotlightStats[i]=n,t.spotlightStatsLoading=!1},listingStatsUpdateActiveListingID(t,s){const{listingID:n}=s.payload;t.activeListingID=n,t.listingInsightsError=!1,t.spotlightStatsError=!1}}}),{listingStatsInsightsGetFailure:S,listingStatsInsightsGetPending:m,listingStatsInsightsGetSuccess:f,listingStatsInsightsModalShow:w,listingStatsSpotlightGetFailure:y,listingStatsSpotlightGetPending:I,listingStatsSpotlightGetSuccess:v,listingStatsUpdateActiveListingID:D}=d.actions;function*P(t){yield(0,e.gz)(m());const s=yield(0,e.Ys)(r.c6,{experimentId:"cats-7257-enable-hourly-insights"}),n={listingID:`${t}`};if(s){const t=60*(new Date).getTimezoneOffset()*-1;n.timezoneOffsetSeconds=t}try{const{data:i}=yield(0,e.RE)(a.v_,"wallet",{data:n,path:"/listing_insight/"}),{createdAt:o,createdAtString:r="",graph:l,has_paid_product:c=!1,header:{clicks:g,impressions:u,chats:h},imageURL:d,improvement:S,price:m,status:w,title:y}=i,I=(0,p.ZR)(l.clicks),v=(0,p.ZR)(l.impressions),D=s?(0,p.lj)(l.clicks):void 0,P=s?(0,p.lj)(l.impressions):void 0,{hasBumps:k,hasSpotlight:x}=(0,p.vW)(v);yield(0,e.gz)(f({listingInsightsStats:{chats:h?.count?parseInt(h.count,10):0,clicks:g?.count?parseInt(g.count,10):0,graphClicks:I,graphClicksDetailedDayStats:D,graphImpressions:v,graphImpressionsDetailedDayStats:P,hasBumps:k,hasPaidProduct:c,hasSpotlight:x,imageURL:d,impressions:u?.count?parseInt(u.count,10):0,improvement:S,listedAt:(0,p.IZ)(r||o),listingID:t,ongoingBumps:(0,p.x3)(l.ongoing),price:m,promoteStatus:w,showSpotlight:w.includes(p.QV),title:y}}))}catch(t){yield(0,e.gz)(S({err:t}))}}function*k(t){yield(0,e.gz)(I({listingID:t}));try{const{data:s}=yield(0,e.RE)(a.U2,"listing-stats",{query:{listingID:t}}),{totalImpressions:n,totalViews:i,totalSpend:o,timeStarted:r,pricePackage:l,stats:c}=s,{start:g,end:u}=(0,p.NS)(r.seconds.low,l.duration.low),h=(0,p.Z3)(c);yield(0,e.gz)(v({listingID:t,spotlightStatsData:{end:u,keywordsStats:h,maxCoins:l.coins.low,maxViews:l.views.low,start:g,totalImpressions:n?n.low:0,totalSpend:o,totalViews:i?i.low:0}}))}catch(t){yield(0,e.gz)(y({err:t}))}}function*x(t){const{isDesktop:s,listingID:n}=t.payload;yield(0,e.gz)(D({listingID:n})),s&&(yield(0,e.gz)((0,c.qf)())),yield(0,e.gz)((0,c.Gu)("LISTING_STATS")),yield(0,e.RE)(P,n),yield(0,e.gz)((0,l.S6)([{eAction:"listing_insight_page_viewed",event:"insightsClick",listingId:`${n}`,pageType:"listinginsights"}]))}function*E(t){const{listingID:s}=t.payload;yield(0,e.gz)(D({listingID:s})),yield(0,e.RE)(k,s)}function L(t,s){return t[o.q5].listingInsights[s]}function T(t,s){return t[o.q5].spotlightStats[s]}function C(t){return t[o.q5].listingInsightsLoading}function B(t){return t[o.q5].spotlightStatsLoading}function _(t){return t[o.q5].activeListingID}function z(t){return t[o.q5].listingInsightsBack}function q(t){return t[o.q5].listingInsightsError}function R(t){return t[o.q5].spotlightStatsError}d.reducer,g.Z.register(o.q5,d.reducer),u.Z.register(o.q5,(function*(){yield(0,e.ib)(w.type,x),yield(0,e.ib)(h.type,E)}))},1117:(t,s,n)=>{n.d(s,{Wl:()=>i,p6:()=>e,q5:()=>a,qe:()=>o});const i={CLICKS:"clicks",IMPRESSIONS:"impressions"},e={IMPRESSIONS:"impressions",VIEWS:"views"};var o={None:"None",Paid3DBump:"Paid3DBump",UrgentBump:"UrgentBump",TopSpotlight:"TopSpotlight",Paid1DBump:"Paid1DBump"};const a="ListingStats"},1936:(t,s,n)=>{n.d(s,{Ab:()=>k,Fp:()=>S,IZ:()=>w,Jm:()=>m,K4:()=>E,ML:()=>T,NS:()=>B,QD:()=>q,QV:()=>e,QZ:()=>L,Sz:()=>f,Z3:()=>_,ZR:()=>D,fQ:()=>x,lj:()=>P,tO:()=>I,vW:()=>C,x3:()=>z});var i=n(595);const e="TopSpotlight",o="UrgentBump",a=1,r=2,l=1,c=2,g=8,u=7,p=0,h=1,d=2;function S(t){const s={chatsViewChange:0,listingViewChange:0};return t&&t.forEach((({type:t,value:n})=>{t===a?s.listingViewChange=n.low:t===r&&(s.chatsViewChange=n.low)})),s}function m(t){return t.reduce(((t,{getTotalCount:s})=>s>t?s:t),0)}function f(t,s){return t.reduce(((t,{stats:n})=>{const i=n.reduce(((t,n)=>n.type===s&&n.count>t?n.count:t),0);return t>i?t:i}),0)}function w(t){return"string"==typeof t?new Date(t):new Date(1e3*t)}function y(t){const s="string"==typeof t?new Date(t):new Date(1e3*t),n=function(t){if("string"==typeof t){let s="+00:00";const n=t.indexOf("+");return-1!==n&&(s=t.slice(n)),s}return null}(t);return n?(0,i.Z)(s,n):s}function I(t){if(t&&t.length>0&&t[0].bars){const[{bars:s}]=t;return s.map((({time:{seconds:{low:t}},stacks:s})=>{return n=w(t),i=function(t){const s=[{count:0,type:"ProfilePromotion"},{count:0,type:"Shoutout"},{count:0,type:"OrganicView"}];let n=!1,i=!1;return t.forEach((t=>{if(t?.type===c?i=!0:t?.type===l&&(n=!0),t.value)switch(t.type){case c:s[1].count=t.value.low;break;case l:s[0].count=t.value.low;break;default:s[2].count=t.value.low}})),{hasPromotion:{ProfilePromotion:!!n||void 0,Shoutout:!!i||void 0},stats:s}}(s),{date:n,getTotalCount:i.stats.reduce(((t,{count:s})=>t+s),0),hasPromotion:i.hasPromotion,stats:i.stats};var n,i}))}return[]}function v(t,s){const n={},i=[{count:0,type:"Spotlight"},{count:0,type:"Bumps"},{count:0,type:"OrganicView"}],a=s.reduce(((t,{count:s,type:a})=>{const r=parseInt(`${s}`,10)||0;return a===e?(i[p].count=r,n.Spotlight=!0):a===o?(i[h].count+=r,n.Bumps=!0):i[d].count=r,t+r}),0);return{date:y(t),getTotalCount:a,hasPromotion:n,stats:i}}function D(t){return t.map((({date:t,dateString:s,breakdown:n})=>v(s||t,n)))}function P(t){const s=t.map((t=>t.dateString||t.date)).map((t=>function(t,s){const n=[],i=[{count:0,type:"Spotlight"},{count:0,type:"Bumps"},{count:0,type:"OrganicView"}];for(let t=0;t<12;t++){const e=new Date(s),o=2*t;e.setHours(o,0,0,0);const a=2*(t+1),r=new Date(s);r.setHours(a,0,0,0),n.push({date:e,getTotalCount:0,hasPromotion:{},hourRangeEndValue:r,stats:i})}return n}(0,y(t))));return t.map((({date:t,dateString:n,day_breakdown:i})=>{const e=n||t,o=i?.show_stats??!1;o&&i?.breakdown?.forEach((t=>{const n=y(t.start_time).getHours(),i=y(t.start_time).getDate(),o=v(e,t.stat),a=s?.findIndex((t=>t[0].date.getDate()===i)),r=s?.[a]?.findIndex((t=>n>=t.date?.getHours()&&n<t.date?.getHours()+2)),l=s?.[a]?.[r];var c,g;l&&(s[a][r]=(g=o,{date:(c=l).date,getTotalCount:c.getTotalCount+g.getTotalCount,hasPromotion:{...c.hasPromotion,...g.hasPromotion},hourRangeEndValue:c?.hourRangeEndValue??g?.hourRangeEndValue,stats:[{count:c.stats[p].count+g.stats[p].count,type:"Spotlight"},{count:c.stats[h].count+g.stats[h].count,type:"Bumps"},{count:c.stats[d].count+g.stats[d].count,type:"OrganicView"}]}))}));const a=y(e),r=a.getDate();return{date:a,dayStats:s.find((t=>t[0].date.getDate()===r)),showStats:o}}))}function k(t){const s=new Date,n=s.getHours()>=16?22:s.getHours()+6;return n>=t.getHours()&&n<=t.getHours()+2}function x(t){return t.some((t=>t?.hasPromotion?.ProfilePromotion))}function E(t){const s=t.length===g?t[u]:null,n=s?s.getTotalCount:0;return{promotionActive:s?.hasPromotion.ProfilePromotion??!1,views:n}}function L(t){const s=t.length===g?t[u]:null;return s?.hasPromotion?.Shoutout??!1}function T(t){return t.some((t=>t?.hasPromotion?.Shoutout))}function C(t){let s=!1,n=!1;return t.forEach(((t,i)=>{Object.keys(t.hasPromotion).forEach((t=>{"Spotlight"===t?s=!0:"Bumps"===t&&(n=!0)}))})),{hasBumps:n,hasSpotlight:s}}function B(t,s){const n=y(t),i=y(t);return i.setHours(i.getHours()+s),{end:i,start:n}}function _(t=[]){let s=0;const n={};t.forEach((t=>{if(t.clickStats?.keywords){const{keywords:i}=t.clickStats;i.forEach((t=>{t.keyword&&(void 0===n[t.keyword]&&(n[t.keyword]={clicks:0,coinsPerClick:t.cpc?.low||0}),t.views&&(s+=t.views.low,n[t.keyword].clicks+=t.views.low))}))}}));const i=Object.keys(n).map((t=>({clickStats:n[t],word:t})));return{totalClicks:s,words:i}}function z(t){const s=t.filter((({type:t})=>t&&t!==e));if(!s.length)return null;s.sort(((t,s)=>t.nextTriggerString&&s.nextTriggerString?t.nextTriggerString.localeCompare(s.nextTriggerString):t.nextTrigger.localeCompare(s.nextTrigger)));const[n]=s;return{bumpsRemaining:n.triggersLeft||0,nextTrigger:n.nextTriggerString?y(n.nextTriggerString):n.nextTrigger?w(n.nextTrigger):null}}function q(t){if(t){const s=t.clicks.map((t=>({date:new Date(1e3*t.ts.seconds),getTotalCount:t?.count?.value??0,hasPromotion:{ShoutoutClicks:t?.count?.value>=0},stats:[{count:t?.count?.value??0,type:"ShoutoutClicks"},{count:0,type:t?.count?.value>0?"None":"OrganicView"}]}))),n=t.impressions.map((t=>({date:new Date(1e3*t.ts.seconds),getTotalCount:t?.count?.value??0,hasPromotion:{ShoutoutImpressions:t?.count?.value>=0},stats:[{count:t?.count?.value??0,type:"ShoutoutImpressions"},{count:0,type:t?.count?.value>0?"None":"OrganicView"}]})));return{canPurchaseShoutout:t.canPurchaseShoutout,clicks:s,impressions:n,latestShoutoutSummary:t.latestShoutoutSummary}}return null}},732:t=>{t.exports="https://mweb-cdn.karousell.com/build/coin-d5fe8dbb1e.svg"}}]);
//# sourceMappingURL=https://mdev.llesuorac.com/872d9a325b1c9576132523bfac3e739f6f67875f/a5e797d8e0101001.min.js.map
//# debugId=c575f9da-87b8-5cbd-b564-da9cc5c7b61f