@amsom-habitat/amsom-table 4.1.1 → 4.1.2
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/amsom-table.js +14 -7
- package/dist/amsom-table.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/amsom-table.js
CHANGED
|
@@ -11111,7 +11111,8 @@ const kd = {
|
|
|
11111
11111
|
resizeObserver: null,
|
|
11112
11112
|
showScrollbar: !1,
|
|
11113
11113
|
tableContainer: null,
|
|
11114
|
-
deepSortsList: []
|
|
11114
|
+
deepSortsList: [],
|
|
11115
|
+
isInternalUpdate: !1
|
|
11115
11116
|
};
|
|
11116
11117
|
},
|
|
11117
11118
|
computed: {
|
|
@@ -11190,12 +11191,18 @@ const kd = {
|
|
|
11190
11191
|
},
|
|
11191
11192
|
dynamicColumns: {
|
|
11192
11193
|
handler(M) {
|
|
11193
|
-
M && (this.columns = this.getColumnsById(M, this.defaultColumns))
|
|
11194
|
+
M && !this.isInternalUpdate && (this.isInternalUpdate = !0, this.columns = this.getColumnsById(M, this.defaultColumns), this.$nextTick(() => {
|
|
11195
|
+
this.isInternalUpdate = !1;
|
|
11196
|
+
}));
|
|
11194
11197
|
},
|
|
11195
11198
|
immediate: !0
|
|
11196
11199
|
},
|
|
11197
|
-
columns:
|
|
11198
|
-
|
|
11200
|
+
columns: {
|
|
11201
|
+
handler(M) {
|
|
11202
|
+
this.localStorageItemName !== null && cM(this.localStorageItemName, this.getRefactoColumns(M), "columns"), this.dynamicColumns && !this.isInternalUpdate && (this.isInternalUpdate = !0, this.$emit("update:dynamicColumns", this.getRefactoColumns(M)), this.$nextTick(() => {
|
|
11203
|
+
this.isInternalUpdate = !1;
|
|
11204
|
+
})), this.forceTableUpdateIndex += 1;
|
|
11205
|
+
}
|
|
11199
11206
|
},
|
|
11200
11207
|
headerEditMode: function(M) {
|
|
11201
11208
|
var b;
|
|
@@ -11374,13 +11381,13 @@ const kd = {
|
|
|
11374
11381
|
this.$emit("changeSubject", M);
|
|
11375
11382
|
},
|
|
11376
11383
|
saveTablePreferences() {
|
|
11377
|
-
this.localStorageItemName !== null && cM(this.localStorageItemName, this.getRefactoColumns(this.columns), "columns"), this.headerEditMode = !1, this.currentPage = this.previousCurrentPage;
|
|
11384
|
+
this.localStorageItemName !== null && cM(this.localStorageItemName, this.getRefactoColumns(this.columns), "columns"), this.dynamicColumns && this.$emit("update:dynamicColumns", this.getRefactoColumns(this.columns)), this.headerEditMode = !1, this.currentPage = this.previousCurrentPage;
|
|
11378
11385
|
},
|
|
11379
11386
|
resetTablePreferences() {
|
|
11380
11387
|
this.columns = this.copyDefaultColumns(), this.localStorageItemName !== null && ho(
|
|
11381
11388
|
this.localStorageItemName,
|
|
11382
11389
|
this.getRefactoColumns(this.columns)
|
|
11383
|
-
), this.currentPage = this.previousCurrentPage;
|
|
11390
|
+
), this.dynamicColumns && this.$emit("update:dynamicColumns", this.getRefactoColumns(this.columns)), this.currentPage = this.previousCurrentPage;
|
|
11384
11391
|
},
|
|
11385
11392
|
editTablePreferences() {
|
|
11386
11393
|
this.headerEditMode = !0, this.previousCurrentPage = this.currentPage, this.currentPage = 1;
|
|
@@ -11832,7 +11839,7 @@ function uW(M, b, z, p, o, e) {
|
|
|
11832
11839
|
])
|
|
11833
11840
|
], 64);
|
|
11834
11841
|
}
|
|
11835
|
-
const hW = /* @__PURE__ */ wd(kd, [["render", uW], ["__scopeId", "data-v-
|
|
11842
|
+
const hW = /* @__PURE__ */ wd(kd, [["render", uW], ["__scopeId", "data-v-e855432c"]]);
|
|
11836
11843
|
export {
|
|
11837
11844
|
hW as AmsomTableDraggable,
|
|
11838
11845
|
hW as default
|
package/dist/amsom-table.umd.cjs
CHANGED
|
@@ -590,4 +590,4 @@ T.version="2.30.1",tn(s0),T.fn=m,T.min=Ja,T.max=Za,T.now=$a,T.utc=L1,T.unix=gr,T
|
|
|
590
590
|
Arguments: `+Array.prototype.slice.call(A).join("")+`
|
|
591
591
|
`+new Error().stack),t=!1}return c.apply(this,arguments)},c)}var M1={};function g1(O,c){p.deprecationHandler!=null&&p.deprecationHandler(O,c),M1[O]||(E0(c),M1[O]=!0)}p.suppressDeprecationWarnings=!1,p.deprecationHandler=null;function B0(O){return typeof Function<"u"&&O instanceof Function||Object.prototype.toString.call(O)==="[object Function]"}function U0(O){var c,t;for(t in O)r(O,t)&&(c=O[t],B0(c)?this[t]=c:this["_"+t]=c);this._config=O,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function e1(O,c){var t=P({},O),A;for(A in c)r(c,A)&&(n(O[A])&&n(c[A])?(t[A]={},P(t[A],O[A]),P(t[A],c[A])):c[A]!=null?t[A]=c[A]:delete t[A]);for(A in O)r(O,A)&&!r(c,A)&&n(O[A])&&(t[A]=P({},t[A]));return t}function h0(O){O!=null&&this.set(O)}var X1;Object.keys?X1=Object.keys:X1=function(O){var c,t=[];for(c in O)r(O,c)&&t.push(c);return t};var j1={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function bM(O,c,t){var A=this._calendar[O]||this._calendar.sameElse;return B0(A)?A.call(c,t):A}function b1(O,c,t){var A=""+Math.abs(O),a=c-A.length,d=O>=0;return(d?t?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+A}var q2=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,s2=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,PM={},y1={};function D(O,c,t,A){var a=A;typeof A=="string"&&(a=function(){return this[A]()}),O&&(y1[O]=a),c&&(y1[c[0]]=function(){return b1(a.apply(this,arguments),c[1],c[2])}),t&&(y1[t]=function(){return this.localeData().ordinal(a.apply(this,arguments),O)})}function G1(O){return O.match(/\[[\s\S]/)?O.replace(/^\[|\]$/g,""):O.replace(/\\/g,"")}function r0(O){var c=O.match(q2),t,A;for(t=0,A=c.length;t<A;t++)y1[c[t]]?c[t]=y1[c[t]]:c[t]=G1(c[t]);return function(a){var d="",u;for(u=0;u<A;u++)d+=B0(c[u])?c[u].call(a,O):c[u];return d}}function I0(O,c){return O.isValid()?(c=xM(c,O.localeData()),PM[c]=PM[c]||r0(c),PM[c](O)):O.localeData().invalidDate()}function xM(O,c){var t=5;function A(a){return c.longDateFormat(a)||a}for(s2.lastIndex=0;t>=0&&s2.test(O);)O=O.replace(s2,A),s2.lastIndex=0,t-=1;return O}var Hb={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Gp(O){var c=this._longDateFormat[O],t=this._longDateFormat[O.toUpperCase()];return c||!t?c:(this._longDateFormat[O]=t.match(q2).map(function(A){return A==="MMMM"||A==="MM"||A==="DD"||A==="dddd"?A.slice(1):A}).join(""),this._longDateFormat[O])}var T2="Invalid date";function W(){return this._invalidDate}var R="%d",h=/\d{1,2}/;function X(O){return this._ordinal.replace("%d",O)}var F={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function M0(O,c,t,A){var a=this._relativeTime[t];return B0(a)?a(O,c,t,A):a.replace(/%d/i,O)}function g0(O,c){var t=this._relativeTime[O>0?"future":"past"];return B0(t)?t(c):t.replace(/%s/i,c)}var c0={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function J(O){return typeof O=="string"?c0[O]||c0[O.toLowerCase()]:void 0}function jb(O){var c={},t,A;for(A in O)r(O,A)&&(t=J(A),t&&(c[t]=O[A]));return c}var aq={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function rq(O){var c=[],t;for(t in O)r(O,t)&&c.push({unit:t,priority:aq[t]});return c.sort(function(A,a){return A.priority-a.priority}),c}var cc=/\d/,z1=/\d\d/,ec=/\d{3}/,Vp=/\d{4}/,Gb=/[+-]?\d{6}/,d0=/\d\d?/,tc=/\d\d\d\d?/,Ac=/\d\d\d\d\d\d?/,Vb=/\d{1,3}/,Kp=/\d{1,4}/,Kb=/[+-]?\d{1,6}/,zM=/\d+/,Qb=/[+-]?\d+/,iq=/Z|[+-]\d\d:?\d\d/gi,Jb=/Z|[+-]\d\d(?::?\d\d)?/gi,qq=/[+-]?\d+(\.\d{1,3})?/,IM=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,pM=/^[1-9]\d?/,Qp=/^([1-9]\d|\d)/,Zb;Zb={};function k(O,c,t){Zb[O]=B0(c)?c:function(A,a){return A&&t?t:c}}function sq(O,c){return r(Zb,O)?Zb[O](c._strict,c._locale):new RegExp(dq(O))}function dq(O){return V1(O.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(c,t,A,a,d){return t||A||a||d}))}function V1(O){return O.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function t1(O){return O<0?Math.ceil(O)||0:Math.floor(O)}function Q(O){var c=+O,t=0;return c!==0&&isFinite(c)&&(t=t1(c)),t}var Jp={};function a0(O,c){var t,A=c,a;for(typeof O=="string"&&(O=[O]),l(c)&&(A=function(d,u){u[c]=Q(d)}),a=O.length,t=0;t<a;t++)Jp[O[t]]=A}function YM(O,c){a0(O,function(t,A,a,d){a._w=a._w||{},c(t,a._w,a,d)})}function Wq(O,c,t){c!=null&&r(Jp,O)&&Jp[O](c,t._a,t,O)}function $b(O){return O%4===0&&O%100!==0||O%400===0}var Y0=0,K1=1,T1=2,k0=3,d1=4,Q1=5,_2=6,lq=7,fq=8;D("Y",0,0,function(){var O=this.year();return O<=9999?b1(O,4):"+"+O}),D(0,["YY",2],0,function(){return this.year()%100}),D(0,["YYYY",4],0,"year"),D(0,["YYYYY",5],0,"year"),D(0,["YYYYYY",6,!0],0,"year"),k("Y",Qb),k("YY",d0,z1),k("YYYY",Kp,Vp),k("YYYYY",Kb,Gb),k("YYYYYY",Kb,Gb),a0(["YYYYY","YYYYYY"],Y0),a0("YYYY",function(O,c){c[Y0]=O.length===2?p.parseTwoDigitYear(O):Q(O)}),a0("YY",function(O,c){c[Y0]=p.parseTwoDigitYear(O)}),a0("Y",function(O,c){c[Y0]=parseInt(O,10)});function FM(O){return $b(O)?366:365}p.parseTwoDigitYear=function(O){return Q(O)+(Q(O)>68?1900:2e3)};var nc=OM("FullYear",!0);function uq(){return $b(this.year())}function OM(O,c){return function(t){return t!=null?(ac(this,O,t),p.updateOffset(this,c),this):UM(this,O)}}function UM(O,c){if(!O.isValid())return NaN;var t=O._d,A=O._isUTC;switch(c){case"Milliseconds":return A?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return A?t.getUTCSeconds():t.getSeconds();case"Minutes":return A?t.getUTCMinutes():t.getMinutes();case"Hours":return A?t.getUTCHours():t.getHours();case"Date":return A?t.getUTCDate():t.getDate();case"Day":return A?t.getUTCDay():t.getDay();case"Month":return A?t.getUTCMonth():t.getMonth();case"FullYear":return A?t.getUTCFullYear():t.getFullYear();default:return NaN}}function ac(O,c,t){var A,a,d,u,v;if(!(!O.isValid()||isNaN(t))){switch(A=O._d,a=O._isUTC,c){case"Milliseconds":return void(a?A.setUTCMilliseconds(t):A.setMilliseconds(t));case"Seconds":return void(a?A.setUTCSeconds(t):A.setSeconds(t));case"Minutes":return void(a?A.setUTCMinutes(t):A.setMinutes(t));case"Hours":return void(a?A.setUTCHours(t):A.setHours(t));case"Date":return void(a?A.setUTCDate(t):A.setDate(t));case"FullYear":break;default:return}d=t,u=O.month(),v=O.date(),v=v===29&&u===1&&!$b(d)?28:v,a?A.setUTCFullYear(d,u,v):A.setFullYear(d,u,v)}}function Rq(O){return O=J(O),B0(this[O])?this[O]():this}function hq(O,c){if(typeof O=="object"){O=jb(O);var t=rq(O),A,a=t.length;for(A=0;A<a;A++)this[t[A].unit](O[t[A].unit])}else if(O=J(O),B0(this[O]))return this[O](c);return this}function Lq(O,c){return(O%c+c)%c}var T0;Array.prototype.indexOf?T0=Array.prototype.indexOf:T0=function(O){var c;for(c=0;c<this.length;++c)if(this[c]===O)return c;return-1};function Zp(O,c){if(isNaN(O)||isNaN(c))return NaN;var t=Lq(c,12);return O+=(c-t)/12,t===1?$b(O)?29:28:31-t%7%2}D("M",["MM",2],"Mo",function(){return this.month()+1}),D("MMM",0,0,function(O){return this.localeData().monthsShort(this,O)}),D("MMMM",0,0,function(O){return this.localeData().months(this,O)}),k("M",d0,pM),k("MM",d0,z1),k("MMM",function(O,c){return c.monthsShortRegex(O)}),k("MMMM",function(O,c){return c.monthsRegex(O)}),a0(["M","MM"],function(O,c){c[K1]=Q(O)-1}),a0(["MMM","MMMM"],function(O,c,t,A){var a=t._locale.monthsParse(O,A,t._strict);a!=null?c[K1]=a:_(t).invalidMonth=O});var mq="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),rc="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ic=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nq=IM,Bq=IM;function gq(O,c){return O?e(this._months)?this._months[O.month()]:this._months[(this._months.isFormat||ic).test(c)?"format":"standalone"][O.month()]:e(this._months)?this._months:this._months.standalone}function Xq(O,c){return O?e(this._monthsShort)?this._monthsShort[O.month()]:this._monthsShort[ic.test(c)?"format":"standalone"][O.month()]:e(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function yq(O,c,t){var A,a,d,u=O.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],A=0;A<12;++A)d=E([2e3,A]),this._shortMonthsParse[A]=this.monthsShort(d,"").toLocaleLowerCase(),this._longMonthsParse[A]=this.months(d,"").toLocaleLowerCase();return t?c==="MMM"?(a=T0.call(this._shortMonthsParse,u),a!==-1?a:null):(a=T0.call(this._longMonthsParse,u),a!==-1?a:null):c==="MMM"?(a=T0.call(this._shortMonthsParse,u),a!==-1?a:(a=T0.call(this._longMonthsParse,u),a!==-1?a:null)):(a=T0.call(this._longMonthsParse,u),a!==-1?a:(a=T0.call(this._shortMonthsParse,u),a!==-1?a:null))}function Tq(O,c,t){var A,a,d;if(this._monthsParseExact)return yq.call(this,O,c,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),A=0;A<12;A++){if(a=E([2e3,A]),t&&!this._longMonthsParse[A]&&(this._longMonthsParse[A]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[A]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),!t&&!this._monthsParse[A]&&(d="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[A]=new RegExp(d.replace(".",""),"i")),t&&c==="MMMM"&&this._longMonthsParse[A].test(O))return A;if(t&&c==="MMM"&&this._shortMonthsParse[A].test(O))return A;if(!t&&this._monthsParse[A].test(O))return A}}function qc(O,c){if(!O.isValid())return O;if(typeof c=="string"){if(/^\d+$/.test(c))c=Q(c);else if(c=O.localeData().monthsParse(c),!l(c))return O}var t=c,A=O.date();return A=A<29?A:Math.min(A,Zp(O.year(),t)),O._isUTC?O._d.setUTCMonth(t,A):O._d.setMonth(t,A),O}function sc(O){return O!=null?(qc(this,O),p.updateOffset(this,!0),this):UM(this,"Month")}function _q(){return Zp(this.year(),this.month())}function Sq(O){return this._monthsParseExact?(r(this,"_monthsRegex")||dc.call(this),O?this._monthsShortStrictRegex:this._monthsShortRegex):(r(this,"_monthsShortRegex")||(this._monthsShortRegex=Nq),this._monthsShortStrictRegex&&O?this._monthsShortStrictRegex:this._monthsShortRegex)}function vq(O){return this._monthsParseExact?(r(this,"_monthsRegex")||dc.call(this),O?this._monthsStrictRegex:this._monthsRegex):(r(this,"_monthsRegex")||(this._monthsRegex=Bq),this._monthsStrictRegex&&O?this._monthsStrictRegex:this._monthsRegex)}function dc(){function O(U,Z){return Z.length-U.length}var c=[],t=[],A=[],a,d,u,v;for(a=0;a<12;a++)d=E([2e3,a]),u=V1(this.monthsShort(d,"")),v=V1(this.months(d,"")),c.push(u),t.push(v),A.push(v),A.push(u);c.sort(O),t.sort(O),A.sort(O),this._monthsRegex=new RegExp("^("+A.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+c.join("|")+")","i")}function wq(O,c,t,A,a,d,u){var v;return O<100&&O>=0?(v=new Date(O+400,c,t,A,a,d,u),isFinite(v.getFullYear())&&v.setFullYear(O)):v=new Date(O,c,t,A,a,d,u),v}function HM(O){var c,t;return O<100&&O>=0?(t=Array.prototype.slice.call(arguments),t[0]=O+400,c=new Date(Date.UTC.apply(null,t)),isFinite(c.getUTCFullYear())&&c.setUTCFullYear(O)):c=new Date(Date.UTC.apply(null,arguments)),c}function Mz(O,c,t){var A=7+c-t,a=(7+HM(O,0,A).getUTCDay()-c)%7;return-a+A-1}function Wc(O,c,t,A,a){var d=(7+t-A)%7,u=Mz(O,A,a),v=1+7*(c-1)+d+u,U,Z;return v<=0?(U=O-1,Z=FM(U)+v):v>FM(O)?(U=O+1,Z=v-FM(O)):(U=O,Z=v),{year:U,dayOfYear:Z}}function jM(O,c,t){var A=Mz(O.year(),c,t),a=Math.floor((O.dayOfYear()-A-1)/7)+1,d,u;return a<1?(u=O.year()-1,d=a+J1(u,c,t)):a>J1(O.year(),c,t)?(d=a-J1(O.year(),c,t),u=O.year()+1):(u=O.year(),d=a),{week:d,year:u}}function J1(O,c,t){var A=Mz(O,c,t),a=Mz(O+1,c,t);return(FM(O)-A+a)/7}D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),k("w",d0,pM),k("ww",d0,z1),k("W",d0,pM),k("WW",d0,z1),YM(["w","ww","W","WW"],function(O,c,t,A){c[A.substr(0,1)]=Q(O)});function kq(O){return jM(O,this._week.dow,this._week.doy).week}var Eq={dow:0,doy:6};function Dq(){return this._week.dow}function Cq(){return this._week.doy}function Pq(O){var c=this.localeData().week(this);return O==null?c:this.add((O-c)*7,"d")}function xq(O){var c=jM(this,1,4).week;return O==null?c:this.add((O-c)*7,"d")}D("d",0,"do","day"),D("dd",0,0,function(O){return this.localeData().weekdaysMin(this,O)}),D("ddd",0,0,function(O){return this.localeData().weekdaysShort(this,O)}),D("dddd",0,0,function(O){return this.localeData().weekdays(this,O)}),D("e",0,0,"weekday"),D("E",0,0,"isoWeekday"),k("d",d0),k("e",d0),k("E",d0),k("dd",function(O,c){return c.weekdaysMinRegex(O)}),k("ddd",function(O,c){return c.weekdaysShortRegex(O)}),k("dddd",function(O,c){return c.weekdaysRegex(O)}),YM(["dd","ddd","dddd"],function(O,c,t,A){var a=t._locale.weekdaysParse(O,A,t._strict);a!=null?c.d=a:_(t).invalidWeekday=O}),YM(["d","e","E"],function(O,c,t,A){c[A]=Q(O)});function Iq(O,c){return typeof O!="string"?O:isNaN(O)?(O=c.weekdaysParse(O),typeof O=="number"?O:null):parseInt(O,10)}function Yq(O,c){return typeof O=="string"?c.weekdaysParse(O)%7||7:isNaN(O)?null:O}function $p(O,c){return O.slice(c,7).concat(O.slice(0,c))}var Fq="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),lc="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Uq="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Hq=IM,jq=IM,Gq=IM;function Vq(O,c){var t=e(this._weekdays)?this._weekdays:this._weekdays[O&&O!==!0&&this._weekdays.isFormat.test(c)?"format":"standalone"];return O===!0?$p(t,this._week.dow):O?t[O.day()]:t}function Kq(O){return O===!0?$p(this._weekdaysShort,this._week.dow):O?this._weekdaysShort[O.day()]:this._weekdaysShort}function Qq(O){return O===!0?$p(this._weekdaysMin,this._week.dow):O?this._weekdaysMin[O.day()]:this._weekdaysMin}function Jq(O,c,t){var A,a,d,u=O.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],A=0;A<7;++A)d=E([2e3,1]).day(A),this._minWeekdaysParse[A]=this.weekdaysMin(d,"").toLocaleLowerCase(),this._shortWeekdaysParse[A]=this.weekdaysShort(d,"").toLocaleLowerCase(),this._weekdaysParse[A]=this.weekdays(d,"").toLocaleLowerCase();return t?c==="dddd"?(a=T0.call(this._weekdaysParse,u),a!==-1?a:null):c==="ddd"?(a=T0.call(this._shortWeekdaysParse,u),a!==-1?a:null):(a=T0.call(this._minWeekdaysParse,u),a!==-1?a:null):c==="dddd"?(a=T0.call(this._weekdaysParse,u),a!==-1||(a=T0.call(this._shortWeekdaysParse,u),a!==-1)?a:(a=T0.call(this._minWeekdaysParse,u),a!==-1?a:null)):c==="ddd"?(a=T0.call(this._shortWeekdaysParse,u),a!==-1||(a=T0.call(this._weekdaysParse,u),a!==-1)?a:(a=T0.call(this._minWeekdaysParse,u),a!==-1?a:null)):(a=T0.call(this._minWeekdaysParse,u),a!==-1||(a=T0.call(this._weekdaysParse,u),a!==-1)?a:(a=T0.call(this._shortWeekdaysParse,u),a!==-1?a:null))}function Zq(O,c,t){var A,a,d;if(this._weekdaysParseExact)return Jq.call(this,O,c,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),A=0;A<7;A++){if(a=E([2e3,1]).day(A),t&&!this._fullWeekdaysParse[A]&&(this._fullWeekdaysParse[A]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[A]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[A]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[A]||(d="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[A]=new RegExp(d.replace(".",""),"i")),t&&c==="dddd"&&this._fullWeekdaysParse[A].test(O))return A;if(t&&c==="ddd"&&this._shortWeekdaysParse[A].test(O))return A;if(t&&c==="dd"&&this._minWeekdaysParse[A].test(O))return A;if(!t&&this._weekdaysParse[A].test(O))return A}}function $q(O){if(!this.isValid())return O!=null?this:NaN;var c=UM(this,"Day");return O!=null?(O=Iq(O,this.localeData()),this.add(O-c,"d")):c}function Ms(O){if(!this.isValid())return O!=null?this:NaN;var c=(this.day()+7-this.localeData()._week.dow)%7;return O==null?c:this.add(O-c,"d")}function bs(O){if(!this.isValid())return O!=null?this:NaN;if(O!=null){var c=Yq(O,this.localeData());return this.day(this.day()%7?c:c-7)}else return this.day()||7}function zs(O){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||M3.call(this),O?this._weekdaysStrictRegex:this._weekdaysRegex):(r(this,"_weekdaysRegex")||(this._weekdaysRegex=Hq),this._weekdaysStrictRegex&&O?this._weekdaysStrictRegex:this._weekdaysRegex)}function ps(O){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||M3.call(this),O?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(r(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jq),this._weekdaysShortStrictRegex&&O?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Os(O){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||M3.call(this),O?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(r(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Gq),this._weekdaysMinStrictRegex&&O?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function M3(){function O(H0,z2){return z2.length-H0.length}var c=[],t=[],A=[],a=[],d,u,v,U,Z;for(d=0;d<7;d++)u=E([2e3,1]).day(d),v=V1(this.weekdaysMin(u,"")),U=V1(this.weekdaysShort(u,"")),Z=V1(this.weekdays(u,"")),c.push(v),t.push(U),A.push(Z),a.push(v),a.push(U),a.push(Z);c.sort(O),t.sort(O),A.sort(O),a.sort(O),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+A.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+c.join("|")+")","i")}function b3(){return this.hours()%12||12}function os(){return this.hours()||24}D("H",["HH",2],0,"hour"),D("h",["hh",2],0,b3),D("k",["kk",2],0,os),D("hmm",0,0,function(){return""+b3.apply(this)+b1(this.minutes(),2)}),D("hmmss",0,0,function(){return""+b3.apply(this)+b1(this.minutes(),2)+b1(this.seconds(),2)}),D("Hmm",0,0,function(){return""+this.hours()+b1(this.minutes(),2)}),D("Hmmss",0,0,function(){return""+this.hours()+b1(this.minutes(),2)+b1(this.seconds(),2)});function fc(O,c){D(O,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),c)})}fc("a",!0),fc("A",!1);function uc(O,c){return c._meridiemParse}k("a",uc),k("A",uc),k("H",d0,Qp),k("h",d0,pM),k("k",d0,pM),k("HH",d0,z1),k("hh",d0,z1),k("kk",d0,z1),k("hmm",tc),k("hmmss",Ac),k("Hmm",tc),k("Hmmss",Ac),a0(["H","HH"],k0),a0(["k","kk"],function(O,c,t){var A=Q(O);c[k0]=A===24?0:A}),a0(["a","A"],function(O,c,t){t._isPm=t._locale.isPM(O),t._meridiem=O}),a0(["h","hh"],function(O,c,t){c[k0]=Q(O),_(t).bigHour=!0}),a0("hmm",function(O,c,t){var A=O.length-2;c[k0]=Q(O.substr(0,A)),c[d1]=Q(O.substr(A)),_(t).bigHour=!0}),a0("hmmss",function(O,c,t){var A=O.length-4,a=O.length-2;c[k0]=Q(O.substr(0,A)),c[d1]=Q(O.substr(A,2)),c[Q1]=Q(O.substr(a)),_(t).bigHour=!0}),a0("Hmm",function(O,c,t){var A=O.length-2;c[k0]=Q(O.substr(0,A)),c[d1]=Q(O.substr(A))}),a0("Hmmss",function(O,c,t){var A=O.length-4,a=O.length-2;c[k0]=Q(O.substr(0,A)),c[d1]=Q(O.substr(A,2)),c[Q1]=Q(O.substr(a))});function cs(O){return(O+"").toLowerCase().charAt(0)==="p"}var es=/[ap]\.?m?\.?/i,ts=OM("Hours",!0);function As(O,c,t){return O>11?t?"pm":"PM":t?"am":"AM"}var Rc={calendar:j1,longDateFormat:Hb,invalidDate:T2,ordinal:R,dayOfMonthOrdinalParse:h,relativeTime:F,months:mq,monthsShort:rc,week:Eq,weekdays:Fq,weekdaysMin:Uq,weekdaysShort:lc,meridiemParse:es},u0={},GM={},VM;function ns(O,c){var t,A=Math.min(O.length,c.length);for(t=0;t<A;t+=1)if(O[t]!==c[t])return t;return A}function hc(O){return O&&O.toLowerCase().replace("_","-")}function as(O){for(var c=0,t,A,a,d;c<O.length;){for(d=hc(O[c]).split("-"),t=d.length,A=hc(O[c+1]),A=A?A.split("-"):null;t>0;){if(a=bz(d.slice(0,t).join("-")),a)return a;if(A&&A.length>=t&&ns(d,A)>=t-1)break;t--}c++}return VM}function rs(O){return!!(O&&O.match("^[^/\\\\]*$"))}function bz(O){var c=null,t;if(u0[O]===void 0&&M&&M.exports&&rs(O))try{c=VM._abbr,t=Jo,t("./locale/"+O),d2(c)}catch{u0[O]=null}return u0[O]}function d2(O,c){var t;return O&&(i(c)?t=Z1(O):t=z3(O,c),t?VM=t:typeof console<"u"&&console.warn&&console.warn("Locale "+O+" not found. Did you forget to load it?")),VM._abbr}function z3(O,c){if(c!==null){var t,A=Rc;if(c.abbr=O,u0[O]!=null)g1("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),A=u0[O]._config;else if(c.parentLocale!=null)if(u0[c.parentLocale]!=null)A=u0[c.parentLocale]._config;else if(t=bz(c.parentLocale),t!=null)A=t._config;else return GM[c.parentLocale]||(GM[c.parentLocale]=[]),GM[c.parentLocale].push({name:O,config:c}),null;return u0[O]=new h0(e1(A,c)),GM[O]&&GM[O].forEach(function(a){z3(a.name,a.config)}),d2(O),u0[O]}else return delete u0[O],null}function is(O,c){if(c!=null){var t,A,a=Rc;u0[O]!=null&&u0[O].parentLocale!=null?u0[O].set(e1(u0[O]._config,c)):(A=bz(O),A!=null&&(a=A._config),c=e1(a,c),A==null&&(c.abbr=O),t=new h0(c),t.parentLocale=u0[O],u0[O]=t),d2(O)}else u0[O]!=null&&(u0[O].parentLocale!=null?(u0[O]=u0[O].parentLocale,O===d2()&&d2(O)):u0[O]!=null&&delete u0[O]);return u0[O]}function Z1(O){var c;if(O&&O._locale&&O._locale._abbr&&(O=O._locale._abbr),!O)return VM;if(!e(O)){if(c=bz(O),c)return c;O=[O]}return as(O)}function qs(){return X1(u0)}function p3(O){var c,t=O._a;return t&&_(O).overflow===-2&&(c=t[K1]<0||t[K1]>11?K1:t[T1]<1||t[T1]>Zp(t[Y0],t[K1])?T1:t[k0]<0||t[k0]>24||t[k0]===24&&(t[d1]!==0||t[Q1]!==0||t[_2]!==0)?k0:t[d1]<0||t[d1]>59?d1:t[Q1]<0||t[Q1]>59?Q1:t[_2]<0||t[_2]>999?_2:-1,_(O)._overflowDayOfYear&&(c<Y0||c>T1)&&(c=T1),_(O)._overflowWeeks&&c===-1&&(c=lq),_(O)._overflowWeekday&&c===-1&&(c=fq),_(O).overflow=c),O}var ss=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ds=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ws=/Z|[+-]\d\d(?::?\d\d)?/,zz=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],O3=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ls=/^\/?Date\((-?\d+)/i,fs=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,us={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Lc(O){var c,t,A=O._i,a=ss.exec(A)||ds.exec(A),d,u,v,U,Z=zz.length,H0=O3.length;if(a){for(_(O).iso=!0,c=0,t=Z;c<t;c++)if(zz[c][1].exec(a[1])){u=zz[c][0],d=zz[c][2]!==!1;break}if(u==null){O._isValid=!1;return}if(a[3]){for(c=0,t=H0;c<t;c++)if(O3[c][1].exec(a[3])){v=(a[2]||" ")+O3[c][0];break}if(v==null){O._isValid=!1;return}}if(!d&&v!=null){O._isValid=!1;return}if(a[4])if(Ws.exec(a[4]))U="Z";else{O._isValid=!1;return}O._f=u+(v||"")+(U||""),c3(O)}else O._isValid=!1}function Rs(O,c,t,A,a,d){var u=[hs(O),rc.indexOf(c),parseInt(t,10),parseInt(A,10),parseInt(a,10)];return d&&u.push(parseInt(d,10)),u}function hs(O){var c=parseInt(O,10);return c<=49?2e3+c:c<=999?1900+c:c}function Ls(O){return O.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ms(O,c,t){if(O){var A=lc.indexOf(O),a=new Date(c[0],c[1],c[2]).getDay();if(A!==a)return _(t).weekdayMismatch=!0,t._isValid=!1,!1}return!0}function Ns(O,c,t){if(O)return us[O];if(c)return 0;var A=parseInt(t,10),a=A%100,d=(A-a)/100;return d*60+a}function mc(O){var c=fs.exec(Ls(O._i)),t;if(c){if(t=Rs(c[4],c[3],c[2],c[5],c[6],c[7]),!ms(c[1],t,O))return;O._a=t,O._tzm=Ns(c[8],c[9],c[10]),O._d=HM.apply(null,O._a),O._d.setUTCMinutes(O._d.getUTCMinutes()-O._tzm),_(O).rfc2822=!0}else O._isValid=!1}function Bs(O){var c=ls.exec(O._i);if(c!==null){O._d=new Date(+c[1]);return}if(Lc(O),O._isValid===!1)delete O._isValid;else return;if(mc(O),O._isValid===!1)delete O._isValid;else return;O._strict?O._isValid=!1:p.createFromInputFallback(O)}p.createFromInputFallback=S0("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(O){O._d=new Date(O._i+(O._useUTC?" UTC":""))});function oM(O,c,t){return O??c??t}function gs(O){var c=new Date(p.now());return O._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function o3(O){var c,t,A=[],a,d,u;if(!O._d){for(a=gs(O),O._w&&O._a[T1]==null&&O._a[K1]==null&&Xs(O),O._dayOfYear!=null&&(u=oM(O._a[Y0],a[Y0]),(O._dayOfYear>FM(u)||O._dayOfYear===0)&&(_(O)._overflowDayOfYear=!0),t=HM(u,0,O._dayOfYear),O._a[K1]=t.getUTCMonth(),O._a[T1]=t.getUTCDate()),c=0;c<3&&O._a[c]==null;++c)O._a[c]=A[c]=a[c];for(;c<7;c++)O._a[c]=A[c]=O._a[c]==null?c===2?1:0:O._a[c];O._a[k0]===24&&O._a[d1]===0&&O._a[Q1]===0&&O._a[_2]===0&&(O._nextDay=!0,O._a[k0]=0),O._d=(O._useUTC?HM:wq).apply(null,A),d=O._useUTC?O._d.getUTCDay():O._d.getDay(),O._tzm!=null&&O._d.setUTCMinutes(O._d.getUTCMinutes()-O._tzm),O._nextDay&&(O._a[k0]=24),O._w&&typeof O._w.d<"u"&&O._w.d!==d&&(_(O).weekdayMismatch=!0)}}function Xs(O){var c,t,A,a,d,u,v,U,Z;c=O._w,c.GG!=null||c.W!=null||c.E!=null?(d=1,u=4,t=oM(c.GG,O._a[Y0],jM(W0(),1,4).year),A=oM(c.W,1),a=oM(c.E,1),(a<1||a>7)&&(U=!0)):(d=O._locale._week.dow,u=O._locale._week.doy,Z=jM(W0(),d,u),t=oM(c.gg,O._a[Y0],Z.year),A=oM(c.w,Z.week),c.d!=null?(a=c.d,(a<0||a>6)&&(U=!0)):c.e!=null?(a=c.e+d,(c.e<0||c.e>6)&&(U=!0)):a=d),A<1||A>J1(t,d,u)?_(O)._overflowWeeks=!0:U!=null?_(O)._overflowWeekday=!0:(v=Wc(t,A,a,d,u),O._a[Y0]=v.year,O._dayOfYear=v.dayOfYear)}p.ISO_8601=function(){},p.RFC_2822=function(){};function c3(O){if(O._f===p.ISO_8601){Lc(O);return}if(O._f===p.RFC_2822){mc(O);return}O._a=[],_(O).empty=!0;var c=""+O._i,t,A,a,d,u,v=c.length,U=0,Z,H0;for(a=xM(O._f,O._locale).match(q2)||[],H0=a.length,t=0;t<H0;t++)d=a[t],A=(c.match(sq(d,O))||[])[0],A&&(u=c.substr(0,c.indexOf(A)),u.length>0&&_(O).unusedInput.push(u),c=c.slice(c.indexOf(A)+A.length),U+=A.length),y1[d]?(A?_(O).empty=!1:_(O).unusedTokens.push(d),Wq(d,A,O)):O._strict&&!A&&_(O).unusedTokens.push(d);_(O).charsLeftOver=v-U,c.length>0&&_(O).unusedInput.push(c),O._a[k0]<=12&&_(O).bigHour===!0&&O._a[k0]>0&&(_(O).bigHour=void 0),_(O).parsedDateParts=O._a.slice(0),_(O).meridiem=O._meridiem,O._a[k0]=ys(O._locale,O._a[k0],O._meridiem),Z=_(O).era,Z!==null&&(O._a[Y0]=O._locale.erasConvertYear(Z,O._a[Y0])),o3(O),p3(O)}function ys(O,c,t){var A;return t==null?c:O.meridiemHour!=null?O.meridiemHour(c,t):(O.isPM!=null&&(A=O.isPM(t),A&&c<12&&(c+=12),!A&&c===12&&(c=0)),c)}function Ts(O){var c,t,A,a,d,u,v=!1,U=O._f.length;if(U===0){_(O).invalidFormat=!0,O._d=new Date(NaN);return}for(a=0;a<U;a++)d=0,u=!1,c=N0({},O),O._useUTC!=null&&(c._useUTC=O._useUTC),c._f=O._f[a],c3(c),y(c)&&(u=!0),d+=_(c).charsLeftOver,d+=_(c).unusedTokens.length*10,_(c).score=d,v?d<A&&(A=d,t=c):(A==null||d<A||u)&&(A=d,t=c,u&&(v=!0));P(O,t||c)}function _s(O){if(!O._d){var c=jb(O._i),t=c.day===void 0?c.date:c.day;O._a=B([c.year,c.month,t,c.hour,c.minute,c.second,c.millisecond],function(A){return A&&parseInt(A,10)}),o3(O)}}function Ss(O){var c=new R0(p3(Nc(O)));return c._nextDay&&(c.add(1,"d"),c._nextDay=void 0),c}function Nc(O){var c=O._i,t=O._f;return O._locale=O._locale||Z1(O._l),c===null||t===void 0&&c===""?G({nullInput:!0}):(typeof c=="string"&&(O._i=c=O._locale.preparse(c)),y0(c)?new R0(p3(c)):(f(c)?O._d=c:e(t)?Ts(O):t?c3(O):vs(O),y(O)||(O._d=null),O))}function vs(O){var c=O._i;i(c)?O._d=new Date(p.now()):f(c)?O._d=new Date(c.valueOf()):typeof c=="string"?Bs(O):e(c)?(O._a=B(c.slice(0),function(t){return parseInt(t,10)}),o3(O)):n(c)?_s(O):l(c)?O._d=new Date(c):p.createFromInputFallback(O)}function Bc(O,c,t,A,a){var d={};return(c===!0||c===!1)&&(A=c,c=void 0),(t===!0||t===!1)&&(A=t,t=void 0),(n(O)&&q(O)||e(O)&&O.length===0)&&(O=void 0),d._isAMomentObject=!0,d._useUTC=d._isUTC=a,d._l=t,d._i=O,d._f=c,d._strict=A,Ss(d)}function W0(O,c,t,A){return Bc(O,c,t,A,!1)}var ws=S0("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var O=W0.apply(null,arguments);return this.isValid()&&O.isValid()?O<this?this:O:G()}),ks=S0("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var O=W0.apply(null,arguments);return this.isValid()&&O.isValid()?O>this?this:O:G()});function gc(O,c){var t,A;if(c.length===1&&e(c[0])&&(c=c[0]),!c.length)return W0();for(t=c[0],A=1;A<c.length;++A)(!c[A].isValid()||c[A][O](t))&&(t=c[A]);return t}function Es(){var O=[].slice.call(arguments,0);return gc("isBefore",O)}function Ds(){var O=[].slice.call(arguments,0);return gc("isAfter",O)}var Cs=function(){return Date.now?Date.now():+new Date},KM=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ps(O){var c,t=!1,A,a=KM.length;for(c in O)if(r(O,c)&&!(T0.call(KM,c)!==-1&&(O[c]==null||!isNaN(O[c]))))return!1;for(A=0;A<a;++A)if(O[KM[A]]){if(t)return!1;parseFloat(O[KM[A]])!==Q(O[KM[A]])&&(t=!0)}return!0}function xs(){return this._isValid}function Is(){return W1(NaN)}function pz(O){var c=jb(O),t=c.year||0,A=c.quarter||0,a=c.month||0,d=c.week||c.isoWeek||0,u=c.day||0,v=c.hour||0,U=c.minute||0,Z=c.second||0,H0=c.millisecond||0;this._isValid=Ps(c),this._milliseconds=+H0+Z*1e3+U*6e4+v*1e3*60*60,this._days=+u+d*7,this._months=+a+A*3+t*12,this._data={},this._locale=Z1(),this._bubble()}function Oz(O){return O instanceof pz}function e3(O){return O<0?Math.round(-1*O)*-1:Math.round(O)}function Ys(O,c,t){var A=Math.min(O.length,c.length),a=Math.abs(O.length-c.length),d=0,u;for(u=0;u<A;u++)Q(O[u])!==Q(c[u])&&d++;return d+a}function Xc(O,c){D(O,0,0,function(){var t=this.utcOffset(),A="+";return t<0&&(t=-t,A="-"),A+b1(~~(t/60),2)+c+b1(~~t%60,2)})}Xc("Z",":"),Xc("ZZ",""),k("Z",Jb),k("ZZ",Jb),a0(["Z","ZZ"],function(O,c,t){t._useUTC=!0,t._tzm=t3(Jb,O)});var Fs=/([\+\-]|\d\d)/gi;function t3(O,c){var t=(c||"").match(O),A,a,d;return t===null?null:(A=t[t.length-1]||[],a=(A+"").match(Fs)||["-",0,0],d=+(a[1]*60)+Q(a[2]),d===0?0:a[0]==="+"?d:-d)}function A3(O,c){var t,A;return c._isUTC?(t=c.clone(),A=(y0(O)||f(O)?O.valueOf():W0(O).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+A),p.updateOffset(t,!1),t):W0(O).local()}function n3(O){return-Math.round(O._d.getTimezoneOffset())}p.updateOffset=function(){};function Us(O,c,t){var A=this._offset||0,a;if(!this.isValid())return O!=null?this:NaN;if(O!=null){if(typeof O=="string"){if(O=t3(Jb,O),O===null)return this}else Math.abs(O)<16&&!t&&(O=O*60);return!this._isUTC&&c&&(a=n3(this)),this._offset=O,this._isUTC=!0,a!=null&&this.add(a,"m"),A!==O&&(!c||this._changeInProgress?Sc(this,W1(O-A,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,p.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?A:n3(this)}function Hs(O,c){return O!=null?(typeof O!="string"&&(O=-O),this.utcOffset(O,c),this):-this.utcOffset()}function js(O){return this.utcOffset(0,O)}function Gs(O){return this._isUTC&&(this.utcOffset(0,O),this._isUTC=!1,O&&this.subtract(n3(this),"m")),this}function Vs(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var O=t3(iq,this._i);O!=null?this.utcOffset(O):this.utcOffset(0,!0)}return this}function Ks(O){return this.isValid()?(O=O?W0(O).utcOffset():0,(this.utcOffset()-O)%60===0):!1}function Qs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Js(){if(!i(this._isDSTShifted))return this._isDSTShifted;var O={},c;return N0(O,this),O=Nc(O),O._a?(c=O._isUTC?E(O._a):W0(O._a),this._isDSTShifted=this.isValid()&&Ys(O._a,c.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Zs(){return this.isValid()?!this._isUTC:!1}function $s(){return this.isValid()?this._isUTC:!1}function yc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var M5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,b5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function W1(O,c){var t=O,A=null,a,d,u;return Oz(O)?t={ms:O._milliseconds,d:O._days,M:O._months}:l(O)||!isNaN(+O)?(t={},c?t[c]=+O:t.milliseconds=+O):(A=M5.exec(O))?(a=A[1]==="-"?-1:1,t={y:0,d:Q(A[T1])*a,h:Q(A[k0])*a,m:Q(A[d1])*a,s:Q(A[Q1])*a,ms:Q(e3(A[_2]*1e3))*a}):(A=b5.exec(O))?(a=A[1]==="-"?-1:1,t={y:S2(A[2],a),M:S2(A[3],a),w:S2(A[4],a),d:S2(A[5],a),h:S2(A[6],a),m:S2(A[7],a),s:S2(A[8],a)}):t==null?t={}:typeof t=="object"&&("from"in t||"to"in t)&&(u=z5(W0(t.from),W0(t.to)),t={},t.ms=u.milliseconds,t.M=u.months),d=new pz(t),Oz(O)&&r(O,"_locale")&&(d._locale=O._locale),Oz(O)&&r(O,"_isValid")&&(d._isValid=O._isValid),d}W1.fn=pz.prototype,W1.invalid=Is;function S2(O,c){var t=O&&parseFloat(O.replace(",","."));return(isNaN(t)?0:t)*c}function Tc(O,c){var t={};return t.months=c.month()-O.month()+(c.year()-O.year())*12,O.clone().add(t.months,"M").isAfter(c)&&--t.months,t.milliseconds=+c-+O.clone().add(t.months,"M"),t}function z5(O,c){var t;return O.isValid()&&c.isValid()?(c=A3(c,O),O.isBefore(c)?t=Tc(O,c):(t=Tc(c,O),t.milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function _c(O,c){return function(t,A){var a,d;return A!==null&&!isNaN(+A)&&(g1(c,"moment()."+c+"(period, number) is deprecated. Please use moment()."+c+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),d=t,t=A,A=d),a=W1(t,A),Sc(this,a,O),this}}function Sc(O,c,t,A){var a=c._milliseconds,d=e3(c._days),u=e3(c._months);O.isValid()&&(A=A??!0,u&&qc(O,UM(O,"Month")+u*t),d&&ac(O,"Date",UM(O,"Date")+d*t),a&&O._d.setTime(O._d.valueOf()+a*t),A&&p.updateOffset(O,d||u))}var p5=_c(1,"add"),O5=_c(-1,"subtract");function vc(O){return typeof O=="string"||O instanceof String}function o5(O){return y0(O)||f(O)||vc(O)||l(O)||e5(O)||c5(O)||O===null||O===void 0}function c5(O){var c=n(O)&&!q(O),t=!1,A=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a,d,u=A.length;for(a=0;a<u;a+=1)d=A[a],t=t||r(O,d);return c&&t}function e5(O){var c=e(O),t=!1;return c&&(t=O.filter(function(A){return!l(A)&&vc(O)}).length===0),c&&t}function t5(O){var c=n(O)&&!q(O),t=!1,A=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],a,d;for(a=0;a<A.length;a+=1)d=A[a],t=t||r(O,d);return c&&t}function A5(O,c){var t=O.diff(c,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"}function n5(O,c){arguments.length===1&&(arguments[0]?o5(arguments[0])?(O=arguments[0],c=void 0):t5(arguments[0])&&(c=arguments[0],O=void 0):(O=void 0,c=void 0));var t=O||W0(),A=A3(t,this).startOf("day"),a=p.calendarFormat(this,A)||"sameElse",d=c&&(B0(c[a])?c[a].call(this,t):c[a]);return this.format(d||this.localeData().calendar(a,this,W0(t)))}function a5(){return new R0(this)}function r5(O,c){var t=y0(O)?O:W0(O);return this.isValid()&&t.isValid()?(c=J(c)||"millisecond",c==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(c).valueOf()):!1}function i5(O,c){var t=y0(O)?O:W0(O);return this.isValid()&&t.isValid()?(c=J(c)||"millisecond",c==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(c).valueOf()<t.valueOf()):!1}function q5(O,c,t,A){var a=y0(O)?O:W0(O),d=y0(c)?c:W0(c);return this.isValid()&&a.isValid()&&d.isValid()?(A=A||"()",(A[0]==="("?this.isAfter(a,t):!this.isBefore(a,t))&&(A[1]===")"?this.isBefore(d,t):!this.isAfter(d,t))):!1}function s5(O,c){var t=y0(O)?O:W0(O),A;return this.isValid()&&t.isValid()?(c=J(c)||"millisecond",c==="millisecond"?this.valueOf()===t.valueOf():(A=t.valueOf(),this.clone().startOf(c).valueOf()<=A&&A<=this.clone().endOf(c).valueOf())):!1}function d5(O,c){return this.isSame(O,c)||this.isAfter(O,c)}function W5(O,c){return this.isSame(O,c)||this.isBefore(O,c)}function l5(O,c,t){var A,a,d;if(!this.isValid())return NaN;if(A=A3(O,this),!A.isValid())return NaN;switch(a=(A.utcOffset()-this.utcOffset())*6e4,c=J(c),c){case"year":d=oz(this,A)/12;break;case"month":d=oz(this,A);break;case"quarter":d=oz(this,A)/3;break;case"second":d=(this-A)/1e3;break;case"minute":d=(this-A)/6e4;break;case"hour":d=(this-A)/36e5;break;case"day":d=(this-A-a)/864e5;break;case"week":d=(this-A-a)/6048e5;break;default:d=this-A}return t?d:t1(d)}function oz(O,c){if(O.date()<c.date())return-oz(c,O);var t=(c.year()-O.year())*12+(c.month()-O.month()),A=O.clone().add(t,"months"),a,d;return c-A<0?(a=O.clone().add(t-1,"months"),d=(c-A)/(A-a)):(a=O.clone().add(t+1,"months"),d=(c-A)/(a-A)),-(t+d)||0}p.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",p.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function f5(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function u5(O){if(!this.isValid())return null;var c=O!==!0,t=c?this.clone().utc():this;return t.year()<0||t.year()>9999?I0(t,c?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):B0(Date.prototype.toISOString)?c?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",I0(t,"Z")):I0(t,c?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function R5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var O="moment",c="",t,A,a,d;return this.isLocal()||(O=this.utcOffset()===0?"moment.utc":"moment.parseZone",c="Z"),t="["+O+'("]',A=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",d=c+'[")]',this.format(t+A+a+d)}function h5(O){O||(O=this.isUtc()?p.defaultFormatUtc:p.defaultFormat);var c=I0(this,O);return this.localeData().postformat(c)}function L5(O,c){return this.isValid()&&(y0(O)&&O.isValid()||W0(O).isValid())?W1({to:this,from:O}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()}function m5(O){return this.from(W0(),O)}function N5(O,c){return this.isValid()&&(y0(O)&&O.isValid()||W0(O).isValid())?W1({from:this,to:O}).locale(this.locale()).humanize(!c):this.localeData().invalidDate()}function B5(O){return this.to(W0(),O)}function wc(O){var c;return O===void 0?this._locale._abbr:(c=Z1(O),c!=null&&(this._locale=c),this)}var kc=S0("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(O){return O===void 0?this.localeData():this.locale(O)});function Ec(){return this._locale}var cz=1e3,cM=60*cz,ez=60*cM,Dc=(365*400+97)*24*ez;function eM(O,c){return(O%c+c)%c}function Cc(O,c,t){return O<100&&O>=0?new Date(O+400,c,t)-Dc:new Date(O,c,t).valueOf()}function Pc(O,c,t){return O<100&&O>=0?Date.UTC(O+400,c,t)-Dc:Date.UTC(O,c,t)}function g5(O){var c,t;if(O=J(O),O===void 0||O==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?Pc:Cc,O){case"year":c=t(this.year(),0,1);break;case"quarter":c=t(this.year(),this.month()-this.month()%3,1);break;case"month":c=t(this.year(),this.month(),1);break;case"week":c=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":c=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":c=t(this.year(),this.month(),this.date());break;case"hour":c=this._d.valueOf(),c-=eM(c+(this._isUTC?0:this.utcOffset()*cM),ez);break;case"minute":c=this._d.valueOf(),c-=eM(c,cM);break;case"second":c=this._d.valueOf(),c-=eM(c,cz);break}return this._d.setTime(c),p.updateOffset(this,!0),this}function X5(O){var c,t;if(O=J(O),O===void 0||O==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?Pc:Cc,O){case"year":c=t(this.year()+1,0,1)-1;break;case"quarter":c=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":c=t(this.year(),this.month()+1,1)-1;break;case"week":c=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":c=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":c=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":c=this._d.valueOf(),c+=ez-eM(c+(this._isUTC?0:this.utcOffset()*cM),ez)-1;break;case"minute":c=this._d.valueOf(),c+=cM-eM(c,cM)-1;break;case"second":c=this._d.valueOf(),c+=cz-eM(c,cz)-1;break}return this._d.setTime(c),p.updateOffset(this,!0),this}function y5(){return this._d.valueOf()-(this._offset||0)*6e4}function T5(){return Math.floor(this.valueOf()/1e3)}function _5(){return new Date(this.valueOf())}function S5(){var O=this;return[O.year(),O.month(),O.date(),O.hour(),O.minute(),O.second(),O.millisecond()]}function v5(){var O=this;return{years:O.year(),months:O.month(),date:O.date(),hours:O.hours(),minutes:O.minutes(),seconds:O.seconds(),milliseconds:O.milliseconds()}}function w5(){return this.isValid()?this.toISOString():null}function k5(){return y(this)}function E5(){return P({},_(this))}function D5(){return _(this).overflow}function C5(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),k("N",a3),k("NN",a3),k("NNN",a3),k("NNNN",K5),k("NNNNN",Q5),a0(["N","NN","NNN","NNNN","NNNNN"],function(O,c,t,A){var a=t._locale.erasParse(O,A,t._strict);a?_(t).era=a:_(t).invalidEra=O}),k("y",zM),k("yy",zM),k("yyy",zM),k("yyyy",zM),k("yo",J5),a0(["y","yy","yyy","yyyy"],Y0),a0(["yo"],function(O,c,t,A){var a;t._locale._eraYearOrdinalRegex&&(a=O.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?c[Y0]=t._locale.eraYearOrdinalParse(O,a):c[Y0]=parseInt(O,10)});function P5(O,c){var t,A,a,d=this._eras||Z1("en")._eras;for(t=0,A=d.length;t<A;++t){switch(typeof d[t].since){case"string":a=p(d[t].since).startOf("day"),d[t].since=a.valueOf();break}switch(typeof d[t].until){case"undefined":d[t].until=1/0;break;case"string":a=p(d[t].until).startOf("day").valueOf(),d[t].until=a.valueOf();break}}return d}function x5(O,c,t){var A,a,d=this.eras(),u,v,U;for(O=O.toUpperCase(),A=0,a=d.length;A<a;++A)if(u=d[A].name.toUpperCase(),v=d[A].abbr.toUpperCase(),U=d[A].narrow.toUpperCase(),t)switch(c){case"N":case"NN":case"NNN":if(v===O)return d[A];break;case"NNNN":if(u===O)return d[A];break;case"NNNNN":if(U===O)return d[A];break}else if([u,v,U].indexOf(O)>=0)return d[A]}function I5(O,c){var t=O.since<=O.until?1:-1;return c===void 0?p(O.since).year():p(O.since).year()+(c-O.offset)*t}function Y5(){var O,c,t,A=this.localeData().eras();for(O=0,c=A.length;O<c;++O)if(t=this.clone().startOf("day").valueOf(),A[O].since<=t&&t<=A[O].until||A[O].until<=t&&t<=A[O].since)return A[O].name;return""}function F5(){var O,c,t,A=this.localeData().eras();for(O=0,c=A.length;O<c;++O)if(t=this.clone().startOf("day").valueOf(),A[O].since<=t&&t<=A[O].until||A[O].until<=t&&t<=A[O].since)return A[O].narrow;return""}function U5(){var O,c,t,A=this.localeData().eras();for(O=0,c=A.length;O<c;++O)if(t=this.clone().startOf("day").valueOf(),A[O].since<=t&&t<=A[O].until||A[O].until<=t&&t<=A[O].since)return A[O].abbr;return""}function H5(){var O,c,t,A,a=this.localeData().eras();for(O=0,c=a.length;O<c;++O)if(t=a[O].since<=a[O].until?1:-1,A=this.clone().startOf("day").valueOf(),a[O].since<=A&&A<=a[O].until||a[O].until<=A&&A<=a[O].since)return(this.year()-p(a[O].since).year())*t+a[O].offset;return this.year()}function j5(O){return r(this,"_erasNameRegex")||r3.call(this),O?this._erasNameRegex:this._erasRegex}function G5(O){return r(this,"_erasAbbrRegex")||r3.call(this),O?this._erasAbbrRegex:this._erasRegex}function V5(O){return r(this,"_erasNarrowRegex")||r3.call(this),O?this._erasNarrowRegex:this._erasRegex}function a3(O,c){return c.erasAbbrRegex(O)}function K5(O,c){return c.erasNameRegex(O)}function Q5(O,c){return c.erasNarrowRegex(O)}function J5(O,c){return c._eraYearOrdinalRegex||zM}function r3(){var O=[],c=[],t=[],A=[],a,d,u,v,U,Z=this.eras();for(a=0,d=Z.length;a<d;++a)u=V1(Z[a].name),v=V1(Z[a].abbr),U=V1(Z[a].narrow),c.push(u),O.push(v),t.push(U),A.push(u),A.push(v),A.push(U);this._erasRegex=new RegExp("^("+A.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+c.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+O.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}D(0,["gg",2],0,function(){return this.weekYear()%100}),D(0,["GG",2],0,function(){return this.isoWeekYear()%100});function tz(O,c){D(0,[O,O.length],0,c)}tz("gggg","weekYear"),tz("ggggg","weekYear"),tz("GGGG","isoWeekYear"),tz("GGGGG","isoWeekYear"),k("G",Qb),k("g",Qb),k("GG",d0,z1),k("gg",d0,z1),k("GGGG",Kp,Vp),k("gggg",Kp,Vp),k("GGGGG",Kb,Gb),k("ggggg",Kb,Gb),YM(["gggg","ggggg","GGGG","GGGGG"],function(O,c,t,A){c[A.substr(0,2)]=Q(O)}),YM(["gg","GG"],function(O,c,t,A){c[A]=p.parseTwoDigitYear(O)});function Z5(O){return xc.call(this,O,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function $5(O){return xc.call(this,O,this.isoWeek(),this.isoWeekday(),1,4)}function Md(){return J1(this.year(),1,4)}function bd(){return J1(this.isoWeekYear(),1,4)}function zd(){var O=this.localeData()._week;return J1(this.year(),O.dow,O.doy)}function pd(){var O=this.localeData()._week;return J1(this.weekYear(),O.dow,O.doy)}function xc(O,c,t,A,a){var d;return O==null?jM(this,A,a).year:(d=J1(O,A,a),c>d&&(c=d),Od.call(this,O,c,t,A,a))}function Od(O,c,t,A,a){var d=Wc(O,c,t,A,a),u=HM(d.year,0,d.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}D("Q",0,"Qo","quarter"),k("Q",cc),a0("Q",function(O,c){c[K1]=(Q(O)-1)*3});function od(O){return O==null?Math.ceil((this.month()+1)/3):this.month((O-1)*3+this.month()%3)}D("D",["DD",2],"Do","date"),k("D",d0,pM),k("DD",d0,z1),k("Do",function(O,c){return O?c._dayOfMonthOrdinalParse||c._ordinalParse:c._dayOfMonthOrdinalParseLenient}),a0(["D","DD"],T1),a0("Do",function(O,c){c[T1]=Q(O.match(d0)[0])});var Ic=OM("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),k("DDD",Vb),k("DDDD",ec),a0(["DDD","DDDD"],function(O,c,t){t._dayOfYear=Q(O)});function cd(O){var c=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return O==null?c:this.add(O-c,"d")}D("m",["mm",2],0,"minute"),k("m",d0,Qp),k("mm",d0,z1),a0(["m","mm"],d1);var ed=OM("Minutes",!1);D("s",["ss",2],0,"second"),k("s",d0,Qp),k("ss",d0,z1),a0(["s","ss"],Q1);var td=OM("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return this.millisecond()*10}),D(0,["SSSSS",5],0,function(){return this.millisecond()*100}),D(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),D(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),D(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),D(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),k("S",Vb,cc),k("SS",Vb,z1),k("SSS",Vb,ec);var W2,Yc;for(W2="SSSS";W2.length<=9;W2+="S")k(W2,zM);function Ad(O,c){c[_2]=Q(("0."+O)*1e3)}for(W2="S";W2.length<=9;W2+="S")a0(W2,Ad);Yc=OM("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");function nd(){return this._isUTC?"UTC":""}function ad(){return this._isUTC?"Coordinated Universal Time":""}var N=R0.prototype;N.add=p5,N.calendar=n5,N.clone=a5,N.diff=l5,N.endOf=X5,N.format=h5,N.from=L5,N.fromNow=m5,N.to=N5,N.toNow=B5,N.get=Rq,N.invalidAt=D5,N.isAfter=r5,N.isBefore=i5,N.isBetween=q5,N.isSame=s5,N.isSameOrAfter=d5,N.isSameOrBefore=W5,N.isValid=k5,N.lang=kc,N.locale=wc,N.localeData=Ec,N.max=ks,N.min=ws,N.parsingFlags=E5,N.set=hq,N.startOf=g5,N.subtract=O5,N.toArray=S5,N.toObject=v5,N.toDate=_5,N.toISOString=u5,N.inspect=R5,typeof Symbol<"u"&&Symbol.for!=null&&(N[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),N.toJSON=w5,N.toString=f5,N.unix=T5,N.valueOf=y5,N.creationData=C5,N.eraName=Y5,N.eraNarrow=F5,N.eraAbbr=U5,N.eraYear=H5,N.year=nc,N.isLeapYear=uq,N.weekYear=Z5,N.isoWeekYear=$5,N.quarter=N.quarters=od,N.month=sc,N.daysInMonth=_q,N.week=N.weeks=Pq,N.isoWeek=N.isoWeeks=xq,N.weeksInYear=zd,N.weeksInWeekYear=pd,N.isoWeeksInYear=Md,N.isoWeeksInISOWeekYear=bd,N.date=Ic,N.day=N.days=$q,N.weekday=Ms,N.isoWeekday=bs,N.dayOfYear=cd,N.hour=N.hours=ts,N.minute=N.minutes=ed,N.second=N.seconds=td,N.millisecond=N.milliseconds=Yc,N.utcOffset=Us,N.utc=js,N.local=Gs,N.parseZone=Vs,N.hasAlignedHourOffset=Ks,N.isDST=Qs,N.isLocal=Zs,N.isUtcOffset=$s,N.isUtc=yc,N.isUTC=yc,N.zoneAbbr=nd,N.zoneName=ad,N.dates=S0("dates accessor is deprecated. Use date instead.",Ic),N.months=S0("months accessor is deprecated. Use month instead",sc),N.years=S0("years accessor is deprecated. Use year instead",nc),N.zone=S0("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Hs),N.isDSTShifted=S0("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Js);function rd(O){return W0(O*1e3)}function id(){return W0.apply(null,arguments).parseZone()}function Fc(O){return O}var e0=h0.prototype;e0.calendar=bM,e0.longDateFormat=Gp,e0.invalidDate=W,e0.ordinal=X,e0.preparse=Fc,e0.postformat=Fc,e0.relativeTime=M0,e0.pastFuture=g0,e0.set=U0,e0.eras=P5,e0.erasParse=x5,e0.erasConvertYear=I5,e0.erasAbbrRegex=G5,e0.erasNameRegex=j5,e0.erasNarrowRegex=V5,e0.months=gq,e0.monthsShort=Xq,e0.monthsParse=Tq,e0.monthsRegex=vq,e0.monthsShortRegex=Sq,e0.week=kq,e0.firstDayOfYear=Cq,e0.firstDayOfWeek=Dq,e0.weekdays=Vq,e0.weekdaysMin=Qq,e0.weekdaysShort=Kq,e0.weekdaysParse=Zq,e0.weekdaysRegex=zs,e0.weekdaysShortRegex=ps,e0.weekdaysMinRegex=Os,e0.isPM=cs,e0.meridiem=As;function Az(O,c,t,A){var a=Z1(),d=E().set(A,c);return a[t](d,O)}function Uc(O,c,t){if(l(O)&&(c=O,O=void 0),O=O||"",c!=null)return Az(O,c,t,"month");var A,a=[];for(A=0;A<12;A++)a[A]=Az(O,A,t,"month");return a}function i3(O,c,t,A){typeof O=="boolean"?(l(c)&&(t=c,c=void 0),c=c||""):(c=O,t=c,O=!1,l(c)&&(t=c,c=void 0),c=c||"");var a=Z1(),d=O?a._week.dow:0,u,v=[];if(t!=null)return Az(c,(t+d)%7,A,"day");for(u=0;u<7;u++)v[u]=Az(c,(u+d)%7,A,"day");return v}function qd(O,c){return Uc(O,c,"months")}function sd(O,c){return Uc(O,c,"monthsShort")}function dd(O,c,t){return i3(O,c,t,"weekdays")}function Wd(O,c,t){return i3(O,c,t,"weekdaysShort")}function ld(O,c,t){return i3(O,c,t,"weekdaysMin")}d2("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(O){var c=O%10,t=Q(O%100/10)===1?"th":c===1?"st":c===2?"nd":c===3?"rd":"th";return O+t}}),p.lang=S0("moment.lang is deprecated. Use moment.locale instead.",d2),p.langData=S0("moment.langData is deprecated. Use moment.localeData instead.",Z1);var $1=Math.abs;function fd(){var O=this._data;return this._milliseconds=$1(this._milliseconds),this._days=$1(this._days),this._months=$1(this._months),O.milliseconds=$1(O.milliseconds),O.seconds=$1(O.seconds),O.minutes=$1(O.minutes),O.hours=$1(O.hours),O.months=$1(O.months),O.years=$1(O.years),this}function Hc(O,c,t,A){var a=W1(c,t);return O._milliseconds+=A*a._milliseconds,O._days+=A*a._days,O._months+=A*a._months,O._bubble()}function ud(O,c){return Hc(this,O,c,1)}function Rd(O,c){return Hc(this,O,c,-1)}function jc(O){return O<0?Math.floor(O):Math.ceil(O)}function hd(){var O=this._milliseconds,c=this._days,t=this._months,A=this._data,a,d,u,v,U;return O>=0&&c>=0&&t>=0||O<=0&&c<=0&&t<=0||(O+=jc(q3(t)+c)*864e5,c=0,t=0),A.milliseconds=O%1e3,a=t1(O/1e3),A.seconds=a%60,d=t1(a/60),A.minutes=d%60,u=t1(d/60),A.hours=u%24,c+=t1(u/24),U=t1(Gc(c)),t+=U,c-=jc(q3(U)),v=t1(t/12),t%=12,A.days=c,A.months=t,A.years=v,this}function Gc(O){return O*4800/146097}function q3(O){return O*146097/4800}function Ld(O){if(!this.isValid())return NaN;var c,t,A=this._milliseconds;if(O=J(O),O==="month"||O==="quarter"||O==="year")switch(c=this._days+A/864e5,t=this._months+Gc(c),O){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(c=this._days+Math.round(q3(this._months)),O){case"week":return c/7+A/6048e5;case"day":return c+A/864e5;case"hour":return c*24+A/36e5;case"minute":return c*1440+A/6e4;case"second":return c*86400+A/1e3;case"millisecond":return Math.floor(c*864e5)+A;default:throw new Error("Unknown unit "+O)}}function M2(O){return function(){return this.as(O)}}var Vc=M2("ms"),md=M2("s"),Nd=M2("m"),Bd=M2("h"),gd=M2("d"),Xd=M2("w"),yd=M2("M"),Td=M2("Q"),_d=M2("y"),Sd=Vc;function vd(){return W1(this)}function wd(O){return O=J(O),this.isValid()?this[O+"s"]():NaN}function v2(O){return function(){return this.isValid()?this._data[O]:NaN}}var kd=v2("milliseconds"),Ed=v2("seconds"),Dd=v2("minutes"),Cd=v2("hours"),Pd=v2("days"),xd=v2("months"),Id=v2("years");function Yd(){return t1(this.days()/7)}var b2=Math.round,tM={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Fd(O,c,t,A,a){return a.relativeTime(c||1,!!t,O,A)}function Ud(O,c,t,A){var a=W1(O).abs(),d=b2(a.as("s")),u=b2(a.as("m")),v=b2(a.as("h")),U=b2(a.as("d")),Z=b2(a.as("M")),H0=b2(a.as("w")),z2=b2(a.as("y")),l2=d<=t.ss&&["s",d]||d<t.s&&["ss",d]||u<=1&&["m"]||u<t.m&&["mm",u]||v<=1&&["h"]||v<t.h&&["hh",v]||U<=1&&["d"]||U<t.d&&["dd",U];return t.w!=null&&(l2=l2||H0<=1&&["w"]||H0<t.w&&["ww",H0]),l2=l2||Z<=1&&["M"]||Z<t.M&&["MM",Z]||z2<=1&&["y"]||["yy",z2],l2[2]=c,l2[3]=+O>0,l2[4]=A,Fd.apply(null,l2)}function Hd(O){return O===void 0?b2:typeof O=="function"?(b2=O,!0):!1}function jd(O,c){return tM[O]===void 0?!1:c===void 0?tM[O]:(tM[O]=c,O==="s"&&(tM.ss=c-1),!0)}function Gd(O,c){if(!this.isValid())return this.localeData().invalidDate();var t=!1,A=tM,a,d;return typeof O=="object"&&(c=O,O=!1),typeof O=="boolean"&&(t=O),typeof c=="object"&&(A=Object.assign({},tM,c),c.s!=null&&c.ss==null&&(A.ss=c.s-1)),a=this.localeData(),d=Ud(this,!t,A,a),t&&(d=a.pastFuture(+this,d)),a.postformat(d)}var s3=Math.abs;function AM(O){return(O>0)-(O<0)||+O}function nz(){if(!this.isValid())return this.localeData().invalidDate();var O=s3(this._milliseconds)/1e3,c=s3(this._days),t=s3(this._months),A,a,d,u,v=this.asSeconds(),U,Z,H0,z2;return v?(A=t1(O/60),a=t1(A/60),O%=60,A%=60,d=t1(t/12),t%=12,u=O?O.toFixed(3).replace(/\.?0+$/,""):"",U=v<0?"-":"",Z=AM(this._months)!==AM(v)?"-":"",H0=AM(this._days)!==AM(v)?"-":"",z2=AM(this._milliseconds)!==AM(v)?"-":"",U+"P"+(d?Z+d+"Y":"")+(t?Z+t+"M":"")+(c?H0+c+"D":"")+(a||A||O?"T":"")+(a?z2+a+"H":"")+(A?z2+A+"M":"")+(O?z2+u+"S":"")):"P0D"}var b0=pz.prototype;b0.isValid=xs,b0.abs=fd,b0.add=ud,b0.subtract=Rd,b0.as=Ld,b0.asMilliseconds=Vc,b0.asSeconds=md,b0.asMinutes=Nd,b0.asHours=Bd,b0.asDays=gd,b0.asWeeks=Xd,b0.asMonths=yd,b0.asQuarters=Td,b0.asYears=_d,b0.valueOf=Sd,b0._bubble=hd,b0.clone=vd,b0.get=wd,b0.milliseconds=kd,b0.seconds=Ed,b0.minutes=Dd,b0.hours=Cd,b0.days=Pd,b0.weeks=Yd,b0.months=xd,b0.years=Id,b0.humanize=Gd,b0.toISOString=nz,b0.toString=nz,b0.toJSON=nz,b0.locale=wc,b0.localeData=Ec,b0.toIsoString=S0("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nz),b0.lang=kc,D("X",0,0,"unix"),D("x",0,0,"valueOf"),k("x",Qb),k("X",qq),a0("X",function(O,c,t){t._d=new Date(parseFloat(O)*1e3)}),a0("x",function(O,c,t){t._d=new Date(Q(O))});//! moment.js
|
|
592
592
|
return p.version="2.30.1",o(W0),p.fn=N,p.min=Es,p.max=Ds,p.now=Cs,p.utc=E,p.unix=rd,p.months=qd,p.isDate=f,p.locale=d2,p.invalid=G,p.duration=W1,p.isMoment=y0,p.weekdays=dd,p.parseZone=id,p.localeData=Z1,p.isDuration=Oz,p.monthsShort=sd,p.weekdaysMin=ld,p.defineLocale=z3,p.updateLocale=is,p.locales=qs,p.weekdaysShort=Wd,p.normalizeUnits=J,p.relativeTimeRounding=Hd,p.relativeTimeThreshold=jd,p.calendarFormat=A5,p.prototype=N,p.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},p})}(jp)),jp.exports}(function(M,b){(function(z,p){p(typeof Jo=="function"?qi():z.moment)})(rp,function(z){//! moment.js locale configuration
|
|
593
|
-
var p=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,o=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,e=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],r=z.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:e,monthsShortRegex:e,monthsStrictRegex:p,monthsShortStrictRegex:o,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(q,i){switch(i){case"D":return q+(q===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return q+(q===1?"er":"e");case"w":case"W":return q+(q===1?"re":"e")}},week:{dow:1,doy:4}});return r})})();function $2(M,b=!0){if(!M)return null;let z=M.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return b?z.toLowerCase():z}function si(M,b="DD/MM/YYYY"){return s1.unix(M).isValid()?s1.unix(M).format(b):M}const $o=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)?$/;function di(M,b){const z=M.replace(/\d+/g,o=>(+o+1e5).toString()),p=b.replace(/\d+/g,o=>(+o+1e5).toString());return z.localeCompare(p)}function Mc(M){return M!=null&&M!==""&&!isNaN(M)}function bc(M){return M&&s1(M,"DD/MM/YYYY",!0).isValid()}function zc(M){return typeof M=="boolean"}function Wi(M,b,z){const e=(M?1:0)-(b?1:0);return z?-e:e}function li(M,b){const z=(M==null||M==="")&&typeof M!="boolean",p=(b==null||b==="")&&typeof b!="boolean";return z&&p?0:z?1:p?-1:null}function pc(M){return typeof M=="string"&&M.includes("€")}function fi(M,b,z){const p=parseFloat(M.replace("€","").replace(",",".").replace(/\s/g,"").trim()),o=parseFloat(b.replace("€","").replace(",",".").replace(/\s/g,"").trim());if(isNaN(p)&&isNaN(o))return 0;if(isNaN(p))return 1;if(isNaN(o))return-1;const e=p-o;return z?e:-e}function ui(M,b,z){const p=li(M,b);if(p!==null)return p;if(zc(M)&&zc(b))return Wi(M,b,z);if($o.test(M)&&$o.test(b)){const r=di(M,b);return z?r:-r}if(Mc(M)&&Mc(b)){const r=parseFloat(M),q=parseFloat(b);return z?r-q:q-r}if(bc(M)&&bc(b)){const r=s1(M,"DD/MM/YYYY").unix(),q=s1(b,"DD/MM/YYYY").unix();return z?r-q:q-r}if(pc(M)&&pc(b))return fi(M,b,z);const o=typeof M=="string"?$2(M).toLowerCase():$2(String(M)).toLowerCase(),e=typeof b=="string"?$2(b).toLowerCase():$2(String(b)).toLowerCase(),n=o.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"});return z?n:-n}function Ri(M,b,z=!1){return!M||!Array.isArray(M)?M:M.sort((p,o)=>{const e=p==null?void 0:p[b],n=o==null?void 0:o[b];return ui(e,n,z)})}function hi(M,b,z=!1,p){return!M||!Array.isArray(M)?M:M.sort((o,e)=>{const n=o==null?void 0:o[b],r=e==null?void 0:e[b];return p(n,r,z)})}function Oc(M,b){let z=y2(M);if(!z)z={columns:b};else if(!z.columns)z.columns=b;else{let p=b.filter(function(e){return!z.columns.some(function(n){return n.id===e.id})});z.columns=z.columns.concat(p);let o=z.columns.filter(function(e){return!b.some(function(n){return e.id===n.id})});z.columns=z.columns.filter(function(e){return!o.some(function(n){return e.id===n.id})}),z.columns.filter(e=>{for(let n of b)n.id===e.id&&n.libelle!==e.libelle&&(e.libelle=n.libelle)})}MM(M,z)}function Li(M,b,z=null){let p=y2(M);p?z&&!p[z]&&(p[z]=b):z?(p={},p[z]=b):p=b,MM(M,p)}function y2(M){return JSON.parse(window.localStorage.getItem(M))}function MM(M,b,z=null){let p=y2(M);return z?p[z]=b:p=b,window.localStorage.setItem(M,JSON.stringify(p))}const mi=(M,b)=>{const z=M.__vccOpts||M;for(const[p,o]of b)z[p]=o;return z};jt.add(qA,aA,rA,fA,sA,WA,lA,dA,iA);const Ni={name:"AmsomTableDraggable",components:{VueDraggableNext:on,FontAwesomeIcon:nA},props:{defaultColumns:{type:Array,require:!0,default:null},dynamicColumns:{type:Array,default:null},localStorageItemName:{type:String,default:null},localStorageMaxItemPerPageName:{type:String,default:null},tdItemsList:{type:[Array,Object],require:!0,default:null},search:{type:String,default:null},pickedDate:{type:Array,default:null},columnNameDateFilter:{type:Array,default:null},maxItemPerPage:{type:Number,default:-1},maxItemPerPageList:{type:Array,default:()=>[{value:5,text:"5"},{value:10,text:"10"},{value:15,text:"15"},{value:25,text:"25"},{value:50,text:"50"},{value:100,text:"100"},{value:500,text:"500"},{value:1e3,text:"1000"},{value:-1,text:"Tous"}]},showMaxItemPerPageBtn:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},showModifyColumnsBtn:{type:Boolean,default:!1},showLineNumber:{type:Boolean,default:!1},ghostClass:{type:String,default:"bg-success"},headerBgColor:{type:String,default:"bg-white"},headerTextColor:{type:String,default:"text-primary"},lineEditMode:{type:Boolean,default:!1},border:{type:Boolean,default:!1},tableSm:{type:Boolean,default:!1},deepSorts:{type:Boolean,default:!1},deepSortsListPreset:{type:Array,default:null},ckSelectedItems:{type:Array,default:null},lineStatesList:{type:Array,default:()=>[{state:"add",class:"addLineState"},{state:"delete",class:"deleteLineState"},{state:"update",class:"updateLineState"}]},stickyScrollbarHorizontal:{type:Boolean,default:!1},paginationPosition:{type:String,default:"left",validator(M){return["left","center","right"].includes(M)}},trFontSize:{type:String,default:"fs-6"},trHeightPx:{type:Number,default:60},noValueText:{type:String,default:"Aucune valeur"}},emits:["changeSubject","lineEditModeAddNewLine","update:ckSelectedItems","update:dynamicColumns","update:deepSortsListPreset"],data(){return{checkAllCheckBox:!1,isDragging:!1,sortKey:null,sortAsc:!1,currentPage:1,previousCurrentPage:1,selectedItems:[],currentHeaderSort:null,headerEditMode:!1,totalPages:null,columns:this.copyDefaultColumns(),maxItemsPerPage:this.getDefaultMaxItemPerPage(),forceTableUpdateIndex:0,resizeObserver:null,showScrollbar:!1,tableContainer:null,deepSortsList:[]}},computed:{currentDisplayPagination(){let M=[];return this.totalPages<=1?M:(this.currentPage===1?M=[1,2,3]:this.currentPage===this.totalPages?M=[this.totalPages-2,this.totalPages-1,this.totalPages]:M=[this.currentPage-1,this.currentPage,this.currentPage+1],M.filter(b=>b>=1&&b<=this.totalPages))},items(){return this.tdItemsList?this.tdItemsList:[]},showItemsLinesNumber(){return this.showeditems.length},dateFilterBounds(){return!this.pickedDate||!this.pickedDate[0]||!this.pickedDate[1]?null:{deb:s1(this.pickedDate[0]).set({hour:0,minute:0}).unix(),fin:s1(this.pickedDate[1]).set({hour:23,minute:59}).unix()}},normalizedSearch(){return this.search?$2(this.search):""},hasDateFilter(){return this.dateFilterBounds&&Array.isArray(this.columnNameDateFilter)&&this.columnNameDateFilter.length>0},filtereditems(){if(!this.items)return[];const M=this.normalizedSearch,b=this.hasDateFilter,z=this.dateFilterBounds;return this.items.filter(p=>{const o=this.filterBy(p,M);if(b){const e=this.columnNameDateFilter.some(n=>{const r=p[n];if(r){const q=s1(r,"DD/MM/YYYY").unix();return q>=z.deb&&q<=z.fin}return!1});return o&&e}return o})},sortedItems(){if(!this.filtereditems)return[];const M=this.columns.find(b=>b.id===this.sortKey);return this.deepSorts&&this.deepSortsList.length>0?this.deepSortsColumnList(this.deepSortsList,[...this.filtereditems]):this.sortKey&&M&&M.customSort?hi([...this.filtereditems],this.sortKey,this.sortAsc,M.customSort):this.sortKey?Ri([...this.filtereditems],this.sortKey,this.sortAsc):this.filtereditems},showeditems(){const M=this.sortedItems;if(this.maxItemsPerPage===-1)return M;const b=(this.currentPage-1)*this.maxItemsPerPage,z=this.currentPage*this.maxItemsPerPage;return M.slice(b,z)},deepSortsListComputed(){return this.deepSortsList}},watch:{ckSelectedItems:{handler(M){M&&(this.selectedItems=M)},immediate:!0},dynamicColumns:{handler(M){M&&(this.columns=this.getColumnsById(M,this.defaultColumns))},immediate:!0},columns:function(M){this.localStorageItemName!==null&&MM(this.localStorageItemName,this.getRefactoColumns(M),"columns"),this.dynamicColumns&&this.$emit("update:dynamicColumns",this.getRefactoColumns(M)),this.forceTableUpdateIndex+=1},headerEditMode:function(M){var b;if(M)this.maxItemsPerPage=3;else{const z=this.localStorageMaxItemPerPageName!==null?y2(this.localStorageMaxItemPerPageName):this.localStorageItemName!==null?(b=y2(this.localStorageItemName))==null?void 0:b.maxItemPerPage:void 0;this.maxItemsPerPage=z??this.maxItemPerPage}},sortedItems:{handler(M){this.totalPages=this.newTotalPage(M.length)},immediate:!0},maxItemPerPage:{handler(M){M!==this.maxItemsPerPage&&(this.maxItemsPerPage=M)},immediate:!0},maxItemsPerPage:function(M){this.localStorageItemName!==null&&!this.headerEditMode&&MM(this.localStorageItemName,M,"maxItemPerPage"),this.localStorageMaxItemPerPageName!==null&&!this.headerEditMode&&MM(this.localStorageMaxItemPerPageName,M),this.currentPage!==1&&(this.currentPage=1),this.totalPages=this.newTotalPage(this.filtereditems.length)},search:{handler(M,b){M!==b&&this.currentPage>1&&this.$nextTick(()=>{this.adjustPageAfterSearch()})},immediate:!1},showeditems:{handler(M){M.length===0&&this.filtereditems.length>0&&this.currentPage>1&&this.adjustPageAfterSearch(),this.checkAllCheckBox=this.showeditems.every(b=>this.selectedItems.includes(b.id)),this.totalPages=this.newTotalPage(this.filtereditems.length)},flush:"post"},deepSortsList:{handler(M){M&&M.length>0&&this.$emit("update:deepSortsListPreset",M)},deep:!0},deepSortsListPreset:{handler(M){M&&M.length>0&&JSON.stringify(M)!==JSON.stringify(this.deepSortsList)&&(this.deepSortsList=[...M])},deep:!0,immediate:!0}},mounted(){var M;if(this.localStorageItemName!==null){Oc(this.localStorageItemName,this.getRefactoColumns(this.copyDefaultColumns())),Li(this.localStorageItemName,this.maxItemPerPage,"maxItemPerPage");let b=y2(this.localStorageItemName);b&&(this.columns=this.getColumnsById(b.columns,this.defaultColumns),this.maxItemsPerPage=b.maxItemPerPage)}if(this.localStorageMaxItemPerPageName!==null){let b=y2(this.localStorageMaxItemPerPageName);b&&(this.maxItemsPerPage=b)}this.dynamicColumns&&(this.columns=this.getColumnsById(this.dynamicColumns,this.defaultColumns)),this.ckSelectedItems&&(this.selectedItems=this.ckSelectedItems),this.totalPages=this.newTotalPage(this.filtereditems.length),this.initResizeObserver(),this.deepSortsListPreset&&this.deepSortsListPreset.length>0&&this.deepSorts&&(this.deepSortsList=this.deepSortsListPreset),this.stickyScrollbarHorizontal&&(this.checkTableOverflow(),window.addEventListener("resize",this.checkTableOverflow),window.addEventListener("scroll",this.handleTableScroll)),this.tableContainer=(M=this.$refs.table)==null?void 0:M.closest(".overflow-x-auto")},beforeUnmount(){this.cleanupResizeObserver(),window.removeEventListener("resize",this.checkTableOverflow),window.removeEventListener("scroll",this.handleTableScroll)},methods:{moment:s1,unixToDateString:si,getRefactoColumns(M){return JSON.parse(JSON.stringify(M)).map(z=>({id:z.id,show:z.show}))},getColumnsById(M,b){return M.map(z=>({...b.find(o=>o.id===z.id),show:z.show}))},adjustPageAfterSearch(){if(this.filtereditems.length>0&&this.showeditems.length===0){const M=Math.ceil(this.filtereditems.length/this.maxItemsPerPage);M>0&&M!==this.currentPage&&(this.currentPage=M)}else this.filtereditems.length===0&&(this.currentPage=1)},initResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.updateStickyColumns()});const M=this.$refs.table;M&&this.resizeObserver.observe(M)},handleTableScroll(){this.tableContainer&&(Math.ceil(window.scrollY+window.innerHeight)>=this.tableContainer.scrollHeight?this.showScrollbar=!1:this.checkTableOverflow())},checkTableOverflow(){this.$nextTick(()=>{const M=document.querySelector(".bottom-scrollbar");if(this.tableContainer&&M){const b=this.tableContainer.scrollHeight,z=window.innerHeight;this.showScrollbar=b>z,this.showScrollbar&&(document.querySelector(".scrollbar-content").style.width=this.tableContainer.scrollWidth+"px",M.addEventListener("scroll",()=>{this.tableContainer.scrollLeft=M.scrollLeft}),this.tableContainer.addEventListener("scroll",()=>{M.scrollLeft=this.tableContainer.scrollLeft}))}})},cleanupResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},updateStickyColumns(){let M=0,b=0;this.columns.forEach((z,p)=>{const o=document.getElementById(`${z.id}-th-${p}`);if(!o)return;const e=document.querySelector(`[data-column-id="${z.id}"]`),n=e?e.getBoundingClientRect().width:0,r=o.getBoundingClientRect().width,q=Math.max(n,r)-1,i=document.querySelectorAll(`[data-column-id="${z.id}"]`);z.stickyLeft&&(o.style.left=`${M}px`,i.forEach(l=>l.style.left=`${M}px`),M+=q),z.stickyRight&&(o.style.right=`${b}px`,i.forEach(l=>l.style.right=`${b}px`),b+=q)})},newTotalPage(M){return Math.ceil(M/this.maxItemsPerPage)},lineStateClass(M){const b=this.lineStatesList.find(z=>z.state===M);return b?b.class:""},checkItem(M){this.selectedItems.includes(M)?this.selectedItems=this.selectedItems.filter(b=>b!==M):this.selectedItems.push(M),this.checkAllCheckBox?this.checkAllCheckBox=!1:this.showeditems.every(b=>this.selectedItems.includes(b.id))&&(this.checkAllCheckBox=!0),this.$emit("update:ckSelectedItems",this.selectedItems)},toggleAllCheckBox(){const M=this.showeditems.map(b=>b.id);this.checkAllCheckBox?(this.selectedItems=this.selectedItems.filter(b=>!M.includes(b)),this.checkAllCheckBox=!1):(this.selectedItems=[...new Set([...this.selectedItems,...M])],this.checkAllCheckBox=!0),this.$emit("update:ckSelectedItems",this.selectedItems)},updateCurrentSort(M){this.currentHeaderSort&&(this.currentHeaderSort.isSorted=!1),M.isSorted=!0,this.currentHeaderSort=M,this.updateSortitems(M.id)},checkMove(M){const b=this.columns.reduce((z,p,o)=>(p.fixed&&z.push(o),z),[]);return!b.includes(M.draggedContext.index)&&!b.includes(M.relatedContext.index)},filterBy(M,b){if(!b)return!0;for(const z of this.columns){const p=M[z.id];if(p&&$2(p).includes(b))return!0}return!1},getDefaultMaxItemPerPage(){return this.maxItemPerPage},copyDefaultColumns(){return JSON.parse(JSON.stringify(this.defaultColumns))},getTableContent(){return this.items},getNbLines(){return this.showeditems.length},updateSortitems(M){this.items&&(this.sortKey===M?this.sortAsc=!this.sortAsc:(this.sortAsc=!0,this.sortKey=M))},selectSubject(M){this.$emit("changeSubject",M)},saveTablePreferences(){this.localStorageItemName!==null&&MM(this.localStorageItemName,this.getRefactoColumns(this.columns),"columns"),this.headerEditMode=!1,this.currentPage=this.previousCurrentPage},resetTablePreferences(){this.columns=this.copyDefaultColumns(),this.localStorageItemName!==null&&Oc(this.localStorageItemName,this.getRefactoColumns(this.columns)),this.currentPage=this.previousCurrentPage},editTablePreferences(){this.headerEditMode=!0,this.previousCurrentPage=this.currentPage,this.currentPage=1},addDeepSort(M){this.deepSortsList.push({id:M.id,libelle:M.libelle,asc:!0})},deepSortsColumnList(M,b){if(!M||M.length===0)return b;const z=new Set(this.columnNameDateFilter||[]);return b.sort((p,o)=>{for(const e of M){let n=p[e.id],r=o[e.id];const q=n==null||n===void 0,i=r==null||r===void 0;if(q&&i)return 0;if(q)return 1;if(i)return-1;if(z.has(e.id)&&(n=s1(n,"DD/MM/YYYY").unix(),r=s1(r,"DD/MM/YYYY").unix()),n!==r)return e.asc?n-r:r-n}return 0})}}},Bi={key:0,class:"mb-3 text-center"},gi={key:1,class:"row mb-1 mx-auto"},Xi={key:0,class:"btn btn-sm btn-outline-secondary cursor-default align-self-center bg-transparent text-secondary border-secondary d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1",style:{height:"20px"}},yi={class:"text-nowrap"},Ti={class:"d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1 mx-2 user-select-none"},_i={key:0,class:"text-nowrap",style:{height:"20px"}},Si=["value"],vi={key:1,class:"d-flex align-items-center text-nowrap"},wi={key:0,class:"d-flex ms-2"},ki={class:"row mx-auto mb-3 rounded-0"},Ei={class:"col-12 p-0 overflow-x-auto",style:{"border-radius":"10px !important"}},Di=["id"],Ci=["id","onDragstart","onDragend"],Pi={class:"d-flex flex-column align-items-center"},xi={key:0,class:"mx-auto my-auto mb-2 mt-2 hoverable d-inline-block"},Ii={class:"d-inline-flex text-nowrap"},Yi={key:0,class:"ms-2 float-end"},Fi={key:1,class:"ms-2"},Ui={key:1},Hi=["id"],ji=["id"],Gi={class:"d-inline-flex text-nowrap"},Vi={key:0,class:"ms-2 float-end hoverable"},Ki={key:1,class:"ms-2 hoverable"},Qi={key:0},Ji=["colspan"],Zi={class:"text-danger fs-5"},$i=["onClick"],Mq=["data-column-id","onClick"],bq=["id","value"],zq=["data-column-id"],pq={class:"row ms-auto mb-2"},Oq={class:"m-0 pagination pagination-sm"},oq={class:"page-item hoverable"},cq={class:"page-item hoverable"},eq=["onClick"],tq={class:"page-item hoverable"},Aq={class:"page-item hoverable"};function nq(M,b,z,p,o,e){var q;const n=s.resolveComponent("font-awesome-icon"),r=s.resolveComponent("vue-draggable-next");return s.openBlock(),s.createElementBlock(s.Fragment,null,[z.lineEditMode?(s.openBlock(),s.createElementBlock("div",Bi,[s.createElementVNode("button",{type:"button",class:"btn btn-success rounded-5 m-0 p-0",style:{height:"45px",width:"45px"},onClick:b[0]||(b[0]=i=>M.$emit("lineEditModeAddNewLine"))},[s.createVNode(n,{icon:"fa-solid fa-plus",size:"xl"})])])):s.createCommentVNode("",!0),z.showLineNumber||z.showModifyColumnsBtn||z.showMaxItemPerPageBtn||z.deepSorts?(s.openBlock(),s.createElementBlock("div",gi,[s.createElementVNode("div",{class:s.normalizeClass(["d-flex justify-content-start p-0",z.deepSorts&&o.deepSortsList.length>0&&z.showModifyColumnsBtn?"col-12 col-sm-8 col-lg-9 col-xl-10":"col"])},[z.showLineNumber?(s.openBlock(),s.createElementBlock("div",Xi,[s.createElementVNode("b",yi,s.toDisplayString(e.showItemsLinesNumber+" / "+e.filtereditems.length),1),b[19]||(b[19]=s.createElementVNode("span",{class:"ms-1"},"lignes",-1))])):s.createCommentVNode("",!0),z.deepSorts&&o.deepSortsList.length>0?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["d-flex align-items-center flex-wrap",{"ms-4":z.showLineNumber}])},[b[20]||(b[20]=s.createElementVNode("span",{class:"me-1 text-secondary h-auto fs-7 mb-1 mb-lg-0"},"Tri :",-1)),s.createVNode(r,{modelValue:o.deepSortsList,"onUpdate:modelValue":b[1]||(b[1]=i=>o.deepSortsList=i),tag:"div",group:"deepSorts",class:"d-flex flex-wrap","ghost-class":"deep-filter-ghost-class"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.deepSortsList,(i,l)=>(s.openBlock(),s.createElementBlock("div",{key:i.id,class:"d-flex align-items-center border border-secondary hoverable-grab text-secondary rounded-1 fs-7 px-2 py-0 me-2 mb-1 mb-lg-0",style:{height:"20px"}},[s.createVNode(n,{class:"hoverable",icon:"fa-solid fa-xmark",onClick:f=>o.deepSortsList.splice(l,1)},null,8,["onClick"]),s.createElementVNode("div",Ti,[s.createElementVNode("span",null,s.toDisplayString(i.libelle),1)]),s.createVNode(n,{class:"hoverable",icon:i.asc?"fa-solid fa-arrow-up-short-wide":"fa-solid fa-arrow-down-wide-short",onClick:f=>i.asc=!i.asc},null,8,["icon","onClick"])]))),128))]),_:1},8,["modelValue"])],2)):s.createCommentVNode("",!0)],2),z.showMaxItemPerPageBtn||z.showModifyColumnsBtn?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["d-flex align-items-center justify-content-end p-0",z.deepSorts&&o.deepSortsList.length>0?"col-12 col-sm-4 col-lg-3 col-xl-2 mt-1 mt-sm-0":"col"])},[z.showMaxItemPerPageBtn&&!o.headerEditMode?(s.openBlock(),s.createElementBlock("div",_i,[z.maxItemPerPageList.length>0?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":b[2]||(b[2]=i=>o.maxItemsPerPage=i),class:"form-select d-flex justify-content-center align-items-center ms-auto py-0 rounded-3 select-max-item-per-page"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(z.maxItemPerPageList,i=>(s.openBlock(),s.createElementBlock("option",{key:i.value,value:i.value},s.toDisplayString(i.text),9,Si))),128))],512)),[[s.vModelSelect,o.maxItemsPerPage]]):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),z.showModifyColumnsBtn?(s.openBlock(),s.createElementBlock("div",vi,[o.headerEditMode?(s.openBlock(),s.createElementBlock("div",wi,[s.createElementVNode("button",{id:"btn-save-table",class:"btn btn-sm btn-success d-flex justify-content-center align-items-center ms-auto me-2 px-2 py-0 rounded-3",type:"button",onClick:b[3]||(b[3]=(...i)=>e.saveTablePreferences&&e.saveTablePreferences(...i))}," Sauvegarder "),s.createElementVNode("button",{id:"btn-reset-table",class:"btn btn-sm btn-outline-danger d-flex justify-content-center align-items-center px-2 py-0 rounded-3",type:"button",onClick:b[4]||(b[4]=(...i)=>e.resetTablePreferences&&e.resetTablePreferences(...i))}," Réinitialiser le tableau ")])):(s.openBlock(),s.createElementBlock("button",{key:1,id:"btn-edit-table",class:"btn btn-sm btn-outline-secondary d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-3 ms-2",style:{height:"20px"},type:"button",onClick:b[5]||(b[5]=(...i)=>e.editTablePreferences&&e.editTablePreferences(...i))}," Modifier colonnes "))])):s.createCommentVNode("",!0)],2)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",ki,[s.createElementVNode("div",Ei,[(s.openBlock(),s.createElementBlock("table",{id:"table-draggable",ref:"table",key:o.forceTableUpdateIndex,class:s.normalizeClass(["table table-striped table-hover table-responsive align-middle border-1 border-top border-bottom position-relative mb-2",[z.border?"table-bordered":"table-borderless",z.tableSm?"table-sm":""]]),style:s.normalizeStyle([{"border-collapse":"separate","border-spacing":"0"},{borderLeft:z.border?"":"1px solid #ddd",borderRight:z.border?"":"1px solid #ddd"}])},[s.createElementVNode("thead",null,[o.headerEditMode?(s.openBlock(),s.createBlock(r,{key:0,modelValue:o.columns,"onUpdate:modelValue":b[9]||(b[9]=i=>o.columns=i),"ghost-class":z.ghostClass,"drag-class":z.ghostClass,tag:"tr",move:e.checkMove,group:"columns"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.columns,(i,l)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:i.id},[i.id==="checkBox"?(s.openBlock(),s.createElementBlock("th",{key:0,id:i.id+"-th-"+l,class:s.normalizeClass(["text-center",[z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":""]]),scope:"col",onClick:b[8]||(b[8]=s.withModifiers((...f)=>e.toggleAllCheckBox&&e.toggleAllCheckBox(...f),["stop"]))},[s.withDirectives(s.createElementVNode("input",{id:"checkBoxSelectAll","onUpdate:modelValue":b[6]||(b[6]=f=>o.checkAllCheckBox=f),class:"form-check-input",type:"checkbox",onClick:b[7]||(b[7]=s.withModifiers((...f)=>e.toggleAllCheckBox&&e.toggleAllCheckBox(...f),["stop"]))},null,512),[[s.vModelCheckbox,o.checkAllCheckBox]])],10,Di)):(i.show||o.headerEditMode)&&(!i.onlyOnEditMode||z.lineEditMode)?(s.openBlock(),s.createElementBlock("th",{key:1,id:i.id+"-th-"+l,scope:"col",class:s.normalizeClass(["text-center",[i.isDragging?"hoverable-grabbing":z.headerBgColor+" hoverable-grab",i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.headerTextColor,{"table-danger":!i.show}]]),onDragstart:f=>i.isDragging=!0,onDragend:f=>i.isDragging=!1},[s.createElementVNode("div",Pi,[o.headerEditMode&&!i.keepShow?(s.openBlock(),s.createElementBlock("div",xi,[i.show?(s.openBlock(),s.createBlock(n,{key:0,icon:"fa-solid fa-eye",class:"fa-lg",onClick:f=>i.show=!1},null,8,["onClick"])):(s.openBlock(),s.createBlock(n,{key:1,icon:"fa-solid fa-eye-slash",class:"fa-lg",onClick:f=>i.show=!0},null,8,["onClick"]))])):s.createCommentVNode("",!0),s.createElementVNode("div",Ii,[s.renderSlot(M.$slots,"tableHeaderTh",{header:i},void 0,!0),i.isSortable&&!z.deepSorts?(s.openBlock(),s.createElementBlock("div",Yi,[s.createVNode(n,{icon:o.sortKey!==i.id||o.sortKey===i.id&&!o.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-up-short-wide",class:"hoverable",onClick:f=>e.updateCurrentSort(i)},null,8,["icon","onClick"])])):z.deepSorts&&!o.deepSortsList.some(f=>f.id===i.id)&&i.isSortable?(s.openBlock(),s.createElementBlock("div",Fi,[s.createVNode(n,{icon:"fa-solid fa-filter",onClick:f=>e.addDeepSort(i)},null,8,["onClick"])])):s.createCommentVNode("",!0)])])],42,Ci)):s.createCommentVNode("",!0)],64))),128))]),_:3},8,["modelValue","ghost-class","drag-class","move"])):(s.openBlock(),s.createElementBlock("tr",Ui,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.columns,(i,l)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:i.id},[i.id==="checkBox"?(s.openBlock(),s.createElementBlock("th",{key:0,id:i.id+"-th-"+l,class:s.normalizeClass(["text-center",[z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":""]]),scope:"col",onClick:b[12]||(b[12]=s.withModifiers((...f)=>e.toggleAllCheckBox&&e.toggleAllCheckBox(...f),["stop"]))},[s.withDirectives(s.createElementVNode("input",{id:"checkBoxSelectAll","onUpdate:modelValue":b[10]||(b[10]=f=>o.checkAllCheckBox=f),class:"form-check-input",type:"checkbox",onClick:b[11]||(b[11]=s.withModifiers((...f)=>e.toggleAllCheckBox&&e.toggleAllCheckBox(...f),["stop"]))},null,512),[[s.vModelCheckbox,o.checkAllCheckBox]])],10,Hi)):i.show&&(!i.onlyOnEditMode||z.lineEditMode)?(s.openBlock(),s.createElementBlock("th",{key:1,id:i.id+"-th-"+l,scope:"col",class:s.normalizeClass(["text-center",[i.isDragging?"":z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.headerTextColor]])},[s.createElementVNode("div",Gi,[s.renderSlot(M.$slots,"tableHeaderTh",{header:i},void 0,!0),i.isSortable&&!z.deepSorts?(s.openBlock(),s.createElementBlock("div",Vi,[s.createVNode(n,{icon:o.sortKey!==i.id||o.sortKey===i.id&&!o.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-up-short-wide",onClick:f=>e.updateCurrentSort(i)},null,8,["icon","onClick"])])):z.deepSorts&&!o.deepSortsList.some(f=>f.id===i.id)&&i.isSortable?(s.openBlock(),s.createElementBlock("div",Ki,[s.createVNode(n,{icon:"fa-solid fa-filter",onClick:f=>e.addDeepSort(i)},null,8,["onClick"])])):s.createCommentVNode("",!0)])],10,ji)):s.createCommentVNode("",!0)],64))),128))]))]),s.createElementVNode("tbody",null,[((q=e.showeditems)==null?void 0:q.length)===0?(s.openBlock(),s.createElementBlock("tr",Qi,[s.createElementVNode("th",{colspan:o.columns.length,class:"text-center"},[s.createElementVNode("span",Zi,s.toDisplayString(z.noValueText),1)],8,Ji)])):(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(e.showeditems,(i,l)=>(s.openBlock(),s.createElementBlock("tr",{key:i.id,class:s.normalizeClass([{hoverable:z.clickable&&!o.headerEditMode,"hoverable-no-drop":z.clickable&&o.headerEditMode},z.trFontSize]),style:s.normalizeStyle({height:z.trHeightPx+"px"}),onClick:f=>z.clickable&&!o.headerEditMode?e.selectSubject(i):null},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.columns,f=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:f.id},[f.id==="checkBox"?(s.openBlock(),s.createElementBlock("td",{key:0,"data-column-id":f.id,class:s.normalizeClass(["text-center",[i.lineState?e.lineStateClass(i.lineState):"",f.stickyLeft?"sticky-column-left":"",f.stickyRight?"sticky-column-right":""]]),onClick:s.withModifiers(B=>e.checkItem(i.id),["stop"])},[s.withDirectives(s.createElementVNode("input",{id:`checkbox-${l}`,"onUpdate:modelValue":b[13]||(b[13]=B=>o.selectedItems=B),type:"checkbox",class:"form-check-input hoverable",value:i.id,onClick:b[14]||(b[14]=s.withModifiers(()=>{},["stop"]))},null,8,bq),[[s.vModelCheckbox,o.selectedItems]])],10,Mq)):(f.show||o.headerEditMode)&&(!f.onlyOnEditMode||z.lineEditMode)?(s.openBlock(),s.createElementBlock("td",{key:1,"data-column-id":f.id,class:s.normalizeClass([[f.show?"":"table-danger",f.isSorted?"bg-gray-200":"",i.lineState?e.lineStateClass(i.lineState):"",f.stickyLeft?"sticky-column-left":"",f.stickyRight?"sticky-column-right":""],"text-center text-nowrap"])},[s.renderSlot(M.$slots,"tableBodyTd",{header:f,item:i},void 0,!0)],10,zq)):s.createCommentVNode("",!0)],64))),128))],14,$i))),128))])],6))])]),s.createElementVNode("div",pq,[o.totalPages&&o.totalPages>1?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["col p-0 me-3 d-flex",{"justify-content-center":z.paginationPosition==="center","justify-content-end":z.paginationPosition==="right","justify-content-start":z.paginationPosition==="left"}])},[s.createElementVNode("ul",Oq,[s.createElementVNode("li",oq,[s.createElementVNode("a",{class:s.normalizeClass(["page-link",{disabled:o.currentPage===1}]),onClick:b[15]||(b[15]=i=>o.currentPage=1)}," « ",2)]),s.createElementVNode("li",cq,[s.createElementVNode("a",{class:s.normalizeClass(["page-link",{disabled:o.currentPage===1}]),onClick:b[16]||(b[16]=i=>o.currentPage-=1)}," < ",2)]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.currentDisplayPagination,i=>(s.openBlock(),s.createElementBlock("li",{key:i,class:s.normalizeClass(["page-item hoverable",{active:o.currentPage===i}])},[s.createElementVNode("a",{class:"page-link",onClick:l=>o.currentPage=i},s.toDisplayString(i),9,eq)],2))),128)),s.createElementVNode("li",tq,[s.createElementVNode("a",{class:s.normalizeClass(["page-link",{disabled:o.currentPage===o.totalPages}]),onClick:b[17]||(b[17]=i=>o.currentPage+=1)}," > ",2)]),s.createElementVNode("li",Aq,[s.createElementVNode("a",{class:s.normalizeClass(["page-link",{disabled:o.currentPage===o.totalPages}]),onClick:b[18]||(b[18]=i=>o.currentPage=o.totalPages)}," » ",2)])])],2)):s.createCommentVNode("",!0),z.stickyScrollbarHorizontal?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["bottom-scrollbar",{visible:o.showScrollbar}])},b[21]||(b[21]=[s.createElementVNode("div",{class:"scrollbar-content"},null,-1)]),2)):s.createCommentVNode("",!0)])],64)}const oc=mi(Ni,[["render",nq],["__scopeId","data-v-86f4de5c"]]);p2.AmsomTableDraggable=oc,p2.default=oc,Object.defineProperties(p2,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
593
|
+
var p=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,o=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,e=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],r=z.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:e,monthsShortRegex:e,monthsStrictRegex:p,monthsShortStrictRegex:o,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(q,i){switch(i){case"D":return q+(q===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return q+(q===1?"er":"e");case"w":case"W":return q+(q===1?"re":"e")}},week:{dow:1,doy:4}});return r})})();function $2(M,b=!0){if(!M)return null;let z=M.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return b?z.toLowerCase():z}function si(M,b="DD/MM/YYYY"){return s1.unix(M).isValid()?s1.unix(M).format(b):M}const $o=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)?$/;function di(M,b){const z=M.replace(/\d+/g,o=>(+o+1e5).toString()),p=b.replace(/\d+/g,o=>(+o+1e5).toString());return z.localeCompare(p)}function Mc(M){return M!=null&&M!==""&&!isNaN(M)}function bc(M){return M&&s1(M,"DD/MM/YYYY",!0).isValid()}function zc(M){return typeof M=="boolean"}function Wi(M,b,z){const e=(M?1:0)-(b?1:0);return z?-e:e}function li(M,b){const z=(M==null||M==="")&&typeof M!="boolean",p=(b==null||b==="")&&typeof b!="boolean";return z&&p?0:z?1:p?-1:null}function pc(M){return typeof M=="string"&&M.includes("€")}function fi(M,b,z){const p=parseFloat(M.replace("€","").replace(",",".").replace(/\s/g,"").trim()),o=parseFloat(b.replace("€","").replace(",",".").replace(/\s/g,"").trim());if(isNaN(p)&&isNaN(o))return 0;if(isNaN(p))return 1;if(isNaN(o))return-1;const e=p-o;return z?e:-e}function ui(M,b,z){const p=li(M,b);if(p!==null)return p;if(zc(M)&&zc(b))return Wi(M,b,z);if($o.test(M)&&$o.test(b)){const r=di(M,b);return z?r:-r}if(Mc(M)&&Mc(b)){const r=parseFloat(M),q=parseFloat(b);return z?r-q:q-r}if(bc(M)&&bc(b)){const r=s1(M,"DD/MM/YYYY").unix(),q=s1(b,"DD/MM/YYYY").unix();return z?r-q:q-r}if(pc(M)&&pc(b))return fi(M,b,z);const o=typeof M=="string"?$2(M).toLowerCase():$2(String(M)).toLowerCase(),e=typeof b=="string"?$2(b).toLowerCase():$2(String(b)).toLowerCase(),n=o.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"});return z?n:-n}function Ri(M,b,z=!1){return!M||!Array.isArray(M)?M:M.sort((p,o)=>{const e=p==null?void 0:p[b],n=o==null?void 0:o[b];return ui(e,n,z)})}function hi(M,b,z=!1,p){return!M||!Array.isArray(M)?M:M.sort((o,e)=>{const n=o==null?void 0:o[b],r=e==null?void 0:e[b];return p(n,r,z)})}function Oc(M,b){let z=y2(M);if(!z)z={columns:b};else if(!z.columns)z.columns=b;else{let p=b.filter(function(e){return!z.columns.some(function(n){return n.id===e.id})});z.columns=z.columns.concat(p);let o=z.columns.filter(function(e){return!b.some(function(n){return e.id===n.id})});z.columns=z.columns.filter(function(e){return!o.some(function(n){return e.id===n.id})}),z.columns.filter(e=>{for(let n of b)n.id===e.id&&n.libelle!==e.libelle&&(e.libelle=n.libelle)})}MM(M,z)}function Li(M,b,z=null){let p=y2(M);p?z&&!p[z]&&(p[z]=b):z?(p={},p[z]=b):p=b,MM(M,p)}function y2(M){return JSON.parse(window.localStorage.getItem(M))}function MM(M,b,z=null){let p=y2(M);return z?p[z]=b:p=b,window.localStorage.setItem(M,JSON.stringify(p))}const mi=(M,b)=>{const z=M.__vccOpts||M;for(const[p,o]of b)z[p]=o;return z};jt.add(qA,aA,rA,fA,sA,WA,lA,dA,iA);const Ni={name:"AmsomTableDraggable",components:{VueDraggableNext:on,FontAwesomeIcon:nA},props:{defaultColumns:{type:Array,require:!0,default:null},dynamicColumns:{type:Array,default:null},localStorageItemName:{type:String,default:null},localStorageMaxItemPerPageName:{type:String,default:null},tdItemsList:{type:[Array,Object],require:!0,default:null},search:{type:String,default:null},pickedDate:{type:Array,default:null},columnNameDateFilter:{type:Array,default:null},maxItemPerPage:{type:Number,default:-1},maxItemPerPageList:{type:Array,default:()=>[{value:5,text:"5"},{value:10,text:"10"},{value:15,text:"15"},{value:25,text:"25"},{value:50,text:"50"},{value:100,text:"100"},{value:500,text:"500"},{value:1e3,text:"1000"},{value:-1,text:"Tous"}]},showMaxItemPerPageBtn:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},showModifyColumnsBtn:{type:Boolean,default:!1},showLineNumber:{type:Boolean,default:!1},ghostClass:{type:String,default:"bg-success"},headerBgColor:{type:String,default:"bg-white"},headerTextColor:{type:String,default:"text-primary"},lineEditMode:{type:Boolean,default:!1},border:{type:Boolean,default:!1},tableSm:{type:Boolean,default:!1},deepSorts:{type:Boolean,default:!1},deepSortsListPreset:{type:Array,default:null},ckSelectedItems:{type:Array,default:null},lineStatesList:{type:Array,default:()=>[{state:"add",class:"addLineState"},{state:"delete",class:"deleteLineState"},{state:"update",class:"updateLineState"}]},stickyScrollbarHorizontal:{type:Boolean,default:!1},paginationPosition:{type:String,default:"left",validator(M){return["left","center","right"].includes(M)}},trFontSize:{type:String,default:"fs-6"},trHeightPx:{type:Number,default:60},noValueText:{type:String,default:"Aucune valeur"}},emits:["changeSubject","lineEditModeAddNewLine","update:ckSelectedItems","update:dynamicColumns","update:deepSortsListPreset"],data(){return{checkAllCheckBox:!1,isDragging:!1,sortKey:null,sortAsc:!1,currentPage:1,previousCurrentPage:1,selectedItems:[],currentHeaderSort:null,headerEditMode:!1,totalPages:null,columns:this.copyDefaultColumns(),maxItemsPerPage:this.getDefaultMaxItemPerPage(),forceTableUpdateIndex:0,resizeObserver:null,showScrollbar:!1,tableContainer:null,deepSortsList:[],isInternalUpdate:!1}},computed:{currentDisplayPagination(){let M=[];return this.totalPages<=1?M:(this.currentPage===1?M=[1,2,3]:this.currentPage===this.totalPages?M=[this.totalPages-2,this.totalPages-1,this.totalPages]:M=[this.currentPage-1,this.currentPage,this.currentPage+1],M.filter(b=>b>=1&&b<=this.totalPages))},items(){return this.tdItemsList?this.tdItemsList:[]},showItemsLinesNumber(){return this.showeditems.length},dateFilterBounds(){return!this.pickedDate||!this.pickedDate[0]||!this.pickedDate[1]?null:{deb:s1(this.pickedDate[0]).set({hour:0,minute:0}).unix(),fin:s1(this.pickedDate[1]).set({hour:23,minute:59}).unix()}},normalizedSearch(){return this.search?$2(this.search):""},hasDateFilter(){return this.dateFilterBounds&&Array.isArray(this.columnNameDateFilter)&&this.columnNameDateFilter.length>0},filtereditems(){if(!this.items)return[];const M=this.normalizedSearch,b=this.hasDateFilter,z=this.dateFilterBounds;return this.items.filter(p=>{const o=this.filterBy(p,M);if(b){const e=this.columnNameDateFilter.some(n=>{const r=p[n];if(r){const q=s1(r,"DD/MM/YYYY").unix();return q>=z.deb&&q<=z.fin}return!1});return o&&e}return o})},sortedItems(){if(!this.filtereditems)return[];const M=this.columns.find(b=>b.id===this.sortKey);return this.deepSorts&&this.deepSortsList.length>0?this.deepSortsColumnList(this.deepSortsList,[...this.filtereditems]):this.sortKey&&M&&M.customSort?hi([...this.filtereditems],this.sortKey,this.sortAsc,M.customSort):this.sortKey?Ri([...this.filtereditems],this.sortKey,this.sortAsc):this.filtereditems},showeditems(){const M=this.sortedItems;if(this.maxItemsPerPage===-1)return M;const b=(this.currentPage-1)*this.maxItemsPerPage,z=this.currentPage*this.maxItemsPerPage;return M.slice(b,z)},deepSortsListComputed(){return this.deepSortsList}},watch:{ckSelectedItems:{handler(M){M&&(this.selectedItems=M)},immediate:!0},dynamicColumns:{handler(M){M&&!this.isInternalUpdate&&(this.isInternalUpdate=!0,this.columns=this.getColumnsById(M,this.defaultColumns),this.$nextTick(()=>{this.isInternalUpdate=!1}))},immediate:!0},columns:{handler(M){this.localStorageItemName!==null&&MM(this.localStorageItemName,this.getRefactoColumns(M),"columns"),this.dynamicColumns&&!this.isInternalUpdate&&(this.isInternalUpdate=!0,this.$emit("update:dynamicColumns",this.getRefactoColumns(M)),this.$nextTick(()=>{this.isInternalUpdate=!1})),this.forceTableUpdateIndex+=1}},headerEditMode:function(M){var b;if(M)this.maxItemsPerPage=3;else{const z=this.localStorageMaxItemPerPageName!==null?y2(this.localStorageMaxItemPerPageName):this.localStorageItemName!==null?(b=y2(this.localStorageItemName))==null?void 0:b.maxItemPerPage:void 0;this.maxItemsPerPage=z??this.maxItemPerPage}},sortedItems:{handler(M){this.totalPages=this.newTotalPage(M.length)},immediate:!0},maxItemPerPage:{handler(M){M!==this.maxItemsPerPage&&(this.maxItemsPerPage=M)},immediate:!0},maxItemsPerPage:function(M){this.localStorageItemName!==null&&!this.headerEditMode&&MM(this.localStorageItemName,M,"maxItemPerPage"),this.localStorageMaxItemPerPageName!==null&&!this.headerEditMode&&MM(this.localStorageMaxItemPerPageName,M),this.currentPage!==1&&(this.currentPage=1),this.totalPages=this.newTotalPage(this.filtereditems.length)},search:{handler(M,b){M!==b&&this.currentPage>1&&this.$nextTick(()=>{this.adjustPageAfterSearch()})},immediate:!1},showeditems:{handler(M){M.length===0&&this.filtereditems.length>0&&this.currentPage>1&&this.adjustPageAfterSearch(),this.checkAllCheckBox=this.showeditems.every(b=>this.selectedItems.includes(b.id)),this.totalPages=this.newTotalPage(this.filtereditems.length)},flush:"post"},deepSortsList:{handler(M){M&&M.length>0&&this.$emit("update:deepSortsListPreset",M)},deep:!0},deepSortsListPreset:{handler(M){M&&M.length>0&&JSON.stringify(M)!==JSON.stringify(this.deepSortsList)&&(this.deepSortsList=[...M])},deep:!0,immediate:!0}},mounted(){var M;if(this.localStorageItemName!==null){Oc(this.localStorageItemName,this.getRefactoColumns(this.copyDefaultColumns())),Li(this.localStorageItemName,this.maxItemPerPage,"maxItemPerPage");let b=y2(this.localStorageItemName);b&&(this.columns=this.getColumnsById(b.columns,this.defaultColumns),this.maxItemsPerPage=b.maxItemPerPage)}if(this.localStorageMaxItemPerPageName!==null){let b=y2(this.localStorageMaxItemPerPageName);b&&(this.maxItemsPerPage=b)}this.dynamicColumns&&(this.columns=this.getColumnsById(this.dynamicColumns,this.defaultColumns)),this.ckSelectedItems&&(this.selectedItems=this.ckSelectedItems),this.totalPages=this.newTotalPage(this.filtereditems.length),this.initResizeObserver(),this.deepSortsListPreset&&this.deepSortsListPreset.length>0&&this.deepSorts&&(this.deepSortsList=this.deepSortsListPreset),this.stickyScrollbarHorizontal&&(this.checkTableOverflow(),window.addEventListener("resize",this.checkTableOverflow),window.addEventListener("scroll",this.handleTableScroll)),this.tableContainer=(M=this.$refs.table)==null?void 0:M.closest(".overflow-x-auto")},beforeUnmount(){this.cleanupResizeObserver(),window.removeEventListener("resize",this.checkTableOverflow),window.removeEventListener("scroll",this.handleTableScroll)},methods:{moment:s1,unixToDateString:si,getRefactoColumns(M){return JSON.parse(JSON.stringify(M)).map(z=>({id:z.id,show:z.show}))},getColumnsById(M,b){return M.map(z=>({...b.find(o=>o.id===z.id),show:z.show}))},adjustPageAfterSearch(){if(this.filtereditems.length>0&&this.showeditems.length===0){const M=Math.ceil(this.filtereditems.length/this.maxItemsPerPage);M>0&&M!==this.currentPage&&(this.currentPage=M)}else this.filtereditems.length===0&&(this.currentPage=1)},initResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{this.updateStickyColumns()});const M=this.$refs.table;M&&this.resizeObserver.observe(M)},handleTableScroll(){this.tableContainer&&(Math.ceil(window.scrollY+window.innerHeight)>=this.tableContainer.scrollHeight?this.showScrollbar=!1:this.checkTableOverflow())},checkTableOverflow(){this.$nextTick(()=>{const M=document.querySelector(".bottom-scrollbar");if(this.tableContainer&&M){const b=this.tableContainer.scrollHeight,z=window.innerHeight;this.showScrollbar=b>z,this.showScrollbar&&(document.querySelector(".scrollbar-content").style.width=this.tableContainer.scrollWidth+"px",M.addEventListener("scroll",()=>{this.tableContainer.scrollLeft=M.scrollLeft}),this.tableContainer.addEventListener("scroll",()=>{M.scrollLeft=this.tableContainer.scrollLeft}))}})},cleanupResizeObserver(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},updateStickyColumns(){let M=0,b=0;this.columns.forEach((z,p)=>{const o=document.getElementById(`${z.id}-th-${p}`);if(!o)return;const e=document.querySelector(`[data-column-id="${z.id}"]`),n=e?e.getBoundingClientRect().width:0,r=o.getBoundingClientRect().width,q=Math.max(n,r)-1,i=document.querySelectorAll(`[data-column-id="${z.id}"]`);z.stickyLeft&&(o.style.left=`${M}px`,i.forEach(l=>l.style.left=`${M}px`),M+=q),z.stickyRight&&(o.style.right=`${b}px`,i.forEach(l=>l.style.right=`${b}px`),b+=q)})},newTotalPage(M){return Math.ceil(M/this.maxItemsPerPage)},lineStateClass(M){const b=this.lineStatesList.find(z=>z.state===M);return b?b.class:""},checkItem(M){this.selectedItems.includes(M)?this.selectedItems=this.selectedItems.filter(b=>b!==M):this.selectedItems.push(M),this.checkAllCheckBox?this.checkAllCheckBox=!1:this.showeditems.every(b=>this.selectedItems.includes(b.id))&&(this.checkAllCheckBox=!0),this.$emit("update:ckSelectedItems",this.selectedItems)},toggleAllCheckBox(){const M=this.showeditems.map(b=>b.id);this.checkAllCheckBox?(this.selectedItems=this.selectedItems.filter(b=>!M.includes(b)),this.checkAllCheckBox=!1):(this.selectedItems=[...new Set([...this.selectedItems,...M])],this.checkAllCheckBox=!0),this.$emit("update:ckSelectedItems",this.selectedItems)},updateCurrentSort(M){this.currentHeaderSort&&(this.currentHeaderSort.isSorted=!1),M.isSorted=!0,this.currentHeaderSort=M,this.updateSortitems(M.id)},checkMove(M){const b=this.columns.reduce((z,p,o)=>(p.fixed&&z.push(o),z),[]);return!b.includes(M.draggedContext.index)&&!b.includes(M.relatedContext.index)},filterBy(M,b){if(!b)return!0;for(const z of this.columns){const p=M[z.id];if(p&&$2(p).includes(b))return!0}return!1},getDefaultMaxItemPerPage(){return this.maxItemPerPage},copyDefaultColumns(){return JSON.parse(JSON.stringify(this.defaultColumns))},getTableContent(){return this.items},getNbLines(){return this.showeditems.length},updateSortitems(M){this.items&&(this.sortKey===M?this.sortAsc=!this.sortAsc:(this.sortAsc=!0,this.sortKey=M))},selectSubject(M){this.$emit("changeSubject",M)},saveTablePreferences(){this.localStorageItemName!==null&&MM(this.localStorageItemName,this.getRefactoColumns(this.columns),"columns"),this.dynamicColumns&&this.$emit("update:dynamicColumns",this.getRefactoColumns(this.columns)),this.headerEditMode=!1,this.currentPage=this.previousCurrentPage},resetTablePreferences(){this.columns=this.copyDefaultColumns(),this.localStorageItemName!==null&&Oc(this.localStorageItemName,this.getRefactoColumns(this.columns)),this.dynamicColumns&&this.$emit("update:dynamicColumns",this.getRefactoColumns(this.columns)),this.currentPage=this.previousCurrentPage},editTablePreferences(){this.headerEditMode=!0,this.previousCurrentPage=this.currentPage,this.currentPage=1},addDeepSort(M){this.deepSortsList.push({id:M.id,libelle:M.libelle,asc:!0})},deepSortsColumnList(M,b){if(!M||M.length===0)return b;const z=new Set(this.columnNameDateFilter||[]);return b.sort((p,o)=>{for(const e of M){let n=p[e.id],r=o[e.id];const q=n==null||n===void 0,i=r==null||r===void 0;if(q&&i)return 0;if(q)return 1;if(i)return-1;if(z.has(e.id)&&(n=s1(n,"DD/MM/YYYY").unix(),r=s1(r,"DD/MM/YYYY").unix()),n!==r)return e.asc?n-r:r-n}return 0})}}},Bi={key:0,class:"mb-3 text-center"},gi={key:1,class:"row mb-1 mx-auto"},Xi={key:0,class:"btn btn-sm btn-outline-secondary cursor-default align-self-center bg-transparent text-secondary border-secondary d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1",style:{height:"20px"}},yi={class:"text-nowrap"},Ti={class:"d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1 mx-2 user-select-none"},_i={key:0,class:"text-nowrap",style:{height:"20px"}},Si=["value"],vi={key:1,class:"d-flex align-items-center text-nowrap"},wi={key:0,class:"d-flex ms-2"},ki={class:"row mx-auto mb-3 rounded-0"},Ei={class:"col-12 p-0 overflow-x-auto",style:{"border-radius":"10px !important"}},Di=["id"],Ci=["id","onDragstart","onDragend"],Pi={class:"d-flex flex-column align-items-center"},xi={key:0,class:"mx-auto my-auto mb-2 mt-2 hoverable d-inline-block"},Ii={class:"d-inline-flex text-nowrap"},Yi={key:0,class:"ms-2 float-end"},Fi={key:1,class:"ms-2"},Ui={key:1},Hi=["id"],ji=["id"],Gi={class:"d-inline-flex text-nowrap"},Vi={key:0,class:"ms-2 float-end hoverable"},Ki={key:1,class:"ms-2 hoverable"},Qi={key:0},Ji=["colspan"],Zi={class:"text-danger fs-5"},$i=["onClick"],Mq=["data-column-id","onClick"],bq=["id","value"],zq=["data-column-id"],pq={class:"row ms-auto mb-2"},Oq={class:"m-0 pagination pagination-sm"},oq={class:"page-item hoverable"},cq={class:"page-item hoverable"},eq=["onClick"],tq={class:"page-item hoverable"},Aq={class:"page-item hoverable"};function nq(M,b,z,p,o,e){var q;const n=s.resolveComponent("font-awesome-icon"),r=s.resolveComponent("vue-draggable-next");return s.openBlock(),s.createElementBlock(s.Fragment,null,[z.lineEditMode?(s.openBlock(),s.createElementBlock("div",Bi,[s.createElementVNode("button",{type:"button",class:"btn btn-success rounded-5 m-0 p-0",style:{height:"45px",width:"45px"},onClick:b[0]||(b[0]=i=>M.$emit("lineEditModeAddNewLine"))},[s.createVNode(n,{icon:"fa-solid fa-plus",size:"xl"})])])):s.createCommentVNode("",!0),z.showLineNumber||z.showModifyColumnsBtn||z.showMaxItemPerPageBtn||z.deepSorts?(s.openBlock(),s.createElementBlock("div",gi,[s.createElementVNode("div",{class:s.normalizeClass(["d-flex justify-content-start p-0",z.deepSorts&&o.deepSortsList.length>0&&z.showModifyColumnsBtn?"col-12 col-sm-8 col-lg-9 col-xl-10":"col"])},[z.showLineNumber?(s.openBlock(),s.createElementBlock("div",Xi,[s.createElementVNode("b",yi,s.toDisplayString(e.showItemsLinesNumber+" / "+e.filtereditems.length),1),b[19]||(b[19]=s.createElementVNode("span",{class:"ms-1"},"lignes",-1))])):s.createCommentVNode("",!0),z.deepSorts&&o.deepSortsList.length>0?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["d-flex align-items-center flex-wrap",{"ms-4":z.showLineNumber}])},[b[20]||(b[20]=s.createElementVNode("span",{class:"me-1 text-secondary h-auto fs-7 mb-1 mb-lg-0"},"Tri :",-1)),s.createVNode(r,{modelValue:o.deepSortsList,"onUpdate:modelValue":b[1]||(b[1]=i=>o.deepSortsList=i),tag:"div",group:"deepSorts",class:"d-flex flex-wrap","ghost-class":"deep-filter-ghost-class"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.deepSortsList,(i,l)=>(s.openBlock(),s.createElementBlock("div",{key:i.id,class:"d-flex align-items-center border border-secondary hoverable-grab text-secondary rounded-1 fs-7 px-2 py-0 me-2 mb-1 mb-lg-0",style:{height:"20px"}},[s.createVNode(n,{class:"hoverable",icon:"fa-solid fa-xmark",onClick:f=>o.deepSortsList.splice(l,1)},null,8,["onClick"]),s.createElementVNode("div",Ti,[s.createElementVNode("span",null,s.toDisplayString(i.libelle),1)]),s.createVNode(n,{class:"hoverable",icon:i.asc?"fa-solid fa-arrow-up-short-wide":"fa-solid fa-arrow-down-wide-short",onClick:f=>i.asc=!i.asc},null,8,["icon","onClick"])]))),128))]),_:1},8,["modelValue"])],2)):s.createCommentVNode("",!0)],2),z.showMaxItemPerPageBtn||z.showModifyColumnsBtn?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["d-flex align-items-center justify-content-end p-0",z.deepSorts&&o.deepSortsList.length>0?"col-12 col-sm-4 col-lg-3 col-xl-2 mt-1 mt-sm-0":"col"])},[z.showMaxItemPerPageBtn&&!o.headerEditMode?(s.openBlock(),s.createElementBlock("div",_i,[z.maxItemPerPageList.length>0?s.withDirectives((s.openBlock(),s.createElementBlock("select",{key:0,"onUpdate:modelValue":b[2]||(b[2]=i=>o.maxItemsPerPage=i),class:"form-select d-flex justify-content-center align-items-center ms-auto py-0 rounded-3 select-max-item-per-page"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(z.maxItemPerPageList,i=>(s.openBlock(),s.createElementBlock("option",{key:i.value,value:i.value},s.toDisplayString(i.text),9,Si))),128))],512)),[[s.vModelSelect,o.maxItemsPerPage]]):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),z.showModifyColumnsBtn?(s.openBlock(),s.createElementBlock("div",vi,[o.headerEditMode?(s.openBlock(),s.createElementBlock("div",wi,[s.createElementVNode("button",{id:"btn-save-table",class:"btn btn-sm btn-success d-flex justify-content-center align-items-center ms-auto me-2 px-2 py-0 rounded-3",type:"button",onClick:b[3]||(b[3]=(...i)=>e.saveTablePreferences&&e.saveTablePreferences(...i))}," Sauvegarder "),s.createElementVNode("button",{id:"btn-reset-table",class:"btn btn-sm btn-outline-danger d-flex justify-content-center align-items-center px-2 py-0 rounded-3",type:"button",onClick:b[4]||(b[4]=(...i)=>e.resetTablePreferences&&e.resetTablePreferences(...i))}," Réinitialiser le tableau ")])):(s.openBlock(),s.createElementBlock("button",{key:1,id:"btn-edit-table",class:"btn btn-sm btn-outline-secondary d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-3 ms-2",style:{height:"20px"},type:"button",onClick:b[5]||(b[5]=(...i)=>e.editTablePreferences&&e.editTablePreferences(...i))}," Modifier colonnes "))])):s.createCommentVNode("",!0)],2)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",ki,[s.createElementVNode("div",Ei,[(s.openBlock(),s.createElementBlock("table",{id:"table-draggable",ref:"table",key:o.forceTableUpdateIndex,class:s.normalizeClass(["table table-striped table-hover table-responsive align-middle border-1 border-top border-bottom position-relative mb-2",[z.border?"table-bordered":"table-borderless",z.tableSm?"table-sm":""]]),style:s.normalizeStyle([{"border-collapse":"separate","border-spacing":"0"},{borderLeft:z.border?"":"1px solid #ddd",borderRight:z.border?"":"1px solid #ddd"}])},[s.createElementVNode("thead",null,[o.headerEditMode?(s.openBlock(),s.createBlock(r,{key:0,modelValue:o.columns,"onUpdate:modelValue":b[9]||(b[9]=i=>o.columns=i),"ghost-class":z.ghostClass,"drag-class":z.ghostClass,tag:"tr",move:e.checkMove,group:"columns"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.columns,(i,l)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:i.id},[i.id==="checkBox"?(s.openBlock(),s.createElementBlock("th",{key:0,id:i.id+"-th-"+l,class:s.normalizeClass(["text-center",[z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":""]]),scope:"col",onClick:b[8]||(b[8]=s.withModifiers((...f)=>e.toggleAllCheckBox&&e.toggleAllCheckBox(...f),["stop"]))},[s.withDirectives(s.createElementVNode("input",{id:"checkBoxSelectAll","onUpdate:modelValue":b[6]||(b[6]=f=>o.checkAllCheckBox=f),class:"form-check-input",type:"checkbox",onClick:b[7]||(b[7]=s.withModifiers((...f)=>e.toggleAllCheckBox&&e.toggleAllCheckBox(...f),["stop"]))},null,512),[[s.vModelCheckbox,o.checkAllCheckBox]])],10,Di)):(i.show||o.headerEditMode)&&(!i.onlyOnEditMode||z.lineEditMode)?(s.openBlock(),s.createElementBlock("th",{key:1,id:i.id+"-th-"+l,scope:"col",class:s.normalizeClass(["text-center",[i.isDragging?"hoverable-grabbing":z.headerBgColor+" hoverable-grab",i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.headerTextColor,{"table-danger":!i.show}]]),onDragstart:f=>i.isDragging=!0,onDragend:f=>i.isDragging=!1},[s.createElementVNode("div",Pi,[o.headerEditMode&&!i.keepShow?(s.openBlock(),s.createElementBlock("div",xi,[i.show?(s.openBlock(),s.createBlock(n,{key:0,icon:"fa-solid fa-eye",class:"fa-lg",onClick:f=>i.show=!1},null,8,["onClick"])):(s.openBlock(),s.createBlock(n,{key:1,icon:"fa-solid fa-eye-slash",class:"fa-lg",onClick:f=>i.show=!0},null,8,["onClick"]))])):s.createCommentVNode("",!0),s.createElementVNode("div",Ii,[s.renderSlot(M.$slots,"tableHeaderTh",{header:i},void 0,!0),i.isSortable&&!z.deepSorts?(s.openBlock(),s.createElementBlock("div",Yi,[s.createVNode(n,{icon:o.sortKey!==i.id||o.sortKey===i.id&&!o.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-up-short-wide",class:"hoverable",onClick:f=>e.updateCurrentSort(i)},null,8,["icon","onClick"])])):z.deepSorts&&!o.deepSortsList.some(f=>f.id===i.id)&&i.isSortable?(s.openBlock(),s.createElementBlock("div",Fi,[s.createVNode(n,{icon:"fa-solid fa-filter",onClick:f=>e.addDeepSort(i)},null,8,["onClick"])])):s.createCommentVNode("",!0)])])],42,Ci)):s.createCommentVNode("",!0)],64))),128))]),_:3},8,["modelValue","ghost-class","drag-class","move"])):(s.openBlock(),s.createElementBlock("tr",Ui,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.columns,(i,l)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:i.id},[i.id==="checkBox"?(s.openBlock(),s.createElementBlock("th",{key:0,id:i.id+"-th-"+l,class:s.normalizeClass(["text-center",[z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":""]]),scope:"col",onClick:b[12]||(b[12]=s.withModifiers((...f)=>e.toggleAllCheckBox&&e.toggleAllCheckBox(...f),["stop"]))},[s.withDirectives(s.createElementVNode("input",{id:"checkBoxSelectAll","onUpdate:modelValue":b[10]||(b[10]=f=>o.checkAllCheckBox=f),class:"form-check-input",type:"checkbox",onClick:b[11]||(b[11]=s.withModifiers((...f)=>e.toggleAllCheckBox&&e.toggleAllCheckBox(...f),["stop"]))},null,512),[[s.vModelCheckbox,o.checkAllCheckBox]])],10,Hi)):i.show&&(!i.onlyOnEditMode||z.lineEditMode)?(s.openBlock(),s.createElementBlock("th",{key:1,id:i.id+"-th-"+l,scope:"col",class:s.normalizeClass(["text-center",[i.isDragging?"":z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.headerTextColor]])},[s.createElementVNode("div",Gi,[s.renderSlot(M.$slots,"tableHeaderTh",{header:i},void 0,!0),i.isSortable&&!z.deepSorts?(s.openBlock(),s.createElementBlock("div",Vi,[s.createVNode(n,{icon:o.sortKey!==i.id||o.sortKey===i.id&&!o.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-up-short-wide",onClick:f=>e.updateCurrentSort(i)},null,8,["icon","onClick"])])):z.deepSorts&&!o.deepSortsList.some(f=>f.id===i.id)&&i.isSortable?(s.openBlock(),s.createElementBlock("div",Ki,[s.createVNode(n,{icon:"fa-solid fa-filter",onClick:f=>e.addDeepSort(i)},null,8,["onClick"])])):s.createCommentVNode("",!0)])],10,ji)):s.createCommentVNode("",!0)],64))),128))]))]),s.createElementVNode("tbody",null,[((q=e.showeditems)==null?void 0:q.length)===0?(s.openBlock(),s.createElementBlock("tr",Qi,[s.createElementVNode("th",{colspan:o.columns.length,class:"text-center"},[s.createElementVNode("span",Zi,s.toDisplayString(z.noValueText),1)],8,Ji)])):(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(e.showeditems,(i,l)=>(s.openBlock(),s.createElementBlock("tr",{key:i.id,class:s.normalizeClass([{hoverable:z.clickable&&!o.headerEditMode,"hoverable-no-drop":z.clickable&&o.headerEditMode},z.trFontSize]),style:s.normalizeStyle({height:z.trHeightPx+"px"}),onClick:f=>z.clickable&&!o.headerEditMode?e.selectSubject(i):null},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.columns,f=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:f.id},[f.id==="checkBox"?(s.openBlock(),s.createElementBlock("td",{key:0,"data-column-id":f.id,class:s.normalizeClass(["text-center",[i.lineState?e.lineStateClass(i.lineState):"",f.stickyLeft?"sticky-column-left":"",f.stickyRight?"sticky-column-right":""]]),onClick:s.withModifiers(B=>e.checkItem(i.id),["stop"])},[s.withDirectives(s.createElementVNode("input",{id:`checkbox-${l}`,"onUpdate:modelValue":b[13]||(b[13]=B=>o.selectedItems=B),type:"checkbox",class:"form-check-input hoverable",value:i.id,onClick:b[14]||(b[14]=s.withModifiers(()=>{},["stop"]))},null,8,bq),[[s.vModelCheckbox,o.selectedItems]])],10,Mq)):(f.show||o.headerEditMode)&&(!f.onlyOnEditMode||z.lineEditMode)?(s.openBlock(),s.createElementBlock("td",{key:1,"data-column-id":f.id,class:s.normalizeClass([[f.show?"":"table-danger",f.isSorted?"bg-gray-200":"",i.lineState?e.lineStateClass(i.lineState):"",f.stickyLeft?"sticky-column-left":"",f.stickyRight?"sticky-column-right":""],"text-center text-nowrap"])},[s.renderSlot(M.$slots,"tableBodyTd",{header:f,item:i},void 0,!0)],10,zq)):s.createCommentVNode("",!0)],64))),128))],14,$i))),128))])],6))])]),s.createElementVNode("div",pq,[o.totalPages&&o.totalPages>1?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["col p-0 me-3 d-flex",{"justify-content-center":z.paginationPosition==="center","justify-content-end":z.paginationPosition==="right","justify-content-start":z.paginationPosition==="left"}])},[s.createElementVNode("ul",Oq,[s.createElementVNode("li",oq,[s.createElementVNode("a",{class:s.normalizeClass(["page-link",{disabled:o.currentPage===1}]),onClick:b[15]||(b[15]=i=>o.currentPage=1)}," « ",2)]),s.createElementVNode("li",cq,[s.createElementVNode("a",{class:s.normalizeClass(["page-link",{disabled:o.currentPage===1}]),onClick:b[16]||(b[16]=i=>o.currentPage-=1)}," < ",2)]),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.currentDisplayPagination,i=>(s.openBlock(),s.createElementBlock("li",{key:i,class:s.normalizeClass(["page-item hoverable",{active:o.currentPage===i}])},[s.createElementVNode("a",{class:"page-link",onClick:l=>o.currentPage=i},s.toDisplayString(i),9,eq)],2))),128)),s.createElementVNode("li",tq,[s.createElementVNode("a",{class:s.normalizeClass(["page-link",{disabled:o.currentPage===o.totalPages}]),onClick:b[17]||(b[17]=i=>o.currentPage+=1)}," > ",2)]),s.createElementVNode("li",Aq,[s.createElementVNode("a",{class:s.normalizeClass(["page-link",{disabled:o.currentPage===o.totalPages}]),onClick:b[18]||(b[18]=i=>o.currentPage=o.totalPages)}," » ",2)])])],2)):s.createCommentVNode("",!0),z.stickyScrollbarHorizontal?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["bottom-scrollbar",{visible:o.showScrollbar}])},b[21]||(b[21]=[s.createElementVNode("div",{class:"scrollbar-content"},null,-1)]),2)):s.createCommentVNode("",!0)])],64)}const oc=mi(Ni,[["render",nq],["__scopeId","data-v-e855432c"]]);p2.AmsomTableDraggable=oc,p2.default=oc,Object.defineProperties(p2,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.select-max-item-per-page[data-v-
|
|
1
|
+
.select-max-item-per-page[data-v-e855432c]{background-color:transparent;font-size:12px;height:100%;color:var(--bs-secondary);border:1px solid var(--bs-secondary)}.select-max-item-per-page[data-v-e855432c]:hover{color:var(--bs-white);cursor:pointer;background-color:var(--bs-secondary)}.select-max-item-per-page[data-v-e855432c]:focus{box-shadow:none}input[type=checkbox][data-v-e855432c]{pointer-events:none}.cursor-default[data-v-e855432c]{cursor:default!important}.hoverable[data-v-e855432c]:hover{cursor:pointer!important}.hoverable-grab[data-v-e855432c]:hover{cursor:grab!important}.hoverable-grabbing[data-v-e855432c]:hover{cursor:grabbing!important}.hoverable-no-drop[data-v-e855432c]:hover{cursor:no-drop!important}.addLineState[data-v-e855432c]{background-color:#edecd4!important}.deleteLineState[data-v-e855432c]{background-color:#f8d6da!important}.updateLineState[data-v-e855432c]{background-color:#c4e8ff!important}.sticky-column-left[data-v-e855432c]{position:sticky;left:0;z-index:2;background-color:#fff;border-left:1px solid #ddd}.sticky-column-right[data-v-e855432c]{position:sticky;right:0;z-index:2;background-color:#fff;border-left:1px solid #ddd}table[data-v-e855432c]{border-radius:10px!important}table tr:first-child th[data-v-e855432c]:first-child{border-top-left-radius:10px!important}table tr:first-child th[data-v-e855432c]:last-child{border-top-right-radius:10px!important}table tr:last-child td[data-v-e855432c]:first-child{border-bottom-left-radius:10px!important}table tr:last-child td[data-v-e855432c]:last-child{border-bottom-right-radius:10px!important}.deep-filter-ghost-class[data-v-e855432c]{background-color:var(--bs-secondary)!important;color:rgba(var(--bs-white-rgb),1)!important}.col-12.p-0.overflow-x-auto[data-v-e855432c],.table-container[data-v-e855432c]{overflow-x:auto;max-width:100%}.bottom-scrollbar[data-v-e855432c]{position:fixed;bottom:0;left:0;width:100%;height:15px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;z-index:999;display:none;scrollbar-width:auto;transition:opacity .3s ease-in-out}.bottom-scrollbar.visible[data-v-e855432c]{display:block}.scrollbar-content[data-v-e855432c]{width:2000px;height:1px}
|