PageSourceSearch

https://mindcapital.co/_next/static/chunks/4638-660789750cbbfe6d.js

js mindcapital.co collected 2026-10-09 21:57:42 UTC 11,942 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4638],{40341:(e,t,n)=>{n.d(t,{ru:()=>O});var r=n(63857),s=n(42969),c=n(43081),i=n.n(c);n(14232);var l=n(89099),o=n.n(l),a=n(60072),u=n.n(a),d=n(26757),x=n(33191),f=n.n(x),m=n(88488),v=n(99536),b=n(66763),g=n(94706),h=n(54902),p=n(37876);function j(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 k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){(0,s.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y(e,t){o().push(e)}var N=function(e,t){var n=u()(e)[m.T],r=t.reverse,s=n?(0,d.A)(n):null;return{token:n,user:s,reverse:void 0!==r&&r}},O=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=function(t){return(0,p.jsx)(e,k({},t))};return t=(0,r.A)(i().mark(function t(r){var s,c,l,o,a,u,x,p,j,O,A,P,w,T;return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(c=N(r,n).token,l=null,o=N(r,n).reverse,g.v.debug("withAuth headers",null==(s=r.req)?void 0:s.headers),a=function(e){var t,n,r,s,c,i;return h._.TRUE_MONEY_DEV_ACCESS_TOKEN?(g.v.debug("get tmnToken from ENV TRUE_MONEY_DEV_ACCESS_TOKEN: ".concat(h._.TRUE_MONEY_DEV_ACCESS_TOKEN)),h._.TRUE_MONEY_DEV_ACCESS_TOKEN):null!=e&&null!=(t=e.query)&&t.tmnAccessToken?(g.v.debug("get tmnToken from query params ".concat(null==e||null==(c=e.query)?void 0:c.tmnAccessToken)),null==e||null==(i=e.query)?void 0:i.tmnAccessToken):f().get(m.cr)?(g.v.debug("get tmnToken from cookie: ".concat(f().get(m.cr))),f().get(m.cr)):(g.v.debug("get tmnToken from header: ".concat(null==(n=e.req)?void 0:n.headers["tmn-access-token"])),null!=(r=null==(s=e.req)?void 0:s.headers["tmn-access-token"])?r:null)}(r),u=null,a&&(r.tmnAccessToken=a),(x=function(e){var t,n,r,s,c;return null!=e&&null!=(t=e.query)&&t.scbsAccessToken?(g.v.debug("get scbsToken from query params ".concat(null==e||null==(s=e.query)?void 0:s.scbsAccessToken)),null==e||null==(c=e.query)?void 0:c.scbsAccessToken):f().get(m.T)?f().get(m.T):null!=(n=null==(r=e.req)?void 0:r.headers["scbs-access-token"])?n:null}(r))&&(r.scbsAccessToken=x),!c){t.next=14;break}r.token=c,l=(0,d.A)(c),t.next=33;break;case 14:if(!(!c&&r.tmnAccessToken)){t.next=32;break}return t.next=17,(0,v.F)(a?{accessToken:a}:{});case 17:if(p=t.sent,g.v.debug("withAuth tmnUser: ".concat(JSON.stringify(p))),j=p.public_profile,O=p.email,A=p.tmn_id,!j){t.next=30;break}return t.next=23,(0,b.ds)(O,A);case 23:r.token=c=(P=t.sent).token,r.tmnUserId=u=A,l=c?(0,d.A)(c):null,r.res&&P.setCookie?(g.v.debug("Forwarding Set-Cookie to client: ".concat(P.setCookie)),r.res.setHeader("Set-Cookie",P.setCookie)):g.v.warn("No Set-Cookie header received from API response");case 30:t.next=33;break;case 32:!c&&r.scbsAccessToken&&(r.token=c=x,l=c?(0,d.A)(c):null);case 33:if(g.v.debug("withAuth merkle token: ".concat(c)),g.v.debug("withAuth tmnAccessToken: ".concat(a)),g.v.debug("withAuth user: ".concat(l?l.uuid:"null")),g.v.debug("reverse: ".concat(o)),!(!c&&!o)){t.next=43;break}y("/"!==(w=r.asPath||"/")?"/invest/login?redirect=".concat(encodeURIComponent(w)):"/invest/login",r),t.next=50;break;case 43:if(!(l&&!l.isVerified&&!l.trueMoneyId&&!l.scbsId)){t.next=49;break}return t.next=46,(0,b.ri)("/invest/login");case 46:y("/",r),t.next=50;break;case 49:c&&o&&y("/invest/user-portal",r);case 50:if(t.t0=e.getInitialProps,!t.t0){t.next=55;break}return t.next=54,e.getInitialProps(r);case 54:t.t0=t.sent;case 55:return T=t.t0,t.abrupt("return",k(k({},T),{},{token:c,user:l,tmnAccessToken:a,tmnUserId:u}));case 57:case"end":return t.stop()}},t)})),s.getInitialProps=function(e){return t.apply(this,arguments)},s}},46002:(e,t,n)=>{n.d(t,{A:()=>S,n:()=>R});var r=n(42969),s=n(45784),c=n.n(s),i=n(82101),l=n.n(i),o=n(14232),a=n(89099),u=n(58103),d=n.n(u),x=n(89890),f=n(34846),m=n(21882),v=n(86980),b=n(79412),g=n(34729),h=n(82745),p=n(16839),j=n(44613),k=n(17554),y=n(1794),N=n(9020),O=n(37876);function A(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 P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?A(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var w=function(e){return(0,O.jsx)("svg",P(P({},e),{},{children:(0,O.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.75 6A.75.75 0 0 0 6 5.25H4.125a.75.75 0 0 0 0 1.5H5.25v3a.75.75 0 0 0 1.5 0V6zM3 0h6a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3zm3 4.125a1.125 1.125 0 1 0 0-2.25 1.125 1.125 0 0 0 0 2.25z",fill:"#333987"})}))};w.defaultProps={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var T="text-black",C=function(e){var t=e.active,n=e.onClick;return(0,O.jsx)("button",{className:"py-1 px-3 rounded-md border-2 ".concat("border-black"," text-xs cursor-pointer focus:outline-none flex-1 ").concat(t?"bg-black text-white":null),type:"button",onClick:function(e){e.stopPropagation(),n(e)},children:"PNL"})},E=function(e){var t=e.selectedPeriod,n=e.PLPercent,r=e.isFixedRoi,s=e.fixedRoi;return r&&null!==s?(0,O.jsxs)("div",{className:"text-right",children:[(0,O.jsx)("div",{className:"text-gray-300 text-xs ".concat(T),children:"ROI"}),(0,O.jsx)(b.A,{value:s,suffix:"%"})]}):t?(0,O.jsxs)("div",{className:"text-right",children:[(0,O.jsx)("div",{className:"text-gray-300 text-xs ".concat(T),children:"ROI"}),(0,O.jsx)(b.A,{value:t.roi,suffix:"%"})]}):(0,O.jsxs)("div",{className:"text-right",children:[(0,O.jsx)("div",{className:"text-gray-300 text-xs ".concat(T),children:"P/L"}),(0,O.jsx)(b.A,{value:n,suffix:"%"})]})},_=function(e){var t=e.fund,n=e.favClick,r=e.mvs,s=e.index,i=(0,a.useRouter)(),u=(0,f.Bd)("home").t,b=t.id,A=t.name,P=t.isFollowing,_=t.fundCode,R=t.currencyPolicy,S=r&&r[s]||{},M=S.marketValue,I=S.PLPercent,D=S.accumulatedUnit,F=(0,x.Ay)(["/fund-history/".concat(t.id,"?currency=").concat((0,h.gy)()),"fund-list"],p.GO).data,q=void 0===F?[]:F,V=(0,o.useMemo)(function(){if("MC-BTCS"===_){var e=(0,g.A)("2026-06-29").valueOf();return q.filter(function(t){return(0,g.A)(t.createdAt).valueOf()>=e})}return q},[q,_]),U=(0,v.hp)(R),Y=(0,o.useMemo)(function(){return(0,j.Yu)(V,u)},[y.Ay.language,V]),B=l()(V),G=(0,o.useState)(),z=G[0],H=G[1],K=c()("roi")(Y),L=(0,o.useState)(!1),X=L[0],J=L[1];return(0,o.useEffect)(function(){J((null==M?void 0:M.amount)>0)},[M]),(0,o.useEffect)(function(){return H(X?void 0:K)},[K,X]),(0,O.jsx)("div",{className:"block bg-gray-100-override rounded-xl relative cursor-pointer","data-cy":"test-fund"===t.name?"fund-card":"",onClick:function(){return i.push("./funds/".concat((0,v.hX)(A)))},role:"button",tabIndex:0,onKeyDown:function(e){"Enter"===e.key&&i.push("./funds/".concat((0,v.hX)(A)))},children:(0,O.jsxs)("div",{className:"flex flex-col justify-between bg-no-repeat px-5 py-4 relative",style:{backgroundImage:"url('/static/icons/illust7.svg')",height:240},children:[("M-TRIGGER1"===_||"M-TRIGGER2"===_)&&(0,O.jsx)("div",{className:"absolute top-0 left-0 w-full h-full z-10 flex justify-center items-center"}),(0,O.jsxs)("div",{className:"flex items-center justify-between",children:[(0,O.jsxs)("div",{className:"flex",children:[(0,O.jsxs)("div",{children:[(0,O.jsx)("div",{className:"".concat(T," font-semibold"),children:A}),_&&(0,O.jsxs)("div",{className:"text-gray-300 text-sm",children:["(",_,")"]})]}),(null==t?void 0:t.isClosed)&&(0,O.jsx)("div",{className:"self-start text-[#FF0000] font-bold text-base w-fit ml-3 rounded-xl border-[#FF0000] border-2 px-2 py-0.5 leading-normal -mt-1",children:null!=t&&t.textClosed?null==t?void 0:t.textClosed:u("fund_closed")})]}),(0,O.jsx)("button",{className:"focus:outline-none",type:"button",onClick:function(e){e.stopPropagation(),n(b)},children:(0,O.jsx)(m.A.Star,{className:d()("pinned-star cursor-pointer svg-icon-stroke-black",{"fill-yellow":!0===P})})})]}),(0,O.jsxs)("div",{className:"text-sm",children:[(0,O.jsx)("div",{className:"block",children:(0,j.Uy)(t.ibaTag)[0]}),(0,O.jsx)("div",{className:"block",children:(0,j.Uy)(t.ibaTag)[1]})]}),(0,O.jsxs)("div",{className:"flex mt-auto flex-col",children:[(0,O.jsx)("div",{className:"flex items-center gap-x-10",children:X&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)("div",{children:[(0,O.jsx)("div",{className:"text-xs ".concat(T," font-semibold"),children:u("fund_card_market_value")}),(0,O.jsx)("div",{className:"text-sm text-merkle-gray-300",children:(0,v.up)((0,N.l0)(M,t.currencyPolicy),{precision:U})})]}),(0,O.jsxs)("div",{className:"ml-auto text-right md:m-auto md:text-left",children:[(0,O.jsx)("div",{className:"text-xs ".concat(T," font-semibold"),children:u("amount",{ns:"common"})}),(0,O.jsx)("div",{className:"text-sm text-merkle-gray-300",children:"BTC"===R?(0,v.ov)(D):(0,v.IV)(D)})]})]})}),(0,O.jsxs)("div",{className:"flex items-center justify-between mt-2",children:[(0,O.jsxs)("div",{className:"".concat(T," font-semibold"),children:[null!=t&&t.isFixedPrice&&null!=t&&t.fixedPrice?(0,O.jsx)(O.Fragment,{children:null!=t&&t.fixedPrice?(0,v.up)((0,N.l0)({amount:null==t?void 0:t.fixedPrice,currency:"THB"},t.currencyPolicy),{precision:U}):"-"}):(0,O.jsx)("b",{className:"ml-auto font-ibmplex ".concat(T),children:B?(0,v.up)((0,N.l0)(B.unitNAV,t.currencyPolicy),{precision:U}):"-"}),(0,O.jsx)("div",{className:"text-xs text-gray-200 font-normal text-merkle-gray-300",children:"M-TRIGGER2"===_?"04/03/2024":(0,g.A)(null==B?void 0:B.createdAt).format("DD/MM/YYYY")})]}),(0,O.jsx)(E,{selectedPeriod:z,PLPercent:I,isFixedRoi:null==t?void 0:t.isFixedRoi,fixedRoi:null==t?void 0:t.fixedRoi})]})]}),X&&(0,O.jsx)("div",{className:"bg-black text-white text-xs px-4 absolute bottom-0 rounded-t-lg",children:u("fund_list_investing_badge")}),(null==t?void 0:t.isNotice)&&(null==t?void 0:t.notice)&&(0,O.jsxs)("div",{className:"flex items-center text-[#333987] text-xs mt-1",children:[(0,O.jsx)(w,{className:"mr-2 w-[12px] h-[12px]"}),null==t?void 0:t.notice]}),(0,O.jsx)(k.A,{periods:Y,onClick:H,currentPeriod:z,className:d()("pb-2",(null==t?void 0:t.fundCode)==="M-STA"?"pt-1":""),size:"compact",children:X?(0,O.jsx)(C,{active:!z,onClick:function(){return H(void 0)}}):null})]})})},R=function(e){var t=e.count,n=e.className;return(0,O.jsx)("div",{className:void 0===n?"grid gap-3 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-2 2xl:grid-cols-3":n,children:Array.from({length:void 0===t?6:t}).map(function(e,t){return(0,O.jsx)("div",{className:"animate-pulse bg-gray-100-override rounded-xl",style:{height:240}},t)})})};let S=function(e){var t=e.funds,n=e.favClick,r=e.marketValue;return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)("div",{className:"grid gap-3 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-2 2xl:grid-cols-3",children:Object.values(t).map(function(e,t){var s;return(0,O.jsx)(_,{fund:e,index:t,favClick:n,mvs:r},null!=(s=e.id)?s:t)})})})}}
1,79412:(e,t,n)=>{n.d(t,{A:()=>l}),n(14232);var r=n(58103),s=n.n(r),c=n(86980),i=n(37876);let l=function(e){var t=e.component,n=e.className,r=e.value,l=e.suffix;if(void 0===r)return(0,i.jsx)(i.Fragment,{children:"-"});var o=r>=0,a=0===r;return(0,i.jsxs)(void 0===t?"span":t,{className:s()(n,{"font-semibold":!0,"text-roi":a,"text-primary-300":!a&&o,"text-failure":!a&&!o}),children:[o?"+":"-",(null==l?void 0:l.trim())==="BTC"?(0,c.EB)(Math.abs(r)):(0,c.N4)(Math.abs(r)),l]})}}}]);

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.