@murabei-data-science/pumpwood-ui 1.3.8 → 1.4.0
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/design-system.d.ts +7 -1
- package/dist/design-system.esm.js +2 -2
- package/dist/design-system.js +3 -3
- package/dist/types/design-system/DetailPage/AutoDetailContent.d.ts +5 -1
- package/dist/types/design-system/DetailPage/detail-utils.d.ts +2 -0
- package/dist/types/design-system/DetailPage/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/design-system.d.ts
CHANGED
|
@@ -174,6 +174,8 @@ interface IDetailSection {
|
|
|
174
174
|
fields: string[];
|
|
175
175
|
cols?: 2 | 3 | 4;
|
|
176
176
|
isFullWidth?: boolean;
|
|
177
|
+
className?: string;
|
|
178
|
+
fullWidthFields?: string[];
|
|
177
179
|
}
|
|
178
180
|
interface IDetailFieldConfig {
|
|
179
181
|
exclude?: string[];
|
|
@@ -194,9 +196,13 @@ declare const formatDetailValue: (value: unknown, key: string, options?: IFormat
|
|
|
194
196
|
declare const getDetailFieldValue: (data: Record<string, unknown>, key: string) => unknown;
|
|
195
197
|
declare const FULL_WIDTH_DETAIL_FIELDS: string[];
|
|
196
198
|
|
|
199
|
+
type DetailSectionVariant = "default" | "card";
|
|
197
200
|
interface IAutoDetailContentProps {
|
|
198
201
|
data: Record<string, any>;
|
|
199
202
|
config?: IDetailFieldConfig;
|
|
203
|
+
className?: string;
|
|
204
|
+
sectionVariant?: DetailSectionVariant;
|
|
205
|
+
sectionClassName?: string;
|
|
200
206
|
formatters?: {
|
|
201
207
|
key: string;
|
|
202
208
|
formatter: (value: unknown) => string;
|
|
@@ -217,7 +223,7 @@ interface IAutoDetailContentProps {
|
|
|
217
223
|
/**
|
|
218
224
|
* Auto-render entity detail fields in configurable sections.
|
|
219
225
|
*/
|
|
220
|
-
declare function AutoDetailContent({ data, config, formatters, wrapperElements, statusLabels, formatDate, }: IAutoDetailContentProps): react_jsx_runtime.JSX.Element;
|
|
226
|
+
declare function AutoDetailContent({ data, config, className, sectionVariant, sectionClassName, formatters, wrapperElements, statusLabels, formatDate, }: IAutoDetailContentProps): react_jsx_runtime.JSX.Element;
|
|
221
227
|
|
|
222
228
|
interface IDetailPageSection {
|
|
223
229
|
id?: string;
|
|
@@ -17,10 +17,10 @@ var Y={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const $=e(({color:e="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:a="",children:i,iconNode:s,...l},c)=>t("svg",{ref:c,...Y,width:r,height:r,stroke:e,strokeWidth:o?24*Number(n)/Number(r):n,className:G("lucide",a),...!i&&!I(l)&&{"aria-hidden":"true"},...l},[...s.map(([e,r])=>t(e,r)),...Array.isArray(i)?i:[i]])),B=(r,n)=>{const o=e(({className:e,...o},a)=>{return t($,{ref:a,iconNode:n,className:G(`lucide-${i=A(r),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${r}`,e),...o});var i});return o.displayName=A(r),o},
|
|
20
|
+
*/const $=e(({color:e="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:a="",children:i,iconNode:s,...l},c)=>t("svg",{ref:c,...Y,width:r,height:r,stroke:e,strokeWidth:o?24*Number(n)/Number(r):n,className:G("lucide",a),...!i&&!I(l)&&{"aria-hidden":"true"},...l},[...s.map(([e,r])=>t(e,r)),...Array.isArray(i)?i:[i]])),B=(r,n)=>{const o=e(({className:e,...o},a)=>{return t($,{ref:a,iconNode:n,className:G(`lucide-${i=A(r),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${r}`,e),...o});var i});return o.displayName=A(r),o},V=B("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),Q=B("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),R=B("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),U=B("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),X=B("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]),J=B("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),K=B("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Z=B("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),ee=B("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),te=B("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),re=6048e5,ne=Symbol.for("constructDateFrom");
|
|
21
21
|
/**
|
|
22
22
|
* @license lucide-react v0.562.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/function oe(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&ne in e?e[ne](t):e instanceof Date?new e.constructor(t):new Date(t)}function ae(e,t){return oe(t||e,e)}let ie={};function se(){return ie}function le(e,t){const r=se(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=ae(e,t?.in),a=o.getDay(),i=(a<n?7:0)+a-n;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ce(e,t){return le(e,{...t,weekStartsOn:1})}function de(e,t){const r=ae(e,t?.in),n=r.getFullYear(),o=oe(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const a=ce(o),i=oe(r,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=ce(i);return r.getTime()>=a.getTime()?n+1:r.getTime()>=s.getTime()?n:n-1}function ue(e){const t=ae(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function me(e,t){const r=ae(e,t?.in);return r.setHours(0,0,0,0),r}function he(e,t,r){const[n,o]=function(e,...t){const r=oe.bind(null,t.find(e=>"object"==typeof e));return t.map(r)}(0,e,t),a=me(n),i=me(o),s=+a-ue(a),l=+i-ue(i);return Math.round((s-l)/864e5)}function pe(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+ae(e)));var t}const fe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ge(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const be={date:ge({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ge({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ge({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},we={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ye(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=r?.width?String(r.width):t;n=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=r?.width?String(r.width):e.defaultWidth;n=e.values[o]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function xe(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(s,e=>e.test(i)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(s,e=>e.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}var ve;const ke={code:"en-US",formatDistance:(e,t,r)=>{let n;const o=fe[e];return n="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:be,formatRelative:(e,t,r,n)=>we[e],localize:{ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:ye({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ye({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ye({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ye({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ye({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ve={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(ve.matchPattern);if(!r)return null;const n=r[0],o=e.match(ve.parsePattern);if(!o)return null;let a=ve.valueCallback?ve.valueCallback(o[0]):o[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(n.length)}}),era:xe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:xe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:xe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:xe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:xe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ne(e,t){const r=ae(e,t?.in),n=he(r,function(e,t){const r=ae(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}(r));return n+1}function Ce(e,t){const r=ae(e,t?.in),n=+ce(r)-+function(e,t){const r=de(e,t),n=oe(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),ce(n)}(r);return Math.round(n/re)+1}function Me(e,t){const r=ae(e,t?.in),n=r.getFullYear(),o=se(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=oe(t?.in||e,0);i.setFullYear(n+1,0,a),i.setHours(0,0,0,0);const s=le(i,t),l=oe(t?.in||e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);const c=le(l,t);return+r>=+s?n+1:+r>=+c?n:n-1}function Se(e,t){const r=ae(e,t?.in),n=+le(r,t)-+function(e,t){const r=se(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=Me(e,t),a=oe(t?.in||e,0);return a.setFullYear(o,0,n),a.setHours(0,0,0,0),le(a,t)}(r,t);return Math.round(n/re)+1}function ze(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const je={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return ze("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):ze(r+1,2)},d:(e,t)=>ze(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>ze(e.getHours()%12||12,t.length),H:(e,t)=>ze(e.getHours(),t.length),m:(e,t)=>ze(e.getMinutes(),t.length),s:(e,t)=>ze(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return ze(Math.trunc(n*Math.pow(10,r-3)),t.length)}},Pe="midnight",_e="noon",De="morning",Le="afternoon",We="evening",Oe="night",qe={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return je.y(e,t)},Y:function(e,t,r,n){const o=Me(e,n),a=o>0?o:1-o;if("YY"===t){return ze(a%100,2)}return"Yo"===t?r.ordinalNumber(a,{unit:"year"}):ze(a,t.length)},R:function(e,t){return ze(de(e),t.length)},u:function(e,t){return ze(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return ze(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return ze(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return je.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return ze(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=Se(e,n);return"wo"===t?r.ordinalNumber(o,{unit:"week"}):ze(o,t.length)},I:function(e,t,r){const n=Ce(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):ze(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):je.d(e,t)},D:function(e,t,r){const n=Ne(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):ze(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ze(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ze(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=0===n?7:n;switch(t){case"i":return String(o);case"ii":return ze(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(o=12===n?_e:0===n?Pe:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(o=n>=17?We:n>=12?Le:n>=4?De:Oe,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return je.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):je.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):ze(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):ze(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):je.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):je.s(e,t)},S:function(e,t){return je.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return Te(n);case"XXXX":case"XX":return Fe(n);default:return Fe(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Te(n);case"xxxx":case"xx":return Fe(n);default:return Fe(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ee(n,":");default:return"GMT"+Fe(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ee(n,":");default:return"GMT"+Fe(n,":")}},t:function(e,t,r){return ze(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return ze(+e,t.length)}};function Ee(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),a=n%60;return 0===a?r+String(o):r+String(o)+t+ze(a,2)}function Te(e,t){if(e%60==0){return(e>0?"-":"+")+ze(Math.abs(e)/60,2)}return Fe(e,t)}function Fe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+ze(Math.trunc(n/60),2)+t+ze(n%60,2)}const He=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ae=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Ge={p:Ae,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return He(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",He(n,t)).replace("{{time}}",Ae(o,t))}},Ie=/^D+$/,Ye=/^Y+$/,$e=["D","DD","YY","YYYY"];const Be=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Qe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ve=/^'([^]*?)'?$/,Re=/''/g,Ue=/[a-zA-Z]/;function Xe(e,t,r){const n=se(),o=n.locale??ke,a=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=ae(e,r?.in);if(!pe(s))throw new RangeError("Invalid time value");let l=t.match(Qe).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Ge[t])(e,o.formatLong)}return e}).join("").match(Be).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Je(e)};if(qe[t])return{isToken:!0,value:e};if(t.match(Ue))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(r=>{if(!r.isToken)return r.value;const n=r.value;(function(e){return Ye.test(e)}(n)||function(e){return Ie.test(e)}(n))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),$e.includes(e))throw new RangeError(n)}(n,t,String(e));return(0,qe[n[0]])(s,n,o.localize,c)}).join("")}function Je(e){const t=e.match(Ve);return t?t[1].replace(Re,"'"):e}const Ke="flex h-10 w-full items-center rounded-md border border-input bg-background px-3 text-sm font-normal shadow-none hover:bg-[hsl(var(--hover-ring))] hover:border-[hsl(var(--focus-ring))] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",Ze="text-muted-foreground",et="size-4 shrink-0 text-muted-foreground opacity-50";function tt(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=tt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}const rt=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),nt="-",ot=[],at=e=>{const t=lt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return st(e);const r=e.split(nt),n=""===r[0]&&r.length>1?1:0;return it(r,n,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=n[e],o=r[e];return t?o?((e,t)=>{const r=new Array(e.length+t.length);for(let t=0;t<e.length;t++)r[t]=e[t];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r})(o,t):t:o||ot}return r[e]||ot}}},it=(e,t,r)=>{if(0===e.length-t)return r.classGroupId;const n=e[t],o=r.nextPart.get(n);if(o){const r=it(e,t+1,o);if(r)return r}const a=r.validators;if(null===a)return;const i=0===t?e.join(nt):e.slice(t).join(nt),s=a.length;for(let e=0;e<s;e++){const t=a[e];if(t.validator(i))return t.classGroupId}},st=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?"arbitrary.."+n:void 0})(),lt=e=>{const{theme:t,classGroups:r}=e;return ct(r,t)},ct=(e,t)=>{const r=rt();for(const n in e){const o=e[n];dt(o,r,n,t)}return r},dt=(e,t,r,n)=>{const o=e.length;for(let a=0;a<o;a++){const o=e[a];ut(o,t,r,n)}},ut=(e,t,r,n)=>{"string"!=typeof e?"function"!=typeof e?pt(e,t,r,n):ht(e,t,r,n):mt(e,t,r)},mt=(e,t,r)=>{(""===e?t:ft(t,e)).classGroupId=r},ht=(e,t,r,n)=>{gt(e)?dt(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(r,e)))},pt=(e,t,r,n)=>{const o=Object.entries(e),a=o.length;for(let e=0;e<a;e++){const[a,i]=o[e];dt(i,ft(t,a),r,n)}},ft=(e,t)=>{let r=e;const n=t.split(nt),o=n.length;for(let e=0;e<o;e++){const t=n[e];let o=r.nextPart.get(t);o||(o=rt(),r.nextPart.set(t,o)),r=o}return r},gt=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,bt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(o(e,t),t):void 0},set(e,t){e in r?r[e]=t:o(e,t)}}},wt=[],yt=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),xt=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,o=0,a=0;const i=e.length;for(let s=0;s<i;s++){const i=e[s];if(0===n&&0===o){if(":"===i){t.push(e.slice(a,s)),a=s+1;continue}if("/"===i){r=s;continue}}"["===i?n++:"]"===i?n--:"("===i?o++:")"===i&&o--}const s=0===t.length?e:e.slice(a);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return yt(t,c,l,r&&r>a?r-a:void 0)};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):yt(wt,!1,t,void 0,!0)}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},vt=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,r)=>{t.set(e,1e6+r)}),e=>{const r=[];let n=[];for(let o=0;o<e.length;o++){const a=e[o],i="["===a[0],s=t.has(a);i||s?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(a)):n.push(a)}return n.length>0&&(n.sort(),r.push(...n)),r}},kt=/\s+/,Nt=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Nt(e[n]))&&(r&&(r+=" "),r+=t);return r},Ct=(e,...t)=>{let r,n,o,a;const i=e=>{const t=n(e);if(t)return t;const a=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(kt);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:h}=r(t);if(c){l=t+(l.length>0?" "+l:l);continue}let p=!!h,f=n(p?m.substring(0,h):m);if(!f){if(!p){l=t+(l.length>0?" "+l:l);continue}if(f=n(m),!f){l=t+(l.length>0?" "+l:l);continue}p=!1}const g=0===d.length?"":1===d.length?d[0]:a(d).join(":"),b=u?g+"!":g,w=b+f;if(i.indexOf(w)>-1)continue;i.push(w);const y=o(f,p);for(let e=0;e<y.length;++e){const t=y[e];i.push(b+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return o(e,a),a};return a=s=>{const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:bt(e.cacheSize),parseClassName:xt(e),sortModifiers:vt(e),...at(e)}))(l),n=r.cache.get,o=r.cache.set,a=i,i(s)},(...e)=>a(((...e)=>{let t,r,n=0,o="";for(;n<e.length;)(t=e[n++])&&(r=Nt(t))&&(o&&(o+=" "),o+=r);return o})(...e))},Mt=[],St=e=>{const t=t=>t[e]||Mt;return t.isThemeGetter=!0,t},zt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pt=/^\d+\/\d+$/,_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Lt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ot=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qt=e=>Pt.test(e),Et=e=>!!e&&!Number.isNaN(Number(e)),Tt=e=>!!e&&Number.isInteger(Number(e)),Ft=e=>e.endsWith("%")&&Et(e.slice(0,-1)),Ht=e=>_t.test(e),At=()=>!0,Gt=e=>Dt.test(e)&&!Lt.test(e),It=()=>!1,Yt=e=>Wt.test(e),$t=e=>Ot.test(e),Bt=e=>!Vt(e)&&!Zt(e),Qt=e=>ir(e,dr,It),Vt=e=>zt.test(e),Rt=e=>ir(e,ur,Gt),Ut=e=>ir(e,mr,Et),Xt=e=>ir(e,lr,It),Jt=e=>ir(e,cr,$t),Kt=e=>ir(e,pr,Yt),Zt=e=>jt.test(e),er=e=>sr(e,ur),tr=e=>sr(e,hr),rr=e=>sr(e,lr),nr=e=>sr(e,dr),or=e=>sr(e,cr),ar=e=>sr(e,pr,!0),ir=(e,t,r)=>{const n=zt.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},sr=(e,t,r=!1)=>{const n=jt.exec(e);return!!n&&(n[1]?t(n[1]):r)},lr=e=>"position"===e||"percentage"===e,cr=e=>"image"===e||"url"===e,dr=e=>"length"===e||"size"===e||"bg-size"===e,ur=e=>"length"===e,mr=e=>"number"===e,hr=e=>"family-name"===e,pr=e=>"shadow"===e,fr=Ct(()=>{const e=St("color"),t=St("font"),r=St("text"),n=St("font-weight"),o=St("tracking"),a=St("leading"),i=St("breakpoint"),s=St("container"),l=St("spacing"),c=St("radius"),d=St("shadow"),u=St("inset-shadow"),m=St("text-shadow"),h=St("drop-shadow"),p=St("blur"),f=St("perspective"),g=St("aspect"),b=St("ease"),w=St("animate"),y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Zt,Vt],x=()=>[Zt,Vt,l],v=()=>[qt,"full","auto",...x()],k=()=>[Tt,"none","subgrid",Zt,Vt],N=()=>["auto",{span:["full",Tt,Zt,Vt]},Tt,Zt,Vt],C=()=>[Tt,"auto",Zt,Vt],M=()=>["auto","min","max","fr",Zt,Vt],S=()=>["auto",...x()],z=()=>[qt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],j=()=>[e,Zt,Vt],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",rr,Xt,{position:[Zt,Vt]}],_=()=>["auto","cover","contain",nr,Qt,{size:[Zt,Vt]}],D=()=>[Ft,er,Rt],L=()=>["","none","full",c,Zt,Vt],W=()=>["",Et,er,Rt],O=()=>[Et,Ft,rr,Xt],q=()=>["","none",p,Zt,Vt],E=()=>["none",Et,Zt,Vt],T=()=>["none",Et,Zt,Vt],F=()=>[Et,Zt,Vt],H=()=>[qt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ht],breakpoint:[Ht],color:[At],container:[Ht],"drop-shadow":[Ht],ease:["in","out","in-out"],font:[Bt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ht],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ht],shadow:[Ht],spacing:["px",Et],text:[Ht],"text-shadow":[Ht],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qt,Vt,Zt,g]}],container:["container"],columns:[{columns:[Et,Vt,Zt,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:y()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:v()}],"inset-x":[{"inset-x":v()}],"inset-y":[{"inset-y":v()}],start:[{start:v()}],end:[{end:v()}],top:[{top:v()}],right:[{right:v()}],bottom:[{bottom:v()}],left:[{left:v()}],visibility:["visible","invisible","collapse"],z:[{z:[Tt,"auto",Zt,Vt]}],basis:[{basis:[qt,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Et,qt,"auto","initial","none",Vt]}],grow:[{grow:["",Et,Zt,Vt]}],shrink:[{shrink:["",Et,Zt,Vt]}],order:[{order:[Tt,"first","last","none",Zt,Vt]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,er,Rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Zt,Ut]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ft,Vt]}],"font-family":[{font:[tr,Vt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Zt,Vt]}],"line-clamp":[{"line-clamp":[Et,"none",Zt,Ut]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":["none",Zt,Vt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Zt,Vt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Et,"from-font","auto",Zt,Rt]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Et,"auto",Zt,Vt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Zt,Vt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Zt,Vt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tt,Zt,Vt],radial:["",Zt,Vt],conic:[Tt,Zt,Vt]},or,Jt]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Et,Zt,Vt]}],"outline-w":[{outline:["",Et,er,Rt]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",d,ar,Kt]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",u,ar,Kt]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Et,Rt]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",m,ar,Kt]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Et,Zt,Vt]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Et]}],"mask-image-linear-from-pos":[{"mask-linear-from":O()}],"mask-image-linear-to-pos":[{"mask-linear-to":O()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":O()}],"mask-image-t-to-pos":[{"mask-t-to":O()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":O()}],"mask-image-r-to-pos":[{"mask-r-to":O()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":O()}],"mask-image-b-to-pos":[{"mask-b-to":O()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":O()}],"mask-image-l-to-pos":[{"mask-l-to":O()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":O()}],"mask-image-x-to-pos":[{"mask-x-to":O()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":O()}],"mask-image-y-to-pos":[{"mask-y-to":O()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[Zt,Vt]}],"mask-image-radial-from-pos":[{"mask-radial-from":O()}],"mask-image-radial-to-pos":[{"mask-radial-to":O()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Et]}],"mask-image-conic-from-pos":[{"mask-conic-from":O()}],"mask-image-conic-to-pos":[{"mask-conic-to":O()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Zt,Vt]}],filter:[{filter:["","none",Zt,Vt]}],blur:[{blur:q()}],brightness:[{brightness:[Et,Zt,Vt]}],contrast:[{contrast:[Et,Zt,Vt]}],"drop-shadow":[{"drop-shadow":["","none",h,ar,Kt]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",Et,Zt,Vt]}],"hue-rotate":[{"hue-rotate":[Et,Zt,Vt]}],invert:[{invert:["",Et,Zt,Vt]}],saturate:[{saturate:[Et,Zt,Vt]}],sepia:[{sepia:["",Et,Zt,Vt]}],"backdrop-filter":[{"backdrop-filter":["","none",Zt,Vt]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[Et,Zt,Vt]}],"backdrop-contrast":[{"backdrop-contrast":[Et,Zt,Vt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Et,Zt,Vt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Et,Zt,Vt]}],"backdrop-invert":[{"backdrop-invert":["",Et,Zt,Vt]}],"backdrop-opacity":[{"backdrop-opacity":[Et,Zt,Vt]}],"backdrop-saturate":[{"backdrop-saturate":[Et,Zt,Vt]}],"backdrop-sepia":[{"backdrop-sepia":["",Et,Zt,Vt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Zt,Vt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Et,"initial",Zt,Vt]}],ease:[{ease:["linear","initial",b,Zt,Vt]}],delay:[{delay:[Et,Zt,Vt]}],animate:[{animate:["none",w,Zt,Vt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,Zt,Vt]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:E()}],"rotate-x":[{"rotate-x":E()}],"rotate-y":[{"rotate-y":E()}],"rotate-z":[{"rotate-z":E()}],scale:[{scale:T()}],"scale-x":[{"scale-x":T()}],"scale-y":[{"scale-y":T()}],"scale-z":[{"scale-z":T()}],"scale-3d":["scale-3d"],skew:[{skew:F()}],"skew-x":[{"skew-x":F()}],"skew-y":[{"skew-y":F()}],transform:[{transform:[Zt,Vt,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Zt,Vt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Zt,Vt]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[Et,er,Rt,Ut]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function gr(...e){return fr(function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=tt(e))&&(n&&(n+=" "),n+=t);return n}(e))}const br=({startDate:e,endDate:t,onStartDateChange:r,onEndDateChange:n,startLabel:o="Start date",endLabel:u="End date",className:m})=>c("div",{className:gr("flex flex-col gap-2",m),children:d("div",{className:"flex flex-row gap-2 items-center",children:[d(i,{children:[c(s,{asChild:!0,children:d("button",{type:"button",className:gr(Ke,"justify-start text-left w-[240px]",!e&&Ze),children:[c(V,{className:gr("mr-2",et)}),e?Xe(e,"PPP"):o]})}),c(l,{className:"w-fit p-0",align:"start",children:c(a,{mode:"single",selected:e,onSelect:r,initialFocus:!0})})]}),d(i,{children:[c(s,{asChild:!0,children:d("button",{type:"button",className:gr(Ke,"justify-start text-left w-[240px]",!t&&Ze),children:[c(V,{className:gr("mr-2",et)}),t?Xe(t,"PPP"):u]})}),c(l,{className:"w-fit p-0",align:"start",children:c(a,{mode:"single",selected:t,onSelect:n,initialFocus:!0})})]})]})}),wr=({value:e,onChange:t,fetcher:r,className:n})=>c(m,{fetcher:r,modelClass:"User",className:gr("max-w-36 h-10",n),placeholder:"Creator user",emptyMessage:"No user found",labelName:"username",value:e,onChange:t}),yr=()=>{const[e,t]=r(),[n,o]=r(),[a,i]=r(null),s=[{pk:1,description:"Maintenance Task A",created_at:"2023-10-01",status:"Open",user_id:1,username:"admin"},{pk:2,description:"Inspection B",created_at:"2023-10-05",status:"Closed",user_id:2,username:"jdoe"},{pk:3,description:"Repair C",created_at:"2023-10-10",status:"In Progress",user_id:1,username:"admin"},{pk:4,description:"Log Analysis",created_at:"2023-10-15",status:"Open",user_id:3,username:"guest"},{pk:5,description:"System Update",created_at:"2023-11-01",status:"Pending",user_id:2,username:"jdoe"}],l=s.filter(t=>{let r=!0;const o=new Date(t.created_at);return e&&o<e&&(r=!1),n&&o>n&&(r=!1),a&&t.user_id!==Number(a)&&(r=!1),r});return d("div",{className:"flex flex-col gap-6 p-4 border rounded-lg bg-white",children:[c("h2",{className:"text-xl font-bold",children:"Combined Filter & Table Demo"}),d("div",{className:"flex flex-wrap gap-4 items-end",children:[c(br,{startDate:e,endDate:n,onStartDateChange:t,onEndDateChange:o}),c(wr,{fetcher:async({search:e,modelClass:t,limit:r,offset:n})=>{await new Promise(e=>setTimeout(e,300));const o=[{pk:1,username:"admin"},{pk:2,username:"jdoe"},{pk:3,username:"guest"}];return e?o.filter(t=>t.username.toLowerCase().includes(e.toLowerCase())):o},value:a,onChange:e=>i(e)}),c(f,{variant:"outline",className:"h-full",onClick:()=>{t(void 0),o(void 0),i(null)},children:"Clear Filters"})]}),c("div",{className:"border rounded-md overflow-hidden",children:d(h.Root,{children:[c(h.Header,{children:d(h.Row,{children:[c(h.Head,{children:"ID"}),c(h.Head,{children:"Description"}),c(h.Head,{children:"Created At"}),c(h.Head,{children:"Created By"}),c(h.Head,{children:"Status"})]})}),c(h.Body,{children:l.length>0?l.map(e=>d(h.Row,{children:[c(h.Cell,{children:e.pk}),c(h.Cell,{children:e.description}),c(h.Cell,{children:Xe(new Date(e.created_at),"PPP")}),c(h.Cell,{children:e.username}),c(h.Cell,{children:e.status})]},e.pk)):c(h.Row,{children:c(h.Cell,{colSpan:5,children:c(p,{title:"No results found",description:"No data was found for the selected filters."})})})})]})}),d("div",{className:"text-xs text-gray-400",children:["Showing ",l.length," of ",s.length," records."]})]})};function xr({data:e}){return c(g,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(e).map(([e,t])=>c(g,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:d("span",{className:"font-medium text-foreground",children:[e," : ",String(t)]})},e))})}const vr=({href:e,className:t,children:r})=>c("a",{href:e,className:t,children:r});function kr({onLogin:e,onSuccess:t,onError:n,sessionExpired:o=!1,sessionExpiredAlert:a,forgotPasswordHref:i="/",forgotPasswordLabel:s="Esqueci a senha",usernameLabel:l="Usuario",passwordLabel:u="Senha",submitLabel:m="Entrar",loginErrorMessage:h="Login error!",LinkComponent:p=vr,className:b}){const[M,S]=r(""),[z,j]=r(""),[P,_]=r(!1);return d(g,{gap:4,children:[o&&a?.icon&&c(w,{variant:"destructive",icon:a.icon,title:a.title??"Sessão expirada",description:a.description??"Faça login novamente para continuar"}),d(y,{className:b??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[c(x,{className:"items-center"}),c(v,{children:c("form",{onSubmit:e=>e.preventDefault(),children:d("div",{className:"grid w-full items-center gap-4 mt-6",children:[d(g,{gap:4,children:[c(C,{className:"text-primary",htmlFor:"username",children:l}),c(N,{id:"username",type:"text",placeholder:"Seu nome de usuário",value:M,onChange:e=>S(e.target.value)})]}),d(g,{gap:4,children:[c(C,{className:"text-primary",htmlFor:"password",children:u}),c(N,{id:"password",type:"password",placeholder:"Sua senha de acesso",value:z,onChange:e=>j(e.target.value)})]})]})})}),c(k,{className:"justify-center items-center",children:d(g,{gap:4,className:"justify-center items-center mt-10",children:[c(f,{className:"w-full",onClick:async()=>{_(!0);try{const{error:r}=await e({username:M,password:z});if(r)return void n?.(h,String(r));t?.()}finally{_(!1)}},disabled:P,children:m}),c(p,{href:i,className:"text-primary text-xs",children:s})]})})]})]})}const Nr=({href:e,className:t,children:r})=>c("a",{href:e,className:t,children:r});function Cr({onLoginSSO:e,onRedirect:t,onError:n,sessionExpired:o=!1,sessionExpiredAlert:a,forgotPasswordHref:i="/",forgotPasswordLabel:s="Esqueci a senha",emailLabel:l="Email",submitLabel:u="Entrar com SSO",unauthorizedMessage:m="Usuario nao autorizado",genericErrorMessage:h="Erro ao fazer login",LinkComponent:p=Nr,className:b}){const[M,S]=r(""),[z,j]=r(!1);return d(g,{gap:4,children:[o&&a?.icon&&c(w,{variant:"destructive",icon:a.icon,title:a.title??"Sessão expirada",description:a.description??"Faça login novamente para continuar"}),d(y,{className:b??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[c(x,{className:"items-center mt-4"}),c(v,{children:c("form",{onSubmit:async r=>{r.preventDefault(),j(!0);try{const{redirect_url:r,error:o}=await e(M);if(r)return void t?.(r);const a=o?.includes("401")?m:h;n?.(a,String(o))}finally{j(!1)}},children:d("div",{className:"grid w-full items-center gap-4 mt-6",children:[d(g,{gap:4,children:[c(C,{className:"text-primary",htmlFor:"email",children:l}),c(N,{id:"email",type:"email",placeholder:"Seu email de acesso",value:M,onChange:e=>S(e.target.value),pattern:"^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$",required:!0})]}),c(f,{className:"w-full",type:"submit",disabled:z,children:u})]})})}),c(k,{className:"flex-col justify-center items-center",children:c(g,{gap:4,className:"justify-start items-center mb-7",children:c(p,{href:i,className:"text-primary text-xs",children:s})})})]})]})}const Mr=({href:e,className:t,children:r})=>c("a",{href:e,className:t,children:r});function Sr({redirectHref:e,redirectDelayMs:t=3e3,onRedirect:r,title:o="Autenticado com sucesso! Redirecionado automaticamente",fallbackLinkLabel:a="Caso nao seja redirecionado automaticamente, clique aqui",LinkComponent:i=Mr,className:s}){return n(()=>{const n=setTimeout(()=>{r?.(e)},t);return()=>clearTimeout(n)},[e,t,r]),c("div",{className:"flex justify-center items-center h-screen",children:d(y,{className:s??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[c(x,{className:"items-center mt-4"}),d(v,{className:"flex flex-col gap-4",children:[c(M,{}),c("h4",{className:"text-center",children:o}),c(i,{href:e,className:"w-full text-sm underline text-accent text-center",children:a})]})]})})}const zr=({href:e,className:t,children:r})=>c("a",{href:e,className:t,children:r});function jr({error:e,loginHref:t,title:n="Erro ao autenticar!",description:o="Verifique suas informações de SSO ou converse com o administrador do sistema.",fallbackLinkLabel:a="Caso não seja redirecionado automaticamente, clique aqui",errorDetailsLabel:i="Detalhes para os Nerds",copyLabel:s="Copiar",copiedLabel:l="Copiado!",LinkComponent:m=zr,className:h}){const[p,f]=r(!1),b="string"==typeof e?e:JSON.stringify(e,null,2);return c(g,{className:"justify-center items-center h-screen",children:d(y,{className:h??"w-[400px] h-[457px] rounded-[30px] shadow-lg bg-red-50",children:[c(x,{className:"items-center"}),d(v,{className:"flex flex-col items-center gap-2",children:[c(U,{size:48,className:"text-red-700"}),c("h4",{className:"text-center",children:n}),c("p",{className:"text-sm text-center",children:o}),c(m,{href:t,className:"w-full text-sm underline text-accent text-center",children:a}),c(S,{type:"single",collapsible:!0,className:"w-full",children:d(z,{value:"error-details",children:[c(j,{children:i}),d(P,{className:"max-w-80",children:[c("div",{className:"flex justify-end mb-1",children:c("button",{type:"button",onClick:async()=>{if(e)try{await navigator.clipboard.writeText("string"==typeof e?e:JSON.stringify(e,null,2)),f(!0),setTimeout(()=>f(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},className:"text-xs text-accent hover:underline flex items-center gap-1",children:d(u,p?{children:[c(R,{size:14,className:"text-green-600"})," ",l]}:{children:[c(X,{size:14})," ",s]})})}),c("div",{className:"max-h-24 overflow-y-auto overflow-x-hidden",children:c("pre",{className:"bg-gray-100 p-4 rounded-md",children:c("code",{className:"text-sm text-red-600 dark:text-red-400 whitespace-pre-wrap break-words",children:b})})})]})]})})]})]})})}const Pr={created_at:"Criado em",start_processing_at:"Início do Processamento",finished_processing_at:"Fim do Processamento",field_delimiter:"Delimitador de Campo",decimal_delimiter:"Delimitador Decimal",ignore_locked:"Ignorar Bloqueados",lock_data:"Bloquear Dados",origin:"Origem",format_type:"Tipo de Formato",process_status:"Status",description:"Descrição",row_permission:"Row Permission",created_by:"Created By",modeling_unit:"Modeling Unit",attribute:"Attribute",geoarea:"Geoarea"},_r=e=>{if(!e)return"";return new Date(e).toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})},Dr=(e,t)=>({...Pr,...t}[e]||e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")),Lr=(e,t,r={})=>{if(null==e||""===e)return"N/A";if("process_status"===t&&r.statusLabels)return r.statusLabels[String(e)]??String(e);if(t.endsWith("_at")||t.includes("date")||t.includes("_time")){return(r.formatDate??_r)(String(e))||"N/A"}if("boolean"==typeof e){const t=r.booleanLabels??{true:"Sim",false:"Não"};return e?t.true:t.false}return"object"==typeof e?"N/A":String(e)},Wr=(e,t)=>{const r=e[t];return r&&"object"==typeof r&&null!==r&&"__display_field__"in r?r.__display_field__:r},Or=["description","notes"],qr=[{title:"Informações Gerais",fields:["description","row_permission","origin","created_by","process_status","msg"],cols:4},{title:"Datas de Processamento",fields:["created_at","start_processing_at","finished_processing_at"],cols:3},{title:"Proteção dos Dados",fields:["ignore_locked","lock_data"],cols:4},{title:"Carregamento Manual",fields:["format_type","field_delimiter","decimal_delimiter","modeling_unit","attribute","geoarea"],cols:4}];function Er({data:e,config:t,formatters:r,wrapperElements:n,statusLabels:o,formatDate:a}){const i=t?.sections||qr,s={statusLabels:o,formatDate:a},l=o=>{if(!(o in e))return null;const a=t?.labels?.[o]||Dr(o,t?.labels),i=(r||[]).find(e=>e.key===o)?.formatter||t?.formatters?.[o],l=Wr(e,o),u=i?i(l):Lr(l,o,s),m=Or.includes(o),h=n?.find(e=>e.keys.includes(o));if(h?.element){const t=h.element({key:o,label:a,fieldValue:l,isFullWidth:m,data:e});return c(g,{direction:"col",className:m?"col-span-full min-w-0":"min-w-0",children:t},o)}return d(g,{direction:"col",className:m?"col-span-full min-w-0":"min-w-0",children:[c("p",{className:"text-sm font-medium text-muted-foreground",children:a}),c("p",{className:"text-base break-words whitespace-pre-wrap",children:u})]},o)},u=e.results;return d(g,{direction:"col",gap:6,children:[i.map(t=>{const r=t.fields.filter(t=>t in e);return 0===r.length?null:t.isFullWidth?d(g,{direction:"col",gap:3,children:[c("h3",{className:"text-sm font-semibold text-foreground",children:t.title}),c("div",{className:"grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-1 xl:grid-cols-1 gap-x-6 gap-y-4",children:r.map(e=>l(e))})]},t.title):d(g,{direction:"col",gap:3,children:[c("h3",{className:"text-sm font-semibold text-foreground",children:t.title}),c("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-x-6 gap-y-4",children:r.map(e=>l(e))})]},t.title)}),Boolean(e.dimensions&&"object"==typeof e.dimensions&&Object.keys(e.dimensions).length>0)&&d(g,{direction:"col",gap:3,children:[c("h3",{className:"text-sm font-semibold text-foreground",children:"Tags"}),c(xr,{data:e.dimensions})]}),Boolean(e.extra_info&&"object"==typeof e.extra_info&&Object.keys(e.extra_info).length>0)&&d(g,{direction:"col",gap:3,children:[c("h3",{className:"text-sm font-semibold text-foreground",children:"Informações Extras"}),c(xr,{data:e.extra_info})]}),u?.processing_results&&c(S,{type:"single",collapsible:!0,children:d(z,{value:"processing-results",className:"border-b-0",children:[c(j,{className:"text-sm font-semibold text-foreground hover:no-underline py-2",children:"Resultados do Processamento"}),c(P,{children:d(g,{direction:"col",gap:4,children:[c("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:[{label:"Adicionados",value:u.processing_results.count__added,color:"text-green-600"},{label:"Atualizados",value:u.processing_results.count__updated,color:"text-blue-600"},{label:"Sem Alteração",value:u.processing_results.count__no_change,color:"text-gray-600"}].map(e=>d(g,{direction:"col",children:[c("p",{className:"text-sm font-medium text-muted-foreground",children:e.label}),c("p",{className:`text-2xl font-bold ${e.color}`,children:e.value})]},e.label))}),u.processing_results.details&&u.processing_results.details.length>0&&d(g,{direction:"col",gap:2,children:[c("p",{className:"text-sm font-medium text-muted-foreground",children:"Detalhes"}),c(g,{direction:"col",gap:2,children:u.processing_results.details.map((e,r)=>{const n=`detail-${r}-${Object.values(e).join("-")}`;return c(g,{className:"border rounded-lg p-3",children:c(g,{className:"grid grid-cols-4 gap-2",children:Object.entries(e).map(([e,r])=>d(g,{direction:"col",children:[c("p",{className:"text-xs text-muted-foreground",children:Dr(e,t?.labels)}),c("p",{className:"text-sm font-medium",children:Lr(r,e,s)})]},e))})},n)})})]})]})})]})})]})}function Tr({title:e,titleAddon:t,isLoading:r=!1,error:n=null,onBack:o,actions:a,sections:i=[],children:s,loadingComponent:l,errorComponent:u,backButtonLabel:m="Voltar"}){return r?l??c(g,{className:"justify-center items-center p-8",children:c(M,{})}):n?u??c(g,{className:"justify-center items-center p-8",children:c("p",{className:"text-destructive",children:n.message})}):d(g,{direction:"col",gap:4,children:[d(g,{direction:"row",gap:4,className:"justify-between items-center",children:[d(g,{direction:"row",gap:4,className:"items-center",children:[o&&c(f,{variant:"ghost",size:"icon",onClick:o,title:m,children:c(Q,{className:"size-4"})}),c("h1",{className:"text-2xl font-semibold text-surface-secondary",children:e}),t]}),a&&c(g,{direction:"row",gap:2,children:a})]}),i.map((e,t)=>{const r=e.id??`section-${t}`;return c(S,{type:"single",collapsible:!0,defaultValue:e.defaultOpen?r:void 0,className:"w-full",children:d(z,{value:r,className:"border-b",children:[c(j,{className:"hover:no-underline text-base font-normal text-surface-secondary",children:e.title}),c(P,{className:"pt-4",children:e.content})]})},r)}),s]})}const Fr={description:"Descrição",code:"Código",notes:"Notas",force_temperature:"Temperatura Forçada",dimensions:"Tags",extra_info:"Informações extras"},Hr=(e,t)=>t?.[e]?t[e]:Fr[e]?Fr[e]:e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");function Ar({value:e={},onChange:t,name:n,placeholderKey:o="Chave",placeholderValue:a="Valor",disabled:i=!1}){const[s,l]=r({key:"",value:""});return d(g,{direction:"col",gap:2,children:[d("div",{className:"flex gap-2",children:[c(N,{type:"text",name:`${n}_key`,placeholder:o,value:s.key,disabled:i,onChange:e=>l(t=>({...t,key:e.target.value})),className:"flex-1"}),c(N,{type:"text",name:`${n}_value`,placeholder:a,value:s.value,disabled:i,onChange:e=>l(t=>({...t,value:e.target.value})),className:"flex-1"}),c(f,{type:"button",variant:"default",className:"px-4 py-2 shrink-0",id:`${n}_add`,onClick:()=>{const e=s.key.trim(),r=s.value.trim();e&&(t(t=>({...t&&"object"==typeof t?t:{},[e]:r})),l({key:"",value:""}))},disabled:i||!s.key.trim(),children:"Adicionar"})]}),Object.entries(e).length>0&&c(g,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(e).map(([e,r])=>d(g,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:[d("span",{className:"font-medium text-foreground",children:[e," : ",String(r)]}),!i&&c("button",{type:"button",onClick:()=>{return r=e,void t(e=>{const t={...e&&"object"==typeof e?e:{}};return delete t[r],t});var r},className:"rounded-full p-0 hover:bg-muted-foreground/20 hover:text-destructive hover:backgro transition-colors",children:"×"})]},e))})]})}function Gr({fields:e,values:t,defaultValue:o={},onChange:a,errors:i={},config:s,customFields:l}){const[m,h]=r(o),p=t??m,f=(e,t)=>{a?a(r=>{const n=r&&"object"==typeof r?r:p,o=n[e],a="function"==typeof t?t(o):t;return{...n,[e]:a}}):h(r=>{const n=r[e],o="function"==typeof t?t(n):t;return{...r,[e]:o}})};n(()=>{Object.keys(o).length>0&&0===Object.keys(p).length&&h(o)},[o,p]);const b=Object.keys(e).filter(e=>!s?.exclude?.includes(e)),w=(e,t)=>{const r=p[e]??"",n=i[e],o=t.disabled;if(l?.[e])return l[e]({value:r,onChange:t=>f(e,t),error:n,disabled:o,fieldKey:e});switch(t.type){case"textarea":return c(L,{id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>f(e,t.target.value),required:t.required,disabled:o,className:gr("min-h-[120px] w-full",n&&"border-destructive")});case"checkbox":return d("div",{className:"flex items-center gap-2 py-2",children:[c(_,{id:e,name:e,checked:!!r,onCheckedChange:t=>f(e,!!t),disabled:o}),c("label",{htmlFor:e,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:Hr(e,s?.labels)})]});case"select":return c(D,{id:e,name:e,placeholder:t.placeholder||"Selecione...",options:t.options??[],value:null!=r?String(r):"",onValueChange:t=>f(e,t),required:t.required});case"key-value":return d(u,{children:[c(Ar,{value:r||{},name:e,onChange:t=>f(e,t),placeholderKey:"Chave",placeholderValue:"Valor",disabled:o}),c("input",{type:"hidden",name:e,value:JSON.stringify(r||{})})]});case"number":return c(N,{type:"number",id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>{const r=""===t.target.value?"":Number(t.target.value);f(e,r)},required:t.required,disabled:o,className:gr("w-full",n&&"border-destructive")});case"date":return c(N,{type:"date",id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>f(e,t.target.value),required:t.required,disabled:o,className:gr("w-full",n&&"border-destructive")});default:return c(N,{type:t.type,id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>f(e,t.target.value),required:t.required,disabled:o,className:gr("w-full",n&&"border-destructive")})}};return c(g,{direction:"col",gap:6,className:"w-full",children:(s?.sections||[{title:"Dados do Formulário",fields:b,cols:1}]).map(t=>{const r=t.fields.filter(t=>t in e&&!s?.exclude?.includes(t));if(0===r.length)return null;const n=1===t.cols?"grid-cols-1":2===t.cols?"grid-cols-1 sm:grid-cols-2":3===t.cols?"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";return d(g,{direction:"col",gap:3,className:"w-full",children:[c("h3",{className:"text-sm font-semibold text-foreground",children:t.title}),c("div",{className:gr("grid gap-x-6 gap-y-4 w-full",n),children:r.map(r=>{const n=e[r],o=t.isFullWidth||"textarea"===n.type||"key-value"===n.type||4===n.cols,a=i[r],l="checkbox"!==n.type;return d(g,{direction:"col",gap:1.5,className:gr(o?"col-span-full":"",n.className),children:[l&&d("label",{htmlFor:r,className:"text-fontcolor-secondary font-bold text-sm",children:[Hr(r,s?.labels),n.required&&c("span",{className:"text-destructive ml-0.5",children:"*"})]}),w(r,n),a&&c("span",{className:"text-xs text-destructive font-medium mt-0.5",children:a})]},r)})})]},t.title)})})}function Ir({label:e,steps:t=[]}){return c(W,{className:"mb-6",children:d(O,{children:[c(q,{children:c(E,{className:"text-primary font-medium",children:e})}),t.map(e=>d(o,{children:[c(T,{}),c(q,{children:c(E,{className:"text-muted-foreground",children:e})})]},`step-fragment-${e}`))]})})}const Yr=(e,t)=>{const r=document.createElement("a");r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)},$r=({fileUrl:e,fileName:t,isLoading:r=!1,getFileType:n,ImageComponent:o})=>{if(r)return c(g,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:c(b,{})});if(!e||!t)return d(g,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:[c(ee,{className:"w-16 h-16 text-muted-foreground"}),c("p",{className:"text-sm text-muted-foreground mt-4",children:"No file available"})]});const a=n(t);return c(g,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] h-full overflow-hidden relative",children:(()=>{switch(a){case"image":return c(g,{direction:"col",className:"w-full h-full items-center justify-center relative",children:o?c(o,{src:e,alt:t,fill:!0,className:"object-contain"}):c("img",{src:e,alt:t,className:"max-w-full max-h-full object-contain"})});case"video":return c(g,{direction:"col",className:"w-full h-full items-center justify-center relative",children:d("video",{src:e,controls:!0,className:"w-full h-full object-contain",children:[c("track",{kind:"captions"}),"Your browser does not support the video tag."]})});case"pdf":return c(g,{direction:"col",className:"w-full h-full items-center justify-center relative",children:c("iframe",{src:e,className:"w-full h-full border-0",title:t})});case"doc":case"excel":case"ppt":return d(g,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[c(K,{className:"w-20 h-20 text-muted-foreground"}),d(g,{direction:"col",gap:1,className:"text-center",children:[c("p",{className:"text-sm font-medium text-foreground",children:t}),d("p",{className:"text-xs text-muted-foreground uppercase",children:[a," Document"]})]}),d(f,{variant:"outline",size:"default",className:"mt-4",onClick:()=>Yr(e,t),children:[c(J,{className:"w-4 h-4 mr-2"}),"Download"]})]});default:return d(g,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[c(Z,{className:"w-16 h-16 text-muted-foreground"}),c("p",{className:"text-sm text-muted-foreground",children:t}),d(f,{variant:"outline",size:"sm",onClick:()=>Yr(e,t),children:[c(J,{className:"w-4 h-4 mr-2"}),"Download"]})]})}})()})};function Br({links:e,iconMap:t,pathname:r,isSidebarCollapsedFromQuery:o=!1,logo:a,onLogout:i,logoutIcon:s=te,logoutLabel:l="Logout",LinkComponent:u,ImageComponent:m}){const h=r.split("/")[2]??"",{isCollapsed:p,isCollapsing:f,expandedItems:b,setExpandedItems:w,toggleCollapse:y,toggleExpanded:x,handleTransitionEnd:v,setExpandedOnCollapse:k}=H({initialCollapsed:o,onPersist:e=>{const t=new URLSearchParams;t.set("sidebar-collapsed",String(e)),window.history.replaceState({},"",`${window.location.pathname}?${t}`)}});n(()=>{if(!o){const t={};e.forEach(e=>{if(e.subItems){e.subItems.some(e=>r===e.href)&&(t[e.title]=!0)}}),w(t)}},[o,e,r,w]);return d(F.Root,{isCollapsed:p,isCollapsing:f,onToggleCollapse:()=>{p||k(),y()},onTransitionEnd:v,className:"h-full",children:[d(g,{className:"w-full shrink-0 items-center gap-1 mb-2",children:[c(F.Toggle,{}),c(F.Logo,{src:a.src,width:a.width,height:a.height,collapsedWidth:a.collapsedWidth,collapsedHeight:a.collapsedHeight,alt:a.alt,ImageComponent:m})]}),c(F.Content,{className:"mt-6",children:e.map(e=>{const n=t[e.icon];if(!!e.subItems?.length){const t=e.subItems?.some(e=>r===e.href||h===e.href.split("/")[2]);return c(F.NavGroup,{icon:n,title:e.title,isExpanded:!!b[e.title],isActive:!!t,onToggle:()=>x(e.title),children:e.subItems?.map(e=>{const t=r===e.href;return c(F.NavSubLink,{title:e.title,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:t,LinkComponent:u},e.href)})},e.title)}const o=e.href?.split("/")[2]??"";return c(F.Link,{icon:n,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:h===o,LinkComponent:u,children:e.title},e.href)})}),c(F.Footer,{children:c(F.Action,{icon:s,label:l,onClick:async()=>{await i()}})})]})}export{Sr as AuthenticatedView,Er as AutoDetailContent,Gr as AutoFormContent,yr as CombinedFilterTable,wr as CreatedByUserFilter,Ir as CustomBreadcrumb,br as DateRangeFilter,Tr as DetailPage,Or as FULL_WIDTH_DETAIL_FIELDS,$r as FilePreview,xr as KeyValueContent,kr as LoginCard,Cr as LoginCardSSO,Br as NavigationSidebar,jr as NotAuthenticatedView,Dr as formatDetailLabel,Lr as formatDetailValue,Wr as getDetailFieldValue};
|
|
26
|
+
*/function oe(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&ne in e?e[ne](t):e instanceof Date?new e.constructor(t):new Date(t)}function ae(e,t){return oe(t||e,e)}let ie={};function se(){return ie}function le(e,t){const r=se(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=ae(e,t?.in),a=o.getDay(),i=(a<n?7:0)+a-n;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ce(e,t){return le(e,{...t,weekStartsOn:1})}function de(e,t){const r=ae(e,t?.in),n=r.getFullYear(),o=oe(r,0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);const a=ce(o),i=oe(r,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const s=ce(i);return r.getTime()>=a.getTime()?n+1:r.getTime()>=s.getTime()?n:n-1}function ue(e){const t=ae(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function me(e,t){const r=ae(e,t?.in);return r.setHours(0,0,0,0),r}function he(e,t,r){const[n,o]=function(e,...t){const r=oe.bind(null,t.find(e=>"object"==typeof e));return t.map(r)}(0,e,t),a=me(n),i=me(o),s=+a-ue(a),l=+i-ue(i);return Math.round((s-l)/864e5)}function pe(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+ae(e)));var t}const fe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ge(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const be={date:ge({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ge({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ge({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},we={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ye(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=r?.width?String(r.width):t;n=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=r?.width?String(r.width):e.defaultWidth;n=e.values[o]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function xe(e){return(t,r={})=>{const n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(s,e=>e.test(i)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(s,e=>e.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(i.length)}}}var ve;const ke={code:"en-US",formatDistance:(e,t,r)=>{let n;const o=fe[e];return n="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:be,formatRelative:(e,t,r,n)=>we[e],localize:{ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:ye({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ye({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ye({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ye({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ye({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ve={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(ve.matchPattern);if(!r)return null;const n=r[0],o=e.match(ve.parsePattern);if(!o)return null;let a=ve.valueCallback?ve.valueCallback(o[0]):o[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(n.length)}}),era:xe({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:xe({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:xe({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:xe({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:xe({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ne(e,t){const r=ae(e,t?.in),n=he(r,function(e,t){const r=ae(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}(r));return n+1}function Ce(e,t){const r=ae(e,t?.in),n=+ce(r)-+function(e,t){const r=de(e,t),n=oe(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),ce(n)}(r);return Math.round(n/re)+1}function Me(e,t){const r=ae(e,t?.in),n=r.getFullYear(),o=se(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=oe(t?.in||e,0);i.setFullYear(n+1,0,a),i.setHours(0,0,0,0);const s=le(i,t),l=oe(t?.in||e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);const c=le(l,t);return+r>=+s?n+1:+r>=+c?n:n-1}function Se(e,t){const r=ae(e,t?.in),n=+le(r,t)-+function(e,t){const r=se(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=Me(e,t),a=oe(t?.in||e,0);return a.setFullYear(o,0,n),a.setHours(0,0,0,0),le(a,t)}(r,t);return Math.round(n/re)+1}function ze(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const je={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return ze("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):ze(r+1,2)},d:(e,t)=>ze(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>ze(e.getHours()%12||12,t.length),H:(e,t)=>ze(e.getHours(),t.length),m:(e,t)=>ze(e.getMinutes(),t.length),s:(e,t)=>ze(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return ze(Math.trunc(n*Math.pow(10,r-3)),t.length)}},Pe="midnight",_e="noon",De="morning",Le="afternoon",We="evening",Oe="night",qe={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return je.y(e,t)},Y:function(e,t,r,n){const o=Me(e,n),a=o>0?o:1-o;if("YY"===t){return ze(a%100,2)}return"Yo"===t?r.ordinalNumber(a,{unit:"year"}):ze(a,t.length)},R:function(e,t){return ze(de(e),t.length)},u:function(e,t){return ze(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return ze(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return ze(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return je.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return ze(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const o=Se(e,n);return"wo"===t?r.ordinalNumber(o,{unit:"week"}):ze(o,t.length)},I:function(e,t,r){const n=Ce(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):ze(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):je.d(e,t)},D:function(e,t,r){const n=Ne(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):ze(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ze(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ze(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),o=0===n?7:n;switch(t){case"i":return String(o);case"ii":return ze(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let o;switch(o=12===n?_e:0===n?Pe:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let o;switch(o=n>=17?We:n>=12?Le:n>=4?De:Oe,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return je.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):je.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):ze(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):ze(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):je.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):je.s(e,t)},S:function(e,t){return je.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return Te(n);case"XXXX":case"XX":return Fe(n);default:return Fe(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Te(n);case"xxxx":case"xx":return Fe(n);default:return Fe(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ee(n,":");default:return"GMT"+Fe(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ee(n,":");default:return"GMT"+Fe(n,":")}},t:function(e,t,r){return ze(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return ze(+e,t.length)}};function Ee(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),a=n%60;return 0===a?r+String(o):r+String(o)+t+ze(a,2)}function Te(e,t){if(e%60==0){return(e>0?"-":"+")+ze(Math.abs(e)/60,2)}return Fe(e,t)}function Fe(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+ze(Math.trunc(n/60),2)+t+ze(n%60,2)}const He=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Ae=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Ge={p:Ae,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return He(e,t);let a;switch(n){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",He(n,t)).replace("{{time}}",Ae(o,t))}},Ie=/^D+$/,Ye=/^Y+$/,$e=["D","DD","YY","YYYY"];const Be=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ve=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qe=/^'([^]*?)'?$/,Re=/''/g,Ue=/[a-zA-Z]/;function Xe(e,t,r){const n=se(),o=n.locale??ke,a=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=ae(e,r?.in);if(!pe(s))throw new RangeError("Invalid time value");let l=t.match(Ve).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Ge[t])(e,o.formatLong)}return e}).join("").match(Be).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:Je(e)};if(qe[t])return{isToken:!0,value:e};if(t.match(Ue))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(r=>{if(!r.isToken)return r.value;const n=r.value;(function(e){return Ye.test(e)}(n)||function(e){return Ie.test(e)}(n))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),$e.includes(e))throw new RangeError(n)}(n,t,String(e));return(0,qe[n[0]])(s,n,o.localize,c)}).join("")}function Je(e){const t=e.match(Qe);return t?t[1].replace(Re,"'"):e}const Ke="flex h-10 w-full items-center rounded-md border border-input bg-background px-3 text-sm font-normal shadow-none hover:bg-[hsl(var(--hover-ring))] hover:border-[hsl(var(--focus-ring))] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",Ze="text-muted-foreground",et="size-4 shrink-0 text-muted-foreground opacity-50";function tt(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=tt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}const rt=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),nt="-",ot=[],at=e=>{const t=lt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return st(e);const r=e.split(nt),n=""===r[0]&&r.length>1?1:0;return it(r,n,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=n[e],o=r[e];return t?o?((e,t)=>{const r=new Array(e.length+t.length);for(let t=0;t<e.length;t++)r[t]=e[t];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r})(o,t):t:o||ot}return r[e]||ot}}},it=(e,t,r)=>{if(0===e.length-t)return r.classGroupId;const n=e[t],o=r.nextPart.get(n);if(o){const r=it(e,t+1,o);if(r)return r}const a=r.validators;if(null===a)return;const i=0===t?e.join(nt):e.slice(t).join(nt),s=a.length;for(let e=0;e<s;e++){const t=a[e];if(t.validator(i))return t.classGroupId}},st=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?"arbitrary.."+n:void 0})(),lt=e=>{const{theme:t,classGroups:r}=e;return ct(r,t)},ct=(e,t)=>{const r=rt();for(const n in e){const o=e[n];dt(o,r,n,t)}return r},dt=(e,t,r,n)=>{const o=e.length;for(let a=0;a<o;a++){const o=e[a];ut(o,t,r,n)}},ut=(e,t,r,n)=>{"string"!=typeof e?"function"!=typeof e?pt(e,t,r,n):ht(e,t,r,n):mt(e,t,r)},mt=(e,t,r)=>{(""===e?t:ft(t,e)).classGroupId=r},ht=(e,t,r,n)=>{gt(e)?dt(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(r,e)))},pt=(e,t,r,n)=>{const o=Object.entries(e),a=o.length;for(let e=0;e<a;e++){const[a,i]=o[e];dt(i,ft(t,a),r,n)}},ft=(e,t)=>{let r=e;const n=t.split(nt),o=n.length;for(let e=0;e<o;e++){const t=n[e];let o=r.nextPart.get(t);o||(o=rt(),r.nextPart.set(t,o)),r=o}return r},gt=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,bt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(o(e,t),t):void 0},set(e,t){e in r?r[e]=t:o(e,t)}}},wt=[],yt=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),xt=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,o=0,a=0;const i=e.length;for(let s=0;s<i;s++){const i=e[s];if(0===n&&0===o){if(":"===i){t.push(e.slice(a,s)),a=s+1;continue}if("/"===i){r=s;continue}}"["===i?n++:"]"===i?n--:"("===i?o++:")"===i&&o--}const s=0===t.length?e:e.slice(a);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return yt(t,c,l,r&&r>a?r-a:void 0)};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):yt(wt,!1,t,void 0,!0)}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},vt=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,r)=>{t.set(e,1e6+r)}),e=>{const r=[];let n=[];for(let o=0;o<e.length;o++){const a=e[o],i="["===a[0],s=t.has(a);i||s?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(a)):n.push(a)}return n.length>0&&(n.sort(),r.push(...n)),r}},kt=/\s+/,Nt=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Nt(e[n]))&&(r&&(r+=" "),r+=t);return r},Ct=(e,...t)=>{let r,n,o,a;const i=e=>{const t=n(e);if(t)return t;const a=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(kt);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:h}=r(t);if(c){l=t+(l.length>0?" "+l:l);continue}let p=!!h,f=n(p?m.substring(0,h):m);if(!f){if(!p){l=t+(l.length>0?" "+l:l);continue}if(f=n(m),!f){l=t+(l.length>0?" "+l:l);continue}p=!1}const g=0===d.length?"":1===d.length?d[0]:a(d).join(":"),b=u?g+"!":g,w=b+f;if(i.indexOf(w)>-1)continue;i.push(w);const y=o(f,p);for(let e=0;e<y.length;++e){const t=y[e];i.push(b+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return o(e,a),a};return a=s=>{const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:bt(e.cacheSize),parseClassName:xt(e),sortModifiers:vt(e),...at(e)}))(l),n=r.cache.get,o=r.cache.set,a=i,i(s)},(...e)=>a(((...e)=>{let t,r,n=0,o="";for(;n<e.length;)(t=e[n++])&&(r=Nt(t))&&(o&&(o+=" "),o+=r);return o})(...e))},Mt=[],St=e=>{const t=t=>t[e]||Mt;return t.isThemeGetter=!0,t},zt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pt=/^\d+\/\d+$/,_t=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Lt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ot=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qt=e=>Pt.test(e),Et=e=>!!e&&!Number.isNaN(Number(e)),Tt=e=>!!e&&Number.isInteger(Number(e)),Ft=e=>e.endsWith("%")&&Et(e.slice(0,-1)),Ht=e=>_t.test(e),At=()=>!0,Gt=e=>Dt.test(e)&&!Lt.test(e),It=()=>!1,Yt=e=>Wt.test(e),$t=e=>Ot.test(e),Bt=e=>!Qt(e)&&!Zt(e),Vt=e=>ir(e,dr,It),Qt=e=>zt.test(e),Rt=e=>ir(e,ur,Gt),Ut=e=>ir(e,mr,Et),Xt=e=>ir(e,lr,It),Jt=e=>ir(e,cr,$t),Kt=e=>ir(e,pr,Yt),Zt=e=>jt.test(e),er=e=>sr(e,ur),tr=e=>sr(e,hr),rr=e=>sr(e,lr),nr=e=>sr(e,dr),or=e=>sr(e,cr),ar=e=>sr(e,pr,!0),ir=(e,t,r)=>{const n=zt.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},sr=(e,t,r=!1)=>{const n=jt.exec(e);return!!n&&(n[1]?t(n[1]):r)},lr=e=>"position"===e||"percentage"===e,cr=e=>"image"===e||"url"===e,dr=e=>"length"===e||"size"===e||"bg-size"===e,ur=e=>"length"===e,mr=e=>"number"===e,hr=e=>"family-name"===e,pr=e=>"shadow"===e,fr=Ct(()=>{const e=St("color"),t=St("font"),r=St("text"),n=St("font-weight"),o=St("tracking"),a=St("leading"),i=St("breakpoint"),s=St("container"),l=St("spacing"),c=St("radius"),d=St("shadow"),u=St("inset-shadow"),m=St("text-shadow"),h=St("drop-shadow"),p=St("blur"),f=St("perspective"),g=St("aspect"),b=St("ease"),w=St("animate"),y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Zt,Qt],x=()=>[Zt,Qt,l],v=()=>[qt,"full","auto",...x()],k=()=>[Tt,"none","subgrid",Zt,Qt],N=()=>["auto",{span:["full",Tt,Zt,Qt]},Tt,Zt,Qt],C=()=>[Tt,"auto",Zt,Qt],M=()=>["auto","min","max","fr",Zt,Qt],S=()=>["auto",...x()],z=()=>[qt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],j=()=>[e,Zt,Qt],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",rr,Xt,{position:[Zt,Qt]}],_=()=>["auto","cover","contain",nr,Vt,{size:[Zt,Qt]}],D=()=>[Ft,er,Rt],L=()=>["","none","full",c,Zt,Qt],W=()=>["",Et,er,Rt],O=()=>[Et,Ft,rr,Xt],q=()=>["","none",p,Zt,Qt],E=()=>["none",Et,Zt,Qt],T=()=>["none",Et,Zt,Qt],F=()=>[Et,Zt,Qt],H=()=>[qt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ht],breakpoint:[Ht],color:[At],container:[Ht],"drop-shadow":[Ht],ease:["in","out","in-out"],font:[Bt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ht],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ht],shadow:[Ht],spacing:["px",Et],text:[Ht],"text-shadow":[Ht],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qt,Qt,Zt,g]}],container:["container"],columns:[{columns:[Et,Qt,Zt,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:y()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:v()}],"inset-x":[{"inset-x":v()}],"inset-y":[{"inset-y":v()}],start:[{start:v()}],end:[{end:v()}],top:[{top:v()}],right:[{right:v()}],bottom:[{bottom:v()}],left:[{left:v()}],visibility:["visible","invisible","collapse"],z:[{z:[Tt,"auto",Zt,Qt]}],basis:[{basis:[qt,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Et,qt,"auto","initial","none",Qt]}],grow:[{grow:["",Et,Zt,Qt]}],shrink:[{shrink:["",Et,Zt,Qt]}],order:[{order:[Tt,"first","last","none",Zt,Qt]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":C()}],"col-end":[{"col-end":C()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":C()}],"row-end":[{"row-end":C()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[s,"screen",...z()]}],"min-w":[{"min-w":[s,"screen","none",...z()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,er,Rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Zt,Ut]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ft,Qt]}],"font-family":[{font:[tr,Qt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Zt,Qt]}],"line-clamp":[{"line-clamp":[Et,"none",Zt,Ut]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":["none",Zt,Qt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Zt,Qt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Et,"from-font","auto",Zt,Rt]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Et,"auto",Zt,Qt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Zt,Qt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Zt,Qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tt,Zt,Qt],radial:["",Zt,Qt],conic:[Tt,Zt,Qt]},or,Jt]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Et,Zt,Qt]}],"outline-w":[{outline:["",Et,er,Rt]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",d,ar,Kt]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",u,ar,Kt]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Et,Rt]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",m,ar,Kt]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Et,Zt,Qt]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Et]}],"mask-image-linear-from-pos":[{"mask-linear-from":O()}],"mask-image-linear-to-pos":[{"mask-linear-to":O()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":O()}],"mask-image-t-to-pos":[{"mask-t-to":O()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":O()}],"mask-image-r-to-pos":[{"mask-r-to":O()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":O()}],"mask-image-b-to-pos":[{"mask-b-to":O()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":O()}],"mask-image-l-to-pos":[{"mask-l-to":O()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":O()}],"mask-image-x-to-pos":[{"mask-x-to":O()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":O()}],"mask-image-y-to-pos":[{"mask-y-to":O()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[Zt,Qt]}],"mask-image-radial-from-pos":[{"mask-radial-from":O()}],"mask-image-radial-to-pos":[{"mask-radial-to":O()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Et]}],"mask-image-conic-from-pos":[{"mask-conic-from":O()}],"mask-image-conic-to-pos":[{"mask-conic-to":O()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Zt,Qt]}],filter:[{filter:["","none",Zt,Qt]}],blur:[{blur:q()}],brightness:[{brightness:[Et,Zt,Qt]}],contrast:[{contrast:[Et,Zt,Qt]}],"drop-shadow":[{"drop-shadow":["","none",h,ar,Kt]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",Et,Zt,Qt]}],"hue-rotate":[{"hue-rotate":[Et,Zt,Qt]}],invert:[{invert:["",Et,Zt,Qt]}],saturate:[{saturate:[Et,Zt,Qt]}],sepia:[{sepia:["",Et,Zt,Qt]}],"backdrop-filter":[{"backdrop-filter":["","none",Zt,Qt]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[Et,Zt,Qt]}],"backdrop-contrast":[{"backdrop-contrast":[Et,Zt,Qt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Et,Zt,Qt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Et,Zt,Qt]}],"backdrop-invert":[{"backdrop-invert":["",Et,Zt,Qt]}],"backdrop-opacity":[{"backdrop-opacity":[Et,Zt,Qt]}],"backdrop-saturate":[{"backdrop-saturate":[Et,Zt,Qt]}],"backdrop-sepia":[{"backdrop-sepia":["",Et,Zt,Qt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Zt,Qt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Et,"initial",Zt,Qt]}],ease:[{ease:["linear","initial",b,Zt,Qt]}],delay:[{delay:[Et,Zt,Qt]}],animate:[{animate:["none",w,Zt,Qt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,Zt,Qt]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:E()}],"rotate-x":[{"rotate-x":E()}],"rotate-y":[{"rotate-y":E()}],"rotate-z":[{"rotate-z":E()}],scale:[{scale:T()}],"scale-x":[{"scale-x":T()}],"scale-y":[{"scale-y":T()}],"scale-z":[{"scale-z":T()}],"scale-3d":["scale-3d"],skew:[{skew:F()}],"skew-x":[{"skew-x":F()}],"skew-y":[{"skew-y":F()}],transform:[{transform:[Zt,Qt,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Zt,Qt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Zt,Qt]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[Et,er,Rt,Ut]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function gr(...e){return fr(function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=tt(e))&&(n&&(n+=" "),n+=t);return n}(e))}const br=({startDate:e,endDate:t,onStartDateChange:r,onEndDateChange:n,startLabel:o="Start date",endLabel:u="End date",className:m})=>c("div",{className:gr("flex flex-col gap-2",m),children:d("div",{className:"flex flex-row gap-2 items-center",children:[d(i,{children:[c(s,{asChild:!0,children:d("button",{type:"button",className:gr(Ke,"justify-start text-left w-[240px]",!e&&Ze),children:[c(Q,{className:gr("mr-2",et)}),e?Xe(e,"PPP"):o]})}),c(l,{className:"w-fit p-0",align:"start",children:c(a,{mode:"single",selected:e,onSelect:r,initialFocus:!0})})]}),d(i,{children:[c(s,{asChild:!0,children:d("button",{type:"button",className:gr(Ke,"justify-start text-left w-[240px]",!t&&Ze),children:[c(Q,{className:gr("mr-2",et)}),t?Xe(t,"PPP"):u]})}),c(l,{className:"w-fit p-0",align:"start",children:c(a,{mode:"single",selected:t,onSelect:n,initialFocus:!0})})]})]})}),wr=({value:e,onChange:t,fetcher:r,className:n})=>c(m,{fetcher:r,modelClass:"User",className:gr("max-w-36 h-10",n),placeholder:"Creator user",emptyMessage:"No user found",labelName:"username",value:e,onChange:t}),yr=()=>{const[e,t]=r(),[n,o]=r(),[a,i]=r(null),s=[{pk:1,description:"Maintenance Task A",created_at:"2023-10-01",status:"Open",user_id:1,username:"admin"},{pk:2,description:"Inspection B",created_at:"2023-10-05",status:"Closed",user_id:2,username:"jdoe"},{pk:3,description:"Repair C",created_at:"2023-10-10",status:"In Progress",user_id:1,username:"admin"},{pk:4,description:"Log Analysis",created_at:"2023-10-15",status:"Open",user_id:3,username:"guest"},{pk:5,description:"System Update",created_at:"2023-11-01",status:"Pending",user_id:2,username:"jdoe"}],l=s.filter(t=>{let r=!0;const o=new Date(t.created_at);return e&&o<e&&(r=!1),n&&o>n&&(r=!1),a&&t.user_id!==Number(a)&&(r=!1),r});return d("div",{className:"flex flex-col gap-6 p-4 border rounded-lg bg-white",children:[c("h2",{className:"text-xl font-bold",children:"Combined Filter & Table Demo"}),d("div",{className:"flex flex-wrap gap-4 items-end",children:[c(br,{startDate:e,endDate:n,onStartDateChange:t,onEndDateChange:o}),c(wr,{fetcher:async({search:e,modelClass:t,limit:r,offset:n})=>{await new Promise(e=>setTimeout(e,300));const o=[{pk:1,username:"admin"},{pk:2,username:"jdoe"},{pk:3,username:"guest"}];return e?o.filter(t=>t.username.toLowerCase().includes(e.toLowerCase())):o},value:a,onChange:e=>i(e)}),c(f,{variant:"outline",className:"h-full",onClick:()=>{t(void 0),o(void 0),i(null)},children:"Clear Filters"})]}),c("div",{className:"border rounded-md overflow-hidden",children:d(h.Root,{children:[c(h.Header,{children:d(h.Row,{children:[c(h.Head,{children:"ID"}),c(h.Head,{children:"Description"}),c(h.Head,{children:"Created At"}),c(h.Head,{children:"Created By"}),c(h.Head,{children:"Status"})]})}),c(h.Body,{children:l.length>0?l.map(e=>d(h.Row,{children:[c(h.Cell,{children:e.pk}),c(h.Cell,{children:e.description}),c(h.Cell,{children:Xe(new Date(e.created_at),"PPP")}),c(h.Cell,{children:e.username}),c(h.Cell,{children:e.status})]},e.pk)):c(h.Row,{children:c(h.Cell,{colSpan:5,children:c(p,{title:"No results found",description:"No data was found for the selected filters."})})})})]})}),d("div",{className:"text-xs text-gray-400",children:["Showing ",l.length," of ",s.length," records."]})]})};function xr({data:e}){return c(g,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(e).map(([e,t])=>c(g,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:d("span",{className:"font-medium text-foreground",children:[e," : ",String(t)]})},e))})}const vr=({href:e,className:t,children:r})=>c("a",{href:e,className:t,children:r});function kr({onLogin:e,onSuccess:t,onError:n,sessionExpired:o=!1,sessionExpiredAlert:a,forgotPasswordHref:i="/",forgotPasswordLabel:s="Esqueci a senha",usernameLabel:l="Usuario",passwordLabel:u="Senha",submitLabel:m="Entrar",loginErrorMessage:h="Login error!",LinkComponent:p=vr,className:b}){const[M,S]=r(""),[z,j]=r(""),[P,_]=r(!1);return d(g,{gap:4,children:[o&&a?.icon&&c(w,{variant:"destructive",icon:a.icon,title:a.title??"Sessão expirada",description:a.description??"Faça login novamente para continuar"}),d(y,{className:b??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[c(x,{className:"items-center"}),c(v,{children:c("form",{onSubmit:e=>e.preventDefault(),children:d("div",{className:"grid w-full items-center gap-4 mt-6",children:[d(g,{gap:4,children:[c(C,{className:"text-primary",htmlFor:"username",children:l}),c(N,{id:"username",type:"text",placeholder:"Seu nome de usuário",value:M,onChange:e=>S(e.target.value)})]}),d(g,{gap:4,children:[c(C,{className:"text-primary",htmlFor:"password",children:u}),c(N,{id:"password",type:"password",placeholder:"Sua senha de acesso",value:z,onChange:e=>j(e.target.value)})]})]})})}),c(k,{className:"justify-center items-center",children:d(g,{gap:4,className:"justify-center items-center mt-10",children:[c(f,{className:"w-full",onClick:async()=>{_(!0);try{const{error:r}=await e({username:M,password:z});if(r)return void n?.(h,String(r));t?.()}finally{_(!1)}},disabled:P,children:m}),c(p,{href:i,className:"text-primary text-xs",children:s})]})})]})]})}const Nr=({href:e,className:t,children:r})=>c("a",{href:e,className:t,children:r});function Cr({onLoginSSO:e,onRedirect:t,onError:n,sessionExpired:o=!1,sessionExpiredAlert:a,forgotPasswordHref:i="/",forgotPasswordLabel:s="Esqueci a senha",emailLabel:l="Email",submitLabel:u="Entrar com SSO",unauthorizedMessage:m="Usuario nao autorizado",genericErrorMessage:h="Erro ao fazer login",LinkComponent:p=Nr,className:b}){const[M,S]=r(""),[z,j]=r(!1);return d(g,{gap:4,children:[o&&a?.icon&&c(w,{variant:"destructive",icon:a.icon,title:a.title??"Sessão expirada",description:a.description??"Faça login novamente para continuar"}),d(y,{className:b??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[c(x,{className:"items-center mt-4"}),c(v,{children:c("form",{onSubmit:async r=>{r.preventDefault(),j(!0);try{const{redirect_url:r,error:o}=await e(M);if(r)return void t?.(r);const a=o?.includes("401")?m:h;n?.(a,String(o))}finally{j(!1)}},children:d("div",{className:"grid w-full items-center gap-4 mt-6",children:[d(g,{gap:4,children:[c(C,{className:"text-primary",htmlFor:"email",children:l}),c(N,{id:"email",type:"email",placeholder:"Seu email de acesso",value:M,onChange:e=>S(e.target.value),pattern:"^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$",required:!0})]}),c(f,{className:"w-full",type:"submit",disabled:z,children:u})]})})}),c(k,{className:"flex-col justify-center items-center",children:c(g,{gap:4,className:"justify-start items-center mb-7",children:c(p,{href:i,className:"text-primary text-xs",children:s})})})]})]})}const Mr=({href:e,className:t,children:r})=>c("a",{href:e,className:t,children:r});function Sr({redirectHref:e,redirectDelayMs:t=3e3,onRedirect:r,title:o="Autenticado com sucesso! Redirecionado automaticamente",fallbackLinkLabel:a="Caso nao seja redirecionado automaticamente, clique aqui",LinkComponent:i=Mr,className:s}){return n(()=>{const n=setTimeout(()=>{r?.(e)},t);return()=>clearTimeout(n)},[e,t,r]),c("div",{className:"flex justify-center items-center h-screen",children:d(y,{className:s??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[c(x,{className:"items-center mt-4"}),d(v,{className:"flex flex-col gap-4",children:[c(M,{}),c("h4",{className:"text-center",children:o}),c(i,{href:e,className:"w-full text-sm underline text-accent text-center",children:a})]})]})})}const zr=({href:e,className:t,children:r})=>c("a",{href:e,className:t,children:r});function jr({error:e,loginHref:t,title:n="Erro ao autenticar!",description:o="Verifique suas informações de SSO ou converse com o administrador do sistema.",fallbackLinkLabel:a="Caso não seja redirecionado automaticamente, clique aqui",errorDetailsLabel:i="Detalhes para os Nerds",copyLabel:s="Copiar",copiedLabel:l="Copiado!",LinkComponent:m=zr,className:h}){const[p,f]=r(!1),b="string"==typeof e?e:JSON.stringify(e,null,2);return c(g,{className:"justify-center items-center h-screen",children:d(y,{className:h??"w-[400px] h-[457px] rounded-[30px] shadow-lg bg-red-50",children:[c(x,{className:"items-center"}),d(v,{className:"flex flex-col items-center gap-2",children:[c(U,{size:48,className:"text-red-700"}),c("h4",{className:"text-center",children:n}),c("p",{className:"text-sm text-center",children:o}),c(m,{href:t,className:"w-full text-sm underline text-accent text-center",children:a}),c(S,{type:"single",collapsible:!0,className:"w-full",children:d(z,{value:"error-details",children:[c(j,{children:i}),d(P,{className:"max-w-80",children:[c("div",{className:"flex justify-end mb-1",children:c("button",{type:"button",onClick:async()=>{if(e)try{await navigator.clipboard.writeText("string"==typeof e?e:JSON.stringify(e,null,2)),f(!0),setTimeout(()=>f(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},className:"text-xs text-accent hover:underline flex items-center gap-1",children:d(u,p?{children:[c(R,{size:14,className:"text-green-600"})," ",l]}:{children:[c(X,{size:14})," ",s]})})}),c("div",{className:"max-h-24 overflow-y-auto overflow-x-hidden",children:c("pre",{className:"bg-gray-100 p-4 rounded-md",children:c("code",{className:"text-sm text-red-600 dark:text-red-400 whitespace-pre-wrap break-words",children:b})})})]})]})})]})]})})}const Pr={created_at:"Criado em",start_processing_at:"Início do Processamento",finished_processing_at:"Fim do Processamento",field_delimiter:"Delimitador de Campo",decimal_delimiter:"Delimitador Decimal",ignore_locked:"Ignorar Bloqueados",lock_data:"Bloquear Dados",origin:"Origem",format_type:"Tipo de Formato",process_status:"Status",description:"Descrição",row_permission:"Row Permission",created_by:"Created By",modeling_unit:"Modeling Unit",attribute:"Attribute",geoarea:"Geoarea"},_r=e=>{if(!e)return"";return new Date(e).toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})},Dr=(e,t)=>({...Pr,...t}[e]||e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")),Lr=(e,t,r={})=>{if(null==e||""===e)return"N/A";if("process_status"===t&&r.statusLabels)return r.statusLabels[String(e)]??String(e);if(t.endsWith("_at")||t.includes("date")||t.includes("_time")){return(r.formatDate??_r)(String(e))||"N/A"}if("boolean"==typeof e){const t=r.booleanLabels??{true:"Sim",false:"Não"};return e?t.true:t.false}return"object"==typeof e?"N/A":String(e)},Wr=(e,t)=>{const r=e[t];return r&&"object"==typeof r&&null!==r&&"__display_field__"in r?r.__display_field__:r},Or=["description","notes"],qr={default:"",card:"rounded-lg border p-4"};function Er(e="default",t,r){return gr(qr[e],t,r)}const Tr=[{title:"Informações Gerais",fields:["description","row_permission","origin","created_by","process_status","msg"],cols:4},{title:"Datas de Processamento",fields:["created_at","start_processing_at","finished_processing_at"],cols:3},{title:"Proteção dos Dados",fields:["ignore_locked","lock_data"],cols:4},{title:"Carregamento Manual",fields:["format_type","field_delimiter","decimal_delimiter","modeling_unit","attribute","geoarea"],cols:4}];function Fr({data:e,config:t,className:r,sectionVariant:n="default",sectionClassName:o,formatters:a,wrapperElements:i,statusLabels:s,formatDate:l}){const u=t?.sections||Tr,m={statusLabels:s,formatDate:l},h=(e,t,r,a)=>d(g,{direction:"col",gap:3,className:Er(n,o,a),children:[c("h3",{className:"text-sm font-semibold text-foreground",children:t}),r]},e),p=(r,n)=>{if(!(r in e))return null;const o=t?.labels?.[r]||Dr(r,t?.labels),s=(a||[]).find(e=>e.key===r)?.formatter||t?.formatters?.[r],l=Wr(e,r),u=s?s(l):Lr(l,r,m),h=function(e,t){return void 0!==t?.fullWidthFields?t.fullWidthFields.includes(e):Or.includes(e)}(r,n),p=i?.find(e=>e.keys.includes(r));if(p?.element){const t=p.element({key:r,label:o,fieldValue:l,isFullWidth:h,data:e});return c(g,{direction:"col",className:h?"col-span-full min-w-0":"min-w-0",children:t},r)}return d(g,{direction:"col",className:h?"col-span-full min-w-0":"min-w-0",children:[c("p",{className:"text-sm font-medium text-muted-foreground",children:o}),c("p",{className:"text-base break-words whitespace-pre-wrap",children:u})]},r)},f=e.results;return d(g,{direction:"col",gap:6,className:r,children:[u.map(t=>{const r=t.fields.filter(t=>t in e);if(0===r.length)return null;const n=function(e){if(e.isFullWidth)return"grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-1 xl:grid-cols-1 gap-x-6 gap-y-4";switch(e.cols){case 2:return"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-4";case 3:return"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-4";default:return"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-x-6 gap-y-4"}}(t);return h(t.title,t.title,c("div",{className:n,children:r.map(e=>p(e,t))}),t.className)}),Boolean(e.dimensions&&"object"==typeof e.dimensions&&Object.keys(e.dimensions).length>0)&&h("tags","Tags",c(xr,{data:e.dimensions})),Boolean(e.extra_info&&"object"==typeof e.extra_info&&Object.keys(e.extra_info).length>0)&&h("extra-info","Informações Extras",c(xr,{data:e.extra_info})),f?.processing_results&&c(g,{direction:"col",gap:3,className:Er(n,o),children:c(S,{type:"single",collapsible:!0,children:d(z,{value:"processing-results",className:"border-b-0",children:[c(j,{className:"text-sm font-semibold text-foreground hover:no-underline py-2",children:"Resultados do Processamento"}),c(P,{children:d(g,{direction:"col",gap:4,children:[c("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:[{label:"Adicionados",value:f.processing_results.count__added,color:"text-green-600"},{label:"Atualizados",value:f.processing_results.count__updated,color:"text-blue-600"},{label:"Sem Alteração",value:f.processing_results.count__no_change,color:"text-gray-600"}].map(e=>d(g,{direction:"col",children:[c("p",{className:"text-sm font-medium text-muted-foreground",children:e.label}),c("p",{className:`text-2xl font-bold ${e.color}`,children:e.value})]},e.label))}),f.processing_results.details&&f.processing_results.details.length>0&&d(g,{direction:"col",gap:2,children:[c("p",{className:"text-sm font-medium text-muted-foreground",children:"Detalhes"}),c(g,{direction:"col",gap:2,children:f.processing_results.details.map((e,r)=>{const n=`detail-${r}-${Object.values(e).join("-")}`;return c(g,{className:"border rounded-lg p-3",children:c(g,{className:"grid grid-cols-4 gap-2",children:Object.entries(e).map(([e,r])=>d(g,{direction:"col",children:[c("p",{className:"text-xs text-muted-foreground",children:Dr(e,t?.labels)}),c("p",{className:"text-sm font-medium",children:Lr(r,e,m)})]},e))})},n)})})]})]})})]})})})]})}function Hr({title:e,titleAddon:t,isLoading:r=!1,error:n=null,onBack:o,actions:a,sections:i=[],children:s,loadingComponent:l,errorComponent:u,backButtonLabel:m="Voltar"}){return r?l??c(g,{className:"justify-center items-center p-8",children:c(M,{})}):n?u??c(g,{className:"justify-center items-center p-8",children:c("p",{className:"text-destructive",children:n.message})}):d(g,{direction:"col",gap:4,children:[d(g,{direction:"row",gap:4,className:"justify-between items-center",children:[d(g,{direction:"row",gap:4,className:"items-center",children:[o&&c(f,{variant:"ghost",size:"icon",onClick:o,title:m,children:c(V,{className:"size-4"})}),c("h1",{className:"text-2xl font-semibold text-surface-secondary",children:e}),t]}),a&&c(g,{direction:"row",gap:2,children:a})]}),i.map((e,t)=>{const r=e.id??`section-${t}`;return c(S,{type:"single",collapsible:!0,defaultValue:e.defaultOpen?r:void 0,className:"w-full",children:d(z,{value:r,className:"border-b",children:[c(j,{className:"hover:no-underline text-base font-normal text-surface-secondary",children:e.title}),c(P,{className:"pt-4",children:e.content})]})},r)}),s]})}const Ar={description:"Descrição",code:"Código",notes:"Notas",force_temperature:"Temperatura Forçada",dimensions:"Tags",extra_info:"Informações extras"},Gr=(e,t)=>t?.[e]?t[e]:Ar[e]?Ar[e]:e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");function Ir({value:e={},onChange:t,name:n,placeholderKey:o="Chave",placeholderValue:a="Valor",disabled:i=!1}){const[s,l]=r({key:"",value:""});return d(g,{direction:"col",gap:2,children:[d("div",{className:"flex gap-2",children:[c(N,{type:"text",name:`${n}_key`,placeholder:o,value:s.key,disabled:i,onChange:e=>l(t=>({...t,key:e.target.value})),className:"flex-1"}),c(N,{type:"text",name:`${n}_value`,placeholder:a,value:s.value,disabled:i,onChange:e=>l(t=>({...t,value:e.target.value})),className:"flex-1"}),c(f,{type:"button",variant:"default",className:"px-4 py-2 shrink-0",id:`${n}_add`,onClick:()=>{const e=s.key.trim(),r=s.value.trim();e&&(t(t=>({...t&&"object"==typeof t?t:{},[e]:r})),l({key:"",value:""}))},disabled:i||!s.key.trim(),children:"Adicionar"})]}),Object.entries(e).length>0&&c(g,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(e).map(([e,r])=>d(g,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:[d("span",{className:"font-medium text-foreground",children:[e," : ",String(r)]}),!i&&c("button",{type:"button",onClick:()=>{return r=e,void t(e=>{const t={...e&&"object"==typeof e?e:{}};return delete t[r],t});var r},className:"rounded-full p-0 hover:bg-muted-foreground/20 hover:text-destructive hover:backgro transition-colors",children:"×"})]},e))})]})}function Yr({fields:e,values:t,defaultValue:o={},onChange:a,errors:i={},config:s,customFields:l}){const[m,h]=r(o),p=t??m,f=(e,t)=>{a?a(r=>{const n=r&&"object"==typeof r?r:p,o=n[e],a="function"==typeof t?t(o):t;return{...n,[e]:a}}):h(r=>{const n=r[e],o="function"==typeof t?t(n):t;return{...r,[e]:o}})};n(()=>{Object.keys(o).length>0&&0===Object.keys(p).length&&h(o)},[o,p]);const b=Object.keys(e).filter(e=>!s?.exclude?.includes(e)),w=(e,t)=>{const r=p[e]??"",n=i[e],o=t.disabled;if(l?.[e])return l[e]({value:r,onChange:t=>f(e,t),error:n,disabled:o,fieldKey:e});switch(t.type){case"textarea":return c(L,{id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>f(e,t.target.value),required:t.required,disabled:o,className:gr("min-h-[120px] w-full",n&&"border-destructive")});case"checkbox":return d("div",{className:"flex items-center gap-2 py-2",children:[c(_,{id:e,name:e,checked:!!r,onCheckedChange:t=>f(e,!!t),disabled:o}),c("label",{htmlFor:e,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:Gr(e,s?.labels)})]});case"select":return c(D,{id:e,name:e,placeholder:t.placeholder||"Selecione...",options:t.options??[],value:null!=r?String(r):"",onValueChange:t=>f(e,t),required:t.required});case"key-value":return d(u,{children:[c(Ir,{value:r||{},name:e,onChange:t=>f(e,t),placeholderKey:"Chave",placeholderValue:"Valor",disabled:o}),c("input",{type:"hidden",name:e,value:JSON.stringify(r||{})})]});case"number":return c(N,{type:"number",id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>{const r=""===t.target.value?"":Number(t.target.value);f(e,r)},required:t.required,disabled:o,className:gr("w-full",n&&"border-destructive")});case"date":return c(N,{type:"date",id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>f(e,t.target.value),required:t.required,disabled:o,className:gr("w-full",n&&"border-destructive")});default:return c(N,{type:t.type,id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>f(e,t.target.value),required:t.required,disabled:o,className:gr("w-full",n&&"border-destructive")})}};return c(g,{direction:"col",gap:6,className:"w-full",children:(s?.sections||[{title:"Dados do Formulário",fields:b,cols:1}]).map(t=>{const r=t.fields.filter(t=>t in e&&!s?.exclude?.includes(t));if(0===r.length)return null;const n=1===t.cols?"grid-cols-1":2===t.cols?"grid-cols-1 sm:grid-cols-2":3===t.cols?"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";return d(g,{direction:"col",gap:3,className:"w-full",children:[c("h3",{className:"text-sm font-semibold text-foreground",children:t.title}),c("div",{className:gr("grid gap-x-6 gap-y-4 w-full",n),children:r.map(r=>{const n=e[r],o=t.isFullWidth||"textarea"===n.type||"key-value"===n.type||4===n.cols,a=i[r],l="checkbox"!==n.type;return d(g,{direction:"col",gap:1.5,className:gr(o?"col-span-full":"",n.className),children:[l&&d("label",{htmlFor:r,className:"text-fontcolor-secondary font-bold text-sm",children:[Gr(r,s?.labels),n.required&&c("span",{className:"text-destructive ml-0.5",children:"*"})]}),w(r,n),a&&c("span",{className:"text-xs text-destructive font-medium mt-0.5",children:a})]},r)})})]},t.title)})})}function $r({label:e,steps:t=[]}){return c(W,{className:"mb-6",children:d(O,{children:[c(q,{children:c(E,{className:"text-primary font-medium",children:e})}),t.map(e=>d(o,{children:[c(T,{}),c(q,{children:c(E,{className:"text-muted-foreground",children:e})})]},`step-fragment-${e}`))]})})}const Br=(e,t)=>{const r=document.createElement("a");r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)},Vr=({fileUrl:e,fileName:t,isLoading:r=!1,getFileType:n,ImageComponent:o})=>{if(r)return c(g,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:c(b,{})});if(!e||!t)return d(g,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:[c(ee,{className:"w-16 h-16 text-muted-foreground"}),c("p",{className:"text-sm text-muted-foreground mt-4",children:"No file available"})]});const a=n(t);return c(g,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] h-full overflow-hidden relative",children:(()=>{switch(a){case"image":return c(g,{direction:"col",className:"w-full h-full items-center justify-center relative",children:o?c(o,{src:e,alt:t,fill:!0,className:"object-contain"}):c("img",{src:e,alt:t,className:"max-w-full max-h-full object-contain"})});case"video":return c(g,{direction:"col",className:"w-full h-full items-center justify-center relative",children:d("video",{src:e,controls:!0,className:"w-full h-full object-contain",children:[c("track",{kind:"captions"}),"Your browser does not support the video tag."]})});case"pdf":return c(g,{direction:"col",className:"w-full h-full items-center justify-center relative",children:c("iframe",{src:e,className:"w-full h-full border-0",title:t})});case"doc":case"excel":case"ppt":return d(g,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[c(K,{className:"w-20 h-20 text-muted-foreground"}),d(g,{direction:"col",gap:1,className:"text-center",children:[c("p",{className:"text-sm font-medium text-foreground",children:t}),d("p",{className:"text-xs text-muted-foreground uppercase",children:[a," Document"]})]}),d(f,{variant:"outline",size:"default",className:"mt-4",onClick:()=>Br(e,t),children:[c(J,{className:"w-4 h-4 mr-2"}),"Download"]})]});default:return d(g,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[c(Z,{className:"w-16 h-16 text-muted-foreground"}),c("p",{className:"text-sm text-muted-foreground",children:t}),d(f,{variant:"outline",size:"sm",onClick:()=>Br(e,t),children:[c(J,{className:"w-4 h-4 mr-2"}),"Download"]})]})}})()})};function Qr({links:e,iconMap:t,pathname:r,isSidebarCollapsedFromQuery:o=!1,logo:a,onLogout:i,logoutIcon:s=te,logoutLabel:l="Logout",LinkComponent:u,ImageComponent:m}){const h=r.split("/")[2]??"",{isCollapsed:p,isCollapsing:f,expandedItems:b,setExpandedItems:w,toggleCollapse:y,toggleExpanded:x,handleTransitionEnd:v,setExpandedOnCollapse:k}=H({initialCollapsed:o,onPersist:e=>{const t=new URLSearchParams;t.set("sidebar-collapsed",String(e)),window.history.replaceState({},"",`${window.location.pathname}?${t}`)}});n(()=>{if(!o){const t={};e.forEach(e=>{if(e.subItems){e.subItems.some(e=>r===e.href)&&(t[e.title]=!0)}}),w(t)}},[o,e,r,w]);return d(F.Root,{isCollapsed:p,isCollapsing:f,onToggleCollapse:()=>{p||k(),y()},onTransitionEnd:v,className:"h-full",children:[d(g,{className:"w-full shrink-0 items-center gap-1 mb-2",children:[c(F.Toggle,{}),c(F.Logo,{src:a.src,width:a.width,height:a.height,collapsedWidth:a.collapsedWidth,collapsedHeight:a.collapsedHeight,alt:a.alt,ImageComponent:m})]}),c(F.Content,{className:"mt-6",children:e.map(e=>{const n=t[e.icon];if(!!e.subItems?.length){const t=e.subItems?.some(e=>r===e.href||h===e.href.split("/")[2]);return c(F.NavGroup,{icon:n,title:e.title,isExpanded:!!b[e.title],isActive:!!t,onToggle:()=>x(e.title),children:e.subItems?.map(e=>{const t=r===e.href;return c(F.NavSubLink,{title:e.title,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:t,LinkComponent:u},e.href)})},e.title)}const o=e.href?.split("/")[2]??"";return c(F.Link,{icon:n,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:h===o,LinkComponent:u,children:e.title},e.href)})}),c(F.Footer,{children:c(F.Action,{icon:s,label:l,onClick:async()=>{await i()}})})]})}export{Sr as AuthenticatedView,Fr as AutoDetailContent,Yr as AutoFormContent,yr as CombinedFilterTable,wr as CreatedByUserFilter,$r as CustomBreadcrumb,br as DateRangeFilter,Hr as DetailPage,Or as FULL_WIDTH_DETAIL_FIELDS,Vr as FilePreview,xr as KeyValueContent,kr as LoginCard,Cr as LoginCardSSO,Qr as NavigationSidebar,jr as NotAuthenticatedView,Dr as formatDetailLabel,Lr as formatDetailValue,Wr as getDetailFieldValue};
|
package/dist/design-system.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("@murabei-data-science/pumpwood-ui/components"),r=require("@murabei-data-science/pumpwood-ui/components"),
|
|
1
|
+
"use strict";var e=require("react"),t=require("@murabei-data-science/pumpwood-ui/components"),r=require("@murabei-data-science/pumpwood-ui/components"),a=require("react/jsx-runtime"),n=require("@murabei-data-science/pumpwood-ui/components"),o=require("@murabei-data-science/pumpwood-ui/components"),s=require("@murabei-data-science/pumpwood-ui/components"),i=require("@murabei-data-science/pumpwood-ui/components"),l=require("@murabei-data-science/pumpwood-ui/components"),c=require("@murabei-data-science/pumpwood-ui/components"),d=require("@murabei-data-science/pumpwood-ui/components"),u=require("@murabei-data-science/pumpwood-ui/components"),m=require("@murabei-data-science/pumpwood-ui/components"),h=require("@murabei-data-science/pumpwood-ui/components"),p=require("@murabei-data-science/pumpwood-ui/components"),f=require("@murabei-data-science/pumpwood-ui/components"),g=require("@murabei-data-science/pumpwood-ui/components"),b=require("@murabei-data-science/pumpwood-ui/components"),x=require("@murabei-data-science/pumpwood-ui/components"),w=require("@murabei-data-science/pumpwood-ui/components"),y=require("@murabei-data-science/pumpwood-ui/components");
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v0.562.0 - ISC
|
|
4
4
|
*
|
|
@@ -18,10 +18,10 @@ var N={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"
|
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const C=e.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:
|
|
21
|
+
*/const C=e.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...l},c)=>e.createElement("svg",{ref:c,...N,width:r,height:r,stroke:t,strokeWidth:n?24*Number(a)/Number(r):a,className:v("lucide",o),...!s&&!j(l)&&{"aria-hidden":"true"},...l},[...i.map(([t,r])=>e.createElement(t,r)),...Array.isArray(s)?s:[s]])),S=(t,r)=>{const a=e.forwardRef(({className:a,...n},o)=>{return e.createElement(C,{ref:o,iconNode:r,className:v(`lucide-${s=k(t),s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${t}`,a),...n});var s});return a.displayName=k(t),a},M=S("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),P=S("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),z=S("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),D=S("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),_=S("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]),T=S("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),L=S("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),q=S("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),W=S("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),F=S("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),E=6048e5,A=Symbol.for("constructDateFrom");
|
|
22
22
|
/**
|
|
23
23
|
* @license lucide-react v0.562.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/function O(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&A in e?e[A](t):e instanceof Date?new e.constructor(t):new Date(t)}function I(e,t){return O(t||e,e)}let H={};function B(){return H}function G(e,t){const r=B(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=I(e,t?.in),o=a.getDay(),s=(o<n?7:0)+o-n;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function Y(e,t){return G(e,{...t,weekStartsOn:1})}function $(e,t){const r=I(e,t?.in),n=r.getFullYear(),a=O(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const o=Y(a),s=O(r,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const i=Y(s);return r.getTime()>=o.getTime()?n+1:r.getTime()>=i.getTime()?n:n-1}function V(e){const t=I(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function R(e,t){const r=I(e,t?.in);return r.setHours(0,0,0,0),r}function Q(e,t,r){const[n,a]=function(e,...t){const r=O.bind(null,t.find(e=>"object"==typeof e));return t.map(r)}(0,e,t),o=R(n),s=R(a),i=+o-V(o),l=+s-V(s);return Math.round((i-l)/864e5)}function U(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+I(e)));var t}const X={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function J(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const K={date:J({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:J({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:J({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Z={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ee(e){return(t,r)=>{let n;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=r?.width?String(r.width):t;n=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=r?.width?String(r.width):e.defaultWidth;n=e.values[a]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}const te={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:ee({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ee({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ee({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ee({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ee({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function re(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const s=o[0],i=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,e=>e.test(s)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,e=>e.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(s.length)}}}const ne={ordinalNumber:(ae={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(ae.matchPattern);if(!r)return null;const n=r[0],a=e.match(ae.parsePattern);if(!a)return null;let o=ae.valueCallback?ae.valueCallback(a[0]):a[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(n.length)}}),era:re({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:re({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:re({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:re({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:re({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var ae;const oe={code:"en-US",formatDistance:(e,t,r)=>{let n;const a=X[e];return n="string"==typeof a?a:1===t?a.one:a.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},formatLong:K,formatRelative:(e,t,r,n)=>Z[e],localize:te,match:ne,options:{weekStartsOn:0,firstWeekContainsDate:1}};function se(e,t){const r=I(e,t?.in),n=Q(r,function(e,t){const r=I(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}(r));return n+1}function ie(e,t){const r=I(e,t?.in),n=+Y(r)-+function(e,t){const r=$(e,t),n=O(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Y(n)}(r);return Math.round(n/E)+1}function le(e,t){const r=I(e,t?.in),n=r.getFullYear(),a=B(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=O(t?.in||e,0);s.setFullYear(n+1,0,o),s.setHours(0,0,0,0);const i=G(s,t),l=O(t?.in||e,0);l.setFullYear(n,0,o),l.setHours(0,0,0,0);const c=G(l,t);return+r>=+i?n+1:+r>=+c?n:n-1}function ce(e,t){const r=I(e,t?.in),n=+G(r,t)-+function(e,t){const r=B(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=le(e,t),o=O(t?.in||e,0);return o.setFullYear(a,0,n),o.setHours(0,0,0,0),G(o,t)}(r,t);return Math.round(n/E)+1}function de(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const ue={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return de("yy"===t?n%100:n,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):de(r+1,2)},d:(e,t)=>de(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>de(e.getHours()%12||12,t.length),H:(e,t)=>de(e.getHours(),t.length),m:(e,t)=>de(e.getMinutes(),t.length),s:(e,t)=>de(e.getSeconds(),t.length),S(e,t){const r=t.length,n=e.getMilliseconds();return de(Math.trunc(n*Math.pow(10,r-3)),t.length)}},me="midnight",he="noon",pe="morning",fe="afternoon",ge="evening",be="night",xe={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),n=t>0?t:1-t;return r.ordinalNumber(n,{unit:"year"})}return ue.y(e,t)},Y:function(e,t,r,n){const a=le(e,n),o=a>0?a:1-a;if("YY"===t){return de(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):de(o,t.length)},R:function(e,t){return de($(e),t.length)},u:function(e,t){return de(e.getFullYear(),t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return de(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return de(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return ue.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return de(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=ce(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):de(a,t.length)},I:function(e,t,r){const n=ie(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):de(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):ue.d(e,t)},D:function(e,t,r){const n=se(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):de(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return de(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),o=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return de(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return de(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(a=12===n?he:0===n?me:n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(a=n>=17?ge:n>=12?fe:n>=4?pe:be,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return ue.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):ue.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):de(n,t.length)},k:function(e,t,r){let n=e.getHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):de(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):ue.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ue.s(e,t)},S:function(e,t){return ue.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return ye(n);case"XXXX":case"XX":return ke(n);default:return ke(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return ye(n);case"xxxx":case"xx":return ke(n);default:return ke(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+we(n,":");default:return"GMT"+ke(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+we(n,":");default:return"GMT"+ke(n,":")}},t:function(e,t,r){return de(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return de(+e,t.length)}};function we(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),o=n%60;return 0===o?r+String(a):r+String(a)+t+de(o,2)}function ye(e,t){if(e%60==0){return(e>0?"-":"+")+de(Math.abs(e)/60,2)}return ke(e,t)}function ke(e,t=""){const r=e>0?"-":"+",n=Math.abs(e);return r+de(Math.trunc(n/60),2)+t+de(n%60,2)}const ve=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},je=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Ne={p:je,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return ve(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",ve(n,t)).replace("{{time}}",je(a,t))}},Ce=/^D+$/,Se=/^Y+$/,Me=["D","DD","YY","YYYY"];const Pe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ze=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,De=/^'([^]*?)'?$/,_e=/''/g,Te=/[a-zA-Z]/;function Le(e,t,r){const n=B(),a=n.locale??oe,o=n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=I(e,r?.in);if(!U(i))throw new RangeError("Invalid time value");let l=t.match(ze).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Ne[t])(e,a.formatLong)}return e}).join("").match(Pe).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:qe(e)};if(xe[t])return{isToken:!0,value:e};if(t.match(Te))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});a.localize.preprocessor&&(l=a.localize.preprocessor(i,l));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:a};return l.map(r=>{if(!r.isToken)return r.value;const n=r.value;(function(e){return Se.test(e)}(n)||function(e){return Ce.test(e)}(n))&&function(e,t,r){const n=function(e,t,r){const n="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(n),Me.includes(e))throw new RangeError(n)}(n,t,String(e));return(0,xe[n[0]])(i,n,a.localize,c)}).join("")}function qe(e){const t=e.match(De);return t?t[1].replace(_e,"'"):e}const We="flex h-10 w-full items-center rounded-md border border-input bg-background px-3 text-sm font-normal shadow-none hover:bg-[hsl(var(--hover-ring))] hover:border-[hsl(var(--focus-ring))] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",Fe="text-muted-foreground",Ee="size-4 shrink-0 text-muted-foreground opacity-50";function Ae(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Ae(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}const Oe=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ie="-",He=[],Be=e=>{const t=$e(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return Ye(e);const r=e.split(Ie),n=""===r[0]&&r.length>1?1:0;return Ge(r,n,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=n[e],a=r[e];return t?a?((e,t)=>{const r=new Array(e.length+t.length);for(let t=0;t<e.length;t++)r[t]=e[t];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r})(a,t):t:a||He}return r[e]||He}}},Ge=(e,t,r)=>{if(0===e.length-t)return r.classGroupId;const n=e[t],a=r.nextPart.get(n);if(a){const r=Ge(e,t+1,a);if(r)return r}const o=r.validators;if(null===o)return;const s=0===t?e.join(Ie):e.slice(t).join(Ie),i=o.length;for(let e=0;e<i;e++){const t=o[e];if(t.validator(s))return t.classGroupId}},Ye=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?"arbitrary.."+n:void 0})(),$e=e=>{const{theme:t,classGroups:r}=e;return Ve(r,t)},Ve=(e,t)=>{const r=Oe();for(const n in e){const a=e[n];Re(a,r,n,t)}return r},Re=(e,t,r,n)=>{const a=e.length;for(let o=0;o<a;o++){const a=e[o];Qe(a,t,r,n)}},Qe=(e,t,r,n)=>{"string"!=typeof e?"function"!=typeof e?Je(e,t,r,n):Xe(e,t,r,n):Ue(e,t,r)},Ue=(e,t,r)=>{(""===e?t:Ke(t,e)).classGroupId=r},Xe=(e,t,r,n)=>{Ze(e)?Re(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(r,e)))},Je=(e,t,r,n)=>{const a=Object.entries(e),o=a.length;for(let e=0;e<o;e++){const[o,s]=a[e];Re(s,Ke(t,o),r,n)}},Ke=(e,t)=>{let r=e;const n=t.split(Ie),a=n.length;for(let e=0;e<a;e++){const t=n[e];let a=r.nextPart.get(t);a||(a=Oe(),r.nextPart.set(t,a)),r=a}return r},Ze=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,et=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const a=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(a(e,t),t):void 0},set(e,t){e in r?r[e]=t:a(e,t)}}},tt=[],rt=(e,t,r,n,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),nt=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=e=>{const t=[];let r,n=0,a=0,o=0;const s=e.length;for(let i=0;i<s;i++){const s=e[i];if(0===n&&0===a){if(":"===s){t.push(e.slice(o,i)),o=i+1;continue}if("/"===s){r=i;continue}}"["===s?n++:"]"===s?n--:"("===s?a++:")"===s&&a--}const i=0===t.length?e:e.slice(o);let l=i,c=!1;i.endsWith("!")?(l=i.slice(0,-1),c=!0):i.startsWith("!")&&(l=i.slice(1),c=!0);return rt(t,c,l,r&&r>o?r-o:void 0)};if(t){const e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):rt(tt,!1,t,void 0,!0)}if(r){const e=n;n=t=>r({className:t,parseClassName:e})}return n},at=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,r)=>{t.set(e,1e6+r)}),e=>{const r=[];let n=[];for(let a=0;a<e.length;a++){const o=e[a],s="["===o[0],i=t.has(o);s||i?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(o)):n.push(o)}return n.length>0&&(n.sort(),r.push(...n)),r}},ot=/\s+/,st=e=>{if("string"==typeof e)return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=st(e[n]))&&(r&&(r+=" "),r+=t);return r},it=(e,...t)=>{let r,n,a,o;const s=e=>{const t=n(e);if(t)return t;const o=((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:o}=t,s=[],i=e.trim().split(ot);let l="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:h}=r(t);if(c){l=t+(l.length>0?" "+l:l);continue}let p=!!h,f=n(p?m.substring(0,h):m);if(!f){if(!p){l=t+(l.length>0?" "+l:l);continue}if(f=n(m),!f){l=t+(l.length>0?" "+l:l);continue}p=!1}const g=0===d.length?"":1===d.length?d[0]:o(d).join(":"),b=u?g+"!":g,x=b+f;if(s.indexOf(x)>-1)continue;s.push(x);const w=a(f,p);for(let e=0;e<w.length;++e){const t=w[e];s.push(b+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return a(e,o),o};return o=i=>{const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:et(e.cacheSize),parseClassName:nt(e),sortModifiers:at(e),...Be(e)}))(l),n=r.cache.get,a=r.cache.set,o=s,s(i)},(...e)=>o(((...e)=>{let t,r,n=0,a="";for(;n<e.length;)(t=e[n++])&&(r=st(t))&&(a&&(a+=" "),a+=r);return a})(...e))},lt=[],ct=e=>{const t=t=>t[e]||lt;return t.isThemeGetter=!0,t},dt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ut=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mt=/^\d+\/\d+$/,ht=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ft=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xt=e=>mt.test(e),wt=e=>!!e&&!Number.isNaN(Number(e)),yt=e=>!!e&&Number.isInteger(Number(e)),kt=e=>e.endsWith("%")&&wt(e.slice(0,-1)),vt=e=>ht.test(e),jt=()=>!0,Nt=e=>pt.test(e)&&!ft.test(e),Ct=()=>!1,St=e=>gt.test(e),Mt=e=>bt.test(e),Pt=e=>!Dt(e)&&!Ft(e),zt=e=>Gt(e,Rt,Ct),Dt=e=>dt.test(e),_t=e=>Gt(e,Qt,Nt),Tt=e=>Gt(e,Ut,wt),Lt=e=>Gt(e,$t,Ct),qt=e=>Gt(e,Vt,Mt),Wt=e=>Gt(e,Jt,St),Ft=e=>ut.test(e),Et=e=>Yt(e,Qt),At=e=>Yt(e,Xt),Ot=e=>Yt(e,$t),It=e=>Yt(e,Rt),Ht=e=>Yt(e,Vt),Bt=e=>Yt(e,Jt,!0),Gt=(e,t,r)=>{const n=dt.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},Yt=(e,t,r=!1)=>{const n=ut.exec(e);return!!n&&(n[1]?t(n[1]):r)},$t=e=>"position"===e||"percentage"===e,Vt=e=>"image"===e||"url"===e,Rt=e=>"length"===e||"size"===e||"bg-size"===e,Qt=e=>"length"===e,Ut=e=>"number"===e,Xt=e=>"family-name"===e,Jt=e=>"shadow"===e,Kt=it(()=>{const e=ct("color"),t=ct("font"),r=ct("text"),n=ct("font-weight"),a=ct("tracking"),o=ct("leading"),s=ct("breakpoint"),i=ct("container"),l=ct("spacing"),c=ct("radius"),d=ct("shadow"),u=ct("inset-shadow"),m=ct("text-shadow"),h=ct("drop-shadow"),p=ct("blur"),f=ct("perspective"),g=ct("aspect"),b=ct("ease"),x=ct("animate"),w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ft,Dt],y=()=>[Ft,Dt,l],k=()=>[xt,"full","auto",...y()],v=()=>[yt,"none","subgrid",Ft,Dt],j=()=>["auto",{span:["full",yt,Ft,Dt]},yt,Ft,Dt],N=()=>[yt,"auto",Ft,Dt],C=()=>["auto","min","max","fr",Ft,Dt],S=()=>["auto",...y()],M=()=>[xt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],P=()=>[e,Ft,Dt],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ot,Lt,{position:[Ft,Dt]}],D=()=>["auto","cover","contain",It,zt,{size:[Ft,Dt]}],_=()=>[kt,Et,_t],T=()=>["","none","full",c,Ft,Dt],L=()=>["",wt,Et,_t],q=()=>[wt,kt,Ot,Lt],W=()=>["","none",p,Ft,Dt],F=()=>["none",wt,Ft,Dt],E=()=>["none",wt,Ft,Dt],A=()=>[wt,Ft,Dt],O=()=>[xt,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[vt],breakpoint:[vt],color:[jt],container:[vt],"drop-shadow":[vt],ease:["in","out","in-out"],font:[Pt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[vt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[vt],shadow:[vt],spacing:["px",wt],text:[vt],"text-shadow":[vt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xt,Dt,Ft,g]}],container:["container"],columns:[{columns:[wt,Dt,Ft,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[yt,"auto",Ft,Dt]}],basis:[{basis:[xt,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[wt,xt,"auto","initial","none",Dt]}],grow:[{grow:["",wt,Ft,Dt]}],shrink:[{shrink:["",wt,Ft,Dt]}],order:[{order:[yt,"first","last","none",Ft,Dt]}],"grid-cols":[{"grid-cols":v()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":v()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[i,"screen",...M()]}],"min-w":[{"min-w":[i,"screen","none",...M()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",r,Et,_t]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ft,Tt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kt,Dt]}],"font-family":[{font:[At,Dt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Ft,Dt]}],"line-clamp":[{"line-clamp":[wt,"none",Ft,Tt]}],leading:[{leading:[o,...y()]}],"list-image":[{"list-image":["none",Ft,Dt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ft,Dt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[wt,"from-font","auto",Ft,_t]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[wt,"auto",Ft,Dt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ft,Dt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ft,Dt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yt,Ft,Dt],radial:["",Ft,Dt],conic:[yt,Ft,Dt]},Ht,qt]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[wt,Ft,Dt]}],"outline-w":[{outline:["",wt,Et,_t]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,Bt,Wt]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",u,Bt,Wt]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[wt,_t]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",m,Bt,Wt]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[wt,Ft,Dt]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[wt]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[Ft,Dt]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[wt]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ft,Dt]}],filter:[{filter:["","none",Ft,Dt]}],blur:[{blur:W()}],brightness:[{brightness:[wt,Ft,Dt]}],contrast:[{contrast:[wt,Ft,Dt]}],"drop-shadow":[{"drop-shadow":["","none",h,Bt,Wt]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",wt,Ft,Dt]}],"hue-rotate":[{"hue-rotate":[wt,Ft,Dt]}],invert:[{invert:["",wt,Ft,Dt]}],saturate:[{saturate:[wt,Ft,Dt]}],sepia:[{sepia:["",wt,Ft,Dt]}],"backdrop-filter":[{"backdrop-filter":["","none",Ft,Dt]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[wt,Ft,Dt]}],"backdrop-contrast":[{"backdrop-contrast":[wt,Ft,Dt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",wt,Ft,Dt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wt,Ft,Dt]}],"backdrop-invert":[{"backdrop-invert":["",wt,Ft,Dt]}],"backdrop-opacity":[{"backdrop-opacity":[wt,Ft,Dt]}],"backdrop-saturate":[{"backdrop-saturate":[wt,Ft,Dt]}],"backdrop-sepia":[{"backdrop-sepia":["",wt,Ft,Dt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ft,Dt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[wt,"initial",Ft,Dt]}],ease:[{ease:["linear","initial",b,Ft,Dt]}],delay:[{delay:[wt,Ft,Dt]}],animate:[{animate:["none",x,Ft,Dt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,Ft,Dt]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:F()}],"rotate-x":[{"rotate-x":F()}],"rotate-y":[{"rotate-y":F()}],"rotate-z":[{"rotate-z":F()}],scale:[{scale:E()}],"scale-x":[{"scale-x":E()}],"scale-y":[{"scale-y":E()}],"scale-z":[{"scale-z":E()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[Ft,Dt,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:O()}],"translate-x":[{"translate-x":O()}],"translate-y":[{"translate-y":O()}],"translate-z":[{"translate-z":O()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ft,Dt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ft,Dt]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[wt,Et,_t,Tt]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Zt(...e){return Kt(function(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Ae(e))&&(n&&(n+=" "),n+=t);return n}(e))}const er=({startDate:e,endDate:a,onStartDateChange:o,onEndDateChange:s,startLabel:i="Start date",endLabel:l="End date",className:c})=>n.jsx("div",{className:Zt("flex flex-col gap-2",c),children:n.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[n.jsxs(r.Popover,{children:[n.jsx(r.PopoverTrigger,{asChild:!0,children:n.jsxs("button",{type:"button",className:Zt(We,"justify-start text-left w-[240px]",!e&&Fe),children:[n.jsx(P,{className:Zt("mr-2",Ee)}),e?Le(e,"PPP"):i]})}),n.jsx(r.PopoverContent,{className:"w-fit p-0",align:"start",children:n.jsx(t.Calendar,{mode:"single",selected:e,onSelect:o,initialFocus:!0})})]}),n.jsxs(r.Popover,{children:[n.jsx(r.PopoverTrigger,{asChild:!0,children:n.jsxs("button",{type:"button",className:Zt(We,"justify-start text-left w-[240px]",!a&&Fe),children:[n.jsx(P,{className:Zt("mr-2",Ee)}),a?Le(a,"PPP"):l]})}),n.jsx(r.PopoverContent,{className:"w-fit p-0",align:"start",children:n.jsx(t.Calendar,{mode:"single",selected:a,onSelect:s,initialFocus:!0})})]})]})}),tr=({value:e,onChange:t,fetcher:r,className:o})=>n.jsx(a.FKSelect,{fetcher:r,modelClass:"User",className:Zt("max-w-36 h-10",o),placeholder:"Creator user",emptyMessage:"No user found",labelName:"username",value:e,onChange:t});function rr({data:e}){return n.jsx(l.Stack,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(e).map(([e,t])=>n.jsx(l.Stack,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:n.jsxs("span",{className:"font-medium text-foreground",children:[e," : ",String(t)]})},e))})}const nr=({href:e,className:t,children:r})=>n.jsx("a",{href:e,className:t,children:r});const ar=({href:e,className:t,children:r})=>n.jsx("a",{href:e,className:t,children:r});const or=({href:e,className:t,children:r})=>n.jsx("a",{href:e,className:t,children:r});const sr=({href:e,className:t,children:r})=>n.jsx("a",{href:e,className:t,children:r});const ir={created_at:"Criado em",start_processing_at:"Início do Processamento",finished_processing_at:"Fim do Processamento",field_delimiter:"Delimitador de Campo",decimal_delimiter:"Delimitador Decimal",ignore_locked:"Ignorar Bloqueados",lock_data:"Bloquear Dados",origin:"Origem",format_type:"Tipo de Formato",process_status:"Status",description:"Descrição",row_permission:"Row Permission",created_by:"Created By",modeling_unit:"Modeling Unit",attribute:"Attribute",geoarea:"Geoarea"},lr=e=>{if(!e)return"";return new Date(e).toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})},cr=(e,t)=>({...ir,...t}[e]||e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")),dr=(e,t,r={})=>{if(null==e||""===e)return"N/A";if("process_status"===t&&r.statusLabels)return r.statusLabels[String(e)]??String(e);if(t.endsWith("_at")||t.includes("date")||t.includes("_time")){return(r.formatDate??lr)(String(e))||"N/A"}if("boolean"==typeof e){const t=r.booleanLabels??{true:"Sim",false:"Não"};return e?t.true:t.false}return"object"==typeof e?"N/A":String(e)},ur=(e,t)=>{const r=e[t];return r&&"object"==typeof r&&null!==r&&"__display_field__"in r?r.__display_field__:r},mr=["description","notes"],hr=[{title:"Informações Gerais",fields:["description","row_permission","origin","created_by","process_status","msg"],cols:4},{title:"Datas de Processamento",fields:["created_at","start_processing_at","finished_processing_at"],cols:3},{title:"Proteção dos Dados",fields:["ignore_locked","lock_data"],cols:4},{title:"Carregamento Manual",fields:["format_type","field_delimiter","decimal_delimiter","modeling_unit","attribute","geoarea"],cols:4}];const pr={description:"Descrição",code:"Código",notes:"Notas",force_temperature:"Temperatura Forçada",dimensions:"Tags",extra_info:"Informações extras"},fr=(e,t)=>t?.[e]?t[e]:pr[e]?pr[e]:e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");function gr({value:t={},onChange:r,name:a,placeholderKey:o="Chave",placeholderValue:s="Valor",disabled:c=!1}){const[d,m]=e.useState({key:"",value:""});return n.jsxs(l.Stack,{direction:"col",gap:2,children:[n.jsxs("div",{className:"flex gap-2",children:[n.jsx(u.Input,{type:"text",name:`${a}_key`,placeholder:o,value:d.key,disabled:c,onChange:e=>m(t=>({...t,key:e.target.value})),className:"flex-1"}),n.jsx(u.Input,{type:"text",name:`${a}_value`,placeholder:s,value:d.value,disabled:c,onChange:e=>m(t=>({...t,value:e.target.value})),className:"flex-1"}),n.jsx(i.Button,{type:"button",variant:"default",className:"px-4 py-2 shrink-0",id:`${a}_add`,onClick:()=>{const e=d.key.trim(),t=d.value.trim();e&&(r(r=>({...r&&"object"==typeof r?r:{},[e]:t})),m({key:"",value:""}))},disabled:c||!d.key.trim(),children:"Adicionar"})]}),Object.entries(t).length>0&&n.jsx(l.Stack,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(t).map(([e,t])=>n.jsxs(l.Stack,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:[n.jsxs("span",{className:"font-medium text-foreground",children:[e," : ",String(t)]}),!c&&n.jsx("button",{type:"button",onClick:()=>{return t=e,void r(e=>{const r={...e&&"object"==typeof e?e:{}};return delete r[t],r});var t},className:"rounded-full p-0 hover:bg-muted-foreground/20 hover:text-destructive hover:backgro transition-colors",children:"×"})]},e))})]})}const br=(e,t)=>{const r=document.createElement("a");r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)};exports.AuthenticatedView=function({redirectHref:t,redirectDelayMs:r=3e3,onRedirect:a,title:o="Autenticado com sucesso! Redirecionado automaticamente",fallbackLinkLabel:s="Caso nao seja redirecionado automaticamente, clique aqui",LinkComponent:i=or,className:l}){return e.useEffect(()=>{const e=setTimeout(()=>{a?.(t)},r);return()=>clearTimeout(e)},[t,r,a]),n.jsx("div",{className:"flex justify-center items-center h-screen",children:n.jsxs(d.Card,{className:l??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[n.jsx(d.CardHeader,{className:"items-center mt-4"}),n.jsxs(d.CardContent,{className:"flex flex-col gap-4",children:[n.jsx(h.Spinner,{}),n.jsx("h4",{className:"text-center",children:o}),n.jsx(i,{href:t,className:"w-full text-sm underline text-accent text-center",children:s})]})]})})},exports.AutoDetailContent=function({data:e,config:t,formatters:r,wrapperElements:a,statusLabels:o,formatDate:s}){const i=t?.sections||hr,c={statusLabels:o,formatDate:s},d=o=>{if(!(o in e))return null;const s=t?.labels?.[o]||cr(o,t?.labels),i=(r||[]).find(e=>e.key===o)?.formatter||t?.formatters?.[o],d=ur(e,o),u=i?i(d):dr(d,o,c),m=mr.includes(o),h=a?.find(e=>e.keys.includes(o));if(h?.element){const t=h.element({key:o,label:s,fieldValue:d,isFullWidth:m,data:e});return n.jsx(l.Stack,{direction:"col",className:m?"col-span-full min-w-0":"min-w-0",children:t},o)}return n.jsxs(l.Stack,{direction:"col",className:m?"col-span-full min-w-0":"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:s}),n.jsx("p",{className:"text-base break-words whitespace-pre-wrap",children:u})]},o)},u=e.results;return n.jsxs(l.Stack,{direction:"col",gap:6,children:[i.map(t=>{const r=t.fields.filter(t=>t in e);return 0===r.length?null:t.isFullWidth?n.jsxs(l.Stack,{direction:"col",gap:3,children:[n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:t.title}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-1 xl:grid-cols-1 gap-x-6 gap-y-4",children:r.map(e=>d(e))})]},t.title):n.jsxs(l.Stack,{direction:"col",gap:3,children:[n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:t.title}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-x-6 gap-y-4",children:r.map(e=>d(e))})]},t.title)}),Boolean(e.dimensions&&"object"==typeof e.dimensions&&Object.keys(e.dimensions).length>0)&&n.jsxs(l.Stack,{direction:"col",gap:3,children:[n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Tags"}),n.jsx(rr,{data:e.dimensions})]}),Boolean(e.extra_info&&"object"==typeof e.extra_info&&Object.keys(e.extra_info).length>0)&&n.jsxs(l.Stack,{direction:"col",gap:3,children:[n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Informações Extras"}),n.jsx(rr,{data:e.extra_info})]}),u?.processing_results&&n.jsx(p.Accordion,{type:"single",collapsible:!0,children:n.jsxs(p.AccordionItem,{value:"processing-results",className:"border-b-0",children:[n.jsx(p.AccordionTrigger,{className:"text-sm font-semibold text-foreground hover:no-underline py-2",children:"Resultados do Processamento"}),n.jsx(p.AccordionContent,{children:n.jsxs(l.Stack,{direction:"col",gap:4,children:[n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:[{label:"Adicionados",value:u.processing_results.count__added,color:"text-green-600"},{label:"Atualizados",value:u.processing_results.count__updated,color:"text-blue-600"},{label:"Sem Alteração",value:u.processing_results.count__no_change,color:"text-gray-600"}].map(e=>n.jsxs(l.Stack,{direction:"col",children:[n.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e.label}),n.jsx("p",{className:`text-2xl font-bold ${e.color}`,children:e.value})]},e.label))}),u.processing_results.details&&u.processing_results.details.length>0&&n.jsxs(l.Stack,{direction:"col",gap:2,children:[n.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Detalhes"}),n.jsx(l.Stack,{direction:"col",gap:2,children:u.processing_results.details.map((e,r)=>{const a=`detail-${r}-${Object.values(e).join("-")}`;return n.jsx(l.Stack,{className:"border rounded-lg p-3",children:n.jsx(l.Stack,{className:"grid grid-cols-4 gap-2",children:Object.entries(e).map(([e,r])=>n.jsxs(l.Stack,{direction:"col",children:[n.jsx("p",{className:"text-xs text-muted-foreground",children:cr(e,t?.labels)}),n.jsx("p",{className:"text-sm font-medium",children:dr(r,e,c)})]},e))})},a)})})]})]})})]})})]})},exports.AutoFormContent=function({fields:t,values:r,defaultValue:a={},onChange:o,errors:s={},config:i,customFields:c}){const[d,m]=e.useState(a),h=r??d,p=(e,t)=>{o?o(r=>{const n=r&&"object"==typeof r?r:h,a=n[e],o="function"==typeof t?t(a):t;return{...n,[e]:o}}):m(r=>{const n=r[e],a="function"==typeof t?t(n):t;return{...r,[e]:a}})};e.useEffect(()=>{Object.keys(a).length>0&&0===Object.keys(h).length&&m(a)},[a,h]);const x=Object.keys(t).filter(e=>!i?.exclude?.includes(e)),w=i?.sections||[{title:"Dados do Formulário",fields:x,cols:1}],y=(e,t)=>{const r=h[e]??"",a=s[e],o=t.disabled;if(c?.[e])return c[e]({value:r,onChange:t=>p(e,t),error:a,disabled:o,fieldKey:e});switch(t.type){case"textarea":return n.jsx(b.Textarea,{id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>p(e,t.target.value),required:t.required,disabled:o,className:Zt("min-h-[120px] w-full",a&&"border-destructive")});case"checkbox":return n.jsxs("div",{className:"flex items-center gap-2 py-2",children:[n.jsx(f.Checkbox,{id:e,name:e,checked:!!r,onCheckedChange:t=>p(e,!!t),disabled:o}),n.jsx("label",{htmlFor:e,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:fr(e,i?.labels)})]});case"select":return n.jsx(g.Select,{id:e,name:e,placeholder:t.placeholder||"Selecione...",options:t.options??[],value:null!=r?String(r):"",onValueChange:t=>p(e,t),required:t.required});case"key-value":return n.jsxs(n.Fragment,{children:[n.jsx(gr,{value:r||{},name:e,onChange:t=>p(e,t),placeholderKey:"Chave",placeholderValue:"Valor",disabled:o}),n.jsx("input",{type:"hidden",name:e,value:JSON.stringify(r||{})})]});case"number":return n.jsx(u.Input,{type:"number",id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>{const r=""===t.target.value?"":Number(t.target.value);p(e,r)},required:t.required,disabled:o,className:Zt("w-full",a&&"border-destructive")});case"date":return n.jsx(u.Input,{type:"date",id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>p(e,t.target.value),required:t.required,disabled:o,className:Zt("w-full",a&&"border-destructive")});default:return n.jsx(u.Input,{type:t.type,id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>p(e,t.target.value),required:t.required,disabled:o,className:Zt("w-full",a&&"border-destructive")})}};return n.jsx(l.Stack,{direction:"col",gap:6,className:"w-full",children:w.map(e=>{const r=e.fields.filter(e=>e in t&&!i?.exclude?.includes(e));if(0===r.length)return null;const a=1===e.cols?"grid-cols-1":2===e.cols?"grid-cols-1 sm:grid-cols-2":3===e.cols?"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";return n.jsxs(l.Stack,{direction:"col",gap:3,className:"w-full",children:[n.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e.title}),n.jsx("div",{className:Zt("grid gap-x-6 gap-y-4 w-full",a),children:r.map(r=>{const a=t[r],o=e.isFullWidth||"textarea"===a.type||"key-value"===a.type||4===a.cols,c=s[r],d="checkbox"!==a.type;return n.jsxs(l.Stack,{direction:"col",gap:1.5,className:Zt(o?"col-span-full":"",a.className),children:[d&&n.jsxs("label",{htmlFor:r,className:"text-fontcolor-secondary font-bold text-sm",children:[fr(r,i?.labels),a.required&&n.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),y(r,a),c&&n.jsx("span",{className:"text-xs text-destructive font-medium mt-0.5",children:c})]},r)})})]},e.title)})})},exports.CombinedFilterTable=()=>{const[t,r]=e.useState(),[a,l]=e.useState(),[c,d]=e.useState(null),u=[{pk:1,description:"Maintenance Task A",created_at:"2023-10-01",status:"Open",user_id:1,username:"admin"},{pk:2,description:"Inspection B",created_at:"2023-10-05",status:"Closed",user_id:2,username:"jdoe"},{pk:3,description:"Repair C",created_at:"2023-10-10",status:"In Progress",user_id:1,username:"admin"},{pk:4,description:"Log Analysis",created_at:"2023-10-15",status:"Open",user_id:3,username:"guest"},{pk:5,description:"System Update",created_at:"2023-11-01",status:"Pending",user_id:2,username:"jdoe"}],m=u.filter(e=>{let r=!0;const n=new Date(e.created_at);return t&&n<t&&(r=!1),a&&n>a&&(r=!1),c&&e.user_id!==Number(c)&&(r=!1),r});return n.jsxs("div",{className:"flex flex-col gap-6 p-4 border rounded-lg bg-white",children:[n.jsx("h2",{className:"text-xl font-bold",children:"Combined Filter & Table Demo"}),n.jsxs("div",{className:"flex flex-wrap gap-4 items-end",children:[n.jsx(er,{startDate:t,endDate:a,onStartDateChange:r,onEndDateChange:l}),n.jsx(tr,{fetcher:async({search:e,modelClass:t,limit:r,offset:n})=>{await new Promise(e=>setTimeout(e,300));const a=[{pk:1,username:"admin"},{pk:2,username:"jdoe"},{pk:3,username:"guest"}];return e?a.filter(t=>t.username.toLowerCase().includes(e.toLowerCase())):a},value:c,onChange:e=>d(e)}),n.jsx(i.Button,{variant:"outline",className:"h-full",onClick:()=>{r(void 0),l(void 0),d(null)},children:"Clear Filters"})]}),n.jsx("div",{className:"border rounded-md overflow-hidden",children:n.jsxs(o.PumpwoodTable.Root,{children:[n.jsx(o.PumpwoodTable.Header,{children:n.jsxs(o.PumpwoodTable.Row,{children:[n.jsx(o.PumpwoodTable.Head,{children:"ID"}),n.jsx(o.PumpwoodTable.Head,{children:"Description"}),n.jsx(o.PumpwoodTable.Head,{children:"Created At"}),n.jsx(o.PumpwoodTable.Head,{children:"Created By"}),n.jsx(o.PumpwoodTable.Head,{children:"Status"})]})}),n.jsx(o.PumpwoodTable.Body,{children:m.length>0?m.map(e=>n.jsxs(o.PumpwoodTable.Row,{children:[n.jsx(o.PumpwoodTable.Cell,{children:e.pk}),n.jsx(o.PumpwoodTable.Cell,{children:e.description}),n.jsx(o.PumpwoodTable.Cell,{children:Le(new Date(e.created_at),"PPP")}),n.jsx(o.PumpwoodTable.Cell,{children:e.username}),n.jsx(o.PumpwoodTable.Cell,{children:e.status})]},e.pk)):n.jsx(o.PumpwoodTable.Row,{children:n.jsx(o.PumpwoodTable.Cell,{colSpan:5,children:n.jsx(s.EmptyContainer,{title:"No results found",description:"No data was found for the selected filters."})})})})]})}),n.jsxs("div",{className:"text-xs text-gray-400",children:["Showing ",m.length," of ",u.length," records."]})]})},exports.CreatedByUserFilter=tr,exports.CustomBreadcrumb=function({label:t,steps:r=[]}){return n.jsx(x.Breadcrumb,{className:"mb-6",children:n.jsxs(x.BreadcrumbList,{children:[n.jsx(x.BreadcrumbItem,{children:n.jsx(x.BreadcrumbPage,{className:"text-primary font-medium",children:t})}),r.map(t=>n.jsxs(e.Fragment,{children:[n.jsx(x.BreadcrumbSeparator,{}),n.jsx(x.BreadcrumbItem,{children:n.jsx(x.BreadcrumbPage,{className:"text-muted-foreground",children:t})})]},`step-fragment-${t}`))]})})},exports.DateRangeFilter=er,exports.DetailPage=function({title:e,titleAddon:t,isLoading:r=!1,error:a=null,onBack:o,actions:s,sections:c=[],children:d,loadingComponent:u,errorComponent:m,backButtonLabel:f="Voltar"}){return r?u??n.jsx(l.Stack,{className:"justify-center items-center p-8",children:n.jsx(h.Spinner,{})}):a?m??n.jsx(l.Stack,{className:"justify-center items-center p-8",children:n.jsx("p",{className:"text-destructive",children:a.message})}):n.jsxs(l.Stack,{direction:"col",gap:4,children:[n.jsxs(l.Stack,{direction:"row",gap:4,className:"justify-between items-center",children:[n.jsxs(l.Stack,{direction:"row",gap:4,className:"items-center",children:[o&&n.jsx(i.Button,{variant:"ghost",size:"icon",onClick:o,title:f,children:n.jsx(M,{className:"size-4"})}),n.jsx("h1",{className:"text-2xl font-semibold text-surface-secondary",children:e}),t]}),s&&n.jsx(l.Stack,{direction:"row",gap:2,children:s})]}),c.map((e,t)=>{const r=e.id??`section-${t}`;return n.jsx(p.Accordion,{type:"single",collapsible:!0,defaultValue:e.defaultOpen?r:void 0,className:"w-full",children:n.jsxs(p.AccordionItem,{value:r,className:"border-b",children:[n.jsx(p.AccordionTrigger,{className:"hover:no-underline text-base font-normal text-surface-secondary",children:e.title}),n.jsx(p.AccordionContent,{className:"pt-4",children:e.content})]})},r)}),d]})},exports.FULL_WIDTH_DETAIL_FIELDS=mr,exports.FilePreview=({fileUrl:e,fileName:t,isLoading:r=!1,getFileType:a,ImageComponent:o})=>{if(r)return n.jsx(l.Stack,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:n.jsx(l.Loading,{})});if(!e||!t)return n.jsxs(l.Stack,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:[n.jsx(W,{className:"w-16 h-16 text-muted-foreground"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"No file available"})]});const s=a(t);return n.jsx(l.Stack,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] h-full overflow-hidden relative",children:(()=>{switch(s){case"image":return n.jsx(l.Stack,{direction:"col",className:"w-full h-full items-center justify-center relative",children:o?n.jsx(o,{src:e,alt:t,fill:!0,className:"object-contain"}):n.jsx("img",{src:e,alt:t,className:"max-w-full max-h-full object-contain"})});case"video":return n.jsx(l.Stack,{direction:"col",className:"w-full h-full items-center justify-center relative",children:n.jsxs("video",{src:e,controls:!0,className:"w-full h-full object-contain",children:[n.jsx("track",{kind:"captions"}),"Your browser does not support the video tag."]})});case"pdf":return n.jsx(l.Stack,{direction:"col",className:"w-full h-full items-center justify-center relative",children:n.jsx("iframe",{src:e,className:"w-full h-full border-0",title:t})});case"doc":case"excel":case"ppt":return n.jsxs(l.Stack,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[n.jsx(L,{className:"w-20 h-20 text-muted-foreground"}),n.jsxs(l.Stack,{direction:"col",gap:1,className:"text-center",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t}),n.jsxs("p",{className:"text-xs text-muted-foreground uppercase",children:[s," Document"]})]}),n.jsxs(i.Button,{variant:"outline",size:"default",className:"mt-4",onClick:()=>br(e,t),children:[n.jsx(T,{className:"w-4 h-4 mr-2"}),"Download"]})]});default:return n.jsxs(l.Stack,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[n.jsx(q,{className:"w-16 h-16 text-muted-foreground"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:t}),n.jsxs(i.Button,{variant:"outline",size:"sm",onClick:()=>br(e,t),children:[n.jsx(T,{className:"w-4 h-4 mr-2"}),"Download"]})]})}})()})},exports.KeyValueContent=rr,exports.LoginCard=function({onLogin:t,onSuccess:r,onError:a,sessionExpired:o=!1,sessionExpiredAlert:s,forgotPasswordHref:h="/",forgotPasswordLabel:p="Esqueci a senha",usernameLabel:f="Usuario",passwordLabel:g="Senha",submitLabel:b="Entrar",loginErrorMessage:x="Login error!",LinkComponent:w=nr,className:y}){const[k,v]=e.useState(""),[j,N]=e.useState(""),[C,S]=e.useState(!1);return n.jsxs(l.Stack,{gap:4,children:[o&&s?.icon&&n.jsx(c.AlertWithIcon,{variant:"destructive",icon:s.icon,title:s.title??"Sessão expirada",description:s.description??"Faça login novamente para continuar"}),n.jsxs(d.Card,{className:y??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[n.jsx(d.CardHeader,{className:"items-center"}),n.jsx(d.CardContent,{children:n.jsx("form",{onSubmit:e=>e.preventDefault(),children:n.jsxs("div",{className:"grid w-full items-center gap-4 mt-6",children:[n.jsxs(l.Stack,{gap:4,children:[n.jsx(m.Label,{className:"text-primary",htmlFor:"username",children:f}),n.jsx(u.Input,{id:"username",type:"text",placeholder:"Seu nome de usuário",value:k,onChange:e=>v(e.target.value)})]}),n.jsxs(l.Stack,{gap:4,children:[n.jsx(m.Label,{className:"text-primary",htmlFor:"password",children:g}),n.jsx(u.Input,{id:"password",type:"password",placeholder:"Sua senha de acesso",value:j,onChange:e=>N(e.target.value)})]})]})})}),n.jsx(d.CardFooter,{className:"justify-center items-center",children:n.jsxs(l.Stack,{gap:4,className:"justify-center items-center mt-10",children:[n.jsx(i.Button,{className:"w-full",onClick:async()=>{S(!0);try{const{error:e}=await t({username:k,password:j});if(e)return void a?.(x,String(e));r?.()}finally{S(!1)}},disabled:C,children:b}),n.jsx(w,{href:h,className:"text-primary text-xs",children:p})]})})]})]})},exports.LoginCardSSO=function({onLoginSSO:t,onRedirect:r,onError:a,sessionExpired:o=!1,sessionExpiredAlert:s,forgotPasswordHref:h="/",forgotPasswordLabel:p="Esqueci a senha",emailLabel:f="Email",submitLabel:g="Entrar com SSO",unauthorizedMessage:b="Usuario nao autorizado",genericErrorMessage:x="Erro ao fazer login",LinkComponent:w=ar,className:y}){const[k,v]=e.useState(""),[j,N]=e.useState(!1);return n.jsxs(l.Stack,{gap:4,children:[o&&s?.icon&&n.jsx(c.AlertWithIcon,{variant:"destructive",icon:s.icon,title:s.title??"Sessão expirada",description:s.description??"Faça login novamente para continuar"}),n.jsxs(d.Card,{className:y??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[n.jsx(d.CardHeader,{className:"items-center mt-4"}),n.jsx(d.CardContent,{children:n.jsx("form",{onSubmit:async e=>{e.preventDefault(),N(!0);try{const{redirect_url:e,error:n}=await t(k);if(e)return void r?.(e);const o=n?.includes("401")?b:x;a?.(o,String(n))}finally{N(!1)}},children:n.jsxs("div",{className:"grid w-full items-center gap-4 mt-6",children:[n.jsxs(l.Stack,{gap:4,children:[n.jsx(m.Label,{className:"text-primary",htmlFor:"email",children:f}),n.jsx(u.Input,{id:"email",type:"email",placeholder:"Seu email de acesso",value:k,onChange:e=>v(e.target.value),pattern:"^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$",required:!0})]}),n.jsx(i.Button,{className:"w-full",type:"submit",disabled:j,children:g})]})})}),n.jsx(d.CardFooter,{className:"flex-col justify-center items-center",children:n.jsx(l.Stack,{gap:4,className:"justify-start items-center mb-7",children:n.jsx(w,{href:h,className:"text-primary text-xs",children:p})})})]})]})},exports.NavigationSidebar=function({links:t,iconMap:r,pathname:a,isSidebarCollapsedFromQuery:o=!1,logo:s,onLogout:i,logoutIcon:c=F,logoutLabel:d="Logout",LinkComponent:u,ImageComponent:m}){const h=a.split("/")[2]??"",{isCollapsed:p,isCollapsing:f,expandedItems:g,setExpandedItems:b,toggleCollapse:x,toggleExpanded:k,handleTransitionEnd:v,setExpandedOnCollapse:j}=y.useSidebarCollapse({initialCollapsed:o,onPersist:e=>{const t=new URLSearchParams;t.set("sidebar-collapsed",String(e)),window.history.replaceState({},"",`${window.location.pathname}?${t}`)}});return e.useEffect(()=>{if(!o){const e={};t.forEach(t=>{if(t.subItems){t.subItems.some(e=>a===e.href)&&(e[t.title]=!0)}}),b(e)}},[o,t,a,b]),n.jsxs(w.Sidebar.Root,{isCollapsed:p,isCollapsing:f,onToggleCollapse:()=>{p||j(),x()},onTransitionEnd:v,className:"h-full",children:[n.jsxs(l.Stack,{className:"w-full shrink-0 items-center gap-1 mb-2",children:[n.jsx(w.Sidebar.Toggle,{}),n.jsx(w.Sidebar.Logo,{src:s.src,width:s.width,height:s.height,collapsedWidth:s.collapsedWidth,collapsedHeight:s.collapsedHeight,alt:s.alt,ImageComponent:m})]}),n.jsx(w.Sidebar.Content,{className:"mt-6",children:t.map(e=>{const t=r[e.icon];if(!!e.subItems?.length){const r=e.subItems?.some(e=>a===e.href||h===e.href.split("/")[2]);return n.jsx(w.Sidebar.NavGroup,{icon:t,title:e.title,isExpanded:!!g[e.title],isActive:!!r,onToggle:()=>k(e.title),children:e.subItems?.map(e=>{const t=a===e.href;return n.jsx(w.Sidebar.NavSubLink,{title:e.title,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:t,LinkComponent:u},e.href)})},e.title)}const o=e.href?.split("/")[2]??"";return n.jsx(w.Sidebar.Link,{icon:t,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:h===o,LinkComponent:u,children:e.title},e.href)})}),n.jsx(w.Sidebar.Footer,{children:n.jsx(w.Sidebar.Action,{icon:c,label:d,onClick:async()=>{await i()}})})]})},exports.NotAuthenticatedView=function({error:t,loginHref:r,title:a="Erro ao autenticar!",description:o="Verifique suas informações de SSO ou converse com o administrador do sistema.",fallbackLinkLabel:s="Caso não seja redirecionado automaticamente, clique aqui",errorDetailsLabel:i="Detalhes para os Nerds",copyLabel:c="Copiar",copiedLabel:u="Copiado!",LinkComponent:m=sr,className:h}){const[f,g]=e.useState(!1),b="string"==typeof t?t:JSON.stringify(t,null,2);return n.jsx(l.Stack,{className:"justify-center items-center h-screen",children:n.jsxs(d.Card,{className:h??"w-[400px] h-[457px] rounded-[30px] shadow-lg bg-red-50",children:[n.jsx(d.CardHeader,{className:"items-center"}),n.jsxs(d.CardContent,{className:"flex flex-col items-center gap-2",children:[n.jsx(D,{size:48,className:"text-red-700"}),n.jsx("h4",{className:"text-center",children:a}),n.jsx("p",{className:"text-sm text-center",children:o}),n.jsx(m,{href:r,className:"w-full text-sm underline text-accent text-center",children:s}),n.jsx(p.Accordion,{type:"single",collapsible:!0,className:"w-full",children:n.jsxs(p.AccordionItem,{value:"error-details",children:[n.jsx(p.AccordionTrigger,{children:i}),n.jsxs(p.AccordionContent,{className:"max-w-80",children:[n.jsx("div",{className:"flex justify-end mb-1",children:n.jsx("button",{type:"button",onClick:async()=>{if(t)try{await navigator.clipboard.writeText("string"==typeof t?t:JSON.stringify(t,null,2)),g(!0),setTimeout(()=>g(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},className:"text-xs text-accent hover:underline flex items-center gap-1",children:f?n.jsxs(n.Fragment,{children:[n.jsx(z,{size:14,className:"text-green-600"})," ",u]}):n.jsxs(n.Fragment,{children:[n.jsx(_,{size:14})," ",c]})})}),n.jsx("div",{className:"max-h-24 overflow-y-auto overflow-x-hidden",children:n.jsx("pre",{className:"bg-gray-100 p-4 rounded-md",children:n.jsx("code",{className:"text-sm text-red-600 dark:text-red-400 whitespace-pre-wrap break-words",children:b})})})]})]})})]})]})})},exports.formatDetailLabel=cr,exports.formatDetailValue=dr,exports.getDetailFieldValue=ur;
|
|
27
|
+
*/function O(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&A in e?e[A](t):e instanceof Date?new e.constructor(t):new Date(t)}function I(e,t){return O(t||e,e)}let H={};function B(){return H}function G(e,t){const r=B(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=I(e,t?.in),o=n.getDay(),s=(o<a?7:0)+o-a;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function Y(e,t){return G(e,{...t,weekStartsOn:1})}function $(e,t){const r=I(e,t?.in),a=r.getFullYear(),n=O(r,0);n.setFullYear(a+1,0,4),n.setHours(0,0,0,0);const o=Y(n),s=O(r,0);s.setFullYear(a,0,4),s.setHours(0,0,0,0);const i=Y(s);return r.getTime()>=o.getTime()?a+1:r.getTime()>=i.getTime()?a:a-1}function V(e){const t=I(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function R(e,t){const r=I(e,t?.in);return r.setHours(0,0,0,0),r}function Q(e,t,r){const[a,n]=function(e,...t){const r=O.bind(null,t.find(e=>"object"==typeof e));return t.map(r)}(0,e,t),o=R(a),s=R(n),i=+o-V(o),l=+s-V(s);return Math.round((i-l)/864e5)}function U(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+I(e)));var t}const X={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function J(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const K={date:J({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:J({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:J({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Z={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ee(e){return(t,r)=>{let a;if("formatting"===(r?.context?String(r.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,n=r?.width?String(r.width):t;a=e.formattingValues[n]||e.formattingValues[t]}else{const t=e.defaultWidth,n=r?.width?String(r.width):e.defaultWidth;a=e.values[n]||e.values[t]}return a[e.argumentCallback?e.argumentCallback(t):t]}}const te={ordinalNumber:(e,t)=>{const r=Number(e),a=r%100;if(a>20||a<10)switch(a%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:ee({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ee({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:ee({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ee({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ee({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function re(e){return(t,r={})=>{const a=r.width,n=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(n);if(!o)return null;const s=o[0],i=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?function(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r;return}(i,e=>e.test(s)):function(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r;return}(i,e=>e.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;return{value:c,rest:t.slice(s.length)}}}const ae={ordinalNumber:(ne={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const r=e.match(ne.matchPattern);if(!r)return null;const a=r[0],n=e.match(ne.parsePattern);if(!n)return null;let o=ne.valueCallback?ne.valueCallback(n[0]):n[0];return o=t.valueCallback?t.valueCallback(o):o,{value:o,rest:e.slice(a.length)}}),era:re({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:re({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:re({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:re({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:re({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var ne;const oe={code:"en-US",formatDistance:(e,t,r)=>{let a;const n=X[e];return a="string"==typeof n?n:1===t?n.one:n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+a:a+" ago":a},formatLong:K,formatRelative:(e,t,r,a)=>Z[e],localize:te,match:ae,options:{weekStartsOn:0,firstWeekContainsDate:1}};function se(e,t){const r=I(e,t?.in),a=Q(r,function(e,t){const r=I(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}(r));return a+1}function ie(e,t){const r=I(e,t?.in),a=+Y(r)-+function(e,t){const r=$(e,t),a=O(e,0);return a.setFullYear(r,0,4),a.setHours(0,0,0,0),Y(a)}(r);return Math.round(a/E)+1}function le(e,t){const r=I(e,t?.in),a=r.getFullYear(),n=B(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=O(t?.in||e,0);s.setFullYear(a+1,0,o),s.setHours(0,0,0,0);const i=G(s,t),l=O(t?.in||e,0);l.setFullYear(a,0,o),l.setHours(0,0,0,0);const c=G(l,t);return+r>=+i?a+1:+r>=+c?a:a-1}function ce(e,t){const r=I(e,t?.in),a=+G(r,t)-+function(e,t){const r=B(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=le(e,t),o=O(t?.in||e,0);return o.setFullYear(n,0,a),o.setHours(0,0,0,0),G(o,t)}(r,t);return Math.round(a/E)+1}function de(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const ue={y(e,t){const r=e.getFullYear(),a=r>0?r:1-r;return de("yy"===t?a%100:a,t.length)},M(e,t){const r=e.getMonth();return"M"===t?String(r+1):de(r+1,2)},d:(e,t)=>de(e.getDate(),t.length),a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>de(e.getHours()%12||12,t.length),H:(e,t)=>de(e.getHours(),t.length),m:(e,t)=>de(e.getMinutes(),t.length),s:(e,t)=>de(e.getSeconds(),t.length),S(e,t){const r=t.length,a=e.getMilliseconds();return de(Math.trunc(a*Math.pow(10,r-3)),t.length)}},me="midnight",he="noon",pe="morning",fe="afternoon",ge="evening",be="night",xe={G:function(e,t,r){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(a,{width:"abbreviated"});case"GGGGG":return r.era(a,{width:"narrow"});default:return r.era(a,{width:"wide"})}},y:function(e,t,r){if("yo"===t){const t=e.getFullYear(),a=t>0?t:1-t;return r.ordinalNumber(a,{unit:"year"})}return ue.y(e,t)},Y:function(e,t,r,a){const n=le(e,a),o=n>0?n:1-n;if("YY"===t){return de(o%100,2)}return"Yo"===t?r.ordinalNumber(o,{unit:"year"}):de(o,t.length)},R:function(e,t){return de($(e),t.length)},u:function(e,t){return de(e.getFullYear(),t.length)},Q:function(e,t,r){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return de(a,2);case"Qo":return r.ordinalNumber(a,{unit:"quarter"});case"QQQ":return r.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(a,{width:"narrow",context:"formatting"});default:return r.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,r){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return de(a,2);case"qo":return r.ordinalNumber(a,{unit:"quarter"});case"qqq":return r.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(a,{width:"narrow",context:"standalone"});default:return r.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,r){const a=e.getMonth();switch(t){case"M":case"MM":return ue.M(e,t);case"Mo":return r.ordinalNumber(a+1,{unit:"month"});case"MMM":return r.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(a,{width:"narrow",context:"formatting"});default:return r.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,r){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return de(a+1,2);case"Lo":return r.ordinalNumber(a+1,{unit:"month"});case"LLL":return r.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(a,{width:"narrow",context:"standalone"});default:return r.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,r,a){const n=ce(e,a);return"wo"===t?r.ordinalNumber(n,{unit:"week"}):de(n,t.length)},I:function(e,t,r){const a=ie(e);return"Io"===t?r.ordinalNumber(a,{unit:"week"}):de(a,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):ue.d(e,t)},D:function(e,t,r){const a=se(e);return"Do"===t?r.ordinalNumber(a,{unit:"dayOfYear"}):de(a,t.length)},E:function(e,t,r){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,r,a){const n=e.getDay(),o=(n-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return de(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,a){const n=e.getDay(),o=(n-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return de(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){const a=e.getDay(),n=0===a?7:a;switch(t){case"i":return String(n);case"ii":return de(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const a=e.getHours();let n;switch(n=12===a?he:0===a?me:a/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){const a=e.getHours();let n;switch(n=a>=17?ge:a>=12?fe:a>=4?pe:be,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return ue.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):ue.H(e,t)},K:function(e,t,r){const a=e.getHours()%12;return"Ko"===t?r.ordinalNumber(a,{unit:"hour"}):de(a,t.length)},k:function(e,t,r){let a=e.getHours();return 0===a&&(a=24),"ko"===t?r.ordinalNumber(a,{unit:"hour"}):de(a,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):ue.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ue.s(e,t)},S:function(e,t){return ue.S(e,t)},X:function(e,t,r){const a=e.getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return ye(a);case"XXXX":case"XX":return ke(a);default:return ke(a,":")}},x:function(e,t,r){const a=e.getTimezoneOffset();switch(t){case"x":return ye(a);case"xxxx":case"xx":return ke(a);default:return ke(a,":")}},O:function(e,t,r){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+we(a,":");default:return"GMT"+ke(a,":")}},z:function(e,t,r){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+we(a,":");default:return"GMT"+ke(a,":")}},t:function(e,t,r){return de(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return de(+e,t.length)}};function we(e,t=""){const r=e>0?"-":"+",a=Math.abs(e),n=Math.trunc(a/60),o=a%60;return 0===o?r+String(n):r+String(n)+t+de(o,2)}function ye(e,t){if(e%60==0){return(e>0?"-":"+")+de(Math.abs(e)/60,2)}return ke(e,t)}function ke(e,t=""){const r=e>0?"-":"+",a=Math.abs(e);return r+de(Math.trunc(a/60),2)+t+de(a%60,2)}const ve=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},je=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Ne={p:je,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],a=r[1],n=r[2];if(!n)return ve(e,t);let o;switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",ve(a,t)).replace("{{time}}",je(n,t))}},Ce=/^D+$/,Se=/^Y+$/,Me=["D","DD","YY","YYYY"];const Pe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ze=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,De=/^'([^]*?)'?$/,_e=/''/g,Te=/[a-zA-Z]/;function Le(e,t,r){const a=B(),n=a.locale??oe,o=a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=a.weekStartsOn??a.locale?.options?.weekStartsOn??0,i=I(e,r?.in);if(!U(i))throw new RangeError("Invalid time value");let l=t.match(ze).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,Ne[t])(e,n.formatLong)}return e}).join("").match(Pe).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:qe(e)};if(xe[t])return{isToken:!0,value:e};if(t.match(Te))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});n.localize.preprocessor&&(l=n.localize.preprocessor(i,l));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:n};return l.map(r=>{if(!r.isToken)return r.value;const a=r.value;(function(e){return Se.test(e)}(a)||function(e){return Ce.test(e)}(a))&&function(e,t,r){const a=function(e,t,r){const a="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,r);if(console.warn(a),Me.includes(e))throw new RangeError(a)}(a,t,String(e));return(0,xe[a[0]])(i,a,n.localize,c)}).join("")}function qe(e){const t=e.match(De);return t?t[1].replace(_e,"'"):e}const We="flex h-10 w-full items-center rounded-md border border-input bg-background px-3 text-sm font-normal shadow-none hover:bg-[hsl(var(--hover-ring))] hover:border-[hsl(var(--focus-ring))] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",Fe="text-muted-foreground",Ee="size-4 shrink-0 text-muted-foreground opacity-50";function Ae(e){var t,r,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Ae(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}const Oe=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ie="-",He=[],Be=e=>{const t=$e(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return Ye(e);const r=e.split(Ie),a=""===r[0]&&r.length>1?1:0;return Ge(r,a,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=a[e],n=r[e];return t?n?((e,t)=>{const r=new Array(e.length+t.length);for(let t=0;t<e.length;t++)r[t]=e[t];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r})(n,t):t:n||He}return r[e]||He}}},Ge=(e,t,r)=>{if(0===e.length-t)return r.classGroupId;const a=e[t],n=r.nextPart.get(a);if(n){const r=Ge(e,t+1,n);if(r)return r}const o=r.validators;if(null===o)return;const s=0===t?e.join(Ie):e.slice(t).join(Ie),i=o.length;for(let e=0;e<i;e++){const t=o[e];if(t.validator(s))return t.classGroupId}},Ye=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?"arbitrary.."+a:void 0})(),$e=e=>{const{theme:t,classGroups:r}=e;return Ve(r,t)},Ve=(e,t)=>{const r=Oe();for(const a in e){const n=e[a];Re(n,r,a,t)}return r},Re=(e,t,r,a)=>{const n=e.length;for(let o=0;o<n;o++){const n=e[o];Qe(n,t,r,a)}},Qe=(e,t,r,a)=>{"string"!=typeof e?"function"!=typeof e?Je(e,t,r,a):Xe(e,t,r,a):Ue(e,t,r)},Ue=(e,t,r)=>{(""===e?t:Ke(t,e)).classGroupId=r},Xe=(e,t,r,a)=>{Ze(e)?Re(e(a),t,r,a):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(r,e)))},Je=(e,t,r,a)=>{const n=Object.entries(e),o=n.length;for(let e=0;e<o;e++){const[o,s]=n[e];Re(s,Ke(t,o),r,a)}},Ke=(e,t)=>{let r=e;const a=t.split(Ie),n=a.length;for(let e=0;e<n;e++){const t=a[e];let n=r.nextPart.get(t);n||(n=Oe(),r.nextPart.set(t,n)),r=n}return r},Ze=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,et=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const n=(n,o)=>{r[n]=o,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=a[e])?(n(e,t),t):void 0},set(e,t){e in r?r[e]=t:n(e,t)}}},tt=[],rt=(e,t,r,a,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:n}),at=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=e=>{const t=[];let r,a=0,n=0,o=0;const s=e.length;for(let i=0;i<s;i++){const s=e[i];if(0===a&&0===n){if(":"===s){t.push(e.slice(o,i)),o=i+1;continue}if("/"===s){r=i;continue}}"["===s?a++:"]"===s?a--:"("===s?n++:")"===s&&n--}const i=0===t.length?e:e.slice(o);let l=i,c=!1;i.endsWith("!")?(l=i.slice(0,-1),c=!0):i.startsWith("!")&&(l=i.slice(1),c=!0);return rt(t,c,l,r&&r>o?r-o:void 0)};if(t){const e=t+":",r=a;a=t=>t.startsWith(e)?r(t.slice(e.length)):rt(tt,!1,t,void 0,!0)}if(r){const e=a;a=t=>r({className:t,parseClassName:e})}return a},nt=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,r)=>{t.set(e,1e6+r)}),e=>{const r=[];let a=[];for(let n=0;n<e.length;n++){const o=e[n],s="["===o[0],i=t.has(o);s||i?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(o)):a.push(o)}return a.length>0&&(a.sort(),r.push(...a)),r}},ot=/\s+/,st=e=>{if("string"==typeof e)return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=st(e[a]))&&(r&&(r+=" "),r+=t);return r},it=(e,...t)=>{let r,a,n,o;const s=e=>{const t=a(e);if(t)return t;const o=((e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:n,sortModifiers:o}=t,s=[],i=e.trim().split(ot);let l="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:h}=r(t);if(c){l=t+(l.length>0?" "+l:l);continue}let p=!!h,f=a(p?m.substring(0,h):m);if(!f){if(!p){l=t+(l.length>0?" "+l:l);continue}if(f=a(m),!f){l=t+(l.length>0?" "+l:l);continue}p=!1}const g=0===d.length?"":1===d.length?d[0]:o(d).join(":"),b=u?g+"!":g,x=b+f;if(s.indexOf(x)>-1)continue;s.push(x);const w=n(f,p);for(let e=0;e<w.length;++e){const t=w[e];s.push(b+t)}l=t+(l.length>0?" "+l:l)}return l})(e,r);return n(e,o),o};return o=i=>{const l=t.reduce((e,t)=>t(e),e());return r=(e=>({cache:et(e.cacheSize),parseClassName:at(e),sortModifiers:nt(e),...Be(e)}))(l),a=r.cache.get,n=r.cache.set,o=s,s(i)},(...e)=>o(((...e)=>{let t,r,a=0,n="";for(;a<e.length;)(t=e[a++])&&(r=st(t))&&(n&&(n+=" "),n+=r);return n})(...e))},lt=[],ct=e=>{const t=t=>t[e]||lt;return t.isThemeGetter=!0,t},dt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ut=/^\((?:(\w[\w-]*):)?(.+)\)$/i,mt=/^\d+\/\d+$/,ht=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ft=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xt=e=>mt.test(e),wt=e=>!!e&&!Number.isNaN(Number(e)),yt=e=>!!e&&Number.isInteger(Number(e)),kt=e=>e.endsWith("%")&&wt(e.slice(0,-1)),vt=e=>ht.test(e),jt=()=>!0,Nt=e=>pt.test(e)&&!ft.test(e),Ct=()=>!1,St=e=>gt.test(e),Mt=e=>bt.test(e),Pt=e=>!Dt(e)&&!Ft(e),zt=e=>Gt(e,Rt,Ct),Dt=e=>dt.test(e),_t=e=>Gt(e,Qt,Nt),Tt=e=>Gt(e,Ut,wt),Lt=e=>Gt(e,$t,Ct),qt=e=>Gt(e,Vt,Mt),Wt=e=>Gt(e,Jt,St),Ft=e=>ut.test(e),Et=e=>Yt(e,Qt),At=e=>Yt(e,Xt),Ot=e=>Yt(e,$t),It=e=>Yt(e,Rt),Ht=e=>Yt(e,Vt),Bt=e=>Yt(e,Jt,!0),Gt=(e,t,r)=>{const a=dt.exec(e);return!!a&&(a[1]?t(a[1]):r(a[2]))},Yt=(e,t,r=!1)=>{const a=ut.exec(e);return!!a&&(a[1]?t(a[1]):r)},$t=e=>"position"===e||"percentage"===e,Vt=e=>"image"===e||"url"===e,Rt=e=>"length"===e||"size"===e||"bg-size"===e,Qt=e=>"length"===e,Ut=e=>"number"===e,Xt=e=>"family-name"===e,Jt=e=>"shadow"===e,Kt=it(()=>{const e=ct("color"),t=ct("font"),r=ct("text"),a=ct("font-weight"),n=ct("tracking"),o=ct("leading"),s=ct("breakpoint"),i=ct("container"),l=ct("spacing"),c=ct("radius"),d=ct("shadow"),u=ct("inset-shadow"),m=ct("text-shadow"),h=ct("drop-shadow"),p=ct("blur"),f=ct("perspective"),g=ct("aspect"),b=ct("ease"),x=ct("animate"),w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ft,Dt],y=()=>[Ft,Dt,l],k=()=>[xt,"full","auto",...y()],v=()=>[yt,"none","subgrid",Ft,Dt],j=()=>["auto",{span:["full",yt,Ft,Dt]},yt,Ft,Dt],N=()=>[yt,"auto",Ft,Dt],C=()=>["auto","min","max","fr",Ft,Dt],S=()=>["auto",...y()],M=()=>[xt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],P=()=>[e,Ft,Dt],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ot,Lt,{position:[Ft,Dt]}],D=()=>["auto","cover","contain",It,zt,{size:[Ft,Dt]}],_=()=>[kt,Et,_t],T=()=>["","none","full",c,Ft,Dt],L=()=>["",wt,Et,_t],q=()=>[wt,kt,Ot,Lt],W=()=>["","none",p,Ft,Dt],F=()=>["none",wt,Ft,Dt],E=()=>["none",wt,Ft,Dt],A=()=>[wt,Ft,Dt],O=()=>[xt,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[vt],breakpoint:[vt],color:[jt],container:[vt],"drop-shadow":[vt],ease:["in","out","in-out"],font:[Pt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[vt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[vt],shadow:[vt],spacing:["px",wt],text:[vt],"text-shadow":[vt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xt,Dt,Ft,g]}],container:["container"],columns:[{columns:[wt,Dt,Ft,i]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[yt,"auto",Ft,Dt]}],basis:[{basis:[xt,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[wt,xt,"auto","initial","none",Dt]}],grow:[{grow:["",wt,Ft,Dt]}],shrink:[{shrink:["",wt,Ft,Dt]}],order:[{order:[yt,"first","last","none",Ft,Dt]}],"grid-cols":[{"grid-cols":v()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":v()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[i,"screen",...M()]}],"min-w":[{"min-w":[i,"screen","none",...M()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",r,Et,_t]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Ft,Tt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kt,Dt]}],"font-family":[{font:[At,Dt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,Ft,Dt]}],"line-clamp":[{"line-clamp":[wt,"none",Ft,Tt]}],leading:[{leading:[o,...y()]}],"list-image":[{"list-image":["none",Ft,Dt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ft,Dt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[wt,"from-font","auto",Ft,_t]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[wt,"auto",Ft,Dt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ft,Dt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ft,Dt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yt,Ft,Dt],radial:["",Ft,Dt],conic:[yt,Ft,Dt]},Ht,qt]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[wt,Ft,Dt]}],"outline-w":[{outline:["",wt,Et,_t]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,Bt,Wt]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",u,Bt,Wt]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[wt,_t]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",m,Bt,Wt]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[wt,Ft,Dt]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[wt]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[Ft,Dt]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[wt]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ft,Dt]}],filter:[{filter:["","none",Ft,Dt]}],blur:[{blur:W()}],brightness:[{brightness:[wt,Ft,Dt]}],contrast:[{contrast:[wt,Ft,Dt]}],"drop-shadow":[{"drop-shadow":["","none",h,Bt,Wt]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",wt,Ft,Dt]}],"hue-rotate":[{"hue-rotate":[wt,Ft,Dt]}],invert:[{invert:["",wt,Ft,Dt]}],saturate:[{saturate:[wt,Ft,Dt]}],sepia:[{sepia:["",wt,Ft,Dt]}],"backdrop-filter":[{"backdrop-filter":["","none",Ft,Dt]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[wt,Ft,Dt]}],"backdrop-contrast":[{"backdrop-contrast":[wt,Ft,Dt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",wt,Ft,Dt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wt,Ft,Dt]}],"backdrop-invert":[{"backdrop-invert":["",wt,Ft,Dt]}],"backdrop-opacity":[{"backdrop-opacity":[wt,Ft,Dt]}],"backdrop-saturate":[{"backdrop-saturate":[wt,Ft,Dt]}],"backdrop-sepia":[{"backdrop-sepia":["",wt,Ft,Dt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ft,Dt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[wt,"initial",Ft,Dt]}],ease:[{ease:["linear","initial",b,Ft,Dt]}],delay:[{delay:[wt,Ft,Dt]}],animate:[{animate:["none",x,Ft,Dt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,Ft,Dt]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:F()}],"rotate-x":[{"rotate-x":F()}],"rotate-y":[{"rotate-y":F()}],"rotate-z":[{"rotate-z":F()}],scale:[{scale:E()}],"scale-x":[{"scale-x":E()}],"scale-y":[{"scale-y":E()}],"scale-z":[{"scale-z":E()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[Ft,Dt,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:O()}],"translate-x":[{"translate-x":O()}],"translate-y":[{"translate-y":O()}],"translate-z":[{"translate-z":O()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ft,Dt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ft,Dt]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[wt,Et,_t,Tt]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Zt(...e){return Kt(function(){for(var e,t,r=0,a="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Ae(e))&&(a&&(a+=" "),a+=t);return a}(e))}const er=({startDate:e,endDate:n,onStartDateChange:o,onEndDateChange:s,startLabel:i="Start date",endLabel:l="End date",className:c})=>a.jsx("div",{className:Zt("flex flex-col gap-2",c),children:a.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[a.jsxs(r.Popover,{children:[a.jsx(r.PopoverTrigger,{asChild:!0,children:a.jsxs("button",{type:"button",className:Zt(We,"justify-start text-left w-[240px]",!e&&Fe),children:[a.jsx(P,{className:Zt("mr-2",Ee)}),e?Le(e,"PPP"):i]})}),a.jsx(r.PopoverContent,{className:"w-fit p-0",align:"start",children:a.jsx(t.Calendar,{mode:"single",selected:e,onSelect:o,initialFocus:!0})})]}),a.jsxs(r.Popover,{children:[a.jsx(r.PopoverTrigger,{asChild:!0,children:a.jsxs("button",{type:"button",className:Zt(We,"justify-start text-left w-[240px]",!n&&Fe),children:[a.jsx(P,{className:Zt("mr-2",Ee)}),n?Le(n,"PPP"):l]})}),a.jsx(r.PopoverContent,{className:"w-fit p-0",align:"start",children:a.jsx(t.Calendar,{mode:"single",selected:n,onSelect:s,initialFocus:!0})})]})]})}),tr=({value:e,onChange:t,fetcher:r,className:o})=>a.jsx(n.FKSelect,{fetcher:r,modelClass:"User",className:Zt("max-w-36 h-10",o),placeholder:"Creator user",emptyMessage:"No user found",labelName:"username",value:e,onChange:t});function rr({data:e}){return a.jsx(l.Stack,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(e).map(([e,t])=>a.jsx(l.Stack,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:a.jsxs("span",{className:"font-medium text-foreground",children:[e," : ",String(t)]})},e))})}const ar=({href:e,className:t,children:r})=>a.jsx("a",{href:e,className:t,children:r});const nr=({href:e,className:t,children:r})=>a.jsx("a",{href:e,className:t,children:r});const or=({href:e,className:t,children:r})=>a.jsx("a",{href:e,className:t,children:r});const sr=({href:e,className:t,children:r})=>a.jsx("a",{href:e,className:t,children:r});const ir={created_at:"Criado em",start_processing_at:"Início do Processamento",finished_processing_at:"Fim do Processamento",field_delimiter:"Delimitador de Campo",decimal_delimiter:"Delimitador Decimal",ignore_locked:"Ignorar Bloqueados",lock_data:"Bloquear Dados",origin:"Origem",format_type:"Tipo de Formato",process_status:"Status",description:"Descrição",row_permission:"Row Permission",created_by:"Created By",modeling_unit:"Modeling Unit",attribute:"Attribute",geoarea:"Geoarea"},lr=e=>{if(!e)return"";return new Date(e).toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})},cr=(e,t)=>({...ir,...t}[e]||e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")),dr=(e,t,r={})=>{if(null==e||""===e)return"N/A";if("process_status"===t&&r.statusLabels)return r.statusLabels[String(e)]??String(e);if(t.endsWith("_at")||t.includes("date")||t.includes("_time")){return(r.formatDate??lr)(String(e))||"N/A"}if("boolean"==typeof e){const t=r.booleanLabels??{true:"Sim",false:"Não"};return e?t.true:t.false}return"object"==typeof e?"N/A":String(e)},ur=(e,t)=>{const r=e[t];return r&&"object"==typeof r&&null!==r&&"__display_field__"in r?r.__display_field__:r},mr=["description","notes"],hr={default:"",card:"rounded-lg border p-4"};function pr(e="default",t,r){return Zt(hr[e],t,r)}const fr=[{title:"Informações Gerais",fields:["description","row_permission","origin","created_by","process_status","msg"],cols:4},{title:"Datas de Processamento",fields:["created_at","start_processing_at","finished_processing_at"],cols:3},{title:"Proteção dos Dados",fields:["ignore_locked","lock_data"],cols:4},{title:"Carregamento Manual",fields:["format_type","field_delimiter","decimal_delimiter","modeling_unit","attribute","geoarea"],cols:4}];const gr={description:"Descrição",code:"Código",notes:"Notas",force_temperature:"Temperatura Forçada",dimensions:"Tags",extra_info:"Informações extras"},br=(e,t)=>t?.[e]?t[e]:gr[e]?gr[e]:e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");function xr({value:t={},onChange:r,name:n,placeholderKey:o="Chave",placeholderValue:s="Valor",disabled:c=!1}){const[d,m]=e.useState({key:"",value:""});return a.jsxs(l.Stack,{direction:"col",gap:2,children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsx(u.Input,{type:"text",name:`${n}_key`,placeholder:o,value:d.key,disabled:c,onChange:e=>m(t=>({...t,key:e.target.value})),className:"flex-1"}),a.jsx(u.Input,{type:"text",name:`${n}_value`,placeholder:s,value:d.value,disabled:c,onChange:e=>m(t=>({...t,value:e.target.value})),className:"flex-1"}),a.jsx(i.Button,{type:"button",variant:"default",className:"px-4 py-2 shrink-0",id:`${n}_add`,onClick:()=>{const e=d.key.trim(),t=d.value.trim();e&&(r(r=>({...r&&"object"==typeof r?r:{},[e]:t})),m({key:"",value:""}))},disabled:c||!d.key.trim(),children:"Adicionar"})]}),Object.entries(t).length>0&&a.jsx(l.Stack,{direction:"row",gap:2,className:"flex-wrap",children:Object.entries(t).map(([e,t])=>a.jsxs(l.Stack,{direction:"row",gap:1,className:"bg-muted px-3 py-1.5 rounded-md text-sm",children:[a.jsxs("span",{className:"font-medium text-foreground",children:[e," : ",String(t)]}),!c&&a.jsx("button",{type:"button",onClick:()=>{return t=e,void r(e=>{const r={...e&&"object"==typeof e?e:{}};return delete r[t],r});var t},className:"rounded-full p-0 hover:bg-muted-foreground/20 hover:text-destructive hover:backgro transition-colors",children:"×"})]},e))})]})}const wr=(e,t)=>{const r=document.createElement("a");r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)};exports.AuthenticatedView=function({redirectHref:t,redirectDelayMs:r=3e3,onRedirect:n,title:o="Autenticado com sucesso! Redirecionado automaticamente",fallbackLinkLabel:s="Caso nao seja redirecionado automaticamente, clique aqui",LinkComponent:i=or,className:l}){return e.useEffect(()=>{const e=setTimeout(()=>{n?.(t)},r);return()=>clearTimeout(e)},[t,r,n]),a.jsx("div",{className:"flex justify-center items-center h-screen",children:a.jsxs(d.Card,{className:l??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[a.jsx(d.CardHeader,{className:"items-center mt-4"}),a.jsxs(d.CardContent,{className:"flex flex-col gap-4",children:[a.jsx(h.Spinner,{}),a.jsx("h4",{className:"text-center",children:o}),a.jsx(i,{href:t,className:"w-full text-sm underline text-accent text-center",children:s})]})]})})},exports.AutoDetailContent=function({data:e,config:t,className:r,sectionVariant:n="default",sectionClassName:o,formatters:s,wrapperElements:i,statusLabels:c,formatDate:d}){const u=t?.sections||fr,m={statusLabels:c,formatDate:d},h=(e,t,r,s)=>a.jsxs(l.Stack,{direction:"col",gap:3,className:pr(n,o,s),children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground",children:t}),r]},e),f=(r,n)=>{if(!(r in e))return null;const o=t?.labels?.[r]||cr(r,t?.labels),c=(s||[]).find(e=>e.key===r)?.formatter||t?.formatters?.[r],d=ur(e,r),u=c?c(d):dr(d,r,m),h=function(e,t){return void 0!==t?.fullWidthFields?t.fullWidthFields.includes(e):mr.includes(e)}(r,n),p=i?.find(e=>e.keys.includes(r));if(p?.element){const t=p.element({key:r,label:o,fieldValue:d,isFullWidth:h,data:e});return a.jsx(l.Stack,{direction:"col",className:h?"col-span-full min-w-0":"min-w-0",children:t},r)}return a.jsxs(l.Stack,{direction:"col",className:h?"col-span-full min-w-0":"min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:o}),a.jsx("p",{className:"text-base break-words whitespace-pre-wrap",children:u})]},r)},g=e.results;return a.jsxs(l.Stack,{direction:"col",gap:6,className:r,children:[u.map(t=>{const r=t.fields.filter(t=>t in e);if(0===r.length)return null;const n=function(e){if(e.isFullWidth)return"grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-1 xl:grid-cols-1 gap-x-6 gap-y-4";switch(e.cols){case 2:return"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-4";case 3:return"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-4";default:return"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-x-6 gap-y-4"}}(t);return h(t.title,t.title,a.jsx("div",{className:n,children:r.map(e=>f(e,t))}),t.className)}),Boolean(e.dimensions&&"object"==typeof e.dimensions&&Object.keys(e.dimensions).length>0)&&h("tags","Tags",a.jsx(rr,{data:e.dimensions})),Boolean(e.extra_info&&"object"==typeof e.extra_info&&Object.keys(e.extra_info).length>0)&&h("extra-info","Informações Extras",a.jsx(rr,{data:e.extra_info})),g?.processing_results&&a.jsx(l.Stack,{direction:"col",gap:3,className:pr(n,o),children:a.jsx(p.Accordion,{type:"single",collapsible:!0,children:a.jsxs(p.AccordionItem,{value:"processing-results",className:"border-b-0",children:[a.jsx(p.AccordionTrigger,{className:"text-sm font-semibold text-foreground hover:no-underline py-2",children:"Resultados do Processamento"}),a.jsx(p.AccordionContent,{children:a.jsxs(l.Stack,{direction:"col",gap:4,children:[a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:[{label:"Adicionados",value:g.processing_results.count__added,color:"text-green-600"},{label:"Atualizados",value:g.processing_results.count__updated,color:"text-blue-600"},{label:"Sem Alteração",value:g.processing_results.count__no_change,color:"text-gray-600"}].map(e=>a.jsxs(l.Stack,{direction:"col",children:[a.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:e.label}),a.jsx("p",{className:`text-2xl font-bold ${e.color}`,children:e.value})]},e.label))}),g.processing_results.details&&g.processing_results.details.length>0&&a.jsxs(l.Stack,{direction:"col",gap:2,children:[a.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Detalhes"}),a.jsx(l.Stack,{direction:"col",gap:2,children:g.processing_results.details.map((e,r)=>{const n=`detail-${r}-${Object.values(e).join("-")}`;return a.jsx(l.Stack,{className:"border rounded-lg p-3",children:a.jsx(l.Stack,{className:"grid grid-cols-4 gap-2",children:Object.entries(e).map(([e,r])=>a.jsxs(l.Stack,{direction:"col",children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:cr(e,t?.labels)}),a.jsx("p",{className:"text-sm font-medium",children:dr(r,e,m)})]},e))})},n)})})]})]})})]})})})]})},exports.AutoFormContent=function({fields:t,values:r,defaultValue:n={},onChange:o,errors:s={},config:i,customFields:c}){const[d,m]=e.useState(n),h=r??d,p=(e,t)=>{o?o(r=>{const a=r&&"object"==typeof r?r:h,n=a[e],o="function"==typeof t?t(n):t;return{...a,[e]:o}}):m(r=>{const a=r[e],n="function"==typeof t?t(a):t;return{...r,[e]:n}})};e.useEffect(()=>{Object.keys(n).length>0&&0===Object.keys(h).length&&m(n)},[n,h]);const x=Object.keys(t).filter(e=>!i?.exclude?.includes(e)),w=i?.sections||[{title:"Dados do Formulário",fields:x,cols:1}],y=(e,t)=>{const r=h[e]??"",n=s[e],o=t.disabled;if(c?.[e])return c[e]({value:r,onChange:t=>p(e,t),error:n,disabled:o,fieldKey:e});switch(t.type){case"textarea":return a.jsx(b.Textarea,{id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>p(e,t.target.value),required:t.required,disabled:o,className:Zt("min-h-[120px] w-full",n&&"border-destructive")});case"checkbox":return a.jsxs("div",{className:"flex items-center gap-2 py-2",children:[a.jsx(f.Checkbox,{id:e,name:e,checked:!!r,onCheckedChange:t=>p(e,!!t),disabled:o}),a.jsx("label",{htmlFor:e,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:br(e,i?.labels)})]});case"select":return a.jsx(g.Select,{id:e,name:e,placeholder:t.placeholder||"Selecione...",options:t.options??[],value:null!=r?String(r):"",onValueChange:t=>p(e,t),required:t.required});case"key-value":return a.jsxs(a.Fragment,{children:[a.jsx(xr,{value:r||{},name:e,onChange:t=>p(e,t),placeholderKey:"Chave",placeholderValue:"Valor",disabled:o}),a.jsx("input",{type:"hidden",name:e,value:JSON.stringify(r||{})})]});case"number":return a.jsx(u.Input,{type:"number",id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>{const r=""===t.target.value?"":Number(t.target.value);p(e,r)},required:t.required,disabled:o,className:Zt("w-full",n&&"border-destructive")});case"date":return a.jsx(u.Input,{type:"date",id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>p(e,t.target.value),required:t.required,disabled:o,className:Zt("w-full",n&&"border-destructive")});default:return a.jsx(u.Input,{type:t.type,id:e,name:e,placeholder:t.placeholder,value:r,onChange:t=>p(e,t.target.value),required:t.required,disabled:o,className:Zt("w-full",n&&"border-destructive")})}};return a.jsx(l.Stack,{direction:"col",gap:6,className:"w-full",children:w.map(e=>{const r=e.fields.filter(e=>e in t&&!i?.exclude?.includes(e));if(0===r.length)return null;const n=1===e.cols?"grid-cols-1":2===e.cols?"grid-cols-1 sm:grid-cols-2":3===e.cols?"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4";return a.jsxs(l.Stack,{direction:"col",gap:3,className:"w-full",children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground",children:e.title}),a.jsx("div",{className:Zt("grid gap-x-6 gap-y-4 w-full",n),children:r.map(r=>{const n=t[r],o=e.isFullWidth||"textarea"===n.type||"key-value"===n.type||4===n.cols,c=s[r],d="checkbox"!==n.type;return a.jsxs(l.Stack,{direction:"col",gap:1.5,className:Zt(o?"col-span-full":"",n.className),children:[d&&a.jsxs("label",{htmlFor:r,className:"text-fontcolor-secondary font-bold text-sm",children:[br(r,i?.labels),n.required&&a.jsx("span",{className:"text-destructive ml-0.5",children:"*"})]}),y(r,n),c&&a.jsx("span",{className:"text-xs text-destructive font-medium mt-0.5",children:c})]},r)})})]},e.title)})})},exports.CombinedFilterTable=()=>{const[t,r]=e.useState(),[n,l]=e.useState(),[c,d]=e.useState(null),u=[{pk:1,description:"Maintenance Task A",created_at:"2023-10-01",status:"Open",user_id:1,username:"admin"},{pk:2,description:"Inspection B",created_at:"2023-10-05",status:"Closed",user_id:2,username:"jdoe"},{pk:3,description:"Repair C",created_at:"2023-10-10",status:"In Progress",user_id:1,username:"admin"},{pk:4,description:"Log Analysis",created_at:"2023-10-15",status:"Open",user_id:3,username:"guest"},{pk:5,description:"System Update",created_at:"2023-11-01",status:"Pending",user_id:2,username:"jdoe"}],m=u.filter(e=>{let r=!0;const a=new Date(e.created_at);return t&&a<t&&(r=!1),n&&a>n&&(r=!1),c&&e.user_id!==Number(c)&&(r=!1),r});return a.jsxs("div",{className:"flex flex-col gap-6 p-4 border rounded-lg bg-white",children:[a.jsx("h2",{className:"text-xl font-bold",children:"Combined Filter & Table Demo"}),a.jsxs("div",{className:"flex flex-wrap gap-4 items-end",children:[a.jsx(er,{startDate:t,endDate:n,onStartDateChange:r,onEndDateChange:l}),a.jsx(tr,{fetcher:async({search:e,modelClass:t,limit:r,offset:a})=>{await new Promise(e=>setTimeout(e,300));const n=[{pk:1,username:"admin"},{pk:2,username:"jdoe"},{pk:3,username:"guest"}];return e?n.filter(t=>t.username.toLowerCase().includes(e.toLowerCase())):n},value:c,onChange:e=>d(e)}),a.jsx(i.Button,{variant:"outline",className:"h-full",onClick:()=>{r(void 0),l(void 0),d(null)},children:"Clear Filters"})]}),a.jsx("div",{className:"border rounded-md overflow-hidden",children:a.jsxs(o.PumpwoodTable.Root,{children:[a.jsx(o.PumpwoodTable.Header,{children:a.jsxs(o.PumpwoodTable.Row,{children:[a.jsx(o.PumpwoodTable.Head,{children:"ID"}),a.jsx(o.PumpwoodTable.Head,{children:"Description"}),a.jsx(o.PumpwoodTable.Head,{children:"Created At"}),a.jsx(o.PumpwoodTable.Head,{children:"Created By"}),a.jsx(o.PumpwoodTable.Head,{children:"Status"})]})}),a.jsx(o.PumpwoodTable.Body,{children:m.length>0?m.map(e=>a.jsxs(o.PumpwoodTable.Row,{children:[a.jsx(o.PumpwoodTable.Cell,{children:e.pk}),a.jsx(o.PumpwoodTable.Cell,{children:e.description}),a.jsx(o.PumpwoodTable.Cell,{children:Le(new Date(e.created_at),"PPP")}),a.jsx(o.PumpwoodTable.Cell,{children:e.username}),a.jsx(o.PumpwoodTable.Cell,{children:e.status})]},e.pk)):a.jsx(o.PumpwoodTable.Row,{children:a.jsx(o.PumpwoodTable.Cell,{colSpan:5,children:a.jsx(s.EmptyContainer,{title:"No results found",description:"No data was found for the selected filters."})})})})]})}),a.jsxs("div",{className:"text-xs text-gray-400",children:["Showing ",m.length," of ",u.length," records."]})]})},exports.CreatedByUserFilter=tr,exports.CustomBreadcrumb=function({label:t,steps:r=[]}){return a.jsx(x.Breadcrumb,{className:"mb-6",children:a.jsxs(x.BreadcrumbList,{children:[a.jsx(x.BreadcrumbItem,{children:a.jsx(x.BreadcrumbPage,{className:"text-primary font-medium",children:t})}),r.map(t=>a.jsxs(e.Fragment,{children:[a.jsx(x.BreadcrumbSeparator,{}),a.jsx(x.BreadcrumbItem,{children:a.jsx(x.BreadcrumbPage,{className:"text-muted-foreground",children:t})})]},`step-fragment-${t}`))]})})},exports.DateRangeFilter=er,exports.DetailPage=function({title:e,titleAddon:t,isLoading:r=!1,error:n=null,onBack:o,actions:s,sections:c=[],children:d,loadingComponent:u,errorComponent:m,backButtonLabel:f="Voltar"}){return r?u??a.jsx(l.Stack,{className:"justify-center items-center p-8",children:a.jsx(h.Spinner,{})}):n?m??a.jsx(l.Stack,{className:"justify-center items-center p-8",children:a.jsx("p",{className:"text-destructive",children:n.message})}):a.jsxs(l.Stack,{direction:"col",gap:4,children:[a.jsxs(l.Stack,{direction:"row",gap:4,className:"justify-between items-center",children:[a.jsxs(l.Stack,{direction:"row",gap:4,className:"items-center",children:[o&&a.jsx(i.Button,{variant:"ghost",size:"icon",onClick:o,title:f,children:a.jsx(M,{className:"size-4"})}),a.jsx("h1",{className:"text-2xl font-semibold text-surface-secondary",children:e}),t]}),s&&a.jsx(l.Stack,{direction:"row",gap:2,children:s})]}),c.map((e,t)=>{const r=e.id??`section-${t}`;return a.jsx(p.Accordion,{type:"single",collapsible:!0,defaultValue:e.defaultOpen?r:void 0,className:"w-full",children:a.jsxs(p.AccordionItem,{value:r,className:"border-b",children:[a.jsx(p.AccordionTrigger,{className:"hover:no-underline text-base font-normal text-surface-secondary",children:e.title}),a.jsx(p.AccordionContent,{className:"pt-4",children:e.content})]})},r)}),d]})},exports.FULL_WIDTH_DETAIL_FIELDS=mr,exports.FilePreview=({fileUrl:e,fileName:t,isLoading:r=!1,getFileType:n,ImageComponent:o})=>{if(r)return a.jsx(l.Stack,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:a.jsx(l.Loading,{})});if(!e||!t)return a.jsxs(l.Stack,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] items-center justify-center",children:[a.jsx(W,{className:"w-16 h-16 text-muted-foreground"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"No file available"})]});const s=n(t);return a.jsx(l.Stack,{direction:"col",className:"bg-secondary border border-border rounded-lg min-h-[600px] h-full overflow-hidden relative",children:(()=>{switch(s){case"image":return a.jsx(l.Stack,{direction:"col",className:"w-full h-full items-center justify-center relative",children:o?a.jsx(o,{src:e,alt:t,fill:!0,className:"object-contain"}):a.jsx("img",{src:e,alt:t,className:"max-w-full max-h-full object-contain"})});case"video":return a.jsx(l.Stack,{direction:"col",className:"w-full h-full items-center justify-center relative",children:a.jsxs("video",{src:e,controls:!0,className:"w-full h-full object-contain",children:[a.jsx("track",{kind:"captions"}),"Your browser does not support the video tag."]})});case"pdf":return a.jsx(l.Stack,{direction:"col",className:"w-full h-full items-center justify-center relative",children:a.jsx("iframe",{src:e,className:"w-full h-full border-0",title:t})});case"doc":case"excel":case"ppt":return a.jsxs(l.Stack,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[a.jsx(L,{className:"w-20 h-20 text-muted-foreground"}),a.jsxs(l.Stack,{direction:"col",gap:1,className:"text-center",children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:t}),a.jsxs("p",{className:"text-xs text-muted-foreground uppercase",children:[s," Document"]})]}),a.jsxs(i.Button,{variant:"outline",size:"default",className:"mt-4",onClick:()=>wr(e,t),children:[a.jsx(T,{className:"w-4 h-4 mr-2"}),"Download"]})]});default:return a.jsxs(l.Stack,{direction:"col",gap:4,className:"items-center justify-center h-full p-8",children:[a.jsx(q,{className:"w-16 h-16 text-muted-foreground"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:t}),a.jsxs(i.Button,{variant:"outline",size:"sm",onClick:()=>wr(e,t),children:[a.jsx(T,{className:"w-4 h-4 mr-2"}),"Download"]})]})}})()})},exports.KeyValueContent=rr,exports.LoginCard=function({onLogin:t,onSuccess:r,onError:n,sessionExpired:o=!1,sessionExpiredAlert:s,forgotPasswordHref:h="/",forgotPasswordLabel:p="Esqueci a senha",usernameLabel:f="Usuario",passwordLabel:g="Senha",submitLabel:b="Entrar",loginErrorMessage:x="Login error!",LinkComponent:w=ar,className:y}){const[k,v]=e.useState(""),[j,N]=e.useState(""),[C,S]=e.useState(!1);return a.jsxs(l.Stack,{gap:4,children:[o&&s?.icon&&a.jsx(c.AlertWithIcon,{variant:"destructive",icon:s.icon,title:s.title??"Sessão expirada",description:s.description??"Faça login novamente para continuar"}),a.jsxs(d.Card,{className:y??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[a.jsx(d.CardHeader,{className:"items-center"}),a.jsx(d.CardContent,{children:a.jsx("form",{onSubmit:e=>e.preventDefault(),children:a.jsxs("div",{className:"grid w-full items-center gap-4 mt-6",children:[a.jsxs(l.Stack,{gap:4,children:[a.jsx(m.Label,{className:"text-primary",htmlFor:"username",children:f}),a.jsx(u.Input,{id:"username",type:"text",placeholder:"Seu nome de usuário",value:k,onChange:e=>v(e.target.value)})]}),a.jsxs(l.Stack,{gap:4,children:[a.jsx(m.Label,{className:"text-primary",htmlFor:"password",children:g}),a.jsx(u.Input,{id:"password",type:"password",placeholder:"Sua senha de acesso",value:j,onChange:e=>N(e.target.value)})]})]})})}),a.jsx(d.CardFooter,{className:"justify-center items-center",children:a.jsxs(l.Stack,{gap:4,className:"justify-center items-center mt-10",children:[a.jsx(i.Button,{className:"w-full",onClick:async()=>{S(!0);try{const{error:e}=await t({username:k,password:j});if(e)return void n?.(x,String(e));r?.()}finally{S(!1)}},disabled:C,children:b}),a.jsx(w,{href:h,className:"text-primary text-xs",children:p})]})})]})]})},exports.LoginCardSSO=function({onLoginSSO:t,onRedirect:r,onError:n,sessionExpired:o=!1,sessionExpiredAlert:s,forgotPasswordHref:h="/",forgotPasswordLabel:p="Esqueci a senha",emailLabel:f="Email",submitLabel:g="Entrar com SSO",unauthorizedMessage:b="Usuario nao autorizado",genericErrorMessage:x="Erro ao fazer login",LinkComponent:w=nr,className:y}){const[k,v]=e.useState(""),[j,N]=e.useState(!1);return a.jsxs(l.Stack,{gap:4,children:[o&&s?.icon&&a.jsx(c.AlertWithIcon,{variant:"destructive",icon:s.icon,title:s.title??"Sessão expirada",description:s.description??"Faça login novamente para continuar"}),a.jsxs(d.Card,{className:y??"bg-white w-[400px] h-[457px] rounded-[30px] shadow-lg",children:[a.jsx(d.CardHeader,{className:"items-center mt-4"}),a.jsx(d.CardContent,{children:a.jsx("form",{onSubmit:async e=>{e.preventDefault(),N(!0);try{const{redirect_url:e,error:a}=await t(k);if(e)return void r?.(e);const o=a?.includes("401")?b:x;n?.(o,String(a))}finally{N(!1)}},children:a.jsxs("div",{className:"grid w-full items-center gap-4 mt-6",children:[a.jsxs(l.Stack,{gap:4,children:[a.jsx(m.Label,{className:"text-primary",htmlFor:"email",children:f}),a.jsx(u.Input,{id:"email",type:"email",placeholder:"Seu email de acesso",value:k,onChange:e=>v(e.target.value),pattern:"^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$",required:!0})]}),a.jsx(i.Button,{className:"w-full",type:"submit",disabled:j,children:g})]})})}),a.jsx(d.CardFooter,{className:"flex-col justify-center items-center",children:a.jsx(l.Stack,{gap:4,className:"justify-start items-center mb-7",children:a.jsx(w,{href:h,className:"text-primary text-xs",children:p})})})]})]})},exports.NavigationSidebar=function({links:t,iconMap:r,pathname:n,isSidebarCollapsedFromQuery:o=!1,logo:s,onLogout:i,logoutIcon:c=F,logoutLabel:d="Logout",LinkComponent:u,ImageComponent:m}){const h=n.split("/")[2]??"",{isCollapsed:p,isCollapsing:f,expandedItems:g,setExpandedItems:b,toggleCollapse:x,toggleExpanded:k,handleTransitionEnd:v,setExpandedOnCollapse:j}=y.useSidebarCollapse({initialCollapsed:o,onPersist:e=>{const t=new URLSearchParams;t.set("sidebar-collapsed",String(e)),window.history.replaceState({},"",`${window.location.pathname}?${t}`)}});return e.useEffect(()=>{if(!o){const e={};t.forEach(t=>{if(t.subItems){t.subItems.some(e=>n===e.href)&&(e[t.title]=!0)}}),b(e)}},[o,t,n,b]),a.jsxs(w.Sidebar.Root,{isCollapsed:p,isCollapsing:f,onToggleCollapse:()=>{p||j(),x()},onTransitionEnd:v,className:"h-full",children:[a.jsxs(l.Stack,{className:"w-full shrink-0 items-center gap-1 mb-2",children:[a.jsx(w.Sidebar.Toggle,{}),a.jsx(w.Sidebar.Logo,{src:s.src,width:s.width,height:s.height,collapsedWidth:s.collapsedWidth,collapsedHeight:s.collapsedHeight,alt:s.alt,ImageComponent:m})]}),a.jsx(w.Sidebar.Content,{className:"mt-6",children:t.map(e=>{const t=r[e.icon];if(!!e.subItems?.length){const r=e.subItems?.some(e=>n===e.href||h===e.href.split("/")[2]);return a.jsx(w.Sidebar.NavGroup,{icon:t,title:e.title,isExpanded:!!g[e.title],isActive:!!r,onToggle:()=>k(e.title),children:e.subItems?.map(e=>{const t=n===e.href;return a.jsx(w.Sidebar.NavSubLink,{title:e.title,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:t,LinkComponent:u},e.href)})},e.title)}const o=e.href?.split("/")[2]??"";return a.jsx(w.Sidebar.Link,{icon:t,href:{pathname:e.href,query:{"sidebar-collapsed":p}},active:h===o,LinkComponent:u,children:e.title},e.href)})}),a.jsx(w.Sidebar.Footer,{children:a.jsx(w.Sidebar.Action,{icon:c,label:d,onClick:async()=>{await i()}})})]})},exports.NotAuthenticatedView=function({error:t,loginHref:r,title:n="Erro ao autenticar!",description:o="Verifique suas informações de SSO ou converse com o administrador do sistema.",fallbackLinkLabel:s="Caso não seja redirecionado automaticamente, clique aqui",errorDetailsLabel:i="Detalhes para os Nerds",copyLabel:c="Copiar",copiedLabel:u="Copiado!",LinkComponent:m=sr,className:h}){const[f,g]=e.useState(!1),b="string"==typeof t?t:JSON.stringify(t,null,2);return a.jsx(l.Stack,{className:"justify-center items-center h-screen",children:a.jsxs(d.Card,{className:h??"w-[400px] h-[457px] rounded-[30px] shadow-lg bg-red-50",children:[a.jsx(d.CardHeader,{className:"items-center"}),a.jsxs(d.CardContent,{className:"flex flex-col items-center gap-2",children:[a.jsx(D,{size:48,className:"text-red-700"}),a.jsx("h4",{className:"text-center",children:n}),a.jsx("p",{className:"text-sm text-center",children:o}),a.jsx(m,{href:r,className:"w-full text-sm underline text-accent text-center",children:s}),a.jsx(p.Accordion,{type:"single",collapsible:!0,className:"w-full",children:a.jsxs(p.AccordionItem,{value:"error-details",children:[a.jsx(p.AccordionTrigger,{children:i}),a.jsxs(p.AccordionContent,{className:"max-w-80",children:[a.jsx("div",{className:"flex justify-end mb-1",children:a.jsx("button",{type:"button",onClick:async()=>{if(t)try{await navigator.clipboard.writeText("string"==typeof t?t:JSON.stringify(t,null,2)),g(!0),setTimeout(()=>g(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},className:"text-xs text-accent hover:underline flex items-center gap-1",children:f?a.jsxs(a.Fragment,{children:[a.jsx(z,{size:14,className:"text-green-600"})," ",u]}):a.jsxs(a.Fragment,{children:[a.jsx(_,{size:14})," ",c]})})}),a.jsx("div",{className:"max-h-24 overflow-y-auto overflow-x-hidden",children:a.jsx("pre",{className:"bg-gray-100 p-4 rounded-md",children:a.jsx("code",{className:"text-sm text-red-600 dark:text-red-400 whitespace-pre-wrap break-words",children:b})})})]})]})})]})]})})},exports.formatDetailLabel=cr,exports.formatDetailValue=dr,exports.getDetailFieldValue=ur;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { type IDetailFieldConfig } from "./detail-utils";
|
|
3
3
|
export type { IDetailFieldConfig, IDetailSection } from "./detail-utils";
|
|
4
|
+
export type DetailSectionVariant = "default" | "card";
|
|
4
5
|
export interface IAutoDetailContentProps {
|
|
5
6
|
data: Record<string, any>;
|
|
6
7
|
config?: IDetailFieldConfig;
|
|
8
|
+
className?: string;
|
|
9
|
+
sectionVariant?: DetailSectionVariant;
|
|
10
|
+
sectionClassName?: string;
|
|
7
11
|
formatters?: {
|
|
8
12
|
key: string;
|
|
9
13
|
formatter: (value: unknown) => string;
|
|
@@ -24,4 +28,4 @@ export interface IAutoDetailContentProps {
|
|
|
24
28
|
/**
|
|
25
29
|
* Auto-render entity detail fields in configurable sections.
|
|
26
30
|
*/
|
|
27
|
-
export declare function AutoDetailContent({ data, config, formatters, wrapperElements, statusLabels, formatDate, }: IAutoDetailContentProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function AutoDetailContent({ data, config, className, sectionVariant, sectionClassName, formatters, wrapperElements, statusLabels, formatDate, }: IAutoDetailContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AutoDetailContent, type IAutoDetailContentProps } from "./AutoDetailContent";
|
|
1
|
+
export { AutoDetailContent, type DetailSectionVariant, type IAutoDetailContentProps, } from "./AutoDetailContent";
|
|
2
2
|
export { DetailPage, type IDetailPageProps, type IDetailPageSection } from "./DetailPage";
|
|
3
3
|
export { formatDetailLabel, formatDetailValue, getDetailFieldValue, FULL_WIDTH_DETAIL_FIELDS, type IDetailFieldConfig, type IDetailSection, type IFormatDetailValueOptions, } from "./detail-utils";
|