@sirsluginston/sharedui 2.0.21 → 2.0.23
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 +596 -540
- package/dist/sharedui.umd.cjs +15 -15
- package/package.json +2 -2
package/dist/sharedui.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(p,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],k):(p=typeof globalThis<"u"?globalThis:p||self,k(p.SharedUI={},p.React))})(this,function(p,k){"use strict";var re={exports:{}},$={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ue;function Ve(){if(ue)return
|
|
9
|
+
*/var ue;function Ve(){if(ue)return $;ue=1;var o=k,a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,l=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(f,v,b){var u,j={},I=null,N=null;b!==void 0&&(I=""+b),v.key!==void 0&&(I=""+v.key),v.ref!==void 0&&(N=v.ref);for(u in v)n.call(v,u)&&!i.hasOwnProperty(u)&&(j[u]=v[u]);if(f&&f.defaultProps)for(u in v=f.defaultProps,v)j[u]===void 0&&(j[u]=v[u]);return{$$typeof:a,type:f,key:I,ref:N,props:j,_owner:l.current}}return $.Fragment=s,$.jsx=c,$.jsxs=c,$}var V={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var fe;function
|
|
18
|
-
`+
|
|
19
|
-
`),R=
|
|
20
|
-
`),S=
|
|
21
|
-
`+
|
|
17
|
+
*/var fe;function Ke(){return fe||(fe=1,process.env.NODE_ENV!=="production"&&function(){var o=k,a=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),w=Symbol.iterator,D="@@iterator";function Sr(r){if(r===null||typeof r!="object")return null;var t=w&&r[w]||r[D];return typeof t=="function"?t:null}var Y=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function T(r){{for(var t=arguments.length,d=new Array(t>1?t-1:0),g=1;g<t;g++)d[g-1]=arguments[g];Cr("error",r,d)}}function Cr(r,t,d){{var g=Y.ReactDebugCurrentFrame,y=g.getStackAddendum();y!==""&&(t+="%s",d=d.concat([y]));var x=d.map(function(m){return String(m)});x.unshift("Warning: "+t),Function.prototype.apply.call(console[r],console,x)}}var wr=!1,Tr=!1,Rr=!1,Er=!1,Mr=!1,je;je=Symbol.for("react.module.reference");function Fr(r){return!!(typeof r=="string"||typeof r=="function"||r===n||r===i||Mr||r===l||r===b||r===u||Er||r===N||wr||Tr||Rr||typeof r=="object"&&r!==null&&(r.$$typeof===I||r.$$typeof===j||r.$$typeof===c||r.$$typeof===f||r.$$typeof===v||r.$$typeof===je||r.getModuleId!==void 0))}function Ir(r,t,d){var g=r.displayName;if(g)return g;var y=t.displayName||t.name||"";return y!==""?d+"("+y+")":d}function ke(r){return r.displayName||"Context"}function _(r){if(r==null)return null;if(typeof r.tag=="number"&&T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case n:return"Fragment";case s:return"Portal";case i:return"Profiler";case l:return"StrictMode";case b:return"Suspense";case u:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case f:var t=r;return ke(t)+".Consumer";case c:var d=r;return ke(d._context)+".Provider";case v:return Ir(r,r.render,"ForwardRef");case j:var g=r.displayName||null;return g!==null?g:_(r.type)||"Memo";case I:{var y=r,x=y._payload,m=y._init;try{return _(m(x))}catch{return null}}}return null}var P=Object.assign,X=0,Se,Ce,we,Te,Re,Ee,Me;function Fe(){}Fe.__reactDisabledLog=!0;function Dr(){{if(X===0){Se=console.log,Ce=console.info,we=console.warn,Te=console.error,Re=console.group,Ee=console.groupCollapsed,Me=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Fe,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}X++}}function _r(){{if(X--,X===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},r,{value:Se}),info:P({},r,{value:Ce}),warn:P({},r,{value:we}),error:P({},r,{value:Te}),group:P({},r,{value:Re}),groupCollapsed:P({},r,{value:Ee}),groupEnd:P({},r,{value:Me})})}X<0&&T("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=Y.ReactCurrentDispatcher,te;function Z(r,t,d){{if(te===void 0)try{throw Error()}catch(y){var g=y.stack.trim().match(/\n( *(at )?)/);te=g&&g[1]||""}return`
|
|
18
|
+
`+te+r}}var ne=!1,Q;{var Pr=typeof WeakMap=="function"?WeakMap:Map;Q=new Pr}function Ie(r,t){if(!r||ne)return"";{var d=Q.get(r);if(d!==void 0)return d}var g;ne=!0;var y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=ae.current,ae.current=null,Dr();try{if(t){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(E){g=E}Reflect.construct(r,[],m)}else{try{m.call()}catch(E){g=E}r.call(m.prototype)}}else{try{throw Error()}catch(E){g=E}r()}}catch(E){if(E&&g&&typeof E.stack=="string"){for(var h=E.stack.split(`
|
|
19
|
+
`),R=g.stack.split(`
|
|
20
|
+
`),S=h.length-1,C=R.length-1;S>=1&&C>=0&&h[S]!==R[C];)C--;for(;S>=1&&C>=0;S--,C--)if(h[S]!==R[C]){if(S!==1||C!==1)do if(S--,C--,C<0||h[S]!==R[C]){var M=`
|
|
21
|
+
`+h[S].replace(" at new "," at ");return r.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",r.displayName)),typeof r=="function"&&Q.set(r,M),M}while(S>=1&&C>=0);break}}}finally{ne=!1,ae.current=x,_r(),Error.prepareStackTrace=y}var H=r?r.displayName||r.name:"",A=H?Z(H):"";return typeof r=="function"&&Q.set(r,A),A}function Ar(r,t,d){return Ie(r,!1)}function Wr(r){var t=r.prototype;return!!(t&&t.isReactComponent)}function q(r,t,d){if(r==null)return"";if(typeof r=="function")return Ie(r,Wr(r));if(typeof r=="string")return Z(r);switch(r){case b:return Z("Suspense");case u:return Z("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case v:return Ar(r.render);case j:return q(r.type,t,d);case I:{var g=r,y=g._payload,x=g._init;try{return q(x(y),t,d)}catch{}}}return""}var J=Object.prototype.hasOwnProperty,De={},_e=Y.ReactDebugCurrentFrame;function ee(r){if(r){var t=r._owner,d=q(r.type,r._source,t?t.type:null);_e.setExtraStackFrame(d)}else _e.setExtraStackFrame(null)}function zr(r,t,d,g,y){{var x=Function.call.bind(J);for(var m in r)if(x(r,m)){var h=void 0;try{if(typeof r[m]!="function"){var R=Error((g||"React class")+": "+d+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}h=r[m](t,m,g,d,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(S){h=S}h&&!(h instanceof Error)&&(ee(y),T("%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).",g||"React class",d,m,typeof h),ee(null)),h instanceof Error&&!(h.message in De)&&(De[h.message]=!0,ee(y),T("Failed %s type: %s",d,h.message),ee(null))}}}var Or=Array.isArray;function se(r){return Or(r)}function Lr(r){{var t=typeof Symbol=="function"&&Symbol.toStringTag,d=t&&r[Symbol.toStringTag]||r.constructor.name||"Object";return d}}function Br(r){try{return Pe(r),!1}catch{return!0}}function Pe(r){return""+r}function Ae(r){if(Br(r))return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Lr(r)),Pe(r)}var We=Y.ReactCurrentOwner,Nr={key:!0,ref:!0,__self:!0,__source:!0},ze,Oe;function Yr(r){if(J.call(r,"ref")){var t=Object.getOwnPropertyDescriptor(r,"ref").get;if(t&&t.isReactWarning)return!1}return r.ref!==void 0}function Ur(r){if(J.call(r,"key")){var t=Object.getOwnPropertyDescriptor(r,"key").get;if(t&&t.isReactWarning)return!1}return r.key!==void 0}function Hr(r,t){typeof r.ref=="string"&&We.current}function $r(r,t){{var d=function(){ze||(ze=!0,T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};d.isReactWarning=!0,Object.defineProperty(r,"key",{get:d,configurable:!0})}}function Vr(r,t){{var d=function(){Oe||(Oe=!0,T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};d.isReactWarning=!0,Object.defineProperty(r,"ref",{get:d,configurable:!0})}}var Kr=function(r,t,d,g,y,x,m){var h={$$typeof:a,type:r,key:t,ref:d,props:m,_owner:x};return h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(h,"_self",{configurable:!1,enumerable:!1,writable:!1,value:g}),Object.defineProperty(h,"_source",{configurable:!1,enumerable:!1,writable:!1,value:y}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h};function Gr(r,t,d,g,y){{var x,m={},h=null,R=null;d!==void 0&&(Ae(d),h=""+d),Ur(t)&&(Ae(t.key),h=""+t.key),Yr(t)&&(R=t.ref,Hr(t,y));for(x in t)J.call(t,x)&&!Nr.hasOwnProperty(x)&&(m[x]=t[x]);if(r&&r.defaultProps){var S=r.defaultProps;for(x in S)m[x]===void 0&&(m[x]=S[x])}if(h||R){var C=typeof r=="function"?r.displayName||r.name||"Unknown":r;h&&$r(m,C),R&&Vr(m,C)}return Kr(r,h,R,y,g,We.current,m)}}var ie=Y.ReactCurrentOwner,Le=Y.ReactDebugCurrentFrame;function U(r){if(r){var t=r._owner,d=q(r.type,r._source,t?t.type:null);Le.setExtraStackFrame(d)}else Le.setExtraStackFrame(null)}var le;le=!1;function ce(r){return typeof r=="object"&&r!==null&&r.$$typeof===a}function Be(){{if(ie.current){var r=_(ie.current.type);if(r)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+r+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+r+"`."}return""}}function Xr(r){return""}var Ne={};function Jr(r){{var t=Be();if(!t){var d=typeof r=="string"?r:r.displayName||r.name;d&&(t=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+d+">.")}return
|
|
25
|
+
Check the top-level render call using <`+d+">.")}return t}}function Ye(r,t){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var d=Jr(t);if(Ne[d])return;Ne[d]=!0;var g="";r&&r._owner&&r._owner!==ie.current&&(g=" It was passed a child from "+_(r._owner.type)+"."),U(r),T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',d,g),U(null)}}function Ue(r,t){{if(typeof r!="object")return;if(se(r))for(var d=0;d<r.length;d++){var g=r[d];ce(g)&&Ye(g,t)}else if(ce(r))r._store&&(r._store.validated=!0);else if(r){var y=Sr(r);if(typeof y=="function"&&y!==r.entries)for(var x=y.call(r),m;!(m=x.next()).done;)ce(m.value)&&Ye(m.value,t)}}}function Zr(r){{var t=r.type;if(t==null||typeof t=="string")return;var d;if(typeof t=="function")d=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===v||t.$$typeof===j))d=t.propTypes;else return;if(d){var g=_(t);zr(d,r.props,"prop",g,r)}else if(t.PropTypes!==void 0&&!le){le=!0;var y=_(t);T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",y||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Qr(r){{for(var t=Object.keys(r.props),d=0;d<t.length;d++){var g=t[d];if(g!=="children"&&g!=="key"){U(r),T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",g),U(null);break}}r.ref!==null&&(U(r),T("Invalid attribute `ref` supplied to `React.Fragment`."),U(null))}}var He={};function $e(r,t,d,g,y,x){{var m=Fr(r);if(!m){var h="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(h+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=Xr();R?h+=R:h+=Be();var S;r===null?S="null":se(r)?S="array":r!==void 0&&r.$$typeof===a?(S="<"+(_(r.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):S=typeof r,T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",S,h)}var C=Gr(r,t,d,y,x);if(C==null)return C;if(m){var M=t.children;if(M!==void 0)if(g)if(se(M)){for(var H=0;H<M.length;H++)Ue(M[H],r);Object.freeze&&Object.freeze(M)}else T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ue(M,r)}if(J.call(t,"key")){var A=_(r),E=Object.keys(t).filter(function(to){return to!=="key"}),de=E.length>0?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}";if(!He[A+de]){var ao=E.length>0?"{"+E.join(": ..., ")+": ...}":"{}";T(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,de,z,oo,z),$e[z+de]=!0}}return r===n?Qr(C):Gr(C),C}}function Zr(r,a,d){return He(r,a,d,!0)}function qr(r,a,d){return He(r,a,d,!1)}var eo=qr,ro=Zr;V.Fragment=n,V.jsx=eo,V.jsxs=ro}()),V}process.env.NODE_ENV==="production"?re.exports=Ve():re.exports=Xe();var e=re.exports;const Je=({variant:o="primary",size:t="md",loading:s=!1,icon:n,children:l,disabled:i,...c})=>{const u={sm:{padding:"var(--space-xs) var(--space-sm)",fontSize:"0.85rem"},md:{padding:"var(--space-sm) var(--space-md)",fontSize:"1rem"},lg:{padding:"var(--space-md) var(--space-lg)",fontSize:"1.1rem"}},p={primary:{backgroundColor:"var(--primary-color)",color:"var(--surface-light)",border:"2px solid var(--primary-color)",boxShadow:"2px 2px 0 var(--secondary-color)"},secondary:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)",border:"2px solid var(--secondary-color)",boxShadow:"2px 2px 0 var(--primary-color)"},outline:{backgroundColor:"transparent",color:"var(--primary-color)",border:"2px solid var(--primary-color)",boxShadow:"none"},ghost:{backgroundColor:"transparent",color:"var(--text-color)",border:"2px solid transparent",boxShadow:"none"},danger:{backgroundColor:"var(--danger-color)",color:"var(--surface-light)",border:"2px solid var(--danger-color)",boxShadow:"2px 2px 0 rgba(0,0,0,0.2)"}},k={...u[t],...p[o],borderRadius:"var(--radius-md)",fontFamily:"var(--font-sans)",fontWeight:600,cursor:i||s?"not-allowed":"pointer",opacity:i?.5:1,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"var(--space-sm)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",outline:"none"};return e.jsxs("button",{...c,disabled:i||s,style:{...k,...c.style},onMouseDown:f=>{var b;!i&&!s&&(f.currentTarget.style.transform="translate(2px, 2px)",f.currentTarget.style.boxShadow="none"),(b=c.onMouseDown)==null||b.call(c,f)},onMouseUp:f=>{var b;f.currentTarget.style.transform="translate(0, 0)",f.currentTarget.style.boxShadow=p[o].boxShadow||"none",(b=c.onMouseUp)==null||b.call(c,f)},onMouseLeave:f=>{var b;f.currentTarget.style.transform="translate(0, 0)",f.currentTarget.style.boxShadow=p[o].boxShadow||"none",(b=c.onMouseLeave)==null||b.call(c,f)},children:[s?e.jsx(Ke,{size:16}):n,l]})},Ke=({size:o})=>e.jsxs("svg",{width:o,height:o,viewBox:"0 0 24 24",style:{animation:"spin 0.8s linear infinite"},children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeDasharray:"31.4 31.4",strokeLinecap:"round"}),e.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}),Ge=({title:o,subtitle:t,children:s,hoverable:n=!1,padding:l="lg",className:i,style:c,onClick:u})=>{const p={none:"0",sm:"var(--space-sm)",md:"var(--space-md)",lg:"var(--space-lg)"};return e.jsxs("div",{className:i,onClick:u,style:{backgroundColor:"var(--bg-color)",borderRadius:"var(--radius-md)",padding:p[l],border:"2px solid var(--border-color)",display:"flex",flexDirection:"column",gap:"var(--space-md)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",cursor:u?"pointer":"default",...c},onMouseEnter:k=>{n&&(k.currentTarget.style.transform="translateY(-4px)",k.currentTarget.style.boxShadow="var(--shadow-lg)")},onMouseLeave:k=>{n&&(k.currentTarget.style.transform="translateY(0)",k.currentTarget.style.boxShadow="none")},children:[(o||t)&&e.jsxs("div",{style:{borderBottom:"1px solid var(--border-color)",paddingBottom:"var(--space-sm)"},children:[o&&e.jsx("h3",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.25rem",fontWeight:700,color:"var(--heading-color)"},children:o}),t&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.7},children:t})]}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",lineHeight:1.6},children:s})]})},Qe=({children:o,variant:t="default",size:s="md"})=>{const n={sm:{padding:"2px var(--space-xs)",fontSize:"0.7rem"},md:{padding:"var(--space-xs) var(--space-sm)",fontSize:"0.8rem"}},l={default:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)"},primary:{backgroundColor:"var(--primary-color)",color:"var(--surface-light)"},secondary:{backgroundColor:"var(--accent-color)",color:"var(--primary-color)"},success:{backgroundColor:"var(--success-color)",color:"var(--surface-light)"},warning:{backgroundColor:"var(--warning-color)",color:"var(--surface-dark)"},danger:{backgroundColor:"var(--danger-color)",color:"var(--surface-light)"},outline:{backgroundColor:"transparent",color:"var(--primary-color)",border:"1px solid var(--primary-color)"}};return e.jsx("span",{style:{...n[s],...l[t],borderRadius:"var(--radius-full)",fontFamily:"var(--font-sans)",fontWeight:600,display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",lineHeight:1,textTransform:"uppercase",letterSpacing:"0.03em"},children:o})},Ze=({label:o,error:t,hint:s,icon:n,...l})=>{const i=!!t;return e.jsxs("div",{style:{marginBottom:"var(--space-md)",width:"100%"},children:[o&&e.jsx("label",{style:{display:"block",marginBottom:"var(--space-xs)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:o}),e.jsxs("div",{style:{position:"relative"},children:[n&&e.jsx("span",{style:{position:"absolute",left:"var(--space-sm)",top:"50%",transform:"translateY(-50%)",color:"var(--text-color)",opacity:.5},children:n}),e.jsx("input",{...l,style:{width:"100%",padding:n?"var(--space-sm) var(--space-sm) var(--space-sm) var(--space-xl)":"var(--space-sm) var(--space-md)",borderRadius:"var(--radius-md)",border:`2px solid ${i?"var(--danger-color)":"var(--border-color)"}`,fontFamily:"var(--font-sans)",fontSize:"1rem",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxSizing:"border-box",transition:"border-color var(--transition-fast), box-shadow var(--transition-fast)",outline:"none",...l.style},onFocus:c=>{var u;c.currentTarget.style.borderColor=i?"var(--danger-color)":"var(--primary-color)",c.currentTarget.style.boxShadow=`0 0 0 3px ${i?"rgba(229, 62, 62, 0.2)":"rgba(26, 54, 93, 0.2)"}`,(u=l.onFocus)==null||u.call(l,c)},onBlur:c=>{var u;c.currentTarget.style.borderColor=i?"var(--danger-color)":"var(--border-color)",c.currentTarget.style.boxShadow="none",(u=l.onBlur)==null||u.call(l,c)}})]}),(t||s)&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.8rem",color:t?"var(--danger-color)":"var(--text-color)",opacity:t?1:.6},children:t||s})]})};function qe({columns:o,data:t,keyExtractor:s,onRowClick:n,emptyMessage:l="No data available",striped:i=!0}){return e.jsx("div",{style:{overflowX:"auto",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontFamily:"var(--font-sans)"},children:[e.jsx("thead",{children:e.jsx("tr",{style:{backgroundColor:"var(--secondary-color)"},children:o.map(c=>e.jsx("th",{style:{padding:"var(--space-md)",textAlign:c.align||"left",fontWeight:600,fontSize:"0.9rem",color:"var(--surface-light)",width:c.width,whiteSpace:"nowrap"},children:c.header},String(c.key)))})}),e.jsx("tbody",{children:t.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:o.length,style:{padding:"var(--space-xl)",textAlign:"center",color:"var(--text-color)",opacity:.6},children:l})}):t.map((c,u)=>e.jsx("tr",{onClick:()=>n==null?void 0:n(c),style:{backgroundColor:i&&u%2===1?"var(--secondary-color)":"transparent",cursor:n?"pointer":"default",transition:"background-color var(--transition-fast)"},onMouseEnter:p=>{n&&(p.currentTarget.style.backgroundColor="var(--accent-color)")},onMouseLeave:p=>{p.currentTarget.style.backgroundColor=i&&u%2===1?"var(--secondary-color)":"transparent"},children:o.map(p=>e.jsx("td",{style:{padding:"var(--space-md)",textAlign:p.align||"left",color:"var(--text-color)",borderBottom:"1px solid var(--border-color)"},children:p.render?p.render(c):String(c[p.key]??"")},String(p.key)))},s(c)))})]})})}const er=({open:o,onClose:t,title:s,children:n,size:l="md",showCloseButton:i=!0})=>{if(j.useEffect(()=>{const u=p=>{p.key==="Escape"&&t()};return o&&(document.addEventListener("keydown",u),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",u),document.body.style.overflow=""}},[o,t]),!o)return null;const c={sm:"400px",md:"560px",lg:"800px"};return e.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":s?"modal-title":void 0,style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"var(--space-md)",animation:"fadeIn 0.2s ease"},onClick:t,children:[e.jsxs("div",{style:{backgroundColor:"var(--bg-color)",borderRadius:"var(--radius-lg)",border:"2px solid var(--border-color)",boxShadow:"var(--shadow-lg)",width:"100%",maxWidth:c[l],maxHeight:"90vh",overflow:"hidden",display:"flex",flexDirection:"column",animation:"slideUp 0.2s ease"},onClick:u=>u.stopPropagation(),children:[(s||i)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"var(--space-md) var(--space-lg)",borderBottom:"1px solid var(--border-color)"},children:[s&&e.jsx("h2",{id:"modal-title",style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.25rem",fontWeight:700,color:"var(--text-color)"},children:s}),i&&e.jsx("button",{onClick:t,"aria-label":"Close modal",style:{background:"none",border:"none",cursor:"pointer",padding:"var(--space-xs)",borderRadius:"var(--radius-sm)",color:"var(--text-color)",opacity:.7,transition:"opacity var(--transition-fast)"},onMouseEnter:u=>u.currentTarget.style.opacity="1",onMouseLeave:u=>u.currentTarget.style.opacity="0.7",children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),e.jsx("div",{style:{padding:"var(--space-lg)",overflowY:"auto",flex:1},children:n})]}),e.jsx("style",{children:`
|
|
30
|
+
<%s key={someKey} {...props} />`,de,A,ao,A),He[A+de]=!0}}return r===n?Qr(C):Zr(C),C}}function qr(r,t,d){return $e(r,t,d,!0)}function eo(r,t,d){return $e(r,t,d,!1)}var ro=eo,oo=qr;V.Fragment=n,V.jsx=ro,V.jsxs=oo}()),V}process.env.NODE_ENV==="production"?re.exports=Ve():re.exports=Ke();var e=re.exports;const Ge=({variant:o="primary",size:a="md",loading:s=!1,icon:n,children:l,disabled:i,...c})=>{const f={sm:{padding:"var(--space-xs) var(--space-sm)",fontSize:"0.85rem"},md:{padding:"var(--space-sm) var(--space-md)",fontSize:"1rem"},lg:{padding:"var(--space-md) var(--space-lg)",fontSize:"1.1rem"}},v={primary:{backgroundColor:"var(--primary-color)",color:"var(--surface-light)",border:"2px solid var(--primary-color)",boxShadow:"2px 2px 0 var(--secondary-color)"},secondary:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)",border:"2px solid var(--secondary-color)",boxShadow:"2px 2px 0 var(--primary-color)"},outline:{backgroundColor:"transparent",color:"var(--primary-color)",border:"2px solid var(--primary-color)",boxShadow:"none"},ghost:{backgroundColor:"transparent",color:"var(--text-color)",border:"2px solid transparent",boxShadow:"none"},danger:{backgroundColor:"var(--danger-color)",color:"var(--surface-light)",border:"2px solid var(--danger-color)",boxShadow:"2px 2px 0 rgba(0,0,0,0.2)"}},b={...f[a],...v[o],borderRadius:"var(--radius-md)",fontFamily:"var(--font-sans)",fontWeight:600,cursor:i||s?"not-allowed":"pointer",opacity:i?.5:1,display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"var(--space-sm)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",outline:"none"};return e.jsxs("button",{...c,disabled:i||s,style:{...b,...c.style},onMouseDown:u=>{var j;!i&&!s&&(u.currentTarget.style.transform="translate(2px, 2px)",u.currentTarget.style.boxShadow="none"),(j=c.onMouseDown)==null||j.call(c,u)},onMouseUp:u=>{var j;u.currentTarget.style.transform="translate(0, 0)",u.currentTarget.style.boxShadow=v[o].boxShadow||"none",(j=c.onMouseUp)==null||j.call(c,u)},onMouseLeave:u=>{var j;u.currentTarget.style.transform="translate(0, 0)",u.currentTarget.style.boxShadow=v[o].boxShadow||"none",(j=c.onMouseLeave)==null||j.call(c,u)},children:[s?e.jsx(Xe,{size:16}):n,l]})},Xe=({size:o})=>e.jsxs("svg",{width:o,height:o,viewBox:"0 0 24 24",style:{animation:"spin 0.8s linear infinite"},children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeDasharray:"31.4 31.4",strokeLinecap:"round"}),e.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}),Je=({title:o,subtitle:a,children:s,hoverable:n=!1,padding:l="lg",className:i,style:c,onClick:f})=>{const v={none:"0",sm:"var(--space-sm)",md:"var(--space-md)",lg:"var(--space-lg)"};return e.jsxs("div",{className:i,onClick:f,style:{backgroundColor:"var(--bg-color)",borderRadius:"var(--radius-md)",padding:v[l],border:"2px solid var(--border-color)",display:"flex",flexDirection:"column",gap:"var(--space-md)",transition:"transform var(--transition-fast), box-shadow var(--transition-fast)",cursor:f?"pointer":"default",...c},onMouseEnter:b=>{n&&(b.currentTarget.style.transform="translateY(-4px)",b.currentTarget.style.boxShadow="var(--shadow-lg)")},onMouseLeave:b=>{n&&(b.currentTarget.style.transform="translateY(0)",b.currentTarget.style.boxShadow="none")},children:[(o||a)&&e.jsxs("div",{style:{borderBottom:"1px solid var(--border-color)",paddingBottom:"var(--space-sm)"},children:[o&&e.jsx("h3",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.25rem",fontWeight:700,color:"var(--heading-color)"},children:o}),a&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.7},children:a})]}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",lineHeight:1.6},children:s})]})},Ze=({children:o,variant:a="default",size:s="md"})=>{const n={sm:{padding:"2px var(--space-xs)",fontSize:"0.7rem"},md:{padding:"var(--space-xs) var(--space-sm)",fontSize:"0.8rem"}},l={default:{backgroundColor:"var(--secondary-color)",color:"var(--surface-light)"},primary:{backgroundColor:"var(--primary-color)",color:"var(--surface-light)"},secondary:{backgroundColor:"var(--accent-color)",color:"var(--primary-color)"},success:{backgroundColor:"var(--success-color)",color:"var(--surface-light)"},warning:{backgroundColor:"var(--warning-color)",color:"var(--surface-dark)"},danger:{backgroundColor:"var(--danger-color)",color:"var(--surface-light)"},outline:{backgroundColor:"transparent",color:"var(--primary-color)",border:"1px solid var(--primary-color)"}};return e.jsx("span",{style:{...n[s],...l[a],borderRadius:"var(--radius-full)",fontFamily:"var(--font-sans)",fontWeight:600,display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",lineHeight:1,textTransform:"uppercase",letterSpacing:"0.03em"},children:o})},Qe=({label:o,error:a,hint:s,icon:n,...l})=>{const i=!!a;return e.jsxs("div",{style:{marginBottom:"var(--space-md)",width:"100%"},children:[o&&e.jsx("label",{style:{display:"block",marginBottom:"var(--space-xs)",fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:o}),e.jsxs("div",{style:{position:"relative"},children:[n&&e.jsx("span",{style:{position:"absolute",left:"var(--space-sm)",top:"50%",transform:"translateY(-50%)",color:"var(--text-color)",opacity:.5},children:n}),e.jsx("input",{...l,style:{width:"100%",padding:n?"var(--space-sm) var(--space-sm) var(--space-sm) var(--space-xl)":"var(--space-sm) var(--space-md)",borderRadius:"var(--radius-md)",border:`2px solid ${i?"var(--danger-color)":"var(--border-color)"}`,fontFamily:"var(--font-sans)",fontSize:"1rem",backgroundColor:"var(--bg-color)",color:"var(--text-color)",boxSizing:"border-box",transition:"border-color var(--transition-fast), box-shadow var(--transition-fast)",outline:"none",...l.style},onFocus:c=>{var f;c.currentTarget.style.borderColor=i?"var(--danger-color)":"var(--primary-color)",c.currentTarget.style.boxShadow=`0 0 0 3px ${i?"rgba(229, 62, 62, 0.2)":"rgba(26, 54, 93, 0.2)"}`,(f=l.onFocus)==null||f.call(l,c)},onBlur:c=>{var f;c.currentTarget.style.borderColor=i?"var(--danger-color)":"var(--border-color)",c.currentTarget.style.boxShadow="none",(f=l.onBlur)==null||f.call(l,c)}})]}),(a||s)&&e.jsx("p",{style:{margin:"var(--space-xs) 0 0",fontFamily:"var(--font-sans)",fontSize:"0.8rem",color:a?"var(--danger-color)":"var(--text-color)",opacity:a?1:.6},children:a||s})]})};function qe({columns:o,data:a,keyExtractor:s,onRowClick:n,emptyMessage:l="No data available",striped:i=!0}){return e.jsx("div",{style:{overflowX:"auto",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)"},children:e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontFamily:"var(--font-sans)"},children:[e.jsx("thead",{children:e.jsx("tr",{style:{backgroundColor:"var(--secondary-color)"},children:o.map(c=>e.jsx("th",{style:{padding:"var(--space-md)",textAlign:c.align||"left",fontWeight:600,fontSize:"0.9rem",color:"var(--surface-light)",width:c.width,whiteSpace:"nowrap"},children:c.header},String(c.key)))})}),e.jsx("tbody",{children:a.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:o.length,style:{padding:"var(--space-xl)",textAlign:"center",color:"var(--text-color)",opacity:.6},children:l})}):a.map((c,f)=>e.jsx("tr",{onClick:()=>n==null?void 0:n(c),style:{backgroundColor:i&&f%2===1?"var(--secondary-color)":"transparent",cursor:n?"pointer":"default",transition:"background-color var(--transition-fast)"},onMouseEnter:v=>{n&&(v.currentTarget.style.backgroundColor="var(--accent-color)")},onMouseLeave:v=>{v.currentTarget.style.backgroundColor=i&&f%2===1?"var(--secondary-color)":"transparent"},children:o.map(v=>e.jsx("td",{style:{padding:"var(--space-md)",textAlign:v.align||"left",color:"var(--text-color)",borderBottom:"1px solid var(--border-color)"},children:v.render?v.render(c):String(c[v.key]??"")},String(v.key)))},s(c)))})]})})}const er=({open:o,onClose:a,title:s,children:n,size:l="md",showCloseButton:i=!0})=>{if(k.useEffect(()=>{const f=v=>{v.key==="Escape"&&a()};return o&&(document.addEventListener("keydown",f),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",f),document.body.style.overflow=""}},[o,a]),!o)return null;const c={sm:"400px",md:"560px",lg:"800px"};return e.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":s?"modal-title":void 0,style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"var(--space-md)",animation:"fadeIn 0.2s ease"},onClick:a,children:[e.jsxs("div",{style:{backgroundColor:"var(--bg-color)",borderRadius:"var(--radius-lg)",border:"2px solid var(--border-color)",boxShadow:"var(--shadow-lg)",width:"100%",maxWidth:c[l],maxHeight:"90vh",overflow:"hidden",display:"flex",flexDirection:"column",animation:"slideUp 0.2s ease"},onClick:f=>f.stopPropagation(),children:[(s||i)&&e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"var(--space-md) var(--space-lg)",borderBottom:"1px solid var(--border-color)"},children:[s&&e.jsx("h2",{id:"modal-title",style:{margin:0,fontFamily:"var(--font-serif)",fontSize:"1.25rem",fontWeight:700,color:"var(--text-color)"},children:s}),i&&e.jsx("button",{onClick:a,"aria-label":"Close modal",style:{background:"none",border:"none",cursor:"pointer",padding:"var(--space-xs)",borderRadius:"var(--radius-sm)",color:"var(--text-color)",opacity:.7,transition:"opacity var(--transition-fast)"},onMouseEnter:f=>f.currentTarget.style.opacity="1",onMouseLeave:f=>f.currentTarget.style.opacity="0.7",children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),e.jsx("div",{style:{padding:"var(--space-lg)",overflowY:"auto",flex:1},children:n})]}),e.jsx("style",{children:`
|
|
31
31
|
@keyframes fadeIn {
|
|
32
32
|
from { opacity: 0; }
|
|
33
33
|
to { opacity: 1; }
|
|
@@ -36,17 +36,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
36
36
|
from { opacity: 0; transform: translateY(20px); }
|
|
37
37
|
to { opacity: 1; transform: translateY(0); }
|
|
38
38
|
}
|
|
39
|
-
`})]})},rr=({children:o,variant:
|
|
39
|
+
`})]})},rr=({children:o,variant:a="info",title:s,dismissible:n=!1,onDismiss:l})=>{const c={info:{backgroundColor:"rgba(49, 130, 206, 0.1)",borderColor:"var(--info-color)",iconColor:"var(--info-color)",icon:"ℹ️"},success:{backgroundColor:"rgba(56, 161, 105, 0.1)",borderColor:"var(--success-color)",iconColor:"var(--success-color)",icon:"✓"},warning:{backgroundColor:"rgba(214, 158, 46, 0.1)",borderColor:"var(--warning-color)",iconColor:"var(--warning-color)",icon:"⚠"},danger:{backgroundColor:"rgba(229, 62, 62, 0.1)",borderColor:"var(--danger-color)",iconColor:"var(--danger-color)",icon:"✕"}}[a];return e.jsxs("div",{role:"alert",style:{backgroundColor:c.backgroundColor,borderLeft:`4px solid ${c.borderColor}`,borderRadius:"var(--radius-md)",padding:"var(--space-md) var(--space-lg)",display:"flex",alignItems:"flex-start",gap:"var(--space-md)",margin:"var(--space-md) 0"},children:[e.jsx("span",{style:{fontSize:"1.2rem",lineHeight:1,flexShrink:0},children:c.icon}),e.jsxs("div",{style:{flex:1},children:[s&&e.jsx("h4",{style:{margin:"0 0 var(--space-xs)",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"1rem",color:"var(--text-color)"},children:s}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontSize:"0.95rem",color:"var(--text-color)",lineHeight:1.5},children:o})]}),n&&e.jsx("button",{onClick:l,"aria-label":"Dismiss",style:{background:"none",border:"none",cursor:"pointer",padding:"var(--space-xs)",color:"var(--text-color)",opacity:.5,transition:"opacity var(--transition-fast)",flexShrink:0},onMouseEnter:f=>f.currentTarget.style.opacity="1",onMouseLeave:f=>f.currentTarget.style.opacity="0.5",children:"✕"})]})},or=({tabs:o,activeTab:a,onTabChange:s,variant:n="underline"})=>{const l=n==="underline";return e.jsxs("div",{style:{width:"100%"},children:[e.jsx("div",{role:"tablist",style:{display:"flex",gap:l?"var(--space-md)":"var(--space-xs)",borderBottom:l?"2px solid var(--border-color)":"none",padding:l?"0":"var(--space-xs)",backgroundColor:l?"transparent":"var(--secondary-color)",borderRadius:l?"0":"var(--radius-md)"},children:o.map(i=>{const c=i.id===a;return e.jsx("button",{role:"tab","aria-selected":c,"aria-controls":`panel-${i.id}`,disabled:i.disabled,onClick:()=>!i.disabled&&s(i.id),style:{background:l?"none":c?"var(--primary-color)":"transparent",border:"none",borderBottom:l&&c?"3px solid var(--primary-color)":"none",marginBottom:l?"-2px":"0",padding:"var(--space-sm) var(--space-md)",borderRadius:l?"0":"var(--radius-sm)",fontFamily:"var(--font-sans)",fontWeight:600,fontSize:"0.95rem",color:c?l?"var(--primary-color)":"var(--surface-light)":"var(--text-color)",opacity:i.disabled?.5:1,cursor:i.disabled?"not-allowed":"pointer",transition:"all var(--transition-fast)"},onMouseEnter:f=>{!i.disabled&&!c&&(f.currentTarget.style.backgroundColor=l?"rgba(0,0,0,0.05)":"var(--accent-color)")},onMouseLeave:f=>{!i.disabled&&!c&&(f.currentTarget.style.backgroundColor="transparent")},children:i.label},i.id)})}),e.jsx("div",{style:{marginTop:"var(--space-lg)"},children:o.map(i=>e.jsx("div",{id:`panel-${i.id}`,role:"tabpanel",hidden:i.id!==a,style:{display:i.id===a?"block":"none"},children:i.content},i.id))})]})},ar=({content:o,children:a,position:s="top",delay:n=200})=>{const[l,i]=k.useState(!1),c=k.useRef(null),f=k.useRef(),v=()=>{f.current=window.setTimeout(()=>{i(!0)},n)},b=()=>{f.current&&clearTimeout(f.current),i(!1)};k.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const u={top:{bottom:"100%",left:"50%",transform:"translateX(-50%) translateY(-8px)"},bottom:{top:"100%",left:"50%",transform:"translateX(-50%) translateY(8px)"},left:{right:"100%",top:"50%",transform:"translateY(-50%) translateX(-8px)"},right:{left:"100%",top:"50%",transform:"translateY(-50%) translateX(8px)"}};return e.jsxs("span",{ref:c,style:{position:"relative",display:"inline-block"},onMouseEnter:v,onMouseLeave:b,onFocus:v,onBlur:b,children:[a,l&&e.jsxs("span",{role:"tooltip",style:{position:"absolute",...u[s],backgroundColor:"var(--secondary-color)",color:"var(--surface-light)",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",fontFamily:"var(--font-sans)",fontSize:"0.85rem",whiteSpace:"nowrap",zIndex:1e3,boxShadow:"var(--shadow-md)",pointerEvents:"none",animation:"tooltipFadeIn 0.15s ease"},children:[o,e.jsx("style",{children:`
|
|
40
40
|
@keyframes tooltipFadeIn {
|
|
41
41
|
from { opacity: 0; }
|
|
42
42
|
to { opacity: 1; }
|
|
43
43
|
}
|
|
44
|
-
`})]})]})},ve=({size:o="md",color:
|
|
44
|
+
`})]})]})},ve=({size:o="md",color:a="var(--primary-color)"})=>{const n={sm:20,md:32,lg:48}[o];return e.jsxs("svg",{width:n,height:n,viewBox:"0 0 50 50",style:{animation:"spinnerRotate 0.8s linear infinite"},children:[e.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:a,strokeWidth:"4",strokeDasharray:"80 40",strokeLinecap:"round"}),e.jsx("style",{children:`
|
|
45
45
|
@keyframes spinnerRotate {
|
|
46
46
|
from { transform: rotate(0deg); }
|
|
47
47
|
to { transform: rotate(360deg); }
|
|
48
48
|
}
|
|
49
|
-
`})]})},
|
|
49
|
+
`})]})},tr=({message:o="Loading..."})=>e.jsxs("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--space-md)",zIndex:1e3},children:[e.jsx(ve,{size:"lg",color:"var(--surface-light)"}),e.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:"1rem",color:"var(--surface-light)"},children:o})]}),oe=({width:o="100%",height:a=20,variant:s="text",animation:n="wave"})=>{const l={text:{borderRadius:"var(--radius-sm)"},rect:{borderRadius:"var(--radius-md)"},circle:{borderRadius:"50%"}},i={pulse:{animation:"skeletonPulse 1.5s ease-in-out infinite"},wave:{backgroundImage:"linear-gradient(90deg, var(--secondary-color) 0%, var(--bg-color) 50%, var(--secondary-color) 100%)",backgroundSize:"200% 100%",animation:"skeletonWave 1.5s ease-in-out infinite"},none:{}};return e.jsx("div",{style:{width:o,height:a,backgroundColor:n==="wave"?void 0:"var(--secondary-color)",...l[s],...i[n]},children:e.jsx("style",{children:`
|
|
50
50
|
@keyframes skeletonPulse {
|
|
51
51
|
0%, 100% { opacity: 1; }
|
|
52
52
|
50% { opacity: 0.5; }
|
|
@@ -55,7 +55,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
55
55
|
0% { background-position: 200% 0; }
|
|
56
56
|
100% { background-position: -200% 0; }
|
|
57
57
|
}
|
|
58
|
-
`})})},pe=({lines:o=3})=>e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:Array.from({length:o}).map((t,s)=>e.jsx(oe,{width:s===o-1?"60%":"100%",height:16},s))}),nr=()=>e.jsxs("div",{style:{padding:"var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsx(oe,{height:24,width:"50%"}),e.jsx(pe,{lines:3})]}),ge=({brand:o,darkMode:t,onThemeToggle:s})=>{const[n,l]=j.useState(!1),[i,c]=j.useState(!1),[u,p]=j.useState(null);j.useEffect(()=>{const f=()=>l(window.innerWidth<768);return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]);const k=o.navItems.filter(f=>f.inNavbar!==!1);return e.jsxs("header",{style:{backgroundColor:"var(--primary-color)",borderBottom:"4px solid var(--accent-color)",position:"sticky",top:0,zIndex:100},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"var(--space-sm) var(--space-lg)",gap:"var(--space-md)",maxWidth:1400,margin:"0 auto"},children:[o.logoUrl&&e.jsx("div",{style:{width:40,height:40,borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"var(--bg-color)",border:"2px solid var(--accent-color)",flexShrink:0},children:e.jsx("img",{src:o.logoUrl,alt:o.name,style:{width:"100%",height:"100%",objectFit:"cover"}})}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:n?"1.1rem":"1.4rem",fontWeight:700,color:"var(--surface-light)",whiteSpace:"nowrap",flexShrink:0},children:o.name}),!n&&e.jsx("nav",{style:{display:"flex",alignItems:"center",gap:"var(--space-sm)",flex:1,justifyContent:"center"},children:k.map(f=>e.jsx(sr,{item:f,isActive:u===f.label,onHover:b=>p(b),onLeave:()=>p(null)},f.label))}),n&&e.jsx("div",{style:{flex:1}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",flexShrink:0},children:[n&&e.jsx(me,{onClick:()=>c(!i),label:"Menu",size:36,children:e.jsx(ur,{})}),e.jsx(me,{onClick:s,label:"Toggle theme",size:36,children:t?e.jsx(cr,{}):e.jsx(lr,{})}),e.jsx("a",{href:"/account","aria-label":"Account",style:{width:40,height:40,borderRadius:"var(--radius-full)",backgroundColor:"rgba(255,255,255,0.1)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background var(--transition-fast)",color:"var(--surface-light)",textDecoration:"none"},children:e.jsx(dr,{})})]})]}),n&&i&&e.jsx("div",{style:{backgroundColor:"var(--bg-color)",borderTop:"1px solid var(--border-color)",padding:"var(--space-sm)"},children:k.map(f=>e.jsx(ir,{item:f,onClose:()=>c(!1)},f.label))})]})},me=({onClick:o,label:t,size:s=36,children:n})=>e.jsx("button",{onClick:o,"aria-label":t,style:{width:s,height:s,borderRadius:"var(--radius-full)",backgroundColor:"rgba(255,255,255,0.1)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background var(--transition-fast)",color:"var(--surface-light)"},onMouseEnter:l=>l.currentTarget.style.backgroundColor="rgba(255,255,255,0.2)",onMouseLeave:l=>l.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",children:n}),sr=({item:o,isActive:t,onHover:s,onLeave:n})=>{const l=()=>{o.onClick?o.onClick():o.path&&(window.location.href=o.path)};return e.jsxs("div",{onMouseEnter:()=>o.children&&s(o.label),onMouseLeave:n,style:{position:"relative"},children:[o.path&&!o.onClick&&!o.children?e.jsx("a",{href:o.path,style:{background:"none",border:"none",color:"var(--surface-light)",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.9rem",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",transition:"background var(--transition-fast)",textDecoration:"none",display:"inline-block"},onMouseEnter:i=>i.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",onMouseLeave:i=>i.currentTarget.style.backgroundColor="transparent",children:o.label}):e.jsxs("button",{onClick:l,style:{background:"none",border:"none",color:"var(--surface-light)",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.9rem",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",transition:"background var(--transition-fast)"},onMouseEnter:i=>i.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",onMouseLeave:i=>i.currentTarget.style.backgroundColor="transparent",children:[o.label," ",o.children&&"▾"]}),o.children&&t&&e.jsx("div",{style:{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",backgroundColor:"var(--bg-color)",minWidth:160,boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-md)",padding:"var(--space-xs) 0",zIndex:200,marginTop:4},children:o.children.map(i=>i.path?e.jsx("a",{href:i.path,style:{display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",transition:"background var(--transition-fast)",textDecoration:"none"},onMouseEnter:c=>c.currentTarget.style.backgroundColor="var(--secondary-color)",onMouseLeave:c=>c.currentTarget.style.backgroundColor="transparent",children:i.label},i.label):e.jsx("button",{onClick:i.onClick,style:{display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",transition:"background var(--transition-fast)"},onMouseEnter:c=>c.currentTarget.style.backgroundColor="var(--secondary-color)",onMouseLeave:c=>c.currentTarget.style.backgroundColor="transparent",children:i.label},i.label))})]})},ir=({item:o,onClose:t})=>{const s={display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.95rem",color:"var(--text-color)",borderRadius:"var(--radius-sm)",textDecoration:"none"};return o.path&&!o.onClick?e.jsx("a",{href:o.path,style:s,onClick:t,children:o.label}):e.jsx("button",{onClick:()=>{var n;(n=o.onClick)==null||n.call(o),t()},style:s,children:o.label})},lr=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"5"}),e.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),cr=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),dr=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),ur=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M3 12h18M3 6h18M3 18h18"})}),ye=({copyrightBrand:o,yearCreated:t,poweredBy:s})=>{const n=new Date().getFullYear(),l=t===n?n.toString():`${t}-${n}`;return e.jsx("footer",{style:{backgroundColor:"var(--primary-color)",color:"var(--text-dark)",padding:"var(--space-lg) var(--space-xl)",borderTop:"4px solid var(--accent-color)"},children:e.jsxs("div",{style:{maxWidth:1200,margin:"0 auto",display:"flex",flexDirection:"column",gap:"var(--space-md)",alignItems:"center",textAlign:"center"},children:[e.jsxs("p",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.85rem",opacity:.8},children:["© ",l," ",o,". All rights reserved."]}),s&&e.jsxs("p",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.75rem",opacity:.6},children:["Powered by"," ",e.jsx("span",{style:{color:"var(--org-color)",fontWeight:600},children:s})]})]})})};function he(o){const[t,s]=j.useState(()=>{if(typeof window>"u")return!1;const l=localStorage.getItem("theme-mode");return l?l==="dark":o.theme.defaultTheme==="dark"?!0:o.theme.defaultTheme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});j.useEffect(()=>{xe(o.theme)},[o.theme]),j.useEffect(()=>{document.body.classList.toggle("dark-mode",t),localStorage.setItem("theme-mode",t?"dark":"light")},[t]);const n=j.useCallback(()=>{s(l=>!l)},[]);return{darkMode:t,toggleDarkMode:n}}function xe(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})=>{const{darkMode:s,toggleDarkMode:n}=he(o);return e.jsxs("div",{className:"shell",style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[e.jsx(ge,{brand:o,darkMode:s,onThemeToggle:n}),e.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:e.jsx("main",{style:{flex:1,backgroundColor:"var(--bg-color)"},children:t})}),e.jsx(ye,{copyrightBrand:o.footer.copyrightBrand,yearCreated:o.footer.yearCreated,poweredBy:o.footer.poweredBy})]})},A=({title:o,subtitle:t,breadcrumbs:s,score:n})=>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((l,i)=>e.jsxs(j.Fragment,{children:[i>0&&e.jsx("span",{style:{color:"var(--surface-light)",opacity:.4},children:"/"}),l.path?e.jsx("a",{href:l.path,style:{color:"var(--accent-color)",textDecoration:"none"},children:l.label}):e.jsx("span",{style:{color:"var(--surface-light)",opacity:.8},children:l.label})]},l.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}),n&&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:n.value}),e.jsx("span",{style:{fontSize:"0.9rem",fontWeight:500},children:n.label})]}),n.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"})]})]}),I={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"})]})},L=({stats:o,columns:t=4})=>{const s=[{label:"Total Events",value:o.totalEvents,icon:I.violations},o.totalCompanies!==void 0&&{label:"Companies",value:o.totalCompanies,icon:I.avgFine},o.totalCities!==void 0&&{label:"Cities",value:o.totalCities,icon:I.avgFine},o.totalStates!==void 0&&{label:"States",value:o.totalStates,icon:I.avgFine},o.totalInjuries!==void 0&&{label:"Injuries",value:o.totalInjuries,icon:I.injuries},o.totalFatalities!==void 0&&{label:"Fatalities",value:o.totalFatalities,icon:I.fatalities},o.totalFines!==void 0&&{label:"Total Fines",value:be(o.totalFines),icon:I.fines},o.avgFines!==void 0&&{label:"Avg Fine",value:be(o.avgFines),icon:I.avgFine},o.trend&&{label:"YoY Change",value:`${o.trend.direction==="up"?"↑":o.trend.direction==="down"?"↓":"→"} ${o.trend.percentage}%`,icon:o.trend.direction==="down"?I.trendDown:I.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(n=>e.jsx(fr,{...n},n.label))})})},fr=({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:n=>{n.currentTarget.style.transform="translateY(-2px)",n.currentTarget.style.boxShadow="var(--shadow-md)"},onMouseLeave:n=>{n.currentTarget.style.transform="translateY(0)",n.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(--heading-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 be(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:n="No items found",showSearch:l=!0,initialLimit:i=30})=>{const[c,u]=j.useState(""),[p,k]=j.useState(!1),f=t.filter(w=>w.name.toLowerCase().includes(c.toLowerCase())),b=p||c.length>0,_=b?f:f.slice(0,i),Y=f.length>i&&!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,")"]})]}),l&&t.length>10&&e.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:w=>u(w.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:f.length===0?e.jsx("p",{style:{width:"100%",textAlign:"center",color:"var(--text-color)",opacity:.6,margin:0,padding:"var(--space-lg)"},children:n}):e.jsxs(e.Fragment,{children:[_.map(w=>e.jsxs("a",{href:`${s}/${w.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:w.name}),e.jsx("span",{title:`${w.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:w.count.toLocaleString()})]},w.slug)),(Y||p)&&e.jsx("button",{onClick:()=>k(!p),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:w=>{w.currentTarget.style.opacity="0.8"},onMouseLeave:w=>{w.currentTarget.style.opacity="1"},children:p?"Show less":`+${f.length-i} more`})]})})]})})},J=({title:o,events:t,viewMorePath:s,showAgencyBadge:n=!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(l=>e.jsx(vr,{event:l,showAgencyBadge:n},l.eventId))})]})}),vr=({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:pr(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(--accent-color)",textDecoration:"none",fontWeight:600,transition:"color var(--transition-fast)"},onMouseEnter:s=>s.currentTarget.style.color="var(--primary-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--accent-color)",children:[o.companyName," →"]})]})]})});function pr(o){try{return new Date(o).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return o}}const gr=({position:o,width:t,height:s})=>{const n={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:l,height:i}=n[o];return e.jsxs("div",{"data-ad-slot":o,style:{width:l,height:i,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,")"]})},O=({meta:o})=>{if(!o)return null;const t=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.jsx("aside",{className:"page-sidebar",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:t.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:t.map(({label:s,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:s}),e.jsx("dd",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:n})]},s))})]})})},B=()=>e.jsx("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(o=>e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",fontSize:"0.85rem",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",defaultChecked:o==="All",style:{accentColor:"var(--primary-color)"}}),o]},o))})]}),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"})]})]})]})}),mr=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
|
|
58
|
+
`})})},ge=({lines:o=3})=>e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-sm)"},children:Array.from({length:o}).map((a,s)=>e.jsx(oe,{width:s===o-1?"60%":"100%",height:16},s))}),nr=()=>e.jsxs("div",{style:{padding:"var(--space-lg)",border:"2px solid var(--border-color)",borderRadius:"var(--radius-md)",display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:[e.jsx(oe,{height:24,width:"50%"}),e.jsx(ge,{lines:3})]}),pe=({brand:o,darkMode:a,onThemeToggle:s})=>{const[n,l]=k.useState(!1),[i,c]=k.useState(!1),[f,v]=k.useState(null);k.useEffect(()=>{const u=()=>l(window.innerWidth<768);return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[]);const b=o.navItems.filter(u=>u.inNavbar!==!1);return e.jsxs("header",{style:{backgroundColor:"var(--primary-color)",borderBottom:"4px solid var(--accent-color)",position:"sticky",top:0,zIndex:100},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"var(--space-sm) var(--space-lg)",gap:"var(--space-md)",maxWidth:1400,margin:"0 auto"},children:[o.logoUrl&&e.jsx("div",{style:{width:40,height:40,borderRadius:"var(--radius-md)",overflow:"hidden",backgroundColor:"var(--bg-color)",border:"2px solid var(--accent-color)",flexShrink:0},children:e.jsx("img",{src:o.logoUrl,alt:o.name,style:{width:"100%",height:"100%",objectFit:"cover"}})}),e.jsx("h1",{style:{margin:0,fontFamily:"var(--font-serif)",fontSize:n?"1.1rem":"1.4rem",fontWeight:700,color:"var(--surface-light)",whiteSpace:"nowrap",flexShrink:0},children:o.name}),!n&&e.jsx("nav",{style:{display:"flex",alignItems:"center",gap:"var(--space-sm)",flex:1,justifyContent:"center"},children:b.map(u=>e.jsx(sr,{item:u,isActive:f===u.label,onHover:j=>v(j),onLeave:()=>v(null)},u.label))}),n&&e.jsx("div",{style:{flex:1}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",flexShrink:0},children:[n&&e.jsx(he,{onClick:()=>c(!i),label:"Menu",size:36,children:e.jsx(ur,{})}),e.jsx(he,{onClick:s,label:"Toggle theme",size:36,children:a?e.jsx(cr,{}):e.jsx(lr,{})}),e.jsx("a",{href:"/account","aria-label":"Account",style:{width:40,height:40,borderRadius:"var(--radius-full)",backgroundColor:"rgba(255,255,255,0.1)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background var(--transition-fast)",color:"var(--surface-light)",textDecoration:"none"},children:e.jsx(dr,{})})]})]}),n&&i&&e.jsx("div",{style:{backgroundColor:"var(--bg-color)",borderTop:"1px solid var(--border-color)",padding:"var(--space-sm)"},children:b.map(u=>e.jsx(ir,{item:u,onClose:()=>c(!1)},u.label))})]})},he=({onClick:o,label:a,size:s=36,children:n})=>e.jsx("button",{onClick:o,"aria-label":a,style:{width:s,height:s,borderRadius:"var(--radius-full)",backgroundColor:"rgba(255,255,255,0.1)",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background var(--transition-fast)",color:"var(--surface-light)"},onMouseEnter:l=>l.currentTarget.style.backgroundColor="rgba(255,255,255,0.2)",onMouseLeave:l=>l.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",children:n}),sr=({item:o,isActive:a,onHover:s,onLeave:n})=>{const l=()=>{o.onClick?o.onClick():o.path&&(window.location.href=o.path)};return e.jsxs("div",{onMouseEnter:()=>o.children&&s(o.label),onMouseLeave:n,style:{position:"relative"},children:[o.path&&!o.onClick&&!o.children?e.jsx("a",{href:o.path,style:{background:"none",border:"none",color:"var(--surface-light)",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.9rem",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",transition:"background var(--transition-fast)",textDecoration:"none",display:"inline-block"},onMouseEnter:i=>i.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",onMouseLeave:i=>i.currentTarget.style.backgroundColor="transparent",children:o.label}):e.jsxs("button",{onClick:l,style:{background:"none",border:"none",color:"var(--surface-light)",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.9rem",padding:"var(--space-xs) var(--space-sm)",borderRadius:"var(--radius-sm)",transition:"background var(--transition-fast)"},onMouseEnter:i=>i.currentTarget.style.backgroundColor="rgba(255,255,255,0.1)",onMouseLeave:i=>i.currentTarget.style.backgroundColor="transparent",children:[o.label," ",o.children&&"▾"]}),o.children&&a&&e.jsx("div",{style:{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",backgroundColor:"var(--bg-color)",minWidth:160,boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-md)",padding:"var(--space-xs) 0",zIndex:200,marginTop:4},children:o.children.map(i=>i.path?e.jsx("a",{href:i.path,style:{display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",transition:"background var(--transition-fast)",textDecoration:"none"},onMouseEnter:c=>c.currentTarget.style.backgroundColor="var(--secondary-color)",onMouseLeave:c=>c.currentTarget.style.backgroundColor="transparent",children:i.label},i.label):e.jsx("button",{onClick:i.onClick,style:{display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",transition:"background var(--transition-fast)"},onMouseEnter:c=>c.currentTarget.style.backgroundColor="var(--secondary-color)",onMouseLeave:c=>c.currentTarget.style.backgroundColor="transparent",children:i.label},i.label))})]})},ir=({item:o,onClose:a})=>{const s={display:"block",width:"100%",padding:"var(--space-sm) var(--space-md)",border:"none",background:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-sans)",fontWeight:500,fontSize:"0.95rem",color:"var(--text-color)",borderRadius:"var(--radius-sm)",textDecoration:"none"};return o.path&&!o.onClick?e.jsx("a",{href:o.path,style:s,onClick:a,children:o.label}):e.jsx("button",{onClick:()=>{var n;(n=o.onClick)==null||n.call(o),a()},style:s,children:o.label})},lr=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"5"}),e.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),cr=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),dr=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),ur=()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M3 12h18M3 6h18M3 18h18"})}),me=({copyrightBrand:o,yearCreated:a,poweredBy:s})=>{const n=new Date().getFullYear(),l=a===n?n.toString():`${a}-${n}`;return e.jsx("footer",{style:{backgroundColor:"var(--primary-color)",color:"var(--text-dark)",padding:"var(--space-lg) var(--space-xl)",borderTop:"4px solid var(--accent-color)"},children:e.jsxs("div",{style:{maxWidth:1200,margin:"0 auto",display:"flex",flexDirection:"column",gap:"var(--space-md)",alignItems:"center",textAlign:"center"},children:[e.jsxs("p",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.85rem",opacity:.8},children:["© ",l," ",o,". All rights reserved."]}),s&&e.jsxs("p",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.75rem",opacity:.6},children:["Powered by"," ",e.jsx("span",{style:{color:"var(--org-color)",fontWeight:600},children:s})]})]})})};function ye(o){const[a,s]=k.useState(()=>{if(typeof window>"u")return!1;const l=localStorage.getItem("theme-mode");return l?l==="dark":o.theme.defaultTheme==="dark"?!0:o.theme.defaultTheme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1});k.useEffect(()=>{xe(o.theme)},[o.theme]),k.useEffect(()=>{document.body.classList.toggle("dark-mode",a),localStorage.setItem("theme-mode",a?"dark":"light")},[a]);const n=k.useCallback(()=>{s(l=>!l)},[]);return{darkMode:a,toggleDarkMode:n}}function xe(o){const a=document.documentElement;a.style.setProperty("--primary-color",o.primaryColor),a.style.setProperty("--secondary-color",o.secondaryColor),a.style.setProperty("--accent-color",o.accentColor),o.surfaceLight&&a.style.setProperty("--surface-light",o.surfaceLight),o.surfaceDark&&a.style.setProperty("--surface-dark",o.surfaceDark),o.textLight&&a.style.setProperty("--text-light",o.textLight),o.textDark&&a.style.setProperty("--text-dark",o.textDark)}const W=({brand:o,children:a})=>{const{darkMode:s,toggleDarkMode:n}=ye(o);return e.jsxs("div",{className:"shell",style:{display:"flex",flexDirection:"column",minHeight:"100vh"},children:[e.jsx(pe,{brand:o,darkMode:s,onThemeToggle:n}),e.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:e.jsx("main",{style:{flex:1,backgroundColor:"var(--bg-color)"},children:a})}),e.jsx(me,{copyrightBrand:o.footer.copyrightBrand,yearCreated:o.footer.yearCreated,poweredBy:o.footer.poweredBy})]})},z=({title:o,subtitle:a,breadcrumbs:s,score:n})=>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((l,i)=>e.jsxs(k.Fragment,{children:[i>0&&e.jsx("span",{style:{color:"var(--surface-light)",opacity:.4},children:"/"}),l.path?e.jsx("a",{href:l.path,style:{color:"var(--accent-color)",textDecoration:"none"},children:l.label}):e.jsx("span",{style:{color:"var(--surface-light)",opacity:.8},children:l.label})]},l.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}),a&&e.jsx("p",{style:{margin:"var(--space-sm) 0 0",fontFamily:"var(--font-sans)",fontSize:"1.1rem",color:"var(--text-dark)",opacity:.8},children:a}),n&&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:n.value}),e.jsx("span",{style:{fontSize:"0.9rem",fontWeight:500},children:n.label})]}),n.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"})]})]}),F={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:a=4})=>{const s=[{label:"Total Events",value:o.totalEvents,icon:F.violations},o.totalCompanies!==void 0&&{label:"Companies",value:o.totalCompanies,icon:F.avgFine},o.totalCities!==void 0&&{label:"Cities",value:o.totalCities,icon:F.avgFine},o.totalStates!==void 0&&{label:"States",value:o.totalStates,icon:F.avgFine},o.totalInjuries!==void 0&&{label:"Injuries",value:o.totalInjuries,icon:F.injuries},o.totalFatalities!==void 0&&{label:"Fatalities",value:o.totalFatalities,icon:F.fatalities},o.totalFines!==void 0&&{label:"Total Fines",value:be(o.totalFines),icon:F.fines},o.avgFines!==void 0&&{label:"Avg Fine",value:be(o.avgFines),icon:F.avgFine},o.trend&&{label:"YoY Change",value:`${o.trend.direction==="up"?"↑":o.trend.direction==="down"?"↓":"→"} ${o.trend.percentage}%`,icon:o.trend.direction==="down"?F.trendDown:F.trendUp}].filter(Boolean);return e.jsx("section",{style:{marginBottom:"var(--space-lg)"},children:e.jsx("div",{className:"stat-grid",style:{display:"grid",gridTemplateColumns:`repeat(${a}, 1fr)`,gap:"var(--space-md)"},children:s.map(n=>e.jsx(fr,{...n},n.label))})})},fr=({label:o,value:a,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:n=>{n.currentTarget.style.transform="translateY(-2px)",n.currentTarget.style.boxShadow="var(--shadow-md)"},onMouseLeave:n=>{n.currentTarget.style.transform="translateY(0)",n.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(--heading-color)"},children:typeof a=="number"?a.toLocaleString():a}),e.jsx("div",{style:{fontFamily:"var(--font-sans)",fontSize:"0.9rem",color:"var(--text-color)",opacity:.8},children:o})]})]});function be(o){return o>=1e6?`$${(o/1e6).toFixed(1)}M`:o>=1e3?`$${(o/1e3).toFixed(0)}K`:`$${o.toLocaleString()}`}const K=({title:o,items:a,basePath:s,emptyMessage:n="No items found",showSearch:l=!0,initialLimit:i=30})=>{const[c,f]=k.useState(""),[v,b]=k.useState(!1),u=a.filter(w=>w.name.toLowerCase().includes(c.toLowerCase())),j=v||c.length>0,I=j?u:u.slice(0,i),N=u.length>i&&!j;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:["(",a.length,")"]})]}),l&&a.length>10&&e.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:w=>f(w.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:u.length===0?e.jsx("p",{style:{width:"100%",textAlign:"center",color:"var(--text-color)",opacity:.6,margin:0,padding:"var(--space-lg)"},children:n}):e.jsxs(e.Fragment,{children:[I.map(w=>e.jsxs("a",{href:`${s}/${w.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:D=>{D.currentTarget.style.backgroundColor="var(--primary-color)",D.currentTarget.style.color="var(--surface-light)",D.currentTarget.style.borderColor="var(--primary-color)"},onMouseLeave:D=>{D.currentTarget.style.backgroundColor="var(--bg-color)",D.currentTarget.style.color="var(--text-color)",D.currentTarget.style.borderColor="var(--border-color)"},children:[e.jsx("span",{style:{fontWeight:500},children:w.name}),e.jsx("span",{title:`${w.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:w.count.toLocaleString()})]},w.slug)),(N||v)&&e.jsx("button",{onClick:()=>b(!v),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:w=>{w.currentTarget.style.opacity="0.8"},onMouseLeave:w=>{w.currentTarget.style.opacity="1"},children:v?"Show less":`+${u.length-i} more`})]})})]})})},G=({title:o,events:a,viewMorePath:s,showAgencyBadge:n=!1})=>a.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:a.map(l=>e.jsx(vr,{event:l,showAgencyBadge:n},l.eventId))})]})}),vr=({event:o,showAgencyBadge:a})=>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:[a&&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:gr(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(--accent-color)",textDecoration:"none",fontWeight:600,transition:"color var(--transition-fast)"},onMouseEnter:s=>s.currentTarget.style.color="var(--primary-color)",onMouseLeave:s=>s.currentTarget.style.color="var(--accent-color)",children:[o.companyName," →"]})]})]})});function gr(o){try{return new Date(o).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return o}}const pr=({position:o,width:a,height:s})=>{const n={sidebar:{width:a??280,height:s??250},"left-sidebar":{width:a??"100%",height:s??200},banner:{width:a??"100%",height:s??90},inline:{width:a??"100%",height:s??120}},{width:l,height:i}=n[o];return e.jsxs("div",{"data-ad-slot":o,style:{width:l,height:i,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})=>{if(!o)return null;const a=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.jsx("aside",{className:"page-sidebar",style:{display:"flex",flexDirection:"column",gap:"var(--space-md)"},children:a.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:a.map(({label:s,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:s}),e.jsx("dd",{style:{margin:0,fontFamily:"var(--font-sans)",fontSize:"0.9rem",fontWeight:600,color:"var(--text-color)"},children:n})]},s))})]})})},B=()=>e.jsx("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(o=>e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--space-xs)",fontSize:"0.85rem",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",defaultChecked:o==="All",style:{accentColor:"var(--primary-color)"}}),o]},o))})]}),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"})]})]})]})}),hr=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{children:`
|
|
59
59
|
.mobile-ad-banner {
|
|
60
60
|
display: none;
|
|
61
61
|
}
|
|
@@ -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)"})})]}),
|
|
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)"})})]}),mr=({brand:o,data:a})=>{const s=[{label:"Home",path:"/"},{label:a.name}],n=o.scoreConfig&&a.stats.score!==void 0?{value:a.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,children:[e.jsx(z,{title:a.name,subtitle:o.tagline||"Explore worker safety data across the nation",breadcrumbs:s,score:n}),e.jsxs("div",{className:"page-layout",children:[e.jsx(B,{}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:a.stats,columns:4}),e.jsx(K,{title:"States & Territories",items:a.directory,basePath:"/state",initialLimit:60})]}),e.jsx(L,{meta:a.meta})]})]})},yr=({brand:o,data:a})=>{const s=[{label:"Home",path:"/"},{label:"USA",path:"/usa"},{label:a.name}],n=o.scoreConfig&&a.stats.score!==void 0?{value:a.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,l=Object.keys(a.recentByAgency);return e.jsxs(W,{brand:o,children:[e.jsx(z,{title:a.name,subtitle:`Worker safety data for ${a.name}`,breadcrumbs:s,score:n}),e.jsxs("div",{className:"page-layout",children:[e.jsx(B,{}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:a.stats}),e.jsx(K,{title:"Cities",items:a.directory,basePath:"/city"}),l.map(i=>e.jsx(G,{title:`Recent ${i} Incidents`,events:a.recentByAgency[i],viewMorePath:`/${a.slug.toLowerCase()}/events/${i.toLowerCase()}`,showAgencyBadge:!1},i))]}),e.jsx(L,{meta:a.meta})]})]})},xr={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",DC:"District of Columbia",PR:"Puerto Rico",VI:"Virgin Islands",GU:"Guam"},br=({brand:o,data:a})=>{var v,b;const s=((b=(v=a.slug)==null?void 0:v.split("-")[0])==null?void 0:b.toUpperCase())||a.state,n=xr[s]||s,l=[{label:"Home",path:"/"},{label:"USA",path:"/usa"},{label:n,path:`/state/${s.toLowerCase()}`},{label:a.name}],i=o.scoreConfig&&a.stats.score!==void 0?{value:a.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,c=Object.keys(a.recentByAgency),f=`/${a.state.toLowerCase()}/${a.slug}`;return e.jsxs(W,{brand:o,children:[e.jsx(z,{title:a.name,subtitle:`Worker safety data for ${a.name}`,breadcrumbs:l,score:i}),e.jsxs("div",{className:"page-layout",children:[e.jsx(B,{}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:a.stats}),e.jsx(K,{title:"Companies",items:a.directory,basePath:"/company"}),c.map(u=>e.jsx(G,{title:`Recent ${u} Incidents`,events:a.recentByAgency[u],viewMorePath:`${f}/events/${u.toLowerCase()}`,showAgencyBadge:!1},u))]}),e.jsx(L,{meta:a.meta})]})]})},jr=({brand:o,data:a})=>{var i;const s=[{label:"Home",path:"/"},{label:"USA",path:"/usa"},{label:a.name}],n=o.scoreConfig&&a.stats.score!==void 0?{value:a.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0,l=a.sites&&a.sites.length>0;return e.jsxs(W,{brand:o,children:[e.jsx(z,{title:a.name,subtitle:(i=a.meta)!=null&&i.industry?`${a.meta.industry}`:void 0,breadcrumbs:s,score:n}),e.jsxs("div",{className:"page-layout",children:[e.jsx(B,{}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:a.stats}),l&&e.jsx(K,{title:"Locations",items:a.sites,basePath:"/site"}),e.jsx(G,{title:"Recent Incidents",events:a.recentEvents.slice(0,l?5:10),viewMorePath:`/company/${a.slug}/events`,showAgencyBadge:!0})]}),e.jsx(L,{meta:a.meta})]})]})},kr=({brand:o,data:a})=>{const s=[{label:"Home",path:"/"},{label:"USA",path:"/usa"},{label:a.companyName,path:`/company/${a.companySlug}`},{label:`#${a.siteId}`}],n=o.scoreConfig&&a.stats.score!==void 0?{value:a.stats.score,label:o.scoreConfig.name,betaDisclaimer:o.scoreConfig.betaDisclaimer}:void 0;return e.jsxs(W,{brand:o,children:[e.jsx(z,{title:a.name,subtitle:`Location #${a.siteId} of ${a.companyName}`,breadcrumbs:s,score:n}),e.jsxs("div",{className:"page-layout",children:[e.jsx(B,{}),e.jsxs("main",{className:"page-main",children:[e.jsx(O,{stats:a.stats}),a.siblings&&a.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:a.siblings.slice(0,10).map(l=>e.jsxs("a",{href:`/company/${a.companySlug}/site/${l.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:i=>i.currentTarget.style.backgroundColor="var(--accent-color)",onMouseLeave:i=>i.currentTarget.style.backgroundColor="var(--secondary-color)",children:[e.jsxs("span",{children:["#",l.name]}),e.jsx("span",{style:{backgroundColor:"var(--primary-color)",color:"var(--text-dark)",padding:"2px 6px",borderRadius:"var(--radius-sm)",fontSize:"0.75rem"},children:l.count})]},l.slug))})]}),e.jsx(G,{title:"Recent Incidents",events:a.recentEvents,viewMorePath:`/company/${a.companySlug}/site/${a.siteId}/events`,showAgencyBadge:!0})]}),e.jsx(L,{meta:a.meta})]})]})};p.AdSlot=pr,p.Alert=rr,p.Badge=Ze,p.Button=Ge,p.Card=Je,p.CityPage=br,p.CompanyPage=jr,p.Directory=K,p.FilterSidebar=B,p.Footer=me,p.Header=pe,p.Hero=z,p.InfoSidebar=L,p.Input=Qe,p.LoadingOverlay=tr,p.MobileAdBanner=hr,p.Modal=er,p.NationPage=mr,p.RecentEvents=G,p.Shell=W,p.SitePage=kr,p.Skeleton=oe,p.SkeletonCard=nr,p.SkeletonText=ge,p.Spinner=ve,p.StatGrid=O,p.StatePage=yr,p.Table=qe,p.Tabs=or,p.Tooltip=ar,p.applyTheme=xe,p.useTheme=ye,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sirsluginston/sharedui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.23",
|
|
4
4
|
"description": "Server-Driven UI component library for SirSluginston Co projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/sharedui.js",
|
|
@@ -57,4 +57,4 @@
|
|
|
57
57
|
},
|
|
58
58
|
"author": "SirSluginston",
|
|
59
59
|
"license": "MIT"
|
|
60
|
-
}
|
|
60
|
+
}
|