@sirsluginston/sharedui 2.0.6 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sharedui.js +57 -55
- package/dist/sharedui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/sharedui.js
CHANGED
|
@@ -53,12 +53,12 @@ function Tr() {
|
|
|
53
53
|
}
|
|
54
54
|
function Ue(r, a, d) {
|
|
55
55
|
{
|
|
56
|
-
var v = W.ReactDebugCurrentFrame,
|
|
57
|
-
|
|
58
|
-
var
|
|
56
|
+
var v = W.ReactDebugCurrentFrame, h = v.getStackAddendum();
|
|
57
|
+
h !== "" && (a += "%s", d = d.concat([h]));
|
|
58
|
+
var x = d.map(function(m) {
|
|
59
59
|
return String(m);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
x.unshift("Warning: " + a), Function.prototype.apply.call(console[r], console, x);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
var He = !1, Ve = !1, Xe = !1, qe = !1, Je = !1, fe;
|
|
@@ -74,8 +74,8 @@ function Tr() {
|
|
|
74
74
|
var v = r.displayName;
|
|
75
75
|
if (v)
|
|
76
76
|
return v;
|
|
77
|
-
var
|
|
78
|
-
return
|
|
77
|
+
var h = a.displayName || a.name || "";
|
|
78
|
+
return h !== "" ? d + "(" + h + ")" : d;
|
|
79
79
|
}
|
|
80
80
|
function ve(r) {
|
|
81
81
|
return r.displayName || "Context";
|
|
@@ -115,9 +115,9 @@ function Tr() {
|
|
|
115
115
|
var v = r.displayName || null;
|
|
116
116
|
return v !== null ? v : M(r.type) || "Memo";
|
|
117
117
|
case b: {
|
|
118
|
-
var
|
|
118
|
+
var h = r, x = h._payload, m = h._init;
|
|
119
119
|
try {
|
|
120
|
-
return M(m(
|
|
120
|
+
return M(m(x));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,14 +125,14 @@ function Tr() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var D = Object.assign, L = 0, pe, ge, me,
|
|
128
|
+
var D = Object.assign, L = 0, pe, ge, me, he, xe, ye, be;
|
|
129
129
|
function je() {
|
|
130
130
|
}
|
|
131
131
|
je.__reactDisabledLog = !0;
|
|
132
132
|
function Qe() {
|
|
133
133
|
{
|
|
134
134
|
if (L === 0) {
|
|
135
|
-
pe = console.log, ge = console.info, me = console.warn,
|
|
135
|
+
pe = console.log, ge = console.info, me = console.warn, he = console.error, xe = console.group, ye = console.groupCollapsed, be = console.groupEnd;
|
|
136
136
|
var r = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
@@ -171,10 +171,10 @@ function Tr() {
|
|
|
171
171
|
value: me
|
|
172
172
|
}),
|
|
173
173
|
error: D({}, r, {
|
|
174
|
-
value:
|
|
174
|
+
value: he
|
|
175
175
|
}),
|
|
176
176
|
group: D({}, r, {
|
|
177
|
-
value:
|
|
177
|
+
value: xe
|
|
178
178
|
}),
|
|
179
179
|
groupCollapsed: D({}, r, {
|
|
180
180
|
value: ye
|
|
@@ -193,8 +193,8 @@ function Tr() {
|
|
|
193
193
|
if (te === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
|
-
} catch (
|
|
197
|
-
var v =
|
|
196
|
+
} catch (h) {
|
|
197
|
+
var v = h.stack.trim().match(/\n( *(at )?)/);
|
|
198
198
|
te = v && v[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
@@ -216,10 +216,10 @@ function Tr() {
|
|
|
216
216
|
}
|
|
217
217
|
var v;
|
|
218
218
|
ae = !0;
|
|
219
|
-
var
|
|
219
|
+
var h = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var x;
|
|
222
|
+
x = oe.current, oe.current = null, Qe();
|
|
223
223
|
try {
|
|
224
224
|
if (a) {
|
|
225
225
|
var m = function() {
|
|
@@ -272,7 +272,7 @@ function Tr() {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
ae = !1, oe.current =
|
|
275
|
+
ae = !1, oe.current = x, Ze(), Error.prepareStackTrace = h;
|
|
276
276
|
}
|
|
277
277
|
var B = r ? r.displayName || r.name : "", z = B ? J(B) : "";
|
|
278
278
|
return typeof r == "function" && K.set(r, z), z;
|
|
@@ -304,9 +304,9 @@ function Tr() {
|
|
|
304
304
|
case y:
|
|
305
305
|
return G(r.type, a, d);
|
|
306
306
|
case b: {
|
|
307
|
-
var v = r,
|
|
307
|
+
var v = r, h = v._payload, x = v._init;
|
|
308
308
|
try {
|
|
309
|
-
return G(h
|
|
309
|
+
return G(x(h), a, d);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
@@ -321,11 +321,11 @@ function Tr() {
|
|
|
321
321
|
} else
|
|
322
322
|
Ce.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function tr(r, a, d, v,
|
|
324
|
+
function tr(r, a, d, v, h) {
|
|
325
325
|
{
|
|
326
|
-
var
|
|
326
|
+
var x = Function.call.bind(O);
|
|
327
327
|
for (var m in r)
|
|
328
|
-
if (
|
|
328
|
+
if (x(r, m)) {
|
|
329
329
|
var g = void 0;
|
|
330
330
|
try {
|
|
331
331
|
if (typeof r[m] != "function") {
|
|
@@ -336,7 +336,7 @@ function Tr() {
|
|
|
336
336
|
} catch (k) {
|
|
337
337
|
g = k;
|
|
338
338
|
}
|
|
339
|
-
g && !(g instanceof Error) && (Q(
|
|
339
|
+
g && !(g instanceof Error) && (Q(h), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", d, m, typeof g), Q(null)), g instanceof Error && !(g.message in we) && (we[g.message] = !0, Q(h), S("Failed %s type: %s", d, g.message), Q(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -411,7 +411,7 @@ function Tr() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var vr = function(r, a, d, v,
|
|
414
|
+
var vr = function(r, a, d, v, h, x, m) {
|
|
415
415
|
var g = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
417
|
$$typeof: t,
|
|
@@ -421,7 +421,7 @@ function Tr() {
|
|
|
421
421
|
ref: d,
|
|
422
422
|
props: m,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
|
-
_owner:
|
|
424
|
+
_owner: x
|
|
425
425
|
};
|
|
426
426
|
return g._store = {}, Object.defineProperty(g._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
@@ -437,25 +437,25 @@ function Tr() {
|
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !1,
|
|
440
|
-
value:
|
|
440
|
+
value: h
|
|
441
441
|
}), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
|
|
442
442
|
};
|
|
443
|
-
function pr(r, a, d, v,
|
|
443
|
+
function pr(r, a, d, v, h) {
|
|
444
444
|
{
|
|
445
|
-
var
|
|
446
|
-
d !== void 0 && (Re(d), g = "" + d), cr(a) && (Re(a.key), g = "" + a.key), lr(a) && (R = a.ref, dr(a,
|
|
447
|
-
for (
|
|
448
|
-
O.call(a,
|
|
445
|
+
var x, m = {}, g = null, R = null;
|
|
446
|
+
d !== void 0 && (Re(d), g = "" + d), cr(a) && (Re(a.key), g = "" + a.key), lr(a) && (R = a.ref, dr(a, h));
|
|
447
|
+
for (x in a)
|
|
448
|
+
O.call(a, x) && !ir.hasOwnProperty(x) && (m[x] = a[x]);
|
|
449
449
|
if (r && r.defaultProps) {
|
|
450
450
|
var k = r.defaultProps;
|
|
451
|
-
for (
|
|
452
|
-
m[
|
|
451
|
+
for (x in k)
|
|
452
|
+
m[x] === void 0 && (m[x] = k[x]);
|
|
453
453
|
}
|
|
454
454
|
if (g || R) {
|
|
455
455
|
var w = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
456
456
|
g && ur(m, w), R && fr(m, w);
|
|
457
457
|
}
|
|
458
|
-
return vr(r, g, R,
|
|
458
|
+
return vr(r, g, R, h, v, Te.current, m);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
var se = W.ReactCurrentOwner, _e = W.ReactDebugCurrentFrame;
|
|
@@ -524,14 +524,14 @@ Check the top-level render call using <` + d + ">.");
|
|
|
524
524
|
else if (le(r))
|
|
525
525
|
r._store && (r._store.validated = !0);
|
|
526
526
|
else if (r) {
|
|
527
|
-
var
|
|
528
|
-
if (typeof
|
|
529
|
-
for (var
|
|
527
|
+
var h = Ne(r);
|
|
528
|
+
if (typeof h == "function" && h !== r.entries)
|
|
529
|
+
for (var x = h.call(r), m; !(m = x.next()).done; )
|
|
530
530
|
le(m.value) && De(m.value, a);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function hr(r) {
|
|
535
535
|
{
|
|
536
536
|
var a = r.type;
|
|
537
537
|
if (a == null || typeof a == "string")
|
|
@@ -550,13 +550,13 @@ Check the top-level render call using <` + d + ">.");
|
|
|
550
550
|
tr(d, r.props, "prop", v, r);
|
|
551
551
|
} else if (a.PropTypes !== void 0 && !ie) {
|
|
552
552
|
ie = !0;
|
|
553
|
-
var
|
|
554
|
-
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
553
|
+
var h = M(a);
|
|
554
|
+
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown");
|
|
555
555
|
}
|
|
556
556
|
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function xr(r) {
|
|
560
560
|
{
|
|
561
561
|
for (var a = Object.keys(r.props), d = 0; d < a.length; d++) {
|
|
562
562
|
var v = a[d];
|
|
@@ -569,7 +569,7 @@ Check the top-level render call using <` + d + ">.");
|
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
var Pe = {};
|
|
572
|
-
function We(r, a, d, v,
|
|
572
|
+
function We(r, a, d, v, h, x) {
|
|
573
573
|
{
|
|
574
574
|
var m = Ke(r);
|
|
575
575
|
if (!m) {
|
|
@@ -580,7 +580,7 @@ Check the top-level render call using <` + d + ">.");
|
|
|
580
580
|
var k;
|
|
581
581
|
r === null ? k = "null" : ne(r) ? k = "array" : r !== void 0 && r.$$typeof === t ? (k = "<" + (M(r.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : k = typeof r, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, g);
|
|
582
582
|
}
|
|
583
|
-
var w = pr(r, a, d,
|
|
583
|
+
var w = pr(r, a, d, h, x);
|
|
584
584
|
if (w == null)
|
|
585
585
|
return w;
|
|
586
586
|
if (m) {
|
|
@@ -610,7 +610,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
610
610
|
<%s key={someKey} {...props} />`, ce, z, wr, z), Pe[z + ce] = !0;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
return r === i ?
|
|
613
|
+
return r === i ? xr(w) : hr(w), w;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
function yr(r, a, d) {
|
|
@@ -2515,7 +2515,7 @@ const Ye = ({
|
|
|
2515
2515
|
onNotificationClick: i
|
|
2516
2516
|
}) => {
|
|
2517
2517
|
const n = [
|
|
2518
|
-
{ label: "
|
|
2518
|
+
{ label: "Home", path: "/" },
|
|
2519
2519
|
{ label: t.name }
|
|
2520
2520
|
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
|
2521
2521
|
value: t.stats.score,
|
|
@@ -2547,7 +2547,7 @@ const Ye = ({
|
|
|
2547
2547
|
{
|
|
2548
2548
|
title: "States & Territories",
|
|
2549
2549
|
items: t.directory,
|
|
2550
|
-
basePath: "",
|
|
2550
|
+
basePath: "/state",
|
|
2551
2551
|
initialLimit: 60
|
|
2552
2552
|
}
|
|
2553
2553
|
)
|
|
@@ -2564,7 +2564,8 @@ const Ye = ({
|
|
|
2564
2564
|
onNotificationClick: i
|
|
2565
2565
|
}) => {
|
|
2566
2566
|
const n = [
|
|
2567
|
-
{ label: "
|
|
2567
|
+
{ label: "Home", path: "/" },
|
|
2568
|
+
{ label: "USA", path: "/usa" },
|
|
2568
2569
|
{ label: t.name }
|
|
2569
2570
|
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
|
2570
2571
|
value: t.stats.score,
|
|
@@ -2622,8 +2623,9 @@ const Ye = ({
|
|
|
2622
2623
|
onNotificationClick: i
|
|
2623
2624
|
}) => {
|
|
2624
2625
|
const n = [
|
|
2625
|
-
{ label: "
|
|
2626
|
-
{ label:
|
|
2626
|
+
{ label: "Home", path: "/" },
|
|
2627
|
+
{ label: "USA", path: "/usa" },
|
|
2628
|
+
{ label: t.stateName, path: `/state/${t.state.toLowerCase()}` },
|
|
2627
2629
|
{ label: t.name }
|
|
2628
2630
|
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
|
2629
2631
|
value: t.stats.score,
|
|
@@ -2682,8 +2684,8 @@ const Ye = ({
|
|
|
2682
2684
|
}) => {
|
|
2683
2685
|
var u;
|
|
2684
2686
|
const n = [
|
|
2685
|
-
{ label: "
|
|
2686
|
-
{ label: "
|
|
2687
|
+
{ label: "Home", path: "/" },
|
|
2688
|
+
{ label: "USA", path: "/usa" },
|
|
2687
2689
|
{ label: t.name }
|
|
2688
2690
|
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
|
2689
2691
|
value: t.stats.score,
|
|
@@ -2715,7 +2717,7 @@ const Ye = ({
|
|
|
2715
2717
|
{
|
|
2716
2718
|
title: "Locations",
|
|
2717
2719
|
items: t.sites,
|
|
2718
|
-
basePath:
|
|
2720
|
+
basePath: "/site"
|
|
2719
2721
|
}
|
|
2720
2722
|
),
|
|
2721
2723
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2740,8 +2742,8 @@ const Ye = ({
|
|
|
2740
2742
|
onNotificationClick: i
|
|
2741
2743
|
}) => {
|
|
2742
2744
|
const n = [
|
|
2743
|
-
{ label: "
|
|
2744
|
-
{ label: "
|
|
2745
|
+
{ label: "Home", path: "/" },
|
|
2746
|
+
{ label: "USA", path: "/usa" },
|
|
2745
2747
|
{ label: t.companyName, path: `/company/${t.companySlug}` },
|
|
2746
2748
|
{ label: `#${t.siteId}` }
|
|
2747
2749
|
], l = o.scoreConfig && t.stats.score !== void 0 ? {
|
package/dist/sharedui.umd.cjs
CHANGED
|
@@ -73,4 +73,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
73
73
|
margin-top: auto;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
`}),e.jsx("div",{className:"mobile-ad-banner",children:e.jsx("div",{"data-ad-slot":"mobile-banner",style:{width:"100%",maxWidth:468,height:60,margin:"0 auto",backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.8rem",color:"var(--text-color)",opacity:.6},children:"Ad (468×60)"})})]});function be(o){const[t,s]=j.useState(()=>{if(typeof window>"u")return!1;const n=localStorage.getItem("theme-mode");return n?n==="dark":o.theme.defaultTheme==="dark"?!0:o.theme.defaultTheme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});j.useEffect(()=>{je(o.theme)},[o.theme]),j.useEffect(()=>{document.body.classList.toggle("dark-mode",t),localStorage.setItem("theme-mode",t?"dark":"light")},[t]);const i=j.useCallback(()=>{s(n=>!n)},[]);return{darkMode:t,toggleDarkMode:i}}function je(o){const t=document.documentElement;t.style.setProperty("--primary-color",o.primaryColor),t.style.setProperty("--secondary-color",o.secondaryColor),t.style.setProperty("--accent-color",o.accentColor),o.surfaceLight&&t.style.setProperty("--surface-light",o.surfaceLight),o.surfaceDark&&t.style.setProperty("--surface-dark",o.surfaceDark),o.textLight&&t.style.setProperty("--text-light",o.textLight),o.textDark&&t.style.setProperty("--text-dark",o.textDark)}const W=({brand:o,children:t,onAccountClick:s,onNotificationClick:i})=>{const{darkMode:n,toggleDarkMode:l}=be(o);return e.jsxs("div",{className:"shell",style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[e.jsx(he,{brand:o,darkMode:n,onThemeToggle:l,onAccountClick:s,onNotificationClick:i}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsx("main",{style:{flex:1,backgroundColor:"var(--bg-color)"},children:t}),e.jsx(xe,{})]}),e.jsx(ye,{copyrightBrand:o.footer.copyrightBrand,yearCreated:o.footer.yearCreated,poweredBy:o.footer.poweredBy})]})},B=({title:o,subtitle:t,breadcrumbs:s,score:i})=>e.jsxs("section",{style:{backgroundColor:"var(--secondary-color)",padding:"var(--space-lg) var(--space-lg)",textAlign:"center",borderBottom:"4px solid var(--accent-color)"},children:[s&&s.length>0&&e.jsx("nav",{style:{marginBottom:"var(--space-md)",display:"flex",justifyContent:"center",gap:"var(--space-sm)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600},children:s.map((n,l)=>e.jsxs(j.Fragment,{children:[l>0&&e.jsx("span",{style:{color:"var(--surface-light)",opacity:.4},children:"/"}),n.path?e.jsx("a",{href:n.path,style:{color:"var(--accent-color)",textDecoration:"none"},children:n.label}):e.jsx("span",{style:{color:"var(--surface-light)",opacity:.8},children:n.label})]},n.label))}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"clamp(2rem, 5vw, 3.5rem)",fontWeight:700,color:"var(--text-dark)",letterSpacing:"0.02em"},children:o}),t&&e.jsx("p",{style:{margin:"var(--space-sm) 0 0",fontFamily:"var(--font-sans)",fontSize:"1.1rem",color:"var(--text-dark)",opacity:.8},children:t}),i&&e.jsxs("div",{style:{marginTop:"var(--space-md)",display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"var(--space-xs)"},children:[e.jsxs("div",{style:{backgroundColor:"var(--accent-color)",color:"white",padding:"var(--space-sm) var(--space-lg)",borderRadius:"var(--radius-full)",fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",display:"flex",alignItems:"center",gap:"var(--space-sm)",boxShadow:"var(--shadow-md)"},children:[e.jsx("span",{children:i.value}),e.jsx("span",{style:{fontSize:"0.9rem",fontWeight:500},children:i.label})]}),i.betaDisclaimer&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-dark)",opacity:.6,fontStyle:"italic"},children:"Score algorithm is a work in progress"})]})]}),_={violations:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--warning-color)",strokeWidth:"2",children:[e.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),injuries:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--info-color)",strokeWidth:"2",children:e.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})}),fatalities:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),fines:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"23"}),e.jsx("path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),avgFine:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--secondary-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),e.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),e.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]}),trendUp:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 6 13.5 15.5 8.5 10.5 1 18"}),e.jsx("polyline",{points:"17 6 23 6 23 12"})]}),trendDown:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 18 13.5 8.5 8.5 13.5 1 6"}),e.jsx("polyline",{points:"17 18 23 18 23 12"})]})},O=({stats:o,columns:t=4})=>{const s=[{label:"Total Events",value:o.totalEvents,icon:_.violations},o.totalCompanies!==void 0&&{label:"Companies",value:o.totalCompanies,icon:_.avgFine},o.totalCities!==void 0&&{label:"Cities",value:o.totalCities,icon:_.avgFine},o.totalStates!==void 0&&{label:"States",value:o.totalStates,icon:_.avgFine},o.totalInjuries!==void 0&&{label:"Injuries",value:o.totalInjuries,icon:_.injuries},o.totalFatalities!==void 0&&{label:"Fatalities",value:o.totalFatalities,icon:_.fatalities},o.totalFines!==void 0&&{label:"Total Fines",value:ke(o.totalFines),icon:_.fines},o.avgFines!==void 0&&{label:"Avg Fine",value:ke(o.avgFines),icon:_.avgFine},o.trend&&{label:"YoY Change",value:`${o.trend.direction==="up"?"↑":o.trend.direction==="down"?"↓":"→"} ${o.trend.percentage}%`,icon:o.trend.direction==="down"?_.trendDown:_.trendUp}].filter(Boolean);return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsx("div",{className:"stat-grid",style:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"var(--space-md)"},children:s.map(i=>e.jsx(gr,{...i},i.label))})})},gr=({label:o,value:t,icon:s})=>e.jsxs("div",{style:{padding:"var(--space-lg)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",display:"flex",alignItems:"center",gap:"var(--space-md)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",cursor:"default"},onMouseEnter:i=>{i.currentTarget.style.transform="translateY(-2px)",i.currentTarget.style.boxShadow="var(--shadow-md)"},onMouseLeave:i=>{i.currentTarget.style.transform="translateY(0)",i.currentTarget.style.boxShadow="none"},children:[e.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:s}),e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",color:"var(--primary-color)"},children:typeof t=="number"?t.toLocaleString():t}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.8},children:o})]})]});function ke(o){return o>=1e6?`$${(o/1e6).toFixed(1)}M`:o>=1e3?`$${(o/1e3).toFixed(0)}K`:`$${o.toLocaleString()}`}const X=({title:o,items:t,basePath:s,emptyMessage:i="No items found",showSearch:n=!0,initialLimit:l=30})=>{const[c,u]=j.useState(""),[f,w]=j.useState(!1),g=t.filter(T=>T.name.toLowerCase().includes(c.toLowerCase())),b=f||c.length>0,k=b?g:g.slice(0,l),D=g.length>l&&!b;return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)",flexWrap:"wrap",gap:"var(--space-sm)"},children:[e.jsxs("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:[o,e.jsxs("span",{style:{marginLeft:"var(--space-sm)",fontSize:"1rem",opacity:.6},children:["(",t.length,")"]})]}),n&&t.length>10&&e.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:T=>u(T.target.value),style:{padding:"var(--space-sm) var(--space-md)",borderRadius:"var(--radius-md)",border:"2px solid var(--border-color)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",backgroundColor:"var(--bg-color)",color:"var(--text-color)",width:200}})]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)",padding:"var(--space-md)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:g.length===0?e.jsx("p",{style:{width:"100%",textAlign:"center",color:"var(--text-color)",opacity:.6,margin:0,padding:"var(--space-lg)"},children:i}):e.jsxs(e.Fragment,{children:[k.map(T=>e.jsxs("a",{href:`${s}/${T.slug}`,style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",borderRadius:"var(--radius-sm)",textDecoration:"none",color:"var(--text-color)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",transition:"all var(--transition-fast)",whiteSpace:"nowrap"},onMouseEnter:M=>{M.currentTarget.style.backgroundColor="var(--primary-color)",M.currentTarget.style.color="var(--surface-light)",M.currentTarget.style.borderColor="var(--primary-color)"},onMouseLeave:M=>{M.currentTarget.style.backgroundColor="var(--bg-color)",M.currentTarget.style.color="var(--text-color)",M.currentTarget.style.borderColor="var(--border-color)"},children:[e.jsx("span",{style:{fontWeight:500},children:T.name}),e.jsx("span",{title:`${T.count.toLocaleString()} incidents`,style:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)",padding:"2px 6px",borderRadius:"var(--radius-full)",fontSize:"0.75rem",fontWeight:600},children:T.count.toLocaleString()})]},T.slug)),(D||f)&&e.jsx("button",{onClick:()=>w(!f),style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--accent-color)",border:"none",borderRadius:"var(--radius-sm)",color:"var(--surface-light)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",fontWeight:500,cursor:"pointer",transition:"all var(--transition-fast)"},onMouseEnter:T=>{T.currentTarget.style.opacity="0.8"},onMouseLeave:T=>{T.currentTarget.style.opacity="1"},children:f?"Show less":`+${g.length-l} more`})]})})]})})},J=({title:o,events:t,viewMorePath:s,showAgencyBadge:i=!1})=>t.length===0?null:e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)"},children:[e.jsx("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:o}),s&&e.jsx("a",{href:s,style:{color:"var(--accent-color)",textDecoration:"none",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.9rem"},children:"View More →"})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:t.map(n=>e.jsx(mr,{event:n,showAgencyBadge:i},n.eventId))})]})}),mr=({event:o,showAgencyBadge:t})=>e.jsx("div",{style:{padding:"var(--space-md) var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)"},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"var(--space-md)",flexWrap:"wrap"},children:[e.jsxs("div",{style:{flex:1,minWidth:200},children:[e.jsx("h3",{style:{margin:0,fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"1rem",color:"var(--text-color)"},children:o.eventTitle}),o.eventDescription&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.7,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:o.eventDescription})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"var(--space-xs)"},children:[t&&e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--bg-color)",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.75rem",textTransform:"uppercase"},children:o.agency}),o.eventDate&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:hr(o.eventDate)}),(o.city||o.state)&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:[o.city,o.state].filter(Boolean).join(", ")}),o.companyName&&e.jsxs("a",{href:`/company/${o.companySlug}`,style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--primary-color)",textDecoration:"none",fontWeight:600,transition:"color var(--transition-fast)"},onMouseEnter:s=>s.currentTarget.style.color="var(--accent-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--primary-color)",children:[o.companyName," →"]})]})]})});function hr(o){try{return new Date(o).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return o}}const ae=({position:o,width:t,height:s})=>{const i={sidebar:{width:t??280,height:s??250},"left-sidebar":{width:t??"100%",height:s??200},banner:{width:t??"100%",height:s??90},inline:{width:t??"100%",height:s??120}},{width:n,height:l}=i[o];return e.jsxs("div",{"data-ad-slot":o,style:{width:n,height:l,backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.5},children:["Ad Placeholder (",o,")"]})},L=({meta:o,showAd:t=!0})=>{if(!o&&!t)return null;const s=o?[o.population&&{label:"Population",value:o.population.toLocaleString()},o.industry&&{label:"Industry",value:o.industry},o.founded&&{label:"Founded",value:o.founded},o.headquarters&&{label:"HQ",value:o.headquarters}].filter(Boolean):[];return e.jsxs("aside",{className:"page-sidebar",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[s.length>0&&e.jsxs("div",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[(o==null?void 0:o.logoUrl)&&e.jsx("div",{style:{width:80,height:80,margin:"0 auto var(--space-md)",borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"white",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("img",{src:o.logoUrl,alt:"",style:{maxWidth:"100%",maxHeight:"100%"}})}),(o==null?void 0:o.flagUrl)&&e.jsx("div",{style:{width:"100%",margin:"0 auto var(--space-md)",borderRadius:"var(--radius-sm)",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--border-color)"},children:e.jsx("img",{src:o.flagUrl,alt:"",style:{width:"100%",height:"auto",display:"block"}})}),e.jsx("dl",{style:{margin:0},children:s.map(({label:i,value:n})=>e.jsxs("div",{style:{padding:"var(--space-sm) 0",borderBottom:"1px solid var(--border-color)"},children:[e.jsx("dt",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-color)",opacity:.6,textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:"2px"},children:i}),e.jsx("dd",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:n})]},i))})]}),t&&e.jsx(ae,{position:"sidebar"})]})},Y=({showAd:o=!0})=>e.jsxs("aside",{className:"page-filters",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsxs("div",{style:{padding:"var(--space-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[e.jsx("h3",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.1rem",color:"var(--text-color)"},children:"Filters"}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Date Range"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"All Time"}),e.jsx("option",{children:"Last Year"}),e.jsx("option",{children:"Last 5 Years"}),e.jsx("option",{children:"Last 10 Years"})]})]}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Severity"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-xs)"},children:["All","Fatalities","Hospitalizations","Amputations"].map(t=>e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",fontSize:"0.85rem",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",defaultChecked:t==="All",style:{accentColor:"var(--primary-color)"}}),t]},t))})]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Sort By"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"Most Incidents"}),e.jsx("option",{children:"Most Recent"}),e.jsx("option",{children:"Highest Fines"}),e.jsx("option",{children:"Alphabetical"})]})]})]}),o&&e.jsx(ae,{position:"left-sidebar"})]}),yr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"Explore",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:o.tagline||"Explore worker safety data across the nation",breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats,columns:4}),e.jsx(X,{title:"States & Territories",items:t.directory,basePath:"",initialLimit:60})]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},xr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency);return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),e.jsx(X,{title:"Cities",items:t.directory,basePath:"/city"}),c.map(u=>e.jsx(J,{title:`Recent ${u} Incidents`,events:t.recentByAgency[u],viewMorePath:`/${t.slug.toLowerCase()}/events/${u.toLowerCase()}`,showAgencyBadge:!1},u))]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},br=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:t.stateName,path:`/${t.state.toLowerCase()}`},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency),u=`/${t.state.toLowerCase()}/${t.slug}`;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:`${t.name}, ${t.state}`,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),e.jsx(X,{title:"Companies",items:t.directory,basePath:"/company"}),c.map(f=>e.jsx(J,{title:`Recent ${f} Incidents`,events:t.recentByAgency[f],viewMorePath:`${u}/events/${f.toLowerCase()}`,showAgencyBadge:!1},f))]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},jr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{var u;const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=t.sites&&t.sites.length>0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:(u=t.meta)!=null&&u.industry?`${t.meta.industry}`:void 0,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),c&&e.jsx(X,{title:"Locations",items:t.sites,basePath:`/company/${t.slug}/site`}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents.slice(0,c?5:10),viewMorePath:`/company/${t.slug}/events`,showAgencyBadge:!0})]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},kr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"USA",path:"/explore"},{label:"Companies",path:"/companies"},{label:t.companyName,path:`/company/${t.companySlug}`},{label:`#${t.siteId}`}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Location #${t.siteId} of ${t.companyName}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),t.siblings&&t.siblings.length>0&&e.jsxs("section",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",marginBottom:"var(--space-lg)",borderRadius:"var(--radius-md)",border:"1px solid var(--border-color)"},children:[e.jsx("h2",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:"Compare to Other Locations"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)"},children:t.siblings.slice(0,10).map(c=>e.jsxs("a",{href:`/company/${t.companySlug}/site/${c.slug}`,style:{padding:"var(--space-sm) var(--space-md)",backgroundColor:"var(--secondary-color)",borderRadius:"var(--radius-md)",textDecoration:"none",color:"var(--text-dark)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",display:"flex",alignItems:"center",gap:"var(--space-xs)",transition:"background var(--transition-fast)"},onMouseEnter:u=>u.currentTarget.style.backgroundColor="var(--accent-color)",onMouseLeave:u=>u.currentTarget.style.backgroundColor="var(--secondary-color)",children:[e.jsxs("span",{children:["#",c.name]}),e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--text-dark)",padding:"2px 6px",borderRadius:"var(--radius-sm)",fontSize:"0.75rem"},children:c.count})]},c.slug))})]}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents,viewMorePath:`/company/${t.companySlug}/site/${t.siteId}/events`,showAgencyBadge:!0})]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})};p.AdSlot=ae,p.Alert=tr,p.Badge=qe,p.Button=Ge,p.Card=Ze,p.CityPage=br,p.CompanyPage=jr,p.Directory=X,p.FilterSidebar=Y,p.Footer=ye,p.Header=he,p.Hero=B,p.InfoSidebar=L,p.Input=er,p.LoadingOverlay=sr,p.MobileAdBanner=xe,p.Modal=or,p.NationPage=yr,p.RecentEvents=J,p.Shell=W,p.SitePage=kr,p.Skeleton=te,p.SkeletonCard=ir,p.SkeletonText=me,p.Spinner=ge,p.StatGrid=O,p.StatePage=xr,p.Table=rr,p.Tabs=ar,p.Tooltip=nr,p.applyTheme=je,p.useTheme=be,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
76
|
+
`}),e.jsx("div",{className:"mobile-ad-banner",children:e.jsx("div",{"data-ad-slot":"mobile-banner",style:{width:"100%",maxWidth:468,height:60,margin:"0 auto",backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.8rem",color:"var(--text-color)",opacity:.6},children:"Ad (468×60)"})})]});function be(o){const[t,s]=j.useState(()=>{if(typeof window>"u")return!1;const n=localStorage.getItem("theme-mode");return n?n==="dark":o.theme.defaultTheme==="dark"?!0:o.theme.defaultTheme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});j.useEffect(()=>{je(o.theme)},[o.theme]),j.useEffect(()=>{document.body.classList.toggle("dark-mode",t),localStorage.setItem("theme-mode",t?"dark":"light")},[t]);const i=j.useCallback(()=>{s(n=>!n)},[]);return{darkMode:t,toggleDarkMode:i}}function je(o){const t=document.documentElement;t.style.setProperty("--primary-color",o.primaryColor),t.style.setProperty("--secondary-color",o.secondaryColor),t.style.setProperty("--accent-color",o.accentColor),o.surfaceLight&&t.style.setProperty("--surface-light",o.surfaceLight),o.surfaceDark&&t.style.setProperty("--surface-dark",o.surfaceDark),o.textLight&&t.style.setProperty("--text-light",o.textLight),o.textDark&&t.style.setProperty("--text-dark",o.textDark)}const W=({brand:o,children:t,onAccountClick:s,onNotificationClick:i})=>{const{darkMode:n,toggleDarkMode:l}=be(o);return e.jsxs("div",{className:"shell",style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[e.jsx(he,{brand:o,darkMode:n,onThemeToggle:l,onAccountClick:s,onNotificationClick:i}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsx("main",{style:{flex:1,backgroundColor:"var(--bg-color)"},children:t}),e.jsx(xe,{})]}),e.jsx(ye,{copyrightBrand:o.footer.copyrightBrand,yearCreated:o.footer.yearCreated,poweredBy:o.footer.poweredBy})]})},B=({title:o,subtitle:t,breadcrumbs:s,score:i})=>e.jsxs("section",{style:{backgroundColor:"var(--secondary-color)",padding:"var(--space-lg) var(--space-lg)",textAlign:"center",borderBottom:"4px solid var(--accent-color)"},children:[s&&s.length>0&&e.jsx("nav",{style:{marginBottom:"var(--space-md)",display:"flex",justifyContent:"center",gap:"var(--space-sm)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600},children:s.map((n,l)=>e.jsxs(j.Fragment,{children:[l>0&&e.jsx("span",{style:{color:"var(--surface-light)",opacity:.4},children:"/"}),n.path?e.jsx("a",{href:n.path,style:{color:"var(--accent-color)",textDecoration:"none"},children:n.label}):e.jsx("span",{style:{color:"var(--surface-light)",opacity:.8},children:n.label})]},n.label))}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"clamp(2rem, 5vw, 3.5rem)",fontWeight:700,color:"var(--text-dark)",letterSpacing:"0.02em"},children:o}),t&&e.jsx("p",{style:{margin:"var(--space-sm) 0 0",fontFamily:"var(--font-sans)",fontSize:"1.1rem",color:"var(--text-dark)",opacity:.8},children:t}),i&&e.jsxs("div",{style:{marginTop:"var(--space-md)",display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"var(--space-xs)"},children:[e.jsxs("div",{style:{backgroundColor:"var(--accent-color)",color:"white",padding:"var(--space-sm) var(--space-lg)",borderRadius:"var(--radius-full)",fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",display:"flex",alignItems:"center",gap:"var(--space-sm)",boxShadow:"var(--shadow-md)"},children:[e.jsx("span",{children:i.value}),e.jsx("span",{style:{fontSize:"0.9rem",fontWeight:500},children:i.label})]}),i.betaDisclaimer&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-dark)",opacity:.6,fontStyle:"italic"},children:"Score algorithm is a work in progress"})]})]}),_={violations:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--warning-color)",strokeWidth:"2",children:[e.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),injuries:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--info-color)",strokeWidth:"2",children:e.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})}),fatalities:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),fines:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"23"}),e.jsx("path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),avgFine:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--secondary-color)",strokeWidth:"2",children:[e.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),e.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),e.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]}),trendUp:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--danger-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 6 13.5 15.5 8.5 10.5 1 18"}),e.jsx("polyline",{points:"17 6 23 6 23 12"})]}),trendDown:e.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--success-color)",strokeWidth:"2",children:[e.jsx("polyline",{points:"23 18 13.5 8.5 8.5 13.5 1 6"}),e.jsx("polyline",{points:"17 18 23 18 23 12"})]})},O=({stats:o,columns:t=4})=>{const s=[{label:"Total Events",value:o.totalEvents,icon:_.violations},o.totalCompanies!==void 0&&{label:"Companies",value:o.totalCompanies,icon:_.avgFine},o.totalCities!==void 0&&{label:"Cities",value:o.totalCities,icon:_.avgFine},o.totalStates!==void 0&&{label:"States",value:o.totalStates,icon:_.avgFine},o.totalInjuries!==void 0&&{label:"Injuries",value:o.totalInjuries,icon:_.injuries},o.totalFatalities!==void 0&&{label:"Fatalities",value:o.totalFatalities,icon:_.fatalities},o.totalFines!==void 0&&{label:"Total Fines",value:ke(o.totalFines),icon:_.fines},o.avgFines!==void 0&&{label:"Avg Fine",value:ke(o.avgFines),icon:_.avgFine},o.trend&&{label:"YoY Change",value:`${o.trend.direction==="up"?"↑":o.trend.direction==="down"?"↓":"→"} ${o.trend.percentage}%`,icon:o.trend.direction==="down"?_.trendDown:_.trendUp}].filter(Boolean);return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsx("div",{className:"stat-grid",style:{display:"grid",gridTemplateColumns:`repeat(${t}, 1fr)`,gap:"var(--space-md)"},children:s.map(i=>e.jsx(gr,{...i},i.label))})})},gr=({label:o,value:t,icon:s})=>e.jsxs("div",{style:{padding:"var(--space-lg)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",display:"flex",alignItems:"center",gap:"var(--space-md)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",cursor:"default"},onMouseEnter:i=>{i.currentTarget.style.transform="translateY(-2px)",i.currentTarget.style.boxShadow="var(--shadow-md)"},onMouseLeave:i=>{i.currentTarget.style.transform="translateY(0)",i.currentTarget.style.boxShadow="none"},children:[e.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:s}),e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontWeight:700,fontSize:"1.5rem",color:"var(--primary-color)"},children:typeof t=="number"?t.toLocaleString():t}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.8},children:o})]})]});function ke(o){return o>=1e6?`$${(o/1e6).toFixed(1)}M`:o>=1e3?`$${(o/1e3).toFixed(0)}K`:`$${o.toLocaleString()}`}const X=({title:o,items:t,basePath:s,emptyMessage:i="No items found",showSearch:n=!0,initialLimit:l=30})=>{const[c,u]=j.useState(""),[f,w]=j.useState(!1),g=t.filter(T=>T.name.toLowerCase().includes(c.toLowerCase())),b=f||c.length>0,k=b?g:g.slice(0,l),D=g.length>l&&!b;return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)",flexWrap:"wrap",gap:"var(--space-sm)"},children:[e.jsxs("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:[o,e.jsxs("span",{style:{marginLeft:"var(--space-sm)",fontSize:"1rem",opacity:.6},children:["(",t.length,")"]})]}),n&&t.length>10&&e.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:T=>u(T.target.value),style:{padding:"var(--space-sm) var(--space-md)",borderRadius:"var(--radius-md)",border:"2px solid var(--border-color)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",backgroundColor:"var(--bg-color)",color:"var(--text-color)",width:200}})]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)",padding:"var(--space-md)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:g.length===0?e.jsx("p",{style:{width:"100%",textAlign:"center",color:"var(--text-color)",opacity:.6,margin:0,padding:"var(--space-lg)"},children:i}):e.jsxs(e.Fragment,{children:[k.map(T=>e.jsxs("a",{href:`${s}/${T.slug}`,style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--bg-color)",border:"1px solid var(--border-color)",borderRadius:"var(--radius-sm)",textDecoration:"none",color:"var(--text-color)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",transition:"all var(--transition-fast)",whiteSpace:"nowrap"},onMouseEnter:M=>{M.currentTarget.style.backgroundColor="var(--primary-color)",M.currentTarget.style.color="var(--surface-light)",M.currentTarget.style.borderColor="var(--primary-color)"},onMouseLeave:M=>{M.currentTarget.style.backgroundColor="var(--bg-color)",M.currentTarget.style.color="var(--text-color)",M.currentTarget.style.borderColor="var(--border-color)"},children:[e.jsx("span",{style:{fontWeight:500},children:T.name}),e.jsx("span",{title:`${T.count.toLocaleString()} incidents`,style:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)",padding:"2px 6px",borderRadius:"var(--radius-full)",fontSize:"0.75rem",fontWeight:600},children:T.count.toLocaleString()})]},T.slug)),(D||f)&&e.jsx("button",{onClick:()=>w(!f),style:{display:"inline-flex",alignItems:"center",gap:"var(--space-xs)",padding:"var(--space-xs) var(--space-sm)",backgroundColor:"var(--accent-color)",border:"none",borderRadius:"var(--radius-sm)",color:"var(--surface-light)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",fontWeight:500,cursor:"pointer",transition:"all var(--transition-fast)"},onMouseEnter:T=>{T.currentTarget.style.opacity="0.8"},onMouseLeave:T=>{T.currentTarget.style.opacity="1"},children:f?"Show less":`+${g.length-l} more`})]})})]})})},J=({title:o,events:t,viewMorePath:s,showAgencyBadge:i=!1})=>t.length===0?null:e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"var(--space-md)"},children:[e.jsx("h2",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:o}),s&&e.jsx("a",{href:s,style:{color:"var(--accent-color)",textDecoration:"none",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.9rem"},children:"View More →"})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:t.map(n=>e.jsx(mr,{event:n,showAgencyBadge:i},n.eventId))})]})}),mr=({event:o,showAgencyBadge:t})=>e.jsx("div",{style:{padding:"var(--space-md) var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",backgroundColor:"var(--bg-color)"},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"var(--space-md)",flexWrap:"wrap"},children:[e.jsxs("div",{style:{flex:1,minWidth:200},children:[e.jsx("h3",{style:{margin:0,fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"1rem",color:"var(--text-color)"},children:o.eventTitle}),o.eventDescription&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.7,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:o.eventDescription})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"var(--space-xs)"},children:[t&&e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--bg-color)",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.75rem",textTransform:"uppercase"},children:o.agency}),o.eventDate&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:hr(o.eventDate)}),(o.city||o.state)&&e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.6},children:[o.city,o.state].filter(Boolean).join(", ")}),o.companyName&&e.jsxs("a",{href:`/company/${o.companySlug}`,style:{fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--primary-color)",textDecoration:"none",fontWeight:600,transition:"color var(--transition-fast)"},onMouseEnter:s=>s.currentTarget.style.color="var(--accent-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--primary-color)",children:[o.companyName," →"]})]})]})});function hr(o){try{return new Date(o).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return o}}const ae=({position:o,width:t,height:s})=>{const i={sidebar:{width:t??280,height:s??250},"left-sidebar":{width:t??"100%",height:s??200},banner:{width:t??"100%",height:s??90},inline:{width:t??"100%",height:s??120}},{width:n,height:l}=i[o];return e.jsxs("div",{"data-ad-slot":o,style:{width:n,height:l,backgroundColor:"var(--secondary-color)",border:"2px dashed var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontSize:"0.85rem",color:"var(--text-color)",opacity:.5},children:["Ad Placeholder (",o,")"]})},L=({meta:o,showAd:t=!0})=>{if(!o&&!t)return null;const s=o?[o.population&&{label:"Population",value:o.population.toLocaleString()},o.industry&&{label:"Industry",value:o.industry},o.founded&&{label:"Founded",value:o.founded},o.headquarters&&{label:"HQ",value:o.headquarters}].filter(Boolean):[];return e.jsxs("aside",{className:"page-sidebar",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[s.length>0&&e.jsxs("div",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[(o==null?void 0:o.logoUrl)&&e.jsx("div",{style:{width:80,height:80,margin:"0 auto var(--space-md)",borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"white",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("img",{src:o.logoUrl,alt:"",style:{maxWidth:"100%",maxHeight:"100%"}})}),(o==null?void 0:o.flagUrl)&&e.jsx("div",{style:{width:"100%",margin:"0 auto var(--space-md)",borderRadius:"var(--radius-sm)",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--border-color)"},children:e.jsx("img",{src:o.flagUrl,alt:"",style:{width:"100%",height:"auto",display:"block"}})}),e.jsx("dl",{style:{margin:0},children:s.map(({label:i,value:n})=>e.jsxs("div",{style:{padding:"var(--space-sm) 0",borderBottom:"1px solid var(--border-color)"},children:[e.jsx("dt",{style:{fontFamily:"var(--font-sans)",fontSize:"0.75rem",color:"var(--text-color)",opacity:.6,textTransform:"uppercase",letterSpacing:"0.5px",marginBottom:"2px"},children:i}),e.jsx("dd",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:n})]},i))})]}),t&&e.jsx(ae,{position:"sidebar"})]})},Y=({showAd:o=!0})=>e.jsxs("aside",{className:"page-filters",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsxs("div",{style:{padding:"var(--space-md)",backgroundColor:"var(--bg-color)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:[e.jsx("h3",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.1rem",color:"var(--text-color)"},children:"Filters"}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Date Range"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"All Time"}),e.jsx("option",{children:"Last Year"}),e.jsx("option",{children:"Last 5 Years"}),e.jsx("option",{children:"Last 10 Years"})]})]}),e.jsxs("div",{style:{marginBottom:"var(--space-md)"},children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Severity"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-xs)"},children:["All","Fatalities","Hospitalizations","Amputations"].map(t=>e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",fontSize:"0.85rem",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",defaultChecked:t==="All",style:{accentColor:"var(--primary-color)"}}),t]},t))})]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.85rem",fontWeight:500,marginBottom:"var(--space-xs)",color:"var(--text-color)"},children:"Sort By"}),e.jsxs("select",{style:{width:"100%",padding:"var(--space-sm)",borderRadius:"var(--radius-sm)",border:"1px solid var(--border-color)",backgroundColor:"var(--bg-color)",color:"var(--text-color)",fontSize:"0.9rem"},children:[e.jsx("option",{children:"Most Incidents"}),e.jsx("option",{children:"Most Recent"}),e.jsx("option",{children:"Highest Fines"}),e.jsx("option",{children:"Alphabetical"})]})]})]}),o&&e.jsx(ae,{position:"left-sidebar"})]}),yr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"Home",path:"/"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:o.tagline||"Explore worker safety data across the nation",breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats,columns:4}),e.jsx(X,{title:"States & Territories",items:t.directory,basePath:"/state",initialLimit:60})]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},xr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"Home",path:"/"},{label:"USA",path:"/usa"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency);return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),e.jsx(X,{title:"Cities",items:t.directory,basePath:"/city"}),c.map(u=>e.jsx(J,{title:`Recent ${u} Incidents`,events:t.recentByAgency[u],viewMorePath:`/${t.slug.toLowerCase()}/events/${u.toLowerCase()}`,showAgencyBadge:!1},u))]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},br=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"Home",path:"/"},{label:"USA",path:"/usa"},{label:t.stateName,path:`/state/${t.state.toLowerCase()}`},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(t.recentByAgency),u=`/${t.state.toLowerCase()}/${t.slug}`;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:`${t.name}, ${t.state}`,subtitle:`Worker safety data for ${t.name}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),e.jsx(X,{title:"Companies",items:t.directory,basePath:"/company"}),c.map(f=>e.jsx(J,{title:`Recent ${f} Incidents`,events:t.recentByAgency[f],viewMorePath:`${u}/events/${f.toLowerCase()}`,showAgencyBadge:!1},f))]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},jr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{var u;const n=[{label:"Home",path:"/"},{label:"USA",path:"/usa"},{label:t.name}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=t.sites&&t.sites.length>0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:(u=t.meta)!=null&&u.industry?`${t.meta.industry}`:void 0,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),c&&e.jsx(X,{title:"Locations",items:t.sites,basePath:"/site"}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents.slice(0,c?5:10),viewMorePath:`/company/${t.slug}/events`,showAgencyBadge:!0})]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})},kr=({brand:o,data:t,onAccountClick:s,onNotificationClick:i})=>{const n=[{label:"Home",path:"/"},{label:"USA",path:"/usa"},{label:t.companyName,path:`/company/${t.companySlug}`},{label:`#${t.siteId}`}],l=o.scoreConfig&&t.stats.score!==void 0?{value:t.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,onAccountClick:s,onNotificationClick:i,children:[e.jsx(B,{title:t.name,subtitle:`Location #${t.siteId} of ${t.companyName}`,breadcrumbs:n,score:l}),e.jsxs("div",{className:"page-layout",children:[e.jsx(Y,{showAd:!0}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:t.stats}),t.siblings&&t.siblings.length>0&&e.jsxs("section",{style:{padding:"var(--space-lg)",backgroundColor:"var(--bg-color)",marginBottom:"var(--space-lg)",borderRadius:"var(--radius-md)",border:"1px solid var(--border-color)"},children:[e.jsx("h2",{style:{margin:"0 0 var(--space-md)",fontFamily:"var(--font-serif)",fontSize:"1.5rem",color:"var(--text-color)"},children:"Compare to Other Locations"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"var(--space-sm)"},children:t.siblings.slice(0,10).map(c=>e.jsxs("a",{href:`/company/${t.companySlug}/site/${c.slug}`,style:{padding:"var(--space-sm) var(--space-md)",backgroundColor:"var(--secondary-color)",borderRadius:"var(--radius-md)",textDecoration:"none",color:"var(--text-dark)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",display:"flex",alignItems:"center",gap:"var(--space-xs)",transition:"background var(--transition-fast)"},onMouseEnter:u=>u.currentTarget.style.backgroundColor="var(--accent-color)",onMouseLeave:u=>u.currentTarget.style.backgroundColor="var(--secondary-color)",children:[e.jsxs("span",{children:["#",c.name]}),e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--text-dark)",padding:"2px 6px",borderRadius:"var(--radius-sm)",fontSize:"0.75rem"},children:c.count})]},c.slug))})]}),e.jsx(J,{title:"Recent Incidents",events:t.recentEvents,viewMorePath:`/company/${t.companySlug}/site/${t.siteId}/events`,showAgencyBadge:!0})]}),e.jsx(L,{meta:t.meta,showAd:!0})]})]})};p.AdSlot=ae,p.Alert=tr,p.Badge=qe,p.Button=Ge,p.Card=Ze,p.CityPage=br,p.CompanyPage=jr,p.Directory=X,p.FilterSidebar=Y,p.Footer=ye,p.Header=he,p.Hero=B,p.InfoSidebar=L,p.Input=er,p.LoadingOverlay=sr,p.MobileAdBanner=xe,p.Modal=or,p.NationPage=yr,p.RecentEvents=J,p.Shell=W,p.SitePage=kr,p.Skeleton=te,p.SkeletonCard=ir,p.SkeletonText=me,p.Spinner=ge,p.StatGrid=O,p.StatePage=xr,p.Table=rr,p.Tabs=ar,p.Tooltip=nr,p.applyTheme=je,p.useTheme=be,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|