fortune500/data/8756-81abb2db07a4d89f.js

2 lines
32 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8756],{98126:function(n,e,t){var i=t(85893);let r=()=>(0,i.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"plus-square",className:"svg-inline--fa fa-plus-square fa-w-14",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,i.jsx)("path",{fill:"currentColor",d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-32 252c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92H92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"})});e.Z=r},14152:function(n,e,t){t.d(e,{Z:function(){return m}});var i=t(85893),r=t(17984),o=t(90223),a=t(82729),l=t(68458),s=t(65745);function c(){let n=(0,a._)(["\n display: flex;\n align-items: center;\n margin-left: 24px;\n\n .label {\n overflow: inherit;\n }\n"]);return c=function(){return n},n}function d(){let n=(0,a._)(["\n visibility: hidden;\n height: 0;\n width: 0;\n\n &:checked ~ .checkmark {\n background-color: ",';\n\n &::after {\n content: "";\n background-color: ',";\n mask-image: url('/icons/CheckMark.svg');\n mask-position: center;\n mask-repeat: no-repeat;\n mask-size: 75%;\n }\n }\n"]);return d=function(){return n},n}function p(){let n=(0,a._)(["\n position: absolute;\n top: 7px;\n left: -22px;\n height: 16px;\n width: 16px;\n background-color: ",";\n border: 1px solid ",';\n border-radius: 2px;\n\n &::after {\n position: absolute;\n content: "";\n display: inline-block;\n color: ',";\n width: 100%;\n height: 100%;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n }\n}\n\n"]);return p=function(){return n},n}let u=l.ZP.div.withConfig({componentId:"sc-93a4251f-0"})(c()),x=l.ZP.input.withConfig({componentId:"sc-93a4251f-1"})(d(),s.$_.primaryBlack,s.$_.primaryWhite),h=l.ZP.span.withConfig({componentId:"sc-93a4251f-2"})(p(),s.$_.primaryWhite,s.$_.primaryBlack,s.$_.primaryWhite),g=n=>{let{name:e,value:t,onChange:a,required:l=!1,children:s,className:c="",trackerdata:d,onClick:p,dataCy:g}=n,m=n=>{o.L9&&d&&(0,o.L9)(d),a(n.target.checked)};return(0,i.jsx)(u,{"data-cy":g,className:c,onClick:p,children:s&&(0,i.jsxs)(r.Z,{htmlFor:e,required:l,className:"label",children:[s,(0,i.jsx)(x,{checked:t,type:"checkbox",id:e,onChange:m}),(0,i.jsx)(h,{className:"checkmark"})]})})};var m=g},49253:function(n,e,t){t.d(e,{w:function(){return c}});var i=t(82729),r=t(85893),o=t(68458),a=t(65745);function l(){let n=(0,i._)(["\n font-family: ",";\n font-weight: 600;\n \n ",";\n a {\n color: inherit;\n text-decoration: none;\n }\n \n em {\n font-style: italic;\n }\n \n strong {\n font-weight: 700;\n }\n\n &.right-rail {\n border-bottom: 1px solid grey;\n font-weight: 600;\n line-height: 24px;\n font-size: 34px;\n margin: 0px;\n padding-bottom: 8.5px;\n text-transform: capitalize;\n margin-top: 5px;\n }\n\n &.step-down-three {\n font-size: 12px;\n }\n \n &.step-down-two {\n font-size: 14px;\n }\n \n &.step-down-one {\n font-size: 18px;\n }\n \n &.base {\n font-size: 20px;\n }\n \n &.step-up-one {\n font-size: 26px;\n }\n \n &.step-up-two {\n font-size: 32px;\n }\n \n &.step-up-three {\n font-size: 34px;\n }\n \n &.step-up-four {\n font-size: 39px;\n }\n \n &.step-up-five {\n font-size: 48px;\n }\n \n &.step-up-six {\n font-size: 60px;\n }\n\n &.heading {\n border-bottom: "," 1px solid;\n font-size: 24px;\n font-weight: 600;\n letter-spacing: 0.25px;\n line-height: 26.4px;\n margin-bottom: 24px;\n text-align: left;\n\n @media (",") {\n font-size: 34px;\n line-height: 41px;\n margin-top: 0px;\n }\n }\n "]);return l=function(){return n},n}let s=o.ZP.h1.withConfig({componentId:"sc-44756d9f-0"})(l(),n=>{let{$font:e}=n;return e},n=>{let{$size:e}=n;return e>0?"font-size: ".concat(e,"px;"):""},a.$_.darkGray,a.eq.lgMin),c=n=>{let{className:e,children:t,font:i,size:o,tag:l="h1",typeStyle:c,dataCy:d}=n,p=i?a.LZ[i]:a.LZ.graphikCond;return(0,r.jsx)(s,{as:l,className:"".concat(e||""," ").concat(c||""),$font:p,$size:o||0,"data-cy":d,children:t})}},36442:function(n,e,t){t.d(e,{Z:function(){return g}});var i=t(85893),r=t(17984),o=t(82729),a=t(68458),l=t(65745);function s(){let n=(0,o._)(["\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n \n label {\n margin-bottom: 8px;\n }\n"]);return s=function(){return n},n}function c(){let n=(0,o._)(["\n appearance: none;\n background-image: url(\"data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e\");\n background-repeat: no-repeat;\n background-position: right 16px center;\n background-size: 24px;\n border: 1px solid ",";\n font-family: ",";\n font-size: 16px;\n line-height: 24px;\n outline: 1px solid ",";\n padding: 16px 48px 16px 16px;\n\n :hover {\n outline: 1px solid ",";\n\n :disabled {\n outline: none;\n }\n }\n\n :focus-visible {\n border: 1px solid ",";\n outline: 4px solid ",";\n }\n\n :disabled {\n background: ",";\n background: url(\"data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e\") no-repeat right 16px center;\n background-size: 24px;\n border: 1px solid ",";\n color: ",";\n }\n"]);return c=function(){return n},n}function d(){let n=(0,o._)(["\n appearance: none;\n"]);return d=function(){return n},n}let p=a.ZP.div.withConfig({componentId:"sc-860bc52-0"})(s()),u=a.ZP.select.withConfig({componentId:"sc-860bc52-1"})(c(),l.$_.primaryBlack,l.LZ.graphikCond,l.$_.primaryWhite,l.$_.primaryBlack,l.$_.linkBlue,l.$_.medBlue,l.$_.secondaryLightGray,l.$_.darkGray,l.$_.darkGray),x=a.ZP.option.withConfig({componentId:"sc-860bc52-2"})(d()),h=n=>{let{dropdownItems:e,name:t,value:o,onChange:a,required:l=!1,children:s,className:c="",dataCy:d}=n;return(0,i.jsxs)(p,{className:"".concat(c),"data-cy":d,children:[s&&(0,i.jsx)(r.Z,{htmlFor:t,required:l,children:s}),(0,i.jsx)(u,{id:t,value:o,onChange:n=>a(n.target.value),children:e.map(n=>(0,i.jsx)(x,{value:n.value,children:n.key},n.key))})]})};var g=h},37824:function(n,e,t){t.d(e,{Z:function(){return d}});var i=t(85893),r=t(82729),o=t(68458),a=t(65745);function l(){let n=(0,r._)(["\n border: 1px solid ",";\n font-family: ",";\n font-size: 16px;\n line-height: 24px;\n outline: 1px solid ",";\n padding: 16px;\n\n &:hover {\n outline: 1px solid ",";\n\n &:disabled {\n outline: none;\n }\n }\n\n &:focus-visible {\n border: 1px solid ",";\n outline: 4px solid ",";\n }\n\n &:disabled {\n background: ",";\n border: 1px solid ",";\n color: ",";\n }\n"]);return l=function(){return n},n}let s=o.ZP.input.withConfig({componentId:"sc-925b9214-0"})(l(),a.$_.primaryBlack,a.LZ.graphikCond,a.$_.primaryWhite,a.$_.primaryBlack,a.$_.linkBlue,a.$_.medBlue,a.$_.secondaryLightGray,a.$_.darkGray,a.$_.darkGray),c=n=>{let{id:e="",type:t="text",placeholder:r,value:o,className:a="",inputmode:l,disabled:c,onChange:d,onKeyDown:p}=n;return(0,i.jsx)(s,{id:e,placeholder:r,value:o,type:t,inputMode:l,className:a,onChange:n=>d(n.target.value),onKeyDown:p,disabled:c})};var d=c},17984:function(n,e,t){t.d(e,{Z:function(){return d}});var i=t(85893),r=t(82729),o=t(68458),a=t(65745);function l(){let n=(0,r._)(["\n font-family: ",";\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 1px;\n text-transform: uppercase;\n color: ",";\n\n .required {\n color: ",";\n margin-left: 10px;\n }\n"]);return l=function(){return n},n}let s=o.ZP.label.withConfig({componentId:"sc-3522096c-0"})(l(),a.LZ.graphikCond,a.$_.primaryBlack,a.$_.primaryRed),c=n=>{let{htmlFor:e,required:t=!1,className:r="",children:o}=n;return(0,i.jsxs)(s,{className:"label ".concat(r),htmlFor:e,children:[o,t&&(0,i.jsx)("span",{className:"".concat(t?"required":""),children:"* required"})]})};var d=c},59062:function(n,e,t){t.d(e,{Z:function(){return b}});var i=t(85893),r=t(67294),o=t(46066),a=t(19018),l=t(26116),s=t(90223),c=t(82729),d=t(68458),p=t(65745);function u(){let n=(0,c._)(["\n .year {\n color: ",";\n font-family: ",";\n font-size: 16px;\n font-weight: 500;\n letter-spacing: 1px;\n text-decoration: none;\n\n ","\n ","\n \n @media (",") {\n ","\n }\n\n @media (",") {\n padding-left: 30%;\n }\n \n &:hover {\n text-decoration: underline;\n cursor: pointer;\n }\n\n &:active {\n text-decoration: none;\n color: ",";\n }\n\n &.current {\n color: ",";\n font-weight: 600;\n pointer-events: none;\n }\n\n &.rankingV2 {\n &.disabled {\n pointer-events: none;\n color: ",";\n }\n }\n }\n\n .prev {\n margin-left: 1%;\n }\n\n .next {\n margin-right: 1%;\n }\n\n .next, .prev {\n ","\n svg {\n stroke: ",";\n }\n\n &::before {\n content: '';\n }\n }\n \n .slick-slide {\n &:focus {\n > div > div[role=button] {\n box-shadow: 0 0 3px 3px ","\n }\n }\n }\n"]);return u=function(){return n},n}let x=d.ZP.div.withConfig({componentId:"sc-1b42ce87-0"})(u(),p.$_.linkBlue,p.LZ.graphikCond,n=>{let{$listType:e}=n;return"grid"===e?"margin: 16px 0;":null},n=>{let{$listType:e}=n;return"grid"===e?"padding-left: 13%;":null},p.eq.mdMin,n=>{let{$listType:e}=n;return"grid"===e?"padding-left: 30%;":null},p.eq.lgMin,p.$_.primaryBlack,p.$_.primaryBlack,p.$_.darkGray,n=>{let{$listType:e}=n;return"grid"===e?"padding-left: 4px;":null},p.$_.primaryBlack,"".concat(p.$_.linkBlue,"4C"));t(84640),t(19678);let h=[{breakpoint:2560,settings:{slidesToScroll:6,slidesToShow:18}},{breakpoint:1440,settings:{slidesToScroll:5,slidesToShow:14}},{breakpoint:1024,settings:{slidesToScroll:4,slidesToShow:10}},{breakpoint:768,settings:{slidesToScroll:2,slidesToShow:6}},{breakpoint:375,settings:{slidesToScroll:1,slidesToShow:3}}],g=[{breakpoint:2560,settings:{slidesToScroll:6,slidesToShow:8}},{breakpoint:1024,settings:{slidesToScroll:12,slidesToShow:12}},{breakpoint:768,settings:{slidesToScroll:4,slidesToShow:6}},{breakpoint:425,settings:{slidesToScroll:4,slidesToShow:4}},{breakpoint:320,settings:{slidesToScroll:3,slidesToShow:3}}],m=[{breakpoint:1440,settings:{slidesToScroll:2,slidesToShow:4}},{breakpoint:1024,settings:{slidesToScroll:1,slidesToShow:3}},{breakpoint:768,settings:{slidesToScroll:4,slidesToShow:6}}],f=n=>{let{listType:e,years:t,currentYear:c,changeYear:d,trackerData:p,isRankingV2:u,availableYears:f}=n;(0,r.useEffect)(()=>{let n=document.querySelectorAll(".slick-slide");n.forEach(n=>{n.setAttribute("tabindex","0")})},[]);let b={dots:!1,infinite:!1,initialSlide:t.indexOf(c),nextArrow:(0,i.jsx)(l.Z,{}),prevArrow:(0,i.jsx)(a.Z,{}),responsive:u?h:"list"===e?g:m,slidesToScroll:4,slidesToShow:6,speed:500};return 0===t.length?null:(0,i.jsx)(x,{className:"year-picker",$listType:e,children:1===t.length?(0,i.jsx)("div",{tabIndex:0,role:"button",className:"year ".concat(c===t[0]?"current":""," ").concat(u?"rankingV2":""," ").concat((null==f?void 0:f.includes(t[0]))?"":"disabled"),children:t[0]}):(0,i.jsx)(o.Z,{...b,children:t.map(n=>(0,i.jsx)("div",{tabIndex:0,role:"button",className:"year ".concat(c===n?"current":""," ").concat(u?"rankingV2":""," ").concat((null==f?void 0:f.includes(n))?"":"disabled"),onClick:()=>{d(n),s.L9&&p&&(0,s.L9)({...p,eventLabel:"year : ".concat(n)})},onKeyDown:()=>{d(n),s.L9&&p&&(0,s.L9)({...p,eventLabel:"year : ".concat(n)})},children:n},n))})})};var b=f},98756:function(n,e,t){t.d(e,{Z:function(){return J}});var i=t(85893),r=t(67294),o=t(11163),a=t(79521),l=t(62572),s=t(36442),c=t(71129),d=t(49253);let p=n=>{switch(n){case"Number":case"Percent":case"Money":return(n,e)=>{let t=n,i=e;return"number"!=typeof n&&(t=null==n||""===n?-1/0:parseFloat(n.replace(/[^\d.-]*/g,""))),"number"!=typeof e&&(i=null==e||""===e?-1/0:parseFloat(e.replace(/[^\d.-]*/g,""))),t>i?1:-1};default:return(n,e)=>{let t=null==n?-1/0:n,i=null==e?-1/0:e;return(t="string"==typeof t?t.toLowerCase():t)>(i="string"==typeof i?i.toLowerCase():i)?1:t<i?-1:0}}},u=n=>{let e=n=>(e,t,i)=>{let r=e.values[i],o=t.values[i];return p(n)(r,o)},t=n=>e=>e[n];return n.reduce((n,i)=>("Ranking"===i.title&&(i.title="Rank"),"Company"===i.title||"Company Name"===i.title||"Full Name"===i.title)?n:"Rank"===i.title||"Order"===i.title?n.concat({Header:i.title,accessor:t(i.title),sortType:e(i.type),title:i.title,type:i.type},{Header:"Name",accessor:t("Name"),sortType:e("Text"),title:"Name",type:"Text"}):"Ordering"===i.title?n.concat({Header:"Order",accessor:t("Order"),sortType:e(i.type),title:i.title,type:i.type},{Header:"Name",accessor:t("Name"),sortType:e("Text"),title:"Name",type:"Text"}):n.concat({Header:i.title,accessor:t(i.title),sortType:e(i.type),title:i.title,type:i.type}),[])};var x=t(4177),h=t(82729),g=t(68458),m=t(65745);function f(){let n=(0,h._)(["\n overflow: auto;\n margin: 0 16px;\n"]);return f=function(){return n},n}function b(){let n=(0,h._)(["\n width: 100%;\n border-spacing: 0;\n\n thead {\n\n & tr {\n\n & th {\n border-bottom: 1px solid ",";\n text-align: left;\n position: relative;\n color: ",";\n font-family: ",";\n text-transform: uppercase;\n font-weight: 600;\n letter-spacing: 1px;\n font-size: 12px;\n line-height: 18px;\n vertical-align: top;\n width: 100px;\n\n @media (",") {\n min-width: 100px;\n }\n\n &:nth-of-type(1) {\n width: 40px;\n\n @media (",") {\n min-width: 40px;\n }\n\n .remove {\n visibility: hidden;\n }\n }\n\n &:nth-of-type(2) {\n width: 200px;\n\n @media (",") {\n min-width: 150px;\n }\n\n .remove {\n visibility: hidden;\n }\n }\n\n \n\n &.sort-asc {\n color: ",";\n\n &::after {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBmaWxsLW9wYWNpdHk9IjAiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0iYXJjcyI+PHBhdGggZD0iTTkgMThsNi02LTYtNiIvPjwvc3ZnPgo=);\n background-size: 100%;\n content: ' ';\n display: block;\n height: 20px;\n position: absolute;\n right: 2px;\n top: 38px;\n transform: rotate(-90deg);\n width: 20px;\n }\n }\n\n &.sort-desc {\n color: ",";\n \n &::after {\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBmaWxsLW9wYWNpdHk9IjAiIHN0cm9rZT0iIzAwMDAwMCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0iYXJjcyI+PHBhdGggZD0iTTkgMThsNi02LTYtNiIvPjwvc3ZnPgo=);\n background-size: 100%;\n content: ' ';\n display: block;\n height: 20px;\n position: absolute;\n right: 2px;\n top: 38px;\n transform: rotate(90deg);\n width: 20px;\n }\n }\n\n & .remove {\n color: ",";\n margin-bottom: 8px;\n display: flex;\n flex-wrap: nowrap;\n\n svg {\n width: 10px;\n fill: ",";\n margin-left: 4px;\n }\n }\n\n & .columnTitle {\n padding-right: 12px;\n }\n }\n }\n }\n\n th, td {\n padding: 12px 4px;\n }\n\n tbody {\n // flex: 1 0 auto;\n // display: flex;\n // flex-direction: column;\n\n & tr {\n height: 72px;\n box-sizing: content-box;\n \n &:hover {\n background-color: ",";\n color: ",";\n }\n\n td {\n font-size: 16px;\n font-family: ",";\n font-weight: 600;\n letter-spacing: 1px;\n line-height: 24px;\n cursor: pointer;\n width: 100px;\n\n @media (",") {\n min-width: 100px;\n }\n\n &:nth-of-type(1) {\n font-size: 20px;\n font-weight: 700;\n color: ",";\n padding-left: 16px;\n width: 40px;\n\n @media (",") {\n min-width: 40px;\n }\n\n &.no-results {\n font-size: 18px;\n font-weight: 400;\n padding: 20px;\n letter-spacing: 0;\n text-align: center;\n font-family: ",";\n }\n }\n\n &:nth-of-type(2) {\n width: 200px\n\n @media (",") {\n min-width: 150px;\n }\n }\n }\n\n &:nth-of-type(2n+1) {\n background-color: ",";\n\n &:hover {\n background-color: ",";\n }\n }\n }\n }\n"]);return b=function(){return n},n}function w(){let n=(0,h._)(["\n box-shadow: none;\n display: flex;\n flex-flow: row wrap;\n justify-content: space-between;\n padding: 20px 16px;\n\n @media (",") {\n display: flex;\n align-items: stretch;\n justify-content: space-between;\n width: 100%;\n border: 0;\n box-shadow: none;\n flex-flow: row wrap;\n }\n\n & .previous, .next {\n flex: 0 0 calc(50% - 10px);\n margin-bottom: 10px;\n width: calc(50% - 10px);\n\n @media (",") {\n flex: 0 0 25%;\n margin-bottom: 0;\n }\n\n button {\n background-color: ",";\n color: ",";\n font-family: ",";\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 1px;\n width: 100%;\n height: 100%;\n border: 0;\n border-radius: 3px;\n transition: all .1s ease;\n }\n\n .transparent-black {\n\n &:hover {\n background: ",";\n color: ",";\n }\n\n &:focus {\n box-shadow: none;\n outline: 0;\n }\n\n &:disabled {\n background-color: ",";\n border: 0;\n color: ",";\n }\n }\n }\n\n & .previous {\n order: 0;\n }\n\n & .next {\n order: 1;\n\n @media (",") {\n order: 2;\n }\n }\n\n & .pageInfo {\n display: flex;\n flex: 1 0 100%;\n width: 100%;\n order: 2;\n align-items: center;\n\n @media (",") {\n flex: 1 0 auto;\n text-align: center;\n width: auto;\n margin-bottom: 0;\n justify-content: space-around;\n order: 1;\n }\n\n input, select {\n border: 1px solid ",";\n font-family: ",";\n font-size: 16px;\n font-weight: 600;\n height: 2.5rem;\n letter-spacing: 0.5px;\n line-height: 24px;\n padding: 5px 10px;\n\n &:hover, &:focus-visible {\n outline: 0;\n }\n }\n\n .pageNumber {\n display: inline-block;\n margin: 3px 10px;\n font-family: ",";\n letter-spacing: 1px;\n margin-right: 10px;\n\n @media (",") {\n margin-right: 1px;\n }\n\n input {\n width: 70px;\n text-align: center;\n }\n }\n\n .pageSize {\n flex: 1 0 auto;\n position: relative;\n\n @media (",") {\n flex: 0 0 50%;\n position: relative;\n padding-right: 0;\n }\n\n select {\n width: 100%;\n }\n }\n }\n\n"]);return w=function(){return n},n}function y(){let n=(0,h._)(["\n padding: 0 16px;\n\n h3 {\n border-bottom: 1px solid ",";\n font-weight: 600;\n letter-spacing: 0.144px;\n margin-bottom: 8px;\n padding-bottom: 8px;\n }\n\n & .btn-restore {\n font-family: ",";\n font-weight: 600;\n letter-spacing: 1px;\n background-color: ",";\n border: 1px solid ",";\n border-radius: 0;\n font-size: 16px;\n justify-content: center;\n line-height: 24px;\n margin: 0 8px 8px 0;\n padding: 8px;\n text-transform: capitalize;\n }\n\n"]);return y=function(){return n},n}let v=g.ZP.div.withConfig({componentId:"sc-6af360b8-0"})(f()),k=g.ZP.table.withConfig({componentId:"sc-6af360b8-1"})(b(),m.$_.secondaryLightGray,m.$_.darkGray,m.LZ.graphikCond,m.eq.lgMax,m.eq.lgMax,m.eq.lgMax,m.$_.softBlack,m.$_.softBlack,m.$_.linkBlue,m.$_.secondaryGreen,m.$_.lightBlue,m.$_.linkBlue,m.LZ.graphikCond,m.eq.lgMax,m.$_.darkGray,m.eq.lgMax,m.LZ.graphikCond,m.eq.lgMax,m.$_.lightGray,m.$_.lightBlue),j=g.ZP.div.withConfig({componentId:"sc-6af360b8-2"})(w(),m.eq.mdMin,m.eq.mdMin,m.$_.primaryWhite,m.$_.secondaryGreen,m.LZ.graphikCond,m.$_.secondaryLightGray,m.$_.primaryWhite,m.$_.primaryWhite,m.$_.primaryWhite,m.eq.mdMin,m.eq.mdMin,m.$_.primaryBlack,m.LZ.graphikCond,m.LZ.graphikCond,m.eq.mdMin,m.eq.mdMin),C=g.ZP.div.withConfig({componentId:"sc-6af360b8-3"})(y(),m.$_.primaryBlack,m.LZ.graphikCond,m.$_.primaryWhite,m.$_.softBlack),_=n=>{let{items:e,sortableFields:t}=n,o=(0,r.useMemo)(()=>e.map(n=>({Name:n.name,Order:n.order,Rank:n.rank,...n.data,slug:"".concat(n.slug,"/")})),[e]),[p,h]=(0,r.useState)({}),g=(0,r.useMemo)(()=>u(t),[t]),m=(0,a.useTable)({columns:g,data:o,initialState:{pageIndex:0,pageSize:o.length>=50?10:o.length,sortBy:[{desc:!1,id:t.find(n=>"Rank"===n.title)?"Rank":"Order"}]},onColumnVisibilityChange:h,state:{columnVisibility:p}},a.useSortBy,a.usePagination),{getTableProps:f,getTableBodyProps:b,headerGroups:w,page:y,prepareRow:_,pageOptions:Z,state:{pageIndex:I,pageSize:N},gotoPage:S,previousPage:T,nextPage:$,setPageSize:M,canPreviousPage:z,canNextPage:P}=m;return(0,i.jsxs)(i.Fragment,{children:[m.visibleColumns.length!==g.length&&(0,i.jsxs)(C,{children:[(0,i.jsxs)(d.w,{tag:"h3",size:20,children:[" ","Restore Columns"]}),m.columns.reduce((n,e)=>(e.isVisible||n.push((0,i.jsx)(l.Z,{className:"transparent-black btn-restore",onClick:()=>{e.toggleHidden()},children:e.Header})),n),[])]}),(0,i.jsx)(v,{children:(0,i.jsxs)(k,{...f(),children:[(0,i.jsx)("thead",{children:w.map(n=>(0,i.jsx)("tr",{...n.getHeaderGroupProps(),children:n.headers.map(n=>(0,i.jsxs)("th",{className:n.isSorted?n.isSortedDesc?"sort-asc":"sort-desc":"",...n.getHeaderProps(n.getSortByToggleProps()),children:[(0,i.jsxs)("div",{tabIndex:0,role:"button",className:"remove",onClick:e=>{e.preventDefault(),n.toggleHidden()},onKeyUp:e=>{e.preventDefault(),n.toggleHidden()},children:["Remove",(0,i.jsx)(c.x,{})]}),(0,i.jsx)("div",{className:"columnTitle",children:n.render("Header")})]}))}))}),(0,i.jsxs)("tbody",{...b(),children:[0===y.length&&(0,i.jsx)("tr",{children:(0,i.jsx)("td",{className:"no-results",colSpan:w[0].headers.length,children:"No results found"})}),0!==y.length&&y.map(n=>(_(n),(0,i.jsx)("tr",{...n.getRowProps(),onClick:()=>{(0,x.UK)(n.original.slug)},children:n.cells.map(n=>(0,i.jsx)("td",{...n.getCellProps(),children:n.value?n.render("Cell"):"-"}))})))]})]})}),(0,i.jsxs)(j,{children:[(0,i.jsx)("div",{className:"previous",children:(0,i.jsx)(l.Z,{className:"transparent-black",type:"button",onClick:()=>T(),disabled:!z,children:"Previous"})}),(0,i.jsxs)("div",{className:"pageInfo",children:[(0,i.jsxs)("span",{className:"pageNumber",children:["Page"," ",(0,i.jsx)("input",{type:"number",value:I+1||1,defaultValue:1,onChange:n=>{let e=n.target.value?Number(n.target.value)-1:0;S(e)}})," ","of ",Z.length]}),(0,i.jsx)("span",{className:"pageSize",children:(0,i.jsx)(s.Z,{name:"Number of rows",value:"".concat(N),onChange:n=>{M(Number(n))},dropdownItems:[5,10,20,25,50,100].map(n=>({key:"".concat(n," Rows"),value:"".concat(n)}))})})]}),(0,i.jsx)("div",{className:"next",children:(0,i.jsx)(l.Z,{className:"transparent-black",type:"button",onClick:()=>$(),disabled:!P,children:"Next"})})]})]})},Z=()=>(0,i.jsx)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"minus-square",className:"svg-inline--fa fa-minus-square fa-w-14",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:(0,i.jsx)("path",{fill:"currentColor",d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM92 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H92z"})});var I=t(98126),N=t(14152),S=t(37824);function T(){let n=(0,h._)(["\n width: 100%;\n min-width: 0;\n max-width: 480px;\n display: flex;\n flex-wrap: nowrap;\n\n @media (",") {\n margin-right: 48px;\n }\n\n input {\n width: 100%;\n margin-right: 16px;\n }\n"]);return T=function(){return n},n}let $=g.ZP.div.withConfig({componentId:"sc-a112b904-0"})(T(),m.eq.mdMin),M=n=>{let{initialValue:e,onChange:t}=n,[o,a]=(0,r.useState)(e);return(0,r.useEffect)(()=>{a(e)},[e]),(0,i.jsxs)($,{children:[(0,i.jsx)(S.Z,{placeholder:"Looking for something?",value:o,onChange:a,onKeyDown:n=>"Enter"===n.key?t(o):""}),(0,i.jsx)(l.Z,{onClick:()=>t(o),children:" SEARCH"})]})};var z=t(59062);function P(){let n=(0,h._)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 24px 24px;\n @media (",") {\n padding: 0 24px 24px;\n }\n\n @media (",") {\n padding: 0 48px 24px;\n }\n\n .year-picker {\n max-width: 100%;\n width: 100%;\n padding: 0 16px;\n\n @media (",") {\n max-width: 40%;\n width: 40%;\n }\n\n @media (",") {\n max-width: 45%;\n width: 45%;\n }\n }\n \n @media (",") {\n flex-direction: column;\n .year-picker {\n margin-top: 24px;\n max-width: 100%;\n }\n }\n"]);return P=function(){return n},n}function B(){let n=(0,h._)(["\n background-color: ",";\n padding: 0 48px;\n\n @media (",") {\n padding: 0 24px;\n }\n\n @media (",") {\n padding: 0 16px;\n }\n"]);return B=function(){return n},n}function L(){let n=(0,h._)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-flow: row nowrap;\n padding: 16px 0;\n\n ","\n .title {\n font-weight: 700;\n font-size: 20px;\n letter-spacing: 0.15px;\n user-select: none;\n\n svg {\n height: 18px;\n width: 16px;\n margin-right: 12px;\n cursor: pointer;\n }\n }\n\n button {\n font-weight: 600;\n letter-spacing: 0.8px;\n line-height: 24px;\n padding: 8px;\n\n &.hidden {\n visibility: hidden;\n }\n }\n"]);return L=function(){return n},n}function q(){let n=(0,h._)(["\n padding: 24px 0;\n display: flex;\n flex-flow: row wrap;\n justify-content: flex-start;\n margin-bottom: 20px;\n\n @media (",") {\n justify-content: space-between;\n }\n \n .dropdown, .checkbox {\n flex: 0 0 100%;\n margin-bottom: 16px;\n position: relative;\n\n span {\n top: 1px;\n }\n\n @media (",") {\n flex: 0 0 calc(50% - 12px);\n }\n\n @media (",") {\n flex: 0 1 calc(25% - 36px);\n }\n \n select {\n width: 100%;\n height: 42px;\n padding: 8px 16px;\n font-weight: 600;\n }\n }\n"]);return q=function(){return n},n}let H=g.ZP.div.withConfig({componentId:"sc-cc0b9e5b-0"})(P(),m.eq.xlMin,m.eq.xxlMin,m.eq.mdMin,m.eq.lgMin,m.eq.mdMax),D=g.ZP.div.withConfig({componentId:"sc-cc0b9e5b-1"})(B(),m.$_.lightBlue,m.eq.xlMax,m.eq.mdMax),E=g.ZP.div.withConfig({componentId:"sc-cc0b9e5b-2"})(L(),n=>{let{$display:e}=n;return e&&"\n border-bottom: 1px solid ".concat(m.$_.primaryBlack,";\n ")}),W=g.ZP.form.withConfig({componentId:"sc-cc0b9e5b-3"})(q(),m.eq.mdMin,m.eq.mdMin,m.eq.xlMin),F=n=>{let{filters:e,years:t,activeFilters:o,activeYear:a,search:c,updateFilters:p,resetFilters:u,updateSearch:x,updateYear:h}=n,[g,m]=(0,r.useState)(!0),f=e.filter(n=>"checkbox"===n.type||n.options&&n.options.length<=2&&(n.options.includes("yes")||n.options.includes("no"))),b=e.filter(n=>!f.includes(n)&&!("Name"===n.title||"Company"===n.title)),w=()=>{m(n=>!n)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(H,{children:[(0,i.jsx)(M,{initialValue:c,onChange:n=>x(n)}),(0,i.jsx)(z.Z,{years:t,currentYear:a,changeYear:n=>h(n)})]}),(0,i.jsx)(D,{children:!!e.length&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(E,{$display:g,children:[(0,i.jsxs)(d.w,{className:"title",font:"graphikCompact",tag:"h2",children:[(0,i.jsx)("span",{role:"button",tabIndex:0,onClick:w,onKeyDown:w,children:g?(0,i.jsx)(I.Z,{}):(0,i.jsx)(Z,{})})," ","Filters"]}),(0,i.jsx)(l.Z,{className:"transparent-black ".concat(Object.keys(o).length||c?"":"hidden"),onClick:u,children:"RESET FILTERS"})]}),g&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(W,{children:b.map(n=>{let{fieldName:e,title:t,options:r}=n;return(0,i.jsx)(s.Z,{className:"dropdown",name:t,value:o[e]||"",onChange:n=>p(""!==n?"ADD":"DELETE",e,n),dropdownItems:[{key:"",value:""},...(r||[]).map(n=>({key:n,value:n}))],children:t},t)})}),(0,i.jsx)(W,{children:f.map(n=>{let{fieldName:e,title:t}=n;return(0,i.jsx)(N.Z,{className:"checkbox",name:t,value:o[e]||!1,onChange:n=>p(n?"ADD":"DELETE",e,n),children:t},"".concat(t))})})]})]})})]})};var R=t(84805);function G(){let n=(0,h._)(["\n ",";\n"]);return G=function(){return n},n}function A(){let n=(0,h._)(["\n margin: 24px;\n\n\n @media (",") {\n margin: 48px 24px;\n }\n\n @media (",") {\n margin: 48px 48px;\n }\n"]);return A=function(){return n},n}let O=g.ZP.div.withConfig({componentId:"sc-bbcaa66d-0"})(G(),(0,m.yc)("48px","48px")),V=(0,g.ZP)(R.Z).withConfig({componentId:"sc-bbcaa66d-1"})(A(),m.eq.lgMin,m.eq.xxlMin),Y=n=>{let{franchiseList:e,initialFilters:t,years:a,initialYear:l,initialSearch:s}=n,c=(0,o.useRouter)(),{items:d,sortableFields:p,searchFields:u}=e,[h,g]=(0,r.useState)(d),[m,f]=(0,r.useState)(p),[b,w]=(0,r.useState)(u),[y,v]=(0,r.useState)(t),[k,j]=(0,r.useState)(s),[C,Z]=(0,r.useState)(l),I=(n,e,t)=>{"DELETE"===n?delete c.query[e]:c.query[e]=t,c.push(c,void 0,{shallow:!0})},N=()=>{let n=c.asPath.split("?")[0];c.push(n,void 0,{shallow:!0})},S=(n,e,t)=>{v(i=>"ADD"===n?{...i,[e]:t}:(delete i[e],{...i})),I(n,e,t)},T=()=>{v({}),j(""),N()},$=n=>{j(n),I(""===n?"DELETE":"ADD","Name",n)},M=async n=>(0,x.UK)("/ranking/".concat(e.slug,"/").concat(n,"/search/")).then(e=>(Z(n),j(""),v({}),e));return(0,r.useEffect)(()=>{let n=Object.keys(y),e=d.filter(e=>{let t=!0;return n.forEach(n=>{let i="string"==typeof y[n]?y[n]:"yes",r=b.findIndex(e=>e.fieldName===n);if(-1===r)t=!1;else{let n=b[r].title;e.data[n]!==i&&(t=!1)}}),e.name.toLowerCase().includes(k.toLowerCase())||(t=!1),t});g(e)},[y,k]),(0,r.useEffect)(()=>{j(s)},[s]),(0,r.useEffect)(()=>{v(t)},[t]),(0,r.useEffect)(()=>{g(e.items),f(e.sortableFields),w(e.searchFields)},[e]),(0,i.jsxs)(O,{className:"franchise-content",children:[(0,i.jsx)(V,{as:"h1",$fontFamily:"graphikCond",$size:{default:"level2",lgMin:"xlarge",mdMin:"large"},children:e.title}),(0,i.jsx)(F,{filters:b,years:a,activeFilters:y,activeYear:C,search:k,updateFilters:S,resetFilters:T,updateSearch:$,updateYear:M}),(0,i.jsx)(_,{items:h,sortableFields:m})]})};var J=Y},84805:function(n,e,t){t.d(e,{Z:function(){return d}});var i=t(82729),r=t(68458),o=t(65745);function a(){let n=(0,i._)(["\n @media (",") {\n font-size: ",";\n }\n "]);return a=function(){return n},n}function l(){let n=(0,i._)(["\n ","\n ","\n font-size: ",";\n\n ","\n "]);return l=function(){return n},n}function s(){let n=(0,i._)(["\n ",";\n"]);return s=function(){return n},n}let c=r.ZP.h2.withConfig({componentId:"sc-551ed5eb-0"})(s(),n=>{let{theme:e,$size:t,$fontFamily:i}=n,{defaultHeadingStyles:s,headingFonts:c}=e.typography.headings,d=c[i],p=null==d?void 0:d.custom,{default:u,...x}=t||{},h=function(n){let e={},t=Object.keys(n),i=["sm","mm","md","lg","hybrid","xl","xxl"];return[...i.map(n=>"".concat(n,"Min")),...i.map(n=>"".concat(n,"Max"))].forEach(i=>{t.includes(i)&&(e[i]=n[i])}),e}(x);return(0,r.iv)(l(),s,p,null==d?void 0:d.sizes[u],Object.keys(h).map(n=>(0,r.iv)(a(),o.eq[n],null==d?void 0:d.sizes[h[n]])))});var d=c}}]);
//# sourceMappingURL=8756-81abb2db07a4d89f.js.map