1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2486],{29617:function(e,a,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/vehicle-registrations/[[...vehicle]]",function(){return r(64639)}])},75997:function(e,a,r){"use strict";let t;r.d(a,{_:function(){return l}});let l={HOME:"/",COMMUNITY:"/community",DATA_CATALOGUE:"/data-catalogue",DATA_GPT:"/datagpt",DASHBOARD:"/dashboard",HELPDESK:"/helpdesk",BIRTHDAY_EXPLORER:"/dashboard/birthday-explorer",BUSINESS_CREATION_DESTRUCTION:"/dashboard/business-creation-destruction",CAR_POPULARITY:"/dashboard/car-popularity",CIRCLE_OF_LIFE:"/dashboard/circle-of-life",CIVIL_SERVICE:"/dashboard/civil-service",CRIME:"/dashboard/crime",CURRENCY_IN_CIRCULATION:"/dashboard/currency-in-circulation",DRUG_ADDICTION:"/dashboard/drug-addiction",ELECTRONIC_PAYMENTS:"/dashboard/electronic-payments",FIRE_RESCUE:"/dashboard/fire-and-rescue",FLOOD_WARNING:"/dashboard/flood-warning",GOVERNMENT_SITE_TRACKER:"/dashboard/government-site-tracker",HOUSEHOLD_DEBT:"/dashboard/household-debt",IMMIGRATION:"/dashboard/immigration",INCOME_TAXATION:"/dashboard/income-taxation",INISIATIF_PENDAPATAN_RAKYAT:"/dashboard/inisiatif-pendapatan-rakyat",INTEREST_RATES:"/dashboard/interest-rates",INTERNATIONAL_RESERVES:"/dashboard/international-reserves",INTERNET_PENETRATION:"/dashboard/internet-penetration",JOBLESS_CLAIMS:"/dashboard/jobless-claims",KTMB_EXPLORER:"/dashboard/ktmb-explorer",MONEY_SUPPLY:"/dashboard/money-supply",NAME_POPULARITY:"/dashboard/name-popularity",ORANG_ASLI:"/dashboard/orang-asli",PASSPORT_AND_PASSES:"/dashboard/passport-and-passes",POVERTY:"/dashboard/poverty",PUBLIC_CONTRACTING:"/dashboard/public-contracting",PUBLIC_PENSION:"/dashboard/public-pension",PUBLIC_TRANSPORTATION:"/dashboard/public-transportation",RAPID_EXPLORER:"/dashboard/rapid-explorer",REFUGEE_SITUATION:"/dashboard/refugee-situation",RESERVE_MONEY:"/dashboard/reserve-money",RETIREMENT_READINESS:"/dashboard/retirement-readiness",SEKOLAHKU:"/dashboard/sekolahku",VEHICLE_REGISTRATIONS:"/dashboard/vehicle-registrations",WEATHER_CLIMATE:"/dashboard/weather-and-climate",GUI:"/gui",GUI_OPENDOSM_PUB:"/gui/opendosm-pub",GUI_CATALOGUE:"/gui/catalogue",COMMUNITY_PRODUCTS:"/community-products",DATA_REQUEST:"/data-request",ODIN:"/odin-self-assessment"};(t=Object.values(l).filter(e=>!["/data-catalogue","/data_request","/community-products"].includes(e))).forEach(e=>{t.push("/ms-MY".concat(e))})},64639:function(e,a,r){"use strict";r.r(a),r.d(a,{__N_SSG:function(){return T},default:function(){return _vehicle_}});var t=r(52322),l=r(75997),i=r(46955),n=r(77205),s=r(331),o=r(88043),d=r(42489),c=r(84238),u=r(70784),m=r(9483),h=r(31891),p=r(36874),g=r(76290),x=r(46096),y=r(28663),f=r(25237),b=r.n(f),_=r(82876);let v=["car","motorcycle","lorry","van","bus","other"],N=["petrol","greendiesel","diesel","hybrid","electric","other"],E=b()(()=>Promise.all([r.e(5587),r.e(5964),r.e(8506),r.e(7394),r.e(3854)]).then(r.bind(r,22710)),{loadableGenerated:{webpack:()=>[22710]},ssr:!1});var vehicle_registrations=e=>{let{last_updated:a,next_update:r,dropdown:f,params:b,vehicle_timeseries:w,vehicle_timeseries_callout:j,fuel_timeseries:T,fuel_timeseries_callout:A}=e,{t:R,i18n:I}=(0,g.$)("dashboard-vehicle-registrations"),{push:S}=(0,_.useRouter)(),O={0:{period:"month",periodly:"monthly"},1:{period:"year",periodly:"yearly"}},M=f.map(e=>({label:R(e),value:e})),{data:k,setData:C}=(0,x.e)({vehicle_type:b.vehicle_type,fuel_index:0,fuel_minmax:[0,T.data.monthly.x.length-1],fuel_period:"month",fuel_periodly:"monthly",index:0,minmax:[0,w.data.monthly.x.length-1],period:"month",periodly:"monthly"}),P=w.data[k.periodly].x[w.data[k.periodly].x.length-1],{coordinate:L}=(0,y.M)(w.data[k.periodly],k.minmax),{coordinate:U}=(0,y.M)(T.data[k.fuel_periodly],k.fuel_minmax);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Z,{background:"blue",category:[R("common:categories.transportation"),"text-primary dark:text-primary-dark"],header:[R("header")],description:[R("description")],last_updated:a,next_update:r,agencyBadge:(0,t.jsx)(n.Z,{agency:"jpj"})}),(0,t.jsxs)(s.Z,{children:[(0,t.jsx)(o.Z,{title:R("registration_by_fuel"),description:(0,t.jsxs)("div",{className:"flex flex-col justify-center gap-3",children:[(0,t.jsx)("p",{children:R("registrations_not_licenses")}),(0,t.jsx)(d.Z,{anchor:"left",width:"w-full sm:w-fit",options:M,selected:k.vehicle_type?M.find(e=>e.value===k.vehicle_type):void 0,onChange:e=>{C("vehicle_type",e.value),S("".concat(l._.VEHICLE_REGISTRATIONS,"/").concat("all"===e.value?"":e.value),{scroll:!1})}})]}),date:T.data_as_of,menu:(0,t.jsx)(c.aV,{current:k.fuel_index,onChange:e=>{C("fuel_index",e),C("fuel_minmax",[0,T.data[O[e].periodly].x.length-1]),C("fuel_period",O[e].period),C("fuel_periodly",O[e].periodly)}
1,options:[R("common:time.monthly"),R("common:time.yearly")]}),children:(0,t.jsx)(h.Y,{children:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"grid grid-cols-1 gap-12 md:grid-cols-2 xl:grid-cols-3",children:N.map(a=>(0,t.jsx)(E,{title:R("fuel.".concat(a)),className:"h-[300px] w-full",enableAnimation:!e,interval:k.fuel_period,data:{labels:U.x,datasets:[{type:"line",data:U[a],label:R("common:time.".concat(k.fuel_periodly)),fill:!0,backgroundColor:m.Tv.PRIMARY_H,borderColor:m.Tv.PRIMARY,borderWidth:1.5}]},stats:[{title:R("common:common.latest",{date:(0,p.ZU)(P,"MMM yyyy",I.language)}),value:"+".concat((0,p.ZI)(A.data[a].latest,"standard"))},{title:R("since"),value:(0,p.ZI)(A.data[a].alltime,"standard")}]},a))}),(0,t.jsx)(u.Z,{type:"range",period:k.fuel_period,value:k.fuel_minmax,data:T.data[k.fuel_periodly].x,onChange:e=>C("fuel_minmax",e)})]})})}),(0,t.jsx)(o.Z,{title:R("registration_by_vehicle"),description:R("registrations_not_licenses"),date:w.data_as_of,menu:(0,t.jsx)(c.aV,{current:k.index,onChange:e=>{C("index",e),C("minmax",[0,w.data[O[e].periodly].x.length-1]),C("period",O[e].period),C("periodly",O[e].periodly)},options:[R("common:time.monthly"),R("common:time.yearly")]}),children:(0,t.jsx)(h.Y,{children:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"grid grid-cols-1 gap-12 md:grid-cols-2 xl:grid-cols-3",children:v.map(a=>(0,t.jsx)(E,{title:R(a),className:"h-[300px] w-full",enableAnimation:!e,interval:k.period,data:{labels:L.x,datasets:[{type:"line",data:L[a],label:R("common:time.".concat(k.periodly)),fill:!0,backgroundColor:m.Tv.PRIMARY_H,borderColor:m.Tv.PRIMARY,borderWidth:1.5}]},stats:[{title:R("common:common.latest",{date:(0,p.ZU)(P,"MMM yyyy",I.language)}),value:"+".concat((0,p.ZI)(j.data[a].latest,"standard"))},{title:R("since"),value:(0,p.ZI)(j.data[a].alltime,"standard")}]},a))}),(0,t.jsx)(u.Z,{type:"range",period:k.period,value:k.minmax,data:w.data[k.periodly].x,onChange:e=>C("minmax",e)})]})})})]})]})},w=r(63946),j=r(99911),T=!0,_vehicle_=e=>{let{last_updated:a,next_update:r,meta:l,dropdown:i,params:n,vehicle_timeseries:s,vehicle_timeseries_callout:o,fuel_timeseries:d,fuel_timeseries_callout:c}=e,{t:u}=(0,g.$)("dashboards");return(0,t.jsxs)(j.n,{meta:l,children:[(0,t.jsx)(w.Z,{title:u("dashboards.vehicle-registrations.name"),description:u("dashboards.vehicle-registrations.description")}),(0,t.jsx)(vehicle_registrations,{last_updated:a,next_update:r,dropdown:i,params:n,vehicle_timeseries:s,vehicle_timeseries_callout:o,fuel_timeseries:d,fuel_timeseries_callout:c})]})}},88043:function(e,a,r){"use strict";var t=r(52322),l=r(36874),i=r(76290),n=r(2784),s=r(36234);let o=(0,n.forwardRef)((e,a)=>{let{title:r,className:o="py-8 lg:py-12",description:d,children:c,date:u,menu:m}=e,{t:h,i18n:p}=(0,i.$)(),g=(0,n.useMemo)(()=>null==u?"":"string"!=typeof u||(s.ou.fromSQL(u).isValid||s.ou.fromFormat(u,"yyyy-'Q'q").isValid)&&u.length>4?(0,l.ZU)(u,"dd MMM yyyy, HH:mm",p.language):u,[u,p.language]);return(0,t.jsx)("section",{className:o,ref:a,children:(0,t.jsxs)("div",{className:"flex flex-col gap-6 lg:gap-8",children:[r||u||d?(0,t.jsxs)("div",{className:"flex flex-col gap-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-col flex-wrap items-start gap-2 lg:flex-row lg:items-center lg:justify-between",children:[r&&"string"==typeof r?(0,t.jsx)("h4",{children:r}):r,u&&null!==u&&(0,t.jsx)("span",{className:"text-dim text-right text-sm",children:h("common:common.data_of",{date:g})})]}),(d||m)&&(0,t.jsxs)("div",{className:(0,l.L1)("text-dim flex w-full flex-wrap justify-between gap-y-3 md:flex-nowrap md:items-start",d&&m?"gap-x-6":""),children:[d&&"string"==typeof d?(0,t.jsx)("p",{className:["whitespace-pre-line text-base",m?"md:max-w-[70%]":""].join(" "),children:d}):d,m&&(0,t.jsx)("div",{className:"flex w-full gap-3 md:w-auto md:justify-end",children:m})]})]}):(0,t.jsx)(t.Fragment,{}),(0,t.jsx)("div",{children:c})]})})});o.displayName="Section",a.Z=o},70784:function(e,a,r){"use strict";var t=r(52322),l=r(2784),i=r(31142),n=r(95280),s=r(76290),o=r(64880),d=r(36874),c=r(70830),u=r(31891);let SliderTooltip=e=>{let{play:a,children:r}=e;return(0,t.jsxs)("div",{className:(0,d.L1)("absolute bottom-8 left-1/2 flex -translate-x-1/2 transform flex-col items-center opacity-0 group-hover:flex group-hover:opacity-100","transition-opacity delay-300 duration-300 group-hover:delay-0 max-lg:group-focus-within:opacity-100",a?"opacity-100":"opacity-0"),children:[(0,t.jsx)("span",{className:"shadow-floating relative z-10 whitespace-nowrap rounded-lg bg-black px-3 py-1.5 text-sm text-white dark:bg-white dark:text-black",children:r}),(0,t.jsx)("div",{className:"absolute -bottom-1 h-2 w-2 rotate-45 bg-black dark:bg-white"})]})},m=[16586208e5,16587072e5,16594848e5,16595712e5];a.Z=e=>{let{className:a="pt-8",type:r,onChange:h,step:p,value:g,data:x=m,period:y="auto",parseAsDate:f=!0,enablePlayer:b=!0}=e,{t:_,i18n:v}=(0,s.$)("common"),{play:N,setPlaying:E}
1=(0,l.useContext)(u.y),w=(0,l.useRef)(null),[j,T]=(0,l.useState)(g),A={auto:"dd MMM yyyy",day:"dd MMM yyyy",month:"MMM yyyy",quarter:"".concat("ms-MY"===v.language?"'ST'":"","q").concat("ms-MY"===v.language?"":"Q"," yyyy"),year:"yyyy",hour:"dd MMM yy HH:mm "};if((0,o.q)(()=>{"single"!==r&&w.current&&cancelTimer()},[x]),(0,o.q)(()=>{"single"!==r&&T(g)},[g]),(0,o.q)(()=>{x&&"range"===r&&(T(g),h(g))},[y]),"single"===r)return(0,t.jsxs)("div",{className:(0,d.L1)("group flex w-full items-center gap-x-3",a),children:[(0,t.jsx)("p",{className:"text-dim text-sm",children:f?(0,d.ZU)(x[0],"yyyy",v.language):x[0]}),(0,t.jsxs)(c.fC,{className:"group relative flex h-5 w-full touch-none select-none items-center",value:[j],max:x.length-1,step:p,onValueChange:e=>T(e),onValueCommit:e=>h(e),children:[(0,t.jsx)(c.fQ,{className:"dark:bg-washed-dark bg-outline relative z-0 h-2 grow rounded-full",children:(0,t.jsx)(c.e6,{className:"max-lg:group-focus-within:bg-primary dark:max-lg:group-focus-within:bg-primary-dark group-hover:bg-primary dark:group-hover:bg-primary absolute z-0 h-full rounded-xl bg-[#A1A1AA]"})}),(0,t.jsx)(c.bU,{className:"max-lg:group-focus-within:border-primary max-lg:group-focus-within:ring-primary group-hover:border-primary group-hover:ring-primary shadow-button block h-5 w-5 cursor-pointer rounded-full border-2 border-[#A1A1AA] bg-white group-hover:ring-4 max-lg:group-focus-within:ring-4",children:(0,t.jsx)(SliderTooltip,{children:f?(0,d.ZU)(x[j],A[y],v.language):x[j]})})]}),(0,t.jsx)("p",{className:"text-dim text-sm",children:f?(0,d.ZU)(x[x.length-1],"yyyy",v.language):x[x.length-1]})]});let startTimer=()=>{E(!0);let e=g[1]>=x.length-1?g[0]:g[1];w.current=setInterval(()=>{e>=x.length-1?cancelTimer():h([g[0],++e])},150)},cancelTimer=()=>{E(!1),w.current&&clearInterval(w.current),w.current=null};return(0,t.jsxs)("div",{className:(0,d.L1)("group flex w-full items-center gap-x-3",a),children:[b&&(0,t.jsx)("button",{type:"button","aria-label":_(N?"common:common.pause":"common:common.play"),title:_(N?"common:common.pause":"common:common.play"),className:"w-fit",onClick:()=>{w.current?cancelTimer():startTimer()},children:N?(0,t.jsx)(i.Z,{className:"h-4 w-4 text-black dark:text-white"}):(0,t.jsx)(n.Z,{className:"h-4 w-4 text-black dark:text-white"})}),(0,t.jsx)("p",{className:"text-dim text-sm",children:f?(0,d.ZU)(x[0],"yyyy",v.language):x[0]}),(0,t.jsxs)(c.fC,{className:"group relative flex h-5 w-full touch-none select-none items-center",value:j,min:0,max:x.length-1,onValueChange:e=>{w.current&&cancelTimer(),T(e)},onValueCommit:e=>{w.current&&cancelTimer(),h(e)},minStepsBetweenThumbs:1,children:[(0,t.jsx)(c.fQ,{className:"dark:bg-washed-dark bg-outline relative z-0 h-2 grow rounded-full",children:(0,t.jsx)(c.e6,{className:"max-lg:group-focus-within:bg-primary dark:max-lg:group-focus-within:bg-primary-dark group-hover:bg-primary dark:group-hover:bg-primary absolute z-0 h-full rounded-xl bg-[#A1A1AA]"})}),(0,t.jsx)(c.bU,{className:"max-lg:group-focus-within:border-primary max-lg:group-focus-within:ring-primary group-hover:border-primary group-hover:ring-primary shadow-button block h-5 w-5 cursor-col-resize rounded-full border-2 border-[#A1A1AA] bg-white group-hover:ring-4 max-lg:group-focus-within:ring-4",children:(0,t.jsx)(SliderTooltip,{play:N,children:f?(0,d.ZU)(x[Math.max(0,j[0])],A[y],v.language):x[j[0]]})}),(0,t.jsx)(c.bU,{className:"max-lg:group-focus-within:border-primary max-lg:group-focus-within:ring-primary group-hover:border-primary group-hover:ring-primary shadow-button block h-5 w-5 cursor-col-resize rounded-full border-2 border-[#A1A1AA] bg-white group-hover:ring-4 max-lg:group-focus-within:ring-4",children:(0,t.jsx)(SliderTooltip,{play:N,children:f?(0,d.ZU)(x[Math.min(j[1],x.length-1)],A[y],v.language):x[j[1]]})})]}),(0,t.jsx)("p",{className:"text-dim text-sm",children:f?(0,d.ZU)(x[x.length-1],"yyyy",v.language):x[x.length-1]})]})}},84238:function(e,a,r){"use strict";r.d(a,{aV:function(){return List},s_:function(){return Panel}});var t=r(52322),l=r(2784),i=r(62671),n=r(36874);let Panel=e=>{let{children:a,className:r,name:l}=e;return(0,t.jsx)("div",{className:r,children:a})},List=e=>{let{options:a,current:r,onChange:l,icons:i,className:s}=e;return(0,t.jsx)("ul",{className:(0,n.L1)("flex flex-wrap",s),children:a.map((e,a)=>(0,t.jsxs)("li",{className:(0,n.L1)("flex cursor-pointer select-none self-center whitespace-nowrap rounded-full px-2.5 py-1 text-sm outline-none transition-colors",r===a?"bg-outline dark:bg-washed-dark font-medium text-black dark:text-white":"text-dim bg-transparent hover:text-black dark:hover:text-white"),onClick:()=>l(a),children:[i&&i[a],e]},e))})},Tabs=e=>{let{className:a="",hidden:r,children:s,title:o,controls:d,current:c,menu:u,onCh
1ange:m=()=>{}}=e,h=(0,l.useMemo)(()=>Array.isArray(s)?s:[s],[s]);return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(i.O.Group,{selectedIndex:c,onChange:m,children:[(0,t.jsxs)("div",{className:(0,n.L1)("flex flex-wrap items-end justify-between gap-3",a),children:[(0,t.jsx)("div",{children:o&&"string"==typeof o?(0,t.jsx)("span",{className:"text-base font-bold",children:o}):o}),(0,t.jsxs)(i.O.List,{className:(0,n.L1)("flex flex-wrap items-center justify-between gap-2.5",r&&"hidden"),children:[d,(0,t.jsx)("div",{className:"flex flex-wrap",children:h.map((e,a)=>{let{props:{name:r,icon:l}}=e;return(0,t.jsxs)(i.O,{className:e=>{let{selected:a}=e;return(0,n.L1)("group flex flex-row rounded-full px-[10px] py-1 text-sm outline-none transition-colors",a?"bg-outline dark:bg-washed-dark font-medium text-black dark:text-white":"text-dim bg-transparent hover:text-black dark:hover:text-white")},children:[l,r]},a)})}),u&&(0,t.jsx)("div",{children:u})]})]}),(0,t.jsx)(i.O.Panels,{className:"w-full",children:h.map((e,a)=>{let{props:{children:r}}=e;return(0,t.jsx)(i.O.Panel,{className:"overflow-visible",children:r},a)})})]})})};Tabs.Panel=Panel,Tabs.List=List,a.ZP=Tabs},31891:function(e,a,r){"use strict";r.d(a,{Y:function(){return SliderProvider},y:function(){return i}});var t=r(52322),l=r(2784);let i=(0,l.createContext)({play:!1,setPlaying:()=>{}}),SliderProvider=e=>{let{children:a}=e,[r,n]=(0,l.useState)(!1);return(0,t.jsx)(i.Provider,{value:{play:r,setPlaying:n},children:a(r)})}},46096:function(e,a,r){"use strict";r.d(a,{e:function(){return useData}});var t=r(2784);let useData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,t.useRef)(e);let[a,r]=(0,t.useReducer)((e,a)=>{switch(a.type){case"SET":return Object.assign({},e,{[a.payload.key]:a.payload.value});case"RESET":return Object.assign({},e,a.payload);default:throw Error("Unrecognized dispatch command")}},e);return{data:a,setData:(e,a)=>{r({type:"SET",payload:{key:e,value:a}})},reset:a=>{a?r({type:"RESET",payload:a}):r({type:"RESET",payload:e})}}}},28663:function(e,a,r){"use strict";r.d(a,{M:function(){return useSlice}});var t=r(2784);let useSlice=(e,a)=>{let r=(0,t.useMemo)(()=>Object.entries(e).map(e=>{let[r,t]=e;return[r,t.slice(a?a[0]:0,a?a[1]+1:t.length-1)]}),[e,a]);return{coordinate:Object.fromEntries(r)}}},64880:function(e,a,r){"use strict";r.d(a,{q:function(){return useWatch}});var t=r(2784);let useWatch=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=(0,t.useRef)(!0);(0,t.useEffect)(()=>{if(!r&&l.current){l.current=!1;return}e()},a)}}},function(e){e.O(0,[3130,1368,5127,7234,9774,2888,179],function(){return e(e.s=29617)}),_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.