layers-design-system 3.0.14 → 3.0.15
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/{en-0fa51ea2.js → en-6080bef3.js} +1 -1
- package/dist/{es-913b75ed.js → es-dbc71b5f.js} +1 -1
- package/dist/{index-37ef64e8.js → index-d70e0880.js} +2 -2
- package/dist/layers-design-system.js +1 -1
- package/dist/layers-design-system.umd.cjs +1 -1
- package/dist/{main-b66a38e4.js → main-cc64990b.js} +5 -5
- package/dist/{pt-br-da466af3.js → pt-br-56bc53d3.js} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as wd, s as Sd, o as kd, i as Ed, a as as, e as Ko, f as Nd, g as si, h as ri, j as Td, k as $d, l as Md, m as Rd, n as ii, p as ci, q as ya, r as Od, t as Id, u as _d, v as Pd, w as xd, x as or, y as Ad, z as Ld, S as Dd, A as ui, B as Bd, C as ss, D as Hd, E as di, F as zd, G as Vd, H as Fd, I as Kd, J as la, K as fi, L as Wd, M as jd, N as vt, O as $e, P as pl, Q as Kn, R as Xt, T as He, U as Pl, V as ye, W as Cn, X as hi, Y as pi, Z as G, _ as In, $ as rs, a0 as vi, a1 as Be, a2 as Te, a3 as yt, a4 as St, a5 as ae, a6 as qd, a7 as ar, a8 as At, a9 as Lt, aa as mi, ab as ge, ac as vl, ad as Xl, ae as at, af as Ll, ag as bt, ah as Gd, ai as Wo, aj as $n, ak as wn, al as Ud, am as Zt, an as Yn, ao as Ue, ap as Wn, aq as _n, ar as Re, as as Zl, at as pt, au as Yd, av as Xd, aw as sr, ax as Zd, ay as rt, az as Jd, aA as Qd, aB as rr, aC as Ut, aD as ef, aE as tf, aF as nf, aG as lf, aH as of, aI as af, aJ as rl, aK as sf, aL as oa, aM as No, aN as wt, aO as gi, aP as Wt, aQ as yi, aR as To, aS as Pt, aT as jo, aU as is, aV as Pn, aW as It, aX as Dt, aY as Jt, aZ as bi, a_ as cs, a$ as tn, b0 as Xe, b1 as ir, b2 as un, b3 as rf, b4 as cr, b5 as Ci, b6 as wi, b7 as ho, b8 as Si, b9 as ur, ba as ki, bb as $o, bc as Jl, bd as Ei, be as Ni, bf as Xn, bg as cf, bh as Ti, bi as Ql, bj as Mo, bk as eo, bl as uf, bm as Nt, bn as us, bo as Vt, bp as ds, bq as fs, br as hs, bs as df, bt as ff, bu as hf, bv as $i, bw as pf, bx as ps, by as Mi, bz as vs, bA as po, bB as yn, bC as ln, bD as ll, bE as vf, bF as ms, bG as Dl, bH as mf, bI as gf, bJ as Bl, bK as Ro, bL as yf, bM as dr, bN as bf, bO as Cf, bP as fr, bQ as wf, bR as Sf, bS as kf, bT as Ef, bU as Nf, bV as Tf, bW as Ri, bX as Zn, bY as $f, bZ as Mf, b_ as xt, b$ as Rf, c0 as Of, c1 as Oi, c2 as If, c3 as En, c4 as hr, c5 as _f, c6 as Pf, c7 as ml, c8 as xf, c9 as Ii, ca as Af, cb as Lf, cc as _i, cd as Pi, ce as Df, cf as Bf, cg as Jn, ch as bn, ci as Hf, cj as xi, ck as Ai, cl as Li, cm as Di, cn as zf, co as Bi, cp as Vf, cq as Hi, cr as Ff, cs as pr, ct as ba, cu as Kf, cv as vr, cw as Wf, cx as zi, cy as jf, cz as qf, cA as Gf, cB as Uf, cC as Yf, cD as Xf, cE as Zf, cF as Jf, cG as Qf, cH as eh, cI as th, cJ as nh, cK as lh, cL as oh, cM as ah, cN as sh, cO as rh, cP as ih, cQ as ch, cR as uh, cS as dh, cT as fh, cU as hh, cV as ph, cW as vh, cX as mh, cY as gh, cZ as yh, c_ as bh, c$ as gs, d0 as gl, d1 as Vi, d2 as Fi, d3 as Ch, d4 as wh, d5 as Sh, d6 as kh, d7 as Eh } from "./main-
|
|
2
|
-
import { fP as iN, eU as cN, eV as uN, fQ as dN, dy as fN, dz as hN, dI as pN, d$ as vN, dA as mN, dB as gN, fe as yN, ff as bN, ef as CN, eh as wN, eg as SN, dC as kN, dD as EN, fD as NN, es as TN, fw as $N, dE as MN, ed as RN, ee as ON, dv as IN, fR as _N, fN as PN, f3 as xN, fJ as AN, d8 as LN, d9 as DN, da as BN, fT as HN, dc as zN, dd as VN, db as FN, fl as KN, eM as WN, fm as jN, de as qN, dh as GN, df as UN, dg as YN, dk as XN, dm as ZN, di as JN, dj as QN, dl as eT, ds as tT, dn as nT, dr as lT, dp as oT, fj as aT, dt as sT, fp as rT, eN as iT, fi as cT, dw as uT, fK as dT, fG as fT, dx as hT, dF as pT, dG as vT, dH as mT, dq as gT, fS as yT, eO as bT, eP as CT, dO as wT, dJ as ST, dM as kT, dN as ET, dK as NT, dL as TT, eQ as $T, f4 as MT, dR as RT, dS as OT, dT as IT, dU as _T, dV as PT, dW as xT, dX as AT, dY as LT, fn as DT, eR as BT, fH as HT, dZ as zT, d_ as VT, eS as FT, fg as KT, fh as WT, eb as jT, e5 as qT, e6 as GT, e7 as UT, e0 as YT, e3 as XT, ei as ZT, eo as JT, ej as QT, em as e$, ep as t$, en as n$, ek as l$, el as o$, eq as a$, er as s$, et as r$, e1 as i$, ex as c$, eu as u$, ev as d$, ey as f$, eB as h$, ez as p$, eA as v$, eC as m$, eD as g$, eG as y$, eH as b$, eI as C$, eJ as w$, eE as S$, eF as k$, eK as E$, eL as N$, ew as T$, eX as $$, eY as M$, eW as R$, eZ as O$, fo as I$, f5 as _$, f8 as P$, fd as x$, fb as A$, fc as L$, f9 as D$, fa as B$, f6 as H$, f7 as z$, fM as V$, fB as F$, fC as K$, dP as W$, fy as j$, fE as q$, fF as G$, fI as U$, du as Y$, fx as X$, fq as Z$, fr as J$, fs as Q$, fu as eM, ec as tM, fz as nM, fA as lM, e8 as oM, e9 as aM, ea as sM, e2 as rM, e4 as iM, ft as cM, dQ as uM, fO as dM, fv as fM, e_ as hM, e$ as pM, f0 as vM, f1 as mM, f2 as gM, fe as yM, fk as bM, eT as CM, fL as wM } from "./main-
|
|
1
|
+
import { b as wd, s as Sd, o as kd, i as Ed, a as as, e as Ko, f as Nd, g as si, h as ri, j as Td, k as $d, l as Md, m as Rd, n as ii, p as ci, q as ya, r as Od, t as Id, u as _d, v as Pd, w as xd, x as or, y as Ad, z as Ld, S as Dd, A as ui, B as Bd, C as ss, D as Hd, E as di, F as zd, G as Vd, H as Fd, I as Kd, J as la, K as fi, L as Wd, M as jd, N as vt, O as $e, P as pl, Q as Kn, R as Xt, T as He, U as Pl, V as ye, W as Cn, X as hi, Y as pi, Z as G, _ as In, $ as rs, a0 as vi, a1 as Be, a2 as Te, a3 as yt, a4 as St, a5 as ae, a6 as qd, a7 as ar, a8 as At, a9 as Lt, aa as mi, ab as ge, ac as vl, ad as Xl, ae as at, af as Ll, ag as bt, ah as Gd, ai as Wo, aj as $n, ak as wn, al as Ud, am as Zt, an as Yn, ao as Ue, ap as Wn, aq as _n, ar as Re, as as Zl, at as pt, au as Yd, av as Xd, aw as sr, ax as Zd, ay as rt, az as Jd, aA as Qd, aB as rr, aC as Ut, aD as ef, aE as tf, aF as nf, aG as lf, aH as of, aI as af, aJ as rl, aK as sf, aL as oa, aM as No, aN as wt, aO as gi, aP as Wt, aQ as yi, aR as To, aS as Pt, aT as jo, aU as is, aV as Pn, aW as It, aX as Dt, aY as Jt, aZ as bi, a_ as cs, a$ as tn, b0 as Xe, b1 as ir, b2 as un, b3 as rf, b4 as cr, b5 as Ci, b6 as wi, b7 as ho, b8 as Si, b9 as ur, ba as ki, bb as $o, bc as Jl, bd as Ei, be as Ni, bf as Xn, bg as cf, bh as Ti, bi as Ql, bj as Mo, bk as eo, bl as uf, bm as Nt, bn as us, bo as Vt, bp as ds, bq as fs, br as hs, bs as df, bt as ff, bu as hf, bv as $i, bw as pf, bx as ps, by as Mi, bz as vs, bA as po, bB as yn, bC as ln, bD as ll, bE as vf, bF as ms, bG as Dl, bH as mf, bI as gf, bJ as Bl, bK as Ro, bL as yf, bM as dr, bN as bf, bO as Cf, bP as fr, bQ as wf, bR as Sf, bS as kf, bT as Ef, bU as Nf, bV as Tf, bW as Ri, bX as Zn, bY as $f, bZ as Mf, b_ as xt, b$ as Rf, c0 as Of, c1 as Oi, c2 as If, c3 as En, c4 as hr, c5 as _f, c6 as Pf, c7 as ml, c8 as xf, c9 as Ii, ca as Af, cb as Lf, cc as _i, cd as Pi, ce as Df, cf as Bf, cg as Jn, ch as bn, ci as Hf, cj as xi, ck as Ai, cl as Li, cm as Di, cn as zf, co as Bi, cp as Vf, cq as Hi, cr as Ff, cs as pr, ct as ba, cu as Kf, cv as vr, cw as Wf, cx as zi, cy as jf, cz as qf, cA as Gf, cB as Uf, cC as Yf, cD as Xf, cE as Zf, cF as Jf, cG as Qf, cH as eh, cI as th, cJ as nh, cK as lh, cL as oh, cM as ah, cN as sh, cO as rh, cP as ih, cQ as ch, cR as uh, cS as dh, cT as fh, cU as hh, cV as ph, cW as vh, cX as mh, cY as gh, cZ as yh, c_ as bh, c$ as gs, d0 as gl, d1 as Vi, d2 as Fi, d3 as Ch, d4 as wh, d5 as Sh, d6 as kh, d7 as Eh } from "./main-cc64990b.js";
|
|
2
|
+
import { fP as iN, eU as cN, eV as uN, fQ as dN, dy as fN, dz as hN, dI as pN, d$ as vN, dA as mN, dB as gN, fe as yN, ff as bN, ef as CN, eh as wN, eg as SN, dC as kN, dD as EN, fD as NN, es as TN, fw as $N, dE as MN, ed as RN, ee as ON, dv as IN, fR as _N, fN as PN, f3 as xN, fJ as AN, d8 as LN, d9 as DN, da as BN, fT as HN, dc as zN, dd as VN, db as FN, fl as KN, eM as WN, fm as jN, de as qN, dh as GN, df as UN, dg as YN, dk as XN, dm as ZN, di as JN, dj as QN, dl as eT, ds as tT, dn as nT, dr as lT, dp as oT, fj as aT, dt as sT, fp as rT, eN as iT, fi as cT, dw as uT, fK as dT, fG as fT, dx as hT, dF as pT, dG as vT, dH as mT, dq as gT, fS as yT, eO as bT, eP as CT, dO as wT, dJ as ST, dM as kT, dN as ET, dK as NT, dL as TT, eQ as $T, f4 as MT, dR as RT, dS as OT, dT as IT, dU as _T, dV as PT, dW as xT, dX as AT, dY as LT, fn as DT, eR as BT, fH as HT, dZ as zT, d_ as VT, eS as FT, fg as KT, fh as WT, eb as jT, e5 as qT, e6 as GT, e7 as UT, e0 as YT, e3 as XT, ei as ZT, eo as JT, ej as QT, em as e$, ep as t$, en as n$, ek as l$, el as o$, eq as a$, er as s$, et as r$, e1 as i$, ex as c$, eu as u$, ev as d$, ey as f$, eB as h$, ez as p$, eA as v$, eC as m$, eD as g$, eG as y$, eH as b$, eI as C$, eJ as w$, eE as S$, eF as k$, eK as E$, eL as N$, ew as T$, eX as $$, eY as M$, eW as R$, eZ as O$, fo as I$, f5 as _$, f8 as P$, fd as x$, fb as A$, fc as L$, f9 as D$, fa as B$, f6 as H$, f7 as z$, fM as V$, fB as F$, fC as K$, dP as W$, fy as j$, fE as q$, fF as G$, fI as U$, du as Y$, fx as X$, fq as Z$, fr as J$, fs as Q$, fu as eM, ec as tM, fz as nM, fA as lM, e8 as oM, e9 as aM, ea as sM, e2 as rM, e4 as iM, ft as cM, dQ as uM, fO as dM, fv as fM, e_ as hM, e$ as pM, f0 as vM, f1 as mM, f2 as gM, fe as yM, fk as bM, eT as CM, fL as wM } from "./main-cc64990b.js";
|
|
3
3
|
import { watch as re, ref as _, onUnmounted as to, h as ue, Teleport as Nh, onMounted as Ze, getCurrentInstance as et, unref as r, nextTick as Ie, watchEffect as zt, isRef as il, defineComponent as F, renderSlot as Q, shallowRef as Ct, computed as k, openBlock as N, createElementBlock as L, normalizeClass as M, normalizeStyle as Ne, createElementVNode as V, useAttrs as Ki, onBeforeUnmount as $t, createBlock as le, withCtx as Z, createVNode as W, Fragment as De, renderList as nt, createTextVNode as tt, toDisplayString as pe, mergeProps as Ye, withKeys as kt, withModifiers as Fe, createSlots as jn, resolveDynamicComponent as st, Transition as fn, createCommentVNode as ee, withDirectives as Qe, vShow as ut, inject as Ke, provide as dt, normalizeProps as rn, guardReactiveProps as yl, useSlots as Sn, isVNode as Tt, reactive as ft, resolveComponent as qe, onBeforeUpdate as Th, vModelText as Wi, toRef as Kt, onUpdated as qo, onActivated as $h, toRaw as Mh, toRefs as Mn, resolveDirective as ys, render as Rn, onBeforeMount as ji, Comment as qi, shallowReactive as Rh, markRaw as mr } from "vue";
|
|
4
4
|
function Oh() {
|
|
5
5
|
}
|
|
@@ -114,7 +114,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:r,curr
|
|
|
114
114
|
*/var jFe=Object.prototype.toString,Uu=Array.isArray||function(n){return jFe.call(n)==="[object Array]"};function L_(e){return typeof e=="function"}function PFe(e){return Uu(e)?"array":typeof e}function V_(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function t$(e,n){return e!=null&&typeof e=="object"&&n in e}function RFe(e,n){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(n)}var FFe=RegExp.prototype.test;function HFe(e,n){return FFe.call(e,n)}var UFe=/\S/;function YFe(e){return!HFe(UFe,e)}var WFe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function QFe(e){return String(e).replace(/[&<>"'`=\/]/g,function(o){return WFe[o]})}var KFe=/\s*/,qFe=/\s+/,n$=/\s*=/,GFe=/\s*\}/,XFe=/#|\^|\/|>|\{|&|=|!/;function ZFe(e,n){if(!e)return[];var o=!1,r=[],a=[],l=[],i=!1,s=!1,c="",d=0;function u(){if(i&&!s)for(;l.length;)delete a[l.pop()];else l=[];i=!1,s=!1}var f,p,m;function g(S){if(typeof S=="string"&&(S=S.split(qFe,2)),!Uu(S)||S.length!==2)throw new Error("Invalid tags: "+S);f=new RegExp(V_(S[0])+"\\s*"),p=new RegExp("\\s*"+V_(S[1])),m=new RegExp("\\s*"+V_("}"+S[1]))}g(n||ua.tags);for(var y=new dh(e),b,w,N,_,C,k;!y.eos();){if(b=y.pos,N=y.scanUntil(f),N)for(var E=0,T=N.length;E<T;++E)_=N.charAt(E),YFe(_)?(l.push(a.length),c+=_):(s=!0,o=!0,c+=" "),a.push(["text",_,b,b+1]),b+=1,_===`
|
|
115
115
|
`&&(u(),c="",d=0,o=!1);if(!y.scan(f))break;if(i=!0,w=y.scan(XFe)||"name",y.scan(KFe),w==="="?(N=y.scanUntil(n$),y.scan(n$),y.scanUntil(p)):w==="{"?(N=y.scanUntil(m),y.scan(GFe),y.scanUntil(p),w="&"):N=y.scanUntil(p),!y.scan(p))throw new Error("Unclosed tag at "+y.pos);if(w==">"?C=[w,N,b,y.pos,c,d,o]:C=[w,N,b,y.pos],d++,a.push(C),w==="#"||w==="^")r.push(C);else if(w==="/"){if(k=r.pop(),!k)throw new Error('Unopened section "'+N+'" at '+b);if(k[1]!==N)throw new Error('Unclosed section "'+k[1]+'" at '+b)}else w==="name"||w==="{"||w==="&"?s=!0:w==="="&&g(N)}if(u(),k=r.pop(),k)throw new Error('Unclosed section "'+k[1]+'" at '+y.pos);return eHe(JFe(a))}function JFe(e){for(var n=[],o,r,a=0,l=e.length;a<l;++a)o=e[a],o&&(o[0]==="text"&&r&&r[0]==="text"?(r[1]+=o[1],r[3]=o[3]):(n.push(o),r=o));return n}function eHe(e){for(var n=[],o=n,r=[],a,l,i=0,s=e.length;i<s;++i)switch(a=e[i],a[0]){case"#":case"^":o.push(a),r.push(a),o=a[4]=[];break;case"/":l=r.pop(),l[5]=a[2],o=r.length>0?r[r.length-1][4]:n;break;default:o.push(a)}return n}function dh(e){this.string=e,this.tail=e,this.pos=0}dh.prototype.eos=function(){return this.tail===""},dh.prototype.scan=function(n){var o=this.tail.match(n);if(!o||o.index!==0)return"";var r=o[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},dh.prototype.scanUntil=function(n){var o=this.tail.search(n),r;switch(o){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,o),this.tail=this.tail.substring(o)}return this.pos+=r.length,r};function Yu(e,n){this.view=e,this.cache={".":this.view},this.parent=n}Yu.prototype.push=function(n){return new Yu(n,this)},Yu.prototype.lookup=function(n){var o=this.cache,r;if(o.hasOwnProperty(n))r=o[n];else{for(var a=this,l,i,s,c=!1;a;){if(n.indexOf(".")>0)for(l=a.view,i=n.split("."),s=0;l!=null&&s<i.length;)s===i.length-1&&(c=t$(l,i[s])||RFe(l,i[s])),l=l[i[s++]];else l=a.view[n],c=t$(a.view,n);if(c){r=l;break}a=a.parent}o[n]=r}return L_(r)&&(r=r.call(this.view)),r};function or(){this.templateCache={_cache:{},set:function(n,o){this._cache[n]=o},get:function(n){return this._cache[n]},clear:function(){this._cache={}}}}or.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()},or.prototype.parse=function(n,o){var r=this.templateCache,a=n+":"+(o||ua.tags).join(":"),l=typeof r<"u",i=l?r.get(a):void 0;return i==null&&(i=ZFe(n,o),l&&r.set(a,i)),i},or.prototype.render=function(n,o,r,a){var l=this.getConfigTags(a),i=this.parse(n,l),s=o instanceof Yu?o:new Yu(o,void 0);return this.renderTokens(i,s,r,n,a)},or.prototype.renderTokens=function(n,o,r,a,l){for(var i="",s,c,d,u=0,f=n.length;u<f;++u)d=void 0,s=n[u],c=s[0],c==="#"?d=this.renderSection(s,o,r,a,l):c==="^"?d=this.renderInverted(s,o,r,a,l):c===">"?d=this.renderPartial(s,o,r,l):c==="&"?d=this.unescapedValue(s,o):c==="name"?d=this.escapedValue(s,o,l):c==="text"&&(d=this.rawValue(s)),d!==void 0&&(i+=d);return i},or.prototype.renderSection=function(n,o,r,a,l){var i=this,s="",c=o.lookup(n[1]);function d(p){return i.render(p,o,r,l)}if(c){if(Uu(c))for(var u=0,f=c.length;u<f;++u)s+=this.renderTokens(n[4],o.push(c[u]),r,a,l);else if(typeof c=="object"||typeof c=="string"||typeof c=="number")s+=this.renderTokens(n[4],o.push(c),r,a,l);else if(L_(c)){if(typeof a!="string")throw new Error("Cannot use higher-order sections without the original template");c=c.call(o.view,a.slice(n[3],n[5]),d),c!=null&&(s+=c)}else s+=this.renderTokens(n[4],o,r,a,l);return s}},or.prototype.renderInverted=function(n,o,r,a,l){var i=o.lookup(n[1]);if(!i||Uu(i)&&i.length===0)return this.renderTokens(n[4],o,r,a,l)},or.prototype.indentPartial=function(n,o,r){for(var a=o.replace(/[^ \t]/g,""),l=n.split(`
|
|
116
116
|
`),i=0;i<l.length;i++)l[i].length&&(i>0||!r)&&(l[i]=a+l[i]);return l.join(`
|
|
117
|
-
`)},or.prototype.renderPartial=function(n,o,r,a){if(r){var l=this.getConfigTags(a),i=L_(r)?r(n[1]):r[n[1]];if(i!=null){var s=n[6],c=n[5],d=n[4],u=i;c==0&&d&&(u=this.indentPartial(i,d,s));var f=this.parse(u,l);return this.renderTokens(f,o,r,u,a)}}},or.prototype.unescapedValue=function(n,o){var r=o.lookup(n[1]);if(r!=null)return r},or.prototype.escapedValue=function(n,o,r){var a=this.getConfigEscape(r)||ua.escape,l=o.lookup(n[1]);if(l!=null)return typeof l=="number"&&a===ua.escape?String(l):a(l)},or.prototype.rawValue=function(n){return n[1]},or.prototype.getConfigTags=function(n){return Uu(n)?n:n&&typeof n=="object"?n.tags:void 0},or.prototype.getConfigEscape=function(n){if(n&&typeof n=="object"&&!Uu(n))return n.escape};var ua={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){uh.templateCache=e},get templateCache(){return uh.templateCache}},uh=new or;ua.clearCache=function(){return uh.clearCache()},ua.parse=function(n,o){return uh.parse(n,o)},ua.render=function(n,o,r,a){if(typeof n!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+PFe(n)+'" was given as the first argument for mustache#render(template, view, partials)');return uh.render(n,o,r,a)},ua.escape=QFe,ua.Scanner=dh,ua.Context=Yu,ua.Writer=or;const tHe={props:["value","schema","entity"],methods:{hasRouterLink(){return er(this.schema,"options.routerLink")},getRouterLink(){const e=er(this.schema,"options.routerLink");return ua.render(e,this.entity)}}},nHe={key:1};function oHe(e,n,o,r,a,l){const i=t.resolveComponent("router-link");return e.$options.methods.hasRouterLink(e.props)?(t.openBlock(),t.createBlock(i,{key:0,to:e.$options.methods.getRouterLink(e.props)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},8,["to"])):(t.openBlock(),t.createElementBlock("span",nHe,t.toDisplayString(o.value),1))}const rHe=lt(tHe,[["render",oHe]]),aHe={props:["value","schema"],methods:{formatValue(e){return e}}};function lHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const iHe=lt(aHe,[["render",lHe]]),sHe={props:["value","schema"],methods:{formatValue(e){return isNaN(e)||e===null||e===void 0?"-":Number(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}}};function cHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const dHe=lt(sHe,[["render",cHe]]),uHe={props:["value","schema"]},fHe=["href"];function pHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("a",{target:"_blank",href:`mailto:${o.value}`},t.toDisplayString(o.value),9,fHe)}const hHe=lt(uHe,[["render",pHe]]),mHe={props:["value","schema"],methods:{formatValue(e,n){if(!e)return"-";const o=er(n,"options.format","dd/MM/yyyy hh:mm:ss");return Ge(e).format(o)}}};function gHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value,o.schema)),1)}const yHe=lt(mHe,[["render",gHe]]),o$={};o$.register=function(){hr.register({type:"String"},"default",rHe),hr.register({type:"Date"},"default",yHe),hr.register({type:"Number"},"default",iHe),hr.register({format:"Amount"},"default",dHe),hr.register({format:"Email"},"default",hHe)};const Odt="",bHe={props:{perPage:Number,pagesCount:Number,totalCount:Number,columnSpecs:{type:Array},includedIds:{type:Array},excludedIds:{type:Array},selectable:Boolean,clickable:Boolean,multiselect:Boolean,page:Object},data(e){return{checked:this.computeChecked(e)}},emits:["selected","click-item"],computed:{includedAll(){return this.includedIds.toString()==="*"},estimatedRows(){return this.page&&this.pagesCount>1&&this.page.index>=this.pagesCount-1?this.totalCount%this.perPage:this.perPage}},methods:{getColumnComponent(e){return e.component},getColumnValue(e,n){return er(e,n.path)},computeChecked(e){const n=e||this;if(!n.page||!n.page.data)return[];let o=n.includedIds,r=n.excludedIds,a=n.includedAll;return n.page.data.map(l=>a&&!r.includes(l.id)||o.includes(l.id))}},watch:{includedAll(){this.checked=this.computeChecked(this)},includedIds(){this.checked=this.computeChecked(this)},excludedIds(){this.checked=this.computeChecked(this)}}},MHe={class:"l-table-tbody"},wHe={key:"selector",class:"l-table-cell l-table-column-selector"},CHe=["onClick"],_He={key:"selector",class:"l-table-cell l-table-column-selector"},NHe={key:"selector",class:"l-table-cell l-table-column-selector"};function kHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox");return t.openBlock(),t.createElementBlock("tbody",MHe,[o.page&&o.page.loaded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.page.data,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c,class:t.normalizeClass({"l-table-selected":a.checked[c]})},[o.selectable?(t.openBlock(),t.createElementBlock("td",wHe,[t.createVNode(i,{modelValue:a.checked[c],"onUpdate:modelValue":d=>a.checked[c]=d,class:"l-table-selector",type:o.multiselect?"checkbox":"radio",onChange:()=>e.$emit("selected",{key:s.id,selected:e.$event})},null,8,["modelValue","onUpdate:modelValue","type","onChange"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}${o.clickable?" cursor-pointer":""}`]),onClick:f=>e.$emit("click-item",s)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.getColumnComponent(d)),{value:l.getColumnValue(s,d),schema:d,entity:s},null,8,["value","schema","entity"]))],10,CHe))),128))],2))),128)):o.page&&o.page.loading?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",_He,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",value:l.includedAll},null,8,["type","value"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[0]||(n[0]=[t.createElementVNode("span",{class:"l-table-skeleton"},null,-1)]),2))),128))]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",NHe,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",checked:l.includedAll},null,8,["type","checked"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[1]||(n[1]=[t.createElementVNode("span",{class:"l-table-skeleton error"},null,-1)]),2))),128))]))),128))])}const EHe=lt(bHe,[["render",kHe]]),zdt="",xHe={props:{title:String,maxWidth:{type:Number,default:null},minWidth:{type:Number,default:50}},data(){return{dragging:!1,deltaX:0}},computed:{handleStyle(){return this.dragging?{transform:`translateX(${this.deltaX}px)`}:null}},methods:{currentWidth(){return this.$el.parentElement.getBoundingClientRect().width},limitDeltaX(e){let n=this.currentWidth();return this.limitWidth(n+e)-n},limitWidth(e){return e?this.maxWidth&&this.maxWidth<e?this.maxWidth:this.minWidth&&this.minWidth>e?this.minWidth:e:null},resize(e){this.$emit("resize",this.limitWidth(e))},drag(e){this.dragging||this.unregisterDocumentHandlers();let n=e.clientX-this.dragStartClientX;this.deltaX=this.limitDeltaX(n),console.log("drag",this.deltaX)},dragStart(e){this.registerDocumentHandlers(),this.deltaX=0,this.dragging=!0,this.dragStartClientX=e.clientX,console.log("dragStart",e)},dragEnd(e){if(this.deltaX){let n=this.currentWidth()+this.deltaX;this.resize(n)}this.unregisterDocumentHandlers(),this.deltaX=0,this.dragging=!1,this.dragStartClientX=0,console.log("dragEnd",e)},registerDocumentHandlers(){this.unregisterDocumentHandlers(),this._documentMouseMove=e=>this.drag(e),this._documentMouseUp=e=>this.dragEnd(e),document.body.style.cursor="col-resize",document.addEventListener("mousemove",this._documentMouseMove),document.addEventListener("mouseup",this._documentMouseUp),document.onselectstart=()=>!1,document.ondragstart=()=>!1},unregisterDocumentHandlers(){document.removeEventListener("mousemove",this._documentMouseMove),document.removeEventListener("mouseup",this._documentMouseUp),document.body.style.cursor="",document.onselectstart=null,document.ondragstart=null}}};function THe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["mt-handle",a.dragging?"dragging":""]),style:t.normalizeStyle(l.handleStyle),onDblclick:n[0]||(n[0]=i=>l.resize(null)),onMousedown:n[1]||(n[1]=(...i)=>l.dragStart&&l.dragStart(...i))},null,38)}const SHe=lt(xHe,[["render",THe]]),Bdt="",DHe={components:{LTableHeaderResizer:SHe},props:{spec:{type:Object}},emits:["spec:update"],data:e=>({localSpec:e.spec}),computed:{resizable(){return this.localSpec.field&&this.localSpec.field.resizable},reordable(){return!0},icon(){return this.$L.Icons.get(this.localSpec.field)}},methods:{resizeColumn(e,n){e.width=n},toggleSorting(e){let n=this.localSpec.column.sortDirection,o="asc";n?n.toLowerCase()==="asc"&&(o="desc"):o="asc",this.$emit("sort",{direction:o,cumulative:e})}},watch:{localSpec:{handler(e){this.$emit("spec:update",e)},deep:!0}}},vHe={key:1,class:"l-table-header-cell-content"};function IHe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-tooltip"),c=t.resolveComponent("LTableHeaderResizer");return t.openBlock(),t.createElementBlock("th",{class:"l-table-header-cell l-table-cell",style:t.normalizeStyle({"--l-table-col-width":o.spec.column.width?`${o.spec.column.width}px`:"auto"})},[o.spec.sortable?(t.openBlock(),t.createElementBlock("a",{key:0,href:"#",class:t.normalizeClass(["l-table-header-cell-content",[o.spec.column.sortDirection?"active":null,`l-table-header-align-${o.spec.align}`]]),onClick:n[0]||(n[0]=t.withModifiers(d=>l.toggleSorting(),["prevent"]))},[t.createVNode(s,{key:"tooltip",disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"]),t.createElementVNode("i",{class:t.normalizeClass(["l-table-sorter-icon uil uil-arrow-down",`l-table-sorter-${o.spec.column.sortDirection||"default"}`])},null,2)],2)):(t.openBlock(),t.createElementBlock("span",vHe,[t.createVNode(s,{disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"])])),n[2]||(n[2]=t.createElementVNode("span",{style:{width:"12px"}},null,-1)),l.resizable?(t.openBlock(),t.createBlock(c,{key:2,onResize:n[1]||(n[1]=d=>l.resizeColumn(o.spec.column,d))})):t.createCommentVNode("",!0)],4)}const AHe=lt(DHe,[["render",IHe]]),Ldt="",OHe={props:["loading"]};function zHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-header-loader",{loading:o.loading}])},null,2)}const BHe=lt(OHe,[["render",zHe]]),Vdt="",LHe={components:{LTableHeaderCell:AHe,LTableHeaderLoader:BHe},props:{columnSpecs:{type:Array},loading:{type:Boolean,default:!1},includedIds:{type:Array},excludedIds:{type:Array},total:{type:Number},selectable:{type:Boolean},multiselect:{type:Boolean}},data:e=>({localColumnSpecs:e.columnSpecs}),emits:["columnSpecs:update","selected"],computed:{selectedEverything(){let e=this.includedIds.length===this.total&&this.total>0,n=this.includedIds.toString()==="*"&&this.excludedIds.length==0;return e||n},selectedNothing(){return this.includedIds.length===0},selectedSomethings(){return!this.selectedNothing&&!this.selectedEverything}},methods:{changeSpecSort(e,{direction:n,cumulative:o}){if(o){let a=this.localColumnSpecs.reduce((l,i)=>Math.max(l,i.column.sortOrder),0)+1;e.column.sortOrder=a,e.column.sortDirection=n}else{for(let r of this.localColumnSpecs)r.column.sortOrder=null,r.column.sortDirection=null;e.column.sortOrder=1,e.column.sortDirection=n}},syncSpec(e){let n=this.localColumnSpecs.findIndex(o=>o.field===e.field);this.localColumnSpecs.splice(n,1,e)},changeSelection(e){this.$emit("selected",{key:"*",selected:e})}},watch:{localColumnSpecs:{handler(e){this.$emit("columnSpecs:update",e)},deep:!0}}},VHe={class:"l-table-header"},$He={key:0,scope:"col",class:"l-table-header-cell l-table-cell l-table-column-selector"},jHe={class:"l-table-header-extras"},PHe={colspan:"999"};function RHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox"),s=t.resolveComponent("LTableHeaderCell"),c=t.resolveComponent("LTableHeaderLoader");return t.openBlock(),t.createElementBlock("thead",VHe,[t.createElementVNode("tr",null,[o.selectable?(t.openBlock(),t.createElementBlock("th",$He,[o.multiselect?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-selector",type:"checkbox",value:l.selectedEverything,indeterminate:l.selectedSomethings,onChange:n[0]||(n[0]=d=>l.changeSelection(d))},null,8,["value","indeterminate"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createBlock(s,{key:u,spec:d,"onSpec:update":l.syncSpec,onSort:f=>l.changeSpecSort(d,f),ref_for:!0,ref:"headers"},null,8,["spec","onSpec:update","onSort"]))),128))]),t.createElementVNode("tr",jHe,[t.createElementVNode("td",PHe,[t.createVNode(c,{loading:o.loading},null,8,["loading"]),n[1]||(n[1]=t.createElementVNode("div",{class:"l-table-header-shadow-top"},null,-1))])])])}const FHe=lt(LHe,[["render",RHe]]),$dt="",HHe={},UHe={class:"l-table-endspace"};function YHe(e,n){return t.openBlock(),t.createElementBlock("div",UHe)}const WHe=lt(HHe,[["render",YHe]]),jdt="",QHe={props:{loading:Boolean,automatic:Boolean},mounted(){this.intersectionObserver=new IntersectionObserver(([e])=>{e&&e.isIntersecting&&this.automatic&&this.$emit("appeared")}),this.intersectionObserver.observe(this.$el)},unmounted(){this.intersectionObserver&&this.intersectionObserver.disconnect()}};function KHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-loadmore",{loading:o.loading}]),onClick:n[0]||(n[0]=i=>e.$emit("click"))},n[1]||(n[1]=[t.createElementVNode("a",{href:"#",class:"l-table-loadmore-link"},"Carregar mais",-1)]),2)}const qHe=lt(QHe,[["render",KHe]]),Pdt="",GHe=2e3,XHe={name:"LTableReloader",data(){return{canReload:!0}},methods:{reload(){this.canReload=!1,this.$emit("reload"),setTimeout(()=>this.canReload=!0,GHe)}}},ZHe={class:"l-table-reloader"},JHe={class:"l-table-reloader-content"};function eUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-button");return t.openBlock(),t.createElementBlock("div",ZHe,[t.createElementVNode("div",JHe,[t.createVNode(i,{size:"22"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-cloud-exclamation")])),_:1}),n[3]||(n[3]=t.createElementVNode("span",{style:{"margin-left":"8px",flex:"1 1"}},"Algumas informações não puderam ser carregadas.",-1)),t.createVNode(s,{size:"mini",onClick:n[0]||(n[0]=c=>l.reload())},{default:t.withCtx(()=>n[2]||(n[2]=[t.createTextVNode("Recarregar")])),_:1})])])}const tUe=lt(XHe,[["render",eUe]]),Rdt="",nUe={props:{height:{type:Number}}},oUe={class:"l-table-spacer"};function rUe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("tbody",oUe,[t.createElementVNode("tr",{style:t.normalizeStyle({height:`${o.height}px`})},n[0]||(n[0]=[t.createElementVNode("td",{class:"l-table-spacer-bg",colspan:"999"},null,-1)]),4)])}const aUe=lt(nUe,[["render",rUe]]);var lUe=T9;function iUe(e){var n=e==null?0:e.length;return n?lUe(e,1):[]}var sUe=iUe;const cUe=qn(sUe);function dUe(){}var uUe=dUe,$_=CB,fUe=uUe,pUe=lC,hUe=1/0,mUe=$_&&1/pUe(new $_([,-0]))[1]==hUe?function(e){return new $_(e)}:fUe,gUe=mUe,yUe=rC,bUe=_9,MUe=N9,wUe=aC,CUe=gUe,_Ue=lC,NUe=200;function kUe(e,n,o){var r=-1,a=bUe,l=e.length,i=!0,s=[],c=s;if(o)i=!1,a=MUe;else if(l>=NUe){var d=n?null:CUe(e);if(d)return _Ue(d);i=!1,a=wUe,c=new yUe}else c=n?[]:s;e:for(;++r<l;){var u=e[r],f=n?n(u):u;if(u=o||u!==0?u:0,i&&f===f){for(var p=c.length;p--;)if(c[p]===f)continue e;n&&c.push(f),s.push(u)}else a(c,f,o)||(c!==s&&c.push(f),s.push(u))}return s}var EUe=kUe,xUe=EUe;function TUe(e){return e&&e.length?xUe(e):[]}var SUe=TUe;const DUe=qn(SUe);function vUe({key:e,selected:n},o){let{loadedPages:r,allowInvertedSelection:a,includedIds:l,excludedIds:i,multiselect:s,itemToId:c=m=>m}=o;if(!e===void 0||e===null)return{includedIds:l,excludedIds:i};if(e==="*"){if(l.splice(0,l.length),i.splice(0,i.length),n&&s&&a&&l.push("*"),n&&s&&!a){let m=cUe(r.filter(y=>y.data).map(y=>y.data));l=DUe(m.map(y=>c(y)))}return{includedIds:l,excludedIds:i}}let u=l.includes("*"),f=l.includes(e),p=i.includes(e);if(s||(l.splice(0,l.length),i.splice(0,i.length)),u&&s){if(n&&p){let m=i.indexOf(e);i.splice(m,1)}!n&&!p&&s&&i.push(e)}else if(n&&!f&&(s?l.push(e):l=[e]),!n&&f){let m=l.indexOf(e);l.splice(m,1)}return{includedIds:l,excludedIds:i}}function IUe({pagesCount:e,currentPage:n,endingAdjacents:o=1,adjacents:r=2,next:a=!0,previous:l=!0,last:i=!1,first:s=!1,fixedWidth:c=!0}){const d=[];if(!e)return d;const u=c?o*2+r*2+3:o*2+1;if(e<=u)for(let f=0;f<e;f++)d.push(f);else{let f=0;for(let y=0;y<Math.min(o,e);y++)d.push(f=y);let p=o+r*2,m=r,g=r;c&&n<p&&(g+=p-n),c&&e-n-1<p&&(m+=p-(e-n-1));for(let y=Math.max(f+1,n-m);y<Math.min(n+g+1,e);y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...1"),d.push(f=y);for(let y=Math.max(f+1,e-o);y<e;y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...2"),d.push(f=y)}return l&&d.unshift("<"),a&&d.push(">"),s&&d.unshift("<<"),i&&d.push(">>"),d}const Fdt="",AUe={name:"LTablePagination",props:{pagesCount:Number,totalCount:Number,currentPage:{type:Number,default:2}},computed:{visiblePages(){return this.totalCount?IUe({pagesCount:this.pagesCount,currentPage:this.currentPage,adjacents:1,endingAdjacents:1,fixedWidth:!0}):["...1"]}},methods:{clicked(e){typeof e=="number"?this.goto(parseInt(e)):e==="<"?this.goto(this.currentPage-1):e===">"?this.goto(this.currentPage+1):e==="<<"?this.goto(0):e===">>"&&this.goto(this.pagesCount-1)},goto(e){this.currentPage!=e&&(e=Math.max(0,Math.min(e,this.pagesCount-1)),this.$emit("goto",e))}}},OUe={class:"l-table-pagination"},zUe=["onClick"];function BUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon");return t.openBlock(),t.createElementBlock("div",OUe,[t.createVNode(t.TransitionGroup,{tag:"div",class:"l-table-pagination-pages",name:"l-table-pagination-transition"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,s=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["l-table-pagination-page-item",{active:s==o.currentPage}]),key:s,onClick:c=>l.clicked(s)},[s==="<"?(t.openBlock(),t.createBlock(i,{key:0,size:"20"},{default:t.withCtx(()=>n[0]||(n[0]=[t.createTextVNode("uil-angle-left")])),_:1})):s===">"?(t.openBlock(),t.createBlock(i,{key:1,size:"20"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-angle-right")])),_:1})):s==="...1"||s==="...2"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(" ... ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createTextVNode(t.toDisplayString(s+1),1)],64))],10,zUe))),128))]),_:1})])}const LUe=lt(AUe,[["render",BUe]]),Hdt="";o$.register();const VUe=100,$Ue=3e4,jUe=3,PUe="scrollBehavior"in document.documentElement.style,RUe={name:"LTable",tagName:"l-table",components:{LTableHeader:FHe,LTableBody:EHe,LTableReloader:tUe,LTableLoadMore:qHe,LTableEndspace:WHe,LTableBodySpacer:aUe,LTablePagination:LUe},props:{rows:{type:Array},primaryKey:{type:String,default:"id"},fetch:{type:Function},columns:{type:Array},pagination:{type:Boolean,default:!1},display:{type:String,enum:["all","more","paged"],default:"all"},autoLoadMore:{type:Boolean,default:!1},schema:{type:Object,required:!0},selectable:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!0},allowInvertedSelection:{type:Boolean,default:!0},rowHeight:{type:Number,default:32},borderTick:{type:Number,default:1},snapToPageOnMore:{type:Boolean,default:!0},stickyColumnLeft:{type:Boolean,default:!1},recycle:{type:Boolean,default:!0},limitPerPage:{type:Number,default:50}},emits:["loading","changeSelection","click-item"],mounted(){this.computeVisibleRows()},data(e){let n=[];return e.columns.length&&(n=e.columns.map(o=>this.buildColumnSpec(o))),{fetching:0,headerHeight:56,nonce:0,id:0,extraRows:15,lastComputedOffsetY:0,includedIds:[],excludedIds:[],scrollAtTop:!0,scrollAtLeft:!0,totalCount:0,firstPage:null,currentPage:null,lastPage:null,loadedPages:[],columnSpecs:n}},watch:{totalCount(e){this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:e})},somePageIsLoading(e){this.$emit("loading",e)}},computed:{perPage(){return Number(this.limitPerPage)},pagesCount(){return Math.floor(this.totalCount/this.perPage)+1},selectionCount(){return this.includedIds.toString()==="*"?this.totalCount-this.excludedIds.length:this.includedIds.length},lastLoadedPage(){return this.loadedPages.length},isLoadMoreVisible(){return this.display==="more"&&this.lastLoadedPage<this.pagesCount},isPaginationVisible(){return(this.display==="page"||!!this.pagination)&&this.display!=="more"&&this.pagesCount!==null},isLeftColumnSticky(){return this.stickyColumnLeft||this.columns&&this.columns[0]&&this.columns[0].sticky},usingRecycledLayout(){return this.display!=="paged"&&this.recycle},hasVisibleFailedPages(){for(let e=this.firstPageRendered;e<=this.lastPageRendered;e++)if(this.loadedPages[e]&&this.loadedPages[e].failed)return!0;return!1},firstPageRendered(){return!this.usingRecycledLayout&&this.display!=="paged"?0:this.firstPage},lastPageRendered(){return this.display==="paged"?this.firstPage:this.usingRecycledLayout?this.lastPage:Math.max(0,this.lastLoadedPage-1)},visiblePages(){let e=[];for(let n=this.firstPageRendered;n<=this.lastPageRendered;n++){let o=this.loadedPages[n]||{index:n};e.push(o)}return e},contentStyle(){return{"--l-table-primary-color":"#2F8AF5","--l-table-warning-color":"#fd3a57","--l-table-bg-color":"white","--l-table-header-height":`${this.headerHeight}px`,"--l-table-header-text-color":"#232B34","--l-table-header-border-color":"#E8E8E8","--l-table-skeleton-height":`${Math.min(this.rowHeight-8,8)}px`,"--l-table-loader-height":"3px","--l-table-loader-color":"var(--l-table-primary-color)","--l-table-row-height":`${this.rowHeight}px`,"--l-table-cell-padding":"0 8px","--l-table-row-hover-color":"#fafbfd","--l-table-row-selected-color":"#eef5fa","--l-table-row-selected-hover-color":"#e6f0f8","--l-table-border-color":"#D3DAE6","--l-table-border-tick":`${this.borderTick}px`,"--l-table-selector-width":`${this.selectable?Math.min(this.headerHeight,this.rowHeight):0}px`,"--l-table-loadmore-height":"46px","--l-table-pagination-height":"48px","--l-table-pagination-color":"var(--l-table-primary-color)","--l-table-pagination-bg-color":"white","--l-table-reloader-margin":"16px","--l-table-endspace-bg-color":"#f5f5f5","--l-table-link-color":"var(--l-table-primary-color)"}},contentClasses(){return{"l-table-at-top":this.scrollAtTop,"l-table-at-left":this.scrollAtLeft,"l-table-sticky-column-left":this.isLeftColumnSticky}},spacing(){let e=0,n=0,o=this.display,r=this.totalCount;return o==="more"&&(r=this.loadedPages.length*this.perPage),(o==="all"||o==="more")&&(e=this.firstPageRendered*this.perPage*this.rowHeight,n=Math.max(0,(r-(this.lastPageRendered+1)*this.perPage)*this.rowHeight)),{top:Math.max(0,e),bottom:Math.max(0,n)}},rect(){return this.$refs.container.getBoundingClientRect()},somePageIsLoading(){return this.loadedPages.map(e=>e.loading).some(e=>e)}},methods:{itemToId(e){return e?this.primaryKey?e[this.primaryKey]:e:null},scrollTo(e=0,n){let o="auto";if(n){let r=this.$refs.container.scrollTop,a=this.perPage*this.rowHeight+1;o=Math.abs(r-e)<a?"smooth":"auto"}this.$refs.container.scrollTo({top:e,behavior:o})},gotoPage(e,n){if(e=Math.max(0,Math.min(this.pagesCount,e)),this.display==="paged"){this.setViewablePages(e,e,e),this.scrollTo(0,!0);return}this.display==="more"?this.setViewablePages(e-1,e,e):this.setViewablePages(e,e,e);let o=e*this.rowHeight*this.perPage;this.scrollTo(o,n)},async loadMore(e){let n=this.loadedPages[this.loadedPages.length-1];if(!n||n.loading)return!1;let o=this.loadedPages.length;this.setViewablePages(this.firstPage,o),e&&this.snapToPageOnMore&&PUe&&setTimeout(()=>this.gotoPage(o,!0),100)},reload(){this.id++,this.fetching=0,this.firstPage=null,this.lastPage=null,this.totalCount=null,this.loadedPages=[],this.includedIds=[],this.excludedIds=[],this.gotoPage(0),this.computeVisibleRows()},reloadFailedPages(){let e=0;for(let n=this.firstPageRendered;n<=this.lastPageRendered&&!(!(!this.loadedPages[n]||!this.loadedPages[n].failed)&&(this.loadedPages[n]=null,this.fetchPage(n),++e>=jUe));n++);},onScroll(){if(!(this.getScrollSpeed()>$Ue)&&!this._scrollDebounce)return this.computeVisibleRows();clearTimeout(this._scrollDebounce),this._scrollDebounce=setTimeout(()=>{this.computeVisibleRows(),this._scrollDebounce=null},VUe)},getScrollSpeed(){let e=this._lastOffsetY||0,n=this._lastOffsetYTime||0,o=this._lastOffsetY=this.$refs.container.scrollTop,r=this._lastOffsetYTime=Date.now();return Math.abs(1e3*(e-o)/(r-n))},computeVisibleRows(){let e=this.$refs.container.scrollTop,n=this.$refs.container.scrollLeft,o=this.lastComputedOffsetY;this.scrollAtTop=e===0,this.scrollAtLeft=n===0;let r=Math.abs(o-e);if(e>2&&o>2&&r<150||(this.lastComputedOffsetY=e,this.display==="paged"))return;let l=this.rect.height-this.headerHeight,i=Math.max(0,Math.floor(e/this.rowHeight)),s=Math.ceil(l/this.rowHeight),c=i+s,d=this.extraRows,u=this.perPage,f=Math.floor((i-d)/this.perPage),p=Math.floor((c+d)/u),m=p>=this.pagesCount-1?s:s/2,g=Math.floor((i+m)/this.perPage);if(this.display==="more"){for(f=Math.min(f,this.lastLoadedPage);!this.loadedPages[f]&&f>0;)f--;for(p=Math.max(p,f);!this.loadedPages[p]&&p>f&&p>0;)p--}this.setViewablePages(f,p,g)},setViewablePages(e=0,n=0,o=0){this.display==="paged"&&(n=e),e=Math.min(Math.max(e,0),this.pagesCount-1),n=Math.min(Math.max(n,e),this.pagesCount-1),o=Math.min(n,Math.max(e,o||0));let r=e!==this.firstPage||n!==this.lastPage;this.firstPage=e,this.lastPage=n,this.currentPage=o,r&&this.scheduleFeching()},buildColumnSpec(e){if(!this.schema.fields)throw new Error("Missing schema.fields!");const n=this.schema.fields.find(r=>r.path===e.path);if(!n)throw new Error(`Missing field schema for path ${e.path}`);const o=this.$L.FieldTypeComponents.get(n,"default");return Object.assign({},n,{width:e.width||null,sortable:n?n.sortable:!1,sticky:n&&n.sticky||e.sticky||!1,align:n&&n.align||"left",column:e,field:n,component:o})},handleColumnSpecsUpdate(e){this.columnSpecs=e},changeSelection({key:e,selected:n}){const{includedIds:o,excludedIds:r}=vUe({key:e,selected:n},this);this.includedIds=o,this.excludedIds=r,this.$nextTick(()=>{this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:this.totalCount})})},scheduleFeching(){for(let e=this.firstPage;e<=this.lastPage;e++)this.fetchPage(e)},async fetchPage(e){let n=this.loadedPages[e];if(n)return n;n=this.loadedPages[e]={id:this.id,index:e,startedAt:Date.now(),duration:null,loading:!0,loaded:!1,failed:!1,error:null,data:null};try{this.fetching++;const{hits:o,total:r}=await this.resolvePageData(e);Object.assign(n,{duration:Date.now()-n.startedAt,loading:!1,loaded:!0,data:o});let a=this.loadedPages.indexOf(n)>=0;r!==void 0&&a&&(this.totalCount=r)}catch(o){console.error("LTable","Failed to call `fetch` callback",o),Object.assign(n,{loading:!1,failed:!0,error:o.toString()})}finally{this.id===n.id&&this.fetching--}return n},async resolvePageData(e){if(this.rows){let n=this.perPage,o=e*n;return{data:this.rows.slice(o,o+n),total:this.rows.length}}else{if(this.fetch)return await this.fetch({page:e,offset:e*this.perPage,limit:this.perPage,schema:this.schema,columns:this.columns,perPage:this.perPage,primaryKey:this.primaryKey});throw new Error("Cannot discover data. Either `rows` or `fetch` property must be assigned to table")}}}},FUe={class:"l-table-table",border:"0"};function HUe(e,n,o,r,a,l){const i=t.resolveComponent("LTableHeader"),s=t.resolveComponent("LTableBodySpacer"),c=t.resolveComponent("LTableBody"),d=t.resolveComponent("LTableLoadMore"),u=t.resolveComponent("LTableEndspace"),f=t.resolveComponent("LTableReloader"),p=t.resolveComponent("LTablePagination");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-container",l.contentClasses]),ref:"container",style:t.normalizeStyle(l.contentStyle),onScroll:n[7]||(n[7]=(...m)=>l.onScroll&&l.onScroll(...m))},[t.createElementVNode("table",FUe,[n[8]||(n[8]=t.createElementVNode("caption",{style:{display:"none"}}," Table Header ",-1)),t.createVNode(i,{height:a.headerHeight,selectable:o.selectable,columnSpecs:a.columnSpecs,loading:!!a.fetching,total:a.totalCount,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onSelected:n[0]||(n[0]=m=>l.changeSelection(m)),"onColumnSpecs:update":l.handleColumnSpecsUpdate},null,8,["height","selectable","columnSpecs","loading","total","includedIds","excludedIds","multiselect","onColumnSpecs:update"]),t.createVNode(s,{height:l.spacing.top},null,8,["height"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,m=>(t.openBlock(),t.createBlock(c,{key:m.index,page:m,perPage:l.perPage,pagesCount:l.pagesCount,totalCount:a.totalCount,selectable:o.selectable,clickable:o.clickable,columnSpecs:a.columnSpecs,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onClickItem:n[1]||(n[1]=g=>e.$emit("click-item",g)),onSelected:n[2]||(n[2]=g=>l.changeSelection(g))},null,8,["page","perPage","pagesCount","totalCount","selectable","clickable","columnSpecs","includedIds","excludedIds","multiselect"]))),128)),t.createVNode(s,{height:l.spacing.bottom},null,8,["height"])]),l.isLoadMoreVisible?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[3]||(n[3]=m=>l.loadMore(!0)),onAppeared:n[4]||(n[4]=m=>l.loadMore()),automatic:o.autoLoadMore},null,8,["automatic"])):t.createCommentVNode("",!0),t.createVNode(u),t.createVNode(t.Transition,{name:"scale-up"},{default:t.withCtx(()=>[l.hasVisibleFailedPages?(t.openBlock(),t.createBlock(f,{key:0,onReload:n[5]||(n[5]=m=>l.reloadFailedPages())})):t.createCommentVNode("",!0)]),_:1}),l.isPaginationVisible?(t.openBlock(),t.createBlock(p,{key:1,currentPage:a.currentPage,pagesCount:l.pagesCount,totalCount:a.totalCount,onGoto:n[6]||(n[6]=m=>l.gotoPage(m))},null,8,["currentPage","pagesCount","totalCount"])):t.createCommentVNode("",!0)],38)}const UUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(RUe,[["render",HUe]])},Symbol.toStringTag,{value:"Module"})),Ydt="",YUe={name:"LTabs",components:{ElTabs:bw},methods:{calcPaneInstances(e=!1){if(this.$slots.default){const o=this.$slots.default.filter(a=>a.tag&&a.componentOptions&&a.componentOptions.Ctor.options.tagName==="l-tab-pane").map(({componentInstance:a})=>a),r=!(o.length===this.panes.length&&o.every((a,l)=>a===this.panes[l]));(e||r)&&(this.panes=o)}else this.panes.length!==0&&(this.panes=[])}},data(){return{panes:[]}}};function WUe(e,n,o,r,a,l){const i=t.resolveComponent("el-tabs");return t.openBlock(),t.createBlock(i,t.normalizeProps(t.guardReactiveProps(e.$attrs)),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16)}const QUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(YUe,[["render",WUe],["__scopeId","data-v-66db6dd7"]])},Symbol.toStringTag,{value:"Module"})),KUe={tagName:"l-target-chip",name:"LTargetChip",props:{kind:{type:String,required:!0},closeable:{type:Boolean,default:!1},name:{type:String,required:!0},count:{type:Number}},computed:{color:function(){return{member:"purple",group:"aqua",user:"link",tag:"warning",community:"danger",role:"lead-light"}[this.kind]||"lead"},icon:function(){return{member:"uil-graduation-cap",group:"uil-users-alt",user:"uil-user",tag:"uil-tag-alt",role:"uil-user",community:"uil-channel"}[this.kind]}}},qUe={class:"l-d-flex l-align-items"};function GUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-chip");return t.openBlock(),t.createBlock(s,{style:{height:"24px"},bold:"",fill:"",color:l.color,icon:l.icon},{default:t.withCtx(()=>[t.createElementVNode("div",qUe,[t.createTextVNode(t.toDisplayString(o.count)+" "+t.toDisplayString(o.name)+" ",1),o.closeable?(t.openBlock(),t.createBlock(i,{key:0,onClick:n[0]||(n[0]=c=>e.$emit("remove")),class:"l-d-flex l-align-items-center ml-1 mr-0",style:{cursor:"pointer"},size:"15"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode(" uis-times-circle ")])),_:1})):t.createCommentVNode("",!0)])]),_:1},8,["color","icon"])}const XUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(KUe,[["render",GUe]])},Symbol.toStringTag,{value:"Module"})),Kdt="",ZUe={tagName:"l-target-input",name:"LTargetInput",props:{topics:{type:Array,required:!0},limit:{type:Number,default:3},editable:{type:Boolean,default:!1}},computed:{topicsToShow(){return this.topics.slice(0,this.limit)},moreTopicsText(){const e=this.topics.length-this.limit>1;return`+ ${this.topics.length-this.limit} destinatário`+(e?"s":"")}}};function JUe(e,n,o,r,a,l){const i=t.resolveComponent("l-target-chip"),s=t.resolveComponent("l-chip");return o.topics&&o.topics.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass("l-target-input"+(o.editable?" editable":""))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.topicsToShow,c=>(t.openBlock(),t.createBlock(i,{kind:c.kind,name:c.name,key:c.id,class:"mr-2 mb-2"},null,8,["kind","name"]))),128)),o.topics.length>this.limit?(t.openBlock(),t.createBlock(s,{key:0,color:"purple",class:"mb-2",fill:"","hide-icon":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.moreTopicsText),1)]),_:1})):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)}const eYe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(ZUe,[["render",JUe],["__scopeId","data-v-1da7433b"]])},Symbol.toStringTag,{value:"Module"}));function So(e){this.content=e}So.prototype={constructor:So,find:function(e){for(var n=0;n<this.content.length;n+=2)if(this.content[n]===e)return n;return-1},get:function(e){var n=this.find(e);return n==-1?void 0:this.content[n+1]},update:function(e,n,o){var r=o&&o!=e?this.remove(o):this,a=r.find(e),l=r.content.slice();return a==-1?l.push(o||e,n):(l[a+1]=n,o&&(l[a]=o)),new So(l)},remove:function(e){var n=this.find(e);if(n==-1)return this;var o=this.content.slice();return o.splice(n,2),new So(o)},addToStart:function(e,n){return new So([e,n].concat(this.remove(e).content))},addToEnd:function(e,n){var o=this.remove(e).content.slice();return o.push(e,n),new So(o)},addBefore:function(e,n,o){var r=this.remove(n),a=r.content.slice(),l=r.find(e);return a.splice(l==-1?a.length:l,0,n,o),new So(a)},forEach:function(e){for(var n=0;n<this.content.length;n+=2)e(this.content[n],this.content[n+1])},prepend:function(e){return e=So.from(e),e.size?new So(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=So.from(e),e.size?new So(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var n=this;e=So.from(e);for(var o=0;o<e.content.length;o+=2)n=n.remove(e.content[o]);return n},toObject:function(){var e={};return this.forEach(function(n,o){e[n]=o}),e},get size(){return this.content.length>>1}},So.from=function(e){if(e instanceof So)return e;var n=[];if(e)for(var o in e)n.push(o,e[o]);return new So(n)};function r$(e,n,o){for(let r=0;;r++){if(r==e.childCount||r==n.childCount)return e.childCount==n.childCount?null:o;let a=e.child(r),l=n.child(r);if(a==l){o+=a.nodeSize;continue}if(!a.sameMarkup(l))return o;if(a.isText&&a.text!=l.text){for(let i=0;a.text[i]==l.text[i];i++)o++;return o}if(a.content.size||l.content.size){let i=r$(a.content,l.content,o+1);if(i!=null)return i}o+=a.nodeSize}}function a$(e,n,o,r){for(let a=e.childCount,l=n.childCount;;){if(a==0||l==0)return a==l?null:{a:o,b:r};let i=e.child(--a),s=n.child(--l),c=i.nodeSize;if(i==s){o-=c,r-=c;continue}if(!i.sameMarkup(s))return{a:o,b:r};if(i.isText&&i.text!=s.text){let d=0,u=Math.min(i.text.length,s.text.length);for(;d<u&&i.text[i.text.length-d-1]==s.text[s.text.length-d-1];)d++,o--,r--;return{a:o,b:r}}if(i.content.size||s.content.size){let d=a$(i.content,s.content,o-1,r-1);if(d)return d}o-=c,r-=c}}class Ye{constructor(n,o){if(this.content=n,this.size=o||0,o==null)for(let r=0;r<n.length;r++)this.size+=n[r].nodeSize}nodesBetween(n,o,r,a=0,l){for(let i=0,s=0;s<o;i++){let c=this.content[i],d=s+c.nodeSize;if(d>n&&r(c,a+s,l||null,i)!==!1&&c.content.size){let u=s+1;c.nodesBetween(Math.max(0,n-u),Math.min(c.content.size,o-u),r,a+u)}s=d}}descendants(n){this.nodesBetween(0,this.size,n)}textBetween(n,o,r,a){let l="",i=!0;return this.nodesBetween(n,o,(s,c)=>{let d=s.isText?s.text.slice(Math.max(n,c)-c,o-c):s.isLeaf?a?typeof a=="function"?a(s):a:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&d||s.isTextblock)&&r&&(i?i=!1:l+=r),l+=d},0),l}append(n){if(!n.size)return this;if(!this.size)return n;let o=this.lastChild,r=n.firstChild,a=this.content.slice(),l=0;for(o.isText&&o.sameMarkup(r)&&(a[a.length-1]=o.withText(o.text+r.text),l=1);l<n.content.length;l++)a.push(n.content[l]);return new Ye(a,this.size+n.size)}cut(n,o=this.size){if(n==0&&o==this.size)return this;let r=[],a=0;if(o>n)for(let l=0,i=0;i<o;l++){let s=this.content[l],c=i+s.nodeSize;c>n&&((i<n||c>o)&&(s.isText?s=s.cut(Math.max(0,n-i),Math.min(s.text.length,o-i)):s=s.cut(Math.max(0,n-i-1),Math.min(s.content.size,o-i-1))),r.push(s),a+=s.nodeSize),i=c}return new Ye(r,a)}cutByIndex(n,o){return n==o?Ye.empty:n==0&&o==this.content.length?this:new Ye(this.content.slice(n,o))}replaceChild(n,o){let r=this.content[n];if(r==o)return this;let a=this.content.slice(),l=this.size+o.nodeSize-r.nodeSize;return a[n]=o,new Ye(a,l)}addToStart(n){return new Ye([n].concat(this.content),this.size+n.nodeSize)}addToEnd(n){return new Ye(this.content.concat(n),this.size+n.nodeSize)}eq(n){if(this.content.length!=n.content.length)return!1;for(let o=0;o<this.content.length;o++)if(!this.content[o].eq(n.content[o]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(n){let o=this.content[n];if(!o)throw new RangeError("Index "+n+" out of range for "+this);return o}maybeChild(n){return this.content[n]||null}forEach(n){for(let o=0,r=0;o<this.content.length;o++){let a=this.content[o];n(a,r,o),r+=a.nodeSize}}findDiffStart(n,o=0){return r$(this,n,o)}findDiffEnd(n,o=this.size,r=n.size){return a$(this,n,o,r)}findIndex(n,o=-1){if(n==0)return _1(0,n);if(n==this.size)return _1(this.content.length,n);if(n>this.size||n<0)throw new RangeError(`Position ${n} outside of fragment (${this})`);for(let r=0,a=0;;r++){let l=this.child(r),i=a+l.nodeSize;if(i>=n)return i==n||o>0?_1(r+1,i):_1(r,a);a=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(n=>n.toJSON()):null}static fromJSON(n,o){if(!o)return Ye.empty;if(!Array.isArray(o))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ye(o.map(n.nodeFromJSON))}static fromArray(n){if(!n.length)return Ye.empty;let o,r=0;for(let a=0;a<n.length;a++){let l=n[a];r+=l.nodeSize,a&&l.isText&&n[a-1].sameMarkup(l)?(o||(o=n.slice(0,a)),o[o.length-1]=l.withText(o[o.length-1].text+l.text)):o&&o.push(l)}return new Ye(o||n,r)}static from(n){if(!n)return Ye.empty;if(n instanceof Ye)return n;if(Array.isArray(n))return this.fromArray(n);if(n.attrs)return new Ye([n],n.nodeSize);throw new RangeError("Can not convert "+n+" to a Fragment"+(n.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ye.empty=new Ye([],0);const j_={index:0,offset:0};function _1(e,n){return j_.index=e,j_.offset=n,j_}function N1(e,n){if(e===n)return!0;if(!(e&&typeof e=="object")||!(n&&typeof n=="object"))return!1;let o=Array.isArray(e);if(Array.isArray(n)!=o)return!1;if(o){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!N1(e[r],n[r]))return!1}else{for(let r in e)if(!(r in n)||!N1(e[r],n[r]))return!1;for(let r in n)if(!(r in e))return!1}return!0}let mn=class aE{constructor(n,o){this.type=n,this.attrs=o}addToSet(n){let o,r=!1;for(let a=0;a<n.length;a++){let l=n[a];if(this.eq(l))return n;if(this.type.excludes(l.type))o||(o=n.slice(0,a));else{if(l.type.excludes(this.type))return n;!r&&l.type.rank>this.type.rank&&(o||(o=n.slice(0,a)),o.push(this),r=!0),o&&o.push(l)}}return o||(o=n.slice()),r||o.push(this),o}removeFromSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return n.slice(0,o).concat(n.slice(o+1));return n}isInSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return!0;return!1}eq(n){return this==n||this.type==n.type&&N1(this.attrs,n.attrs)}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Mark.fromJSON");let r=n.marks[o.type];if(!r)throw new RangeError(`There is no mark type ${o.type} in this schema`);let a=r.create(o.attrs);return r.checkAttrs(a.attrs),a}static sameSet(n,o){if(n==o)return!0;if(n.length!=o.length)return!1;for(let r=0;r<n.length;r++)if(!n[r].eq(o[r]))return!1;return!0}static setFrom(n){if(!n||Array.isArray(n)&&n.length==0)return aE.none;if(n instanceof aE)return[n];let o=n.slice();return o.sort((r,a)=>r.type.rank-a.type.rank),o}};mn.none=[];class k1 extends Error{}class ct{constructor(n,o,r){this.content=n,this.openStart=o,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(n,o){let r=i$(this.content,n+this.openStart,o);return r&&new ct(r,this.openStart,this.openEnd)}removeBetween(n,o){return new ct(l$(this.content,n+this.openStart,o+this.openStart),this.openStart,this.openEnd)}eq(n){return this.content.eq(n.content)&&this.openStart==n.openStart&&this.openEnd==n.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let n={content:this.content.toJSON()};return this.openStart>0&&(n.openStart=this.openStart),this.openEnd>0&&(n.openEnd=this.openEnd),n}static fromJSON(n,o){if(!o)return ct.empty;let r=o.openStart||0,a=o.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ct(Ye.fromJSON(n,o.content),r,a)}static maxOpen(n,o=!0){let r=0,a=0;for(let l=n.firstChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.firstChild)r++;for(let l=n.lastChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.lastChild)a++;return new ct(n,r,a)}}ct.empty=new ct(Ye.empty,0,0);function l$(e,n,o){let{index:r,offset:a}=e.findIndex(n),l=e.maybeChild(r),{index:i,offset:s}=e.findIndex(o);if(a==n||l.isText){if(s!=o&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(o))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,l.copy(l$(l.content,n-a-1,o-a-1)))}function i$(e,n,o,r){let{index:a,offset:l}=e.findIndex(n),i=e.maybeChild(a);if(l==n||i.isText)return r&&!r.canReplace(a,a,o)?null:e.cut(0,n).append(o).append(e.cut(n));let s=i$(i.content,n-l-1,o);return s&&e.replaceChild(a,i.copy(s))}function tYe(e,n,o){if(o.openStart>e.depth)throw new k1("Inserted content deeper than insertion position");if(e.depth-o.openStart!=n.depth-o.openEnd)throw new k1("Inconsistent open depths");return s$(e,n,o,0)}function s$(e,n,o,r){let a=e.index(r),l=e.node(r);if(a==n.index(r)&&r<e.depth-o.openStart){let i=s$(e,n,o,r+1);return l.copy(l.content.replaceChild(a,i))}else if(o.content.size)if(!o.openStart&&!o.openEnd&&e.depth==r&&n.depth==r){let i=e.parent,s=i.content;return Uc(i,s.cut(0,e.parentOffset).append(o.content).append(s.cut(n.parentOffset)))}else{let{start:i,end:s}=nYe(o,e);return Uc(l,d$(e,i,s,n,r))}else return Uc(l,E1(e,n,r))}function c$(e,n){if(!n.type.compatibleContent(e.type))throw new k1("Cannot join "+n.type.name+" onto "+e.type.name)}function P_(e,n,o){let r=e.node(o);return c$(r,n.node(o)),r}function Hc(e,n){let o=n.length-1;o>=0&&e.isText&&e.sameMarkup(n[o])?n[o]=e.withText(n[o].text+e.text):n.push(e)}function fh(e,n,o,r){let a=(n||e).node(o),l=0,i=n?n.index(o):a.childCount;e&&(l=e.index(o),e.depth>o?l++:e.textOffset&&(Hc(e.nodeAfter,r),l++));for(let s=l;s<i;s++)Hc(a.child(s),r);n&&n.depth==o&&n.textOffset&&Hc(n.nodeBefore,r)}function Uc(e,n){return e.type.checkContent(n),e.copy(n)}function d$(e,n,o,r,a){let l=e.depth>a&&P_(e,n,a+1),i=r.depth>a&&P_(o,r,a+1),s=[];return fh(null,e,a,s),l&&i&&n.index(a)==o.index(a)?(c$(l,i),Hc(Uc(l,d$(e,n,o,r,a+1)),s)):(l&&Hc(Uc(l,E1(e,n,a+1)),s),fh(n,o,a,s),i&&Hc(Uc(i,E1(o,r,a+1)),s)),fh(r,null,a,s),new Ye(s)}function E1(e,n,o){let r=[];if(fh(null,e,o,r),e.depth>o){let a=P_(e,n,o+1);Hc(Uc(a,E1(e,n,o+1)),r)}return fh(n,null,o,r),new Ye(r)}function nYe(e,n){let o=n.depth-e.openStart,a=n.node(o).copy(e.content);for(let l=o-1;l>=0;l--)a=n.node(l).copy(Ye.from(a));return{start:a.resolveNoCache(e.openStart+o),end:a.resolveNoCache(a.content.size-e.openEnd-o)}}class ph{constructor(n,o,r){this.pos=n,this.path=o,this.parentOffset=r,this.depth=o.length/3-1}resolveDepth(n){return n==null?this.depth:n<0?this.depth+n:n}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(n){return this.path[this.resolveDepth(n)*3]}index(n){return this.path[this.resolveDepth(n)*3+1]}indexAfter(n){return n=this.resolveDepth(n),this.index(n)+(n==this.depth&&!this.textOffset?0:1)}start(n){return n=this.resolveDepth(n),n==0?0:this.path[n*3-1]+1}end(n){return n=this.resolveDepth(n),this.start(n)+this.node(n).content.size}before(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position before the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]}after(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position after the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]+this.path[n*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let n=this.parent,o=this.index(this.depth);if(o==n.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=n.child(o);return r?n.child(o).cut(r):a}get nodeBefore(){let n=this.index(this.depth),o=this.pos-this.path[this.path.length-1];return o?this.parent.child(n).cut(0,o):n==0?null:this.parent.child(n-1)}posAtIndex(n,o){o=this.resolveDepth(o);let r=this.path[o*3],a=o==0?0:this.path[o*3-1]+1;for(let l=0;l<n;l++)a+=r.child(l).nodeSize;return a}marks(){let n=this.parent,o=this.index();if(n.content.size==0)return mn.none;if(this.textOffset)return n.child(o).marks;let r=n.maybeChild(o-1),a=n.maybeChild(o);if(!r){let s=r;r=a,a=s}let l=r.marks;for(var i=0;i<l.length;i++)l[i].type.spec.inclusive===!1&&(!a||!l[i].isInSet(a.marks))&&(l=l[i--].removeFromSet(l));return l}marksAcross(n){let o=this.parent.maybeChild(this.index());if(!o||!o.isInline)return null;let r=o.marks,a=n.parent.maybeChild(n.index());for(var l=0;l<r.length;l++)r[l].type.spec.inclusive===!1&&(!a||!r[l].isInSet(a.marks))&&(r=r[l--].removeFromSet(r));return r}sharedDepth(n){for(let o=this.depth;o>0;o--)if(this.start(o)<=n&&this.end(o)>=n)return o;return 0}blockRange(n=this,o){if(n.pos<this.pos)return n.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==n.pos?1:0);r>=0;r--)if(n.pos<=this.end(r)&&(!o||o(this.node(r))))return new x1(this,n,r);return null}sameParent(n){return this.pos-this.parentOffset==n.pos-n.parentOffset}max(n){return n.pos>this.pos?n:this}min(n){return n.pos<this.pos?n:this}toString(){let n="";for(let o=1;o<=this.depth;o++)n+=(n?"/":"")+this.node(o).type.name+"_"+this.index(o-1);return n+":"+this.parentOffset}static resolve(n,o){if(!(o>=0&&o<=n.content.size))throw new RangeError("Position "+o+" out of range");let r=[],a=0,l=o;for(let i=n;;){let{index:s,offset:c}=i.content.findIndex(l),d=l-c;if(r.push(i,s,a+c),!d||(i=i.child(s),i.isText))break;l=d-1,a+=c+1}return new ph(o,r,l)}static resolveCached(n,o){let r=u$.get(n);if(r)for(let l=0;l<r.elts.length;l++){let i=r.elts[l];if(i.pos==o)return i}else u$.set(n,r=new oYe);let a=r.elts[r.i]=ph.resolve(n,o);return r.i=(r.i+1)%rYe,a}}class oYe{constructor(){this.elts=[],this.i=0}}const rYe=12,u$=new WeakMap;class x1{constructor(n,o,r){this.$from=n,this.$to=o,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const aYe=Object.create(null);let Yc=class lE{constructor(n,o,r,a=mn.none){this.type=n,this.attrs=o,this.marks=a,this.content=r||Ye.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(n){return this.content.child(n)}maybeChild(n){return this.content.maybeChild(n)}forEach(n){this.content.forEach(n)}nodesBetween(n,o,r,a=0){this.content.nodesBetween(n,o,r,a,this)}descendants(n){this.nodesBetween(0,this.content.size,n)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(n,o,r,a){return this.content.textBetween(n,o,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(n){return this==n||this.sameMarkup(n)&&this.content.eq(n.content)}sameMarkup(n){return this.hasMarkup(n.type,n.attrs,n.marks)}hasMarkup(n,o,r){return this.type==n&&N1(this.attrs,o||n.defaultAttrs||aYe)&&mn.sameSet(this.marks,r||mn.none)}copy(n=null){return n==this.content?this:new lE(this.type,this.attrs,n,this.marks)}mark(n){return n==this.marks?this:new lE(this.type,this.attrs,this.content,n)}cut(n,o=this.content.size){return n==0&&o==this.content.size?this:this.copy(this.content.cut(n,o))}slice(n,o=this.content.size,r=!1){if(n==o)return ct.empty;let a=this.resolve(n),l=this.resolve(o),i=r?0:a.sharedDepth(o),s=a.start(i),d=a.node(i).content.cut(a.pos-s,l.pos-s);return new ct(d,a.depth-i,l.depth-i)}replace(n,o,r){return tYe(this.resolve(n),this.resolve(o),r)}nodeAt(n){for(let o=this;;){let{index:r,offset:a}=o.content.findIndex(n);if(o=o.maybeChild(r),!o)return null;if(a==n||o.isText)return o;n-=a+1}}childAfter(n){let{index:o,offset:r}=this.content.findIndex(n);return{node:this.content.maybeChild(o),index:o,offset:r}}childBefore(n){if(n==0)return{node:null,index:0,offset:0};let{index:o,offset:r}=this.content.findIndex(n);if(r<n)return{node:this.content.child(o),index:o,offset:r};let a=this.content.child(o-1);return{node:a,index:o-1,offset:r-a.nodeSize}}resolve(n){return ph.resolveCached(this,n)}resolveNoCache(n){return ph.resolve(this,n)}rangeHasMark(n,o,r){let a=!1;return o>n&&this.nodesBetween(n,o,l=>(r.isInSet(l.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let n=this.type.name;return this.content.size&&(n+="("+this.content.toStringInner()+")"),f$(this.marks,n)}contentMatchAt(n){let o=this.type.contentMatch.matchFragment(this.content,0,n);if(!o)throw new Error("Called contentMatchAt on a node with invalid content");return o}canReplace(n,o,r=Ye.empty,a=0,l=r.childCount){let i=this.contentMatchAt(n).matchFragment(r,a,l),s=i&&i.matchFragment(this.content,o);if(!s||!s.validEnd)return!1;for(let c=a;c<l;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(n,o,r,a){if(a&&!this.type.allowsMarks(a))return!1;let l=this.contentMatchAt(n).matchType(r),i=l&&l.matchFragment(this.content,o);return i?i.validEnd:!1}canAppend(n){return n.content.size?this.canReplace(this.childCount,this.childCount,n.content):this.type.compatibleContent(n.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let n=mn.none;for(let o=0;o<this.marks.length;o++){let r=this.marks[o];r.type.checkAttrs(r.attrs),n=r.addToSet(n)}if(!mn.sameSet(n,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(o=>o.type.name)}`);this.content.forEach(o=>o.check())}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return this.content.size&&(n.content=this.content.toJSON()),this.marks.length&&(n.marks=this.marks.map(o=>o.toJSON())),n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Node.fromJSON");let r;if(o.marks){if(!Array.isArray(o.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=o.marks.map(n.markFromJSON)}if(o.type=="text"){if(typeof o.text!="string")throw new RangeError("Invalid text node in JSON");return n.text(o.text,r)}let a=Ye.fromJSON(n,o.content),l=n.nodeType(o.type).create(o.attrs,a,r);return l.type.checkAttrs(l.attrs),l}};Yc.prototype.text=void 0;class T1 extends Yc{constructor(n,o,r,a){if(super(n,o,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):f$(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(n,o){return this.text.slice(n,o)}get nodeSize(){return this.text.length}mark(n){return n==this.marks?this:new T1(this.type,this.attrs,this.text,n)}withText(n){return n==this.text?this:new T1(this.type,this.attrs,n,this.marks)}cut(n=0,o=this.text.length){return n==0&&o==this.text.length?this:this.withText(this.text.slice(n,o))}eq(n){return this.sameMarkup(n)&&this.text==n.text}toJSON(){let n=super.toJSON();return n.text=this.text,n}}function f$(e,n){for(let o=e.length-1;o>=0;o--)n=e[o].type.name+"("+n+")";return n}class Wc{constructor(n){this.validEnd=n,this.next=[],this.wrapCache=[]}static parse(n,o){let r=new lYe(n,o);if(r.next==null)return Wc.empty;let a=p$(r);r.next&&r.err("Unexpected trailing text");let l=pYe(fYe(a));return hYe(l,r),l}matchType(n){for(let o=0;o<this.next.length;o++)if(this.next[o].type==n)return this.next[o].next;return null}matchFragment(n,o=0,r=n.childCount){let a=this;for(let l=o;a&&l<r;l++)a=a.matchType(n.child(l).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let n=0;n<this.next.length;n++){let{type:o}=this.next[n];if(!(o.isText||o.hasRequiredAttrs()))return o}return null}compatible(n){for(let o=0;o<this.next.length;o++)for(let r=0;r<n.next.length;r++)if(this.next[o].type==n.next[r].type)return!0;return!1}fillBefore(n,o=!1,r=0){let a=[this];function l(i,s){let c=i.matchFragment(n,r);if(c&&(!o||c.validEnd))return Ye.from(s.map(d=>d.createAndFill()));for(let d=0;d<i.next.length;d++){let{type:u,next:f}=i.next[d];if(!(u.isText||u.hasRequiredAttrs())&&a.indexOf(f)==-1){a.push(f);let p=l(f,s.concat(u));if(p)return p}}return null}return l(this,[])}findWrapping(n){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==n)return this.wrapCache[r+1];let o=this.computeWrapping(n);return this.wrapCache.push(n,o),o}computeWrapping(n){let o=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),l=a.match;if(l.matchType(n)){let i=[];for(let s=a;s.type;s=s.via)i.push(s.type);return i.reverse()}for(let i=0;i<l.next.length;i++){let{type:s,next:c}=l.next[i];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in o)&&(!a.type||c.validEnd)&&(r.push({match:s.contentMatch,type:s,via:a}),o[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(n){if(n>=this.next.length)throw new RangeError(`There's no ${n}th edge in this content match`);return this.next[n]}toString(){let n=[];function o(r){n.push(r);for(let a=0;a<r.next.length;a++)n.indexOf(r.next[a].next)==-1&&o(r.next[a].next)}return o(this),n.map((r,a)=>{let l=a+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)l+=(i?", ":"")+r.next[i].type.name+"->"+n.indexOf(r.next[i].next);return l}).join(`
|
|
117
|
+
`)},or.prototype.renderPartial=function(n,o,r,a){if(r){var l=this.getConfigTags(a),i=L_(r)?r(n[1]):r[n[1]];if(i!=null){var s=n[6],c=n[5],d=n[4],u=i;c==0&&d&&(u=this.indentPartial(i,d,s));var f=this.parse(u,l);return this.renderTokens(f,o,r,u,a)}}},or.prototype.unescapedValue=function(n,o){var r=o.lookup(n[1]);if(r!=null)return r},or.prototype.escapedValue=function(n,o,r){var a=this.getConfigEscape(r)||ua.escape,l=o.lookup(n[1]);if(l!=null)return typeof l=="number"&&a===ua.escape?String(l):a(l)},or.prototype.rawValue=function(n){return n[1]},or.prototype.getConfigTags=function(n){return Uu(n)?n:n&&typeof n=="object"?n.tags:void 0},or.prototype.getConfigEscape=function(n){if(n&&typeof n=="object"&&!Uu(n))return n.escape};var ua={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){uh.templateCache=e},get templateCache(){return uh.templateCache}},uh=new or;ua.clearCache=function(){return uh.clearCache()},ua.parse=function(n,o){return uh.parse(n,o)},ua.render=function(n,o,r,a){if(typeof n!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+PFe(n)+'" was given as the first argument for mustache#render(template, view, partials)');return uh.render(n,o,r,a)},ua.escape=QFe,ua.Scanner=dh,ua.Context=Yu,ua.Writer=or;const tHe={props:["value","schema","entity"],methods:{hasRouterLink(){return er(this.schema,"options.routerLink")},getRouterLink(){const e=er(this.schema,"options.routerLink");return ua.render(e,this.entity)}}},nHe={key:1};function oHe(e,n,o,r,a,l){const i=t.resolveComponent("router-link");return e.$options.methods.hasRouterLink(e.props)?(t.openBlock(),t.createBlock(i,{key:0,to:e.$options.methods.getRouterLink(e.props)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},8,["to"])):(t.openBlock(),t.createElementBlock("span",nHe,t.toDisplayString(o.value),1))}const rHe=lt(tHe,[["render",oHe]]),aHe={props:["value","schema"],methods:{formatValue(e){return e}}};function lHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const iHe=lt(aHe,[["render",lHe]]),sHe={props:["value","schema"],methods:{formatValue(e){return isNaN(e)||e===null||e===void 0?"-":Number(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}}};function cHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const dHe=lt(sHe,[["render",cHe]]),uHe={props:["value","schema"]},fHe=["href"];function pHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("a",{target:"_blank",href:`mailto:${o.value}`},t.toDisplayString(o.value),9,fHe)}const hHe=lt(uHe,[["render",pHe]]),mHe={props:["value","schema"],methods:{formatValue(e,n){if(!e)return"-";const o=er(n,"options.format","dd/MM/yyyy hh:mm:ss");return Ge(e).format(o)}}};function gHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value,o.schema)),1)}const yHe=lt(mHe,[["render",gHe]]),o$={};o$.register=function(){hr.register({type:"String"},"default",rHe),hr.register({type:"Date"},"default",yHe),hr.register({type:"Number"},"default",iHe),hr.register({format:"Amount"},"default",dHe),hr.register({format:"Email"},"default",hHe)};const Odt="",bHe={props:{perPage:Number,pagesCount:Number,totalCount:Number,columnSpecs:{type:Array},includedIds:{type:Array},excludedIds:{type:Array},selectable:Boolean,clickable:Boolean,multiselect:Boolean,page:Object},data(e){return{checked:this.computeChecked(e)}},emits:["selected","click-item"],computed:{includedAll(){return this.includedIds.toString()==="*"},estimatedRows(){return this.page&&this.pagesCount>1&&this.page.index>=this.pagesCount-1?this.totalCount%this.perPage:this.perPage}},methods:{getColumnComponent(e){return e.component},getColumnValue(e,n){return er(e,n.path)},computeChecked(e){const n=e||this;if(!n.page||!n.page.data)return[];let o=n.includedIds,r=n.excludedIds,a=n.includedAll;return n.page.data.map(l=>a&&!r.includes(l.id)||o.includes(l.id))}},watch:{includedAll(){this.checked=this.computeChecked(this)},includedIds(){this.checked=this.computeChecked(this)},excludedIds(){this.checked=this.computeChecked(this)}}},MHe={class:"l-table-tbody"},wHe={key:"selector",class:"l-table-cell l-table-column-selector"},CHe=["onClick"],_He={key:"selector",class:"l-table-cell l-table-column-selector"},NHe={key:"selector",class:"l-table-cell l-table-column-selector"};function kHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox");return t.openBlock(),t.createElementBlock("tbody",MHe,[o.page&&o.page.loaded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.page.data,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c,class:t.normalizeClass({"l-table-selected":a.checked[c]})},[o.selectable?(t.openBlock(),t.createElementBlock("td",wHe,[t.createVNode(i,{modelValue:a.checked[c],"onUpdate:modelValue":d=>a.checked[c]=d,class:"l-table-selector",type:o.multiselect?"checkbox":"radio",onChange:()=>e.$emit("selected",{key:s.id,selected:e.$event})},null,8,["modelValue","onUpdate:modelValue","type","onChange"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}${o.clickable?" cursor-pointer":""}`]),onClick:f=>e.$emit("click-item",s)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.getColumnComponent(d)),{value:l.getColumnValue(s,d),schema:d,entity:s},null,8,["value","schema","entity"]))],10,CHe))),128))],2))),128)):o.page&&o.page.loading?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",_He,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",value:l.includedAll},null,8,["type","value"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[0]||(n[0]=[t.createElementVNode("span",{class:"l-table-skeleton"},null,-1)]),2))),128))]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",NHe,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",checked:l.includedAll},null,8,["type","checked"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[1]||(n[1]=[t.createElementVNode("span",{class:"l-table-skeleton error"},null,-1)]),2))),128))]))),128))])}const EHe=lt(bHe,[["render",kHe]]),zdt="",xHe={props:{title:String,maxWidth:{type:Number,default:null},minWidth:{type:Number,default:50}},data(){return{dragging:!1,deltaX:0}},computed:{handleStyle(){return this.dragging?{transform:`translateX(${this.deltaX}px)`}:null}},methods:{currentWidth(){return this.$el.parentElement.getBoundingClientRect().width},limitDeltaX(e){let n=this.currentWidth();return this.limitWidth(n+e)-n},limitWidth(e){return e?this.maxWidth&&this.maxWidth<e?this.maxWidth:this.minWidth&&this.minWidth>e?this.minWidth:e:null},resize(e){this.$emit("resize",this.limitWidth(e))},drag(e){this.dragging||this.unregisterDocumentHandlers();let n=e.clientX-this.dragStartClientX;this.deltaX=this.limitDeltaX(n),console.log("drag",this.deltaX)},dragStart(e){this.registerDocumentHandlers(),this.deltaX=0,this.dragging=!0,this.dragStartClientX=e.clientX,console.log("dragStart",e)},dragEnd(e){if(this.deltaX){let n=this.currentWidth()+this.deltaX;this.resize(n)}this.unregisterDocumentHandlers(),this.deltaX=0,this.dragging=!1,this.dragStartClientX=0,console.log("dragEnd",e)},registerDocumentHandlers(){this.unregisterDocumentHandlers(),this._documentMouseMove=e=>this.drag(e),this._documentMouseUp=e=>this.dragEnd(e),document.body.style.cursor="col-resize",document.addEventListener("mousemove",this._documentMouseMove),document.addEventListener("mouseup",this._documentMouseUp),document.onselectstart=()=>!1,document.ondragstart=()=>!1},unregisterDocumentHandlers(){document.removeEventListener("mousemove",this._documentMouseMove),document.removeEventListener("mouseup",this._documentMouseUp),document.body.style.cursor="",document.onselectstart=null,document.ondragstart=null}}};function THe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["mt-handle",a.dragging?"dragging":""]),style:t.normalizeStyle(l.handleStyle),onDblclick:n[0]||(n[0]=i=>l.resize(null)),onMousedown:n[1]||(n[1]=(...i)=>l.dragStart&&l.dragStart(...i))},null,38)}const SHe=lt(xHe,[["render",THe]]),Bdt="",DHe={components:{LTableHeaderResizer:SHe},props:{spec:{type:Object}},emits:["spec:update"],data:e=>({localSpec:e.spec}),computed:{resizable(){return this.localSpec.field&&this.localSpec.field.resizable},reordable(){return!0},icon(){return this.$L.Icons.get(this.localSpec.field)}},methods:{resizeColumn(e,n){e.width=n},toggleSorting(e){let n=this.localSpec.column.sortDirection,o="asc";n?n.toLowerCase()==="asc"&&(o="desc"):o="asc",this.$emit("sort",{direction:o,cumulative:e})}},watch:{localSpec:{handler(e){this.$emit("spec:update",e)},deep:!0}}},vHe={key:1,class:"l-table-header-cell-content"};function IHe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-tooltip"),c=t.resolveComponent("LTableHeaderResizer");return t.openBlock(),t.createElementBlock("th",{class:"l-table-header-cell l-table-cell",style:t.normalizeStyle({"--l-table-col-width":o.spec.column.width?`${o.spec.column.width}px`:"auto"})},[o.spec.sortable?(t.openBlock(),t.createElementBlock("a",{key:0,href:"#",class:t.normalizeClass(["l-table-header-cell-content",[o.spec.column.sortDirection?"active":null,`l-table-header-align-${o.spec.align}`]]),onClick:n[0]||(n[0]=t.withModifiers(d=>l.toggleSorting(),["prevent"]))},[t.createVNode(s,{key:"tooltip",disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"]),t.createElementVNode("i",{class:t.normalizeClass(["l-table-sorter-icon uil uil-arrow-down",`l-table-sorter-${o.spec.column.sortDirection||"default"}`])},null,2)],2)):(t.openBlock(),t.createElementBlock("span",vHe,[t.createVNode(s,{disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"])])),n[2]||(n[2]=t.createElementVNode("span",{style:{width:"12px"}},null,-1)),l.resizable?(t.openBlock(),t.createBlock(c,{key:2,onResize:n[1]||(n[1]=d=>l.resizeColumn(o.spec.column,d))})):t.createCommentVNode("",!0)],4)}const AHe=lt(DHe,[["render",IHe]]),Ldt="",OHe={props:["loading"]};function zHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-header-loader",{loading:o.loading}])},null,2)}const BHe=lt(OHe,[["render",zHe]]),Vdt="",LHe={components:{LTableHeaderCell:AHe,LTableHeaderLoader:BHe},props:{columnSpecs:{type:Array},loading:{type:Boolean,default:!1},includedIds:{type:Array},excludedIds:{type:Array},total:{type:Number},selectable:{type:Boolean},multiselect:{type:Boolean}},data:e=>({localColumnSpecs:e.columnSpecs}),emits:["columnSpecs:update","selected"],computed:{selectedEverything(){let e=this.includedIds.length===this.total&&this.total>0,n=this.includedIds.toString()==="*"&&this.excludedIds.length==0;return e||n},selectedNothing(){return this.includedIds.length===0},selectedSomethings(){return!this.selectedNothing&&!this.selectedEverything}},methods:{changeSpecSort(e,{direction:n,cumulative:o}){if(o){let a=this.localColumnSpecs.reduce((l,i)=>Math.max(l,i.column.sortOrder),0)+1;e.column.sortOrder=a,e.column.sortDirection=n}else{for(let r of this.localColumnSpecs)r.column.sortOrder=null,r.column.sortDirection=null;e.column.sortOrder=1,e.column.sortDirection=n}},syncSpec(e){let n=this.localColumnSpecs.findIndex(o=>o.field===e.field);this.localColumnSpecs.splice(n,1,e)},changeSelection(e){this.$emit("selected",{key:"*",selected:e})}},watch:{localColumnSpecs:{handler(e){this.$emit("columnSpecs:update",e)},deep:!0}}},VHe={class:"l-table-header"},$He={key:0,scope:"col",class:"l-table-header-cell l-table-cell l-table-column-selector"},jHe={class:"l-table-header-extras"},PHe={colspan:"999"};function RHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox"),s=t.resolveComponent("LTableHeaderCell"),c=t.resolveComponent("LTableHeaderLoader");return t.openBlock(),t.createElementBlock("thead",VHe,[t.createElementVNode("tr",null,[o.selectable?(t.openBlock(),t.createElementBlock("th",$He,[o.multiselect?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-selector",type:"checkbox",value:l.selectedEverything,indeterminate:l.selectedSomethings,onChange:n[0]||(n[0]=d=>l.changeSelection(d))},null,8,["value","indeterminate"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createBlock(s,{key:u,spec:d,"onSpec:update":l.syncSpec,onSort:f=>l.changeSpecSort(d,f),ref_for:!0,ref:"headers"},null,8,["spec","onSpec:update","onSort"]))),128))]),t.createElementVNode("tr",jHe,[t.createElementVNode("td",PHe,[t.createVNode(c,{loading:o.loading},null,8,["loading"]),n[1]||(n[1]=t.createElementVNode("div",{class:"l-table-header-shadow-top"},null,-1))])])])}const FHe=lt(LHe,[["render",RHe]]),$dt="",HHe={},UHe={class:"l-table-endspace"};function YHe(e,n){return t.openBlock(),t.createElementBlock("div",UHe)}const WHe=lt(HHe,[["render",YHe]]),jdt="",QHe={props:{loading:Boolean,automatic:Boolean},mounted(){this.intersectionObserver=new IntersectionObserver(([e])=>{e&&e.isIntersecting&&this.automatic&&this.$emit("appeared")}),this.intersectionObserver.observe(this.$el)},unmounted(){this.intersectionObserver&&this.intersectionObserver.disconnect()}};function KHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-loadmore",{loading:o.loading}]),onClick:n[0]||(n[0]=i=>e.$emit("click"))},n[1]||(n[1]=[t.createElementVNode("a",{href:"#",class:"l-table-loadmore-link"},"Carregar mais",-1)]),2)}const qHe=lt(QHe,[["render",KHe]]),Pdt="",GHe=2e3,XHe={name:"LTableReloader",data(){return{canReload:!0}},methods:{reload(){this.canReload=!1,this.$emit("reload"),setTimeout(()=>this.canReload=!0,GHe)}}},ZHe={class:"l-table-reloader"},JHe={class:"l-table-reloader-content"};function eUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-button");return t.openBlock(),t.createElementBlock("div",ZHe,[t.createElementVNode("div",JHe,[t.createVNode(i,{size:"22"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-cloud-exclamation")])),_:1}),n[3]||(n[3]=t.createElementVNode("span",{style:{"margin-left":"8px",flex:"1 1"}},"Algumas informações não puderam ser carregadas.",-1)),t.createVNode(s,{size:"mini",onClick:n[0]||(n[0]=c=>l.reload())},{default:t.withCtx(()=>n[2]||(n[2]=[t.createTextVNode("Recarregar")])),_:1})])])}const tUe=lt(XHe,[["render",eUe]]),Rdt="",nUe={props:{height:{type:Number}}},oUe={class:"l-table-spacer"};function rUe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("tbody",oUe,[t.createElementVNode("tr",{style:t.normalizeStyle({height:`${o.height}px`})},n[0]||(n[0]=[t.createElementVNode("td",{class:"l-table-spacer-bg",colspan:"999"},null,-1)]),4)])}const aUe=lt(nUe,[["render",rUe]]);var lUe=T9;function iUe(e){var n=e==null?0:e.length;return n?lUe(e,1):[]}var sUe=iUe;const cUe=qn(sUe);function dUe(){}var uUe=dUe,$_=CB,fUe=uUe,pUe=lC,hUe=1/0,mUe=$_&&1/pUe(new $_([,-0]))[1]==hUe?function(e){return new $_(e)}:fUe,gUe=mUe,yUe=rC,bUe=_9,MUe=N9,wUe=aC,CUe=gUe,_Ue=lC,NUe=200;function kUe(e,n,o){var r=-1,a=bUe,l=e.length,i=!0,s=[],c=s;if(o)i=!1,a=MUe;else if(l>=NUe){var d=n?null:CUe(e);if(d)return _Ue(d);i=!1,a=wUe,c=new yUe}else c=n?[]:s;e:for(;++r<l;){var u=e[r],f=n?n(u):u;if(u=o||u!==0?u:0,i&&f===f){for(var p=c.length;p--;)if(c[p]===f)continue e;n&&c.push(f),s.push(u)}else a(c,f,o)||(c!==s&&c.push(f),s.push(u))}return s}var EUe=kUe,xUe=EUe;function TUe(e){return e&&e.length?xUe(e):[]}var SUe=TUe;const DUe=qn(SUe);function vUe({key:e,selected:n},o){let{loadedPages:r,allowInvertedSelection:a,includedIds:l,excludedIds:i,multiselect:s,itemToId:c=m=>m}=o;if(!e===void 0||e===null)return{includedIds:l,excludedIds:i};if(e==="*"){if(l.splice(0,l.length),i.splice(0,i.length),n&&s&&a&&l.push("*"),n&&s&&!a){let m=cUe(r.filter(y=>y.data).map(y=>y.data));l=DUe(m.map(y=>c(y)))}return{includedIds:l,excludedIds:i}}let u=l.includes("*"),f=l.includes(e),p=i.includes(e);if(s||(l.splice(0,l.length),i.splice(0,i.length)),u&&s){if(n&&p){let m=i.indexOf(e);i.splice(m,1)}!n&&!p&&s&&i.push(e)}else if(n&&!f&&(s?l.push(e):l=[e]),!n&&f){let m=l.indexOf(e);l.splice(m,1)}return{includedIds:l,excludedIds:i}}function IUe({pagesCount:e,currentPage:n,endingAdjacents:o=1,adjacents:r=2,next:a=!0,previous:l=!0,last:i=!1,first:s=!1,fixedWidth:c=!0}){const d=[];if(!e)return d;const u=c?o*2+r*2+3:o*2+1;if(e<=u)for(let f=0;f<e;f++)d.push(f);else{let f=0;for(let y=0;y<Math.min(o,e);y++)d.push(f=y);let p=o+r*2,m=r,g=r;c&&n<p&&(g+=p-n),c&&e-n-1<p&&(m+=p-(e-n-1));for(let y=Math.max(f+1,n-m);y<Math.min(n+g+1,e);y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...1"),d.push(f=y);for(let y=Math.max(f+1,e-o);y<e;y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...2"),d.push(f=y)}return l&&d.unshift("<"),a&&d.push(">"),s&&d.unshift("<<"),i&&d.push(">>"),d}const Fdt="",AUe={name:"LTablePagination",props:{pagesCount:Number,totalCount:Number,currentPage:{type:Number,default:2}},computed:{visiblePages(){return this.totalCount?IUe({pagesCount:this.pagesCount,currentPage:this.currentPage,adjacents:1,endingAdjacents:1,fixedWidth:!0}):["...1"]}},methods:{clicked(e){typeof e=="number"?this.goto(parseInt(e)):e==="<"?this.goto(this.currentPage-1):e===">"?this.goto(this.currentPage+1):e==="<<"?this.goto(0):e===">>"&&this.goto(this.pagesCount-1)},goto(e){this.currentPage!=e&&(e=Math.max(0,Math.min(e,this.pagesCount-1)),this.$emit("goto",e))}}},OUe={class:"l-table-pagination"},zUe=["onClick"];function BUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon");return t.openBlock(),t.createElementBlock("div",OUe,[t.createVNode(t.TransitionGroup,{tag:"div",class:"l-table-pagination-pages",name:"l-table-pagination-transition"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,s=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["l-table-pagination-page-item",{active:s==o.currentPage}]),key:s,onClick:c=>l.clicked(s)},[s==="<"?(t.openBlock(),t.createBlock(i,{key:0,size:"20"},{default:t.withCtx(()=>n[0]||(n[0]=[t.createTextVNode("uil-angle-left")])),_:1})):s===">"?(t.openBlock(),t.createBlock(i,{key:1,size:"20"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-angle-right")])),_:1})):s==="...1"||s==="...2"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(" ... ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createTextVNode(t.toDisplayString(s+1),1)],64))],10,zUe))),128))]),_:1})])}const LUe=lt(AUe,[["render",BUe]]),Hdt="";o$.register();const VUe=100,$Ue=3e4,jUe=3,PUe="scrollBehavior"in document.documentElement.style,RUe={name:"LTable",tagName:"l-table",components:{LTableHeader:FHe,LTableBody:EHe,LTableReloader:tUe,LTableLoadMore:qHe,LTableEndspace:WHe,LTableBodySpacer:aUe,LTablePagination:LUe},props:{rows:{type:Array},primaryKey:{type:String,default:"id"},fetch:{type:Function},columns:{type:Array},pagination:{type:Boolean,default:!1},display:{type:String,enum:["all","more","paged"],default:"all"},autoLoadMore:{type:Boolean,default:!1},schema:{type:Object,required:!0},selectable:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!0},allowInvertedSelection:{type:Boolean,default:!0},rowHeight:{type:Number,default:32},borderTick:{type:Number,default:1},snapToPageOnMore:{type:Boolean,default:!0},stickyColumnLeft:{type:Boolean,default:!1},recycle:{type:Boolean,default:!0},limitPerPage:{type:Number,default:50}},emits:["loading","changeSelection","click-item"],mounted(){this.computeVisibleRows()},data(e){let n=[];return e.columns.length&&(n=e.columns.map(o=>this.buildColumnSpec(o))),{fetching:0,headerHeight:56,nonce:0,id:0,extraRows:15,lastComputedOffsetY:0,includedIds:[],excludedIds:[],scrollAtTop:!0,scrollAtLeft:!0,totalCount:0,firstPage:null,currentPage:null,lastPage:null,loadedPages:[],columnSpecs:n}},watch:{totalCount(e){this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:e})},somePageIsLoading(e){this.$emit("loading",e)}},computed:{perPage(){return Number(this.limitPerPage)},pagesCount(){return Math.floor(this.totalCount/this.perPage)+1},selectionCount(){return this.includedIds.toString()==="*"?this.totalCount-this.excludedIds.length:this.includedIds.length},lastLoadedPage(){return this.loadedPages.length},isLoadMoreVisible(){return this.display==="more"&&this.lastLoadedPage<this.pagesCount},isPaginationVisible(){return(this.display==="page"||!!this.pagination)&&this.display!=="more"&&this.pagesCount!==null},isLeftColumnSticky(){return this.stickyColumnLeft||this.columns&&this.columns[0]&&this.columns[0].sticky},usingRecycledLayout(){return this.display!=="paged"&&this.recycle},hasVisibleFailedPages(){for(let e=this.firstPageRendered;e<=this.lastPageRendered;e++)if(this.loadedPages[e]&&this.loadedPages[e].failed)return!0;return!1},firstPageRendered(){return!this.usingRecycledLayout&&this.display!=="paged"?0:this.firstPage},lastPageRendered(){return this.display==="paged"?this.firstPage:this.usingRecycledLayout?this.lastPage:Math.max(0,this.lastLoadedPage-1)},visiblePages(){let e=[];for(let n=this.firstPageRendered;n<=this.lastPageRendered;n++){let o=this.loadedPages[n]||{index:n};e.push(o)}return e},contentStyle(){return{"--l-table-primary-color":"#2F8AF5","--l-table-warning-color":"#fd3a57","--l-table-bg-color":"white","--l-table-header-height":`${this.headerHeight}px`,"--l-table-header-text-color":"#232B34","--l-table-header-border-color":"#E8E8E8","--l-table-skeleton-height":`${Math.min(this.rowHeight-8,8)}px`,"--l-table-loader-height":"3px","--l-table-loader-color":"var(--l-table-primary-color)","--l-table-row-height":`${this.rowHeight}px`,"--l-table-cell-padding":"0 8px","--l-table-row-hover-color":"#fafbfd","--l-table-row-selected-color":"#eef5fa","--l-table-row-selected-hover-color":"#e6f0f8","--l-table-border-color":"#D3DAE6","--l-table-border-tick":`${this.borderTick}px`,"--l-table-selector-width":`${this.selectable?Math.min(this.headerHeight,this.rowHeight):0}px`,"--l-table-loadmore-height":"46px","--l-table-pagination-height":"48px","--l-table-pagination-color":"var(--l-table-primary-color)","--l-table-pagination-bg-color":"white","--l-table-reloader-margin":"16px","--l-table-endspace-bg-color":"#f5f5f5","--l-table-link-color":"var(--l-table-primary-color)"}},contentClasses(){return{"l-table-at-top":this.scrollAtTop,"l-table-at-left":this.scrollAtLeft,"l-table-sticky-column-left":this.isLeftColumnSticky}},spacing(){let e=0,n=0,o=this.display,r=this.totalCount;return o==="more"&&(r=this.loadedPages.length*this.perPage),(o==="all"||o==="more")&&(e=this.firstPageRendered*this.perPage*this.rowHeight,n=Math.max(0,(r-(this.lastPageRendered+1)*this.perPage)*this.rowHeight)),{top:Math.max(0,e),bottom:Math.max(0,n)}},rect(){return this.$refs.container.getBoundingClientRect()},somePageIsLoading(){return this.loadedPages.map(e=>e.loading).some(e=>e)}},methods:{itemToId(e){return e?this.primaryKey?e[this.primaryKey]:e:null},scrollTo(e=0,n){let o="auto";if(n){let r=this.$refs.container.scrollTop,a=this.perPage*this.rowHeight+1;o=Math.abs(r-e)<a?"smooth":"auto"}this.$refs.container.scrollTo({top:e,behavior:o})},gotoPage(e,n){if(e=Math.max(0,Math.min(this.pagesCount,e)),this.display==="paged"){this.setViewablePages(e,e,e),this.scrollTo(0,!0);return}this.display==="more"?this.setViewablePages(e-1,e,e):this.setViewablePages(e,e,e);let o=e*this.rowHeight*this.perPage;this.scrollTo(o,n)},async loadMore(e){let n=this.loadedPages[this.loadedPages.length-1];if(!n||n.loading)return!1;let o=this.loadedPages.length;this.setViewablePages(this.firstPage,o),e&&this.snapToPageOnMore&&PUe&&setTimeout(()=>this.gotoPage(o,!0),100)},reload(){this.id++,this.fetching=0,this.firstPage=null,this.lastPage=null,this.totalCount=null,this.loadedPages=[],this.includedIds=[],this.excludedIds=[],this.gotoPage(0),this.computeVisibleRows()},reloadFailedPages(){let e=0;for(let n=this.firstPageRendered;n<=this.lastPageRendered&&!(!(!this.loadedPages[n]||!this.loadedPages[n].failed)&&(this.loadedPages[n]=null,this.fetchPage(n),++e>=jUe));n++);},onScroll(){if(!(this.getScrollSpeed()>$Ue)&&!this._scrollDebounce)return this.computeVisibleRows();clearTimeout(this._scrollDebounce),this._scrollDebounce=setTimeout(()=>{this.computeVisibleRows(),this._scrollDebounce=null},VUe)},getScrollSpeed(){let e=this._lastOffsetY||0,n=this._lastOffsetYTime||0,o=this._lastOffsetY=this.$refs.container.scrollTop,r=this._lastOffsetYTime=Date.now();return Math.abs(1e3*(e-o)/(r-n))},computeVisibleRows(){let e=this.$refs.container.scrollTop,n=this.$refs.container.scrollLeft,o=this.lastComputedOffsetY;this.scrollAtTop=e===0,this.scrollAtLeft=n===0;let r=Math.abs(o-e);if(e>2&&o>2&&r<150||(this.lastComputedOffsetY=e,this.display==="paged"))return;let l=this.rect.height-this.headerHeight,i=Math.max(0,Math.floor(e/this.rowHeight)),s=Math.ceil(l/this.rowHeight),c=i+s,d=this.extraRows,u=this.perPage,f=Math.floor((i-d)/this.perPage),p=Math.floor((c+d)/u),m=p>=this.pagesCount-1?s:s/2,g=Math.floor((i+m)/this.perPage);if(this.display==="more"){for(f=Math.min(f,this.lastLoadedPage);!this.loadedPages[f]&&f>0;)f--;for(p=Math.max(p,f);!this.loadedPages[p]&&p>f&&p>0;)p--}this.setViewablePages(f,p,g)},setViewablePages(e=0,n=0,o=0){this.display==="paged"&&(n=e),e=Math.min(Math.max(e,0),this.pagesCount-1),n=Math.min(Math.max(n,e),this.pagesCount-1),o=Math.min(n,Math.max(e,o||0));let r=e!==this.firstPage||n!==this.lastPage;this.firstPage=e,this.lastPage=n,this.currentPage=o,r&&this.scheduleFeching()},buildColumnSpec(e){if(!this.schema.fields)throw new Error("Missing schema.fields!");const n=this.schema.fields.find(r=>r.path===e.path);if(!n)throw new Error(`Missing field schema for path ${e.path}`);const o=this.$L.FieldTypeComponents.get(n,"default");return Object.assign({},n,{width:e.width||null,sortable:n?n.sortable:!1,sticky:n&&n.sticky||e.sticky||!1,align:n&&n.align||"left",column:e,field:n,component:o})},handleColumnSpecsUpdate(e){this.columnSpecs=e},changeSelection({key:e,selected:n}){const{includedIds:o,excludedIds:r}=vUe({key:e,selected:n},this);this.includedIds=o,this.excludedIds=r,this.$nextTick(()=>{this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:this.totalCount})})},scheduleFeching(){for(let e=this.firstPage;e<=this.lastPage;e++)this.fetchPage(e)},async fetchPage(e){let n=this.loadedPages[e];if(n)return n;n=this.loadedPages[e]={id:this.id,index:e,startedAt:Date.now(),duration:null,loading:!0,loaded:!1,failed:!1,error:null,data:null};try{this.fetching++;const{hits:o,total:r}=await this.resolvePageData(e);Object.assign(n,{duration:Date.now()-n.startedAt,loading:!1,loaded:!0,data:o});let a=this.loadedPages.indexOf(n)>=0;r!==void 0&&a&&(this.totalCount=r)}catch(o){console.error("LTable","Failed to call `fetch` callback",o),Object.assign(n,{loading:!1,failed:!0,error:o.toString()})}finally{this.id===n.id&&this.fetching--}return n},async resolvePageData(e){if(this.rows){let n=this.perPage,o=e*n;return{data:this.rows.slice(o,o+n),total:this.rows.length}}else{if(this.fetch)return await this.fetch({page:e,offset:e*this.perPage,limit:this.perPage,schema:this.schema,columns:this.columns,perPage:this.perPage,primaryKey:this.primaryKey});throw new Error("Cannot discover data. Either `rows` or `fetch` property must be assigned to table")}}}},FUe={class:"l-table-table",border:"0"};function HUe(e,n,o,r,a,l){const i=t.resolveComponent("LTableHeader"),s=t.resolveComponent("LTableBodySpacer"),c=t.resolveComponent("LTableBody"),d=t.resolveComponent("LTableLoadMore"),u=t.resolveComponent("LTableEndspace"),f=t.resolveComponent("LTableReloader"),p=t.resolveComponent("LTablePagination");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-container",l.contentClasses]),ref:"container",style:t.normalizeStyle(l.contentStyle),onScroll:n[7]||(n[7]=(...m)=>l.onScroll&&l.onScroll(...m))},[t.createElementVNode("table",FUe,[n[8]||(n[8]=t.createElementVNode("caption",{style:{display:"none"}}," Table Header ",-1)),t.createVNode(i,{height:a.headerHeight,selectable:o.selectable,columnSpecs:a.columnSpecs,loading:!!a.fetching,total:a.totalCount,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onSelected:n[0]||(n[0]=m=>l.changeSelection(m)),"onColumnSpecs:update":l.handleColumnSpecsUpdate},null,8,["height","selectable","columnSpecs","loading","total","includedIds","excludedIds","multiselect","onColumnSpecs:update"]),t.createVNode(s,{height:l.spacing.top},null,8,["height"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,m=>(t.openBlock(),t.createBlock(c,{key:`${m.index}-${m.loading}-${m.loaded}`,page:m,perPage:l.perPage,pagesCount:l.pagesCount,totalCount:a.totalCount,selectable:o.selectable,clickable:o.clickable,columnSpecs:a.columnSpecs,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onClickItem:n[1]||(n[1]=g=>e.$emit("click-item",g)),onSelected:n[2]||(n[2]=g=>l.changeSelection(g))},null,8,["page","perPage","pagesCount","totalCount","selectable","clickable","columnSpecs","includedIds","excludedIds","multiselect"]))),128)),t.createVNode(s,{height:l.spacing.bottom},null,8,["height"])]),l.isLoadMoreVisible?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[3]||(n[3]=m=>l.loadMore(!0)),onAppeared:n[4]||(n[4]=m=>l.loadMore()),automatic:o.autoLoadMore},null,8,["automatic"])):t.createCommentVNode("",!0),t.createVNode(u),t.createVNode(t.Transition,{name:"scale-up"},{default:t.withCtx(()=>[l.hasVisibleFailedPages?(t.openBlock(),t.createBlock(f,{key:0,onReload:n[5]||(n[5]=m=>l.reloadFailedPages())})):t.createCommentVNode("",!0)]),_:1}),l.isPaginationVisible?(t.openBlock(),t.createBlock(p,{key:1,currentPage:a.currentPage,pagesCount:l.pagesCount,totalCount:a.totalCount,onGoto:n[6]||(n[6]=m=>l.gotoPage(m))},null,8,["currentPage","pagesCount","totalCount"])):t.createCommentVNode("",!0)],38)}const UUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(RUe,[["render",HUe]])},Symbol.toStringTag,{value:"Module"})),Ydt="",YUe={name:"LTabs",components:{ElTabs:bw},methods:{calcPaneInstances(e=!1){if(this.$slots.default){const o=this.$slots.default.filter(a=>a.tag&&a.componentOptions&&a.componentOptions.Ctor.options.tagName==="l-tab-pane").map(({componentInstance:a})=>a),r=!(o.length===this.panes.length&&o.every((a,l)=>a===this.panes[l]));(e||r)&&(this.panes=o)}else this.panes.length!==0&&(this.panes=[])}},data(){return{panes:[]}}};function WUe(e,n,o,r,a,l){const i=t.resolveComponent("el-tabs");return t.openBlock(),t.createBlock(i,t.normalizeProps(t.guardReactiveProps(e.$attrs)),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16)}const QUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(YUe,[["render",WUe],["__scopeId","data-v-66db6dd7"]])},Symbol.toStringTag,{value:"Module"})),KUe={tagName:"l-target-chip",name:"LTargetChip",props:{kind:{type:String,required:!0},closeable:{type:Boolean,default:!1},name:{type:String,required:!0},count:{type:Number}},computed:{color:function(){return{member:"purple",group:"aqua",user:"link",tag:"warning",community:"danger",role:"lead-light"}[this.kind]||"lead"},icon:function(){return{member:"uil-graduation-cap",group:"uil-users-alt",user:"uil-user",tag:"uil-tag-alt",role:"uil-user",community:"uil-channel"}[this.kind]}}},qUe={class:"l-d-flex l-align-items"};function GUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-chip");return t.openBlock(),t.createBlock(s,{style:{height:"24px"},bold:"",fill:"",color:l.color,icon:l.icon},{default:t.withCtx(()=>[t.createElementVNode("div",qUe,[t.createTextVNode(t.toDisplayString(o.count)+" "+t.toDisplayString(o.name)+" ",1),o.closeable?(t.openBlock(),t.createBlock(i,{key:0,onClick:n[0]||(n[0]=c=>e.$emit("remove")),class:"l-d-flex l-align-items-center ml-1 mr-0",style:{cursor:"pointer"},size:"15"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode(" uis-times-circle ")])),_:1})):t.createCommentVNode("",!0)])]),_:1},8,["color","icon"])}const XUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(KUe,[["render",GUe]])},Symbol.toStringTag,{value:"Module"})),Kdt="",ZUe={tagName:"l-target-input",name:"LTargetInput",props:{topics:{type:Array,required:!0},limit:{type:Number,default:3},editable:{type:Boolean,default:!1}},computed:{topicsToShow(){return this.topics.slice(0,this.limit)},moreTopicsText(){const e=this.topics.length-this.limit>1;return`+ ${this.topics.length-this.limit} destinatário`+(e?"s":"")}}};function JUe(e,n,o,r,a,l){const i=t.resolveComponent("l-target-chip"),s=t.resolveComponent("l-chip");return o.topics&&o.topics.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass("l-target-input"+(o.editable?" editable":""))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.topicsToShow,c=>(t.openBlock(),t.createBlock(i,{kind:c.kind,name:c.name,key:c.id,class:"mr-2 mb-2"},null,8,["kind","name"]))),128)),o.topics.length>this.limit?(t.openBlock(),t.createBlock(s,{key:0,color:"purple",class:"mb-2",fill:"","hide-icon":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.moreTopicsText),1)]),_:1})):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)}const eYe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(ZUe,[["render",JUe],["__scopeId","data-v-1da7433b"]])},Symbol.toStringTag,{value:"Module"}));function So(e){this.content=e}So.prototype={constructor:So,find:function(e){for(var n=0;n<this.content.length;n+=2)if(this.content[n]===e)return n;return-1},get:function(e){var n=this.find(e);return n==-1?void 0:this.content[n+1]},update:function(e,n,o){var r=o&&o!=e?this.remove(o):this,a=r.find(e),l=r.content.slice();return a==-1?l.push(o||e,n):(l[a+1]=n,o&&(l[a]=o)),new So(l)},remove:function(e){var n=this.find(e);if(n==-1)return this;var o=this.content.slice();return o.splice(n,2),new So(o)},addToStart:function(e,n){return new So([e,n].concat(this.remove(e).content))},addToEnd:function(e,n){var o=this.remove(e).content.slice();return o.push(e,n),new So(o)},addBefore:function(e,n,o){var r=this.remove(n),a=r.content.slice(),l=r.find(e);return a.splice(l==-1?a.length:l,0,n,o),new So(a)},forEach:function(e){for(var n=0;n<this.content.length;n+=2)e(this.content[n],this.content[n+1])},prepend:function(e){return e=So.from(e),e.size?new So(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=So.from(e),e.size?new So(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var n=this;e=So.from(e);for(var o=0;o<e.content.length;o+=2)n=n.remove(e.content[o]);return n},toObject:function(){var e={};return this.forEach(function(n,o){e[n]=o}),e},get size(){return this.content.length>>1}},So.from=function(e){if(e instanceof So)return e;var n=[];if(e)for(var o in e)n.push(o,e[o]);return new So(n)};function r$(e,n,o){for(let r=0;;r++){if(r==e.childCount||r==n.childCount)return e.childCount==n.childCount?null:o;let a=e.child(r),l=n.child(r);if(a==l){o+=a.nodeSize;continue}if(!a.sameMarkup(l))return o;if(a.isText&&a.text!=l.text){for(let i=0;a.text[i]==l.text[i];i++)o++;return o}if(a.content.size||l.content.size){let i=r$(a.content,l.content,o+1);if(i!=null)return i}o+=a.nodeSize}}function a$(e,n,o,r){for(let a=e.childCount,l=n.childCount;;){if(a==0||l==0)return a==l?null:{a:o,b:r};let i=e.child(--a),s=n.child(--l),c=i.nodeSize;if(i==s){o-=c,r-=c;continue}if(!i.sameMarkup(s))return{a:o,b:r};if(i.isText&&i.text!=s.text){let d=0,u=Math.min(i.text.length,s.text.length);for(;d<u&&i.text[i.text.length-d-1]==s.text[s.text.length-d-1];)d++,o--,r--;return{a:o,b:r}}if(i.content.size||s.content.size){let d=a$(i.content,s.content,o-1,r-1);if(d)return d}o-=c,r-=c}}class Ye{constructor(n,o){if(this.content=n,this.size=o||0,o==null)for(let r=0;r<n.length;r++)this.size+=n[r].nodeSize}nodesBetween(n,o,r,a=0,l){for(let i=0,s=0;s<o;i++){let c=this.content[i],d=s+c.nodeSize;if(d>n&&r(c,a+s,l||null,i)!==!1&&c.content.size){let u=s+1;c.nodesBetween(Math.max(0,n-u),Math.min(c.content.size,o-u),r,a+u)}s=d}}descendants(n){this.nodesBetween(0,this.size,n)}textBetween(n,o,r,a){let l="",i=!0;return this.nodesBetween(n,o,(s,c)=>{let d=s.isText?s.text.slice(Math.max(n,c)-c,o-c):s.isLeaf?a?typeof a=="function"?a(s):a:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&d||s.isTextblock)&&r&&(i?i=!1:l+=r),l+=d},0),l}append(n){if(!n.size)return this;if(!this.size)return n;let o=this.lastChild,r=n.firstChild,a=this.content.slice(),l=0;for(o.isText&&o.sameMarkup(r)&&(a[a.length-1]=o.withText(o.text+r.text),l=1);l<n.content.length;l++)a.push(n.content[l]);return new Ye(a,this.size+n.size)}cut(n,o=this.size){if(n==0&&o==this.size)return this;let r=[],a=0;if(o>n)for(let l=0,i=0;i<o;l++){let s=this.content[l],c=i+s.nodeSize;c>n&&((i<n||c>o)&&(s.isText?s=s.cut(Math.max(0,n-i),Math.min(s.text.length,o-i)):s=s.cut(Math.max(0,n-i-1),Math.min(s.content.size,o-i-1))),r.push(s),a+=s.nodeSize),i=c}return new Ye(r,a)}cutByIndex(n,o){return n==o?Ye.empty:n==0&&o==this.content.length?this:new Ye(this.content.slice(n,o))}replaceChild(n,o){let r=this.content[n];if(r==o)return this;let a=this.content.slice(),l=this.size+o.nodeSize-r.nodeSize;return a[n]=o,new Ye(a,l)}addToStart(n){return new Ye([n].concat(this.content),this.size+n.nodeSize)}addToEnd(n){return new Ye(this.content.concat(n),this.size+n.nodeSize)}eq(n){if(this.content.length!=n.content.length)return!1;for(let o=0;o<this.content.length;o++)if(!this.content[o].eq(n.content[o]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(n){let o=this.content[n];if(!o)throw new RangeError("Index "+n+" out of range for "+this);return o}maybeChild(n){return this.content[n]||null}forEach(n){for(let o=0,r=0;o<this.content.length;o++){let a=this.content[o];n(a,r,o),r+=a.nodeSize}}findDiffStart(n,o=0){return r$(this,n,o)}findDiffEnd(n,o=this.size,r=n.size){return a$(this,n,o,r)}findIndex(n,o=-1){if(n==0)return _1(0,n);if(n==this.size)return _1(this.content.length,n);if(n>this.size||n<0)throw new RangeError(`Position ${n} outside of fragment (${this})`);for(let r=0,a=0;;r++){let l=this.child(r),i=a+l.nodeSize;if(i>=n)return i==n||o>0?_1(r+1,i):_1(r,a);a=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(n=>n.toJSON()):null}static fromJSON(n,o){if(!o)return Ye.empty;if(!Array.isArray(o))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ye(o.map(n.nodeFromJSON))}static fromArray(n){if(!n.length)return Ye.empty;let o,r=0;for(let a=0;a<n.length;a++){let l=n[a];r+=l.nodeSize,a&&l.isText&&n[a-1].sameMarkup(l)?(o||(o=n.slice(0,a)),o[o.length-1]=l.withText(o[o.length-1].text+l.text)):o&&o.push(l)}return new Ye(o||n,r)}static from(n){if(!n)return Ye.empty;if(n instanceof Ye)return n;if(Array.isArray(n))return this.fromArray(n);if(n.attrs)return new Ye([n],n.nodeSize);throw new RangeError("Can not convert "+n+" to a Fragment"+(n.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ye.empty=new Ye([],0);const j_={index:0,offset:0};function _1(e,n){return j_.index=e,j_.offset=n,j_}function N1(e,n){if(e===n)return!0;if(!(e&&typeof e=="object")||!(n&&typeof n=="object"))return!1;let o=Array.isArray(e);if(Array.isArray(n)!=o)return!1;if(o){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!N1(e[r],n[r]))return!1}else{for(let r in e)if(!(r in n)||!N1(e[r],n[r]))return!1;for(let r in n)if(!(r in e))return!1}return!0}let mn=class aE{constructor(n,o){this.type=n,this.attrs=o}addToSet(n){let o,r=!1;for(let a=0;a<n.length;a++){let l=n[a];if(this.eq(l))return n;if(this.type.excludes(l.type))o||(o=n.slice(0,a));else{if(l.type.excludes(this.type))return n;!r&&l.type.rank>this.type.rank&&(o||(o=n.slice(0,a)),o.push(this),r=!0),o&&o.push(l)}}return o||(o=n.slice()),r||o.push(this),o}removeFromSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return n.slice(0,o).concat(n.slice(o+1));return n}isInSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return!0;return!1}eq(n){return this==n||this.type==n.type&&N1(this.attrs,n.attrs)}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Mark.fromJSON");let r=n.marks[o.type];if(!r)throw new RangeError(`There is no mark type ${o.type} in this schema`);let a=r.create(o.attrs);return r.checkAttrs(a.attrs),a}static sameSet(n,o){if(n==o)return!0;if(n.length!=o.length)return!1;for(let r=0;r<n.length;r++)if(!n[r].eq(o[r]))return!1;return!0}static setFrom(n){if(!n||Array.isArray(n)&&n.length==0)return aE.none;if(n instanceof aE)return[n];let o=n.slice();return o.sort((r,a)=>r.type.rank-a.type.rank),o}};mn.none=[];class k1 extends Error{}class ct{constructor(n,o,r){this.content=n,this.openStart=o,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(n,o){let r=i$(this.content,n+this.openStart,o);return r&&new ct(r,this.openStart,this.openEnd)}removeBetween(n,o){return new ct(l$(this.content,n+this.openStart,o+this.openStart),this.openStart,this.openEnd)}eq(n){return this.content.eq(n.content)&&this.openStart==n.openStart&&this.openEnd==n.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let n={content:this.content.toJSON()};return this.openStart>0&&(n.openStart=this.openStart),this.openEnd>0&&(n.openEnd=this.openEnd),n}static fromJSON(n,o){if(!o)return ct.empty;let r=o.openStart||0,a=o.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ct(Ye.fromJSON(n,o.content),r,a)}static maxOpen(n,o=!0){let r=0,a=0;for(let l=n.firstChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.firstChild)r++;for(let l=n.lastChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.lastChild)a++;return new ct(n,r,a)}}ct.empty=new ct(Ye.empty,0,0);function l$(e,n,o){let{index:r,offset:a}=e.findIndex(n),l=e.maybeChild(r),{index:i,offset:s}=e.findIndex(o);if(a==n||l.isText){if(s!=o&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(o))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,l.copy(l$(l.content,n-a-1,o-a-1)))}function i$(e,n,o,r){let{index:a,offset:l}=e.findIndex(n),i=e.maybeChild(a);if(l==n||i.isText)return r&&!r.canReplace(a,a,o)?null:e.cut(0,n).append(o).append(e.cut(n));let s=i$(i.content,n-l-1,o);return s&&e.replaceChild(a,i.copy(s))}function tYe(e,n,o){if(o.openStart>e.depth)throw new k1("Inserted content deeper than insertion position");if(e.depth-o.openStart!=n.depth-o.openEnd)throw new k1("Inconsistent open depths");return s$(e,n,o,0)}function s$(e,n,o,r){let a=e.index(r),l=e.node(r);if(a==n.index(r)&&r<e.depth-o.openStart){let i=s$(e,n,o,r+1);return l.copy(l.content.replaceChild(a,i))}else if(o.content.size)if(!o.openStart&&!o.openEnd&&e.depth==r&&n.depth==r){let i=e.parent,s=i.content;return Uc(i,s.cut(0,e.parentOffset).append(o.content).append(s.cut(n.parentOffset)))}else{let{start:i,end:s}=nYe(o,e);return Uc(l,d$(e,i,s,n,r))}else return Uc(l,E1(e,n,r))}function c$(e,n){if(!n.type.compatibleContent(e.type))throw new k1("Cannot join "+n.type.name+" onto "+e.type.name)}function P_(e,n,o){let r=e.node(o);return c$(r,n.node(o)),r}function Hc(e,n){let o=n.length-1;o>=0&&e.isText&&e.sameMarkup(n[o])?n[o]=e.withText(n[o].text+e.text):n.push(e)}function fh(e,n,o,r){let a=(n||e).node(o),l=0,i=n?n.index(o):a.childCount;e&&(l=e.index(o),e.depth>o?l++:e.textOffset&&(Hc(e.nodeAfter,r),l++));for(let s=l;s<i;s++)Hc(a.child(s),r);n&&n.depth==o&&n.textOffset&&Hc(n.nodeBefore,r)}function Uc(e,n){return e.type.checkContent(n),e.copy(n)}function d$(e,n,o,r,a){let l=e.depth>a&&P_(e,n,a+1),i=r.depth>a&&P_(o,r,a+1),s=[];return fh(null,e,a,s),l&&i&&n.index(a)==o.index(a)?(c$(l,i),Hc(Uc(l,d$(e,n,o,r,a+1)),s)):(l&&Hc(Uc(l,E1(e,n,a+1)),s),fh(n,o,a,s),i&&Hc(Uc(i,E1(o,r,a+1)),s)),fh(r,null,a,s),new Ye(s)}function E1(e,n,o){let r=[];if(fh(null,e,o,r),e.depth>o){let a=P_(e,n,o+1);Hc(Uc(a,E1(e,n,o+1)),r)}return fh(n,null,o,r),new Ye(r)}function nYe(e,n){let o=n.depth-e.openStart,a=n.node(o).copy(e.content);for(let l=o-1;l>=0;l--)a=n.node(l).copy(Ye.from(a));return{start:a.resolveNoCache(e.openStart+o),end:a.resolveNoCache(a.content.size-e.openEnd-o)}}class ph{constructor(n,o,r){this.pos=n,this.path=o,this.parentOffset=r,this.depth=o.length/3-1}resolveDepth(n){return n==null?this.depth:n<0?this.depth+n:n}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(n){return this.path[this.resolveDepth(n)*3]}index(n){return this.path[this.resolveDepth(n)*3+1]}indexAfter(n){return n=this.resolveDepth(n),this.index(n)+(n==this.depth&&!this.textOffset?0:1)}start(n){return n=this.resolveDepth(n),n==0?0:this.path[n*3-1]+1}end(n){return n=this.resolveDepth(n),this.start(n)+this.node(n).content.size}before(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position before the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]}after(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position after the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]+this.path[n*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let n=this.parent,o=this.index(this.depth);if(o==n.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=n.child(o);return r?n.child(o).cut(r):a}get nodeBefore(){let n=this.index(this.depth),o=this.pos-this.path[this.path.length-1];return o?this.parent.child(n).cut(0,o):n==0?null:this.parent.child(n-1)}posAtIndex(n,o){o=this.resolveDepth(o);let r=this.path[o*3],a=o==0?0:this.path[o*3-1]+1;for(let l=0;l<n;l++)a+=r.child(l).nodeSize;return a}marks(){let n=this.parent,o=this.index();if(n.content.size==0)return mn.none;if(this.textOffset)return n.child(o).marks;let r=n.maybeChild(o-1),a=n.maybeChild(o);if(!r){let s=r;r=a,a=s}let l=r.marks;for(var i=0;i<l.length;i++)l[i].type.spec.inclusive===!1&&(!a||!l[i].isInSet(a.marks))&&(l=l[i--].removeFromSet(l));return l}marksAcross(n){let o=this.parent.maybeChild(this.index());if(!o||!o.isInline)return null;let r=o.marks,a=n.parent.maybeChild(n.index());for(var l=0;l<r.length;l++)r[l].type.spec.inclusive===!1&&(!a||!r[l].isInSet(a.marks))&&(r=r[l--].removeFromSet(r));return r}sharedDepth(n){for(let o=this.depth;o>0;o--)if(this.start(o)<=n&&this.end(o)>=n)return o;return 0}blockRange(n=this,o){if(n.pos<this.pos)return n.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==n.pos?1:0);r>=0;r--)if(n.pos<=this.end(r)&&(!o||o(this.node(r))))return new x1(this,n,r);return null}sameParent(n){return this.pos-this.parentOffset==n.pos-n.parentOffset}max(n){return n.pos>this.pos?n:this}min(n){return n.pos<this.pos?n:this}toString(){let n="";for(let o=1;o<=this.depth;o++)n+=(n?"/":"")+this.node(o).type.name+"_"+this.index(o-1);return n+":"+this.parentOffset}static resolve(n,o){if(!(o>=0&&o<=n.content.size))throw new RangeError("Position "+o+" out of range");let r=[],a=0,l=o;for(let i=n;;){let{index:s,offset:c}=i.content.findIndex(l),d=l-c;if(r.push(i,s,a+c),!d||(i=i.child(s),i.isText))break;l=d-1,a+=c+1}return new ph(o,r,l)}static resolveCached(n,o){let r=u$.get(n);if(r)for(let l=0;l<r.elts.length;l++){let i=r.elts[l];if(i.pos==o)return i}else u$.set(n,r=new oYe);let a=r.elts[r.i]=ph.resolve(n,o);return r.i=(r.i+1)%rYe,a}}class oYe{constructor(){this.elts=[],this.i=0}}const rYe=12,u$=new WeakMap;class x1{constructor(n,o,r){this.$from=n,this.$to=o,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const aYe=Object.create(null);let Yc=class lE{constructor(n,o,r,a=mn.none){this.type=n,this.attrs=o,this.marks=a,this.content=r||Ye.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(n){return this.content.child(n)}maybeChild(n){return this.content.maybeChild(n)}forEach(n){this.content.forEach(n)}nodesBetween(n,o,r,a=0){this.content.nodesBetween(n,o,r,a,this)}descendants(n){this.nodesBetween(0,this.content.size,n)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(n,o,r,a){return this.content.textBetween(n,o,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(n){return this==n||this.sameMarkup(n)&&this.content.eq(n.content)}sameMarkup(n){return this.hasMarkup(n.type,n.attrs,n.marks)}hasMarkup(n,o,r){return this.type==n&&N1(this.attrs,o||n.defaultAttrs||aYe)&&mn.sameSet(this.marks,r||mn.none)}copy(n=null){return n==this.content?this:new lE(this.type,this.attrs,n,this.marks)}mark(n){return n==this.marks?this:new lE(this.type,this.attrs,this.content,n)}cut(n,o=this.content.size){return n==0&&o==this.content.size?this:this.copy(this.content.cut(n,o))}slice(n,o=this.content.size,r=!1){if(n==o)return ct.empty;let a=this.resolve(n),l=this.resolve(o),i=r?0:a.sharedDepth(o),s=a.start(i),d=a.node(i).content.cut(a.pos-s,l.pos-s);return new ct(d,a.depth-i,l.depth-i)}replace(n,o,r){return tYe(this.resolve(n),this.resolve(o),r)}nodeAt(n){for(let o=this;;){let{index:r,offset:a}=o.content.findIndex(n);if(o=o.maybeChild(r),!o)return null;if(a==n||o.isText)return o;n-=a+1}}childAfter(n){let{index:o,offset:r}=this.content.findIndex(n);return{node:this.content.maybeChild(o),index:o,offset:r}}childBefore(n){if(n==0)return{node:null,index:0,offset:0};let{index:o,offset:r}=this.content.findIndex(n);if(r<n)return{node:this.content.child(o),index:o,offset:r};let a=this.content.child(o-1);return{node:a,index:o-1,offset:r-a.nodeSize}}resolve(n){return ph.resolveCached(this,n)}resolveNoCache(n){return ph.resolve(this,n)}rangeHasMark(n,o,r){let a=!1;return o>n&&this.nodesBetween(n,o,l=>(r.isInSet(l.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let n=this.type.name;return this.content.size&&(n+="("+this.content.toStringInner()+")"),f$(this.marks,n)}contentMatchAt(n){let o=this.type.contentMatch.matchFragment(this.content,0,n);if(!o)throw new Error("Called contentMatchAt on a node with invalid content");return o}canReplace(n,o,r=Ye.empty,a=0,l=r.childCount){let i=this.contentMatchAt(n).matchFragment(r,a,l),s=i&&i.matchFragment(this.content,o);if(!s||!s.validEnd)return!1;for(let c=a;c<l;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(n,o,r,a){if(a&&!this.type.allowsMarks(a))return!1;let l=this.contentMatchAt(n).matchType(r),i=l&&l.matchFragment(this.content,o);return i?i.validEnd:!1}canAppend(n){return n.content.size?this.canReplace(this.childCount,this.childCount,n.content):this.type.compatibleContent(n.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let n=mn.none;for(let o=0;o<this.marks.length;o++){let r=this.marks[o];r.type.checkAttrs(r.attrs),n=r.addToSet(n)}if(!mn.sameSet(n,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(o=>o.type.name)}`);this.content.forEach(o=>o.check())}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return this.content.size&&(n.content=this.content.toJSON()),this.marks.length&&(n.marks=this.marks.map(o=>o.toJSON())),n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Node.fromJSON");let r;if(o.marks){if(!Array.isArray(o.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=o.marks.map(n.markFromJSON)}if(o.type=="text"){if(typeof o.text!="string")throw new RangeError("Invalid text node in JSON");return n.text(o.text,r)}let a=Ye.fromJSON(n,o.content),l=n.nodeType(o.type).create(o.attrs,a,r);return l.type.checkAttrs(l.attrs),l}};Yc.prototype.text=void 0;class T1 extends Yc{constructor(n,o,r,a){if(super(n,o,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):f$(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(n,o){return this.text.slice(n,o)}get nodeSize(){return this.text.length}mark(n){return n==this.marks?this:new T1(this.type,this.attrs,this.text,n)}withText(n){return n==this.text?this:new T1(this.type,this.attrs,n,this.marks)}cut(n=0,o=this.text.length){return n==0&&o==this.text.length?this:this.withText(this.text.slice(n,o))}eq(n){return this.sameMarkup(n)&&this.text==n.text}toJSON(){let n=super.toJSON();return n.text=this.text,n}}function f$(e,n){for(let o=e.length-1;o>=0;o--)n=e[o].type.name+"("+n+")";return n}class Wc{constructor(n){this.validEnd=n,this.next=[],this.wrapCache=[]}static parse(n,o){let r=new lYe(n,o);if(r.next==null)return Wc.empty;let a=p$(r);r.next&&r.err("Unexpected trailing text");let l=pYe(fYe(a));return hYe(l,r),l}matchType(n){for(let o=0;o<this.next.length;o++)if(this.next[o].type==n)return this.next[o].next;return null}matchFragment(n,o=0,r=n.childCount){let a=this;for(let l=o;a&&l<r;l++)a=a.matchType(n.child(l).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let n=0;n<this.next.length;n++){let{type:o}=this.next[n];if(!(o.isText||o.hasRequiredAttrs()))return o}return null}compatible(n){for(let o=0;o<this.next.length;o++)for(let r=0;r<n.next.length;r++)if(this.next[o].type==n.next[r].type)return!0;return!1}fillBefore(n,o=!1,r=0){let a=[this];function l(i,s){let c=i.matchFragment(n,r);if(c&&(!o||c.validEnd))return Ye.from(s.map(d=>d.createAndFill()));for(let d=0;d<i.next.length;d++){let{type:u,next:f}=i.next[d];if(!(u.isText||u.hasRequiredAttrs())&&a.indexOf(f)==-1){a.push(f);let p=l(f,s.concat(u));if(p)return p}}return null}return l(this,[])}findWrapping(n){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==n)return this.wrapCache[r+1];let o=this.computeWrapping(n);return this.wrapCache.push(n,o),o}computeWrapping(n){let o=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),l=a.match;if(l.matchType(n)){let i=[];for(let s=a;s.type;s=s.via)i.push(s.type);return i.reverse()}for(let i=0;i<l.next.length;i++){let{type:s,next:c}=l.next[i];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in o)&&(!a.type||c.validEnd)&&(r.push({match:s.contentMatch,type:s,via:a}),o[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(n){if(n>=this.next.length)throw new RangeError(`There's no ${n}th edge in this content match`);return this.next[n]}toString(){let n=[];function o(r){n.push(r);for(let a=0;a<r.next.length;a++)n.indexOf(r.next[a].next)==-1&&o(r.next[a].next)}return o(this),n.map((r,a)=>{let l=a+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)l+=(i?", ":"")+r.next[i].type.name+"->"+n.indexOf(r.next[i].next);return l}).join(`
|
|
118
118
|
`)}}Wc.empty=new Wc(!0);class lYe{constructor(n,o){this.string=n,this.nodeTypes=o,this.inline=null,this.pos=0,this.tokens=n.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(n){return this.next==n&&(this.pos++||!0)}err(n){throw new SyntaxError(n+" (in content expression '"+this.string+"')")}}function p$(e){let n=[];do n.push(iYe(e));while(e.eat("|"));return n.length==1?n[0]:{type:"choice",exprs:n}}function iYe(e){let n=[];do n.push(sYe(e));while(e.next&&e.next!=")"&&e.next!="|");return n.length==1?n[0]:{type:"seq",exprs:n}}function sYe(e){let n=uYe(e);for(;;)if(e.eat("+"))n={type:"plus",expr:n};else if(e.eat("*"))n={type:"star",expr:n};else if(e.eat("?"))n={type:"opt",expr:n};else if(e.eat("{"))n=cYe(e,n);else break;return n}function h$(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let n=Number(e.next);return e.pos++,n}function cYe(e,n){let o=h$(e),r=o;return e.eat(",")&&(e.next!="}"?r=h$(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:o,max:r,expr:n}}function dYe(e,n){let o=e.nodeTypes,r=o[n];if(r)return[r];let a=[];for(let l in o){let i=o[l];i.isInGroup(n)&&a.push(i)}return a.length==0&&e.err("No node type or group '"+n+"' found"),a}function uYe(e){if(e.eat("(")){let n=p$(e);return e.eat(")")||e.err("Missing closing paren"),n}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let n=dYe(e,e.next).map(o=>(e.inline==null?e.inline=o.isInline:e.inline!=o.isInline&&e.err("Mixing inline and block content"),{type:"name",value:o}));return e.pos++,n.length==1?n[0]:{type:"choice",exprs:n}}}function fYe(e){let n=[[]];return a(l(e,0),o()),n;function o(){return n.push([])-1}function r(i,s,c){let d={term:c,to:s};return n[i].push(d),d}function a(i,s){i.forEach(c=>c.to=s)}function l(i,s){if(i.type=="choice")return i.exprs.reduce((c,d)=>c.concat(l(d,s)),[]);if(i.type=="seq")for(let c=0;;c++){let d=l(i.exprs[c],s);if(c==i.exprs.length-1)return d;a(d,s=o())}else if(i.type=="star"){let c=o();return r(s,c),a(l(i.expr,c),c),[r(c)]}else if(i.type=="plus"){let c=o();return a(l(i.expr,s),c),a(l(i.expr,c),c),[r(c)]}else{if(i.type=="opt")return[r(s)].concat(l(i.expr,s));if(i.type=="range"){let c=s;for(let d=0;d<i.min;d++){let u=o();a(l(i.expr,c),u),c=u}if(i.max==-1)a(l(i.expr,c),c);else for(let d=i.min;d<i.max;d++){let u=o();r(c,u),a(l(i.expr,c),u),c=u}return[r(c)]}else{if(i.type=="name")return[r(s,void 0,i.value)];throw new Error("Unknown expr type")}}}}function m$(e,n){return n-e}function g$(e,n){let o=[];return r(n),o.sort(m$);function r(a){let l=e[a];if(l.length==1&&!l[0].term)return r(l[0].to);o.push(a);for(let i=0;i<l.length;i++){let{term:s,to:c}=l[i];!s&&o.indexOf(c)==-1&&r(c)}}}function pYe(e){let n=Object.create(null);return o(g$(e,0));function o(r){let a=[];r.forEach(i=>{e[i].forEach(({term:s,to:c})=>{if(!s)return;let d;for(let u=0;u<a.length;u++)a[u][0]==s&&(d=a[u][1]);g$(e,c).forEach(u=>{d||a.push([s,d=[]]),d.indexOf(u)==-1&&d.push(u)})})});let l=n[r.join(",")]=new Wc(r.indexOf(e.length-1)>-1);for(let i=0;i<a.length;i++){let s=a[i][1].sort(m$);l.next.push({type:a[i][0],next:n[s.join(",")]||o(s)})}return l}}function hYe(e,n){for(let o=0,r=[e];o<r.length;o++){let a=r[o],l=!a.validEnd,i=[];for(let s=0;s<a.next.length;s++){let{type:c,next:d}=a.next[s];i.push(c.name),l&&!(c.isText||c.hasRequiredAttrs())&&(l=!1),r.indexOf(d)==-1&&r.push(d)}l&&n.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function y$(e){let n=Object.create(null);for(let o in e){let r=e[o];if(!r.hasDefault)return null;n[o]=r.default}return n}function b$(e,n){let o=Object.create(null);for(let r in e){let a=n&&n[r];if(a===void 0){let l=e[r];if(l.hasDefault)a=l.default;else throw new RangeError("No value supplied for attribute "+r)}o[r]=a}return o}function M$(e,n,o,r){for(let a in n)if(!(a in e))throw new RangeError(`Unsupported attribute ${a} for ${o} of type ${a}`);for(let a in e){let l=e[a];l.validate&&l.validate(n[a])}}function w$(e,n){let o=Object.create(null);if(n)for(let r in n)o[r]=new gYe(e,r,n[r]);return o}let C$=class iU{constructor(n,o,r){this.name=n,this.schema=o,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=w$(n,r.attrs),this.defaultAttrs=y$(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||n=="text"),this.isText=n=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Wc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(n){return this.groups.indexOf(n)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let n in this.attrs)if(this.attrs[n].isRequired)return!0;return!1}compatibleContent(n){return this==n||this.contentMatch.compatible(n.contentMatch)}computeAttrs(n){return!n&&this.defaultAttrs?this.defaultAttrs:b$(this.attrs,n)}create(n=null,o,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Yc(this,this.computeAttrs(n),Ye.from(o),mn.setFrom(r))}createChecked(n=null,o,r){return o=Ye.from(o),this.checkContent(o),new Yc(this,this.computeAttrs(n),o,mn.setFrom(r))}createAndFill(n=null,o,r){if(n=this.computeAttrs(n),o=Ye.from(o),o.size){let i=this.contentMatch.fillBefore(o);if(!i)return null;o=i.append(o)}let a=this.contentMatch.matchFragment(o),l=a&&a.fillBefore(Ye.empty,!0);return l?new Yc(this,n,o.append(l),mn.setFrom(r)):null}validContent(n){let o=this.contentMatch.matchFragment(n);if(!o||!o.validEnd)return!1;for(let r=0;r<n.childCount;r++)if(!this.allowsMarks(n.child(r).marks))return!1;return!0}checkContent(n){if(!this.validContent(n))throw new RangeError(`Invalid content for node ${this.name}: ${n.toString().slice(0,50)}`)}checkAttrs(n){M$(this.attrs,n,"node",this.name)}allowsMarkType(n){return this.markSet==null||this.markSet.indexOf(n)>-1}allowsMarks(n){if(this.markSet==null)return!0;for(let o=0;o<n.length;o++)if(!this.allowsMarkType(n[o].type))return!1;return!0}allowedMarks(n){if(this.markSet==null)return n;let o;for(let r=0;r<n.length;r++)this.allowsMarkType(n[r].type)?o&&o.push(n[r]):o||(o=n.slice(0,r));return o?o.length?o:mn.none:n}static compile(n,o){let r=Object.create(null);n.forEach((l,i)=>r[l]=new iU(l,o,i));let a=o.spec.topNode||"doc";if(!r[a])throw new RangeError("Schema is missing its top node type ('"+a+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let l in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function mYe(e,n,o){let r=o.split("|");return a=>{let l=a===null?"null":typeof a;if(r.indexOf(l)<0)throw new RangeError(`Expected value of type ${r} for attribute ${n} on type ${e}, got ${l}`)}}class gYe{constructor(n,o,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?mYe(n,o,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class S1{constructor(n,o,r,a){this.name=n,this.rank=o,this.schema=r,this.spec=a,this.attrs=w$(n,a.attrs),this.excluded=null;let l=y$(this.attrs);this.instance=l?new mn(this,l):null}create(n=null){return!n&&this.instance?this.instance:new mn(this,b$(this.attrs,n))}static compile(n,o){let r=Object.create(null),a=0;return n.forEach((l,i)=>r[l]=new S1(l,a++,o,i)),r}removeFromSet(n){for(var o=0;o<n.length;o++)n[o].type==this&&(n=n.slice(0,o).concat(n.slice(o+1)),o--);return n}isInSet(n){for(let o=0;o<n.length;o++)if(n[o].type==this)return n[o]}checkAttrs(n){M$(this.attrs,n,"mark",this.name)}excludes(n){return this.excluded.indexOf(n)>-1}}class _${constructor(n){this.linebreakReplacement=null,this.cached=Object.create(null);let o=this.spec={};for(let a in n)o[a]=n[a];o.nodes=So.from(n.nodes),o.marks=So.from(n.marks||{}),this.nodes=C$.compile(this.spec.nodes,this),this.marks=S1.compile(this.spec.marks,this);let r=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw new RangeError(a+" can not be both a node and a mark");let l=this.nodes[a],i=l.spec.content||"",s=l.spec.marks;if(l.contentMatch=r[i]||(r[i]=Wc.parse(i,this.nodes)),l.inlineContent=l.contentMatch.inlineContent,l.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!l.isInline||!l.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=l}l.markSet=s=="_"?null:s?N$(this,s.split(" ")):s==""||!l.inlineContent?[]:null}for(let a in this.marks){let l=this.marks[a],i=l.spec.excludes;l.excluded=i==null?[l]:i==""?[]:N$(this,i.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(n,o=null,r,a){if(typeof n=="string")n=this.nodeType(n);else if(n instanceof C$){if(n.schema!=this)throw new RangeError("Node type from different schema used ("+n.name+")")}else throw new RangeError("Invalid node type: "+n);return n.createChecked(o,r,a)}text(n,o){let r=this.nodes.text;return new T1(r,r.defaultAttrs,n,mn.setFrom(o))}mark(n,o){return typeof n=="string"&&(n=this.marks[n]),n.create(o)}nodeFromJSON(n){return Yc.fromJSON(this,n)}markFromJSON(n){return mn.fromJSON(this,n)}nodeType(n){let o=this.nodes[n];if(!o)throw new RangeError("Unknown node type: "+n);return o}}function N$(e,n){let o=[];for(let r=0;r<n.length;r++){let a=n[r],l=e.marks[a],i=l;if(l)o.push(l);else for(let s in e.marks){let c=e.marks[s];(a=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(a)>-1)&&o.push(i=c)}if(!i)throw new SyntaxError("Unknown mark type: '"+n[r]+"'")}return o}function yYe(e){return e.tag!=null}function bYe(e){return e.style!=null}class _s{constructor(n,o){this.schema=n,this.rules=o,this.tags=[],this.styles=[];let r=this.matchedStyles=[];o.forEach(a=>{if(yYe(a))this.tags.push(a);else if(bYe(a)){let l=/[^=]*/.exec(a.style)[0];r.indexOf(l)<0&&r.push(l),this.styles.push(a)}}),this.normalizeLists=!this.tags.some(a=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let l=n.nodes[a.node];return l.contentMatch.matchType(l)})}parse(n,o={}){let r=new T$(this,o,!1);return r.addAll(n,mn.none,o.from,o.to),r.finish()}parseSlice(n,o={}){let r=new T$(this,o,!0);return r.addAll(n,mn.none,o.from,o.to),ct.maxOpen(r.finish())}matchTag(n,o,r){for(let a=r?this.tags.indexOf(r)+1:0;a<this.tags.length;a++){let l=this.tags[a];if(CYe(n,l.tag)&&(l.namespace===void 0||n.namespaceURI==l.namespace)&&(!l.context||o.matchesContext(l.context))){if(l.getAttrs){let i=l.getAttrs(n);if(i===!1)continue;l.attrs=i||void 0}return l}}}matchStyle(n,o,r,a){for(let l=a?this.styles.indexOf(a)+1:0;l<this.styles.length;l++){let i=this.styles[l],s=i.style;if(!(s.indexOf(n)!=0||i.context&&!r.matchesContext(i.context)||s.length>n.length&&(s.charCodeAt(n.length)!=61||s.slice(n.length+1)!=o))){if(i.getAttrs){let c=i.getAttrs(o);if(c===!1)continue;i.attrs=c||void 0}return i}}}static schemaRules(n){let o=[];function r(a){let l=a.priority==null?50:a.priority,i=0;for(;i<o.length;i++){let s=o[i];if((s.priority==null?50:s.priority)<l)break}o.splice(i,0,a)}for(let a in n.marks){let l=n.marks[a].spec.parseDOM;l&&l.forEach(i=>{r(i=S$(i)),i.mark||i.ignore||i.clearMark||(i.mark=a)})}for(let a in n.nodes){let l=n.nodes[a].spec.parseDOM;l&&l.forEach(i=>{r(i=S$(i)),i.node||i.ignore||i.mark||(i.node=a)})}return o}static fromSchema(n){return n.cached.domParser||(n.cached.domParser=new _s(n,_s.schemaRules(n)))}}const k$={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},MYe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},E$={ol:!0,ul:!0},D1=1,v1=2,hh=4;function x$(e,n,o){return n!=null?(n?D1:0)|(n==="full"?v1:0):e&&e.whitespace=="pre"?D1|v1:o&~hh}class I1{constructor(n,o,r,a,l,i){this.type=n,this.attrs=o,this.marks=r,this.solid=a,this.options=i,this.content=[],this.activeMarks=mn.none,this.match=l||(i&hh?null:n.contentMatch)}findWrapping(n){if(!this.match){if(!this.type)return[];let o=this.type.contentMatch.fillBefore(Ye.from(n));if(o)this.match=this.type.contentMatch.matchFragment(o);else{let r=this.type.contentMatch,a;return(a=r.findWrapping(n.type))?(this.match=r,a):null}}return this.match.findWrapping(n.type)}finish(n){if(!(this.options&D1)){let r=this.content[this.content.length-1],a;if(r&&r.isText&&(a=/[ \t\r\n\u000c]+$/.exec(r.text))){let l=r;r.text.length==a[0].length?this.content.pop():this.content[this.content.length-1]=l.withText(l.text.slice(0,l.text.length-a[0].length))}}let o=Ye.from(this.content);return!n&&this.match&&(o=o.append(this.match.fillBefore(Ye.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}inlineContext(n){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:n.parentNode&&!k$.hasOwnProperty(n.parentNode.nodeName.toLowerCase())}}class T${constructor(n,o,r){this.parser=n,this.options=o,this.isOpen=r,this.open=0;let a=o.topNode,l,i=x$(null,o.preserveWhitespace,0)|(r?hh:0);a?l=new I1(a.type,a.attrs,mn.none,!0,o.topMatch||a.type.contentMatch,i):r?l=new I1(null,null,mn.none,!0,null,i):l=new I1(n.schema.topNodeType,null,mn.none,!0,null,i),this.nodes=[l],this.find=o.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(n,o){n.nodeType==3?this.addTextNode(n,o):n.nodeType==1&&this.addElement(n,o)}addTextNode(n,o){let r=n.nodeValue,a=this.top;if(a.options&v1||a.inlineContext(n)||/[^ \t\r\n\u000c]/.test(r)){if(a.options&D1)a.options&v1?r=r.replace(/\r\n?/g,`
|
|
119
119
|
`):r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=a.content[a.content.length-1],i=n.previousSibling;(!l||i&&i.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),o),this.findInText(n)}else this.findInside(n)}addElement(n,o,r){let a=n.nodeName.toLowerCase(),l;E$.hasOwnProperty(a)&&this.parser.normalizeLists&&wYe(n);let i=this.options.ruleFromNode&&this.options.ruleFromNode(n)||(l=this.parser.matchTag(n,this,r));if(i?i.ignore:MYe.hasOwnProperty(a))this.findInside(n),this.ignoreFallback(n,o);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(n=i.skip);let s,c=this.top,d=this.needsBlock;if(k$.hasOwnProperty(a))c.content.length&&c.content[0].isInline&&this.open&&(this.open--,c=this.top),s=!0,c.type||(this.needsBlock=!0);else if(!n.firstChild){this.leafFallback(n,o);return}let u=i&&i.skip?o:this.readStyles(n,o);u&&this.addAll(n,u),s&&this.sync(c),this.needsBlock=d}else{let s=this.readStyles(n,o);s&&this.addElementByRule(n,i,s,i.consuming===!1?l:void 0)}}leafFallback(n,o){n.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(n.ownerDocument.createTextNode(`
|
|
120
120
|
`),o)}ignoreFallback(n,o){n.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),o)}readStyles(n,o){let r=n.style;if(r&&r.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let l=this.parser.matchedStyles[a],i=r.getPropertyValue(l);if(i)for(let s=void 0;;){let c=this.parser.matchStyle(l,i,this,s);if(!c)break;if(c.ignore)return null;if(c.clearMark?o=o.filter(d=>!c.clearMark(d)):o=o.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)s=c;else break}}return o}addElementByRule(n,o,r,a){let l,i;if(o.node)if(i=this.parser.schema.nodes[o.node],i.isLeaf)this.insertNode(i.create(o.attrs),r)||this.leafFallback(n,r);else{let c=this.enter(i,o.attrs||null,r,o.preserveWhitespace);c&&(l=!0,r=c)}else{let c=this.parser.schema.marks[o.mark];r=r.concat(c.create(o.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(n);else if(a)this.addElement(n,r,a);else if(o.getContent)this.findInside(n),o.getContent(n,this.parser.schema).forEach(c=>this.insertNode(c,r));else{let c=n;typeof o.contentElement=="string"?c=n.querySelector(o.contentElement):typeof o.contentElement=="function"?c=o.contentElement(n):o.contentElement&&(c=o.contentElement),this.findAround(n,c,!0),this.addAll(c,r),this.findAround(n,c,!1)}l&&this.sync(s)&&this.open--}addAll(n,o,r,a){let l=r||0;for(let i=r?n.childNodes[r]:n.firstChild,s=a==null?null:n.childNodes[a];i!=s;i=i.nextSibling,++l)this.findAtPoint(n,l),this.addDOM(i,o);this.findAtPoint(n,l)}findPlace(n,o){let r,a;for(let l=this.open;l>=0;l--){let i=this.nodes[l],s=i.findWrapping(n);if(s&&(!r||r.length>s.length)&&(r=s,a=i,!s.length)||i.solid)break}if(!r)return null;this.sync(a);for(let l=0;l<r.length;l++)o=this.enterInner(r[l],null,o,!1);return o}insertNode(n,o){if(n.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(o=this.enterInner(a,null,o))}let r=this.findPlace(n,o);if(r){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(n.type));let l=mn.none;for(let i of r.concat(n.marks))(a.type?a.type.allowsMarkType(i.type):D$(i.type,n.type))&&(l=i.addToSet(l));return a.content.push(n.mark(l)),!0}return!1}enter(n,o,r,a){let l=this.findPlace(n.create(o),r);return l&&(l=this.enterInner(n,o,r,!0,a)),l}enterInner(n,o,r,a=!1,l){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(n);let s=x$(n,l,i.options);i.options&hh&&i.content.length==0&&(s|=hh);let c=mn.none;return r=r.filter(d=>(i.type?i.type.allowsMarkType(d.type):D$(d.type,n))?(c=d.addToSet(c),!1):!0),this.nodes.push(new I1(n,o,c,a,null,s)),this.open++,r}closeExtra(n=!1){let o=this.nodes.length-1;if(o>this.open){for(;o>this.open;o--)this.nodes[o-1].content.push(this.nodes[o].finish(n));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(n){for(let o=this.open;o>=0;o--)if(this.nodes[o]==n)return this.open=o,!0;return!1}get currentPos(){this.closeExtra();let n=0;for(let o=this.open;o>=0;o--){let r=this.nodes[o].content;for(let a=r.length-1;a>=0;a--)n+=r[a].nodeSize;o&&n++}return n}findAtPoint(n,o){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==n&&this.find[r].offset==o&&(this.find[r].pos=this.currentPos)}findInside(n){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&n.nodeType==1&&n.contains(this.find[o].node)&&(this.find[o].pos=this.currentPos)}findAround(n,o,r){if(n!=o&&this.find)for(let a=0;a<this.find.length;a++)this.find[a].pos==null&&n.nodeType==1&&n.contains(this.find[a].node)&&o.compareDocumentPosition(this.find[a].node)&(r?2:4)&&(this.find[a].pos=this.currentPos)}findInText(n){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].node==n&&(this.find[o].pos=this.currentPos-(n.nodeValue.length-this.find[o].offset))}matchesContext(n){if(n.indexOf("|")>-1)return n.split(/\s*\|\s*/).some(this.matchesContext,this);let o=n.split("/"),r=this.options.context,a=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),l=-(r?r.depth+1:0)+(a?0:1),i=(s,c)=>{for(;s>=0;s--){let d=o[s];if(d==""){if(s==o.length-1||s==0)continue;for(;c>=l;c--)if(i(s-1,c))return!0;return!1}else{let u=c>0||c==0&&a?this.nodes[c].type:r&&c>=l?r.node(c-l).type:null;if(!u||u.name!=d&&!u.isInGroup(d))return!1;c--}}return!0};return i(o.length-1,this.open)}textblockFromContext(){let n=this.options.context;if(n)for(let o=n.depth;o>=0;o--){let r=n.node(o).contentMatchAt(n.indexAfter(o)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let o in this.parser.schema.nodes){let r=this.parser.schema.nodes[o];if(r.isTextblock&&r.defaultAttrs)return r}}}function wYe(e){for(let n=e.firstChild,o=null;n;n=n.nextSibling){let r=n.nodeType==1?n.nodeName.toLowerCase():null;r&&E$.hasOwnProperty(r)&&o?(o.appendChild(n),n=o):r=="li"?o=n:r&&(o=null)}}function CYe(e,n){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,n)}function S$(e){let n={};for(let o in e)n[o]=e[o];return n}function D$(e,n){let o=n.schema.nodes;for(let r in o){let a=o[r];if(!a.allowsMarkType(e))continue;let l=[],i=s=>{l.push(s);for(let c=0;c<s.edgeCount;c++){let{type:d,next:u}=s.edge(c);if(d==n||l.indexOf(u)<0&&i(u))return!0}};if(i(a.contentMatch))return!0}}class Qc{constructor(n,o){this.nodes=n,this.marks=o}serializeFragment(n,o={},r){r||(r=R_(o).createDocumentFragment());let a=r,l=[];return n.forEach(i=>{if(l.length||i.marks.length){let s=0,c=0;for(;s<l.length&&c<i.marks.length;){let d=i.marks[c];if(!this.marks[d.type.name]){c++;continue}if(!d.eq(l[s][0])||d.type.spec.spanning===!1)break;s++,c++}for(;s<l.length;)a=l.pop()[1];for(;c<i.marks.length;){let d=i.marks[c++],u=this.serializeMark(d,i.isInline,o);u&&(l.push([d,a]),a.appendChild(u.dom),a=u.contentDOM||u.dom)}}a.appendChild(this.serializeNodeInner(i,o))}),r}serializeNodeInner(n,o){let{dom:r,contentDOM:a}=A1(R_(o),this.nodes[n.type.name](n),null,n.attrs);if(a){if(n.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(n.content,o,a)}return r}serializeNode(n,o={}){let r=this.serializeNodeInner(n,o);for(let a=n.marks.length-1;a>=0;a--){let l=this.serializeMark(n.marks[a],n.isInline,o);l&&((l.contentDOM||l.dom).appendChild(r),r=l.dom)}return r}serializeMark(n,o,r={}){let a=this.marks[n.type.name];return a&&A1(R_(r),a(n,o),null,n.attrs)}static renderSpec(n,o,r=null,a){return A1(n,o,r,a)}static fromSchema(n){return n.cached.domSerializer||(n.cached.domSerializer=new Qc(this.nodesFromSchema(n),this.marksFromSchema(n)))}static nodesFromSchema(n){let o=v$(n.nodes);return o.text||(o.text=r=>r.text),o}static marksFromSchema(n){return v$(n.marks)}}function v$(e){let n={};for(let o in e){let r=e[o].spec.toDOM;r&&(n[o]=r)}return n}function R_(e){return e.document||window.document}const I$=new WeakMap;function _Ye(e){let n=I$.get(e);return n===void 0&&I$.set(e,n=NYe(e)),n}function NYe(e){let n=null;function o(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")n||(n=[]),n.push(r);else for(let a=0;a<r.length;a++)o(r[a]);else for(let a in r)o(r[a])}return o(e),n}function A1(e,n,o,r){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let a=n[0],l;if(typeof a!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(l=_Ye(r))&&l.indexOf(n)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=a.indexOf(" ");i>0&&(o=a.slice(0,i),a=a.slice(i+1));let s,c=o?e.createElementNS(o,a):e.createElement(a),d=n[1],u=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){u=2;for(let f in d)if(d[f]!=null){let p=f.indexOf(" ");p>0?c.setAttributeNS(f.slice(0,p),f.slice(p+1),d[f]):c.setAttribute(f,d[f])}}for(let f=u;f<n.length;f++){let p=n[f];if(p===0){if(f<n.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:m,contentDOM:g}=A1(e,p,o,r);if(c.appendChild(m),g){if(s)throw new RangeError("Multiple content holes");s=g}}}return{dom:c,contentDOM:s}}const A$=65535,O$=Math.pow(2,16);function kYe(e,n){return e+n*O$}function z$(e){return e&A$}function EYe(e){return(e-(e&A$))/O$}const B$=1,L$=2,O1=4,V$=8;class F_{constructor(n,o,r){this.pos=n,this.delInfo=o,this.recover=r}get deleted(){return(this.delInfo&V$)>0}get deletedBefore(){return(this.delInfo&(B$|O1))>0}get deletedAfter(){return(this.delInfo&(L$|O1))>0}get deletedAcross(){return(this.delInfo&O1)>0}}class Hr{constructor(n,o=!1){if(this.ranges=n,this.inverted=o,!n.length&&Hr.empty)return Hr.empty}recover(n){let o=0,r=z$(n);if(!this.inverted)for(let a=0;a<r;a++)o+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[r*3]+o+EYe(n)}mapResult(n,o=1){return this._map(n,o,!1)}map(n,o=1){return this._map(n,o,!0)}_map(n,o,r){let a=0,l=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?a:0);if(c>n)break;let d=this.ranges[s+l],u=this.ranges[s+i],f=c+d;if(n<=f){let p=d?n==c?-1:n==f?1:o:o,m=c+a+(p<0?0:u);if(r)return m;let g=n==(o<0?c:f)?null:kYe(s/3,n-c),y=n==c?L$:n==f?B$:O1;return(o<0?n!=c:n!=f)&&(y|=V$),new F_(m,y,g)}a+=u-d}return r?n+a:new F_(n+a,0,null)}touches(n,o){let r=0,a=z$(o),l=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?r:0);if(c>n)break;let d=this.ranges[s+l],u=c+d;if(n<=u&&s==a*3)return!0;r+=this.ranges[s+i]-d}return!1}forEach(n){let o=this.inverted?2:1,r=this.inverted?1:2;for(let a=0,l=0;a<this.ranges.length;a+=3){let i=this.ranges[a],s=i-(this.inverted?l:0),c=i+(this.inverted?0:l),d=this.ranges[a+o],u=this.ranges[a+r];n(s,s+d,c,c+u),l+=u-d}}invert(){return new Hr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(n){return n==0?Hr.empty:new Hr(n<0?[0,-n,0]:[0,0,n])}}Hr.empty=new Hr([]);class Wu{constructor(n=[],o,r=0,a=n.length){this.maps=n,this.mirror=o,this.from=r,this.to=a}slice(n=0,o=this.maps.length){return new Wu(this.maps,this.mirror,n,o)}copy(){return new Wu(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(n,o){this.to=this.maps.push(n),o!=null&&this.setMirror(this.maps.length-1,o)}appendMapping(n){for(let o=0,r=this.maps.length;o<n.maps.length;o++){let a=n.getMirror(o);this.appendMap(n.maps[o],a!=null&&a<o?r+a:void 0)}}getMirror(n){if(this.mirror){for(let o=0;o<this.mirror.length;o++)if(this.mirror[o]==n)return this.mirror[o+(o%2?-1:1)]}}setMirror(n,o){this.mirror||(this.mirror=[]),this.mirror.push(n,o)}appendMappingInverted(n){for(let o=n.maps.length-1,r=this.maps.length+n.maps.length;o>=0;o--){let a=n.getMirror(o);this.appendMap(n.maps[o].invert(),a!=null&&a>o?r-a-1:void 0)}}invert(){let n=new Wu;return n.appendMappingInverted(this),n}map(n,o=1){if(this.mirror)return this._map(n,o,!0);for(let r=this.from;r<this.to;r++)n=this.maps[r].map(n,o);return n}mapResult(n,o=1){return this._map(n,o,!1)}_map(n,o,r){let a=0;for(let l=this.from;l<this.to;l++){let i=this.maps[l],s=i.mapResult(n,o);if(s.recover!=null){let c=this.getMirror(l);if(c!=null&&c>l&&c<this.to){l=c,n=this.maps[c].recover(s.recover);continue}}a|=s.delInfo,n=s.pos}return r?n:new F_(n,a,null)}}const H_=Object.create(null);class Ro{getMap(){return Hr.empty}merge(n){return null}static fromJSON(n,o){if(!o||!o.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=H_[o.stepType];if(!r)throw new RangeError(`No step type ${o.stepType} defined`);return r.fromJSON(n,o)}static jsonID(n,o){if(n in H_)throw new RangeError("Duplicate use of step JSON ID "+n);return H_[n]=o,o.prototype.jsonID=n,o}}class Qn{constructor(n,o){this.doc=n,this.failed=o}static ok(n){return new Qn(n,null)}static fail(n){return new Qn(null,n)}static fromReplace(n,o,r,a){try{return Qn.ok(n.replace(o,r,a))}catch(l){if(l instanceof k1)return Qn.fail(l.message);throw l}}}function U_(e,n,o){let r=[];for(let a=0;a<e.childCount;a++){let l=e.child(a);l.content.size&&(l=l.copy(U_(l.content,n,l))),l.isInline&&(l=n(l,o,a)),r.push(l)}return Ye.fromArray(r)}class Ns extends Ro{constructor(n,o,r){super(),this.from=n,this.to=o,this.mark=r}apply(n){let o=n.slice(this.from,this.to),r=n.resolve(this.from),a=r.node(r.sharedDepth(this.to)),l=new ct(U_(o.content,(i,s)=>!i.isAtom||!s.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),a),o.openStart,o.openEnd);return Qn.fromReplace(n,this.from,this.to,l)}invert(){return new $l(this.from,this.to,this.mark)}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1);return o.deleted&&r.deleted||o.pos>=r.pos?null:new Ns(o.pos,r.pos,this.mark)}merge(n){return n instanceof Ns&&n.mark.eq(this.mark)&&this.from<=n.to&&this.to>=n.from?new Ns(Math.min(this.from,n.from),Math.max(this.to,n.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ns(o.from,o.to,n.markFromJSON(o.mark))}}Ro.jsonID("addMark",Ns);class $l extends Ro{constructor(n,o,r){super(),this.from=n,this.to=o,this.mark=r}apply(n){let o=n.slice(this.from,this.to),r=new ct(U_(o.content,a=>a.mark(this.mark.removeFromSet(a.marks)),n),o.openStart,o.openEnd);return Qn.fromReplace(n,this.from,this.to,r)}invert(){return new Ns(this.from,this.to,this.mark)}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1);return o.deleted&&r.deleted||o.pos>=r.pos?null:new $l(o.pos,r.pos,this.mark)}merge(n){return n instanceof $l&&n.mark.eq(this.mark)&&this.from<=n.to&&this.to>=n.from?new $l(Math.min(this.from,n.from),Math.max(this.to,n.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $l(o.from,o.to,n.markFromJSON(o.mark))}}Ro.jsonID("removeMark",$l);class ks extends Ro{constructor(n,o){super(),this.pos=n,this.mark=o}apply(n){let o=n.nodeAt(this.pos);if(!o)return Qn.fail("No node at mark step's position");let r=o.type.create(o.attrs,null,this.mark.addToSet(o.marks));return Qn.fromReplace(n,this.pos,this.pos+1,new ct(Ye.from(r),0,o.isLeaf?0:1))}invert(n){let o=n.nodeAt(this.pos);if(o){let r=this.mark.addToSet(o.marks);if(r.length==o.marks.length){for(let a=0;a<o.marks.length;a++)if(!o.marks[a].isInSet(r))return new ks(this.pos,o.marks[a]);return new ks(this.pos,this.mark)}}return new Qu(this.pos,this.mark)}map(n){let o=n.mapResult(this.pos,1);return o.deletedAfter?null:new ks(o.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(n,o){if(typeof o.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ks(o.pos,n.markFromJSON(o.mark))}}Ro.jsonID("addNodeMark",ks);class Qu extends Ro{constructor(n,o){super(),this.pos=n,this.mark=o}apply(n){let o=n.nodeAt(this.pos);if(!o)return Qn.fail("No node at mark step's position");let r=o.type.create(o.attrs,null,this.mark.removeFromSet(o.marks));return Qn.fromReplace(n,this.pos,this.pos+1,new ct(Ye.from(r),0,o.isLeaf?0:1))}invert(n){let o=n.nodeAt(this.pos);return!o||!this.mark.isInSet(o.marks)?this:new ks(this.pos,this.mark)}map(n){let o=n.mapResult(this.pos,1);return o.deletedAfter?null:new Qu(o.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(n,o){if(typeof o.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Qu(o.pos,n.markFromJSON(o.mark))}}Ro.jsonID("removeNodeMark",Qu);class po extends Ro{constructor(n,o,r,a=!1){super(),this.from=n,this.to=o,this.slice=r,this.structure=a}apply(n){return this.structure&&Y_(n,this.from,this.to)?Qn.fail("Structure replace would overwrite content"):Qn.fromReplace(n,this.from,this.to,this.slice)}getMap(){return new Hr([this.from,this.to-this.from,this.slice.size])}invert(n){return new po(this.from,this.from+this.slice.size,n.slice(this.from,this.to))}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1);return o.deletedAcross&&r.deletedAcross?null:new po(o.pos,Math.max(o.pos,r.pos),this.slice)}merge(n){if(!(n instanceof po)||n.structure||this.structure)return null;if(this.from+this.slice.size==n.from&&!this.slice.openEnd&&!n.slice.openStart){let o=this.slice.size+n.slice.size==0?ct.empty:new ct(this.slice.content.append(n.slice.content),this.slice.openStart,n.slice.openEnd);return new po(this.from,this.to+(n.to-n.from),o,this.structure)}else if(n.to==this.from&&!this.slice.openStart&&!n.slice.openEnd){let o=this.slice.size+n.slice.size==0?ct.empty:new ct(n.slice.content.append(this.slice.content),n.slice.openStart,this.slice.openEnd);return new po(n.from,this.to,o,this.structure)}else return null}toJSON(){let n={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(n.slice=this.slice.toJSON()),this.structure&&(n.structure=!0),n}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new po(o.from,o.to,ct.fromJSON(n,o.slice),!!o.structure)}}Ro.jsonID("replace",po);class ho extends Ro{constructor(n,o,r,a,l,i,s=!1){super(),this.from=n,this.to=o,this.gapFrom=r,this.gapTo=a,this.slice=l,this.insert=i,this.structure=s}apply(n){if(this.structure&&(Y_(n,this.from,this.gapFrom)||Y_(n,this.gapTo,this.to)))return Qn.fail("Structure gap-replace would overwrite content");let o=n.slice(this.gapFrom,this.gapTo);if(o.openStart||o.openEnd)return Qn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,o.content);return r?Qn.fromReplace(n,this.from,this.to,r):Qn.fail("Content does not fit in gap")}getMap(){return new Hr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(n){let o=this.gapTo-this.gapFrom;return new ho(this.from,this.from+this.slice.size+o,this.from+this.insert,this.from+this.insert+o,n.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1),a=this.from==this.gapFrom?o.pos:n.map(this.gapFrom,-1),l=this.to==this.gapTo?r.pos:n.map(this.gapTo,1);return o.deletedAcross&&r.deletedAcross||a<o.pos||l>r.pos?null:new ho(o.pos,r.pos,a,l,this.slice,this.insert,this.structure)}toJSON(){let n={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(n.slice=this.slice.toJSON()),this.structure&&(n.structure=!0),n}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number"||typeof o.gapFrom!="number"||typeof o.gapTo!="number"||typeof o.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ho(o.from,o.to,o.gapFrom,o.gapTo,ct.fromJSON(n,o.slice),o.insert,!!o.structure)}}Ro.jsonID("replaceAround",ho);function Y_(e,n,o){let r=e.resolve(n),a=o-n,l=r.depth;for(;a>0&&l>0&&r.indexAfter(l)==r.node(l).childCount;)l--,a--;if(a>0){let i=r.node(l).maybeChild(r.indexAfter(l));for(;a>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,a--}}return!1}function xYe(e,n,o,r){let a=[],l=[],i,s;e.doc.nodesBetween(n,o,(c,d,u)=>{if(!c.isInline)return;let f=c.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let p=Math.max(d,n),m=Math.min(d+c.nodeSize,o),g=r.addToSet(f);for(let y=0;y<f.length;y++)f[y].isInSet(g)||(i&&i.to==p&&i.mark.eq(f[y])?i.to=m:a.push(i=new $l(p,m,f[y])));s&&s.to==p?s.to=m:l.push(s=new Ns(p,m,r))}}),a.forEach(c=>e.step(c)),l.forEach(c=>e.step(c))}function TYe(e,n,o,r){let a=[],l=0;e.doc.nodesBetween(n,o,(i,s)=>{if(!i.isInline)return;l++;let c=null;if(r instanceof S1){let d=i.marks,u;for(;u=r.isInSet(d);)(c||(c=[])).push(u),d=u.removeFromSet(d)}else r?r.isInSet(i.marks)&&(c=[r]):c=i.marks;if(c&&c.length){let d=Math.min(s+i.nodeSize,o);for(let u=0;u<c.length;u++){let f=c[u],p;for(let m=0;m<a.length;m++){let g=a[m];g.step==l-1&&f.eq(a[m].style)&&(p=g)}p?(p.to=d,p.step=l):a.push({style:f,from:Math.max(s,n),to:d,step:l})}}}),a.forEach(i=>e.step(new $l(i.from,i.to,i.style)))}function W_(e,n,o,r=o.contentMatch,a=!0){let l=e.doc.nodeAt(n),i=[],s=n+1;for(let c=0;c<l.childCount;c++){let d=l.child(c),u=s+d.nodeSize,f=r.matchType(d.type);if(!f)i.push(new po(s,u,ct.empty));else{r=f;for(let p=0;p<d.marks.length;p++)o.allowsMarkType(d.marks[p].type)||e.step(new $l(s,u,d.marks[p]));if(a&&d.isText&&o.whitespace!="pre"){let p,m=/\r?\n|\r/g,g;for(;p=m.exec(d.text);)g||(g=new ct(Ye.from(o.schema.text(" ",o.allowedMarks(d.marks))),0,0)),i.push(new po(s+p.index,s+p.index+p[0].length,g))}}s=u}if(!r.validEnd){let c=r.fillBefore(Ye.empty,!0);e.replace(s,s,new ct(c,0,0))}for(let c=i.length-1;c>=0;c--)e.step(i[c])}function SYe(e,n,o){return(n==0||e.canReplace(n,e.childCount))&&(o==e.childCount||e.canReplace(0,o))}function Ku(e){let o=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let a=e.$from.node(r),l=e.$from.index(r),i=e.$to.indexAfter(r);if(r<e.depth&&a.canReplace(l,i,o))return r;if(r==0||a.type.spec.isolating||!SYe(a,l,i))break}return null}function DYe(e,n,o){let{$from:r,$to:a,depth:l}=n,i=r.before(l+1),s=a.after(l+1),c=i,d=s,u=Ye.empty,f=0;for(let g=l,y=!1;g>o;g--)y||r.index(g)>0?(y=!0,u=Ye.from(r.node(g).copy(u)),f++):c--;let p=Ye.empty,m=0;for(let g=l,y=!1;g>o;g--)y||a.after(g+1)<a.end(g)?(y=!0,p=Ye.from(a.node(g).copy(p)),m++):d++;e.step(new ho(c,d,i,s,new ct(u.append(p),f,m),u.size-f,!0))}function Q_(e,n,o=null,r=e){let a=vYe(e,n),l=a&&IYe(r,n);return l?a.map($$).concat({type:n,attrs:o}).concat(l.map($$)):null}function $$(e){return{type:e,attrs:null}}function vYe(e,n){let{parent:o,startIndex:r,endIndex:a}=e,l=o.contentMatchAt(r).findWrapping(n);if(!l)return null;let i=l.length?l[0]:n;return o.canReplaceWith(r,a,i)?l:null}function IYe(e,n){let{parent:o,startIndex:r,endIndex:a}=e,l=o.child(r),i=n.contentMatch.findWrapping(l.type);if(!i)return null;let c=(i.length?i[i.length-1]:n).contentMatch;for(let d=r;c&&d<a;d++)c=c.matchType(o.child(d).type);return!c||!c.validEnd?null:i}function AYe(e,n,o){let r=Ye.empty;for(let i=o.length-1;i>=0;i--){if(r.size){let s=o[i].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ye.from(o[i].type.create(o[i].attrs,r))}let a=n.start,l=n.end;e.step(new ho(a,l,a,l,new ct(r,0,0),o.length,!0))}function OYe(e,n,o,r,a){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let l=e.steps.length;e.doc.nodesBetween(n,o,(i,s)=>{let c=typeof a=="function"?a(i):a;if(i.isTextblock&&!i.hasMarkup(r,c)&&zYe(e.doc,e.mapping.slice(l).map(s),r)){let d=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",g=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!g?d=!1:!m&&g&&(d=!0)}d===!1&&P$(e,i,s,l),W_(e,e.mapping.slice(l).map(s,1),r,void 0,d===null);let u=e.mapping.slice(l),f=u.map(s,1),p=u.map(s+i.nodeSize,1);return e.step(new ho(f,p,f+1,p-1,new ct(Ye.from(r.create(c,null,i.marks)),0,0),1,!0)),d===!0&&j$(e,i,s,l),!1}})}function j$(e,n,o,r){n.forEach((a,l)=>{if(a.isText){let i,s=/\r?\n|\r/g;for(;i=s.exec(a.text);){let c=e.mapping.slice(r).map(o+1+l+i.index);e.replaceWith(c,c+1,n.type.schema.linebreakReplacement.create())}}})}function P$(e,n,o,r){n.forEach((a,l)=>{if(a.type==a.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(o+1+l);e.replaceWith(i,i+1,n.type.schema.text(`
|
|
@@ -4361,16 +4361,16 @@ const kB = (e) => ({
|
|
|
4361
4361
|
let r;
|
|
4362
4362
|
switch (t) {
|
|
4363
4363
|
case "en":
|
|
4364
|
-
r = await Promise.resolve().then(() => Wne), await import("./en-
|
|
4364
|
+
r = await Promise.resolve().then(() => Wne), await import("./en-6080bef3.js").then((a) => a.e);
|
|
4365
4365
|
break;
|
|
4366
4366
|
case "es":
|
|
4367
|
-
r = await import("./es-da718580.js"), await import("./es-
|
|
4367
|
+
r = await import("./es-da718580.js"), await import("./es-dbc71b5f.js").then((a) => a.e);
|
|
4368
4368
|
break;
|
|
4369
4369
|
default:
|
|
4370
|
-
r = await import("./pt-br-b45aa35e.js"), await import("./pt-br-
|
|
4370
|
+
r = await import("./pt-br-b45aa35e.js"), await import("./pt-br-56bc53d3.js").then((a) => a.p);
|
|
4371
4371
|
break;
|
|
4372
4372
|
}
|
|
4373
|
-
const o = await import("./index-
|
|
4373
|
+
const o = await import("./index-d70e0880.js");
|
|
4374
4374
|
e.use(o.default, { locale: r.default }), nt.locale(t);
|
|
4375
4375
|
}
|
|
4376
4376
|
});
|
|
@@ -45631,7 +45631,7 @@ function cze(e, t, n, r, o, a) {
|
|
|
45631
45631
|
height: a.spacing.top
|
|
45632
45632
|
}, null, 8, ["height"]),
|
|
45633
45633
|
(T(!0), I(Re, null, _t(a.visiblePages, (g) => (T(), ce(l, {
|
|
45634
|
-
key: g.index
|
|
45634
|
+
key: `${g.index}-${g.loading}-${g.loaded}`,
|
|
45635
45635
|
page: g,
|
|
45636
45636
|
perPage: a.perPage,
|
|
45637
45637
|
pagesCount: a.pagesCount,
|