PageSourceSearch

https://www.komchadluek.net/_next/static/chunks/1860.094e74d1f6d9740c.js

js komchadluek.net collected 2026-10-01 11:46:47 UTC 8,788 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1860,2973],{81860:function(t,e,n){n.r(e);var r=n(81595),o=n(13976),i=n(10489),a=n(99968),c=n(46369),l=n(64857),u=n(1158),d=n(2265),s=n(37996),f=n(94295);e.default=t=>{var e;let{data:n,path:u="",external:v,className:g,showBlurb:h=!0,showBadge:m=!1,showCountView:b=!1,eventDataLayer:w,imgWidth:x,imgHeight:y,isH3:N=!0,...C}=t,[I,k]=(0,d.useState)(0);(0,d.useEffect)(()=>{(async()=>{try{let t=await (0,i.e)(n);k(t)}catch(t){console.error("".concat((0,a.AB)()," ==========> CARD_V ERROR :"),t.message)}})()},[n]);let D=(0,d.useMemo)(()=>"".concat((null==n?void 0:n.link)||u),[n,u]),R=b&&Number(I)>Number(o.hK),E=m&&(0,a.lC)(n,!1);return(0,r.tZ)(p,{className:"card-v",children:(0,r.BX)(c.Z,{href:D,title:null==n?void 0:n.title,eventDataLayer:w,...C,children:[(0,r.BX)("div",{className:"card-image",children:[(0,r.tZ)(l.default,{src:"".concat(null==n?void 0:n.image),alt:null!==(e=null==n?void 0:n.alt_image)&&void 0!==e?e:null==n?void 0:n.title,external:v}),m&&E&&(0,r.BX)("p",{className:"badge",children:[(null==n?void 0:n.is_video)===!0&&(0,r.tZ)("div",{className:"icon-video",children:(0,r.tZ)(s.BVE,{size:20})}),E||""]}),R&&(0,r.BX)("div",{className:"count-view flex-center",children:[(0,r.tZ)(f.oQS,{size:18}),(0,r.tZ)("small",{children:(0,a.EL)(I)})]})]}),(0,r.BX)("div",{className:"card-content",children:[N?(0,r.tZ)("h3",{className:"title line-clamp --2",children:null==n?void 0:n.title}):(0,r.tZ)("div",{className:"title line-clamp --2",children:null==n?void 0:n.title}),h&&(0,r.tZ)("small",{className:"blurb line-clamp --2",children:(null==n?void 0:n.blurb)||""})]})]})})};let p=(0,u.default)("div",{target:"e1si8ahg0"})("border-radius:20px 20px 0 0;.card-image{position:relative;background-image:url(",o.T,"/images/default.webp);padding-top:56.5%;border-radius:20px 20px 0 0;background-size:cover;background-repeat:repeat;overflow:hidden;background-position:center;.resolution-image{box-shadow:0px 0px 2px 0px var(--background-color);position:absolute;width:100% !important;height:100% !important;top:0;left:0;}img{width:100%;height:auto;object-fit:cover;object-position:center;aspect-ratio:16/9;transform-origin:50% 65%;transition:transform 2s,filter 0.5s ease-out;position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;}.badge{position:absolute;bottom:0;left:0px;border-top-right-radius:10px;padding:0 10px;height:30px;}.count-view{position:absolute;right:5px;bottom:12px;padding:2px 10px;color:var(--white-color);}.icon-video{width:30px;height:30px;}}.card-content{display:block;max-width:100%;min-height:60px;border-radius:0 0 10px 10px;.title{padding-top:5px;}}")},10489:function(t,e,n){n.d(e,{x:function(){return u},e:function(){return d}});var r=n(13976),o=n(99968),i=n(64131),a=n(8946),c=n.n(a);async function l(t,e){let{timeout:n=1e3}=e,r=new AbortController,o=setTimeout(()=>r.abort(),n),i=await fetch(t,{...e,signal:r.signal});return clearTimeout(o),i}let u=async t=>{if(!t)return 0;let e=i.Z.get("_ga"),n=i.Z.get("_gid"),a={site:r.cy,ga:e||"",gid:n||"",newsid:t.id||""},l="".concat(r.Tr,"/cpvs");try{let e=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(c().isEmpty(e)){let n=await e.json();return Number(n)+Number(t.pageviews||0)}return Number(0)}catch(t){return console.warn("".concat((0,o.AB)(),"==========> INCREMENT_COUNTVIEWS ERROR : ").concat(l),t),Number(0)}},d=async t=>{if(!t)return 0;let e=i.Z.get("_ga"),n=i.Z.get("_gid"),a={site:r.cy,ga:e||"",gid:n||"",newsid:t.id||""},c="".concat(r.Tr,"/cpvs");try{let e=await l("".concat(r.Tr,"/cpvs").concat((0,o.lJ)(a)),{timeout:1e3}),n=await e.json();return Number(n)+Number(t.pageviews||0)}catch(t){return console.warn("".concat((0,o.AB)(),"==========> GET_COUNTVIEWS ERROR : ").concat(c),t),Number(0)}}},99968:function(t,e,n){n.d(e,{AB:function(){return f},EL:function(){return y},IQ:function(){return j},JS:function(){return h},Kd:function(){return b},LQ:function(){return v},RO:function(){return R},Sy:function(){return C},WR:function(){return x},bn:function(){return p},cX:function(){return w},dH:function(){return k},iF:function(){return I},lC:function(){return N},lJ:function(){return m},mO:function(){return g},ny:function(){return D},oA:function(){return E}});var r=n(71096),o=n.n(r);n(6729);var i=n(45721),a=n.n(i),c=n(8946),l=n.n(c),u=n(38480),d=n.n(u);o().extend(a());let s=["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],f=()=>o()(Date.now()).format("YYYY-MM-DD HH:MM:ss"),p=t=>{"function"==typeof window.requestIdleCallback?window.requestIdleCallback(t,{timeout:1e3}):setTimeout(t,0)},v=t=>"function"==typeof window.requestIdleCallback?window.requestIdleCallback(t,{timeout:1e3}):window.setTimeout(t,1),g=t=>{"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)};function h(t){return t?o()(t).locale("th").add(543,"year").format("HH:mm"):null}let m=t=>{var e;if(!t||Object.keys(t).length<1)return"";let n=Object.entries(t);return encodeURI("?".concat(null===(e=n.join("&"))||void 0===e?void 0:e.split(",").join("=")))},b=t=>{var e;if(!Array.isArray(t.lottos)||(null===(e=t.lottos)||void 0===e?void 0:e.length)===0)return null;let n=Object.keys(t)[0];return"?".concat(n,"[]=").concat(t.lottos.join("&".concat(n,"[]=")))},w=(t,e)=>l().isArray(t)?(null==t?void 0:t.length)>0?"?".concat(e,"[]=").concat(t.join("&".concat(e,"[]="))):"?".concat(e,"=").concat(t[0]):null;function x(t){return t?o()(t).locale("th").add(543,"year").format("DD MMM YYYY"):null}let y=t=>0===t?null:t>999?d()(t).format("0.0a"):t;function N(t,e){var n,r,o,i,a;return e?"".concat(null==t?void 0:null===(n=t.section)||void 0===n?void 0:n.th,"/").concat(null==t?void 0:null===(r=t.subCategory)||void 0===r?void 0:r.th):(null==t?void 0:null===(o=t.subCategory)||void 0===o?void 0:o.th)?null==t?void 0:null===(i=t.subCategory)||void 0===i?void 0:i.th:null==t?void 0:null===(a=t.section)||void 0===a?void 0:a.th}let C=t=>t?o()(t).locale("th").from(new Date):null;function I(t){if(!t)return null;let e=new Date(t),n=s[e.getMonth()],r=10>e.getDate()?"0"+e.getDate():e.getDate(),o=e.getFullYear()+543;return"".concat(r," ").concat(n," ").concat(o)}function k(t){return new DOMParser().parseFromString(t,"text/html").body.textContent||""}function D(t,e){let n={...t};for(let t=0;t<e.length;t++)delete n[e[t]];return n}function R(t){let e=t.split("/"),n="/";return e.length>3?n=!function(t){for(let e=t.length-1;e>=0;e--)if(!isNaN(t[e])&&""!==t[e])return!0;return!1}(e)?"/[cid]":"/[cid]/[id]":e.length>2?n="/[cid]":e.length>1&&(n="/"),n}let E=t=>"0.0"===t?"-":t,j=t=>{let[e,n,r]=t.split("/");if(!e||!n||!r||isNaN(parseInt(e))||isNaN(parseInt(n))||isNaN(parseInt(r)))throw Error("Invalid date format. Expected format: DD/MM/YYYY");let o=new Date(parseInt(r),parseInt(n)-1,parseInt(e));o.setDate(o.getDate()+1);let i=o.getDate(),a=o.getMonth(),c=(o.getFullYear()+543).toString().slice(-2);return"".concat(i," ").concat(["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."][a]," ").concat(c)}},64131:function(t,e,n){function r(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}n.d(e,{Z:function(){return o}});
vendor: 1,277 bytes, line 1
1var o=function t(e,n){function o(t,o,i){if("undefined"!=typeof document){"number"==typeof(i=r({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,!0!==i[c]&&(a+="="+i[c].split(";")[0]));return document.cookie=t+"="+e.write(o,t)+a}}return Object.create({set:o,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var i=n[o].split("="),a=i.slice(1).join("=");try{var c=decodeURIComponent(i[0]);if(r[c]=e.read(a,c),t===c)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){o(t,"",r({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,r({},this.attributes,e))},withConverter:function(e){return t(r({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}}]);

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.