PageSourceSearch

https://www.ditp.go.th/_next/static/chunks/pages/category/about-ditp-2-d1f80801be2d94f2.js

js ditp.go.th collected 2026-10-02 04:02:47 UTC 6,718 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2910],{14617:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/category/about-ditp-2",function(){return a(66779)}])},3632:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var s=a(85893),l=a(41664),r=a.n(l),n=a(11163);function i(e){let{paths:t}=e,a=(0,n.useRouter)();return(0,s.jsx)("nav",{className:"text-gray-500 text-sm overflow-x-auto whitespace-nowrap custom-scroll",children:(0,s.jsx)("div",{className:"max-w-screen-xl mx-auto px-4",children:(0,s.jsxs)("div",{className:"flex space-x-2 items-center",children:[(0,s.jsx)("img",{src:"/icons/home.png",alt:"Profile",className:"w-4 h-4"}),t.filter(e=>e.label).map((e,l)=>(0,s.jsxs)("div",{className:"flex items-center space-x-2 mt-2",children:[l>0&&(0,s.jsx)("span",{className:"text-gray-400",children:"/"}),l===t.length-1?(0,s.jsx)("span",{className:"text-black font-semibold",children:e.label}):e.link?(0,s.jsx)(r(),{href:e.link,legacyBehavior:!0,locale:a.locale,children:(0,s.jsx)("a",{className:"text-gray-400 hover:text-gray-600",children:e.label})}):(0,s.jsx)("div",{className:"text-gray-400 line-clamp-1",children:e.label})]},l))]})})})}},52467:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var s=a(85893),l=a(69740);function r(e){let{currentPage:t,totalPages:a,itemsPerPage:r,totalItems:n,setCurrentPage:i,setItemsPerPage:d,handlePageClick:c,disableScroll:o=!1}=e,m=()=>{o||(0,l.UK)()||window.scrollTo({top:0,behavior:"auto"})},u=e=>{m(),c(e)};return(0,s.jsx)("div",{className:"max-w-screen-xl mx-auto mt-8",children:(0,s.jsxs)("div",{className:"flex justify-center md:justify-between items-center",children:[(0,s.jsxs)("div",{className:"hidden md:flex md:flex-wrap lg:flex-row items-center",children:[(0,s.jsx)("label",{children:"Items per page"}),(0,s.jsx)("select",{value:r,onChange:e=>{d(Number(e.target.value)),i(1),m()},className:"ml-2 border rounded-md px-2 py-1",children:[10,20,50,100].map(e=>(0,s.jsx)("option",{value:e,children:e},e))}),(0,s.jsxs)("div",{className:"md:mt-2 lg:ml-2",children:["Showing ",(t-1)*r+1," -"," ",Math.min(t*r,n)," of ",n," ","Posts"]})]}),(0,s.jsxs)("div",{className:"flex md:space-x-2",children:[(0,s.jsxs)("button",{onClick:()=>u(t-1),disabled:1===t,className:"px-3 py-1 border rounded-2xl disabled:opacity-50 flex items-center gap-2",children:[(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})}),(0,s.jsx)("div",{className:"hidden md:block",children:"Previous"})]}),(0,s.jsx)("div",{className:"flex items-center space-x-1",children:(()=>{let e=[];for(let s=0;s<Math.min(7,a);s++){let l;l=a<=7?s+1:t<=4?s<5?s+1:5===s?"...":a:t>a-4?0===s?1:1===s?"...":a-(6-s):0===s?1:1===s?"...":s<5?t-(3-s):5===s?"...":a,e.push(l)}return e})().map((e,a)=>(0,s.jsx)("button",{onClick:()=>"number"==typeof e?u(e):null,disabled:"..."===e,className:"px-3 py-1 rounded-lg w-8 h-8 flex items-center justify-center  ".concat(t===e?"bg-[#0E143B] text-white border-[#0E143B]":"text-[#00000080]"),children:e},a))}),(0,s.jsxs)("button",{onClick:()=>u(t+1),disabled:t===a,className:"px-3 py-1 border rounded-2xl disabled:opacity-50 flex items-center gap-2",children:[(0,s.jsx)("div",{className:"hidden md:block",children:"Next"}),(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"})})]})]})]})})}},66779:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return x},default:function(){return h}});var s=a(85893),l=a(3632),r=a(76809);a(24985);var n=a(41664),i=a.n(n),d=a(67294),c=a(11163),o=a(52467),m=a(66308),u=a(63805),x=!0;function h(e){var t,a;let{category:n}=(0,c.useRouter)().query,[x,h]=(0,d.useState)(e.currentPage),[p,b]=(0,d.useState)(e.itemsPerPage),[f,g]=(0,d.useState)((null===(t=e.aboutditp)||void 0===t?void 0:t.data)||[]),[v,j]=(0,d.useState)(0),[w,N]=(0,d.useState)(0),[y,k]=(0,d.useState)(!1);(0,d.useEffect)(()=>{(async()=>{k(!0);try{let e=(await r.hi.getAboutditpcategory(n,x,p)).data;j(e.meta.pagination.total),N(e.meta.pagination.pageCount),g(e.data)}catch(e){console.error("Error fetching data: ",e)}finally{k(!1)}})()}
1,[n,x,p]);let _=[{label:"หน้าหลัก",link:"/"},{label:"เกี่ยวกับกรม (2)",link:"/post/about/about-ditp-2"},{label:[...new Set(f.map(e=>{var t;return null===(t=e.category_about_ditp_2)||void 0===t?void 0:t.name}))]}];return(0,s.jsxs)("div",{className:"pt-16 pb-16",style:{backgroundColor:"#ffffff",backgroundImage:"url('/images/bg.jpg')",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"repeat"},children:[(0,s.jsx)("div",{className:"sticky top-[60px] bg-white",children:(0,s.jsx)(l.Z,{paths:_})}),(0,s.jsx)(m.Z,{title:Array.from(new Set(f.map(e=>{var t;return null===(t=e.category_about_ditp_2)||void 0===t?void 0:t.name}))).join(", "),description:Array.from(new Set(f.map(e=>null==e?void 0:e.title))).join(", "),breadcrumbs:_}),(0,s.jsx)("div",{className:"max-w-screen-lg mx-auto px-4",children:(0,s.jsxs)("div",{className:"mt-8",children:[(0,s.jsx)("h1",{className:"mt-12 mb-8 text-2xl md:text-[40px] font-semibold text-gradient inline",children:[...new Set(f.map(e=>{var t;return null===(t=e.category_about_ditp_2)||void 0===t?void 0:t.name}))]}),(0,s.jsx)("div",{className:"grid grid-cols-1",children:y?Array.from({length:p}).map((e,t)=>(0,s.jsx)("div",{className:"flex flex-col md:flex-row md:justify-between md:items-center mt-4 border-b-2 pb-6 animate-pulse",children:(0,s.jsx)("div",{className:"md:w-[900px]",children:(0,s.jsx)("div",{className:"h-5 bg-gray-200 rounded w-full mb-2"})})},t)):null===(a=(0,u.IU)(f))||void 0===a?void 0:a.map((e,t)=>(0,s.jsx)(i(),{href:"/post/about/about-ditp-2/".concat(e.documentId),children:(0,s.jsxs)("div",{className:"flex flex-col md:flex-row md:justify-between md:items-center mt-4 border-b-2 pb-6",children:[(0,s.jsx)("div",{className:"md:w-[900px]",children:(0,s.jsx)("div",{children:e.title})}),(0,s.jsx)("button",{type:"button",className:"w-[190px] h-[42px] md:h-[53px] border border-[#10143C] rounded-full mt-4 md:mt-0",children:(0,s.jsx)("div",{className:"text-center",children:"ดูรายละเอียด"})})]})},t))}),v>10&&(0,s.jsx)(o.Z,{currentPage:x,totalPages:w,itemsPerPage:p,totalItems:v,setCurrentPage:h,setItemsPerPage:b,handlePageClick:e=>{h(e)}})]})})]})}}},function(e){e.O(0,[2275,6308,1289,2888,9774,179],function(){return e(e.s=14617)}),_N_E=e.O()}]);

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.