siesa-ui-kit 1.0.48 → 1.0.49
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/components/MasterCrud/MasterCrud.types.d.ts +15 -4
- package/dist/components/MasterCrud/MasterCrud.types.d.ts.map +1 -1
- package/dist/components/MasterCrud/MasterCrudAdvancedSearch.d.ts +2 -2
- package/dist/components/MasterCrud/MasterCrudAdvancedSearch.d.ts.map +1 -1
- package/dist/components/MasterCrud/icons.d.ts +4 -0
- package/dist/components/MasterCrud/icons.d.ts.map +1 -1
- package/dist/components/MasterCrud/parts/AdvancedSearchGroup.d.ts +14 -0
- package/dist/components/MasterCrud/parts/AdvancedSearchGroup.d.ts.map +1 -0
- package/dist/components/MasterCrud/parts/AdvancedSearchRule.d.ts +12 -0
- package/dist/components/MasterCrud/parts/AdvancedSearchRule.d.ts.map +1 -0
- package/dist/siesa-ui-kit.cjs +174 -167
- package/dist/siesa-ui-kit.cjs.map +1 -1
- package/dist/siesa-ui-kit.mjs +9783 -6531
- package/dist/siesa-ui-kit.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -1
package/dist/siesa-ui-kit.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("react"),Pt=require("react-dom");function xo(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const k=xo(u),go=xo(Pt),Q=({type:e="default",size:r="base",iconOnly:n=!1,leftIcon:s,rightIcon:a,children:o,disabled:i=!1,className:l="",onClick:c,htmlType:f="button",fullWidth:d=!1,ariaLabel:m,badge:h=!1,badgeCount:p,badgeColor:g="red",...x})=>{const b={xs:n?"h-6 w-6 p-1":"h-6 py-1 px-2 gap-2",sm:n?"h-7 w-7 p-1.5":"h-7 py-1 px-2 gap-2",base:n?"h-8 w-8 p-2":"h-8 py-1.5 px-2.5 gap-2",l:n?"h-9 w-9 p-2.5":"h-9 py-2 px-3 gap-3",xl:n?"h-10 w-10 p-3":"h-10 py-2 px-4 gap-3"},y={xs:"w-4 h-4",sm:"w-4 h-4",base:"w-4 h-4",l:"w-4 h-4",xl:"w-4 h-4"},C={xs:"text-xs",sm:"text-sm",base:"text-sm",l:"text-sm",xl:"text-sm"},w={default:`
|
|
2
2
|
bg-primary-custom-600
|
|
3
3
|
text-primary-inverse-content
|
|
4
4
|
border
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
duration-150
|
|
50
50
|
dark:text-dark-content-custom
|
|
51
51
|
dark:hover:bg-hover-overlay-dark
|
|
52
|
-
`},
|
|
52
|
+
`},j=`
|
|
53
53
|
inline-flex
|
|
54
54
|
items-center
|
|
55
55
|
justify-center
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
disabled:opacity-50
|
|
67
67
|
disabled:cursor-not-allowed
|
|
68
68
|
disabled:pointer-events-none
|
|
69
|
-
`,I=d?"w-full":"",
|
|
69
|
+
`,I=d?"w-full":"",N=[j,b[r],w[e],I,l].join(" ").replace(/\s+/g," ").trim(),E=A=>A?t.jsx("span",{className:`inline-flex items-center justify-center ${y[r]}`,children:A}):null,S=()=>n?E(s):t.jsxs(t.Fragment,{children:[s&&E(s),o&&t.jsx("span",{className:C[r],children:o}),a&&E(a)]}),v={zinc:{bg:"bg-zinc-600",text:"text-white"},red:{bg:"bg-red-700",text:"text-white"},orange:{bg:"bg-orange-700",text:"text-white"},amber:{bg:"bg-amber-700",text:"text-white"},yellow:{bg:"bg-yellow-700",text:"text-white"},lime:{bg:"bg-lime-700",text:"text-white"},green:{bg:"bg-green-700",text:"text-white"},emerald:{bg:"bg-emerald-700",text:"text-white"},teal:{bg:"bg-teal-700",text:"text-white"},cyan:{bg:"bg-cyan-700",text:"text-white"},sky:{bg:"bg-sky-700",text:"text-white"},blue:{bg:"bg-blue-700",text:"text-white"},indigo:{bg:"bg-indigo-700",text:"text-white"},violet:{bg:"bg-violet-700",text:"text-white"},purple:{bg:"bg-purple-700",text:"text-white"},fuchsia:{bg:"bg-fuchsia-700",text:"text-white"},pink:{bg:"bg-pink-700",text:"text-white"},rose:{bg:"bg-rose-700",text:"text-white"},primary:{bg:"bg-primary-custom-600",text:"text-white"},secondary:{bg:"bg-zinc-600",text:"text-white"},tertiary:{bg:"bg-zinc-600",text:"text-white"}},R=v[g]||v.red,T=()=>!h&&p===void 0?null:p!==void 0?t.jsx("span",{className:`
|
|
70
70
|
absolute
|
|
71
71
|
-top-1
|
|
72
72
|
-right-1
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
${R.bg}
|
|
84
84
|
${R.text}
|
|
85
85
|
pointer-events-none
|
|
86
|
-
`.trim().replace(/\s+/g," "),"aria-label":`${p} notificaciones`,children:p>99?"99+":p}):
|
|
86
|
+
`.trim().replace(/\s+/g," "),"aria-label":`${p} notificaciones`,children:p>99?"99+":p}):t.jsx("span",{className:`
|
|
87
87
|
absolute
|
|
88
88
|
-top-1
|
|
89
89
|
-right-1
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
rounded-full
|
|
93
93
|
${R.bg}
|
|
94
94
|
pointer-events-none
|
|
95
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Notificación"});return
|
|
95
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Notificación"});return t.jsxs("button",{type:f,className:`${N} ${h||p!==void 0?"relative":""}`,disabled:i,onClick:c,"aria-label":m,...x,children:[S(),T()]})},Ge=u.forwardRef(({label:e,labelSecondary:r,helperText:n,error:s=!1,errorMessage:a,leftIcon:o,rightIcon:i,fullWidth:l=!1,className:c="",disabled:f=!1,id:d,required:m,...h},p)=>{const g=d||`input-${Math.random().toString(36).substr(2,9)}`,x=`
|
|
96
96
|
w-full
|
|
97
97
|
px-3
|
|
98
98
|
py-1.5
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
dark:border-dark-border-primary
|
|
113
113
|
dark:text-dark-content-primary
|
|
114
114
|
dark:placeholder:text-dark-content-tertiary
|
|
115
|
-
`,b=
|
|
115
|
+
`,b=f?`
|
|
116
116
|
opacity-50
|
|
117
117
|
cursor-not-allowed
|
|
118
118
|
bg-bg-secondary
|
|
@@ -134,17 +134,17 @@
|
|
|
134
134
|
dark:border-error-border!
|
|
135
135
|
dark:focus:ring-error-border/30!
|
|
136
136
|
dark:focus:ring-offset-dark-bg-primary!
|
|
137
|
-
`:"",
|
|
137
|
+
`:"",C=l?"w-full":"w-[265px]",w=j=>{if(!j)return null;const I=j.props.className||"";return u.cloneElement(j,{className:`w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary ${I}`})};return t.jsxs("div",{className:`flex flex-col gap-2 ${C} ${c}`,children:[e&&t.jsxs("label",{htmlFor:g,className:"flex items-center w-full font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:[t.jsxs("span",{className:"flex-1",children:[e,m&&t.jsx("span",{className:"ml-1 text-error-content",children:"*"})]}),r&&t.jsx("span",{className:"text-xs leading-4 text-primary-custom-600 dark:text-primary-custom-600",children:r})]}),t.jsxs("div",{className:"relative flex items-center",children:[o&&t.jsx("div",{className:"absolute left-3 pointer-events-none",children:w(o)}),t.jsx("input",{ref:p,id:g,disabled:f,required:m,className:`
|
|
138
138
|
${x}
|
|
139
139
|
${b}
|
|
140
140
|
${y}
|
|
141
141
|
${o?"pl-9":""}
|
|
142
142
|
${i?"pr-9":""}
|
|
143
|
-
`.trim().replace(/\s+/g," "),...h}),i&&
|
|
143
|
+
`.trim().replace(/\s+/g," "),...h}),i&&t.jsx("div",{className:"absolute right-3 pointer-events-none",children:w(i)})]}),(n||a)&&t.jsx("p",{className:`
|
|
144
144
|
text-xs
|
|
145
145
|
leading-5
|
|
146
146
|
${s?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-dark-content-tertiary"}
|
|
147
|
-
`.trim().replace(/\s+/g," "),children:s&&a?a:n})]})});
|
|
147
|
+
`.trim().replace(/\s+/g," "),children:s&&a?a:n})]})});Ge.displayName="Input";const bo=u.forwardRef(({label:e,description:r,helperText:n,error:s=!1,errorMessage:a,fullWidth:o=!1,resize:i="vertical",className:l="",disabled:c=!1,id:f,rows:d=4,...m},h)=>{const p=f||`textarea-${Math.random().toString(36).substr(2,9)}`,g=`
|
|
148
148
|
w-full
|
|
149
149
|
px-3
|
|
150
150
|
pr-1.5
|
|
@@ -183,17 +183,17 @@
|
|
|
183
183
|
dark:border-error-border!
|
|
184
184
|
dark:focus:border-2!
|
|
185
185
|
dark:focus:border-error-border!
|
|
186
|
-
`:"",y=i==="none"?"resize-none":i==="vertical"?"resize-y":i==="horizontal"?"resize-x":"resize",
|
|
186
|
+
`:"",y=i==="none"?"resize-none":i==="vertical"?"resize-y":i==="horizontal"?"resize-x":"resize",C=o?"w-full":"w-[312px]";return t.jsxs("div",{className:`flex flex-col gap-2 ${C} ${l}`,children:[(e||r)&&t.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e&&t.jsx("label",{htmlFor:p,className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:e}),r&&t.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-dark-content-secondary",children:r})]}),t.jsx("textarea",{ref:h,id:p,disabled:c,rows:d,className:`
|
|
187
187
|
${g}
|
|
188
188
|
${x}
|
|
189
189
|
${b}
|
|
190
190
|
${y}
|
|
191
|
-
`.trim().replace(/\s+/g," "),...
|
|
191
|
+
`.trim().replace(/\s+/g," "),...m}),(n||a)&&t.jsx("p",{className:`
|
|
192
192
|
text-sm
|
|
193
193
|
leading-5
|
|
194
194
|
text-content-tertiary
|
|
195
195
|
dark:text-dark-content-tertiary
|
|
196
|
-
`.trim().replace(/\s+/g," "),children:s&&a?a:n})]})});
|
|
196
|
+
`.trim().replace(/\s+/g," "),children:s&&a?a:n})]})});bo.displayName="Textarea";const Xr=u.forwardRef(({label:e,description:r,checked:n=!1,indeterminate:s=!1,disabled:a=!1,className:o="",id:i,onChange:l,...c},f)=>{const d=u.useRef(null),m=f||d,h=i||`checkbox-${Math.random().toString(36).substr(2,9)}`;u.useEffect(()=>{m.current&&(m.current.indeterminate=s)},[s,m]);const b=[`
|
|
197
197
|
w-4
|
|
198
198
|
h-4
|
|
199
199
|
rounded
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
shadow-button-inset
|
|
233
233
|
dark:bg-dark-bg-inverse!
|
|
234
234
|
dark:border-dark-bg-inverse!
|
|
235
|
-
`:"",a?"cursor-not-allowed":"cursor-pointer"].join(" ").replace(/\s+/g," ").trim();return
|
|
235
|
+
`:"",a?"cursor-not-allowed":"cursor-pointer"].join(" ").replace(/\s+/g," ").trim();return t.jsxs("div",{className:`inline-flex gap-3 items-start ${o}`,children:[t.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[t.jsx("input",{ref:m,type:"checkbox",id:h,checked:n,disabled:a,onChange:l,className:"peer sr-only",...c}),t.jsxs("label",{htmlFor:h,className:b,children:[n&&!s&&t.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),s&&t.jsx("svg",{className:"w-3 h-3 text-primary-inverse-content pointer-events-none",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M2 6H10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]})]}),(e||r)&&t.jsxs("label",{htmlFor:h,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[e&&t.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:e}),r&&t.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:r})]})]})});Xr.displayName="Checkbox";const vo=u.forwardRef(({label:e,description:r,checked:n=!1,disabled:s=!1,className:a="",id:o,onChange:i,value:l,name:c,...f},d)=>{const m=o||`radio-${Math.random().toString(36).substr(2,9)}`,h=`
|
|
236
236
|
w-4
|
|
237
237
|
h-4
|
|
238
238
|
rounded-full
|
|
@@ -263,12 +263,12 @@
|
|
|
263
263
|
shadow-button-inset
|
|
264
264
|
dark:bg-dark-bg-inverse!
|
|
265
265
|
dark:border-dark-bg-inverse!
|
|
266
|
-
`:"";return
|
|
266
|
+
`:"";return t.jsxs("div",{className:`flex gap-3 items-start ${a}`,children:[t.jsxs("div",{className:"flex items-center justify-center h-5 w-4 shrink-0",children:[t.jsx("input",{ref:d,type:"radio",id:m,checked:n,disabled:s,onChange:i,value:l,name:c,className:"peer sr-only",...f}),t.jsx("label",{htmlFor:m,className:`
|
|
267
267
|
${h}
|
|
268
268
|
${p}
|
|
269
269
|
${g}
|
|
270
270
|
${s?"cursor-not-allowed":"cursor-pointer"}
|
|
271
|
-
`.trim().replace(/\s+/g," "),children:n&&
|
|
271
|
+
`.trim().replace(/\s+/g," "),children:n&&t.jsx("div",{className:"w-1.5 h-1.5 bg-white rounded-full dark:bg-dark-content-inverse"})})]}),(e||r)&&t.jsxs("label",{htmlFor:m,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${s?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[e&&t.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:e}),r&&t.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:r})]})]})});vo.displayName="Radio";const Jt=u.forwardRef(({label:e,description:r,labelPosition:n="leading",checked:s=!1,disabled:a=!1,className:o="",id:i,onChange:l,ariaLabel:c,...f},d)=>{const m=i||`switch-${Math.random().toString(36).substr(2,9)}`,h=`
|
|
272
272
|
w-8
|
|
273
273
|
h-5
|
|
274
274
|
rounded-xl
|
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
-translate-y-1/2
|
|
323
323
|
transition-all
|
|
324
324
|
duration-200
|
|
325
|
-
`,
|
|
325
|
+
`,j=s?"left-[13px]":"left-px";return a?`${w} ${j} ${s?"border-primary-inverse-border dark:border-primary-inverse-border":"border-border-primary dark:border-dark-border-primary"}`:`${w} ${j} ${s?`
|
|
326
326
|
border-primary-inverse-border
|
|
327
327
|
peer-hover:border-[#307cc5]
|
|
328
328
|
dark:border-primary-inverse-border
|
|
@@ -332,29 +332,29 @@
|
|
|
332
332
|
peer-hover:border-[#b6b6b9]
|
|
333
333
|
dark:border-dark-border-primary
|
|
334
334
|
dark:peer-hover:border-[#b6b6b9]
|
|
335
|
-
`}`},x=[h,p()].join(" ").replace(/\s+/g," ").trim(),b=g().replace(/\s+/g," ").trim(),y=
|
|
335
|
+
`}`},x=[h,p()].join(" ").replace(/\s+/g," ").trim(),b=g().replace(/\s+/g," ").trim(),y=e||r?t.jsxs("label",{htmlFor:m,className:`flex-1 flex flex-col gap-1 text-sm leading-5 ${a?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[e&&t.jsx("span",{className:"font-bold text-content-primary dark:text-dark-content-primary",children:e}),r&&t.jsx("span",{className:"font-normal text-content-secondary dark:text-content-secondary",children:r})]}):null,C=t.jsxs("div",{className:"flex items-center justify-center shrink-0",children:[t.jsx("input",{ref:d,type:"checkbox",id:m,checked:s,disabled:a,onChange:l,className:"peer sr-only","aria-label":c||e,...f}),t.jsx("label",{htmlFor:m,className:x,"aria-hidden":"true",children:t.jsx("div",{className:b})})]});return t.jsx("div",{className:`flex gap-2 items-center w-[344px] ${o}`,children:n==="leading"?t.jsxs(t.Fragment,{children:[y,C]}):t.jsxs(t.Fragment,{children:[C,y]})})});Jt.displayName="Switch";const yo=u.forwardRef(({size:e="10",type:r="circular",src:n,alt:s="",initials:a,className:o="",...i},l)=>{const c={4:"w-5 h-5",6:"w-6 h-6",8:"w-8 h-8",10:"w-10 h-10"},f={4:"text-xs",6:"text-xs",8:"text-sm",10:"text-base"},d={circular:"rounded-full",rounded:"rounded-md"},m=`
|
|
336
336
|
relative
|
|
337
337
|
inline-flex
|
|
338
338
|
items-center
|
|
339
339
|
justify-center
|
|
340
340
|
overflow-hidden
|
|
341
|
-
${c[
|
|
341
|
+
${c[e]}
|
|
342
342
|
${d[r]}
|
|
343
|
-
`;return n?
|
|
344
|
-
${
|
|
345
|
-
${
|
|
343
|
+
`;return n?t.jsx("div",{ref:l,className:`${m} ${o}`.trim().replace(/\s+/g," "),children:t.jsx("img",{src:n,alt:s,className:"w-full h-full object-cover",...i})}):a?t.jsx("div",{ref:l,className:`
|
|
344
|
+
${m}
|
|
345
|
+
${f[e]}
|
|
346
346
|
bg-content-primary
|
|
347
347
|
text-white
|
|
348
348
|
font-normal
|
|
349
349
|
dark:bg-dark-bg-inverse
|
|
350
350
|
dark:text-dark-content-inverse
|
|
351
351
|
${o}
|
|
352
|
-
`.trim().replace(/\s+/g," "),children:
|
|
353
|
-
${
|
|
352
|
+
`.trim().replace(/\s+/g," "),children:t.jsx("span",{className:"leading-none",children:a})}):t.jsx("div",{ref:l,className:`
|
|
353
|
+
${m}
|
|
354
354
|
bg-background-secondary
|
|
355
355
|
dark:bg-dark-bg-primary
|
|
356
356
|
${o}
|
|
357
|
-
`.trim().replace(/\s+/g," ")})});
|
|
357
|
+
`.trim().replace(/\s+/g," ")})});yo.displayName="Avatar";const rr=u.forwardRef(({type:e="default",className:r="",...n},s)=>{const i=["w-full h-px border-0",{default:"bg-border-primary dark:bg-dark-border-primary",soft:"bg-border-secondary dark:bg-gray-700"}[e],r].join(" ").replace(/\s+/g," ").trim();return t.jsx("hr",{ref:s,className:i,...n})});rr.displayName="Divider";const wo=u.forwardRef(({term:e,details:r,className:n="",...s},a)=>{const o=`
|
|
358
358
|
flex
|
|
359
359
|
flex-wrap
|
|
360
360
|
gap-1
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
border-b
|
|
364
364
|
border-border-secondary
|
|
365
365
|
dark:border-gray-700
|
|
366
|
-
`,i="flex-1 min-w-[180px]",l=[o,n].join(" ").replace(/\s+/g," ").trim();return
|
|
366
|
+
`,i="flex-1 min-w-[180px]",l=[o,n].join(" ").replace(/\s+/g," ").trim();return t.jsxs("div",{ref:a,className:l,...s,children:[t.jsx("div",{className:i,children:t.jsx("p",{className:"text-sm leading-5 text-content-secondary dark:text-gray-400 font-normal",children:e})}),t.jsx("div",{className:i,children:t.jsx("p",{className:"text-sm leading-5 text-content-primary dark:text-dark-content-primary font-normal",children:r})})]})});wo.displayName="DescriptionList";const kr=u.forwardRef(({title:e,description:r,children:n,actions:s,onCancel:a,onConfirm:o,cancelText:i="Cancelar",confirmText:l="Confirmar",className:c="",...f},d)=>{const m=s||t.jsxs(t.Fragment,{children:[a&&t.jsx(Q,{type:"plain",size:"base",onClick:a,children:i}),o&&t.jsx(Q,{type:"default",size:"base",onClick:o,children:l})]});return t.jsx("div",{ref:d,className:`
|
|
367
367
|
w-[512px]
|
|
368
368
|
bg-white
|
|
369
369
|
dark:bg-dark-bg-primary
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
dark:border-dark-border-primary
|
|
373
373
|
rounded-xl
|
|
374
374
|
${c}
|
|
375
|
-
`.trim().replace(/\s+/g," "),...
|
|
375
|
+
`.trim().replace(/\s+/g," "),...f,children:t.jsxs("div",{className:"p-6 flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("p",{className:"text-sm leading-5 font-bold text-content-primary dark:text-dark-content-primary",children:e}),r&&t.jsx("p",{className:"text-sm leading-5 font-normal text-content-tertiary dark:text-content-tertiary",children:r})]}),n&&t.jsx("div",{className:"flex flex-col gap-3",children:n}),t.jsx("div",{className:"flex flex-wrap gap-3 items-center justify-end",children:m})]})})});kr.displayName="Alert";const ut=u.forwardRef(({color:e="zinc",leftIcon:r,label:n,count:s,className:a="",...o},i)=>{const c={zinc:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"},red:{bg:"bg-red-100",text:"text-red-700",hover:"hover:bg-red-200",notificationBg:"bg-red-700",notificationText:"text-red-100"},orange:{bg:"bg-orange-100",text:"text-orange-700",hover:"hover:bg-orange-200",notificationBg:"bg-orange-700",notificationText:"text-orange-100"},amber:{bg:"bg-amber-100",text:"text-amber-700",hover:"hover:bg-amber-200",notificationBg:"bg-amber-700",notificationText:"text-amber-100"},yellow:{bg:"bg-yellow-100",text:"text-yellow-700",hover:"hover:bg-yellow-200",notificationBg:"bg-yellow-700",notificationText:"text-yellow-100"},lime:{bg:"bg-lime-100",text:"text-lime-700",hover:"hover:bg-lime-200",notificationBg:"bg-lime-700",notificationText:"text-lime-100"},green:{bg:"bg-green-100",text:"text-green-700",hover:"hover:bg-green-200",notificationBg:"bg-green-700",notificationText:"text-green-100"},emerald:{bg:"bg-emerald-100",text:"text-emerald-700",hover:"hover:bg-emerald-200",notificationBg:"bg-emerald-700",notificationText:"text-emerald-100"},teal:{bg:"bg-teal-100",text:"text-teal-700",hover:"hover:bg-teal-200",notificationBg:"bg-teal-700",notificationText:"text-teal-100"},cyan:{bg:"bg-cyan-100",text:"text-cyan-700",hover:"hover:bg-cyan-200",notificationBg:"bg-cyan-700",notificationText:"text-cyan-100"},sky:{bg:"bg-sky-100",text:"text-sky-700",hover:"hover:bg-sky-200",notificationBg:"bg-sky-700",notificationText:"text-sky-100"},blue:{bg:"bg-blue-100",text:"text-blue-700",hover:"hover:bg-blue-200",notificationBg:"bg-blue-700",notificationText:"text-blue-100"},indigo:{bg:"bg-indigo-100",text:"text-indigo-700",hover:"hover:bg-indigo-200",notificationBg:"bg-indigo-700",notificationText:"text-indigo-100"},violet:{bg:"bg-violet-100",text:"text-violet-700",hover:"hover:bg-violet-200",notificationBg:"bg-violet-700",notificationText:"text-violet-100"},purple:{bg:"bg-purple-100",text:"text-purple-700",hover:"hover:bg-purple-200",notificationBg:"bg-purple-700",notificationText:"text-purple-100"},fuchsia:{bg:"bg-fuchsia-100",text:"text-fuchsia-700",hover:"hover:bg-fuchsia-200",notificationBg:"bg-fuchsia-700",notificationText:"text-fuchsia-100"},pink:{bg:"bg-pink-100",text:"text-pink-700",hover:"hover:bg-pink-200",notificationBg:"bg-pink-700",notificationText:"text-pink-100"},rose:{bg:"bg-rose-100",text:"text-rose-700",hover:"hover:bg-rose-200",notificationBg:"bg-rose-700",notificationText:"text-rose-100"},primary:{bg:"bg-primary-custom-100",text:"text-primary-custom-600",hover:"hover:bg-primary-custom-200",notificationBg:"bg-primary-custom-600",notificationText:"text-primary-custom-100"},secondary:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"},tertiary:{bg:"bg-zinc-100",text:"text-zinc-600",hover:"hover:bg-zinc-200",notificationBg:"bg-zinc-600",notificationText:"text-zinc-100"}}[e],f=m=>{const h=m.props.className||"";return u.cloneElement(m,{className:`w-3 h-3 ${h}`.trim()})},d=["inline-flex","items-center","gap-1","px-1.5","py-1","rounded-md","font-sans",c.bg,c.hover,"transition-colors","duration-200",a].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return t.jsxs("div",{ref:i,className:d,...o,children:[r&&t.jsx("div",{className:`flex items-center justify-center ${c.text}`,children:f(r)}),t.jsx("span",{className:`font-sans text-xs leading-4 ${c.text}`,children:n}),s!==void 0&&t.jsx("div",{className:`
|
|
376
376
|
h-3
|
|
377
377
|
flex
|
|
378
378
|
items-center
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
rounded-xs
|
|
382
382
|
min-w-[12px]
|
|
383
383
|
${c.notificationBg}
|
|
384
|
-
`.trim().replace(/\s+/g," "),children:
|
|
384
|
+
`.trim().replace(/\s+/g," "),children:t.jsx("span",{className:`font-sans text-xs leading-4 ${c.notificationText}`,children:s})})]})});ut.displayName="Badge";const Ms=u.forwardRef(({value:e,defaultValue:r=0,onChange:n,min:s=0,max:a,label:o,linkText:i,onLinkClick:l,helperText:c,error:f=!1,disabled:d=!1,className:m="",...h},p)=>{const[g,x]=u.useState(r),b=e!==void 0,y=b?e:g;u.useEffect(()=>{b||x(r)},[r,b]);const C=A=>{let V=A;s!==void 0&&V<s&&(V=s),a!==void 0&&V>a&&(V=a),b||x(V),n?.(V)},w=()=>{d||C(y-1)},j=()=>{d||C(y+1)},I=d||s!==void 0&&y<=s,N=d||a!==void 0&&y>=a,E=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),S=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),v=f?"border-error-border dark:border-error-border":"border-border-primary dark:border-dark-border-primary",R=!d&&!f?"hover:border-[#f9f9f9] dark:hover:border-[#f9f9f9]":"",T=!d&&!f?"focus-within:border-2 focus-within:border-[#329cff] dark:focus-within:border-[#329cff]":"";return t.jsxs("div",{ref:p,className:`flex flex-col gap-2 ${m}`.trim(),...h,children:[o&&t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("label",{className:"text-sm leading-5 font-bold text-content-primary dark:text-dark-content-primary",children:o}),i&&t.jsx("button",{type:"button",onClick:l,disabled:d,className:`
|
|
385
385
|
text-xs leading-4
|
|
386
386
|
text-primary-custom-600
|
|
387
387
|
hover:underline
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
${d?"opacity-50 cursor-not-allowed":"cursor-pointer"}
|
|
390
390
|
transition-colors
|
|
391
391
|
duration-200
|
|
392
|
-
`.trim().replace(/\s+/g," "),children:i})]}),
|
|
392
|
+
`.trim().replace(/\s+/g," "),children:i})]}),t.jsxs("div",{className:`
|
|
393
393
|
flex
|
|
394
394
|
items-center
|
|
395
395
|
gap-2
|
|
@@ -398,14 +398,14 @@
|
|
|
398
398
|
bg-white
|
|
399
399
|
dark:bg-dark-bg-primary
|
|
400
400
|
border
|
|
401
|
-
${
|
|
401
|
+
${v}
|
|
402
402
|
${R}
|
|
403
|
-
${
|
|
403
|
+
${T}
|
|
404
404
|
rounded-lg
|
|
405
405
|
transition-colors
|
|
406
406
|
duration-200
|
|
407
407
|
${d?"opacity-50 cursor-not-allowed":""}
|
|
408
|
-
`.trim().replace(/\s+/g," "),children:[
|
|
408
|
+
`.trim().replace(/\s+/g," "),children:[t.jsx("button",{type:"button",onClick:w,disabled:I,className:`
|
|
409
409
|
flex
|
|
410
410
|
items-center
|
|
411
411
|
justify-center
|
|
@@ -414,22 +414,22 @@
|
|
|
414
414
|
${I?"text-content-tertiary dark:text-content-tertiary cursor-not-allowed":"text-content-primary dark:text-dark-content-primary hover:text-content-secondary dark:hover:text-content-secondary cursor-pointer"}
|
|
415
415
|
transition-colors
|
|
416
416
|
duration-200
|
|
417
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Decrementar",children:
|
|
417
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Decrementar",children:t.jsx(E,{})}),t.jsx("div",{className:"flex-1 text-center",children:t.jsx("span",{className:`
|
|
418
418
|
text-base leading-6
|
|
419
419
|
${y===0?"text-content-tertiary dark:text-content-tertiary":"text-content-primary dark:text-dark-content-primary"}
|
|
420
|
-
`.trim().replace(/\s+/g," "),children:y})}),
|
|
420
|
+
`.trim().replace(/\s+/g," "),children:y})}),t.jsx("button",{type:"button",onClick:j,disabled:N,className:`
|
|
421
421
|
flex
|
|
422
422
|
items-center
|
|
423
423
|
justify-center
|
|
424
424
|
w-4
|
|
425
425
|
h-4
|
|
426
|
-
${
|
|
426
|
+
${N?"text-content-tertiary dark:text-content-tertiary cursor-not-allowed":"text-content-primary dark:text-dark-content-primary hover:text-content-secondary dark:hover:text-content-secondary cursor-pointer"}
|
|
427
427
|
transition-colors
|
|
428
428
|
duration-200
|
|
429
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Incrementar",children:
|
|
429
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Incrementar",children:t.jsx(S,{})})]}),c&&t.jsx("p",{className:`
|
|
430
430
|
text-sm leading-5
|
|
431
|
-
${
|
|
432
|
-
`.trim().replace(/\s+/g," "),children:c})]})});
|
|
431
|
+
${f?"text-error-content dark:text-error-content":"text-content-tertiary dark:text-content-tertiary"}
|
|
432
|
+
`.trim().replace(/\s+/g," "),children:c})]})});Ms.displayName="Quantity";const Is=({icon:e,label:r,selected:n=!1,disabled:s=!1,badge:a=!1,badgeCount:o,onClick:i,onMouseEnter:l,onMouseLeave:c,ariaLabel:f,id:d,showLabelText:m=!0,showIcon:h=!0,className:p=""})=>{const g=["flex","flex-col","items-center","justify-center","px-4","py-1","rounded-full","overflow-hidden","shrink-0",n?"bg-primary-custom-100 dark:bg-primary-custom-600/30":"bg-transparent hover:bg-primary-custom-100 dark:hover:bg-primary-custom-600/20","transition-colors","duration-150"].join(" "),x=["w-4","h-4","shrink-0",n?"text-primary-custom-600 dark:text-white":s?"text-content-tertiary dark:text-content-tertiary":"text-content-primary hover:text-primary-custom-600 dark:text-dark-content-primary dark:hover:text-white","transition-colors","duration-150"].join(" "),b=["text-xs","leading-3","font-bold","text-center","w-full","min-w-full","text-content-primary","dark:text-dark-content-primary","wrap-break-word"].join(" "),y=["relative","flex","flex-col","items-center","gap-1","px-0.5","py-0","w-14","shrink-0",s?"cursor-not-allowed opacity-55 pointer-events-none":"cursor-pointer","focus:outline-hidden","focus-visible:ring-2","focus-visible:ring-primary-custom-400","focus-visible:ring-offset-2","focus-visible:ring-offset-primary-custom-100","dark:focus-visible:ring-dark-border-custom","dark:focus-visible:ring-offset-dark-bg-primary","focus-visible:shadow-lg","dark:focus-visible:shadow-2xl","rounded-lg",p].join(" "),C=()=>!a&&o===void 0?null:o!==void 0?t.jsx("span",{className:`
|
|
433
433
|
absolute
|
|
434
434
|
-top-0.5
|
|
435
435
|
left-8
|
|
@@ -449,7 +449,7 @@
|
|
|
449
449
|
dark:text-white
|
|
450
450
|
pointer-events-none
|
|
451
451
|
select-none
|
|
452
|
-
`,"aria-label":`${o} notificaciones`,"data-badge":!0,children:o>99?"99+":o}):
|
|
452
|
+
`,"aria-label":`${o} notificaciones`,"data-badge":!0,children:o>99?"99+":o}):t.jsx("span",{className:`
|
|
453
453
|
absolute
|
|
454
454
|
-top-0.5
|
|
455
455
|
left-8
|
|
@@ -460,7 +460,7 @@
|
|
|
460
460
|
dark:bg-red-700
|
|
461
461
|
pointer-events-none
|
|
462
462
|
select-none
|
|
463
|
-
`,"aria-label":"Notificación","data-badge":!0});return e.jsxs("button",{type:"button",className:y,disabled:s,onClick:i,onMouseEnter:l,onMouseLeave:c,"aria-label":u||r,"aria-current":n?"page":void 0,"aria-disabled":s,"data-item-id":d,"data-testid":`navigation-rail-item-${d}`,children:[h&&e.jsx("div",{className:g,children:e.jsx("span",{className:x,children:t})}),f&&e.jsx("p",{className:b,children:r}),j()]})};Wn.displayName="NavigationRailItem";const $o=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"w-4 h-4",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),_e=({variant:t="default",children:r,items:n,open:s,onOpenChange:a,disabled:o=!1,className:i="",menuClassName:l="",ariaLabel:c,placeholder:u="Options",renderTrigger:d})=>{const[f,h]=m.useState(!1),[p,g]=m.useState(null),x=m.useRef(null),b=m.useRef(null),y=s!==void 0,j=y?s:f,w=m.useCallback(()=>{if(!x.current)return;const L=x.current.getBoundingClientRect(),k=window.innerWidth,R=window.innerHeight,z=182;let A=L.bottom+4,P=L.left,D="left";P+z>k&&(P=L.right,D="right");const Q=Math.min(n.length*40+20,300);A+Q>R&&L.top>Q&&(A=L.top-4),g({top:A,left:P,align:D})},[n.length]);m.useEffect(()=>(j&&(w(),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w)),()=>{window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}),[j,w]);const C=()=>{if(o)return;const L=!j;y||h(L),a?.(L)};m.useEffect(()=>{const L=k=>{x.current&&x.current.contains(k.target)||b.current&&b.current.contains(k.target)||j&&(y||h(!1),a?.(!1))};if(j)return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[j,y,a]);const I=L=>{L.disabled||L.isDivider||L.isHeading||(L.onClick&&L.onClick({}),y||h(!1),a?.(!1))},S=()=>{if(!j||!p)return null;const L={position:"fixed",top:p.top,left:p.left,transform:p.align==="right"?"translateX(-100%)":"none",zIndex:9999,maxHeight:"300px",overflowY:"auto"},k=["min-w-[182px]","rounded-lg","p-1","border","bg-background-secondary","border-border-primary","dark:bg-dark-bg-primary","dark:border-dark-border-primary","shadow-lg",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return ln.createPortal(e.jsx("div",{ref:b,style:L,className:k,children:n.map((R,z)=>R.isDivider?e.jsx(Do,{className:R.className},z):R.isHeading?e.jsx(Fo,{className:R.className,children:R.children},z):e.jsx(Oo,{...R,onClick:()=>I(R)},z))}),document.body)},O=["inline-flex","items-center","justify-center","rounded-lg","font-bold","text-sm","whitespace-nowrap","transition-all","duration-150",t==="icon-only"?"w-9 h-9":"gap-2 px-3 py-2","bg-white","text-content-secondary","border","border-border-primary","hover:bg-background-secondary","dark:bg-dark-bg-primary","dark:text-dark-content-primary","dark:border-dark-border-primary","dark:hover:bg-dark-bg-secondary","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary",o&&"opacity-50",o&&"cursor-not-allowed",o&&"pointer-events-none",i].filter(Boolean).join(" ").trim();return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:x,className:"relative inline-block",children:d?e.jsx("div",{onClick:C,role:"button",tabIndex:o?-1:0,children:d(j)}):e.jsxs("button",{type:"button",className:O,onClick:C,disabled:o,"aria-label":c||(t==="icon-only"?"Abrir menú":void 0),"aria-haspopup":"true","aria-expanded":j,children:[t==="default"&&e.jsx("span",{children:r||u}),e.jsx($o,{})]})}),S()]})},Oo=({children:t,icon:r,description:n,shortcut:s,disabled:a=!1,selected:o=!1,onClick:i,className:l=""})=>{const c=["flex","items-center","gap-3","px-4","py-2","rounded-lg","text-sm","font-normal","w-full","text-left","text-content-primary",!a&&"hover:bg-bg-primary",o&&"bg-bg-primary","dark:text-dark-content-primary",!a&&"dark:hover:bg-dark-bg-secondary",o&&"dark:bg-dark-bg-secondary",a&&"opacity-50",a&&"cursor-not-allowed",!a&&"cursor-pointer",l].filter(Boolean).join(" ").trim();return e.jsxs("button",{type:"button",className:c,onClick:i,disabled:a,children:[r&&e.jsx("span",{className:"inline-flex items-center justify-center w-4 h-4 text-content-secondary dark:text-dark-content-secondary",children:r}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-content-primary dark:text-dark-content-primary",children:t}),n&&e.jsx("div",{className:"text-xs text-content-secondary dark:text-dark-content-secondary mt-0.5",children:n})]}),s&&e.jsx("span",{className:"text-xs text-content-secondary dark:text-dark-content-secondary ml-auto whitespace-nowrap",children:s})]})},Fo=({children:t,className:r=""})=>{const n=["px-4","py-1","text-xs","font-normal","text-content-tertiary","dark:text-dark-content-tertiary",r].filter(Boolean).join(" ").trim();return e.jsx("div",{className:n,children:t})},Do=({className:t=""})=>{const r=["px-4","py-1",t].filter(Boolean).join(" ").trim();return e.jsx("div",{className:r,children:e.jsx("div",{className:"h-px bg-border-primary dark:bg-dark-border-primary"})})},Bo=({className:t=""})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:e.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Zn=({label:t,icon:r,children:n=[],defaultOpen:s=!1,disabled:a=!1,onOpenChange:o,onClick:i,isCollapsible:l=n.length>0,showHeading:c=!1,headingLabel:u,showDivider:d=!0,selected:f=!1,badge:h=!1,badgeCount:p,badgeColor:g="red",stickyHeader:x=!1,className:b=""})=>{const[y,j]=m.useState(s);m.useEffect(()=>{j(s)},[s]);const w=()=>{if(a||!l)return;const S=!y;j(S),o?.(S)},C=S=>{a||(l?w():i?.(S))},I=S=>O=>{S.disabled||S.onClick?.(O)};return e.jsxs("div",{className:`flex flex-col gap-0.5 w-full ${b}`,children:[e.jsxs("div",{className:["flex flex-col gap-0.5 w-full transition-all duration-200 rounded-lg",x&&"sticky top-0 z-10 bg-gray-50 dark:bg-dark-bg-primary shadow-xs mb-0.5"].filter(Boolean).join(" "),children:[c&&u&&e.jsx("div",{className:"flex flex-col gap-0 items-start pb-1 pt-3 px-0 w-full",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-4 not-italic text-xs text-content-tertiary dark:text-content-tertiary w-full",children:u})}),e.jsxs("button",{onClick:C,disabled:a,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",f&&!a&&"bg-primary-custom-100 text-primary-custom-600",!f&&!a&&"text-content-primary",!a&&"hover:bg-primary-custom-100",!a&&"hover:text-primary-custom-600",f&&!a&&"dark:bg-dark-bg-custom dark:text-dark-content-custom",!f&&!a&&"dark:text-content-primary",!a&&"dark:hover:bg-dark-bg-custom",!a&&"dark:hover:text-dark-content-custom",!a&&"focus:outline-hidden",!a&&"focus:ring-2",!a&&"focus:ring-offset-2",!a&&"focus:ring-primary-custom-400",!a&&"focus:ring-offset-bg-primary",!a&&"dark:focus:ring-offset-dark-bg-primary",a&&"opacity-50",a&&"cursor-not-allowed"].filter(Boolean).join(" "),"aria-expanded":y&&l,"aria-disabled":a,children:[r&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:r}),e.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:t})}),(h||p)&&e.jsx("div",{className:"flex items-center justify-center shrink-0",children:p?e.jsx("div",{className:"flex items-center justify-center px-1.5 py-0.5 rounded-full bg-red-500 dark:bg-red-600 text-white text-xs font-bold min-w-6 h-6",children:p>99?"99+":p}):e.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 dark:bg-red-600 shrink-0"})}),l&&e.jsx("div",{className:["flex items-center justify-center w-4 h-4 shrink-0","text-content-secondary dark:text-content-secondary","transition-transform duration-200",y?"rotate-180":"rotate-0"].join(" "),children:e.jsx(Bo,{className:"w-4 h-4"})})]}),d&&e.jsx("div",{className:"w-full h-px bg-border-primary dark:bg-dark-border-primary"})]}),y&&l&&n.length>0&&e.jsx("div",{className:"flex flex-col gap-0.5 w-full py-2 px-0",children:n.map((S,O)=>e.jsxs("div",{onClick:I(S),className:["flex gap-3 items-center pl-6 pr-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",!S.disabled&&"text-content-primary",!S.disabled&&"hover:bg-primary-custom-100",!S.disabled&&"hover:text-primary-custom-600",!S.disabled&&"dark:text-content-primary",!S.disabled&&"dark:hover:bg-dark-bg-custom",!S.disabled&&"dark:hover:text-dark-content-custom",!S.disabled&&"focus:outline-hidden",!S.disabled&&"focus:ring-2",!S.disabled&&"focus:ring-offset-2",!S.disabled&&"focus:ring-primary-custom-400",!S.disabled&&"focus:ring-offset-bg-primary",!S.disabled&&"dark:focus:ring-offset-dark-bg-primary",S.disabled&&"opacity-50",S.disabled&&"cursor-not-allowed",S.className].filter(Boolean).join(" "),children:[S.icon&&e.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:S.icon}),e.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:e.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:S.label})})]},O))})]})},Vo=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:e.jsx("path",{fillRule:"evenodd",d:"M6.455 1.45A.5.5 0 0 1 6.952 1h2.096a.5.5 0 0 1 .497.45l.186 1.858a4.996 4.996 0 0 1 1.466.848l1.703-.769a.5.5 0 0 1 .639.206l1.047 1.814a.5.5 0 0 1-.14.656l-1.517 1.09a5.026 5.026 0 0 1 0 1.694l1.516 1.09a.5.5 0 0 1 .141.656l-1.047 1.814a.5.5 0 0 1-.639.206l-1.703-.768c-.433.36-.928.649-1.466.847l-.186 1.858a.5.5 0 0 1-.497.45H6.952a.5.5 0 0 1-.497-.45l-.186-1.858a4.993 4.993 0 0 1-1.466-.848l-1.703.769a.5.5 0 0 1-.639-.206l-1.047-1.814a.5.5 0 0 1 .14-.656l1.517-1.09a5.033 5.033 0 0 1 0-1.694l-1.516-1.09a.5.5 0 0 1-.141-.656L2.461 3.39a.5.5 0 0 1 .639-.206l1.703.768c.433-.36.928-.649 1.466-.847l.186-1.858ZM8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"})}),Po=({className:t="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:[e.jsx("path",{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 1 1-1.06-1.06L12.69 4.22a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M2.22 9.28a.75.75 0 0 0 0 1.06l2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0Z",clipRule:"evenodd"})]}),_o=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:e.jsx("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),Wo=({className:t="w-4 h-4"})=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),Zo={"cog-6-tooth":Vo,check:Po,x:_o,"chevron-down":Wo},Ho=(t,r)=>{if(!t)return null;const n=Zo[t];return n?e.jsx(n,{className:r}):(console.warn(`Icon "${t}" not found in iconMap`),null)},Hn=({label:t="Label",description:r,showDescription:n=!0,iconName:s="cog-6-tooth",showIcon:a=!0,actionLabel:o,showAction:i=!1,onActionClick:l,className:c="",...u})=>e.jsxs("div",{className:`
|
|
463
|
+
`,"aria-label":"Notificación","data-badge":!0});return t.jsxs("button",{type:"button",className:y,disabled:s,onClick:i,onMouseEnter:l,onMouseLeave:c,"aria-label":f||r,"aria-current":n?"page":void 0,"aria-disabled":s,"data-item-id":d,"data-testid":`navigation-rail-item-${d}`,children:[h&&t.jsx("div",{className:g,children:t.jsx("span",{className:x,children:e})}),m&&t.jsx("p",{className:b,children:r}),C()]})};Is.displayName="NavigationRailItem";const gl=()=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:"w-4 h-4",children:t.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),it=({variant:e="default",children:r,items:n,open:s,onOpenChange:a,disabled:o=!1,className:i="",menuClassName:l="",ariaLabel:c,placeholder:f="Options",renderTrigger:d})=>{const[m,h]=u.useState(!1),[p,g]=u.useState(null),x=u.useRef(null),b=u.useRef(null),y=s!==void 0,C=y?s:m,w=u.useCallback(()=>{if(!x.current)return;const S=x.current.getBoundingClientRect(),v=window.innerWidth,R=window.innerHeight,T=182;let A=S.bottom+4,V=S.left,F="left";V+T>v&&(V=S.right,F="right");const Y=Math.min(n.length*40+20,300);A+Y>R&&S.top>Y&&(A=S.top-4),g({top:A,left:V,align:F})},[n.length]);u.useEffect(()=>(C&&(w(),window.addEventListener("scroll",w,!0),window.addEventListener("resize",w)),()=>{window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}),[C,w]);const j=()=>{if(o)return;const S=!C;y||h(S),a?.(S)};u.useEffect(()=>{const S=v=>{x.current&&x.current.contains(v.target)||b.current&&b.current.contains(v.target)||C&&(y||h(!1),a?.(!1))};if(C)return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[C,y,a]);const I=S=>{S.disabled||S.isDivider||S.isHeading||(S.onClick&&S.onClick({}),y||h(!1),a?.(!1))},N=()=>{if(!C||!p)return null;const S={position:"fixed",top:p.top,left:p.left,transform:p.align==="right"?"translateX(-100%)":"none",zIndex:9999,maxHeight:"300px",overflowY:"auto"},v=["min-w-[182px]","rounded-lg","p-1","border","bg-background-secondary","border-border-primary","dark:bg-dark-bg-primary","dark:border-dark-border-primary","shadow-lg",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return Pt.createPortal(t.jsx("div",{ref:b,style:S,className:v,children:n.map((R,T)=>R.isDivider?t.jsx(yl,{className:R.className},T):R.isHeading?t.jsx(vl,{className:R.className,children:R.children},T):t.jsx(bl,{...R,onClick:()=>I(R)},T))}),document.body)},E=["inline-flex","items-center","justify-center","rounded-lg","font-bold","text-sm","whitespace-nowrap","transition-all","duration-150",e==="icon-only"?"w-9 h-9":"gap-2 px-3 py-2","bg-white","text-content-secondary","border","border-border-primary","hover:bg-background-secondary","dark:bg-dark-bg-primary","dark:text-dark-content-primary","dark:border-dark-border-primary","dark:hover:bg-dark-bg-secondary","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary",o&&"opacity-50",o&&"cursor-not-allowed",o&&"pointer-events-none",i].filter(Boolean).join(" ").trim();return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:x,className:"relative inline-block",children:d?t.jsx("div",{onClick:j,role:"button",tabIndex:o?-1:0,children:d(C)}):t.jsxs("button",{type:"button",className:E,onClick:j,disabled:o,"aria-label":c||(e==="icon-only"?"Abrir menú":void 0),"aria-haspopup":"true","aria-expanded":C,children:[e==="default"&&t.jsx("span",{children:r||f}),t.jsx(gl,{})]})}),N()]})},bl=({children:e,icon:r,description:n,shortcut:s,disabled:a=!1,selected:o=!1,onClick:i,className:l=""})=>{const c=["flex","items-center","gap-3","px-4","py-2","rounded-lg","text-sm","font-normal","w-full","text-left","text-content-primary",!a&&"hover:bg-bg-primary",o&&"bg-bg-primary","dark:text-dark-content-primary",!a&&"dark:hover:bg-dark-bg-secondary",o&&"dark:bg-dark-bg-secondary",a&&"opacity-50",a&&"cursor-not-allowed",!a&&"cursor-pointer",l].filter(Boolean).join(" ").trim();return t.jsxs("button",{type:"button",className:c,onClick:i,disabled:a,children:[r&&t.jsx("span",{className:"inline-flex items-center justify-center w-4 h-4 text-content-secondary dark:text-dark-content-secondary",children:r}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-content-primary dark:text-dark-content-primary",children:e}),n&&t.jsx("div",{className:"text-xs text-content-secondary dark:text-dark-content-secondary mt-0.5",children:n})]}),s&&t.jsx("span",{className:"text-xs text-content-secondary dark:text-dark-content-secondary ml-auto whitespace-nowrap",children:s})]})},vl=({children:e,className:r=""})=>{const n=["px-4","py-1","text-xs","font-normal","text-content-tertiary","dark:text-dark-content-tertiary",r].filter(Boolean).join(" ").trim();return t.jsx("div",{className:n,children:e})},yl=({className:e=""})=>{const r=["px-4","py-1",e].filter(Boolean).join(" ").trim();return t.jsx("div",{className:r,children:t.jsx("div",{className:"h-px bg-border-primary dark:bg-dark-border-primary"})})},wl=({className:e=""})=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:t.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ls=({label:e,icon:r,children:n=[],defaultOpen:s=!1,disabled:a=!1,onOpenChange:o,onClick:i,isCollapsible:l=n.length>0,showHeading:c=!1,headingLabel:f,showDivider:d=!0,selected:m=!1,badge:h=!1,badgeCount:p,badgeColor:g="red",stickyHeader:x=!1,className:b=""})=>{const[y,C]=u.useState(s);u.useEffect(()=>{C(s)},[s]);const w=()=>{if(a||!l)return;const N=!y;C(N),o?.(N)},j=N=>{a||(l?w():i?.(N))},I=N=>E=>{N.disabled||N.onClick?.(E)};return t.jsxs("div",{className:`flex flex-col gap-0.5 w-full ${b}`,children:[t.jsxs("div",{className:["flex flex-col gap-0.5 w-full transition-all duration-200 rounded-lg",x&&"sticky top-0 z-10 bg-gray-50 dark:bg-dark-bg-primary shadow-xs mb-0.5"].filter(Boolean).join(" "),children:[c&&f&&t.jsx("div",{className:"flex flex-col gap-0 items-start pb-1 pt-3 px-0 w-full",children:t.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-4 not-italic text-xs text-content-tertiary dark:text-content-tertiary w-full",children:f})}),t.jsxs("button",{onClick:j,disabled:a,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",m&&!a&&"bg-primary-custom-100 text-primary-custom-600",!m&&!a&&"text-content-primary",!a&&"hover:bg-primary-custom-100",!a&&"hover:text-primary-custom-600",m&&!a&&"dark:bg-dark-bg-custom dark:text-dark-content-custom",!m&&!a&&"dark:text-content-primary",!a&&"dark:hover:bg-dark-bg-custom",!a&&"dark:hover:text-dark-content-custom",!a&&"focus:outline-hidden",!a&&"focus:ring-2",!a&&"focus:ring-offset-2",!a&&"focus:ring-primary-custom-400",!a&&"focus:ring-offset-bg-primary",!a&&"dark:focus:ring-offset-dark-bg-primary",a&&"opacity-50",a&&"cursor-not-allowed"].filter(Boolean).join(" "),"aria-expanded":y&&l,"aria-disabled":a,children:[r&&t.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:r}),t.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:t.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:e})}),(h||p)&&t.jsx("div",{className:"flex items-center justify-center shrink-0",children:p?t.jsx("div",{className:"flex items-center justify-center px-1.5 py-0.5 rounded-full bg-red-500 dark:bg-red-600 text-white text-xs font-bold min-w-6 h-6",children:p>99?"99+":p}):t.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500 dark:bg-red-600 shrink-0"})}),l&&t.jsx("div",{className:["flex items-center justify-center w-4 h-4 shrink-0","text-content-secondary dark:text-content-secondary","transition-transform duration-200",y?"rotate-180":"rotate-0"].join(" "),children:t.jsx(wl,{className:"w-4 h-4"})})]}),d&&t.jsx("div",{className:"w-full h-px bg-border-primary dark:bg-dark-border-primary"})]}),y&&l&&n.length>0&&t.jsx("div",{className:"flex flex-col gap-0.5 w-full py-2 px-0",children:n.map((N,E)=>t.jsxs("div",{onClick:I(N),className:["flex gap-3 items-center pl-6 pr-4 py-2 w-full","rounded-lg cursor-pointer","transition-all duration-150",!N.disabled&&"text-content-primary",!N.disabled&&"hover:bg-primary-custom-100",!N.disabled&&"hover:text-primary-custom-600",!N.disabled&&"dark:text-content-primary",!N.disabled&&"dark:hover:bg-dark-bg-custom",!N.disabled&&"dark:hover:text-dark-content-custom",!N.disabled&&"focus:outline-hidden",!N.disabled&&"focus:ring-2",!N.disabled&&"focus:ring-offset-2",!N.disabled&&"focus:ring-primary-custom-400",!N.disabled&&"focus:ring-offset-bg-primary",!N.disabled&&"dark:focus:ring-offset-dark-bg-primary",N.disabled&&"opacity-50",N.disabled&&"cursor-not-allowed",N.className].filter(Boolean).join(" "),children:[N.icon&&t.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:N.icon}),t.jsx("div",{className:"flex flex-1 flex-col items-start justify-center gap-0.5",children:t.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal leading-5 not-italic text-sm text-left",children:N.label})})]},E))})]})},kl=({className:e="w-4 h-4"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:e,children:t.jsx("path",{fillRule:"evenodd",d:"M6.455 1.45A.5.5 0 0 1 6.952 1h2.096a.5.5 0 0 1 .497.45l.186 1.858a4.996 4.996 0 0 1 1.466.848l1.703-.769a.5.5 0 0 1 .639.206l1.047 1.814a.5.5 0 0 1-.14.656l-1.517 1.09a5.026 5.026 0 0 1 0 1.694l1.516 1.09a.5.5 0 0 1 .141.656l-1.047 1.814a.5.5 0 0 1-.639.206l-1.703-.768c-.433.36-.928.649-1.466.847l-.186 1.858a.5.5 0 0 1-.497.45H6.952a.5.5 0 0 1-.497-.45l-.186-1.858a4.993 4.993 0 0 1-1.466-.848l-1.703.769a.5.5 0 0 1-.639-.206l-1.047-1.814a.5.5 0 0 1 .14-.656l1.517-1.09a5.033 5.033 0 0 1 0-1.694l-1.516-1.09a.5.5 0 0 1-.141-.656L2.461 3.39a.5.5 0 0 1 .639-.206l1.703.768c.433-.36.928-.649 1.466-.847l.186-1.858ZM8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"})}),jl=({className:e="w-4 h-4"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:e,children:[t.jsx("path",{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 1 1-1.06-1.06L12.69 4.22a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}),t.jsx("path",{fillRule:"evenodd",d:"M2.22 9.28a.75.75 0 0 0 0 1.06l2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.5-2.5a.75.75 0 0 0-1.06 0Z",clipRule:"evenodd"})]}),Cl=({className:e="w-4 h-4"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:e,children:t.jsx("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),Nl=({className:e="w-4 h-4"})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:e,children:t.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),Sl={"cog-6-tooth":kl,check:jl,x:Cl,"chevron-down":Nl},Rl=(e,r)=>{if(!e)return null;const n=Sl[e];return n?t.jsx(n,{className:r}):(console.warn(`Icon "${e}" not found in iconMap`),null)},As=({label:e="Label",description:r,showDescription:n=!0,iconName:s="cog-6-tooth",showIcon:a=!0,actionLabel:o,showAction:i=!1,onActionClick:l,className:c="",...f})=>t.jsxs("div",{className:`
|
|
464
464
|
flex
|
|
465
465
|
gap-3
|
|
466
466
|
items-center
|
|
@@ -469,14 +469,14 @@
|
|
|
469
469
|
rounded-lg
|
|
470
470
|
w-56
|
|
471
471
|
${c}
|
|
472
|
-
`,"data-testid":"dropdown-item-heading",...
|
|
472
|
+
`,"data-testid":"dropdown-item-heading",...f,children:[a&&s&&t.jsx("div",{className:`
|
|
473
473
|
flex
|
|
474
474
|
items-center
|
|
475
475
|
justify-center
|
|
476
476
|
shrink-0
|
|
477
477
|
w-4
|
|
478
478
|
h-4
|
|
479
|
-
`,"data-testid":"icon-wrapper",children:
|
|
479
|
+
`,"data-testid":"icon-wrapper",children:t.jsx("div",{className:"text-primary-custom-600 dark:text-dark-content-inverse",children:Rl(s,"w-4 h-4")})}),t.jsxs("div",{className:`
|
|
480
480
|
flex
|
|
481
481
|
flex-1
|
|
482
482
|
flex-col
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
items-start
|
|
485
485
|
justify-center
|
|
486
486
|
min-w-0
|
|
487
|
-
`,"data-testid":"content-wrapper",children:[
|
|
487
|
+
`,"data-testid":"content-wrapper",children:[t.jsx("p",{className:`
|
|
488
488
|
font-bold
|
|
489
489
|
text-sm
|
|
490
490
|
leading-5
|
|
@@ -493,7 +493,7 @@
|
|
|
493
493
|
whitespace-nowrap
|
|
494
494
|
overflow-hidden
|
|
495
495
|
text-ellipsis
|
|
496
|
-
`,"data-testid":"label",children:
|
|
496
|
+
`,"data-testid":"label",children:e}),n&&r&&t.jsx("p",{className:`
|
|
497
497
|
font-normal
|
|
498
498
|
text-xs
|
|
499
499
|
leading-4
|
|
@@ -503,7 +503,7 @@
|
|
|
503
503
|
whitespace-pre-wrap
|
|
504
504
|
overflow-hidden
|
|
505
505
|
text-ellipsis
|
|
506
|
-
`,"data-testid":"description",children:r})]}),i&&o&&
|
|
506
|
+
`,"data-testid":"description",children:r})]}),i&&o&&t.jsx("div",{className:`
|
|
507
507
|
flex
|
|
508
508
|
items-center
|
|
509
509
|
justify-center
|
|
@@ -512,14 +512,14 @@
|
|
|
512
512
|
hover:opacity-80
|
|
513
513
|
transition-opacity
|
|
514
514
|
duration-150
|
|
515
|
-
`,"data-testid":"action-wrapper",onClick:l,role:"button",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&l?.(d)},children:
|
|
515
|
+
`,"data-testid":"action-wrapper",onClick:l,role:"button",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&l?.(d)},children:t.jsx("p",{className:`
|
|
516
516
|
font-normal
|
|
517
517
|
text-xs
|
|
518
518
|
leading-3
|
|
519
519
|
text-content-secondary
|
|
520
520
|
dark:text-dark-border-inverse
|
|
521
521
|
whitespace-nowrap
|
|
522
|
-
`,"data-testid":"action-label",children:o})})]});
|
|
522
|
+
`,"data-testid":"action-label",children:o})})]});As.displayName="DropdownItemHeading";const El=({count:e,color:r="red",className:n="",ariaLabel:s})=>{const a={zinc:{bg:"bg-zinc-600",text:"text-white"},red:{bg:"bg-content-extensions-red",text:"text-white"},orange:{bg:"bg-orange-700",text:"text-white"},amber:{bg:"bg-amber-700",text:"text-white"},yellow:{bg:"bg-yellow-700",text:"text-white"},lime:{bg:"bg-lime-700",text:"text-white"},green:{bg:"bg-green-700",text:"text-white"},emerald:{bg:"bg-emerald-700",text:"text-white"},teal:{bg:"bg-teal-700",text:"text-white"},cyan:{bg:"bg-cyan-700",text:"text-white"},sky:{bg:"bg-sky-700",text:"text-white"},blue:{bg:"bg-blue-700",text:"text-white"},indigo:{bg:"bg-indigo-700",text:"text-white"},violet:{bg:"bg-violet-700",text:"text-white"},purple:{bg:"bg-purple-700",text:"text-white"},fuchsia:{bg:"bg-fuchsia-700",text:"text-white"},pink:{bg:"bg-pink-700",text:"text-white"},rose:{bg:"bg-rose-700",text:"text-white"},primary:{bg:"bg-primary-custom-600",text:"text-white"},secondary:{bg:"bg-zinc-600",text:"text-white"},tertiary:{bg:"bg-zinc-600",text:"text-white"}},o=a[r]||a.red,i=s||(e!==void 0&&e>0?`${e} notificaci${e===1?"ón":"ones"}`:"Notificación pendiente");if(e!==void 0&&e>0){const l=e>99?"99+":e.toString();return t.jsx("span",{className:`
|
|
523
523
|
inline-flex
|
|
524
524
|
items-center
|
|
525
525
|
justify-center
|
|
@@ -536,7 +536,7 @@
|
|
|
536
536
|
dark:${o.bg}
|
|
537
537
|
dark:${o.text}
|
|
538
538
|
${n}
|
|
539
|
-
`.trim().replace(/\s+/g," "),role:"status","aria-label":i,children:l})}return
|
|
539
|
+
`.trim().replace(/\s+/g," "),role:"status","aria-label":i,children:l})}return t.jsx("span",{className:`
|
|
540
540
|
inline-block
|
|
541
541
|
w-2
|
|
542
542
|
h-2
|
|
@@ -545,7 +545,7 @@
|
|
|
545
545
|
pointer-events-none
|
|
546
546
|
dark:${o.bg}
|
|
547
547
|
${n}
|
|
548
|
-
`.trim().replace(/\s+/g," "),role:"status","aria-label":i})},
|
|
548
|
+
`.trim().replace(/\s+/g," "),role:"status","aria-label":i})},Ml=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M9.78 4.22a.75.75 0 0 1 0 1.06L7.06 8l2.72 2.72a.75.75 0 1 1-1.06 1.06L5.47 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"})}),Il=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),Ll=({currentPage:e=1,totalPages:r,onPageChange:n,backText:s="Atrás",nextText:a="Siguiente",siblingCount:o=1,showBackButton:i=!0,showNextButton:l=!0,className:c="",ariaLabel:f="Paginación"})=>{const d=u.useMemo(()=>{const x=o*2+3+2;if(r<=x)return Array.from({length:r},(N,E)=>E+1);const b=Math.max(e-o,1),y=Math.min(e+o,r),C=b>2,w=y<r-1,j=1,I=r;if(!C&&w){const N=3+2*o;return[...Array.from({length:N},(S,v)=>v+1),"...",r]}if(C&&!w){const N=3+2*o,E=Array.from({length:N},(S,v)=>r-N+v+1);return[j,"...",...E]}if(C&&w){const N=Array.from({length:y-b+1},(E,S)=>b+S);return[j,"...",...N,"...",I]}return[]},[e,r,o]),m=g=>{g>=1&&g<=r&&g!==e&&n?.(g)},h=({page:g,isActive:x=!1,disabled:b=!1,onClick:y,ariaLabel:C})=>{const w=g==="...",E=[`
|
|
549
549
|
inline-flex
|
|
550
550
|
items-center
|
|
551
551
|
justify-center
|
|
@@ -579,13 +579,13 @@
|
|
|
579
579
|
opacity-50
|
|
580
580
|
cursor-not-allowed
|
|
581
581
|
pointer-events-none
|
|
582
|
-
`:""].join(" ").replace(/\s+/g," ").trim();return
|
|
582
|
+
`:""].join(" ").replace(/\s+/g," ").trim();return t.jsx("button",{type:"button",className:E,onClick:y,disabled:b||w,"aria-label":C,"aria-current":x?"page":void 0,children:g})},p=`
|
|
583
583
|
inline-flex
|
|
584
584
|
items-center
|
|
585
585
|
justify-between
|
|
586
586
|
gap-0
|
|
587
587
|
${c}
|
|
588
|
-
`.replace(/\s+/g," ").trim();return
|
|
588
|
+
`.replace(/\s+/g," ").trim();return t.jsxs("nav",{className:p,"aria-label":f,role:"navigation",children:[i&&t.jsxs("button",{type:"button",className:`
|
|
589
589
|
inline-flex
|
|
590
590
|
items-center
|
|
591
591
|
justify-center
|
|
@@ -603,8 +603,8 @@
|
|
|
603
603
|
dark:active:scale-95
|
|
604
604
|
transition-all
|
|
605
605
|
duration-150
|
|
606
|
-
${
|
|
607
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>
|
|
606
|
+
${e===1?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
607
|
+
`.replace(/\s+/g," ").trim(),onClick:()=>m(e-1),disabled:e===1,"aria-label":`${s} page`,children:[t.jsx(Ml,{className:"w-4 h-4"}),s]}),t.jsx("div",{className:"inline-flex items-center",children:d.map((g,x)=>t.jsx(h,{page:g,isActive:g===e,onClick:()=>typeof g=="number"&&m(g),ariaLabel:typeof g=="number"?`Go to page ${g}`:`Page ${g}`},`${g}-${x}`))}),l&&t.jsxs("button",{type:"button",className:`
|
|
608
608
|
inline-flex
|
|
609
609
|
items-center
|
|
610
610
|
justify-center
|
|
@@ -622,8 +622,8 @@
|
|
|
622
622
|
dark:active:scale-95
|
|
623
623
|
transition-all
|
|
624
624
|
duration-150
|
|
625
|
-
${
|
|
626
|
-
`.replace(/\s+/g," ").trim(),onClick:()=>f(t+1),disabled:t===r,"aria-label":`${a} page`,children:[a,e.jsx(qo,{className:"w-4 h-4"})]})]})};function cn(){return typeof window<"u"}function dr(t){return Gn(t)?(t.nodeName||"").toLowerCase():"#document"}function We(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function ut(t){var r;return(r=(Gn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Gn(t){return cn()?t instanceof Node||t instanceof We(t).Node:!1}function Ee(t){return cn()?t instanceof Element||t instanceof We(t).Element:!1}function Je(t){return cn()?t instanceof HTMLElement||t instanceof We(t).HTMLElement:!1}function In(t){return!cn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof We(t).ShadowRoot}const Xo=new Set(["inline","contents"]);function $r(t){const{overflow:r,overflowX:n,overflowY:s,display:a}=Ue(t);return/auto|scroll|overlay|hidden|clip/.test(r+s+n)&&!Xo.has(a)}const Yo=new Set(["table","td","th"]);function Qo(t){return Yo.has(dr(t))}const Jo=[":popover-open",":modal"];function dn(t){return Jo.some(r=>{try{return t.matches(r)}catch{return!1}})}const ei=["transform","translate","scale","rotate","perspective"],ti=["transform","translate","scale","rotate","perspective","filter"],ri=["paint","layout","strict","content"];function Un(t){const r=un(),n=Ee(t)?Ue(t):t;return ei.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!r&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!r&&(n.filter?n.filter!=="none":!1)||ti.some(s=>(n.willChange||"").includes(s))||ri.some(s=>(n.contain||"").includes(s))}function ni(t){let r=Nt(t);for(;Je(r)&&!Ct(r);){if(Un(r))return r;if(dn(r))return null;r=Nt(r)}return null}function un(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const si=new Set(["html","body","#document"]);function Ct(t){return si.has(dr(t))}function Ue(t){return We(t).getComputedStyle(t)}function fn(t){return Ee(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Nt(t){if(dr(t)==="html")return t;const r=t.assignedSlot||t.parentNode||In(t)&&t.host||ut(t);return In(r)?r.host:r}function da(t){const r=Nt(t);return Ct(r)?t.ownerDocument?t.ownerDocument.body:t.body:Je(r)&&$r(r)?r:da(r)}function $t(t,r,n){var s;r===void 0&&(r=[]),n===void 0&&(n=!0);const a=da(t),o=a===((s=t.ownerDocument)==null?void 0:s.body),i=We(a);if(o){const l=Ln(i);return r.concat(i,i.visualViewport||[],$r(a)?a:[],l&&n?$t(l):[])}return r.concat(a,$t(a,[],n))}function Ln(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Lr=Math.min,He=Math.max,Jr=Math.round,Hr=Math.floor,dt=t=>({x:t,y:t}),ai={left:"right",right:"left",bottom:"top",top:"bottom"},oi={start:"end",end:"start"};function mn(t,r){return typeof t=="function"?t(r):t}function Ht(t){return t.split("-")[0]}function Or(t){return t.split("-")[1]}function ii(t){return t==="x"?"y":"x"}function ua(t){return t==="y"?"height":"width"}const li=new Set(["top","bottom"]);function zt(t){return li.has(Ht(t))?"y":"x"}function fa(t){return ii(zt(t))}function ci(t,r,n){n===void 0&&(n=!1);const s=Or(t),a=fa(t),o=ua(a);let i=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return r.reference[o]>r.floating[o]&&(i=en(i)),[i,en(i)]}function di(t){const r=en(t);return[An(t),r,An(r)]}function An(t){return t.replace(/start|end/g,r=>oi[r])}const ds=["left","right"],us=["right","left"],ui=["top","bottom"],fi=["bottom","top"];function mi(t,r,n){switch(t){case"top":case"bottom":return n?r?us:ds:r?ds:us;case"left":case"right":return r?ui:fi;default:return[]}}function hi(t,r,n,s){const a=Or(t);let o=mi(Ht(t),n==="start",s);return a&&(o=o.map(i=>i+"-"+a),r&&(o=o.concat(o.map(An)))),o}function en(t){return t.replace(/left|right|bottom|top/g,r=>ai[r])}function pi(t){return{top:0,right:0,bottom:0,left:0,...t}}function xi(t){return typeof t!="number"?pi(t):{top:t,right:t,bottom:t,left:t}}function tn(t){const{x:r,y:n,width:s,height:a}=t;return{width:s,height:a,top:n,left:r,right:r+s,bottom:n+a,x:r,y:n}}var gi=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],zn=gi.join(","),ma=typeof Element>"u",Ar=ma?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,rn=!ma&&Element.prototype.getRootNode?function(t){var r;return t==null||(r=t.getRootNode)===null||r===void 0?void 0:r.call(t)}:function(t){return t?.ownerDocument},nn=function(r,n){var s;n===void 0&&(n=!0);var a=r==null||(s=r.getAttribute)===null||s===void 0?void 0:s.call(r,"inert"),o=a===""||a==="true",i=o||n&&r&&(typeof r.closest=="function"?r.closest("[inert]"):nn(r.parentNode));return i},bi=function(r){var n,s=r==null||(n=r.getAttribute)===null||n===void 0?void 0:n.call(r,"contenteditable");return s===""||s==="true"},vi=function(r,n,s){if(nn(r))return[];var a=Array.prototype.slice.apply(r.querySelectorAll(zn));return n&&Ar.call(r,zn)&&a.unshift(r),a=a.filter(s),a},Tn=function(r,n,s){for(var a=[],o=Array.from(r);o.length;){var i=o.shift();if(!nn(i,!1))if(i.tagName==="SLOT"){var l=i.assignedElements(),c=l.length?l:i.children,u=Tn(c,!0,s);s.flatten?a.push.apply(a,u):a.push({scopeParent:i,candidates:u})}else{var d=Ar.call(i,zn);d&&s.filter(i)&&(n||!r.includes(i))&&a.push(i);var f=i.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(i),h=!nn(f,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(i));if(f&&h){var p=Tn(f===!0?i.children:f.children,!0,s);s.flatten?a.push.apply(a,p):a.push({scopeParent:i,candidates:p})}else o.unshift.apply(o,i.children)}}return a},ha=function(r){return!isNaN(parseInt(r.getAttribute("tabindex"),10))},pa=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||bi(r))&&!ha(r)?0:r.tabIndex},yi=function(r,n){var s=pa(r);return s<0&&n&&!ha(r)?0:s},ki=function(r,n){return r.tabIndex===n.tabIndex?r.documentOrder-n.documentOrder:r.tabIndex-n.tabIndex},xa=function(r){return r.tagName==="INPUT"},wi=function(r){return xa(r)&&r.type==="hidden"},ji=function(r){var n=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(s){return s.tagName==="SUMMARY"});return n},Ci=function(r,n){for(var s=0;s<r.length;s++)if(r[s].checked&&r[s].form===n)return r[s]},Ni=function(r){if(!r.name)return!0;var n=r.form||rn(r),s=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=s(window.CSS.escape(r.name));else try{a=s(r.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=Ci(a,r.form);return!o||o===r},Si=function(r){return xa(r)&&r.type==="radio"},Ri=function(r){return Si(r)&&!Ni(r)},Ei=function(r){var n,s=r&&rn(r),a=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==r){var i,l,c;for(o=!!((i=a)!==null&&i!==void 0&&(l=i.ownerDocument)!==null&&l!==void 0&&l.contains(a)||r!=null&&(c=r.ownerDocument)!==null&&c!==void 0&&c.contains(r));!o&&a;){var u,d,f;s=rn(a),a=(u=s)===null||u===void 0?void 0:u.host,o=!!((d=a)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(a))}}return o},fs=function(r){var n=r.getBoundingClientRect(),s=n.width,a=n.height;return s===0&&a===0},Mi=function(r,n){var s=n.displayCheck,a=n.getShadowRoot;if(s==="full-native"&&"checkVisibility"in r){var o=r.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(r).visibility==="hidden")return!0;var i=Ar.call(r,"details>summary:first-of-type"),l=i?r.parentElement:r;if(Ar.call(l,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="full-native"||s==="legacy-full"){if(typeof a=="function"){for(var c=r;r;){var u=r.parentElement,d=rn(r);if(u&&!u.shadowRoot&&a(u)===!0)return fs(r);r.assignedSlot?r=r.assignedSlot:!u&&d!==r.ownerDocument?r=d.host:r=u}r=c}if(Ei(r))return!r.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return fs(r);return!1},Ii=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var n=r.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var s=0;s<n.children.length;s++){var a=n.children.item(s);if(a.tagName==="LEGEND")return Ar.call(n,"fieldset[disabled] *")?!0:!a.contains(r)}return!0}n=n.parentElement}return!1},Li=function(r,n){return!(n.disabled||wi(n)||Mi(n,r)||ji(n)||Ii(n))},ms=function(r,n){return!(Ri(n)||pa(n)<0||!Li(r,n))},Ai=function(r){var n=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},ga=function(r){var n=[],s=[];return r.forEach(function(a,o){var i=!!a.scopeParent,l=i?a.scopeParent:a,c=yi(l,i),u=i?ga(a.candidates):l;c===0?i?n.push.apply(n,u):n.push(l):s.push({documentOrder:o,tabIndex:c,item:a,isScope:i,content:u})}),s.sort(ki).reduce(function(a,o){return o.isScope?a.push.apply(a,o.content):a.push(o.content),a},[]).concat(n)},ba=function(r,n){n=n||{};var s;return n.getShadowRoot?s=Tn([r],n.includeContainer,{filter:ms.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ai}):s=vi(r,n.includeContainer,ms.bind(null,n)),ga(s)};function zi(){return/apple/i.test(navigator.vendor)}function Ti(t){let r=t.activeElement;for(;((n=r)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;r=r.shadowRoot.activeElement}return r}function $n(t,r){if(!t||!r)return!1;const n=r.getRootNode==null?void 0:r.getRootNode();if(t.contains(r))return!0;if(n&&In(n)){let s=r;for(;s;){if(t===s)return!0;s=s.parentNode||s.host}}return!1}function jr(t){return"composedPath"in t?t.composedPath()[0]:t.target}function yn(t,r){if(r==null)return!1;if("composedPath"in t)return t.composedPath().includes(r);const n=t;return n.target!=null&&r.contains(n.target)}function $i(t){return t.matches("html,body")}function zr(t){return t?.ownerDocument||document}function Xr(t,r,n){return n===void 0&&(n=!0),t.filter(a=>{var o;return a.parentId===r&&(!n||((o=a.context)==null?void 0:o.open))}).flatMap(a=>[a,...Xr(t,a.id,n)])}function Oi(t){return"nativeEvent"in t}var Fi=typeof document<"u",Di=function(){},Wt=Fi?m.useLayoutEffect:Di;const Bi={...v},Vi=Bi.useInsertionEffect,Pi=Vi||(t=>t());function or(t){const r=v.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Pi(()=>{r.current=t}),v.useCallback(function(){for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return r.current==null?void 0:r.current(...s)},[])}const va=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ya(t,r){const n=ba(t,va()),s=n.length;if(s===0)return;const a=Ti(zr(t)),o=n.indexOf(a),i=o===-1?r===1?0:s-1:o+r;return n[i]}function _i(t){return ya(zr(t).body,1)||t}function Wi(t){return ya(zr(t).body,-1)||t}function kn(t,r){const n=r||t.currentTarget,s=t.relatedTarget;return!s||!$n(n,s)}function Zi(t){ba(t,va()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function hs(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function ps(t,r,n){let{reference:s,floating:a}=t;const o=zt(r),i=fa(r),l=ua(i),c=Ht(r),u=o==="y",d=s.x+s.width/2-a.width/2,f=s.y+s.height/2-a.height/2,h=s[l]/2-a[l]/2;let p;switch(c){case"top":p={x:d,y:s.y-a.height};break;case"bottom":p={x:d,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:f};break;case"left":p={x:s.x-a.width,y:f};break;default:p={x:s.x,y:s.y}}switch(Or(r)){case"start":p[i]-=h*(n&&u?-1:1);break;case"end":p[i]+=h*(n&&u?-1:1);break}return p}const Hi=async(t,r,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,l=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(r));let u=await i.getElementRects({reference:t,floating:r,strategy:a}),{x:d,y:f}=ps(u,s,c),h=s,p={},g=0;for(let x=0;x<l.length;x++){const{name:b,fn:y}=l[x],{x:j,y:w,data:C,reset:I}=await y({x:d,y:f,initialPlacement:s,placement:h,strategy:a,middlewareData:p,rects:u,platform:i,elements:{reference:t,floating:r}});d=j??d,f=w??f,p={...p,[b]:{...p[b],...C}},I&&g<=50&&(g++,typeof I=="object"&&(I.placement&&(h=I.placement),I.rects&&(u=I.rects===!0?await i.getElementRects({reference:t,floating:r,strategy:a}):I.rects),{x:d,y:f}=ps(u,h,c)),x=-1)}return{x:d,y:f,placement:h,strategy:a,middlewareData:p}};async function ka(t,r){var n;r===void 0&&(r={});const{x:s,y:a,platform:o,rects:i,elements:l,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=mn(r,t),g=xi(p),b=l[h?f==="floating"?"reference":"floating":f],y=tn(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),j=f==="floating"?{x:s,y:a,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),C=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},I=tn(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:j,offsetParent:w,strategy:c}):j);return{top:(y.top-I.top+g.top)/C.y,bottom:(I.bottom-y.bottom+g.bottom)/C.y,left:(y.left-I.left+g.left)/C.x,right:(I.right-y.right+g.right)/C.x}}const Gi=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var n,s;const{placement:a,middlewareData:o,rects:i,initialPlacement:l,platform:c,elements:u}=r,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:x=!0,...b}=mn(t,r);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Ht(a),j=zt(l),w=Ht(l)===l,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),I=h||(w||!x?[en(l)]:di(l)),S=g!=="none";!h&&S&&I.push(...hi(l,x,g,C));const O=[l,...I],L=await ka(r,b),k=[];let R=((s=o.flip)==null?void 0:s.overflows)||[];if(d&&k.push(L[y]),f){const D=ci(a,i,C);k.push(L[D[0]],L[D[1]])}if(R=[...R,{placement:a,overflows:k}],!k.every(D=>D<=0)){var z,A;const D=(((z=o.flip)==null?void 0:z.index)||0)+1,Q=O[D];if(Q&&(!(f==="alignment"?j!==zt(Q):!1)||R.every(E=>zt(E.placement)===j?E.overflows[0]>0:!0)))return{data:{index:D,overflows:R},reset:{placement:Q}};let V=(A=R.filter(_=>_.overflows[0]<=0).sort((_,E)=>_.overflows[1]-E.overflows[1])[0])==null?void 0:A.placement;if(!V)switch(p){case"bestFit":{var P;const _=(P=R.filter(E=>{if(S){const U=zt(E.placement);return U===j||U==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(U=>U>0).reduce((U,T)=>U+T,0)]).sort((E,U)=>E[1]-U[1])[0])==null?void 0:P[0];_&&(V=_);break}case"initialPlacement":V=l;break}if(a!==V)return{reset:{placement:V}}}return{}}}},Ui=new Set(["left","top"]);async function qi(t,r){const{placement:n,platform:s,elements:a}=t,o=await(s.isRTL==null?void 0:s.isRTL(a.floating)),i=Ht(n),l=Or(n),c=zt(n)==="y",u=Ui.has(i)?-1:1,d=o&&c?-1:1,f=mn(r,t);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:h*u}:{x:h*u,y:p*d}}const Ki=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var n,s;const{x:a,y:o,placement:i,middlewareData:l}=r,c=await qi(r,t);return i===((n=l.offset)==null?void 0:n.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:a+c.x,y:o+c.y,data:{...c,placement:i}}}}},Xi=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var n,s;const{placement:a,rects:o,platform:i,elements:l}=r,{apply:c=()=>{},...u}=mn(t,r),d=await ka(r,u),f=Ht(a),h=Or(a),p=zt(a)==="y",{width:g,height:x}=o.floating;let b,y;f==="top"||f==="bottom"?(b=f,y=h===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=f,b=h==="end"?"top":"bottom");const j=x-d.top-d.bottom,w=g-d.left-d.right,C=Lr(x-d[b],j),I=Lr(g-d[y],w),S=!r.middlewareData.shift;let O=C,L=I;if((n=r.middlewareData.shift)!=null&&n.enabled.x&&(L=w),(s=r.middlewareData.shift)!=null&&s.enabled.y&&(O=j),S&&!h){const R=He(d.left,0),z=He(d.right,0),A=He(d.top,0),P=He(d.bottom,0);p?L=g-2*(R!==0||z!==0?R+z:He(d.left,d.right)):O=x-2*(A!==0||P!==0?A+P:He(d.top,d.bottom))}await c({...r,availableWidth:L,availableHeight:O});const k=await i.getDimensions(l.floating);return g!==k.width||x!==k.height?{reset:{rects:!0}}:{}}}};function wa(t){const r=Ue(t);let n=parseFloat(r.width)||0,s=parseFloat(r.height)||0;const a=Je(t),o=a?t.offsetWidth:n,i=a?t.offsetHeight:s,l=Jr(n)!==o||Jr(s)!==i;return l&&(n=o,s=i),{width:n,height:s,$:l}}function qn(t){return Ee(t)?t:t.contextElement}function lr(t){const r=qn(t);if(!Je(r))return dt(1);const n=r.getBoundingClientRect(),{width:s,height:a,$:o}=wa(r);let i=(o?Jr(n.width):n.width)/s,l=(o?Jr(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Yi=dt(0);function ja(t){const r=We(t);return!un()||!r.visualViewport?Yi:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Qi(t,r,n){return r===void 0&&(r=!1),!n||r&&n!==We(t)?!1:r}function Gt(t,r,n,s){r===void 0&&(r=!1),n===void 0&&(n=!1);const a=t.getBoundingClientRect(),o=qn(t);let i=dt(1);r&&(s?Ee(s)&&(i=lr(s)):i=lr(t));const l=Qi(o,n,s)?ja(o):dt(0);let c=(a.left+l.x)/i.x,u=(a.top+l.y)/i.y,d=a.width/i.x,f=a.height/i.y;if(o){const h=We(o),p=s&&Ee(s)?We(s):s;let g=h,x=Ln(g);for(;x&&s&&p!==g;){const b=lr(x),y=x.getBoundingClientRect(),j=Ue(x),w=y.left+(x.clientLeft+parseFloat(j.paddingLeft))*b.x,C=y.top+(x.clientTop+parseFloat(j.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,f*=b.y,c+=w,u+=C,g=We(x),x=Ln(g)}}return tn({width:d,height:f,x:c,y:u})}function hn(t,r){const n=fn(t).scrollLeft;return r?r.left+n:Gt(ut(t)).left+n}function Ca(t,r){const n=t.getBoundingClientRect(),s=n.left+r.scrollLeft-hn(t,n),a=n.top+r.scrollTop;return{x:s,y:a}}function Ji(t){let{elements:r,rect:n,offsetParent:s,strategy:a}=t;const o=a==="fixed",i=ut(s),l=r?dn(r.floating):!1;if(s===i||l&&o)return n;let c={scrollLeft:0,scrollTop:0},u=dt(1);const d=dt(0),f=Je(s);if((f||!f&&!o)&&((dr(s)!=="body"||$r(i))&&(c=fn(s)),Je(s))){const p=Gt(s);u=lr(s),d.x=p.x+s.clientLeft,d.y=p.y+s.clientTop}const h=i&&!f&&!o?Ca(i,c):dt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-c.scrollTop*u.y+d.y+h.y}}function el(t){return Array.from(t.getClientRects())}function tl(t){const r=ut(t),n=fn(t),s=t.ownerDocument.body,a=He(r.scrollWidth,r.clientWidth,s.scrollWidth,s.clientWidth),o=He(r.scrollHeight,r.clientHeight,s.scrollHeight,s.clientHeight);let i=-n.scrollLeft+hn(t);const l=-n.scrollTop;return Ue(s).direction==="rtl"&&(i+=He(r.clientWidth,s.clientWidth)-a),{width:a,height:o,x:i,y:l}}const xs=25;function rl(t,r){const n=We(t),s=ut(t),a=n.visualViewport;let o=s.clientWidth,i=s.clientHeight,l=0,c=0;if(a){o=a.width,i=a.height;const d=un();(!d||d&&r==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}const u=hn(s);if(u<=0){const d=s.ownerDocument,f=d.body,h=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(s.clientWidth-f.clientWidth-p);g<=xs&&(o-=g)}else u<=xs&&(o+=u);return{width:o,height:i,x:l,y:c}}const nl=new Set(["absolute","fixed"]);function sl(t,r){const n=Gt(t,!0,r==="fixed"),s=n.top+t.clientTop,a=n.left+t.clientLeft,o=Je(t)?lr(t):dt(1),i=t.clientWidth*o.x,l=t.clientHeight*o.y,c=a*o.x,u=s*o.y;return{width:i,height:l,x:c,y:u}}function gs(t,r,n){let s;if(r==="viewport")s=rl(t,n);else if(r==="document")s=tl(ut(t));else if(Ee(r))s=sl(r,n);else{const a=ja(t);s={x:r.x-a.x,y:r.y-a.y,width:r.width,height:r.height}}return tn(s)}function Na(t,r){const n=Nt(t);return n===r||!Ee(n)||Ct(n)?!1:Ue(n).position==="fixed"||Na(n,r)}function al(t,r){const n=r.get(t);if(n)return n;let s=$t(t,[],!1).filter(l=>Ee(l)&&dr(l)!=="body"),a=null;const o=Ue(t).position==="fixed";let i=o?Nt(t):t;for(;Ee(i)&&!Ct(i);){const l=Ue(i),c=Un(i);!c&&l.position==="fixed"&&(a=null),(o?!c&&!a:!c&&l.position==="static"&&!!a&&nl.has(a.position)||$r(i)&&!c&&Na(t,i))?s=s.filter(d=>d!==i):a=l,i=Nt(i)}return r.set(t,s),s}function ol(t){let{element:r,boundary:n,rootBoundary:s,strategy:a}=t;const i=[...n==="clippingAncestors"?dn(r)?[]:al(r,this._c):[].concat(n),s],l=i[0],c=i.reduce((u,d)=>{const f=gs(r,d,a);return u.top=He(f.top,u.top),u.right=Lr(f.right,u.right),u.bottom=Lr(f.bottom,u.bottom),u.left=He(f.left,u.left),u},gs(r,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function il(t){const{width:r,height:n}=wa(t);return{width:r,height:n}}function ll(t,r,n){const s=Je(r),a=ut(r),o=n==="fixed",i=Gt(t,!0,o,r);let l={scrollLeft:0,scrollTop:0};const c=dt(0);function u(){c.x=hn(a)}if(s||!s&&!o)if((dr(r)!=="body"||$r(a))&&(l=fn(r)),s){const p=Gt(r,!0,o,r);c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}else a&&u();o&&!s&&a&&u();const d=a&&!s&&!o?Ca(a,l):dt(0),f=i.left+l.scrollLeft-c.x-d.x,h=i.top+l.scrollTop-c.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function wn(t){return Ue(t).position==="static"}function bs(t,r){if(!Je(t)||Ue(t).position==="fixed")return null;if(r)return r(t);let n=t.offsetParent;return ut(t)===n&&(n=n.ownerDocument.body),n}function Sa(t,r){const n=We(t);if(dn(t))return n;if(!Je(t)){let a=Nt(t);for(;a&&!Ct(a);){if(Ee(a)&&!wn(a))return a;a=Nt(a)}return n}let s=bs(t,r);for(;s&&Qo(s)&&wn(s);)s=bs(s,r);return s&&Ct(s)&&wn(s)&&!Un(s)?n:s||ni(t)||n}const cl=async function(t){const r=this.getOffsetParent||Sa,n=this.getDimensions,s=await n(t.floating);return{reference:ll(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function dl(t){return Ue(t).direction==="rtl"}const ul={convertOffsetParentRelativeRectToViewportRelativeRect:Ji,getDocumentElement:ut,getClippingRect:ol,getOffsetParent:Sa,getElementRects:cl,getClientRects:el,getDimensions:il,getScale:lr,isElement:Ee,isRTL:dl};function Ra(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function fl(t,r){let n=null,s;const a=ut(t);function o(){var l;clearTimeout(s),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const u=t.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=u;if(l||r(),!h||!p)return;const g=Hr(f),x=Hr(a.clientWidth-(d+h)),b=Hr(a.clientHeight-(f+p)),y=Hr(d),w={rootMargin:-g+"px "+-x+"px "+-b+"px "+-y+"px",threshold:He(0,Lr(1,c))||1};let C=!0;function I(S){const O=S[0].intersectionRatio;if(O!==c){if(!C)return i();O?i(!1,O):s=setTimeout(()=>{i(!1,1e-7)},1e3)}O===1&&!Ra(u,t.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(I,{...w,root:a.ownerDocument})}catch{n=new IntersectionObserver(I,w)}n.observe(t)}return i(!0),o}function Ea(t,r,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,u=qn(t),d=a||o?[...u?$t(u):[],...$t(r)]:[];d.forEach(y=>{a&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=u&&l?fl(u,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[j]=y;j&&j.target===u&&p&&(p.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(r)})),n()}),u&&!c&&p.observe(u),p.observe(r));let g,x=c?Gt(t):null;c&&b();function b(){const y=Gt(t);x&&!Ra(x,y)&&n(),x=y,g=requestAnimationFrame(b)}return n(),()=>{var y;d.forEach(j=>{a&&j.removeEventListener("scroll",n),o&&j.removeEventListener("resize",n)}),f?.(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const ml=Ki,hl=Gi,pl=Xi,xl=(t,r,n)=>{const s=new Map,a={platform:ul,...n},o={...a.platform,_c:s};return Hi(t,r,{...a,platform:o})};var gl=typeof document<"u",bl=function(){},Yr=gl?m.useLayoutEffect:bl;function sn(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let n,s,a;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==r.length)return!1;for(s=n;s--!==0;)if(!sn(t[s],r[s]))return!1;return!0}if(a=Object.keys(t),n=a.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(r,a[s]))return!1;for(s=n;s--!==0;){const o=a[s];if(!(o==="_owner"&&t.$$typeof)&&!sn(t[o],r[o]))return!1}return!0}return t!==t&&r!==r}function Ma(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vs(t,r){const n=Ma(t);return Math.round(r*n)/n}function jn(t){const r=v.useRef(t);return Yr(()=>{r.current=t}),r}function vl(t){t===void 0&&(t={});const{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=v.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=v.useState(s);sn(h,s)||p(s);const[g,x]=v.useState(null),[b,y]=v.useState(null),j=v.useCallback(E=>{E!==S.current&&(S.current=E,x(E))},[]),w=v.useCallback(E=>{E!==O.current&&(O.current=E,y(E))},[]),C=o||g,I=i||b,S=v.useRef(null),O=v.useRef(null),L=v.useRef(d),k=c!=null,R=jn(c),z=jn(a),A=jn(u),P=v.useCallback(()=>{if(!S.current||!O.current)return;const E={placement:r,strategy:n,middleware:h};z.current&&(E.platform=z.current),xl(S.current,O.current,E).then(U=>{const T={...U,isPositioned:A.current!==!1};D.current&&!sn(L.current,T)&&(L.current=T,aa.flushSync(()=>{f(T)}))})},[h,r,n,z,A]);Yr(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,f(E=>({...E,isPositioned:!1})))},[u]);const D=v.useRef(!1);Yr(()=>(D.current=!0,()=>{D.current=!1}),[]),Yr(()=>{if(C&&(S.current=C),I&&(O.current=I),C&&I){if(R.current)return R.current(C,I,P);P()}},[C,I,P,R,k]);const Q=v.useMemo(()=>({reference:S,floating:O,setReference:j,setFloating:w}),[j,w]),V=v.useMemo(()=>({reference:C,floating:I}),[C,I]),_=v.useMemo(()=>{const E={position:n,left:0,top:0};if(!V.floating)return E;const U=vs(V.floating,d.x),T=vs(V.floating,d.y);return l?{...E,transform:"translate("+U+"px, "+T+"px)",...Ma(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:T}},[n,l,V.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:P,refs:Q,elements:V,floatingStyles:_}),[d,P,Q,V,_])}const Ia=(t,r)=>({...ml(t),options:[t,r]}),La=(t,r)=>({...hl(t),options:[t,r]}),Aa=(t,r)=>({...pl(t),options:[t,r]}),yl="data-floating-ui-focusable",ys="active",ks="selected",kl={...v};let ws=!1,wl=0;const js=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wl++;function jl(){const[t,r]=v.useState(()=>ws?js():void 0);return Wt(()=>{t==null&&r(js())},[]),v.useEffect(()=>{ws=!0},[]),t}const Cl=kl.useId,za=Cl||jl;let On;process.env.NODE_ENV!=="production"&&(On=new Set);function Nl(){for(var t,r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];const a="Floating UI: "+n.join(" ");if(!((t=On)!=null&&t.has(a))){var o;(o=On)==null||o.add(a),console.error(a)}}function Sl(){const t=new Map;return{emit(r,n){var s;(s=t.get(r))==null||s.forEach(a=>a(n))},on(r,n){t.has(r)||t.set(r,new Set),t.get(r).add(n)},off(r,n){var s;(s=t.get(r))==null||s.delete(n)}}}const Rl=v.createContext(null),El=v.createContext(null),Ml=()=>{var t;return((t=v.useContext(Rl))==null?void 0:t.id)||null},Ta=()=>v.useContext(El);function Kn(t){return"data-floating-ui-"+t}const $a={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Cs=v.forwardRef(function(r,n){const[s,a]=v.useState();Wt(()=>{zi()&&a("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[Kn("focus-guard")]:"",style:$a};return e.jsx("span",{...r,...o})}),Oa=v.createContext(null),Ns=Kn("portal");function Il(t){t===void 0&&(t={});const{id:r,root:n}=t,s=za(),a=Al(),[o,i]=v.useState(null),l=v.useRef(null);return Wt(()=>()=>{o?.remove(),queueMicrotask(()=>{l.current=null})},[o]),Wt(()=>{if(!s||l.current)return;const c=r?document.getElementById(r):null;if(!c)return;const u=document.createElement("div");u.id=s,u.setAttribute(Ns,""),c.appendChild(u),l.current=u,i(u)},[r,s]),Wt(()=>{if(n===null||!s||l.current)return;let c=n||a?.portalNode;c&&!Gn(c)&&(c=c.current),c=c||document.body;let u=null;r&&(u=document.createElement("div"),u.id=r,c.appendChild(u));const d=document.createElement("div");d.id=s,d.setAttribute(Ns,""),c=u||c,c.appendChild(d),l.current=d,i(d)},[r,n,s,a]),o}function Ll(t){const{children:r,id:n,root:s,preserveTabOrder:a=!0}=t,o=Il({id:n,root:s}),[i,l]=v.useState(null),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),h=i?.modal,p=i?.open,g=!!i&&!i.modal&&i.open&&a&&!!(s||o);return v.useEffect(()=>{if(!o||!a||h)return;function x(b){o&&kn(b)&&(b.type==="focusin"?hs:Zi)(o)}return o.addEventListener("focusin",x,!0),o.addEventListener("focusout",x,!0),()=>{o.removeEventListener("focusin",x,!0),o.removeEventListener("focusout",x,!0)}},[o,a,h]),v.useEffect(()=>{o&&(p||hs(o))},[p,o]),e.jsxs(Oa.Provider,{value:v.useMemo(()=>({preserveTabOrder:a,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:f,portalNode:o,setFocusManagerState:l}),[a,o]),children:[g&&o&&e.jsx(Cs,{"data-type":"outside",ref:c,onFocus:x=>{if(kn(x,o)){var b;(b=d.current)==null||b.focus()}else{const y=i?i.domReference:null,j=Wi(y);j?.focus()}}}),g&&o&&e.jsx("span",{"aria-owns":o.id,style:$a}),o&&aa.createPortal(r,o),g&&o&&e.jsx(Cs,{"data-type":"outside",ref:u,onFocus:x=>{if(kn(x,o)){var b;(b=f.current)==null||b.focus()}else{const y=i?i.domReference:null,j=_i(y);j?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,x.nativeEvent,"focus-out")}}})]})}const Al=()=>v.useContext(Oa),zl={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Tl={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ss=t=>{var r,n;return{escapeKey:typeof t=="boolean"?t:(r=t?.escapeKey)!=null?r:!1,outsidePress:typeof t=="boolean"?t:(n=t?.outsidePress)!=null?n:!0}};function $l(t,r){r===void 0&&(r={});const{open:n,onOpenChange:s,elements:a,dataRef:o}=t,{enabled:i=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:p,capture:g}=r,x=Ta(),b=or(typeof c=="function"?c:()=>!1),y=typeof c=="function"?b:c,j=v.useRef(!1),{escapeKey:w,outsidePress:C}=Ss(p),{escapeKey:I,outsidePress:S}=Ss(g),O=v.useRef(!1),L=or(D=>{var Q;if(!n||!i||!l||D.key!=="Escape"||O.current)return;const V=(Q=o.current.floatingContext)==null?void 0:Q.nodeId,_=x?Xr(x.nodesRef.current,V):[];if(!w&&(D.stopPropagation(),_.length>0)){let E=!0;if(_.forEach(U=>{var T;if((T=U.context)!=null&&T.open&&!U.context.dataRef.current.__escapeKeyBubbles){E=!1;return}}),!E)return}s(!1,Oi(D)?D.nativeEvent:D,"escape-key")}),k=or(D=>{var Q;const V=()=>{var _;L(D),(_=jr(D))==null||_.removeEventListener("keydown",V)};(Q=jr(D))==null||Q.addEventListener("keydown",V)}),R=or(D=>{var Q;const V=o.current.insideReactTree;o.current.insideReactTree=!1;const _=j.current;if(j.current=!1,u==="click"&&_||V||typeof y=="function"&&!y(D))return;const E=jr(D),U="["+Kn("inert")+"]",T=zr(a.floating).querySelectorAll(U);let Y=Ee(E)?E:null;for(;Y&&!Ct(Y);){const oe=Nt(Y);if(Ct(oe)||!Ee(oe))break;Y=oe}if(T.length&&Ee(E)&&!$i(E)&&!$n(E,a.floating)&&Array.from(T).every(oe=>!$n(Y,oe)))return;if(Je(E)&&P){const oe=Ct(E),xe=Ue(E),se=/auto|scroll/,$e=oe||se.test(xe.overflowX),ge=oe||se.test(xe.overflowY),ve=$e&&E.clientWidth>0&&E.scrollWidth>E.clientWidth,ye=ge&&E.clientHeight>0&&E.scrollHeight>E.clientHeight,N=xe.direction==="rtl",G=ye&&(N?D.offsetX<=E.offsetWidth-E.clientWidth:D.offsetX>E.clientWidth),F=ve&&D.offsetY>E.clientHeight;if(G||F)return}const H=(Q=o.current.floatingContext)==null?void 0:Q.nodeId,Z=x&&Xr(x.nodesRef.current,H).some(oe=>{var xe;return yn(D,(xe=oe.context)==null?void 0:xe.elements.floating)});if(yn(D,a.floating)||yn(D,a.domReference)||Z)return;const ae=x?Xr(x.nodesRef.current,H):[];if(ae.length>0){let oe=!0;if(ae.forEach(xe=>{var se;if((se=xe.context)!=null&&se.open&&!xe.context.dataRef.current.__outsidePressBubbles){oe=!1;return}}),!oe)return}s(!1,D,"outside-press")}),z=or(D=>{var Q;const V=()=>{var _;R(D),(_=jr(D))==null||_.removeEventListener(u,V)};(Q=jr(D))==null||Q.addEventListener(u,V)});v.useEffect(()=>{if(!n||!i)return;o.current.__escapeKeyBubbles=w,o.current.__outsidePressBubbles=C;let D=-1;function Q(T){s(!1,T,"ancestor-scroll")}function V(){window.clearTimeout(D),O.current=!0}function _(){D=window.setTimeout(()=>{O.current=!1},un()?5:0)}const E=zr(a.floating);l&&(E.addEventListener("keydown",I?k:L,I),E.addEventListener("compositionstart",V),E.addEventListener("compositionend",_)),y&&E.addEventListener(u,S?z:R,S);let U=[];return h&&(Ee(a.domReference)&&(U=$t(a.domReference)),Ee(a.floating)&&(U=U.concat($t(a.floating))),!Ee(a.reference)&&a.reference&&a.reference.contextElement&&(U=U.concat($t(a.reference.contextElement)))),U=U.filter(T=>{var Y;return T!==((Y=E.defaultView)==null?void 0:Y.visualViewport)}),U.forEach(T=>{T.addEventListener("scroll",Q,{passive:!0})}),()=>{l&&(E.removeEventListener("keydown",I?k:L,I),E.removeEventListener("compositionstart",V),E.removeEventListener("compositionend",_)),y&&E.removeEventListener(u,S?z:R,S),U.forEach(T=>{T.removeEventListener("scroll",Q)}),window.clearTimeout(D)}},[o,a,l,y,u,n,s,h,i,w,C,L,I,k,R,S,z]),v.useEffect(()=>{o.current.insideReactTree=!1},[o,y,u]);const A=v.useMemo(()=>({onKeyDown:L,...d&&{[zl[f]]:D=>{s(!1,D.nativeEvent,"reference-press")},...f!=="click"&&{onClick(D){s(!1,D.nativeEvent,"reference-press")}}}}),[L,s,d,f]),P=v.useMemo(()=>({onKeyDown:L,onMouseDown(){j.current=!0},onMouseUp(){j.current=!0},[Tl[u]]:()=>{o.current.insideReactTree=!0}}),[L,u,o]);return v.useMemo(()=>i?{reference:A,floating:P}:{},[i,A,P])}function Ol(t){const{open:r=!1,onOpenChange:n,elements:s}=t,a=za(),o=v.useRef({}),[i]=v.useState(()=>Sl()),l=Ml()!=null;if(process.env.NODE_ENV!=="production"){const p=s.reference;p&&!Ee(p)&&Nl("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=v.useState(s.reference),d=or((p,g,x)=>{o.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:x,nested:l}),n?.(p,g,x)}),f=v.useMemo(()=>({setPositionReference:u}),[]),h=v.useMemo(()=>({reference:c||s.reference||null,floating:s.floating||null,domReference:s.reference}),[c,s.reference,s.floating]);return v.useMemo(()=>({dataRef:o,open:r,onOpenChange:d,elements:h,events:i,floatingId:a,refs:f}),[r,d,h,i,a,f])}function Fa(t){t===void 0&&(t={});const{nodeId:r}=t,n=Ol({...t,elements:{reference:null,floating:null,...t.elements}}),s=t.rootContext||n,a=s.elements,[o,i]=v.useState(null),[l,c]=v.useState(null),d=a?.domReference||o,f=v.useRef(null),h=Ta();Wt(()=>{d&&(f.current=d)},[d]);const p=vl({...t,elements:{...a,...l&&{reference:l}}}),g=v.useCallback(w=>{const C=Ee(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;c(C),p.refs.setReference(C)},[p.refs]),x=v.useCallback(w=>{(Ee(w)||w===null)&&(f.current=w,i(w)),(Ee(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!Ee(w))&&p.refs.setReference(w)},[p.refs]),b=v.useMemo(()=>({...p.refs,setReference:x,setPositionReference:g,domReference:f}),[p.refs,x,g]),y=v.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),j=v.useMemo(()=>({...p,...s,refs:b,elements:y,nodeId:r}),[p,b,y,r,s]);return Wt(()=>{s.dataRef.current.floatingContext=j;const w=h?.nodesRef.current.find(C=>C.id===r);w&&(w.context=j)}),v.useMemo(()=>({...p,context:j,refs:b,elements:y}),[p,b,y,j])}function Cn(t,r,n){const s=new Map,a=n==="item";let o=t;if(a&&t){const{[ys]:i,[ks]:l,...c}=t;o=c}return{...n==="floating"&&{tabIndex:-1,[yl]:""},...o,...r.map(i=>{const l=i?i[n]:null;return typeof l=="function"?t?l(t):null:l}).concat(t).reduce((i,l)=>(l&&Object.entries(l).forEach(c=>{let[u,d]=c;if(!(a&&[ys,ks].includes(u)))if(u.indexOf("on")===0){if(s.has(u)||s.set(u,[]),typeof d=="function"){var f;(f=s.get(u))==null||f.push(d),i[u]=function(){for(var h,p=arguments.length,g=new Array(p),x=0;x<p;x++)g[x]=arguments[x];return(h=s.get(u))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else i[u]=d}),i),{})}}function Fl(t){t===void 0&&(t=[]);const r=t.map(l=>l?.reference),n=t.map(l=>l?.floating),s=t.map(l=>l?.item),a=v.useCallback(l=>Cn(l,t,"reference"),r),o=v.useCallback(l=>Cn(l,t,"floating"),n),i=v.useCallback(l=>Cn(l,t,"item"),s);return v.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:i}),[a,o,i])}function Dl({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"}))}const Bl=v.forwardRef(Dl);function Vl({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15"}))}const Pl=v.forwardRef(Vl);function _l({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const Wl=v.forwardRef(_l);function Zl({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"}))}const Hl=v.forwardRef(Zl);function Gl({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"}))}const Ul=v.forwardRef(Gl);function ql({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const Kl=v.forwardRef(ql);function Xl({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0-3.75-3.75M17.25 21 21 17.25"}))}const Yl=v.forwardRef(Xl);function Ql({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12"}))}const Jl=v.forwardRef(Ql);function ec({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"}))}const tc=v.forwardRef(ec);function rc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z"}))}const nc=v.forwardRef(rc);function sc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const ac=v.forwardRef(sc);function oc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Da=v.forwardRef(oc);function ic({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Ba=v.forwardRef(ic);function lc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const cc=v.forwardRef(lc);function dc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"}))}const uc=v.forwardRef(dc);function fc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const mc=v.forwardRef(fc);function hc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"}))}const pc=v.forwardRef(hc);function xc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"}))}const gc=v.forwardRef(xc);function bc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}const Va=v.forwardRef(bc);function vc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const yc=v.forwardRef(vc);function kc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const wc=v.forwardRef(kc);function jc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const Cc=v.forwardRef(jc);function Nc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const Sc=v.forwardRef(Nc);function Rc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}))}const Ec=v.forwardRef(Rc);function Mc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const Ic=v.forwardRef(Mc);function Lc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Pa=v.forwardRef(Lc);function Ac({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const zc=v.forwardRef(Ac);function Tc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const $c=v.forwardRef(Tc);function Oc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const Fc=v.forwardRef(Oc);function Dc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"}))}const Bc=v.forwardRef(Dc);function Vc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const _a=v.forwardRef(Vc);function Pc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const _c=v.forwardRef(Pc);function Wc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const Zc=v.forwardRef(Wc);function Hc({title:t,titleId:r,...n},s){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),t?v.createElement("title",{id:r},t):null,v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const Wa=v.forwardRef(Hc),Gc=({className:t="size-5"})=>e.jsx(uc,{className:t,"aria-hidden":"true"}),Uc=({className:t="size-4"})=>e.jsx(Da,{className:t,"aria-hidden":"true"}),Tr=({options:t=[],value:r,defaultValue:n,placeholder:s="Seleccionar...",disabled:a=!1,error:o=!1,label:i,description:l,showLabel:c=!0,showDescription:u=!0,menuHeader:d,onChange:f,onBlur:h,className:p="",triggerClassName:g="",menuClassName:x="",ariaLabel:b,id:y,name:j,required:w=!1,menuPosition:C="bottom",fullWidth:I=!1})=>{const[S,O]=m.useState(!1),[L,k]=m.useState(r!==void 0?r:n),[R,z]=m.useState(-1),{refs:A,floatingStyles:P,context:D}=Fa({open:S,onOpenChange:ne=>{ne||O(!1)},placement:C==="top"?"top-start":"bottom-start",strategy:"fixed",whileElementsMounted:Ea,middleware:[Ia(4),La({fallbackAxisSideDirection:"end",padding:8}),Aa({apply({rects:ne,elements:ue}){Object.assign(ue.floating.style,{minWidth:`${ne.reference.width}px`})},padding:8})]}),Q=$l(D),{getReferenceProps:V,getFloatingProps:_}=Fl([Q]),E=m.useRef(null),U=ne=>{E.current=ne,A.setReference(ne)},T=m.useRef(null);m.useEffect(()=>{r!==void 0&&k(r)},[r]),m.useEffect(()=>{const ne=ue=>{if(S)switch(ue.key){case"Escape":O(!1),E.current?.focus();break;case"ArrowDown":ue.preventDefault(),z(Ie=>Ie<t.length-1?Ie+1:0);break;case"ArrowUp":ue.preventDefault(),z(Ie=>Ie>0?Ie-1:t.length-1);break;case"Enter":ue.preventDefault(),R>=0&&R<t.length&&Z(t[R]);break}};if(S)return document.addEventListener("keydown",ne),()=>{document.removeEventListener("keydown",ne)}},[S,R,t]);const Y=t.find(ne=>ne.value===L),H=()=>{a||(O(!S),z(-1))},Z=ne=>{ne.disabled||(k(ne.value),O(!1),f?.(ne.value),setTimeout(()=>{E.current?.focus()},0))},ve=[`
|
|
625
|
+
${e===r?"opacity-50 cursor-not-allowed pointer-events-none":""}
|
|
626
|
+
`.replace(/\s+/g," ").trim(),onClick:()=>m(e+1),disabled:e===r,"aria-label":`${a} page`,children:[a,t.jsx(Il,{className:"w-4 h-4"})]})]})};function Fn(){return typeof window<"u"}function Er(e){return Ts(e)?(e.nodeName||"").toLowerCase():"#document"}function lt(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function At(e){var r;return(r=(Ts(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Ts(e){return Fn()?e instanceof Node||e instanceof lt(e).Node:!1}function $e(e){return Fn()?e instanceof Element||e instanceof lt(e).Element:!1}function yt(e){return Fn()?e instanceof HTMLElement||e instanceof lt(e).HTMLElement:!1}function fs(e){return!Fn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lt(e).ShadowRoot}const Al=new Set(["inline","contents"]);function nn(e){const{overflow:r,overflowX:n,overflowY:s,display:a}=ft(e);return/auto|scroll|overlay|hidden|clip/.test(r+s+n)&&!Al.has(a)}const Tl=new Set(["table","td","th"]);function zl(e){return Tl.has(Er(e))}const Dl=[":popover-open",":modal"];function Bn(e){return Dl.some(r=>{try{return e.matches(r)}catch{return!1}})}const Ol=["transform","translate","scale","rotate","perspective"],$l=["transform","translate","scale","rotate","perspective","filter"],Fl=["paint","layout","strict","content"];function zs(e){const r=Vn(),n=$e(e)?ft(e):e;return Ol.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!r&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!r&&(n.filter?n.filter!=="none":!1)||$l.some(s=>(n.willChange||"").includes(s))||Fl.some(s=>(n.contain||"").includes(s))}function Bl(e){let r=Wt(e);for(;yt(r)&&!_t(r);){if(zs(r))return r;if(Bn(r))return null;r=Wt(r)}return null}function Vn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Vl=new Set(["html","body","#document"]);function _t(e){return Vl.has(Er(e))}function ft(e){return lt(e).getComputedStyle(e)}function Pn(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wt(e){if(Er(e)==="html")return e;const r=e.assignedSlot||e.parentNode||fs(e)&&e.host||At(e);return fs(r)?r.host:r}function ko(e){const r=Wt(e);return _t(r)?e.ownerDocument?e.ownerDocument.body:e.body:yt(r)&&nn(r)?r:ko(r)}function er(e,r,n){var s;r===void 0&&(r=[]),n===void 0&&(n=!0);const a=ko(e),o=a===((s=e.ownerDocument)==null?void 0:s.body),i=lt(a);if(o){const l=ms(i);return r.concat(i,i.visualViewport||[],nn(a)?a:[],l&&n?er(l):[])}return r.concat(a,er(a,[],n))}function ms(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Yr=Math.min,dt=Math.max,Sn=Math.round,xn=Math.floor,It=e=>({x:e,y:e}),Pl={left:"right",right:"left",bottom:"top",top:"bottom"},_l={start:"end",end:"start"};function _n(e,r){return typeof e=="function"?e(r):e}function cr(e){return e.split("-")[0]}function sn(e){return e.split("-")[1]}function Wl(e){return e==="x"?"y":"x"}function jo(e){return e==="y"?"height":"width"}const Hl=new Set(["top","bottom"]);function Qt(e){return Hl.has(cr(e))?"y":"x"}function Co(e){return Wl(Qt(e))}function Zl(e,r,n){n===void 0&&(n=!1);const s=sn(e),a=Co(e),o=jo(a);let i=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return r.reference[o]>r.floating[o]&&(i=Rn(i)),[i,Rn(i)]}function Gl(e){const r=Rn(e);return[hs(e),r,hs(r)]}function hs(e){return e.replace(/start|end/g,r=>_l[r])}const ia=["left","right"],la=["right","left"],Ul=["top","bottom"],ql=["bottom","top"];function Kl(e,r,n){switch(e){case"top":case"bottom":return n?r?la:ia:r?ia:la;case"left":case"right":return r?Ul:ql;default:return[]}}function Xl(e,r,n,s){const a=sn(e);let o=Kl(cr(e),n==="start",s);return a&&(o=o.map(i=>i+"-"+a),r&&(o=o.concat(o.map(hs)))),o}function Rn(e){return e.replace(/left|right|bottom|top/g,r=>Pl[r])}function Yl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ql(e){return typeof e!="number"?Yl(e):{top:e,right:e,bottom:e,left:e}}function En(e){const{x:r,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:r,right:r+s,bottom:n+a,x:r,y:n}}var Jl=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ps=Jl.join(","),No=typeof Element>"u",Qr=No?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Mn=!No&&Element.prototype.getRootNode?function(e){var r;return e==null||(r=e.getRootNode)===null||r===void 0?void 0:r.call(e)}:function(e){return e?.ownerDocument},In=function(r,n){var s;n===void 0&&(n=!0);var a=r==null||(s=r.getAttribute)===null||s===void 0?void 0:s.call(r,"inert"),o=a===""||a==="true",i=o||n&&r&&(typeof r.closest=="function"?r.closest("[inert]"):In(r.parentNode));return i},ec=function(r){var n,s=r==null||(n=r.getAttribute)===null||n===void 0?void 0:n.call(r,"contenteditable");return s===""||s==="true"},tc=function(r,n,s){if(In(r))return[];var a=Array.prototype.slice.apply(r.querySelectorAll(ps));return n&&Qr.call(r,ps)&&a.unshift(r),a=a.filter(s),a},xs=function(r,n,s){for(var a=[],o=Array.from(r);o.length;){var i=o.shift();if(!In(i,!1))if(i.tagName==="SLOT"){var l=i.assignedElements(),c=l.length?l:i.children,f=xs(c,!0,s);s.flatten?a.push.apply(a,f):a.push({scopeParent:i,candidates:f})}else{var d=Qr.call(i,ps);d&&s.filter(i)&&(n||!r.includes(i))&&a.push(i);var m=i.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(i),h=!In(m,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(i));if(m&&h){var p=xs(m===!0?i.children:m.children,!0,s);s.flatten?a.push.apply(a,p):a.push({scopeParent:i,candidates:p})}else o.unshift.apply(o,i.children)}}return a},So=function(r){return!isNaN(parseInt(r.getAttribute("tabindex"),10))},Ro=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||ec(r))&&!So(r)?0:r.tabIndex},rc=function(r,n){var s=Ro(r);return s<0&&n&&!So(r)?0:s},nc=function(r,n){return r.tabIndex===n.tabIndex?r.documentOrder-n.documentOrder:r.tabIndex-n.tabIndex},Eo=function(r){return r.tagName==="INPUT"},sc=function(r){return Eo(r)&&r.type==="hidden"},ac=function(r){var n=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(s){return s.tagName==="SUMMARY"});return n},oc=function(r,n){for(var s=0;s<r.length;s++)if(r[s].checked&&r[s].form===n)return r[s]},ic=function(r){if(!r.name)return!0;var n=r.form||Mn(r),s=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=s(window.CSS.escape(r.name));else try{a=s(r.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var o=oc(a,r.form);return!o||o===r},lc=function(r){return Eo(r)&&r.type==="radio"},cc=function(r){return lc(r)&&!ic(r)},dc=function(r){var n,s=r&&Mn(r),a=(n=s)===null||n===void 0?void 0:n.host,o=!1;if(s&&s!==r){var i,l,c;for(o=!!((i=a)!==null&&i!==void 0&&(l=i.ownerDocument)!==null&&l!==void 0&&l.contains(a)||r!=null&&(c=r.ownerDocument)!==null&&c!==void 0&&c.contains(r));!o&&a;){var f,d,m;s=Mn(a),a=(f=s)===null||f===void 0?void 0:f.host,o=!!((d=a)!==null&&d!==void 0&&(m=d.ownerDocument)!==null&&m!==void 0&&m.contains(a))}}return o},ca=function(r){var n=r.getBoundingClientRect(),s=n.width,a=n.height;return s===0&&a===0},uc=function(r,n){var s=n.displayCheck,a=n.getShadowRoot;if(s==="full-native"&&"checkVisibility"in r){var o=r.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(r).visibility==="hidden")return!0;var i=Qr.call(r,"details>summary:first-of-type"),l=i?r.parentElement:r;if(Qr.call(l,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="full-native"||s==="legacy-full"){if(typeof a=="function"){for(var c=r;r;){var f=r.parentElement,d=Mn(r);if(f&&!f.shadowRoot&&a(f)===!0)return ca(r);r.assignedSlot?r=r.assignedSlot:!f&&d!==r.ownerDocument?r=d.host:r=f}r=c}if(dc(r))return!r.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return ca(r);return!1},fc=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var n=r.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var s=0;s<n.children.length;s++){var a=n.children.item(s);if(a.tagName==="LEGEND")return Qr.call(n,"fieldset[disabled] *")?!0:!a.contains(r)}return!0}n=n.parentElement}return!1},mc=function(r,n){return!(n.disabled||sc(n)||uc(n,r)||ac(n)||fc(n))},da=function(r,n){return!(cc(n)||Ro(n)<0||!mc(r,n))},hc=function(r){var n=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Mo=function(r){var n=[],s=[];return r.forEach(function(a,o){var i=!!a.scopeParent,l=i?a.scopeParent:a,c=rc(l,i),f=i?Mo(a.candidates):l;c===0?i?n.push.apply(n,f):n.push(l):s.push({documentOrder:o,tabIndex:c,item:a,isScope:i,content:f})}),s.sort(nc).reduce(function(a,o){return o.isScope?a.push.apply(a,o.content):a.push(o.content),a},[]).concat(n)},Io=function(r,n){n=n||{};var s;return n.getShadowRoot?s=xs([r],n.includeContainer,{filter:da.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:hc}):s=tc(r,n.includeContainer,da.bind(null,n)),Mo(s)};function pc(){return/apple/i.test(navigator.vendor)}function xc(e){let r=e.activeElement;for(;((n=r)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;r=r.shadowRoot.activeElement}return r}function gs(e,r){if(!e||!r)return!1;const n=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(n&&fs(n)){let s=r;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Pr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Qn(e,r){if(r==null)return!1;if("composedPath"in e)return e.composedPath().includes(r);const n=e;return n.target!=null&&r.contains(n.target)}function gc(e){return e.matches("html,body")}function Jr(e){return e?.ownerDocument||document}function kn(e,r,n){return n===void 0&&(n=!0),e.filter(a=>{var o;return a.parentId===r&&(!n||((o=a.context)==null?void 0:o.open))}).flatMap(a=>[a,...kn(e,a.id,n)])}function bc(e){return"nativeEvent"in e}var vc=typeof document<"u",yc=function(){},lr=vc?u.useLayoutEffect:yc;const wc={...k},kc=wc.useInsertionEffect,jc=kc||(e=>e());function wr(e){const r=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return jc(()=>{r.current=e}),k.useCallback(function(){for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return r.current==null?void 0:r.current(...s)},[])}const Lo=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ao(e,r){const n=Io(e,Lo()),s=n.length;if(s===0)return;const a=xc(Jr(e)),o=n.indexOf(a),i=o===-1?r===1?0:s-1:o+r;return n[i]}function Cc(e){return Ao(Jr(e).body,1)||e}function Nc(e){return Ao(Jr(e).body,-1)||e}function Jn(e,r){const n=r||e.currentTarget,s=e.relatedTarget;return!s||!gs(n,s)}function Sc(e){Io(e,Lo()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function ua(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const s=n.dataset.tabindex;delete n.dataset.tabindex,s?n.setAttribute("tabindex",s):n.removeAttribute("tabindex")})}function fa(e,r,n){let{reference:s,floating:a}=e;const o=Qt(r),i=Co(r),l=jo(i),c=cr(r),f=o==="y",d=s.x+s.width/2-a.width/2,m=s.y+s.height/2-a.height/2,h=s[l]/2-a[l]/2;let p;switch(c){case"top":p={x:d,y:s.y-a.height};break;case"bottom":p={x:d,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:m};break;case"left":p={x:s.x-a.width,y:m};break;default:p={x:s.x,y:s.y}}switch(sn(r)){case"start":p[i]-=h*(n&&f?-1:1);break;case"end":p[i]+=h*(n&&f?-1:1);break}return p}const Rc=async(e,r,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,l=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(r));let f=await i.getElementRects({reference:e,floating:r,strategy:a}),{x:d,y:m}=fa(f,s,c),h=s,p={},g=0;for(let x=0;x<l.length;x++){const{name:b,fn:y}=l[x],{x:C,y:w,data:j,reset:I}=await y({x:d,y:m,initialPlacement:s,placement:h,strategy:a,middlewareData:p,rects:f,platform:i,elements:{reference:e,floating:r}});d=C??d,m=w??m,p={...p,[b]:{...p[b],...j}},I&&g<=50&&(g++,typeof I=="object"&&(I.placement&&(h=I.placement),I.rects&&(f=I.rects===!0?await i.getElementRects({reference:e,floating:r,strategy:a}):I.rects),{x:d,y:m}=fa(f,h,c)),x=-1)}return{x:d,y:m,placement:h,strategy:a,middlewareData:p}};async function To(e,r){var n;r===void 0&&(r={});const{x:s,y:a,platform:o,rects:i,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:h=!1,padding:p=0}=_n(r,e),g=Ql(p),b=l[h?m==="floating"?"reference":"floating":m],y=En(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:f,rootBoundary:d,strategy:c})),C=m==="floating"?{x:s,y:a,width:i.floating.width,height:i.floating.height}:i.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),j=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},I=En(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:w,strategy:c}):C);return{top:(y.top-I.top+g.top)/j.y,bottom:(I.bottom-y.bottom+g.bottom)/j.y,left:(y.left-I.left+g.left)/j.x,right:(I.right-y.right+g.right)/j.x}}const Ec=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var n,s;const{placement:a,middlewareData:o,rects:i,initialPlacement:l,platform:c,elements:f}=r,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:x=!0,...b}=_n(e,r);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=cr(a),C=Qt(l),w=cr(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(f.floating)),I=h||(w||!x?[Rn(l)]:Gl(l)),N=g!=="none";!h&&N&&I.push(...Xl(l,x,g,j));const E=[l,...I],S=await To(r,b),v=[];let R=((s=o.flip)==null?void 0:s.overflows)||[];if(d&&v.push(S[y]),m){const F=Zl(a,i,j);v.push(S[F[0]],S[F[1]])}if(R=[...R,{placement:a,overflows:v}],!v.every(F=>F<=0)){var T,A;const F=(((T=o.flip)==null?void 0:T.index)||0)+1,Y=E[F];if(Y&&(!(m==="alignment"?C!==Qt(Y):!1)||R.every(L=>Qt(L.placement)===C?L.overflows[0]>0:!0)))return{data:{index:F,overflows:R},reset:{placement:Y}};let _=(A=R.filter(B=>B.overflows[0]<=0).sort((B,L)=>B.overflows[1]-L.overflows[1])[0])==null?void 0:A.placement;if(!_)switch(p){case"bestFit":{var V;const B=(V=R.filter(L=>{if(N){const Z=Qt(L.placement);return Z===C||Z==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(Z=>Z>0).reduce((Z,D)=>Z+D,0)]).sort((L,Z)=>L[1]-Z[1])[0])==null?void 0:V[0];B&&(_=B);break}case"initialPlacement":_=l;break}if(a!==_)return{reset:{placement:_}}}return{}}}},Mc=new Set(["left","top"]);async function Ic(e,r){const{placement:n,platform:s,elements:a}=e,o=await(s.isRTL==null?void 0:s.isRTL(a.floating)),i=cr(n),l=sn(n),c=Qt(n)==="y",f=Mc.has(i)?-1:1,d=o&&c?-1:1,m=_n(r,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof g=="number"&&(p=l==="end"?g*-1:g),c?{x:p*d,y:h*f}:{x:h*f,y:p*d}}const Lc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var n,s;const{x:a,y:o,placement:i,middlewareData:l}=r,c=await Ic(r,e);return i===((n=l.offset)==null?void 0:n.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:a+c.x,y:o+c.y,data:{...c,placement:i}}}}},Ac=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var n,s;const{placement:a,rects:o,platform:i,elements:l}=r,{apply:c=()=>{},...f}=_n(e,r),d=await To(r,f),m=cr(a),h=sn(a),p=Qt(a)==="y",{width:g,height:x}=o.floating;let b,y;m==="top"||m==="bottom"?(b=m,y=h===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=m,b=h==="end"?"top":"bottom");const C=x-d.top-d.bottom,w=g-d.left-d.right,j=Yr(x-d[b],C),I=Yr(g-d[y],w),N=!r.middlewareData.shift;let E=j,S=I;if((n=r.middlewareData.shift)!=null&&n.enabled.x&&(S=w),(s=r.middlewareData.shift)!=null&&s.enabled.y&&(E=C),N&&!h){const R=dt(d.left,0),T=dt(d.right,0),A=dt(d.top,0),V=dt(d.bottom,0);p?S=g-2*(R!==0||T!==0?R+T:dt(d.left,d.right)):E=x-2*(A!==0||V!==0?A+V:dt(d.top,d.bottom))}await c({...r,availableWidth:S,availableHeight:E});const v=await i.getDimensions(l.floating);return g!==v.width||x!==v.height?{reset:{rects:!0}}:{}}}};function zo(e){const r=ft(e);let n=parseFloat(r.width)||0,s=parseFloat(r.height)||0;const a=yt(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:s,l=Sn(n)!==o||Sn(s)!==i;return l&&(n=o,s=i),{width:n,height:s,$:l}}function Ds(e){return $e(e)?e:e.contextElement}function jr(e){const r=Ds(e);if(!yt(r))return It(1);const n=r.getBoundingClientRect(),{width:s,height:a,$:o}=zo(r);let i=(o?Sn(n.width):n.width)/s,l=(o?Sn(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Tc=It(0);function Do(e){const r=lt(e);return!Vn()||!r.visualViewport?Tc:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function zc(e,r,n){return r===void 0&&(r=!1),!n||r&&n!==lt(e)?!1:r}function dr(e,r,n,s){r===void 0&&(r=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=Ds(e);let i=It(1);r&&(s?$e(s)&&(i=jr(s)):i=jr(e));const l=zc(o,n,s)?Do(o):It(0);let c=(a.left+l.x)/i.x,f=(a.top+l.y)/i.y,d=a.width/i.x,m=a.height/i.y;if(o){const h=lt(o),p=s&&$e(s)?lt(s):s;let g=h,x=ms(g);for(;x&&s&&p!==g;){const b=jr(x),y=x.getBoundingClientRect(),C=ft(x),w=y.left+(x.clientLeft+parseFloat(C.paddingLeft))*b.x,j=y.top+(x.clientTop+parseFloat(C.paddingTop))*b.y;c*=b.x,f*=b.y,d*=b.x,m*=b.y,c+=w,f+=j,g=lt(x),x=ms(g)}}return En({width:d,height:m,x:c,y:f})}function Wn(e,r){const n=Pn(e).scrollLeft;return r?r.left+n:dr(At(e)).left+n}function Oo(e,r){const n=e.getBoundingClientRect(),s=n.left+r.scrollLeft-Wn(e,n),a=n.top+r.scrollTop;return{x:s,y:a}}function Dc(e){let{elements:r,rect:n,offsetParent:s,strategy:a}=e;const o=a==="fixed",i=At(s),l=r?Bn(r.floating):!1;if(s===i||l&&o)return n;let c={scrollLeft:0,scrollTop:0},f=It(1);const d=It(0),m=yt(s);if((m||!m&&!o)&&((Er(s)!=="body"||nn(i))&&(c=Pn(s)),yt(s))){const p=dr(s);f=jr(s),d.x=p.x+s.clientLeft,d.y=p.y+s.clientTop}const h=i&&!m&&!o?Oo(i,c):It(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+d.x+h.x,y:n.y*f.y-c.scrollTop*f.y+d.y+h.y}}function Oc(e){return Array.from(e.getClientRects())}function $c(e){const r=At(e),n=Pn(e),s=e.ownerDocument.body,a=dt(r.scrollWidth,r.clientWidth,s.scrollWidth,s.clientWidth),o=dt(r.scrollHeight,r.clientHeight,s.scrollHeight,s.clientHeight);let i=-n.scrollLeft+Wn(e);const l=-n.scrollTop;return ft(s).direction==="rtl"&&(i+=dt(r.clientWidth,s.clientWidth)-a),{width:a,height:o,x:i,y:l}}const ma=25;function Fc(e,r){const n=lt(e),s=At(e),a=n.visualViewport;let o=s.clientWidth,i=s.clientHeight,l=0,c=0;if(a){o=a.width,i=a.height;const d=Vn();(!d||d&&r==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}const f=Wn(s);if(f<=0){const d=s.ownerDocument,m=d.body,h=getComputedStyle(m),p=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(s.clientWidth-m.clientWidth-p);g<=ma&&(o-=g)}else f<=ma&&(o+=f);return{width:o,height:i,x:l,y:c}}const Bc=new Set(["absolute","fixed"]);function Vc(e,r){const n=dr(e,!0,r==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,o=yt(e)?jr(e):It(1),i=e.clientWidth*o.x,l=e.clientHeight*o.y,c=a*o.x,f=s*o.y;return{width:i,height:l,x:c,y:f}}function ha(e,r,n){let s;if(r==="viewport")s=Fc(e,n);else if(r==="document")s=$c(At(e));else if($e(r))s=Vc(r,n);else{const a=Do(e);s={x:r.x-a.x,y:r.y-a.y,width:r.width,height:r.height}}return En(s)}function $o(e,r){const n=Wt(e);return n===r||!$e(n)||_t(n)?!1:ft(n).position==="fixed"||$o(n,r)}function Pc(e,r){const n=r.get(e);if(n)return n;let s=er(e,[],!1).filter(l=>$e(l)&&Er(l)!=="body"),a=null;const o=ft(e).position==="fixed";let i=o?Wt(e):e;for(;$e(i)&&!_t(i);){const l=ft(i),c=zs(i);!c&&l.position==="fixed"&&(a=null),(o?!c&&!a:!c&&l.position==="static"&&!!a&&Bc.has(a.position)||nn(i)&&!c&&$o(e,i))?s=s.filter(d=>d!==i):a=l,i=Wt(i)}return r.set(e,s),s}function _c(e){let{element:r,boundary:n,rootBoundary:s,strategy:a}=e;const i=[...n==="clippingAncestors"?Bn(r)?[]:Pc(r,this._c):[].concat(n),s],l=i[0],c=i.reduce((f,d)=>{const m=ha(r,d,a);return f.top=dt(m.top,f.top),f.right=Yr(m.right,f.right),f.bottom=Yr(m.bottom,f.bottom),f.left=dt(m.left,f.left),f},ha(r,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Wc(e){const{width:r,height:n}=zo(e);return{width:r,height:n}}function Hc(e,r,n){const s=yt(r),a=At(r),o=n==="fixed",i=dr(e,!0,o,r);let l={scrollLeft:0,scrollTop:0};const c=It(0);function f(){c.x=Wn(a)}if(s||!s&&!o)if((Er(r)!=="body"||nn(a))&&(l=Pn(r)),s){const p=dr(r,!0,o,r);c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}else a&&f();o&&!s&&a&&f();const d=a&&!s&&!o?Oo(a,l):It(0),m=i.left+l.scrollLeft-c.x-d.x,h=i.top+l.scrollTop-c.y-d.y;return{x:m,y:h,width:i.width,height:i.height}}function es(e){return ft(e).position==="static"}function pa(e,r){if(!yt(e)||ft(e).position==="fixed")return null;if(r)return r(e);let n=e.offsetParent;return At(e)===n&&(n=n.ownerDocument.body),n}function Fo(e,r){const n=lt(e);if(Bn(e))return n;if(!yt(e)){let a=Wt(e);for(;a&&!_t(a);){if($e(a)&&!es(a))return a;a=Wt(a)}return n}let s=pa(e,r);for(;s&&zl(s)&&es(s);)s=pa(s,r);return s&&_t(s)&&es(s)&&!zs(s)?n:s||Bl(e)||n}const Zc=async function(e){const r=this.getOffsetParent||Fo,n=this.getDimensions,s=await n(e.floating);return{reference:Hc(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Gc(e){return ft(e).direction==="rtl"}const Uc={convertOffsetParentRelativeRectToViewportRelativeRect:Dc,getDocumentElement:At,getClippingRect:_c,getOffsetParent:Fo,getElementRects:Zc,getClientRects:Oc,getDimensions:Wc,getScale:jr,isElement:$e,isRTL:Gc};function Bo(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function qc(e,r){let n=null,s;const a=At(e);function o(){var l;clearTimeout(s),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:d,top:m,width:h,height:p}=f;if(l||r(),!h||!p)return;const g=xn(m),x=xn(a.clientWidth-(d+h)),b=xn(a.clientHeight-(m+p)),y=xn(d),w={rootMargin:-g+"px "+-x+"px "+-b+"px "+-y+"px",threshold:dt(0,Yr(1,c))||1};let j=!0;function I(N){const E=N[0].intersectionRatio;if(E!==c){if(!j)return i();E?i(!1,E):s=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!Bo(f,e.getBoundingClientRect())&&i(),j=!1}try{n=new IntersectionObserver(I,{...w,root:a.ownerDocument})}catch{n=new IntersectionObserver(I,w)}n.observe(e)}return i(!0),o}function Vo(e,r,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,f=Ds(e),d=a||o?[...f?er(f):[],...er(r)]:[];d.forEach(y=>{a&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const m=f&&l?qc(f,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(y=>{let[C]=y;C&&C.target===f&&p&&(p.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(r)})),n()}),f&&!c&&p.observe(f),p.observe(r));let g,x=c?dr(e):null;c&&b();function b(){const y=dr(e);x&&!Bo(x,y)&&n(),x=y,g=requestAnimationFrame(b)}return n(),()=>{var y;d.forEach(C=>{a&&C.removeEventListener("scroll",n),o&&C.removeEventListener("resize",n)}),m?.(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const Kc=Lc,Xc=Ec,Yc=Ac,Qc=(e,r,n)=>{const s=new Map,a={platform:Uc,...n},o={...a.platform,_c:s};return Rc(e,r,{...a,platform:o})};var Jc=typeof document<"u",e0=function(){},jn=Jc?u.useLayoutEffect:e0;function Ln(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let n,s,a;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==r.length)return!1;for(s=n;s--!==0;)if(!Ln(e[s],r[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(r,a[s]))return!1;for(s=n;s--!==0;){const o=a[s];if(!(o==="_owner"&&e.$$typeof)&&!Ln(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}function Po(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xa(e,r){const n=Po(e);return Math.round(r*n)/n}function ts(e){const r=k.useRef(e);return jn(()=>{r.current=e}),r}function t0(e){e===void 0&&(e={});const{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[d,m]=k.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[h,p]=k.useState(s);Ln(h,s)||p(s);const[g,x]=k.useState(null),[b,y]=k.useState(null),C=k.useCallback(L=>{L!==N.current&&(N.current=L,x(L))},[]),w=k.useCallback(L=>{L!==E.current&&(E.current=L,y(L))},[]),j=o||g,I=i||b,N=k.useRef(null),E=k.useRef(null),S=k.useRef(d),v=c!=null,R=ts(c),T=ts(a),A=ts(f),V=k.useCallback(()=>{if(!N.current||!E.current)return;const L={placement:r,strategy:n,middleware:h};T.current&&(L.platform=T.current),Qc(N.current,E.current,L).then(Z=>{const D={...Z,isPositioned:A.current!==!1};F.current&&!Ln(S.current,D)&&(S.current=D,go.flushSync(()=>{m(D)}))})},[h,r,n,T,A]);jn(()=>{f===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,m(L=>({...L,isPositioned:!1})))},[f]);const F=k.useRef(!1);jn(()=>(F.current=!0,()=>{F.current=!1}),[]),jn(()=>{if(j&&(N.current=j),I&&(E.current=I),j&&I){if(R.current)return R.current(j,I,V);V()}},[j,I,V,R,v]);const Y=k.useMemo(()=>({reference:N,floating:E,setReference:C,setFloating:w}),[C,w]),_=k.useMemo(()=>({reference:j,floating:I}),[j,I]),B=k.useMemo(()=>{const L={position:n,left:0,top:0};if(!_.floating)return L;const Z=xa(_.floating,d.x),D=xa(_.floating,d.y);return l?{...L,transform:"translate("+Z+"px, "+D+"px)",...Po(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:D}},[n,l,_.floating,d.x,d.y]);return k.useMemo(()=>({...d,update:V,refs:Y,elements:_,floatingStyles:B}),[d,V,Y,_,B])}const _o=(e,r)=>({...Kc(e),options:[e,r]}),Wo=(e,r)=>({...Xc(e),options:[e,r]}),Ho=(e,r)=>({...Yc(e),options:[e,r]}),r0="data-floating-ui-focusable",ga="active",ba="selected",n0={...k};let va=!1,s0=0;const ya=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+s0++;function a0(){const[e,r]=k.useState(()=>va?ya():void 0);return lr(()=>{e==null&&r(ya())},[]),k.useEffect(()=>{va=!0},[]),e}const o0=n0.useId,Zo=o0||a0;let bs;process.env.NODE_ENV!=="production"&&(bs=new Set);function i0(){for(var e,r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];const a="Floating UI: "+n.join(" ");if(!((e=bs)!=null&&e.has(a))){var o;(o=bs)==null||o.add(a),console.error(a)}}function l0(){const e=new Map;return{emit(r,n){var s;(s=e.get(r))==null||s.forEach(a=>a(n))},on(r,n){e.has(r)||e.set(r,new Set),e.get(r).add(n)},off(r,n){var s;(s=e.get(r))==null||s.delete(n)}}}const c0=k.createContext(null),d0=k.createContext(null),u0=()=>{var e;return((e=k.useContext(c0))==null?void 0:e.id)||null},Go=()=>k.useContext(d0);function Os(e){return"data-floating-ui-"+e}const Uo={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},wa=k.forwardRef(function(r,n){const[s,a]=k.useState();lr(()=>{pc()&&a("button")},[]);const o={ref:n,tabIndex:0,role:s,"aria-hidden":s?void 0:!0,[Os("focus-guard")]:"",style:Uo};return t.jsx("span",{...r,...o})}),qo=k.createContext(null),ka=Os("portal");function f0(e){e===void 0&&(e={});const{id:r,root:n}=e,s=Zo(),a=h0(),[o,i]=k.useState(null),l=k.useRef(null);return lr(()=>()=>{o?.remove(),queueMicrotask(()=>{l.current=null})},[o]),lr(()=>{if(!s||l.current)return;const c=r?document.getElementById(r):null;if(!c)return;const f=document.createElement("div");f.id=s,f.setAttribute(ka,""),c.appendChild(f),l.current=f,i(f)},[r,s]),lr(()=>{if(n===null||!s||l.current)return;let c=n||a?.portalNode;c&&!Ts(c)&&(c=c.current),c=c||document.body;let f=null;r&&(f=document.createElement("div"),f.id=r,c.appendChild(f));const d=document.createElement("div");d.id=s,d.setAttribute(ka,""),c=f||c,c.appendChild(d),l.current=d,i(d)},[r,n,s,a]),o}function m0(e){const{children:r,id:n,root:s,preserveTabOrder:a=!0}=e,o=f0({id:n,root:s}),[i,l]=k.useState(null),c=k.useRef(null),f=k.useRef(null),d=k.useRef(null),m=k.useRef(null),h=i?.modal,p=i?.open,g=!!i&&!i.modal&&i.open&&a&&!!(s||o);return k.useEffect(()=>{if(!o||!a||h)return;function x(b){o&&Jn(b)&&(b.type==="focusin"?ua:Sc)(o)}return o.addEventListener("focusin",x,!0),o.addEventListener("focusout",x,!0),()=>{o.removeEventListener("focusin",x,!0),o.removeEventListener("focusout",x,!0)}},[o,a,h]),k.useEffect(()=>{o&&(p||ua(o))},[p,o]),t.jsxs(qo.Provider,{value:k.useMemo(()=>({preserveTabOrder:a,beforeOutsideRef:c,afterOutsideRef:f,beforeInsideRef:d,afterInsideRef:m,portalNode:o,setFocusManagerState:l}),[a,o]),children:[g&&o&&t.jsx(wa,{"data-type":"outside",ref:c,onFocus:x=>{if(Jn(x,o)){var b;(b=d.current)==null||b.focus()}else{const y=i?i.domReference:null,C=Nc(y);C?.focus()}}}),g&&o&&t.jsx("span",{"aria-owns":o.id,style:Uo}),o&&go.createPortal(r,o),g&&o&&t.jsx(wa,{"data-type":"outside",ref:f,onFocus:x=>{if(Jn(x,o)){var b;(b=m.current)==null||b.focus()}else{const y=i?i.domReference:null,C=Cc(y);C?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,x.nativeEvent,"focus-out")}}})]})}const h0=()=>k.useContext(qo),p0={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},x0={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ja=e=>{var r,n;return{escapeKey:typeof e=="boolean"?e:(r=e?.escapeKey)!=null?r:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function g0(e,r){r===void 0&&(r={});const{open:n,onOpenChange:s,elements:a,dataRef:o}=e,{enabled:i=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:f="pointerdown",referencePress:d=!1,referencePressEvent:m="pointerdown",ancestorScroll:h=!1,bubbles:p,capture:g}=r,x=Go(),b=wr(typeof c=="function"?c:()=>!1),y=typeof c=="function"?b:c,C=k.useRef(!1),{escapeKey:w,outsidePress:j}=ja(p),{escapeKey:I,outsidePress:N}=ja(g),E=k.useRef(!1),S=wr(F=>{var Y;if(!n||!i||!l||F.key!=="Escape"||E.current)return;const _=(Y=o.current.floatingContext)==null?void 0:Y.nodeId,B=x?kn(x.nodesRef.current,_):[];if(!w&&(F.stopPropagation(),B.length>0)){let L=!0;if(B.forEach(Z=>{var D;if((D=Z.context)!=null&&D.open&&!Z.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}s(!1,bc(F)?F.nativeEvent:F,"escape-key")}),v=wr(F=>{var Y;const _=()=>{var B;S(F),(B=Pr(F))==null||B.removeEventListener("keydown",_)};(Y=Pr(F))==null||Y.addEventListener("keydown",_)}),R=wr(F=>{var Y;const _=o.current.insideReactTree;o.current.insideReactTree=!1;const B=C.current;if(C.current=!1,f==="click"&&B||_||typeof y=="function"&&!y(F))return;const L=Pr(F),Z="["+Os("inert")+"]",D=Jr(a.floating).querySelectorAll(Z);let q=$e(L)?L:null;for(;q&&!_t(q);){const ie=Wt(q);if(_t(ie)||!$e(ie))break;q=ie}if(D.length&&$e(L)&&!gc(L)&&!gs(L,a.floating)&&Array.from(D).every(ie=>!gs(q,ie)))return;if(yt(L)&&V){const ie=_t(L),ce=ft(L),oe=/auto|scroll/,Me=ie||oe.test(ce.overflowX),pe=ie||oe.test(ce.overflowY),te=Me&&L.clientWidth>0&&L.scrollWidth>L.clientWidth,ve=pe&&L.clientHeight>0&&L.scrollHeight>L.clientHeight,M=ce.direction==="rtl",G=ve&&(M?F.offsetX<=L.offsetWidth-L.clientWidth:F.offsetX>L.clientWidth),O=te&&F.offsetY>L.clientHeight;if(G||O)return}const P=(Y=o.current.floatingContext)==null?void 0:Y.nodeId,H=x&&kn(x.nodesRef.current,P).some(ie=>{var ce;return Qn(F,(ce=ie.context)==null?void 0:ce.elements.floating)});if(Qn(F,a.floating)||Qn(F,a.domReference)||H)return;const ae=x?kn(x.nodesRef.current,P):[];if(ae.length>0){let ie=!0;if(ae.forEach(ce=>{var oe;if((oe=ce.context)!=null&&oe.open&&!ce.context.dataRef.current.__outsidePressBubbles){ie=!1;return}}),!ie)return}s(!1,F,"outside-press")}),T=wr(F=>{var Y;const _=()=>{var B;R(F),(B=Pr(F))==null||B.removeEventListener(f,_)};(Y=Pr(F))==null||Y.addEventListener(f,_)});k.useEffect(()=>{if(!n||!i)return;o.current.__escapeKeyBubbles=w,o.current.__outsidePressBubbles=j;let F=-1;function Y(D){s(!1,D,"ancestor-scroll")}function _(){window.clearTimeout(F),E.current=!0}function B(){F=window.setTimeout(()=>{E.current=!1},Vn()?5:0)}const L=Jr(a.floating);l&&(L.addEventListener("keydown",I?v:S,I),L.addEventListener("compositionstart",_),L.addEventListener("compositionend",B)),y&&L.addEventListener(f,N?T:R,N);let Z=[];return h&&($e(a.domReference)&&(Z=er(a.domReference)),$e(a.floating)&&(Z=Z.concat(er(a.floating))),!$e(a.reference)&&a.reference&&a.reference.contextElement&&(Z=Z.concat(er(a.reference.contextElement)))),Z=Z.filter(D=>{var q;return D!==((q=L.defaultView)==null?void 0:q.visualViewport)}),Z.forEach(D=>{D.addEventListener("scroll",Y,{passive:!0})}),()=>{l&&(L.removeEventListener("keydown",I?v:S,I),L.removeEventListener("compositionstart",_),L.removeEventListener("compositionend",B)),y&&L.removeEventListener(f,N?T:R,N),Z.forEach(D=>{D.removeEventListener("scroll",Y)}),window.clearTimeout(F)}},[o,a,l,y,f,n,s,h,i,w,j,S,I,v,R,N,T]),k.useEffect(()=>{o.current.insideReactTree=!1},[o,y,f]);const A=k.useMemo(()=>({onKeyDown:S,...d&&{[p0[m]]:F=>{s(!1,F.nativeEvent,"reference-press")},...m!=="click"&&{onClick(F){s(!1,F.nativeEvent,"reference-press")}}}}),[S,s,d,m]),V=k.useMemo(()=>({onKeyDown:S,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[x0[f]]:()=>{o.current.insideReactTree=!0}}),[S,f,o]);return k.useMemo(()=>i?{reference:A,floating:V}:{},[i,A,V])}function b0(e){const{open:r=!1,onOpenChange:n,elements:s}=e,a=Zo(),o=k.useRef({}),[i]=k.useState(()=>l0()),l=u0()!=null;if(process.env.NODE_ENV!=="production"){const p=s.reference;p&&!$e(p)&&i0("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,f]=k.useState(s.reference),d=wr((p,g,x)=>{o.current.openEvent=p?g:void 0,i.emit("openchange",{open:p,event:g,reason:x,nested:l}),n?.(p,g,x)}),m=k.useMemo(()=>({setPositionReference:f}),[]),h=k.useMemo(()=>({reference:c||s.reference||null,floating:s.floating||null,domReference:s.reference}),[c,s.reference,s.floating]);return k.useMemo(()=>({dataRef:o,open:r,onOpenChange:d,elements:h,events:i,floatingId:a,refs:m}),[r,d,h,i,a,m])}function Ko(e){e===void 0&&(e={});const{nodeId:r}=e,n=b0({...e,elements:{reference:null,floating:null,...e.elements}}),s=e.rootContext||n,a=s.elements,[o,i]=k.useState(null),[l,c]=k.useState(null),d=a?.domReference||o,m=k.useRef(null),h=Go();lr(()=>{d&&(m.current=d)},[d]);const p=t0({...e,elements:{...a,...l&&{reference:l}}}),g=k.useCallback(w=>{const j=$e(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;c(j),p.refs.setReference(j)},[p.refs]),x=k.useCallback(w=>{($e(w)||w===null)&&(m.current=w,i(w)),($e(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!$e(w))&&p.refs.setReference(w)},[p.refs]),b=k.useMemo(()=>({...p.refs,setReference:x,setPositionReference:g,domReference:m}),[p.refs,x,g]),y=k.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),C=k.useMemo(()=>({...p,...s,refs:b,elements:y,nodeId:r}),[p,b,y,r,s]);return lr(()=>{s.dataRef.current.floatingContext=C;const w=h?.nodesRef.current.find(j=>j.id===r);w&&(w.context=C)}),k.useMemo(()=>({...p,context:C,refs:b,elements:y}),[p,b,y,C])}function rs(e,r,n){const s=new Map,a=n==="item";let o=e;if(a&&e){const{[ga]:i,[ba]:l,...c}=e;o=c}return{...n==="floating"&&{tabIndex:-1,[r0]:""},...o,...r.map(i=>{const l=i?i[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((i,l)=>(l&&Object.entries(l).forEach(c=>{let[f,d]=c;if(!(a&&[ga,ba].includes(f)))if(f.indexOf("on")===0){if(s.has(f)||s.set(f,[]),typeof d=="function"){var m;(m=s.get(f))==null||m.push(d),i[f]=function(){for(var h,p=arguments.length,g=new Array(p),x=0;x<p;x++)g[x]=arguments[x];return(h=s.get(f))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else i[f]=d}),i),{})}}function v0(e){e===void 0&&(e=[]);const r=e.map(l=>l?.reference),n=e.map(l=>l?.floating),s=e.map(l=>l?.item),a=k.useCallback(l=>rs(l,e,"reference"),r),o=k.useCallback(l=>rs(l,e,"floating"),n),i=k.useCallback(l=>rs(l,e,"item"),s);return k.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:i}),[a,o,i])}function y0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"}))}const w0=k.forwardRef(y0);function k0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 9V5.25A2.25 2.25 0 0 1 10.5 3h6a2.25 2.25 0 0 1 2.25 2.25v13.5A2.25 2.25 0 0 1 16.5 21h-6a2.25 2.25 0 0 1-2.25-2.25V15m-3 0-3-3m0 0 3-3m-3 3H15"}))}const j0=k.forwardRef(k0);function C0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const N0=k.forwardRef(C0);function S0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"}))}const R0=k.forwardRef(S0);function E0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 15 3 9m0 0 6-6M3 9h12a6 6 0 0 1 0 12h-3"}))}const M0=k.forwardRef(E0);function I0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const L0=k.forwardRef(I0);function A0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0-3.75-3.75M17.25 21 21 17.25"}))}const T0=k.forwardRef(A0);function z0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12"}))}const D0=k.forwardRef(z0);function O0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"}))}const $0=k.forwardRef(O0);function F0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z"}))}const B0=k.forwardRef(F0);function V0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const P0=k.forwardRef(V0);function _0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Xo=k.forwardRef(_0);function W0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Yo=k.forwardRef(W0);function H0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const Z0=k.forwardRef(H0);function G0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"}))}const U0=k.forwardRef(G0);function q0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const K0=k.forwardRef(q0);function X0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 0 1-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0 1 15 18.257V17.25m6-12V15a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 15V5.25m18 0A2.25 2.25 0 0 0 18.75 3H5.25A2.25 2.25 0 0 0 3 5.25m18 0V12a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 12V5.25"}))}const Y0=k.forwardRef(X0);function Q0({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"}))}const J0=k.forwardRef(Q0);function ed({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}const Qo=k.forwardRef(ed);function td({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const rd=k.forwardRef(td);function nd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const sd=k.forwardRef(nd);function ad({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const od=k.forwardRef(ad);function id({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const ld=k.forwardRef(id);function cd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}))}const dd=k.forwardRef(cd);function ud({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const fd=k.forwardRef(ud);function md({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Jo=k.forwardRef(md);function hd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"}))}const pd=k.forwardRef(hd);function xd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const gd=k.forwardRef(xd);function bd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const vd=k.forwardRef(bd);function yd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"}))}const wd=k.forwardRef(yd);function kd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const ei=k.forwardRef(kd);function jd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const Cd=k.forwardRef(jd);function Nd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const Sd=k.forwardRef(Nd);function Rd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const ti=k.forwardRef(Rd),Ed=({className:e="size-5"})=>t.jsx(U0,{className:e,"aria-hidden":"true"}),Md=({className:e="size-4"})=>t.jsx(Xo,{className:e,"aria-hidden":"true"}),ur=({options:e=[],value:r,defaultValue:n,placeholder:s="Seleccionar...",disabled:a=!1,error:o=!1,label:i,description:l,showLabel:c=!0,showDescription:f=!0,menuHeader:d,onChange:m,onBlur:h,className:p="",triggerClassName:g="",menuClassName:x="",ariaLabel:b,id:y,name:C,required:w=!1,menuPosition:j="bottom",fullWidth:I=!1})=>{const[N,E]=u.useState(!1),[S,v]=u.useState(r!==void 0?r:n),[R,T]=u.useState(-1),{refs:A,floatingStyles:V,context:F}=Ko({open:N,onOpenChange:ne=>{ne||E(!1)},placement:j==="top"?"top-start":"bottom-start",strategy:"fixed",whileElementsMounted:Vo,middleware:[_o(4),Wo({fallbackAxisSideDirection:"end",padding:8}),Ho({apply({rects:ne,elements:ue}){Object.assign(ue.floating.style,{minWidth:`${ne.reference.width}px`})},padding:8})]}),Y=g0(F),{getReferenceProps:_,getFloatingProps:B}=v0([Y]),L=u.useRef(null),Z=ne=>{L.current=ne,A.setReference(ne)},D=u.useRef(null);u.useEffect(()=>{r!==void 0&&v(r)},[r]),u.useEffect(()=>{const ne=ue=>{if(N)switch(ue.key){case"Escape":E(!1),L.current?.focus();break;case"ArrowDown":ue.preventDefault(),T(Le=>Le<e.length-1?Le+1:0);break;case"ArrowUp":ue.preventDefault(),T(Le=>Le>0?Le-1:e.length-1);break;case"Enter":ue.preventDefault(),R>=0&&R<e.length&&H(e[R]);break}};if(N)return document.addEventListener("keydown",ne),()=>{document.removeEventListener("keydown",ne)}},[N,R,e]);const q=e.find(ne=>ne.value===S),P=()=>{a||(E(!N),T(-1))},H=ne=>{ne.disabled||(v(ne.value),E(!1),m?.(ne.value),setTimeout(()=>{L.current?.focus()},0))},te=[`
|
|
627
627
|
inline-flex
|
|
628
628
|
items-center
|
|
629
629
|
justify-between
|
|
@@ -682,7 +682,7 @@
|
|
|
682
682
|
border-border-secondary
|
|
683
683
|
dark:bg-dark-bg-primary
|
|
684
684
|
dark:border-dark-border-primary
|
|
685
|
-
`,x].join(" ").replace(/\s+/g," ").trim(),
|
|
685
|
+
`,x].join(" ").replace(/\s+/g," ").trim(),O=`
|
|
686
686
|
flex
|
|
687
687
|
items-center
|
|
688
688
|
cursor-pointer
|
|
@@ -696,7 +696,7 @@
|
|
|
696
696
|
text-[10px]
|
|
697
697
|
leading-[12px]
|
|
698
698
|
font-bold
|
|
699
|
-
`,
|
|
699
|
+
`,le=(ne,ue)=>{const Le=ne.value===S,Ce=ue===R,ee=Ce||Le&&Ce?"bg-primary-custom-600 text-primary-inverse-content dark:bg-primary-custom-600 dark:text-primary-inverse-content":"text-content-primary dark:text-dark-content-primary",Ie=ne.disabled?"":"hover:bg-primary-custom-600 hover:text-primary-inverse-content dark:hover:bg-primary-custom-600 dark:hover:text-primary-inverse-content",$=ne.disabled?"opacity-50 cursor-not-allowed":"";return[O,ee,Ie,$].join(" ").replace(/\s+/g," ").trim()},J=["shrink-0","w-4","h-4","transition-transform","duration-150",N&&"rotate-180",a?"text-content-tertiary dark:text-content-tertiary":"text-content-secondary dark:text-content-secondary"].filter(Boolean).join(" ").replace(/\s+/g," ").trim(),ge="shrink-0 w-4 h-4",we=u.useRef(null);return u.useEffect(()=>{if(N&&R>=0&&we.current){const ne=we.current.children[e.length===0&&d?1:d?R+1:R];ne&&ne.scrollIntoView({block:"nearest"})}},[R,N,d,e.length]),t.jsxs("div",{className:`relative flex flex-col gap-2 ${I?"w-full":""} ${p}`,ref:D,children:[c&&i||f&&l?t.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[c&&i&&t.jsxs("label",{htmlFor:y,className:"text-sm font-bold leading-5 text-content-primary dark:text-dark-content-primary",children:[i,w&&t.jsx("span",{className:"ml-1 text-error-content",children:"*"})]}),f&&l&&t.jsx("p",{className:"text-sm font-normal leading-5 text-content-tertiary dark:text-content-tertiary",children:l})]}):null,t.jsxs("button",{ref:Z,..._(),type:"button",className:te,onClick:P,onBlur:h,disabled:a,"aria-label":b||i,"aria-haspopup":"listbox","aria-expanded":N,id:y,title:q?String(q.label):s,children:[t.jsx("span",{className:`truncate ${q?"":"text-content-secondary dark:text-content-secondary"}`,children:q?q.label:s}),t.jsx(Ed,{className:J})]}),C&&t.jsx("input",{type:"hidden",name:C,value:S!==void 0?String(S):""}),N&&t.jsx(m0,{children:t.jsx("div",{ref:A.setFloating,style:{...V,zIndex:9999},...B(),children:t.jsxs("div",{ref:we,className:G,role:"listbox",children:[d&&t.jsx("div",{className:"flex items-center gap-0.5 px-6 py-0.5 rounded-[5px]",children:t.jsx("span",{className:"text-[10px] font-bold leading-[12px] text-content-tertiary dark:text-content-tertiary",children:d})}),e.length===0&&t.jsx("div",{className:"px-2 py-1.5 text-[10px] leading-[12px] text-content-secondary dark:text-content-secondary",children:"No hay opciones disponibles"}),e.map((ne,ue)=>t.jsxs("div",{className:le(ne,ue),onClick:()=>H(ne),onMouseEnter:()=>T(ue),role:"option","aria-selected":ne.value===S,"aria-disabled":ne.disabled,children:[t.jsx("div",{className:"w-4 flex items-center justify-center",children:ne.value===S&&t.jsx(Md,{className:ge})}),ne.icon&&t.jsx("span",{className:"shrink-0 w-4 h-4",children:ne.icon}),t.jsx("span",{className:"flex-1 text-left",children:ne.label})]},ne.value))]})})})]})},Id=({icon:e,label:r,selected:n=!1,disabled:s=!1,badge:a=!1,badgeCount:o,onClick:i,ariaLabel:l,id:c})=>{const f=["flex","flex-col","items-center","justify-center","px-4","py-1","rounded-full","overflow-hidden","shrink-0",n?"bg-primary-custom-100 dark:bg-primary-custom-600/30":"bg-transparent hover:bg-primary-custom-100 dark:hover:bg-primary-custom-600/20","transition-colors","duration-150"].join(" "),d=["w-4","h-4","shrink-0",n||!s?n?"text-primary-custom-600 dark:text-white":"text-content-primary hover:text-primary-custom-600 dark:text-dark-content-primary dark:hover:text-white":"text-content-tertiary dark:text-content-tertiary","transition-colors","duration-150"].join(" "),m=["text-[10px]","leading-3","font-bold","text-center","w-full","min-w-full","text-content-primary","dark:text-dark-content-primary"].join(" "),h=["relative","flex","flex-col","items-center","gap-1","px-0.5","py-0","w-14","shrink-0",s?"cursor-not-allowed opacity-50 pointer-events-none":"cursor-pointer","focus:outline-hidden","focus-visible:ring-2","focus-visible:ring-primary-custom-400","focus-visible:ring-offset-2","dark:focus-visible:ring-dark-border-custom","dark:focus-visible:ring-offset-dark-bg-primary","rounded-lg"].join(" "),p=()=>!a&&o===void 0?null:o!==void 0?t.jsx("span",{className:`
|
|
700
700
|
absolute
|
|
701
701
|
-top-0.5
|
|
702
702
|
left-[34px]
|
|
@@ -715,7 +715,7 @@
|
|
|
715
715
|
dark:bg-red-700
|
|
716
716
|
dark:text-white
|
|
717
717
|
pointer-events-none
|
|
718
|
-
`,"aria-label":`${o} notificaciones`,children:o>99?"99+":o}):
|
|
718
|
+
`,"aria-label":`${o} notificaciones`,children:o>99?"99+":o}):t.jsx("span",{className:`
|
|
719
719
|
absolute
|
|
720
720
|
-top-0.5
|
|
721
721
|
left-[34px]
|
|
@@ -725,7 +725,7 @@
|
|
|
725
725
|
bg-red-700
|
|
726
726
|
dark:bg-red-700
|
|
727
727
|
pointer-events-none
|
|
728
|
-
`,"aria-label":"Notificación"});return
|
|
728
|
+
`,"aria-label":"Notificación"});return t.jsxs("button",{type:"button",className:h,disabled:s,onClick:i,"aria-label":l||r,"aria-current":n?"page":void 0,"data-item-id":c,children:[t.jsx("div",{className:f,children:t.jsx("span",{className:d,children:e})}),t.jsx("p",{className:m,children:r}),p()]})},Ld=({items:e,alignment:r="top",showFab:n=!1,fabIcon:s,onFabClick:a,fabAriaLabel:o="Crear nuevo",className:i="",selectedId:l,onItemSelect:c})=>{const f=["flex","flex-col","items-center","relative","w-20","h-full","bg-white","dark:bg-dark-bg-primary","border-r","border-border-primary","dark:border-dark-border-primary",i].join(" "),d=["flex","flex-col","items-center","gap-10","w-20","pb-10","pt-2",r!=="top"&&"grow",r!=="top"&&"basis-0",r!=="top"&&"min-h-0"].filter(Boolean).join(" "),h=(()=>{const x=["flex","flex-col","items-center","gap-3","w-20"];return r==="top"?[...x,"shrink-0"].join(" "):r==="center"?[...x,"absolute","left-1/2","top-1/2","-translate-x-1/2","-translate-y-1/2"].join(" "):r==="bottom"?[...x,"grow","basis-0","min-h-0","justify-end","shrink-0"].join(" "):x.join(" ")})(),p=["flex","items-center","justify-center","p-3","shrink-0","rounded-md","bg-primary-custom-600","text-primary-inverse-content","border","border-primary-custom-600","shadow-button-inset","hover:bg-primary-custom-500","active:scale-95","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","focus:ring-offset-2","dark:bg-dark-bg-inverse","dark:text-dark-content-inverse","dark:border-dark-bg-inverse","dark:hover:bg-dark-bg-inverse/90","dark:focus:ring-dark-border-custom","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150"].join(" "),g=x=>{x.disabled||(x.onClick&&x.onClick(),c&&x.id&&c(x.id))};return t.jsx("nav",{className:f,"aria-label":"Navegación principal",children:t.jsxs("div",{className:d,children:[n&&t.jsx("div",{className:"flex items-start gap-2.5 shrink-0",children:t.jsx("button",{type:"button",className:p,onClick:a,"aria-label":o,children:t.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:s})})}),t.jsx("div",{className:h,children:e.map((x,b)=>t.jsx(Id,{...x,selected:x.selected||l!==void 0&&x.id===l,onClick:()=>g(x)},x.id||b))})]})})},$s=({height:e=900,width:r=248,showHeading:n=!0,heading:s,showSearch:a=!0,search:o,sections:i,items:l,className:c="",panelClassName:f=""})=>{const[d,m]=u.useState(o?.value||""),h=x=>{m(x),o?.onChange?.(x)},p={height:typeof e=="number"?`${e}px`:e},g={width:typeof r=="number"?`${r}px`:r};return t.jsx("div",{className:`flex items-start relative ${c}`,style:p,"data-testid":"navigation-rail-panel-container",children:t.jsxs("div",{className:`bg-bg-primary dark:bg-dark-bg-primary border-border-primary dark:border-dark-border-primary border-b-0 border-l border-r border-solid border-t-0 flex flex-col h-full items-start overflow-clip relative shrink-0 ${f}`,style:g,"data-testid":"navigation-rail-panel",children:[n&&s&&t.jsx("div",{className:"flex flex-col items-start p-3 relative shrink-0 w-full",children:t.jsx(As,{label:s.label,description:s.description,showDescription:s.showDescription!==!1,iconName:s.iconName,showIcon:!0,actionLabel:s.actionLabel,showAction:s.showAction,onActionClick:s.onActionClick,className:"w-full"})}),a&&t.jsx("div",{className:"flex flex-col items-start p-3 relative shrink-0 w-full","data-testid":"navigation-rail-search",children:t.jsx(Ge,{placeholder:o?.placeholder||"Buscar módulo",value:d,onChange:x=>h(x.target.value),className:"w-full"})}),t.jsx(rr,{className:"w-full"}),t.jsxs("div",{className:`
|
|
729
729
|
flex flex-1 flex-col gap-0.5 items-start min-h-px min-w-px p-3 relative shrink-0 overflow-y-auto w-full
|
|
730
730
|
scrollbar-thin
|
|
731
731
|
[&::-webkit-scrollbar]:w-1.5
|
|
@@ -735,24 +735,24 @@
|
|
|
735
735
|
dark:[&::-webkit-scrollbar-thumb]:bg-gray-700
|
|
736
736
|
hover:[&::-webkit-scrollbar-thumb]:bg-gray-300
|
|
737
737
|
dark:hover:[&::-webkit-scrollbar-thumb]:bg-gray-600
|
|
738
|
-
`,"data-testid":"navigation-rail-body",children:[i&&i.length>0?i.map((x,b)=>
|
|
739
|
-
${
|
|
738
|
+
`,"data-testid":"navigation-rail-body",children:[i&&i.length>0?i.map((x,b)=>t.jsxs("div",{className:"w-full",children:[x.heading&&t.jsx("div",{className:"flex flex-col gap-0 items-start pb-1 pt-3 px-0 relative shrink-0 w-full","data-testid":`section-heading-${b}`,children:t.jsx("p",{className:"font-['Inter:Regular',sans-serif] font-normal text-xs leading-4 not-italic relative shrink-0 text-content-tertiary dark:text-content-tertiary w-full whitespace-pre-wrap",children:x.heading})}),t.jsx("div",{className:"flex flex-col gap-0.5 items-start relative shrink-0 w-full","data-testid":`section-items-${b}`,children:x.items.map((y,C)=>t.jsx(Ca,{item:y},`item-${b}-${C}`))}),x.showDivider!==!1&&b<i.length-1&&t.jsx(rr,{className:"mt-3 w-full"})]},`section-${b}`)):null,l&&l.length>0&&!i?l.map((x,b)=>t.jsx(Ca,{item:x},`item-${b}`)):null]})]})})},Ca=({item:e})=>e.isCollapsible?t.jsx(Ls,{label:e.label,icon:e.icon,children:e.children,defaultOpen:e.defaultOpen,disabled:e.disabled,onClick:e.onClick,onOpenChange:e.onOpenChange,className:e.className,showDivider:!1,showHeading:!1}):t.jsxs("button",{onClick:e.onClick,disabled:e.disabled,className:["flex items-center gap-3 px-4 py-2 w-full","rounded-lg cursor-pointer","transition-colors duration-150",!e.disabled&&"text-content-primary",!e.disabled&&"hover:bg-primary-custom-100",!e.disabled&&"dark:text-content-primary",!e.disabled&&"dark:hover:bg-dark-bg-custom",!e.disabled&&"focus:outline-hidden",!e.disabled&&"focus:ring-2",!e.disabled&&"focus:ring-offset-2",!e.disabled&&"focus:ring-primary-custom-400",!e.disabled&&"focus:ring-offset-bg-primary",!e.disabled&&"dark:focus:ring-offset-dark-bg-primary",e.disabled&&"opacity-50",e.disabled&&"cursor-not-allowed",e.className].filter(Boolean).join(" "),"data-testid":`navigation-rail-item-${e.label}`,"aria-disabled":e.disabled,children:[e.icon&&t.jsx("div",{className:"flex items-center justify-center w-4 h-4 shrink-0 text-content-secondary dark:text-content-secondary",children:e.icon}),t.jsx("p",{className:"font-['Inter:Regular',sans-serif] text-sm font-normal leading-5 not-italic relative shrink-0 text-left",children:e.label})]});function Ad({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{fillRule:"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const Td=k.forwardRef(Ad);function zd({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Dd=k.forwardRef(zd);function Od({title:e,titleId:r,...n},s){return k.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:s,"aria-labelledby":r},n),e?k.createElement("title",{id:r},e):null,k.createElement("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z",clipRule:"evenodd"}))}const ri=k.forwardRef(Od),$d=({className:e="size-5"})=>t.jsx(Dd,{className:e,"aria-hidden":"true"}),Fd=({className:e="size-5"})=>t.jsx(Td,{className:e,"aria-hidden":"true"}),Na=({className:e="size-5"})=>t.jsx(K0,{className:e,"aria-hidden":"true"}),Sa=({className:e="size-5"})=>t.jsx(ri,{className:e,"aria-hidden":"true"}),Fs=u.forwardRef(({collapsed:e=!0,items:r=[],showRecentButton:n=!0,showSearchButton:s=!0,onCollapsedChange:a,onItemClick:o,onItemHover:i,className:l,labels:c={},onSearch:f},d)=>{const[m,h]=u.useState(""),[p,g]=u.useState(!1),x=u.useRef(null),b=u.useRef(null);u.useEffect(()=>{function v(R){p&&x.current&&!x.current.contains(R.target)&&b.current&&!b.current.contains(R.target)&&g(!1)}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[p]);const y={searchButton:c.searchButton??"Search",searchPlaceholder:c.searchPlaceholder??"Buscar módulo",recentButton:c.recentButton??"Recientes",collapseButton:c.collapseButton??"Colapsar",expandButton:c.expandButton??"Expandir"},C=()=>{e&&g(!1),a?.(!e)},w=()=>{g(!p)},j=(v,R)=>{R.onClick?.(new Event("click")),o?.(v,R),p&&g(!1)},I=(v,R)=>{i?.(v,R)},N=v=>{h(v),f?.(v)},E=v=>{N(v.target.value)},S=r.map((v,R)=>({label:v.label,icon:v.icon,disabled:v.disabled,isCollapsible:v.children&&v.children.length>0,children:v.children,defaultOpen:v.defaultOpen,onClick:()=>j(R,v)}));return t.jsxs("div",{ref:d,className:`
|
|
739
|
+
${e?"w-[80px]":"w-[215px]"}
|
|
740
740
|
h-full
|
|
741
741
|
bg-background-primary dark:bg-background-primary
|
|
742
|
-
${
|
|
742
|
+
${e?"border-r border-border-primary dark:border-border-primary":"border-l border-r border-border-primary dark:border-border-primary"}
|
|
743
743
|
border-solid
|
|
744
744
|
flex flex-col
|
|
745
745
|
items-center
|
|
746
746
|
relative
|
|
747
747
|
transition-all duration-300
|
|
748
748
|
${l||""}
|
|
749
|
-
`,children:[
|
|
749
|
+
`,children:[e&&p&&t.jsx("div",{ref:x,className:"absolute left-[80px] top-0 h-full z-50 shadow-xl",children:t.jsx($s,{height:"100%",width:248,showHeading:!0,heading:{label:"Buscar",showDescription:!1,showAction:!0,actionLabel:"Cerrar",onActionClick:()=>g(!1)},showSearch:!0,search:{placeholder:y.searchPlaceholder,value:m,onChange:N},items:S,className:"h-full border-l border-border-primary dark:border-border-primary"})}),!e&&t.jsxs("div",{className:"w-full flex flex-col gap-3 px-3 py-3 relative shrink-0",children:[t.jsx(Ge,{placeholder:y.searchPlaceholder,value:m,onChange:E,leftIcon:t.jsx(Sa,{className:"size-4 text-content-secondary dark:text-content-secondary"}),fullWidth:!0}),t.jsx(rr,{className:"w-full"})]}),t.jsxs("div",{className:`
|
|
750
750
|
flex-1 flex flex-col
|
|
751
751
|
items-center min-h-px min-w-px
|
|
752
752
|
relative shrink-0
|
|
753
753
|
px-0
|
|
754
|
-
${
|
|
755
|
-
`,children:[
|
|
754
|
+
${e?"gap-7 py-2 w-[80px]":"gap-0.5 px-3 pb-3 pt-0 w-full bg-background-primary dark:bg-background-primary border-l dark:border-border-primary border-border-primary border-solid"}
|
|
755
|
+
`,children:[e&&s&&t.jsx("div",{ref:b,children:t.jsx(Q,{type:"default",size:"xl",iconOnly:!0,leftIcon:t.jsx(Sa,{className:"overflow-clip relative shrink-0 size-4 text-primary-inverse-content dark:text-primary-inverse-content"}),ariaLabel:y.searchButton,onClick:w,className:p?"bg-primary-custom-500 ring-2 ring-offset-2 ring-primary-custom-400":""})}),t.jsxs("div",{className:`
|
|
756
756
|
flex flex-col items-center min-h-px min-w-px
|
|
757
757
|
relative shrink-0
|
|
758
758
|
flex-1
|
|
@@ -765,11 +765,11 @@
|
|
|
765
765
|
dark:[&::-webkit-scrollbar-thumb]:bg-gray-700
|
|
766
766
|
hover:[&::-webkit-scrollbar-thumb]:bg-gray-300
|
|
767
767
|
dark:hover:[&::-webkit-scrollbar-thumb]:bg-gray-600
|
|
768
|
-
${
|
|
769
|
-
`,children:[!t
|
|
768
|
+
${e?"gap-3 leading-none w-[80px]":"gap-0.5 px-3 pb-3 pt-0 w-full"}
|
|
769
|
+
`,children:[!e&&t.jsx("div",{className:"h-3 shrink-0"}),e?t.jsx(t.Fragment,{children:r.map((v,R)=>t.jsx(Is,{id:v.id,label:v.label,icon:v.icon,selected:v.active,disabled:v.disabled,badge:v.badge,badgeCount:v.badgeCount,ariaLabel:v.ariaLabel,showLabelText:!1,onClick:()=>j(R,v),onMouseEnter:()=>I(R,v),onMouseLeave:v.onMouseLeave},v.id))}):t.jsx(t.Fragment,{children:r.map((v,R)=>{const T=v.children&&v.children.length>0;return t.jsx("div",{className:"w-full",children:t.jsx(Ls,{label:v.label,icon:v.icon,selected:v.active,disabled:v.disabled,badge:v.badge,badgeCount:v.badgeCount,badgeColor:v.badgeColor,showDivider:!1,showHeading:!1,isCollapsible:T,defaultOpen:v.defaultOpen,children:T?v.children:void 0,onClick:()=>j(R,v),stickyHeader:!0})},v.id)})})]}),t.jsxs("div",{className:`w-full flex flex-col gap-3 items-center relative shrink-0 ${e?"":"px-3"}`,children:[t.jsx(rr,{className:"w-full"}),t.jsxs("div",{className:`
|
|
770
770
|
flex flex-col gap-3 relative shrink-0 w-full
|
|
771
|
-
${
|
|
772
|
-
`,children:[n&&t
|
|
771
|
+
${e?"items-stretch px-3":"items-stretch"}
|
|
772
|
+
`,children:[n&&e&&t.jsx(Q,{type:"outline",size:"base",fullWidth:!0,leftIcon:t.jsx(Na,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),ariaLabel:y.recentButton}),n&&!e&&t.jsx(Q,{type:"outline",size:"base",leftIcon:t.jsx(Na,{className:"size-4 text-primary-custom-600 dark:text-primary-custom-600"}),fullWidth:!0,children:y.recentButton}),e?t.jsx(Q,{type:"plain",size:"base",fullWidth:!0,leftIcon:t.jsx($d,{className:"overflow-clip relative shrink-0 size-4 text-background-inverse-custom-primary dark:text-background-inverse-custom-primary"}),onClick:C,ariaLabel:y.expandButton}):t.jsx(Q,{type:"outline",size:"base",leftIcon:t.jsx(Fd,{className:"overflow-clip relative shrink-0 size-4 text-content-custom-primary dark:text-content-custom-primary"}),onClick:C,fullWidth:!0,children:y.collapseButton})]})]})]})]})});Fs.displayName="NavigationRailTypes";const Bd=({className:e="size-4"})=>t.jsx(ri,{className:e,"aria-hidden":"true"}),Hn=u.forwardRef(({state:e="collapsed",items:r=[],onStateChange:n,onItemClick:s,onItemHover:a,labels:o={},className:i,showSearchButton:l=!0,onSearch:c},f)=>{const[d,m]=u.useState(!1),[h,p]=u.useState("hover"),[g,x]=u.useState(null),b=u.useRef(null),y={searchPlaceholder:o.searchPlaceholder??"Buscar módulo",collapseButton:o.collapseButton??"Colapsar",recentSection:o.recentSection??"Recientes",frequentSection:o.frequentSection??"Opciones frecuentes"},C=e==="collapsed"||e==="hover"||e==="searcher";u.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]);const w=T=>{n?.(T?"collapsed":"expanded")},j=T=>{const A=r[T];A&&s?.(A)},I=T=>{const A=r[T];A&&C&&N(A)},N=T=>{C&&T.isCollapsible&&T.children&&(b.current&&(clearTimeout(b.current),b.current=null),x(T),p("hover"),m(!0),a?.(T))},E=()=>{C&&h==="hover"&&(b.current=setTimeout(()=>{m(!1),x(null)},150))},S=()=>{b.current&&(clearTimeout(b.current),b.current=null)},v=()=>{C&&h==="hover"&&(m(!1),x(null))},R=r.map(T=>({id:T.id,label:T.label,icon:T.icon,active:T.active,disabled:T.disabled,badge:T.badge,badgeCount:T.badgeCount,children:T.children,defaultOpen:T.defaultOpen,onClick:()=>{T.onClick?.()},onMouseLeave:()=>E()}));return t.jsxs("div",{ref:f,className:`relative flex items-start h-full ${i||""}`,"data-testid":"navigation-rail-group",children:[t.jsx(Fs,{collapsed:C,items:R,showRecentButton:!1,showSearchButton:l,onCollapsedChange:w,onItemClick:j,onItemHover:I,onSearch:c,labels:{searchButton:y.searchPlaceholder,searchPlaceholder:y.searchPlaceholder,collapseButton:y.collapseButton}}),d&&C&&t.jsx("div",{className:"absolute left-[80px] top-0 z-10 h-full",onMouseEnter:S,onMouseLeave:v,children:t.jsx($s,{height:"100%",width:248,showHeading:h==="hover"&&g!==null,heading:h==="hover"&&g?{label:g.label,iconName:"cog-6-tooth",showDescription:!1,showAction:!1}:void 0,showSearch:h==="searcher",search:{placeholder:y.searchPlaceholder},sections:h==="hover"&&g?.children?[{items:g.children.map(T=>({label:T.label,icon:T.icon,onClick:T.onClick,disabled:T.disabled}))}]:h==="searcher"?[{heading:y.recentSection,items:[{label:"Configuración",icon:t.jsx(Bd,{className:"size-4"})}]},{heading:y.frequentSection,items:[{label:"Item"}]}]:[]})})]})});Hn.displayName="NavigationRailGroup";const Vd=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform",children:t.jsx("path",{d:"M12 10L8 6L4 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Pd=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform",children:t.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),_d=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M14 8H2M2 8L6.5 3.5M2 8L6.5 12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Wd=()=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M2 8H14M14 8L9.5 3.5M14 8L9.5 12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Hd=({column:e,sortable:r,sorted:n,sortDirection:s,onSort:a})=>{const o=`
|
|
773
773
|
flex
|
|
774
774
|
items-center
|
|
775
775
|
gap-3
|
|
@@ -787,7 +787,7 @@
|
|
|
787
787
|
hover:bg-background-secondary
|
|
788
788
|
dark:hover:bg-dark-bg-primary/50
|
|
789
789
|
select-none
|
|
790
|
-
`:"",l={left:"justify-start",center:"justify-center",right:"justify-end"},c=
|
|
790
|
+
`:"",l={left:"justify-start",center:"justify-center",right:"justify-end"},c=e.stickyRight?"sticky right-0 z-10 bg-white dark:bg-dark-bg-primary shadow-[-2px_0_5px_rgba(0,0,0,0.05)]":"",f=[o,i,c,l[e.align||"left"]].join(" ").replace(/\s+/g," ").trim();return t.jsxs("div",{className:f,onClick:r?a:void 0,role:r?"button":void 0,tabIndex:r?0:void 0,onKeyDown:r?d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),a())}:void 0,children:[t.jsx("span",{className:`
|
|
791
791
|
text-sm
|
|
792
792
|
font-semibold
|
|
793
793
|
text-content-primary
|
|
@@ -795,7 +795,7 @@
|
|
|
795
795
|
text-ellipsis
|
|
796
796
|
overflow-hidden
|
|
797
797
|
whitespace-nowrap
|
|
798
|
-
`,children:
|
|
798
|
+
`,children:e.header}),r&&t.jsxs("span",{className:"shrink-0 text-content-secondary dark:text-content-secondary",children:[n&&s==="asc"&&t.jsx(Vd,{}),n&&s==="desc"&&t.jsx(Pd,{}),!n&&t.jsx("div",{className:"w-4 h-4"})]})]})},Ra=({children:e,align:r="left",width:n,isStriped:s=!1,rowIndex:a=0,isStickyRight:o=!1,className:i="",isSelected:l=!1,isFirst:c=!1,isLast:f=!1})=>{const d={left:"justify-start",center:"justify-center",right:"justify-end"},m=l?"bg-[#f7fcff] dark:bg-primary-custom-900/20":s&&a%2===1?"bg-background-secondary dark:bg-dark-bg-primary/30":"bg-white dark:bg-dark-bg-primary",h=o?"sticky right-0 z-10 shadow-[-2px_0_5px_rgba(0,0,0,0.05)]":"",p=l?`${c?"rounded-l-lg":""} ${f?"rounded-r-lg":""}`:"";return t.jsx("div",{className:`
|
|
799
799
|
flex
|
|
800
800
|
items-center
|
|
801
801
|
${d[r]}
|
|
@@ -804,21 +804,21 @@
|
|
|
804
804
|
min-h-[56px]
|
|
805
805
|
w-full
|
|
806
806
|
${l?"border-b-transparent":"border-b border-border-secondary dark:border-dark-border-primary"}
|
|
807
|
-
${
|
|
807
|
+
${m}
|
|
808
808
|
${h}
|
|
809
809
|
${p}
|
|
810
810
|
${l?"":"group-hover:bg-[#f9fafb] dark:group-hover:bg-white/[0.02]"}
|
|
811
811
|
transition-colors
|
|
812
812
|
duration-150
|
|
813
813
|
${i}
|
|
814
|
-
`,children:
|
|
814
|
+
`,children:t.jsx("div",{className:`
|
|
815
815
|
text-sm
|
|
816
816
|
text-content-primary
|
|
817
817
|
dark:text-dark-content-primary
|
|
818
818
|
flex
|
|
819
819
|
${d[r]}
|
|
820
820
|
w-full
|
|
821
|
-
`,children:
|
|
821
|
+
`,children:e})})},Zd=({currentPage:e,totalPages:r,onPageChange:n,previousLabel:s="Anterior",nextLabel:a="Siguiente"})=>{const i=(()=>{const l=[];if(r<=7)for(let f=1;f<=r;f++)l.push(f);else l.push(1),e<=3?l.push(2,3):e>=r-2?(l.push("..."),l.push(r-2,r-1)):(l.push("..."),l.push(e),l.push("...")),r>1&&l.push(r);return l})();return t.jsxs("div",{className:"flex items-center justify-between w-full h-9",children:[t.jsxs("button",{onClick:()=>e>1&&n(e-1),disabled:e===1,className:`
|
|
822
822
|
flex
|
|
823
823
|
items-center
|
|
824
824
|
gap-3
|
|
@@ -835,7 +835,7 @@
|
|
|
835
835
|
disabled:cursor-not-allowed
|
|
836
836
|
transition-colors
|
|
837
837
|
duration-150
|
|
838
|
-
`,children:[
|
|
838
|
+
`,children:[t.jsx(_d,{}),t.jsx("span",{children:s})]}),t.jsx("div",{className:"flex items-center gap-0",children:i.map((l,c)=>{if(l==="...")return t.jsx("div",{className:`
|
|
839
839
|
flex
|
|
840
840
|
items-center
|
|
841
841
|
justify-center
|
|
@@ -845,7 +845,7 @@
|
|
|
845
845
|
font-semibold
|
|
846
846
|
text-primary-custom-600
|
|
847
847
|
dark:text-primary-custom-600
|
|
848
|
-
`,children:l},`ellipsis-${c}`);const
|
|
848
|
+
`,children:l},`ellipsis-${c}`);const f=l===e;return t.jsx("button",{onClick:()=>n(l),className:`
|
|
849
849
|
flex
|
|
850
850
|
items-center
|
|
851
851
|
justify-center
|
|
@@ -858,8 +858,8 @@
|
|
|
858
858
|
dark:text-primary-custom-600
|
|
859
859
|
transition-colors
|
|
860
860
|
duration-150
|
|
861
|
-
${
|
|
862
|
-
`,children:l},l)})}),
|
|
861
|
+
${f?"bg-blue-100 dark:bg-blue-900/30":"hover:bg-blue-50 dark:hover:bg-blue-900/20"}
|
|
862
|
+
`,children:l},l)})}),t.jsxs("button",{onClick:()=>e<r&&n(e+1),disabled:e===r,className:`
|
|
863
863
|
flex
|
|
864
864
|
items-center
|
|
865
865
|
gap-3
|
|
@@ -876,7 +876,7 @@
|
|
|
876
876
|
disabled:cursor-not-allowed
|
|
877
877
|
transition-colors
|
|
878
878
|
duration-150
|
|
879
|
-
`,children:[
|
|
879
|
+
`,children:[t.jsx("span",{children:a}),t.jsx(Wd,{})]})]})},Bs=({title:e,columns:r,data:n,variant:s="basic",showBorder:a=!0,showShadow:o=!0,showPadding:i=!0,onSort:l,sortColumn:c,sortDirection:f,fullWidth:d=!1,emptyMessage:m="No hay datos disponibles",loading:h=!1,loadingRows:p=5,pagination:g,isRowSelected:x,className:b="",id:y})=>{const[C,w]=u.useState(null),[j,I]=u.useState(null),N=c!==void 0?c:C,E=f!==void 0?f:j,S=B=>{let L="asc";N===B&&(E==="asc"?L="desc":E==="desc"&&(L=null)),l?l(B,L):(w(L?B:null),I(L))},v=(B,L)=>typeof L=="function"?L(B):B[L],Y=[`
|
|
880
880
|
flex
|
|
881
881
|
flex-col
|
|
882
882
|
gap-4
|
|
@@ -885,13 +885,13 @@
|
|
|
885
885
|
rounded-xl
|
|
886
886
|
transition-all
|
|
887
887
|
duration-150
|
|
888
|
-
`,a?"border border-border-primary dark:border-dark-border-primary":"",o?"shadow-base":"",i?"p-8":"p-0",d||s==="fullWidth"?"w-full":"",b].join(" ").replace(/\s+/g," ").trim(),
|
|
888
|
+
`,a?"border border-border-primary dark:border-dark-border-primary":"",o?"shadow-base":"",i?"p-8":"p-0",d||s==="fullWidth"?"w-full":"",b].join(" ").replace(/\s+/g," ").trim(),_=s==="grid"?`
|
|
889
889
|
border
|
|
890
890
|
border-border-primary
|
|
891
891
|
dark:border-dark-border-primary
|
|
892
892
|
rounded-lg
|
|
893
893
|
overflow-hidden
|
|
894
|
-
`:"";return
|
|
894
|
+
`:"";return t.jsxs("div",{className:Y,id:y,children:[e&&t.jsx("div",{className:"flex items-center justify-center w-full",children:t.jsx("h3",{className:`
|
|
895
895
|
text-base
|
|
896
896
|
font-semibold
|
|
897
897
|
text-content-primary
|
|
@@ -899,14 +899,14 @@
|
|
|
899
899
|
text-ellipsis
|
|
900
900
|
overflow-hidden
|
|
901
901
|
whitespace-nowrap
|
|
902
|
-
`,children:
|
|
902
|
+
`,children:e})}),t.jsxs("div",{className:`grid w-full overflow-x-auto ${_}`,style:{gridTemplateColumns:r.map(B=>B.width||"1fr").join(" ")},children:[r.map((B,L)=>{const Z=typeof B.accessor=="function"?`column_${L}`:String(B.accessor);return t.jsx(Hd,{column:B,sortable:B.sortable||!1,sorted:N===Z,sortDirection:N===Z?E:null,onSort:()=>S(Z)},`header-${Z}`)}),h&&t.jsx(t.Fragment,{children:Array.from({length:p}).map((B,L)=>r.map((Z,D)=>{const q=typeof Z.accessor=="function"?`column_${D}`:String(Z.accessor);return t.jsx(Ra,{align:Z.align,isStriped:s==="striped",rowIndex:L,children:t.jsx("div",{className:`
|
|
903
903
|
h-4
|
|
904
904
|
w-full
|
|
905
905
|
bg-background-secondary
|
|
906
906
|
dark:bg-dark-border-primary
|
|
907
907
|
rounded
|
|
908
908
|
animate-pulse
|
|
909
|
-
`})},`loading-${
|
|
909
|
+
`})},`loading-${L}-${q}`)}))}),!h&&n.length>0&&t.jsx(t.Fragment,{children:n.map((B,L)=>{const Z=x?.(B,L);return t.jsx("div",{className:"contents group",children:r.map((D,q)=>{const P=typeof D.accessor=="function"?`column_${q}`:String(D.accessor),H=v(B,D.accessor),ae=D.render?D.render(H,B,L):H;return t.jsx(Ra,{align:D.align,isStriped:s==="striped",rowIndex:L,isStickyRight:D.stickyRight,isSelected:Z,isFirst:q===0,isLast:q===r.length-1,children:ae},`cell-${L}-${P}`)})},`row-${L}`)})}),!h&&n.length===0&&t.jsx("div",{className:`
|
|
910
910
|
flex
|
|
911
911
|
items-center
|
|
912
912
|
justify-center
|
|
@@ -915,7 +915,7 @@
|
|
|
915
915
|
text-sm
|
|
916
916
|
text-content-secondary
|
|
917
917
|
dark:text-content-secondary
|
|
918
|
-
`,style:{gridColumn:`1 / ${r.length+1}`},children:
|
|
918
|
+
`,style:{gridColumn:`1 / ${r.length+1}`},children:m})]}),g&&t.jsx("div",{className:i?"":"p-4 border-t border-border-secondary dark:border-dark-border-primary",children:t.jsx(Zd,{currentPage:g.currentPage,totalPages:g.totalPages,onPageChange:g.onPageChange,previousLabel:g.previousLabel,nextLabel:g.nextLabel})})]})},Gd=({className:e="size-5"})=>t.jsx(Y0,{className:e,"aria-hidden":"true"}),Ud=({className:e="size-5"})=>t.jsx(Qo,{className:e,"aria-hidden":"true"}),ni=({isOpen:e,onClose:r,matches:n,fieldName:s,onView:a,onContinue:o,title:i,className:l=""})=>e?t.jsx("div",{className:`fixed inset-0 z-[80] flex items-center justify-center bg-black/50 p-4 animate-in fade-in duration-200 ${l}`,children:t.jsxs("div",{className:"bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl shadow-2xl flex flex-col w-full max-w-2xl overflow-hidden relative",children:[t.jsxs("div",{className:"p-[20px] flex gap-5 items-center",children:[t.jsx("div",{className:"bg-[#fcedc9] dark:bg-amber-900/20 flex items-center justify-center rounded-full shrink-0 size-[40px]",children:t.jsx(Ud,{className:"size-[24px] text-amber-600 dark:text-amber-400"})}),t.jsx("div",{className:"flex flex-col justify-center pr-8",children:t.jsx("h3",{className:"text-[20px] font-bold leading-[28px] tracking-tight text-content-primary dark:text-dark-content-primary",children:i||`Hemos detectado algunas coincidencias en el ${s.toLowerCase()}`})})]}),t.jsx("div",{className:"px-[20px] pb-[20px] flex flex-col gap-[20px] overflow-y-auto max-h-[385px] scrollbar-thin scrollbar-thumb-border-primary dark:scrollbar-thumb-dark-border-primary",children:t.jsx("div",{className:"flex flex-col items-start w-full",children:n.map(c=>t.jsxs("div",{className:"border border-border-primary dark:border-dark-border-primary h-[64px] px-[8px] flex items-center justify-between rounded-[8px] w-full mb-3 last:mb-0 transition-colors hover:bg-background-secondary dark:hover:bg-dark-bg-inverse/5",children:[t.jsxs("div",{className:"flex items-center gap-[8px]",children:[t.jsx("div",{className:"bg-[#dbeefe] dark:bg-primary-custom-900/20 flex items-center justify-center rounded-[16px] shrink-0 size-[32px]",children:t.jsx(Gd,{className:"size-[18px] text-primary-custom-600 dark:text-primary-custom-400"})}),t.jsx("div",{className:"flex flex-col",children:t.jsx("span",{className:"text-[16px] font-medium leading-[24px] text-content-primary dark:text-dark-content-primary truncate max-w-[300px]",children:c.name})})]}),t.jsx(Q,{type:"outline",size:"xs",onClick:()=>a(c),className:"w-[85.5px] h-[32px] !text-[12px] !font-medium",children:"Ver"})]},c.id))})}),t.jsx("div",{className:"px-[24px] py-[16px] pb-[24px] flex items-center justify-end gap-[12px] shrink-0 w-full border-t border-border-secondary dark:border-dark-border-primary bg-background-secondary/30 dark:bg-dark-bg-inverse/5",children:t.jsx(Q,{type:"default",size:"l",onClick:o,children:"Continuar creando"})})]})}):null,si=({label:e,active:r=!1,icon:n,badge:s,disabled:a=!1,onClick:o,className:i="",ariaLabel:l})=>{const c=`
|
|
919
919
|
relative
|
|
920
920
|
flex
|
|
921
921
|
flex-col
|
|
@@ -927,7 +927,7 @@
|
|
|
927
927
|
p-0
|
|
928
928
|
border-0
|
|
929
929
|
bg-transparent
|
|
930
|
-
`,d=a?"opacity-50 cursor-not-allowed pointer-events-none":"",
|
|
930
|
+
`,d=a?"opacity-50 cursor-not-allowed pointer-events-none":"",m=`
|
|
931
931
|
flex
|
|
932
932
|
items-center
|
|
933
933
|
justify-center
|
|
@@ -971,13 +971,13 @@
|
|
|
971
971
|
bg-primary-custom-600
|
|
972
972
|
dark:bg-primary-custom-600
|
|
973
973
|
z-10
|
|
974
|
-
`:"hidden",y=[c,"",d,"group",i].join(" ").replace(/\s+/g," ").trim(),
|
|
974
|
+
`:"hidden",y=[c,"",d,"group",i].join(" ").replace(/\s+/g," ").trim(),C=[m,h].join(" ").replace(/\s+/g," ").trim();return t.jsxs("button",{type:"button",role:"tab","aria-selected":r,"aria-disabled":a,"aria-label":l||e,tabIndex:a?-1:0,className:y,onClick:a?void 0:o,disabled:a,children:[t.jsxs("div",{className:C,children:[n&&t.jsx("span",{className:`${g} ${p}`.trim(),children:n}),t.jsx("span",{className:`
|
|
975
975
|
text-sm
|
|
976
976
|
font-bold
|
|
977
977
|
leading-5
|
|
978
978
|
whitespace-nowrap
|
|
979
979
|
${p}
|
|
980
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
980
|
+
`.replace(/\s+/g," ").trim(),children:e}),s!==void 0&&s>0&&t.jsx("span",{className:`
|
|
981
981
|
flex
|
|
982
982
|
items-center
|
|
983
983
|
justify-center
|
|
@@ -991,14 +991,14 @@
|
|
|
991
991
|
text-primary-inverse-content
|
|
992
992
|
dark:text-dark-bg-primary
|
|
993
993
|
${x}
|
|
994
|
-
`.replace(/\s+/g," ").trim(),"aria-label":`${s} notificaciones`,children:s>99?"99+":s})]}),
|
|
994
|
+
`.replace(/\s+/g," ").trim(),"aria-label":`${s} notificaciones`,children:s>99?"99+":s})]}),t.jsx("div",{className:b})]})},qd=({items:e,activeId:r,defaultActiveId:n,onChange:s,className:a="",fullWidth:o=!1,size:i="base",showBorder:l=!0})=>{const[c,f]=u.useState(n||(e.length>0?e[0].id:"")),d=r!==void 0,m=d?r:c,h=y=>{d||f(y),s?.(y)},g=`
|
|
995
995
|
flex
|
|
996
996
|
items-end
|
|
997
997
|
pb-2.5
|
|
998
998
|
${{sm:"gap-0",base:"gap-1",lg:"gap-2"}[i]}
|
|
999
999
|
${o?"w-full":""}
|
|
1000
1000
|
${l?"border-b border-border-primary dark:border-dark-border-primary":""}
|
|
1001
|
-
`,x=o?"flex-1":"",b=[g,a].join(" ").replace(/\s+/g," ").trim();return
|
|
1001
|
+
`,x=o?"flex-1":"",b=[g,a].join(" ").replace(/\s+/g," ").trim();return t.jsx("div",{role:"tablist","aria-label":"Pestañas de navegación",className:b,children:e.map(y=>t.jsx(si,{label:y.label,active:m===y.id,icon:y.icon,badge:y.badge,disabled:y.disabled,onClick:()=>h(y.id),className:x},y.id))})},Kd=({className:e="size-4"})=>t.jsx(wd,{className:e,"aria-hidden":"true"}),Ea=({className:e="size-4"})=>t.jsx($0,{className:e,"aria-hidden":"true"}),Ma=({className:e="size-4"})=>t.jsx(Jo,{className:e,"aria-hidden":"true"}),Ia=({className:e="size-5"})=>t.jsx(Yo,{className:e,"aria-hidden":"true"}),gn=({className:e="size-4"})=>t.jsx(rd,{className:e,"aria-hidden":"true"}),Xd=({className:e="size-4"})=>t.jsx(j0,{className:e,"aria-hidden":"true"}),Yd=({className:e="size-6"})=>t.jsx(ei,{className:e,"aria-hidden":"true"}),an=({logo:e,darkLogo:r,productName:n="Nombre Producto",environmentBadge:s,userDropdown:a,actions:o,notifications:i,className:l="",variant:c="responsive",hideActionButtons:f=!1,showNavigationButton:d=!1,navigationButtonProps:m={},leadingAction:h,siesaLogo:p,showBusinessLogo:g=!1,showSiesaLogoLeading:x=!0,showSiesaLogoTrailing:b=!1,isAppShell:y=!1,microfrontends:C,onMicrofrontendClick:w,activeMicrofrontendName:j,onNavigationClick:I,onSearchClick:N,onCartClick:E,onNotificationsClick:S})=>{const[v,R]=u.useState(j);u.useEffect(()=>{j!==void 0&&R(j)},[j]);const T=`
|
|
1002
1002
|
box-border
|
|
1003
1003
|
flex
|
|
1004
1004
|
flex-col
|
|
@@ -1022,11 +1022,11 @@
|
|
|
1022
1022
|
dark:focus:ring-offset-dark-bg-primary
|
|
1023
1023
|
transition-all
|
|
1024
1024
|
duration-150
|
|
1025
|
-
`,A=c==="mobile",
|
|
1026
|
-
${
|
|
1027
|
-
${
|
|
1025
|
+
`,A=c==="mobile",V=c==="desktop",F=c==="tablet",Y=c==="responsive",_=()=>{if(!y||!C||C.length===0)return null;const M=C.map(O=>({children:O.name,icon:O.icon,onClick:()=>{R(O.name),w?w(O):window.location.href=O.baseUrl}})),G=O=>t.jsx("button",{className:`
|
|
1026
|
+
${T}
|
|
1027
|
+
${O?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1028
1028
|
flex items-center justify-center
|
|
1029
|
-
`.trim(),"aria-label":"Menú de Aplicaciones",children:
|
|
1029
|
+
`.trim(),"aria-label":"Menú de Aplicaciones",children:t.jsx(Yd,{})});return t.jsx("div",{className:"flex items-center justify-center shrink-0 mr-2",children:t.jsx(it,{items:M,renderTrigger:G})})},B=()=>{if(A||!d)return null;const M={type:"default",size:"base",iconOnly:!0,leftIcon:t.jsx(Xd,{}),ariaLabel:"Volver",onClick:I,...m};return V||F?t.jsx(Q,{...M}):t.jsx("div",{className:"hidden md:block",children:t.jsx(Q,{...M})})},L=()=>{if(A||!g)return null;const M=t.jsx("img",{src:"/Business Logo.png",alt:"Business Logo",className:"w-full h-full object-contain"});return V?t.jsx("div",{className:"overflow-hidden relative shrink-0 w-[168px] h-[30px]",children:M}):F?t.jsx("div",{className:"overflow-hidden relative shrink-0 w-[140px] h-[25px]",children:M}):t.jsx("div",{className:"hidden md:block overflow-hidden relative shrink-0 w-[140px] lg:w-[168px] h-[25px] lg:h-[30px]",children:M})},Z=()=>{const M=t.jsx("img",{src:"/Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"}),G=t.jsx("img",{src:"/siesa_logo_mobile.png",alt:"Siesa",className:"w-full h-full object-contain"});return A?t.jsx("div",{className:"overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:G}):x?V?t.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:M}):F?t.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:M}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"md:hidden overflow-hidden relative shrink-0 w-[30px] h-[30px]",children:G}),x&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:M}),t.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:M})]})]}):null},D=()=>{if(!b||A)return null;const M=t.jsx("img",{src:"/Siesa Logo.png",alt:"Siesa",className:"w-full h-full object-contain"});return V?t.jsx("div",{className:"overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:M}):F?t.jsx("div",{className:"overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:M}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"hidden md:block lg:hidden overflow-hidden relative shrink-0 w-[100px] h-[25px]",children:M}),t.jsx("div",{className:"hidden lg:block overflow-hidden relative shrink-0 w-[120px] h-[30px]",children:M})]})},q=({responsive:M=!0})=>{const G=t.jsx("div",{className:"grow shrink-0 w-px min-h-px bg-border-primary dark:bg-dark-border-primary"});return A?null:V||F?t.jsx("div",{className:"flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:G}):M?t.jsx("div",{className:"hidden md:flex flex-col gap-2 h-8 items-start px-0 py-1 relative shrink-0",children:G}):null},P=()=>{if(A||!n)return null;const M=t.jsx("span",{className:"font-bold leading-7 text-xl text-content-primary dark:text-dark-content-primary tracking-[-0.5px] whitespace-nowrap",children:n}),G=y&&v?t.jsxs("div",{className:"flex items-center gap-2",children:[M,t.jsx("span",{className:"text-content-secondary dark:text-content-secondary",children:"/"}),t.jsx("span",{className:"font-normal leading-7 text-xl text-content-primary dark:text-dark-content-primary tracking-[-0.5px] whitespace-nowrap",children:v})]}):M;return V||F?t.jsx("div",{className:"flex items-center",children:G}):t.jsx("div",{className:"hidden md:flex items-center",children:G})},H=()=>s?A?t.jsx(ut,{color:"yellow",leftIcon:t.jsx(gn,{}),label:"Pruebas"}):V||F?t.jsx(ut,{color:"yellow",leftIcon:t.jsx(gn,{}),label:s}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"md:hidden",children:t.jsx(ut,{color:"yellow",leftIcon:t.jsx(gn,{}),label:"Pruebas"})}),t.jsx("div",{className:"hidden md:block",children:t.jsx(ut,{color:"yellow",leftIcon:t.jsx(gn,{}),label:s})})]}):null,ae=()=>f?null:A?t.jsx("button",{className:T,"aria-label":"Buscar",onClick:N,children:t.jsx(Ma,{})}):Y?t.jsx("button",{className:`md:hidden ${T}`,"aria-label":"Buscar",onClick:N,children:t.jsx(Ma,{})}):null,ie=()=>f?null:t.jsxs("div",{className:"relative",children:[t.jsx("button",{className:T,"aria-label":"Carrito de compras",onClick:E,children:t.jsx(Kd,{})}),i?.cart!==void 0&&i.cart>0&&t.jsx("div",{className:"absolute bg-error-content dark:bg-error-content flex flex-col gap-2.5 h-4 items-center justify-center left-[calc(50%+8px)] px-1 py-0 rounded-full top-[calc(50%-8px)] -translate-x-1/2 -translate-y-1/2 pointer-events-none min-w-[16px]",children:t.jsx("p",{className:"font-bold leading-3 text-[10px] text-white text-center whitespace-nowrap",children:i.cart>99?"+99":i.cart})})]}),ce=()=>f?null:t.jsxs("div",{className:"relative",children:[t.jsx("button",{className:T,"aria-label":"Notificaciones",onClick:S,children:t.jsx(Ea,{})}),i?.bell&&t.jsx("div",{className:"absolute w-2 h-2 bg-error-content dark:bg-error-content rounded-full left-[calc(50%+4px)] top-[calc(50%-8px)] -translate-x-1/2 pointer-events-none"})]}),oe=()=>{if(!a)return null;const M=a.menuItems||[{children:"Cuenta",icon:t.jsx(Sd,{className:"size-4"}),onClick:a.onAccountClick},{children:"Notificaciones",icon:t.jsx(Ea,{className:"size-4"}),onClick:a.onNotificationsClick},{children:"Facturación",icon:t.jsx(J0,{className:"size-4"}),onClick:a.onBillingClick},{isDivider:!0},{children:"Modo oscuro",icon:t.jsx(pd,{className:"size-4"}),onClick:a.onDarkModeClick},{isDivider:!0},{children:"Cerrar sesión",icon:t.jsx(R0,{className:"size-4"}),onClick:a.onSignOutClick}];if(A)return t.jsx(it,{items:M,renderTrigger:O=>t.jsx("button",{className:`
|
|
1030
1030
|
box-border
|
|
1031
1031
|
flex
|
|
1032
1032
|
items-center
|
|
@@ -1046,8 +1046,8 @@
|
|
|
1046
1046
|
rounded-lg
|
|
1047
1047
|
transition-all
|
|
1048
1048
|
duration-150
|
|
1049
|
-
${
|
|
1050
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:
|
|
1049
|
+
${O?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1050
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:t.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:t.jsx("img",{alt:a.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:a.avatar})})})});const G=()=>t.jsx(it,{items:M,renderTrigger:O=>t.jsx("button",{className:`
|
|
1051
1051
|
box-border
|
|
1052
1052
|
flex
|
|
1053
1053
|
items-center
|
|
@@ -1067,8 +1067,8 @@
|
|
|
1067
1067
|
rounded-lg
|
|
1068
1068
|
transition-all
|
|
1069
1069
|
duration-150
|
|
1070
|
-
${
|
|
1071
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:
|
|
1070
|
+
${O?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1071
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:t.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[t.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[t.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:t.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:t.jsx("img",{alt:a.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:a.avatar})})}),t.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[t.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal text-start",children:a.name}),(a.email||a.role)&&t.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis text-start",children:a.email||a.role})]})]}),t.jsx(Ia,{className:"size-5 text-content-secondary dark:text-content-secondary"})]})})});return V||F?G():t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"md:hidden",children:t.jsx(it,{items:M,renderTrigger:O=>t.jsx("button",{className:`
|
|
1072
1072
|
box-border
|
|
1073
1073
|
flex
|
|
1074
1074
|
items-center
|
|
@@ -1088,8 +1088,8 @@
|
|
|
1088
1088
|
rounded-lg
|
|
1089
1089
|
transition-all
|
|
1090
1090
|
duration-150
|
|
1091
|
-
${
|
|
1092
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:
|
|
1091
|
+
${O?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1092
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:t.jsx("div",{className:"relative rounded-full shrink-0 w-8 h-8",children:t.jsx("img",{alt:a.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-full w-full h-full",src:a.avatar})})})})}),t.jsx("div",{className:"hidden md:flex",children:t.jsx(it,{items:M,renderTrigger:O=>t.jsx("button",{className:`
|
|
1093
1093
|
box-border
|
|
1094
1094
|
flex
|
|
1095
1095
|
items-center
|
|
@@ -1109,8 +1109,8 @@
|
|
|
1109
1109
|
rounded-lg
|
|
1110
1110
|
transition-all
|
|
1111
1111
|
duration-150
|
|
1112
|
-
${
|
|
1113
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:
|
|
1112
|
+
${O?"bg-background-secondary dark:bg-dark-bg-secondary":""}
|
|
1113
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Menú de usuario",children:t.jsxs("div",{className:"box-border flex gap-3 items-center justify-center overflow-hidden px-3 py-2 relative rounded-lg shrink-0",children:[t.jsxs("div",{className:"flex gap-3 items-center justify-center relative shrink-0",children:[t.jsx("div",{className:"flex items-center justify-center relative shrink-0",children:t.jsx("div",{className:"relative rounded-md shrink-0 w-10 h-10",children:t.jsx("img",{alt:a.name,className:"absolute inset-0 max-w-none object-center object-cover pointer-events-none rounded-md w-full h-full",src:a.avatar})})}),t.jsxs("div",{className:"flex flex-col gap-0.5 items-start justify-center relative shrink-0 w-[123px]",children:[t.jsx("p",{className:"leading-5 relative shrink-0 text-sm text-content-primary dark:text-dark-content-primary whitespace-nowrap font-normal",children:a.name}),(a.email||a.role)&&t.jsx("p",{className:"leading-4 min-w-full relative shrink-0 text-xs text-content-secondary dark:text-content-secondary w-min whitespace-nowrap overflow-hidden text-ellipsis",children:a.email||a.role})]})]}),t.jsx("div",{className:"overflow-hidden relative shrink-0 w-5 h-5 text-content-secondary dark:text-content-secondary",children:t.jsx(Ia,{})})]})})})})]})},te=[`
|
|
1114
1114
|
box-border
|
|
1115
1115
|
flex
|
|
1116
1116
|
gap-8
|
|
@@ -1121,7 +1121,7 @@
|
|
|
1121
1121
|
w-full
|
|
1122
1122
|
bg-background-primary
|
|
1123
1123
|
dark:bg-dark-bg-primary
|
|
1124
|
-
`,{responsive:"h-[40px] md:h-16",desktop:"h-16",tablet:"h-16",mobile:"h-[40px]"}[c],l].join(" ").replace(/\s+/g," ").trim(),
|
|
1124
|
+
`,{responsive:"h-[40px] md:h-16",desktop:"h-16",tablet:"h-16",mobile:"h-[40px]"}[c],l].join(" ").replace(/\s+/g," ").trim(),ve=()=>e&&r?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"block dark:hidden w-full h-full",children:e}),t.jsx("div",{className:"hidden dark:block w-full h-full",children:r})]}):e||t.jsx(L,{});return t.jsxs("nav",{className:te,children:[t.jsxs("div",{className:"flex gap-4 items-center relative shrink-0",children:[t.jsx(_,{}),!A&&(h||d&&t.jsx(B,{})),ve(),g&&x&&!A&&t.jsx(q,{}),p||t.jsx(Z,{}),n&&x&&!A&&t.jsx(q,{}),t.jsx(P,{})]}),t.jsxs("div",{className:"flex gap-4 items-center justify-end grow min-h-px min-w-px relative shrink-0",children:[t.jsx(H,{}),t.jsx(ae,{}),t.jsx(ie,{}),t.jsx(ce,{}),a&&!f&&t.jsx(q,{}),t.jsx(oe,{}),b&&a&&!A&&t.jsx(q,{}),t.jsx(D,{}),o&&t.jsx("div",{className:"flex gap-2 items-center",children:o})]})]})},Qd=({items:e,activeItemId:r,onItemClick:n,className:s="",ariaLabel:a="Navegación Principal"})=>{e.length>5&&console.warn("NavigationBar: Se recomienda un máximo de 5 ítems para mejor UX");const o=d=>{d.disabled||(d.onClick&&d.onClick(d.id),n&&n(d.id))},i=d=>{const m=d.active||d.id===r,h=`
|
|
1125
1125
|
flex-1
|
|
1126
1126
|
flex
|
|
1127
1127
|
flex-col
|
|
@@ -1144,7 +1144,7 @@
|
|
|
1144
1144
|
overflow-hidden
|
|
1145
1145
|
transition-all
|
|
1146
1146
|
duration-150
|
|
1147
|
-
${
|
|
1147
|
+
${m?"bg-primary-custom-100 dark:bg-primary-custom-100":"bg-transparent hover:bg-hover-overlay dark:hover:bg-hover-overlay-dark"}
|
|
1148
1148
|
`.replace(/\s+/g," ").trim(),g=`
|
|
1149
1149
|
font-['Inter:Bold',sans-serif]
|
|
1150
1150
|
text-[10px]
|
|
@@ -1165,7 +1165,7 @@
|
|
|
1165
1165
|
dark:text-dark-content-primary
|
|
1166
1166
|
transition-colors
|
|
1167
1167
|
duration-150
|
|
1168
|
-
`.replace(/\s+/g," ").trim();return
|
|
1168
|
+
`.replace(/\s+/g," ").trim();return t.jsxs("button",{type:"button",className:h,onClick:()=>o(d),disabled:d.disabled,"aria-label":d.ariaLabel||d.label,"aria-current":m?"page":void 0,children:[t.jsx("div",{className:p,children:t.jsx("span",{className:x,children:d.icon})}),t.jsx("span",{className:g,children:d.label})]},d.id)},l=`
|
|
1169
1169
|
bg-bg-primary
|
|
1170
1170
|
dark:bg-dark-bg-primary
|
|
1171
1171
|
p-4
|
|
@@ -1177,26 +1177,26 @@
|
|
|
1177
1177
|
items-start
|
|
1178
1178
|
justify-center
|
|
1179
1179
|
w-full
|
|
1180
|
-
`.replace(/\s+/g," ").trim(),
|
|
1180
|
+
`.replace(/\s+/g," ").trim(),f=`
|
|
1181
1181
|
flex-1
|
|
1182
1182
|
flex
|
|
1183
1183
|
items-start
|
|
1184
1184
|
gap-2
|
|
1185
1185
|
min-h-0
|
|
1186
1186
|
min-w-0
|
|
1187
|
-
`.replace(/\s+/g," ").trim();return
|
|
1187
|
+
`.replace(/\s+/g," ").trim();return t.jsx("nav",{className:`${l} ${s}`.trim(),role:"navigation","aria-label":a,children:t.jsx("div",{className:c,children:t.jsx("div",{className:f,children:e.map(d=>i(d))})})})},Jd=({lightColor:e,darkColor:r,className:n=""})=>t.jsxs("svg",{className:`w-4 h-4 shrink-0 ${n}`.trim(),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16","aria-hidden":"true",children:[t.jsx("circle",{cx:"8",cy:"8",r:"8",fill:e,className:"dark:hidden"}),t.jsx("circle",{cx:"8",cy:"8",r:"8",fill:r,className:"hidden dark:block"})]}),Wr=({status:e="available",className:r=""})=>{const s={available:{lightColor:"#0e79fd",darkColor:"#93d1fd",label:"Disponible"},occupied:{lightColor:"#af460e",darkColor:"#f5a927",label:"Ocupada"},reserved:{lightColor:"#7e22ce",darkColor:"#c084fc",label:"Reservada"},outOfService:{lightColor:"#3f3f46",darkColor:"#a1a1aa",label:"Fuera de Servicio"}}[e],o=[`
|
|
1188
1188
|
inline-flex
|
|
1189
1189
|
items-center
|
|
1190
1190
|
gap-1
|
|
1191
1191
|
shrink-0
|
|
1192
|
-
`,r].join(" ").replace(/\s+/g," ").trim();return
|
|
1192
|
+
`,r].join(" ").replace(/\s+/g," ").trim();return t.jsxs("div",{className:o,role:"presentation","aria-label":`Estado: ${s.label}`,children:[t.jsx(Jd,{lightColor:s.lightColor,darkColor:s.darkColor}),t.jsx("span",{className:`
|
|
1193
1193
|
text-xs
|
|
1194
1194
|
leading-4
|
|
1195
1195
|
font-normal
|
|
1196
1196
|
text-content-primary
|
|
1197
1197
|
dark:text-dark-content-primary
|
|
1198
1198
|
whitespace-nowrap
|
|
1199
|
-
`.replace(/\s+/g," ").trim(),children:s.label})]})},
|
|
1199
|
+
`.replace(/\s+/g," ").trim(),children:s.label})]})},eu=({className:e=""})=>t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:t.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),tu=({className:e=""})=>t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:t.jsx("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),ru=({className:e=""})=>t.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:t.jsx("path",{d:"M10.5 5H1.5M8.5 1V3M3.5 1V3M3.25 11H8.75C9.57843 11 10.25 10.3284 10.25 9.5V3.5C10.25 2.67157 9.57843 2 8.75 2H3.25C2.42157 2 1.75 2.67157 1.75 3.5V9.5C1.75 10.3284 2.42157 11 3.25 11Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),nu=({className:e=""})=>t.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[t.jsx("path",{d:"M10.5 6C10.5 8.48528 8.48528 10.5 6 10.5C3.51472 10.5 1.5 8.48528 1.5 6C1.5 3.51472 3.51472 1.5 6 1.5C8.48528 1.5 10.5 3.51472 10.5 6Z",stroke:"currentColor",strokeWidth:"1.5"}),t.jsx("path",{d:"M9.18198 2.81802L2.81802 9.18198",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),su=({className:e=""})=>t.jsx("svg",{width:"13",height:"10",viewBox:"0 0 13 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:t.jsx("path",{d:"M9.25 9V8C9.25 6.89543 8.35457 6 7.25 6H2.75C1.64543 6 0.75 6.89543 0.75 8V9M12.25 9V8C12.25 6.89543 11.3546 6 10.25 6H9.75M7 2.5C7 3.60457 6.10457 4.5 5 4.5C3.89543 4.5 3 3.60457 3 2.5C3 1.39543 3.89543 0.5 5 0.5C6.10457 0.5 7 1.39543 7 2.5ZM10 2C10 2.82843 9.32843 3.5 8.5 3.5C7.67157 3.5 7 2.82843 7 2C7 1.17157 7.67157 0.5 8.5 0.5C9.32843 0.5 10 1.17157 10 2Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})}),ai=({locationName:e,status:r="available",state:n="enabled",capacity:s,onClick:a,disabled:o=!1,className:i="",ariaLabel:l,fullWidth:c=!0})=>{const d={available:{textColor:"text-primary-custom-600 dark:text-primary-custom-600",badgeBg:"bg-primary-custom-100 dark:bg-blue-900/30",badgeText:"text-primary-custom-600 dark:text-blue-400",activedBg:"bg-primary-custom-100 dark:bg-blue-900/30",icon:eu,badgeLabel:"Disponible"},occupied:{textColor:"text-[#af460e] dark:text-orange-400",badgeBg:"bg-[#fcedc9] dark:bg-yellow-900/30",badgeText:"text-[#af460e] dark:text-orange-400",activedBg:"bg-[#fcedc9] dark:bg-yellow-900/30",icon:tu,badgeLabel:"Ocupada"},reserved:{textColor:"text-[#7e22ce] dark:text-fuchsia-400",badgeBg:"bg-[#f3e8ff] dark:bg-purple-900/30",badgeText:"text-[#7e22ce] dark:text-purple-400",activedBg:"bg-[#f3e8ff] dark:bg-purple-900/30",icon:ru,badgeLabel:"Reservada"},outOfService:{textColor:"text-[#3f3f46] dark:text-zinc-400",badgeBg:"bg-[#f4f4f5] dark:bg-zinc-800/30",badgeText:"text-content-tertiary dark:text-zinc-400",activedBg:"bg-[#f4f4f5] dark:bg-zinc-800/30",icon:nu,badgeLabel:"F. de Servicio"}}[r],m=d.icon,h=n==="actived"?d.activedBg:"bg-white dark:bg-dark-bg-primary",x=[`
|
|
1200
1200
|
flex
|
|
1201
1201
|
flex-col
|
|
1202
1202
|
items-stretch
|
|
@@ -1219,16 +1219,16 @@
|
|
|
1219
1219
|
disabled:opacity-50
|
|
1220
1220
|
disabled:cursor-not-allowed
|
|
1221
1221
|
disabled:pointer-events-none
|
|
1222
|
-
`,h,i].join(" ").replace(/\s+/g," ").trim(),b=s?`${s.current}/${s.total} mesas`:null;return
|
|
1222
|
+
`,h,i].join(" ").replace(/\s+/g," ").trim(),b=s?`${s.current}/${s.total} mesas`:null;return t.jsxs("button",{className:x,onClick:a,disabled:o,"aria-label":l||`${e} - ${d.badgeLabel}`,type:"button",children:[t.jsx("div",{className:`
|
|
1223
1223
|
text-base
|
|
1224
1224
|
font-bold
|
|
1225
1225
|
leading-6
|
|
1226
1226
|
${d.textColor}
|
|
1227
|
-
`.replace(/\s+/g," ").trim(),children:
|
|
1227
|
+
`.replace(/\s+/g," ").trim(),children:e}),t.jsxs("div",{className:"flex items-center justify-between",children:[b&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(su,{className:d.textColor}),t.jsx("span",{className:`
|
|
1228
1228
|
text-[10px]
|
|
1229
1229
|
leading-[12px]
|
|
1230
1230
|
${d.textColor}
|
|
1231
|
-
`.replace(/\s+/g," ").trim(),children:b})]}),
|
|
1231
|
+
`.replace(/\s+/g," ").trim(),children:b})]}),t.jsxs("div",{className:`
|
|
1232
1232
|
inline-flex
|
|
1233
1233
|
items-center
|
|
1234
1234
|
gap-1
|
|
@@ -1236,11 +1236,11 @@
|
|
|
1236
1236
|
py-1
|
|
1237
1237
|
rounded-md
|
|
1238
1238
|
${d.badgeBg}
|
|
1239
|
-
`.replace(/\s+/g," ").trim(),children:[
|
|
1239
|
+
`.replace(/\s+/g," ").trim(),children:[t.jsx(m,{className:d.badgeText}),t.jsx("span",{className:`
|
|
1240
1240
|
text-xs
|
|
1241
1241
|
leading-4
|
|
1242
1242
|
${d.badgeText}
|
|
1243
|
-
`.replace(/\s+/g," ").trim(),children:d.badgeLabel})]})]})]})},
|
|
1243
|
+
`.replace(/\s+/g," ").trim(),children:d.badgeLabel})]})]})]})},oi=({size:e="l",border:r=!1,children:n,disabled:s=!1,className:a="",onClick:o,ariaLabel:i,htmlType:l="button",...c})=>{const f={s:"w-10 h-10",m:"w-[65px] h-[65px]",l:"w-20 h-20"},d={s:"text-2xl",m:"text-5xl",l:"text-5xl"},g=[`
|
|
1244
1244
|
inline-flex
|
|
1245
1245
|
items-center
|
|
1246
1246
|
justify-center
|
|
@@ -1260,7 +1260,7 @@
|
|
|
1260
1260
|
disabled:pointer-events-none
|
|
1261
1261
|
transition-all
|
|
1262
1262
|
duration-150
|
|
1263
|
-
`,
|
|
1263
|
+
`,f[e],d[e],r?`
|
|
1264
1264
|
bg-white
|
|
1265
1265
|
text-content-primary
|
|
1266
1266
|
border
|
|
@@ -1297,7 +1297,7 @@
|
|
|
1297
1297
|
dark:active:bg-dark-bg-inverse
|
|
1298
1298
|
dark:active:text-dark-content-inverse
|
|
1299
1299
|
dark:active:scale-95
|
|
1300
|
-
`,a].join(" ").replace(/\s+/g," ").trim();return
|
|
1300
|
+
`,a].join(" ").replace(/\s+/g," ").trim();return t.jsx("button",{type:l,className:g,disabled:s,onClick:o,"aria-label":i||`Número ${n}`,...c,children:n})},ii=({image:e,label:r,active:n=!1,disabled:s=!1,onClick:a,className:o="",ariaLabel:i})=>{const f=[`
|
|
1301
1301
|
flex
|
|
1302
1302
|
flex-col
|
|
1303
1303
|
gap-2
|
|
@@ -1341,7 +1341,7 @@
|
|
|
1341
1341
|
dark:text-dark-content-primary
|
|
1342
1342
|
dark:hover:bg-dark-bg-primary/80
|
|
1343
1343
|
dark:active:scale-95
|
|
1344
|
-
`,o].join(" ").replace(/\s+/g," ").trim();return
|
|
1344
|
+
`,o].join(" ").replace(/\s+/g," ").trim();return t.jsxs("button",{type:"button",className:f,disabled:s,onClick:a,"aria-label":i||r,"aria-pressed":n,children:[t.jsx("div",{className:"aspect-158/80 w-full rounded-lg overflow-hidden",children:t.jsx("img",{src:e,alt:r,className:"w-full h-full object-cover"})}),t.jsx("div",{className:"w-full text-left leading-5",children:r})]})},au=({className:e=""})=>t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-hidden":"true",children:t.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),li=({image:e,productName:r,price:n,buttonText:s="Agregar",active:a=!1,disabled:o=!1,onAddClick:i,onCardClick:l,className:c="",ariaLabel:f})=>{const d=`
|
|
1345
1345
|
flex
|
|
1346
1346
|
flex-col
|
|
1347
1347
|
gap-2
|
|
@@ -1356,7 +1356,7 @@
|
|
|
1356
1356
|
focus:ring-offset-2
|
|
1357
1357
|
dark:focus:ring-dark-border-custom
|
|
1358
1358
|
dark:focus:ring-offset-dark-bg-primary
|
|
1359
|
-
`,
|
|
1359
|
+
`,m=o?`
|
|
1360
1360
|
bg-white
|
|
1361
1361
|
opacity-55
|
|
1362
1362
|
cursor-not-allowed
|
|
@@ -1378,14 +1378,14 @@
|
|
|
1378
1378
|
`:`
|
|
1379
1379
|
text-content-primary
|
|
1380
1380
|
dark:text-dark-content-primary
|
|
1381
|
-
`,p=[d,
|
|
1381
|
+
`,p=[d,m,c].join(" ").replace(/\s+/g," ").trim(),g=b=>{o||b.target.closest("button")||l?.(b)},x=b=>{b.stopPropagation(),!o&&i?.(b)};return t.jsxs("div",{className:p,onClick:g,role:"article","aria-label":f||`${r} - ${n}`,tabIndex:o?-1:0,children:[t.jsxs("div",{className:"flex flex-col gap-3 w-full",children:[t.jsx("div",{className:"h-[88px] w-full rounded-lg overflow-hidden",children:t.jsx("img",{src:e,alt:r,className:"w-full h-full object-cover"})}),t.jsxs("div",{className:`flex flex-col w-full font-bold ${h}`.trim().replace(/\s+/g," "),children:[t.jsx("div",{className:"text-sm leading-5",children:r}),t.jsx("div",{className:"text-2xl leading-8 tracking-tighter",children:n})]})]}),t.jsx(Q,{type:"default",size:"sm",leftIcon:t.jsx(au,{className:"w-4 h-4"}),onClick:x,disabled:o,fullWidth:!0,ariaLabel:`${s} ${r}`,children:s})]})},ou=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M5 3.25V4H2.75a.75.75 0 0 0 0 1.5h.3l.815 8.15A1.5 1.5 0 0 0 5.357 15h5.285a1.5 1.5 0 0 0 1.493-1.35l.815-8.15h.3a.75.75 0 0 0 0-1.5H11v-.75A2.25 2.25 0 0 0 8.75 1h-1.5A2.25 2.25 0 0 0 5 3.25Zm2.25-.75a.75.75 0 0 0-.75.75V4h3v-.75a.75.75 0 0 0-.75-.75h-1.5ZM6.05 6a.75.75 0 0 1 .787.713l.275 5.5a.75.75 0 0 1-1.498.075l-.275-5.5A.75.75 0 0 1 6.05 6Zm3.9 0a.75.75 0 0 1 .712.787l-.275 5.5a.75.75 0 0 1-1.498-.075l.275-5.5a.75.75 0 0 1 .786-.711Z",clipRule:"evenodd"})}),Vs=({categoryLabel:e,categoryColor:r="lime",productRef:n,price:s,productName:a,descriptionItems:o=[],showDescription:i=!0,quantity:l=0,minQuantity:c=0,maxQuantity:f,onQuantityChange:d,onDelete:m,disabled:h=!1,className:p="",deleteIcon:g})=>{const x={lime:{bg:"bg-lime-100 dark:bg-lime-900/40",text:"text-lime-700 dark:text-lime-300"},red:{bg:"bg-red-100 dark:bg-red-900/40",text:"text-red-700 dark:text-red-300"},orange:{bg:"bg-orange-100 dark:bg-orange-900/40",text:"text-orange-700 dark:text-orange-300"},amber:{bg:"bg-amber-100 dark:bg-amber-900/40",text:"text-amber-700 dark:text-amber-300"},yellow:{bg:"bg-yellow-100 dark:bg-yellow-900/40",text:"text-yellow-700 dark:text-yellow-300"},green:{bg:"bg-green-100 dark:bg-green-900/40",text:"text-green-700 dark:text-green-300"},emerald:{bg:"bg-emerald-100 dark:bg-emerald-900/40",text:"text-emerald-700 dark:text-emerald-300"},teal:{bg:"bg-teal-100 dark:bg-teal-900/40",text:"text-teal-700 dark:text-teal-300"},cyan:{bg:"bg-cyan-100 dark:bg-cyan-900/40",text:"text-cyan-700 dark:text-cyan-300"},sky:{bg:"bg-sky-100 dark:bg-sky-900/40",text:"text-sky-700 dark:text-sky-300"},blue:{bg:"bg-blue-100 dark:bg-blue-900/40",text:"text-blue-700 dark:text-blue-300"},indigo:{bg:"bg-indigo-100 dark:bg-indigo-900/40",text:"text-indigo-700 dark:text-indigo-300"},violet:{bg:"bg-violet-100 dark:bg-violet-900/40",text:"text-violet-700 dark:text-violet-300"},purple:{bg:"bg-purple-100 dark:bg-purple-900/40",text:"text-purple-700 dark:text-purple-300"},fuchsia:{bg:"bg-fuchsia-100 dark:bg-fuchsia-900/40",text:"text-fuchsia-700 dark:text-fuchsia-300"},pink:{bg:"bg-pink-100 dark:bg-pink-900/40",text:"text-pink-700 dark:text-pink-300"},rose:{bg:"bg-rose-100 dark:bg-rose-900/40",text:"text-rose-700 dark:text-rose-300"},zinc:{bg:"bg-zinc-100 dark:bg-zinc-800/50",text:"text-zinc-600 dark:text-zinc-300"},primary:{bg:"bg-primary-custom-100 dark:bg-primary-custom-600/30",text:"text-primary-custom-600 dark:text-primary-custom-300"}},b=x[r]||x.lime,y=w=>{!h&&d&&d(w)},C=()=>{!h&&m&&m()};return t.jsxs("div",{className:`
|
|
1382
1382
|
flex
|
|
1383
1383
|
flex-col
|
|
1384
1384
|
gap-2
|
|
1385
1385
|
w-full
|
|
1386
1386
|
${h?"opacity-50 pointer-events-none":""}
|
|
1387
1387
|
${p}
|
|
1388
|
-
`.trim().replace(/\s+/g," "),"data-component":"POSProductSidebarItems",children:[
|
|
1388
|
+
`.trim().replace(/\s+/g," "),"data-component":"POSProductSidebarItems",children:[t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[t.jsxs("div",{className:"flex items-center gap-1 w-full",children:[t.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[t.jsx("div",{className:`
|
|
1389
1389
|
inline-flex
|
|
1390
1390
|
items-center
|
|
1391
1391
|
px-1.5
|
|
@@ -1394,14 +1394,14 @@
|
|
|
1394
1394
|
transition-colors
|
|
1395
1395
|
duration-150
|
|
1396
1396
|
${b.bg}
|
|
1397
|
-
`.trim().replace(/\s+/g," "),children:
|
|
1397
|
+
`.trim().replace(/\s+/g," "),children:t.jsx("span",{className:`
|
|
1398
1398
|
text-xs
|
|
1399
1399
|
leading-4
|
|
1400
1400
|
font-normal
|
|
1401
1401
|
text-center
|
|
1402
1402
|
whitespace-nowrap
|
|
1403
1403
|
${b.text}
|
|
1404
|
-
`.trim().replace(/\s+/g," "),children:
|
|
1404
|
+
`.trim().replace(/\s+/g," "),children:e})}),t.jsx("span",{className:"text-[10px] leading-3 font-normal text-content-primary dark:text-dark-content-primary whitespace-nowrap",children:n})]}),t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx("span",{className:"text-xs leading-4 font-bold text-content-primary dark:text-dark-content-primary whitespace-nowrap text-right",children:s})})]}),t.jsx("div",{className:"flex items-start w-full",children:t.jsx("span",{className:"text-xs leading-4 font-bold text-content-primary dark:text-dark-content-primary flex-1 min-w-0",children:a})})]}),i&&o.length>0&&t.jsx("div",{className:`
|
|
1405
1405
|
flex
|
|
1406
1406
|
flex-col
|
|
1407
1407
|
gap-2
|
|
@@ -1412,7 +1412,7 @@
|
|
|
1412
1412
|
w-full
|
|
1413
1413
|
transition-colors
|
|
1414
1414
|
duration-150
|
|
1415
|
-
`.trim().replace(/\s+/g," "),children:o.map((w,
|
|
1415
|
+
`.trim().replace(/\s+/g," "),children:o.map((w,j)=>t.jsxs("div",{className:"flex items-center gap-1 w-full",children:[t.jsx("span",{className:"flex-1 min-w-0 text-xs leading-3 font-normal text-content-primary dark:text-dark-content-primary",children:w.description}),t.jsx("span",{className:"text-xs leading-3 font-bold text-content-primary dark:text-dark-content-primary whitespace-nowrap text-right shrink-0",children:w.price})]},j))})]}),t.jsxs("div",{className:"flex items-center justify-between w-full",children:[t.jsx("div",{className:"w-[118px]",children:t.jsx(Ms,{value:l,min:c,max:f,onChange:y,disabled:h})}),t.jsx("button",{type:"button",onClick:C,disabled:h,className:`
|
|
1416
1416
|
flex
|
|
1417
1417
|
items-center
|
|
1418
1418
|
justify-center
|
|
@@ -1436,7 +1436,7 @@
|
|
|
1436
1436
|
transition-all
|
|
1437
1437
|
duration-150
|
|
1438
1438
|
${h?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
1439
|
-
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:g||
|
|
1439
|
+
`.trim().replace(/\s+/g," "),"aria-label":"Eliminar producto",children:g||t.jsx(ou,{className:"w-[18px] h-[21px]"})})]})]})};Vs.displayName="POSProductSidebarItems";const vs=({tableNumber:e,status:r="available",shape:n="square",chairs:s=4,showChairs:a=!0,isActive:o=!1,onClick:i,className:l="",disabled:c=!1,children:f})=>{const d={available:{border:"border-[#0e79fd]",borderDark:"dark:border-[#93d1fd]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-primary-custom-100",bgActiveDark:"dark:bg-[#1e3a5f]",borderActive:"border-[#bce4ff]",borderActiveDark:"dark:border-[#1e3a5f]",table:"bg-[#0e79fd]",tableDark:"dark:bg-[#93d1fd]",chair:"bg-[#0e79fd]",chairDark:"dark:bg-[#93d1fd]",text:"text-[#0e79fd]",textDark:"dark:text-[#93d1fd]",focusRing:"focus:ring-[#93d1fd]",focusRingDark:"dark:focus:ring-[#0e79fd]"},busy:{border:"border-[#af460e]",borderDark:"dark:border-[#f5a927]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-[#fed7aa]",bgActiveDark:"dark:bg-[#5c3a1e]",borderActive:"border-[#fed7aa]",borderActiveDark:"dark:border-[#5c3a1e]",table:"bg-[#af460e]",tableDark:"dark:bg-[#f5a927]",chair:"bg-[#af460e]",chairDark:"dark:bg-[#f5a927]",text:"text-[#af460e]",textDark:"dark:text-[#f5a927]",focusRing:"focus:ring-[#f5a927]",focusRingDark:"dark:focus:ring-[#af460e]"},reserved:{border:"border-[#7e22ce]",borderDark:"dark:border-[#c084fc]",bgEnabled:"bg-transparent",bgEnabledDark:"dark:bg-transparent",bgActive:"bg-[#e9d5ff]",bgActiveDark:"dark:bg-[#3b1f5c]",borderActive:"border-[#e9d5ff]",borderActiveDark:"dark:border-[#3b1f5c]",table:"bg-[#7e22ce]",tableDark:"dark:bg-[#c084fc]",chair:"bg-[#7e22ce]",chairDark:"dark:bg-[#c084fc]",text:"text-[#7e22ce]",textDark:"dark:text-[#c084fc]",focusRing:"focus:ring-[#c084fc]",focusRingDark:"dark:focus:ring-[#7e22ce]"}},m={square:{container:"rounded-[4px]",table:"w-[64px] h-[64px] rounded-[4px]"},circle:{container:"rounded-[9999px]",table:"w-[64px] h-[64px] rounded-[9999px]"},rectangle:{container:"rounded-[4px]",table:"w-[80px] h-[64px] rounded-[4px]"},oval:{container:"rounded-3xl",table:"w-[80px] h-[64px] rounded-3xl"}},h=({rotation:b})=>t.jsxs("div",{className:"w-[28px] h-[22px]",style:{transform:`rotate(${b}deg)`},"aria-hidden":"true",children:[t.jsx("div",{className:`
|
|
1440
1440
|
absolute
|
|
1441
1441
|
top-0
|
|
1442
1442
|
left-0
|
|
@@ -1445,7 +1445,7 @@
|
|
|
1445
1445
|
rounded-t-[4px]
|
|
1446
1446
|
${d[r].chair}
|
|
1447
1447
|
${d[r].chairDark}
|
|
1448
|
-
`}),
|
|
1448
|
+
`}),t.jsx("div",{className:`
|
|
1449
1449
|
absolute
|
|
1450
1450
|
bottom-0
|
|
1451
1451
|
left-[7.14%]
|
|
@@ -1454,12 +1454,12 @@
|
|
|
1454
1454
|
rounded-b-[4px]
|
|
1455
1455
|
${d[r].chair}
|
|
1456
1456
|
${d[r].chairDark}
|
|
1457
|
-
`})]}),p=()=>{!c&&i&&i()},g=b=>{(b.key==="Enter"||b.key===" ")&&!c&&i&&(b.preventDefault(),i())},x=["w-[160px]","h-[160px]","shrink-0","relative","flex","flex-col","items-center","justify-center","p-0","border-2","box-border","rounded-[8px]",o?d[r].borderActive:d[r].border,o?d[r].borderActiveDark:d[r].borderDark,o?d[r].bgActive:d[r].bgEnabled,o?d[r].bgActiveDark:d[r].bgEnabledDark,"focus:outline-hidden","focus:ring-2",d[r].focusRing,d[r].focusRingDark,"focus:ring-offset-2","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150",i&&!c?"cursor-pointer":"",i&&!c?"hover:scale-105":"",i&&!c?"active:scale-95":"",c?"opacity-50 cursor-not-allowed":"",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return
|
|
1458
|
-
${
|
|
1457
|
+
`})]}),p=()=>{!c&&i&&i()},g=b=>{(b.key==="Enter"||b.key===" ")&&!c&&i&&(b.preventDefault(),i())},x=["w-[160px]","h-[160px]","shrink-0","relative","flex","flex-col","items-center","justify-center","p-0","border-2","box-border","rounded-[8px]",o?d[r].borderActive:d[r].border,o?d[r].borderActiveDark:d[r].borderDark,o?d[r].bgActive:d[r].bgEnabled,o?d[r].bgActiveDark:d[r].bgEnabledDark,"focus:outline-hidden","focus:ring-2",d[r].focusRing,d[r].focusRingDark,"focus:ring-offset-2","dark:focus:ring-offset-dark-bg-primary","transition-all","duration-150",i&&!c?"cursor-pointer":"",i&&!c?"hover:scale-105":"",i&&!c?"active:scale-95":"",c?"opacity-50 cursor-not-allowed":"",l].filter(Boolean).join(" ").replace(/\s+/g," ").trim();return t.jsxs("button",{className:x,onClick:p,onKeyDown:g,disabled:c,type:"button","aria-label":`Mesa ${e} - ${r==="available"?"Disponible":r==="busy"?"Ocupada":"Reservada"}`,children:[t.jsxs("div",{className:"flex flex-col gap-[4px] items-center justify-center w-[134px] h-[134px] shrink-0",children:[a&&(s===2||s===4||s===6||s===8)&&t.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[s>=6&&t.jsxs(t.Fragment,{children:[t.jsx(h,{rotation:0}),t.jsx(h,{rotation:0})]}),s===2&&t.jsx(h,{rotation:0}),s===4&&t.jsx(h,{rotation:0})]}),t.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[a&&(s===4||s===6||s===8)&&t.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[s>=8&&t.jsxs(t.Fragment,{children:[t.jsx(h,{rotation:270}),t.jsx(h,{rotation:270})]}),(s===4||s===6)&&t.jsx(h,{rotation:270})]}),t.jsx("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx("div",{className:`
|
|
1458
|
+
${m[n].table}
|
|
1459
1459
|
${d[r].table}
|
|
1460
1460
|
${d[r].tableDark}
|
|
1461
1461
|
shrink-0
|
|
1462
|
-
`})})}),a&&(s===4||s===6||s===8)&&
|
|
1462
|
+
`})})}),a&&(s===4||s===6||s===8)&&t.jsxs("div",{className:"flex flex-col gap-[4px] items-start justify-center shrink-0",children:[s>=8&&t.jsxs(t.Fragment,{children:[t.jsx(h,{rotation:90}),t.jsx(h,{rotation:90})]}),(s===4||s===6)&&t.jsx(h,{rotation:90})]})]}),a&&(s===2||s===4||s===6||s===8)&&t.jsxs("div",{className:"flex gap-[4px] items-center justify-center shrink-0",children:[s>=6&&t.jsxs(t.Fragment,{children:[t.jsx(h,{rotation:180}),t.jsx(h,{rotation:180})]}),s===2&&t.jsx(h,{rotation:180}),s===4&&t.jsx(h,{rotation:180})]})]}),t.jsxs("div",{className:`
|
|
1463
1463
|
flex
|
|
1464
1464
|
flex-col
|
|
1465
1465
|
justify-center
|
|
@@ -1475,15 +1475,15 @@
|
|
|
1475
1475
|
font-normal
|
|
1476
1476
|
${d[r].text}
|
|
1477
1477
|
${d[r].textDark}
|
|
1478
|
-
`,children:[e.jsxs("p",{className:"leading-[12px] text-ellipsis overflow-hidden",children:["Mesa ",t]}),u]})]})};const N0=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),S0=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,n,s)=>s?s.toUpperCase():n.toLowerCase()),Ts=t=>{const r=S0(t);return r.charAt(0).toUpperCase()+r.slice(1)},Ya=(...t)=>t.filter((r,n,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===n).join(" ").trim(),R0=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var E0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const M0=m.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i,...l},c)=>m.createElement("svg",{ref:c,...E0,width:r,height:r,stroke:t,strokeWidth:s?Number(n)*24/Number(r):n,className:Ya("lucide",a),...!o&&!R0(l)&&{"aria-hidden":"true"},...l},[...i.map(([u,d])=>m.createElement(u,d)),...Array.isArray(o)?o:[o]]));const xn=(t,r)=>{const n=m.forwardRef(({className:s,...a},o)=>m.createElement(M0,{ref:o,iconNode:r,className:Ya(`lucide-${N0(Ts(t))}`,`lucide-${t}`,s),...a}));return n.displayName=Ts(t),n};const I0=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],L0=xn("chevron-down",I0);const A0=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$s=xn("loader-circle",A0);const z0=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],T0=xn("search",z0);const $0=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Qa=xn("x",$0);function Ja(t){var r,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(n=Ja(t[r]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function O0(){for(var t,r,n=0,s="",a=arguments.length;n<a;n++)(t=arguments[n])&&(r=Ja(t))&&(s&&(s+=" "),s+=r);return s}const F0=(t,r)=>{const n=new Array(t.length+r.length);for(let s=0;s<t.length;s++)n[s]=t[s];for(let s=0;s<r.length;s++)n[t.length+s]=r[s];return n},D0=(t,r)=>({classGroupId:t,validator:r}),eo=(t=new Map,r=null,n)=>({nextPart:t,validators:r,classGroupId:n}),an="-",Os=[],B0="arbitrary..",V0=t=>{const r=_0(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return P0(i);const l=i.split(an),c=l[0]===""&&l.length>1?1:0;return to(l,c,r)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=s[i],u=n[i];return c?u?F0(u,c):c:u||Os}return n[i]||Os}}},to=(t,r,n)=>{if(t.length-r===0)return n.classGroupId;const a=t[r],o=n.nextPart.get(a);if(o){const u=to(t,r+1,o);if(u)return u}const i=n.validators;if(i===null)return;const l=r===0?t.join(an):t.slice(r).join(an),c=i.length;for(let u=0;u<c;u++){const d=i[u];if(d.validator(l))return d.classGroupId}},P0=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=t.slice(1,-1),n=r.indexOf(":"),s=r.slice(0,n);return s?B0+s:void 0})(),_0=t=>{const{theme:r,classGroups:n}=t;return W0(n,r)},W0=(t,r)=>{const n=eo();for(const s in t){const a=t[s];es(a,n,s,r)}return n},es=(t,r,n,s)=>{const a=t.length;for(let o=0;o<a;o++){const i=t[o];Z0(i,r,n,s)}},Z0=(t,r,n,s)=>{if(typeof t=="string"){H0(t,r,n);return}if(typeof t=="function"){G0(t,r,n,s);return}U0(t,r,n,s)},H0=(t,r,n)=>{const s=t===""?r:ro(r,t);s.classGroupId=n},G0=(t,r,n,s)=>{if(q0(t)){es(t(s),r,n,s);return}r.validators===null&&(r.validators=[]),r.validators.push(D0(n,t))},U0=(t,r,n,s)=>{const a=Object.entries(t),o=a.length;for(let i=0;i<o;i++){const[l,c]=a[i];es(c,ro(r,l),n,s)}},ro=(t,r)=>{let n=t;const s=r.split(an),a=s.length;for(let o=0;o<a;o++){const i=s[o];let l=n.nextPart.get(i);l||(l=eo(),n.nextPart.set(i,l)),n=l}return n},q0=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,K0=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,n=Object.create(null),s=Object.create(null);const a=(o,i)=>{n[o]=i,r++,r>t&&(r=0,s=n,n=Object.create(null))};return{get(o){let i=n[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in n?n[o]=i:a(o,i)}}},Dn="!",Fs=":",X0=[],Ds=(t,r,n,s,a)=>({modifiers:t,hasImportantModifier:r,baseClassName:n,maybePostfixModifierPosition:s,isExternal:a}),Y0=t=>{const{prefix:r,experimentalParseClassName:n}=t;let s=a=>{const o=[];let i=0,l=0,c=0,u;const d=a.length;for(let x=0;x<d;x++){const b=a[x];if(i===0&&l===0){if(b===Fs){o.push(a.slice(c,x)),c=x+1;continue}if(b==="/"){u=x;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const f=o.length===0?a:a.slice(c);let h=f,p=!1;f.endsWith(Dn)?(h=f.slice(0,-1),p=!0):f.startsWith(Dn)&&(h=f.slice(1),p=!0);const g=u&&u>c?u-c:void 0;return Ds(o,p,h,g)};if(r){const a=r+Fs,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):Ds(X0,!1,i,void 0,!0)}if(n){const a=s;s=o=>n({className:o,parseClassName:a})}return s},Q0=t=>{const r=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{r.set(n,1e6+s)}),n=>{const s=[];let a=[];for(let o=0;o<n.length;o++){const i=n[o],l=i[0]==="[",c=r.has(i);l||c?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},J0=t=>({cache:K0(t.cacheSize),parseClassName:Y0(t),sortModifiers:Q0(t),...V0(t)}),ed=/\s+/,td=(t,r)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o}=r,i=[],l=t.trim().split(ed);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:x}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let b=!!x,y=s(b?g.substring(0,x):g);if(!y){if(!b){c=d+(c.length>0?" "+c:c);continue}if(y=s(g),!y){c=d+(c.length>0?" "+c:c);continue}b=!1}const j=h.length===0?"":h.length===1?h[0]:o(h).join(":"),w=p?j+Dn:j,C=w+y;if(i.indexOf(C)>-1)continue;i.push(C);const I=a(y,b);for(let S=0;S<I.length;++S){const O=I[S];i.push(w+O)}c=d+(c.length>0?" "+c:c)}return c},rd=(...t)=>{let r=0,n,s,a="";for(;r<t.length;)(n=t[r++])&&(s=no(n))&&(a&&(a+=" "),a+=s);return a},no=t=>{if(typeof t=="string")return t;let r,n="";for(let s=0;s<t.length;s++)t[s]&&(r=no(t[s]))&&(n&&(n+=" "),n+=r);return n},nd=(t,...r)=>{let n,s,a,o;const i=c=>{const u=r.reduce((d,f)=>f(d),t());return n=J0(u),s=n.cache.get,a=n.cache.set,o=l,l(c)},l=c=>{const u=s(c);if(u)return u;const d=td(c,n);return a(c,d),d};return o=i,(...c)=>o(rd(...c))},sd=[],Ae=t=>{const r=n=>n[t]||sd;return r.isThemeGetter=!0,r},so=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ao=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ad=/^\d+\/\d+$/,od=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,id=/\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$/,ld=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=t=>ad.test(t),le=t=>!!t&&!Number.isNaN(Number(t)),At=t=>!!t&&Number.isInteger(Number(t)),Nn=t=>t.endsWith("%")&&le(t.slice(0,-1)),jt=t=>od.test(t),ud=()=>!0,fd=t=>id.test(t)&&!ld.test(t),oo=()=>!1,md=t=>cd.test(t),hd=t=>dd.test(t),pd=t=>!q(t)&&!K(t),xd=t=>ur(t,co,oo),q=t=>so.test(t),_t=t=>ur(t,uo,fd),Sn=t=>ur(t,kd,le),Bs=t=>ur(t,io,oo),gd=t=>ur(t,lo,hd),Ur=t=>ur(t,fo,md),K=t=>ao.test(t),Cr=t=>fr(t,uo),bd=t=>fr(t,wd),Vs=t=>fr(t,io),vd=t=>fr(t,co),yd=t=>fr(t,lo),qr=t=>fr(t,fo,!0),ur=(t,r,n)=>{const s=so.exec(t);return s?s[1]?r(s[1]):n(s[2]):!1},fr=(t,r,n=!1)=>{const s=ao.exec(t);return s?s[1]?r(s[1]):n:!1},io=t=>t==="position"||t==="percentage",lo=t=>t==="image"||t==="url",co=t=>t==="length"||t==="size"||t==="bg-size",uo=t=>t==="length",kd=t=>t==="number",wd=t=>t==="family-name",fo=t=>t==="shadow",jd=()=>{const t=Ae("color"),r=Ae("font"),n=Ae("text"),s=Ae("font-weight"),a=Ae("tracking"),o=Ae("leading"),i=Ae("breakpoint"),l=Ae("container"),c=Ae("spacing"),u=Ae("radius"),d=Ae("shadow"),f=Ae("inset-shadow"),h=Ae("text-shadow"),p=Ae("drop-shadow"),g=Ae("blur"),x=Ae("perspective"),b=Ae("aspect"),y=Ae("ease"),j=Ae("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...C(),K,q],S=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],L=()=>[K,q,c],k=()=>[sr,"full","auto",...L()],R=()=>[At,"none","subgrid",K,q],z=()=>["auto",{span:["full",At,K,q]},At,K,q],A=()=>[At,"auto",K,q],P=()=>["auto","min","max","fr",K,q],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...L()],_=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],E=()=>[t,K,q],U=()=>[...C(),Vs,Bs,{position:[K,q]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",vd,xd,{size:[K,q]}],H=()=>[Nn,Cr,_t],Z=()=>["","none","full",u,K,q],ae=()=>["",le,Cr,_t],oe=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[le,Nn,Vs,Bs],$e=()=>["","none",g,K,q],ge=()=>["none",le,K,q],ve=()=>["none",le,K,q],ye=()=>[le,K,q],N=()=>[sr,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[jt],breakpoint:[jt],color:[ud],container:[jt],"drop-shadow":[jt],ease:["in","out","in-out"],font:[pd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[jt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[jt],shadow:[jt],spacing:["px",le],text:[jt],"text-shadow":[jt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,q,K,b]}],container:["container"],columns:[{columns:[le,q,K,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:I()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],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:[At,"auto",K,q]}],basis:[{basis:[sr,"full","auto",l,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,sr,"auto","initial","none",q]}],grow:[{grow:["",le,K,q]}],shrink:[{shrink:["",le,K,q]}],order:[{order:[At,"first","last","none",K,q]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[l,"screen",..._()]}],"min-w":[{"min-w":[l,"screen","none",..._()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",n,Cr,_t]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,K,Sn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nn,q]}],"font-family":[{font:[bd,q,r]}],"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,K,q]}],"line-clamp":[{"line-clamp":[le,"none",K,Sn]}],leading:[{leading:[o,...L()]}],"list-image":[{"list-image":["none",K,q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",K,_t]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[le,"auto",K,q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,q]}],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",K,q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:U()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},At,K,q],radial:["",K,q],conic:[At,K,q]},yd,gd]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,K,q]}],"outline-w":[{outline:["",le,Cr,_t]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",d,qr,Ur]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",f,qr,Ur]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[le,_t]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",h,qr,Ur]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[le,K,q]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"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":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[K,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:U()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,q]}],filter:[{filter:["","none",K,q]}],blur:[{blur:$e()}],brightness:[{brightness:[le,K,q]}],contrast:[{contrast:[le,K,q]}],"drop-shadow":[{"drop-shadow":["","none",p,qr,Ur]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",le,K,q]}],"hue-rotate":[{"hue-rotate":[le,K,q]}],invert:[{invert:["",le,K,q]}],saturate:[{saturate:[le,K,q]}],sepia:[{sepia:["",le,K,q]}],"backdrop-filter":[{"backdrop-filter":["","none",K,q]}],"backdrop-blur":[{"backdrop-blur":$e()}],"backdrop-brightness":[{"backdrop-brightness":[le,K,q]}],"backdrop-contrast":[{"backdrop-contrast":[le,K,q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,K,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,K,q]}],"backdrop-invert":[{"backdrop-invert":["",le,K,q]}],"backdrop-opacity":[{"backdrop-opacity":[le,K,q]}],"backdrop-saturate":[{"backdrop-saturate":[le,K,q]}],"backdrop-sepia":[{"backdrop-sepia":["",le,K,q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",K,q]}],ease:[{ease:["linear","initial",y,K,q]}],delay:[{delay:[le,K,q]}],animate:[{animate:["none",j,K,q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,K,q]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[K,q,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:N()}],"translate-x":[{"translate-x":N()}],"translate-y":[{"translate-y":N()}],"translate-z":[{"translate-z":N()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",K,q]}],"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":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",K,q]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[le,Cr,_t,Sn]}],stroke:[{stroke:["none",...E()]}],"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"]}},Cd=nd(jd);function Sr(...t){return Cd(O0(t))}function Nd(t,r){return t.replace(/\{(\w+)\}/g,(n,s)=>{const a=r[s];return a!=null?String(a):""})}function Sd(t){return Array.isArray(t)&&t.every(Array.isArray)}function mo(t){return Object.entries(t).map(([r,n])=>[{[r]:n}])}function Bn(t){if(t)return Sd(t)?t:mo(t)}function Rd(...t){return t.filter(Boolean).flat()}const Ed=300;function Md(t,r=Ed){const[n,s]=m.useState(t);return m.useEffect(()=>{const a=setTimeout(()=>{s(t)},r);return()=>{clearTimeout(a)}},[t,r]),n}function Id(t){const{records:r,isOpen:n,onSelect:s,onClose:a,onEscape:o,onClear:i,searchQuery:l}=t,[c,u]=m.useState(-1),d=m.useCallback(f=>{if(n)switch(f.key){case"ArrowDown":{if(f.preventDefault(),r.length===0)return;u(h=>h>=r.length-1?0:h+1);break}case"ArrowUp":{if(f.preventDefault(),r.length===0)return;u(h=>h<=0?r.length-1:h-1);break}case"Home":{if(f.preventDefault(),r.length===0)return;u(0);break}case"End":{if(f.preventDefault(),r.length===0)return;u(r.length-1);break}case"Enter":{f.preventDefault(),c>=0&&c<r.length&&s(r[c]);break}case"Escape":{f.preventDefault(),o();break}case"Backspace":{l===""&&i();break}case"Tab":{a();break}}},[n,r,c,s,a,o,i,l]);return{highlightedIndex:c,setHighlightedIndex:u,handleKeyDown:d}}const Ld=(t,r,n,s)=>{const a=[n,{code:r,...s||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(a,"warn","react-i18next::",!0);Ut(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...a):console?.warn&&console.warn(...a)},Ps={},ho=(t,r,n,s)=>{Ut(n)&&Ps[n]||(Ut(n)&&(Ps[n]=new Date),Ld(t,r,n,s))},po=(t,r)=>()=>{if(t.isInitialized)r();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),r()};t.on("initialized",n)}},Vn=(t,r,n)=>{t.loadNamespaces(r,po(t,n))},_s=(t,r,n,s)=>{if(Ut(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(r)>-1)return Vn(t,n,s);n.forEach(a=>{t.options.ns.indexOf(a)<0&&t.options.ns.push(a)}),t.loadLanguages(r,po(t,s))},Ad=(t,r,n={})=>!r.languages||!r.languages.length?(ho(r,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:r.languages}),!0):r.hasLoadedNamespace(t,{lng:n.lng,precheck:(s,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,t))return!1}}),Ut=t=>typeof t=="string",zd=t=>typeof t=="object"&&t!==null,Td=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,$d={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Od=t=>$d[t],Fd=t=>t.replace(Td,Od);let Dd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Fd,transDefaultProps:void 0};const Bd=()=>Dd;let Vd;const Pd=()=>Vd,_d=m.createContext();class Wd{constructor(){this.usedNamespaces={}}addUsedNamespaces(r){r.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Kr={exports:{}},Rn={};var Ws;function Zd(){if(Ws)return Rn;Ws=1;var t=m;function r(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:r,s=t.useState,a=t.useEffect,o=t.useLayoutEffect,i=t.useDebugValue;function l(f,h){var p=h(),g=s({inst:{value:p,getSnapshot:h}}),x=g[0].inst,b=g[1];return o(function(){x.value=p,x.getSnapshot=h,c(x)&&b({inst:x})},[f,p,h]),a(function(){return c(x)&&b({inst:x}),f(function(){c(x)&&b({inst:x})})},[f]),i(p),p}function c(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!n(f,p)}catch{return!0}}function u(f,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return Rn.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Rn}var En={};var Zs;function Hd(){return Zs||(Zs=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function r(p,g){d||a.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=g();if(!f){var b=g();o(x,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}b=i({inst:{value:x,getSnapshot:g}});var y=b[0].inst,j=b[1];return c(function(){y.value=x,y.getSnapshot=g,n(y)&&j({inst:y})},[p,x,g]),l(function(){return n(y)&&j({inst:y}),p(function(){n(y)&&j({inst:y})})},[p]),u(x),x}function n(p){var g=p.getSnapshot;p=p.value;try{var x=g();return!o(p,x)}catch{return!0}}function s(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=m,o=typeof Object.is=="function"?Object.is:t,i=a.useState,l=a.useEffect,c=a.useLayoutEffect,u=a.useDebugValue,d=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:r;En.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),En}var Hs;function Gd(){return Hs||(Hs=1,process.env.NODE_ENV==="production"?Kr.exports=Zd():Kr.exports=Hd()),Kr.exports}var Ud=Gd();const qd=(t,r)=>Ut(r)?r:zd(r)&&Ut(r.defaultValue)?r.defaultValue:Array.isArray(t)?t[t.length-1]:t,Kd={t:qd,ready:!1},Xd=()=>()=>{},Yd=(t,r={})=>{const{i18n:n}=r,{i18n:s,defaultNS:a}=m.useContext(_d)||{},o=n||s||Pd();o&&!o.reportNamespaces&&(o.reportNamespaces=new Wd),o||ho(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const i=m.useMemo(()=>({...Bd(),...o?.options?.react,...r}),[o,r]),{useSuspense:l,keyPrefix:c}=i,u=t,d=Ut(u)?[u]:u,f=m.useMemo(()=>d,d);o?.reportNamespaces?.addUsedNamespaces?.(f);const h=m.useRef(0),p=m.useCallback(k=>{if(!o)return Xd;const{bindI18n:R,bindI18nStore:z}=i,A=()=>{h.current+=1,k()};return R&&o.on(R,A),z&&o.store.on(z,A),()=>{R&&R.split(" ").forEach(P=>o.off(P,A)),z&&z.split(" ").forEach(P=>o.store.off(P,A))}},[o,i]),g=m.useRef(),x=m.useCallback(()=>{if(!o)return Kd;const k=!!(o.isInitialized||o.initializedStoreOnce)&&f.every(Q=>Ad(Q,o,i)),R=r.lng||o.language,z=h.current,A=g.current;if(A&&A.ready===k&&A.lng===R&&A.keyPrefix===c&&A.revision===z)return A;const D={t:o.getFixedT(R,i.nsMode==="fallback"?f:f[0],c),ready:k,lng:R,keyPrefix:c,revision:z};return g.current=D,D},[o,f,c,i,r.lng]),[b,y]=m.useState(0),{t:j,ready:w}=Ud.useSyncExternalStore(p,x,x);m.useEffect(()=>{if(o&&!w&&!l){const k=()=>y(R=>R+1);r.lng?_s(o,r.lng,f,k):Vn(o,f,k)}},[o,r.lng,f,w,l,b]);const C=o||{},I=m.useRef(null),S=m.useRef(),O=k=>{const R=Object.getOwnPropertyDescriptors(k);R.__original&&delete R.__original;const z=Object.create(Object.getPrototypeOf(k),R);if(!Object.prototype.hasOwnProperty.call(z,"__original"))try{Object.defineProperty(z,"__original",{value:k,writable:!1,enumerable:!1,configurable:!1})}catch{}return z},L=m.useMemo(()=>{const k=C,R=k?.language;let z=k;k&&(I.current&&I.current.__original===k?S.current!==R?(z=O(k),I.current=z,S.current=R):z=I.current:(z=O(k),I.current=z,S.current=R));const A=[j,z,w];return A.t=j,A.i18n=z,A.ready=w,A},[j,C,w,C.resolvedLanguage,C.language,C.languages]);if(o&&l&&!w)throw new Promise(k=>{const R=()=>k();r.lng?_s(o,r.lng,f,R):Vn(o,f,R)});return L},Qd={placeholder:"Select...",searchPlaceholder:"Search...",noResults:"No results found",loading:"Loading...",minChars:"Type at least {{count}} characters",error:"An error occurred",notFound:"[Record not found]",clear:"Clear selection",open:"Open dropdown",close:"Close dropdown","announcements.loading":"Loading results","announcements.noResults":"No results found","announcements.cleared":"Selection cleared","announcements.opened":"Dropdown opened, {{count}} results available","announcements.closed":"Dropdown closed","announcements.selected":"{{value}} selected","announcements.resultsLoaded":"{{count}} results loaded","validation.required":"This field is required","validation.requiredIndicator":"*"};function Jd(t,r){return r?t.replace(/\{\{(\w+)\}\}/g,(n,s)=>String(r[s]??"")):t}function e1(){try{const{t,i18n:r}=Yd("lookupField");if(!r.isInitialized)throw new Error("i18n not initialized");return{t:(n,s)=>s?t(n,s):t(n),i18n:r}}catch{return{t:(r,n)=>{const s=Qd[r]??r;return Jd(s,n)},i18n:null}}}function t1(t,r,n=!0,s){const a=m.useCallback(o=>{const i=o.target;t.current&&!t.current.contains(i)&&(s?.some(c=>c.current?.contains(i))||r(o))},[t,r,s]);m.useEffect(()=>{if(n)return document.addEventListener("mousedown",a),()=>{document.removeEventListener("mousedown",a)}},[a,n])}function r1({placement:t="bottom-start",offsetPx:r=4,enabled:n=!0}={}){const{refs:s,floatingStyles:a,context:o}=Fa({placement:t,middleware:[Ia(r),La({fallbackAxisSideDirection:"end",padding:8}),Aa({apply({rects:i,elements:l}){Object.assign(l.floating.style,{minWidth:`${i.reference.width}px`})},padding:8})],whileElementsMounted:n?Ea:void 0});return{refs:s,floatingStyles:a,context:o}}function ar(t,r,n){let s=n.initialDeps??[],a,o=!0;function i(){var l,c,u;let d;n.key&&((l=n.debug)!=null&&l.call(n))&&(d=Date.now());const f=t();if(!(f.length!==s.length||f.some((g,x)=>s[x]!==g)))return a;s=f;let p;if(n.key&&((c=n.debug)!=null&&c.call(n))&&(p=Date.now()),a=r(...f),n.key&&((u=n.debug)!=null&&u.call(n))){const g=Math.round((Date.now()-d)*100)/100,x=Math.round((Date.now()-p)*100)/100,b=x/16,y=(j,w)=>{for(j=String(j);j.length<w;)j=" "+j;return j};console.info(`%c⏱ ${y(x,5)} /${y(g,5)} ms`,`
|
|
1478
|
+
`,children:[t.jsxs("p",{className:"leading-[12px] text-ellipsis overflow-hidden",children:["Mesa ",e]}),f]})]})};const iu=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lu=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,n,s)=>s?s.toUpperCase():n.toLowerCase()),La=e=>{const r=lu(e);return r.charAt(0).toUpperCase()+r.slice(1)},ci=(...e)=>e.filter((r,n,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===n).join(" ").trim(),cu=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var du={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const uu=u.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:a="",children:o,iconNode:i,...l},c)=>u.createElement("svg",{ref:c,...du,width:r,height:r,stroke:e,strokeWidth:s?Number(n)*24/Number(r):n,className:ci("lucide",a),...!o&&!cu(l)&&{"aria-hidden":"true"},...l},[...i.map(([f,d])=>u.createElement(f,d)),...Array.isArray(o)?o:[o]]));const Zn=(e,r)=>{const n=u.forwardRef(({className:s,...a},o)=>u.createElement(uu,{ref:o,iconNode:r,className:ci(`lucide-${iu(La(e))}`,`lucide-${e}`,s),...a}));return n.displayName=La(e),n};const fu=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mu=Zn("chevron-down",fu);const hu=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Aa=Zn("loader-circle",hu);const pu=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],xu=Zn("search",pu);const gu=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],di=Zn("x",gu);function ui(e){var r,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(n=ui(e[r]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function bu(){for(var e,r,n=0,s="",a=arguments.length;n<a;n++)(e=arguments[n])&&(r=ui(e))&&(s&&(s+=" "),s+=r);return s}const vu=(e,r)=>{const n=new Array(e.length+r.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<r.length;s++)n[e.length+s]=r[s];return n},yu=(e,r)=>({classGroupId:e,validator:r}),fi=(e=new Map,r=null,n)=>({nextPart:e,validators:r,classGroupId:n}),An="-",Ta=[],wu="arbitrary..",ku=e=>{const r=Cu(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return ju(i);const l=i.split(An),c=l[0]===""&&l.length>1?1:0;return mi(l,c,r)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=s[i],f=n[i];return c?f?vu(f,c):c:f||Ta}return n[i]||Ta}}},mi=(e,r,n)=>{if(e.length-r===0)return n.classGroupId;const a=e[r],o=n.nextPart.get(a);if(o){const f=mi(e,r+1,o);if(f)return f}const i=n.validators;if(i===null)return;const l=r===0?e.join(An):e.slice(r).join(An),c=i.length;for(let f=0;f<c;f++){const d=i[f];if(d.validator(l))return d.classGroupId}},ju=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),n=r.indexOf(":"),s=r.slice(0,n);return s?wu+s:void 0})(),Cu=e=>{const{theme:r,classGroups:n}=e;return Nu(n,r)},Nu=(e,r)=>{const n=fi();for(const s in e){const a=e[s];Ps(a,n,s,r)}return n},Ps=(e,r,n,s)=>{const a=e.length;for(let o=0;o<a;o++){const i=e[o];Su(i,r,n,s)}},Su=(e,r,n,s)=>{if(typeof e=="string"){Ru(e,r,n);return}if(typeof e=="function"){Eu(e,r,n,s);return}Mu(e,r,n,s)},Ru=(e,r,n)=>{const s=e===""?r:hi(r,e);s.classGroupId=n},Eu=(e,r,n,s)=>{if(Iu(e)){Ps(e(s),r,n,s);return}r.validators===null&&(r.validators=[]),r.validators.push(yu(n,e))},Mu=(e,r,n,s)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[l,c]=a[i];Ps(c,hi(r,l),n,s)}},hi=(e,r)=>{let n=e;const s=r.split(An),a=s.length;for(let o=0;o<a;o++){const i=s[o];let l=n.nextPart.get(i);l||(l=fi(),n.nextPart.set(i,l)),n=l}return n},Iu=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Lu=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,n=Object.create(null),s=Object.create(null);const a=(o,i)=>{n[o]=i,r++,r>e&&(r=0,s=n,n=Object.create(null))};return{get(o){let i=n[o];if(i!==void 0)return i;if((i=s[o])!==void 0)return a(o,i),i},set(o,i){o in n?n[o]=i:a(o,i)}}},ys="!",za=":",Au=[],Da=(e,r,n,s,a)=>({modifiers:e,hasImportantModifier:r,baseClassName:n,maybePostfixModifierPosition:s,isExternal:a}),Tu=e=>{const{prefix:r,experimentalParseClassName:n}=e;let s=a=>{const o=[];let i=0,l=0,c=0,f;const d=a.length;for(let x=0;x<d;x++){const b=a[x];if(i===0&&l===0){if(b===za){o.push(a.slice(c,x)),c=x+1;continue}if(b==="/"){f=x;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const m=o.length===0?a:a.slice(c);let h=m,p=!1;m.endsWith(ys)?(h=m.slice(0,-1),p=!0):m.startsWith(ys)&&(h=m.slice(1),p=!0);const g=f&&f>c?f-c:void 0;return Da(o,p,h,g)};if(r){const a=r+za,o=s;s=i=>i.startsWith(a)?o(i.slice(a.length)):Da(Au,!1,i,void 0,!0)}if(n){const a=s;s=o=>n({className:o,parseClassName:a})}return s},zu=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{r.set(n,1e6+s)}),n=>{const s=[];let a=[];for(let o=0;o<n.length;o++){const i=n[o],l=i[0]==="[",c=r.has(i);l||c?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},Du=e=>({cache:Lu(e.cacheSize),parseClassName:Tu(e),sortModifiers:zu(e),...ku(e)}),Ou=/\s+/,$u=(e,r)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:o}=r,i=[],l=e.trim().split(Ou);let c="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{isExternal:m,modifiers:h,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:x}=n(d);if(m){c=d+(c.length>0?" "+c:c);continue}let b=!!x,y=s(b?g.substring(0,x):g);if(!y){if(!b){c=d+(c.length>0?" "+c:c);continue}if(y=s(g),!y){c=d+(c.length>0?" "+c:c);continue}b=!1}const C=h.length===0?"":h.length===1?h[0]:o(h).join(":"),w=p?C+ys:C,j=w+y;if(i.indexOf(j)>-1)continue;i.push(j);const I=a(y,b);for(let N=0;N<I.length;++N){const E=I[N];i.push(w+E)}c=d+(c.length>0?" "+c:c)}return c},Fu=(...e)=>{let r=0,n,s,a="";for(;r<e.length;)(n=e[r++])&&(s=pi(n))&&(a&&(a+=" "),a+=s);return a},pi=e=>{if(typeof e=="string")return e;let r,n="";for(let s=0;s<e.length;s++)e[s]&&(r=pi(e[s]))&&(n&&(n+=" "),n+=r);return n},Bu=(e,...r)=>{let n,s,a,o;const i=c=>{const f=r.reduce((d,m)=>m(d),e());return n=Du(f),s=n.cache.get,a=n.cache.set,o=l,l(c)},l=c=>{const f=s(c);if(f)return f;const d=$u(c,n);return a(c,d),d};return o=i,(...c)=>o(Fu(...c))},Vu=[],We=e=>{const r=n=>n[e]||Vu;return r.isThemeGetter=!0,r},xi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pu=/^\d+\/\d+$/,_u=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wu=/\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$/,Hu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Zu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vr=e=>Pu.test(e),me=e=>!!e&&!Number.isNaN(Number(e)),Xt=e=>!!e&&Number.isInteger(Number(e)),ns=e=>e.endsWith("%")&&me(e.slice(0,-1)),Vt=e=>_u.test(e),Uu=()=>!0,qu=e=>Wu.test(e)&&!Hu.test(e),bi=()=>!1,Ku=e=>Zu.test(e),Xu=e=>Gu.test(e),Yu=e=>!K(e)&&!X(e),Qu=e=>Mr(e,wi,bi),K=e=>xi.test(e),ir=e=>Mr(e,ki,qu),ss=e=>Mr(e,n1,me),Oa=e=>Mr(e,vi,bi),Ju=e=>Mr(e,yi,Xu),bn=e=>Mr(e,ji,Ku),X=e=>gi.test(e),_r=e=>Ir(e,ki),e1=e=>Ir(e,s1),$a=e=>Ir(e,vi),t1=e=>Ir(e,wi),r1=e=>Ir(e,yi),vn=e=>Ir(e,ji,!0),Mr=(e,r,n)=>{const s=xi.exec(e);return s?s[1]?r(s[1]):n(s[2]):!1},Ir=(e,r,n=!1)=>{const s=gi.exec(e);return s?s[1]?r(s[1]):n:!1},vi=e=>e==="position"||e==="percentage",yi=e=>e==="image"||e==="url",wi=e=>e==="length"||e==="size"||e==="bg-size",ki=e=>e==="length",n1=e=>e==="number",s1=e=>e==="family-name",ji=e=>e==="shadow",a1=()=>{const e=We("color"),r=We("font"),n=We("text"),s=We("font-weight"),a=We("tracking"),o=We("leading"),i=We("breakpoint"),l=We("container"),c=We("spacing"),f=We("radius"),d=We("shadow"),m=We("inset-shadow"),h=We("text-shadow"),p=We("drop-shadow"),g=We("blur"),x=We("perspective"),b=We("aspect"),y=We("ease"),C=We("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...j(),X,K],N=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],S=()=>[X,K,c],v=()=>[vr,"full","auto",...S()],R=()=>[Xt,"none","subgrid",X,K],T=()=>["auto",{span:["full",Xt,X,K]},Xt,X,K],A=()=>[Xt,"auto",X,K],V=()=>["auto","min","max","fr",X,K],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...S()],B=()=>[vr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],L=()=>[e,X,K],Z=()=>[...j(),$a,Oa,{position:[X,K]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",t1,Qu,{size:[X,K]}],P=()=>[ns,_r,ir],H=()=>["","none","full",f,X,K],ae=()=>["",me,_r,ir],ie=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[me,ns,$a,Oa],Me=()=>["","none",g,X,K],pe=()=>["none",me,X,K],te=()=>["none",me,X,K],ve=()=>[me,X,K],M=()=>[vr,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vt],breakpoint:[Vt],color:[Uu],container:[Vt],"drop-shadow":[Vt],ease:["in","out","in-out"],font:[Yu],"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",me],text:[Vt],"text-shadow":[Vt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vr,K,X,b]}],container:["container"],columns:[{columns:[me,K,X,l]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:I()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],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:[Xt,"auto",X,K]}],basis:[{basis:[vr,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[me,vr,"auto","initial","none",K]}],grow:[{grow:["",me,X,K]}],shrink:[{shrink:["",me,X,K]}],order:[{order:[Xt,"first","last","none",X,K]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[l,"screen",...B()]}],"min-w":[{"min-w":[l,"screen","none",...B()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,_r,ir]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,X,ss]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ns,K]}],"font-family":[{font:[e1,K,r]}],"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,X,K]}],"line-clamp":[{"line-clamp":[me,"none",X,ss]}],leading:[{leading:[o,...S()]}],"list-image":[{"list-image":["none",X,K]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",X,K]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[me,"from-font","auto",X,ir]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[me,"auto",X,K]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X,K]}],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",X,K]}],"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:D()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xt,X,K],radial:["",X,K],conic:[Xt,X,K]},r1,Ju]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[me,X,K]}],"outline-w":[{outline:["",me,_r,ir]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",d,vn,bn]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",m,vn,bn]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[me,ir]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",h,vn,bn]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[me,X,K]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"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":[me]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[X,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":j()}],"mask-image-conic-pos":[{"mask-conic":[me]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",X,K]}],filter:[{filter:["","none",X,K]}],blur:[{blur:Me()}],brightness:[{brightness:[me,X,K]}],contrast:[{contrast:[me,X,K]}],"drop-shadow":[{"drop-shadow":["","none",p,vn,bn]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",me,X,K]}],"hue-rotate":[{"hue-rotate":[me,X,K]}],invert:[{invert:["",me,X,K]}],saturate:[{saturate:[me,X,K]}],sepia:[{sepia:["",me,X,K]}],"backdrop-filter":[{"backdrop-filter":["","none",X,K]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[me,X,K]}],"backdrop-contrast":[{"backdrop-contrast":[me,X,K]}],"backdrop-grayscale":[{"backdrop-grayscale":["",me,X,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[me,X,K]}],"backdrop-invert":[{"backdrop-invert":["",me,X,K]}],"backdrop-opacity":[{"backdrop-opacity":[me,X,K]}],"backdrop-saturate":[{"backdrop-saturate":[me,X,K]}],"backdrop-sepia":[{"backdrop-sepia":["",me,X,K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",X,K]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[me,"initial",X,K]}],ease:[{ease:["linear","initial",y,X,K]}],delay:[{delay:[me,X,K]}],animate:[{animate:["none",C,X,K]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,X,K]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[X,K,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:M()}],"translate-x":[{"translate-x":M()}],"translate-y":[{"translate-y":M()}],"translate-z":[{"translate-z":M()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",X,K]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",X,K]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[me,_r,ir,ss]}],stroke:[{stroke:["none",...L()]}],"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"]}},o1=Bu(a1);function Hr(...e){return o1(bu(e))}function i1(e,r){return e.replace(/\{(\w+)\}/g,(n,s)=>{const a=r[s];return a!=null?String(a):""})}function l1(e){return Array.isArray(e)&&e.every(Array.isArray)}function Ci(e){return Object.entries(e).map(([r,n])=>[{[r]:n}])}function ws(e){if(e)return l1(e)?e:Ci(e)}function c1(...e){return e.filter(Boolean).flat()}const d1=300;function u1(e,r=d1){const[n,s]=u.useState(e);return u.useEffect(()=>{const a=setTimeout(()=>{s(e)},r);return()=>{clearTimeout(a)}},[e,r]),n}function f1(e){const{records:r,isOpen:n,onSelect:s,onClose:a,onEscape:o,onClear:i,searchQuery:l}=e,[c,f]=u.useState(-1),d=u.useCallback(m=>{if(n)switch(m.key){case"ArrowDown":{if(m.preventDefault(),r.length===0)return;f(h=>h>=r.length-1?0:h+1);break}case"ArrowUp":{if(m.preventDefault(),r.length===0)return;f(h=>h<=0?r.length-1:h-1);break}case"Home":{if(m.preventDefault(),r.length===0)return;f(0);break}case"End":{if(m.preventDefault(),r.length===0)return;f(r.length-1);break}case"Enter":{m.preventDefault(),c>=0&&c<r.length&&s(r[c]);break}case"Escape":{m.preventDefault(),o();break}case"Backspace":{l===""&&i();break}case"Tab":{a();break}}},[n,r,c,s,a,o,i,l]);return{highlightedIndex:c,setHighlightedIndex:f,handleKeyDown:d}}const m1=(e,r,n,s)=>{const a=[n,{code:r,...s||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);fr(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...a):console?.warn&&console.warn(...a)},Fa={},Ni=(e,r,n,s)=>{fr(n)&&Fa[n]||(fr(n)&&(Fa[n]=new Date),m1(e,r,n,s))},Si=(e,r)=>()=>{if(e.isInitialized)r();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),r()};e.on("initialized",n)}},ks=(e,r,n)=>{e.loadNamespaces(r,Si(e,n))},Ba=(e,r,n,s)=>{if(fr(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(r)>-1)return ks(e,n,s);n.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(r,Si(e,s))},h1=(e,r,n={})=>!r.languages||!r.languages.length?(Ni(r,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:r.languages}),!0):r.hasLoadedNamespace(e,{lng:n.lng,precheck:(s,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!a(s.isLanguageChangingTo,e))return!1}}),fr=e=>typeof e=="string",p1=e=>typeof e=="object"&&e!==null,x1=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,g1={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},b1=e=>g1[e],v1=e=>e.replace(x1,b1);let y1={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:v1,transDefaultProps:void 0};const w1=()=>y1;let k1;const j1=()=>k1,C1=u.createContext();class N1{constructor(){this.usedNamespaces={}}addUsedNamespaces(r){r.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var yn={exports:{}},as={};var Va;function S1(){if(Va)return as;Va=1;var e=u;function r(m,h){return m===h&&(m!==0||1/m===1/h)||m!==m&&h!==h}var n=typeof Object.is=="function"?Object.is:r,s=e.useState,a=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function l(m,h){var p=h(),g=s({inst:{value:p,getSnapshot:h}}),x=g[0].inst,b=g[1];return o(function(){x.value=p,x.getSnapshot=h,c(x)&&b({inst:x})},[m,p,h]),a(function(){return c(x)&&b({inst:x}),m(function(){c(x)&&b({inst:x})})},[m]),i(p),p}function c(m){var h=m.getSnapshot;m=m.value;try{var p=h();return!n(m,p)}catch{return!0}}function f(m,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return as.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,as}var os={};var Pa;function R1(){return Pa||(Pa=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}function r(p,g){d||a.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=g();if(!m){var b=g();o(x,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),m=!0)}b=i({inst:{value:x,getSnapshot:g}});var y=b[0].inst,C=b[1];return c(function(){y.value=x,y.getSnapshot=g,n(y)&&C({inst:y})},[p,x,g]),l(function(){return n(y)&&C({inst:y}),p(function(){n(y)&&C({inst:y})})},[p]),f(x),x}function n(p){var g=p.getSnapshot;p=p.value;try{var x=g();return!o(p,x)}catch{return!0}}function s(p,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var a=u,o=typeof Object.is=="function"?Object.is:e,i=a.useState,l=a.useEffect,c=a.useLayoutEffect,f=a.useDebugValue,d=!1,m=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?s:r;os.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),os}var _a;function E1(){return _a||(_a=1,process.env.NODE_ENV==="production"?yn.exports=S1():yn.exports=R1()),yn.exports}var M1=E1();const I1=(e,r)=>fr(r)?r:p1(r)&&fr(r.defaultValue)?r.defaultValue:Array.isArray(e)?e[e.length-1]:e,L1={t:I1,ready:!1},A1=()=>()=>{},T1=(e,r={})=>{const{i18n:n}=r,{i18n:s,defaultNS:a}=u.useContext(C1)||{},o=n||s||j1();o&&!o.reportNamespaces&&(o.reportNamespaces=new N1),o||Ni(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const i=u.useMemo(()=>({...w1(),...o?.options?.react,...r}),[o,r]),{useSuspense:l,keyPrefix:c}=i,f=e,d=fr(f)?[f]:f,m=u.useMemo(()=>d,d);o?.reportNamespaces?.addUsedNamespaces?.(m);const h=u.useRef(0),p=u.useCallback(v=>{if(!o)return A1;const{bindI18n:R,bindI18nStore:T}=i,A=()=>{h.current+=1,v()};return R&&o.on(R,A),T&&o.store.on(T,A),()=>{R&&R.split(" ").forEach(V=>o.off(V,A)),T&&T.split(" ").forEach(V=>o.store.off(V,A))}},[o,i]),g=u.useRef(),x=u.useCallback(()=>{if(!o)return L1;const v=!!(o.isInitialized||o.initializedStoreOnce)&&m.every(Y=>h1(Y,o,i)),R=r.lng||o.language,T=h.current,A=g.current;if(A&&A.ready===v&&A.lng===R&&A.keyPrefix===c&&A.revision===T)return A;const F={t:o.getFixedT(R,i.nsMode==="fallback"?m:m[0],c),ready:v,lng:R,keyPrefix:c,revision:T};return g.current=F,F},[o,m,c,i,r.lng]),[b,y]=u.useState(0),{t:C,ready:w}=M1.useSyncExternalStore(p,x,x);u.useEffect(()=>{if(o&&!w&&!l){const v=()=>y(R=>R+1);r.lng?Ba(o,r.lng,m,v):ks(o,m,v)}},[o,r.lng,m,w,l,b]);const j=o||{},I=u.useRef(null),N=u.useRef(),E=v=>{const R=Object.getOwnPropertyDescriptors(v);R.__original&&delete R.__original;const T=Object.create(Object.getPrototypeOf(v),R);if(!Object.prototype.hasOwnProperty.call(T,"__original"))try{Object.defineProperty(T,"__original",{value:v,writable:!1,enumerable:!1,configurable:!1})}catch{}return T},S=u.useMemo(()=>{const v=j,R=v?.language;let T=v;v&&(I.current&&I.current.__original===v?N.current!==R?(T=E(v),I.current=T,N.current=R):T=I.current:(T=E(v),I.current=T,N.current=R));const A=[C,T,w];return A.t=C,A.i18n=T,A.ready=w,A},[C,j,w,j.resolvedLanguage,j.language,j.languages]);if(o&&l&&!w)throw new Promise(v=>{const R=()=>v();r.lng?Ba(o,r.lng,m,R):ks(o,m,R)});return S},z1={placeholder:"Select...",searchPlaceholder:"Search...",noResults:"No results found",loading:"Loading...",minChars:"Type at least {{count}} characters",error:"An error occurred",notFound:"[Record not found]",clear:"Clear selection",open:"Open dropdown",close:"Close dropdown","announcements.loading":"Loading results","announcements.noResults":"No results found","announcements.cleared":"Selection cleared","announcements.opened":"Dropdown opened, {{count}} results available","announcements.closed":"Dropdown closed","announcements.selected":"{{value}} selected","announcements.resultsLoaded":"{{count}} results loaded","validation.required":"This field is required","validation.requiredIndicator":"*"};function D1(e,r){return r?e.replace(/\{\{(\w+)\}\}/g,(n,s)=>String(r[s]??"")):e}function O1(){try{const{t:e,i18n:r}=T1("lookupField");if(!r.isInitialized)throw new Error("i18n not initialized");return{t:(n,s)=>s?e(n,s):e(n),i18n:r}}catch{return{t:(r,n)=>{const s=z1[r]??r;return D1(s,n)},i18n:null}}}function $1(e,r,n=!0,s){const a=u.useCallback(o=>{const i=o.target;e.current&&!e.current.contains(i)&&(s?.some(c=>c.current?.contains(i))||r(o))},[e,r,s]);u.useEffect(()=>{if(n)return document.addEventListener("mousedown",a),()=>{document.removeEventListener("mousedown",a)}},[a,n])}function F1({placement:e="bottom-start",offsetPx:r=4,enabled:n=!0}={}){const{refs:s,floatingStyles:a,context:o}=Ko({placement:e,middleware:[_o(r),Wo({fallbackAxisSideDirection:"end",padding:8}),Ho({apply({rects:i,elements:l}){Object.assign(l.floating.style,{minWidth:`${i.reference.width}px`})},padding:8})],whileElementsMounted:n?Vo:void 0});return{refs:s,floatingStyles:a,context:o}}function yr(e,r,n){let s=n.initialDeps??[],a,o=!0;function i(){var l,c,f;let d;n.key&&((l=n.debug)!=null&&l.call(n))&&(d=Date.now());const m=e();if(!(m.length!==s.length||m.some((g,x)=>s[x]!==g)))return a;s=m;let p;if(n.key&&((c=n.debug)!=null&&c.call(n))&&(p=Date.now()),a=r(...m),n.key&&((f=n.debug)!=null&&f.call(n))){const g=Math.round((Date.now()-d)*100)/100,x=Math.round((Date.now()-p)*100)/100,b=x/16,y=(C,w)=>{for(C=String(C);C.length<w;)C=" "+C;return C};console.info(`%c⏱ ${y(x,5)} /${y(g,5)} ms`,`
|
|
1479
1479
|
font-size: .6rem;
|
|
1480
1480
|
font-weight: bold;
|
|
1481
|
-
color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(a),o=!1,a}return i.updateDeps=l=>{s=l},i}function Gs(t,r){if(t===void 0)throw new Error("Unexpected undefined");return t}const n1=(t,r)=>Math.abs(t-r)<1.01,s1=(t,r,n)=>{let s;return function(...a){t.clearTimeout(s),s=t.setTimeout(()=>r.apply(this,a),n)}},Us=t=>{const{offsetWidth:r,offsetHeight:n}=t;return{width:r,height:n}},a1=t=>t,o1=t=>{const r=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),s=[];for(let a=r;a<=n;a++)s.push(a);return s},i1=(t,r)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;const a=i=>{const{width:l,height:c}=i;r({width:Math.round(l),height:Math.round(c)})};if(a(Us(n)),!s.ResizeObserver)return()=>{};const o=new s.ResizeObserver(i=>{const l=()=>{const c=i[0];if(c?.borderBoxSize){const u=c.borderBoxSize[0];if(u){a({width:u.inlineSize,height:u.blockSize});return}}a(Us(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},qs={passive:!0},Ks=typeof window>"u"?!0:"onscrollend"in window,l1=(t,r)=>{const n=t.scrollElement;if(!n)return;const s=t.targetWindow;if(!s)return;let a=0;const o=t.options.useScrollendEvent&&Ks?()=>{}:s1(s,()=>{r(a,!1)},t.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:f,isRtl:h}=t.options;a=f?n.scrollLeft*(h&&-1||1):n.scrollTop,o(),r(a,d)},l=i(!0),c=i(!1);n.addEventListener("scroll",l,qs);const u=t.options.useScrollendEvent&&Ks;return u&&n.addEventListener("scrollend",c,qs),()=>{n.removeEventListener("scroll",l),u&&n.removeEventListener("scrollend",c)}},c1=(t,r,n)=>{if(r?.borderBoxSize){const s=r.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},d1=(t,{adjustments:r=0,behavior:n},s)=>{var a,o;const i=t+r;(o=(a=s.scrollElement)==null?void 0:a.scrollTo)==null||o.call(a,{[s.options.horizontal?"left":"top"]:i,behavior:n})};class u1{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(a=>{a.forEach(o=>{const i=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var a;(a=s())==null||a.disconnect(),n=null},observe:a=>{var o;return(o=s())==null?void 0:o.observe(a,{box:"border-box"})},unobserve:a=>{var o;return(o=s())==null?void 0:o.unobserve(a)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([s,a])=>{typeof a>"u"&&delete n[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:a1,rangeExtractor:o1,onChange:()=>{},measureElement:c1,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var s,a;(a=(s=this.options).onChange)==null||a.call(s,this,n)},this.maybeNotify=ar(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=o,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const a=new Map,o=new Map;for(let i=s-1;i>=0;i--){const l=n[i];if(a.has(l.lane))continue;const c=o.get(l.lane);if(c==null||l.end>c.end?o.set(l.lane,l):l.end<c.end&&a.set(l.lane,!0),a.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=ar(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,s,a,o,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:s,scrollMargin:a,getItemKey:o,enabled:i,lanes:l}),{key:!1}),this.getMeasurements=ar(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:s,scrollMargin:a,getItemKey:o,enabled:i,lanes:l},c)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const h of this.laneAssignments.keys())h>=n&&this.laneAssignments.delete(h);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,u),f=new Array(l).fill(void 0);for(let h=0;h<u;h++){const p=d[h];p&&(f[p.lane]=h)}for(let h=u;h<n;h++){const p=o(h),g=this.laneAssignments.get(h);let x,b;if(g!==void 0&&this.options.lanes>1){x=g;const C=f[x],I=C!==void 0?d[C]:void 0;b=I?I.end+this.options.gap:s+a}else{const C=this.options.lanes===1?d[h-1]:this.getFurthestMeasurement(d,h);b=C?C.end+this.options.gap:s+a,x=C?C.lane:h%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(h,x)}const y=c.get(p),j=typeof y=="number"?y:this.options.estimateSize(h),w=b+j;d[h]={index:h,start:b,size:j,end:w,key:p,lane:x},f[x]=h}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=ar(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,a,o)=>this.range=n.length>0&&s>0?f1({measurements:n,outerSize:s,scrollOffset:a,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=ar(()=>{let n=null,s=null;const a=this.calculateRange();return a&&(n=a.startIndex,s=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,a,o,i)=>o===null||i===null?[]:n({startIndex:o,endIndex:i,overscan:s,count:a}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,a=n.getAttribute(s);return a?parseInt(a,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(n,s)=>{const a=this.indexFromElement(n),o=this.measurementsCache[a];if(!o)return;const i=o.key,l=this.elementsCache.get(i);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(i,n)),n.isConnected&&this.resizeItem(a,this.options.measureElement(n,s,this))},this.resizeItem=(n,s)=>{const a=this.measurementsCache[n];if(!a)return;const o=this.itemSizeCache.get(a.key)??a.size,i=s-o;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,i,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,s)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((s,a)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(a))});return}this._measureElement(n,void 0)},this.getVirtualItems=ar(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const a=[];for(let o=0,i=n.length;o<i;o++){const l=n[o],c=s[l];a.push(c)}return a},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length!==0)return Gs(s[xo(0,s.length-1,a=>Gs(s[a]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,s,a=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),i=this.getScrollOffset();s==="auto"&&(s=n>=i+o?"end":"start"),s==="center"?n+=(a-o)/2:s==="end"&&(n-=o);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.measurementsCache[n];if(!a)return;const o=this.getSize(),i=this.getScrollOffset();if(s==="auto")if(a.end>=i+o-this.options.scrollPaddingEnd)s="end";else if(a.start<=i+this.options.scrollPaddingStart)s="start";else return[i,s];if(s==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),s];const l=s==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,s,a.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:s="start",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,s),{adjustments:void 0,behavior:a})},this.scrollToIndex=(n,{align:s="auto",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1)),this.currentScrollToIndex=n;let o=0;const i=10,l=u=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(n,u);if(!d){console.warn("Failed to get offset for index:",n);return}const[f,h]=d;this._scrollToOffset(f,{adjustments:void 0,behavior:a}),this.targetWindow.requestAnimationFrame(()=>{const p=()=>{if(this.currentScrollToIndex!==n)return;const g=this.getScrollOffset(),x=this.getOffsetForIndex(n,h);if(!x){console.warn("Failed to get offset for index:",n);return}n1(x[0],g)||c(h)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(p):p()})},c=u=>{this.targetWindow&&this.currentScrollToIndex===n&&(o++,o<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,i),this.targetWindow.requestAnimationFrame(()=>l(u))):console.warn(`Failed to scroll to index ${n} after ${i} attempts.`))};l(s)},this.scrollBy=(n,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let a;if(s.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=((n=s[s.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let i=s.length-1;for(;i>=0&&o.some(l=>l===null);){const l=s[i];o[l.lane]===null&&(o[l.lane]=l.end),i--}a=Math.max(...o.filter(l=>l!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:s,behavior:a})=>{this.options.scrollToFn(n,{behavior:a,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(r)}}const xo=(t,r,n,s)=>{for(;t<=r;){const a=(t+r)/2|0,o=n(a);if(o<s)t=a+1;else if(o>s)r=a-1;else return a}return t>0?t-1:0};function f1({measurements:t,outerSize:r,scrollOffset:n,lanes:s}){const a=t.length-1,o=c=>t[c].start;if(t.length<=s)return{startIndex:0,endIndex:a};let i=xo(0,a,o,n),l=i;if(s===1)for(;l<a&&t[l].end<n+r;)l++;else if(s>1){const c=Array(s).fill(0);for(;l<a&&c.some(d=>d<n+r);){const d=t[l];c[d.lane]=d.end,l++}const u=Array(s).fill(n+r);for(;i>=0&&u.some(d=>d>=n);){const d=t[i];u[d.lane]=d.start,i--}i=Math.max(0,i-i%s),l=Math.min(a,l+(s-1-l%s))}return{startIndex:i,endIndex:l}}const Xs=typeof document<"u"?v.useLayoutEffect:v.useEffect;function m1({useFlushSync:t=!0,...r}){const n=v.useReducer(()=>({}),{})[1],s={...r,onChange:(o,i)=>{var l;t&&i?ln.flushSync(n):n(),(l=r.onChange)==null||l.call(r,o,i)}},[a]=v.useState(()=>new u1(s));return a.setOptions(s),Xs(()=>a._didMount(),[]),Xs(()=>a._willUpdate()),a}function h1(t){return m1({observeElementRect:i1,observeElementOffset:l1,scrollToFn:d1,...t})}const p1=36,x1=5;function g1({count:t,parentRef:r,estimateSize:n=p1,overscan:s=x1,enabled:a=!0}){const o=h1({count:a?t:0,getScrollElement:()=>r.current,estimateSize:m.useCallback(()=>n,[n]),overscan:s});return{virtualItems:o.getVirtualItems(),totalSize:o.getTotalSize(),scrollToIndex:o.scrollToIndex,measureElement:o.measureElement}}const b1=m.forwardRef(function({value:r,onChange:n,placeholder:s="Search...",className:a,listboxId:o,activeDescendantId:i},l){const c=m.useCallback(()=>{n("")},[n]);return e.jsxs("div",{className:Sr("lookup-field__search-container",a),children:[e.jsx(T0,{className:"lookup-field__search-icon"}),e.jsx("input",{ref:l,type:"text",className:"lookup-field__search",value:r,onChange:u=>n(u.target.value),placeholder:s,"aria-label":s,"aria-autocomplete":"list","aria-controls":o,"aria-activedescendant":i}),r&&e.jsx("button",{type:"button",className:"lookup-field__search-clear",onClick:c,"aria-label":"Clear search",tabIndex:-1,children:e.jsx(Qa,{className:"h-4 w-4"})})]})});function v1({message:t}){return e.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"lookup-field__live-region",children:t})}const y1=10,k1=50,w1=1;function j1({entity:t,label:r,displayFields:n,value:s,onChange:a,fetcher:o,clearable:i=!0,placeholder:l,className:c,pageSize:u=y1,onError:d,searchFields:f,minChars:h=w1,displayValue:p,displayTemplate:g,renderSelected:x,filters:b,getFilters:y,dependencies:j,orderBy:w,bindFields:C,readOnly:I=!1,disabled:S=!1,error:O=!1,onFocus:L,onBlur:k,onReady:R,onInvalidValue:z,noResultsText:A,searchPlaceholder:P,required:D=!1,showRequiredIndicator:Q,validateOnBlur:V=!0,onValidationChange:_,errorText:E},U){const{t:T}=e1(),Y=m.useMemo(()=>w??{field:n[0],direction:"asc"},[w,n]),H=m.useId(),[Z,ae]=m.useState(!1),[oe,xe]=m.useState(!1),[se,$e]=m.useState(null),[ge,ve]=m.useState([]),[ye,N]=m.useState(null),[G,F]=m.useState(1),[ie,re]=m.useState(!0),[fe,be]=m.useState(!1),ne=m.useRef(null),ue=m.useRef(null),Ie=m.useRef(JSON.stringify(j??[])),Ce=m.useRef(null),ee=m.useRef(null),Ne=m.useRef(null),[$,ze]=m.useState(""),Le=Md($),[et,Oe]=m.useState(""),qt=m.useRef(!1),je=m.useRef(null);je.current=ye;const de=m.useRef(null),Ze=m.useRef(!1),me=m.useRef(z);m.useEffect(()=>{me.current=z},[z]);const{refs:De,floatingStyles:Ft}=r1({enabled:Z}),Kt=m.useCallback(()=>{Z&&(Ze.current&&(Ze.current=!1,k?.(je.current)),ae(!1),ze(""))},[Z,k]);t1(de,Kt,Z,[De.floating]);const{virtualItems:ke,totalSize:Dr}=g1({count:ge.length,parentRef:Ce,enabled:Z&&ge.length>0}),[ft,Be]=m.useState(!1),[Se,Xt]=m.useState(!1),[tt,mr]=m.useState([]),[mt,bn]=m.useState(0),[Fe,St]=m.useState(1),[ht,Yt]=m.useState(!1),pt=m.useRef(""),hr=m.useRef(!1),xt=m.useRef(1),pr=O||Se,rt=Q??D,nt=m.useRef(_);m.useEffect(()=>{nt.current=_},[_]);const Qt=m.useCallback(()=>Bn(y?y():b),[b,y]),Dt=m.useCallback(async(te="")=>{ne.current&&ne.current.abort();const J=new AbortController;ne.current=J;try{xe(!0),$e(null),Oe(T("announcements.loading"));const ce=Qt(),we=[...new Set(["Id",...n,...C??[]])],Re=await o(t,{fields:we,search:te.length>=h?te:"",searchFields:f??n,page:1,pageSize:u,filters:ce,orderBy:Y});if(J.signal.aborted)return;ve(Re.data),!qt.current&&R&&(qt.current=!0,setTimeout(()=>{R({firstPageLoaded:!0},Bt)},0)),Re.data.length===0?Oe(T("announcements.noResults")):Oe(T("announcements.opened",{count:Re.data.length})),Re.data.length<u&&re(!1)}catch(ce){if(ce instanceof Error&&ce.name==="AbortError")return;const we=ce instanceof Error?ce:new Error("Unknown error");$e(we),d?.(we)}finally{J.signal.aborted||xe(!1)}},[t,n,C,f,u,h,d,R,Qt,Y,o]),gt=m.useCallback(async(te="")=>{if(hr.current||fe||!ie)return;const J=xt.current;try{be(!0),Oe(T("announcements.loadingMore"));const ce=Qt(),we=J+1,Re=[...new Set(["Id",...n,...C??[]])],ct=await o(t,{fields:Re,search:te.length>=h?te:"",searchFields:f??n,page:we,pageSize:u,filters:ce,orderBy:Y});ve(Vr=>[...Vr,...ct.data]),xt.current=we,F(we),Oe(T("announcements.resultsLoaded",{count:ct.data.length})),ct.data.length<u&&re(!1)}catch(ce){if(ce instanceof Error&&ce.name==="AbortError")return;const we=ce instanceof Error?ce:new Error("Unknown error");d?.(we)}finally{be(!1)}},[t,n,C,f,u,h,fe,ie,d,Qt,Y,o,T]),bt=m.useCallback(async te=>{try{const J=[...new Set(["Id",...n,...C??[]])];console.log("[LookupField] fetchAndSetRecordById:",{recordId:te,entity:t,allFields:J});const ce=await o(t,{fields:J,filters:[[{Id:te}]],page:1,pageSize:1});return console.log("[LookupField] fetchAndSetRecordById response:",ce),ce.data[0]??null}catch(J){return console.error("[LookupField] fetchAndSetRecordById error:",J),null}},[t,n,C,o]),Ve=m.useCallback(()=>S||I?(Xt(!1),nt.current?.(!0),!0):D&&!je.current?(Xt(!0),nt.current?.(!1),!1):(Xt(!1),nt.current?.(!0),!0),[D,I,S]),st=m.useCallback(()=>{const te=Ce.current;if(!te||fe||!ie)return;const{scrollTop:J,scrollHeight:ce,clientHeight:we}=te;ce-J-we<k1&>(Le)},[fe,ie,gt,Le]);m.useEffect(()=>{Z&&ee.current&&ee.current.focus({preventScroll:!0})},[Z]),m.useEffect(()=>{Z&&(Le.length===0||Le.length>=h)&&(ht&&pt.current===Le&&tt.length>0?(hr.current=!0,ve(tt),xt.current=Fe,F(Fe),re(!0),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=mt),setTimeout(()=>{hr.current=!1},0)})):(xt.current=1,F(1),re(!0),ve([]),Dt(Le)))},[Z,Le,Dt,h,ht,tt,Fe,mt]),m.useEffect(()=>(Z||(ze(""),xt.current=1,F(1),re(!0),be(!1)),()=>{ne.current&&ne.current.abort()}),[Z]);const Rt=m.useRef(void 0),qe=m.useRef(bt);qe.current=bt;const at=m.useRef(0);m.useEffect(()=>{const J=Rt.current===void 0||Rt.current!==s;if(Rt.current=s,s===null){Be(!1);return}if(!J)return;const ce=++at.current;qe.current(s).then(we=>{at.current===ce&&(we?(N(we),Be(!1)):(Be(!0),N(null),me.current?.(s)))})},[s]);const Jt=JSON.stringify(j??[]);m.useEffect(()=>{Ie.current!==Jt&&(Ie.current=Jt,ne.current&&ne.current.abort(),Yt(!1),ve([]),N(null),xt.current=1,F(1),re(!0),ae(!1),ze(""))},[Jt]);const Ke=JSON.stringify(b??[]),xr=m.useRef(Ke);m.useEffect(()=>{xr.current!==Ke&&(xr.current=Ke,Yt(!1))},[Ke]);const er=m.useCallback(te=>{if(x)return x(te);if(g)return Nd(g,te);if(p){const J=te[p];return J!=null?String(J):""}return n.map(J=>{const ce=te[J];return ce!=null?String(ce):""}).join(" - ")},[x,g,p,n]),Et=()=>{S||I||ae(te=>!te)},Pe=te=>n.map(J=>String(te[J]??"")).join(" - "),ot=te=>{ue.current=ye,N(te),je.current=te,Be(!1),Se&&(Xt(!1),nt.current?.(!0)),mr(ge),bn(Ce.current?.scrollTop??0),St(G),pt.current=$,Yt(!0),a(te,ue.current),ze(""),ae(!1),$e(null),Qe.current=!0,Ne.current?.focus({preventScroll:!0});const J=er(te);Oe(T("announcements.selected",{value:J}))},Br=te=>{te.stopPropagation(),ue.current=ye,N(null),je.current=null,Be(!1),a(null,ue.current),Oe(T("announcements.cleared"))},vt=m.useCallback(()=>{!je.current&&!ft||(ue.current=je.current,N(null),je.current=null,Be(!1),a(null,ue.current),Oe(T("announcements.cleared")))},[ft,a,T]),gr=m.useCallback(()=>{yr.current=!0,ae(!1),ze(""),Oe(T("announcements.closed")),setTimeout(()=>{if(!de.current)return;const J=Array.from(document.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')),ce=J.findIndex(Re=>de.current?.contains(Re));let we=null;for(let Re=ce+1;Re<J.length;Re++)if(!de.current?.contains(J[Re])){we=J[Re];break}we&&we.focus({preventScroll:!0})},0)},[T]),Mt=m.useCallback(()=>{ae(!1),ze(""),Oe(T("announcements.closed")),Ne.current?.focus({preventScroll:!0})},[T]),br=m.useCallback(()=>{ue.current=je.current,N(null),Be(!1),a(null,ue.current),Oe(T("announcements.cleared"))},[a,T]),Bt=m.useMemo(()=>({clear:br,focus:()=>Ne.current?.focus({preventScroll:!0}),reload:()=>Dt(Le),getValue:()=>je.current,setValue:async te=>{const J=await bt(te);J?(ue.current=je.current,N(J),Be(!1),a(J,ue.current)):(Be(!0),N(null),z?.(te))},open:()=>ae(!0),close:()=>ae(!1),validate:Ve}),[br,Dt,Le,bt,a,z,Ve]);m.useImperativeHandle(U,()=>Bt,[Bt]);const{highlightedIndex:Xe,setHighlightedIndex:Ye,handleKeyDown:it}=Id({records:ge,isOpen:Z,onSelect:ot,onClose:gr,onEscape:Mt,onClear:vt,searchQuery:$});m.useEffect(()=>{Z&&Ye(-1)},[Z,ge,Ye]),m.useEffect(()=>{if(Xe>=0&&Ce.current){const te=Ce.current.querySelector(`[data-index="${Xe}"]`);te?.scrollIntoView&&te.scrollIntoView({block:"nearest",behavior:"smooth"})}},[Xe]);const vr=m.useRef(!1),Qe=m.useRef(!1),yr=m.useRef(!1),kr=()=>{vr.current=!0},lt=te=>{S||Z||te.key==="Backspace"&&i&&!I&&(ye||ft)&&(te.preventDefault(),vt())},Vt=()=>{if(!S&&!I){if(Qe.current){Qe.current=!1;return}if(yr.current){yr.current=!1;return}if(vr.current){vr.current=!1;return}Z||ae(!0)}},tr=m.useCallback(()=>{S||Ze.current||(Ze.current=!0,L?.(je.current))},[L,S]),rr=m.useCallback(te=>{if(S)return;const J=te.relatedTarget;!de.current?.contains(J)&&(Ze.current=!1,V&&!I&&Ve(),k?.(je.current))},[k,V,I,S,Ve]),It=()=>{if($.length>0&&$.length<h)return e.jsx("div",{className:"lookup-field__empty",children:T("minChars",{count:h})});if(oe)return e.jsxs("div",{className:"lookup-field__loading",children:[e.jsx($s,{className:"h-4 w-4 animate-spin"}),e.jsx("span",{children:T("loading")})]});if(se)return e.jsx("div",{className:"lookup-field__error",children:T("error")});if(ge.length===0)return e.jsx("div",{className:"lookup-field__empty",children:A??T("noResults")});const te=ke.length>0;return e.jsxs("div",{ref:Ce,className:"lookup-field__options",onScroll:st,children:[te?e.jsx("div",{style:{height:`${Dr}px`,width:"100%",position:"relative"},children:ke.map(J=>{const ce=ge[J.index],we=J.index;return e.jsx("div",{id:`${H}-option-${ce.Id}`,"data-index":we,className:Sr("lookup-field__option",we===Xe&&"lookup-field__option--highlighted"),role:"option","aria-selected":ye?.Id===ce.Id,tabIndex:-1,onClick:()=>ot(ce),style:{position:"absolute",top:0,left:0,width:"100%",height:`${J.size}px`,transform:`translateY(${J.start}px)`},children:Pe(ce)},ce.Id)})}):ge.map((J,ce)=>e.jsx("div",{id:`${H}-option-${J.Id}`,"data-index":ce,className:Sr("lookup-field__option",ce===Xe&&"lookup-field__option--highlighted"),role:"option","aria-selected":ye?.Id===J.Id,tabIndex:-1,onClick:()=>ot(J),children:Pe(J)},J.Id)),fe&&e.jsx("div",{className:"lookup-field__loading-more",children:e.jsx($s,{className:"h-4 w-4 animate-spin"})})]})},yt=m.useCallback(te=>{Ne.current=te,De.setReference(te)},[De]);return e.jsxs("div",{ref:de,className:Sr("lookup-field flex flex-col gap-2",S&&"lookup-field--disabled",I&&"lookup-field--readonly",pr&&"lookup-field--error",c),role:"combobox","aria-expanded":!S&&Z,"aria-haspopup":"listbox","aria-labelledby":`${H}-label`,"aria-controls":Z?`${H}-listbox`:void 0,"aria-disabled":S||void 0,"aria-readonly":!S&&I||void 0,"aria-invalid":pr||void 0,"aria-required":D||void 0,onKeyDown:S?void 0:it,onFocus:tr,onBlur:rr,children:[e.jsx(v1,{message:et}),e.jsxs("label",{id:`${H}-label`,htmlFor:H,className:"lookup-field__label",children:[r,rt&&e.jsx("span",{className:"lookup-field__required-indicator",children:T("validation.requiredIndicator")})]}),e.jsxs("button",{ref:yt,id:H,type:"button",className:"lookup-field__trigger",onClick:Et,onMouseDown:kr,onKeyDown:lt,onFocus:Vt,disabled:S,tabIndex:S?-1:0,children:[e.jsx("span",{className:"lookup-field__selected-text",children:ft?T("notFound"):ye?er(ye):l??T("placeholder")}),e.jsx(L0,{className:Sr("lookup-field__chevron",Z&&"lookup-field__chevron--open"),"aria-hidden":"true"}),i&&ye&&!I&&!S&&e.jsx(Qa,{className:"lookup-field__clear",onClick:Br,"aria-label":"Clear selection"})]}),E&&e.jsx("span",{className:"lookup-field__error-text",role:"alert",children:E}),Z&&ln.createPortal(e.jsxs("div",{ref:De.setFloating,style:{...Ft,zIndex:9999},className:"lookup-field__dropdown",children:[e.jsx(b1,{ref:ee,value:$,onChange:ze,placeholder:P??T("searchPlaceholder"),listboxId:`${H}-listbox`,activeDescendantId:Xe>=0&&ge[Xe]?`${H}-option-${ge[Xe].Id}`:void 0}),e.jsx("div",{id:`${H}-listbox`,role:"listbox","aria-label":r,children:It()})]}),document.body)]})}const gn=m.forwardRef(j1);gn.displayName="LookupField";class C1 extends Error{constructor(r,n,s){super(r),this.status=n,this.statusText=s,this.name="ApiError"}}const N1={"Content-Type":"application/json"};function S1(t,r){const n={...N1,...r?.headers};return async(s,a)=>{const o=`${t}/${s}/search`,i=a.fields.includes("Id")?a.fields:["Id",...a.fields],l=await fetch(o,{method:"POST",headers:n,body:JSON.stringify({...a,fields:i})});if(!l.ok)throw new C1(`API Error: ${l.status} ${l.statusText}`,l.status,l.statusText);return l.json()}}const R1=({className:t="size-5"})=>e.jsx(Va,{className:t,"aria-hidden":"true"}),go=({className:t="size-5"})=>e.jsx(nc,{className:t,"aria-hidden":"true"}),E1=({className:t="size-5"})=>e.jsx(Ul,{className:t,"aria-hidden":"true"}),on=({className:t="size-5"})=>e.jsx(Ec,{className:t,"aria-hidden":"true"}),ts=({className:t="size-5"})=>e.jsx(Cc,{className:t,"aria-hidden":"true"}),cr=({className:t="size-5"})=>e.jsx(Kl,{className:t,"aria-hidden":"true"}),M1=({className:t="size-5"})=>e.jsx(Bl,{className:t,"aria-hidden":"true"}),I1=({className:t="size-5"})=>e.jsx(cc,{className:t,"aria-hidden":"true"}),L1=({className:t="size-5"})=>e.jsx($c,{className:t,"aria-hidden":"true"}),A1=({className:t="size-5"})=>e.jsx(_c,{className:t,"aria-hidden":"true"}),Er=({className:t="size-5"})=>e.jsx(Fc,{className:t,"aria-hidden":"true"}),z1=({className:t="size-5"})=>e.jsx(Pa,{className:t,"aria-hidden":"true"}),Zt=({className:t="size-5"})=>e.jsx(Wa,{className:t,"aria-hidden":"true"}),Ys=({className:t="size-5"})=>e.jsx(Wl,{className:t,"aria-hidden":"true"}),bo=({className:t="size-5"})=>e.jsx(wc,{className:t,"aria-hidden":"true"}),Pn=bo,Mr=({className:t="size-5"})=>e.jsx(Ba,{className:t,"aria-hidden":"true"}),T1=({className:t="size-5"})=>e.jsx(_a,{className:t,"aria-hidden":"true"}),$1=({className:t="size-5"})=>e.jsx(Ic,{className:t,"aria-hidden":"true"}),O1=({className:t="size-5"})=>e.jsx(ac,{className:t,"aria-hidden":"true"}),Qs=({className:t="size-5"})=>e.jsx(Jl,{className:t,"aria-hidden":"true"}),F1=({className:t="size-5"})=>e.jsx(Yl,{className:t,"aria-hidden":"true"}),D1=({fields:t,data:r,loading:n=!1,emptyMessage:s="No hay registros disponibles",onSort:a,sortColumn:o,sortDirection:i,pagination:l,showRowActions:c=!0,actions:u=[],rowActions:d,className:f="",locale:h="es",enableMultiSelect:p=!1,selectedIds:g=[],onSelectionChange:x})=>{const b=t.filter(w=>w.config?.showInList!==void 0?w.config.showInList:w.config?.visibleInTable!==void 0?w.config.visibleInTable:!0).map(w=>({header:w.header,accessor:w.accessorKey,sortable:w.config?.sortable??!1,align:w.config?.align??"left",width:w.config?.columnWidth,render:w.renderCell?(C,I,S)=>w.renderCell(C,I,S):C=>y(C,w)}));p&&b.unshift({header:e.jsx(Ir,{checked:r.length>0&&g.length===r.length,onChange:w=>{w.target.checked?x?.(r.map(C=>C.id||C.Id||C.codigo)):x?.([])},"aria-label":"Seleccionar todos"}),accessor:(()=>null),align:"center",width:"100px",render:(w,C)=>{const I=C.id||C.Id||C.codigo,S=g.includes(I);return e.jsx("div",{className:"flex justify-center items-center",children:e.jsx(Ir,{checked:S,onChange:O=>{O.target.checked?x?.([...g,I]):x?.(g.filter(L=>L!==I))},"aria-label":"Seleccionar registro"})})}}),c&&b.push({header:"Acciones",accessor:(()=>null),align:"center",stickyRight:!0,width:"180px",render:(w,C,I)=>{const S=u.filter(A=>A.id==="edit"||A.id==="delete"||A.id==="link"),O=u.filter(A=>A.id!=="edit"&&A.id!=="desc"&&A.id!=="delete"&&A.id!=="link"),L=O.slice(0,2),k=O.slice(2),R=[...S,...L],z=k.map(A=>{const P=typeof A.disabled=="function"?A.disabled(C):A.disabled;return{children:A.name,icon:A.icon,disabled:P,onClick:()=>A.action?.(C),className:A.id==="delete"||A.name.toLowerCase().includes("eliminar")||A.name.toLowerCase().includes("delete")?"text-error-content hover:text-error-content dark:text-error-content":""}});return e.jsxs("div",{className:"flex items-center justify-center gap-2 py-1.5",children:[d&&d(C,I),R.map(A=>{const P=A.id==="delete"||A.name.toLowerCase().includes("eliminar")||A.name.toLowerCase().includes("delete");return e.jsx(X,{type:"outline",size:"base",iconOnly:!0,leftIcon:A.icon,ariaLabel:A.name,title:A.name,onClick:()=>A.action?.(C),className:`shrink-0 ${P?"text-error-content hover:text-error-content border-error-content hover:border-error-content":""}`,disabled:typeof A.disabled=="function"?A.disabled(C):A.disabled},A.id||A.name)}),z.length>0&&e.jsx("div",{className:"shrink-0",children:e.jsx(_e,{menuClassName:"w-48",renderTrigger:()=>e.jsx(X,{type:"outline",size:"base",iconOnly:!0,leftIcon:e.jsx(cr,{}),ariaLabel:"Más opciones"}),items:z})})]})}});const y=(w,C)=>{if(w==null)return e.jsx("span",{className:"text-content-tertiary dark:text-content-tertiary",children:"—"});switch(C.type){case"boolean":return e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md text-xs font-bold ${w?"bg-lime-100 text-lime-700 dark:bg-lime-900/30 dark:text-lime-400":"bg-zinc-100 text-zinc-600 dark:bg-zinc-800/30 dark:text-zinc-400"}`,children:w?"Activo":"Inactivo"});case"date":try{return new Date(w).toLocaleDateString(h,{year:"numeric",month:"2-digit",day:"2-digit"})}catch{return String(w)}case"number":return e.jsx("span",{className:"tabular-nums",children:typeof w=="number"?w.toLocaleString(h):w});case"select":return C.options?.find(I=>I.value===w)?.label??String(w);case"email":return e.jsx("a",{href:`mailto:${w}`,className:"text-primary-custom-600 hover:underline dark:text-primary-custom-600",children:w});case"lookup":return C.lookupConfig&&typeof w=="object"&&w!==null&&C.lookupConfig.displayFields.map(I=>w[I]).filter(I=>I!=null).join(" - ")||String(w);default:return String(w)}},j=(w,C)=>{a&&a(String(w),C)};return e.jsx(Qn,{columns:b,data:r,loading:n,emptyMessage:s,variant:"basic",showBorder:!1,showShadow:!1,showPadding:!1,fullWidth:!0,onSort:j,sortColumn:o,sortDirection:i,pagination:l,className:`${f} !bg-transparent !shadow-none !rounded-none !p-0`,isRowSelected:w=>{const C=w.id||w.Id||w.codigo;return g.includes(C)}})},rs=({companies:t,selectedCompany:r,onCompanyChange:n,className:s="",disabled:a=!1})=>{if(!t.length)return null;const o=`
|
|
1481
|
+
color: hsl(${Math.max(0,Math.min(120-120*b,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(a),o=!1,a}return i.updateDeps=l=>{s=l},i}function Wa(e,r){if(e===void 0)throw new Error("Unexpected undefined");return e}const B1=(e,r)=>Math.abs(e-r)<1.01,V1=(e,r,n)=>{let s;return function(...a){e.clearTimeout(s),s=e.setTimeout(()=>r.apply(this,a),n)}},Ha=e=>{const{offsetWidth:r,offsetHeight:n}=e;return{width:r,height:n}},P1=e=>e,_1=e=>{const r=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),s=[];for(let a=r;a<=n;a++)s.push(a);return s},W1=(e,r)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;const a=i=>{const{width:l,height:c}=i;r({width:Math.round(l),height:Math.round(c)})};if(a(Ha(n)),!s.ResizeObserver)return()=>{};const o=new s.ResizeObserver(i=>{const l=()=>{const c=i[0];if(c?.borderBoxSize){const f=c.borderBoxSize[0];if(f){a({width:f.inlineSize,height:f.blockSize});return}}a(Ha(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Za={passive:!0},Ga=typeof window>"u"?!0:"onscrollend"in window,H1=(e,r)=>{const n=e.scrollElement;if(!n)return;const s=e.targetWindow;if(!s)return;let a=0;const o=e.options.useScrollendEvent&&Ga?()=>{}:V1(s,()=>{r(a,!1)},e.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:m,isRtl:h}=e.options;a=m?n.scrollLeft*(h&&-1||1):n.scrollTop,o(),r(a,d)},l=i(!0),c=i(!1);n.addEventListener("scroll",l,Za);const f=e.options.useScrollendEvent&&Ga;return f&&n.addEventListener("scrollend",c,Za),()=>{n.removeEventListener("scroll",l),f&&n.removeEventListener("scrollend",c)}},Z1=(e,r,n)=>{if(r?.borderBoxSize){const s=r.borderBoxSize[0];if(s)return Math.round(s[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},G1=(e,{adjustments:r=0,behavior:n},s)=>{var a,o;const i=e+r;(o=(a=s.scrollElement)==null?void 0:a.scrollTo)==null||o.call(a,{[s.options.horizontal?"left":"top"]:i,behavior:n})};class U1{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const s=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(a=>{a.forEach(o=>{const i=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var a;(a=s())==null||a.disconnect(),n=null},observe:a=>{var o;return(o=s())==null?void 0:o.observe(a,{box:"border-box"})},unobserve:a=>{var o;return(o=s())==null?void 0:o.unobserve(a)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([s,a])=>{typeof a>"u"&&delete n[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:P1,rangeExtractor:_1,onChange:()=>{},measureElement:Z1,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var s,a;(a=(s=this.options).onChange)==null||a.call(s,this,n)},this.maybeNotify=yr(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=o,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,s)=>{const a=new Map,o=new Map;for(let i=s-1;i>=0;i--){const l=n[i];if(a.has(l.lane))continue;const c=o.get(l.lane);if(c==null||l.end>c.end?o.set(l.lane,l):l.end<c.end&&a.set(l.lane,!0),a.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=yr(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,s,a,o,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:s,scrollMargin:a,getItemKey:o,enabled:i,lanes:l}),{key:!1}),this.getMeasurements=yr(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:s,scrollMargin:a,getItemKey:o,enabled:i,lanes:l},c)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const h of this.laneAssignments.keys())h>=n&&this.laneAssignments.delete(h);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const f=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,f),m=new Array(l).fill(void 0);for(let h=0;h<f;h++){const p=d[h];p&&(m[p.lane]=h)}for(let h=f;h<n;h++){const p=o(h),g=this.laneAssignments.get(h);let x,b;if(g!==void 0&&this.options.lanes>1){x=g;const j=m[x],I=j!==void 0?d[j]:void 0;b=I?I.end+this.options.gap:s+a}else{const j=this.options.lanes===1?d[h-1]:this.getFurthestMeasurement(d,h);b=j?j.end+this.options.gap:s+a,x=j?j.lane:h%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(h,x)}const y=c.get(p),C=typeof y=="number"?y:this.options.estimateSize(h),w=b+C;d[h]={index:h,start:b,size:C,end:w,key:p,lane:x},m[x]=h}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=yr(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,s,a,o)=>this.range=n.length>0&&s>0?q1({measurements:n,outerSize:s,scrollOffset:a,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=yr(()=>{let n=null,s=null;const a=this.calculateRange();return a&&(n=a.startIndex,s=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,s]},(n,s,a,o,i)=>o===null||i===null?[]:n({startIndex:o,endIndex:i,overscan:s,count:a}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const s=this.options.indexAttribute,a=n.getAttribute(s);return a?parseInt(a,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(n,s)=>{const a=this.indexFromElement(n),o=this.measurementsCache[a];if(!o)return;const i=o.key,l=this.elementsCache.get(i);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(i,n)),n.isConnected&&this.resizeItem(a,this.options.measureElement(n,s,this))},this.resizeItem=(n,s)=>{const a=this.measurementsCache[n];if(!a)return;const o=this.itemSizeCache.get(a.key)??a.size,i=s-o;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,i,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,s)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((s,a)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(a))});return}this._measureElement(n,void 0)},this.getVirtualItems=yr(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,s)=>{const a=[];for(let o=0,i=n.length;o<i;o++){const l=n[o],c=s[l];a.push(c)}return a},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const s=this.getMeasurements();if(s.length!==0)return Wa(s[Ri(0,s.length-1,a=>Wa(s[a]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,s,a=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),i=this.getScrollOffset();s==="auto"&&(s=n>=i+o?"end":"start"),s==="center"?n+=(a-o)/2:s==="end"&&(n-=o);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,s="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.measurementsCache[n];if(!a)return;const o=this.getSize(),i=this.getScrollOffset();if(s==="auto")if(a.end>=i+o-this.options.scrollPaddingEnd)s="end";else if(a.start<=i+this.options.scrollPaddingStart)s="start";else return[i,s];if(s==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),s];const l=s==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,s,a.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:s="start",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,s),{adjustments:void 0,behavior:a})},this.scrollToIndex=(n,{align:s="auto",behavior:a}={})=>{a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1)),this.currentScrollToIndex=n;let o=0;const i=10,l=f=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(n,f);if(!d){console.warn("Failed to get offset for index:",n);return}const[m,h]=d;this._scrollToOffset(m,{adjustments:void 0,behavior:a}),this.targetWindow.requestAnimationFrame(()=>{const p=()=>{if(this.currentScrollToIndex!==n)return;const g=this.getScrollOffset(),x=this.getOffsetForIndex(n,h);if(!x){console.warn("Failed to get offset for index:",n);return}B1(x[0],g)||c(h)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(p):p()})},c=f=>{this.targetWindow&&this.currentScrollToIndex===n&&(o++,o<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,i),this.targetWindow.requestAnimationFrame(()=>l(f))):console.warn(`Failed to scroll to index ${n} after ${i} attempts.`))};l(s)},this.scrollBy=(n,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var n;const s=this.getMeasurements();let a;if(s.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=((n=s[s.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let i=s.length-1;for(;i>=0&&o.some(l=>l===null);){const l=s[i];o[l.lane]===null&&(o[l.lane]=l.end),i--}a=Math.max(...o.filter(l=>l!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:s,behavior:a})=>{this.options.scrollToFn(n,{behavior:a,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(r)}}const Ri=(e,r,n,s)=>{for(;e<=r;){const a=(e+r)/2|0,o=n(a);if(o<s)e=a+1;else if(o>s)r=a-1;else return a}return e>0?e-1:0};function q1({measurements:e,outerSize:r,scrollOffset:n,lanes:s}){const a=e.length-1,o=c=>e[c].start;if(e.length<=s)return{startIndex:0,endIndex:a};let i=Ri(0,a,o,n),l=i;if(s===1)for(;l<a&&e[l].end<n+r;)l++;else if(s>1){const c=Array(s).fill(0);for(;l<a&&c.some(d=>d<n+r);){const d=e[l];c[d.lane]=d.end,l++}const f=Array(s).fill(n+r);for(;i>=0&&f.some(d=>d>=n);){const d=e[i];f[d.lane]=d.start,i--}i=Math.max(0,i-i%s),l=Math.min(a,l+(s-1-l%s))}return{startIndex:i,endIndex:l}}const Ua=typeof document<"u"?k.useLayoutEffect:k.useEffect;function K1({useFlushSync:e=!0,...r}){const n=k.useReducer(()=>({}),{})[1],s={...r,onChange:(o,i)=>{var l;e&&i?Pt.flushSync(n):n(),(l=r.onChange)==null||l.call(r,o,i)}},[a]=k.useState(()=>new U1(s));return a.setOptions(s),Ua(()=>a._didMount(),[]),Ua(()=>a._willUpdate()),a}function X1(e){return K1({observeElementRect:W1,observeElementOffset:H1,scrollToFn:G1,...e})}const Y1=36,Q1=5;function J1({count:e,parentRef:r,estimateSize:n=Y1,overscan:s=Q1,enabled:a=!0}){const o=X1({count:a?e:0,getScrollElement:()=>r.current,estimateSize:u.useCallback(()=>n,[n]),overscan:s});return{virtualItems:o.getVirtualItems(),totalSize:o.getTotalSize(),scrollToIndex:o.scrollToIndex,measureElement:o.measureElement}}const ef=u.forwardRef(function({value:r,onChange:n,placeholder:s="Search...",className:a,listboxId:o,activeDescendantId:i},l){const c=u.useCallback(()=>{n("")},[n]);return t.jsxs("div",{className:Hr("lookup-field__search-container",a),children:[t.jsx(xu,{className:"lookup-field__search-icon"}),t.jsx("input",{ref:l,type:"text",className:"lookup-field__search",value:r,onChange:f=>n(f.target.value),placeholder:s,"aria-label":s,"aria-autocomplete":"list","aria-controls":o,"aria-activedescendant":i}),r&&t.jsx("button",{type:"button",className:"lookup-field__search-clear",onClick:c,"aria-label":"Clear search",tabIndex:-1,children:t.jsx(di,{className:"h-4 w-4"})})]})});function tf({message:e}){return t.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"lookup-field__live-region",children:e})}const rf=10,nf=50,sf=1;function af({entity:e,label:r,displayFields:n,value:s,onChange:a,fetcher:o,clearable:i=!0,placeholder:l,className:c,pageSize:f=rf,onError:d,searchFields:m,minChars:h=sf,displayValue:p,displayTemplate:g,renderSelected:x,filters:b,getFilters:y,dependencies:C,orderBy:w,bindFields:j,readOnly:I=!1,disabled:N=!1,error:E=!1,onFocus:S,onBlur:v,onReady:R,onInvalidValue:T,noResultsText:A,searchPlaceholder:V,required:F=!1,showRequiredIndicator:Y,validateOnBlur:_=!0,onValidationChange:B,errorText:L},Z){const{t:D}=O1(),q=u.useMemo(()=>w??{field:n[0],direction:"asc"},[w,n]),P=u.useId(),[H,ae]=u.useState(!1),[ie,ce]=u.useState(!1),[oe,Me]=u.useState(null),[pe,te]=u.useState([]),[ve,M]=u.useState(null),[G,O]=u.useState(1),[le,J]=u.useState(!0),[ge,we]=u.useState(!1),ne=u.useRef(null),ue=u.useRef(null),Le=u.useRef(JSON.stringify(C??[])),Ce=u.useRef(null),ee=u.useRef(null),Ie=u.useRef(null),[$,Fe]=u.useState(""),Re=u1($),[Ue,ze]=u.useState(""),Tt=u.useRef(!1),be=u.useRef(null);be.current=ve;const de=u.useRef(null),rt=u.useRef(!1),ye=u.useRef(T);u.useEffect(()=>{ye.current=T},[T]);const{refs:qe,floatingStyles:kt}=F1({enabled:H}),Ht=u.useCallback(()=>{H&&(rt.current&&(rt.current=!1,v?.(be.current)),ae(!1),Fe(""))},[H,v]);$1(de,Ht,H,[qe.floating]);const{virtualItems:Ne,totalSize:mr}=J1({count:pe.length,parentRef:Ce,enabled:H&&pe.length>0}),[mt,Ye]=u.useState(!1),[fe,Be]=u.useState(!1),[Ae,nt]=u.useState([]),[De,Ke]=u.useState(0),[Ee,Qe]=u.useState(1),[Se,Je]=u.useState(!1),Ve=u.useRef(""),et=u.useRef(!1),tt=u.useRef(1),ht=E||fe,_e=Y??F,Xe=u.useRef(B);u.useEffect(()=>{Xe.current=B},[B]);const jt=u.useCallback(()=>ws(y?y():b),[b,y]),nr=u.useCallback(async(se="")=>{ne.current&&ne.current.abort();const re=new AbortController;ne.current=re;try{ce(!0),Me(null),ze(D("announcements.loading"));const he=jt(),Te=[...new Set(["Id",...n,...j??[]])],Oe=await o(e,{fields:Te,search:se.length>=h?se:"",searchFields:m??n,page:1,pageSize:f,filters:he,orderBy:q});if(re.signal.aborted)return;te(Oe.data),!Tt.current&&R&&(Tt.current=!0,setTimeout(()=>{R({firstPageLoaded:!0},sr)},0)),Oe.data.length===0?ze(D("announcements.noResults")):ze(D("announcements.opened",{count:Oe.data.length})),Oe.data.length<f&&J(!1)}catch(he){if(he instanceof Error&&he.name==="AbortError")return;const Te=he instanceof Error?he:new Error("Unknown error");Me(Te),d?.(Te)}finally{re.signal.aborted||ce(!1)}},[e,n,j,m,f,h,d,R,jt,q,o]),zt=u.useCallback(async(se="")=>{if(et.current||ge||!le)return;const re=tt.current;try{we(!0),ze(D("announcements.loadingMore"));const he=jt(),Te=re+1,Oe=[...new Set(["Id",...n,...j??[]])],Mt=await o(e,{fields:Oe,search:se.length>=h?se:"",searchFields:m??n,page:Te,pageSize:f,filters:he,orderBy:q});te(un=>[...un,...Mt.data]),tt.current=Te,O(Te),ze(D("announcements.resultsLoaded",{count:Mt.data.length})),Mt.data.length<f&&J(!1)}catch(he){if(he instanceof Error&&he.name==="AbortError")return;const Te=he instanceof Error?he:new Error("Unknown error");d?.(Te)}finally{we(!1)}},[e,n,j,m,f,h,ge,le,d,jt,q,o,D]),Dt=u.useCallback(async se=>{try{const re=[...new Set(["Id",...n,...j??[]])];console.log("[LookupField] fetchAndSetRecordById:",{recordId:se,entity:e,allFields:re});const he=await o(e,{fields:re,filters:[[{Id:se}]],page:1,pageSize:1});return console.log("[LookupField] fetchAndSetRecordById response:",he),he.data[0]??null}catch(re){return console.error("[LookupField] fetchAndSetRecordById error:",re),null}},[e,n,j,o]),at=u.useCallback(()=>N||I?(Be(!1),Xe.current?.(!0),!0):F&&!be.current?(Be(!0),Xe.current?.(!1),!1):(Be(!1),Xe.current?.(!0),!0),[F,I,N]),Ct=u.useCallback(()=>{const se=Ce.current;if(!se||ge||!le)return;const{scrollTop:re,scrollHeight:he,clientHeight:Te}=se;he-re-Te<nf&&zt(Re)},[ge,le,zt,Re]);u.useEffect(()=>{H&&ee.current&&ee.current.focus({preventScroll:!0})},[H]),u.useEffect(()=>{H&&(Re.length===0||Re.length>=h)&&(Se&&Ve.current===Re&&Ae.length>0?(et.current=!0,te(Ae),tt.current=Ee,O(Ee),J(!0),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=De),setTimeout(()=>{et.current=!1},0)})):(tt.current=1,O(1),J(!0),te([]),nr(Re)))},[H,Re,nr,h,Se,Ae,Ee,De]),u.useEffect(()=>(H||(Fe(""),tt.current=1,O(1),J(!0),we(!1)),()=>{ne.current&&ne.current.abort()}),[H]);const Zt=u.useRef(void 0),pt=u.useRef(Dt);pt.current=Dt;const Nt=u.useRef(0);u.useEffect(()=>{const re=Zt.current===void 0||Zt.current!==s;if(Zt.current=s,s===null){Ye(!1);return}if(!re)return;const he=++Nt.current;pt.current(s).then(Te=>{Nt.current===he&&(Te?(M(Te),Ye(!1)):(Ye(!0),M(null),ye.current?.(s)))})},[s]);const hr=JSON.stringify(C??[]);u.useEffect(()=>{Le.current!==hr&&(Le.current=hr,ne.current&&ne.current.abort(),Je(!1),te([]),M(null),tt.current=1,O(1),J(!0),ae(!1),Fe(""))},[hr]);const xt=JSON.stringify(b??[]),zr=u.useRef(xt);u.useEffect(()=>{zr.current!==xt&&(zr.current=xt,Je(!1))},[xt]);const pr=u.useCallback(se=>{if(x)return x(se);if(g)return i1(g,se);if(p){const re=se[p];return re!=null?String(re):""}return n.map(re=>{const he=se[re];return he!=null?String(he):""}).join(" - ")},[x,g,p,n]),Gt=()=>{N||I||ae(se=>!se)},ot=se=>n.map(re=>String(se[re]??"")).join(" - "),St=se=>{ue.current=ve,M(se),be.current=se,Ye(!1),fe&&(Be(!1),Xe.current?.(!0)),nt(pe),Ke(Ce.current?.scrollTop??0),Qe(G),Ve.current=$,Je(!0),a(se,ue.current),Fe(""),ae(!1),Me(null),vt.current=!0,Ie.current?.focus({preventScroll:!0});const re=pr(se);ze(D("announcements.selected",{value:re}))},dn=se=>{se.stopPropagation(),ue.current=ve,M(null),be.current=null,Ye(!1),a(null,ue.current),ze(D("announcements.cleared"))},Ot=u.useCallback(()=>{!be.current&&!mt||(ue.current=be.current,M(null),be.current=null,Ye(!1),a(null,ue.current),ze(D("announcements.cleared")))},[mt,a,D]),Dr=u.useCallback(()=>{Fr.current=!0,ae(!1),Fe(""),ze(D("announcements.closed")),setTimeout(()=>{if(!de.current)return;const re=Array.from(document.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')),he=re.findIndex(Oe=>de.current?.contains(Oe));let Te=null;for(let Oe=he+1;Oe<re.length;Oe++)if(!de.current?.contains(re[Oe])){Te=re[Oe];break}Te&&Te.focus({preventScroll:!0})},0)},[D]),Ut=u.useCallback(()=>{ae(!1),Fe(""),ze(D("announcements.closed")),Ie.current?.focus({preventScroll:!0})},[D]),Or=u.useCallback(()=>{ue.current=be.current,M(null),Ye(!1),a(null,ue.current),ze(D("announcements.cleared"))},[a,D]),sr=u.useMemo(()=>({clear:Or,focus:()=>Ie.current?.focus({preventScroll:!0}),reload:()=>nr(Re),getValue:()=>be.current,setValue:async se=>{const re=await Dt(se);re?(ue.current=be.current,M(re),Ye(!1),a(re,ue.current)):(Ye(!0),M(null),T?.(se))},open:()=>ae(!0),close:()=>ae(!1),validate:at}),[Or,nr,Re,Dt,a,T,at]);u.useImperativeHandle(Z,()=>sr,[sr]);const{highlightedIndex:gt,setHighlightedIndex:bt,handleKeyDown:Rt}=f1({records:pe,isOpen:H,onSelect:St,onClose:Dr,onEscape:Ut,onClear:Ot,searchQuery:$});u.useEffect(()=>{H&&bt(-1)},[H,pe,bt]),u.useEffect(()=>{if(gt>=0&&Ce.current){const se=Ce.current.querySelector(`[data-index="${gt}"]`);se?.scrollIntoView&&se.scrollIntoView({block:"nearest",behavior:"smooth"})}},[gt]);const $r=u.useRef(!1),vt=u.useRef(!1),Fr=u.useRef(!1),Br=()=>{$r.current=!0},Et=se=>{N||H||se.key==="Backspace"&&i&&!I&&(ve||mt)&&(se.preventDefault(),Ot())},ar=()=>{if(!N&&!I){if(vt.current){vt.current=!1;return}if(Fr.current){Fr.current=!1;return}if($r.current){$r.current=!1;return}H||ae(!0)}},xr=u.useCallback(()=>{N||rt.current||(rt.current=!0,S?.(be.current))},[S,N]),gr=u.useCallback(se=>{if(N)return;const re=se.relatedTarget;!de.current?.contains(re)&&(rt.current=!1,_&&!I&&at(),v?.(be.current))},[v,_,I,N,at]),qt=()=>{if($.length>0&&$.length<h)return t.jsx("div",{className:"lookup-field__empty",children:D("minChars",{count:h})});if(ie)return t.jsxs("div",{className:"lookup-field__loading",children:[t.jsx(Aa,{className:"h-4 w-4 animate-spin"}),t.jsx("span",{children:D("loading")})]});if(oe)return t.jsx("div",{className:"lookup-field__error",children:D("error")});if(pe.length===0)return t.jsx("div",{className:"lookup-field__empty",children:A??D("noResults")});const se=Ne.length>0;return t.jsxs("div",{ref:Ce,className:"lookup-field__options",onScroll:Ct,children:[se?t.jsx("div",{style:{height:`${mr}px`,width:"100%",position:"relative"},children:Ne.map(re=>{const he=pe[re.index],Te=re.index;return t.jsx("div",{id:`${P}-option-${he.Id}`,"data-index":Te,className:Hr("lookup-field__option",Te===gt&&"lookup-field__option--highlighted"),role:"option","aria-selected":ve?.Id===he.Id,tabIndex:-1,onClick:()=>St(he),style:{position:"absolute",top:0,left:0,width:"100%",height:`${re.size}px`,transform:`translateY(${re.start}px)`},children:ot(he)},he.Id)})}):pe.map((re,he)=>t.jsx("div",{id:`${P}-option-${re.Id}`,"data-index":he,className:Hr("lookup-field__option",he===gt&&"lookup-field__option--highlighted"),role:"option","aria-selected":ve?.Id===re.Id,tabIndex:-1,onClick:()=>St(re),children:ot(re)},re.Id)),ge&&t.jsx("div",{className:"lookup-field__loading-more",children:t.jsx(Aa,{className:"h-4 w-4 animate-spin"})})]})},$t=u.useCallback(se=>{Ie.current=se,qe.setReference(se)},[qe]);return t.jsxs("div",{ref:de,className:Hr("lookup-field flex flex-col gap-2",N&&"lookup-field--disabled",I&&"lookup-field--readonly",ht&&"lookup-field--error",c),role:"combobox","aria-expanded":!N&&H,"aria-haspopup":"listbox","aria-labelledby":`${P}-label`,"aria-controls":H?`${P}-listbox`:void 0,"aria-disabled":N||void 0,"aria-readonly":!N&&I||void 0,"aria-invalid":ht||void 0,"aria-required":F||void 0,onKeyDown:N?void 0:Rt,onFocus:xr,onBlur:gr,children:[t.jsx(tf,{message:Ue}),t.jsxs("label",{id:`${P}-label`,htmlFor:P,className:"lookup-field__label",children:[r,_e&&t.jsx("span",{className:"lookup-field__required-indicator",children:D("validation.requiredIndicator")})]}),t.jsxs("button",{ref:$t,id:P,type:"button",className:"lookup-field__trigger",onClick:Gt,onMouseDown:Br,onKeyDown:Et,onFocus:ar,disabled:N,tabIndex:N?-1:0,children:[t.jsx("span",{className:"lookup-field__selected-text",children:mt?D("notFound"):ve?pr(ve):l??D("placeholder")}),t.jsx(mu,{className:Hr("lookup-field__chevron",H&&"lookup-field__chevron--open"),"aria-hidden":"true"}),i&&ve&&!I&&!N&&t.jsx(di,{className:"lookup-field__clear",onClick:dn,"aria-label":"Clear selection"})]}),L&&t.jsx("span",{className:"lookup-field__error-text",role:"alert",children:L}),H&&Pt.createPortal(t.jsxs("div",{ref:qe.setFloating,style:{...kt,zIndex:9999},className:"lookup-field__dropdown",children:[t.jsx(ef,{ref:ee,value:$,onChange:Fe,placeholder:V??D("searchPlaceholder"),listboxId:`${P}-listbox`,activeDescendantId:gt>=0&&pe[gt]?`${P}-option-${pe[gt].Id}`:void 0}),t.jsx("div",{id:`${P}-listbox`,role:"listbox","aria-label":r,children:qt()})]}),document.body)]})}const Gn=u.forwardRef(af);Gn.displayName="LookupField";class of extends Error{constructor(r,n,s){super(r),this.status=n,this.statusText=s,this.name="ApiError"}}const lf={"Content-Type":"application/json"};function cf(e,r){const n={...lf,...r?.headers};return async(s,a)=>{const o=`${e}/${s}/search`,i=a.fields.includes("Id")?a.fields:["Id",...a.fields],l=await fetch(o,{method:"POST",headers:n,body:JSON.stringify({...a,fields:i})});if(!l.ok)throw new of(`API Error: ${l.status} ${l.statusText}`,l.status,l.statusText);return l.json()}}const df=({className:e="size-5"})=>t.jsx(Qo,{className:e,"aria-hidden":"true"}),Ei=({className:e="size-5"})=>t.jsx(B0,{className:e,"aria-hidden":"true"}),uf=({className:e="size-5"})=>t.jsx(M0,{className:e,"aria-hidden":"true"}),Tn=({className:e="size-5"})=>t.jsx(dd,{className:e,"aria-hidden":"true"}),_s=({className:e="size-5"})=>t.jsx(od,{className:e,"aria-hidden":"true"}),Sr=({className:e="size-5"})=>t.jsx(L0,{className:e,"aria-hidden":"true"}),ff=({className:e="size-5"})=>t.jsx(w0,{className:e,"aria-hidden":"true"}),mf=({className:e="size-5"})=>t.jsx(Z0,{className:e,"aria-hidden":"true"}),hf=({className:e="size-5"})=>t.jsx(gd,{className:e,"aria-hidden":"true"}),pf=({className:e="size-5"})=>t.jsx(Cd,{className:e,"aria-hidden":"true"}),Cr=({className:e="size-5"})=>t.jsx(vd,{className:e,"aria-hidden":"true"}),xf=({className:e="size-5"})=>t.jsx(Jo,{className:e,"aria-hidden":"true"}),tr=({className:e="size-5"})=>t.jsx(ti,{className:e,"aria-hidden":"true"}),qa=({className:e="size-5"})=>t.jsx(N0,{className:e,"aria-hidden":"true"}),Mi=({className:e="size-5"})=>t.jsx(sd,{className:e,"aria-hidden":"true"}),js=Mi,Gr=({className:e="size-5"})=>t.jsx(Yo,{className:e,"aria-hidden":"true"}),gf=({className:e="size-5"})=>t.jsx(ei,{className:e,"aria-hidden":"true"}),bf=({className:e="size-5"})=>t.jsx(fd,{className:e,"aria-hidden":"true"}),vf=({className:e="size-5"})=>t.jsx(P0,{className:e,"aria-hidden":"true"}),Ii=({className:e="size-5"})=>t.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:e,"aria-hidden":"true",children:t.jsx("path",{d:"M7 4a1 1 0 100-2 1 1 0 000 2zM13 4a1 1 0 100-2 1 1 0 000 2zM7 11a1 1 0 100-2 1 1 0 000 2zM13 11a1 1 0 100-2 1 1 0 000 2zM7 18a1 1 0 100-2 1 1 0 000 2zM13 18a1 1 0 100-2 1 1 0 000 2z"})}),Ka=({className:e="size-5"})=>t.jsx(D0,{className:e,"aria-hidden":"true"}),yf=({className:e="size-5"})=>t.jsx(T0,{className:e,"aria-hidden":"true"}),wf=({fields:e,data:r,loading:n=!1,emptyMessage:s="No hay registros disponibles",onSort:a,sortColumn:o,sortDirection:i,pagination:l,showRowActions:c=!0,actions:f=[],rowActions:d,className:m="",locale:h="es",enableMultiSelect:p=!1,selectedIds:g=[],onSelectionChange:x})=>{const b=e.filter(w=>w.config?.showInList!==void 0?w.config.showInList:w.config?.visibleInTable!==void 0?w.config.visibleInTable:!0).map(w=>({header:w.header,accessor:w.accessorKey,sortable:w.config?.sortable??!1,align:w.config?.align??"left",width:w.config?.columnWidth,render:w.renderCell?(j,I,N)=>w.renderCell(j,I,N):j=>y(j,w)}));p&&b.unshift({header:t.jsx(Xr,{checked:r.length>0&&g.length===r.length,onChange:w=>{w.target.checked?x?.(r.map(j=>j.id||j.Id||j.codigo)):x?.([])},"aria-label":"Seleccionar todos"}),accessor:(()=>null),align:"center",width:"100px",render:(w,j)=>{const I=j.id||j.Id||j.codigo,N=g.includes(I);return t.jsx("div",{className:"flex justify-center items-center",children:t.jsx(Xr,{checked:N,onChange:E=>{E.target.checked?x?.([...g,I]):x?.(g.filter(S=>S!==I))},"aria-label":"Seleccionar registro"})})}}),c&&b.push({header:"Acciones",accessor:(()=>null),align:"center",stickyRight:!0,width:"180px",render:(w,j,I)=>{const N=f.filter(A=>A.id==="edit"||A.id==="delete"||A.id==="link"),E=f.filter(A=>A.id!=="edit"&&A.id!=="desc"&&A.id!=="delete"&&A.id!=="link"),S=E.slice(0,2),v=E.slice(2),R=[...N,...S],T=v.map(A=>{const V=typeof A.disabled=="function"?A.disabled(j):A.disabled;return{children:A.name,icon:A.icon,disabled:V,onClick:()=>A.action?.(j),className:A.id==="delete"||A.name.toLowerCase().includes("eliminar")||A.name.toLowerCase().includes("delete")?"text-error-content hover:text-error-content dark:text-error-content":""}});return t.jsxs("div",{className:"flex items-center justify-center gap-2 py-1.5",children:[d&&d(j,I),R.map(A=>{const V=A.id==="delete"||A.name.toLowerCase().includes("eliminar")||A.name.toLowerCase().includes("delete");return t.jsx(Q,{type:"outline",size:"base",iconOnly:!0,leftIcon:A.icon,ariaLabel:A.name,title:A.name,onClick:()=>A.action?.(j),className:`shrink-0 ${V?"text-error-content hover:text-error-content border-error-content hover:border-error-content":""}`,disabled:typeof A.disabled=="function"?A.disabled(j):A.disabled},A.id||A.name)}),T.length>0&&t.jsx("div",{className:"shrink-0",children:t.jsx(it,{menuClassName:"w-48",renderTrigger:()=>t.jsx(Q,{type:"outline",size:"base",iconOnly:!0,leftIcon:t.jsx(Sr,{}),ariaLabel:"Más opciones"}),items:T})})]})}});const y=(w,j)=>{if(w==null)return t.jsx("span",{className:"text-content-tertiary dark:text-content-tertiary",children:"—"});switch(j.type){case"boolean":return t.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md text-xs font-bold ${w?"bg-lime-100 text-lime-700 dark:bg-lime-900/30 dark:text-lime-400":"bg-zinc-100 text-zinc-600 dark:bg-zinc-800/30 dark:text-zinc-400"}`,children:w?"Activo":"Inactivo"});case"date":try{return new Date(w).toLocaleDateString(h,{year:"numeric",month:"2-digit",day:"2-digit"})}catch{return String(w)}case"number":return t.jsx("span",{className:"tabular-nums",children:typeof w=="number"?w.toLocaleString(h):w});case"select":return j.options?.find(I=>I.value===w)?.label??String(w);case"email":return t.jsx("a",{href:`mailto:${w}`,className:"text-primary-custom-600 hover:underline dark:text-primary-custom-600",children:w});case"lookup":return j.lookupConfig&&typeof w=="object"&&w!==null&&j.lookupConfig.displayFields.map(I=>w[I]).filter(I=>I!=null).join(" - ")||String(w);default:return String(w)}},C=(w,j)=>{a&&a(String(w),j)};return t.jsx(Bs,{columns:b,data:r,loading:n,emptyMessage:s,variant:"basic",showBorder:!1,showShadow:!1,showPadding:!1,fullWidth:!0,onSort:C,sortColumn:o,sortDirection:i,pagination:l,className:`${m} !bg-transparent !shadow-none !rounded-none !p-0`,isRowSelected:w=>{const j=w.id||w.Id||w.codigo;return g.includes(j)}})},Ws=({companies:e,selectedCompany:r,onCompanyChange:n,className:s="",disabled:a=!1})=>{if(!e.length)return null;const o=`
|
|
1482
1482
|
flex items-center gap-1 px-[6px] py-[4px] rounded-[6px]
|
|
1483
1483
|
bg-[#f3e8ff] dark:bg-purple-900/20 border border-purple-200 dark:border-purple-800
|
|
1484
1484
|
text-[#7e22ce] dark:text-purple-300 transition-all focus:outline-none
|
|
1485
1485
|
${a?"opacity-60 cursor-not-allowed":"hover:bg-[#ebd5ff] dark:hover:bg-purple-900/40 cursor-pointer"}
|
|
1486
|
-
`.replace(/\s+/g," ").trim(),i="text-[12px] font-normal leading-4",l="w-3 h-3",
|
|
1486
|
+
`.replace(/\s+/g," ").trim(),i="text-[12px] font-normal leading-4",l="w-3 h-3",f=!r||String(r.uuid)==="000"?_s:Ei,d=t.jsxs("button",{type:"button",className:o,disabled:a,children:[t.jsx(f,{className:l}),t.jsx("span",{className:i,children:r?.name||"Seleccionar Compañía"}),t.jsx(Gr,{className:l})]});return t.jsx("div",{className:`relative inline-block ${s}`,children:a?d:t.jsx(it,{menuClassName:"w-72",renderTrigger:()=>d,items:e.map(m=>({children:t.jsxs("div",{className:"flex flex-col py-1",children:[t.jsx("span",{className:"font-bold text-sm text-content-primary dark:text-dark-content-primary leading-tight",children:m.name}),t.jsx("div",{className:"flex items-center gap-2 mt-0.5",children:t.jsxs("span",{className:"text-[10px] font-medium text-content-tertiary uppercase tracking-wider",children:["Código: ",m.code]})})]}),onClick:()=>n(m),className:r?.uuid===m.uuid?"bg-purple-50 dark:bg-purple-900/20":""}))})})},Xa={},Zr=u.forwardRef(({fields:e,entityName:r,initialData:n,isEditing:s=!1,loading:a=!1,onSubmit:o,onCancel:i,saveButtonText:l="Guardar",cancelButtonText:c="Cancelar",columns:f=2,width:d="600px",className:m="",actions:h=[],hideHeaderFooter:p=!1,fullWidthButton:g=!1,isReadOnly:x=!1,id:b,selectedCompany:y,activeByCompany:C=!1,showGlobalValues:w=!1,onSearchMatches:j,canOverrideMultiCompany:I=!0,companies:N=[],onCompanyChange:E,onShowGlobalValuesChange:S,onUseGlobalData:v,onCreateNew:R,onLinkCompanies:T},A)=>{const[V,F]=u.useState({values:n||Xa,errors:{},touched:{},isSubmitting:!1}),[Y,_]=u.useState({show:!1,message:"",color:"zinc"}),B=u.useRef("");u.useEffect(()=>{F(M=>({...M,values:n||Xa,errors:{},touched:{}}))},[n]),u.useImperativeHandle(A,()=>({revertAllToGlobal:()=>{const M=n?._globalValues;if(!M)return;const G=e.filter(O=>O.config?.allowMultiCompanyOverride);F(O=>{const le={...O.values};return G.forEach(J=>{const ge=J.accessorKey;M[ge]!==void 0&&(le[ge]=M[ge])}),{...O,values:le}})}}));const L=u.useCallback(M=>{const G=M.split(".");let O=V.values;for(const le of G){if(O==null)return;O=O[le]}return O},[V.values]),Z=u.useCallback((M,G)=>{F(O=>{const le=M.split("."),J={...O.values};if(le.length===1)J[M]=G;else{let ge=J;for(let we=0;we<le.length-1;we++)ge[le[we]]||(ge[le[we]]={}),ge=ge[le[we]];ge[le[le.length-1]]=G}return{...O,values:J,touched:{...O.touched,[M]:!0}}})},[]),D=u.useCallback(M=>{const G=M.accessorKey,O=n?._globalValues;O&&O[G]!==void 0&&Z(G,O[G])},[n,Z]),q=u.useMemo(()=>{if(!h.length)return[];const M=s?h.filter(O=>O.id!=="edit"):h,G=n;return M.map(O=>{const le=typeof O.disabled=="function"?O.disabled(G):O.disabled;return{children:O.name,icon:O.icon,disabled:le,onClick:()=>O.action?.(G),className:O.name.toLowerCase().includes("eliminar")||O.name.toLowerCase().includes("delete")?"text-error-content hover:text-error-content dark:text-error-content":""}})},[h,n,s]),P=u.useMemo(()=>{const M=[...q],G=!y||String(y.uuid)==="000";if(C&&s){const O=[];return G||(O.push({children:"Usar datos globales",icon:t.jsx(_s,{className:"w-4 h-4"}),onClick:v}),O.push({children:t.jsxs("div",{className:"flex items-center justify-between w-full gap-4 py-1",children:[t.jsx("span",{className:"text-sm font-medium",children:"Mostrar valores globales"}),t.jsx(Jt,{checked:w,onChange:()=>{},className:"!w-auto pointer-events-none"})]}),onClick:()=>S?.(!w),className:"hover:bg-transparent"}),O.push({isDivider:!0})),O.push({children:"Vincular compañías",icon:t.jsx(Tn,{className:"w-4 h-4"}),onClick:T}),O.push({children:"Crear nuevo registro",icon:t.jsx(Cr,{className:"w-4 h-4"}),onClick:R}),[...O,...M]}return M},[q,C,s,y,v,w,S,T,R]),H=u.useCallback((M,G)=>typeof M=="function"?M(G):!!M,[]),ae=u.useCallback((M,G)=>{if(H(M.config?.required,V.values)&&(G==null||G===""))return M.config?.errorMessage||`${M.header} es obligatorio`;if(M.config?.validate)return M.config.validate(G,V.values);if(G!=null&&G!==""){const le=String(G);if(M.config?.maxLength!==void 0&&le.length>M.config.maxLength)return`La longitud máxima es de ${M.config.maxLength} caracteres`;if(M.config?.minLength!==void 0&&le.length<M.config.minLength)return`La longitud mínima es de ${M.config.minLength} caracteres`;switch(M.type){case"email":if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(le))return"Ingresa un correo electrónico válido";break;case"number":const ge=Number(G);if(isNaN(ge))return"Ingresa un número válido";if(M.config?.min!==void 0&&ge<M.config.min)return`El valor mínimo es ${M.config.min}`;if(M.config?.max!==void 0&&ge>M.config.max)return`El valor máximo es ${M.config.max}`;break}}},[V.values]),ie=u.useCallback(()=>{const M={};let G=!0;return e.filter(O=>O.config?.visibleInForm!==!1).forEach(O=>{const le=L(O.accessorKey),J=ae(O,le);J&&(M[O.accessorKey]=J,G=!1)}),F(O=>({...O,errors:M})),G},[e,L,ae]);u.useEffect(()=>{pe.forEach(M=>{if(M.config?.onMount){const G=O=>Z(M.accessorKey,O);M.config.onMount(G,n)}})},[]);const ce=u.useCallback(M=>{M.preventDefault(),ie()&&(F(G=>({...G,isSubmitting:!0})),o(V.values))},[V.values,o,ie]),oe=(M,G)=>{M.config?.onBlur&&M.config.onBlur(G,M.accessorKey,V.values);const O=typeof G=="string"?G.trim():"";!s&&C&&M.config?.checkMatchesOnBlur&&O.length>=3&&O!==B.current&&(B.current=O,j?.(M,O))},Me=M=>{const G=M.accessorKey,O=L(G),le=V.errors[G],J=H(M.config?.disabled,V.values),ge=String(y?.uuid||"000"),we=s&&C&&!!M.config?.allowMultiCompanyOverride&&ge!=="000",ne=s&&C&&ge!=="000"&&!M.config?.allowMultiCompanyOverride,ue=we&&!I,Le=a||x||J||s&&!!M.config?.disabledOnEdit||ne||ue,Ce=H(M.config?.required,V.values),ee=(()=>{if(M.renderInput)return M.renderInput(O,$=>Z(G,$),M,V.values);const Ie={label:we?void 0:M.header,error:!!le,disabled:Le,fullWidth:!0,required:Ce};switch(M.type){case"text":case"email":return t.jsx(Ge,{...Ie,type:M.type,value:O??"",onChange:$=>Z(G,$.target.value),onBlur:$=>oe(M,$.target.value),placeholder:M.config?.placeholder,helperText:M.config?.helperText,errorMessage:le,maxLength:M.config?.maxLength});case"number":return t.jsx(Ge,{...Ie,type:"number",value:O??"",onChange:$=>Z(G,$.target.value?Number($.target.value):""),onBlur:$=>oe(M,$.target.value?Number($.target.value):""),placeholder:M.config?.placeholder,helperText:M.config?.helperText,errorMessage:le,min:M.config?.min,max:M.config?.max,step:M.config?.step});case"date":return t.jsx(Ge,{...Ie,type:"date",value:O??"",onChange:$=>Z(G,$.target.value),onBlur:$=>oe(M,$.target.value),placeholder:M.config?.placeholder,helperText:M.config?.helperText,errorMessage:le});case"boolean":return we?t.jsx("div",{className:"flex items-center h-10",children:t.jsx(Jt,{checked:!!O,onChange:$=>Z(G,$.target.checked),disabled:Le,className:"!w-auto"})}):t.jsxs("div",{className:"flex items-center justify-between py-2",children:[t.jsxs("span",{className:"text-sm font-bold leading-5 text-content-primary dark:text-dark-content-primary",children:[M.header,Ce&&t.jsx("span",{className:"ml-1 text-error-content",children:"*"})]}),t.jsx(Jt,{checked:!!O,onChange:$=>Z(G,$.target.checked),disabled:Le})]});case"select":return t.jsx(ur,{...Ie,options:M.options?.map($=>({value:$.value,label:$.label,icon:$.icon,disabled:$.disabled}))??[],value:O,onChange:$=>Z(G,$),onBlur:()=>oe(M,O),placeholder:M.config?.placeholder||"Seleccionar...",description:M.config?.helperText});case"lookup":return M.lookupConfig?t.jsx(Gn,{...Ie,entity:M.lookupConfig.entity,fetcher:M.lookupConfig.fetcher,displayFields:M.lookupConfig.displayFields,value:O?String(O):null,onChange:$=>{if(!$){Z(G,null),oe(M,null);return}const Fe=M.lookupConfig?.valueField||"Id";let Re=$[Fe];Re===void 0&&Fe==="Id"&&$.id!==void 0&&(Re=$.id),Z(G,Re),oe(M,Re)},placeholder:M.config?.placeholder||"Buscar...",errorText:le,required:Ce}):null;default:return t.jsx(Ge,{...Ie,type:"text",value:O??"",onChange:$=>Z(G,$.target.value),onBlur:$=>oe(M,$.target.value),placeholder:M.config?.placeholder,helperText:M.config?.helperText,errorMessage:le})}})();if(we){const Ie=M.config?.getGlobalValue?M.config.getGlobalValue(n):"Sin definir";return t.jsxs("div",{className:"flex flex-col gap-2 w-full mb-2",children:[t.jsx("div",{className:"flex items-center w-full font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:t.jsxs("span",{children:[M.header,Ce&&t.jsx("span",{className:"ml-1 text-error-content",children:"*"})]})}),t.jsxs("div",{className:"flex items-center gap-2 w-full",children:[t.jsx("div",{className:"flex-1 min-w-0",children:ee}),t.jsx("div",{className:"shrink-0",children:t.jsx(Q,{type:"outline",iconOnly:!0,leftIcon:t.jsx(uf,{className:"w-[12px] h-[12px]"}),onClick:()=>D(M),ariaLabel:"Revertir a valor global",title:"Revertir a valor global",className:`
|
|
1487
1487
|
!h-[38px]
|
|
1488
1488
|
!w-[38px]
|
|
1489
1489
|
!bg-[#f3e8ff]
|
|
@@ -1494,23 +1494,23 @@
|
|
|
1494
1494
|
dark:!border-purple-800
|
|
1495
1495
|
dark:!text-purple-300
|
|
1496
1496
|
transition-all
|
|
1497
|
-
`})})]}),w&&
|
|
1497
|
+
`})})]}),w&&t.jsxs("p",{className:"text-sm font-normal leading-5 text-[#7e22ce] dark:text-purple-400",children:["Global: ",Ie]})]})}return ee},pe=e.filter(M=>s?M.config?.showInEdit!==void 0?M.config.showInEdit:M.config?.visibleInForm!==void 0?M.config.visibleInForm:!0:M.config?.showInCreate!==void 0?M.config.showInCreate:M.config?.visibleInForm!==void 0?M.config.visibleInForm:!0),te=`
|
|
1498
1498
|
flex
|
|
1499
1499
|
flex-col
|
|
1500
1500
|
bg-white
|
|
1501
1501
|
dark:bg-dark-bg-primary
|
|
1502
1502
|
max-h-full
|
|
1503
1503
|
w-full
|
|
1504
|
-
${
|
|
1505
|
-
`.replace(/\s+/g," ").trim(),
|
|
1504
|
+
${m}
|
|
1505
|
+
`.replace(/\s+/g," ").trim(),ve=`
|
|
1506
1506
|
grid
|
|
1507
1507
|
grid-cols-1
|
|
1508
|
-
${
|
|
1509
|
-
${
|
|
1510
|
-
${
|
|
1508
|
+
${f>=2?"md:grid-cols-2":""}
|
|
1509
|
+
${f>=3?"lg:grid-cols-3":""}
|
|
1510
|
+
${f>=4?"xl:grid-cols-4":""}
|
|
1511
1511
|
gap-x-10
|
|
1512
1512
|
gap-y-6
|
|
1513
|
-
`.replace(/\s+/g," ").trim();return
|
|
1513
|
+
`.replace(/\s+/g," ").trim();return t.jsxs("div",{className:te,style:{maxWidth:d},children:[!p&&t.jsxs("div",{className:"flex-none p-5 pb-2 flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("h2",{className:"text-[16px] font-medium text-primary-custom-600 dark:text-primary-custom-500 truncate",children:s?`Editar ${r||"Registro"}`:`Nuevo ${r||"Registro"}`}),C&&N.length>0&&t.jsx(Ws,{companies:N,selectedCompany:y,onCompanyChange:M=>E?.(M,n?.id)})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[P.length>0&&t.jsx(it,{menuClassName:"w-56",renderTrigger:()=>t.jsx(Q,{type:"outline",size:"xs",iconOnly:!0,leftIcon:t.jsx(Sr,{className:"w-4 h-4"}),ariaLabel:"Acciones",title:"Acciones"}),items:P}),t.jsx(Q,{type:"outline",size:"xs",iconOnly:!0,leftIcon:t.jsx(tr,{className:"w-4 h-4"}),onClick:i,ariaLabel:"Cerrar",className:"!bg-white dark:!bg-dark-bg-primary"})]})]}),t.jsxs("form",{id:b,noValidate:!0,onSubmit:ce,className:"flex flex-col flex-1 min-h-0",children:[t.jsx("div",{className:`flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-border-primary dark:scrollbar-thumb-dark-border-primary ${p?"p-1":"p-5 pt-2"}`,children:t.jsx("div",{className:ve,children:pe.map(M=>{const G=M.config?.colSpan;return t.jsx("div",{style:{gridColumn:G?`span ${G} / span ${G}`:void 0},children:Me(M)},M.accessorKey)})})}),!p&&t.jsx("div",{className:"flex-none p-5 pt-2 pb-5 bg-white dark:bg-dark-bg-primary",children:g?t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx(Q,{type:"default",size:"l",htmlType:"submit",disabled:a,fullWidth:!0,className:"font-semibold",children:a?"Guardando...":l})}):t.jsxs("div",{className:"flex justify-end items-center gap-3",children:[t.jsx(Q,{type:"outline",size:"l",onClick:i,disabled:a,className:"font-medium px-6",children:c}),t.jsx(Q,{type:"default",size:"l",htmlType:"submit",disabled:a,className:"font-semibold px-8",children:a?"Guardando...":l})]})})]})]})});Zr.displayName="MasterCrudForm";const kf=({title:e,searchPlaceholder:r="Buscar",searchValue:n="",onSearchChange:s,showSearch:a=!0,filterOptions:o=[],selectedFilter:i,onFilterChange:l,showFilter:c=!0,filterButtonText:f="Filtrar",sortOptions:d=[],selectedSort:m,onSortChange:h,sortDirection:p="asc",onSortDirectionChange:g,showSort:x=!0,sortButtonText:b="Ordenar",viewType:y="list",onViewChange:C,showViewToggle:w=!0,showAdvancedSearch:j=!1,extraContent:I,className:N="",globalActions:E=[],batchActions:S=[],hasSelection:v=!1,isAdvancedSearchActive:R=!1,onAdvancedSearchToggle:T,initialFiltersVisible:A=!1,activeByCompany:V=!1,companies:F=[],selectedCompany:Y,onCompanyChange:_})=>{const[B,L]=u.useState(A),[Z,D]=u.useState(A);u.useEffect(()=>{B||D(!1)},[B]);const[q,P]=u.useState(!1),[H,ae]=u.useState(!1),ie=u.useRef(null),ce=u.useRef(null);u.useEffect(()=>{const $=Fe=>{ie.current&&!ie.current.contains(Fe.target)&&P(!1),ce.current&&!ce.current.contains(Fe.target)&&ae(!1)};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]);const oe=v?S:E,Me=v?"Acciones grupales":"Acciones",pe=oe.filter($=>$.displayType==="direct"),te=oe.filter($=>$.displayType!=="direct"),ve=`
|
|
1514
1514
|
flex
|
|
1515
1515
|
flex-wrap
|
|
1516
1516
|
items-center
|
|
@@ -1528,8 +1528,8 @@
|
|
|
1528
1528
|
top-0
|
|
1529
1529
|
z-20
|
|
1530
1530
|
rounded-tl-2xl
|
|
1531
|
-
${
|
|
1532
|
-
`.replace(/\s+/g," ").trim(),
|
|
1531
|
+
${N}
|
|
1532
|
+
`.replace(/\s+/g," ").trim(),M=`
|
|
1533
1533
|
text-xl
|
|
1534
1534
|
font-semibold
|
|
1535
1535
|
leading-7
|
|
@@ -1546,7 +1546,7 @@
|
|
|
1546
1546
|
gap-4
|
|
1547
1547
|
flex-1
|
|
1548
1548
|
min-w-[256px]
|
|
1549
|
-
`.replace(/\s+/g," ").trim(),
|
|
1549
|
+
`.replace(/\s+/g," ").trim(),O=`
|
|
1550
1550
|
inline-flex
|
|
1551
1551
|
items-center
|
|
1552
1552
|
justify-center
|
|
@@ -1573,7 +1573,7 @@
|
|
|
1573
1573
|
dark:text-primary-custom-500
|
|
1574
1574
|
dark:hover:border-dark-border-custom
|
|
1575
1575
|
dark:focus:ring-dark-border-custom
|
|
1576
|
-
`.replace(/\s+/g," ").trim(),
|
|
1576
|
+
`.replace(/\s+/g," ").trim(),le=`
|
|
1577
1577
|
absolute
|
|
1578
1578
|
z-50
|
|
1579
1579
|
right-0
|
|
@@ -1590,7 +1590,7 @@
|
|
|
1590
1590
|
shadow-lg
|
|
1591
1591
|
dark:bg-dark-bg-primary
|
|
1592
1592
|
dark:border-dark-border-primary
|
|
1593
|
-
`.replace(/\s+/g," ").trim(),
|
|
1593
|
+
`.replace(/\s+/g," ").trim(),J=$=>`
|
|
1594
1594
|
flex
|
|
1595
1595
|
items-center
|
|
1596
1596
|
gap-2
|
|
@@ -1603,7 +1603,7 @@
|
|
|
1603
1603
|
transition-colors
|
|
1604
1604
|
duration-150
|
|
1605
1605
|
${$?"bg-primary-custom-600 text-primary-inverse-content dark:bg-primary-custom-600 dark:text-primary-inverse-content":"text-content-primary hover:bg-primary-custom-600 hover:text-primary-inverse-content dark:text-dark-content-primary dark:hover:bg-primary-custom-600 dark:hover:text-primary-inverse-content"}
|
|
1606
|
-
`.replace(/\s+/g," ").trim(),
|
|
1606
|
+
`.replace(/\s+/g," ").trim(),ge=`
|
|
1607
1607
|
inline-flex
|
|
1608
1608
|
items-center
|
|
1609
1609
|
h-9
|
|
@@ -1613,7 +1613,7 @@
|
|
|
1613
1613
|
rounded-lg
|
|
1614
1614
|
overflow-hidden
|
|
1615
1615
|
dark:border-dark-border-custom
|
|
1616
|
-
`.replace(/\s+/g," ").trim(),
|
|
1616
|
+
`.replace(/\s+/g," ").trim(),we=$=>`
|
|
1617
1617
|
flex
|
|
1618
1618
|
items-center
|
|
1619
1619
|
justify-center
|
|
@@ -1623,16 +1623,16 @@
|
|
|
1623
1623
|
duration-150
|
|
1624
1624
|
${$?"bg-primary-custom-600 text-primary-inverse-content dark:bg-dark-bg-inverse dark:text-dark-content-inverse":"text-primary-custom-600 hover:bg-white/50 dark:text-primary-custom-500 dark:hover:bg-white/5"}
|
|
1625
1625
|
${$?"":"border-l first:border-l-0 border-primary-custom-300 dark:border-dark-border-custom"}
|
|
1626
|
-
`.replace(/\s+/g," ").trim(),ne=$=>{l?.($),
|
|
1626
|
+
`.replace(/\s+/g," ").trim(),ne=$=>{l?.($),P(!1)},ue=$=>{h?.($),ae(!1)},Le=$=>{C?.($)},Ce=()=>{g?.(p==="asc"?"desc":"asc")},ee=d.find($=>$.value===m)?.label||b,Ie=$=>{_?.($,void 0)};return t.jsxs("div",{className:ve,children:[t.jsxs("div",{className:"flex flex-col shrink-0 min-w-0 pr-6",children:[t.jsx("h2",{className:M.replace("pr-6",""),children:e}),V&&F.length>0&&t.jsx(Ws,{companies:F,selectedCompany:Y,onCompanyChange:Ie,className:"mt-1"})]}),t.jsxs("div",{className:G,children:[t.jsxs("div",{className:`
|
|
1627
1627
|
flex items-center gap-4 transition-all duration-500 ease-in-out py-2 px-1
|
|
1628
|
-
${
|
|
1629
|
-
${
|
|
1630
|
-
`,onTransitionEnd:()=>{
|
|
1631
|
-
${
|
|
1628
|
+
${B?"max-w-[1000px] opacity-100":"max-w-0 opacity-0 pointer-events-none"}
|
|
1629
|
+
${Z?"overflow-visible":"overflow-hidden"}
|
|
1630
|
+
`,onTransitionEnd:()=>{B&&D(!0)},children:[a&&t.jsxs("div",{className:"flex items-center gap-2 flex-none w-[250px]",children:[t.jsx("div",{className:"flex-1",children:t.jsx(Ge,{type:"text",placeholder:r,value:n,onChange:$=>s?.($.target.value),leftIcon:t.jsx(xf,{className:"w-4 h-4"}),fullWidth:!0,disabled:R})}),j&&t.jsx(Q,{type:R?"default":"outline",size:"sm",iconOnly:!0,leftIcon:t.jsx(js,{className:"w-4 h-4"}),onClick:T,ariaLabel:"Búsqueda avanzada",title:"Búsqueda avanzada"})]}),c&&o.length>0&&t.jsxs("div",{className:"relative flex-none",ref:ie,children:[t.jsxs("button",{type:"button",className:O,onClick:()=>P(!q),"aria-expanded":q,"aria-haspopup":"listbox",children:[t.jsx(Mi,{className:"w-4 h-4"}),t.jsx("span",{children:f}),t.jsx(Gr,{className:`w-4 h-4 transition-transform duration-150 ${q?"rotate-180":""}`})]}),q&&t.jsx("div",{className:le,role:"listbox",children:o.map($=>t.jsxs("div",{className:J(i===$.value),onClick:()=>ne($.value),role:"option","aria-selected":i===$.value,children:[$.icon&&t.jsx("span",{className:"w-4 h-4",children:$.icon}),t.jsx("span",{children:$.label})]},$.value))})]}),x&&d.length>0&&t.jsxs("div",{className:"flex items-center gap-2 flex-none",children:[t.jsxs("div",{className:"relative",ref:ce,children:[t.jsxs("button",{type:"button",className:O,onClick:()=>ae(!H),"aria-expanded":H,"aria-haspopup":"listbox",children:[t.jsx(Ka,{className:"w-4 h-4"}),t.jsx("span",{children:ee}),t.jsx(Gr,{className:`w-4 h-4 transition-transform duration-150 ${H?"rotate-180":""}`})]}),H&&t.jsx("div",{className:le,role:"listbox",children:d.map($=>t.jsx("div",{className:J(m===$.value),onClick:()=>ue($.value),role:"option","aria-selected":m===$.value,children:t.jsx("span",{children:$.label})},$.value))})]}),t.jsx("button",{type:"button",className:`
|
|
1631
|
+
${O}
|
|
1632
1632
|
px-2
|
|
1633
1633
|
w-[38px]
|
|
1634
|
-
${
|
|
1635
|
-
`,onClick:Ce,disabled:!
|
|
1634
|
+
${m?"":"opacity-50 cursor-not-allowed pointer-events-none"}
|
|
1635
|
+
`,onClick:Ce,disabled:!m,"aria-label":`Ordenar ${p==="asc"?"ascendente":"descendente"}`,title:`Ordenar ${p==="asc"?"ascendente":"descendente"}`,children:p==="asc"?t.jsx(Ka,{className:"w-5 h-5"}):t.jsx(yf,{className:"w-5 h-5"})})]})]}),t.jsx(Q,{type:B?"default":"outline",size:"l",iconOnly:!0,leftIcon:B?t.jsx(mf,{className:"w-5 h-5"}):t.jsx(ff,{className:"w-5 h-5"}),onClick:()=>L(!B),ariaLabel:B?"Ocultar búsqueda":"Mostrar búsqueda",title:B?"Ocultar búsqueda":"Mostrar búsqueda",className:"transition-all duration-300 active:scale-95 !bg-transparent !text-primary-custom-600 !border-primary-custom-300"}),w&&t.jsxs("div",{className:ge,role:"group","aria-label":"Cambiar vista",children:[t.jsx("button",{type:"button",className:we(y==="grid"),onClick:()=>Le("grid"),"aria-label":"Vista de cuadrícula","aria-pressed":y==="grid",children:t.jsx(gf,{className:"w-4 h-4"})}),t.jsx("button",{type:"button",className:we(y==="list"),onClick:()=>Le("list"),"aria-label":"Vista de lista","aria-pressed":y==="list",children:t.jsx(bf,{className:"w-5 h-5"})})]}),pe.map($=>t.jsx(Q,{type:"outline",size:"l",leftIcon:$.icon,onClick:()=>$.action?.([]),disabled:typeof $.disabled=="function"?$.disabled(null):$.disabled,className:"!bg-transparent !text-primary-custom-600 !border-primary-custom-300",children:$.name},$.id||$.name)),te.length>0&&t.jsx(it,{menuClassName:"w-56",renderTrigger:()=>t.jsx(Q,{type:"outline",size:"l",leftIcon:t.jsx(Sr,{className:"w-4 h-4"}),rightIcon:t.jsx(Gr,{className:"w-4 h-4"}),className:"!bg-transparent !text-primary-custom-600 !border-primary-custom-300",children:Me}),items:te.map($=>({children:$.name,icon:$.icon,disabled:typeof $.disabled=="function"?$.disabled(null):$.disabled,onClick:()=>$.action?.([]),className:$.name.toLowerCase().includes("eliminar")||$.name.toLowerCase().includes("delete")?"text-error-content hover:text-error-content dark:text-error-content":""}))}),I]})]})},jf=({data:e,fields:r,onEdit:n,onDelete:s,rowActions:a,actions:o=[],renderCardContent:i,index:l=0,enableMultiSelect:c=!1,isSelected:f=!1,onSelect:d})=>{const m=r.filter(v=>v.config?.showInGrid!==void 0?v.config.showInGrid:v.config?.visibleInTable!==void 0?v.config.visibleInTable:!0),h=m.find(v=>v.config?.cardPosition==="title")||m.find(v=>v.type==="text"),p=m.filter(v=>v.config?.cardPosition==="subtitle"),g=m.filter(v=>v.config?.cardPosition==="body"||!v.config?.cardPosition&&v!==h&&v.type!=="boolean"&&v.type!=="date"),x=m.filter(v=>v.config?.cardPosition==="status"||!v.config?.cardPosition&&v.type==="boolean"),b=m.find(v=>v.config?.cardPosition==="footer")||m.find(v=>v.type==="date"),y=v=>{const R=e[v.accessorKey];return R==null?null:v.renderCell?v.renderCell(R,e,0):v.type==="select"?v.options?.find(A=>A.value===R)?.label||R:v.type==="lookup"&&v.lookupConfig&&typeof R=="object"&&R!==null&&v.lookupConfig.displayFields.map(A=>R[A]).filter(A=>A!=null).join(" - ")||String(R)},C=o.find(v=>v.id==="link"),j=o.filter(v=>v.id!=="link").map(v=>{const R=typeof v.disabled=="function"?v.disabled(e):v.disabled;return{children:v.name,icon:v.icon,disabled:R,onClick:()=>v.action?.(e),className:v.name.toLowerCase().includes("eliminar")||v.name.toLowerCase().includes("delete")?"text-error-content hover:text-error-content dark:text-error-content":""}});j.length===0&&(n&&j.push({children:"Editar",icon:t.jsx("span",{className:"w-4 h-4",children:"✎"}),onClick:()=>n(e)}),s&&j.push({children:"Eliminar",icon:t.jsx("span",{className:"w-4 h-4",children:"🗑️"}),onClick:()=>s(e),className:"text-error-content hover:text-error-content dark:text-error-content"}));const I=`
|
|
1636
1636
|
group
|
|
1637
1637
|
relative
|
|
1638
1638
|
flex
|
|
@@ -1644,8 +1644,15 @@
|
|
|
1644
1644
|
hover:shadow-md
|
|
1645
1645
|
transition-all
|
|
1646
1646
|
duration-200
|
|
1647
|
-
${
|
|
1648
|
-
`.replace(/\s+/g," ").trim(),S=c&&e.jsx("div",{className:"absolute top-5 left-5 z-10",children:e.jsx(Ir,{checked:u,onChange:k=>d?.(k.target.checked),"aria-label":"Seleccionar registro"})}),O=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`flex items-start justify-between gap-2 w-full ${c?"pl-8":""}`,children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-1",children:[e.jsx("h3",{className:"text-[18px] font-medium text-content-primary dark:text-dark-content-primary truncate leading-[20px]",children:h?y(h):"Sin título"}),f.filter(k=>k.config?.cardPosition==="subtitle").length===0&&b&&e.jsx("p",{className:"text-[14px] font-normal italic text-content-secondary dark:text-content-tertiary truncate leading-[18px]",children:y(b)})]}),e.jsxs("div",{className:"flex items-center gap-1 absolute top-1 right-1",children:[j&&e.jsx(X,{type:"outline",size:"xs",iconOnly:!0,leftIcon:e.jsx(on,{className:"w-4 h-4"}),onClick:()=>j.action?.(t),ariaLabel:j.name,title:j.name,className:"shrink-0"}),(C.length>0||a)&&e.jsx(_e,{renderTrigger:()=>e.jsx("button",{type:"button",className:"flex items-center justify-center p-2 rounded-lg text-content-tertiary hover:text-content-primary hover:bg-background-secondary dark:hover:bg-dark-bg-inverse/10 transition-all duration-150","aria-label":"Más opciones",children:e.jsx(cr,{className:"w-5 h-5"})}),items:C})]})]}),e.jsxs("div",{className:`flex flex-col gap-1 w-full ${c?"pl-8":""}`,children:[p.map(k=>e.jsx("p",{className:"text-[16px] font-medium text-primary-custom-600 dark:text-primary-custom-500 truncate leading-[20px]",children:y(k)},k.accessorKey)),g.map(k=>e.jsx("p",{className:"text-[14px] font-normal text-content-primary dark:text-dark-content-primary truncate leading-[20px]",children:y(k)},k.accessorKey))]}),x.length>0&&e.jsx("div",{className:`flex flex-wrap gap-2 mt-1 ${c?"pl-8":""}`,children:x.map(k=>{const R=t[k.accessorKey];return k.type==="boolean"?e.jsx(Ge,{color:R?"green":"zinc",label:R?"Activo":"Inactivo"},k.accessorKey):e.jsx(Ge,{color:"blue",label:String(R)},k.accessorKey)})}),b&&e.jsxs("div",{className:`flex items-center gap-2 mt-2 pt-4 border-t border-border-secondary dark:border-dark-border-primary w-full ${c?"pl-8":""}`,children:[e.jsx(O1,{className:"w-4 h-4 text-content-secondary dark:text-content-secondary"}),e.jsx("p",{className:"text-[12px] font-medium italic text-content-secondary dark:text-content-secondary truncate leading-[14px]",children:y(b)})]})]}),L=i&&e.jsxs("div",{className:c?"pl-8":"",children:[(C.length>0||a)&&e.jsx("div",{className:"absolute top-1 right-1 z-10",children:e.jsx(_e,{renderTrigger:()=>e.jsx("button",{type:"button",className:"flex items-center justify-center p-2 rounded-lg text-content-tertiary hover:text-content-primary hover:bg-background-secondary dark:hover:bg-dark-bg-inverse/10 transition-all duration-150","aria-label":"Más opciones",children:e.jsx(cr,{className:"w-5 h-5"})}),items:C})}),i(t,l)]});return e.jsxs("div",{className:I,children:[S,i?L:O]})},P1=({fields:t,onSearch:r,onClose:n,initialSearchTerm:s,initialSearchField:a,showConnectors:o=!1,maxFilters:i=4,filterableFields:l=[]})=>{const c=m.useMemo(()=>l&&l.length>0?t.filter(b=>l.includes(b.accessorKey)):t.filter(b=>b.config?.searchable!==!1),[t,l]),[u,d]=m.useState(()=>{const b=[];return s&&a&&a!=="all"?b.push({id:Math.random().toString(36).substr(2,9),field:a,connector:"AND",value:s}):s&&c.length>0?b.push({id:Math.random().toString(36).substr(2,9),field:c[0].accessorKey,connector:"AND",value:s}):c.length>0&&b.push({id:Math.random().toString(36).substr(2,9),field:c[0].accessorKey,connector:"AND",value:""}),b}),f=m.useCallback(()=>{c.length>0&&d(b=>[...b,{id:Math.random().toString(36).substr(2,9),field:c[0].accessorKey,connector:"AND",value:""}])},[c]),h=m.useCallback(b=>d(y=>y.filter(j=>j.id!==b)),[]),p=m.useCallback((b,y)=>d(j=>j.map(w=>w.id===b?{...w,...y}:w)),[]),g=()=>{const b=u.filter(y=>y.value!=="").map(y=>o?y:{...y,connector:"AND"});r(b)},x=()=>{d([{id:Math.random().toString(36).substr(2,9),field:c[0].accessorKey,connector:"AND",value:""}]),r([])};return e.jsxs("div",{className:"bg-white dark:bg-dark-bg-primary p-6 animate-in slide-in-from-top duration-300 rounded-2xl",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Pn,{className:"w-4 h-4 text-primary-custom-600"}),e.jsx("span",{className:"text-sm font-semibold text-content-primary dark:text-dark-content-primary uppercase tracking-widest",children:"Búsqueda Avanzada"})]}),e.jsx(X,{type:"outline",size:"xs",iconOnly:!0,leftIcon:e.jsx(Zt,{className:"w-4 h-4"}),onClick:n,ariaLabel:"Cerrar",className:"!bg-white dark:!bg-dark-bg-primary"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-4",children:[u.map((b,y)=>e.jsxs("div",{className:"flex items-center gap-2",children:[y>0&&o&&e.jsx("div",{className:"flex-none w-12 h-9",children:e.jsx(Tr,{options:[{value:"AND",label:"Y"},{value:"OR",label:"O"}],value:b.connector,onChange:j=>p(b.id,{connector:j}),className:"!gap-0",triggerClassName:"!h-9 !py-0 !px-0 !border-none !bg-transparent !shadow-none !ring-0 !min-w-0 !w-full font-semibold text-primary-custom-600 text-xs flex justify-center",showLabel:!1,showDescription:!1})}),y>0&&!o&&e.jsx("div",{className:"flex items-center justify-center w-8 h-9 text-content-tertiary font-semibold text-xs uppercase",children:"Y"}),e.jsxs("div",{className:"flex items-center h-9 border border-border-primary dark:border-dark-border-primary rounded-lg bg-white dark:bg-dark-bg-primary overflow-hidden isolate hover:border-primary-custom-400 dark:hover:border-dark-border-custom transition-all duration-200",children:[e.jsx("div",{className:"w-36 h-full bg-gray-50/50 dark:bg-gray-800/20 border-r border-border-primary dark:border-dark-border-primary overflow-hidden",children:e.jsx(Tr,{options:c.map(j=>({value:j.accessorKey,label:j.header})),value:b.field,onChange:j=>p(b.id,{field:String(j)}),className:"!gap-0 !h-full",triggerClassName:"!h-full !py-0 !px-3 !border-none !bg-transparent !shadow-none !ring-0 !rounded-none !flex !items-center text-[10px] font-semibold uppercase text-content-secondary !min-w-0",showLabel:!1,showDescription:!1,fullWidth:!0})}),e.jsx("div",{className:"w-44 md:w-56 h-full flex items-center px-3",children:e.jsx("input",{type:"text",placeholder:"Buscar...",value:b.value,onChange:j=>p(b.id,{value:j.target.value}),className:"w-full h-full bg-transparent border-none outline-none focus:ring-0 text-sm text-content-primary dark:text-dark-content-primary placeholder:text-content-tertiary"})}),e.jsx("button",{type:"button",onClick:()=>h(b.id),className:`h-full px-3 flex items-center justify-center border-l border-border-primary dark:border-dark-border-primary hover:bg-red-50 dark:hover:bg-red-900/20 text-content-tertiary hover:text-error-content transition-colors ${y===0&&u.length===1?"hidden":""}`,disabled:u.length===1&&y===0,children:e.jsx(Zt,{className:"w-4 h-4"})})]})]},b.id)),u.length<i&&e.jsxs("button",{onClick:f,className:"h-9 px-4 flex items-center gap-2 rounded-lg border border-dashed border-primary-custom-300 text-primary-custom-600 text-xs font-semibold hover:bg-primary-custom-50 dark:hover:bg-primary-custom-900/20 transition-all duration-200",children:[e.jsx(Er,{className:"w-4 h-4"}),"AGREGAR CAMPO"]})]}),e.jsxs("div",{className:"flex justify-center items-center gap-4 mt-8 pt-6 border-t border-border-secondary dark:border-dark-border-primary",children:[e.jsx(X,{type:"plain",size:"base",onClick:x,className:"text-content-secondary",children:"Limpiar filtros"}),e.jsx(X,{type:"default",size:"base",leftIcon:e.jsx(Pn,{className:"w-4 h-4"}),onClick:g,className:"px-12 shadow-md",children:"Filtrar Resultados"})]})]})},_1=({isOpen:t,onClose:r,recordId:n,record:s,companies:a,fields:o,onConfirm:i,isLinked:l,variant:c="manual"})=>{const[u,d]=m.useState([]),[f,h]=m.useState([]),p=a.filter(C=>C.uuid!=="000");if(m.useEffect(()=>{if(t){const C=p.filter(I=>l(I.uuid)).map(I=>I.uuid);d(C),h(C)}},[t,n]),!t)return null;const g=JSON.stringify([...u].sort())!==JSON.stringify([...f].sort()),x=C=>{d(I=>I.includes(C)?I.filter(S=>S!==C):[...I,C])},b=()=>{d(p.map(C=>C.uuid))},y=()=>{i(n,u),r()},j=()=>{if(c==="success")return"Haz creado el registro exitosamente";const C=o.filter(S=>S.config?.showInLinkModalTitle).map(S=>{const O=s[S.accessorKey];return O?String(O):""}).filter(S=>S!=="");return`Vinculación de registro${C.length>0?` ${C.join(" - ")}`:""}`},w=()=>c==="success"?"El registro se guardó de forma Global; ahora puedes asignarlo a las compañías de tu elección":"Puedes asignar este registro a las compañías de tu elección";return e.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/50 p-4 animate-in fade-in duration-200",children:e.jsxs("div",{className:"bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl shadow-2xl flex flex-col w-full max-w-2xl overflow-hidden relative",children:[e.jsx("div",{className:"absolute right-4 top-4 z-10",children:e.jsx(X,{type:"outline",size:"xs",iconOnly:!0,leftIcon:e.jsx(Zt,{className:"w-4 h-4"}),onClick:r,ariaLabel:"Cerrar",className:"!bg-white dark:!bg-dark-bg-primary"})}),e.jsxs("div",{className:"p-[20px] flex gap-5 items-center",children:[e.jsx("div",{className:"bg-[#ecfccb] dark:bg-lime-900/20 flex items-center justify-center rounded-full shrink-0 size-[40px]",children:e.jsx(R1,{className:"size-6 text-lime-700 dark:text-lime-400"})}),e.jsxs("div",{className:"flex flex-col justify-center",children:[e.jsx("h3",{className:"text-[20px] font-bold leading-[28px] tracking-tight text-content-primary dark:text-dark-content-primary",children:j()}),e.jsx("p",{className:"text-[14px] font-normal italic leading-[20px] text-content-tertiary dark:text-content-tertiary",children:w()})]})]}),e.jsx("div",{className:"px-[20px] pb-[20px] flex flex-col gap-[20px] overflow-y-auto max-h-[400px]",children:e.jsx("div",{className:"flex flex-col items-start w-full",children:p.map(C=>{const I=u.includes(C.uuid);return e.jsxs("div",{className:"border border-border-primary dark:border-dark-border-primary h-[64px] px-[8px] flex items-center justify-between rounded-[8px] w-full mb-3 last:mb-0 transition-colors hover:bg-background-secondary dark:hover:bg-dark-bg-inverse/5",children:[e.jsxs("div",{className:"flex items-center gap-[8px]",children:[e.jsx("div",{className:"bg-[#dbeefe] dark:bg-primary-custom-900/20 flex items-center justify-center rounded-[16px] shrink-0 size-[32px]",children:e.jsx(go,{className:"size-[18px] text-primary-custom-600 dark:text-primary-custom-400"})}),e.jsx("span",{className:"text-[16px] font-medium leading-[24px] text-content-primary dark:text-dark-content-primary truncate max-w-[300px]",children:C.name})]}),I?e.jsx(X,{type:"default",size:"xs",onClick:()=>x(C.uuid),className:"!bg-error-content !border-error-border hover:!bg-error-content/90 !text-white",children:"Desvincular"}):e.jsx(X,{type:"outline",size:"xs",onClick:()=>x(C.uuid),children:"Vincular"})]},C.uuid)})})}),e.jsxs("div",{className:"px-[24px] py-[16px] pb-[24px] flex items-center justify-end gap-[12px] shrink-0 w-full border-t border-border-secondary dark:border-dark-border-primary",children:[e.jsx(X,{type:"plain",size:"l",onClick:r,children:"Cancelar"}),e.jsx(X,{type:"outline",size:"l",onClick:b,children:"Vincular todos"}),e.jsx(X,{type:"default",size:"l",onClick:y,disabled:!g,children:"Confirmar"})]})]})})},W1=({className:t="size-4"})=>e.jsx(Da,{className:t,"aria-hidden":"true"}),Z1=({className:t="size-4"})=>e.jsx(Wa,{className:t,"aria-hidden":"true"}),H1=({color:t="zinc",children:r="Lorem ipsum dolor.",leftIcon:n,showLeftIcon:s=!0,showCloseButton:a=!0,onClose:o,className:i="",ariaLabel:l})=>{const c={zinc:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800/30 dark:text-zinc-100",red:"bg-red-100 text-red-900 dark:bg-red-900/30 dark:text-red-100",orange:"bg-orange-100 text-orange-900 dark:bg-orange-900/30 dark:text-orange-100",amber:"bg-amber-100 text-amber-900 dark:bg-amber-900/30 dark:text-amber-100",yellow:"bg-yellow-100 text-yellow-900 dark:bg-yellow-900/30 dark:text-yellow-100",lime:"bg-lime-100 text-lime-900 dark:bg-lime-900/30 dark:text-lime-100",green:"bg-green-100 text-green-900 dark:bg-green-900/30 dark:text-green-100",emerald:"bg-emerald-100 text-emerald-900 dark:bg-emerald-900/30 dark:text-emerald-100",teal:"bg-teal-100 text-teal-900 dark:bg-teal-900/30 dark:text-teal-100",cyan:"bg-cyan-100 text-cyan-900 dark:bg-cyan-900/30 dark:text-cyan-100",sky:"bg-sky-100 text-sky-900 dark:bg-sky-900/30 dark:text-sky-100",blue:"bg-blue-100 text-blue-900 dark:bg-blue-900/30 dark:text-blue-100",indigo:"bg-indigo-100 text-indigo-900 dark:bg-indigo-900/30 dark:text-indigo-100",violet:"bg-violet-100 text-violet-900 dark:bg-violet-900/30 dark:text-violet-100",purple:"bg-purple-100 text-purple-900 dark:bg-purple-900/30 dark:text-purple-100",fuchsia:"bg-fuchsia-100 text-fuchsia-900 dark:bg-fuchsia-900/30 dark:text-fuchsia-100",pink:"bg-pink-100 text-pink-900 dark:bg-pink-900/30 dark:text-pink-100",rose:"bg-rose-100 text-rose-900 dark:bg-rose-900/30 dark:text-rose-100",primary:"bg-blue-100 text-blue-900 dark:bg-blue-900/30 dark:text-blue-100",secondary:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800/30 dark:text-zinc-100",tertiary:"bg-cyan-100 text-cyan-900 dark:bg-cyan-900/30 dark:text-cyan-100"},u=`
|
|
1647
|
+
${f?"bg-[#f7fcff] dark:bg-primary-custom-900/20 border-primary-custom-600 ring-1 ring-primary-custom-600 dark:border-primary-custom-600 dark:ring-primary-custom-600":"bg-white dark:bg-dark-bg-primary border-border-primary dark:border-dark-border-primary"}
|
|
1648
|
+
`.replace(/\s+/g," ").trim(),N=c&&t.jsx("div",{className:"absolute top-5 left-5 z-10",children:t.jsx(Xr,{checked:f,onChange:v=>d?.(v.target.checked),"aria-label":"Seleccionar registro"})}),E=t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:`flex items-start justify-between gap-2 w-full ${c?"pl-8":""}`,children:[t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-1",children:[t.jsx("h3",{className:"text-[18px] font-medium text-content-primary dark:text-dark-content-primary truncate leading-[20px]",children:h?y(h):"Sin título"}),m.filter(v=>v.config?.cardPosition==="subtitle").length===0&&b&&t.jsx("p",{className:"text-[14px] font-normal italic text-content-secondary dark:text-content-tertiary truncate leading-[18px]",children:y(b)})]}),t.jsxs("div",{className:"flex items-center gap-1 absolute top-1 right-1",children:[C&&t.jsx(Q,{type:"outline",size:"xs",iconOnly:!0,leftIcon:t.jsx(Tn,{className:"w-4 h-4"}),onClick:()=>C.action?.(e),ariaLabel:C.name,title:C.name,className:"shrink-0"}),(j.length>0||a)&&t.jsx(it,{renderTrigger:()=>t.jsx("button",{type:"button",className:"flex items-center justify-center p-2 rounded-lg text-content-tertiary hover:text-content-primary hover:bg-background-secondary dark:hover:bg-dark-bg-inverse/10 transition-all duration-150","aria-label":"Más opciones",children:t.jsx(Sr,{className:"w-5 h-5"})}),items:j})]})]}),t.jsxs("div",{className:`flex flex-col gap-1 w-full ${c?"pl-8":""}`,children:[p.map(v=>t.jsx("p",{className:"text-[16px] font-medium text-primary-custom-600 dark:text-primary-custom-500 truncate leading-[20px]",children:y(v)},v.accessorKey)),g.map(v=>t.jsx("p",{className:"text-[14px] font-normal text-content-primary dark:text-dark-content-primary truncate leading-[20px]",children:y(v)},v.accessorKey))]}),x.length>0&&t.jsx("div",{className:`flex flex-wrap gap-2 mt-1 ${c?"pl-8":""}`,children:x.map(v=>{const R=e[v.accessorKey];return v.type==="boolean"?t.jsx(ut,{color:R?"green":"zinc",label:R?"Activo":"Inactivo"},v.accessorKey):t.jsx(ut,{color:"blue",label:String(R)},v.accessorKey)})}),b&&t.jsxs("div",{className:`flex items-center gap-2 mt-2 pt-4 border-t border-border-secondary dark:border-dark-border-primary w-full ${c?"pl-8":""}`,children:[t.jsx(vf,{className:"w-4 h-4 text-content-secondary dark:text-content-secondary"}),t.jsx("p",{className:"text-[12px] font-medium italic text-content-secondary dark:text-content-secondary truncate leading-[14px]",children:y(b)})]})]}),S=i&&t.jsxs("div",{className:c?"pl-8":"",children:[(j.length>0||a)&&t.jsx("div",{className:"absolute top-1 right-1 z-10",children:t.jsx(it,{renderTrigger:()=>t.jsx("button",{type:"button",className:"flex items-center justify-center p-2 rounded-lg text-content-tertiary hover:text-content-primary hover:bg-background-secondary dark:hover:bg-dark-bg-inverse/10 transition-all duration-150","aria-label":"Más opciones",children:t.jsx(Sr,{className:"w-5 h-5"})}),items:j})}),i(e,l)]});return t.jsxs("div",{className:I,children:[N,i?S:E]})};function Cf(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return u.useMemo(()=>s=>{r.forEach(a=>a(s))},r)}const Un=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Lr(e){const r=Object.prototype.toString.call(e);return r==="[object Window]"||r==="[object global]"}function Hs(e){return"nodeType"in e}function st(e){var r,n;return e?Lr(e)?e:Hs(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window:window}function Zs(e){const{Document:r}=st(e);return e instanceof r}function on(e){return Lr(e)?!1:e instanceof st(e).HTMLElement}function Li(e){return e instanceof st(e).SVGElement}function Ar(e){return e?Lr(e)?e.document:Hs(e)?Zs(e)?e:on(e)||Li(e)?e.ownerDocument:document:document:document}const Lt=Un?u.useLayoutEffect:u.useEffect;function Gs(e){const r=u.useRef(e);return Lt(()=>{r.current=e}),u.useCallback(function(){for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return r.current==null?void 0:r.current(...s)},[])}function Nf(){const e=u.useRef(null),r=u.useCallback((s,a)=>{e.current=setInterval(s,a)},[]),n=u.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[r,n]}function en(e,r){r===void 0&&(r=[e]);const n=u.useRef(e);return Lt(()=>{n.current!==e&&(n.current=e)},r),n}function ln(e,r){const n=u.useRef();return u.useMemo(()=>{const s=e(n.current);return n.current=s,s},[...r])}function zn(e){const r=Gs(e),n=u.useRef(null),s=u.useCallback(a=>{a!==n.current&&r?.(a,n.current),n.current=a},[]);return[n,s]}function Cs(e){const r=u.useRef();return u.useEffect(()=>{r.current=e},[e]),r.current}let is={};function cn(e,r){return u.useMemo(()=>{if(r)return r;const n=is[e]==null?0:is[e]+1;return is[e]=n,e+"-"+n},[e,r])}function Ai(e){return function(r){for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return s.reduce((o,i)=>{const l=Object.entries(i);for(const[c,f]of l){const d=o[c];d!=null&&(o[c]=d+e*f)}return o},{...r})}}const Nr=Ai(1),tn=Ai(-1);function Sf(e){return"clientX"in e&&"clientY"in e}function Us(e){if(!e)return!1;const{KeyboardEvent:r}=st(e.target);return r&&e instanceof r}function Rf(e){if(!e)return!1;const{TouchEvent:r}=st(e.target);return r&&e instanceof r}function Ns(e){if(Rf(e)){if(e.touches&&e.touches.length){const{clientX:r,clientY:n}=e.touches[0];return{x:r,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:r,clientY:n}=e.changedTouches[0];return{x:r,y:n}}}return Sf(e)?{x:e.clientX,y:e.clientY}:null}const Rr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:r,y:n}=e;return"translate3d("+(r?Math.round(r):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:r,scaleY:n}=e;return"scaleX("+r+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Rr.Translate.toString(e),Rr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:r,duration:n,easing:s}=e;return r+" "+n+"ms "+s}}}),Ya="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ef(e){return e.matches(Ya)?e:e.querySelector(Ya)}const Mf={display:"none"};function If(e){let{id:r,value:n}=e;return u.createElement("div",{id:r,style:Mf},n)}function Lf(e){let{id:r,announcement:n,ariaLiveType:s="assertive"}=e;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return u.createElement("div",{id:r,style:a,role:"status","aria-live":s,"aria-atomic":!0},n)}function Af(){const[e,r]=u.useState("");return{announce:u.useCallback(s=>{s!=null&&r(s)},[]),announcement:e}}const Ti=u.createContext(null);function Tf(e){const r=u.useContext(Ti);u.useEffect(()=>{if(!r)throw new Error("useDndMonitor must be used within a children of <DndContext>");return r(e)},[e,r])}function zf(){const[e]=u.useState(()=>new Set),r=u.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[u.useCallback(s=>{let{type:a,event:o}=s;e.forEach(i=>{var l;return(l=i[a])==null?void 0:l.call(i,o)})},[e]),r]}const Df={draggable:`
|
|
1649
|
+
To pick up a draggable item, press the space bar.
|
|
1650
|
+
While dragging, use the arrow keys to move the item.
|
|
1651
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
1652
|
+
`},Of={onDragStart(e){let{active:r}=e;return"Picked up draggable item "+r.id+"."},onDragOver(e){let{active:r,over:n}=e;return n?"Draggable item "+r.id+" was moved over droppable area "+n.id+".":"Draggable item "+r.id+" is no longer over a droppable area."},onDragEnd(e){let{active:r,over:n}=e;return n?"Draggable item "+r.id+" was dropped over droppable area "+n.id:"Draggable item "+r.id+" was dropped."},onDragCancel(e){let{active:r}=e;return"Dragging was cancelled. Draggable item "+r.id+" was dropped."}};function $f(e){let{announcements:r=Of,container:n,hiddenTextDescribedById:s,screenReaderInstructions:a=Df}=e;const{announce:o,announcement:i}=Af(),l=cn("DndLiveRegion"),[c,f]=u.useState(!1);if(u.useEffect(()=>{f(!0)},[]),Tf(u.useMemo(()=>({onDragStart(m){let{active:h}=m;o(r.onDragStart({active:h}))},onDragMove(m){let{active:h,over:p}=m;r.onDragMove&&o(r.onDragMove({active:h,over:p}))},onDragOver(m){let{active:h,over:p}=m;o(r.onDragOver({active:h,over:p}))},onDragEnd(m){let{active:h,over:p}=m;o(r.onDragEnd({active:h,over:p}))},onDragCancel(m){let{active:h,over:p}=m;o(r.onDragCancel({active:h,over:p}))}}),[o,r])),!c)return null;const d=u.createElement(u.Fragment,null,u.createElement(If,{id:s,value:a.draggable}),u.createElement(Lf,{id:l,announcement:i}));return n?Pt.createPortal(d,n):d}var He;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(He||(He={}));function Dn(){}function Qa(e,r){return u.useMemo(()=>({sensor:e,options:r??{}}),[e,r])}function Ff(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return u.useMemo(()=>[...r].filter(s=>s!=null),[...r])}const wt=Object.freeze({x:0,y:0});function zi(e,r){return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}function Di(e,r){let{data:{value:n}}=e,{data:{value:s}}=r;return n-s}function Bf(e,r){let{data:{value:n}}=e,{data:{value:s}}=r;return s-n}function Ja(e){let{left:r,top:n,height:s,width:a}=e;return[{x:r,y:n},{x:r+a,y:n},{x:r,y:n+s},{x:r+a,y:n+s}]}function Oi(e,r){if(!e||e.length===0)return null;const[n]=e;return n[r]}function eo(e,r,n){return r===void 0&&(r=e.left),n===void 0&&(n=e.top),{x:r+e.width*.5,y:n+e.height*.5}}const Vf=e=>{let{collisionRect:r,droppableRects:n,droppableContainers:s}=e;const a=eo(r,r.left,r.top),o=[];for(const i of s){const{id:l}=i,c=n.get(l);if(c){const f=zi(eo(c),a);o.push({id:l,data:{droppableContainer:i,value:f}})}}return o.sort(Di)},Pf=e=>{let{collisionRect:r,droppableRects:n,droppableContainers:s}=e;const a=Ja(r),o=[];for(const i of s){const{id:l}=i,c=n.get(l);if(c){const f=Ja(c),d=a.reduce((h,p,g)=>h+zi(f[g],p),0),m=Number((d/4).toFixed(4));o.push({id:l,data:{droppableContainer:i,value:m}})}}return o.sort(Di)};function _f(e,r){const n=Math.max(r.top,e.top),s=Math.max(r.left,e.left),a=Math.min(r.left+r.width,e.left+e.width),o=Math.min(r.top+r.height,e.top+e.height),i=a-s,l=o-n;if(s<a&&n<o){const c=r.width*r.height,f=e.width*e.height,d=i*l,m=d/(c+f-d);return Number(m.toFixed(4))}return 0}const Wf=e=>{let{collisionRect:r,droppableRects:n,droppableContainers:s}=e;const a=[];for(const o of s){const{id:i}=o,l=n.get(i);if(l){const c=_f(l,r);c>0&&a.push({id:i,data:{droppableContainer:o,value:c}})}}return a.sort(Bf)};function Hf(e,r,n){return{...e,scaleX:r&&n?r.width/n.width:1,scaleY:r&&n?r.height/n.height:1}}function $i(e,r){return e&&r?{x:e.left-r.left,y:e.top-r.top}:wt}function Zf(e){return function(n){for(var s=arguments.length,a=new Array(s>1?s-1:0),o=1;o<s;o++)a[o-1]=arguments[o];return a.reduce((i,l)=>({...i,top:i.top+e*l.y,bottom:i.bottom+e*l.y,left:i.left+e*l.x,right:i.right+e*l.x}),{...n})}}const Gf=Zf(1);function Uf(e){if(e.startsWith("matrix3d(")){const r=e.slice(9,-1).split(/, /);return{x:+r[12],y:+r[13],scaleX:+r[0],scaleY:+r[5]}}else if(e.startsWith("matrix(")){const r=e.slice(7,-1).split(/, /);return{x:+r[4],y:+r[5],scaleX:+r[0],scaleY:+r[3]}}return null}function qf(e,r,n){const s=Uf(r);if(!s)return e;const{scaleX:a,scaleY:o,x:i,y:l}=s,c=e.left-i-(1-a)*parseFloat(n),f=e.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=a?e.width/a:e.width,m=o?e.height/o:e.height;return{width:d,height:m,top:f,right:c+d,bottom:f+m,left:c}}const Kf={ignoreTransform:!1};function Tr(e,r){r===void 0&&(r=Kf);let n=e.getBoundingClientRect();if(r.ignoreTransform){const{transform:f,transformOrigin:d}=st(e).getComputedStyle(e);f&&(n=qf(n,f,d))}const{top:s,left:a,width:o,height:i,bottom:l,right:c}=n;return{top:s,left:a,width:o,height:i,bottom:l,right:c}}function to(e){return Tr(e,{ignoreTransform:!0})}function Xf(e){const r=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:r,bottom:n,width:r,height:n}}function Yf(e,r){return r===void 0&&(r=st(e).getComputedStyle(e)),r.position==="fixed"}function Qf(e,r){r===void 0&&(r=st(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const o=r[a];return typeof o=="string"?n.test(o):!1})}function qn(e,r){const n=[];function s(a){if(r!=null&&n.length>=r||!a)return n;if(Zs(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!on(a)||Li(a)||n.includes(a))return n;const o=st(e).getComputedStyle(a);return a!==e&&Qf(a,o)&&n.push(a),Yf(a,o)?n:s(a.parentNode)}return e?s(e):n}function Fi(e){const[r]=qn(e,1);return r??null}function ls(e){return!Un||!e?null:Lr(e)?e:Hs(e)?Zs(e)||e===Ar(e).scrollingElement?window:on(e)?e:null:null}function Bi(e){return Lr(e)?e.scrollX:e.scrollLeft}function Vi(e){return Lr(e)?e.scrollY:e.scrollTop}function Ss(e){return{x:Bi(e),y:Vi(e)}}var Ze;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ze||(Ze={}));function Pi(e){return!Un||!e?!1:e===document.scrollingElement}function _i(e){const r={x:0,y:0},n=Pi(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},a=e.scrollTop<=r.y,o=e.scrollLeft<=r.x,i=e.scrollTop>=s.y,l=e.scrollLeft>=s.x;return{isTop:a,isLeft:o,isBottom:i,isRight:l,maxScroll:s,minScroll:r}}const Jf={x:.2,y:.2};function e2(e,r,n,s,a){let{top:o,left:i,right:l,bottom:c}=n;s===void 0&&(s=10),a===void 0&&(a=Jf);const{isTop:f,isBottom:d,isLeft:m,isRight:h}=_i(e),p={x:0,y:0},g={x:0,y:0},x={height:r.height*a.y,width:r.width*a.x};return!f&&o<=r.top+x.height?(p.y=Ze.Backward,g.y=s*Math.abs((r.top+x.height-o)/x.height)):!d&&c>=r.bottom-x.height&&(p.y=Ze.Forward,g.y=s*Math.abs((r.bottom-x.height-c)/x.height)),!h&&l>=r.right-x.width?(p.x=Ze.Forward,g.x=s*Math.abs((r.right-x.width-l)/x.width)):!m&&i<=r.left+x.width&&(p.x=Ze.Backward,g.x=s*Math.abs((r.left+x.width-i)/x.width)),{direction:p,speed:g}}function t2(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:i}=window;return{top:0,left:0,right:o,bottom:i,width:o,height:i}}const{top:r,left:n,right:s,bottom:a}=e.getBoundingClientRect();return{top:r,left:n,right:s,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Wi(e){return e.reduce((r,n)=>Nr(r,Ss(n)),wt)}function r2(e){return e.reduce((r,n)=>r+Bi(n),0)}function n2(e){return e.reduce((r,n)=>r+Vi(n),0)}function s2(e,r){if(r===void 0&&(r=Tr),!e)return;const{top:n,left:s,bottom:a,right:o}=r(e);Fi(e)&&(a<=0||o<=0||n>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const a2=[["x",["left","right"],r2],["y",["top","bottom"],n2]];class qs{constructor(r,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=qn(n),a=Wi(s);this.rect={...r},this.width=r.width,this.height=r.height;for(const[o,i,l]of a2)for(const c of i)Object.defineProperty(this,c,{get:()=>{const f=l(s),d=a[o]-f;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ur{constructor(r){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...n)})},this.target=r}add(r,n,s){var a;(a=this.target)==null||a.addEventListener(r,n,s),this.listeners.push([r,n,s])}}function o2(e){const{EventTarget:r}=st(e);return e instanceof r?e:Ar(e)}function cs(e,r){const n=Math.abs(e.x),s=Math.abs(e.y);return typeof r=="number"?Math.sqrt(n**2+s**2)>r:"x"in r&&"y"in r?n>r.x&&s>r.y:"x"in r?n>r.x:"y"in r?s>r.y:!1}var ct;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ct||(ct={}));function ro(e){e.preventDefault()}function i2(e){e.stopPropagation()}var xe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(xe||(xe={}));const Hi={start:[xe.Space,xe.Enter],cancel:[xe.Esc],end:[xe.Space,xe.Enter,xe.Tab]},l2=(e,r)=>{let{currentCoordinates:n}=r;switch(e.code){case xe.Right:return{...n,x:n.x+25};case xe.Left:return{...n,x:n.x-25};case xe.Down:return{...n,y:n.y+25};case xe.Up:return{...n,y:n.y-25}}};class Ks{constructor(r){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=r;const{event:{target:n}}=r;this.props=r,this.listeners=new Ur(Ar(n)),this.windowListeners=new Ur(st(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ct.Resize,this.handleCancel),this.windowListeners.add(ct.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ct.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:r,onStart:n}=this.props,s=r.node.current;s&&s2(s),n(wt)}handleKeyDown(r){if(Us(r)){const{active:n,context:s,options:a}=this.props,{keyboardCodes:o=Hi,coordinateGetter:i=l2,scrollBehavior:l="smooth"}=a,{code:c}=r;if(o.end.includes(c)){this.handleEnd(r);return}if(o.cancel.includes(c)){this.handleCancel(r);return}const{collisionRect:f}=s.current,d=f?{x:f.left,y:f.top}:wt;this.referenceCoordinates||(this.referenceCoordinates=d);const m=i(r,{active:n,context:s.current,currentCoordinates:d});if(m){const h=tn(m,d),p={x:0,y:0},{scrollableAncestors:g}=s.current;for(const x of g){const b=r.code,{isTop:y,isRight:C,isLeft:w,isBottom:j,maxScroll:I,minScroll:N}=_i(x),E=t2(x),S={x:Math.min(b===xe.Right?E.right-E.width/2:E.right,Math.max(b===xe.Right?E.left:E.left+E.width/2,m.x)),y:Math.min(b===xe.Down?E.bottom-E.height/2:E.bottom,Math.max(b===xe.Down?E.top:E.top+E.height/2,m.y))},v=b===xe.Right&&!C||b===xe.Left&&!w,R=b===xe.Down&&!j||b===xe.Up&&!y;if(v&&S.x!==m.x){const T=x.scrollLeft+h.x,A=b===xe.Right&&T<=I.x||b===xe.Left&&T>=N.x;if(A&&!h.y){x.scrollTo({left:T,behavior:l});return}A?p.x=x.scrollLeft-T:p.x=b===xe.Right?x.scrollLeft-I.x:x.scrollLeft-N.x,p.x&&x.scrollBy({left:-p.x,behavior:l});break}else if(R&&S.y!==m.y){const T=x.scrollTop+h.y,A=b===xe.Down&&T<=I.y||b===xe.Up&&T>=N.y;if(A&&!h.x){x.scrollTo({top:T,behavior:l});return}A?p.y=x.scrollTop-T:p.y=b===xe.Down?x.scrollTop-I.y:x.scrollTop-N.y,p.y&&x.scrollBy({top:-p.y,behavior:l});break}}this.handleMove(r,Nr(tn(m,this.referenceCoordinates),p))}}}handleMove(r,n){const{onMove:s}=this.props;r.preventDefault(),s(n)}handleEnd(r){const{onEnd:n}=this.props;r.preventDefault(),this.detach(),n()}handleCancel(r){const{onCancel:n}=this.props;r.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Ks.activators=[{eventName:"onKeyDown",handler:(e,r,n)=>{let{keyboardCodes:s=Hi,onActivation:a}=r,{active:o}=n;const{code:i}=e.nativeEvent;if(s.start.includes(i)){const l=o.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];function no(e){return!!(e&&"distance"in e)}function so(e){return!!(e&&"delay"in e)}class Xs{constructor(r,n,s){var a;s===void 0&&(s=o2(r.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=r,this.events=n;const{event:o}=r,{target:i}=o;this.props=r,this.events=n,this.document=Ar(i),this.documentListeners=new Ur(this.document),this.listeners=new Ur(s),this.windowListeners=new Ur(st(i)),this.initialCoordinates=(a=Ns(o))!=null?a:wt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:r,props:{options:{activationConstraint:n,bypassActivationConstraint:s}}}=this;if(this.listeners.add(r.move.name,this.handleMove,{passive:!1}),this.listeners.add(r.end.name,this.handleEnd),r.cancel&&this.listeners.add(r.cancel.name,this.handleCancel),this.windowListeners.add(ct.Resize,this.handleCancel),this.windowListeners.add(ct.DragStart,ro),this.windowListeners.add(ct.VisibilityChange,this.handleCancel),this.windowListeners.add(ct.ContextMenu,ro),this.documentListeners.add(ct.Keydown,this.handleKeydown),n){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(so(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(no(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(r,n){const{active:s,onPending:a}=this.props;a(s,r,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:r}=this,{onStart:n}=this.props;r&&(this.activated=!0,this.documentListeners.add(ct.Click,i2,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ct.SelectionChange,this.removeTextSelection),n(r))}handleMove(r){var n;const{activated:s,initialCoordinates:a,props:o}=this,{onMove:i,options:{activationConstraint:l}}=o;if(!a)return;const c=(n=Ns(r))!=null?n:wt,f=tn(a,c);if(!s&&l){if(no(l)){if(l.tolerance!=null&&cs(f,l.tolerance))return this.handleCancel();if(cs(f,l.distance))return this.handleStart()}if(so(l)&&cs(f,l.tolerance))return this.handleCancel();this.handlePending(l,f);return}r.cancelable&&r.preventDefault(),i(c)}handleEnd(){const{onAbort:r,onEnd:n}=this.props;this.detach(),this.activated||r(this.props.active),n()}handleCancel(){const{onAbort:r,onCancel:n}=this.props;this.detach(),this.activated||r(this.props.active),n()}handleKeydown(r){r.code===xe.Esc&&this.handleCancel()}removeTextSelection(){var r;(r=this.document.getSelection())==null||r.removeAllRanges()}}const c2={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ys extends Xs{constructor(r){const{event:n}=r,s=Ar(n.target);super(r,c2,s)}}Ys.activators=[{eventName:"onPointerDown",handler:(e,r)=>{let{nativeEvent:n}=e,{onActivation:s}=r;return!n.isPrimary||n.button!==0?!1:(s?.({event:n}),!0)}}];const d2={move:{name:"mousemove"},end:{name:"mouseup"}};var Rs;(function(e){e[e.RightClick=2]="RightClick"})(Rs||(Rs={}));class u2 extends Xs{constructor(r){super(r,d2,Ar(r.event.target))}}u2.activators=[{eventName:"onMouseDown",handler:(e,r)=>{let{nativeEvent:n}=e,{onActivation:s}=r;return n.button===Rs.RightClick?!1:(s?.({event:n}),!0)}}];const ds={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class f2 extends Xs{constructor(r){super(r,ds)}static setup(){return window.addEventListener(ds.move.name,r,{capture:!1,passive:!1}),function(){window.removeEventListener(ds.move.name,r)};function r(){}}}f2.activators=[{eventName:"onTouchStart",handler:(e,r)=>{let{nativeEvent:n}=e,{onActivation:s}=r;const{touches:a}=n;return a.length>1?!1:(s?.({event:n}),!0)}}];var qr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(qr||(qr={}));var On;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(On||(On={}));function m2(e){let{acceleration:r,activator:n=qr.Pointer,canScroll:s,draggingRect:a,enabled:o,interval:i=5,order:l=On.TreeOrder,pointerCoordinates:c,scrollableAncestors:f,scrollableAncestorRects:d,delta:m,threshold:h}=e;const p=p2({delta:m,disabled:!o}),[g,x]=Nf(),b=u.useRef({x:0,y:0}),y=u.useRef({x:0,y:0}),C=u.useMemo(()=>{switch(n){case qr.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case qr.DraggableRect:return a}},[n,a,c]),w=u.useRef(null),j=u.useCallback(()=>{const N=w.current;if(!N)return;const E=b.current.x*y.current.x,S=b.current.y*y.current.y;N.scrollBy(E,S)},[]),I=u.useMemo(()=>l===On.TreeOrder?[...f].reverse():f,[l,f]);u.useEffect(()=>{if(!o||!f.length||!C){x();return}for(const N of I){if(s?.(N)===!1)continue;const E=f.indexOf(N),S=d[E];if(!S)continue;const{direction:v,speed:R}=e2(N,S,C,r,h);for(const T of["x","y"])p[T][v[T]]||(R[T]=0,v[T]=0);if(R.x>0||R.y>0){x(),w.current=N,g(j,i),b.current=R,y.current=v;return}}b.current={x:0,y:0},y.current={x:0,y:0},x()},[r,j,s,x,o,i,JSON.stringify(C),JSON.stringify(p),g,f,I,d,JSON.stringify(h)])}const h2={x:{[Ze.Backward]:!1,[Ze.Forward]:!1},y:{[Ze.Backward]:!1,[Ze.Forward]:!1}};function p2(e){let{delta:r,disabled:n}=e;const s=Cs(r);return ln(a=>{if(n||!s||!a)return h2;const o={x:Math.sign(r.x-s.x),y:Math.sign(r.y-s.y)};return{x:{[Ze.Backward]:a.x[Ze.Backward]||o.x===-1,[Ze.Forward]:a.x[Ze.Forward]||o.x===1},y:{[Ze.Backward]:a.y[Ze.Backward]||o.y===-1,[Ze.Forward]:a.y[Ze.Forward]||o.y===1}}},[n,r,s])}function x2(e,r){const n=r!=null?e.get(r):void 0,s=n?n.node.current:null;return ln(a=>{var o;return r==null?null:(o=s??a)!=null?o:null},[s,r])}function g2(e,r){return u.useMemo(()=>e.reduce((n,s)=>{const{sensor:a}=s,o=a.activators.map(i=>({eventName:i.eventName,handler:r(i.handler,s)}));return[...n,...o]},[]),[e,r])}var rn;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(rn||(rn={}));var Es;(function(e){e.Optimized="optimized"})(Es||(Es={}));const ao=new Map;function b2(e,r){let{dragging:n,dependencies:s,config:a}=r;const[o,i]=u.useState(null),{frequency:l,measure:c,strategy:f}=a,d=u.useRef(e),m=b(),h=en(m),p=u.useCallback(function(y){y===void 0&&(y=[]),!h.current&&i(C=>C===null?y:C.concat(y.filter(w=>!C.includes(w))))},[h]),g=u.useRef(null),x=ln(y=>{if(m&&!n)return ao;if(!y||y===ao||d.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const j=w.node.current,I=j?new qs(c(j),j):null;w.rect.current=I,I&&C.set(w.id,I)}return C}return y},[e,o,n,m,c]);return u.useEffect(()=>{d.current=e},[e]),u.useEffect(()=>{m||p()},[n,m]),u.useEffect(()=>{o&&o.length>0&&i(null)},[JSON.stringify(o)]),u.useEffect(()=>{m||typeof l!="number"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},l))},[l,m,p,...s]),{droppableRects:x,measureDroppableContainers:p,measuringScheduled:o!=null};function b(){switch(f){case rn.Always:return!1;case rn.BeforeDragging:return n;default:return!n}}}function Zi(e,r){return ln(n=>e?n||(typeof r=="function"?r(e):e):null,[r,e])}function v2(e,r){return Zi(e,r)}function y2(e){let{callback:r,disabled:n}=e;const s=Gs(r),a=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(s)},[s,n]);return u.useEffect(()=>()=>a?.disconnect(),[a]),a}function Kn(e){let{callback:r,disabled:n}=e;const s=Gs(r),a=u.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(s)},[n]);return u.useEffect(()=>()=>a?.disconnect(),[a]),a}function w2(e){return new qs(Tr(e),e)}function oo(e,r,n){r===void 0&&(r=w2);const[s,a]=u.useState(null);function o(){a(c=>{if(!e)return null;if(e.isConnected===!1){var f;return(f=c??n)!=null?f:null}const d=r(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const i=y2({callback(c){if(e)for(const f of c){const{type:d,target:m}=f;if(d==="childList"&&m instanceof HTMLElement&&m.contains(e)){o();break}}}}),l=Kn({callback:o});return Lt(()=>{o(),e?(l?.observe(e),i?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),i?.disconnect())},[e]),s}function k2(e){const r=Zi(e);return $i(e,r)}const io=[];function j2(e){const r=u.useRef(e),n=ln(s=>e?s&&s!==io&&e&&r.current&&e.parentNode===r.current.parentNode?s:qn(e):io,[e]);return u.useEffect(()=>{r.current=e},[e]),n}function C2(e){const[r,n]=u.useState(null),s=u.useRef(e),a=u.useCallback(o=>{const i=ls(o.target);i&&n(l=>l?(l.set(i,Ss(i)),new Map(l)):null)},[]);return u.useEffect(()=>{const o=s.current;if(e!==o){i(o);const l=e.map(c=>{const f=ls(c);return f?(f.addEventListener("scroll",a,{passive:!0}),[f,Ss(f)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),s.current=e}return()=>{i(e),i(o)};function i(l){l.forEach(c=>{const f=ls(c);f?.removeEventListener("scroll",a)})}},[a,e]),u.useMemo(()=>e.length?r?Array.from(r.values()).reduce((o,i)=>Nr(o,i),wt):Wi(e):wt,[e,r])}function lo(e,r){r===void 0&&(r=[]);const n=u.useRef(null);return u.useEffect(()=>{n.current=null},r),u.useEffect(()=>{const s=e!==wt;s&&!n.current&&(n.current=e),!s&&n.current&&(n.current=null)},[e]),n.current?tn(e,n.current):wt}function N2(e){u.useEffect(()=>{if(!Un)return;const r=e.map(n=>{let{sensor:s}=n;return s.setup==null?void 0:s.setup()});return()=>{for(const n of r)n?.()}},e.map(r=>{let{sensor:n}=r;return n}))}function S2(e,r){return u.useMemo(()=>e.reduce((n,s)=>{let{eventName:a,handler:o}=s;return n[a]=i=>{o(i,r)},n},{}),[e,r])}function Gi(e){return u.useMemo(()=>e?Xf(e):null,[e])}const co=[];function R2(e,r){r===void 0&&(r=Tr);const[n]=e,s=Gi(n?st(n):null),[a,o]=u.useState(co);function i(){o(()=>e.length?e.map(c=>Pi(c)?s:new qs(r(c),c)):co)}const l=Kn({callback:i});return Lt(()=>{l?.disconnect(),i(),e.forEach(c=>l?.observe(c))},[e]),a}function E2(e){if(!e)return null;if(e.children.length>1)return e;const r=e.children[0];return on(r)?r:e}function M2(e){let{measure:r}=e;const[n,s]=u.useState(null),a=u.useCallback(f=>{for(const{target:d}of f)if(on(d)){s(m=>{const h=r(d);return m?{...m,width:h.width,height:h.height}:h});break}},[r]),o=Kn({callback:a}),i=u.useCallback(f=>{const d=E2(f);o?.disconnect(),d&&o?.observe(d),s(d?r(d):null)},[r,o]),[l,c]=zn(i);return u.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const I2=[{sensor:Ys,options:{}},{sensor:Ks,options:{}}],L2={current:{}},Cn={draggable:{measure:to},droppable:{measure:to,strategy:rn.WhileDragging,frequency:Es.Optimized},dragOverlay:{measure:Tr}};class Kr extends Map{get(r){var n;return r!=null&&(n=super.get(r))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(r=>{let{disabled:n}=r;return!n})}getNodeFor(r){var n,s;return(n=(s=this.get(r))==null?void 0:s.node.current)!=null?n:void 0}}const A2={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Kr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Dn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Cn,measureDroppableContainers:Dn,windowRect:null,measuringScheduled:!1},T2={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Dn,draggableNodes:new Map,over:null,measureDroppableContainers:Dn},Xn=u.createContext(T2),Ui=u.createContext(A2);function z2(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Kr}}}function D2(e,r){switch(r.type){case He.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case He.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:r.coordinates.x-e.draggable.initialCoordinates.x,y:r.coordinates.y-e.draggable.initialCoordinates.y}}};case He.DragEnd:case He.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case He.RegisterDroppable:{const{element:n}=r,{id:s}=n,a=new Kr(e.droppable.containers);return a.set(s,n),{...e,droppable:{...e.droppable,containers:a}}}case He.SetDroppableDisabled:{const{id:n,key:s,disabled:a}=r,o=e.droppable.containers.get(n);if(!o||s!==o.key)return e;const i=new Kr(e.droppable.containers);return i.set(n,{...o,disabled:a}),{...e,droppable:{...e.droppable,containers:i}}}case He.UnregisterDroppable:{const{id:n,key:s}=r,a=e.droppable.containers.get(n);if(!a||s!==a.key)return e;const o=new Kr(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function O2(e){let{disabled:r}=e;const{active:n,activatorEvent:s,draggableNodes:a}=u.useContext(Xn),o=Cs(s),i=Cs(n?.id);return u.useEffect(()=>{if(!r&&!s&&o&&i!=null){if(!Us(o)||document.activeElement===o.target)return;const l=a.get(i);if(!l)return;const{activatorNode:c,node:f}=l;if(!c.current&&!f.current)return;requestAnimationFrame(()=>{for(const d of[c.current,f.current]){if(!d)continue;const m=Ef(d);if(m){m.focus();break}}})}},[s,r,a,i,o]),null}function $2(e,r){let{transform:n,...s}=r;return e!=null&&e.length?e.reduce((a,o)=>o({transform:a,...s}),n):n}function F2(e){return u.useMemo(()=>({draggable:{...Cn.draggable,...e?.draggable},droppable:{...Cn.droppable,...e?.droppable},dragOverlay:{...Cn.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function B2(e){let{activeNode:r,measure:n,initialRect:s,config:a=!0}=e;const o=u.useRef(!1),{x:i,y:l}=typeof a=="boolean"?{x:a,y:a}:a;Lt(()=>{if(!i&&!l||!r){o.current=!1;return}if(o.current||!s)return;const f=r?.node.current;if(!f||f.isConnected===!1)return;const d=n(f),m=$i(d,s);if(i||(m.x=0),l||(m.y=0),o.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const h=Fi(f);h&&h.scrollBy({top:m.y,left:m.x})}},[r,i,l,s,n])}const qi=u.createContext({...wt,scaleX:1,scaleY:1});var Yt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Yt||(Yt={}));const V2=u.memo(function(r){var n,s,a,o;let{id:i,accessibility:l,autoScroll:c=!0,children:f,sensors:d=I2,collisionDetection:m=Wf,measuring:h,modifiers:p,...g}=r;const x=u.useReducer(D2,void 0,z2),[b,y]=x,[C,w]=zf(),[j,I]=u.useState(Yt.Uninitialized),N=j===Yt.Initialized,{draggable:{active:E,nodes:S,translate:v},droppable:{containers:R}}=b,T=E!=null?S.get(E):null,A=u.useRef({initial:null,translated:null}),V=u.useMemo(()=>{var fe;return E!=null?{id:E,data:(fe=T?.data)!=null?fe:L2,rect:A}:null},[E,T]),F=u.useRef(null),[Y,_]=u.useState(null),[B,L]=u.useState(null),Z=en(g,Object.values(g)),D=cn("DndDescribedBy",i),q=u.useMemo(()=>R.getEnabled(),[R]),P=F2(h),{droppableRects:H,measureDroppableContainers:ae,measuringScheduled:ie}=b2(q,{dragging:N,dependencies:[v.x,v.y],config:P.droppable}),ce=x2(S,E),oe=u.useMemo(()=>B?Ns(B):null,[B]),Me=Ye(),pe=v2(ce,P.draggable.measure);B2({activeNode:E!=null?S.get(E):null,config:Me.layoutShiftCompensation,initialRect:pe,measure:P.draggable.measure});const te=oo(ce,P.draggable.measure,pe),ve=oo(ce?ce.parentElement:null),M=u.useRef({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),G=R.getNodeFor((n=M.current.over)==null?void 0:n.id),O=M2({measure:P.dragOverlay.measure}),le=(s=O.nodeRef.current)!=null?s:ce,J=N?(a=O.rect)!=null?a:te:null,ge=!!(O.nodeRef.current&&O.rect),we=k2(ge?null:te),ne=Gi(le?st(le):null),ue=j2(N?G??ce:null),Le=R2(ue),Ce=$2(p,{transform:{x:v.x-we.x,y:v.y-we.y,scaleX:1,scaleY:1},activatorEvent:B,active:V,activeNodeRect:te,containerNodeRect:ve,draggingNodeRect:J,over:M.current.over,overlayNodeRect:O.rect,scrollableAncestors:ue,scrollableAncestorRects:Le,windowRect:ne}),ee=oe?Nr(oe,v):null,Ie=C2(ue),$=lo(Ie),Fe=lo(Ie,[te]),Re=Nr(Ce,$),Ue=J?Gf(J,Ce):null,ze=V&&Ue?m({active:V,collisionRect:Ue,droppableRects:H,droppableContainers:q,pointerCoordinates:ee}):null,Tt=Oi(ze,"id"),[be,de]=u.useState(null),rt=ge?Ce:Nr(Ce,Fe),ye=Hf(rt,(o=be?.rect)!=null?o:null,te),qe=u.useRef(null),kt=u.useCallback((fe,Be)=>{let{sensor:Ae,options:nt}=Be;if(F.current==null)return;const De=S.get(F.current);if(!De)return;const Ke=fe.nativeEvent,Ee=new Ae({active:F.current,activeNode:De,event:Ke,options:nt,context:M,onAbort(Se){if(!S.get(Se))return;const{onDragAbort:Ve}=Z.current,et={id:Se};Ve?.(et),C({type:"onDragAbort",event:et})},onPending(Se,Je,Ve,et){if(!S.get(Se))return;const{onDragPending:ht}=Z.current,_e={id:Se,constraint:Je,initialCoordinates:Ve,offset:et};ht?.(_e),C({type:"onDragPending",event:_e})},onStart(Se){const Je=F.current;if(Je==null)return;const Ve=S.get(Je);if(!Ve)return;const{onDragStart:et}=Z.current,tt={activatorEvent:Ke,active:{id:Je,data:Ve.data,rect:A}};Pt.unstable_batchedUpdates(()=>{et?.(tt),I(Yt.Initializing),y({type:He.DragStart,initialCoordinates:Se,active:Je}),C({type:"onDragStart",event:tt}),_(qe.current),L(Ke)})},onMove(Se){y({type:He.DragMove,coordinates:Se})},onEnd:Qe(He.DragEnd),onCancel:Qe(He.DragCancel)});qe.current=Ee;function Qe(Se){return async function(){const{active:Ve,collisions:et,over:tt,scrollAdjustedTranslate:ht}=M.current;let _e=null;if(Ve&&ht){const{cancelDrop:Xe}=Z.current;_e={activatorEvent:Ke,active:Ve,collisions:et,delta:ht,over:tt},Se===He.DragEnd&&typeof Xe=="function"&&await Promise.resolve(Xe(_e))&&(Se=He.DragCancel)}F.current=null,Pt.unstable_batchedUpdates(()=>{y({type:Se}),I(Yt.Uninitialized),de(null),_(null),L(null),qe.current=null;const Xe=Se===He.DragEnd?"onDragEnd":"onDragCancel";if(_e){const jt=Z.current[Xe];jt?.(_e),C({type:Xe,event:_e})}})}}},[S]),Ht=u.useCallback((fe,Be)=>(Ae,nt)=>{const De=Ae.nativeEvent,Ke=S.get(nt);if(F.current!==null||!Ke||De.dndKit||De.defaultPrevented)return;const Ee={active:Ke};fe(Ae,Be.options,Ee)===!0&&(De.dndKit={capturedBy:Be.sensor},F.current=nt,kt(Ae,Be))},[S,kt]),Ne=g2(d,Ht);N2(d),Lt(()=>{te&&j===Yt.Initializing&&I(Yt.Initialized)},[te,j]),u.useEffect(()=>{const{onDragMove:fe}=Z.current,{active:Be,activatorEvent:Ae,collisions:nt,over:De}=M.current;if(!Be||!Ae)return;const Ke={active:Be,activatorEvent:Ae,collisions:nt,delta:{x:Re.x,y:Re.y},over:De};Pt.unstable_batchedUpdates(()=>{fe?.(Ke),C({type:"onDragMove",event:Ke})})},[Re.x,Re.y]),u.useEffect(()=>{const{active:fe,activatorEvent:Be,collisions:Ae,droppableContainers:nt,scrollAdjustedTranslate:De}=M.current;if(!fe||F.current==null||!Be||!De)return;const{onDragOver:Ke}=Z.current,Ee=nt.get(Tt),Qe=Ee&&Ee.rect.current?{id:Ee.id,rect:Ee.rect.current,data:Ee.data,disabled:Ee.disabled}:null,Se={active:fe,activatorEvent:Be,collisions:Ae,delta:{x:De.x,y:De.y},over:Qe};Pt.unstable_batchedUpdates(()=>{de(Qe),Ke?.(Se),C({type:"onDragOver",event:Se})})},[Tt]),Lt(()=>{M.current={activatorEvent:B,active:V,activeNode:ce,collisionRect:Ue,collisions:ze,droppableRects:H,draggableNodes:S,draggingNode:le,draggingNodeRect:J,droppableContainers:R,over:be,scrollableAncestors:ue,scrollAdjustedTranslate:Re},A.current={initial:J,translated:Ue}},[V,ce,ze,Ue,S,le,J,H,R,be,ue,Re]),m2({...Me,delta:v,draggingRect:Ue,pointerCoordinates:ee,scrollableAncestors:ue,scrollableAncestorRects:Le});const mr=u.useMemo(()=>({active:V,activeNode:ce,activeNodeRect:te,activatorEvent:B,collisions:ze,containerNodeRect:ve,dragOverlay:O,draggableNodes:S,droppableContainers:R,droppableRects:H,over:be,measureDroppableContainers:ae,scrollableAncestors:ue,scrollableAncestorRects:Le,measuringConfiguration:P,measuringScheduled:ie,windowRect:ne}),[V,ce,te,B,ze,ve,O,S,R,H,be,ae,ue,Le,P,ie,ne]),mt=u.useMemo(()=>({activatorEvent:B,activators:Ne,active:V,activeNodeRect:te,ariaDescribedById:{draggable:D},dispatch:y,draggableNodes:S,over:be,measureDroppableContainers:ae}),[B,Ne,V,te,y,D,S,be,ae]);return u.createElement(Ti.Provider,{value:w},u.createElement(Xn.Provider,{value:mt},u.createElement(Ui.Provider,{value:mr},u.createElement(qi.Provider,{value:ye},f)),u.createElement(O2,{disabled:l?.restoreFocus===!1})),u.createElement($f,{...l,hiddenTextDescribedById:D}));function Ye(){const fe=Y?.autoScrollEnabled===!1,Be=typeof c=="object"?c.enabled===!1:c===!1,Ae=N&&!fe&&!Be;return typeof c=="object"?{...c,enabled:Ae}:{enabled:Ae}}}),P2=u.createContext(null),uo="button",_2="Draggable";function W2(e){let{id:r,data:n,disabled:s=!1,attributes:a}=e;const o=cn(_2),{activators:i,activatorEvent:l,active:c,activeNodeRect:f,ariaDescribedById:d,draggableNodes:m,over:h}=u.useContext(Xn),{role:p=uo,roleDescription:g="draggable",tabIndex:x=0}=a??{},b=c?.id===r,y=u.useContext(b?qi:P2),[C,w]=zn(),[j,I]=zn(),N=S2(i,r),E=en(n);Lt(()=>(m.set(r,{id:r,key:o,node:C,activatorNode:j,data:E}),()=>{const v=m.get(r);v&&v.key===o&&m.delete(r)}),[m,r]);const S=u.useMemo(()=>({role:p,tabIndex:x,"aria-disabled":s,"aria-pressed":b&&p===uo?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[s,p,x,b,g,d.draggable]);return{active:c,activatorEvent:l,activeNodeRect:f,attributes:S,isDragging:b,listeners:s?void 0:N,node:C,over:h,setNodeRef:w,setActivatorNodeRef:I,transform:y}}function H2(){return u.useContext(Ui)}const Z2="Droppable",G2={timeout:25};function U2(e){let{data:r,disabled:n=!1,id:s,resizeObserverConfig:a}=e;const o=cn(Z2),{active:i,dispatch:l,over:c,measureDroppableContainers:f}=u.useContext(Xn),d=u.useRef({disabled:n}),m=u.useRef(!1),h=u.useRef(null),p=u.useRef(null),{disabled:g,updateMeasurementsFor:x,timeout:b}={...G2,...a},y=en(x??s),C=u.useCallback(()=>{if(!m.current){m.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{f(Array.isArray(y.current)?y.current:[y.current]),p.current=null},b)},[b]),w=Kn({callback:C,disabled:g||!i}),j=u.useCallback((S,v)=>{w&&(v&&(w.unobserve(v),m.current=!1),S&&w.observe(S))},[w]),[I,N]=zn(j),E=en(r);return u.useEffect(()=>{!w||!I.current||(w.disconnect(),m.current=!1,w.observe(I.current))},[I,w]),u.useEffect(()=>(l({type:He.RegisterDroppable,element:{id:s,key:o,disabled:n,node:I,rect:h,data:E}}),()=>l({type:He.UnregisterDroppable,key:o,id:s})),[s]),u.useEffect(()=>{n!==d.current.disabled&&(l({type:He.SetDroppableDisabled,id:s,key:o,disabled:n}),d.current.disabled=n)},[s,o,n,l]),{active:i,rect:h,isOver:c?.id===s,node:I,over:c,setNodeRef:N}}function Qs(e,r,n){const s=e.slice();return s.splice(n<0?s.length+n:n,0,s.splice(r,1)[0]),s}function q2(e,r){return e.reduce((n,s,a)=>{const o=r.get(s);return o&&(n[a]=o),n},Array(e.length))}function wn(e){return e!==null&&e>=0}function K2(e,r){if(e===r)return!0;if(e.length!==r.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==r[n])return!1;return!0}function X2(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Js=e=>{let{rects:r,activeIndex:n,overIndex:s,index:a}=e;const o=Qs(r,s,n),i=r[a],l=o[a];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}},Ki="Sortable",Xi=u.createContext({activeIndex:-1,containerId:Ki,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Js,disabled:{draggable:!1,droppable:!1}});function Y2(e){let{children:r,id:n,items:s,strategy:a=Js,disabled:o=!1}=e;const{active:i,dragOverlay:l,droppableRects:c,over:f,measureDroppableContainers:d}=H2(),m=cn(Ki,n),h=l.rect!==null,p=u.useMemo(()=>s.map(N=>typeof N=="object"&&"id"in N?N.id:N),[s]),g=i!=null,x=i?p.indexOf(i.id):-1,b=f?p.indexOf(f.id):-1,y=u.useRef(p),C=!K2(p,y.current),w=b!==-1&&x===-1||C,j=X2(o);Lt(()=>{C&&g&&d(p)},[C,p,g,d]),u.useEffect(()=>{y.current=p},[p]);const I=u.useMemo(()=>({activeIndex:x,containerId:m,disabled:j,disableTransforms:w,items:p,overIndex:b,useDragOverlay:h,sortedRects:q2(p,c),strategy:a}),[x,m,j.draggable,j.droppable,w,p,b,c,h,a]);return u.createElement(Xi.Provider,{value:I},r)}const Q2=e=>{let{id:r,items:n,activeIndex:s,overIndex:a}=e;return Qs(n,s,a).indexOf(r)},J2=e=>{let{containerId:r,isSorting:n,wasDragging:s,index:a,items:o,newIndex:i,previousItems:l,previousContainerId:c,transition:f}=e;return!f||!s||l!==o&&a===i?!1:n?!0:i!==a&&r===c},em={duration:200,easing:"ease"},Yi="transform",tm=Rr.Transition.toString({property:Yi,duration:0,easing:"linear"}),rm={roleDescription:"sortable"};function nm(e){let{disabled:r,index:n,node:s,rect:a}=e;const[o,i]=u.useState(null),l=u.useRef(n);return Lt(()=>{if(!r&&n!==l.current&&s.current){const c=a.current;if(c){const f=Tr(s.current,{ignoreTransform:!0}),d={x:c.left-f.left,y:c.top-f.top,scaleX:c.width/f.width,scaleY:c.height/f.height};(d.x||d.y)&&i(d)}}n!==l.current&&(l.current=n)},[r,n,s,a]),u.useEffect(()=>{o&&i(null)},[o]),o}function Qi(e){let{animateLayoutChanges:r=J2,attributes:n,disabled:s,data:a,getNewIndex:o=Q2,id:i,strategy:l,resizeObserverConfig:c,transition:f=em}=e;const{items:d,containerId:m,activeIndex:h,disabled:p,disableTransforms:g,sortedRects:x,overIndex:b,useDragOverlay:y,strategy:C}=u.useContext(Xi),w=sm(s,p),j=d.indexOf(i),I=u.useMemo(()=>({sortable:{containerId:m,index:j,items:d},...a}),[m,a,j,d]),N=u.useMemo(()=>d.slice(d.indexOf(i)),[d,i]),{rect:E,node:S,isOver:v,setNodeRef:R}=U2({id:i,data:I,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...c}}),{active:T,activatorEvent:A,activeNodeRect:V,attributes:F,setNodeRef:Y,listeners:_,isDragging:B,over:L,setActivatorNodeRef:Z,transform:D}=W2({id:i,data:I,attributes:{...rm,...n},disabled:w.draggable}),q=Cf(R,Y),P=!!T,H=P&&!g&&wn(h)&&wn(b),ae=!y&&B,ie=ae&&H?D:null,oe=H?ie??(l??C)({rects:x,activeNodeRect:V,activeIndex:h,overIndex:b,index:j}):null,Me=wn(h)&&wn(b)?o({id:i,items:d,activeIndex:h,overIndex:b}):j,pe=T?.id,te=u.useRef({activeId:pe,items:d,newIndex:Me,containerId:m}),ve=d!==te.current.items,M=r({active:T,containerId:m,isDragging:B,isSorting:P,id:i,index:j,items:d,newIndex:te.current.newIndex,previousItems:te.current.items,previousContainerId:te.current.containerId,transition:f,wasDragging:te.current.activeId!=null}),G=nm({disabled:!M,index:j,node:S,rect:E});return u.useEffect(()=>{P&&te.current.newIndex!==Me&&(te.current.newIndex=Me),m!==te.current.containerId&&(te.current.containerId=m),d!==te.current.items&&(te.current.items=d)},[P,Me,m,d]),u.useEffect(()=>{if(pe===te.current.activeId)return;if(pe!=null&&te.current.activeId==null){te.current.activeId=pe;return}const le=setTimeout(()=>{te.current.activeId=pe},50);return()=>clearTimeout(le)},[pe]),{active:T,activeIndex:h,attributes:F,data:I,rect:E,index:j,newIndex:Me,items:d,isOver:v,isSorting:P,isDragging:B,listeners:_,node:S,overIndex:b,over:L,setNodeRef:q,setActivatorNodeRef:Z,setDroppableNodeRef:R,setDraggableNodeRef:Y,transform:G??oe,transition:O()};function O(){if(G||ve&&te.current.newIndex===j)return tm;if(!(ae&&!Us(A)||!f)&&(P||M))return Rr.Transition.toString({...f,property:Yi})}}function sm(e,r){var n,s;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:r.draggable,droppable:(s=e?.droppable)!=null?s:r.droppable}}function $n(e){if(!e)return!1;const r=e.data.current;return!!(r&&"sortable"in r&&typeof r.sortable=="object"&&"containerId"in r.sortable&&"items"in r.sortable&&"index"in r.sortable)}const am=[xe.Down,xe.Right,xe.Up,xe.Left],om=(e,r)=>{let{context:{active:n,collisionRect:s,droppableRects:a,droppableContainers:o,over:i,scrollableAncestors:l}}=r;if(am.includes(e.code)){if(e.preventDefault(),!n||!s)return;const c=[];o.getEnabled().forEach(m=>{if(!m||m!=null&&m.disabled)return;const h=a.get(m.id);if(h)switch(e.code){case xe.Down:s.top<h.top&&c.push(m);break;case xe.Up:s.top>h.top&&c.push(m);break;case xe.Left:s.left>h.left&&c.push(m);break;case xe.Right:s.left<h.left&&c.push(m);break}});const f=Pf({collisionRect:s,droppableRects:a,droppableContainers:c});let d=Oi(f,"id");if(d===i?.id&&f.length>1&&(d=f[1].id),d!=null){const m=o.get(n.id),h=o.get(d),p=h?a.get(h.id):null,g=h?.node.current;if(g&&p&&m&&h){const b=qn(g).some((N,E)=>l[E]!==N),y=Ji(m,h),C=im(m,h),w=b||!y?{x:0,y:0}:{x:C?s.width-p.width:0,y:C?s.height-p.height:0},j={x:p.left,y:p.top};return w.x&&w.y?j:tn(j,w)}}}};function Ji(e,r){return!$n(e)||!$n(r)?!1:e.data.current.sortable.containerId===r.data.current.sortable.containerId}function im(e,r){return!$n(e)||!$n(r)||!Ji(e,r)?!1:e.data.current.sortable.index<r.data.current.sortable.index}const lm=[{value:"contains",label:"Contiene"},{value:"equals",label:"Es igual a"},{value:"startsWith",label:"Empieza con"},{value:"endsWith",label:"Termina con"},{value:"gt",label:"Mayor que"},{value:"lt",label:"Menor que"},{value:"notEquals",label:"No es igual a"},{value:"isEmpty",label:"Está vacío"},{value:"isNotEmpty",label:"No está vacío"}],cm=({filter:e,fields:r,onUpdate:n,onRemove:s})=>{const{attributes:a,listeners:o,setNodeRef:i,transform:l,transition:c,isDragging:f}=Qi({id:e.id}),d={transform:Rr.Transform.toString(l),transition:c,zIndex:f?50:void 0,opacity:f?.5:void 0};return t.jsxs("div",{ref:i,style:d,className:"flex items-center gap-1.5 group/rule w-full h-full",children:[t.jsx("div",{...a,...o,className:"flex-none p-1 text-content-tertiary cursor-grab active:cursor-grabbing hover:text-primary-custom-600 transition-colors",children:t.jsx(Ii,{className:"w-3.5 h-3.5"})}),t.jsxs("div",{className:"flex-1 flex items-center h-8 border border-border-primary dark:border-dark-border-primary rounded-md bg-white dark:bg-dark-bg-primary overflow-hidden isolate hover:border-primary-custom-400 dark:hover:border-dark-border-custom transition-all duration-200",children:[t.jsx("div",{className:"w-28 md:w-36 h-full bg-gray-50/50 dark:bg-gray-800/20 border-r border-border-primary dark:border-dark-border-primary",children:t.jsx(ur,{options:r.map(m=>({value:m.accessorKey,label:m.header})),value:e.field,onChange:m=>n(e.id,{field:String(m)}),className:"!gap-0 !h-full",triggerClassName:"!h-full !py-0 !px-2.5 !border-none !bg-transparent !shadow-none !ring-0 !rounded-none !flex !items-center text-[10px] font-semibold uppercase text-content-primary dark:text-dark-content-primary !min-w-0",showLabel:!1,showDescription:!1,fullWidth:!0})}),t.jsx("div",{className:"w-20 md:w-24 h-full border-r border-border-primary dark:border-dark-border-primary",children:t.jsx(ur,{options:lm,value:e.operator||"contains",onChange:m=>n(e.id,{operator:String(m)}),className:"!gap-0 !h-full",triggerClassName:"!h-full !py-0 !px-2 !border-none !bg-transparent !shadow-none !ring-0 !rounded-none !flex !items-center text-[10px] font-semibold text-content-primary dark:text-dark-content-primary !min-w-0",showLabel:!1,showDescription:!1,fullWidth:!0})}),t.jsx("div",{className:"flex-1 h-full flex items-center px-2.5",children:["isEmpty","isNotEmpty"].includes(e.operator||"")?t.jsx("span",{className:"text-[10px] text-content-tertiary italic",children:"N/A"}):t.jsx("input",{type:"text",placeholder:"Valor...",value:e.value||"",onChange:m=>n(e.id,{value:m.target.value}),className:"w-full h-full bg-transparent border-none outline-none focus:ring-0 text-xs text-content-primary dark:text-dark-content-primary placeholder:text-content-tertiary"})}),t.jsx("button",{type:"button",onClick:()=>s(e.id),className:"h-full px-2.5 flex items-center justify-center border-l border-border-primary dark:border-dark-border-primary hover:bg-red-50 dark:hover:bg-red-900/20 text-content-tertiary hover:text-error-content transition-colors",children:t.jsx(tr,{className:"w-3.5 h-3.5"})})]})]})},el=({group:e,fields:r,onUpdate:n,onRemove:s,onAddRule:a,onAddGroup:o,isRoot:i=!1,showConnectors:l=!0})=>{const{attributes:c,listeners:f,setNodeRef:d,transform:m,transition:h,isDragging:p}=Qi({id:e.id,disabled:i}),g={transform:Rr.Transform.toString(m),transition:h,zIndex:p?50:void 0,opacity:p?.5:void 0},x=e.children||[];return t.jsxs("div",{ref:d,style:g,className:`
|
|
1653
|
+
flex flex-col relative
|
|
1654
|
+
${i?"":"p-3 border border-border-primary/50 dark:border-dark-border-primary/30 rounded-lg bg-gray-50/20 dark:bg-gray-800/5"}
|
|
1655
|
+
`,children:[!i&&t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{...c,...f,className:"p-1 text-content-tertiary cursor-grab active:cursor-grabbing hover:text-primary-custom-600 transition-colors",children:t.jsx(Ii,{className:"w-3.5 h-3.5"})}),l&&t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-[10px] font-bold uppercase text-content-primary dark:text-dark-content-primary tracking-wider",children:"Unir por:"}),t.jsx("div",{className:"w-16",children:t.jsx(ur,{options:[{value:"AND",label:"Y"},{value:"OR",label:"O"}],value:e.connector,onChange:b=>n(e.id,{connector:b}),triggerClassName:"!h-6 !py-0 !px-1.5 !border-border-primary dark:!border-dark-border-primary !bg-white dark:!bg-dark-bg-primary text-[10px] font-semibold text-content-primary dark:text-dark-content-primary",showLabel:!1,showDescription:!1})})]})]}),t.jsx("button",{type:"button",onClick:()=>s(e.id),className:"p-1 text-content-tertiary hover:text-error-content transition-colors",title:"Eliminar grupo",children:t.jsx(tr,{className:"w-3.5 h-3.5"})})]}),i&&x.length>1&&l&&t.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[t.jsx("span",{className:"text-[10px] font-bold uppercase text-content-primary dark:text-dark-content-primary tracking-wider px-1.5 py-0.5 rounded",children:"Unir Por:"}),t.jsx("div",{className:"w-16",children:t.jsx(ur,{options:[{value:"AND",label:"Y"},{value:"OR",label:"O"}],value:e.connector,onChange:b=>n(e.id,{connector:b}),triggerClassName:"!h-6 !py-0 !px-1.5 !border-border-primary dark:!border-dark-border-primary !bg-white dark:!bg-dark-bg-primary text-[10px] font-semibold text-content-primary dark:text-dark-content-primary",showLabel:!1,showDescription:!1})})]}),t.jsxs("div",{className:`flex flex-wrap items-start gap-3 relative ${i?"":"ml-1 border-l border-primary-custom-200 dark:border-dark-border-primary/50 pl-4"}`,children:[t.jsx(Y2,{items:x.map(b=>b.id),strategy:Js,children:x.map((b,y)=>t.jsx("div",{className:b.isGroup?"w-full":"flex-1 min-w-[450px] max-w-full md:max-w-[calc(50%-12px)] lg:max-w-[calc(33.33%-12px)]",children:b.isGroup?t.jsx(el,{group:b,fields:r,onUpdate:n,onRemove:s,onAddRule:a,onAddGroup:o,showConnectors:l}):t.jsx(cm,{filter:b,fields:r,onUpdate:n,onRemove:s,index:y})},b.id))}),t.jsxs("div",{className:"w-full flex items-center gap-3 mt-1.5 opacity-70 hover:opacity-100 transition-opacity",children:[t.jsxs("button",{type:"button",onClick:()=>a(e.id),className:"flex items-center gap-1 text-[9px] font-bold text-primary-custom-600 hover:text-primary-custom-700 transition-colors uppercase tracking-tight",children:[t.jsx(Cr,{className:"w-3 h-3"}),"Añadir Regla"]}),l&&t.jsxs("button",{type:"button",onClick:()=>o(e.id),className:"flex items-center gap-1 text-[9px] font-semibold text-content-primary dark:text-dark-content-primary hover:text-primary-custom-600 transition-colors uppercase tracking-tight",children:[t.jsx(Cr,{className:"w-3 h-3"}),"Añadir Grupo"]})]})]})]})},dm=({fields:e,onSearch:r,onClose:n,initialSearchTerm:s,initialSearchField:a,showConnectors:o=!1,filterableFields:i=[]})=>{const l=u.useMemo(()=>i&&i.length>0?e.filter(E=>i.includes(E.accessorKey)):e.filter(E=>E.config?.searchable!==!1),[e,i]),c=Ff(Qa(Ys,{activationConstraint:{distance:5}}),Qa(Ks,{coordinateGetter:om})),[f,d]=u.useState(()=>{const E=l[0]?.accessorKey||"";return{id:"root",connector:"AND",isGroup:!0,children:[{id:`rule-${Math.random().toString(36).substr(2,9)}`,field:a&&a!=="all"?a:E,connector:"AND",value:s||"",operator:"contains",isGroup:!1}]}}),m=u.useCallback((E,S,v)=>E.id===S?{...E,...v}:E.children?{...E,children:E.children.map(R=>m(R,S,v))}:E,[]),h=u.useCallback((E,S)=>{if(E.id===S)return null;if(E.children){const v=E.children.map(R=>h(R,S)).filter(R=>R!==null);return{...E,children:v}}return E},[]),p=u.useCallback((E,S)=>{if(E.id===S){const v={id:`rule-${Math.random().toString(36).substr(2,9)}`,field:l[0]?.accessorKey||"",connector:"AND",value:"",operator:"contains",isGroup:!1};return{...E,children:[...E.children||[],v]}}return E.children?{...E,children:E.children.map(v=>p(v,S))}:E},[l]),g=u.useCallback((E,S)=>{if(E.id===S){const v={id:`group-${Math.random().toString(36).substr(2,9)}`,connector:"AND",isGroup:!0,children:[{id:`rule-${Math.random().toString(36).substr(2,9)}`,field:l[0]?.accessorKey||"",connector:"AND",value:"",operator:"contains",isGroup:!1}]};return{...E,children:[...E.children||[],v]}}return E.children?{...E,children:E.children.map(v=>g(v,S))}:E},[l]),x=u.useCallback((E,S,v)=>{if(E.children){const R=E.children.findIndex(A=>A.id===S),T=E.children.findIndex(A=>A.id===v);return R!==-1&&T!==-1?{...E,children:Qs(E.children,R,T)}:{...E,children:E.children.map(A=>x(A,S,v))}}return E},[]),b=(E,S)=>{d(v=>m(v,E,S))},y=E=>{d(S=>h(S,E)||S)},C=E=>{d(S=>p(S,E))},w=E=>{d(S=>g(S,E))},j=E=>{const{active:S,over:v}=E;v&&S.id!==v.id&&d(R=>x(R,S.id,v.id))},I=()=>{f.children&&r(f.children)},N=()=>{const E=l[0]?.accessorKey||"";d({id:"root",connector:"AND",isGroup:!0,children:[{id:`rule-${Math.random().toString(36).substr(2,9)}`,field:E,connector:"AND",value:"",operator:"contains",isGroup:!1}]}),r([])};return t.jsxs("div",{className:"bg-white dark:bg-dark-bg-primary p-5 animate-in slide-in-from-top duration-300 rounded-2xl shadow-lg border border-border-secondary dark:border-dark-border-primary",children:[t.jsxs("div",{className:"flex items-center justify-between mb-6",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"p-1.5 bg-primary-custom-50 dark:bg-primary-custom-900/20 rounded-lg",children:t.jsx(js,{className:"w-4 h-4 text-primary-custom-600"})}),t.jsx("div",{className:"flex flex-col",children:t.jsx("span",{className:"text-xs font-bold text-content-primary dark:text-dark-content-primary uppercase tracking-widest",children:"Búsqueda Avanzada"})})]}),t.jsx(Q,{type:"outline",size:"xs",iconOnly:!0,leftIcon:t.jsx(tr,{className:"w-3.5 h-3.5"}),onClick:n,ariaLabel:"Cerrar",className:"!bg-white dark:!bg-dark-bg-primary"})]}),t.jsx(V2,{sensors:c,collisionDetection:Vf,onDragEnd:j,children:t.jsx(el,{group:f,fields:e,onUpdate:b,onRemove:y,onAddRule:C,onAddGroup:w,isRoot:!0,showConnectors:o})}),t.jsxs("div",{className:"flex justify-center items-center gap-4 mt-10 pt-6 border-t border-border-secondary dark:border-dark-border-primary",children:[t.jsx(Q,{type:"plain",size:"base",onClick:N,className:"text-content-primary dark:text-dark-content-primary font-bold hover:text-primary-custom-600 transition-colors",children:"Limpiar todos los filtros"}),t.jsx(Q,{type:"default",size:"l",leftIcon:t.jsx(js,{className:"w-4 h-4"}),onClick:I,className:"px-16 shadow-lg transform hover:scale-105 transition-all duration-200",children:"Filtrar Resultados"})]})]})},um=({isOpen:e,onClose:r,recordId:n,record:s,companies:a,fields:o,onConfirm:i,isLinked:l,variant:c="manual"})=>{const[f,d]=u.useState([]),[m,h]=u.useState([]),p=a.filter(j=>j.uuid!=="000");if(u.useEffect(()=>{if(e){const j=p.filter(I=>l(I.uuid)).map(I=>I.uuid);d(j),h(j)}},[e,n]),!e)return null;const g=JSON.stringify([...f].sort())!==JSON.stringify([...m].sort()),x=j=>{d(I=>I.includes(j)?I.filter(N=>N!==j):[...I,j])},b=()=>{d(p.map(j=>j.uuid))},y=()=>{i(n,f),r()},C=()=>{if(c==="success")return"Haz creado el registro exitosamente";const j=o.filter(N=>N.config?.showInLinkModalTitle).map(N=>{const E=s[N.accessorKey];return E?String(E):""}).filter(N=>N!=="");return`Vinculación de registro${j.length>0?` ${j.join(" - ")}`:""}`},w=()=>c==="success"?"El registro se guardó de forma Global; ahora puedes asignarlo a las compañías de tu elección":"Puedes asignar este registro a las compañías de tu elección";return t.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/50 p-4 animate-in fade-in duration-200",children:t.jsxs("div",{className:"bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl shadow-2xl flex flex-col w-full max-w-2xl overflow-hidden relative",children:[t.jsx("div",{className:"absolute right-4 top-4 z-10",children:t.jsx(Q,{type:"outline",size:"xs",iconOnly:!0,leftIcon:t.jsx(tr,{className:"w-4 h-4"}),onClick:r,ariaLabel:"Cerrar",className:"!bg-white dark:!bg-dark-bg-primary"})}),t.jsxs("div",{className:"p-[20px] flex gap-5 items-center",children:[t.jsx("div",{className:"bg-[#ecfccb] dark:bg-lime-900/20 flex items-center justify-center rounded-full shrink-0 size-[40px]",children:t.jsx(df,{className:"size-6 text-lime-700 dark:text-lime-400"})}),t.jsxs("div",{className:"flex flex-col justify-center",children:[t.jsx("h3",{className:"text-[20px] font-bold leading-[28px] tracking-tight text-content-primary dark:text-dark-content-primary",children:C()}),t.jsx("p",{className:"text-[14px] font-normal italic leading-[20px] text-content-tertiary dark:text-content-tertiary",children:w()})]})]}),t.jsx("div",{className:"px-[20px] pb-[20px] flex flex-col gap-[20px] overflow-y-auto max-h-[400px]",children:t.jsx("div",{className:"flex flex-col items-start w-full",children:p.map(j=>{const I=f.includes(j.uuid);return t.jsxs("div",{className:"border border-border-primary dark:border-dark-border-primary h-[64px] px-[8px] flex items-center justify-between rounded-[8px] w-full mb-3 last:mb-0 transition-colors hover:bg-background-secondary dark:hover:bg-dark-bg-inverse/5",children:[t.jsxs("div",{className:"flex items-center gap-[8px]",children:[t.jsx("div",{className:"bg-[#dbeefe] dark:bg-primary-custom-900/20 flex items-center justify-center rounded-[16px] shrink-0 size-[32px]",children:t.jsx(Ei,{className:"size-[18px] text-primary-custom-600 dark:text-primary-custom-400"})}),t.jsx("span",{className:"text-[16px] font-medium leading-[24px] text-content-primary dark:text-dark-content-primary truncate max-w-[300px]",children:j.name})]}),I?t.jsx(Q,{type:"default",size:"xs",onClick:()=>x(j.uuid),className:"!bg-error-content !border-error-border hover:!bg-error-content/90 !text-white",children:"Desvincular"}):t.jsx(Q,{type:"outline",size:"xs",onClick:()=>x(j.uuid),children:"Vincular"})]},j.uuid)})})}),t.jsxs("div",{className:"px-[24px] py-[16px] pb-[24px] flex items-center justify-end gap-[12px] shrink-0 w-full border-t border-border-secondary dark:border-dark-border-primary",children:[t.jsx(Q,{type:"plain",size:"l",onClick:r,children:"Cancelar"}),t.jsx(Q,{type:"outline",size:"l",onClick:b,children:"Vincular todos"}),t.jsx(Q,{type:"default",size:"l",onClick:y,disabled:!g,children:"Confirmar"})]})]})})},fm=({className:e="size-4"})=>t.jsx(Xo,{className:e,"aria-hidden":"true"}),mm=({className:e="size-4"})=>t.jsx(ti,{className:e,"aria-hidden":"true"}),hm=({color:e="zinc",children:r="Lorem ipsum dolor.",leftIcon:n,showLeftIcon:s=!0,showCloseButton:a=!0,onClose:o,className:i="",ariaLabel:l})=>{const c={zinc:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800/30 dark:text-zinc-100",red:"bg-red-100 text-red-900 dark:bg-red-900/30 dark:text-red-100",orange:"bg-orange-100 text-orange-900 dark:bg-orange-900/30 dark:text-orange-100",amber:"bg-amber-100 text-amber-900 dark:bg-amber-900/30 dark:text-amber-100",yellow:"bg-yellow-100 text-yellow-900 dark:bg-yellow-900/30 dark:text-yellow-100",lime:"bg-lime-100 text-lime-900 dark:bg-lime-900/30 dark:text-lime-100",green:"bg-green-100 text-green-900 dark:bg-green-900/30 dark:text-green-100",emerald:"bg-emerald-100 text-emerald-900 dark:bg-emerald-900/30 dark:text-emerald-100",teal:"bg-teal-100 text-teal-900 dark:bg-teal-900/30 dark:text-teal-100",cyan:"bg-cyan-100 text-cyan-900 dark:bg-cyan-900/30 dark:text-cyan-100",sky:"bg-sky-100 text-sky-900 dark:bg-sky-900/30 dark:text-sky-100",blue:"bg-blue-100 text-blue-900 dark:bg-blue-900/30 dark:text-blue-100",indigo:"bg-indigo-100 text-indigo-900 dark:bg-indigo-900/30 dark:text-indigo-100",violet:"bg-violet-100 text-violet-900 dark:bg-violet-900/30 dark:text-violet-100",purple:"bg-purple-100 text-purple-900 dark:bg-purple-900/30 dark:text-purple-100",fuchsia:"bg-fuchsia-100 text-fuchsia-900 dark:bg-fuchsia-900/30 dark:text-fuchsia-100",pink:"bg-pink-100 text-pink-900 dark:bg-pink-900/30 dark:text-pink-100",rose:"bg-rose-100 text-rose-900 dark:bg-rose-900/30 dark:text-rose-100",primary:"bg-blue-100 text-blue-900 dark:bg-blue-900/30 dark:text-blue-100",secondary:"bg-zinc-100 text-zinc-900 dark:bg-zinc-800/30 dark:text-zinc-100",tertiary:"bg-cyan-100 text-cyan-900 dark:bg-cyan-900/30 dark:text-cyan-100"},f=`
|
|
1649
1656
|
flex
|
|
1650
1657
|
items-start
|
|
1651
1658
|
gap-3
|
|
@@ -1655,7 +1662,7 @@
|
|
|
1655
1662
|
shadow-base
|
|
1656
1663
|
transition-all
|
|
1657
1664
|
duration-200
|
|
1658
|
-
`,d="text-xs font-normal leading-4",
|
|
1665
|
+
`,d="text-xs font-normal leading-4",m="w-4 h-4 shrink-0",h=[f,c[e],i].join(" ").replace(/\s+/g," ").trim(),p=()=>s?t.jsx("span",{className:"inline-flex items-center justify-center shrink-0",children:n||t.jsx(fm,{className:m})}):null,g=()=>a?t.jsx("button",{type:"button",onClick:o,className:`
|
|
1659
1666
|
inline-flex
|
|
1660
1667
|
items-center
|
|
1661
1668
|
justify-center
|
|
@@ -1668,7 +1675,7 @@
|
|
|
1668
1675
|
focus:ring-2
|
|
1669
1676
|
focus:ring-offset-1
|
|
1670
1677
|
focus:ring-current
|
|
1671
|
-
`,"aria-label":"Cerrar notificación",children:
|
|
1678
|
+
`,"aria-label":"Cerrar notificación",children:t.jsx(mm,{className:m})}):null;return t.jsxs("div",{className:h,role:"alert","aria-label":l,children:[p(),t.jsx("div",{className:`flex-1 ${d}`,children:r}),g()]})},Nn=({title:e,description:r,color:n="zinc",icon:s,className:a="",children:o,...i})=>{const f=[`
|
|
1672
1679
|
flex
|
|
1673
1680
|
items-start
|
|
1674
1681
|
gap-3
|
|
@@ -1705,31 +1712,31 @@
|
|
|
1705
1712
|
`,secondary:`
|
|
1706
1713
|
bg-background-secondary border-border-primary text-content-primary
|
|
1707
1714
|
dark:bg-dark-bg-primary dark:border-dark-border-primary dark:text-dark-content-primary
|
|
1708
|
-
`}[n],a].join(" ").replace(/\s+/g," ").trim();return e.jsxs("div",{className:u,...i,children:[e.jsx("div",{className:"shrink-0 mt-0.5",children:s||e.jsx(Sc,{className:"w-6 h-6"})}),e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsx("h3",{className:"text-[18px] font-bold leading-[1.2] tracking-tight",children:t}),r&&e.jsx("p",{className:"text-sm font-normal leading-[1.4] opacity-90",children:r}),o&&e.jsx("div",{className:"mt-2",children:o})]})]})},ea="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2027.1.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%202000%202000'%20style='enable-background:new%200%200%202000%202000;'%20xml:space='preserve'%3e%3cpath%20style='fill:%23313131;'%20d='M1757.6,1550.49H268.703c-0.747,0-1.463-0.3-1.99-0.83c-0.528-0.53-0.825-1.24-0.825-1.99%20c0-0.74,0.297-1.46,0.825-1.99c0.527-0.53,1.243-0.82,1.99-0.82H1757.6c0.75,0,1.46,0.29,1.99,0.82c0.53,0.53,0.82,1.25,0.82,1.99%20c0,0.75-0.29,1.46-0.82,1.99C1759.06,1550.19,1758.35,1550.49,1757.6,1550.49z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1456.99,919.459c0,0,182.17,77.91,208.69,127.761c30.56,57.42-15.76,492.64-138.07,514.21%20c-122.32,21.57-519.71,38.71-519.71,38.71v-52.47l-73.628-52.64l59.356-143.71c0,0-126.503,100.07-183.877-48.01%20c-57.375-148.07-74.623-307.562-74.623-307.562L880.5,951.433l67.147,170.907c0,0,124.323-243.007,182.703-262.305%20c48.26-15.897,190.39,24.972,190.39,24.972l7.07,69.962L1456.99,919.459z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1007.9,1602.95c-0.35,0.01-0.71-0.06-1.04-0.2c-0.34-0.13-0.64-0.33-0.89-0.58%20c-0.28-0.26-0.5-0.58-0.65-0.93c-0.15-0.35-0.23-0.72-0.23-1.1v-51.07l-72.439-51.79c-0.519-0.37-0.898-0.9-1.074-1.51%20c-0.176-0.61-0.139-1.26,0.105-1.85l55.551-134.63c-17.811,11.87-62.103,36.71-105.967,24.77%20c-32.132-8.76-57.104-35.58-74.308-79.73c-56.518-146.41-74.532-306.69-74.532-308.288c-0.07-0.652,0.089-1.308,0.451-1.855%20s0.903-0.95,1.53-1.14l145.35-44.314c0.679-0.203,1.409-0.144,2.046,0.164c0.638,0.309,1.137,0.844,1.399,1.502l64.896,165.141%20c19.342-37.24,126.912-240.147,181.472-258.116c48.52-16.009,186.19,23.261,192.05,24.927c0.54,0.157,1.02,0.473,1.37,0.906%20c0.36,0.434,0.58,0.966,0.63,1.526l6.76,66.629l125.96-34.654c0.61-0.182,1.27-0.134,1.84,0.135%20c7.48,3.197,183.39,78.811,210.07,129.007c22.99,43.21,3.51,304.14-62.6,439.72c-22.99,47.12-49.06,73.58-77.48,78.58%20c-121.17,21.35-516.08,38.57-520.15,38.75H1007.9z%20M937.74,1494.04l71.81,51.34c0.35,0.25,0.65,0.59,0.85,0.98%20c0.2,0.39,0.31,0.83,0.32,1.27v49.54c36.59-1.62,401.12-18.22,516.39-38.53c26.55-4.68,51.23-30.08,73.38-75.5%20c28.62-58.66,51.95-150.24,64.16-251.21c10.4-86.89,9.84-162.3-1.38-183.4c-24.77-46.61-192.52-120.063-206.39-126.098%20l-128.35,35.262c-0.4,0.115-0.81,0.141-1.22,0.076c-0.4-0.065-0.79-0.22-1.13-0.453c-0.33-0.232-0.62-0.538-0.82-0.893%20c-0.21-0.355-0.33-0.752-0.37-1.161l-6.89-68.025c-16.73-4.684-142.91-38.978-186.89-24.499%20c-56.52,18.689-179.802,258.501-181.041,260.891c-0.245,0.48-0.626,0.88-1.095,1.16c-0.47,0.27-1.009,0.4-1.552,0.38%20c-0.543-0.03-1.067-0.21-1.508-0.53c-0.441-0.32-0.781-0.76-0.979-1.26l-66.246-168.5l-140.621,42.783%20c2.387,20.267,21.346,168.407,74.105,304.547c16.415,42.38,40.103,68.07,70.412,76.33c52.713,14.37,108.533-29.07,109.096-29.52%20c0.488-0.38,1.091-0.59,1.712-0.59c0.62,0,1.223,0.21,1.711,0.59c0.498,0.38,0.858,0.9,1.025,1.5s0.131,1.24-0.102,1.81%20L937.74,1494.04z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1252.38,839.048V410.046h-0.41c-86.98-5.899-180.81-9.119-278.608-9.119%20c-82.841,0-162.823,2.251-238.234,6.597h0.495v429.295h-0.27c75.343-4.279,155.235-6.598,238.009-6.598%20c97.948,0,191.918,3.243,279.018,9.142V839.048z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1252.38,842.201h-0.18c-89.26-6.057-183.07-9.187-278.837-9.187%20c-80.883,0-160.775,2.252-237.469,6.575h-0.405c-0.745,0.031-1.473-0.233-2.025-0.735c-0.552-0.501-0.884-1.2-0.925-1.945%20c-0.024-0.473,0.069-0.945,0.27-1.373V409.101c-0.305-0.42-0.489-0.916-0.531-1.434c-0.043-0.517,0.057-1.037,0.29-1.501%20c0.232-0.465,0.587-0.857,1.027-1.133c0.44-0.277,0.947-0.427,1.466-0.435C812.048,400.229,892.255,398,973.453,398%20c95.747,0,189.547,3.062,278.807,9.12h0.43c0.71,0.051,1.37,0.368,1.85,0.886c0.48,0.518,0.74,1.199,0.74,1.906v429.474%20c0.01,0.372-0.06,0.74-0.2,1.084c-0.14,0.345-0.35,0.657-0.61,0.92s-0.58,0.47-0.92,0.609c-0.34,0.139-0.71,0.208-1.08,0.202%20H1252.38z%20M973.363,827.429c94.817,0,187.727,3.018,276.197,9.007V412.681c-88.45-5.944-181.35-9.007-276.197-9.007%20c-79.982,0-158.996,2.252-234.924,6.418v423.755C814.367,829.591,893.403,827.429,973.363,827.429z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1119.73,667.758h-0.19c-43.45-2.95-89.12-4.504-135.73-4.504c-39.383,0-78.293,1.081-115.604,3.198%20h-0.203c-0.734,0.019-1.446-0.247-1.988-0.743c-0.542-0.495-0.87-1.182-0.917-1.914c-0.023-0.262-0.023-0.526,0-0.788V455.689%20c-0.14-0.321-0.224-0.664-0.247-1.013c-0.031-0.742,0.23-1.466,0.726-2.017c0.497-0.552,1.19-0.887,1.931-0.933%20c37.536-2.139,76.559-3.22,116.234-3.22c46.658,0,92.318,1.509,135.918,4.503c0.73,0.038,1.43,0.347,1.95,0.867%20c0.52,0.52,0.82,1.214,0.86,1.948v209.164c0.01,0.384-0.07,0.764-0.22,1.117c-0.15,0.353-0.38,0.67-0.66,0.932%20C1121.08,667.497,1120.42,667.753,1119.73,667.758z%20M983.81,657.67c45.67,0,90.43,1.441,133.1,4.256V458.414%20c-42.78-2.838-87.48-4.279-133.1-4.279c-38.46,0-76.559,1.036-113.015,3.04V660.71c36.569-2.004,74.555-3.04,113.038-3.04H983.81z'%20/%3e%3cpath%20style='fill:%23313131;'%20d='M867.756,660.057l93.582-142.783l52.152,86.918l49.04-41.613l57.22,102.365L867.756,660.057z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1119.73,667.759c-0.5-0.003-0.99-0.138-1.43-0.391c-0.43-0.253-0.78-0.615-1.03-1.05l-55.55-99.37%20l-46.43,39.383c-0.31,0.262-0.67,0.454-1.06,0.563c-0.39,0.108-0.79,0.132-1.19,0.068c-0.4-0.07-0.79-0.225-1.12-0.454%20c-0.34-0.229-0.63-0.527-0.84-0.875l-49.832-83.066L870.12,661.589c-0.198,0.32-0.457,0.598-0.764,0.816%20c-0.306,0.219-0.653,0.374-1.021,0.455c-0.367,0.082-0.747,0.09-1.117,0.022c-0.371-0.067-0.724-0.209-1.038-0.415%20c-0.315-0.206-0.585-0.474-0.795-0.786c-0.209-0.313-0.354-0.664-0.426-1.033c-0.071-0.37-0.068-0.75,0.01-1.118%20c0.078-0.368,0.229-0.717,0.444-1.026l93.583-142.76c0.255-0.406,0.611-0.737,1.034-0.962c0.422-0.226,0.897-0.336,1.375-0.322%20c0.478,0.014,0.944,0.146,1.357,0.386c0.413,0.24,0.759,0.58,1.007,0.988l50.441,84.057l46.5-39.338%20c0.31-0.265,0.69-0.458,1.09-0.564c0.4-0.106,0.82-0.123,1.22-0.05c0.41,0.073,0.8,0.234,1.14,0.473%20c0.34,0.238,0.62,0.548,0.83,0.907l57.21,102.364c0.19,0.322,0.3,0.677,0.35,1.044c0.04,0.367,0.01,0.74-0.09,1.096%20c-0.1,0.357-0.27,0.689-0.5,0.979s-0.51,0.531-0.84,0.709C1120.69,667.715,1120.2,667.801,1119.73,667.759z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1026.53,535.897c10.28,0,18.62-8.337,18.62-18.622c0-10.284-8.34-18.622-18.62-18.622%20c-10.29,0-18.63,8.338-18.63,18.622C1007.9,527.56,1016.24,535.897,1026.53,535.897z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1026.53,538.712c-4.24,0-8.39-1.257-11.91-3.613c-3.53-2.355-6.28-5.703-7.9-9.62%20c-1.62-3.917-2.05-8.227-1.22-12.386c0.83-4.158,2.87-7.978,5.87-10.976c3-2.997,6.82-5.039,10.97-5.866%20c4.16-0.827,8.47-0.403,12.39,1.22c3.92,1.622,7.26,4.37,9.62,7.895s3.61,7.67,3.61,11.909c0,5.684-2.26,11.133-6.28,15.152%20C1037.66,536.446,1032.21,538.706,1026.53,538.712z%20M1026.53,501.468c-3.12,0-6.17,0.925-8.76,2.657%20c-2.59,1.732-4.61,4.193-5.81,7.073c-1.19,2.881-1.5,6.05-0.89,9.107c0.6,3.058,2.11,5.867,4.31,8.071%20c2.2,2.204,5.01,3.706,8.07,4.314c3.06,0.608,6.23,0.296,9.11-0.897c2.88-1.193,5.34-3.214,7.07-5.806s2.66-5.639,2.66-8.757%20c0-4.18-1.66-8.189-4.62-11.145C1034.72,503.129,1030.71,501.468,1026.53,501.468z'/%3e%3cpath%20style='fill:%23313131;'%20d='M800.338,708.717c-0.746,0.018-1.469-0.262-2.01-0.777c-0.54-0.515-0.854-1.224-0.872-1.97%20c-0.018-0.747,0.261-1.47,0.777-2.01c0.515-0.541,1.224-0.855,1.97-0.872c1.329,0,134.812-6.598,386.647,0%20c0.37,0.008,0.73,0.09,1.07,0.239c0.34,0.15,0.64,0.365,0.9,0.632c0.26,0.268,0.46,0.583,0.59,0.928%20c0.13,0.345,0.2,0.713,0.19,1.083c-0.01,0.371-0.08,0.738-0.23,1.079s-0.36,0.649-0.63,0.905c-0.27,0.257-0.59,0.456-0.94,0.587%20c-0.34,0.131-0.71,0.191-1.09,0.176c-251.605-6.575-384.908,0-386.214,0H800.338z'/%3e%3cpath%20style='fill:%23313131;'%20d='M800.542,749.002c-0.747,0.018-1.47-0.261-2.01-0.777c-0.541-0.515-0.855-1.224-0.872-1.97%20c-0.018-0.747,0.261-1.47,0.776-2.01c0.515-0.541,1.224-0.854,1.971-0.872c1.306,0,134.811-6.598,386.643,0%20c0.37,0.008,0.74,0.09,1.07,0.24c0.34,0.15,0.64,0.365,0.9,0.633c0.25,0.268,0.45,0.583,0.58,0.928%20c0.13,0.345,0.19,0.712,0.18,1.081c0,0.372-0.08,0.741-0.22,1.083c-0.15,0.343-0.36,0.652-0.63,0.909%20c-0.27,0.257-0.59,0.456-0.94,0.586s-0.72,0.187-1.09,0.169c-251.592-6.598-384.895,0-386.223,0H800.542z'/%3e%3cpath%20style='fill:%23313131;'%20d='M800.542,789.263c-0.747,0.018-1.47-0.262-2.01-0.777c-0.541-0.515-0.855-1.224-0.872-1.97%20c-0.018-0.747,0.261-1.47,0.776-2.01c0.515-0.541,1.224-0.855,1.971-0.873c1.306,0,134.811-6.597,386.643,0%20c0.37,0.009,0.74,0.091,1.07,0.241c0.34,0.15,0.64,0.365,0.9,0.633c0.25,0.268,0.45,0.583,0.58,0.928%20c0.13,0.345,0.19,0.712,0.18,1.081c0,0.373-0.07,0.743-0.22,1.087c-0.14,0.344-0.36,0.654-0.63,0.912%20c-0.27,0.258-0.59,0.457-0.94,0.586c-0.35,0.128-0.72,0.183-1.09,0.162c-251.592-6.575-384.895,0-386.223,0H800.542z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M151.814,984.759c0-58.14,170.727-108.781,423.057-135.104h-0.225V420.293h-0.675%20c-251.835,26.39-422.157,76.987-422.157,135.104V984.759z'/%3e%3cpath%20style='fill:%23313131;'%20d='M151.815,987.574c-0.747,0-1.463-0.297-1.991-0.824c-0.527-0.528-0.824-1.244-0.824-1.991V555.42%20c0-58.545,158.748-109.975,424.678-137.852h0.698c0.404-0.053,0.814-0.018,1.203,0.102c0.389,0.121,0.747,0.324,1.049,0.596%20c0.29,0.267,0.521,0.591,0.68,0.951c0.159,0.36,0.242,0.75,0.243,1.143v428.191c0.113,0.242,0.181,0.501,0.203,0.766%20c0.076,0.74-0.145,1.48-0.613,2.058c-0.469,0.578-1.147,0.947-1.886,1.027c-125.783,13.128-231.457,32.335-305.584,55.528%20c-75.186,23.53-114.839,50.079-114.839,76.807c0.004,0.389-0.073,0.775-0.225,1.133c-0.153,0.358-0.378,0.68-0.661,0.947%20c-0.284,0.267-0.62,0.472-0.987,0.602C152.593,987.549,152.203,987.602,151.815,987.574z%20M571.832,423.423%20c-124.476,13.15-228.957,32.245-302.544,55.28c-75.028,23.508-114.659,50.034-114.659,76.717v410.447%20c30.286-50.394,181.401-93.898,417.203-118.734V423.423z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M182.754,859.876c0-35.825,79.216-67.011,196.284-83.314l-0.315-268.115%20c-116.843,16.258-195.902,51.07-195.902,86.85L182.754,859.876z'/%3e%3cpath%20style='fill:%23313131;'%20d='M182.753,862.693c-0.37,0.003-0.738-0.068-1.08-0.209c-0.343-0.14-0.655-0.347-0.917-0.609%20c-0.262-0.262-0.469-0.574-0.609-0.916c-0.141-0.343-0.211-0.711-0.208-1.081V595.366c0-37.694,77.842-72.866,198.31-89.642%20c0.398-0.051,0.802-0.017,1.186,0.1s0.739,0.313,1.041,0.577s0.545,0.589,0.712,0.954c0.168,0.364,0.256,0.76,0.259,1.161%20l0.315,267.349v0.338c0.103,0.74-0.089,1.491-0.536,2.089c-0.447,0.599-1.112,0.997-1.851,1.109%20c-117.766,16.347-193.852,47.917-193.852,80.477c0,0.739-0.29,1.448-0.809,1.974C184.196,862.379,183.492,862.681,182.753,862.693z%20M375.818,511.759c-112.182,16.055-190.25,50.281-190.25,83.607v247.286c19.32-29.092,87.48-53.929,190.565-68.475L375.818,511.759z%20'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M151.814,984.759c0,26.211,34.722,50.911,95.992,72.531h-0.248V627.858l0.698,0.248%20c-61.562-21.662-96.442-46.408-96.442-72.686V984.759z'/%3e%3cpath%20style='fill:%23313131;'%20d='M247.806,1060.1c-0.322,0-0.642-0.05-0.945-0.16C181.92,1037.02,149,1011.73,149,984.759v-429.34%20c0-0.746,0.297-1.462,0.824-1.99c0.528-0.528,1.244-0.825,1.991-0.825c0.746,0,1.462,0.297,1.99,0.825%20c0.528,0.528,0.824,1.244,0.824,1.99c0,23.936,32.403,48.03,93.695,69.804h0.18l0.698,0.248c0.701,0.25,1.274,0.766,1.594,1.437%20c0.321,0.671,0.363,1.441,0.118,2.143c-0.126,0.337-0.308,0.649-0.541,0.923v426.186c0.261,0.67,0.261,1.42,0,2.1%20c-0.191,0.53-0.538,0.99-0.997,1.32C248.918,1059.91,248.371,1060.09,247.806,1060.1z%20M154.629,574.446v410.313%20c0,23.461,31.142,47.081,90.07,68.451V629.884C196.512,612.613,166.383,594.059,154.629,574.446z'/%3e%3cpath%20style='fill:%23313131;'%20d='M430.175,770.752c-0.745-0.006-1.457-0.304-1.984-0.831c-0.526-0.526-0.825-1.239-0.831-1.984%20v-88.921c-0.005-0.685,0.243-1.349,0.695-1.864c0.453-0.515,1.079-0.845,1.76-0.928l118.712-15.92%20c0.401-0.053,0.81-0.021,1.198,0.096c0.388,0.116,0.747,0.314,1.053,0.58c0.299,0.265,0.538,0.591,0.701,0.956%20c0.163,0.365,0.247,0.761,0.245,1.16v88.539c-0.004,0.679-0.251,1.335-0.698,1.847c-0.446,0.513-1.061,0.848-1.734,0.945%20l-118.712,16.28L430.175,770.752z%20M432.945,681.471v83.314l113.082-15.514v-82.887L432.945,681.471z'/%3e%3cpath%20style='fill:%23313131;'%20d='M487.28,747.043c-0.4,0.001-0.796-0.082-1.161-0.245c-0.365-0.163-0.691-0.402-0.956-0.701%20l-26.818-30.174c-0.433-0.565-0.635-1.274-0.566-1.983s0.405-1.366,0.939-1.837c0.534-0.471,1.227-0.723,1.939-0.703%20c0.713,0.019,1.391,0.308,1.898,0.808l24.049,27.134l25.647-51.79c0.332-0.672,0.917-1.185,1.626-1.426%20c0.709-0.24,1.485-0.189,2.157,0.142s1.185,0.916,1.425,1.626c0.241,0.709,0.19,1.485-0.141,2.157l-27.517,55.483%20c-0.216,0.423-0.536,0.786-0.93,1.053c-0.393,0.268-0.848,0.432-1.321,0.478L487.28,747.043z'/%3e%3cpath%20style='fill:%23313131;'%20d='M412.003,521.35c-0.686,0.003-1.35-0.244-1.867-0.695c-0.516-0.452-0.85-1.076-0.939-1.757%20c-0.088-0.68,0.075-1.369,0.459-1.938c0.384-0.568,0.962-0.977,1.626-1.149c41.983-10.096,84.624-17.229,127.606-21.347%20c0.369-0.035,0.74,0.002,1.094,0.11s0.682,0.285,0.968,0.52c0.285,0.235,0.522,0.525,0.695,0.851%20c0.174,0.327,0.282,0.684,0.317,1.052c0.036,0.369-0.002,0.74-0.11,1.094c-0.108,0.354-0.285,0.682-0.52,0.968%20c-0.235,0.285-0.524,0.522-0.851,0.695c-0.326,0.174-0.684,0.282-1.052,0.317c-42.694,4.085-85.049,11.166-126.751,21.189%20C412.458,521.318,412.231,521.348,412.003,521.35z'/%3e%3cpath%20style='fill:%23313131;'%20d='M412.003,568.863c-0.686,0.003-1.35-0.244-1.867-0.695c-0.516-0.452-0.85-1.077-0.939-1.757%20c-0.088-0.68,0.075-1.369,0.459-1.938c0.384-0.569,0.962-0.977,1.626-1.15c41.983-10.095,84.624-17.228,127.606-21.346%20c0.744-0.072,1.485,0.155,2.062,0.63c0.576,0.475,0.94,1.16,1.012,1.903c0.072,0.744-0.155,1.485-0.63,2.062%20c-0.475,0.576-1.16,0.94-1.903,1.012c-42.694,4.085-85.049,11.165-126.751,21.189C412.458,568.831,412.231,568.861,412.003,568.863z%20'/%3e%3cpath%20style='fill:%23313131;'%20d='M412.003,617.095c-0.686,0.004-1.35-0.244-1.867-0.695c-0.516-0.452-0.85-1.076-0.939-1.756%20c-0.088-0.681,0.075-1.37,0.459-1.939c0.384-0.568,0.962-0.977,1.626-1.149c41.981-10.109,84.622-17.242,127.606-21.347%20c0.369-0.035,0.74,0.002,1.094,0.11c0.354,0.108,0.682,0.285,0.968,0.52c0.285,0.236,0.522,0.525,0.695,0.851%20c0.174,0.327,0.282,0.684,0.317,1.052c0.036,0.369-0.002,0.74-0.11,1.094c-0.108,0.354-0.285,0.683-0.52,0.968%20c-0.235,0.285-0.524,0.522-0.851,0.695c-0.326,0.174-0.684,0.282-1.052,0.317c-42.696,4.072-85.052,11.153-126.751,21.189%20C412.456,617.053,412.23,617.083,412.003,617.095z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1847.15,984.759c0-58.14-170.73-108.781-423.06-135.104h0.21V420.293h0.67%20c251.84,26.39,422.18,76.987,422.18,135.104V984.759z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,987.574c-0.75,0-1.46-0.297-1.99-0.825c-0.53-0.527-0.82-1.243-0.82-1.99%20c0-26.728-39.75-53.276-114.84-76.807c-74.15-23.148-179.69-42.355-305.41-55.505h-0.38c-0.71-0.122-1.36-0.505-1.8-1.076%20c-0.45-0.571-0.66-1.287-0.61-2.009c0-0.158,0-0.315,0-0.45V420.293c0-0.394,0.09-0.783,0.25-1.142c0.16-0.36,0.39-0.681,0.68-0.945%20c0.3-0.263,0.64-0.462,1.02-0.583c0.37-0.122,0.77-0.163,1.16-0.122h0.67c265.93,27.876,424.71,79.396,424.71,137.851v429.407%20c0,0.716-0.27,1.406-0.76,1.929S1847.87,987.528,1847.15,987.574z%20M1427.11,847.11c235.8,24.769,386.92,68.341,417.23,118.734%20V555.42c0-26.683-39.66-53.209-114.69-76.717c-73.47-23.035-178.04-42.13-302.54-55.28V847.11z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,987.574c-0.75,0-1.46-0.297-1.99-0.825c-0.53-0.527-0.82-1.243-0.82-1.99%20c0-26.728-39.75-53.276-114.84-76.807c-74.15-23.148-179.69-42.355-305.41-55.505h-0.38c-0.71-0.122-1.36-0.505-1.8-1.076%20c-0.45-0.571-0.66-1.287-0.61-2.009c0-0.158,0-0.315,0-0.45V420.293c0-0.394,0.09-0.783,0.25-1.142c0.16-0.36,0.39-0.681,0.68-0.945%20c0.3-0.263,0.64-0.462,1.02-0.583c0.37-0.122,0.77-0.163,1.16-0.122h0.67c265.93,27.876,424.71,79.396,424.71,137.851v429.407%20c0,0.716-0.27,1.406-0.76,1.929S1847.87,987.528,1847.15,987.574z%20M1427.11,847.11c235.8,24.769,386.92,68.341,417.23,118.734%20V555.42c0-26.683-39.66-53.209-114.69-76.717c-73.47-23.035-178.04-42.13-302.54-55.28V847.11z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,987.574c-0.75,0-1.46-0.297-1.99-0.825c-0.53-0.527-0.82-1.243-0.82-1.99%20c0-26.728-39.75-53.276-114.84-76.807c-74.15-23.148-179.69-42.355-305.41-55.505h-0.38c-0.71-0.122-1.36-0.505-1.8-1.076%20c-0.45-0.571-0.66-1.287-0.61-2.009c0-0.158,0-0.315,0-0.45V420.293c0-0.394,0.09-0.783,0.25-1.142c0.16-0.36,0.39-0.681,0.68-0.945%20c0.3-0.263,0.64-0.462,1.02-0.583c0.37-0.122,0.77-0.163,1.16-0.122h0.67c265.93,27.876,424.71,79.396,424.71,137.851v429.407%20c0,0.716-0.27,1.406-0.76,1.929S1847.87,987.528,1847.15,987.574z%20M1427.11,847.11c235.8,24.769,386.92,68.341,417.23,118.734%20V555.42c0-26.683-39.66-53.209-114.69-76.717c-73.47-23.035-178.04-42.13-302.54-55.28V847.11z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,951.433c0-43.503-62.8-81.423-155.62-101.148V529.029h0.25%20c92.64,19.748,155.37,57.622,155.37,101.081V951.433z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,954.247c-0.75,0-1.46-0.296-1.99-0.824c-0.53-0.528-0.83-1.244-0.83-1.99%20c0-40.532-58.7-78.226-153.11-98.356h-0.14c-0.72-0.143-1.35-0.557-1.77-1.157c-0.42-0.601-0.59-1.34-0.48-2.063V529.029%20c-0.01-0.43,0.07-0.857,0.25-1.247c0.18-0.391,0.45-0.735,0.79-1.005c0.32-0.264,0.7-0.454,1.11-0.555s0.84-0.111,1.25-0.031h0.25%20c97.16,20.716,157.62,60.505,157.62,103.828v321.414c0,0.381-0.08,0.758-0.23,1.109s-0.37,0.667-0.64,0.93%20c-0.28,0.264-0.6,0.468-0.96,0.601S1847.53,954.266,1847.15,954.247z%20M1694.41,848.033c78.81,17.091,132.99,46.769,149.92,80.635%20V630.087c0-40.059-57.35-77.347-149.92-97.636V848.033z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1847.15,984.759c0,26.211-34.72,50.911-95.99,72.531h0.25V627.858l-0.7,0.248%20c61.54-21.662,96.44-46.408,96.44-72.686V984.759z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1751.16,1060.1c-0.58,0.01-1.14-0.17-1.61-0.5c-0.48-0.33-0.83-0.8-1.03-1.34%20c-0.14-0.34-0.21-0.69-0.21-1.05s0.07-0.72,0.21-1.05V629.974c-0.24-0.268-0.42-0.582-0.54-0.923c-0.24-0.699-0.2-1.467,0.11-2.137%20c0.32-0.67,0.89-1.189,1.58-1.443l0.72-0.248h0.16c61.31-21.707,93.72-45.8,93.72-69.804c0-0.746,0.29-1.462,0.82-1.99%20c0.53-0.528,1.25-0.825,1.99-0.825c0.75,0,1.46,0.297,1.99,0.825c0.53,0.528,0.83,1.244,0.83,1.99v429.34%20c0,27.021-32.92,52.261-97.86,75.181C1751.75,1060.04,1751.46,1060.1,1751.16,1060.1z%20M1754.22,629.862v423.328%20c58.97-21.37,90.07-45.04,90.07-68.454v-410.29C1832.56,594.059,1802.41,612.613,1754.22,629.862z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,531.777c-0.25-0.006-0.51-0.044-0.76-0.113c-100.97-28.664-207.16-38.122-208.27-38.279%20c-0.73-0.077-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.302-0.63-2.039c0.07-0.736,0.42-1.417,0.98-1.895%20c0.56-0.479,1.29-0.718,2.03-0.664c1.06,0,107.81,9.615,209.3,38.415c0.67,0.172,1.25,0.585,1.63,1.158%20c0.39,0.574,0.55,1.268,0.45,1.952c-0.09,0.684-0.43,1.31-0.96,1.757c-0.52,0.448-1.2,0.687-1.89,0.672V531.777z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,583.363c-0.26,0.007-0.51-0.031-0.76-0.113c-100.97-28.642-207.16-38.122-208.27-38.279%20c-0.73-0.077-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.303-0.63-2.039c0.07-0.736,0.42-1.417,0.98-1.896%20c0.56-0.478,1.29-0.717,2.03-0.663c1.06,0,107.81,9.592,209.3,38.415c0.65,0.189,1.21,0.605,1.57,1.172%20c0.37,0.567,0.52,1.247,0.43,1.917c-0.09,0.669-0.42,1.282-0.93,1.728s-1.16,0.694-1.84,0.699V583.363z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,634.86c-0.25,0.031-0.51,0.031-0.76,0c-100.97-28.665-207.16-38.145-208.27-38.28%20c-0.73-0.076-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.302-0.63-2.038c0.07-0.736,0.42-1.417,0.98-1.896%20c0.56-0.479,1.29-0.717,2.03-0.664c1.06,0,107.81,9.615,209.3,38.415c0.65,0.189,1.21,0.605,1.57,1.172%20c0.37,0.567,0.52,1.248,0.43,1.917s-0.42,1.283-0.93,1.728c-0.51,0.446-1.16,0.694-1.84,0.7V634.86z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,686.651c-0.25,0.031-0.51,0.031-0.76,0c-100.97-28.664-207.16-38.122-208.27-38.279%20c-0.74-0.066-1.43-0.426-1.91-1c-0.49-0.574-0.72-1.316-0.65-2.063c0.06-0.746,0.42-1.436,1-1.917c0.57-0.482,1.31-0.715,2.06-0.65%20c1.06,0.113,107.81,9.615,209.3,38.438c0.65,0.189,1.21,0.605,1.57,1.172c0.37,0.567,0.52,1.247,0.43,1.917%20c-0.09,0.669-0.42,1.282-0.93,1.728s-1.16,0.694-1.84,0.699V686.651z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1665.68,738.149c-0.26,0.007-0.52-0.031-0.76-0.113c-100.97-28.642-207.16-38.122-208.27-38.279%20c-0.37-0.027-0.73-0.128-1.07-0.297c-0.33-0.169-0.62-0.402-0.87-0.686c-0.24-0.285-0.42-0.614-0.53-0.97%20c-0.12-0.356-0.16-0.73-0.13-1.102c0.04-0.372,0.14-0.734,0.32-1.064c0.17-0.33,0.41-0.623,0.7-0.86%20c0.28-0.238,0.62-0.415,0.97-0.523c0.36-0.108,0.74-0.144,1.11-0.105c1.06,0,107.81,9.592,209.3,38.415%20c0.65,0.189,1.21,0.605,1.57,1.172c0.37,0.567,0.52,1.247,0.43,1.917c-0.09,0.669-0.43,1.282-0.93,1.728%20c-0.51,0.446-1.16,0.694-1.84,0.699V738.149z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,789.757c-0.25-0.006-0.51-0.043-0.76-0.112c-100.97-28.665-207.16-38.145-208.27-38.28%20c-0.73-0.076-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.302-0.63-2.038c0.07-0.736,0.42-1.417,0.98-1.896%20c0.56-0.479,1.29-0.717,2.03-0.664c1.06,0,107.81,9.615,209.3,38.415c0.67,0.173,1.25,0.585,1.63,1.159%20c0.39,0.573,0.55,1.268,0.45,1.952c-0.09,0.684-0.43,1.309-0.96,1.757c-0.52,0.447-1.2,0.687-1.89,0.671V789.757z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,841.345c-0.25-0.006-0.51-0.043-0.76-0.112c-100.97-28.665-207.16-38.122-208.27-38.28%20c-0.73-0.076-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.302-0.63-2.038c0.07-0.736,0.42-1.417,0.98-1.896%20c0.56-0.479,1.29-0.717,2.03-0.664c1.06,0,107.81,9.593,209.3,38.415c0.65,0.189,1.21,0.605,1.57,1.172%20c0.37,0.568,0.52,1.248,0.43,1.917c-0.09,0.669-0.42,1.283-0.93,1.729c-0.51,0.445-1.16,0.693-1.84,0.699V841.345z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1353.64,725.516c11.45,0,20.73-14.174,20.73-31.659s-9.28-31.66-20.73-31.66%20c-11.46,0-20.74,14.175-20.74,31.66S1342.18,725.516,1353.64,725.516z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1353.66,728.308c-12.99,0-23.55-15.447-23.58-34.452c0-19.005,10.56-34.474,23.56-34.474%20c12.99,0,23.55,15.469,23.55,34.451c0.16,8.439-2.11,16.746-6.53,23.936C1366.16,724.525,1360.17,728.308,1353.66,728.308z%20M1335.64,693.856c0,15.627,8.22,28.822,18.02,28.822c4.5,0,9.01-2.837,12.29-7.993c3.83-6.262,5.78-13.492,5.61-20.829%20c0-15.65-8.22-28.845-18.01-28.845c-9.71,0-18.02,13.218-18.02,28.845H1335.64z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1320.74,885.051l7.07,69.961l129.18-35.555l52.08-176.244l-137.08-38.392L1320.74,885.051z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1327.81,957.828c-0.57-0.005-1.13-0.177-1.6-0.495c-0.34-0.233-0.62-0.538-0.82-0.892%20c-0.21-0.354-0.34-0.749-0.37-1.158l-7.14-69.939c-0.08-0.348-0.08-0.71,0-1.058l51.25-180.139c0.2-0.716,0.68-1.321,1.33-1.684%20c0.65-0.363,1.42-0.454,2.14-0.253l137.08,38.393c0.36,0.095,0.7,0.263,0.99,0.492c0.3,0.229,0.54,0.515,0.72,0.841%20c0.18,0.326,0.3,0.685,0.34,1.055c0.03,0.371,0,0.746-0.11,1.102l-51.88,176.176c-0.14,0.458-0.39,0.874-0.73,1.209%20c-0.35,0.335-0.77,0.577-1.23,0.705l-129.18,35.532C1328.34,957.79,1328.08,957.828,1327.81,957.828z%20M1323.6,885.322l6.75,66.088%20l124.46-34.248l50.75-171.966l-131.61-36.906L1323.6,885.322z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1344,804.822c0,0,27.24-14.501,75.32,0c26.52,8.017-0.9-54.379-0.9-54.379l-54.9-15.357%20L1344,804.822z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1423.53,808.357c-1.71-0.027-3.4-0.308-5.02-0.833c-46.23-13.96-72.93-0.36-73.2-0.225%20c-0.49,0.264-1.04,0.378-1.59,0.326c-0.55-0.053-1.07-0.268-1.5-0.618c-0.42-0.348-0.74-0.813-0.9-1.337%20c-0.17-0.524-0.17-1.085-0.02-1.613l19.52-69.804c0.1-0.357,0.27-0.69,0.49-0.982c0.23-0.291,0.52-0.535,0.84-0.717%20c0.32-0.181,0.67-0.298,1.04-0.343c0.37-0.045,0.74-0.017,1.1,0.083l54.92,15.469c0.4,0.113,0.77,0.313,1.08,0.585%20c0.32,0.272,0.57,0.611,0.74,0.991c3.29,7.476,19.19,45.283,9.66,56.046c-0.9,0.998-2,1.782-3.24,2.296%20C1426.21,808.195,1424.87,808.426,1423.53,808.357z%20M1378.29,795.523c14.2,0.141,28.29,2.372,41.84,6.62%20c3.06,0.923,5.18,0.765,6.31-0.496c5.13-5.809-2.66-31.524-10.07-48.817l-50.89-14.254l-17.23,61.473%20C1357.95,796.905,1368.1,795.376,1378.29,795.523z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1354.22,667.691l-9.32,41.905c-2.22,9.824-2.49,19.99-0.78,29.917%20c1.72,9.926,5.37,19.416,10.76,27.928c5.38,8.511,12.4,15.876,20.63,21.673c8.24,5.796,17.54,9.91,27.37,12.105l13.76,3.108%20c9.82,2.208,19.99,2.46,29.91,0.74c9.92-1.72,19.41-5.378,27.92-10.764c8.5-5.387,15.87-12.396,21.67-20.629%20c5.8-8.233,9.92-17.527,12.12-27.352l9.44-41.928c4.7-20.967,0.89-42.943-10.61-61.099c-11.49-18.156-29.72-31.006-50.68-35.725%20l-5.3-1.194c-10.38-2.338-21.13-2.607-31.62-0.791c-10.5,1.816-20.53,5.682-29.52,11.376c-9,5.694-16.79,13.105-22.92,21.809%20C1360.91,647.474,1356.56,657.302,1354.22,667.691z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1432.56,808.786c-5.97,0.002-11.92-0.662-17.74-1.982l-11.51-2.589%20c-10.33-2.319-20.11-6.65-28.77-12.748c-8.66-6.098-16.03-13.842-21.69-22.789c-5.67-8.948-9.52-18.925-11.32-29.36%20c-1.81-10.434-1.54-21.123,0.78-31.455l9.16-40.802c4.88-21.689,18.17-40.553,36.95-52.444c18.79-11.891,41.52-15.835,63.21-10.965%20l5.32,1.194c21.67,4.902,40.52,18.201,52.41,36.981c11.89,18.78,15.84,41.508,10.99,63.199l-9.16,40.778%20c-4.25,18.894-15.15,35.629-30.71,47.152c-0.6,0.385-1.33,0.529-2.03,0.401c-0.7-0.127-1.33-0.516-1.75-1.088%20c-0.43-0.571-0.62-1.283-0.54-1.991c0.08-0.709,0.42-1.361,0.96-1.826c14.48-10.716,24.63-26.286,28.58-43.863l9.16-40.779%20c4.52-20.235,0.84-41.437-10.25-58.955c-11.09-17.519-28.68-29.923-48.9-34.493l-5.29-1.193c-10.02-2.252-20.39-2.508-30.51-0.754%20c-10.12,1.754-19.79,5.484-28.47,10.977c-8.68,5.493-16.19,12.641-22.1,21.036c-5.92,8.396-10.12,17.874-12.37,27.894l-9.17,40.847%20c-2.16,9.612-2.4,19.555-0.72,29.263c1.68,9.707,5.26,18.988,10.53,27.313c5.27,8.324,12.12,15.529,20.18,21.202%20c8.05,5.674,17.15,9.705,26.76,11.863l11.5,2.568c13.56,3.061,27.69,2.281,40.83-2.252c0.35-0.137,0.73-0.201,1.11-0.19%20c0.37,0.012,0.74,0.1,1.09,0.259c0.34,0.159,0.65,0.385,0.9,0.665c0.26,0.28,0.45,0.609,0.58,0.966%20c0.12,0.357,0.17,0.736,0.15,1.113c-0.03,0.377-0.13,0.745-0.3,1.083c-0.17,0.337-0.41,0.636-0.7,0.88%20c-0.29,0.244-0.62,0.427-0.99,0.538C1450.31,807.335,1441.46,808.803,1432.56,808.786z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1354.22,667.69c0,0,11.91-19.636,23.37-26.751c11.47-7.116,92.87,13.308,99.55,18.802%20c5.77,4.751,9.89,13.195,12.5,29.881c2.86,18.351,25.45,25.985,25.45,25.985l2.52-11.259l19.41-80.838%20c0.12-0.513,0.14-1.046,0.05-1.566c-0.08-0.521-0.27-1.02-0.55-1.466c-0.28-0.447-0.65-0.833-1.08-1.136%20c-0.44-0.303-0.92-0.516-1.44-0.628l-153.07-33.393c-0.99-0.215-2.03-0.043-2.89,0.48c-0.87,0.523-1.5,1.359-1.77,2.335%20L1354.22,667.69z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1515.09,718.422c-0.31,0.001-0.61-0.045-0.9-0.135c-0.99-0.338-24.23-8.422-27.34-28.237%20c-2.25-14.816-5.85-23.486-11.51-28.147c-6.05-4.976-86.46-24.634-96.28-18.554c-10.76,6.755-22.32,25.602-22.52,25.782%20c-0.34,0.615-0.89,1.081-1.56,1.306c-0.66,0.225-1.39,0.194-2.03-0.088c-0.65-0.282-1.16-0.794-1.45-1.436%20c-0.28-0.642-0.31-1.367-0.09-2.033l22.06-79.554c0.46-1.678,1.55-3.115,3.04-4.012c1.48-0.898,3.26-1.187,4.96-0.807l153.12,33.461%20c0.88,0.19,1.72,0.556,2.46,1.076c0.73,0.519,1.36,1.182,1.84,1.948s0.8,1.621,0.94,2.513c0.14,0.892,0.11,1.804-0.11,2.682%20l-19.41,80.815l-2.5,11.258c-0.09,0.383-0.26,0.744-0.49,1.058c-0.24,0.314-0.54,0.575-0.88,0.766%20C1516.02,718.312,1515.56,718.428,1515.09,718.422z%20M1386.38,636.819c26.3,0,87.25,16.392,92.54,20.738%20c6.76,5.607,10.97,15.357,13.51,31.637c1.99,12.655,14.8,19.861,20.65,22.518l1.8-7.949l19.41-80.882%20c0.04-0.148,0.05-0.302,0.03-0.453c-0.03-0.151-0.08-0.296-0.16-0.426c-0.08-0.127-0.19-0.237-0.31-0.322s-0.26-0.144-0.41-0.173%20l-153.12-33.483c-0.29-0.057-0.59-0.002-0.84,0.152c-0.25,0.155-0.43,0.398-0.51,0.681l-17.72,64.017%20c4.16-5.516,9.18-10.334,14.86-14.276C1379.33,637.169,1382.86,636.558,1386.38,636.819z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1418.49,711.871h-0.61l-23.26-5.224c-0.49-0.107-0.93-0.34-1.3-0.676%20c-0.36-0.337-0.63-0.764-0.77-1.238c-0.32-0.968-1.26-3.941,10.13-32.02c0.28-0.693,0.82-1.246,1.51-1.537%20c0.69-0.291,1.47-0.297,2.16-0.017c0.69,0.281,1.25,0.825,1.54,1.514c0.29,0.688,0.29,1.464,0.01,2.157%20c-3.68,8.778-6.9,17.745-9.63,26.863l20.85,4.684c0.67,0.151,1.27,0.547,1.68,1.113c0.4,0.566,0.58,1.261,0.5,1.951%20c-0.08,0.69-0.41,1.327-0.93,1.788s-1.19,0.714-1.88,0.709V711.871z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1448.86,687.056c-0.63-0.005-1.24-0.217-1.73-0.603c-0.5-0.387-0.86-0.927-1.01-1.536%20c-3.72-14.907-20.27-16.46-21.08-16.506c-0.74-0.063-1.43-0.418-1.91-0.988c-0.49-0.57-0.72-1.308-0.66-2.051%20c0.03-0.369,0.13-0.728,0.29-1.057c0.17-0.33,0.4-0.623,0.68-0.862c0.28-0.239,0.61-0.42,0.96-0.531s0.72-0.151,1.09-0.117%20c0.22,0,21.39,1.869,26.1,20.738c0.09,0.359,0.11,0.733,0.05,1.1c-0.05,0.367-0.18,0.719-0.37,1.037%20c-0.19,0.318-0.44,0.595-0.74,0.816c-0.29,0.221-0.63,0.38-0.99,0.47C1449.32,687.018,1449.09,687.048,1448.86,687.056z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1379.31,671.97c-0.53,0-1.04-0.146-1.48-0.421c-0.45-0.274-0.81-0.667-1.04-1.135%20c-0.24-0.468-0.33-0.991-0.29-1.512c0.05-0.52,0.24-1.017,0.55-1.436c9.01-11.889,26.06-9.322,26.78-9.209%20c0.36,0.057,0.71,0.186,1.03,0.379c0.31,0.193,0.59,0.447,0.81,0.746c0.21,0.299,0.37,0.638,0.46,0.997%20c0.08,0.36,0.1,0.733,0.04,1.098c-0.06,0.365-0.19,0.715-0.38,1.031c-0.19,0.315-0.45,0.589-0.75,0.807%20c-0.29,0.217-0.63,0.373-0.99,0.46c-0.36,0.086-0.74,0.101-1.1,0.044c-0.14,0-14.41-2.117-21.41,7.07%20c-0.27,0.338-0.61,0.612-0.99,0.799C1380.16,671.875,1379.74,671.972,1379.31,671.97z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1428.35,692.641c2.01,0,3.65-1.633,3.65-3.647c0-2.015-1.64-3.648-3.65-3.648%20c-2.02,0-3.65,1.633-3.65,3.648C1424.7,691.008,1426.33,692.641,1428.35,692.641z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1390.36,685.727c2.02,0,3.65-1.633,3.65-3.648c0-2.014-1.63-3.647-3.65-3.647%20c-2.01,0-3.65,1.633-3.65,3.647C1386.71,684.094,1388.35,685.727,1390.36,685.727z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1523.27,735.838c7.49-15.802,5.16-32.587-5.19-37.49c-10.35-4.904-24.81,3.93-32.29,19.731%20c-7.49,15.802-5.17,32.587,5.18,37.491C1501.33,760.473,1515.78,751.639,1523.27,735.838z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1497.07,759.653h-1.3c-0.75-0.051-1.45-0.396-1.94-0.96c-0.49-0.564-0.74-1.3-0.69-2.047%20c0.05-0.746,0.4-1.442,0.96-1.934c0.57-0.492,1.3-0.74,2.05-0.689c8.56,0.563,18.82-7.588,24.43-19.432%20c6.76-14.141,4.93-29.588-3.85-33.776c-6.24-2.95-14.82,0.247-21.87,8.196c-0.49,0.558-1.19,0.897-1.93,0.941%20c-0.75,0.045-1.48-0.209-2.04-0.705c-0.56-0.495-0.9-1.193-0.94-1.938c-0.05-0.745,0.21-1.478,0.7-2.036%20c8.74-9.863,19.93-13.51,28.49-9.547c11.73,5.561,14.66,24.048,6.53,41.229C1519.34,750.533,1507.7,759.653,1497.07,759.653z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1509.39,729.974h-0.25l-5.83-0.518c-0.54-0.048-1.05-0.251-1.48-0.584%20c-0.43-0.333-0.75-0.781-0.93-1.292c-0.17-0.511-0.2-1.062-0.07-1.588c0.12-0.526,0.4-1.004,0.79-1.377l11.51-11.011%20c0.26-0.279,0.57-0.501,0.92-0.654c0.35-0.153,0.73-0.234,1.11-0.236s0.76,0.073,1.12,0.221c0.35,0.149,0.67,0.368,0.93,0.643%20c0.26,0.276,0.47,0.602,0.61,0.96c0.13,0.357,0.19,0.738,0.17,1.12c-0.02,0.382-0.11,0.756-0.28,1.099%20c-0.16,0.344-0.4,0.65-0.69,0.9l-7.05,6.755c0.7,0.125,1.33,0.51,1.76,1.079c0.43,0.569,0.62,1.278,0.55,1.986%20c-0.07,0.708-0.41,1.361-0.95,1.829c-0.54,0.467-1.23,0.714-1.94,0.691V729.974z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1349.9,689.691c-0.51,0-1-0.139-1.44-0.401c-0.43-0.262-0.78-0.637-1.02-1.086l-4.5-8.331%20c-0.2-0.325-0.33-0.687-0.38-1.064c-0.06-0.377-0.04-0.761,0.06-1.129s0.27-0.712,0.51-1.011c0.23-0.3,0.53-0.549,0.86-0.732%20s0.7-0.296,1.08-0.333s0.76,0.004,1.12,0.119c0.37,0.115,0.7,0.303,0.99,0.552c0.29,0.249,0.52,0.554,0.69,0.896l4.5,8.354%20c0.18,0.323,0.29,0.679,0.33,1.046c0.04,0.366,0.01,0.737-0.09,1.091c-0.11,0.354-0.28,0.684-0.52,0.97%20c-0.23,0.286-0.52,0.524-0.84,0.698C1350.84,689.57,1350.37,689.694,1349.9,689.691z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1429.07,743.8c-8.87,0-15.76-7.318-18.44-12.092c-0.3-0.511-0.43-1.103-0.37-1.692%20c0.05-0.589,0.3-1.145,0.69-1.589c0.39-0.444,0.91-0.753,1.49-0.883c0.58-0.131,1.18-0.076,1.72,0.156%20c2.77,1.076,5.73,1.543,8.69,1.368c2.96-0.175,5.85-0.987,8.47-2.381c4.51-2.252,7.86-5.652,8.65-8.715%20c0.13-0.647,0.48-1.228,0.99-1.64c0.52-0.413,1.16-0.629,1.82-0.611c0.64,0.021,1.25,0.255,1.73,0.663%20c0.49,0.408,0.82,0.968,0.95,1.588c0.14,0.766,3.22,18.712-9.57,24.184C1433.76,743.174,1431.43,743.734,1429.07,743.8z%20M1420.54,734.793c1.71,1.64,3.87,2.745,6.21,3.181c2.33,0.435,4.74,0.183,6.94-0.727c1.78-0.917,3.3-2.28,4.4-3.957%20s1.75-3.611,1.88-5.613c-1.86,1.638-3.93,3.024-6.15,4.121c-4.12,2.065-8.68,3.071-13.28,2.927V734.793z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1013.69,1586.72c-1.42,8.19-3.22,12.97-5.27,13.01c-2.05,0.05-3.92-4.3-5.63-11.89%20c-3.263-14.23-5.807-39.97-6.438-69.37c-0.643-20.29,0.049-40.6,2.072-60.8c1.531-12.99,3.786-20.92,6.416-20.96%20c2.64-0.05,5.36,8.19,7.48,21.72c2.75,19.73,4.25,39.61,4.5,59.52C1017.56,1546.82,1016.14,1572.17,1013.69,1586.72z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1008.35,1602.52c-3.46,0-7.11-3.28-10.511-26.09c-4.906-38.45-5.767-77.31-2.567-115.95%20c2.409-23.21,5.988-26.48,9.498-26.54c3.52-0.07,7.21,3.01,10.63,26.09c2.61,19.2,4.05,38.54,4.33,57.92%20c0.57,19.36-0.01,38.74-1.76,58.03c-2.41,23.21-5.99,26.48-9.48,26.54H1008.35z%20M1004.91,1440.4c-3.22,5.99-6.756,34.25-5.765,78.11%20c0.995,43.87,5.715,71.92,9.205,77.78c3.2-5.99,6.76-34.27,5.75-78.12c-0.97-43.95-5.72-72.03-9.21-77.88L1004.91,1440.4z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1016.91,1517.99c-0.25-19.91-1.75-39.79-4.5-59.51l-5.2-0.27l-4.82-0.27l-3.875-0.22l-3.603-0.21%20l-4.751-0.24l-5.742-0.34l-4.954-0.25l-11.552-0.61l-11.258-0.52l-10.809-0.45l-4.323-0.15c-3.333-0.14-6.755-0.25-10.088-0.34%20c-4.098-0.14-8.241-0.23-12.362-0.32h-2.251c-52.128-0.92-104.954,1.8-140.847,15.95c-2.094,0.83-4.278,1.71-6.485,2.67%20c-2.207,0.97-4.503,1.96-6.868,3.02l-3.535,1.62l-7.183,3.45l-3.648,1.82l-3.648,1.87c-19.477,10.11-38.752,22.14-48.727,31.93%20l-1.734,1.8c-0.811,0.9-1.554,1.76-2.252,2.59c-2.544,3.4-3.58,6.4-2.567,8.78c0.171,0.41,0.374,0.8,0.608,1.17%20c4.143,6.4,15.425,1.49,17.113,0.75l-0.18,0.11c-4.03,2.45-32.38,20.15-25.85,34.02c0.073,0.2,0.156,0.38,0.248,0.57%20c5.607,10.45,28.575-3.76,37.469-9.8c-6.553,4.91-19.568,16.35-15.289,26.75l0.202,0.43c0.233,0.43,0.555,0.81,0.946,1.1%20c7.633,6.08,41.387-7,47.467-9.41l0.36-0.13h-0.293h-0.135c-4.503,1.93-22.517,10.53-20.266,19.99c0.12,0.53,0.301,1.05,0.541,1.53%20c0.13,0.27,0.297,0.52,0.495,0.75c6.08,6.98,43.211-3.83,88.111-9.6c3.603-0.45,7.25-0.9,10.921-1.26%20c16.955-1.78,45.71,7.64,86.534,6.76c6.68-0.14,13.285-0.37,19.815-0.7l2.252-0.11l3.693-0.21c6.125-0.36,12.129-0.76,18.014-1.21%20c5.164-0.41,10.238-0.84,15.222-1.31l5.044-0.45l9.975-0.97l5.472-0.54l4.823-0.49c3.71-0.36,7.34-0.74,10.89-1.13%20C1016.15,1572.17,1017.56,1546.82,1016.91,1517.99z'/%3e%3cpath%20style='fill:%23313131;'%20d='M741.186,1602.77c-5.247,0-8.58-0.92-10.494-2.99c-0.39-0.45-0.716-0.95-0.968-1.49%20c-0.341-0.67-0.591-1.38-0.743-2.12c-0.332-1.88-0.21-3.82,0.358-5.65c0.568-1.83,1.565-3.5,2.907-4.86%20c-11.799,3.53-24.274,5.74-29.475,1.6l-0.338-0.27c-0.551-0.5-1.029-1.06-1.419-1.69c-0.028-0.07-0.066-0.14-0.112-0.2l-0.203-0.43%20c-1.016-2.35-1.466-4.9-1.313-7.45c0.152-2.55,0.903-5.03,2.191-7.23c-6.89,3.06-12.429,4.05-16.55,2.95%20c-1.394-0.35-2.697-0.99-3.817-1.89c-1.12-0.9-2.031-2.03-2.668-3.32c-0.157-0.29-0.27-0.54-0.383-0.78%20c-4.503-10.47,6.756-22.34,16.461-30c-1.467-0.16-2.878-0.64-4.129-1.42c-1.252-0.78-2.311-1.83-3.1-3.08%20c-0.322-0.5-0.601-1.03-0.833-1.58c-1.351-3.24-0.36-7.11,2.928-11.55c0.69-0.93,1.443-1.81,2.251-2.63%20c0.086-0.12,0.184-0.22,0.293-0.32l1.666-1.73c9.3-9.21,27.291-21.01,49.404-32.45h0.225l3.445-1.78l3.603-1.78%20c2.544-1.26,4.954-2.43,7.34-3.53l3.581-1.65c2.364-1.08,4.661-2.09,6.912-3.04c2.252-0.94,4.504-1.86,6.553-2.7%20c30.894-12.16,75.996-17.29,141.86-16.14c0.698,0,1.531,0,2.251,0c4.121,0,8.264,0.18,12.385,0.31c3.378,0,6.755,0.2,10.11,0.34%20l4.346,0.16l10.854,0.45c3.783,0.16,7.565,0.34,11.258,0.54l12.227,0.63c1.441,0,2.837,0.16,4.279,0.2l28.011,1.56%20c0.64,0.03,1.25,0.29,1.73,0.72c0.48,0.43,0.8,1.01,0.9,1.64c2.78,19.86,4.28,39.87,4.51,59.92c0.63,27.99-0.61,53.88-3.27,69.26%20c-0.12,0.59-0.43,1.13-0.88,1.54c-0.45,0.4-1.01,0.65-1.62,0.71l-21.185,2.26l-6.237,0.6l-8.827,0.81%20c-4.954,0.45-10.043,0.9-15.222,1.29c-6.62,0.52-12.565,0.92-18.172,1.24l-3.738,0.2h-0.72c-0.54,0-1.081,0-1.644,0%20c-6.44,0.34-13.127,0.56-19.838,0.72c-19.27,0.14-38.518-1.36-57.532-4.5c-12.069-1.72-21.594-3.09-28.754-2.26%20c-3.671,0.39-7.274,0.81-10.854,1.26c-15.402,1.96-29.835,4.51-42.58,6.76C760.866,1600.86,748.932,1602.77,741.186,1602.77z%20M753.232,1578h-0.157c-10.133,4.62-19.816,11.6-18.6,16.78c0.064,0.32,0.17,0.63,0.316,0.92c2.904,3.22,23.238-0.29,42.895-3.69%20c12.813-2.25,27.314-4.73,42.783-6.76c3.603-0.45,7.273-0.9,10.989-1.28c7.836-0.81,17.676,0.61,30.128,2.39%20c18.707,3.1,37.646,4.61,56.609,4.5c6.755-0.14,13.285-0.38,19.748-0.7h1.531h0.788l3.648-0.2c5.584-0.32,11.506-0.72,18.014-1.22%20c5.134-0.4,10.193-0.83,15.176-1.28l8.76-0.81l6.215-0.61l19.045-1.94c2.37-15.24,3.43-39.67,2.86-66.08%20c-0.27-18.99-1.64-37.94-4.09-56.77l-25.719-1.42l-4.278-0.22l-12.205-0.63l-11.259-0.52l-10.605-0.45l-4.504-0.18l-10.11-0.32%20c-4.121-0.13-8.219-0.25-12.34-0.31h-2.251c-65.301-1.15-109.638,3.87-139.811,15.76c-2.072,0.81-4.233,1.69-6.417,2.63%20c-2.185,0.95-4.504,1.94-6.756,3l-3.535,1.62c-2.252,1.08-4.706,2.25-7.093,3.4l-3.648,1.8l-3.602,1.87h-0.203%20c-21.234,11.01-39.113,22.72-47.85,31.34l-1.531,1.58c-0.04,0.07-0.093,0.13-0.157,0.18c-0.7,0.72-1.361,1.47-1.982,2.25%20c-1.959,2.64-2.747,4.75-2.252,5.99c0.101,0.26,0.229,0.51,0.383,0.74c2.252,3.72,9.863,1.45,13.511-0.27h0.247%20c0.689-0.25,1.449-0.23,2.124,0.06c0.675,0.29,1.212,0.82,1.502,1.5c0.211,0.52,0.262,1.09,0.146,1.64%20c-0.117,0.55-0.395,1.05-0.799,1.44c-0.151,0.15-0.317,0.28-0.496,0.39l-0.338,0.22c-10.38,6.49-28.822,21.12-24.769,30.44%20c0.054,0.15,0.122,0.28,0.203,0.41c0.283,0.57,0.688,1.06,1.187,1.45c0.498,0.39,1.078,0.66,1.695,0.8%20c4.886,1.29,14.524-2.48,26.481-10.33c0.599-0.34,1.302-0.45,1.975-0.31c0.673,0.15,1.269,0.54,1.677,1.09%20c0.407,0.55,0.598,1.24,0.535,1.92c-0.063,0.69-0.375,1.33-0.877,1.8c-5.382,4.37-13.871,12.83-10.448,20.56v0.18%20c0.07,0.11,0.153,0.2,0.247,0.29h0.113c4.008,3.36,22.765-0.79,44.584-9.86l0.406-0.14c0.377-0.09,0.771-0.11,1.155-0.05%20c0.385,0.07,0.752,0.21,1.08,0.42c0.327,0.21,0.608,0.49,0.824,0.81c0.216,0.33,0.362,0.69,0.431,1.07%20c0.166,0.61,0.126,1.25-0.115,1.83c-0.24,0.58-0.668,1.06-1.214,1.37V1578z'/%3e%3cpath%20style='fill:%23313131;'%20d='M752.85,1578c-0.644,0-1.267-0.22-1.767-0.63c-0.5-0.4-0.846-0.97-0.98-1.6%20c-0.134-0.63-0.049-1.28,0.242-1.86c0.291-0.57,0.769-1.03,1.356-1.29c29.701-13.51,69.804-24.14,87.976-27.72%20c0.734-0.14,1.496,0.01,2.116,0.43c0.621,0.42,1.05,1.06,1.194,1.8c0.143,0.73-0.011,1.49-0.429,2.12%20c-0.418,0.62-1.066,1.05-1.801,1.19c-18.013,3.51-57.464,14.05-86.737,27.31C753.65,1577.91,753.252,1578,752.85,1578z'/%3e%3cpath%20style='fill:%23313131;'%20d='M714.412,1562.33c-0.442,0-0.877-0.11-1.268-0.31c-0.392-0.21-0.729-0.5-0.984-0.86%20c-0.218-0.3-0.375-0.64-0.462-1c-0.086-0.36-0.101-0.74-0.042-1.1c0.059-0.37,0.189-0.72,0.384-1.03%20c0.194-0.32,0.449-0.59,0.75-0.81c25.985-18.58,90.07-43.8,113.871-48.48c0.37-0.09,0.756-0.11,1.133-0.05%20c0.377,0.06,0.738,0.2,1.061,0.4c0.322,0.21,0.599,0.48,0.815,0.79c0.215,0.32,0.364,0.67,0.438,1.05%20c0.073,0.37,0.07,0.76-0.011,1.13c-0.08,0.38-0.236,0.73-0.457,1.04c-0.222,0.31-0.504,0.57-0.831,0.77%20c-0.326,0.2-0.689,0.33-1.067,0.39c-22.878,4.5-86.692,29.67-111.664,47.55C715.589,1562.15,715.007,1562.33,714.412,1562.33z'/%3e%3cpath%20style='fill:%23313131;'%20d='M707.14,1534.38c-0.43,0.02-0.857-0.07-1.247-0.25c-0.391-0.18-0.735-0.45-1.005-0.78%20c-0.233-0.29-0.406-0.62-0.511-0.98c-0.104-0.35-0.137-0.72-0.098-1.09c0.04-0.37,0.152-0.73,0.33-1.05%20c0.178-0.33,0.418-0.61,0.707-0.84c19.162-15.52,73.001-40.81,108.511-48.21c0.372-0.11,0.763-0.14,1.148-0.09%20c0.384,0.05,0.754,0.18,1.086,0.38c0.333,0.2,0.62,0.46,0.845,0.78c0.224,0.31,0.381,0.67,0.46,1.05c0.08,0.38,0.08,0.77,0.001,1.15%20c-0.08,0.38-0.236,0.74-0.461,1.06c-0.224,0.31-0.512,0.58-0.844,0.78c-0.332,0.2-0.702,0.33-1.086,0.38%20c-34.182,7.14-87.818,32.29-106.125,47.11C708.362,1534.16,707.761,1534.37,707.14,1534.38z'/%3e%3cpath%20style='fill:%23313131;'%20d='M956.023,1029.28c-57.982,76.8-226.727,80.7-226.727,80.7s-39.653-256.115-58.05-279.218%20c-18.397-23.103-101.328,0.923-103.22-30.624c-1.891-31.547,86.625-25.58,84.778-42.175%20c-1.846-16.595-174.622-24.026-165.188-48.052c9.435-24.026,87.188-22.72,87.188-22.72c-3.31-29.093,41.094-31.682,41.094-31.682%20c0-15.92,42.4-17.271,42.4-17.271c0.924-8.286,83.855-28.732,179.667,88.246c58.703,71.605,88.561,156.608,103.58,218.283%20c2.409,9.886,4.503,19.163,6.102,27.674C951.537,991.208,954.334,1010.18,956.023,1029.28z'/%3e%3cpath%20style='fill:%23313131;'%20d='M729.297,1112.86c-0.673,0-1.324-0.24-1.835-0.68c-0.511-0.44-0.851-1.04-0.958-1.71%20c-13.668-88.31-43.256-260.117-57.464-277.861c-7.633-9.548-29.07-10.223-49.808-10.899c-25.986-0.81-52.871-1.666-54.042-21.324%20c-1.216-20.716,29.835-26.773,54.762-31.659c12.88-2.522,30.534-5.967,30.038-10.381c-1.914-5.449-41.387-11.821-70.209-16.46%20c-52.826-8.534-87.818-14.951-94.28-26.12c-0.616-1.025-0.985-2.179-1.079-3.37c-0.094-1.192,0.091-2.389,0.538-3.498%20c9.007-23.17,70.772-24.589,86.872-24.566c-0.111-5.878,1.941-11.591,5.765-16.055c9.75-11.597,29.07-14.636,35.803-15.38%20c3.377-14.433,34.766-16.978,43.188-17.406c2.332-2.232,5.228-3.789,8.376-4.503c3.243-0.946,80.297-22.09,175.208,93.762%20c59.671,72.822,89.529,159.514,104.098,219.41c2.252,9.3,4.301,18.644,6.125,27.809c3.882,18.891,6.694,37.991,8.422,57.191%20c0.042,0.68-0.157,1.35-0.563,1.89c-58.14,77.01-221.977,81.72-228.912,81.88L729.297,1112.86z%20M571.675,689.961%20c-23.103,0-74.533,3.625-81.356,20.986c-0.131,0.329-0.183,0.683-0.152,1.035c0.032,0.352,0.145,0.692,0.332,0.992%20c5.517,9.66,52.511,17.248,90.273,23.35c52.488,8.467,73.969,12.768,74.915,21.392c1.081,9.57-14.636,12.655-34.542,16.528%20c-22.787,4.503-51.137,10.02-50.213,25.805c0.833,14.523,24.026,15.266,48.57,16.055c22.022,0.698,44.787,1.418,54.041,12.97%20c18.014,22.382,53.885,250.076,58.253,278.066c20.896-0.9,168.183-9.66,221.459-78.81c-1.75-18.61-4.501-37.105-8.242-55.415%20c-1.801-9.007-3.85-18.374-6.079-27.584c-14.412-59.333-43.977-145.17-102.972-217.158%20c-73.993-90.317-138.077-94.731-155.979-93.943c-12.001,0.541-17.811,3.446-18.802,4.504c-0.128,0.614-0.456,1.167-0.933,1.575%20c-0.477,0.407-1.075,0.645-1.701,0.677c-10.291,0.337-39.676,3.693-39.676,14.456c0.001,0.714-0.271,1.401-0.761,1.921%20c-0.49,0.519-1.16,0.831-1.873,0.871c-0.248,0-24.094,1.576-34.204,13.51c-1.737,2.044-3.018,4.435-3.756,7.014%20c-0.737,2.578-0.916,5.285-0.523,7.938c0.055,0.404,0.021,0.814-0.099,1.203c-0.121,0.389-0.325,0.747-0.599,1.049%20c-0.271,0.296-0.601,0.532-0.97,0.691s-0.767,0.238-1.169,0.232L571.675,689.961z'/%3e%3cpath%20style='fill:%23313131;'%20d='M625.265,691.56h-0.157c-0.338,0-34.407-1.801-50.214-1.576c-0.37,0.012-0.739-0.051-1.084-0.185%20c-0.346-0.134-0.66-0.336-0.925-0.595c-0.265-0.259-0.475-0.569-0.617-0.91c-0.143-0.342-0.214-0.71-0.211-1.08%20c0-0.735,0.287-1.441,0.8-1.967s1.212-0.83,1.947-0.848c15.987-0.225,50.236,1.577,50.574,1.599c0.7,0.078,1.346,0.415,1.81,0.945%20c0.463,0.531,0.711,1.216,0.694,1.92c-0.017,0.705-0.297,1.377-0.786,1.885c-0.489,0.507-1.15,0.813-1.853,0.857L625.265,691.56z'/%3e%3cpath%20style='fill:%23313131;'%20d='M661.564,663.908h-0.608c-0.316,0-31.525-6.755-44.743-5.539c-0.366,0.037-0.737,0.001-1.09-0.106%20c-0.353-0.106-0.682-0.282-0.967-0.517c-0.284-0.234-0.52-0.523-0.692-0.849c-0.173-0.326-0.279-0.683-0.313-1.05%20c-0.037-0.368-0.002-0.74,0.105-1.095c0.107-0.354,0.282-0.684,0.516-0.971c0.234-0.286,0.523-0.524,0.849-0.699%20c0.326-0.175,0.684-0.283,1.052-0.32c14.073-1.396,45.17,5.359,46.498,5.629c0.662,0.17,1.241,0.572,1.629,1.133%20c0.389,0.561,0.563,1.244,0.489,1.923c-0.074,0.679-0.39,1.309-0.891,1.773c-0.501,0.465-1.152,0.733-1.834,0.756V663.908z'/%3e%3cpath%20style='fill:%23313131;'%20d='M696.871,648.37c-0.267,0.01-0.534-0.028-0.788-0.112c-0.248,0-24.544-7.138-37.672-7.138%20c-0.746,0-1.462-0.297-1.99-0.825c-0.528-0.528-0.824-1.244-0.824-1.99c-0.003-0.369,0.067-0.734,0.206-1.076%20c0.139-0.341,0.344-0.651,0.604-0.913c0.259-0.262,0.568-0.469,0.908-0.611c0.34-0.142,0.705-0.215,1.074-0.215%20c13.938,0,38.279,7.071,39.248,7.363c0.715,0.219,1.315,0.71,1.673,1.366c0.358,0.657,0.444,1.428,0.241,2.147%20c-0.174,0.577-0.528,1.083-1.01,1.444C698.059,648.17,697.473,648.367,696.871,648.37z'/%3e%3cpath%20style='fill:%23313131;'%20d='M725.243,897.684c-0.642-0.011-1.261-0.24-1.756-0.649c-0.494-0.409-0.836-0.974-0.968-1.603%20l-4.616-19.297c-0.143-0.714-0.003-1.456,0.39-2.069c0.393-0.613,1.008-1.05,1.716-1.22c0.709-0.169,1.455-0.057,2.083,0.313%20c0.627,0.37,1.087,0.968,1.282,1.67l4.504,19.275c0.087,0.361,0.102,0.735,0.043,1.102c-0.058,0.366-0.188,0.718-0.383,1.034%20c-0.194,0.316-0.45,0.59-0.751,0.807c-0.301,0.217-0.642,0.372-1.003,0.457C725.61,897.581,725.429,897.641,725.243,897.684z'/%3e%3cpath%20style='fill:%23313131;'%20d='M736.659,945.466c-0.641-0.011-1.26-0.24-1.755-0.65c-0.495-0.409-0.837-0.973-0.969-1.602%20l-4.616-19.274c-0.173-0.729-0.05-1.497,0.343-2.134c0.392-0.638,1.022-1.093,1.751-1.267c0.728-0.173,1.496-0.049,2.134,0.343%20c0.637,0.393,1.093,1.023,1.266,1.752l4.503,19.274c0.088,0.358,0.103,0.73,0.046,1.094c-0.057,0.363-0.186,0.712-0.378,1.026%20c-0.193,0.314-0.446,0.587-0.744,0.803c-0.299,0.216-0.637,0.37-0.995,0.455C737.059,945.372,736.862,945.433,736.659,945.466z'/%3e%3cpath%20style='fill:%23313131;'%20d='M748.188,993.248c-0.647-0.003-1.273-0.228-1.773-0.638c-0.501-0.41-0.844-0.98-0.974-1.614%20l-4.503-19.275c-0.143-0.714-0.003-1.456,0.39-2.069c0.393-0.613,1.008-1.051,1.717-1.22c0.708-0.169,1.454-0.057,2.082,0.313%20c0.627,0.37,1.087,0.968,1.282,1.67l4.504,19.275c0.087,0.359,0.103,0.732,0.046,1.097c-0.057,0.366-0.185,0.716-0.377,1.032%20c-0.193,0.316-0.445,0.591-0.744,0.809s-0.637,0.375-0.997,0.462L748.188,993.248z'/%3e%3cpath%20style='fill:%23313131;'%20d='M759.447,1041.05c-0.646-0.01-1.27-0.23-1.77-0.64c-0.499-0.41-0.844-0.98-0.978-1.61l-4.503-19.28%20c-0.102-0.36-0.129-0.74-0.079-1.12c0.049-0.37,0.173-0.73,0.365-1.06c0.193-0.33,0.448-0.61,0.753-0.83%20c0.304-0.23,0.651-0.39,1.019-0.48c0.368-0.09,0.75-0.1,1.123-0.04c0.373,0.07,0.73,0.21,1.049,0.41%20c0.318,0.2,0.593,0.47,0.806,0.78c0.213,0.32,0.362,0.67,0.436,1.04l4.616,19.27c0.169,0.73,0.043,1.49-0.349,2.13%20c-0.393,0.63-1.02,1.08-1.745,1.25C759.954,1040.97,759.703,1041.03,759.447,1041.05z'/%3e%3cpath%20style='fill:%23313131;'%20d='M770.931,1088.83c-0.646,0-1.271-0.22-1.769-0.63c-0.497-0.41-0.835-0.98-0.956-1.62l-4.616-19.27%20c-0.102-0.37-0.129-0.75-0.079-1.13c0.049-0.37,0.173-0.73,0.365-1.06c0.193-0.32,0.448-0.61,0.753-0.83%20c0.304-0.23,0.651-0.39,1.019-0.48c0.368-0.08,0.75-0.1,1.123-0.03c0.374,0.06,0.73,0.2,1.049,0.4c0.318,0.21,0.593,0.47,0.806,0.78%20c0.214,0.32,0.362,0.67,0.436,1.04l4.616,19.28c0.169,0.72,0.044,1.49-0.348,2.13c-0.392,0.63-1.02,1.09-1.746,1.27%20C771.372,1088.75,771.153,1088.8,770.931,1088.83z'/%3e%3cpath%20style='fill:%23313131;'%20d='M895.43,998.562c-3.514,0-6.949-1.042-9.871-2.994c-2.921-1.953-5.198-4.727-6.543-7.974%20c-1.345-3.246-1.697-6.818-1.011-10.264c0.685-3.447,2.377-6.612,4.862-9.097c2.485-2.485,5.65-4.177,9.097-4.862%20c3.446-0.686,7.018-0.334,10.265,1.011c3.246,1.344,6.021,3.622,7.973,6.543c1.952,2.922,2.994,6.357,2.994,9.871%20c0,4.711-1.872,9.23-5.204,12.562C904.661,996.69,900.142,998.562,895.43,998.562z%20M895.43,968.681%20c-2.402,0-4.749,0.713-6.745,2.047c-1.997,1.335-3.552,3.232-4.47,5.451c-0.918,2.219-1.157,4.66-0.687,7.015%20c0.47,2.355,1.628,4.518,3.328,6.214c1.699,1.697,3.864,2.851,6.22,3.316c2.356,0.466,4.797,0.223,7.014-0.699%20c2.217-0.922,4.111-2.482,5.442-4.48c1.331-1.999,2.039-4.348,2.035-6.749c0-1.593-0.314-3.17-0.925-4.642%20c-0.61-1.471-1.504-2.807-2.631-3.933c-1.128-1.125-2.466-2.017-3.938-2.624C898.6,968.989,897.023,968.678,895.43,968.681z'/%3e%3cpath%20style='fill:%23313131;'%20d='M839.676,1021.78c-3.514,0-6.951-1.04-9.876-2.98c-2.925-1.95-5.205-4.73-6.553-7.97%20c-1.349-3.25-1.704-6.82-1.021-10.27c0.683-3.448,2.374-6.615,4.857-9.102c2.484-2.487,5.65-4.182,9.097-4.869%20s7.02-0.337,10.268,1.007c3.247,1.344,6.023,3.621,7.976,6.544c1.954,2.922,2.996,6.36,2.996,9.87%20c-0.006,4.71-1.876,9.22-5.202,12.55S844.383,1021.77,839.676,1021.78z%20M839.676,991.898c-2.402-0.004-4.752,0.704-6.751,2.036%20c-1.999,1.332-3.558,3.227-4.48,5.446c-0.921,2.22-1.163,4.66-0.696,7.02c0.468,2.35,1.624,4.52,3.323,6.22%20c1.699,1.7,3.863,2.85,6.22,3.32c2.356,0.47,4.798,0.22,7.017-0.7s4.114-2.48,5.446-4.48c1.332-2,2.04-4.35,2.036-6.75%20c-0.006-3.21-1.284-6.287-3.555-8.557C845.965,993.182,842.888,991.904,839.676,991.898z'/%3e%3cpath%20style='fill:%23313131;'%20d='M947.647,975.257h-0.293c-3.71-0.383-7.205-1.926-9.988-4.409c-2.784-2.482-4.714-5.779-5.517-9.422%20c-0.802-3.642-0.437-7.445,1.045-10.868c1.482-3.422,4.004-6.291,7.21-8.199c0.373-0.233,0.799-0.372,1.238-0.403%20c0.44-0.031,0.88,0.045,1.283,0.223c0.408,0.168,0.77,0.428,1.06,0.761c0.289,0.332,0.497,0.727,0.607,1.153%20c2.251,9.3,4.301,18.645,6.124,27.809c0.08,0.408,0.069,0.829-0.034,1.233c-0.102,0.403-0.292,0.779-0.557,1.099%20c-0.265,0.321-0.598,0.579-0.974,0.756C948.474,975.167,948.063,975.258,947.647,975.257z%20M939.878,949.858%20c-1.176,1.421-2.013,3.092-2.446,4.886c-0.434,1.793-0.452,3.662-0.055,5.464c0.397,1.802,1.2,3.49,2.348,4.935%20c1.147,1.445,2.609,2.609,4.274,3.404C942.716,962.355,941.342,956.095,939.878,949.858z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M873.52,931.212c-2.967-0.005-5.852-0.977-8.216-2.769c-2.365-1.792-4.082-4.306-4.889-7.161%20c-38.505-135.51-105.72-189.146-106.395-189.754c-2.709-2.264-4.434-5.489-4.815-8.998c-0.381-3.509,0.612-7.029,2.772-9.821%20c2.16-2.792,5.317-4.638,8.809-5.152c3.492-0.513,7.048,0.347,9.919,2.399c3.018,2.252,74.758,58.951,115.942,203.895%20c0.979,3.476,0.54,7.198-1.22,10.35c-1.759,3.153-4.697,5.48-8.169,6.471C876.043,931.026,874.785,931.208,873.52,931.212z'/%3e%3cpath%20style='fill:%23313131;'%20d='M873.52,934.027c-3.566-0.026-7.027-1.204-9.868-3.359c-2.841-2.155-4.908-5.171-5.894-8.597%20c-38.1-134.114-104.774-187.795-105.427-188.336c-3.449-2.669-5.696-6.6-6.247-10.926c-0.551-4.326,0.639-8.694,3.308-12.143%20c2.67-3.449,6.6-5.696,10.926-6.247c4.327-0.551,8.695,0.639,12.144,3.308c3.062,2.365,75.5,59.536,116.932,205.337%20c1.17,4.18,0.644,8.652-1.464,12.446c-2.108,3.795-5.627,6.604-9.794,7.819C876.637,933.775,875.083,934.01,873.52,934.027z%20M762.396,709.957c-2.253-0.002-4.451,0.7-6.286,2.008c-1.834,1.309-3.214,3.158-3.946,5.289c-0.732,2.132-0.78,4.439-0.136,6.598%20c0.644,2.16,1.946,4.064,3.726,5.447c0.675,0.541,68.633,54.853,107.363,191.218c0.651,2.26,2.016,4.249,3.891,5.67%20c1.875,1.42,4.159,2.196,6.512,2.211c1.005-0.009,2.005-0.153,2.972-0.428c2.756-0.786,5.089-2.633,6.486-5.136%20c1.397-2.503,1.745-5.458,0.967-8.217c-40.936-144.111-111.956-200.112-114.974-202.431%20C767.089,710.732,764.775,709.948,762.396,709.957z'/%3e%3cpath%20style='fill:%23313131;'%20d='M993.627,1354.13c-0.458,0-0.91-0.11-1.315-0.33c-0.405-0.21-0.751-0.52-1.009-0.9%20c-0.257-0.38-0.418-0.82-0.468-1.27c-0.05-0.46,0.012-0.92,0.18-1.35l101.895-255.93c0.13-0.35,0.33-0.67,0.59-0.94%20c0.25-0.28,0.56-0.49,0.91-0.64c0.34-0.16,0.71-0.24,1.08-0.24c0.38-0.01,0.75,0.06,1.1,0.2s0.66,0.35,0.93,0.61%20c0.26,0.26,0.48,0.58,0.62,0.92c0.14,0.35,0.22,0.72,0.22,1.09c-0.01,0.38-0.08,0.75-0.23,1.09l-101.958,255.94%20c-0.207,0.51-0.558,0.94-1.01,1.26C994.71,1353.95,994.177,1354.12,993.627,1354.13z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1007.9,1602.95c-0.52,0-1.03-0.14-1.48-0.42c-0.44-0.27-0.8-0.67-1.03-1.13%20c-0.24-0.47-0.34-1-0.29-1.52c0.05-0.52,0.24-1.01,0.55-1.43c0.25-0.34,12.75-18.29,8.6-86.76c-3.62-59.65-12.47-73.39-12.56-73.52%20c-0.27-0.39-0.44-0.84-0.49-1.3c-0.05-0.47,0.02-0.95,0.2-1.38c0.18-0.43,0.46-0.82,0.83-1.11c0.36-0.3,0.8-0.5,1.26-0.58%20l455.12-81.9c0.37-0.07,0.75-0.07,1.12,0c0.37,0.07,0.72,0.22,1.03,0.43c0.31,0.21,0.58,0.48,0.78,0.8%20c0.21,0.31,0.35,0.66,0.41,1.03c0.07,0.38,0.06,0.75-0.02,1.12c-0.08,0.37-0.24,0.72-0.46,1.02c-0.22,0.31-0.5,0.57-0.82,0.76%20c-0.32,0.2-0.68,0.33-1.05,0.38l-451.4,81.29c3.04,7.27,9,26.77,11.68,72.69c4.35,71.72-9.18,89.82-9.77,90.54%20c-0.27,0.32-0.61,0.58-0.99,0.75C1008.74,1602.88,1008.32,1602.97,1007.9,1602.95z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1432.02,1360.75h-0.61c-0.73-0.16-1.36-0.6-1.76-1.23s-0.54-1.39-0.38-2.12l37.09-166.16%20c0.16-0.72,0.61-1.36,1.24-1.76s1.4-0.53,2.12-0.36c0.73,0.16,1.37,0.61,1.77,1.24s0.53,1.39,0.36,2.12l-37.08,166.14%20c-0.16,0.61-0.51,1.15-1.01,1.54C1433.26,1360.54,1432.65,1360.75,1432.02,1360.75z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1464.26,894.848l10.61,32.537L1370.5,1028.6l-42.69-73.586L1464.26,894.848z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1327.81,955.013l-7.07-69.961l4.07-14.322l-28.62,7.791l-50.44,104.008L1327.81,955.013z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1370.5,1031.42h-0.38c-0.42-0.07-0.83-0.23-1.18-0.47c-0.36-0.24-0.65-0.56-0.87-0.93l-42.78-73.565%20c-0.21-0.344-0.33-0.726-0.37-1.123c-0.05-0.396-0.01-0.796,0.12-1.175c0.12-0.379,0.32-0.728,0.59-1.022%20c0.27-0.295,0.6-0.53,0.96-0.688l136.46-60.144c0.36-0.162,0.75-0.245,1.14-0.244c0.4,0,0.79,0.084,1.15,0.245%20c0.35,0.162,0.68,0.398,0.94,0.693c0.26,0.294,0.46,0.641,0.57,1.017l10.61,32.538c0.17,0.499,0.19,1.036,0.06,1.547%20s-0.4,0.974-0.78,1.335l-104.37,101.196C1371.87,1031.12,1371.2,1031.4,1370.5,1031.42z%20M1331.82,956.32l39.31,67.75l100.52-97.473%20l-9.01-27.899L1331.82,956.32z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1245.82,985.344c-0.47-0.001-0.94-0.123-1.36-0.355c-0.42-0.233-0.77-0.567-1.02-0.972%20c-0.25-0.406-0.4-0.869-0.42-1.345c-0.03-0.477,0.07-0.952,0.28-1.381l50.44-103.985c0.16-0.346,0.38-0.658,0.66-0.917%20c0.28-0.259,0.6-0.46,0.96-0.592l28.62-7.769c0.48-0.131,0.99-0.131,1.47-0.001c0.48,0.129,0.92,0.385,1.27,0.74%20c0.35,0.355,0.6,0.797,0.73,1.281c0.12,0.483,0.11,0.991-0.02,1.471l-3.92,13.803l7,69.398c0.07,0.634-0.08,1.272-0.42,1.809%20c-0.35,0.537-0.87,0.939-1.47,1.141l-82.05,27.516C1246.33,985.276,1246.08,985.329,1245.82,985.344z%20M1298.24,880.908%20l-46.97,96.825l73.59-24.769l-6.76-67.71c-0.08-0.348-0.08-0.71,0-1.058l2.71-9.525L1298.24,880.908z'/%3e%3cpath%20style='fill:%23313131;'%20d='M976.898,1205.36c-0.576,0-1.139-0.17-1.61-0.51c-0.472-0.33-0.83-0.79-1.025-1.34l-29.273-80.2%20c-0.256-0.7-0.224-1.48,0.091-2.16c0.314-0.68,0.885-1.2,1.587-1.46c0.702-0.25,1.477-0.22,2.154,0.09%20c0.678,0.32,1.203,0.89,1.46,1.59l29.273,80.23c0.157,0.43,0.208,0.88,0.149,1.33c-0.059,0.45-0.226,0.88-0.488,1.25%20c-0.261,0.37-0.609,0.67-1.013,0.88C977.799,1205.26,977.351,1205.37,976.898,1205.36z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1156.81,1411.87c-0.36,0.01-0.72-0.05-1.06-0.16c-0.69-0.27-1.25-0.8-1.56-1.48%20c-0.31-0.67-0.34-1.45-0.08-2.14l171-454.045c0.13-0.346,0.32-0.663,0.58-0.933c0.25-0.27,0.55-0.487,0.89-0.64%20c0.34-0.153,0.7-0.238,1.07-0.25c0.37-0.012,0.74,0.049,1.08,0.179c0.35,0.13,0.67,0.327,0.94,0.58%20c0.26,0.252,0.48,0.555,0.63,0.892c0.16,0.337,0.24,0.7,0.25,1.07c0.02,0.369-0.04,0.737-0.17,1.083l-170.93,454.014%20c-0.21,0.54-0.57,1-1.04,1.33C1157.94,1411.69,1157.38,1411.87,1156.81,1411.87z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1331.14,1015.11c-2.19,0-4.34-0.65-6.17-1.87c-1.82-1.22-3.24-2.95-4.08-4.98%20c-0.84-2.03-1.06-4.26-0.64-6.41c0.43-2.158,1.49-4.136,3.04-5.688c1.55-1.553,3.53-2.61,5.69-3.039%20c2.15-0.428,4.38-0.208,6.41,0.632c2.03,0.84,3.76,2.263,4.98,4.089c1.22,1.825,1.87,3.976,1.87,6.166c0,2.95-1.17,5.77-3.25,7.85%20C1336.91,1013.94,1334.09,1015.11,1331.14,1015.11z%20M1331.14,998.562c-1.08,0-2.14,0.322-3.04,0.924%20c-0.9,0.604-1.6,1.454-2.02,2.464c-0.41,1-0.52,2.1-0.3,3.16c0.21,1.06,0.73,2.04,1.5,2.8c0.77,0.77,1.75,1.28,2.81,1.49%20c1.06,0.21,2.16,0.1,3.16-0.32c1-0.42,1.85-1.12,2.45-2.02c0.6-0.91,0.92-1.97,0.91-3.05c0-1.45-0.58-2.83-1.61-3.85%20C1333.98,999.135,1332.59,998.562,1331.14,998.562z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1275.66,1161.21c-2.2,0-4.35-0.65-6.18-1.87c-1.83-1.21-3.25-2.95-4.1-4.98%20c-0.84-2.03-1.06-4.26-0.63-6.42c0.42-2.15,1.48-4.13,3.04-5.68c1.55-1.56,3.53-2.62,5.69-3.04c2.15-0.43,4.39-0.21,6.41,0.63%20c2.03,0.85,3.77,2.27,4.99,4.1c1.21,1.83,1.86,3.98,1.86,6.18c-0.01,2.93-1.18,5.75-3.25,7.82%20C1281.41,1160.03,1278.6,1161.2,1275.66,1161.21z%20M1275.66,1144.66c-1.08-0.01-2.14,0.31-3.05,0.91c-0.9,0.6-1.6,1.45-2.02,2.45%20c-0.42,1-0.53,2.1-0.32,3.16c0.21,1.06,0.72,2.04,1.49,2.81c0.76,0.77,1.74,1.29,2.8,1.5c1.06,0.22,2.16,0.11,3.16-0.31%20c1.01-0.41,1.86-1.11,2.46-2.01c0.61-0.9,0.93-1.96,0.93-3.04c0-1.45-0.58-2.84-1.6-3.86%20C1278.49,1145.24,1277.11,1144.66,1275.66,1144.66z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1220.11,1311.87c-2.2,0-4.35-0.64-6.18-1.86c-1.83-1.22-3.25-2.95-4.1-4.98%20c-0.84-2.03-1.06-4.27-0.63-6.42c0.42-2.16,1.48-4.14,3.04-5.69c1.55-1.55,3.53-2.61,5.69-3.04c2.15-0.43,4.39-0.21,6.41,0.64%20c2.03,0.84,3.77,2.27,4.99,4.1c1.21,1.82,1.86,3.97,1.86,6.17c-0.01,2.94-1.18,5.75-3.25,7.83%20C1225.86,1310.7,1223.04,1311.86,1220.11,1311.87z%20M1220.11,1295.32c-1.08,0-2.14,0.31-3.05,0.91c-0.9,0.6-1.61,1.45-2.02,2.45%20c-0.42,1-0.53,2.1-0.32,3.17c0.21,1.06,0.72,2.04,1.49,2.8c0.76,0.77,1.74,1.29,2.8,1.51c1.06,0.21,2.16,0.1,3.16-0.31%20c1.01-0.41,1.86-1.12,2.46-2.02c0.61-0.9,0.93-1.96,0.93-3.04c0-1.45-0.58-2.83-1.6-3.86%20C1222.94,1295.9,1221.56,1295.33,1220.11,1295.32z'/%3e%3cpath%20style='fill:%23313131;'%20d='M753.84,1108.49l2.567,12.14c0,0,108.399-10.58,168.182-56.95l-1.643-4.23%20C922.946,1059.45,866.562,1100.84,753.84,1108.49z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1093.74,1099.69l-121.549,265.34l21.369-13.71L1093.74,1099.69z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1466.7,1202.55l-35.06,157.06l-21.91,3.67L1466.7,1202.55z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1245.75,982.53l82.06-27.516l3.89,6.71L1245.75,982.53z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1370.5,1028.6l-42.69-73.586l-9.05,3.04L1370.5,1028.6z'/%3e%3c/svg%3e",ta={es:{save:"Guardar",cancel:"Cancelar",create:"Crear",edit:"Editar",delete:"Eliminar",search:"Buscar",searchBy:"Buscar por",filterBy:"Filtrar por",sortBy:"Ordenar por",all:"Todos",noSort:"Sin orden",empty:"No hay registros disponibles",confirmDeleteTitle:"¿Estás seguro de eliminar este registro?",confirmDeleteDesc:"Esta acción no se puede deshacer.",confirmText:"Eliminar",cancelText:"Cancelar",errorTitle:"Error",successTitle:"Éxito",defaultError:"Ha ocurrido un error inesperado",noPermission:"No tienes permiso de lectura para ver estos registros"},en:{save:"Save",cancel:"Cancel",create:"Create",edit:"Edit",delete:"Delete",search:"Search",searchBy:"Search by",filterBy:"Filter by",sortBy:"Sort by",all:"All",noSort:"No sort",empty:"No records available",confirmDeleteTitle:"Are you sure you want to delete this record?",confirmDeleteDesc:"This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",errorTitle:"Error",successTitle:"Success",defaultError:"An unexpected error occurred",noPermission:"You do not have read permission to view these records"}},G1=({title:t,entityName:r,fields:n,service:s,idField:a="id",pageSize:o=10,showCreateButton:i=!0,showSearch:l=!0,showRowActions:c=!0,allowDelete:u=!0,onCreateSuccess:d,onUpdateSuccess:f,onDeleteSuccess:h,onError:p,createButtonText:g,saveButtonText:x,cancelButtonText:b,emptyMessage:y,className:j="",id:w,renderToolbar:C,rowActions:I,formWidth:S="600px",formColumns:O=2,showViewToggle:L=!1,showAdvancedSearch:k=!1,filterableFields:R,useToolbar:z=!0,onViewChange:A,enableGridInfiniteScroll:P=!0,onBeforeCreate:D,onBeforeUpdate:Q,onBeforeDelete:V,locale:_="es",permissions:E,internalErrorHandling:U=!0,actions:T=[],globalActions:Y=[],batchActions:H=[],emptyStateConfig:Z,renderCardContent:ae,renderForm:oe,showDefaultEditAction:xe=!0,maximizeEditModal:se=!1,maximizeCustomModal:$e=!0,navigationType:ge,enableMultiSelect:ve=!1,showAdvancedSearchConnectors:ye=!1,maxAdvancedFilters:N=4,initialFiltersVisible:G=!0,headerBadges:F,renderHeaderExtra:ie,activeByCompany:re=!1,companies:fe=[],onCompanyChange:be,onConfirmLinking:ne,isCompanyLinked:ue,showGlobalValues:Ie,onSearchMatches:Ce})=>{const ee=ta[_]||ta.es,Ne=E?.canRead??!0,$=E?.canCreate??i,ze=E?.canUpdate??c,Le=E?.canDelete??u,et=E?.canOverrideMultiCompany??!0,Oe=ge??(re?"page":"modal"),qt={uuid:"000",code:"000",name:"Global"},je=m.useMemo(()=>re?[qt,...fe]:[],[re,fe]),[de,Ze]=m.useState("LIST"),[me,De]=m.useState(null),[Ft,Kt]=m.useState(null),[ke,Dr]=m.useState(()=>{if(re)return je[0]}),[ft,Be]=m.useState({show:!1,message:"",color:"zinc"}),Se=m.useCallback((M,W="zinc")=>{Be({show:!0,message:M,color:W}),setTimeout(()=>{Be(B=>({...B,show:!1}))},5e3)},[]),Xt=m.useCallback(()=>{Be(M=>({...M,show:!1}))},[]),[tt,mr]=m.useState({show:!1,company:null}),mt=m.useCallback(async(M,W)=>{const B=String(M.uuid)==="000",he=W||me?.[a];if(de==="EDIT"&&he&&re&&!B&&!(ue?.(Ft||he,M.uuid)??!0)){mr({show:!0,company:M});return}if(Dr(M),be?.(M,he),de==="EDIT"&&he){st(!0);try{let Me;const pe=Ft||he;s.getById?Me=await s.getById(pe,M):Me=(await s.getAll({page:1,limit:1,filters:{[a]:pe}},M)).data[0],Me&&De(Me)}catch{Se("Error al recargar el registro para la nueva compañía","red")}finally{st(!1)}}!W&&de==="LIST"&&(Pe(1),qe(!0))},[be,de,re,ue,Ft,me,a,s,Se]),bn=m.useCallback(async()=>{if(!tt.company||!me)return;const M=tt.company,W=me[a],B=Ft||W;st(!0),mr({show:!1,company:null});try{await ne?.(B,[M.uuid]),Dr(M),be?.(M,B);let he;s.getById?he=await s.getById(B,M):he=(await s.getAll({page:1,limit:1,filters:{[a]:B}},M)).data[0],he&&(De(he),Se(`Registro vinculado y cargado para ${M.name}`,"green"))}catch{Se("Error al vincular el registro dinámicamente","red")}finally{st(!1)}},[tt.company,me,a,Ft,ne,be,s,Se]),Fe=m.useCallback(()=>{if(ke)return ke},[ke]),[St,ht]=m.useState([]),Yt=m.useMemo(()=>St.map(M=>M[a]),[St,a]),[pt,hr]=m.useState(!1),[xt,pr]=m.useState([]),[rt,nt]=m.useState([]),[Qt,Dt]=m.useState(0),[gt,bt]=m.useState(!1),[Ve,st]=m.useState(!1),[Rt,qe]=m.useState(!0),[at,Jt]=m.useState(""),[Ke,xr]=m.useState("all"),er=m.useRef("all"),[Et,Pe]=m.useState(1),[ot,Br]=m.useState(),[vt,gr]=m.useState(null),[Mt,br]=m.useState("list"),[Bt,Xe]=m.useState({show:!1,content:null,title:""}),[Ye,it]=m.useState({show:!1,record:null,variant:"manual"}),[vr,Qe]=m.useState(!1),[yr,kr]=m.useState(!1),[lt,Vt]=m.useState(Ie??!1),[tr,rr]=m.useState({show:!1,matches:[],fieldName:""}),[It,yt]=m.useState({show:!1,record:null,loading:!1}),te=m.useRef(null),J=m.useCallback(async(M,W)=>{if(Ce)try{const B=await Ce(M,W);B&&B.length>0&&rr({show:!0,matches:B,fieldName:M.header})}catch(B){console.error("Error searching matches:",B)}},[Ce]),ce=m.useCallback(async M=>{yt({show:!0,record:null,loading:!0});try{let W;s.getById?W=await s.getById(M.id,Fe()):W=(await s.getAll({page:1,limit:1,filters:{[a]:M.id}},Fe())).data[0],W?yt({show:!0,record:W,loading:!1}):(Se("No se pudo encontrar el registro seleccionado","red"),yt(B=>({...B,show:!1,loading:!1})))}catch{Se("Error al cargar los datos del registro","red"),yt(B=>({...B,show:!1,loading:!1}))}},[s,Fe,a,Se]);m.useEffect(()=>{const M=window.matchMedia("(max-width: 1024px)"),W=B=>{br(B.matches?"grid":"list")};return W(M),M.addEventListener("change",W),()=>M.removeEventListener("change",W)},[]);const we=m.useCallback(()=>{te.current?.revertAllToGlobal(),Qe(!1),Se("Campos restaurados a valores globales","zinc")},[Se]),Re=m.useCallback(M=>{if(typeof M=="object"&&M!==null){const W=M;if(W.hasError&&W.msgError)return W.msgError;if(W.message)return W.message}return ee.defaultError},[ee]),ct=m.useMemo(()=>{let M=n;R&&R.length>0?M=n.filter(B=>R.includes(B.accessorKey)):M=n.filter(B=>B.config?.searchable!==!1);const W=M.map(B=>({value:B.accessorKey,label:B.header}));return[{value:"all",label:ee.all},...W]},[n,R,ee]);m.useEffect(()=>{if(Ke==="all"&&ct.length>0){const M=ct[0].value;xr(M),er.current=M}},[ct,Ke]);const Vr=m.useMemo(()=>{const W=n.filter(B=>B.config?.sortable===!0).map(B=>({value:B.accessorKey,label:B.header,field:B.accessorKey,direction:"asc"}));return[{value:"",label:ee.noSort,field:"",direction:"asc"},...W]},[n,ee]),Pr=m.useRef(null),ko=m.useCallback(M=>{gt||(Pr.current&&Pr.current.disconnect(),Pr.current=new IntersectionObserver(W=>{W[0].isIntersecting&&Rt&&Pe(B=>B+1)}),M&&Pr.current.observe(M))},[gt,Rt]),_r=m.useCallback(async()=>{if(Ne&&!(!Rt&&Et>1&&Mt==="grid"&&P)){bt(!0);try{const M=er.current,W={page:Et,limit:o,search:pt?void 0:at||void 0,searchField:pt?void 0:M!=="all"?M:void 0,sortBy:ot,sortDirection:vt||void 0,filters:pt?{advancedFilters:xt}:void 0},B=await s.getAll(W,Fe());Mt==="grid"&&P&&Et>1?nt(Me=>[...Me,...B.data]):nt(B.data),Dt(B.total);const he=(Et-1)*o+B.data.length;qe(he<B.total)}catch(M){U&&Se(Re(M),"red"),p?.(M,"fetch")}finally{bt(!1)}}},[Et,o,at,ot,vt,s,p,Mt,P,Rt,Re,Se,U,pt,xt]);m.useEffect(()=>{_r()},[_r]);const ns=m.useCallback(M=>{Jt(M),Pe(1),qe(!0)},[]),wo=m.useCallback((M,W)=>{Br(W?M:void 0),gr(W)},[]),jo=m.useCallback(M=>{const W=M||void 0;Br(W),W&&!vt&&gr("asc"),Pe(1),qe(!0)},[vt]),Co=m.useCallback(M=>{gr(M),ot&&(Pe(1),qe(!0))},[ot]),No=m.useCallback(M=>{xr(M),er.current=M,Jt(""),at!==""&&(Pe(1),qe(!0))},[at]),So=m.useCallback(M=>{br(M),Pe(1),qe(!0),A?.(M)},[A]),Ro=m.useCallback(M=>{Pe(M)},[]),Lt=m.useCallback(()=>{De(null),Kt(null),Ze("CREATE")},[]),wr=m.useCallback(M=>{De(M),Kt(M[a]),Ze("EDIT")},[a]),Pt=m.useCallback(()=>{Ze("LIST"),De(null),Kt(null)},[]),Eo=m.useCallback(M=>{ht(W=>{const he=rt.map(wt=>wt[a]).filter(wt=>!M.includes(wt));let Me=W.filter(wt=>!he.includes(wt[a]));const pe=M.filter(wt=>!W.some(To=>To[a]===wt)),cs=rt.filter(wt=>pe.includes(wt[a]));return[...Me,...cs]})},[rt,a]),ss=m.useCallback(()=>{hr(M=>(M&&(pr([]),Pe(1)),!M))},[]),Mo=m.useCallback(M=>{pr(M),Pe(1),qe(!0)},[]),[Wr,vn]=m.useState({show:!1,record:null}),Zr=m.useCallback(async M=>{V&&!await V(M)||vn({show:!0,record:M})},[V]),Io=m.useCallback(async()=>{if(Wr.record){bt(!0);try{const M=Wr.record[a];await s.delete(M,Fe()),h?.(M),Se("Registro eliminado correctamente","green"),vn({show:!1,record:null}),nt(W=>W.filter(B=>B[a]!==M)),Dt(W=>Math.max(0,W-1)),ht(W=>W.filter(B=>B[a]!==M))}catch(M){U&&Se(Re(M),"red"),p?.(M,"delete")}finally{bt(!1)}}},[Wr.record,a,s,h,p,Se,Re,U]),as=m.useCallback((M,W)=>{if(M.modalContent){const B=typeof M.modalContent=="function"?M.modalContent(W):M.modalContent;Xe({show:!0,content:B,title:M.name})}else M.action&&M.action(W,Fe())},[Fe]),os=m.useCallback(()=>{Xe({show:!1,content:null,title:""})},[]),is=m.useCallback(()=>{const M=[];Ne&&ze&&xe&&M.push({id:"edit",name:ee.edit,icon:e.jsx(L1,{className:"w-4 h-4"}),action:B=>wr(B),order:100}),re&&M.push({id:"link",name:"Vincular",icon:e.jsx(on,{className:"w-4 h-4"}),action:B=>{it({show:!0,record:Array.isArray(B)?B[0]:B,variant:"manual"})},order:110}),Le&&M.push({id:"delete",name:ee.delete,icon:e.jsx(A1,{className:"w-4 h-4"}),action:B=>Zr(B),order:200});const W=T.map(B=>({...B,order:B.order??0,action:he=>as(B,he)}));return[...M,...W].sort((B,he)=>(B.order??0)-(he.order??0))},[Ne,ze,xe,Le,T,ee,wr,Zr,as,re,Fe]),kt=m.useMemo(()=>is(),[is]),Lo=m.useMemo(()=>{const M=H.map(B=>({...B,action:()=>{B.action?.(St),ht([])}})),W=T.filter(B=>B.isGroupAction).map(B=>({...B,action:()=>{B.action?.(St),ht([])}}));return[...M,...W]},[H,T,St]),nr=m.useCallback(async M=>{st(!0);try{if(de==="CREATE"){if(D&&!await D(M)){st(!1);return}let W={...M};re&&ke&&String(ke.uuid)!=="000"&&(W._createInGlobal=!0);const B=await s.create(W,Fe());d?.(B),Se("Registro creado correctamente","green"),De(B),Kt(B[a]),Ze("EDIT"),_r(),re&&(!ke||String(ke.uuid)==="000")&&it({show:!0,record:B,variant:"success"})}else if(de==="EDIT"&&me){const W=me[a];let B={...M};if(re&&ke&&String(ke.uuid)!=="000"){const Me=n.filter(pe=>pe.config?.allowMultiCompanyOverride).map(pe=>pe.accessorKey);B._multicompanyMetadata={isOverride:!0,companyUuid:ke.uuid,overriddenFields:Me}}if(Q&&!await Q(W,B)){st(!1);return}const he=await s.update(W,B,Fe());Ze("LIST"),De(null),nt(Me=>Me.map(pe=>pe[a]===W?{...pe,...B,...he||{}}:pe)),f?.(he),Se("Registro actualizado correctamente","green")}}catch(W){U&&Se(Re(W),"red"),p?.(W,de==="CREATE"?"create":"update")}finally{st(!1)}},[de,me,a,s,d,f,p,_r,D,Q,Se,Re,U,re,ke,n,Fe]),ls=Math.ceil(Qt/o),Ao=`flex flex-col gap-6 w-full relative ${j}`.trim(),zo=z?e.jsx(B1,{title:t,searchPlaceholder:Ke==="all"?`${ee.search}...`:`${ee.searchBy} ${ct.find(M=>M.value===Ke)?.label}...`,searchValue:at,onSearchChange:ns,showSearch:l,filterOptions:ct,selectedFilter:Ke,onFilterChange:No,showFilter:l&&ct.length>0,filterButtonText:ee.searchBy,sortOptions:Vr,selectedSort:ot,onSortChange:jo,sortDirection:vt||"asc",onSortDirectionChange:Co,showSort:Vr.length>0,sortButtonText:ee.sortBy,viewType:Mt,onViewChange:So,showViewToggle:L,showAdvancedSearch:k,globalActions:Y,batchActions:Lo,hasSelection:St.length>0,isAdvancedSearchActive:pt,onAdvancedSearchToggle:ss,initialFiltersVisible:G,activeByCompany:re,companies:je,selectedCompany:ke,onCompanyChange:mt,extraContent:$&&e.jsx(X,{type:"default",size:"l",leftIcon:e.jsx(Er,{className:"w-4 h-4"}),onClick:Lt,children:g||`${ee.create} ${r}`})}):e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 p-4",children:[e.jsx("h1",{className:"text-xl font-semibold text-[#1355b7] dark:text-primary-custom-600",children:t}),$&&e.jsx(X,{type:"default",size:"l",leftIcon:e.jsx(Er,{className:"w-4 h-4"}),onClick:Lt,children:g||`${ee.create} ${r}`})]});return e.jsxs("div",{className:Ao,id:w,children:[ft.show&&e.jsx("div",{className:"fixed top-4 right-4 z-[100] animate-in fade-in slide-in-from-top-2",children:e.jsx(H1,{color:ft.color,onClose:Xt,showCloseButton:!0,showLeftIcon:!0,leftIcon:ft.color==="red"?e.jsx(Zt,{className:"w-4 h-4"}):void 0,children:ft.message})}),e.jsxs("div",{className:`flex-1 flex flex-col transition-all duration-300 bg-background-secondary dark:bg-dark-bg-primary min-h-screen ${Oe==="page"&&(de==="CREATE"||de==="EDIT")?"hidden":"block"}`,children:[e.jsx("div",{className:"sticky top-0 z-30 bg-white dark:bg-dark-bg-primary",children:C?C({onSearch:ns,onCreate:Lt,searchTerm:at}):zo}),e.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[e.jsx("div",{className:"flex-1 p-5 overflow-auto",children:Ne?e.jsxs(e.Fragment,{children:[pt&&e.jsx("div",{className:"mb-6",children:e.jsx(P1,{fields:n,onSearch:Mo,onClose:ss,initialSearchTerm:at,initialSearchField:Ke,showConnectors:ye,maxFilters:N,filterableFields:R})}),Mt==="list"?rt.length>0||gt?e.jsx("div",{className:"bg-white dark:bg-dark-bg-primary rounded-2xl p-5 overflow-hidden",children:e.jsx(D1,{fields:n,data:rt,loading:gt,emptyMessage:y||ee.empty,onSort:wo,sortColumn:ot,sortDirection:vt,pagination:ls>1?{currentPage:Et,totalPages:ls,onPageChange:Ro}:void 0,showRowActions:c,actions:kt,onEdit:ze?wr:void 0,onDelete:Le?Zr:void 0,rowActions:I,locale:_,enableMultiSelect:ve,selectedIds:Yt,onSelectionChange:Eo})}):e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 px-4 text-center",children:[Z?.image?typeof Z.image=="string"?e.jsx("img",{src:Z.image,alt:"Empty",className:"w-48 h-48 mb-6 opacity-50"}):e.jsx("div",{className:"mb-6 opacity-50",children:Z.image}):e.jsx("div",{className:"mb-6 flex items-center justify-center",children:e.jsx("img",{src:ea,alt:"No hay registros",className:"w-64 h-64 mb-4 object-contain"})}),e.jsx("div",{className:"w-full max-w-md text-left",children:e.jsx(Qr,{title:Z?.title||"Aún no tienes registros",description:Z?.description||"Dale click en el botón nuevo para iniciar",color:"blue"})})]}):e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[rt.length>0?rt.map((M,W)=>e.jsx("div",{ref:W===rt.length-1&&Mt==="grid"&&P?ko:null,children:e.jsx(V1,{data:M,fields:n,actions:kt,onEdit:ze?wr:void 0,onDelete:Le?Zr:void 0,rowActions:I,index:W,renderCardContent:ae,enableMultiSelect:ve,isSelected:Yt.includes(M[a]),onSelect:B=>{if(B)ht(he=>[...he,M]);else{const he=M[a];ht(Me=>Me.filter(pe=>pe[a]!==he))}}})},M[a]||W)):!gt&&e.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-20 px-4 text-center",children:[Z?.image?typeof Z.image=="string"?e.jsx("img",{src:Z.image,alt:"Empty",className:"w-48 h-48 mb-6 opacity-50"}):e.jsx("div",{className:"mb-6 opacity-50",children:Z.image}):e.jsx("div",{className:"mb-6 flex items-center justify-center",children:e.jsx("img",{src:ea,alt:"No hay registros",className:"w-64 h-64 mb-4 object-contain"})}),e.jsx("div",{className:"w-full max-w-md text-left",children:e.jsx(Qr,{title:Z?.title||"Aún no tienes registros",description:Z?.description||"Dale click en el botón nuevo para iniciar",color:"blue"})})]}),gt&&Array.from({length:4}).map((M,W)=>e.jsx("div",{className:"h-48 bg-gray-100 dark:bg-gray-800 rounded-2xl animate-pulse"},W))]})]}):e.jsx("div",{className:"flex flex-col items-center justify-center py-20 px-4 text-center",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsx(Qr,{title:ee.errorTitle,description:ee.noPermission,color:"red"})})})}),Oe==="sidebar"&&(de==="CREATE"||de==="EDIT")&&e.jsx("div",{className:"w-[450px] flex-none p-5 pl-0 animate-in slide-in-from-right duration-300 flex flex-col overflow-hidden",children:e.jsx("div",{className:"max-h-full h-fit bg-white dark:bg-dark-bg-primary rounded-2xl overflow-hidden border border-border-secondary dark:border-dark-border-primary flex flex-col shadow-sm",children:oe?oe({fields:n,entityName:r,initialData:me||void 0,isEditing:de==="EDIT",loading:Ve,onSubmit:nr,onCancel:Pt,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:1,width:"100%",className:"max-h-full h-fit border-none rounded-none shadow-none",actions:de==="EDIT"?kt:void 0,selectedCompany:ke,activeByCompany:re,showGlobalValues:lt,fullWidthButton:!0,onSearchMatches:J,canOverrideMultiCompany:et,companies:je,onCompanyChange:mt,onShowGlobalValuesChange:Vt,onUseGlobalData:()=>Qe(!0),onCreateNew:Lt,onLinkCompanies:()=>it({show:!0,record:me,variant:"manual"})}):e.jsx(Rr,{ref:te,fields:n,entityName:r,initialData:me||void 0,isEditing:de==="EDIT",loading:Ve,onSubmit:nr,onCancel:Pt,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:1,width:"100%",className:"max-h-full h-fit border-none rounded-none shadow-none",actions:de==="EDIT"?kt:void 0,selectedCompany:ke,activeByCompany:re,fullWidthButton:!0,showGlobalValues:lt,onSearchMatches:J,canOverrideMultiCompany:et,companies:je,onCompanyChange:mt,onShowGlobalValuesChange:Vt,onUseGlobalData:()=>Qe(!0),onCreateNew:Lt,onLinkCompanies:()=>it({show:!0,record:me,variant:"manual"})})})})]})]}),(de==="CREATE"||de==="EDIT")&&(Oe==="modal"?e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:e.jsx("div",{className:`w-full bg-white dark:bg-dark-bg-primary rounded-xl shadow-2xl flex flex-col overflow-hidden ${se?"h-[95vh]":"max-h-[90vh]"}`,style:{maxWidth:se?"95vw":S},children:oe?oe({fields:n,entityName:r,initialData:me||void 0,isEditing:de==="EDIT",loading:Ve,onSubmit:nr,onCancel:Pt,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:O,width:"100%",className:"flex-1 min-h-0",actions:de==="EDIT"?kt:void 0,selectedCompany:ke,activeByCompany:re,showGlobalValues:lt,fullWidthButton:!1,onSearchMatches:J,canOverrideMultiCompany:et,companies:je,onCompanyChange:mt,onShowGlobalValuesChange:Vt,onUseGlobalData:()=>Qe(!0),onCreateNew:Lt,onLinkCompanies:()=>it({show:!0,record:me,variant:"manual"})}):e.jsx(Rr,{ref:te,fields:n,entityName:r,initialData:me||void 0,isEditing:de==="EDIT",loading:Ve,onSubmit:nr,onCancel:Pt,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:O,width:"100%",className:"flex-1 min-h-0",actions:de==="EDIT"?kt:void 0,selectedCompany:ke,activeByCompany:re,fullWidthButton:!1,showGlobalValues:lt,onSearchMatches:J,canOverrideMultiCompany:et,companies:je,onCompanyChange:mt,onShowGlobalValuesChange:Vt,onUseGlobalData:()=>Qe(!0),onCreateNew:Lt,onLinkCompanies:()=>it({show:!0,record:me,variant:"manual"})})})}):Oe==="sidebar"?null:e.jsxs("div",{className:"flex-1 flex flex-col min-h-screen bg-background-secondary dark:bg-dark-bg-primary animate-in fade-in duration-300 rounded-tl-2xl overflow-hidden",children:[e.jsxs("div",{className:"sticky top-0 z-30 bg-background-secondary dark:bg-dark-bg-primary border-b border-border-primary dark:border-dark-border-primary p-4 flex items-center justify-between gap-4 w-full",children:[e.jsxs("div",{className:"flex items-center gap-4 overflow-hidden p-1 -m-1",children:[e.jsx(X,{type:"plain",size:"sm",iconOnly:!0,leftIcon:e.jsx(Ys,{className:"w-5 h-5"}),onClick:Pt,ariaLabel:"Volver",className:"hover:bg-white/50 dark:hover:bg-dark-bg-inverse/10 text-content-secondary"}),e.jsxs("div",{className:"flex flex-col min-w-0",children:[e.jsx("h2",{className:"text-xl font-semibold leading-7 tracking-tight text-[#1355b7] dark:text-primary-custom-600 truncate",children:de==="EDIT"?`${ee.edit} ${r}`:`${ee.create} ${r}`}),e.jsxs("div",{className:"flex flex-wrap gap-2 mt-0.5 items-center",children:[re&&je.length>0&&e.jsx(rs,{companies:je,selectedCompany:ke,onCompanyChange:M=>mt(M,me?.[a])}),(typeof F=="function"?F(me):F||[]).length>0&&(typeof F=="function"?F(me):F||[]).map((M,W)=>e.jsx(Ge,{label:M.label,color:M.color,className:"text-[10px] px-1.5 py-0"},W))]})]})]}),e.jsx("div",{className:"flex-1 flex justify-center max-w-xl",children:ie?.(me)}),e.jsxs("div",{className:"flex items-center gap-3",children:[(de==="EDIT"||de==="CREATE"&&re)&&(()=>{const M=kt.filter(pe=>pe.id!=="edit"&&pe.id!=="delete"&&pe.id!=="link"),W=!ke||String(ke.uuid)==="000",B=[];re&&de==="EDIT"&&(W||(B.push({children:"Usar datos globales",icon:e.jsx(ts,{className:"w-4 h-4"}),onClick:()=>Qe(!0)}),B.push({children:e.jsxs("div",{className:"flex items-center justify-between w-full gap-4 py-1",children:[e.jsx("span",{className:"text-sm font-medium",children:"Mostrar valores globales"}),e.jsx(Tt,{checked:lt,onChange:()=>{},className:"!w-auto pointer-events-none"})]}),onClick:()=>Vt(!lt),className:"hover:bg-transparent"}),B.push({isDivider:!0})),B.push({children:"Vincular compañías",icon:e.jsx(on,{className:"w-4 h-4"}),onClick:()=>{it({show:!0,record:me,variant:"manual"})}}),B.push({children:"Crear nuevo registro",icon:e.jsx(Er,{className:"w-4 h-4"}),onClick:()=>kr(!0)}),B.push({isDivider:!0}));const he=M.map(pe=>({children:pe.name,icon:pe.icon,disabled:typeof pe.disabled=="function"?pe.disabled(me):pe.disabled,onClick:()=>pe.action?.(me),className:pe.name.toLowerCase().includes("eliminar")||pe.name.toLowerCase().includes("delete")?"text-error-content hover:text-error-content dark:text-error-content":""})),Me=[...B,...he].filter(pe=>!0);return Me.length===0?null:e.jsx(_e,{menuClassName:"w-56",renderTrigger:()=>e.jsx(X,{type:"outline",size:"l",leftIcon:e.jsx(cr,{className:"w-4 h-4"}),rightIcon:e.jsx(Mr,{className:"w-4 h-4"}),className:"!bg-transparent !text-primary-custom-600 !border-primary-custom-300",children:"Acciones"}),items:Me})})(),e.jsx(X,{type:"default",size:"l",htmlType:"submit",form:"master-crud-main-form",disabled:Ve,className:"font-bold min-w-[120px]",children:Ve?"...":x||ee.save})]})]}),e.jsx("div",{className:"flex-1 p-5 overflow-auto",children:e.jsx("div",{className:"bg-white dark:bg-dark-bg-primary rounded-2xl p-8 w-full min-h-[400px] shadow-xs",children:oe?oe({fields:n,entityName:r,initialData:me||void 0,isEditing:de==="EDIT",loading:Ve,onSubmit:nr,onCancel:Pt,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:O,width:"100%",className:"w-full",actions:de==="EDIT"?kt:void 0,hideHeaderFooter:!0,selectedCompany:ke,activeByCompany:re,showGlobalValues:lt,onSearchMatches:J,canOverrideMultiCompany:et}):e.jsx(Rr,{ref:te,id:"master-crud-main-form",fields:n,entityName:r,initialData:me||void 0,isEditing:de==="EDIT",loading:Ve,onSubmit:nr,onCancel:Pt,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:O,width:"100%",className:"w-full",actions:de==="EDIT"?kt:void 0,hideHeaderFooter:!0,selectedCompany:ke,activeByCompany:re,showGlobalValues:lt,onSearchMatches:J,canOverrideMultiCompany:et})})})]})),vr&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:e.jsx(ir,{title:"¿Deseas usar los datos globales?",description:"Esta acción restaurará todos los campos que permiten sobreescritura a sus valores maestros originales.",onCancel:()=>Qe(!1),onConfirm:we,cancelText:ee.cancelText,confirmText:"Confirmar"})}),yr&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:e.jsx(ir,{title:"¿Deseas crear un nuevo registro?",description:"Se perderán los cambios no guardados en el registro actual y se abrirá el formulario de creación.",onCancel:()=>kr(!1),onConfirm:()=>{kr(!1),Lt()},cancelText:ee.cancelText,confirmText:"Confirmar"})}),tt.show&&tt.company&&e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50",children:e.jsx(ir,{title:"Registro no vinculado",description:`El registro actual no está vinculado a la compañía "${tt.company.name}". ¿Deseas vincularlo ahora para poder editarlo en este contexto?`,onCancel:()=>mr({show:!1,company:null}),onConfirm:bn,cancelText:"Cancelar",confirmText:"Vincular ahora"})}),Bt.show&&e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:`bg-white dark:bg-dark-bg-primary rounded-xl shadow-2xl flex flex-col relative ${$e?"w-[95vw] h-[95vh]":"w-full max-w-4xl max-h-[90vh]"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border-secondary dark:border-dark-border-primary",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(X,{type:"plain",size:"sm",iconOnly:!0,leftIcon:e.jsx(Ys,{className:"w-5 h-5"}),onClick:os,ariaLabel:"Volver"}),e.jsx("h3",{className:"text-lg font-bold text-content-primary dark:text-dark-content-primary",children:Bt.title})]}),e.jsx(X,{type:"outline",size:"xs",iconOnly:!0,leftIcon:e.jsx(Zt,{className:"w-4 h-4"}),onClick:os,ariaLabel:"Cerrar",className:"!bg-white dark:!bg-dark-bg-primary"})]}),e.jsx("div",{className:"flex-1 overflow-auto p-4",children:Bt.content})]})}),Wr.show&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:e.jsx(ir,{title:ee.confirmDeleteTitle,description:ee.confirmDeleteDesc,onCancel:()=>vn({show:!1,record:null}),onConfirm:Io,cancelText:ee.cancelText,confirmText:ee.confirmText})}),re&&Ye.show&&Ye.record&&e.jsx(_1,{isOpen:Ye.show,onClose:()=>{const M=Ye.variant==="success";it(W=>({...W,show:!1,record:null})),M&&(Ze("LIST"),De(null))},recordId:Ye.record[a],record:Ye.record,companies:je,fields:n,variant:Ye.variant,onConfirm:(M,W)=>ne?.(M,W),isLinked:M=>ue?.(Ye.record[a],M)??!1}),tr.show&&e.jsx(Ha,{isOpen:tr.show,onClose:()=>rr(M=>({...M,show:!1})),matches:tr.matches,fieldName:tr.fieldName,onView:ce,onContinue:()=>rr(M=>({...M,show:!1}))}),It.show&&e.jsx("div",{className:"fixed inset-0 z-[90] flex items-center justify-center bg-black/50 p-4 animate-in fade-in duration-200",children:e.jsxs("div",{className:"bg-white dark:bg-dark-bg-primary rounded-xl shadow-2xl flex flex-col w-[95vw] h-[95vh] overflow-hidden relative",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border-secondary dark:border-dark-border-primary shrink-0",children:[e.jsx("div",{className:"flex items-center gap-4",children:e.jsx("h3",{className:"text-lg font-bold text-content-primary dark:text-dark-content-primary",children:"Vista Previa"})}),e.jsx(X,{type:"outline",size:"xs",iconOnly:!0,leftIcon:e.jsx(Zt,{className:"w-4 h-4"}),onClick:()=>yt(M=>({...M,show:!1})),ariaLabel:"Cerrar",className:"!bg-white dark:!bg-dark-bg-primary"})]}),e.jsx("div",{className:"flex-1 overflow-auto bg-background-secondary dark:bg-dark-bg-primary p-5",children:e.jsx("div",{className:"bg-white dark:bg-dark-bg-primary rounded-2xl p-8 w-full min-h-[400px] shadow-xs",children:It.loading?e.jsx("div",{className:"flex items-center justify-center h-full py-20",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-custom-600"})}):It.record&&(oe?oe({fields:n,entityName:r,initialData:It.record,isEditing:!0,loading:!1,isReadOnly:!0,onSubmit:()=>{},onCancel:()=>{},columns:O,width:"100%",className:"w-full",hideHeaderFooter:!0,selectedCompany:qt,activeByCompany:re,canOverrideMultiCompany:et}):e.jsx(Rr,{fields:n,entityName:r,initialData:It.record,isEditing:!0,loading:!1,isReadOnly:!0,onSubmit:()=>{},onCancel:()=>{},columns:O,width:"100%",className:"w-full",hideHeaderFooter:!0,selectedCompany:qt,activeByCompany:re,canOverrideMultiCompany:et}))})}),e.jsxs("div",{className:"px-[24px] py-[16px] pb-[24px] flex items-center justify-end gap-[12px] shrink-0 w-full border-t border-border-secondary dark:border-dark-border-primary bg-white dark:bg-dark-bg-primary",children:[e.jsx(X,{type:"outline",size:"l",onClick:()=>yt(M=>({...M,show:!1})),className:"font-medium px-6",children:ee.cancelText}),e.jsx(X,{type:"default",size:"l",onClick:()=>{const M=It.record;yt({show:!1,record:null,loading:!1}),rr(W=>({...W,show:!1})),M&&wr(M)},className:"font-bold px-8",children:ee.edit})]})]})})]})},U1=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),q1=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),K1=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),X1=({onSubmit:t,onForgotPassword:r,onSignUp:n,isLoading:s=!1,errorMessage:a,className:o="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=m.useState(""),[d,f]=m.useState(""),[h,p]=m.useState(!1),[g,x]=m.useState(""),b=w=>{if(w.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){x("Por favor ingresa un email válido");return}x(""),t?.(c,d)},y=w=>{u(w.target.value),g&&x("")},j=()=>{p(!h)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",o].join(" "),children:[i&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),a&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:a}),e.jsxs("form",{onSubmit:b,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(U1,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:y,disabled:s,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:r,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(q1,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:h?"text":"password",placeholder:"••••••••",value:d,onChange:w=>f(w.target.value),disabled:s,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:j,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":h?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(K1,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:s||!c||!d,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:s?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:n,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},Y1=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-5-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 9c-1.825 0-3.422.977-4.295 2.437A5.49 5.49 0 0 0 8 13.5a5.49 5.49 0 0 0 4.294-2.063A4.997 4.997 0 0 0 8 9Z",clipRule:"evenodd"})}),Q1=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),J1=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),eu=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),tu=({onSubmit:t,onSignIn:r,onTermsClick:n,onPrivacyClick:s,isLoading:a=!1,errorMessage:o,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=m.useState(""),[f,h]=m.useState(""),[p,g]=m.useState(""),[x,b]=m.useState(!1),[y,j]=m.useState(""),w=S=>{if(S.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){j("Por favor ingresa un email válido");return}j(""),t?.(u,f,p)},C=S=>{h(S.target.value),y&&j("")},I=()=>{b(!x)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",i].join(" "),children:[l&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:w,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Y1,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"name-input",type:"text",placeholder:"Juan Pérez",value:u,onChange:S=>d(S.target.value),disabled:a,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Q1,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:f,onChange:C,disabled:a,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",y?"border-error-border!":""].filter(Boolean).join(" ")})]}),y&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:y})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(J1,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:x?"text":"password",placeholder:"••••••••",value:p,onChange:S=>g(S.target.value),disabled:a,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:I,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":x?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(eu,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:a||!u||!f||!p,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:a?"Registrando...":"Registrarse"})]}),e.jsx("button",{type:"button",onClick:r,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Ya tengo una cuenta"}),e.jsx("div",{className:"w-full text-center",children:e.jsxs("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:["Al registrarse, estás aceptando nuestras"," ",e.jsx("button",{type:"button",onClick:n,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Condiciones de Uso"})," ","y nuestras"," ",e.jsx("button",{type:"button",onClick:s,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Políticas de Privacidad"}),"."]})})]})]})},ru=e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:e.jsx("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z",clipRule:"evenodd"})}),nu=({value:t,onChange:r})=>{const n=m.useRef(null),s=m.useCallback(a=>{const o=a.target.value;n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r(o)},300)},[r]);return e.jsx("div",{className:"px-4 pt-4 pb-2",children:e.jsx(Te,{leftIcon:ru,placeholder:"Buscar parametros...",defaultValue:t,onChange:s,fullWidth:!0})})},su=({tabs:t,activeId:r,onChange:n})=>{const s=m.useRef(null),[a,o]=m.useState(!1),[i,l]=m.useState(!1),c=m.useCallback(()=>{const h=s.current;h&&(o(h.scrollLeft>0),l(h.scrollLeft+h.clientWidth<h.scrollWidth-1))},[]);m.useEffect(()=>{const h=s.current;if(!h)return;c(),h.addEventListener("scroll",c,{passive:!0});const p=new ResizeObserver(c);return p.observe(h),()=>{h.removeEventListener("scroll",c),p.disconnect()}},[c,t]);const u=h=>{const p=s.current;p&&p.scrollBy({left:h==="left"?-200:200,behavior:"smooth"})},d=e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:e.jsx("path",{fillRule:"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"})}),f=e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:e.jsx("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})});return e.jsxs("div",{className:"relative flex items-center border-b border-border-primary dark:border-dark-border-primary px-4",children:[a&&e.jsx(X,{type:"plain",size:"sm",iconOnly:!0,leftIcon:d,onClick:()=>u("left"),ariaLabel:"Desplazar tabs a la izquierda",className:"shrink-0 z-10"}),e.jsx("div",{ref:s,className:"flex overflow-x-auto scroll-smooth scrollbar-hide flex-1",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.jsx("div",{className:"flex",children:t.map(h=>e.jsx(Ga,{label:h.label,active:h.id===r,badge:h.badge,onClick:()=>n(h.id)},h.id))})}),i&&e.jsx(X,{type:"plain",size:"sm",iconOnly:!0,leftIcon:f,onClick:()=>u("right"),ariaLabel:"Desplazar tabs a la derecha",className:"shrink-0 z-10"})]})};function ra(t){const r=new Map;for(const n of t)for(const s of n.parameters)r.set(s.id,s.resolvedValue);return r}function au(t,r){if(!t.validations||t.validations.length===0)return"";for(const n of t.validations)switch(n.ruleType){case"REGEX":case"FORMAT":{try{if(!new RegExp(n.ruleValue).test(r))return n.errorMessage}catch{}break}case"MIN":{const s=parseFloat(r),a=parseFloat(n.ruleValue);if(!isNaN(s)&&!isNaN(a)&&s<a)return n.errorMessage;break}case"MAX":{const s=parseFloat(r),a=parseFloat(n.ruleValue);if(!isNaN(s)&&!isNaN(a)&&s>a)return n.errorMessage;break}case"MAX_LENGTH":{const s=parseInt(n.ruleValue,10);if(!isNaN(s)&&r.length>s)return n.errorMessage;break}}return""}function Mn(t,r){if(!r.trim())return t;const n=r.toLowerCase();return t.filter(s=>s.name.toLowerCase().includes(n)||s.code.toLowerCase().includes(n)||s.description.toLowerCase().includes(n))}function ou(t){return t.filter(r=>r.isVisible!==!1).sort((r,n)=>(r.sortOrder??0)-(n.sortOrder??0))}function iu(t,r,n){let s=0;for(const a of t.parameters){const o=r.get(a.id),i=n.get(a.id);o!==void 0&&o!==i&&s++}return s}function lu(t,r){let n=0;for(const[s,a]of t)a!==r.get(s)&&n++;return n}function cu(t,r,n){const s=[];for(const a of t)for(const o of a.parameters){const i=r.get(o.id),l=n.get(o.id);i!==void 0&&i!==l&&s.push({parameterId:o.id,parameterCode:o.code,parameterName:o.name,categoryName:a.name,categoryId:a.id,dataType:o.dataType,oldValue:l??"",newValue:i,isSensitive:o.isSensitive,listOptions:o.listOptions,rowVersion:o.rowVersion})}return s}function du(t){return t.map(r=>({parameterId:r.parameterId,parameterCode:r.parameterCode,value:r.newValue,rowVersion:r.rowVersion}))}function na(t,r,n,s){if(n)return"••••••••";if(r==="BOOLEAN")return t==="true"?"Sí":"No";if(r==="LIST"&&s){const a=s.find(o=>o.value===t);return a?a.label:t}return t}function uu(t){const r={};for(const n of t)n.ruleType==="MIN"?r.min=parseFloat(n.ruleValue):n.ruleType==="MAX"?r.max=parseFloat(n.ruleValue):n.ruleType==="MAX_LENGTH"&&(r.maxLength=parseInt(n.ruleValue,10));return r}const fu=({parameter:t,value:r,originalValue:n,onChange:s,onValidationError:a,validationError:o,fetcher:i,readOnly:l=!1})=>{const c=r!==n,{min:u,max:d,maxLength:f}=uu(t.validations),h=g=>{const x=au(t,g);a(t.id,x)},p=()=>{switch(t.dataType){case"BOOLEAN":return e.jsx(Tt,{label:t.name,description:t.description,checked:r==="true",disabled:l,onChange:g=>{s(t.id,g.target.checked?"true":"false")}});case"LIST":return e.jsx(Tr,{label:t.name,options:(t.listOptions??[]).slice().sort((g,x)=>g.sortOrder-x.sortOrder).map(g=>({value:g.value,label:g.label})),value:r,onChange:g=>s(t.id,String(g)),disabled:l,error:!!o,fullWidth:!0});case"ENTITY":return e.jsx(gn,{entity:t.entityMapping?.targetTableName??"",label:t.name,displayFields:[t.entityMapping?.descriptionField??"name"],value:r||null,onChange:g=>{const x=g?String(g.Id):"";s(t.id,x)},fetcher:i,readOnly:l,error:!!o,errorText:o});case"INT":return e.jsx(Te,{label:t.name,type:"number",step:"1",min:u,max:d,value:r,onChange:g=>s(t.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:t.description,fullWidth:!0});case"DECIMAL":return e.jsx(Te,{label:t.name,type:"number",step:"0.01",min:u,max:d,value:r,onChange:g=>s(t.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:t.description,fullWidth:!0});case"PERCENTAGE":return e.jsx(Te,{label:t.name,type:"number",step:"0.01",min:u??0,max:d??100,value:r,onChange:g=>s(t.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:t.description,rightIcon:e.jsx("span",{className:"text-content-secondary dark:text-dark-content-secondary text-sm",children:"%"}),fullWidth:!0});case"EMAIL":return e.jsx(Te,{label:t.name,type:t.isSensitive?"password":"email",value:r,onChange:g=>s(t.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:t.description,maxLength:f,fullWidth:!0});case"URL":return e.jsx(Te,{label:t.name,type:t.isSensitive?"password":"url",value:r,onChange:g=>s(t.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:t.description,maxLength:f,fullWidth:!0});case"STRING":return e.jsx(Te,{label:t.name,type:t.isSensitive?"password":"text",value:r,onChange:g=>s(t.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:t.description,maxLength:f,fullWidth:!0});default:return e.jsx(Te,{label:t.name,type:"text",value:"Tipo no soportado",disabled:!0,helperText:`Tipo de dato "${t.dataType}" no es soportado.`,fullWidth:!0})}};return e.jsxs("div",{className:"relative flex flex-col",children:[c&&e.jsx("div",{className:"mb-1",children:e.jsx(Ge,{color:"blue",label:"Modificado"})}),p()]})},mu=({parameters:t,editedValues:r,originalValues:n,validationErrors:s,onChange:a,onValidationError:o,fetcher:i,readOnly:l=!1})=>{const c=ou(t);return c.length===0?e.jsx("div",{className:"flex items-center justify-center py-12 text-content-secondary dark:text-dark-content-secondary text-sm",children:"No se encontraron parametros para mostrar."}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 p-4",children:c.map(u=>{const d=r.has(u.id)?r.get(u.id):n.get(u.id)??"",f=n.get(u.id)??"";return e.jsx(fu,{parameter:u,value:d,originalValue:f,onChange:a,onValidationError:o,validationError:s.get(u.id)||void 0,fetcher:i,readOnly:l},u.id)})})},hu=({changes:t,onConfirm:r,onCancel:n,onUndoChange:s,saving:a,confirmButtonText:o="Confirmar",cancelButtonText:i="Cancelar"})=>{const l=t.reduce((u,d)=>(u[d.categoryName]||(u[d.categoryName]=[]),u[d.categoryName].push(d),u),{}),c=e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-3.5 h-3.5",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})});return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:u=>{u.target===u.currentTarget&&n()},children:e.jsxs("div",{className:"bg-bg-primary dark:bg-dark-bg-primary rounded-2xl shadow-xl max-w-[640px] w-full mx-4 max-h-[80vh] flex flex-col",children:[e.jsxs("div",{className:"px-6 py-4 border-b border-border-primary dark:border-dark-border-primary",children:[e.jsx("h2",{className:"text-lg font-semibold text-content-primary dark:text-dark-content-primary",children:"Resumen de cambios"}),e.jsxs("p",{className:"text-sm text-content-secondary dark:text-dark-content-secondary mt-1",children:[t.length," ",t.length===1?"cambio pendiente":"cambios pendientes"]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:Object.entries(l).map(([u,d])=>e.jsxs("div",{className:"mb-6 last:mb-0",children:[e.jsx("h3",{className:"text-sm font-medium text-content-tertiary dark:text-dark-content-tertiary uppercase tracking-wider mb-3",children:u}),e.jsx("div",{className:"space-y-3",children:d.map(f=>{const h=na(f.oldValue,f.dataType,f.isSensitive,f.listOptions),p=na(f.newValue,f.dataType,f.isSensitive,f.listOptions);return e.jsxs("div",{className:"flex items-start justify-between gap-3 p-3 rounded-lg bg-background-secondary dark:bg-dark-bg-secondary",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-content-primary dark:text-dark-content-primary",children:f.parameterName}),e.jsxs("div",{className:"flex items-center gap-2 mt-1 text-sm",children:[e.jsx("span",{className:"text-content-secondary dark:text-dark-content-secondary line-through truncate",children:h||"(vacío)"}),e.jsx("span",{className:"text-content-tertiary dark:text-dark-content-tertiary",children:"→"}),e.jsx("span",{className:"text-content-primary dark:text-dark-content-primary font-medium truncate",children:p||"(vacío)"})]})]}),e.jsxs("button",{type:"button",onClick:()=>s(f.parameterId),"aria-label":`Quitar cambio en ${f.parameterName}`,className:`
|
|
1715
|
+
`}[n],a].join(" ").replace(/\s+/g," ").trim();return t.jsxs("div",{className:f,...i,children:[t.jsx("div",{className:"shrink-0 mt-0.5",children:s||t.jsx(ld,{className:"w-6 h-6"})}),t.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[t.jsx("h3",{className:"text-[18px] font-bold leading-[1.2] tracking-tight",children:e}),r&&t.jsx("p",{className:"text-sm font-normal leading-[1.4] opacity-90",children:r}),o&&t.jsx("div",{className:"mt-2",children:o})]})]})},fo="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2027.1.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%202000%202000'%20style='enable-background:new%200%200%202000%202000;'%20xml:space='preserve'%3e%3cpath%20style='fill:%23313131;'%20d='M1757.6,1550.49H268.703c-0.747,0-1.463-0.3-1.99-0.83c-0.528-0.53-0.825-1.24-0.825-1.99%20c0-0.74,0.297-1.46,0.825-1.99c0.527-0.53,1.243-0.82,1.99-0.82H1757.6c0.75,0,1.46,0.29,1.99,0.82c0.53,0.53,0.82,1.25,0.82,1.99%20c0,0.75-0.29,1.46-0.82,1.99C1759.06,1550.19,1758.35,1550.49,1757.6,1550.49z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1456.99,919.459c0,0,182.17,77.91,208.69,127.761c30.56,57.42-15.76,492.64-138.07,514.21%20c-122.32,21.57-519.71,38.71-519.71,38.71v-52.47l-73.628-52.64l59.356-143.71c0,0-126.503,100.07-183.877-48.01%20c-57.375-148.07-74.623-307.562-74.623-307.562L880.5,951.433l67.147,170.907c0,0,124.323-243.007,182.703-262.305%20c48.26-15.897,190.39,24.972,190.39,24.972l7.07,69.962L1456.99,919.459z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1007.9,1602.95c-0.35,0.01-0.71-0.06-1.04-0.2c-0.34-0.13-0.64-0.33-0.89-0.58%20c-0.28-0.26-0.5-0.58-0.65-0.93c-0.15-0.35-0.23-0.72-0.23-1.1v-51.07l-72.439-51.79c-0.519-0.37-0.898-0.9-1.074-1.51%20c-0.176-0.61-0.139-1.26,0.105-1.85l55.551-134.63c-17.811,11.87-62.103,36.71-105.967,24.77%20c-32.132-8.76-57.104-35.58-74.308-79.73c-56.518-146.41-74.532-306.69-74.532-308.288c-0.07-0.652,0.089-1.308,0.451-1.855%20s0.903-0.95,1.53-1.14l145.35-44.314c0.679-0.203,1.409-0.144,2.046,0.164c0.638,0.309,1.137,0.844,1.399,1.502l64.896,165.141%20c19.342-37.24,126.912-240.147,181.472-258.116c48.52-16.009,186.19,23.261,192.05,24.927c0.54,0.157,1.02,0.473,1.37,0.906%20c0.36,0.434,0.58,0.966,0.63,1.526l6.76,66.629l125.96-34.654c0.61-0.182,1.27-0.134,1.84,0.135%20c7.48,3.197,183.39,78.811,210.07,129.007c22.99,43.21,3.51,304.14-62.6,439.72c-22.99,47.12-49.06,73.58-77.48,78.58%20c-121.17,21.35-516.08,38.57-520.15,38.75H1007.9z%20M937.74,1494.04l71.81,51.34c0.35,0.25,0.65,0.59,0.85,0.98%20c0.2,0.39,0.31,0.83,0.32,1.27v49.54c36.59-1.62,401.12-18.22,516.39-38.53c26.55-4.68,51.23-30.08,73.38-75.5%20c28.62-58.66,51.95-150.24,64.16-251.21c10.4-86.89,9.84-162.3-1.38-183.4c-24.77-46.61-192.52-120.063-206.39-126.098%20l-128.35,35.262c-0.4,0.115-0.81,0.141-1.22,0.076c-0.4-0.065-0.79-0.22-1.13-0.453c-0.33-0.232-0.62-0.538-0.82-0.893%20c-0.21-0.355-0.33-0.752-0.37-1.161l-6.89-68.025c-16.73-4.684-142.91-38.978-186.89-24.499%20c-56.52,18.689-179.802,258.501-181.041,260.891c-0.245,0.48-0.626,0.88-1.095,1.16c-0.47,0.27-1.009,0.4-1.552,0.38%20c-0.543-0.03-1.067-0.21-1.508-0.53c-0.441-0.32-0.781-0.76-0.979-1.26l-66.246-168.5l-140.621,42.783%20c2.387,20.267,21.346,168.407,74.105,304.547c16.415,42.38,40.103,68.07,70.412,76.33c52.713,14.37,108.533-29.07,109.096-29.52%20c0.488-0.38,1.091-0.59,1.712-0.59c0.62,0,1.223,0.21,1.711,0.59c0.498,0.38,0.858,0.9,1.025,1.5s0.131,1.24-0.102,1.81%20L937.74,1494.04z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1252.38,839.048V410.046h-0.41c-86.98-5.899-180.81-9.119-278.608-9.119%20c-82.841,0-162.823,2.251-238.234,6.597h0.495v429.295h-0.27c75.343-4.279,155.235-6.598,238.009-6.598%20c97.948,0,191.918,3.243,279.018,9.142V839.048z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1252.38,842.201h-0.18c-89.26-6.057-183.07-9.187-278.837-9.187%20c-80.883,0-160.775,2.252-237.469,6.575h-0.405c-0.745,0.031-1.473-0.233-2.025-0.735c-0.552-0.501-0.884-1.2-0.925-1.945%20c-0.024-0.473,0.069-0.945,0.27-1.373V409.101c-0.305-0.42-0.489-0.916-0.531-1.434c-0.043-0.517,0.057-1.037,0.29-1.501%20c0.232-0.465,0.587-0.857,1.027-1.133c0.44-0.277,0.947-0.427,1.466-0.435C812.048,400.229,892.255,398,973.453,398%20c95.747,0,189.547,3.062,278.807,9.12h0.43c0.71,0.051,1.37,0.368,1.85,0.886c0.48,0.518,0.74,1.199,0.74,1.906v429.474%20c0.01,0.372-0.06,0.74-0.2,1.084c-0.14,0.345-0.35,0.657-0.61,0.92s-0.58,0.47-0.92,0.609c-0.34,0.139-0.71,0.208-1.08,0.202%20H1252.38z%20M973.363,827.429c94.817,0,187.727,3.018,276.197,9.007V412.681c-88.45-5.944-181.35-9.007-276.197-9.007%20c-79.982,0-158.996,2.252-234.924,6.418v423.755C814.367,829.591,893.403,827.429,973.363,827.429z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1119.73,667.758h-0.19c-43.45-2.95-89.12-4.504-135.73-4.504c-39.383,0-78.293,1.081-115.604,3.198%20h-0.203c-0.734,0.019-1.446-0.247-1.988-0.743c-0.542-0.495-0.87-1.182-0.917-1.914c-0.023-0.262-0.023-0.526,0-0.788V455.689%20c-0.14-0.321-0.224-0.664-0.247-1.013c-0.031-0.742,0.23-1.466,0.726-2.017c0.497-0.552,1.19-0.887,1.931-0.933%20c37.536-2.139,76.559-3.22,116.234-3.22c46.658,0,92.318,1.509,135.918,4.503c0.73,0.038,1.43,0.347,1.95,0.867%20c0.52,0.52,0.82,1.214,0.86,1.948v209.164c0.01,0.384-0.07,0.764-0.22,1.117c-0.15,0.353-0.38,0.67-0.66,0.932%20C1121.08,667.497,1120.42,667.753,1119.73,667.758z%20M983.81,657.67c45.67,0,90.43,1.441,133.1,4.256V458.414%20c-42.78-2.838-87.48-4.279-133.1-4.279c-38.46,0-76.559,1.036-113.015,3.04V660.71c36.569-2.004,74.555-3.04,113.038-3.04H983.81z'%20/%3e%3cpath%20style='fill:%23313131;'%20d='M867.756,660.057l93.582-142.783l52.152,86.918l49.04-41.613l57.22,102.365L867.756,660.057z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1119.73,667.759c-0.5-0.003-0.99-0.138-1.43-0.391c-0.43-0.253-0.78-0.615-1.03-1.05l-55.55-99.37%20l-46.43,39.383c-0.31,0.262-0.67,0.454-1.06,0.563c-0.39,0.108-0.79,0.132-1.19,0.068c-0.4-0.07-0.79-0.225-1.12-0.454%20c-0.34-0.229-0.63-0.527-0.84-0.875l-49.832-83.066L870.12,661.589c-0.198,0.32-0.457,0.598-0.764,0.816%20c-0.306,0.219-0.653,0.374-1.021,0.455c-0.367,0.082-0.747,0.09-1.117,0.022c-0.371-0.067-0.724-0.209-1.038-0.415%20c-0.315-0.206-0.585-0.474-0.795-0.786c-0.209-0.313-0.354-0.664-0.426-1.033c-0.071-0.37-0.068-0.75,0.01-1.118%20c0.078-0.368,0.229-0.717,0.444-1.026l93.583-142.76c0.255-0.406,0.611-0.737,1.034-0.962c0.422-0.226,0.897-0.336,1.375-0.322%20c0.478,0.014,0.944,0.146,1.357,0.386c0.413,0.24,0.759,0.58,1.007,0.988l50.441,84.057l46.5-39.338%20c0.31-0.265,0.69-0.458,1.09-0.564c0.4-0.106,0.82-0.123,1.22-0.05c0.41,0.073,0.8,0.234,1.14,0.473%20c0.34,0.238,0.62,0.548,0.83,0.907l57.21,102.364c0.19,0.322,0.3,0.677,0.35,1.044c0.04,0.367,0.01,0.74-0.09,1.096%20c-0.1,0.357-0.27,0.689-0.5,0.979s-0.51,0.531-0.84,0.709C1120.69,667.715,1120.2,667.801,1119.73,667.759z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1026.53,535.897c10.28,0,18.62-8.337,18.62-18.622c0-10.284-8.34-18.622-18.62-18.622%20c-10.29,0-18.63,8.338-18.63,18.622C1007.9,527.56,1016.24,535.897,1026.53,535.897z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1026.53,538.712c-4.24,0-8.39-1.257-11.91-3.613c-3.53-2.355-6.28-5.703-7.9-9.62%20c-1.62-3.917-2.05-8.227-1.22-12.386c0.83-4.158,2.87-7.978,5.87-10.976c3-2.997,6.82-5.039,10.97-5.866%20c4.16-0.827,8.47-0.403,12.39,1.22c3.92,1.622,7.26,4.37,9.62,7.895s3.61,7.67,3.61,11.909c0,5.684-2.26,11.133-6.28,15.152%20C1037.66,536.446,1032.21,538.706,1026.53,538.712z%20M1026.53,501.468c-3.12,0-6.17,0.925-8.76,2.657%20c-2.59,1.732-4.61,4.193-5.81,7.073c-1.19,2.881-1.5,6.05-0.89,9.107c0.6,3.058,2.11,5.867,4.31,8.071%20c2.2,2.204,5.01,3.706,8.07,4.314c3.06,0.608,6.23,0.296,9.11-0.897c2.88-1.193,5.34-3.214,7.07-5.806s2.66-5.639,2.66-8.757%20c0-4.18-1.66-8.189-4.62-11.145C1034.72,503.129,1030.71,501.468,1026.53,501.468z'/%3e%3cpath%20style='fill:%23313131;'%20d='M800.338,708.717c-0.746,0.018-1.469-0.262-2.01-0.777c-0.54-0.515-0.854-1.224-0.872-1.97%20c-0.018-0.747,0.261-1.47,0.777-2.01c0.515-0.541,1.224-0.855,1.97-0.872c1.329,0,134.812-6.598,386.647,0%20c0.37,0.008,0.73,0.09,1.07,0.239c0.34,0.15,0.64,0.365,0.9,0.632c0.26,0.268,0.46,0.583,0.59,0.928%20c0.13,0.345,0.2,0.713,0.19,1.083c-0.01,0.371-0.08,0.738-0.23,1.079s-0.36,0.649-0.63,0.905c-0.27,0.257-0.59,0.456-0.94,0.587%20c-0.34,0.131-0.71,0.191-1.09,0.176c-251.605-6.575-384.908,0-386.214,0H800.338z'/%3e%3cpath%20style='fill:%23313131;'%20d='M800.542,749.002c-0.747,0.018-1.47-0.261-2.01-0.777c-0.541-0.515-0.855-1.224-0.872-1.97%20c-0.018-0.747,0.261-1.47,0.776-2.01c0.515-0.541,1.224-0.854,1.971-0.872c1.306,0,134.811-6.598,386.643,0%20c0.37,0.008,0.74,0.09,1.07,0.24c0.34,0.15,0.64,0.365,0.9,0.633c0.25,0.268,0.45,0.583,0.58,0.928%20c0.13,0.345,0.19,0.712,0.18,1.081c0,0.372-0.08,0.741-0.22,1.083c-0.15,0.343-0.36,0.652-0.63,0.909%20c-0.27,0.257-0.59,0.456-0.94,0.586s-0.72,0.187-1.09,0.169c-251.592-6.598-384.895,0-386.223,0H800.542z'/%3e%3cpath%20style='fill:%23313131;'%20d='M800.542,789.263c-0.747,0.018-1.47-0.262-2.01-0.777c-0.541-0.515-0.855-1.224-0.872-1.97%20c-0.018-0.747,0.261-1.47,0.776-2.01c0.515-0.541,1.224-0.855,1.971-0.873c1.306,0,134.811-6.597,386.643,0%20c0.37,0.009,0.74,0.091,1.07,0.241c0.34,0.15,0.64,0.365,0.9,0.633c0.25,0.268,0.45,0.583,0.58,0.928%20c0.13,0.345,0.19,0.712,0.18,1.081c0,0.373-0.07,0.743-0.22,1.087c-0.14,0.344-0.36,0.654-0.63,0.912%20c-0.27,0.258-0.59,0.457-0.94,0.586c-0.35,0.128-0.72,0.183-1.09,0.162c-251.592-6.575-384.895,0-386.223,0H800.542z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M151.814,984.759c0-58.14,170.727-108.781,423.057-135.104h-0.225V420.293h-0.675%20c-251.835,26.39-422.157,76.987-422.157,135.104V984.759z'/%3e%3cpath%20style='fill:%23313131;'%20d='M151.815,987.574c-0.747,0-1.463-0.297-1.991-0.824c-0.527-0.528-0.824-1.244-0.824-1.991V555.42%20c0-58.545,158.748-109.975,424.678-137.852h0.698c0.404-0.053,0.814-0.018,1.203,0.102c0.389,0.121,0.747,0.324,1.049,0.596%20c0.29,0.267,0.521,0.591,0.68,0.951c0.159,0.36,0.242,0.75,0.243,1.143v428.191c0.113,0.242,0.181,0.501,0.203,0.766%20c0.076,0.74-0.145,1.48-0.613,2.058c-0.469,0.578-1.147,0.947-1.886,1.027c-125.783,13.128-231.457,32.335-305.584,55.528%20c-75.186,23.53-114.839,50.079-114.839,76.807c0.004,0.389-0.073,0.775-0.225,1.133c-0.153,0.358-0.378,0.68-0.661,0.947%20c-0.284,0.267-0.62,0.472-0.987,0.602C152.593,987.549,152.203,987.602,151.815,987.574z%20M571.832,423.423%20c-124.476,13.15-228.957,32.245-302.544,55.28c-75.028,23.508-114.659,50.034-114.659,76.717v410.447%20c30.286-50.394,181.401-93.898,417.203-118.734V423.423z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M182.754,859.876c0-35.825,79.216-67.011,196.284-83.314l-0.315-268.115%20c-116.843,16.258-195.902,51.07-195.902,86.85L182.754,859.876z'/%3e%3cpath%20style='fill:%23313131;'%20d='M182.753,862.693c-0.37,0.003-0.738-0.068-1.08-0.209c-0.343-0.14-0.655-0.347-0.917-0.609%20c-0.262-0.262-0.469-0.574-0.609-0.916c-0.141-0.343-0.211-0.711-0.208-1.081V595.366c0-37.694,77.842-72.866,198.31-89.642%20c0.398-0.051,0.802-0.017,1.186,0.1s0.739,0.313,1.041,0.577s0.545,0.589,0.712,0.954c0.168,0.364,0.256,0.76,0.259,1.161%20l0.315,267.349v0.338c0.103,0.74-0.089,1.491-0.536,2.089c-0.447,0.599-1.112,0.997-1.851,1.109%20c-117.766,16.347-193.852,47.917-193.852,80.477c0,0.739-0.29,1.448-0.809,1.974C184.196,862.379,183.492,862.681,182.753,862.693z%20M375.818,511.759c-112.182,16.055-190.25,50.281-190.25,83.607v247.286c19.32-29.092,87.48-53.929,190.565-68.475L375.818,511.759z%20'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M151.814,984.759c0,26.211,34.722,50.911,95.992,72.531h-0.248V627.858l0.698,0.248%20c-61.562-21.662-96.442-46.408-96.442-72.686V984.759z'/%3e%3cpath%20style='fill:%23313131;'%20d='M247.806,1060.1c-0.322,0-0.642-0.05-0.945-0.16C181.92,1037.02,149,1011.73,149,984.759v-429.34%20c0-0.746,0.297-1.462,0.824-1.99c0.528-0.528,1.244-0.825,1.991-0.825c0.746,0,1.462,0.297,1.99,0.825%20c0.528,0.528,0.824,1.244,0.824,1.99c0,23.936,32.403,48.03,93.695,69.804h0.18l0.698,0.248c0.701,0.25,1.274,0.766,1.594,1.437%20c0.321,0.671,0.363,1.441,0.118,2.143c-0.126,0.337-0.308,0.649-0.541,0.923v426.186c0.261,0.67,0.261,1.42,0,2.1%20c-0.191,0.53-0.538,0.99-0.997,1.32C248.918,1059.91,248.371,1060.09,247.806,1060.1z%20M154.629,574.446v410.313%20c0,23.461,31.142,47.081,90.07,68.451V629.884C196.512,612.613,166.383,594.059,154.629,574.446z'/%3e%3cpath%20style='fill:%23313131;'%20d='M430.175,770.752c-0.745-0.006-1.457-0.304-1.984-0.831c-0.526-0.526-0.825-1.239-0.831-1.984%20v-88.921c-0.005-0.685,0.243-1.349,0.695-1.864c0.453-0.515,1.079-0.845,1.76-0.928l118.712-15.92%20c0.401-0.053,0.81-0.021,1.198,0.096c0.388,0.116,0.747,0.314,1.053,0.58c0.299,0.265,0.538,0.591,0.701,0.956%20c0.163,0.365,0.247,0.761,0.245,1.16v88.539c-0.004,0.679-0.251,1.335-0.698,1.847c-0.446,0.513-1.061,0.848-1.734,0.945%20l-118.712,16.28L430.175,770.752z%20M432.945,681.471v83.314l113.082-15.514v-82.887L432.945,681.471z'/%3e%3cpath%20style='fill:%23313131;'%20d='M487.28,747.043c-0.4,0.001-0.796-0.082-1.161-0.245c-0.365-0.163-0.691-0.402-0.956-0.701%20l-26.818-30.174c-0.433-0.565-0.635-1.274-0.566-1.983s0.405-1.366,0.939-1.837c0.534-0.471,1.227-0.723,1.939-0.703%20c0.713,0.019,1.391,0.308,1.898,0.808l24.049,27.134l25.647-51.79c0.332-0.672,0.917-1.185,1.626-1.426%20c0.709-0.24,1.485-0.189,2.157,0.142s1.185,0.916,1.425,1.626c0.241,0.709,0.19,1.485-0.141,2.157l-27.517,55.483%20c-0.216,0.423-0.536,0.786-0.93,1.053c-0.393,0.268-0.848,0.432-1.321,0.478L487.28,747.043z'/%3e%3cpath%20style='fill:%23313131;'%20d='M412.003,521.35c-0.686,0.003-1.35-0.244-1.867-0.695c-0.516-0.452-0.85-1.076-0.939-1.757%20c-0.088-0.68,0.075-1.369,0.459-1.938c0.384-0.568,0.962-0.977,1.626-1.149c41.983-10.096,84.624-17.229,127.606-21.347%20c0.369-0.035,0.74,0.002,1.094,0.11s0.682,0.285,0.968,0.52c0.285,0.235,0.522,0.525,0.695,0.851%20c0.174,0.327,0.282,0.684,0.317,1.052c0.036,0.369-0.002,0.74-0.11,1.094c-0.108,0.354-0.285,0.682-0.52,0.968%20c-0.235,0.285-0.524,0.522-0.851,0.695c-0.326,0.174-0.684,0.282-1.052,0.317c-42.694,4.085-85.049,11.166-126.751,21.189%20C412.458,521.318,412.231,521.348,412.003,521.35z'/%3e%3cpath%20style='fill:%23313131;'%20d='M412.003,568.863c-0.686,0.003-1.35-0.244-1.867-0.695c-0.516-0.452-0.85-1.077-0.939-1.757%20c-0.088-0.68,0.075-1.369,0.459-1.938c0.384-0.569,0.962-0.977,1.626-1.15c41.983-10.095,84.624-17.228,127.606-21.346%20c0.744-0.072,1.485,0.155,2.062,0.63c0.576,0.475,0.94,1.16,1.012,1.903c0.072,0.744-0.155,1.485-0.63,2.062%20c-0.475,0.576-1.16,0.94-1.903,1.012c-42.694,4.085-85.049,11.165-126.751,21.189C412.458,568.831,412.231,568.861,412.003,568.863z%20'/%3e%3cpath%20style='fill:%23313131;'%20d='M412.003,617.095c-0.686,0.004-1.35-0.244-1.867-0.695c-0.516-0.452-0.85-1.076-0.939-1.756%20c-0.088-0.681,0.075-1.37,0.459-1.939c0.384-0.568,0.962-0.977,1.626-1.149c41.981-10.109,84.622-17.242,127.606-21.347%20c0.369-0.035,0.74,0.002,1.094,0.11c0.354,0.108,0.682,0.285,0.968,0.52c0.285,0.236,0.522,0.525,0.695,0.851%20c0.174,0.327,0.282,0.684,0.317,1.052c0.036,0.369-0.002,0.74-0.11,1.094c-0.108,0.354-0.285,0.683-0.52,0.968%20c-0.235,0.285-0.524,0.522-0.851,0.695c-0.326,0.174-0.684,0.282-1.052,0.317c-42.696,4.072-85.052,11.153-126.751,21.189%20C412.456,617.053,412.23,617.083,412.003,617.095z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1847.15,984.759c0-58.14-170.73-108.781-423.06-135.104h0.21V420.293h0.67%20c251.84,26.39,422.18,76.987,422.18,135.104V984.759z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,987.574c-0.75,0-1.46-0.297-1.99-0.825c-0.53-0.527-0.82-1.243-0.82-1.99%20c0-26.728-39.75-53.276-114.84-76.807c-74.15-23.148-179.69-42.355-305.41-55.505h-0.38c-0.71-0.122-1.36-0.505-1.8-1.076%20c-0.45-0.571-0.66-1.287-0.61-2.009c0-0.158,0-0.315,0-0.45V420.293c0-0.394,0.09-0.783,0.25-1.142c0.16-0.36,0.39-0.681,0.68-0.945%20c0.3-0.263,0.64-0.462,1.02-0.583c0.37-0.122,0.77-0.163,1.16-0.122h0.67c265.93,27.876,424.71,79.396,424.71,137.851v429.407%20c0,0.716-0.27,1.406-0.76,1.929S1847.87,987.528,1847.15,987.574z%20M1427.11,847.11c235.8,24.769,386.92,68.341,417.23,118.734%20V555.42c0-26.683-39.66-53.209-114.69-76.717c-73.47-23.035-178.04-42.13-302.54-55.28V847.11z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,987.574c-0.75,0-1.46-0.297-1.99-0.825c-0.53-0.527-0.82-1.243-0.82-1.99%20c0-26.728-39.75-53.276-114.84-76.807c-74.15-23.148-179.69-42.355-305.41-55.505h-0.38c-0.71-0.122-1.36-0.505-1.8-1.076%20c-0.45-0.571-0.66-1.287-0.61-2.009c0-0.158,0-0.315,0-0.45V420.293c0-0.394,0.09-0.783,0.25-1.142c0.16-0.36,0.39-0.681,0.68-0.945%20c0.3-0.263,0.64-0.462,1.02-0.583c0.37-0.122,0.77-0.163,1.16-0.122h0.67c265.93,27.876,424.71,79.396,424.71,137.851v429.407%20c0,0.716-0.27,1.406-0.76,1.929S1847.87,987.528,1847.15,987.574z%20M1427.11,847.11c235.8,24.769,386.92,68.341,417.23,118.734%20V555.42c0-26.683-39.66-53.209-114.69-76.717c-73.47-23.035-178.04-42.13-302.54-55.28V847.11z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,987.574c-0.75,0-1.46-0.297-1.99-0.825c-0.53-0.527-0.82-1.243-0.82-1.99%20c0-26.728-39.75-53.276-114.84-76.807c-74.15-23.148-179.69-42.355-305.41-55.505h-0.38c-0.71-0.122-1.36-0.505-1.8-1.076%20c-0.45-0.571-0.66-1.287-0.61-2.009c0-0.158,0-0.315,0-0.45V420.293c0-0.394,0.09-0.783,0.25-1.142c0.16-0.36,0.39-0.681,0.68-0.945%20c0.3-0.263,0.64-0.462,1.02-0.583c0.37-0.122,0.77-0.163,1.16-0.122h0.67c265.93,27.876,424.71,79.396,424.71,137.851v429.407%20c0,0.716-0.27,1.406-0.76,1.929S1847.87,987.528,1847.15,987.574z%20M1427.11,847.11c235.8,24.769,386.92,68.341,417.23,118.734%20V555.42c0-26.683-39.66-53.209-114.69-76.717c-73.47-23.035-178.04-42.13-302.54-55.28V847.11z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,951.433c0-43.503-62.8-81.423-155.62-101.148V529.029h0.25%20c92.64,19.748,155.37,57.622,155.37,101.081V951.433z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1847.15,954.247c-0.75,0-1.46-0.296-1.99-0.824c-0.53-0.528-0.83-1.244-0.83-1.99%20c0-40.532-58.7-78.226-153.11-98.356h-0.14c-0.72-0.143-1.35-0.557-1.77-1.157c-0.42-0.601-0.59-1.34-0.48-2.063V529.029%20c-0.01-0.43,0.07-0.857,0.25-1.247c0.18-0.391,0.45-0.735,0.79-1.005c0.32-0.264,0.7-0.454,1.11-0.555s0.84-0.111,1.25-0.031h0.25%20c97.16,20.716,157.62,60.505,157.62,103.828v321.414c0,0.381-0.08,0.758-0.23,1.109s-0.37,0.667-0.64,0.93%20c-0.28,0.264-0.6,0.468-0.96,0.601S1847.53,954.266,1847.15,954.247z%20M1694.41,848.033c78.81,17.091,132.99,46.769,149.92,80.635%20V630.087c0-40.059-57.35-77.347-149.92-97.636V848.033z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1847.15,984.759c0,26.211-34.72,50.911-95.99,72.531h0.25V627.858l-0.7,0.248%20c61.54-21.662,96.44-46.408,96.44-72.686V984.759z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1751.16,1060.1c-0.58,0.01-1.14-0.17-1.61-0.5c-0.48-0.33-0.83-0.8-1.03-1.34%20c-0.14-0.34-0.21-0.69-0.21-1.05s0.07-0.72,0.21-1.05V629.974c-0.24-0.268-0.42-0.582-0.54-0.923c-0.24-0.699-0.2-1.467,0.11-2.137%20c0.32-0.67,0.89-1.189,1.58-1.443l0.72-0.248h0.16c61.31-21.707,93.72-45.8,93.72-69.804c0-0.746,0.29-1.462,0.82-1.99%20c0.53-0.528,1.25-0.825,1.99-0.825c0.75,0,1.46,0.297,1.99,0.825c0.53,0.528,0.83,1.244,0.83,1.99v429.34%20c0,27.021-32.92,52.261-97.86,75.181C1751.75,1060.04,1751.46,1060.1,1751.16,1060.1z%20M1754.22,629.862v423.328%20c58.97-21.37,90.07-45.04,90.07-68.454v-410.29C1832.56,594.059,1802.41,612.613,1754.22,629.862z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,531.777c-0.25-0.006-0.51-0.044-0.76-0.113c-100.97-28.664-207.16-38.122-208.27-38.279%20c-0.73-0.077-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.302-0.63-2.039c0.07-0.736,0.42-1.417,0.98-1.895%20c0.56-0.479,1.29-0.718,2.03-0.664c1.06,0,107.81,9.615,209.3,38.415c0.67,0.172,1.25,0.585,1.63,1.158%20c0.39,0.574,0.55,1.268,0.45,1.952c-0.09,0.684-0.43,1.31-0.96,1.757c-0.52,0.448-1.2,0.687-1.89,0.672V531.777z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,583.363c-0.26,0.007-0.51-0.031-0.76-0.113c-100.97-28.642-207.16-38.122-208.27-38.279%20c-0.73-0.077-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.303-0.63-2.039c0.07-0.736,0.42-1.417,0.98-1.896%20c0.56-0.478,1.29-0.717,2.03-0.663c1.06,0,107.81,9.592,209.3,38.415c0.65,0.189,1.21,0.605,1.57,1.172%20c0.37,0.567,0.52,1.247,0.43,1.917c-0.09,0.669-0.42,1.282-0.93,1.728s-1.16,0.694-1.84,0.699V583.363z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,634.86c-0.25,0.031-0.51,0.031-0.76,0c-100.97-28.665-207.16-38.145-208.27-38.28%20c-0.73-0.076-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.302-0.63-2.038c0.07-0.736,0.42-1.417,0.98-1.896%20c0.56-0.479,1.29-0.717,2.03-0.664c1.06,0,107.81,9.615,209.3,38.415c0.65,0.189,1.21,0.605,1.57,1.172%20c0.37,0.567,0.52,1.248,0.43,1.917s-0.42,1.283-0.93,1.728c-0.51,0.446-1.16,0.694-1.84,0.7V634.86z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,686.651c-0.25,0.031-0.51,0.031-0.76,0c-100.97-28.664-207.16-38.122-208.27-38.279%20c-0.74-0.066-1.43-0.426-1.91-1c-0.49-0.574-0.72-1.316-0.65-2.063c0.06-0.746,0.42-1.436,1-1.917c0.57-0.482,1.31-0.715,2.06-0.65%20c1.06,0.113,107.81,9.615,209.3,38.438c0.65,0.189,1.21,0.605,1.57,1.172c0.37,0.567,0.52,1.247,0.43,1.917%20c-0.09,0.669-0.42,1.282-0.93,1.728s-1.16,0.694-1.84,0.699V686.651z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1665.68,738.149c-0.26,0.007-0.52-0.031-0.76-0.113c-100.97-28.642-207.16-38.122-208.27-38.279%20c-0.37-0.027-0.73-0.128-1.07-0.297c-0.33-0.169-0.62-0.402-0.87-0.686c-0.24-0.285-0.42-0.614-0.53-0.97%20c-0.12-0.356-0.16-0.73-0.13-1.102c0.04-0.372,0.14-0.734,0.32-1.064c0.17-0.33,0.41-0.623,0.7-0.86%20c0.28-0.238,0.62-0.415,0.97-0.523c0.36-0.108,0.74-0.144,1.11-0.105c1.06,0,107.81,9.592,209.3,38.415%20c0.65,0.189,1.21,0.605,1.57,1.172c0.37,0.567,0.52,1.247,0.43,1.917c-0.09,0.669-0.43,1.282-0.93,1.728%20c-0.51,0.446-1.16,0.694-1.84,0.699V738.149z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,789.757c-0.25-0.006-0.51-0.043-0.76-0.112c-100.97-28.665-207.16-38.145-208.27-38.28%20c-0.73-0.076-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.302-0.63-2.038c0.07-0.736,0.42-1.417,0.98-1.896%20c0.56-0.479,1.29-0.717,2.03-0.664c1.06,0,107.81,9.615,209.3,38.415c0.67,0.173,1.25,0.585,1.63,1.159%20c0.39,0.573,0.55,1.268,0.45,1.952c-0.09,0.684-0.43,1.309-0.96,1.757c-0.52,0.447-1.2,0.687-1.89,0.671V789.757z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1663.99,841.345c-0.25-0.006-0.51-0.043-0.76-0.112c-100.97-28.665-207.16-38.122-208.27-38.28%20c-0.73-0.076-1.41-0.439-1.88-1.009c-0.47-0.57-0.69-1.302-0.63-2.038c0.07-0.736,0.42-1.417,0.98-1.896%20c0.56-0.479,1.29-0.717,2.03-0.664c1.06,0,107.81,9.593,209.3,38.415c0.65,0.189,1.21,0.605,1.57,1.172%20c0.37,0.568,0.52,1.248,0.43,1.917c-0.09,0.669-0.42,1.283-0.93,1.729c-0.51,0.445-1.16,0.693-1.84,0.699V841.345z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1353.64,725.516c11.45,0,20.73-14.174,20.73-31.659s-9.28-31.66-20.73-31.66%20c-11.46,0-20.74,14.175-20.74,31.66S1342.18,725.516,1353.64,725.516z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1353.66,728.308c-12.99,0-23.55-15.447-23.58-34.452c0-19.005,10.56-34.474,23.56-34.474%20c12.99,0,23.55,15.469,23.55,34.451c0.16,8.439-2.11,16.746-6.53,23.936C1366.16,724.525,1360.17,728.308,1353.66,728.308z%20M1335.64,693.856c0,15.627,8.22,28.822,18.02,28.822c4.5,0,9.01-2.837,12.29-7.993c3.83-6.262,5.78-13.492,5.61-20.829%20c0-15.65-8.22-28.845-18.01-28.845c-9.71,0-18.02,13.218-18.02,28.845H1335.64z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1320.74,885.051l7.07,69.961l129.18-35.555l52.08-176.244l-137.08-38.392L1320.74,885.051z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1327.81,957.828c-0.57-0.005-1.13-0.177-1.6-0.495c-0.34-0.233-0.62-0.538-0.82-0.892%20c-0.21-0.354-0.34-0.749-0.37-1.158l-7.14-69.939c-0.08-0.348-0.08-0.71,0-1.058l51.25-180.139c0.2-0.716,0.68-1.321,1.33-1.684%20c0.65-0.363,1.42-0.454,2.14-0.253l137.08,38.393c0.36,0.095,0.7,0.263,0.99,0.492c0.3,0.229,0.54,0.515,0.72,0.841%20c0.18,0.326,0.3,0.685,0.34,1.055c0.03,0.371,0,0.746-0.11,1.102l-51.88,176.176c-0.14,0.458-0.39,0.874-0.73,1.209%20c-0.35,0.335-0.77,0.577-1.23,0.705l-129.18,35.532C1328.34,957.79,1328.08,957.828,1327.81,957.828z%20M1323.6,885.322l6.75,66.088%20l124.46-34.248l50.75-171.966l-131.61-36.906L1323.6,885.322z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1344,804.822c0,0,27.24-14.501,75.32,0c26.52,8.017-0.9-54.379-0.9-54.379l-54.9-15.357%20L1344,804.822z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1423.53,808.357c-1.71-0.027-3.4-0.308-5.02-0.833c-46.23-13.96-72.93-0.36-73.2-0.225%20c-0.49,0.264-1.04,0.378-1.59,0.326c-0.55-0.053-1.07-0.268-1.5-0.618c-0.42-0.348-0.74-0.813-0.9-1.337%20c-0.17-0.524-0.17-1.085-0.02-1.613l19.52-69.804c0.1-0.357,0.27-0.69,0.49-0.982c0.23-0.291,0.52-0.535,0.84-0.717%20c0.32-0.181,0.67-0.298,1.04-0.343c0.37-0.045,0.74-0.017,1.1,0.083l54.92,15.469c0.4,0.113,0.77,0.313,1.08,0.585%20c0.32,0.272,0.57,0.611,0.74,0.991c3.29,7.476,19.19,45.283,9.66,56.046c-0.9,0.998-2,1.782-3.24,2.296%20C1426.21,808.195,1424.87,808.426,1423.53,808.357z%20M1378.29,795.523c14.2,0.141,28.29,2.372,41.84,6.62%20c3.06,0.923,5.18,0.765,6.31-0.496c5.13-5.809-2.66-31.524-10.07-48.817l-50.89-14.254l-17.23,61.473%20C1357.95,796.905,1368.1,795.376,1378.29,795.523z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1354.22,667.691l-9.32,41.905c-2.22,9.824-2.49,19.99-0.78,29.917%20c1.72,9.926,5.37,19.416,10.76,27.928c5.38,8.511,12.4,15.876,20.63,21.673c8.24,5.796,17.54,9.91,27.37,12.105l13.76,3.108%20c9.82,2.208,19.99,2.46,29.91,0.74c9.92-1.72,19.41-5.378,27.92-10.764c8.5-5.387,15.87-12.396,21.67-20.629%20c5.8-8.233,9.92-17.527,12.12-27.352l9.44-41.928c4.7-20.967,0.89-42.943-10.61-61.099c-11.49-18.156-29.72-31.006-50.68-35.725%20l-5.3-1.194c-10.38-2.338-21.13-2.607-31.62-0.791c-10.5,1.816-20.53,5.682-29.52,11.376c-9,5.694-16.79,13.105-22.92,21.809%20C1360.91,647.474,1356.56,657.302,1354.22,667.691z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1432.56,808.786c-5.97,0.002-11.92-0.662-17.74-1.982l-11.51-2.589%20c-10.33-2.319-20.11-6.65-28.77-12.748c-8.66-6.098-16.03-13.842-21.69-22.789c-5.67-8.948-9.52-18.925-11.32-29.36%20c-1.81-10.434-1.54-21.123,0.78-31.455l9.16-40.802c4.88-21.689,18.17-40.553,36.95-52.444c18.79-11.891,41.52-15.835,63.21-10.965%20l5.32,1.194c21.67,4.902,40.52,18.201,52.41,36.981c11.89,18.78,15.84,41.508,10.99,63.199l-9.16,40.778%20c-4.25,18.894-15.15,35.629-30.71,47.152c-0.6,0.385-1.33,0.529-2.03,0.401c-0.7-0.127-1.33-0.516-1.75-1.088%20c-0.43-0.571-0.62-1.283-0.54-1.991c0.08-0.709,0.42-1.361,0.96-1.826c14.48-10.716,24.63-26.286,28.58-43.863l9.16-40.779%20c4.52-20.235,0.84-41.437-10.25-58.955c-11.09-17.519-28.68-29.923-48.9-34.493l-5.29-1.193c-10.02-2.252-20.39-2.508-30.51-0.754%20c-10.12,1.754-19.79,5.484-28.47,10.977c-8.68,5.493-16.19,12.641-22.1,21.036c-5.92,8.396-10.12,17.874-12.37,27.894l-9.17,40.847%20c-2.16,9.612-2.4,19.555-0.72,29.263c1.68,9.707,5.26,18.988,10.53,27.313c5.27,8.324,12.12,15.529,20.18,21.202%20c8.05,5.674,17.15,9.705,26.76,11.863l11.5,2.568c13.56,3.061,27.69,2.281,40.83-2.252c0.35-0.137,0.73-0.201,1.11-0.19%20c0.37,0.012,0.74,0.1,1.09,0.259c0.34,0.159,0.65,0.385,0.9,0.665c0.26,0.28,0.45,0.609,0.58,0.966%20c0.12,0.357,0.17,0.736,0.15,1.113c-0.03,0.377-0.13,0.745-0.3,1.083c-0.17,0.337-0.41,0.636-0.7,0.88%20c-0.29,0.244-0.62,0.427-0.99,0.538C1450.31,807.335,1441.46,808.803,1432.56,808.786z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1354.22,667.69c0,0,11.91-19.636,23.37-26.751c11.47-7.116,92.87,13.308,99.55,18.802%20c5.77,4.751,9.89,13.195,12.5,29.881c2.86,18.351,25.45,25.985,25.45,25.985l2.52-11.259l19.41-80.838%20c0.12-0.513,0.14-1.046,0.05-1.566c-0.08-0.521-0.27-1.02-0.55-1.466c-0.28-0.447-0.65-0.833-1.08-1.136%20c-0.44-0.303-0.92-0.516-1.44-0.628l-153.07-33.393c-0.99-0.215-2.03-0.043-2.89,0.48c-0.87,0.523-1.5,1.359-1.77,2.335%20L1354.22,667.69z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1515.09,718.422c-0.31,0.001-0.61-0.045-0.9-0.135c-0.99-0.338-24.23-8.422-27.34-28.237%20c-2.25-14.816-5.85-23.486-11.51-28.147c-6.05-4.976-86.46-24.634-96.28-18.554c-10.76,6.755-22.32,25.602-22.52,25.782%20c-0.34,0.615-0.89,1.081-1.56,1.306c-0.66,0.225-1.39,0.194-2.03-0.088c-0.65-0.282-1.16-0.794-1.45-1.436%20c-0.28-0.642-0.31-1.367-0.09-2.033l22.06-79.554c0.46-1.678,1.55-3.115,3.04-4.012c1.48-0.898,3.26-1.187,4.96-0.807l153.12,33.461%20c0.88,0.19,1.72,0.556,2.46,1.076c0.73,0.519,1.36,1.182,1.84,1.948s0.8,1.621,0.94,2.513c0.14,0.892,0.11,1.804-0.11,2.682%20l-19.41,80.815l-2.5,11.258c-0.09,0.383-0.26,0.744-0.49,1.058c-0.24,0.314-0.54,0.575-0.88,0.766%20C1516.02,718.312,1515.56,718.428,1515.09,718.422z%20M1386.38,636.819c26.3,0,87.25,16.392,92.54,20.738%20c6.76,5.607,10.97,15.357,13.51,31.637c1.99,12.655,14.8,19.861,20.65,22.518l1.8-7.949l19.41-80.882%20c0.04-0.148,0.05-0.302,0.03-0.453c-0.03-0.151-0.08-0.296-0.16-0.426c-0.08-0.127-0.19-0.237-0.31-0.322s-0.26-0.144-0.41-0.173%20l-153.12-33.483c-0.29-0.057-0.59-0.002-0.84,0.152c-0.25,0.155-0.43,0.398-0.51,0.681l-17.72,64.017%20c4.16-5.516,9.18-10.334,14.86-14.276C1379.33,637.169,1382.86,636.558,1386.38,636.819z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1418.49,711.871h-0.61l-23.26-5.224c-0.49-0.107-0.93-0.34-1.3-0.676%20c-0.36-0.337-0.63-0.764-0.77-1.238c-0.32-0.968-1.26-3.941,10.13-32.02c0.28-0.693,0.82-1.246,1.51-1.537%20c0.69-0.291,1.47-0.297,2.16-0.017c0.69,0.281,1.25,0.825,1.54,1.514c0.29,0.688,0.29,1.464,0.01,2.157%20c-3.68,8.778-6.9,17.745-9.63,26.863l20.85,4.684c0.67,0.151,1.27,0.547,1.68,1.113c0.4,0.566,0.58,1.261,0.5,1.951%20c-0.08,0.69-0.41,1.327-0.93,1.788s-1.19,0.714-1.88,0.709V711.871z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1448.86,687.056c-0.63-0.005-1.24-0.217-1.73-0.603c-0.5-0.387-0.86-0.927-1.01-1.536%20c-3.72-14.907-20.27-16.46-21.08-16.506c-0.74-0.063-1.43-0.418-1.91-0.988c-0.49-0.57-0.72-1.308-0.66-2.051%20c0.03-0.369,0.13-0.728,0.29-1.057c0.17-0.33,0.4-0.623,0.68-0.862c0.28-0.239,0.61-0.42,0.96-0.531s0.72-0.151,1.09-0.117%20c0.22,0,21.39,1.869,26.1,20.738c0.09,0.359,0.11,0.733,0.05,1.1c-0.05,0.367-0.18,0.719-0.37,1.037%20c-0.19,0.318-0.44,0.595-0.74,0.816c-0.29,0.221-0.63,0.38-0.99,0.47C1449.32,687.018,1449.09,687.048,1448.86,687.056z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1379.31,671.97c-0.53,0-1.04-0.146-1.48-0.421c-0.45-0.274-0.81-0.667-1.04-1.135%20c-0.24-0.468-0.33-0.991-0.29-1.512c0.05-0.52,0.24-1.017,0.55-1.436c9.01-11.889,26.06-9.322,26.78-9.209%20c0.36,0.057,0.71,0.186,1.03,0.379c0.31,0.193,0.59,0.447,0.81,0.746c0.21,0.299,0.37,0.638,0.46,0.997%20c0.08,0.36,0.1,0.733,0.04,1.098c-0.06,0.365-0.19,0.715-0.38,1.031c-0.19,0.315-0.45,0.589-0.75,0.807%20c-0.29,0.217-0.63,0.373-0.99,0.46c-0.36,0.086-0.74,0.101-1.1,0.044c-0.14,0-14.41-2.117-21.41,7.07%20c-0.27,0.338-0.61,0.612-0.99,0.799C1380.16,671.875,1379.74,671.972,1379.31,671.97z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1428.35,692.641c2.01,0,3.65-1.633,3.65-3.647c0-2.015-1.64-3.648-3.65-3.648%20c-2.02,0-3.65,1.633-3.65,3.648C1424.7,691.008,1426.33,692.641,1428.35,692.641z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1390.36,685.727c2.02,0,3.65-1.633,3.65-3.648c0-2.014-1.63-3.647-3.65-3.647%20c-2.01,0-3.65,1.633-3.65,3.647C1386.71,684.094,1388.35,685.727,1390.36,685.727z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1523.27,735.838c7.49-15.802,5.16-32.587-5.19-37.49c-10.35-4.904-24.81,3.93-32.29,19.731%20c-7.49,15.802-5.17,32.587,5.18,37.491C1501.33,760.473,1515.78,751.639,1523.27,735.838z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1497.07,759.653h-1.3c-0.75-0.051-1.45-0.396-1.94-0.96c-0.49-0.564-0.74-1.3-0.69-2.047%20c0.05-0.746,0.4-1.442,0.96-1.934c0.57-0.492,1.3-0.74,2.05-0.689c8.56,0.563,18.82-7.588,24.43-19.432%20c6.76-14.141,4.93-29.588-3.85-33.776c-6.24-2.95-14.82,0.247-21.87,8.196c-0.49,0.558-1.19,0.897-1.93,0.941%20c-0.75,0.045-1.48-0.209-2.04-0.705c-0.56-0.495-0.9-1.193-0.94-1.938c-0.05-0.745,0.21-1.478,0.7-2.036%20c8.74-9.863,19.93-13.51,28.49-9.547c11.73,5.561,14.66,24.048,6.53,41.229C1519.34,750.533,1507.7,759.653,1497.07,759.653z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1509.39,729.974h-0.25l-5.83-0.518c-0.54-0.048-1.05-0.251-1.48-0.584%20c-0.43-0.333-0.75-0.781-0.93-1.292c-0.17-0.511-0.2-1.062-0.07-1.588c0.12-0.526,0.4-1.004,0.79-1.377l11.51-11.011%20c0.26-0.279,0.57-0.501,0.92-0.654c0.35-0.153,0.73-0.234,1.11-0.236s0.76,0.073,1.12,0.221c0.35,0.149,0.67,0.368,0.93,0.643%20c0.26,0.276,0.47,0.602,0.61,0.96c0.13,0.357,0.19,0.738,0.17,1.12c-0.02,0.382-0.11,0.756-0.28,1.099%20c-0.16,0.344-0.4,0.65-0.69,0.9l-7.05,6.755c0.7,0.125,1.33,0.51,1.76,1.079c0.43,0.569,0.62,1.278,0.55,1.986%20c-0.07,0.708-0.41,1.361-0.95,1.829c-0.54,0.467-1.23,0.714-1.94,0.691V729.974z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1349.9,689.691c-0.51,0-1-0.139-1.44-0.401c-0.43-0.262-0.78-0.637-1.02-1.086l-4.5-8.331%20c-0.2-0.325-0.33-0.687-0.38-1.064c-0.06-0.377-0.04-0.761,0.06-1.129s0.27-0.712,0.51-1.011c0.23-0.3,0.53-0.549,0.86-0.732%20s0.7-0.296,1.08-0.333s0.76,0.004,1.12,0.119c0.37,0.115,0.7,0.303,0.99,0.552c0.29,0.249,0.52,0.554,0.69,0.896l4.5,8.354%20c0.18,0.323,0.29,0.679,0.33,1.046c0.04,0.366,0.01,0.737-0.09,1.091c-0.11,0.354-0.28,0.684-0.52,0.97%20c-0.23,0.286-0.52,0.524-0.84,0.698C1350.84,689.57,1350.37,689.694,1349.9,689.691z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1429.07,743.8c-8.87,0-15.76-7.318-18.44-12.092c-0.3-0.511-0.43-1.103-0.37-1.692%20c0.05-0.589,0.3-1.145,0.69-1.589c0.39-0.444,0.91-0.753,1.49-0.883c0.58-0.131,1.18-0.076,1.72,0.156%20c2.77,1.076,5.73,1.543,8.69,1.368c2.96-0.175,5.85-0.987,8.47-2.381c4.51-2.252,7.86-5.652,8.65-8.715%20c0.13-0.647,0.48-1.228,0.99-1.64c0.52-0.413,1.16-0.629,1.82-0.611c0.64,0.021,1.25,0.255,1.73,0.663%20c0.49,0.408,0.82,0.968,0.95,1.588c0.14,0.766,3.22,18.712-9.57,24.184C1433.76,743.174,1431.43,743.734,1429.07,743.8z%20M1420.54,734.793c1.71,1.64,3.87,2.745,6.21,3.181c2.33,0.435,4.74,0.183,6.94-0.727c1.78-0.917,3.3-2.28,4.4-3.957%20s1.75-3.611,1.88-5.613c-1.86,1.638-3.93,3.024-6.15,4.121c-4.12,2.065-8.68,3.071-13.28,2.927V734.793z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1013.69,1586.72c-1.42,8.19-3.22,12.97-5.27,13.01c-2.05,0.05-3.92-4.3-5.63-11.89%20c-3.263-14.23-5.807-39.97-6.438-69.37c-0.643-20.29,0.049-40.6,2.072-60.8c1.531-12.99,3.786-20.92,6.416-20.96%20c2.64-0.05,5.36,8.19,7.48,21.72c2.75,19.73,4.25,39.61,4.5,59.52C1017.56,1546.82,1016.14,1572.17,1013.69,1586.72z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1008.35,1602.52c-3.46,0-7.11-3.28-10.511-26.09c-4.906-38.45-5.767-77.31-2.567-115.95%20c2.409-23.21,5.988-26.48,9.498-26.54c3.52-0.07,7.21,3.01,10.63,26.09c2.61,19.2,4.05,38.54,4.33,57.92%20c0.57,19.36-0.01,38.74-1.76,58.03c-2.41,23.21-5.99,26.48-9.48,26.54H1008.35z%20M1004.91,1440.4c-3.22,5.99-6.756,34.25-5.765,78.11%20c0.995,43.87,5.715,71.92,9.205,77.78c3.2-5.99,6.76-34.27,5.75-78.12c-0.97-43.95-5.72-72.03-9.21-77.88L1004.91,1440.4z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1016.91,1517.99c-0.25-19.91-1.75-39.79-4.5-59.51l-5.2-0.27l-4.82-0.27l-3.875-0.22l-3.603-0.21%20l-4.751-0.24l-5.742-0.34l-4.954-0.25l-11.552-0.61l-11.258-0.52l-10.809-0.45l-4.323-0.15c-3.333-0.14-6.755-0.25-10.088-0.34%20c-4.098-0.14-8.241-0.23-12.362-0.32h-2.251c-52.128-0.92-104.954,1.8-140.847,15.95c-2.094,0.83-4.278,1.71-6.485,2.67%20c-2.207,0.97-4.503,1.96-6.868,3.02l-3.535,1.62l-7.183,3.45l-3.648,1.82l-3.648,1.87c-19.477,10.11-38.752,22.14-48.727,31.93%20l-1.734,1.8c-0.811,0.9-1.554,1.76-2.252,2.59c-2.544,3.4-3.58,6.4-2.567,8.78c0.171,0.41,0.374,0.8,0.608,1.17%20c4.143,6.4,15.425,1.49,17.113,0.75l-0.18,0.11c-4.03,2.45-32.38,20.15-25.85,34.02c0.073,0.2,0.156,0.38,0.248,0.57%20c5.607,10.45,28.575-3.76,37.469-9.8c-6.553,4.91-19.568,16.35-15.289,26.75l0.202,0.43c0.233,0.43,0.555,0.81,0.946,1.1%20c7.633,6.08,41.387-7,47.467-9.41l0.36-0.13h-0.293h-0.135c-4.503,1.93-22.517,10.53-20.266,19.99c0.12,0.53,0.301,1.05,0.541,1.53%20c0.13,0.27,0.297,0.52,0.495,0.75c6.08,6.98,43.211-3.83,88.111-9.6c3.603-0.45,7.25-0.9,10.921-1.26%20c16.955-1.78,45.71,7.64,86.534,6.76c6.68-0.14,13.285-0.37,19.815-0.7l2.252-0.11l3.693-0.21c6.125-0.36,12.129-0.76,18.014-1.21%20c5.164-0.41,10.238-0.84,15.222-1.31l5.044-0.45l9.975-0.97l5.472-0.54l4.823-0.49c3.71-0.36,7.34-0.74,10.89-1.13%20C1016.15,1572.17,1017.56,1546.82,1016.91,1517.99z'/%3e%3cpath%20style='fill:%23313131;'%20d='M741.186,1602.77c-5.247,0-8.58-0.92-10.494-2.99c-0.39-0.45-0.716-0.95-0.968-1.49%20c-0.341-0.67-0.591-1.38-0.743-2.12c-0.332-1.88-0.21-3.82,0.358-5.65c0.568-1.83,1.565-3.5,2.907-4.86%20c-11.799,3.53-24.274,5.74-29.475,1.6l-0.338-0.27c-0.551-0.5-1.029-1.06-1.419-1.69c-0.028-0.07-0.066-0.14-0.112-0.2l-0.203-0.43%20c-1.016-2.35-1.466-4.9-1.313-7.45c0.152-2.55,0.903-5.03,2.191-7.23c-6.89,3.06-12.429,4.05-16.55,2.95%20c-1.394-0.35-2.697-0.99-3.817-1.89c-1.12-0.9-2.031-2.03-2.668-3.32c-0.157-0.29-0.27-0.54-0.383-0.78%20c-4.503-10.47,6.756-22.34,16.461-30c-1.467-0.16-2.878-0.64-4.129-1.42c-1.252-0.78-2.311-1.83-3.1-3.08%20c-0.322-0.5-0.601-1.03-0.833-1.58c-1.351-3.24-0.36-7.11,2.928-11.55c0.69-0.93,1.443-1.81,2.251-2.63%20c0.086-0.12,0.184-0.22,0.293-0.32l1.666-1.73c9.3-9.21,27.291-21.01,49.404-32.45h0.225l3.445-1.78l3.603-1.78%20c2.544-1.26,4.954-2.43,7.34-3.53l3.581-1.65c2.364-1.08,4.661-2.09,6.912-3.04c2.252-0.94,4.504-1.86,6.553-2.7%20c30.894-12.16,75.996-17.29,141.86-16.14c0.698,0,1.531,0,2.251,0c4.121,0,8.264,0.18,12.385,0.31c3.378,0,6.755,0.2,10.11,0.34%20l4.346,0.16l10.854,0.45c3.783,0.16,7.565,0.34,11.258,0.54l12.227,0.63c1.441,0,2.837,0.16,4.279,0.2l28.011,1.56%20c0.64,0.03,1.25,0.29,1.73,0.72c0.48,0.43,0.8,1.01,0.9,1.64c2.78,19.86,4.28,39.87,4.51,59.92c0.63,27.99-0.61,53.88-3.27,69.26%20c-0.12,0.59-0.43,1.13-0.88,1.54c-0.45,0.4-1.01,0.65-1.62,0.71l-21.185,2.26l-6.237,0.6l-8.827,0.81%20c-4.954,0.45-10.043,0.9-15.222,1.29c-6.62,0.52-12.565,0.92-18.172,1.24l-3.738,0.2h-0.72c-0.54,0-1.081,0-1.644,0%20c-6.44,0.34-13.127,0.56-19.838,0.72c-19.27,0.14-38.518-1.36-57.532-4.5c-12.069-1.72-21.594-3.09-28.754-2.26%20c-3.671,0.39-7.274,0.81-10.854,1.26c-15.402,1.96-29.835,4.51-42.58,6.76C760.866,1600.86,748.932,1602.77,741.186,1602.77z%20M753.232,1578h-0.157c-10.133,4.62-19.816,11.6-18.6,16.78c0.064,0.32,0.17,0.63,0.316,0.92c2.904,3.22,23.238-0.29,42.895-3.69%20c12.813-2.25,27.314-4.73,42.783-6.76c3.603-0.45,7.273-0.9,10.989-1.28c7.836-0.81,17.676,0.61,30.128,2.39%20c18.707,3.1,37.646,4.61,56.609,4.5c6.755-0.14,13.285-0.38,19.748-0.7h1.531h0.788l3.648-0.2c5.584-0.32,11.506-0.72,18.014-1.22%20c5.134-0.4,10.193-0.83,15.176-1.28l8.76-0.81l6.215-0.61l19.045-1.94c2.37-15.24,3.43-39.67,2.86-66.08%20c-0.27-18.99-1.64-37.94-4.09-56.77l-25.719-1.42l-4.278-0.22l-12.205-0.63l-11.259-0.52l-10.605-0.45l-4.504-0.18l-10.11-0.32%20c-4.121-0.13-8.219-0.25-12.34-0.31h-2.251c-65.301-1.15-109.638,3.87-139.811,15.76c-2.072,0.81-4.233,1.69-6.417,2.63%20c-2.185,0.95-4.504,1.94-6.756,3l-3.535,1.62c-2.252,1.08-4.706,2.25-7.093,3.4l-3.648,1.8l-3.602,1.87h-0.203%20c-21.234,11.01-39.113,22.72-47.85,31.34l-1.531,1.58c-0.04,0.07-0.093,0.13-0.157,0.18c-0.7,0.72-1.361,1.47-1.982,2.25%20c-1.959,2.64-2.747,4.75-2.252,5.99c0.101,0.26,0.229,0.51,0.383,0.74c2.252,3.72,9.863,1.45,13.511-0.27h0.247%20c0.689-0.25,1.449-0.23,2.124,0.06c0.675,0.29,1.212,0.82,1.502,1.5c0.211,0.52,0.262,1.09,0.146,1.64%20c-0.117,0.55-0.395,1.05-0.799,1.44c-0.151,0.15-0.317,0.28-0.496,0.39l-0.338,0.22c-10.38,6.49-28.822,21.12-24.769,30.44%20c0.054,0.15,0.122,0.28,0.203,0.41c0.283,0.57,0.688,1.06,1.187,1.45c0.498,0.39,1.078,0.66,1.695,0.8%20c4.886,1.29,14.524-2.48,26.481-10.33c0.599-0.34,1.302-0.45,1.975-0.31c0.673,0.15,1.269,0.54,1.677,1.09%20c0.407,0.55,0.598,1.24,0.535,1.92c-0.063,0.69-0.375,1.33-0.877,1.8c-5.382,4.37-13.871,12.83-10.448,20.56v0.18%20c0.07,0.11,0.153,0.2,0.247,0.29h0.113c4.008,3.36,22.765-0.79,44.584-9.86l0.406-0.14c0.377-0.09,0.771-0.11,1.155-0.05%20c0.385,0.07,0.752,0.21,1.08,0.42c0.327,0.21,0.608,0.49,0.824,0.81c0.216,0.33,0.362,0.69,0.431,1.07%20c0.166,0.61,0.126,1.25-0.115,1.83c-0.24,0.58-0.668,1.06-1.214,1.37V1578z'/%3e%3cpath%20style='fill:%23313131;'%20d='M752.85,1578c-0.644,0-1.267-0.22-1.767-0.63c-0.5-0.4-0.846-0.97-0.98-1.6%20c-0.134-0.63-0.049-1.28,0.242-1.86c0.291-0.57,0.769-1.03,1.356-1.29c29.701-13.51,69.804-24.14,87.976-27.72%20c0.734-0.14,1.496,0.01,2.116,0.43c0.621,0.42,1.05,1.06,1.194,1.8c0.143,0.73-0.011,1.49-0.429,2.12%20c-0.418,0.62-1.066,1.05-1.801,1.19c-18.013,3.51-57.464,14.05-86.737,27.31C753.65,1577.91,753.252,1578,752.85,1578z'/%3e%3cpath%20style='fill:%23313131;'%20d='M714.412,1562.33c-0.442,0-0.877-0.11-1.268-0.31c-0.392-0.21-0.729-0.5-0.984-0.86%20c-0.218-0.3-0.375-0.64-0.462-1c-0.086-0.36-0.101-0.74-0.042-1.1c0.059-0.37,0.189-0.72,0.384-1.03%20c0.194-0.32,0.449-0.59,0.75-0.81c25.985-18.58,90.07-43.8,113.871-48.48c0.37-0.09,0.756-0.11,1.133-0.05%20c0.377,0.06,0.738,0.2,1.061,0.4c0.322,0.21,0.599,0.48,0.815,0.79c0.215,0.32,0.364,0.67,0.438,1.05%20c0.073,0.37,0.07,0.76-0.011,1.13c-0.08,0.38-0.236,0.73-0.457,1.04c-0.222,0.31-0.504,0.57-0.831,0.77%20c-0.326,0.2-0.689,0.33-1.067,0.39c-22.878,4.5-86.692,29.67-111.664,47.55C715.589,1562.15,715.007,1562.33,714.412,1562.33z'/%3e%3cpath%20style='fill:%23313131;'%20d='M707.14,1534.38c-0.43,0.02-0.857-0.07-1.247-0.25c-0.391-0.18-0.735-0.45-1.005-0.78%20c-0.233-0.29-0.406-0.62-0.511-0.98c-0.104-0.35-0.137-0.72-0.098-1.09c0.04-0.37,0.152-0.73,0.33-1.05%20c0.178-0.33,0.418-0.61,0.707-0.84c19.162-15.52,73.001-40.81,108.511-48.21c0.372-0.11,0.763-0.14,1.148-0.09%20c0.384,0.05,0.754,0.18,1.086,0.38c0.333,0.2,0.62,0.46,0.845,0.78c0.224,0.31,0.381,0.67,0.46,1.05c0.08,0.38,0.08,0.77,0.001,1.15%20c-0.08,0.38-0.236,0.74-0.461,1.06c-0.224,0.31-0.512,0.58-0.844,0.78c-0.332,0.2-0.702,0.33-1.086,0.38%20c-34.182,7.14-87.818,32.29-106.125,47.11C708.362,1534.16,707.761,1534.37,707.14,1534.38z'/%3e%3cpath%20style='fill:%23313131;'%20d='M956.023,1029.28c-57.982,76.8-226.727,80.7-226.727,80.7s-39.653-256.115-58.05-279.218%20c-18.397-23.103-101.328,0.923-103.22-30.624c-1.891-31.547,86.625-25.58,84.778-42.175%20c-1.846-16.595-174.622-24.026-165.188-48.052c9.435-24.026,87.188-22.72,87.188-22.72c-3.31-29.093,41.094-31.682,41.094-31.682%20c0-15.92,42.4-17.271,42.4-17.271c0.924-8.286,83.855-28.732,179.667,88.246c58.703,71.605,88.561,156.608,103.58,218.283%20c2.409,9.886,4.503,19.163,6.102,27.674C951.537,991.208,954.334,1010.18,956.023,1029.28z'/%3e%3cpath%20style='fill:%23313131;'%20d='M729.297,1112.86c-0.673,0-1.324-0.24-1.835-0.68c-0.511-0.44-0.851-1.04-0.958-1.71%20c-13.668-88.31-43.256-260.117-57.464-277.861c-7.633-9.548-29.07-10.223-49.808-10.899c-25.986-0.81-52.871-1.666-54.042-21.324%20c-1.216-20.716,29.835-26.773,54.762-31.659c12.88-2.522,30.534-5.967,30.038-10.381c-1.914-5.449-41.387-11.821-70.209-16.46%20c-52.826-8.534-87.818-14.951-94.28-26.12c-0.616-1.025-0.985-2.179-1.079-3.37c-0.094-1.192,0.091-2.389,0.538-3.498%20c9.007-23.17,70.772-24.589,86.872-24.566c-0.111-5.878,1.941-11.591,5.765-16.055c9.75-11.597,29.07-14.636,35.803-15.38%20c3.377-14.433,34.766-16.978,43.188-17.406c2.332-2.232,5.228-3.789,8.376-4.503c3.243-0.946,80.297-22.09,175.208,93.762%20c59.671,72.822,89.529,159.514,104.098,219.41c2.252,9.3,4.301,18.644,6.125,27.809c3.882,18.891,6.694,37.991,8.422,57.191%20c0.042,0.68-0.157,1.35-0.563,1.89c-58.14,77.01-221.977,81.72-228.912,81.88L729.297,1112.86z%20M571.675,689.961%20c-23.103,0-74.533,3.625-81.356,20.986c-0.131,0.329-0.183,0.683-0.152,1.035c0.032,0.352,0.145,0.692,0.332,0.992%20c5.517,9.66,52.511,17.248,90.273,23.35c52.488,8.467,73.969,12.768,74.915,21.392c1.081,9.57-14.636,12.655-34.542,16.528%20c-22.787,4.503-51.137,10.02-50.213,25.805c0.833,14.523,24.026,15.266,48.57,16.055c22.022,0.698,44.787,1.418,54.041,12.97%20c18.014,22.382,53.885,250.076,58.253,278.066c20.896-0.9,168.183-9.66,221.459-78.81c-1.75-18.61-4.501-37.105-8.242-55.415%20c-1.801-9.007-3.85-18.374-6.079-27.584c-14.412-59.333-43.977-145.17-102.972-217.158%20c-73.993-90.317-138.077-94.731-155.979-93.943c-12.001,0.541-17.811,3.446-18.802,4.504c-0.128,0.614-0.456,1.167-0.933,1.575%20c-0.477,0.407-1.075,0.645-1.701,0.677c-10.291,0.337-39.676,3.693-39.676,14.456c0.001,0.714-0.271,1.401-0.761,1.921%20c-0.49,0.519-1.16,0.831-1.873,0.871c-0.248,0-24.094,1.576-34.204,13.51c-1.737,2.044-3.018,4.435-3.756,7.014%20c-0.737,2.578-0.916,5.285-0.523,7.938c0.055,0.404,0.021,0.814-0.099,1.203c-0.121,0.389-0.325,0.747-0.599,1.049%20c-0.271,0.296-0.601,0.532-0.97,0.691s-0.767,0.238-1.169,0.232L571.675,689.961z'/%3e%3cpath%20style='fill:%23313131;'%20d='M625.265,691.56h-0.157c-0.338,0-34.407-1.801-50.214-1.576c-0.37,0.012-0.739-0.051-1.084-0.185%20c-0.346-0.134-0.66-0.336-0.925-0.595c-0.265-0.259-0.475-0.569-0.617-0.91c-0.143-0.342-0.214-0.71-0.211-1.08%20c0-0.735,0.287-1.441,0.8-1.967s1.212-0.83,1.947-0.848c15.987-0.225,50.236,1.577,50.574,1.599c0.7,0.078,1.346,0.415,1.81,0.945%20c0.463,0.531,0.711,1.216,0.694,1.92c-0.017,0.705-0.297,1.377-0.786,1.885c-0.489,0.507-1.15,0.813-1.853,0.857L625.265,691.56z'/%3e%3cpath%20style='fill:%23313131;'%20d='M661.564,663.908h-0.608c-0.316,0-31.525-6.755-44.743-5.539c-0.366,0.037-0.737,0.001-1.09-0.106%20c-0.353-0.106-0.682-0.282-0.967-0.517c-0.284-0.234-0.52-0.523-0.692-0.849c-0.173-0.326-0.279-0.683-0.313-1.05%20c-0.037-0.368-0.002-0.74,0.105-1.095c0.107-0.354,0.282-0.684,0.516-0.971c0.234-0.286,0.523-0.524,0.849-0.699%20c0.326-0.175,0.684-0.283,1.052-0.32c14.073-1.396,45.17,5.359,46.498,5.629c0.662,0.17,1.241,0.572,1.629,1.133%20c0.389,0.561,0.563,1.244,0.489,1.923c-0.074,0.679-0.39,1.309-0.891,1.773c-0.501,0.465-1.152,0.733-1.834,0.756V663.908z'/%3e%3cpath%20style='fill:%23313131;'%20d='M696.871,648.37c-0.267,0.01-0.534-0.028-0.788-0.112c-0.248,0-24.544-7.138-37.672-7.138%20c-0.746,0-1.462-0.297-1.99-0.825c-0.528-0.528-0.824-1.244-0.824-1.99c-0.003-0.369,0.067-0.734,0.206-1.076%20c0.139-0.341,0.344-0.651,0.604-0.913c0.259-0.262,0.568-0.469,0.908-0.611c0.34-0.142,0.705-0.215,1.074-0.215%20c13.938,0,38.279,7.071,39.248,7.363c0.715,0.219,1.315,0.71,1.673,1.366c0.358,0.657,0.444,1.428,0.241,2.147%20c-0.174,0.577-0.528,1.083-1.01,1.444C698.059,648.17,697.473,648.367,696.871,648.37z'/%3e%3cpath%20style='fill:%23313131;'%20d='M725.243,897.684c-0.642-0.011-1.261-0.24-1.756-0.649c-0.494-0.409-0.836-0.974-0.968-1.603%20l-4.616-19.297c-0.143-0.714-0.003-1.456,0.39-2.069c0.393-0.613,1.008-1.05,1.716-1.22c0.709-0.169,1.455-0.057,2.083,0.313%20c0.627,0.37,1.087,0.968,1.282,1.67l4.504,19.275c0.087,0.361,0.102,0.735,0.043,1.102c-0.058,0.366-0.188,0.718-0.383,1.034%20c-0.194,0.316-0.45,0.59-0.751,0.807c-0.301,0.217-0.642,0.372-1.003,0.457C725.61,897.581,725.429,897.641,725.243,897.684z'/%3e%3cpath%20style='fill:%23313131;'%20d='M736.659,945.466c-0.641-0.011-1.26-0.24-1.755-0.65c-0.495-0.409-0.837-0.973-0.969-1.602%20l-4.616-19.274c-0.173-0.729-0.05-1.497,0.343-2.134c0.392-0.638,1.022-1.093,1.751-1.267c0.728-0.173,1.496-0.049,2.134,0.343%20c0.637,0.393,1.093,1.023,1.266,1.752l4.503,19.274c0.088,0.358,0.103,0.73,0.046,1.094c-0.057,0.363-0.186,0.712-0.378,1.026%20c-0.193,0.314-0.446,0.587-0.744,0.803c-0.299,0.216-0.637,0.37-0.995,0.455C737.059,945.372,736.862,945.433,736.659,945.466z'/%3e%3cpath%20style='fill:%23313131;'%20d='M748.188,993.248c-0.647-0.003-1.273-0.228-1.773-0.638c-0.501-0.41-0.844-0.98-0.974-1.614%20l-4.503-19.275c-0.143-0.714-0.003-1.456,0.39-2.069c0.393-0.613,1.008-1.051,1.717-1.22c0.708-0.169,1.454-0.057,2.082,0.313%20c0.627,0.37,1.087,0.968,1.282,1.67l4.504,19.275c0.087,0.359,0.103,0.732,0.046,1.097c-0.057,0.366-0.185,0.716-0.377,1.032%20c-0.193,0.316-0.445,0.591-0.744,0.809s-0.637,0.375-0.997,0.462L748.188,993.248z'/%3e%3cpath%20style='fill:%23313131;'%20d='M759.447,1041.05c-0.646-0.01-1.27-0.23-1.77-0.64c-0.499-0.41-0.844-0.98-0.978-1.61l-4.503-19.28%20c-0.102-0.36-0.129-0.74-0.079-1.12c0.049-0.37,0.173-0.73,0.365-1.06c0.193-0.33,0.448-0.61,0.753-0.83%20c0.304-0.23,0.651-0.39,1.019-0.48c0.368-0.09,0.75-0.1,1.123-0.04c0.373,0.07,0.73,0.21,1.049,0.41%20c0.318,0.2,0.593,0.47,0.806,0.78c0.213,0.32,0.362,0.67,0.436,1.04l4.616,19.27c0.169,0.73,0.043,1.49-0.349,2.13%20c-0.393,0.63-1.02,1.08-1.745,1.25C759.954,1040.97,759.703,1041.03,759.447,1041.05z'/%3e%3cpath%20style='fill:%23313131;'%20d='M770.931,1088.83c-0.646,0-1.271-0.22-1.769-0.63c-0.497-0.41-0.835-0.98-0.956-1.62l-4.616-19.27%20c-0.102-0.37-0.129-0.75-0.079-1.13c0.049-0.37,0.173-0.73,0.365-1.06c0.193-0.32,0.448-0.61,0.753-0.83%20c0.304-0.23,0.651-0.39,1.019-0.48c0.368-0.08,0.75-0.1,1.123-0.03c0.374,0.06,0.73,0.2,1.049,0.4c0.318,0.21,0.593,0.47,0.806,0.78%20c0.214,0.32,0.362,0.67,0.436,1.04l4.616,19.28c0.169,0.72,0.044,1.49-0.348,2.13c-0.392,0.63-1.02,1.09-1.746,1.27%20C771.372,1088.75,771.153,1088.8,770.931,1088.83z'/%3e%3cpath%20style='fill:%23313131;'%20d='M895.43,998.562c-3.514,0-6.949-1.042-9.871-2.994c-2.921-1.953-5.198-4.727-6.543-7.974%20c-1.345-3.246-1.697-6.818-1.011-10.264c0.685-3.447,2.377-6.612,4.862-9.097c2.485-2.485,5.65-4.177,9.097-4.862%20c3.446-0.686,7.018-0.334,10.265,1.011c3.246,1.344,6.021,3.622,7.973,6.543c1.952,2.922,2.994,6.357,2.994,9.871%20c0,4.711-1.872,9.23-5.204,12.562C904.661,996.69,900.142,998.562,895.43,998.562z%20M895.43,968.681%20c-2.402,0-4.749,0.713-6.745,2.047c-1.997,1.335-3.552,3.232-4.47,5.451c-0.918,2.219-1.157,4.66-0.687,7.015%20c0.47,2.355,1.628,4.518,3.328,6.214c1.699,1.697,3.864,2.851,6.22,3.316c2.356,0.466,4.797,0.223,7.014-0.699%20c2.217-0.922,4.111-2.482,5.442-4.48c1.331-1.999,2.039-4.348,2.035-6.749c0-1.593-0.314-3.17-0.925-4.642%20c-0.61-1.471-1.504-2.807-2.631-3.933c-1.128-1.125-2.466-2.017-3.938-2.624C898.6,968.989,897.023,968.678,895.43,968.681z'/%3e%3cpath%20style='fill:%23313131;'%20d='M839.676,1021.78c-3.514,0-6.951-1.04-9.876-2.98c-2.925-1.95-5.205-4.73-6.553-7.97%20c-1.349-3.25-1.704-6.82-1.021-10.27c0.683-3.448,2.374-6.615,4.857-9.102c2.484-2.487,5.65-4.182,9.097-4.869%20s7.02-0.337,10.268,1.007c3.247,1.344,6.023,3.621,7.976,6.544c1.954,2.922,2.996,6.36,2.996,9.87%20c-0.006,4.71-1.876,9.22-5.202,12.55S844.383,1021.77,839.676,1021.78z%20M839.676,991.898c-2.402-0.004-4.752,0.704-6.751,2.036%20c-1.999,1.332-3.558,3.227-4.48,5.446c-0.921,2.22-1.163,4.66-0.696,7.02c0.468,2.35,1.624,4.52,3.323,6.22%20c1.699,1.7,3.863,2.85,6.22,3.32c2.356,0.47,4.798,0.22,7.017-0.7s4.114-2.48,5.446-4.48c1.332-2,2.04-4.35,2.036-6.75%20c-0.006-3.21-1.284-6.287-3.555-8.557C845.965,993.182,842.888,991.904,839.676,991.898z'/%3e%3cpath%20style='fill:%23313131;'%20d='M947.647,975.257h-0.293c-3.71-0.383-7.205-1.926-9.988-4.409c-2.784-2.482-4.714-5.779-5.517-9.422%20c-0.802-3.642-0.437-7.445,1.045-10.868c1.482-3.422,4.004-6.291,7.21-8.199c0.373-0.233,0.799-0.372,1.238-0.403%20c0.44-0.031,0.88,0.045,1.283,0.223c0.408,0.168,0.77,0.428,1.06,0.761c0.289,0.332,0.497,0.727,0.607,1.153%20c2.251,9.3,4.301,18.645,6.124,27.809c0.08,0.408,0.069,0.829-0.034,1.233c-0.102,0.403-0.292,0.779-0.557,1.099%20c-0.265,0.321-0.598,0.579-0.974,0.756C948.474,975.167,948.063,975.258,947.647,975.257z%20M939.878,949.858%20c-1.176,1.421-2.013,3.092-2.446,4.886c-0.434,1.793-0.452,3.662-0.055,5.464c0.397,1.802,1.2,3.49,2.348,4.935%20c1.147,1.445,2.609,2.609,4.274,3.404C942.716,962.355,941.342,956.095,939.878,949.858z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M873.52,931.212c-2.967-0.005-5.852-0.977-8.216-2.769c-2.365-1.792-4.082-4.306-4.889-7.161%20c-38.505-135.51-105.72-189.146-106.395-189.754c-2.709-2.264-4.434-5.489-4.815-8.998c-0.381-3.509,0.612-7.029,2.772-9.821%20c2.16-2.792,5.317-4.638,8.809-5.152c3.492-0.513,7.048,0.347,9.919,2.399c3.018,2.252,74.758,58.951,115.942,203.895%20c0.979,3.476,0.54,7.198-1.22,10.35c-1.759,3.153-4.697,5.48-8.169,6.471C876.043,931.026,874.785,931.208,873.52,931.212z'/%3e%3cpath%20style='fill:%23313131;'%20d='M873.52,934.027c-3.566-0.026-7.027-1.204-9.868-3.359c-2.841-2.155-4.908-5.171-5.894-8.597%20c-38.1-134.114-104.774-187.795-105.427-188.336c-3.449-2.669-5.696-6.6-6.247-10.926c-0.551-4.326,0.639-8.694,3.308-12.143%20c2.67-3.449,6.6-5.696,10.926-6.247c4.327-0.551,8.695,0.639,12.144,3.308c3.062,2.365,75.5,59.536,116.932,205.337%20c1.17,4.18,0.644,8.652-1.464,12.446c-2.108,3.795-5.627,6.604-9.794,7.819C876.637,933.775,875.083,934.01,873.52,934.027z%20M762.396,709.957c-2.253-0.002-4.451,0.7-6.286,2.008c-1.834,1.309-3.214,3.158-3.946,5.289c-0.732,2.132-0.78,4.439-0.136,6.598%20c0.644,2.16,1.946,4.064,3.726,5.447c0.675,0.541,68.633,54.853,107.363,191.218c0.651,2.26,2.016,4.249,3.891,5.67%20c1.875,1.42,4.159,2.196,6.512,2.211c1.005-0.009,2.005-0.153,2.972-0.428c2.756-0.786,5.089-2.633,6.486-5.136%20c1.397-2.503,1.745-5.458,0.967-8.217c-40.936-144.111-111.956-200.112-114.974-202.431%20C767.089,710.732,764.775,709.948,762.396,709.957z'/%3e%3cpath%20style='fill:%23313131;'%20d='M993.627,1354.13c-0.458,0-0.91-0.11-1.315-0.33c-0.405-0.21-0.751-0.52-1.009-0.9%20c-0.257-0.38-0.418-0.82-0.468-1.27c-0.05-0.46,0.012-0.92,0.18-1.35l101.895-255.93c0.13-0.35,0.33-0.67,0.59-0.94%20c0.25-0.28,0.56-0.49,0.91-0.64c0.34-0.16,0.71-0.24,1.08-0.24c0.38-0.01,0.75,0.06,1.1,0.2s0.66,0.35,0.93,0.61%20c0.26,0.26,0.48,0.58,0.62,0.92c0.14,0.35,0.22,0.72,0.22,1.09c-0.01,0.38-0.08,0.75-0.23,1.09l-101.958,255.94%20c-0.207,0.51-0.558,0.94-1.01,1.26C994.71,1353.95,994.177,1354.12,993.627,1354.13z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1007.9,1602.95c-0.52,0-1.03-0.14-1.48-0.42c-0.44-0.27-0.8-0.67-1.03-1.13%20c-0.24-0.47-0.34-1-0.29-1.52c0.05-0.52,0.24-1.01,0.55-1.43c0.25-0.34,12.75-18.29,8.6-86.76c-3.62-59.65-12.47-73.39-12.56-73.52%20c-0.27-0.39-0.44-0.84-0.49-1.3c-0.05-0.47,0.02-0.95,0.2-1.38c0.18-0.43,0.46-0.82,0.83-1.11c0.36-0.3,0.8-0.5,1.26-0.58%20l455.12-81.9c0.37-0.07,0.75-0.07,1.12,0c0.37,0.07,0.72,0.22,1.03,0.43c0.31,0.21,0.58,0.48,0.78,0.8%20c0.21,0.31,0.35,0.66,0.41,1.03c0.07,0.38,0.06,0.75-0.02,1.12c-0.08,0.37-0.24,0.72-0.46,1.02c-0.22,0.31-0.5,0.57-0.82,0.76%20c-0.32,0.2-0.68,0.33-1.05,0.38l-451.4,81.29c3.04,7.27,9,26.77,11.68,72.69c4.35,71.72-9.18,89.82-9.77,90.54%20c-0.27,0.32-0.61,0.58-0.99,0.75C1008.74,1602.88,1008.32,1602.97,1007.9,1602.95z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1432.02,1360.75h-0.61c-0.73-0.16-1.36-0.6-1.76-1.23s-0.54-1.39-0.38-2.12l37.09-166.16%20c0.16-0.72,0.61-1.36,1.24-1.76s1.4-0.53,2.12-0.36c0.73,0.16,1.37,0.61,1.77,1.24s0.53,1.39,0.36,2.12l-37.08,166.14%20c-0.16,0.61-0.51,1.15-1.01,1.54C1433.26,1360.54,1432.65,1360.75,1432.02,1360.75z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1464.26,894.848l10.61,32.537L1370.5,1028.6l-42.69-73.586L1464.26,894.848z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M1327.81,955.013l-7.07-69.961l4.07-14.322l-28.62,7.791l-50.44,104.008L1327.81,955.013z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1370.5,1031.42h-0.38c-0.42-0.07-0.83-0.23-1.18-0.47c-0.36-0.24-0.65-0.56-0.87-0.93l-42.78-73.565%20c-0.21-0.344-0.33-0.726-0.37-1.123c-0.05-0.396-0.01-0.796,0.12-1.175c0.12-0.379,0.32-0.728,0.59-1.022%20c0.27-0.295,0.6-0.53,0.96-0.688l136.46-60.144c0.36-0.162,0.75-0.245,1.14-0.244c0.4,0,0.79,0.084,1.15,0.245%20c0.35,0.162,0.68,0.398,0.94,0.693c0.26,0.294,0.46,0.641,0.57,1.017l10.61,32.538c0.17,0.499,0.19,1.036,0.06,1.547%20s-0.4,0.974-0.78,1.335l-104.37,101.196C1371.87,1031.12,1371.2,1031.4,1370.5,1031.42z%20M1331.82,956.32l39.31,67.75l100.52-97.473%20l-9.01-27.899L1331.82,956.32z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1245.82,985.344c-0.47-0.001-0.94-0.123-1.36-0.355c-0.42-0.233-0.77-0.567-1.02-0.972%20c-0.25-0.406-0.4-0.869-0.42-1.345c-0.03-0.477,0.07-0.952,0.28-1.381l50.44-103.985c0.16-0.346,0.38-0.658,0.66-0.917%20c0.28-0.259,0.6-0.46,0.96-0.592l28.62-7.769c0.48-0.131,0.99-0.131,1.47-0.001c0.48,0.129,0.92,0.385,1.27,0.74%20c0.35,0.355,0.6,0.797,0.73,1.281c0.12,0.483,0.11,0.991-0.02,1.471l-3.92,13.803l7,69.398c0.07,0.634-0.08,1.272-0.42,1.809%20c-0.35,0.537-0.87,0.939-1.47,1.141l-82.05,27.516C1246.33,985.276,1246.08,985.329,1245.82,985.344z%20M1298.24,880.908%20l-46.97,96.825l73.59-24.769l-6.76-67.71c-0.08-0.348-0.08-0.71,0-1.058l2.71-9.525L1298.24,880.908z'/%3e%3cpath%20style='fill:%23313131;'%20d='M976.898,1205.36c-0.576,0-1.139-0.17-1.61-0.51c-0.472-0.33-0.83-0.79-1.025-1.34l-29.273-80.2%20c-0.256-0.7-0.224-1.48,0.091-2.16c0.314-0.68,0.885-1.2,1.587-1.46c0.702-0.25,1.477-0.22,2.154,0.09%20c0.678,0.32,1.203,0.89,1.46,1.59l29.273,80.23c0.157,0.43,0.208,0.88,0.149,1.33c-0.059,0.45-0.226,0.88-0.488,1.25%20c-0.261,0.37-0.609,0.67-1.013,0.88C977.799,1205.26,977.351,1205.37,976.898,1205.36z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1156.81,1411.87c-0.36,0.01-0.72-0.05-1.06-0.16c-0.69-0.27-1.25-0.8-1.56-1.48%20c-0.31-0.67-0.34-1.45-0.08-2.14l171-454.045c0.13-0.346,0.32-0.663,0.58-0.933c0.25-0.27,0.55-0.487,0.89-0.64%20c0.34-0.153,0.7-0.238,1.07-0.25c0.37-0.012,0.74,0.049,1.08,0.179c0.35,0.13,0.67,0.327,0.94,0.58%20c0.26,0.252,0.48,0.555,0.63,0.892c0.16,0.337,0.24,0.7,0.25,1.07c0.02,0.369-0.04,0.737-0.17,1.083l-170.93,454.014%20c-0.21,0.54-0.57,1-1.04,1.33C1157.94,1411.69,1157.38,1411.87,1156.81,1411.87z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1331.14,1015.11c-2.19,0-4.34-0.65-6.17-1.87c-1.82-1.22-3.24-2.95-4.08-4.98%20c-0.84-2.03-1.06-4.26-0.64-6.41c0.43-2.158,1.49-4.136,3.04-5.688c1.55-1.553,3.53-2.61,5.69-3.039%20c2.15-0.428,4.38-0.208,6.41,0.632c2.03,0.84,3.76,2.263,4.98,4.089c1.22,1.825,1.87,3.976,1.87,6.166c0,2.95-1.17,5.77-3.25,7.85%20C1336.91,1013.94,1334.09,1015.11,1331.14,1015.11z%20M1331.14,998.562c-1.08,0-2.14,0.322-3.04,0.924%20c-0.9,0.604-1.6,1.454-2.02,2.464c-0.41,1-0.52,2.1-0.3,3.16c0.21,1.06,0.73,2.04,1.5,2.8c0.77,0.77,1.75,1.28,2.81,1.49%20c1.06,0.21,2.16,0.1,3.16-0.32c1-0.42,1.85-1.12,2.45-2.02c0.6-0.91,0.92-1.97,0.91-3.05c0-1.45-0.58-2.83-1.61-3.85%20C1333.98,999.135,1332.59,998.562,1331.14,998.562z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1275.66,1161.21c-2.2,0-4.35-0.65-6.18-1.87c-1.83-1.21-3.25-2.95-4.1-4.98%20c-0.84-2.03-1.06-4.26-0.63-6.42c0.42-2.15,1.48-4.13,3.04-5.68c1.55-1.56,3.53-2.62,5.69-3.04c2.15-0.43,4.39-0.21,6.41,0.63%20c2.03,0.85,3.77,2.27,4.99,4.1c1.21,1.83,1.86,3.98,1.86,6.18c-0.01,2.93-1.18,5.75-3.25,7.82%20C1281.41,1160.03,1278.6,1161.2,1275.66,1161.21z%20M1275.66,1144.66c-1.08-0.01-2.14,0.31-3.05,0.91c-0.9,0.6-1.6,1.45-2.02,2.45%20c-0.42,1-0.53,2.1-0.32,3.16c0.21,1.06,0.72,2.04,1.49,2.81c0.76,0.77,1.74,1.29,2.8,1.5c1.06,0.22,2.16,0.11,3.16-0.31%20c1.01-0.41,1.86-1.11,2.46-2.01c0.61-0.9,0.93-1.96,0.93-3.04c0-1.45-0.58-2.84-1.6-3.86%20C1278.49,1145.24,1277.11,1144.66,1275.66,1144.66z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1220.11,1311.87c-2.2,0-4.35-0.64-6.18-1.86c-1.83-1.22-3.25-2.95-4.1-4.98%20c-0.84-2.03-1.06-4.27-0.63-6.42c0.42-2.16,1.48-4.14,3.04-5.69c1.55-1.55,3.53-2.61,5.69-3.04c2.15-0.43,4.39-0.21,6.41,0.64%20c2.03,0.84,3.77,2.27,4.99,4.1c1.21,1.82,1.86,3.97,1.86,6.17c-0.01,2.94-1.18,5.75-3.25,7.83%20C1225.86,1310.7,1223.04,1311.86,1220.11,1311.87z%20M1220.11,1295.32c-1.08,0-2.14,0.31-3.05,0.91c-0.9,0.6-1.61,1.45-2.02,2.45%20c-0.42,1-0.53,2.1-0.32,3.17c0.21,1.06,0.72,2.04,1.49,2.8c0.76,0.77,1.74,1.29,2.8,1.51c1.06,0.21,2.16,0.1,3.16-0.31%20c1.01-0.41,1.86-1.12,2.46-2.02c0.61-0.9,0.93-1.96,0.93-3.04c0-1.45-0.58-2.83-1.6-3.86%20C1222.94,1295.9,1221.56,1295.33,1220.11,1295.32z'/%3e%3cpath%20style='fill:%23313131;'%20d='M753.84,1108.49l2.567,12.14c0,0,108.399-10.58,168.182-56.95l-1.643-4.23%20C922.946,1059.45,866.562,1100.84,753.84,1108.49z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1093.74,1099.69l-121.549,265.34l21.369-13.71L1093.74,1099.69z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1466.7,1202.55l-35.06,157.06l-21.91,3.67L1466.7,1202.55z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1245.75,982.53l82.06-27.516l3.89,6.71L1245.75,982.53z'/%3e%3cpath%20style='fill:%23313131;'%20d='M1370.5,1028.6l-42.69-73.586l-9.05,3.04L1370.5,1028.6z'/%3e%3c/svg%3e",mo={es:{save:"Guardar",cancel:"Cancelar",create:"Crear",edit:"Editar",delete:"Eliminar",search:"Buscar",searchBy:"Buscar por",filterBy:"Filtrar por",sortBy:"Ordenar por",all:"Todos",noSort:"Sin orden",empty:"No hay registros disponibles",confirmDeleteTitle:"¿Estás seguro de eliminar este registro?",confirmDeleteDesc:"Esta acción no se puede deshacer.",confirmText:"Eliminar",cancelText:"Cancelar",errorTitle:"Error",successTitle:"Éxito",defaultError:"Ha ocurrido un error inesperado",noPermission:"No tienes permiso de lectura para ver estos registros"},en:{save:"Save",cancel:"Cancel",create:"Create",edit:"Edit",delete:"Delete",search:"Search",searchBy:"Search by",filterBy:"Filter by",sortBy:"Sort by",all:"All",noSort:"No sort",empty:"No records available",confirmDeleteTitle:"Are you sure you want to delete this record?",confirmDeleteDesc:"This action cannot be undone.",confirmText:"Delete",cancelText:"Cancel",errorTitle:"Error",successTitle:"Success",defaultError:"An unexpected error occurred",noPermission:"You do not have read permission to view these records"}},pm=({title:e,entityName:r,fields:n,service:s,idField:a="id",pageSize:o=10,showCreateButton:i=!0,showSearch:l=!0,showRowActions:c=!0,allowDelete:f=!0,onCreateSuccess:d,onUpdateSuccess:m,onDeleteSuccess:h,onError:p,createButtonText:g,saveButtonText:x,cancelButtonText:b,emptyMessage:y,className:C="",id:w,renderToolbar:j,rowActions:I,formWidth:N="600px",formColumns:E=2,showViewToggle:S=!1,showAdvancedSearch:v=!1,filterableFields:R,useToolbar:T=!0,onViewChange:A,enableGridInfiniteScroll:V=!0,onBeforeCreate:F,onBeforeUpdate:Y,onBeforeDelete:_,locale:B="es",permissions:L,internalErrorHandling:Z=!0,actions:D=[],globalActions:q=[],batchActions:P=[],emptyStateConfig:H,renderCardContent:ae,renderForm:ie,showDefaultEditAction:ce=!0,maximizeEditModal:oe=!1,maximizeCustomModal:Me=!0,navigationType:pe,enableMultiSelect:te=!1,showAdvancedSearchConnectors:ve=!1,maxAdvancedFilters:M=4,initialFiltersVisible:G=!0,headerBadges:O,renderHeaderExtra:le,activeByCompany:J=!1,companies:ge=[],onCompanyChange:we,onConfirmLinking:ne,isCompanyLinked:ue,showGlobalValues:Le,onSearchMatches:Ce})=>{const ee=mo[B]||mo.es,Ie=L?.canRead??!0,$=L?.canCreate??i,Fe=L?.canUpdate??c,Re=L?.canDelete??f,Ue=L?.canOverrideMultiCompany??!0,ze=pe??(J?"page":"modal"),Tt={uuid:"000",code:"000",name:"Global"},be=u.useMemo(()=>J?[Tt,...ge]:[],[J,ge]),[de,rt]=u.useState("LIST"),[ye,qe]=u.useState(null),[kt,Ht]=u.useState(null),[Ne,mr]=u.useState(()=>{if(J)return be[0]}),[mt,Ye]=u.useState({show:!1,message:"",color:"zinc"}),fe=u.useCallback((z,U="zinc")=>{Ye({show:!0,message:z,color:U}),setTimeout(()=>{Ye(W=>({...W,show:!1}))},5e3)},[]),Be=u.useCallback(()=>{Ye(z=>({...z,show:!1}))},[]),[Ae,nt]=u.useState({show:!1,company:null}),De=u.useCallback(async(z,U)=>{const W=String(z.uuid)==="000",ke=U||ye?.[a];if(de==="EDIT"&&ke&&J&&!W&&!(ue?.(kt||ke,z.uuid)??!0)){nt({show:!0,company:z});return}if(mr(z),we?.(z,ke),de==="EDIT"&&ke){Ct(!0);try{let Pe;const je=kt||ke;s.getById?Pe=await s.getById(je,z):Pe=(await s.getAll({page:1,limit:1,filters:{[a]:je}},z)).data[0],Pe&&qe(Pe)}catch{fe("Error al recargar el registro para la nueva compañía","red")}finally{Ct(!1)}}!U&&de==="LIST"&&(ot(1),pt(!0))},[we,de,J,ue,kt,ye,a,s,fe]),Ke=u.useCallback(async()=>{if(!Ae.company||!ye)return;const z=Ae.company,U=ye[a],W=kt||U;Ct(!0),nt({show:!1,company:null});try{await ne?.(W,[z.uuid]),mr(z),we?.(z,W);let ke;s.getById?ke=await s.getById(W,z):ke=(await s.getAll({page:1,limit:1,filters:{[a]:W}},z)).data[0],ke&&(qe(ke),fe(`Registro vinculado y cargado para ${z.name}`,"green"))}catch{fe("Error al vincular el registro dinámicamente","red")}finally{Ct(!1)}},[Ae.company,ye,a,kt,ne,we,s,fe]),Ee=u.useCallback(()=>{if(Ne)return Ne},[Ne]),[Qe,Se]=u.useState([]),Je=u.useMemo(()=>Qe.map(z=>z[a]),[Qe,a]),[Ve,et]=u.useState(!1),[tt,ht]=u.useState([]),[_e,Xe]=u.useState([]),[jt,nr]=u.useState(0),[zt,Dt]=u.useState(!1),[at,Ct]=u.useState(!1),[Zt,pt]=u.useState(!0),[Nt,hr]=u.useState(""),[xt,zr]=u.useState("all"),pr=u.useRef("all"),[Gt,ot]=u.useState(1),[St,dn]=u.useState(),[Ot,Dr]=u.useState(null),[Ut,Or]=u.useState("list"),[sr,gt]=u.useState({show:!1,content:null,title:""}),[bt,Rt]=u.useState({show:!1,record:null,variant:"manual"}),[$r,vt]=u.useState(!1),[Fr,Br]=u.useState(!1),[Et,ar]=u.useState(Le??!1),[xr,gr]=u.useState({show:!1,matches:[],fieldName:""}),[qt,$t]=u.useState({show:!1,record:null,loading:!1}),se=u.useRef(null),re=u.useCallback(async(z,U)=>{if(Ce)try{const W=await Ce(z,U);W&&W.length>0&&gr({show:!0,matches:W,fieldName:z.header})}catch(W){console.error("Error searching matches:",W)}},[Ce]),he=u.useCallback(async z=>{$t({show:!0,record:null,loading:!0});try{let U;s.getById?U=await s.getById(z.id,Ee()):U=(await s.getAll({page:1,limit:1,filters:{[a]:z.id}},Ee())).data[0],U?$t({show:!0,record:U,loading:!1}):(fe("No se pudo encontrar el registro seleccionado","red"),$t(W=>({...W,show:!1,loading:!1})))}catch{fe("Error al cargar los datos del registro","red"),$t(W=>({...W,show:!1,loading:!1}))}},[s,Ee,a,fe]);u.useEffect(()=>{const z=window.matchMedia("(max-width: 1024px)"),U=W=>{Or(W.matches?"grid":"list")};return U(z),z.addEventListener("change",U),()=>z.removeEventListener("change",U)},[]);const Te=u.useCallback(()=>{se.current?.revertAllToGlobal(),vt(!1),fe("Campos restaurados a valores globales","zinc")},[fe]),Oe=u.useCallback(z=>{if(typeof z=="object"&&z!==null){const U=z;if(U.hasError&&U.msgError)return U.msgError;if(U.message)return U.message}return ee.defaultError},[ee]),Mt=u.useMemo(()=>{let z=n;R&&R.length>0?z=n.filter(W=>R.includes(W.accessorKey)):z=n.filter(W=>W.config?.searchable!==!1);const U=z.map(W=>({value:W.accessorKey,label:W.header}));return[{value:"all",label:ee.all},...U]},[n,R,ee]);u.useEffect(()=>{if(xt==="all"&&Mt.length>0){const z=Mt[0].value;zr(z),pr.current=z}},[Mt,xt]);const un=u.useMemo(()=>{const U=n.filter(W=>W.config?.sortable===!0).map(W=>({value:W.accessorKey,label:W.header,field:W.accessorKey,direction:"asc"}));return[{value:"",label:ee.noSort,field:"",direction:"asc"},...U]},[n,ee]),fn=u.useRef(null),nl=u.useCallback(z=>{zt||(fn.current&&fn.current.disconnect(),fn.current=new IntersectionObserver(U=>{U[0].isIntersecting&&Zt&&ot(W=>W+1)}),z&&fn.current.observe(z))},[zt,Zt]),mn=u.useCallback(async()=>{if(Ie&&!(!Zt&&Gt>1&&Ut==="grid"&&V)){Dt(!0);try{const z=pr.current,U={page:Gt,limit:o,search:Ve?void 0:Nt||void 0,searchField:Ve?void 0:z!=="all"?z:void 0,sortBy:St,sortDirection:Ot||void 0,filters:Ve?{advancedFilters:tt}:void 0},W=await s.getAll(U,Ee());Ut==="grid"&&V&&Gt>1?Xe(Pe=>[...Pe,...W.data]):Xe(W.data),nr(W.total);const ke=(Gt-1)*o+W.data.length;pt(ke<W.total)}catch(z){Z&&fe(Oe(z),"red"),p?.(z,"fetch")}finally{Dt(!1)}}},[Gt,o,Nt,St,Ot,s,p,Ut,V,Zt,Oe,fe,Z,Ve,tt]);u.useEffect(()=>{mn()},[mn]);const ea=u.useCallback(z=>{hr(z),ot(1),pt(!0)},[]),sl=u.useCallback((z,U)=>{dn(U?z:void 0),Dr(U)},[]),al=u.useCallback(z=>{const U=z||void 0;dn(U),U&&!Ot&&Dr("asc"),ot(1),pt(!0)},[Ot]),ol=u.useCallback(z=>{Dr(z),St&&(ot(1),pt(!0))},[St]),il=u.useCallback(z=>{zr(z),pr.current=z,hr(""),Nt!==""&&(ot(1),pt(!0))},[Nt]),ll=u.useCallback(z=>{Or(z),ot(1),pt(!0),A?.(z)},[A]),cl=u.useCallback(z=>{ot(z)},[]),Kt=u.useCallback(()=>{qe(null),Ht(null),rt("CREATE")},[]),Vr=u.useCallback(z=>{qe(z),Ht(z[a]),rt("EDIT")},[a]),or=u.useCallback(()=>{rt("LIST"),qe(null),Ht(null)},[]),dl=u.useCallback(z=>{Se(U=>{const ke=_e.map(Bt=>Bt[a]).filter(Bt=>!z.includes(Bt));let Pe=U.filter(Bt=>!ke.includes(Bt[a]));const je=z.filter(Bt=>!U.some(xl=>xl[a]===Bt)),oa=_e.filter(Bt=>je.includes(Bt[a]));return[...Pe,...oa]})},[_e,a]),ta=u.useCallback(()=>{et(z=>(z&&(ht([]),ot(1)),!z))},[]),ul=u.useCallback(z=>{ht(z),ot(1),pt(!0)},[]),[hn,Yn]=u.useState({show:!1,record:null}),pn=u.useCallback(async z=>{_&&!await _(z)||Yn({show:!0,record:z})},[_]),fl=u.useCallback(async()=>{if(hn.record){Dt(!0);try{const z=hn.record[a];await s.delete(z,Ee()),h?.(z),fe("Registro eliminado correctamente","green"),Yn({show:!1,record:null}),Xe(U=>U.filter(W=>W[a]!==z)),nr(U=>Math.max(0,U-1)),Se(U=>U.filter(W=>W[a]!==z))}catch(z){Z&&fe(Oe(z),"red"),p?.(z,"delete")}finally{Dt(!1)}}},[hn.record,a,s,h,p,fe,Oe,Z]),ra=u.useCallback((z,U)=>{if(z.modalContent){const W=typeof z.modalContent=="function"?z.modalContent(U):z.modalContent;gt({show:!0,content:W,title:z.name})}else z.action&&z.action(U,Ee())},[Ee]),na=u.useCallback(()=>{gt({show:!1,content:null,title:""})},[]),sa=u.useCallback(()=>{const z=[];Ie&&Fe&&ce&&z.push({id:"edit",name:ee.edit,icon:t.jsx(hf,{className:"w-4 h-4"}),action:W=>Vr(W),order:100}),J&&z.push({id:"link",name:"Vincular",icon:t.jsx(Tn,{className:"w-4 h-4"}),action:W=>{Rt({show:!0,record:Array.isArray(W)?W[0]:W,variant:"manual"})},order:110}),Re&&z.push({id:"delete",name:ee.delete,icon:t.jsx(pf,{className:"w-4 h-4"}),action:W=>pn(W),order:200});const U=D.map(W=>({...W,order:W.order??0,action:ke=>ra(W,ke)}));return[...z,...U].sort((W,ke)=>(W.order??0)-(ke.order??0))},[Ie,Fe,ce,Re,D,ee,Vr,pn,ra,J,Ee]),Ft=u.useMemo(()=>sa(),[sa]),ml=u.useMemo(()=>{const z=P.map(W=>({...W,action:()=>{W.action?.(Qe),Se([])}})),U=D.filter(W=>W.isGroupAction).map(W=>({...W,action:()=>{W.action?.(Qe),Se([])}}));return[...z,...U]},[P,D,Qe]),br=u.useCallback(async z=>{Ct(!0);try{if(de==="CREATE"){if(F&&!await F(z)){Ct(!1);return}let U={...z};J&&Ne&&String(Ne.uuid)!=="000"&&(U._createInGlobal=!0);const W=await s.create(U,Ee());d?.(W),fe("Registro creado correctamente","green"),qe(W),Ht(W[a]),rt("EDIT"),mn(),J&&(!Ne||String(Ne.uuid)==="000")&&Rt({show:!0,record:W,variant:"success"})}else if(de==="EDIT"&&ye){const U=ye[a];let W={...z};if(J&&Ne&&String(Ne.uuid)!=="000"){const Pe=n.filter(je=>je.config?.allowMultiCompanyOverride).map(je=>je.accessorKey);W._multicompanyMetadata={isOverride:!0,companyUuid:Ne.uuid,overriddenFields:Pe}}if(Y&&!await Y(U,W)){Ct(!1);return}const ke=await s.update(U,W,Ee());rt("LIST"),qe(null),Xe(Pe=>Pe.map(je=>je[a]===U?{...je,...W,...ke||{}}:je)),m?.(ke),fe("Registro actualizado correctamente","green")}}catch(U){Z&&fe(Oe(U),"red"),p?.(U,de==="CREATE"?"create":"update")}finally{Ct(!1)}},[de,ye,a,s,d,m,p,mn,F,Y,fe,Oe,Z,J,Ne,n,Ee]),aa=Math.ceil(jt/o),hl=`flex flex-col gap-6 w-full relative ${C}`.trim(),pl=T?t.jsx(kf,{title:e,searchPlaceholder:xt==="all"?`${ee.search}...`:`${ee.searchBy} ${Mt.find(z=>z.value===xt)?.label}...`,searchValue:Nt,onSearchChange:ea,showSearch:l,filterOptions:Mt,selectedFilter:xt,onFilterChange:il,showFilter:l&&Mt.length>0,filterButtonText:ee.searchBy,sortOptions:un,selectedSort:St,onSortChange:al,sortDirection:Ot||"asc",onSortDirectionChange:ol,showSort:un.length>0,sortButtonText:ee.sortBy,viewType:Ut,onViewChange:ll,showViewToggle:S,showAdvancedSearch:v,globalActions:q,batchActions:ml,hasSelection:Qe.length>0,isAdvancedSearchActive:Ve,onAdvancedSearchToggle:ta,initialFiltersVisible:G,activeByCompany:J,companies:be,selectedCompany:Ne,onCompanyChange:De,extraContent:$&&t.jsx(Q,{type:"default",size:"l",leftIcon:t.jsx(Cr,{className:"w-4 h-4"}),onClick:Kt,children:g||`${ee.create} ${r}`})}):t.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 p-4",children:[t.jsx("h1",{className:"text-xl font-semibold text-[#1355b7] dark:text-primary-custom-600",children:e}),$&&t.jsx(Q,{type:"default",size:"l",leftIcon:t.jsx(Cr,{className:"w-4 h-4"}),onClick:Kt,children:g||`${ee.create} ${r}`})]});return t.jsxs("div",{className:hl,id:w,children:[mt.show&&t.jsx("div",{className:"fixed top-4 right-4 z-[100] animate-in fade-in slide-in-from-top-2",children:t.jsx(hm,{color:mt.color,onClose:Be,showCloseButton:!0,showLeftIcon:!0,leftIcon:mt.color==="red"?t.jsx(tr,{className:"w-4 h-4"}):void 0,children:mt.message})}),t.jsxs("div",{className:`flex-1 flex flex-col transition-all duration-300 bg-background-secondary dark:bg-dark-bg-primary min-h-screen ${ze==="page"&&(de==="CREATE"||de==="EDIT")?"hidden":"block"}`,children:[t.jsx("div",{className:"sticky top-0 z-30 bg-white dark:bg-dark-bg-primary",children:j?j({onSearch:ea,onCreate:Kt,searchTerm:Nt}):pl}),t.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[t.jsx("div",{className:"flex-1 p-5 overflow-auto",children:Ie?t.jsxs(t.Fragment,{children:[Ve&&t.jsx("div",{className:"mb-6",children:t.jsx(dm,{fields:n,onSearch:ul,onClose:ta,initialSearchTerm:Nt,initialSearchField:xt,showConnectors:ve,maxFilters:M,filterableFields:R})}),Ut==="list"?_e.length>0||zt?t.jsx("div",{className:"bg-white dark:bg-dark-bg-primary rounded-2xl p-5 overflow-hidden",children:t.jsx(wf,{fields:n,data:_e,loading:zt,emptyMessage:y||ee.empty,onSort:sl,sortColumn:St,sortDirection:Ot,pagination:aa>1?{currentPage:Gt,totalPages:aa,onPageChange:cl}:void 0,showRowActions:c,actions:Ft,onEdit:Fe?Vr:void 0,onDelete:Re?pn:void 0,rowActions:I,locale:B,enableMultiSelect:te,selectedIds:Je,onSelectionChange:dl})}):t.jsxs("div",{className:"flex flex-col items-center justify-center py-20 px-4 text-center",children:[H?.image?typeof H.image=="string"?t.jsx("img",{src:H.image,alt:"Empty",className:"w-48 h-48 mb-6 opacity-50"}):t.jsx("div",{className:"mb-6 opacity-50",children:H.image}):t.jsx("div",{className:"mb-6 flex items-center justify-center",children:t.jsx("img",{src:fo,alt:"No hay registros",className:"w-64 h-64 mb-4 object-contain"})}),t.jsx("div",{className:"w-full max-w-md text-left",children:t.jsx(Nn,{title:H?.title||"Aún no tienes registros",description:H?.description||"Dale click en el botón nuevo para iniciar",color:"blue"})})]}):t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[_e.length>0?_e.map((z,U)=>t.jsx("div",{ref:U===_e.length-1&&Ut==="grid"&&V?nl:null,children:t.jsx(jf,{data:z,fields:n,actions:Ft,onEdit:Fe?Vr:void 0,onDelete:Re?pn:void 0,rowActions:I,index:U,renderCardContent:ae,enableMultiSelect:te,isSelected:Je.includes(z[a]),onSelect:W=>{if(W)Se(ke=>[...ke,z]);else{const ke=z[a];Se(Pe=>Pe.filter(je=>je[a]!==ke))}}})},z[a]||U)):!zt&&t.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-20 px-4 text-center",children:[H?.image?typeof H.image=="string"?t.jsx("img",{src:H.image,alt:"Empty",className:"w-48 h-48 mb-6 opacity-50"}):t.jsx("div",{className:"mb-6 opacity-50",children:H.image}):t.jsx("div",{className:"mb-6 flex items-center justify-center",children:t.jsx("img",{src:fo,alt:"No hay registros",className:"w-64 h-64 mb-4 object-contain"})}),t.jsx("div",{className:"w-full max-w-md text-left",children:t.jsx(Nn,{title:H?.title||"Aún no tienes registros",description:H?.description||"Dale click en el botón nuevo para iniciar",color:"blue"})})]}),zt&&Array.from({length:4}).map((z,U)=>t.jsx("div",{className:"h-48 bg-gray-100 dark:bg-gray-800 rounded-2xl animate-pulse"},U))]})]}):t.jsx("div",{className:"flex flex-col items-center justify-center py-20 px-4 text-center",children:t.jsx("div",{className:"w-full max-w-md",children:t.jsx(Nn,{title:ee.errorTitle,description:ee.noPermission,color:"red"})})})}),ze==="sidebar"&&(de==="CREATE"||de==="EDIT")&&t.jsx("div",{className:"w-[450px] flex-none p-5 pl-0 animate-in slide-in-from-right duration-300 flex flex-col overflow-hidden",children:t.jsx("div",{className:"max-h-full h-fit bg-white dark:bg-dark-bg-primary rounded-2xl overflow-hidden border border-border-secondary dark:border-dark-border-primary flex flex-col shadow-sm",children:ie?ie({fields:n,entityName:r,initialData:ye||void 0,isEditing:de==="EDIT",loading:at,onSubmit:br,onCancel:or,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:1,width:"100%",className:"max-h-full h-fit border-none rounded-none shadow-none",actions:de==="EDIT"?Ft:void 0,selectedCompany:Ne,activeByCompany:J,showGlobalValues:Et,fullWidthButton:!0,onSearchMatches:re,canOverrideMultiCompany:Ue,companies:be,onCompanyChange:De,onShowGlobalValuesChange:ar,onUseGlobalData:()=>vt(!0),onCreateNew:Kt,onLinkCompanies:()=>Rt({show:!0,record:ye,variant:"manual"})}):t.jsx(Zr,{ref:se,fields:n,entityName:r,initialData:ye||void 0,isEditing:de==="EDIT",loading:at,onSubmit:br,onCancel:or,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:1,width:"100%",className:"max-h-full h-fit border-none rounded-none shadow-none",actions:de==="EDIT"?Ft:void 0,selectedCompany:Ne,activeByCompany:J,fullWidthButton:!0,showGlobalValues:Et,onSearchMatches:re,canOverrideMultiCompany:Ue,companies:be,onCompanyChange:De,onShowGlobalValuesChange:ar,onUseGlobalData:()=>vt(!0),onCreateNew:Kt,onLinkCompanies:()=>Rt({show:!0,record:ye,variant:"manual"})})})})]})]}),(de==="CREATE"||de==="EDIT")&&(ze==="modal"?t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:t.jsx("div",{className:`w-full bg-white dark:bg-dark-bg-primary rounded-xl shadow-2xl flex flex-col overflow-hidden ${oe?"h-[95vh]":"max-h-[90vh]"}`,style:{maxWidth:oe?"95vw":N},children:ie?ie({fields:n,entityName:r,initialData:ye||void 0,isEditing:de==="EDIT",loading:at,onSubmit:br,onCancel:or,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:E,width:"100%",className:"flex-1 min-h-0",actions:de==="EDIT"?Ft:void 0,selectedCompany:Ne,activeByCompany:J,showGlobalValues:Et,fullWidthButton:!1,onSearchMatches:re,canOverrideMultiCompany:Ue,companies:be,onCompanyChange:De,onShowGlobalValuesChange:ar,onUseGlobalData:()=>vt(!0),onCreateNew:Kt,onLinkCompanies:()=>Rt({show:!0,record:ye,variant:"manual"})}):t.jsx(Zr,{ref:se,fields:n,entityName:r,initialData:ye||void 0,isEditing:de==="EDIT",loading:at,onSubmit:br,onCancel:or,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:E,width:"100%",className:"flex-1 min-h-0",actions:de==="EDIT"?Ft:void 0,selectedCompany:Ne,activeByCompany:J,fullWidthButton:!1,showGlobalValues:Et,onSearchMatches:re,canOverrideMultiCompany:Ue,companies:be,onCompanyChange:De,onShowGlobalValuesChange:ar,onUseGlobalData:()=>vt(!0),onCreateNew:Kt,onLinkCompanies:()=>Rt({show:!0,record:ye,variant:"manual"})})})}):ze==="sidebar"?null:t.jsxs("div",{className:"flex-1 flex flex-col min-h-screen bg-background-secondary dark:bg-dark-bg-primary animate-in fade-in duration-300 rounded-tl-2xl overflow-hidden",children:[t.jsxs("div",{className:"sticky top-0 z-30 bg-background-secondary dark:bg-dark-bg-primary border-b border-border-primary dark:border-dark-border-primary p-4 flex items-center justify-between gap-4 w-full",children:[t.jsxs("div",{className:"flex items-center gap-4 overflow-hidden p-1 -m-1",children:[t.jsx(Q,{type:"plain",size:"sm",iconOnly:!0,leftIcon:t.jsx(qa,{className:"w-5 h-5"}),onClick:or,ariaLabel:"Volver",className:"hover:bg-white/50 dark:hover:bg-dark-bg-inverse/10 text-content-secondary"}),t.jsxs("div",{className:"flex flex-col min-w-0",children:[t.jsx("h2",{className:"text-xl font-semibold leading-7 tracking-tight text-[#1355b7] dark:text-primary-custom-600 truncate",children:de==="EDIT"?`${ee.edit} ${r}`:`${ee.create} ${r}`}),t.jsxs("div",{className:"flex flex-wrap gap-2 mt-0.5 items-center",children:[J&&be.length>0&&t.jsx(Ws,{companies:be,selectedCompany:Ne,onCompanyChange:z=>De(z,ye?.[a])}),(typeof O=="function"?O(ye):O||[]).length>0&&(typeof O=="function"?O(ye):O||[]).map((z,U)=>t.jsx(ut,{label:z.label,color:z.color,className:"text-[10px] px-1.5 py-0"},U))]})]})]}),t.jsx("div",{className:"flex-1 flex justify-center max-w-xl",children:le?.(ye)}),t.jsxs("div",{className:"flex items-center gap-3",children:[(de==="EDIT"||de==="CREATE"&&J)&&(()=>{const z=Ft.filter(je=>je.id!=="edit"&&je.id!=="delete"&&je.id!=="link"),U=!Ne||String(Ne.uuid)==="000",W=[];J&&de==="EDIT"&&(U||(W.push({children:"Usar datos globales",icon:t.jsx(_s,{className:"w-4 h-4"}),onClick:()=>vt(!0)}),W.push({children:t.jsxs("div",{className:"flex items-center justify-between w-full gap-4 py-1",children:[t.jsx("span",{className:"text-sm font-medium",children:"Mostrar valores globales"}),t.jsx(Jt,{checked:Et,onChange:()=>{},className:"!w-auto pointer-events-none"})]}),onClick:()=>ar(!Et),className:"hover:bg-transparent"}),W.push({isDivider:!0})),W.push({children:"Vincular compañías",icon:t.jsx(Tn,{className:"w-4 h-4"}),onClick:()=>{Rt({show:!0,record:ye,variant:"manual"})}}),W.push({children:"Crear nuevo registro",icon:t.jsx(Cr,{className:"w-4 h-4"}),onClick:()=>Br(!0)}),W.push({isDivider:!0}));const ke=z.map(je=>({children:je.name,icon:je.icon,disabled:typeof je.disabled=="function"?je.disabled(ye):je.disabled,onClick:()=>je.action?.(ye),className:je.name.toLowerCase().includes("eliminar")||je.name.toLowerCase().includes("delete")?"text-error-content hover:text-error-content dark:text-error-content":""})),Pe=[...W,...ke].filter(je=>!0);return Pe.length===0?null:t.jsx(it,{menuClassName:"w-56",renderTrigger:()=>t.jsx(Q,{type:"outline",size:"l",leftIcon:t.jsx(Sr,{className:"w-4 h-4"}),rightIcon:t.jsx(Gr,{className:"w-4 h-4"}),className:"!bg-transparent !text-primary-custom-600 !border-primary-custom-300",children:"Acciones"}),items:Pe})})(),t.jsx(Q,{type:"default",size:"l",htmlType:"submit",form:"master-crud-main-form",disabled:at,className:"font-bold min-w-[120px]",children:at?"...":x||ee.save})]})]}),t.jsx("div",{className:"flex-1 p-5 overflow-auto",children:t.jsx("div",{className:"bg-white dark:bg-dark-bg-primary rounded-2xl p-8 w-full min-h-[400px] shadow-xs",children:ie?ie({fields:n,entityName:r,initialData:ye||void 0,isEditing:de==="EDIT",loading:at,onSubmit:br,onCancel:or,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:E,width:"100%",className:"w-full",actions:de==="EDIT"?Ft:void 0,hideHeaderFooter:!0,selectedCompany:Ne,activeByCompany:J,showGlobalValues:Et,onSearchMatches:re,canOverrideMultiCompany:Ue}):t.jsx(Zr,{ref:se,id:"master-crud-main-form",fields:n,entityName:r,initialData:ye||void 0,isEditing:de==="EDIT",loading:at,onSubmit:br,onCancel:or,saveButtonText:x||ee.save,cancelButtonText:b||ee.cancel,columns:E,width:"100%",className:"w-full",actions:de==="EDIT"?Ft:void 0,hideHeaderFooter:!0,selectedCompany:Ne,activeByCompany:J,showGlobalValues:Et,onSearchMatches:re,canOverrideMultiCompany:Ue})})})]})),$r&&t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:t.jsx(kr,{title:"¿Deseas usar los datos globales?",description:"Esta acción restaurará todos los campos que permiten sobreescritura a sus valores maestros originales.",onCancel:()=>vt(!1),onConfirm:Te,cancelText:ee.cancelText,confirmText:"Confirmar"})}),Fr&&t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:t.jsx(kr,{title:"¿Deseas crear un nuevo registro?",description:"Se perderán los cambios no guardados en el registro actual y se abrirá el formulario de creación.",onCancel:()=>Br(!1),onConfirm:()=>{Br(!1),Kt()},cancelText:ee.cancelText,confirmText:"Confirmar"})}),Ae.show&&Ae.company&&t.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/50",children:t.jsx(kr,{title:"Registro no vinculado",description:`El registro actual no está vinculado a la compañía "${Ae.company.name}". ¿Deseas vincularlo ahora para poder editarlo en este contexto?`,onCancel:()=>nt({show:!1,company:null}),onConfirm:Ke,cancelText:"Cancelar",confirmText:"Vincular ahora"})}),sr.show&&t.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/50 p-4",children:t.jsxs("div",{className:`bg-white dark:bg-dark-bg-primary rounded-xl shadow-2xl flex flex-col relative ${Me?"w-[95vw] h-[95vh]":"w-full max-w-4xl max-h-[90vh]"}`,children:[t.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border-secondary dark:border-dark-border-primary",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Q,{type:"plain",size:"sm",iconOnly:!0,leftIcon:t.jsx(qa,{className:"w-5 h-5"}),onClick:na,ariaLabel:"Volver"}),t.jsx("h3",{className:"text-lg font-bold text-content-primary dark:text-dark-content-primary",children:sr.title})]}),t.jsx(Q,{type:"outline",size:"xs",iconOnly:!0,leftIcon:t.jsx(tr,{className:"w-4 h-4"}),onClick:na,ariaLabel:"Cerrar",className:"!bg-white dark:!bg-dark-bg-primary"})]}),t.jsx("div",{className:"flex-1 overflow-auto p-4",children:sr.content})]})}),hn.show&&t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:t.jsx(kr,{title:ee.confirmDeleteTitle,description:ee.confirmDeleteDesc,onCancel:()=>Yn({show:!1,record:null}),onConfirm:fl,cancelText:ee.cancelText,confirmText:ee.confirmText})}),J&&bt.show&&bt.record&&t.jsx(um,{isOpen:bt.show,onClose:()=>{const z=bt.variant==="success";Rt(U=>({...U,show:!1,record:null})),z&&(rt("LIST"),qe(null))},recordId:bt.record[a],record:bt.record,companies:be,fields:n,variant:bt.variant,onConfirm:(z,U)=>ne?.(z,U),isLinked:z=>ue?.(bt.record[a],z)??!1}),xr.show&&t.jsx(ni,{isOpen:xr.show,onClose:()=>gr(z=>({...z,show:!1})),matches:xr.matches,fieldName:xr.fieldName,onView:he,onContinue:()=>gr(z=>({...z,show:!1}))}),qt.show&&t.jsx("div",{className:"fixed inset-0 z-[90] flex items-center justify-center bg-black/50 p-4 animate-in fade-in duration-200",children:t.jsxs("div",{className:"bg-white dark:bg-dark-bg-primary rounded-xl shadow-2xl flex flex-col w-[95vw] h-[95vh] overflow-hidden relative",children:[t.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border-secondary dark:border-dark-border-primary shrink-0",children:[t.jsx("div",{className:"flex items-center gap-4",children:t.jsx("h3",{className:"text-lg font-bold text-content-primary dark:text-dark-content-primary",children:"Vista Previa"})}),t.jsx(Q,{type:"outline",size:"xs",iconOnly:!0,leftIcon:t.jsx(tr,{className:"w-4 h-4"}),onClick:()=>$t(z=>({...z,show:!1})),ariaLabel:"Cerrar",className:"!bg-white dark:!bg-dark-bg-primary"})]}),t.jsx("div",{className:"flex-1 overflow-auto bg-background-secondary dark:bg-dark-bg-primary p-5",children:t.jsx("div",{className:"bg-white dark:bg-dark-bg-primary rounded-2xl p-8 w-full min-h-[400px] shadow-xs",children:qt.loading?t.jsx("div",{className:"flex items-center justify-center h-full py-20",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-custom-600"})}):qt.record&&(ie?ie({fields:n,entityName:r,initialData:qt.record,isEditing:!0,loading:!1,isReadOnly:!0,onSubmit:()=>{},onCancel:()=>{},columns:E,width:"100%",className:"w-full",hideHeaderFooter:!0,selectedCompany:Tt,activeByCompany:J,canOverrideMultiCompany:Ue}):t.jsx(Zr,{fields:n,entityName:r,initialData:qt.record,isEditing:!0,loading:!1,isReadOnly:!0,onSubmit:()=>{},onCancel:()=>{},columns:E,width:"100%",className:"w-full",hideHeaderFooter:!0,selectedCompany:Tt,activeByCompany:J,canOverrideMultiCompany:Ue}))})}),t.jsxs("div",{className:"px-[24px] py-[16px] pb-[24px] flex items-center justify-end gap-[12px] shrink-0 w-full border-t border-border-secondary dark:border-dark-border-primary bg-white dark:bg-dark-bg-primary",children:[t.jsx(Q,{type:"outline",size:"l",onClick:()=>$t(z=>({...z,show:!1})),className:"font-medium px-6",children:ee.cancelText}),t.jsx(Q,{type:"default",size:"l",onClick:()=>{const z=qt.record;$t({show:!1,record:null,loading:!1}),gr(U=>({...U,show:!1})),z&&Vr(z)},className:"font-bold px-8",children:ee.edit})]})]})})]})},xm=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:[t.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),t.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),gm=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:t.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),bm=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:[t.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),t.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),vm=({onSubmit:e,onForgotPassword:r,onSignUp:n,isLoading:s=!1,errorMessage:a,className:o="",showBackground:i=!0,variant:l="responsive"})=>{const[c,f]=u.useState(""),[d,m]=u.useState(""),[h,p]=u.useState(!1),[g,x]=u.useState(""),b=w=>{if(w.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){x("Por favor ingresa un email válido");return}x(""),e?.(c,d)},y=w=>{f(w.target.value),g&&x("")},C=()=>{p(!h)};return t.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",o].join(" "),children:[i&&t.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[t.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),t.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),t.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[t.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:t.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),t.jsxs("div",{className:"w-full text-center",children:[t.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),t.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),a&&t.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:a}),t.jsxs("form",{onSubmit:b,className:"w-full flex flex-col gap-2",children:[t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(xm,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:y,disabled:s,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&t.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsx("button",{type:"button",onClick:r,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(gm,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"password-input",type:h?"text":"password",placeholder:"••••••••",value:d,onChange:w=>m(w.target.value),disabled:s,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),t.jsx("button",{type:"button",onClick:C,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":h?"Ocultar contraseña":"Mostrar contraseña",children:t.jsx(bm,{className:"w-4 h-4"})})]})]}),t.jsx("button",{type:"submit",disabled:s||!c||!d,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:s?"Iniciando sesión...":"Iniciar Sesión"})]}),t.jsx("button",{type:"button",onClick:n,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},ym=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:t.jsx("path",{fillRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-5-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 9c-1.825 0-3.422.977-4.295 2.437A5.49 5.49 0 0 0 8 13.5a5.49 5.49 0 0 0 4.294-2.063A4.997 4.997 0 0 0 8 9Z",clipRule:"evenodd"})}),wm=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:[t.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),t.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),km=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:t.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),jm=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:[t.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),t.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Cm=({onSubmit:e,onSignIn:r,onTermsClick:n,onPrivacyClick:s,isLoading:a=!1,errorMessage:o,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[f,d]=u.useState(""),[m,h]=u.useState(""),[p,g]=u.useState(""),[x,b]=u.useState(!1),[y,C]=u.useState(""),w=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(m)){C("Por favor ingresa un email válido");return}C(""),e?.(f,m,p)},j=N=>{h(N.target.value),y&&C("")},I=()=>{b(!x)};return t.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",i].join(" "),children:[l&&t.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[t.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),t.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),t.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[t.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:t.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),t.jsxs("div",{className:"w-full text-center",children:[t.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),t.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),o&&t.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),t.jsxs("form",{onSubmit:w,className:"w-full flex flex-col gap-2",children:[t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(ym,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"name-input",type:"text",placeholder:"Juan Pérez",value:f,onChange:N=>d(N.target.value),disabled:a,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(wm,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:m,onChange:j,disabled:a,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",y?"border-error-border!":""].filter(Boolean).join(" ")})]}),y&&t.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:y})]}),t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(km,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"password-input",type:x?"text":"password",placeholder:"••••••••",value:p,onChange:N=>g(N.target.value),disabled:a,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),t.jsx("button",{type:"button",onClick:I,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":x?"Ocultar contraseña":"Mostrar contraseña",children:t.jsx(jm,{className:"w-4 h-4"})})]})]}),t.jsx("button",{type:"submit",disabled:a||!f||!m||!p,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:a?"Registrando...":"Registrarse"})]}),t.jsx("button",{type:"button",onClick:r,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Ya tengo una cuenta"}),t.jsx("div",{className:"w-full text-center",children:t.jsxs("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:["Al registrarse, estás aceptando nuestras"," ",t.jsx("button",{type:"button",onClick:n,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Condiciones de Uso"})," ","y nuestras"," ",t.jsx("button",{type:"button",onClick:s,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Políticas de Privacidad"}),"."]})})]})]})},Nm=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:t.jsx("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z",clipRule:"evenodd"})}),Sm=({value:e,onChange:r})=>{const n=u.useRef(null),s=u.useCallback(a=>{const o=a.target.value;n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r(o)},300)},[r]);return t.jsx("div",{className:"px-4 pt-4 pb-2",children:t.jsx(Ge,{leftIcon:Nm,placeholder:"Buscar parametros...",defaultValue:e,onChange:s,fullWidth:!0})})},Rm=({tabs:e,activeId:r,onChange:n})=>{const s=u.useRef(null),[a,o]=u.useState(!1),[i,l]=u.useState(!1),c=u.useCallback(()=>{const h=s.current;h&&(o(h.scrollLeft>0),l(h.scrollLeft+h.clientWidth<h.scrollWidth-1))},[]);u.useEffect(()=>{const h=s.current;if(!h)return;c(),h.addEventListener("scroll",c,{passive:!0});const p=new ResizeObserver(c);return p.observe(h),()=>{h.removeEventListener("scroll",c),p.disconnect()}},[c,e]);const f=h=>{const p=s.current;p&&p.scrollBy({left:h==="left"?-200:200,behavior:"smooth"})},d=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:t.jsx("path",{fillRule:"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"})}),m=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:t.jsx("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})});return t.jsxs("div",{className:"relative flex items-center border-b border-border-primary dark:border-dark-border-primary px-4",children:[a&&t.jsx(Q,{type:"plain",size:"sm",iconOnly:!0,leftIcon:d,onClick:()=>f("left"),ariaLabel:"Desplazar tabs a la izquierda",className:"shrink-0 z-10"}),t.jsx("div",{ref:s,className:"flex overflow-x-auto scroll-smooth scrollbar-hide flex-1",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:t.jsx("div",{className:"flex",children:e.map(h=>t.jsx(si,{label:h.label,active:h.id===r,badge:h.badge,onClick:()=>n(h.id)},h.id))})}),i&&t.jsx(Q,{type:"plain",size:"sm",iconOnly:!0,leftIcon:m,onClick:()=>f("right"),ariaLabel:"Desplazar tabs a la derecha",className:"shrink-0 z-10"})]})};function ho(e){const r=new Map;for(const n of e)for(const s of n.parameters)r.set(s.id,s.resolvedValue);return r}function Em(e,r){if(!e.validations||e.validations.length===0)return"";for(const n of e.validations)switch(n.ruleType){case"REGEX":case"FORMAT":{try{if(!new RegExp(n.ruleValue).test(r))return n.errorMessage}catch{}break}case"MIN":{const s=parseFloat(r),a=parseFloat(n.ruleValue);if(!isNaN(s)&&!isNaN(a)&&s<a)return n.errorMessage;break}case"MAX":{const s=parseFloat(r),a=parseFloat(n.ruleValue);if(!isNaN(s)&&!isNaN(a)&&s>a)return n.errorMessage;break}case"MAX_LENGTH":{const s=parseInt(n.ruleValue,10);if(!isNaN(s)&&r.length>s)return n.errorMessage;break}}return""}function us(e,r){if(!r.trim())return e;const n=r.toLowerCase();return e.filter(s=>s.name.toLowerCase().includes(n)||s.code.toLowerCase().includes(n)||s.description.toLowerCase().includes(n))}function Mm(e){return e.filter(r=>r.isVisible!==!1).sort((r,n)=>(r.sortOrder??0)-(n.sortOrder??0))}function Im(e,r,n){let s=0;for(const a of e.parameters){const o=r.get(a.id),i=n.get(a.id);o!==void 0&&o!==i&&s++}return s}function Lm(e,r){let n=0;for(const[s,a]of e)a!==r.get(s)&&n++;return n}function Am(e,r,n){const s=[];for(const a of e)for(const o of a.parameters){const i=r.get(o.id),l=n.get(o.id);i!==void 0&&i!==l&&s.push({parameterId:o.id,parameterCode:o.code,parameterName:o.name,categoryName:a.name,categoryId:a.id,dataType:o.dataType,oldValue:l??"",newValue:i,isSensitive:o.isSensitive,listOptions:o.listOptions,rowVersion:o.rowVersion})}return s}function Tm(e){return e.map(r=>({parameterId:r.parameterId,parameterCode:r.parameterCode,value:r.newValue,rowVersion:r.rowVersion}))}function po(e,r,n,s){if(n)return"••••••••";if(r==="BOOLEAN")return e==="true"?"Sí":"No";if(r==="LIST"&&s){const a=s.find(o=>o.value===e);return a?a.label:e}return e}function zm(e){const r={};for(const n of e)n.ruleType==="MIN"?r.min=parseFloat(n.ruleValue):n.ruleType==="MAX"?r.max=parseFloat(n.ruleValue):n.ruleType==="MAX_LENGTH"&&(r.maxLength=parseInt(n.ruleValue,10));return r}const Dm=({parameter:e,value:r,originalValue:n,onChange:s,onValidationError:a,validationError:o,fetcher:i,readOnly:l=!1})=>{const c=r!==n,{min:f,max:d,maxLength:m}=zm(e.validations),h=g=>{const x=Em(e,g);a(e.id,x)},p=()=>{switch(e.dataType){case"BOOLEAN":return t.jsx(Jt,{label:e.name,description:e.description,checked:r==="true",disabled:l,onChange:g=>{s(e.id,g.target.checked?"true":"false")}});case"LIST":return t.jsx(ur,{label:e.name,options:(e.listOptions??[]).slice().sort((g,x)=>g.sortOrder-x.sortOrder).map(g=>({value:g.value,label:g.label})),value:r,onChange:g=>s(e.id,String(g)),disabled:l,error:!!o,fullWidth:!0});case"ENTITY":return t.jsx(Gn,{entity:e.entityMapping?.targetTableName??"",label:e.name,displayFields:[e.entityMapping?.descriptionField??"name"],value:r||null,onChange:g=>{const x=g?String(g.Id):"";s(e.id,x)},fetcher:i,readOnly:l,error:!!o,errorText:o});case"INT":return t.jsx(Ge,{label:e.name,type:"number",step:"1",min:f,max:d,value:r,onChange:g=>s(e.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:e.description,fullWidth:!0});case"DECIMAL":return t.jsx(Ge,{label:e.name,type:"number",step:"0.01",min:f,max:d,value:r,onChange:g=>s(e.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:e.description,fullWidth:!0});case"PERCENTAGE":return t.jsx(Ge,{label:e.name,type:"number",step:"0.01",min:f??0,max:d??100,value:r,onChange:g=>s(e.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:e.description,rightIcon:t.jsx("span",{className:"text-content-secondary dark:text-dark-content-secondary text-sm",children:"%"}),fullWidth:!0});case"EMAIL":return t.jsx(Ge,{label:e.name,type:e.isSensitive?"password":"email",value:r,onChange:g=>s(e.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:e.description,maxLength:m,fullWidth:!0});case"URL":return t.jsx(Ge,{label:e.name,type:e.isSensitive?"password":"url",value:r,onChange:g=>s(e.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:e.description,maxLength:m,fullWidth:!0});case"STRING":return t.jsx(Ge,{label:e.name,type:e.isSensitive?"password":"text",value:r,onChange:g=>s(e.id,g.target.value),onBlur:()=>h(r),disabled:l,error:!!o,errorMessage:o,helperText:e.description,maxLength:m,fullWidth:!0});default:return t.jsx(Ge,{label:e.name,type:"text",value:"Tipo no soportado",disabled:!0,helperText:`Tipo de dato "${e.dataType}" no es soportado.`,fullWidth:!0})}};return t.jsxs("div",{className:"relative flex flex-col",children:[c&&t.jsx("div",{className:"mb-1",children:t.jsx(ut,{color:"blue",label:"Modificado"})}),p()]})},Om=({parameters:e,editedValues:r,originalValues:n,validationErrors:s,onChange:a,onValidationError:o,fetcher:i,readOnly:l=!1})=>{const c=Mm(e);return c.length===0?t.jsx("div",{className:"flex items-center justify-center py-12 text-content-secondary dark:text-dark-content-secondary text-sm",children:"No se encontraron parametros para mostrar."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 p-4",children:c.map(f=>{const d=r.has(f.id)?r.get(f.id):n.get(f.id)??"",m=n.get(f.id)??"";return t.jsx(Dm,{parameter:f,value:d,originalValue:m,onChange:a,onValidationError:o,validationError:s.get(f.id)||void 0,fetcher:i,readOnly:l},f.id)})})},$m=({changes:e,onConfirm:r,onCancel:n,onUndoChange:s,saving:a,confirmButtonText:o="Confirmar",cancelButtonText:i="Cancelar"})=>{const l=e.reduce((f,d)=>(f[d.categoryName]||(f[d.categoryName]=[]),f[d.categoryName].push(d),f),{}),c=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-3.5 h-3.5",children:t.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})});return t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:f=>{f.target===f.currentTarget&&n()},children:t.jsxs("div",{className:"bg-bg-primary dark:bg-dark-bg-primary rounded-2xl shadow-xl max-w-[640px] w-full mx-4 max-h-[80vh] flex flex-col",children:[t.jsxs("div",{className:"px-6 py-4 border-b border-border-primary dark:border-dark-border-primary",children:[t.jsx("h2",{className:"text-lg font-semibold text-content-primary dark:text-dark-content-primary",children:"Resumen de cambios"}),t.jsxs("p",{className:"text-sm text-content-secondary dark:text-dark-content-secondary mt-1",children:[e.length," ",e.length===1?"cambio pendiente":"cambios pendientes"]})]}),t.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:Object.entries(l).map(([f,d])=>t.jsxs("div",{className:"mb-6 last:mb-0",children:[t.jsx("h3",{className:"text-sm font-medium text-content-tertiary dark:text-dark-content-tertiary uppercase tracking-wider mb-3",children:f}),t.jsx("div",{className:"space-y-3",children:d.map(m=>{const h=po(m.oldValue,m.dataType,m.isSensitive,m.listOptions),p=po(m.newValue,m.dataType,m.isSensitive,m.listOptions);return t.jsxs("div",{className:"flex items-start justify-between gap-3 p-3 rounded-lg bg-background-secondary dark:bg-dark-bg-secondary",children:[t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-content-primary dark:text-dark-content-primary",children:m.parameterName}),t.jsxs("div",{className:"flex items-center gap-2 mt-1 text-sm",children:[t.jsx("span",{className:"text-content-secondary dark:text-dark-content-secondary line-through truncate",children:h||"(vacío)"}),t.jsx("span",{className:"text-content-tertiary dark:text-dark-content-tertiary",children:"→"}),t.jsx("span",{className:"text-content-primary dark:text-dark-content-primary font-medium truncate",children:p||"(vacío)"})]})]}),t.jsxs("button",{type:"button",onClick:()=>s(m.parameterId),"aria-label":`Quitar cambio en ${m.parameterName}`,className:`
|
|
1709
1716
|
shrink-0 flex items-center gap-1 px-2 py-1 rounded-md
|
|
1710
1717
|
text-xs font-medium
|
|
1711
1718
|
text-content-extensions-red dark:text-red-400
|
|
1712
1719
|
hover:bg-red-50 dark:hover:bg-red-950/30
|
|
1713
1720
|
transition-colors cursor-pointer
|
|
1714
|
-
`,children:[c,"Quitar"]})]},
|
|
1721
|
+
`,children:[c,"Quitar"]})]},m.parameterId)})})]},f))}),t.jsxs("div",{className:"px-6 py-4 border-t border-border-primary dark:border-dark-border-primary flex items-center justify-end gap-3",children:[t.jsx(Q,{type:"outline-solid",onClick:n,disabled:a,children:i}),t.jsx(Q,{onClick:r,disabled:a||e.length===0,children:a?"Guardando...":o})]})]})})},Fm=({categories:e,onSave:r,fetcher:n,onError:s,onSaveSuccess:a,className:o="",readOnly:i=!1,saveButtonText:l="Guardar cambios",confirmButtonText:c="Confirmar",cancelButtonText:f="Cancelar"})=>{const d=u.useRef(ho(e)),[m,h]=u.useState(new Map),[p,g]=u.useState(e[0]?.id??""),[x,b]=u.useState(""),[y,C]=u.useState(!1),[w,j]=u.useState(new Map),[I,N]=u.useState(!1),E=u.useMemo(()=>x.trim()?e.map(D=>({...D,parameters:us(D.parameters,x)})).filter(D=>D.parameters.length>0):e,[e,x]),S=u.useMemo(()=>E.map(D=>({id:D.id,label:D.name,badge:Im(D,m,d.current)||void 0})),[E,m]),v=u.useMemo(()=>E.find(D=>D.id===p),[E,p]),R=u.useMemo(()=>v?x.trim()?us(v.parameters,x):v.parameters:[],[v,x]),T=u.useMemo(()=>Lm(m,d.current),[m]),A=u.useMemo(()=>Am(e,m,d.current),[e,m]),V=u.useCallback((D,q)=>{h(P=>{const H=new Map(P);return H.set(D,q),H}),j(P=>{if(!P.has(D))return P;const H=new Map(P);return H.delete(D),H})},[]),F=u.useCallback((D,q)=>{j(P=>{const H=new Map(P);return q?H.set(D,q):H.delete(D),H})},[]),Y=u.useCallback(D=>{g(D)},[]),_=u.useCallback(D=>{if(b(D),D.trim()){const q=e.map(P=>({...P,parameters:us(P.parameters,D)})).filter(P=>P.parameters.length>0);q.length>0&&!q.some(P=>P.id===p)&&g(q[0].id)}},[e,p]),B=u.useCallback(()=>{w.size>0||C(!0)},[w]),L=u.useCallback(D=>{h(q=>{const P=new Map(q);return P.delete(D),Array.from(P.entries()).some(([ae,ie])=>ie!==d.current.get(ae))||C(!1),P})},[]),Z=u.useCallback(async()=>{if(!I){N(!0);try{const D=Tm(A);await r(D),h(new Map),d.current=ho(e);for(const q of A)d.current.set(q.parameterId,q.newValue);C(!1),a?.()}catch(D){s?.(D instanceof Error?D:new Error("Error al guardar los cambios"))}finally{N(!1)}}},[I,A,r,e,a,s]);return e.length===0?t.jsx("div",{className:`
|
|
1715
1722
|
flex items-center justify-center py-16
|
|
1716
1723
|
text-content-secondary dark:text-dark-content-secondary text-sm
|
|
1717
1724
|
${o}
|
|
1718
|
-
`.trim().replace(/\s+/g," "),children:"No hay categorias de parametros disponibles."}):
|
|
1725
|
+
`.trim().replace(/\s+/g," "),children:"No hay categorias de parametros disponibles."}):t.jsxs("div",{className:`
|
|
1719
1726
|
flex flex-col h-full
|
|
1720
1727
|
bg-bg-primary dark:bg-dark-bg-primary
|
|
1721
1728
|
border border-border-primary dark:border-dark-border-primary
|
|
1722
1729
|
rounded-xl overflow-hidden
|
|
1723
1730
|
${o}
|
|
1724
|
-
`.trim().replace(/\s+/g," "),children:[e.jsx(nu,{value:x,onChange:V}),L.length>0&&e.jsx(su,{tabs:L,activeId:p,onChange:Q}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:O.length===0?e.jsx("div",{className:"flex items-center justify-center py-12 text-content-secondary dark:text-dark-content-secondary text-sm",children:"No se encontraron parametros que coincidan con la busqueda."}):e.jsx(mu,{parameters:R,editedValues:f,originalValues:d.current,validationErrors:w,onChange:P,onValidationError:D,fetcher:n,readOnly:i})}),!i&&e.jsxs("div",{className:"sticky bottom-0 px-4 py-3 border-t border-border-primary dark:border-dark-border-primary bg-bg-primary dark:bg-dark-bg-primary flex items-center justify-end gap-3",children:[z>0&&e.jsx(Ge,{color:"blue",label:`${z} ${z===1?"cambio":"cambios"}`}),e.jsx(X,{onClick:_,disabled:z===0||w.size>0,children:l})]}),y&&e.jsx(hu,{changes:A,onConfirm:U,onCancel:()=>j(!1),onUndoChange:E,saving:I,confirmButtonText:c,cancelButtonText:u})]})},xu=({productName:t="Mi Aplicación",siesaLogoPath:r,siesaLogoWidth:n,siesaLogoHeight:s,userDropdown:a,navigationItems:o,children:i,className:l="",contentClassName:c="",hideSidebar:u=!1,navbarProps:d={},navigationRailProps:f={}})=>{const[h,p]=m.useState("collapsed"),g=x=>{x&&p(x)};return e.jsxs("div",{className:["h-screen","w-full","bg-white","dark:bg-dark-bg-primary","flex","flex-col","overflow-hidden",l].join(" ").replace(/\s+/g," ").trim(),children:[e.jsx(Fr,{productName:t,userDropdown:a,hideActionButtons:!0,showSiesaLogoLeading:!0,showBusinessLogo:!1,siesaLogo:r?e.jsx("img",{src:r,alt:"Siesa",className:"object-contain",style:{width:n||"100%",height:s||"100%"}}):void 0,className:"bg-white dark:bg-dark-bg-primary",...d}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[!u&&e.jsx(pn,{state:h,items:o,showSearchButton:!1,onStateChange:g,...f}),e.jsx("div",{className:["flex-1","overflow-y-auto","bg-gray-50","dark:bg-dark-bg-primary","p-6",c].join(" ").replace(/\s+/g," ").trim(),children:i})]})]})},gu=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.543 2.232a.75.75 0 0 0-1.085 0l-5.25 5.5A.75.75 0 0 0 2.75 9H4v4a1 1 0 0 0 1 1h1.5a.5.5 0 0 0 .5-.5v-2a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v2a.5.5 0 0 0 .5.5H12a1 1 0 0 0 1-1V9h1.25a.75.75 0 0 0 .543-1.268l-5.25-5.5Z"})}),bu=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM5.37 2.822a6.493 6.493 0 0 0-2.818 3.428h2.103c.088-.907.254-1.778.494-2.595a8.932 8.932 0 0 1 .221-.833ZM1.5 8c0 .522.062 1.03.179 1.516l.135.484h2.49a16.15 16.15 0 0 1 0-4H1.815L1.68 6.484A6.533 6.533 0 0 0 1.5 8Zm.552 2.75A6.493 6.493 0 0 0 5.37 14.18a8.932 8.932 0 0 1-.221-.833 13.2 13.2 0 0 1-.494-2.595H2.552Zm4.058 0c.083.78.23 1.497.429 2.128.197.622.423 1.07.649 1.357.225.286.401.265.312.265.089 0 .265.021.49-.265.226-.287.452-.735.649-1.357.199-.631.346-1.348.429-2.128H6.11Zm4.234 0a13.198 13.198 0 0 1-.494 2.595 8.938 8.938 0 0 1-.22.833 6.493 6.493 0 0 0 2.817-3.428h-2.103Zm2.104-2h-2.48a16.15 16.15 0 0 0 0-4h2.48l.135.484A6.538 6.538 0 0 1 14.5 8a6.538 6.538 0 0 1-.179 1.516l-.135.484h.162Zm-2.818-4.928c.167.251.394.699.221.833.24.817.406 1.688.494 2.595h2.103a6.493 6.493 0 0 0-2.818-3.428ZM9.89 6h-3.78c.083-.78.23-1.497.429-2.128.197-.622.423-1.07.649-1.357.225-.286.401-.265.312-.265.089 0 .265-.021.49.265.226.287.452.735.649 1.357.199.631.346 1.348.429 2.128Zm-4.234 0H3.553a6.493 6.493 0 0 1 2.818-3.428 8.932 8.932 0 0 0-.221.833c-.24.817-.406 1.688-.494 2.595Zm.144 2a14.65 14.65 0 0 0 0 4h4.4a14.65 14.65 0 0 0 0-4H5.8Z"})}),vu=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.414A2 2 0 0 0 13.414 5L10 1.586A2 2 0 0 0 8.586 1H4Zm1 5a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1H5Zm-.5 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5Zm.5 1.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1H5Z",clipRule:"evenodd"})}),yu=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z"})}),ku=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2 4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4ZM10 4a2 2 0 0 1 2-2h.5a.5.5 0 0 1 0 1H12a1 1 0 0 0-1 1v.5a.5.5 0 0 1-1 0V4ZM2 12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v2ZM10.5 8a.5.5 0 0 0-.5.5V10H8.5a.5.5 0 0 0 0 1H10v1.5a.5.5 0 0 0 1 0V11h1.5a.5.5 0 0 0 0-1H11V8.5a.5.5 0 0 0-.5-.5Z"})}),wu=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),ju=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1ZM4.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM4 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 4 8Zm.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM3 8a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-.5 4.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z",clipRule:"evenodd"})}),Cu=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M14 2H2c-.55 0-.95.538-.75 1.032l3 7.5c.127.318.44.528.783.528h5.934c.343 0 .656-.21.783-.528l3-7.5C14.95 2.538 14.55 2 14 2Z"}),e.jsx("path",{d:"M6 12.25v1.25a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1.25H6Z"})]}),Nu=({className:t=""})=>e.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),Su=({className:t=""})=>e.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Ru=({title:t="List View",navbarProductName:r="SB Commercial",tableTitle:n="Usuarios",columns:s,data:a,navigationItems:o,quickFilters:i,actionButtons:l,userDropdown:c,notifications:u,environmentBadge:d,showNavigationRail:f=!0,navigationRailState:h="collapsed",onNavigationRailStateChange:p,onNavItemClick:g,onSearch:x,searchPlaceholder:b="Buscar",onSort:y,sortColumn:j,sortDirection:w,pagination:C,loading:I=!1,loadingRows:S=5,emptyMessage:O="No hay datos disponibles",className:L="",onNotificationsClick:k,viewOptions:R,selectedViewOption:z,onViewOptionChange:A})=>{const[P,D]=m.useState(""),[Q,V]=m.useState(!1),_=o||[{id:"home",icon:e.jsx(gu,{className:"w-4 h-4"}),label:"Inicio",active:!0},{id:"option1",icon:e.jsx(bu,{className:"w-4 h-4"}),label:"Opción 1"},{id:"option2",icon:e.jsx(vu,{className:"w-4 h-4"}),label:"Opción 2"},{id:"option3",icon:e.jsx(yu,{className:"w-4 h-4"}),label:"Opción 3"},{id:"more",icon:e.jsx(ku,{className:"w-4 h-4"}),label:"Ver más..."}],E=i||[{id:"paid",label:"Facturas Pagadas",color:"lime"},{id:"pending",label:"Facturas Pendientes por Pago",color:"rose"},{id:"orders",label:"Órdenes de Compra",color:"sky"}],U=l||[{id:"audit",label:"Auditoría",leftIcon:e.jsx(ju,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"filter",label:"Filtrar",leftIcon:e.jsx(Cu,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"create",label:"Crear",leftIcon:e.jsx(wu,{className:"w-4 h-4"}),type:"default",onClick:()=>{}}],T=H=>{D(H.target.value),x?.(H.target.value)},Y=s.map(H=>({header:H.header,accessor:H.accessor,sortable:H.sortable,render:H.render,align:H.align,width:H.width}));return e.jsxs("div",{className:["bg-background-secondary","dark:bg-dark-bg-primary","flex","w-full","h-full","min-h-screen",L].join(" "),children:[f&&e.jsx(pn,{state:h,items:_,onStateChange:p,onItemClick:g,showSearchButton:!0}),e.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[e.jsx(Fr,{productName:r,environmentBadge:d,userDropdown:c,notifications:u,hideActionButtons:!1,onNotificationsClick:k,className:"bg-background-secondary dark:bg-dark-bg-primary"}),e.jsx("div",{className:"flex items-center gap-2 px-4 py-2 w-full bg-background-secondary dark:bg-dark-bg-primary",children:E.map(H=>e.jsx(Ge,{color:H.color,label:H.label,leftIcon:H.icon},H.id))}),e.jsx("div",{className:"flex flex-1 overflow-hidden bg-background-secondary dark:bg-dark-bg-primary",children:e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary p-4 rounded-tl-3xl overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("h2",{className:"font-bold text-xl leading-7 tracking-[-0.5px] text-content-primary dark:text-dark-content-primary",children:t}),e.jsx("div",{className:"flex items-center gap-2",children:U.map(H=>e.jsx(X,{type:H.type,size:"sm",leftIcon:H.leftIcon,onClick:H.onClick,children:H.label},H.id))})]}),e.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl p-8 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-4 w-full",children:[e.jsx("h3",{className:"flex-1 font-bold text-base leading-6 text-content-primary dark:text-dark-content-primary overflow-hidden text-ellipsis whitespace-nowrap",children:n}),e.jsx(Te,{placeholder:b,leftIcon:e.jsx(Su,{className:"w-4 h-4"}),value:P,onChange:T,className:"w-[200px]"}),R&&e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>V(!Q),className:"flex items-center gap-3 px-3 py-2 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-xs hover:bg-background-secondary dark:hover:bg-dark-bg-secondary transition-colors",children:[e.jsx("span",{className:"font-bold text-sm text-content-secondary dark:text-content-secondary",children:"Ver"}),e.jsx(Nu,{className:"w-5 h-5 text-content-secondary dark:text-content-secondary"})]}),Q&&e.jsx("div",{className:"absolute top-full right-0 mt-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-lg z-10 min-w-[150px]",children:R.map(H=>e.jsx("button",{onClick:()=>{A?.(H.id),V(!1)},className:["block","w-full","px-4","py-2","text-left","text-sm","hover:bg-background-secondary","dark:hover:bg-dark-bg-secondary",z===H.id?"bg-primary-custom-100 dark:bg-primary-custom-600/20":""].join(" "),children:H.label},H.id))})]})]}),e.jsx(Qn,{columns:Y,data:a,variant:"grid",showBorder:!1,showShadow:!1,loading:I,loadingRows:S,emptyMessage:O,onSort:y,sortColumn:j,sortDirection:w,pagination:C,className:"flex-1"})]})]})})]})]})},Eu=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Mu=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Iu=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Lu=({onSubmit:t,onForgotPassword:r,onSignUp:n,isLoading:s=!1,errorMessage:a,className:o="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=m.useState(""),[d,f]=m.useState(""),[h,p]=m.useState(!1),[g,x]=m.useState(""),b=w=>{if(w.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){x("Por favor ingresa un email válido");return}x(""),t?.(c,d)},y=w=>{u(w.target.value),g&&x("")},j=()=>{p(!h)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",o].join(" "),children:[i&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),a&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:a}),e.jsxs("form",{onSubmit:b,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Eu,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:y,disabled:s,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("button",{type:"button",onClick:r,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Mu,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:h?"text":"password",placeholder:"••••••••",value:d,onChange:w=>f(w.target.value),disabled:s,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:j,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":h?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Iu,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:s||!c||!d,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:s?"Iniciando sesión...":"Iniciar Sesión"})]}),e.jsx("button",{type:"button",onClick:n,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},Au=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M14 8a.75.75 0 0 1-.75.75H4.56l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 1.06L4.56 7.25h8.69A.75.75 0 0 1 14 8Z",clipRule:"evenodd"})}),zu=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"})}),vo=({tableTitle:t="Mesa 1",changeTableLabel:r="Cambiar Mesa",menusTitle:n="Menús",menus:s=[{id:"1",label:"Corral"},{id:"2",label:"Burguer One"},{id:"3",label:"Andrés Carne de Res"},{id:"4",label:"Aceites"},{id:"5",label:"Kiosco Mac"},{id:"6",label:"Kiosco Qbano"},{id:"7",label:"Premier Dinning"}],selectedMenuId:a="1",onMenuSelect:o,onChangeTable:i,categoryTitle:l="Categoría",categories:c=[],selectedCategoryId:u,onCategorySelect:d,productsTitle:f="Productos",products:h=[],onAddProduct:p,activeTab:g="products",onTabChange:x,orderItems:b=[],onOrderItemQuantityChange:y,onOrderItemDelete:j,subtotal:w="40,000.00",taxes:C="40,000.00",total:I="40,000.00",confirmLabel:S="Confirmar Pedido",onConfirmOrder:O,isLoading:L=!1,errorMessage:k,userAvatar:R,userName:z="Jhonnatan Diaz",userRole:A="Administrador",businessLogo:P,siesaLogo:D,className:Q=""})=>e.jsxs("div",{className:`
|
|
1731
|
+
`.trim().replace(/\s+/g," "),children:[t.jsx(Sm,{value:x,onChange:_}),S.length>0&&t.jsx(Rm,{tabs:S,activeId:p,onChange:Y}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:E.length===0?t.jsx("div",{className:"flex items-center justify-center py-12 text-content-secondary dark:text-dark-content-secondary text-sm",children:"No se encontraron parametros que coincidan con la busqueda."}):t.jsx(Om,{parameters:R,editedValues:m,originalValues:d.current,validationErrors:w,onChange:V,onValidationError:F,fetcher:n,readOnly:i})}),!i&&t.jsxs("div",{className:"sticky bottom-0 px-4 py-3 border-t border-border-primary dark:border-dark-border-primary bg-bg-primary dark:bg-dark-bg-primary flex items-center justify-end gap-3",children:[T>0&&t.jsx(ut,{color:"blue",label:`${T} ${T===1?"cambio":"cambios"}`}),t.jsx(Q,{onClick:B,disabled:T===0||w.size>0,children:l})]}),y&&t.jsx($m,{changes:A,onConfirm:Z,onCancel:()=>C(!1),onUndoChange:L,saving:I,confirmButtonText:c,cancelButtonText:f})]})},Bm=({productName:e="Mi Aplicación",siesaLogoPath:r,siesaLogoWidth:n,siesaLogoHeight:s,userDropdown:a,navigationItems:o,children:i,className:l="",contentClassName:c="",hideSidebar:f=!1,navbarProps:d={},navigationRailProps:m={}})=>{const[h,p]=u.useState("collapsed"),g=x=>{x&&p(x)};return t.jsxs("div",{className:["h-screen","w-full","bg-white","dark:bg-dark-bg-primary","flex","flex-col","overflow-hidden",l].join(" ").replace(/\s+/g," ").trim(),children:[t.jsx(an,{productName:e,userDropdown:a,hideActionButtons:!0,showSiesaLogoLeading:!0,showBusinessLogo:!1,siesaLogo:r?t.jsx("img",{src:r,alt:"Siesa",className:"object-contain",style:{width:n||"100%",height:s||"100%"}}):void 0,className:"bg-white dark:bg-dark-bg-primary",...d}),t.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[!f&&t.jsx(Hn,{state:h,items:o,showSearchButton:!1,onStateChange:g,...m}),t.jsx("div",{className:["flex-1","overflow-y-auto","bg-gray-50","dark:bg-dark-bg-primary","p-6",c].join(" ").replace(/\s+/g," ").trim(),children:i})]})]})},Vm=({className:e=""})=>t.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M8.543 2.232a.75.75 0 0 0-1.085 0l-5.25 5.5A.75.75 0 0 0 2.75 9H4v4a1 1 0 0 0 1 1h1.5a.5.5 0 0 0 .5-.5v-2a1 1 0 0 1 1-1h.5a1 1 0 0 1 1 1v2a.5.5 0 0 0 .5.5H12a1 1 0 0 0 1-1V9h1.25a.75.75 0 0 0 .543-1.268l-5.25-5.5Z"})}),Pm=({className:e=""})=>t.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM5.37 2.822a6.493 6.493 0 0 0-2.818 3.428h2.103c.088-.907.254-1.778.494-2.595a8.932 8.932 0 0 1 .221-.833ZM1.5 8c0 .522.062 1.03.179 1.516l.135.484h2.49a16.15 16.15 0 0 1 0-4H1.815L1.68 6.484A6.533 6.533 0 0 0 1.5 8Zm.552 2.75A6.493 6.493 0 0 0 5.37 14.18a8.932 8.932 0 0 1-.221-.833 13.2 13.2 0 0 1-.494-2.595H2.552Zm4.058 0c.083.78.23 1.497.429 2.128.197.622.423 1.07.649 1.357.225.286.401.265.312.265.089 0 .265.021.49-.265.226-.287.452-.735.649-1.357.199-.631.346-1.348.429-2.128H6.11Zm4.234 0a13.198 13.198 0 0 1-.494 2.595 8.938 8.938 0 0 1-.22.833 6.493 6.493 0 0 0 2.817-3.428h-2.103Zm2.104-2h-2.48a16.15 16.15 0 0 0 0-4h2.48l.135.484A6.538 6.538 0 0 1 14.5 8a6.538 6.538 0 0 1-.179 1.516l-.135.484h.162Zm-2.818-4.928c.167.251.394.699.221.833.24.817.406 1.688.494 2.595h2.103a6.493 6.493 0 0 0-2.818-3.428ZM9.89 6h-3.78c.083-.78.23-1.497.429-2.128.197-.622.423-1.07.649-1.357.225-.286.401-.265.312-.265.089 0 .265-.021.49.265.226.287.452.735.649 1.357.199.631.346 1.348.429 2.128Zm-4.234 0H3.553a6.493 6.493 0 0 1 2.818-3.428 8.932 8.932 0 0 0-.221.833c-.24.817-.406 1.688-.494 2.595Zm.144 2a14.65 14.65 0 0 0 0 4h4.4a14.65 14.65 0 0 0 0-4H5.8Z"})}),_m=({className:e=""})=>t.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",d:"M4 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6.414A2 2 0 0 0 13.414 5L10 1.586A2 2 0 0 0 8.586 1H4Zm1 5a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1H5Zm-.5 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5Zm.5 1.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1H5Z",clipRule:"evenodd"})}),Wm=({className:e=""})=>t.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z"})}),Hm=({className:e=""})=>t.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M2 4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4ZM10 4a2 2 0 0 1 2-2h.5a.5.5 0 0 1 0 1H12a1 1 0 0 0-1 1v.5a.5.5 0 0 1-1 0V4ZM2 12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v2ZM10.5 8a.5.5 0 0 0-.5.5V10H8.5a.5.5 0 0 0 0 1H10v1.5a.5.5 0 0 0 1 0V11h1.5a.5.5 0 0 0 0-1H11V8.5a.5.5 0 0 0-.5-.5Z"})}),Zm=({className:e=""})=>t.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),Gm=({className:e=""})=>t.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",d:"M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1ZM4.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM4 8a.75.75 0 0 1 .75-.75h8.5a.75.75 0 0 1 0 1.5h-8.5A.75.75 0 0 1 4 8Zm.75 3.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5ZM3 8a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-.5 4.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z",clipRule:"evenodd"})}),Um=({className:e=""})=>t.jsxs("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M14 2H2c-.55 0-.95.538-.75 1.032l3 7.5c.127.318.44.528.783.528h5.934c.343 0 .656-.21.783-.528l3-7.5C14.95 2.538 14.55 2 14 2Z"}),t.jsx("path",{d:"M6 12.25v1.25a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1.25H6Z"})]}),qm=({className:e=""})=>t.jsx("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{fillRule:"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})}),Km=({className:e=""})=>t.jsxs("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),t.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Xm=({title:e="List View",navbarProductName:r="SB Commercial",tableTitle:n="Usuarios",columns:s,data:a,navigationItems:o,quickFilters:i,actionButtons:l,userDropdown:c,notifications:f,environmentBadge:d,showNavigationRail:m=!0,navigationRailState:h="collapsed",onNavigationRailStateChange:p,onNavItemClick:g,onSearch:x,searchPlaceholder:b="Buscar",onSort:y,sortColumn:C,sortDirection:w,pagination:j,loading:I=!1,loadingRows:N=5,emptyMessage:E="No hay datos disponibles",className:S="",onNotificationsClick:v,viewOptions:R,selectedViewOption:T,onViewOptionChange:A})=>{const[V,F]=u.useState(""),[Y,_]=u.useState(!1),B=o||[{id:"home",icon:t.jsx(Vm,{className:"w-4 h-4"}),label:"Inicio",active:!0},{id:"option1",icon:t.jsx(Pm,{className:"w-4 h-4"}),label:"Opción 1"},{id:"option2",icon:t.jsx(_m,{className:"w-4 h-4"}),label:"Opción 2"},{id:"option3",icon:t.jsx(Wm,{className:"w-4 h-4"}),label:"Opción 3"},{id:"more",icon:t.jsx(Hm,{className:"w-4 h-4"}),label:"Ver más..."}],L=i||[{id:"paid",label:"Facturas Pagadas",color:"lime"},{id:"pending",label:"Facturas Pendientes por Pago",color:"rose"},{id:"orders",label:"Órdenes de Compra",color:"sky"}],Z=l||[{id:"audit",label:"Auditoría",leftIcon:t.jsx(Gm,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"filter",label:"Filtrar",leftIcon:t.jsx(Um,{className:"w-4 h-4"}),type:"default",onClick:()=>{}},{id:"create",label:"Crear",leftIcon:t.jsx(Zm,{className:"w-4 h-4"}),type:"default",onClick:()=>{}}],D=P=>{F(P.target.value),x?.(P.target.value)},q=s.map(P=>({header:P.header,accessor:P.accessor,sortable:P.sortable,render:P.render,align:P.align,width:P.width}));return t.jsxs("div",{className:["bg-background-secondary","dark:bg-dark-bg-primary","flex","w-full","h-full","min-h-screen",S].join(" "),children:[m&&t.jsx(Hn,{state:h,items:B,onStateChange:p,onItemClick:g,showSearchButton:!0}),t.jsxs("div",{className:"flex flex-col flex-1 overflow-hidden",children:[t.jsx(an,{productName:r,environmentBadge:d,userDropdown:c,notifications:f,hideActionButtons:!1,onNotificationsClick:v,className:"bg-background-secondary dark:bg-dark-bg-primary"}),t.jsx("div",{className:"flex items-center gap-2 px-4 py-2 w-full bg-background-secondary dark:bg-dark-bg-primary",children:L.map(P=>t.jsx(ut,{color:P.color,label:P.label,leftIcon:P.icon},P.id))}),t.jsx("div",{className:"flex flex-1 overflow-hidden bg-background-secondary dark:bg-dark-bg-primary",children:t.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary p-4 rounded-tl-3xl overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between w-full",children:[t.jsx("h2",{className:"font-bold text-xl leading-7 tracking-[-0.5px] text-content-primary dark:text-dark-content-primary",children:e}),t.jsx("div",{className:"flex items-center gap-2",children:Z.map(P=>t.jsx(Q,{type:P.type,size:"sm",leftIcon:P.leftIcon,onClick:P.onClick,children:P.label},P.id))})]}),t.jsxs("div",{className:"flex flex-col gap-4 flex-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-xl p-8 overflow-hidden",children:[t.jsxs("div",{className:"flex items-center gap-4 w-full",children:[t.jsx("h3",{className:"flex-1 font-bold text-base leading-6 text-content-primary dark:text-dark-content-primary overflow-hidden text-ellipsis whitespace-nowrap",children:n}),t.jsx(Ge,{placeholder:b,leftIcon:t.jsx(Km,{className:"w-4 h-4"}),value:V,onChange:D,className:"w-[200px]"}),R&&t.jsxs("div",{className:"relative",children:[t.jsxs("button",{onClick:()=>_(!Y),className:"flex items-center gap-3 px-3 py-2 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-xs hover:bg-background-secondary dark:hover:bg-dark-bg-secondary transition-colors",children:[t.jsx("span",{className:"font-bold text-sm text-content-secondary dark:text-content-secondary",children:"Ver"}),t.jsx(qm,{className:"w-5 h-5 text-content-secondary dark:text-content-secondary"})]}),Y&&t.jsx("div",{className:"absolute top-full right-0 mt-1 bg-white dark:bg-dark-bg-primary border border-border-primary dark:border-dark-border-primary rounded-lg shadow-lg z-10 min-w-[150px]",children:R.map(P=>t.jsx("button",{onClick:()=>{A?.(P.id),_(!1)},className:["block","w-full","px-4","py-2","text-left","text-sm","hover:bg-background-secondary","dark:hover:bg-dark-bg-secondary",T===P.id?"bg-primary-custom-100 dark:bg-primary-custom-600/20":""].join(" "),children:P.label},P.id))})]})]}),t.jsx(Bs,{columns:q,data:a,variant:"grid",showBorder:!1,showShadow:!1,loading:I,loadingRows:N,emptyMessage:E,onSort:y,sortColumn:C,sortDirection:w,pagination:j,className:"flex-1"})]})]})})]})]})},Ym=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:[t.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),t.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Qm=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:t.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Jm=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:[t.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),t.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),eh=({onSubmit:e,onForgotPassword:r,onSignUp:n,isLoading:s=!1,errorMessage:a,className:o="",showBackground:i=!0,variant:l="responsive"})=>{const[c,f]=u.useState(""),[d,m]=u.useState(""),[h,p]=u.useState(!1),[g,x]=u.useState(""),b=w=>{if(w.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){x("Por favor ingresa un email válido");return}x(""),e?.(c,d)},y=w=>{f(w.target.value),g&&x("")},C=()=>{p(!h)};return t.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",o].join(" "),children:[i&&t.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[t.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),t.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),t.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[t.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:t.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),t.jsxs("div",{className:"w-full text-center",children:[t.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Iniciar Sesión"}),t.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Inicia sesión ingresando con tu correo electrónico y contraseña."})]}),a&&t.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:a}),t.jsxs("form",{onSubmit:b,className:"w-full flex flex-col gap-2",children:[t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(Ym,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:y,disabled:s,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",g?"border-error-border!":""].filter(Boolean).join(" ")})]}),g&&t.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:g})]}),t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsx("button",{type:"button",onClick:r,className:"text-[12px] leading-4 font-bold text-primary-custom-600 dark:text-[#93d1fd] hover:underline transition-all duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm px-1",children:"Olvidé mi Contraseña"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(Qm,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"password-input",type:h?"text":"password",placeholder:"••••••••",value:d,onChange:w=>m(w.target.value),disabled:s,required:!0,autoComplete:"current-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),t.jsx("button",{type:"button",onClick:C,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":h?"Ocultar contraseña":"Mostrar contraseña",children:t.jsx(Jm,{className:"w-4 h-4"})})]})]}),t.jsx("button",{type:"submit",disabled:s||!c||!d,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:s?"Iniciando sesión...":"Iniciar Sesión"})]}),t.jsx("button",{type:"button",onClick:n,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"¿No tienes una cuenta?"})]})]})},th=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M14 8a.75.75 0 0 1-.75.75H4.56l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 1.06L4.56 7.25h8.69A.75.75 0 0 1 14 8Z",clipRule:"evenodd"})}),rh=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"})}),tl=({tableTitle:e="Mesa 1",changeTableLabel:r="Cambiar Mesa",menusTitle:n="Menús",menus:s=[{id:"1",label:"Corral"},{id:"2",label:"Burguer One"},{id:"3",label:"Andrés Carne de Res"},{id:"4",label:"Aceites"},{id:"5",label:"Kiosco Mac"},{id:"6",label:"Kiosco Qbano"},{id:"7",label:"Premier Dinning"}],selectedMenuId:a="1",onMenuSelect:o,onChangeTable:i,categoryTitle:l="Categoría",categories:c=[],selectedCategoryId:f,onCategorySelect:d,productsTitle:m="Productos",products:h=[],onAddProduct:p,activeTab:g="products",onTabChange:x,orderItems:b=[],onOrderItemQuantityChange:y,onOrderItemDelete:C,subtotal:w="40,000.00",taxes:j="40,000.00",total:I="40,000.00",confirmLabel:N="Confirmar Pedido",onConfirmOrder:E,isLoading:S=!1,errorMessage:v,userAvatar:R,userName:T="Jhonnatan Diaz",userRole:A="Administrador",businessLogo:V,siesaLogo:F,className:Y=""})=>t.jsxs("div",{className:`
|
|
1725
1732
|
min-h-screen
|
|
1726
1733
|
w-full
|
|
1727
1734
|
bg-background-secondary
|
|
1728
1735
|
dark:bg-dark-bg-primary
|
|
1729
1736
|
flex
|
|
1730
1737
|
flex-col
|
|
1731
|
-
${
|
|
1732
|
-
`.trim().replace(/\s+/g," "),children:[
|
|
1738
|
+
${Y}
|
|
1739
|
+
`.trim().replace(/\s+/g," "),children:[t.jsx(an,{logo:V&&t.jsx("div",{className:"h-[30px] w-[168px] overflow-hidden",children:typeof V=="string"?t.jsx("img",{src:V,alt:"Business Logo",className:"h-full w-full object-contain"}):V}),productName:"",userDropdown:R?{avatar:R,name:T,role:A}:void 0,hideActionButtons:!0,siesaLogo:F&&t.jsx("div",{className:"h-[30px] w-[120px] overflow-hidden",children:typeof F=="string"?t.jsx("img",{src:F,alt:"Siesa Logo",className:"h-full w-full object-contain"}):F}),variant:"desktop",className:"bg-background-secondary dark:bg-dark-bg-primary"}),t.jsx("div",{className:"flex flex-1 w-full overflow-hidden",children:t.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[t.jsxs("div",{className:`
|
|
1733
1740
|
flex-1
|
|
1734
1741
|
flex
|
|
1735
1742
|
flex-col
|
|
@@ -1740,7 +1747,7 @@
|
|
|
1740
1747
|
rounded-tl-3xl
|
|
1741
1748
|
rounded-tr-3xl
|
|
1742
1749
|
overflow-hidden
|
|
1743
|
-
`,children:[
|
|
1750
|
+
`,children:[t.jsxs("div",{className:"flex items-center gap-4 w-full",children:[t.jsx("div",{className:"shrink-0",children:t.jsx(Q,{type:"default",leftIcon:t.jsx(th,{className:"w-4 h-4"}),onClick:i,ariaLabel:r,children:r})}),t.jsx("div",{className:"h-8 w-px bg-border-primary dark:bg-dark-border-primary shrink-0"}),t.jsx("div",{className:"shrink-0",children:t.jsx("h2",{className:"text-xl font-bold leading-7 tracking-tight text-content-primary dark:text-dark-content-primary",children:n})}),t.jsx("div",{className:"flex-1 flex gap-2 overflow-x-auto overflow-y-hidden",children:s.map(_=>t.jsx(Q,{type:a===_.id?"default":"outline-solid",onClick:()=>o?.(_.id),children:_.label},_.id))})]}),t.jsxs("div",{className:`
|
|
1744
1751
|
flex-1
|
|
1745
1752
|
flex
|
|
1746
1753
|
gap-0
|
|
@@ -1748,7 +1755,7 @@
|
|
|
1748
1755
|
dark:bg-dark-bg-primary/50
|
|
1749
1756
|
rounded-xl
|
|
1750
1757
|
overflow-hidden
|
|
1751
|
-
`,children:[
|
|
1758
|
+
`,children:[t.jsx("div",{className:"w-[213px] p-4 border-b border-border-primary dark:border-dark-border-primary",children:t.jsxs("div",{className:"flex flex-col gap-4 h-full",children:[t.jsx("div",{className:"flex items-center justify-center w-full",children:t.jsx("h3",{className:"text-xl font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:l})}),t.jsx("div",{className:"flex-1 flex flex-col gap-2 overflow-x-hidden overflow-y-auto",children:c.map(_=>t.jsx(ii,{image:_.image,label:_.label,active:f===_.id,onClick:()=>d?.(_.id)},_.id))})]})}),t.jsx("div",{className:"flex-1 p-4 border-l border-b border-border-primary dark:border-dark-border-primary",children:t.jsxs("div",{className:"flex flex-col gap-4 h-full",children:[t.jsx("div",{className:"flex items-center justify-center w-full",children:t.jsx("h3",{className:"text-xl font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:m})}),t.jsxs("div",{className:"flex-1 overflow-x-hidden overflow-y-auto",children:[t.jsx("div",{className:"flex flex-col items-center justify-start min-h-full w-full",children:t.jsx("div",{className:"flex flex-wrap gap-2 justify-center max-w-[704px]",children:h.map(_=>t.jsx(li,{image:_.image,productName:_.name,price:_.price,onAddClick:()=>p?.(_.id)},_.id))})}),h.length===0&&t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("p",{className:"text-content-secondary dark:text-content-secondary",children:"No hay productos disponibles"})}),S&&t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("p",{className:"text-content-secondary dark:text-content-secondary",children:"Cargando productos..."})}),v&&t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("p",{className:"text-red-600 dark:text-red-400",children:v})})]})]})})]})]}),t.jsx("div",{className:"w-[304px] p-4 flex flex-col gap-0 h-full overflow-hidden",children:t.jsxs("div",{className:"flex flex-col h-full relative",children:[t.jsx("div",{className:"border-b border-border-primary dark:border-dark-border-primary pb-4 z-10",children:t.jsx("h2",{className:"text-xl font-bold leading-7 tracking-tight text-content-primary dark:text-dark-content-primary",children:e})}),t.jsxs("div",{className:"flex items-start py-2.5 z-10",children:[t.jsxs("button",{className:`
|
|
1752
1759
|
flex-1
|
|
1753
1760
|
flex
|
|
1754
1761
|
flex-col
|
|
@@ -1758,12 +1765,12 @@
|
|
|
1758
1765
|
transition-colors
|
|
1759
1766
|
duration-150
|
|
1760
1767
|
${g==="products"?"relative":""}
|
|
1761
|
-
`,onClick:()=>x?.("products"),children:[
|
|
1768
|
+
`,onClick:()=>x?.("products"),children:[t.jsx("span",{className:`
|
|
1762
1769
|
text-sm
|
|
1763
1770
|
font-bold
|
|
1764
1771
|
leading-5
|
|
1765
1772
|
${g==="products"?"text-primary-custom-600 dark:text-primary-custom-600":"text-content-primary dark:text-dark-content-primary"}
|
|
1766
|
-
`,children:"Productos"}),g==="products"&&
|
|
1773
|
+
`,children:"Productos"}),g==="products"&&t.jsx("div",{className:"absolute -bottom-2.5 left-0 right-0 h-0.5 bg-primary-custom-600 dark:bg-primary-custom-600 rounded-full"})]}),t.jsxs("button",{className:`
|
|
1767
1774
|
flex-1
|
|
1768
1775
|
flex
|
|
1769
1776
|
flex-col
|
|
@@ -1773,12 +1780,12 @@
|
|
|
1773
1780
|
transition-colors
|
|
1774
1781
|
duration-150
|
|
1775
1782
|
${g==="client"?"relative":""}
|
|
1776
|
-
`,onClick:()=>x?.("client"),children:[
|
|
1783
|
+
`,onClick:()=>x?.("client"),children:[t.jsx("span",{className:`
|
|
1777
1784
|
text-sm
|
|
1778
1785
|
font-bold
|
|
1779
1786
|
leading-5
|
|
1780
1787
|
${g==="client"?"text-primary-custom-600 dark:text-primary-custom-600":"text-content-primary dark:text-dark-content-primary"}
|
|
1781
|
-
`,children:"Cliente"}),g==="client"&&
|
|
1788
|
+
`,children:"Cliente"}),g==="client"&&t.jsx("div",{className:"absolute -bottom-2.5 left-0 right-0 h-0.5 bg-primary-custom-600 dark:bg-primary-custom-600 rounded-full"})]})]}),t.jsxs("div",{className:`
|
|
1782
1789
|
flex-1
|
|
1783
1790
|
flex
|
|
1784
1791
|
flex-col
|
|
@@ -1791,5 +1798,5 @@
|
|
|
1791
1798
|
overflow-x-hidden
|
|
1792
1799
|
overflow-y-auto
|
|
1793
1800
|
z-10
|
|
1794
|
-
`,children:[b.map((V,_)=>e.jsxs(m.Fragment,{children:[e.jsx(Jn,{categoryLabel:V.categoryLabel,categoryColor:V.categoryColor,productRef:V.productRef,price:V.price,productName:V.productName,descriptionItems:V.descriptionItems,showDescription:!!V.descriptionItems&&V.descriptionItems.length>0,quantity:V.quantity,onQuantityChange:E=>y?.(V.productId,E),onDelete:()=>j?.(V.productId)}),_<b.length-1&&e.jsx(Ot,{})]},V.productId)),b.length===0&&e.jsx("div",{className:"flex items-center justify-center h-full",children:e.jsx("p",{className:"text-content-secondary dark:text-content-secondary text-center",children:"No hay productos en el pedido"})})]}),e.jsxs("div",{className:"flex flex-col gap-4 pt-4 z-10",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Subtotal"}),e.jsx("div",{className:"flex-1 text-right",children:w})]}),e.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Impuestos"}),e.jsx("div",{className:"flex-1 text-right",children:C})]}),e.jsx(Ot,{}),e.jsxs("div",{className:"flex items-start text-lg font-bold leading-7 text-content-primary dark:text-dark-content-primary",children:[e.jsx("div",{className:"flex-1",children:"Total"}),e.jsx("div",{className:"flex-1 text-right",children:I})]})]}),e.jsx("div",{className:"flex gap-2 w-full",children:e.jsx(X,{type:"default",leftIcon:e.jsx(zu,{className:"w-4 h-4"}),onClick:O,fullWidth:!0,disabled:b.length===0||L,children:S})})]})]})})]})})]});vo.displayName="ProductsView";const Tu=({className:t="w-4 h-4"})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),$u=({onSubmit:t,onBackToLogin:r,isLoading:n=!1,errorMessage:s,successMessage:a,className:o="",showBackground:i=!0,variant:l="responsive"})=>{const[c,u]=m.useState(""),[d,f]=m.useState(""),h=g=>{if(g.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){f("Por favor ingresa un email válido");return}f(""),t?.(c)},p=g=>{u(g.target.value),d&&f("")};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",o].join(" "),children:[i&&e.jsxs("div",{className:"hidden md:block absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.jpg",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-zinc-700",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Restablecer Contraseña"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Reestablece tu contraseña ingresando con tu correo electrónico."})]}),s&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:s}),a&&e.jsx("div",{className:["w-full","p-3","bg-[#d1fae5]","dark:bg-[#064e3b]","border","border-[#a7f3d0]","dark:border-[#065f46]","rounded-md","text-[#065f46]","dark:text-[#a7f3d0]","text-sm"].join(" "),role:"status",children:a}),e.jsxs("form",{onSubmit:h,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Tu,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:p,disabled:n,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-zinc-700","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",d?"border-error-border!":""].filter(Boolean).join(" ")})]}),d&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:d})]}),e.jsx("button",{type:"submit",disabled:n||!c,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:n?"Enviando...":"Reestablecer Contraseña"})]}),e.jsx("button",{type:"button",onClick:r,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","bg-transparent","border","border-[#93d1fd]","dark:border-[#93d1fd]","rounded-md","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Iniciar Sesión"})]})]})},Ou=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-5-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 9c-1.825 0-3.422.977-4.295 2.437A5.49 5.49 0 0 0 8 13.5a5.49 5.49 0 0 0 4.294-2.063A4.997 4.997 0 0 0 8 9Z",clipRule:"evenodd"})}),Fu=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),e.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),Du=t=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:e.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),Bu=t=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...t,children:[e.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),e.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),Vu=({onSubmit:t,onSignIn:r,onTermsClick:n,onPrivacyClick:s,isLoading:a=!1,errorMessage:o,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[u,d]=m.useState(""),[f,h]=m.useState(""),[p,g]=m.useState(""),[x,b]=m.useState(!1),[y,j]=m.useState(""),w=S=>{if(S.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(f)){j("Por favor ingresa un email válido");return}j(""),t?.(u,f,p)},C=S=>{h(S.target.value),y&&j("")},I=()=>{b(!x)};return e.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",i].join(" "),children:[l&&e.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),e.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),e.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[e.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:e.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),e.jsxs("div",{className:"w-full text-center",children:[e.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),e.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),o&&e.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),e.jsxs("form",{onSubmit:w,className:"w-full flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Ou,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"name-input",type:"text",placeholder:"Juan Pérez",value:u,onChange:S=>d(S.target.value),disabled:a,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Fu,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:f,onChange:C,disabled:a,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",y?"border-error-border!":""].filter(Boolean).join(" ")})]}),y&&e.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:y})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[e.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:e.jsx(Du,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),e.jsx("input",{id:"password-input",type:x?"text":"password",placeholder:"••••••••",value:p,onChange:S=>g(S.target.value),disabled:a,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),e.jsx("button",{type:"button",onClick:I,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":x?"Ocultar contraseña":"Mostrar contraseña",children:e.jsx(Bu,{className:"w-4 h-4"})})]})]}),e.jsx("button",{type:"submit",disabled:a||!u||!f||!p,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:a?"Registrando...":"Registrarse"})]}),e.jsx("button",{type:"button",onClick:r,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Ya tengo una cuenta"}),e.jsx("div",{className:"w-full text-center",children:e.jsxs("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:["Al registrarse, estás aceptando nuestras"," ",e.jsx("button",{type:"button",onClick:n,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Condiciones de Uso"})," ","y nuestras"," ",e.jsx("button",{type:"button",onClick:s,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Políticas de Privacidad"}),"."]})})]})]})},Pu=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),_u=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M2.22 2.22a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72v2.69a.75.75 0 0 1-1.5 0V2.5c0-.69.56-1.25 1.25-1.25h4.75a.75.75 0 0 1 0 1.5H4.81l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06ZM9 2.75a.75.75 0 0 1 .75-.75h4.75C15.19 2 15.75 2.56 15.75 3.25v4.75a.75.75 0 0 1-1.5 0V5.31l-.72.72a.75.75 0 1 1-1.06-1.06l2-2a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72V8a.75.75 0 0 1-1.5 0V3.5H9.75A.75.75 0 0 1 9 2.75ZM2.75 9a.75.75 0 0 1 .75.75v2.69l.72-.72a.75.75 0 1 1 1.06 1.06l-2 2a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l.72.72V9.75c0-.41.34-.75.75-.75Zm10.5 0a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-4.75c-.69 0-1.25-.56-1.25-1.25V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),Wu=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M2.75 2a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0V3.81l2.47 2.47a.75.75 0 1 0 1.06-1.06L4.56 2.75h2.69a.75.75 0 0 0 0-1.5h-4.5ZM9 2.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-2.69l2.47 2.47a.75.75 0 1 1-1.06 1.06L10.5 4.56v2.69a.75.75 0 0 1-1.5 0v-4.5ZM2.75 9a.75.75 0 0 1 .75.75v2.69l2.47-2.47a.75.75 0 1 1 1.06 1.06L4.56 13.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 .75-.75Zm10.5 0a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-2.47-2.47a.75.75 0 1 1 1.06-1.06l2.47 2.47V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),Zu=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M2 4.75A2.75 2.75 0 0 1 4.75 2h3a2.75 2.75 0 0 1 2.75 2.75v.5a.75.75 0 0 1-1.5 0v-.5c0-.69-.56-1.25-1.25-1.25h-3c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h3c.69 0 1.25-.56 1.25-1.25v-.5a.75.75 0 0 1 1.5 0v.5A2.75 2.75 0 0 1 7.75 14h-3A2.75 2.75 0 0 1 2 11.25v-6.5Zm10.58 2.96-1.72-1.72a.75.75 0 1 1 1.06-1.06l2.78 2.78c.3.29.3.76 0 1.06l-2.78 2.78a.75.75 0 1 1-1.06-1.06l1.72-1.72H7.25a.75.75 0 0 1 0-1.5h5.33Z",clipRule:"evenodd"})}),Hu=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M13.78 10.47a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H5.75a.75.75 0 0 1 0-1.5h5.69l-.97-.97a.75.75 0 0 1 1.06-1.06l2.25 2.25ZM2.22 5.53a.75.75 0 0 1 0-1.06l2.25-2.25a.75.75 0 0 1 1.06 1.06l-.97.97h5.69a.75.75 0 0 1 0 1.5H4.56l.97.97a.75.75 0 1 1-1.06 1.06L2.22 5.53Z",clipRule:"evenodd"})}),Gu=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M2.5 3.5h3v3h-3v-3ZM6.5 2a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM2.5 10.5h3v3h-3v-3ZM6.5 9a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM10.5 3.5h3v3h-3v-3ZM13.5 2h-3a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-.5ZM10.5 10.5h3v3h-3v-3Z"})}),Uu=({className:t=""})=>e.jsx("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),qu=({locations:t=[],activeLocationId:r,tables:n=[],tablesTitle:s="Mesas de Antejardín",showPeopleCountPanel:a=!1,selectedTable:o,onLocationSelect:i,onTableSelect:l,onCreateTables:c,onMergeTables:u,onSplitTables:d,onPeopleCountSelect:f,onAssignTable:h,onTransferTable:p,onSetCutlery:g,onClosePeoplePanel:x,onTableSwitchChange:b,isLoading:y=!1,errorMessage:j,tableLayout:w="grid",className:C="",userInfo:I})=>{const S=()=>e.jsx("div",{className:"w-full shrink-0",children:e.jsx(Fr,{variant:"desktop",productName:"",userDropdown:I?{avatar:I.avatar,name:I.name,email:I.role,onMenuClick:()=>{}}:void 0})}),O=()=>e.jsxs("div",{className:["w-full","md:w-[245px]","h-auto","md:h-full","shrink-0","flex","flex-col","gap-2.5","p-4","overflow-auto"].join(" "),children:[e.jsx("div",{className:"w-full",children:e.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Salones"})}),e.jsx("div",{className:"flex flex-col gap-2 w-full",children:y?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"Cargando salones..."}):t.length===0?e.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"No hay salones disponibles"}):t.map(R=>e.jsx(Ua,{locationName:R.name,status:R.status,state:R.id===r?"actived":"enabled",capacity:R.capacity,onClick:()=>i?.(R.id)},R.id))})]}),L=()=>e.jsxs("div",{className:["flex-1","min-w-0","flex","flex-col","gap-4","p-4","bg-white","dark:bg-dark-bg-primary","rounded-tl-3xl","rounded-tr-3xl","overflow-auto"].join(" "),children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-start md:items-center justify-between w-full",children:[e.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary","flex-1"].join(" "),children:s}),e.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.jsx(X,{type:"default",size:"sm",leftIcon:e.jsx(Pu,{}),onClick:c,children:"Crear Mesas"}),e.jsx(X,{type:"default",size:"sm",leftIcon:e.jsx(_u,{}),onClick:u,children:"Unir Mesas"}),e.jsx(X,{type:"default",size:"sm",leftIcon:e.jsx(Wu,{}),onClick:d,children:"Separar Mesas"})]})]}),e.jsx("div",{className:["flex-1","bg-background-secondary","dark:bg-dark-bg-secondary","rounded-xl","p-4","overflow-auto","min-h-[400px]"].join(" "),children:y?e.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"Cargando mesas..."}):j?e.jsx("div",{className:"flex items-center justify-center h-full text-error-content dark:text-error-content",children:j}):n.length===0?e.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"No hay mesas en esta ubicación"}):w==="grid"?e.jsx("div",{className:"flex flex-col items-center justify-center min-h-full w-full p-4",children:e.jsx("div",{className:"flex flex-wrap gap-2 justify-center max-w-[664px]",children:n.map(R=>e.jsx(Fn,{tableNumber:R.tableNumber,status:R.status,shape:R.shape,chairs:R.chairs,isActive:R.isActive,onClick:()=>l?.(R.tableNumber)},R.tableNumber))})}):e.jsx("div",{className:"relative w-full h-full min-h-[400px]",children:n.map(R=>e.jsx("div",{className:"absolute",style:R.position?{left:`${R.position.x}%`,top:`${R.position.y}%`,transform:"translate(-50%, -50%)"}:void 0,children:e.jsx(Fn,{tableNumber:R.tableNumber,status:R.status,shape:R.shape,chairs:R.chairs,isActive:R.isActive,onClick:()=>l?.(R.tableNumber)})},R.tableNumber))})}),e.jsxs("div",{className:"flex flex-wrap gap-4 items-center w-full",children:[e.jsx(Nr,{status:"available"}),e.jsx(Nr,{status:"occupied"}),e.jsx(Nr,{status:"reserved"}),e.jsx(Nr,{status:"outOfService"})]})]}),k=()=>a?e.jsxs("div",{className:["w-full","md:w-[304px]","shrink-0","flex","flex-col","p-4","overflow-hidden"].join(" "),children:[e.jsxs("div",{className:"flex items-center justify-between w-full pb-4 border-b border-border-primary dark:border-dark-border-primary shrink-0",children:[e.jsx(Tt,{label:o?.locationName||"Ubicación",description:o?.tableName||"Mesa",labelPosition:"trailing",checked:!1,onChange:R=>b?.(R.target.checked)}),e.jsx("button",{className:["p-2","rounded-md","border","border-primary-custom-300","text-primary-custom-600","hover:bg-background-secondary","dark:border-dark-border-custom","dark:hover:bg-dark-bg-primary","transition-colors"].join(" "),onClick:x,"aria-label":"Cerrar panel",children:e.jsx(Uu,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex flex-col gap-2 w-full flex-1 overflow-auto pt-4",children:[e.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[e.jsx("h3",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Tomar pedido"}),e.jsx("p",{className:["text-sm","leading-5","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Selecciona la cantidad de personas"})]}),e.jsx("div",{className:"grid grid-cols-3 gap-2 w-full mt-2",children:[1,2,3,4,5,6,7,8].map(R=>e.jsx(qa,{size:"l",border:!0,onClick:()=>f?.(R),children:R},R))})]}),e.jsxs("div",{className:"flex flex-col gap-4 w-full pt-4 mt-auto shrink-0 grow-0 basis-auto border-t border-border-primary dark:border-dark-border-primary",children:[e.jsx(X,{type:"default",size:"sm",fullWidth:!0,leftIcon:e.jsx(Zu,{}),onClick:h,children:"Asignar"}),e.jsxs("div",{className:"flex gap-2 w-full",children:[e.jsx(X,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(Hu,{}),onClick:p,children:"Transferir"}),e.jsx(X,{type:"outline",size:"sm",fullWidth:!0,leftIcon:e.jsx(Gu,{}),onClick:g,children:"Cubiertos"})]})]})]}):null;return e.jsxs("div",{className:["flex","flex-col","w-full","min-h-screen","bg-background-secondary","dark:bg-dark-bg-primary",C].join(" "),children:[S(),e.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[O(),L(),k()]})]})},yo=m.createContext(void 0),Ku=({children:t,defaultTheme:r="light"})=>{const[n,s]=m.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||r);m.useEffect(()=>{const i=window.document.documentElement;n==="dark"?i.classList.add("dark"):i.classList.remove("dark"),localStorage.setItem("siesa-ui-theme",n)},[n]);const a=()=>{s(i=>i==="light"?"dark":"light")},o=i=>{s(i)};return e.jsx(yo.Provider,{value:{theme:n,toggleTheme:a,setTheme:o},children:t})},Xu=()=>{const t=m.useContext(yo);if(t===void 0)throw new Error("useTheme debe ser usado dentro de un ThemeProvider");return t};exports.Alert=ir;exports.Avatar=la;exports.Badge=Ge;exports.Button=X;exports.Checkbox=Ir;exports.DescriptionList=ca;exports.Divider=Ot;exports.Dropdown=_e;exports.DropdownItemCollapsible=Zn;exports.DropdownItemHeading=Hn;exports.Info=Qr;exports.Input=Te;exports.LayoutBase=xu;exports.ListView=Ru;exports.LoginView=X1;exports.LoginViewPage=Lu;exports.LookupField=gn;exports.MasterCrud=G1;exports.MatchModal=Ha;exports.Navbar=Fr;exports.NavigationBar=x0;exports.NavigationRail=Kc;exports.NavigationRailGroup=pn;exports.NavigationRailItem=Wn;exports.NavigationRailPanel=Xn;exports.NavigationRailTypes=Yn;exports.Notification=Go;exports.POSConvention=Nr;exports.POSLocationButton=Ua;exports.POSNumberButton=qa;exports.POSProductButton=Ka;exports.POSProductCard=Xa;exports.POSProductSidebarItems=Jn;exports.POSTable=Fn;exports.Pagination=Ko;exports.ParameterEditor=pu;exports.ProductsView=vo;exports.Quantity=_n;exports.Radio=ia;exports.RecoverPasswordView=$u;exports.Select=Tr;exports.SignUpView=tu;exports.SignUpViewPage=Vu;exports.Switch=Tt;exports.Table=Qn;exports.TableLayoutView=qu;exports.Tabs=f0;exports.Textarea=oa;exports.ThemeProvider=Ku;exports.buildExpressiveFilter=mo;exports.createFetcher=S1;exports.mergeFilters=Rd;exports.normalizeFilters=Bn;exports.useTheme=Xu;
|
|
1801
|
+
`,children:[b.map((_,B)=>t.jsxs(u.Fragment,{children:[t.jsx(Vs,{categoryLabel:_.categoryLabel,categoryColor:_.categoryColor,productRef:_.productRef,price:_.price,productName:_.productName,descriptionItems:_.descriptionItems,showDescription:!!_.descriptionItems&&_.descriptionItems.length>0,quantity:_.quantity,onQuantityChange:L=>y?.(_.productId,L),onDelete:()=>C?.(_.productId)}),B<b.length-1&&t.jsx(rr,{})]},_.productId)),b.length===0&&t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("p",{className:"text-content-secondary dark:text-content-secondary text-center",children:"No hay productos en el pedido"})})]}),t.jsxs("div",{className:"flex flex-col gap-4 pt-4 z-10",children:[t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[t.jsx("div",{className:"flex-1",children:"Subtotal"}),t.jsx("div",{className:"flex-1 text-right",children:w})]}),t.jsxs("div",{className:"flex items-start text-base font-bold leading-6 text-content-primary dark:text-dark-content-primary",children:[t.jsx("div",{className:"flex-1",children:"Impuestos"}),t.jsx("div",{className:"flex-1 text-right",children:j})]}),t.jsx(rr,{}),t.jsxs("div",{className:"flex items-start text-lg font-bold leading-7 text-content-primary dark:text-dark-content-primary",children:[t.jsx("div",{className:"flex-1",children:"Total"}),t.jsx("div",{className:"flex-1 text-right",children:I})]})]}),t.jsx("div",{className:"flex gap-2 w-full",children:t.jsx(Q,{type:"default",leftIcon:t.jsx(rh,{className:"w-4 h-4"}),onClick:E,fullWidth:!0,disabled:b.length===0||S,children:N})})]})]})})]})})]});tl.displayName="ProductsView";const nh=({className:e="w-4 h-4"})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:e,children:[t.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),t.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),sh=({onSubmit:e,onBackToLogin:r,isLoading:n=!1,errorMessage:s,successMessage:a,className:o="",showBackground:i=!0,variant:l="responsive"})=>{const[c,f]=u.useState(""),[d,m]=u.useState(""),h=g=>{if(g.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)){m("Por favor ingresa un email válido");return}m(""),e?.(c)},p=g=>{f(g.target.value),d&&m("")};return t.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",o].join(" "),children:[i&&t.jsxs("div",{className:"hidden md:block absolute inset-0 pointer-events-none","aria-hidden":"true",children:[t.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),t.jsx("img",{src:"/bg_siesa.jpg",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),t.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-zinc-700",...l==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:l==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[t.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:t.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),t.jsxs("div",{className:"w-full text-center",children:[t.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Restablecer Contraseña"}),t.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Reestablece tu contraseña ingresando con tu correo electrónico."})]}),s&&t.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:s}),a&&t.jsx("div",{className:["w-full","p-3","bg-[#d1fae5]","dark:bg-[#064e3b]","border","border-[#a7f3d0]","dark:border-[#065f46]","rounded-md","text-[#065f46]","dark:text-[#a7f3d0]","text-sm"].join(" "),role:"status",children:a}),t.jsxs("form",{onSubmit:h,className:"w-full flex flex-col gap-2",children:[t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(nh,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:c,onChange:p,disabled:n,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-zinc-700","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",d?"border-error-border!":""].filter(Boolean).join(" ")})]}),d&&t.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:d})]}),t.jsx("button",{type:"submit",disabled:n||!c,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:n?"Enviando...":"Reestablecer Contraseña"})]}),t.jsx("button",{type:"button",onClick:r,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","bg-transparent","border","border-[#93d1fd]","dark:border-[#93d1fd]","rounded-md","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Iniciar Sesión"})]})]})},ah=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:t.jsx("path",{fillRule:"evenodd",d:"M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0Zm-5-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 9c-1.825 0-3.422.977-4.295 2.437A5.49 5.49 0 0 0 8 13.5a5.49 5.49 0 0 0 4.294-2.063A4.997 4.997 0 0 0 8 9Z",clipRule:"evenodd"})}),oh=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:[t.jsx("path",{d:"M2.5 3A1.5 1.5 0 0 0 1 4.5v.793c.026.009.051.02.076.032L7.674 8.51c.206.1.446.1.652 0l6.598-3.185A.755.755 0 0 1 15 5.293V4.5A1.5 1.5 0 0 0 13.5 3h-11Z"}),t.jsx("path",{d:"M15 6.954 8.978 9.86a2.25 2.25 0 0 1-1.956 0L1 6.954V11.5A1.5 1.5 0 0 0 2.5 13h11a1.5 1.5 0 0 0 1.5-1.5V6.954Z"})]}),ih=e=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:t.jsx("path",{fillRule:"evenodd",d:"M8 1a3.5 3.5 0 0 0-3.5 3.5V7A1.5 1.5 0 0 0 3 8.5v5A1.5 1.5 0 0 0 4.5 15h7a1.5 1.5 0 0 0 1.5-1.5v-5A1.5 1.5 0 0 0 11.5 7V4.5A3.5 3.5 0 0 0 8 1Zm2 6V4.5a2 2 0 1 0-4 0V7h4Z",clipRule:"evenodd"})}),lh=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...e,children:[t.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),t.jsx("path",{fillRule:"evenodd",d:"M1.38 8.28a.87.87 0 0 1 0-.566 7.003 7.003 0 0 1 13.238.006.87.87 0 0 1 0 .56A7.003 7.003 0 0 1 1.379 8.28ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",clipRule:"evenodd"})]}),ch=({onSubmit:e,onSignIn:r,onTermsClick:n,onPrivacyClick:s,isLoading:a=!1,errorMessage:o,className:i="",showBackground:l=!0,variant:c="responsive"})=>{const[f,d]=u.useState(""),[m,h]=u.useState(""),[p,g]=u.useState(""),[x,b]=u.useState(!1),[y,C]=u.useState(""),w=N=>{if(N.preventDefault(),!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(m)){C("Por favor ingresa un email válido");return}C(""),e?.(f,m,p)},j=N=>{h(N.target.value),y&&C("")},I=()=>{b(!x)};return t.jsxs("div",{className:["relative","min-h-screen","w-full","flex","flex-col","items-center","justify-center","box-border","p-0","md:p-4",i].join(" "),children:[l&&t.jsxs("div",{className:"absolute inset-0 pointer-events-none","aria-hidden":"true",children:[t.jsx("div",{className:"absolute inset-0 bg-primary-custom-100 dark:bg-dark-bg-custom"}),t.jsx("img",{src:"/bg_siesa.png",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-10"})]}),t.jsxs("div",{className:["relative","box-border","flex","flex-col","items-center","justify-center","gap-4","p-16","shrink-0","bg-bg-primary","dark:bg-dark-bg-primary",...c==="mobile"?["w-full","h-full","shadow-none","rounded-none","border-0"]:c==="desktop"?["w-[400px]","h-auto","rounded-2xl","shadow-lg","dark:shadow-2xl","overflow-clip","border","border-transparent","dark:border-dark-border-primary"]:["w-full","h-full","shadow-none","rounded-none","border-0","md:w-[400px]","md:h-auto","md:rounded-2xl","md:shadow-lg","md:dark:shadow-2xl","md:overflow-clip","md:border","md:border-transparent","md:dark:border-dark-border-primary"]].join(" "),children:[t.jsx("div",{className:"w-full flex flex-col items-center pb-4",children:t.jsx("img",{src:"/.Siesa Logo.png",alt:"Siesa",className:"w-[200px] h-[50px] object-contain"})}),t.jsxs("div",{className:"w-full text-center",children:[t.jsx("h1",{className:["text-[20px]","leading-[28px]","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Crear Cuenta"}),t.jsx("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Ingresa todos los datos para crear tu cuenta."})]}),o&&t.jsx("div",{className:["w-full","p-3","bg-error-bg","dark:bg-error-bg","border","border-error-border","dark:border-error-border","rounded-md","text-error-content","dark:text-error-content","text-sm"].join(" "),role:"alert",children:o}),t.jsxs("form",{onSubmit:w,className:"w-full flex flex-col gap-2",children:[t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("label",{htmlFor:"name-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Nombre ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(ah,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"name-input",type:"text",placeholder:"Juan Pérez",value:f,onChange:N=>d(N.target.value),disabled:a,required:!0,autoComplete:"name",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")})]})]}),t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("label",{htmlFor:"email-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Correo Electrónico ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(oh,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"email-input",type:"email",placeholder:"ejemplo@miempresa.com",value:m,onChange:j,disabled:a,required:!0,autoComplete:"email",className:["w-full","pl-9","pr-3","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150",y?"border-error-border!":""].filter(Boolean).join(" ")})]}),y&&t.jsx("p",{className:"text-xs text-error-content dark:text-error-content",children:y})]}),t.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[t.jsxs("label",{htmlFor:"password-input",className:"font-bold text-sm leading-5 text-content-primary dark:text-dark-content-primary",children:["Contraseña ",t.jsx("span",{className:"text-red-600",children:"*"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none opacity-50",children:t.jsx(ih,{className:"w-4 h-4 text-content-tertiary dark:text-dark-content-tertiary"})}),t.jsx("input",{id:"password-input",type:x?"text":"password",placeholder:"••••••••",value:p,onChange:N=>g(N.target.value),disabled:a,required:!0,autoComplete:"new-password",className:["w-full","pl-9","pr-10","py-1.5","text-base","leading-6","bg-bg-primary","dark:bg-dark-bg-primary","border","border-border-primary","dark:border-dark-border-primary","rounded-lg","placeholder:text-content-tertiary","dark:placeholder:text-dark-content-tertiary","text-content-primary","dark:text-dark-content-primary","focus:outline-hidden","focus:border-primary-custom-600","dark:focus:border-dark-border-custom","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-dark-border-custom","transition-all","duration-150"].join(" ")}),t.jsx("button",{type:"button",onClick:I,className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-50 hover:opacity-100 text-content-tertiary dark:text-dark-content-tertiary transition-opacity duration-150 focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-dark-border-custom rounded-sm p-1","aria-label":x?"Ocultar contraseña":"Mostrar contraseña",children:t.jsx(lh,{className:"w-4 h-4"})})]})]}),t.jsx("button",{type:"submit",disabled:a||!f||!m||!p,className:["relative","w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-primary-inverse-content","dark:text-[#0e79fd]","bg-[#0e79fd]","dark:bg-dark-bg-inverse","border","border-[#3c9bf6]","dark:border-[#93d1fd]","rounded-md","shadow-button-inset","hover:bg-primary-custom-500","dark:hover:bg-[#93d1fd]","active:scale-95","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]","disabled:opacity-50","disabled:cursor-not-allowed"].join(" "),children:a?"Registrando...":"Registrarse"})]}),t.jsx("button",{type:"button",onClick:r,className:["w-full","px-2.5","py-1.5","flex","items-center","justify-center","gap-2","font-bold","text-sm","leading-5","text-[#0e79fd]","dark:text-[#93d1fd]","hover:bg-primary-custom-100","dark:hover:bg-[#93d1fd]/10","rounded-md","transition-all","duration-150","focus:outline-hidden","focus:ring-2","focus:ring-primary-custom-400","dark:focus:ring-[#93d1fd]","focus:ring-offset-2","dark:focus:ring-offset-[#3f3f46]"].join(" "),children:"Ya tengo una cuenta"}),t.jsx("div",{className:"w-full text-center",children:t.jsxs("p",{className:["text-[12px]","leading-[16px]","font-normal","text-content-primary","dark:text-dark-content-primary"].join(" "),children:["Al registrarse, estás aceptando nuestras"," ",t.jsx("button",{type:"button",onClick:n,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Condiciones de Uso"})," ","y nuestras"," ",t.jsx("button",{type:"button",onClick:s,className:"text-[#0e79fd] dark:text-[#93d1fd] underline hover:no-underline focus:outline-hidden focus:ring-2 focus:ring-primary-custom-400 dark:focus:ring-[#93d1fd] rounded-sm",children:"Políticas de Privacidad"}),"."]})})]})]})},dh=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"})}),uh=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M2.22 2.22a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72v2.69a.75.75 0 0 1-1.5 0V2.5c0-.69.56-1.25 1.25-1.25h4.75a.75.75 0 0 1 0 1.5H4.81l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06ZM9 2.75a.75.75 0 0 1 .75-.75h4.75C15.19 2 15.75 2.56 15.75 3.25v4.75a.75.75 0 0 1-1.5 0V5.31l-.72.72a.75.75 0 1 1-1.06-1.06l2-2a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-.72-.72V8a.75.75 0 0 1-1.5 0V3.5H9.75A.75.75 0 0 1 9 2.75ZM2.75 9a.75.75 0 0 1 .75.75v2.69l.72-.72a.75.75 0 1 1 1.06 1.06l-2 2a.75.75 0 0 1-1.06 0l-2-2a.75.75 0 1 1 1.06-1.06l.72.72V9.75c0-.41.34-.75.75-.75Zm10.5 0a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-4.75c-.69 0-1.25-.56-1.25-1.25V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),fh=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M2.75 2a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0V3.81l2.47 2.47a.75.75 0 1 0 1.06-1.06L4.56 2.75h2.69a.75.75 0 0 0 0-1.5h-4.5ZM9 2.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-2.69l2.47 2.47a.75.75 0 1 1-1.06 1.06L10.5 4.56v2.69a.75.75 0 0 1-1.5 0v-4.5ZM2.75 9a.75.75 0 0 1 .75.75v2.69l2.47-2.47a.75.75 0 1 1 1.06 1.06L4.56 13.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 .75-.75Zm10.5 0a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-2.47-2.47a.75.75 0 1 1 1.06-1.06l2.47 2.47V9.75a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"})}),mh=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M2 4.75A2.75 2.75 0 0 1 4.75 2h3a2.75 2.75 0 0 1 2.75 2.75v.5a.75.75 0 0 1-1.5 0v-.5c0-.69-.56-1.25-1.25-1.25h-3c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h3c.69 0 1.25-.56 1.25-1.25v-.5a.75.75 0 0 1 1.5 0v.5A2.75 2.75 0 0 1 7.75 14h-3A2.75 2.75 0 0 1 2 11.25v-6.5Zm10.58 2.96-1.72-1.72a.75.75 0 1 1 1.06-1.06l2.78 2.78c.3.29.3.76 0 1.06l-2.78 2.78a.75.75 0 1 1-1.06-1.06l1.72-1.72H7.25a.75.75 0 0 1 0-1.5h5.33Z",clipRule:"evenodd"})}),hh=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{fillRule:"evenodd",d:"M13.78 10.47a.75.75 0 0 1 0 1.06l-2.25 2.25a.75.75 0 1 1-1.06-1.06l.97-.97H5.75a.75.75 0 0 1 0-1.5h5.69l-.97-.97a.75.75 0 0 1 1.06-1.06l2.25 2.25ZM2.22 5.53a.75.75 0 0 1 0-1.06l2.25-2.25a.75.75 0 0 1 1.06 1.06l-.97.97h5.69a.75.75 0 0 1 0 1.5H4.56l.97.97a.75.75 0 1 1-1.06 1.06L2.22 5.53Z",clipRule:"evenodd"})}),ph=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{d:"M2.5 3.5h3v3h-3v-3ZM6.5 2a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM2.5 10.5h3v3h-3v-3ZM6.5 9a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-4ZM10.5 3.5h3v3h-3v-3ZM13.5 2h-3a.5.5 0 0 0-.5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-.5ZM10.5 10.5h3v3h-3v-3Z"})}),xh=({className:e=""})=>t.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})}),gh=({locations:e=[],activeLocationId:r,tables:n=[],tablesTitle:s="Mesas de Antejardín",showPeopleCountPanel:a=!1,selectedTable:o,onLocationSelect:i,onTableSelect:l,onCreateTables:c,onMergeTables:f,onSplitTables:d,onPeopleCountSelect:m,onAssignTable:h,onTransferTable:p,onSetCutlery:g,onClosePeoplePanel:x,onTableSwitchChange:b,isLoading:y=!1,errorMessage:C,tableLayout:w="grid",className:j="",userInfo:I})=>{const N=()=>t.jsx("div",{className:"w-full shrink-0",children:t.jsx(an,{variant:"desktop",productName:"",userDropdown:I?{avatar:I.avatar,name:I.name,email:I.role,onMenuClick:()=>{}}:void 0})}),E=()=>t.jsxs("div",{className:["w-full","md:w-[245px]","h-auto","md:h-full","shrink-0","flex","flex-col","gap-2.5","p-4","overflow-auto"].join(" "),children:[t.jsx("div",{className:"w-full",children:t.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Salones"})}),t.jsx("div",{className:"flex flex-col gap-2 w-full",children:y?t.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"Cargando salones..."}):e.length===0?t.jsx("div",{className:"text-content-secondary dark:text-content-secondary text-sm",children:"No hay salones disponibles"}):e.map(R=>t.jsx(ai,{locationName:R.name,status:R.status,state:R.id===r?"actived":"enabled",capacity:R.capacity,onClick:()=>i?.(R.id)},R.id))})]}),S=()=>t.jsxs("div",{className:["flex-1","min-w-0","flex","flex-col","gap-4","p-4","bg-white","dark:bg-dark-bg-primary","rounded-tl-3xl","rounded-tr-3xl","overflow-auto"].join(" "),children:[t.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-start md:items-center justify-between w-full",children:[t.jsx("h2",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary","flex-1"].join(" "),children:s}),t.jsxs("div",{className:"flex gap-2 flex-wrap",children:[t.jsx(Q,{type:"default",size:"sm",leftIcon:t.jsx(dh,{}),onClick:c,children:"Crear Mesas"}),t.jsx(Q,{type:"default",size:"sm",leftIcon:t.jsx(uh,{}),onClick:f,children:"Unir Mesas"}),t.jsx(Q,{type:"default",size:"sm",leftIcon:t.jsx(fh,{}),onClick:d,children:"Separar Mesas"})]})]}),t.jsx("div",{className:["flex-1","bg-background-secondary","dark:bg-dark-bg-secondary","rounded-xl","p-4","overflow-auto","min-h-[400px]"].join(" "),children:y?t.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"Cargando mesas..."}):C?t.jsx("div",{className:"flex items-center justify-center h-full text-error-content dark:text-error-content",children:C}):n.length===0?t.jsx("div",{className:"flex items-center justify-center h-full text-content-secondary dark:text-content-secondary",children:"No hay mesas en esta ubicación"}):w==="grid"?t.jsx("div",{className:"flex flex-col items-center justify-center min-h-full w-full p-4",children:t.jsx("div",{className:"flex flex-wrap gap-2 justify-center max-w-[664px]",children:n.map(R=>t.jsx(vs,{tableNumber:R.tableNumber,status:R.status,shape:R.shape,chairs:R.chairs,isActive:R.isActive,onClick:()=>l?.(R.tableNumber)},R.tableNumber))})}):t.jsx("div",{className:"relative w-full h-full min-h-[400px]",children:n.map(R=>t.jsx("div",{className:"absolute",style:R.position?{left:`${R.position.x}%`,top:`${R.position.y}%`,transform:"translate(-50%, -50%)"}:void 0,children:t.jsx(vs,{tableNumber:R.tableNumber,status:R.status,shape:R.shape,chairs:R.chairs,isActive:R.isActive,onClick:()=>l?.(R.tableNumber)})},R.tableNumber))})}),t.jsxs("div",{className:"flex flex-wrap gap-4 items-center w-full",children:[t.jsx(Wr,{status:"available"}),t.jsx(Wr,{status:"occupied"}),t.jsx(Wr,{status:"reserved"}),t.jsx(Wr,{status:"outOfService"})]})]}),v=()=>a?t.jsxs("div",{className:["w-full","md:w-[304px]","shrink-0","flex","flex-col","p-4","overflow-hidden"].join(" "),children:[t.jsxs("div",{className:"flex items-center justify-between w-full pb-4 border-b border-border-primary dark:border-dark-border-primary shrink-0",children:[t.jsx(Jt,{label:o?.locationName||"Ubicación",description:o?.tableName||"Mesa",labelPosition:"trailing",checked:!1,onChange:R=>b?.(R.target.checked)}),t.jsx("button",{className:["p-2","rounded-md","border","border-primary-custom-300","text-primary-custom-600","hover:bg-background-secondary","dark:border-dark-border-custom","dark:hover:bg-dark-bg-primary","transition-colors"].join(" "),onClick:x,"aria-label":"Cerrar panel",children:t.jsx(xh,{className:"w-4 h-4"})})]}),t.jsxs("div",{className:"flex flex-col gap-2 w-full flex-1 overflow-auto pt-4",children:[t.jsxs("div",{className:"flex flex-col gap-1 w-full",children:[t.jsx("h3",{className:["text-xl","leading-7","font-bold","tracking-[-0.5px]","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Tomar pedido"}),t.jsx("p",{className:["text-sm","leading-5","text-content-primary","dark:text-dark-content-primary"].join(" "),children:"Selecciona la cantidad de personas"})]}),t.jsx("div",{className:"grid grid-cols-3 gap-2 w-full mt-2",children:[1,2,3,4,5,6,7,8].map(R=>t.jsx(oi,{size:"l",border:!0,onClick:()=>m?.(R),children:R},R))})]}),t.jsxs("div",{className:"flex flex-col gap-4 w-full pt-4 mt-auto shrink-0 grow-0 basis-auto border-t border-border-primary dark:border-dark-border-primary",children:[t.jsx(Q,{type:"default",size:"sm",fullWidth:!0,leftIcon:t.jsx(mh,{}),onClick:h,children:"Asignar"}),t.jsxs("div",{className:"flex gap-2 w-full",children:[t.jsx(Q,{type:"outline",size:"sm",fullWidth:!0,leftIcon:t.jsx(hh,{}),onClick:p,children:"Transferir"}),t.jsx(Q,{type:"outline",size:"sm",fullWidth:!0,leftIcon:t.jsx(ph,{}),onClick:g,children:"Cubiertos"})]})]})]}):null;return t.jsxs("div",{className:["flex","flex-col","w-full","min-h-screen","bg-background-secondary","dark:bg-dark-bg-primary",j].join(" "),children:[N(),t.jsxs("div",{className:"flex flex-1 w-full overflow-hidden",children:[E(),S(),v()]})]})},rl=u.createContext(void 0),bh=({children:e,defaultTheme:r="light"})=>{const[n,s]=u.useState(()=>typeof window<"u"&&localStorage.getItem("siesa-ui-theme")||r);u.useEffect(()=>{const i=window.document.documentElement;n==="dark"?i.classList.add("dark"):i.classList.remove("dark"),localStorage.setItem("siesa-ui-theme",n)},[n]);const a=()=>{s(i=>i==="light"?"dark":"light")},o=i=>{s(i)};return t.jsx(rl.Provider,{value:{theme:n,toggleTheme:a,setTheme:o},children:e})},vh=()=>{const e=u.useContext(rl);if(e===void 0)throw new Error("useTheme debe ser usado dentro de un ThemeProvider");return e};exports.Alert=kr;exports.Avatar=yo;exports.Badge=ut;exports.Button=Q;exports.Checkbox=Xr;exports.DescriptionList=wo;exports.Divider=rr;exports.Dropdown=it;exports.DropdownItemCollapsible=Ls;exports.DropdownItemHeading=As;exports.Info=Nn;exports.Input=Ge;exports.LayoutBase=Bm;exports.ListView=Xm;exports.LoginView=vm;exports.LoginViewPage=eh;exports.LookupField=Gn;exports.MasterCrud=pm;exports.MatchModal=ni;exports.Navbar=an;exports.NavigationBar=Qd;exports.NavigationRail=Ld;exports.NavigationRailGroup=Hn;exports.NavigationRailItem=Is;exports.NavigationRailPanel=$s;exports.NavigationRailTypes=Fs;exports.Notification=El;exports.POSConvention=Wr;exports.POSLocationButton=ai;exports.POSNumberButton=oi;exports.POSProductButton=ii;exports.POSProductCard=li;exports.POSProductSidebarItems=Vs;exports.POSTable=vs;exports.Pagination=Ll;exports.ParameterEditor=Fm;exports.ProductsView=tl;exports.Quantity=Ms;exports.Radio=vo;exports.RecoverPasswordView=sh;exports.Select=ur;exports.SignUpView=Cm;exports.SignUpViewPage=ch;exports.Switch=Jt;exports.Table=Bs;exports.TableLayoutView=gh;exports.Tabs=qd;exports.Textarea=bo;exports.ThemeProvider=bh;exports.buildExpressiveFilter=Ci;exports.createFetcher=cf;exports.mergeFilters=c1;exports.normalizeFilters=ws;exports.useTheme=vh;
|
|
1795
1802
|
//# sourceMappingURL=siesa-ui-kit.cjs.map
|