1"use strict";(this.__LOADABLE_LOADED_CHUNKS__=this.__LOADABLE_LOADED_CHUNKS__||[]).push([["which-static-tools-build-tools-CarBrandReliabilityTool"],{"../static-tools/build/tools/CarBrandReliabilityTool/index.js"(t,e,r){r.r(e),r.d(e,{default:()=>f});var a=r("../../node_modules/react/index.js"),o=r("../../node_modules/@which/seatbelt/src/index.ts"),l=r("../static-tools/build/components/ToolFrame/ToolFrame.js"),i=r("../static-tools/build/components/ToolBody/ToolBody.js"),n=r("../static-tools/build/components/ToolHeading/ToolHeading.js"),s=r("../static-tools/build/components/CarDetails/CarDetails.js"),c=r("../static-tools/build/components/TableSearch/TableSearch.js"),d=r("../static-tools/build/hooks/useTracking.js"),u=r("../static-tools/build/hooks/useTrackedButton.js"),b=r("../static-tools/build/shared/utils/stars.js");var h=r("../../node_modules/react/jsx-runtime.js");function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a,o,l,i,n=[],s=!0,c=!1;try{if(l=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=l.call(r)).done)&&(n.push(a.value),n.length!==e);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return n}}(t,e)||function(t,e){if(t){if("string"==typeof t)return m(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}const f=t=>{let e=t.xmlData;const r=y((0,a.useState)([]),2),m=r[0],f=r[1],j=y((0,a.useState)(!1),2),p=j[0],_=j[1],x=y((0,a.useState)(g),2),S=x[0],v=x[1],A=(0,a.useRef)(null);(0,a.useEffect)(()=>{const t=e.map(t=>({title:t.brand,description:t.description,zero:b.l[parseFloat(t.zero)]||"-",five:b.l[parseFloat(t.five)]||"-",ten:b.l[parseFloat(t.ten)]||"-",image:t.image}));f(t)},[e]);const T=(0,d.z)({name:"Car brand reliability tool",category:"Cars"}),C=(0,u.M)({trackingState:T,trackingName:"go back",onClick:()=>{_(!1),v(g)}});return m&&m.length>0?(0,h.jsx)(l.U,{children:(0,h.jsxs)(i.F,{"aria-labelledby":"car-brand-reliability-heading",children:[(0,h.jsx)(n.L,{id:"car-brand-reliability-heading",children:"Car brand reliability"}),p?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s.$,{...S,ref:A}),(0,h.jsx)(o.$n,{appearance:"secondary",...C,children:"Go Back"})]}):(0,h.jsx)(c.h,{data:m,headings:["Brand","0-4 years","5-9 years","10-15 years"],label:"Enter your car brand below to see how it fares when it comes to reliability.",renderShowDetails:t=>{v(t),_(!0)},trackingState:T}),(0,h.jsx)(o.o5,{className:"CarBrandReliabilityTool_smallprint__DFAXi",textStyle:"sb-text-body-small-regular",children:"Research: Online survey, April 2025 to June 2025; 63,334 owners, covering 72,470 cars."})]})}):null},g={description:"",title:"",zero:"",five:"",ten:"",image:""}}}]); 2//# sourceMappingURL=which-static-tools-build-tools-CarBrandReliabilityTool.da20c2fd.chunk.js.map
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.