Presupuestador_web/dist/client/assets/index-BG_gEWso.js

297 lines
292 KiB
JavaScript
Raw Normal View History

2026-10-14 10:57:21 +00:00
var Ov=Object.defineProperty;var Pv=(n,o,r)=>o in n?Ov(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r;var je=(n,o,r)=>Pv(n,typeof o!="symbol"?o+"":o,r);import{u as Fc,a as rn,b as Ut,c as qn,d as Ee,j as i,P as qv,e as kv,f as pe,g as $v,N as as,R as qe,J as At,h as ke,i as fr,D as gr,l as Ba,M as Ot,V as Uv,r as M,k as Dc,m as Tc,n as pr,o as Mc,B as H,C as Bv,p as xr,q as _r,s as vr,S as mo,t as br,v as es,w,x as ho,y as os,z as ls,A as us,E as Wr,F as po,G as kn,H as $n,I as Un,K as Bn,L as Vv,O as Vt,Q as zv,T as Gv,U as Hv,W as st,X as Oe,Y as dt,Z as Ve,_ as We,$ as Pe,a0 as bn,a1 as xo,a2 as Kv,a3 as _o,a4 as wn,a5 as vo,a6 as bo,a7 as Xr,a8 as Et,a9 as Lc,aa as Wv,ab as ts,ac as Gn,ad as wo,ae as So,af as On,ag as Co,ah as Oc,ai as jo,aj as yo,ak as No,al as cs,am as Qv,an as Ln,ao as xc,ap as Yv,aq as Xv,ar as Zv,as as Ro,at as _n,au as Gt,av as jn,aw as ds,ax as Pc,ay as Jv,az as qc,aA as e0,aB as ae,aC as fs,aD as to,aE as kc,aF as $c,aG as Uc,aH as Vn,aI as Bc,aJ as gs,aK as ei,aL as ti,aM as ni,aN as Zr,aO as t0,aP as Vc,aQ as Qe,aR as Ye,aS as no,aT as Xe,aU as mr,aV as wr,aW as hr,aX as n0,aY as r0,aZ as i0,a_ as ro,a$ as s0,b0 as a0,b1 as ur,b2 as zc,b3 as ns,b4 as Gc,b5 as zn,b6 as Jr,b7 as Bt,b8 as o0,b9 as hn,ba as ms,bb as Hc,bc as l0,bd as hs,be as u0,bf as Kc,bg as Wc,bh as Qc,bi as Yc,bj as Xc,bk as Zc,bl as Jc,bm as ed,bn as td,bo as c0,bp as Qi,bq as d0,br as f0,bs as g0,bt as m0,bu as h0,bv as p0,bw as x0,bx as _0,by as v0,bz as b0,bA as w0,bB as _c,bC as nd,bD as rd,bE as id,bF as sd,bG as ad,bH as od,bI as ld,bJ as S0,bK as Va,bL as Qr,bM as C0,bN as ud,bO as j0,bP as y0,bQ as cd,bR as dd,bS as io,bT as so,bU as N0,bV as R0,bW as E0}from"./index-zvH6W8yt.js";const A0=n=>{const{onSuccess:o,...r}=n||{},a=qn(),{login:l}=Fc(),c=rn();return Ut({mutationKey:a().auth().action("login").get(),mutationFn:l,onSuccess:async(d,m,p)=>{d.success&&c.removeQueries({queryKey:a().auth().get()}),await(o==null?void 0:o(d,m,p))},...r})};/**
2026-10-14 10:34:10 +00:00
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fd=Ee("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const I0=Ee("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vc=Ee("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bc=Ee("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const F0=Ee("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const D0=Ee("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gd=Ee("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const T0=Ee("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M0=Ee("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const L0=Ee("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Eo=Ee("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const md=Ee("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const O0=Ee("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hd=Ee("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const P0=Ee("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q0=Ee("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pd=Ee("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k0=Ee("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ao=Ee("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Io=Ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $0=Ee("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U0=Ee("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const B0=Ee("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xd=Ee("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
2026-10-14 10:57:21 +00:00
*/const _d=Ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),V0=({className:n,...o})=>i.jsx(kv,{className:pe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),...o}),wc=qv,z0=({withHandle:n,className:o,...r})=>i.jsx($v,{className:pe("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",o),...r,children:n&&i.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:i.jsx(pd,{className:"h-2.5 w-2.5"})})});function ct({className:n,...o}){return i.jsx("div",{className:pe("animate-pulse rounded-md bg-muted",n),...o})}const G0=n=>typeof n=="object"&&n!==null&&n.hasOwnProperty("total_items");let Yi;const H0=new Uint8Array(16);function K0(){if(!Yi&&(Yi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yi(H0)}const Ke=[];for(let n=0;n<256;++n)Ke.push((n+256).toString(16).slice(1));function W0(n,o=0){return Ke[n[o+0]]+Ke[n[o+1]]+Ke[n[o+2]]+Ke[n[o+3]]+"-"+Ke[n[o+4]]+Ke[n[o+5]]+"-"+Ke[n[o+6]]+Ke[n[o+7]]+"-"+Ke[n[o+8]]+Ke[n[o+9]]+"-"+Ke[n[o+10]]+Ke[n[o+11]]+Ke[n[o+12]]+Ke[n[o+13]]+Ke[n[o+14]]+Ke[n[o+15]]}const Q0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Sc={randomUUID:Q0};function Y0(n,o,r){if(Sc.randomUUID&&!n)return Sc.randomUUID();n=n||{};const a=n.random||(n.rng||K0)();return a[6]=a[6]&15|64,a[8]=a[8]&63|128,W0(a)}class pn extends as{static validate(o,r){const a=qe.RULE_ALLOW_EMPTY.default(""),l=At.string().guid({version:["uuidv4"]}).label(r.label?r.label:"id"),c=At.alternatives(a,l);return qe.validate(c,o)}static sanitize(o){return o.trim()}static create(o,r={}){const a={label:"id",generateOnEmpty:!1,...r};if(!o&&!a.generateOnEmpty)return ke.fail(fr(gr.INVALID_INPUT_DATA,"ID is null or empty"));if(o){const l=pn.validate(o,a);return l.isFailure?ke.fail(fr(gr.INVALID_INPUT_DATA,l.error.message,a)):ke.ok(new pn(pn.sanitize(l.object)))}return a.generateOnEmpty?pn.generateNewID():ke.ok(new pn(null))}static generateNewID(){return ke.ok(new pn(Y0()))}get value(){return String(this.props)}toString(){return String(this.props)}toPrimitive(){return this.toString()}}const za={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian"
2026-10-14 10:34:10 +00:00
* table-core
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function nb(){return{accessor:(n,o)=>typeof n=="function"?{...o,accessorFn:n}:{...o,accessorKey:n},display:n=>n,group:n=>n}}function vn(n,o){return typeof n=="function"?n(o):n}function _t(n,o){return r=>{o.setState(a=>({...a,[n]:vn(r,a[n])}))}}function ps(n){return n instanceof Function}function rb(n){return Array.isArray(n)&&n.every(o=>typeof o=="number")}function ib(n,o){const r=[],a=l=>{l.forEach(c=>{r.push(c);const d=o(c);d!=null&&d.length&&a(d)})};return a(n),r}function Z(n,o,r){let a=[],l;return c=>{let d;r.key&&r.debug&&(d=Date.now());const m=n(c);if(!(m.length!==a.length||m.some((_,C)=>a[C]!==_)))return l;a=m;let x;if(r.key&&r.debug&&(x=Date.now()),l=o(...m),r==null||r.onChange==null||r.onChange(l),r.key&&r.debug&&r!=null&&r.debug()){const _=Math.round((Date.now()-d)*100)/100,C=Math.round((Date.now()-x)*100)/100,y=C/16,v=(R,E)=>{for(R=String(R);R.length<E;)R=" "+R;return R};console.info(`%c⏱ ${v(C,5)} /${v(_,5)} ms`,`
font-size: .6rem;
font-weight: bold;
2026-10-14 10:57:21 +00:00
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,r==null?void 0:r.key)}return l}}function J(n,o,r,a){return{debug:()=>{var l;return(l=n==null?void 0:n.debugAll)!=null?l:n[o]},key:!1,onChange:a}}function sb(n,o,r,a){const l=()=>{var d;return(d=c.getValue())!=null?d:n.options.renderFallbackValue},c={id:`${o.id}_${r.id}`,row:o,column:r,getValue:()=>o.getValue(a),renderValue:l,getContext:Z(()=>[n,r,o,c],(d,m,p,x)=>({table:d,column:m,row:p,cell:x,getValue:x.getValue,renderValue:x.renderValue}),J(n.options,"debugCells"))};return n._features.forEach(d=>{d.createCell==null||d.createCell(c,r,o,n)},{}),c}function ab(n,o,r,a){var l,c;const m={...n._getDefaultColumnDef(),...o},p=m.accessorKey;let x=(l=(c=m.id)!=null?c:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?l:typeof m.header=="string"?m.header:void 0,_;if(m.accessorFn?_=m.accessorFn:p&&(p.includes(".")?_=y=>{let v=y;for(const E of p.split(".")){var R;v=(R=v)==null?void 0:R[E]}return v}:_=y=>y[m.accessorKey]),!x)throw new Error;let C={id:`${String(x)}`,accessorFn:_,parent:a,depth:r,columnDef:m,columns:[],getFlatColumns:Z(()=>[!0],()=>{var y;return[C,...(y=C.columns)==null?void 0:y.flatMap(v=>v.getFlatColumns())]},J(n.options,"debugColumns")),getLeafColumns:Z(()=>[n._getOrderColumnsFn()],y=>{var v;if((v=C.columns)!=null&&v.length){let R=C.columns.flatMap(E=>E.getLeafColumns());return y(R)}return[C]},J(n.options,"debugColumns"))};for(const y of n._features)y.createColumn==null||y.createColumn(C,n);return C}const et="debugHeaders";function jc(n,o,r){var a;let c={id:(a=r.id)!=null?a:o.id,column:o,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const d=[],m=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(m),d.push(p)};return m(c),d},getContext:()=>({table:n,header:c,column:o})};return n._features.forEach(d=>{d.createHeader==null||d.createHeader(c,n)}),c}const ob={createTable:n=>{n.getHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,r,a,l)=>{var c,d;const m=(c=a==null?void 0:a.map(C=>r.find(y=>y.id===C)).filter(Boolean))!=null?c:[],p=(d=l==null?void 0:l.map(C=>r.find(y=>y.id===C)).filter(Boolean))!=null?d:[],x=r.filter(C=>!(a!=null&&a.includes(C.id))&&!(l!=null&&l.includes(C.id)));return Xi(o,[...m,...x,...p],n)},J(n.options,et)),n.getCenterHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,r,a,l)=>(r=r.filter(c=>!(a!=null&&a.includes(c.id))&&!(l!=null&&l.includes(c.id))),Xi(o,r,n,"center")),J(n.options,et)),n.getLeftHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(o,r,a)=>{var l;const c=(l=a==null?void 0:a.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?l:[];return Xi(o,c,n,"left")},J(n.options,et)),n.getRightHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(o,r,a)=>{var l;const c=(l=a==null?void 0:a.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?l:[];return Xi(o,c,n,"right")},J(n.options,et)),n.getFooterGroups=Z(()=>[n.getHeaderGroups()],o=>[...o].reverse(),J(n.options,et)),n.getLeftFooterGroups=Z(()=>[n.getLeftHeaderGroups()],o=>[...o].reverse(),J(n.options,et)),n.getCenterFooterGroups=Z(()=>[n.getCenterHeaderGroups()],o=>[...o].reverse(),J(n.options,et)),n.getRightFooterGroups=Z(()=>[n.getRightHeaderGroups()],o=>[...o].reverse(),J(n.options,et)),n.getFlatHeaders=Z(()=>[n.getHeaderGroups()],o=>o.map(r=>r.headers).flat(),J(n.options,et)),n.getLeftFlatHeaders=Z(()=>[n.getLeftHeaderGroups()],o=>o.map(r=>r.headers).flat(),J(n.options,et)),n.getCenterFlatHeaders=Z(()=>[n.getCenterHeaderGroups()],o=>o.map(r=>r.headers).flat(),J(n.options,et)),n.getRightFlatHeaders=Z(()=>[n.getRightHeaderGroups()],o=>o.map(r=>r.headers).flat(),J(n.options,et)),n.getCenterLeafHeaders=Z(()=>[n.getCenterFlatHeaders()],o=>o.filter(r=>{v
2026-10-14 10:34:10 +00:00
* react-table
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
2026-10-14 10:57:21 +00:00
*/function rs(n,o){return n?Kb(n)?M.createElement(n,o):n:null}function Kb(n){return Wb(n)||typeof n=="function"||Qb(n)}function Wb(n){return typeof n=="function"&&(()=>{const o=Object.getPrototypeOf(n);return o.prototype&&o.prototype.isReactComponent})()}function Qb(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function Md(n){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[r]=M.useState(()=>({current:$b(o)})),[a,l]=M.useState(()=>r.current.initialState);return r.current.setOptions(c=>({...c,...n,state:{...a,...n.state},onStateChange:d=>{l(d),n.onStateChange==null||n.onStateChange(d)}})),r.current}const Yb=({buttonText:n,title:o="",content:r,className:a=""})=>i.jsx("div",{className:`flex items-baseline justify-center mr-4 font-medium ${a}`,children:i.jsxs(pr,{children:[i.jsx(Mc,{asChild:!0,children:i.jsxs(H,{variant:"link",className:"inline-flex items-center font-medium group",children:[i.jsx("span",{className:"underline-offset-4 group-hover:underline",children:n}),i.jsx(Bv,{className:"w-4 h-4 ml-1 text-muted-foreground"})]})}),i.jsxs(xr,{className:"sm:max-w-[425px]",children:[i.jsx(_r,{children:i.jsx(vr,{children:o})}),i.jsxs(mo,{className:"grid gap-4 py-2",children:[r,i.jsx(br,{children:i.jsx(es,{asChild:!0,children:i.jsx(H,{type:"button",children:w("common.close")})})})]})]})]})});function Xb(n){let a=0;for(let _=0;_<n.length;_++)a=n.charCodeAt(_)+((a<<5)-a);let l="#";for(let _=0;_<3;_++){const C=a>>_*8&255;l+=("00"+C.toString(16)).substr(-2)}const c=parseInt(l.substr(1,2),16),d=parseInt(l.substr(3,2),16),m=parseInt(l.substr(5,2),16),p=`#${(c*.7|0).toString(16).padStart(2,"0")}${(d*.7|0).toString(16).padStart(2,"0")}${(m*.7|0).toString(16).padStart(2,"0")}`,x=`#${Math.min(255,Math.floor(c+(255-c)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(d+(255-d)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(m+(255-m)*.7)).toString(16).padStart(2,"0")}`;return[p,x]}const Ld=({label:n,className:o})=>{const[r,a]=Xb(n);return i.jsx(ho,{className:o,style:o?{}:{backgroundColor:a,color:r},children:n})};function Od({table:n,header:o,className:r}){return o.column.getCanSort()?i.jsx("div",{className:pe("flex items-center space-x-2",r),children:i.jsxs(os,{children:[i.jsx(ls,{asChild:!0,children:i.jsxs(H,{"aria-label":o.column.getIsSorted()==="desc"?w("common.sort_desc_description"):o.column.getIsSorted()==="asc"?w("common.sort_asc_description"):w("common.sort_none_description"),size:"sm",variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent font-bold text-muted-foreground",children:[rs(o.column.columnDef.header,o.getContext()),o.column.getIsSorted()==="desc"?i.jsx(vc,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):o.column.getIsSorted()==="asc"?i.jsx(bc,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):i.jsx(I0,{className:"w-4 h-4 ml-2 text-muted-foreground/30","aria-hidden":"true"})]})}),i.jsxs(us,{align:"start",children:[o.column.getCanSort()&&i.jsxs(i.Fragment,{children:[i.jsxs(Wr,{onClick:()=>o.column.toggleSorting(!1),"aria-label":w("common.sort_asc"),children:[i.jsx(bc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.sort_asc")]}),i.jsxs(Wr,{onClick:()=>o.column.toggleSorting(!0),"aria-label":w("common.sort_desc"),children:[i.jsx(vc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.sort_desc")]})]}),o.column.getCanSort()&&o.column.getCanHide()&&i.jsx(po,{}),o.column.getCanHide()&&i.jsxs(Wr,{onClick:()=>o.column.toggleVisibility(!1),"aria-label":w("common.hide"),children:[i.jsx(hd,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.hide")]})]})]})}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:pe("data-[state=open]:bg-accent tracking-wide text-ellipsis",r),children:o.isPlaceholder?null:rs(o.column.columnDef.header,o.getContext())}),!1]})}function Zb({table:n,className:o,enablePageSizeSelector:r=!0,visible:a="auto"}){const l=M.useMemo(()=>a===!0,[a]),c=M.useMemo(()=>a==="aut
2026-10-14 10:34:10 +00:00
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2026-10-14 10:57:21 +00:00
*/ss.exports;(function(n,o){(function(){var r,a="4.17.21",l=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",m="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",x=500,_="__lodash_placeholder__",C=1,y=2,v=4,R=1,E=2,k=1,D=2,F=4,q=8,U=16,O=32,V=64,$=128,le=256,oe=512,G=30,ne="...",K=800,ie=16,xe=1,tt=2,Y=3,ze=1/0,ve=9007199254740991,Ae=17976931348623157e292,Q=NaN,Ne=4294967295,vt=Ne-1,Cr=Ne>>>1,yn=[["ary",$],["bind",k],["bindKey",D],["curry",q],["curryRight",U],["flip",oe],["partial",O],["partialRight",V],["rearg",le]],Kn="[object Arguments]",ri="[object Array]",Yd="[object AsyncFunction]",jr="[object Boolean]",yr="[object Date]",Xd="[object DOMException]",ii="[object Error]",si="[object Function]",$o="[object GeneratorFunction]",It="[object Map]",Nr="[object Number]",Zd="[object Null]",Ht="[object Object]",Uo="[object Promise]",Jd="[object Proxy]",Rr="[object RegExp]",Ft="[object Set]",Er="[object String]",ai="[object Symbol]",ef="[object Undefined]",Ar="[object WeakMap]",tf="[object WeakSet]",Ir="[object ArrayBuffer]",Wn="[object DataView]",ws="[object Float32Array]",Ss="[object Float64Array]",Cs="[object Int8Array]",js="[object Int16Array]",ys="[object Int32Array]",Ns="[object Uint8Array]",Rs="[object Uint8ClampedArray]",Es="[object Uint16Array]",As="[object Uint32Array]",nf=/\b__p \+= '';/g,rf=/\b(__p \+=) '' \+/g,sf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bo=/&(?:amp|lt|gt|quot|#39);/g,Vo=/[&<>"']/g,af=RegExp(Bo.source),of=RegExp(Vo.source),lf=/<%-([\s\S]+?)%>/g,uf=/<%([\s\S]+?)%>/g,zo=/<%=([\s\S]+?)%>/g,cf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,df=/^\w*$/,ff=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Is=/[\\^$.*+?()[\]{}|]/g,gf=RegExp(Is.source),Fs=/^\s+/,mf=/\s/,hf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pf=/\{\n\/\* \[wrapped with (.+)\] \*/,xf=/,? & /,_f=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vf=/[()=,{}\[\]\/\s]/,bf=/\\(\\)?/g,wf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Go=/\w*$/,Sf=/^[-+]0x[0-9a-f]+$/i,Cf=/^0b[01]+$/i,jf=/^\[object .+?Constructor\]$/,yf=/^0o[0-7]+$/i,Nf=/^(?:0|[1-9]\d*)$/,Rf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oi=/($^)/,Ef=/['\n\r\u2028\u2029\\]/g,li="\\ud800-\\udfff",Af="\\u0300-\\u036f",If="\\ufe20-\\ufe2f",Ff="\\u20d0-\\u20ff",Ho=Af+If+Ff,Ko="\\u2700-\\u27bf",Wo="a-z\\xdf-\\xf6\\xf8-\\xff",Df="\\xac\\xb1\\xd7\\xf7",Tf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mf="\\u2000-\\u206f",Lf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qo="A-Z\\xc0-\\xd6\\xd8-\\xde",Yo="\\ufe0e\\ufe0f",Xo=Df+Tf+Mf+Lf,Ds="['’]",Of="["+li+"]",Zo="["+Xo+"]",ui="["+Ho+"]",Jo="\\d+",Pf="["+Ko+"]",el="["+Wo+"]",tl="[^"+li+Xo+Jo+Ko+Wo+Qo+"]",Ts="\\ud83c[\\udffb-\\udfff]",qf="(?:"+ui+"|"+Ts+")",nl="[^"+li+"]",Ms="(?:\\ud83c[\\udde6-\\uddff]){2}",Ls="[\\ud800-\\udbff][\\udc00-\\udfff]",Qn="["+Qo+"]",rl="\\u200d",il="(?:"+el+"|"+tl+")",kf="(?:"+Qn+"|"+tl+")",sl="(?:"+Ds+"(?:d|ll|m|re|s|t|ve))?",al="(?:"+Ds+"(?:D|LL|M|RE|S|T|VE))?",ol=qf+"?",ll="["+Yo+"]?",$f="(?:"+rl+"(?:"+[nl,Ms,Ls].join("|")+")"+ll+ol+")*",Uf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Bf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ul=ll+ol+$f,Vf="(?:"+[Pf,Ms,Ls].join("|")+")"+ul,zf="(?:"+[nl+ui+"?",ui,Ms,Ls,Of].join("|")+")",Gf=RegExp(Ds,"g"),Hf=RegExp(ui,"g"),Os=RegExp(Ts+"(?="+Ts+")|"+zf+ul,"g"),Kf=RegExp([Qn+"?"+el+"+"+sl+"(?="+[Zo,Qn,"$"].join("|")+")",kf+"+"+al+"(?="+[Zo,Qn+il,"$"].join("|")+")",Qn+"?"+il+"+"+sl,Qn+"+"+al,Bf,Uf,Jo,Vf].join("|"),"g"),Wf=RegExp("["+rl+li+Ho+Yo+"]"),Qf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout
2026-10-14 10:34:10 +00:00
/* [wrapped with `+t+`] */
2026-10-14 10:57:21 +00:00
`)}function mh(e){return se(e)||Mn(e)||!!(Dl&&e&&e[Dl])}function Zt(e,t){var s=typeof e;return t=t??ve,!!t&&(s=="number"||s!="symbol"&&Nf.test(e))&&e>-1&&e%1==0&&e<t}function rt(e,t,s){if(!Fe(s))return!1;var u=typeof t;return(u=="number"?ot(s)&&Zt(t,s.length):u=="string"&&t in s)?Mt(s[t],e):!1}function Ca(e,t){if(se(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||ht(e)?!0:df.test(e)||!cf.test(e)||t!=null&&e in Ce(t)}function hh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ja(e){var t=qi(e),s=g[t];if(typeof s!="function"||!(t in ge.prototype))return!1;if(e===s)return!0;var u=ba(s);return!!u&&e===u[0]}function ph(e){return!!El&&El in e}var xh=mi?Jt:Ua;function Vr(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||er;return e===s}function Eu(e){return e===e&&!Fe(e)}function Au(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in Ce(s))}}function _h(e){var t=zi(e,function(u){return s.size===x&&s.clear(),u}),s=t.cache;return t}function vh(e,t){var s=e[1],u=t[1],f=s|u,h=f<(k|D|$),b=u==$&&s==q||u==$&&s==le&&e[7].length<=t[8]||u==($|le)&&t[7].length<=t[8]&&s==q;if(!(h||b))return e;u&k&&(e[2]=t[2],f|=s&k?0:F);var S=t[3];if(S){var N=e[3];e[3]=N?du(N,S,t[4]):S,e[4]=N?ln(e[3],_):t[4]}return S=t[5],S&&(N=e[5],e[5]=N?fu(N,S,t[6]):S,e[6]=N?ln(e[5],_):t[6]),S=t[7],S&&(e[7]=S),u&$&&(e[8]=e[8]==null?t[8]:Ze(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=f,e}function bh(e){var t=[];if(e!=null)for(var s in Ce(e))t.push(s);return t}function wh(e){return pi.call(e)}function Iu(e,t,s){return t=Ue(t===r?e.length-1:t,0),function(){for(var u=arguments,f=-1,h=Ue(u.length-t,0),b=A(h);++f<h;)b[f]=u[t+f];f=-1;for(var S=A(t+1);++f<t;)S[f]=u[f];return S[t]=s(b),ft(e,this,S)}}function Fu(e,t){return t.length<2?e:Fn(e,yt(t,0,-1))}function Sh(e,t){for(var s=e.length,u=Ze(t.length,s),f=at(e);u--;){var h=t[u];e[u]=Zt(h,s)?f[h]:r}return e}function ya(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Du=Mu(tu),zr=Pg||function(e,t){return Ge.setTimeout(e,t)},Na=Mu(Gm);function Tu(e,t,s){var u=t+"";return Na(e,gh(u,Ch(ch(u),s)))}function Mu(e){var t=0,s=0;return function(){var u=Ug(),f=ie-(u-s);if(s=u,f>0){if(++t>=K)return arguments[0]}else t=0;return e.apply(r,arguments)}}function $i(e,t){var s=-1,u=e.length,f=u-1;for(t=t===r?u:t;++s<t;){var h=la(s,f),b=e[h];e[h]=e[s],e[s]=b}return e.length=t,e}var Lu=_h(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ff,function(s,u,f,h){t.push(f?h.replace(bf,"$1"):u||s)}),t});function $t(e){if(typeof e=="string"||ht(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Tn(e){if(e!=null){try{return hi.call(e)}catch{}try{return e+""}catch{}}return""}function Ch(e,t){return wt(yn,function(s){var u="_."+s[0];t&s[1]&&!ci(e,u)&&e.push(u)}),e.sort()}function Ou(e){if(e instanceof ge)return e.clone();var t=new Ct(e.__wrapped__,e.__chain__);return t.__actions__=at(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function jh(e,t,s){(s?rt(e,t,s):t===r)?t=1:t=Ue(ue(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var f=0,h=0,b=A(Si(u/t));f<u;)b[h++]=yt(e,f,f+=t);return b}function yh(e){for(var t=-1,s=e==null?0:e.length,u=0,f=[];++t<s;){var h=e[t];h&&(f[u++]=h)}return f}function Nh(){var e=arguments.length;if(!e)return[];for(var t=A(e-1),s=arguments[0],u=e;u--;)t[u-1]=arguments[u];return on(se(s)?at(s):[s],He(t,1))}var Rh=de(function(e,t){return Me(e)?qr(e,He(t,1,Me,!0)):[]}),Eh=de(function(e,t){var s=Nt(t);return Me(s)&&(s=r),Me(e)?qr(e,He(t,1,Me,!0),X(s,2)):[]}),Ah=de(function(e,t){var s=Nt(t);return Me(s)&&(s=r),Me(e)?qr(e,He(t,1,Me,!0),r,s):[]});function Ih(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:ue(t),yt(e,t<0?0:t,u)):[]}function Fh(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:ue(t),t=u-t,yt(e,0,t<0?0:t)):[]}function Dh(e,t){return e&&e.length?Di(e,X(t,3),!0,!0):[]}function Th(e,t){return e&&e.length?Di(e,X(t,3),!0):[]}function Mh(e,t,s,u){var f=e==null?0:e.length;return f?(s&&typeof s!="n
`;e.replace(B,function(te,fe,me,pt,it,xt){return me||(me=pt),P+=e.slice(T,xt).replace(Ef,xg),fe&&(S=!0,P+=`' +
__e(`+fe+`) +
'`),it&&(N=!0,P+=`';
`+it+`;
__p += '`),me&&(P+=`' +
((__t = (`+me+`)) == null ? '' : __t) +
'`),T=xt+te.length,te}),P+=`';
2026-10-14 10:34:10 +00:00
`;var ee=be.call(t,"variable")&&t.variable;if(!ee)P=`with (obj) {
`+P+`
}
`;else if(vf.test(ee))throw new re(m);P=(N?P.replace(nf,""):P).replace(rf,"$1").replace(sf,"$1;"),P="function("+(ee||"obj")+`) {
`+(ee?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(N?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+P+`return __p
2026-10-14 10:57:21 +00:00
}`;var ce=mc(function(){return he(h,W+"return "+P).apply(r,b)});if(ce.source=P,Fa(ce))throw ce;return ce}function V_(e){return _e(e).toLowerCase()}function z_(e){return _e(e).toUpperCase()}function G_(e,t,s){if(e=_e(e),e&&(s||t===r))return Cl(e);if(!e||!(t=mt(t)))return e;var u=Dt(e),f=Dt(t),h=jl(u,f),b=yl(u,f)+1;return gn(u,h,b).join("")}function H_(e,t,s){if(e=_e(e),e&&(s||t===r))return e.slice(0,Rl(e)+1);if(!e||!(t=mt(t)))return e;var u=Dt(e),f=yl(u,Dt(t))+1;return gn(u,0,f).join("")}function K_(e,t,s){if(e=_e(e),e&&(s||t===r))return e.replace(Fs,"");if(!e||!(t=mt(t)))return e;var u=Dt(e),f=jl(u,Dt(t));return gn(u,f).join("")}function W_(e,t){var s=G,u=ne;if(Fe(t)){var f="separator"in t?t.separator:f;s="length"in t?ue(t.length):s,u="omission"in t?mt(t.omission):u}e=_e(e);var h=e.length;if(Xn(e)){var b=Dt(e);h=b.length}if(s>=h)return e;var S=s-Zn(u);if(S<1)return u;var N=b?gn(b,0,S).join(""):e.slice(0,S);if(f===r)return N+u;if(b&&(S+=N.length-S),Da(f)){if(e.slice(S).search(f)){var T,L=N;for(f.global||(f=Ws(f.source,_e(Go.exec(f))+"g")),f.lastIndex=0;T=f.exec(L);)var P=T.index;N=N.slice(0,P===r?S:P)}}else if(e.indexOf(mt(f),S)!=S){var B=N.lastIndexOf(f);B>-1&&(N=N.slice(0,B))}return N+u}function Q_(e){return e=_e(e),e&&af.test(e)?e.replace(Bo,jg):e}var Y_=sr(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),La=hu("toUpperCase");function gc(e,t,s){return e=_e(e),t=s?r:t,t===r?vg(e)?Rg(e):cg(e):e.match(t)||[]}var mc=de(function(e,t){try{return ft(e,r,t)}catch(s){return Fa(s)?s:new re(s)}}),X_=Xt(function(e,t){return wt(t,function(s){s=$t(s),Qt(e,s,Aa(e[s],e))}),e});function Z_(e){var t=e==null?0:e.length,s=X();return e=t?Ie(e,function(u){if(typeof u[1]!="function")throw new St(d);return[s(u[0]),u[1]]}):[],de(function(u){for(var f=-1;++f<t;){var h=e[f];if(ft(h[0],this,u))return ft(h[1],this,u)}})}function J_(e){return jm(jt(e,C))}function Oa(e){return function(){return e}}function ev(e,t){return e==null||e!==e?t:e}var tv=xu(),nv=xu(!0);function ut(e){return e}function Pa(e){return Kl(typeof e=="function"?e:jt(e,C))}function rv(e){return Ql(jt(e,C))}function iv(e,t){return Yl(e,jt(t,C))}var sv=de(function(e,t){return function(s){return kr(s,e,t)}}),av=de(function(e,t){return function(s){return kr(e,s,t)}});function qa(e,t,s){var u=Be(t),f=Ai(t,u);s==null&&!(Fe(t)&&(f.length||!u.length))&&(s=t,t=e,e=this,f=Ai(t,Be(t)));var h=!(Fe(s)&&"chain"in s)||!!s.chain,b=Jt(e);return wt(f,function(S){var N=t[S];e[S]=N,b&&(e.prototype[S]=function(){var T=this.__chain__;if(h||T){var L=e(this.__wrapped__),P=L.__actions__=at(this.__actions__);return P.push({func:N,args:arguments,thisArg:e}),L.__chain__=T,L}return N.apply(e,on([this.value()],arguments))})}),e}function ov(){return Ge._===this&&(Ge._=Tg),this}function ka(){}function lv(e){return e=ue(e),de(function(t){return Xl(t,e)})}var uv=pa(Ie),cv=pa(_l),dv=pa(Us);function hc(e){return Ca(e)?Bs($t(e)):Um(e)}function fv(e){return function(t){return e==null?r:Fn(e,t)}}var gv=vu(),mv=vu(!0);function $a(){return[]}function Ua(){return!1}function hv(){return{}}function pv(){return""}function xv(){return!0}function _v(e,t){if(e=ue(e),e<1||e>ve)return[];var s=Ne,u=Ze(e,Ne);t=X(t),e-=Ne;for(var f=Gs(u,t);++s<e;)t(s);return f}function vv(e){return se(e)?Ie(e,$t):ht(e)?[e]:at(Lu(_e(e)))}function bv(e){var t=++Fg;return _e(e)+t}var wv=Li(function(e,t){return e+t},0),Sv=xa("ceil"),Cv=Li(function(e,t){return e/t},1),jv=xa("floor");function yv(e){return e&&e.length?Ei(e,ut,na):r}function Nv(e,t){return e&&e.length?Ei(e,X(t,2),na):r}function Rv(e){return wl(e,ut)}function Ev(e,t){return wl(e,X(t,2))}function Av(e){return e&&e.length?Ei(e,ut,aa):r}function Iv(e,t){return e&&e.length?Ei(e,X(t,2),aa):r}var Fv=Li(function(e,t){return e*t},1),Dv=xa("round"),Tv=Li(function(e,t){return e-t},0);function Mv(e){return e&&e.length?zs(e,ut):0}function Lv(e,t){return e&&e.length?zs(e,X(t,2)):0}return g.after=rx,g.ary=Hu,g.assign=zx,g.assignIn=ac,g.assignInWith=Wi,g.assignWith=Gx,g.at=Hx,g.before=Ku,g.bind=Aa,g.bindAll=X_,g.bindKey=Wu,g.castArray=hx,g.chain=Vu,g.chunk=jh,g.compact=yh,g.concat=Nh,g.cond=Z_,g.confo
2026-10-14 10:34:10 +00:00
Modelo: LYN / Acabado: ANODIZADO / Color: NEGRO\r
Nº de travesaños: 2 TRAVESAÑOS HORIZONTALES\r
Acabado paneles: TRANSPARENTE TEMPLADO \r
Tirador: DOBLE POR PUERTA\r
Freno: DOBLE POR PUERTA (APERTURA Y CIERRE)\r
Guía: VISTA (DOBLE EMBELLECEDOR)\r
Nº de hojas: 2 CORREDERAS + 2 FIJOS`},{id:51,code:"CAP_FRE_ARM_CORREDERA_ES",title:"CARACTERISTICAS FRENTE DE ARMARIO CORREDERA",body:`Medida de Hueco:2440x5180mm.\r
Modelo: PANORAMIC P.O. / Acabado: LACADO / Color: BLANCO\r
Nº de lístelos: SIN LISTELOS / Acabado paneles: PANEL LACADO\r
Tirador:\r
Cerco perimetral: \r
Nº de hojas:\r
FRENO HIDRAULICO INCORPORADO O FRENO MAGNETICO INCORPORADO\r
Compuesto por:`},{id:52,code:"CAP_FRE_ARM_ABATIBLE_ES",title:"CARACTERISTICAS FRENTE DE ARMARIO",body:`Medida de hueco: 2275x1390 mm.\r
Modelo: ARGO / Acabado: LACADO / Color: A DETERMINAR\r
Grosor hoja: 22 o 19 mm\r
Acabado de hojas: LISAS\r
Tirador: UÑERO A DETERMINAR\r
Acabado herrajes: CROMADO O ANTRACITA\r
Jambas perimetrales: VISTAS, REMETIDAS O COMBI A DETERMINAR.\r
Nº de hojas: 2\r
Compuesto por:`},{id:53,code:"CAP_INT_ARM_FORRADO_ES",title:"CARACTERISTICAS INTERIOR DE ARMARIO",body:`Acabado: MELAMINA / color: A DETERMINAR\r
Espesor bloque: 19 mm. / Espesor complementos: 19 mm.\r
Barras de colgar: CROMO/ NEGRA/ BRONCE\r
Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424\r
Tirador cajones: FRENTE BAJO / Cajones: 4 DE 180 MM. A DETERMINAR\r
Baldas deslizantes: X DE 145 MM. A DETERMINAR\r
Compuesto por:`},{id:54,code:"CAP_CLA_SEMI_SUSPENDIDO_ES",title:"Acabado: MELAMINA / color: A DETERMINAR",body:`Medida de Hueco: 2450x3000 mm.\r
Espesor bloque: 25 mm. / Espesor complementos: 25 mm.\r
Barras de colgar: CROMO/ NEGRA/ BRONCE\r
Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424\r
Tirador cajones: FRENTE BAJO / Cajones: 4 DE 180 MM. A DETERMINAR\r
Baldas deslizantes: X DE 145 MM. A DETERMINAR\r
Compuesto por:`},{id:2000000108,code:"CAP_INT_EST_CRISTAL_ES",title:"Acabado bastidores: ANODIZADO NEGRO",body:`Acabado panel bastidores laterales: CRISTAL TEMPLADO FLOAT BRONCE C-424\r
Acabado trasera: CRISTAL TEMPLADO FLOAT BRONCE C-424\r
Acabado complementos: MELAMINA / Color: ROBLE DENBER M-242\r
Espesor complementos: 25 mm.\r
Barras de colgar: NEGRA\r
Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424 \r
Tirador cajones: xxxxx / Cajones: 4 DE 180 MM.\r
Compuesto por:`}],Lw=[{id:2000000098,code:"CAP_CLA_SEMI_SUSPENDIDO_EN",title:"Finish: MELAMINE / colour: TO BE DETERMINED",body:`Size of opening: 2450x3000 mm.\r
Thickness block: 19 mm / Thickness complements: 19 mm.\r
Hanging rods: CHROME/ BLACK\r
Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r
Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r
Shoe rack door: YES/NO / Profile finish: BLACK LACQUER / SILVER MATTE\r
Shoe cabinet door glass finish: FLOAT BRONZE C-424\r
Composed of:`},{id:2000000084,code:"CAP_FRE_ARM_ABATIBLE_EN",title:"CHARACTERISTICS OF THE FRONT OF THE HINGED WARDROBE",body:`Size of opening: 2275x1390 mm.\r
Model: ARGO / Finish: LACQUER / Colour: TO BE DETERMINED\r
Door thickness: 22 or 19 mm\r
Door finish: SMOOTH \r
Handle: KNOB TO BE DETERMINED\r
Hardware finish: CHROME OR ANTHRACITE\r
Perimetral doorposts: VISIBLE, REMETED OR COMBI TO BE DETERMINED.\r
Number of doors: 2 \r
Composed of:`},{id:2000000089,code:"CAP_FRE_ARM_CORREDERA_EN",title:"Size of opening: 2440x5180mm. ",body:`Model: PANORAMIC P.O. / Finish: LACQUER / Colour: WHITE\r
No. of listers: NO LISTELS / Panels finish: LACQUERED PANEL \r
Handle: \r
Perimeter frame: \r
Nº of doors: \r
INCORPORATED HYDRAULIC BRAKE (not available in lower doors of 650 mm.) OR INCORPORATED MAGNETIC BRAKE. \r
Composed of:`},{id:2000000092,code:"CAP_INT_ARM_FORRADO_EN",title:"Finish: MELAMINE / colour: TO BE DETERMINED",body:`Thickness block: 19 mm / Thickness complements: 19 mm.\r
Hanging rods: CHROME/ BLACK\r
Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r
Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r
Composed of:`},{id:2000000109,code:"CAP_INT_EST_CRISTAL_EN",title:"Frames finish: BLACK ANODIZED",body:`Side frame panel finish: BRONZE FLOAT BRONZE GLASS C-424\r
Rear panel finish: BRONZE FLOAT GLASS C-424\r
Complements finish: MELAMIN / Colour: DENBER OAK M-242\r
Thickness of accessories: 25 mm.\r
Hanging bars: BLACK\r
Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r
Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r
Composed of:`},{id:2000000095,code:"CAP_SEP_AMBIENTES_EN",title:"CHARACTERISTICS SEPARATION OF ROOMS",body:`Size of opening: 2450x3000 mm.\r
Model: LYN / Finish: ANODISED / Colour: BLACK\r
No. of crosspieces: 2 HORIZONTAL CROSSBARS\r
Panel finish: TRANSPARENT TEMPLARED \r
Handle: DOUBLE PER DOOR\r
Brake: DOUBLE PER DOOR (OPENING AND CLOSING)\r
Guide: VISTA (DOUBLE EMBELLECEDOR)\r
Number of panels: 2 SLIDING + 2 FIXED`}],Ow=[{id:2000000121,code:"CAP_CLA_SEMI_SUSPENDIDO_FR",title:"CARACTÉRISTIQUES DRESSING CLASSIQUE / SEMI-SUSPENDU / SUSPENDU",body:`Finition : MÉLAMINE / Couleur : À DÉTERMINER\r
Épaisseur du bloc : 19 mm / Épaisseur des accessoires : 19 mm\r
Barres de penderie : CHROME / NOIR\r
Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r
Poignée des tiroirs : xxxxx\r
Tiroirs : 4 DE 180 MM\r
Porte de chaussures : OUI / NON\r
Finition du profil : LAQUÉ NOIR / ARGENT MAT\r
Finition du verre de la porte de chaussures : FLOAT BRONZE C-424\r
Composé de :`},{id:2000000123,code:"CAP_FRE_ARM_ABATIBLE_FR",title:"CARACTÉRISTIQUES FAÇADE DE PLACARD BATTANT",body:`Dimension de l’ouverture : 2275x1390 mm\r
Modèle : ARGO / Finition : LAQUÉE / Couleur : À DÉTERMINER\r
Épaisseur des vantaux : 22 ou 19 mm\r
Finition des vantaux : LISSES\r
Poignée : PRISE DE MAIN À DÉTERMINER\r
Finition des ferrures : CHROMÉ OU ANTHRACITE\r
Jambages périmétraux : APPARENTS, ENCASTRÉS OU COMBINÉS À DÉTERMINER\r
Nombre de vantaux : 2\r
Composé de :`},{id:2000000125,code:"CAP_FRE_ARM_CORREDERA_FR",title:"CARACTÉRISTIQUES FAÇADE DE PLACARD COULISSANT",body:`Dimension de l’ouverture : 2440x5180mm\r
Modèle : PANORAMIC P.O. / Finition : LAQUÉE / Couleur : BLANC\r
Nombre de listels : SANS LISTELS\r
Finition des panneaux : PANNEAU LAQUÉ\r
Poignée :\r
Encadrement périmétral :\r
Nombre de vantaux :\r
FREIN HYDRAULIQUE INTÉGRÉ (non disponible pour les portes inférieures à 650 mm) OU FREIN MAGNÉTIQUE INTÉGRÉ\r
Composé de :`},{id:2000000129,code:"CAP_INT_ARM_FORRADO_FR",title:"CARACTÉRISTIQUES INTÉRIEUR DE PLACARD HABILLÉ",body:`Finition : MÉLAMINE / Couleur : À DÉTERMINER\r
Épaisseur du bloc : 19 mm / Épaisseur des accessoires : 19 mm\r
Barres de penderie : CHROME / NOIR\r
Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r
Poignée des tiroirs : xxxxx\r
Tiroirs : 4 DE 180 MM\r
Composé de :`},{id:2000000131,code:"CAP_INT_EST_CRISTAL_FR",title:"CARACTÉRISTIQUES INTÉRIEUR DE PLACARD STRUCTURE EN VERRE",body:`Finition des cadres : ANODISÉ NOIR\r
Finition des panneaux des cadres latéraux : VERRE TREMPÉ FLOAT BRONZE C-424\r
Finition du dos : VERRE TREMPÉ FLOAT BRONZE C-424\r
Finition des accessoires : MÉLAMINE / Couleur : CHÊNE DENBER M-242\r
Épaisseur des accessoires : 25 mm\r
Barres de penderie : NOIRES\r
Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r
Poignée des tiroirs : xxxxx\r
Tiroirs : 4 DE 180 MM\r
2026-10-14 10:57:21 +00:00
Composé de :`},{id:2000000127,code:"CAP_INSTALACION_FR",title:"SERVICE D'INSTALLATION - PRIX NET",body:"Armoire d'installation x"},{id:2000000134,code:"CAP_SUMINISTRO_FR",title:"SERVICE DE FOURNITURE - PRIX NET",body:"Livraison du matériel au domicile du client"}],Ac={es:Mw,en:Lw,fr:Ow},Ic=({onSelect:n,languageCode:o})=>{const r=Ac[o.toLowerCase()]??Ac.es;return i.jsx(mo,{className:"h-96",children:i.jsx("div",{className:"flex flex-col gap-2 p-4 pt-0",children:r&&r.filter(({title:a,body:l})=>a||l).sort((a,l)=>a.title.localeCompare(l.title)).map(a=>i.jsx("button",{className:"flex flex-col items-start gap-2 p-3 text-sm text-left transition-all border rounded-lg hover:bg-accent",onClick:()=>n&&n(a,1),children:i.jsxs("div",{className:"flex flex-col w-full gap-1",children:[i.jsx("div",{className:"flex items-center",children:i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("div",{className:"font-semibold",children:a.title})})}),i.jsx("div",{className:"text-xs line-clamp-2 text-muted-foreground",children:i.jsx("p",{dangerouslySetInnerHTML:{__html:a.body.substring(0,300).replace(`\r
`,"<br>")}})})]})},a.code))})})},Pw=({isOpen:n,onOpenChange:o,onSelect:r,languageCode:a})=>kd("(min-width: 768px)")?i.jsx(pr,{modal:!0,open:n,onOpenChange:o,children:i.jsxs(xr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(_r,{children:[i.jsx(vr,{children:w("quotes.blocks_picker_dialog.title")}),i.jsx(ms,{children:w("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ic,{languageCode:a,onSelect:r}),i.jsx(br,{children:i.jsx(H,{type:"submit",onClick:()=>o(!1),children:w("common.close")})})]})}):i.jsx(nd,{open:n,onOpenChange:o,children:i.jsxs(rd,{children:[i.jsxs(id,{className:"text-left",children:[i.jsx(sd,{children:w("quotes.blocks_picker_dialog.title")}),i.jsx(ad,{children:w("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ic,{languageCode:a,onSelect:r}),i.jsx(od,{className:"pt-2",children:i.jsx(ld,{asChild:!0,children:i.jsx(H,{variant:"outline",children:w("common.close")})})})]})}),qw=({isOpen:n,onOpenChange:o,onSelect:r})=>kd("(min-width: 768px)")?i.jsx(pr,{modal:!0,open:n,onOpenChange:o,children:i.jsxs(xr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(_r,{children:[i.jsx(vr,{children:w("quotes.catalog_picker_dialog.title")}),i.jsx(ms,{children:w("quotes.catalog_picker_dialog.description")})]}),i.jsx(hr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(go,{onSelect:r})}),i.jsx(br,{children:i.jsx(H,{type:"submit",onClick:()=>o(!1),children:w("common.close")})})]})}):i.jsx(nd,{open:n,onOpenChange:o,children:i.jsxs(rd,{children:[i.jsxs(id,{className:"text-left",children:[i.jsx(sd,{children:w("quotes.catalog_picker_dialog.title")}),i.jsx(ad,{children:w("quotes.catalog_picker_dialog.description")})]}),i.jsx(hr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(go,{onSelect:r})}),i.jsx(od,{className:"pt-2",children:i.jsx(ld,{asChild:!0,children:i.jsx(H,{variant:"outline",children:w("common.close")})})})]})}),kw=({currency:n,language:o,defaultValues:r})=>{var oe;const{toast:a}=jn(),{control:l,getValues:c,setValue:d,watch:m}=Gn(),p=m("lang_code")||cr.DEFAULT_LANGUAGE_CODE,x=m("show_line_discount_column")??!0,_=!!((oe=c("items"))!=null&&oe.some(G=>{var ne;return Number((ne=G.discount)==null?void 0:ne.amount)>0})),[C]=M.useState("dialog"),[y,v]=M.useState(!1),[R,E]=M.useState(!1),{fields:k,...D}=S0({control:l,name:"items"}),F=bw([{id:"description",accessorKey:"description",header:w("quotes.form_fields.items.description.label"),cell:({row:{index:G,original:ne}})=>ne!=null&&ne.id_article?i.jsx("div",{className:"min-h-10 whitespace-pre-wrap px-3 py-2 text-sm",children:ne.localized_description??ne.description}):i.jsx(Bt,{autoSize:!0,name:`items.${G}.description`}),minSize:200,size:400},{id:"quantity",accessorKey:"quantity",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.quantity.label")}),cell:({row:{index:G}})=>i.jsx(rw,{scale:0,className:"text-right",name:`items.${G}.quantity`}),size:75},{id:"unit_price",accessorKey:"unit_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.unit_price.label")}),cell:({row:{index:G}})=>i.jsx(Va,{currency:n,language:o,scale:2,className:"text-right",name:`items.${G}.unit_price`}),size:125},{id:"subtotal_price",accessorKey:"subtotal_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.subtotal_price.label")}),cell:({row:{index:G}})=>i.jsx(Va,{variant:"ghost",currency:n,language:o,scale:2,readOnly:!0,className:"text-right",name:`items.${G}.subtotal_price`}),size:150},{id:"discount",accessorKey:"discount",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.discount.label")}),cell:({row:{index:G}})=>i.jsx(is,{scale:2,className:"text-right",name:`items.${G}.discount`}),size:100},{id:"total_price",accessorKey:"total_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.total_price.label")}),cell:({row:{index:G}})=>i.jsx(Va,{variant:"ghost",currency:n,language:o,scale:2,readOnly:!0,className:"font-semibold text-right",name:`items.${G}.total_price`}),size:150}],{enableDrag
${G.body}`,quantity:{amount:null,scale:Sn.DEFAULT_SCALE},unit_price:{amount:null,scale:X0.DEFAULT_SCALE},discount:{amount:null,scale:2}}),a({title:w("quotes.blocks_picker_dialog.toast_article_added"),description:G.title})},[D]),[O,V]=M.useState(!1),$=[265,440,655],le=4;return C==="dialog"?i.jsxs("div",{className:"relative",children:[i.jsx(Ec,{actions:{...D,getItem:G=>c(`items.${G}`),pickCatalogArticle:()=>v(!0),pickBlock:()=>E(!0)},columns:F,data:k,defaultValues:r,showLineDiscountColumn:x,hasLineDiscounts:_,onShowLineDiscountColumnChange:G=>d("show_line_discount_column",G,{shouldDirty:!0})}),i.jsx(qw,{onSelect:q,isOpen:y,onOpenChange:v}),i.jsx(Pw,{languageCode:p,onSelect:U,isOpen:R,onOpenChange:E})]}):i.jsxs(V0,{direction:"horizontal",autoSaveId:"uecko.quotes.details_layout",className:"items-stretch h-full",children:[i.jsx(wc,{defaultSize:$[0],collapsedSize:le,collapsible:!0,minSize:50,maxSize:90,onCollapse:()=>{V(!0)},onExpand:()=>{V(!1)},className:pe(O&&"min-w-[50px] transition-all duration-300 ease-in-out"),children:i.jsx(Ec,{actions:{...D,getItem:G=>c(`items.${G}`)},columns:F,data:k,defaultValues:r,showLineDiscountColumn:x,hasLineDiscounts:_,onShowLineDiscountColumnChange:G=>d("show_line_discount_column",G,{shouldDirty:!0})})}),i.jsx(z0,{withHandle:!0,className:"mx-3"}),i.jsx(wc,{defaultSize:$[1],minSize:10,children:i.jsx(hr,{syncWithLocation:!1,children:i.jsx(go,{onSelect:q})})})]})},$w=()=>{const{formState:n,control:o}=Gn();return i.jsxs("div",{className:"grid gap-6 md:grid-cols-6",children:[i.jsxs(ns,{className:"md:col-span-6",title:w("quotes.create.form_groups.general.title"),description:w("quotes.create.form_groups.general.desc"),actions:i.jsxs("div",{className:"grid min-w-48 gap-1",children:[i.jsx(zn,{htmlFor:"lang_code",className:"text-xs text-muted-foreground",children:w("quotes.form_fields.lang_code.label")}),i.jsx(Jr,{control:o,name:"lang_code",render:({field:r})=>i.jsxs(kn,{value:r.value||"es",onValueChange:r.onChange,children:[i.jsx($n,{id:"lang_code","aria-label":w("quotes.form_fields.lang_code.label"),children:i.jsx(Un,{placeholder:w("quotes.form_fields.lang_code.placeholder")})}),i.jsx(Bn,{children:sn.map(a=>i.jsxs(Vt,{value:a.code,children:[i.jsx("span",{"aria-hidden":"true",className:`mr-2 ${a.flagClassName}`}),a.name]},a.code))})]})})]}),children:[i.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[i.jsx(Pn,{required:!0,className:"col-span-2",label:w("quotes.form_fields.customer_reference.label"),description:w("quotes.form_fields.customer_reference.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.customer_reference.placeholder"),name:"customer_reference"}),i.jsx(Gc,{required:!0,label:w("quotes.form_fields.date.label"),description:w("quotes.form_fields.date.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.date.placeholder"),name:"date"}),i.jsx(Pn,{label:w("quotes.form_fields.validity.label"),description:w("quotes.form_fields.validity.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.validity.placeholder"),name:"validity"}),i.jsx(Bt,{className:"col-span-2",label:w("quotes.form_fields.payment_method.label"),description:w("quotes.form_fields.payment_method.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.payment_method.placeholder"),name:"payment_method"})]}),i.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[i.jsx(Bt,{className:"col-span-3",required:!0,label:w("quotes.form_fields.customer_information.label"),description:w("quotes.form_fields.customer_information.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.customer_information.placeholder"),name:"customer_information",errors:n.errors}),i.jsx(Bt,{className:"col-span-3",label:w("quotes.form_fields.notes.label"),description:w("quotes.form_fields.notes.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.notes.placeholder"),name:"notes"})]})]}),i.jsx(ns,{className:"hidden md:col-span-2",title:w("quotes.create.form_groups.status.title"),description:w("quotes.create.form_groups.status.desc"),children:i.jsxs("div",{className:"grid gap-6",children:[i.jsxs("div",{className:"g
`).map((Ne,vt)=>i.jsxs("span",{className:vt===0?"font-medium":"hidden text-sm text-muted-foreground md:inline",children:[Ne,i.jsx("br",{})]},vt))}),size:500}],Ae=[{id:"row-actions",header:()=>null,cell:({row:{original:Q}})=>{const Ne=(Q==null?void 0:Q.status)==="accepted"&&!(Q!=null&&Q.date_sent),vt=(Q==null?void 0:Q.status)==="accepted"&&!!(Q!=null&&Q.date_sent),Cr=(Q==null?void 0:Q.status)==="archived";return i.jsxs("div",{className:"flex gap-1",children:[i.jsxs(mr,{className:"gap-0",children:[i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",disabled:vt,onClick:yn=>{yn.preventDefault(),K(Q)},children:[i.jsx(xd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.edit")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.edit")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",onClick:yn=>{yn.preventDefault(),ie(Q.id)},children:[i.jsx(Eo,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.duplicate")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.duplicate")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",onClick:()=>{le(Q.id,D(Q))},children:[i.jsx(md,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.download")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.download")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",disabled:Cr||vt,onClick:yn=>{yn.preventDefault(),xe(Q.id)},children:[i.jsx(fd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.archive")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.archive")})})]})]}),i.jsx(mr,{children:i.jsx(Wd,{id:Q.id,onSentTo:()=>null,disabled:vt||!Ne})})]})}}];return o?ve:[...ve,...Ae]},[o,l,c.resolvedLanguage]),{table:ze}=bs({data:(U==null?void 0:U.items)??[],columns:Y,pageCount:(U==null?void 0:U.total_pages)??-1});return M.useEffect(()=>{ze&&U&&(U==null?void 0:U.total_pages)>0&&y(ze.getRowModel().rows[0])},[U,ze]),V?i.jsx(wr,{subtitle:$.message}):O?i.jsxs("div",{className:"grid items-start flex-1 gap-4 sm:py-0 md:gap-8 lg:grid-cols-3 xl:grid-cols-3",children:[i.jsx(Oe,{className:"grid items-start gap-4 auto-rows-max md:gap-8 lg:col-span-2",children:i.jsx(Pe,{children:i.jsx(_s,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}),i.jsx("div",{})]}):(U==null?void 0:U.total_items)===0&&!_?i.jsx(Oe,{children:i.jsx(Pe,{children:i.jsx(vs,{subtitle:l("quotes.list.empty_state.subtitle"),buttonText:l("quotes.create.title"),onButtonClick:()=>r("add",{relative:"path"})})})}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex flex-col items-stretch flex-1 gap-4 xl:flex-row",children:[i.jsx("div",{id:d,className:"flex items-stretch flex-1",children:i.jsx(xs,{table:ze,paginationOptions:{visible:!0},className:"grid items-start flex-1 gap-4 auto-rows-max md:gap-8 lg:col-span-2",onRowClick:G,activeRowIndex:C==null?void 0:C.index,children:i.jsx(Vd,{table:ze})})}),o&&i.jsx("div",{id:m,className:"flex items-stretch ",children:i.jsx(Gw,{quoteId:C==null?void 0:C.original.id})})]}),i.jsx(Hd,{...oe,onFinishDownload:ne})]})},cS=()=>{const{t:n}=st(),o=Gt(),r=jw(),{toast:a}=jn(),[l,c]=M.useState(Qr.createDefaultCode().object),[d,m]=M.useState(cr.createDefaultCode().object),p=M.useMemo(()=>({date:"",reference:"",customer_reference:"",customer_information:"",lang_code:"",currency_code:"",payment_method:"",notes:"",validity:"",show_line_discount_column:!0,additional_currency_code:null,additional_currency_rate:null,additional_currency_date:null,additional_currency_total:null,subtotal_price:{amount:void 0,scale:2,currency_code:""},discount:{amount:0,scale:0},discount_price:{amount:0,scale:0,currency_code:""},before_tax_price:{amount:void 0,scale:2,currency_code:""},tax:{amount:void 0,scale:0},tax_label:n("settings.form_fields.default_tax_label.placeholder"),tax_price:{amount:void 0,scale:2,currency_code:""},total_price:{amount:void 0,scale:2,currency_code:""},items:[{id