@amsom-habitat/amsom-table 4.5.0 → 4.5.1

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.
@@ -10839,7 +10839,7 @@ function ho(M) {
10839
10839
  }) : "0 €";
10840
10840
  }
10841
10841
  function Jp(M, b = "DD/MM/YYYY") {
10842
- return z2.unix(M).isValid() ? z2.unix(M).format(b) : M;
10842
+ return !M || !z2.unix(M).isValid() ? M : z2.unix(M).format(b);
10843
10843
  }
10844
10844
  function Lo(M, b = "DD/MM/YYYY à HH:mm") {
10845
10845
  return Jp(M, b);
@@ -590,4 +590,4 @@ w.version="2.30.1",AA(R0),w.fn=B,w.min=Za,w.max=$a,w.now=Mr,w.utc=T1,w.unix=X4,w
590
590
  Arguments: `+Array.prototype.slice.call(n).join("")+`
591
591
  `+new Error().stack),t=!1}return e.apply(this,arguments)},e)}var K0={};function c1(O,e){p.deprecationHandler!=null&&p.deprecationHandler(O,e),K0[O]||(k0(e),K0[O]=!0)}p.suppressDeprecationWarnings=!1,p.deprecationHandler=null;function X0(O){return typeof Function<"u"&&O instanceof Function||Object.prototype.toString.call(O)==="[object Function]"}function Y0(O){var e,t;for(t in O)r(O,t)&&(e=O[t],X0(e)?this[t]=e:this["_"+t]=e);this._config=O,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Z0(O,e){var t=x({},O),n;for(n in e)r(e,n)&&(A(O[n])&&A(e[n])?(t[n]={},x(t[n],O[n]),x(t[n],e[n])):e[n]!=null?t[n]=e[n]:delete t[n]);for(n in O)r(O,n)&&!r(e,n)&&A(O[n])&&(t[n]=x({},t[n]));return t}function l0(O){O!=null&&this.set(O)}var t1;Object.keys?t1=Object.keys:t1=function(O){var e,t=[];for(e in O)r(O,e)&&t.push(e);return t};var q1={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function f2(O,e,t){var n=this._calendar[O]||this._calendar.sameElse;return X0(n)?n.call(e,t):n}function U0(O,e,t){var n=""+Math.abs(O),a=e-n.length,d=O>=0;return(d?t?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var h1=/(\[[^\[]*\])|(\\)?([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,w1=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,_={},P={};function h(O,e,t,n){var a=n;typeof n=="string"&&(a=function(){return this[n]()}),O&&(P[O]=a),e&&(P[e[0]]=function(){return U0(a.apply(this,arguments),e[1],e[2])}),t&&(P[t]=function(){return this.localeData().ordinal(a.apply(this,arguments),O)})}function i0(O){return O.match(/\[[\s\S]/)?O.replace(/^\[|\]$/g,""):O.replace(/\\/g,"")}function K(O){var e=O.match(h1),t,n;for(t=0,n=e.length;t<n;t++)P[e[t]]?e[t]=P[e[t]]:e[t]=i0(e[t]);return function(a){var d="",u;for(u=0;u<n;u++)d+=X0(e[u])?e[u].call(a,O):e[u];return d}}function h0(O,e){return O.isValid()?(e=D0(e,O.localeData()),_[e]=_[e]||K(e),_[e](O)):O.localeData().invalidDate()}function D0(O,e){var t=5;function n(a){return e.longDateFormat(a)||a}for(w1.lastIndex=0;t>=0&&w1.test(O);)O=O.replace(w1,n),w1.lastIndex=0,t-=1;return O}var Z1={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 Kp(O){var e=this._longDateFormat[O],t=this._longDateFormat[O.toUpperCase()];return e||!t?e:(this._longDateFormat[O]=t.match(h1).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[O])}var k2="Invalid date";function W(){return this._invalidDate}var L="%d",m=/\d{1,2}/;function S(O){return this._ordinal.replace("%d",O)}var G={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 o0(O,e,t,n){var a=this._relativeTime[t];return X0(a)?a(O,e,t,n):a.replace(/%d/i,O)}function v0(O,e){var t=this._relativeTime[O>0?"future":"past"];return X0(t)?t(e):t.replace(/%s/i,e)}var A0={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 b0(O){return typeof O=="string"?A0[O]||A0[O.toLowerCase()]:void 0}function jb(O){var e={},t,n;for(n in O)r(O,n)&&(t=b0(n),t&&(e[t]=O[n]));return e}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 aq(O){var e=[],t;for(t in O)r(O,t)&&e.push({unit:t,priority:Aq[t]});return e.sort(function(n,a){return n.priority-a.priority}),e}var Ae=/\d/,n1=/\d\d/,ae=/\d{3}/,Qp=/\d{4}/,Gb=/[+-]?\d{6}/,L0=/\d\d?/,re=/\d\d\d\d?/,ie=/\d\d\d\d\d\d?/,Vb=/\d{1,3}/,Jp=/\d{1,4}/,Kb=/[+-]?\d{1,6}/,oM=/\d+/,Qb=/[+-]?\d+/,rq=/Z|[+-]\d\d:?\d\d/gi,Jb=/Z|[+-]\d\d(?::?\d\d)?/gi,iq=/[+-]?\d+(\.\d{1,3})?/,YM=/[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,eM=/^[1-9]\d?/,Zp=/^([1-9]\d|\d)/,Zb;Zb={};function E(O,e,t){Zb[O]=X0(e)?e:function(n,a){return n&&t?t:e}}function qq(O,e){return r(Zb,O)?Zb[O](e._strict,e._locale):new RegExp(sq(O))}function sq(O){return $1(O.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,a,d){return t||n||a||d}))}function $1(O){return O.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function s1(O){return O<0?Math.ceil(O)||0:Math.floor(O)}function M0(O){var e=+O,t=0;return e!==0&&isFinite(e)&&(t=s1(e)),t}var $p={};function s0(O,e){var t,n=e,a;for(typeof O=="string"&&(O=[O]),l(e)&&(n=function(d,u){u[e]=M0(d)}),a=O.length,t=0;t<a;t++)$p[O[t]]=n}function FM(O,e){s0(O,function(t,n,a,d){a._w=a._w||{},e(t,a._w,a,d)})}function dq(O,e,t){e!=null&&r($p,O)&&$p[O](e,t._a,t,O)}function $b(O){return O%4===0&&O%100!==0||O%400===0}var Q0=0,M2=1,k1=2,I0=3,L1=4,b2=5,C2=6,Wq=7,lq=8;h("Y",0,0,function(){var O=this.year();return O<=9999?U0(O,4):"+"+O}),h(0,["YY",2],0,function(){return this.year()%100}),h(0,["YYYY",4],0,"year"),h(0,["YYYYY",5],0,"year"),h(0,["YYYYYY",6,!0],0,"year"),E("Y",Qb),E("YY",L0,n1),E("YYYY",Jp,Qp),E("YYYYY",Kb,Gb),E("YYYYYY",Kb,Gb),s0(["YYYYY","YYYYYY"],Q0),s0("YYYY",function(O,e){e[Q0]=O.length===2?p.parseTwoDigitYear(O):M0(O)}),s0("YY",function(O,e){e[Q0]=p.parseTwoDigitYear(O)}),s0("Y",function(O,e){e[Q0]=parseInt(O,10)});function UM(O){return $b(O)?366:365}p.parseTwoDigitYear=function(O){return M0(O)+(M0(O)>68?1900:2e3)};var qe=cM("FullYear",!0);function fq(){return $b(this.year())}function cM(O,e){return function(t){return t!=null?(se(this,O,t),p.updateOffset(this,e),this):HM(this,O)}}function HM(O,e){if(!O.isValid())return NaN;var t=O._d,n=O._isUTC;switch(e){case"Milliseconds":return n?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return n?t.getUTCSeconds():t.getSeconds();case"Minutes":return n?t.getUTCMinutes():t.getMinutes();case"Hours":return n?t.getUTCHours():t.getHours();case"Date":return n?t.getUTCDate():t.getDate();case"Day":return n?t.getUTCDay():t.getDay();case"Month":return n?t.getUTCMonth():t.getMonth();case"FullYear":return n?t.getUTCFullYear():t.getFullYear();default:return NaN}}function se(O,e,t){var n,a,d,u,k;if(!(!O.isValid()||isNaN(t))){switch(n=O._d,a=O._isUTC,e){case"Milliseconds":return void(a?n.setUTCMilliseconds(t):n.setMilliseconds(t));case"Seconds":return void(a?n.setUTCSeconds(t):n.setSeconds(t));case"Minutes":return void(a?n.setUTCMinutes(t):n.setMinutes(t));case"Hours":return void(a?n.setUTCHours(t):n.setHours(t));case"Date":return void(a?n.setUTCDate(t):n.setDate(t));case"FullYear":break;default:return}d=t,u=O.month(),k=O.date(),k=k===29&&u===1&&!$b(d)?28:k,a?n.setUTCFullYear(d,u,k):n.setFullYear(d,u,k)}}function uq(O){return O=b0(O),X0(this[O])?this[O]():this}function Rq(O,e){if(typeof O=="object"){O=jb(O);var t=aq(O),n,a=t.length;for(n=0;n<a;n++)this[t[n].unit](O[t[n].unit])}else if(O=b0(O),X0(this[O]))return this[O](e);return this}function hq(O,e){return(O%e+e)%e}var C0;Array.prototype.indexOf?C0=Array.prototype.indexOf:C0=function(O){var e;for(e=0;e<this.length;++e)if(this[e]===O)return e;return-1};function M3(O,e){if(isNaN(O)||isNaN(e))return NaN;var t=hq(e,12);return O+=(e-t)/12,t===1?$b(O)?29:28:31-t%7%2}h("M",["MM",2],"Mo",function(){return this.month()+1}),h("MMM",0,0,function(O){return this.localeData().monthsShort(this,O)}),h("MMMM",0,0,function(O){return this.localeData().months(this,O)}),E("M",L0,eM),E("MM",L0,n1),E("MMM",function(O,e){return e.monthsShortRegex(O)}),E("MMMM",function(O,e){return e.monthsRegex(O)}),s0(["M","MM"],function(O,e){e[M2]=M0(O)-1}),s0(["MMM","MMMM"],function(O,e,t,n){var a=t._locale.monthsParse(O,n,t._strict);a!=null?e[M2]=a:T(t).invalidMonth=O});var Lq="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),de="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),We=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,mq=YM,Nq=YM;function Bq(O,e){return O?c(this._months)?this._months[O.month()]:this._months[(this._months.isFormat||We).test(e)?"format":"standalone"][O.month()]:c(this._months)?this._months:this._months.standalone}function gq(O,e){return O?c(this._monthsShort)?this._monthsShort[O.month()]:this._monthsShort[We.test(e)?"format":"standalone"][O.month()]:c(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Xq(O,e,t){var n,a,d,u=O.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)d=D([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(d,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(d,"").toLocaleLowerCase();return t?e==="MMM"?(a=C0.call(this._shortMonthsParse,u),a!==-1?a:null):(a=C0.call(this._longMonthsParse,u),a!==-1?a:null):e==="MMM"?(a=C0.call(this._shortMonthsParse,u),a!==-1?a:(a=C0.call(this._longMonthsParse,u),a!==-1?a:null)):(a=C0.call(this._longMonthsParse,u),a!==-1?a:(a=C0.call(this._shortMonthsParse,u),a!==-1?a:null))}function yq(O,e,t){var n,a,d;if(this._monthsParseExact)return Xq.call(this,O,e,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=D([2e3,n]),t&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),!t&&!this._monthsParse[n]&&(d="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(d.replace(".",""),"i")),t&&e==="MMMM"&&this._longMonthsParse[n].test(O))return n;if(t&&e==="MMM"&&this._shortMonthsParse[n].test(O))return n;if(!t&&this._monthsParse[n].test(O))return n}}function le(O,e){if(!O.isValid())return O;if(typeof e=="string"){if(/^\d+$/.test(e))e=M0(e);else if(e=O.localeData().monthsParse(e),!l(e))return O}var t=e,n=O.date();return n=n<29?n:Math.min(n,M3(O.year(),t)),O._isUTC?O._d.setUTCMonth(t,n):O._d.setMonth(t,n),O}function fe(O){return O!=null?(le(this,O),p.updateOffset(this,!0),this):HM(this,"Month")}function Tq(){return M3(this.year(),this.month())}function Sq(O){return this._monthsParseExact?(r(this,"_monthsRegex")||ue.call(this),O?this._monthsShortStrictRegex:this._monthsShortRegex):(r(this,"_monthsShortRegex")||(this._monthsShortRegex=mq),this._monthsShortStrictRegex&&O?this._monthsShortStrictRegex:this._monthsShortRegex)}function _q(O){return this._monthsParseExact?(r(this,"_monthsRegex")||ue.call(this),O?this._monthsStrictRegex:this._monthsRegex):(r(this,"_monthsRegex")||(this._monthsRegex=Nq),this._monthsStrictRegex&&O?this._monthsStrictRegex:this._monthsRegex)}function ue(){function O(V,z0){return z0.length-V.length}var e=[],t=[],n=[],a,d,u,k;for(a=0;a<12;a++)d=D([2e3,a]),u=$1(this.monthsShort(d,"")),k=$1(this.months(d,"")),e.push(u),t.push(k),n.push(k),n.push(u);e.sort(O),t.sort(O),n.sort(O),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function vq(O,e,t,n,a,d,u){var k;return O<100&&O>=0?(k=new Date(O+400,e,t,n,a,d,u),isFinite(k.getFullYear())&&k.setFullYear(O)):k=new Date(O,e,t,n,a,d,u),k}function jM(O){var e,t;return O<100&&O>=0?(t=Array.prototype.slice.call(arguments),t[0]=O+400,e=new Date(Date.UTC.apply(null,t)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(O)):e=new Date(Date.UTC.apply(null,arguments)),e}function Mz(O,e,t){var n=7+e-t,a=(7+jM(O,0,n).getUTCDay()-e)%7;return-a+n-1}function Re(O,e,t,n,a){var d=(7+t-n)%7,u=Mz(O,n,a),k=1+7*(e-1)+d+u,V,z0;return k<=0?(V=O-1,z0=UM(V)+k):k>UM(O)?(V=O+1,z0=k-UM(O)):(V=O,z0=k),{year:V,dayOfYear:z0}}function GM(O,e,t){var n=Mz(O.year(),e,t),a=Math.floor((O.dayOfYear()-n-1)/7)+1,d,u;return a<1?(u=O.year()-1,d=a+z2(u,e,t)):a>z2(O.year(),e,t)?(d=a-z2(O.year(),e,t),u=O.year()+1):(u=O.year(),d=a),{week:d,year:u}}function z2(O,e,t){var n=Mz(O,e,t),a=Mz(O+1,e,t);return(UM(O)-n+a)/7}h("w",["ww",2],"wo","week"),h("W",["WW",2],"Wo","isoWeek"),E("w",L0,eM),E("ww",L0,n1),E("W",L0,eM),E("WW",L0,n1),FM(["w","ww","W","WW"],function(O,e,t,n){e[n.substr(0,1)]=M0(O)});function wq(O){return GM(O,this._week.dow,this._week.doy).week}var kq={dow:0,doy:6};function Cq(){return this._week.dow}function Eq(){return this._week.doy}function Dq(O){var e=this.localeData().week(this);return O==null?e:this.add((O-e)*7,"d")}function Pq(O){var e=GM(this,1,4).week;return O==null?e:this.add((O-e)*7,"d")}h("d",0,"do","day"),h("dd",0,0,function(O){return this.localeData().weekdaysMin(this,O)}),h("ddd",0,0,function(O){return this.localeData().weekdaysShort(this,O)}),h("dddd",0,0,function(O){return this.localeData().weekdays(this,O)}),h("e",0,0,"weekday"),h("E",0,0,"isoWeekday"),E("d",L0),E("e",L0),E("E",L0),E("dd",function(O,e){return e.weekdaysMinRegex(O)}),E("ddd",function(O,e){return e.weekdaysShortRegex(O)}),E("dddd",function(O,e){return e.weekdaysRegex(O)}),FM(["dd","ddd","dddd"],function(O,e,t,n){var a=t._locale.weekdaysParse(O,n,t._strict);a!=null?e.d=a:T(t).invalidWeekday=O}),FM(["d","e","E"],function(O,e,t,n){e[n]=M0(O)});function xq(O,e){return typeof O!="string"?O:isNaN(O)?(O=e.weekdaysParse(O),typeof O=="number"?O:null):parseInt(O,10)}function Iq(O,e){return typeof O=="string"?e.weekdaysParse(O)%7||7:isNaN(O)?null:O}function b3(O,e){return O.slice(e,7).concat(O.slice(0,e))}var Yq="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),he="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Fq="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Uq=YM,Hq=YM,jq=YM;function Gq(O,e){var t=c(this._weekdays)?this._weekdays:this._weekdays[O&&O!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return O===!0?b3(t,this._week.dow):O?t[O.day()]:t}function Vq(O){return O===!0?b3(this._weekdaysShort,this._week.dow):O?this._weekdaysShort[O.day()]:this._weekdaysShort}function Kq(O){return O===!0?b3(this._weekdaysMin,this._week.dow):O?this._weekdaysMin[O.day()]:this._weekdaysMin}function Qq(O,e,t){var n,a,d,u=O.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)d=D([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(d,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(d,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(d,"").toLocaleLowerCase();return t?e==="dddd"?(a=C0.call(this._weekdaysParse,u),a!==-1?a:null):e==="ddd"?(a=C0.call(this._shortWeekdaysParse,u),a!==-1?a:null):(a=C0.call(this._minWeekdaysParse,u),a!==-1?a:null):e==="dddd"?(a=C0.call(this._weekdaysParse,u),a!==-1||(a=C0.call(this._shortWeekdaysParse,u),a!==-1)?a:(a=C0.call(this._minWeekdaysParse,u),a!==-1?a:null)):e==="ddd"?(a=C0.call(this._shortWeekdaysParse,u),a!==-1||(a=C0.call(this._weekdaysParse,u),a!==-1)?a:(a=C0.call(this._minWeekdaysParse,u),a!==-1?a:null)):(a=C0.call(this._minWeekdaysParse,u),a!==-1||(a=C0.call(this._weekdaysParse,u),a!==-1)?a:(a=C0.call(this._shortWeekdaysParse,u),a!==-1?a:null))}function Jq(O,e,t){var n,a,d;if(this._weekdaysParseExact)return Qq.call(this,O,e,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=D([2e3,1]).day(n),t&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(d="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(d.replace(".",""),"i")),t&&e==="dddd"&&this._fullWeekdaysParse[n].test(O))return n;if(t&&e==="ddd"&&this._shortWeekdaysParse[n].test(O))return n;if(t&&e==="dd"&&this._minWeekdaysParse[n].test(O))return n;if(!t&&this._weekdaysParse[n].test(O))return n}}function Zq(O){if(!this.isValid())return O!=null?this:NaN;var e=HM(this,"Day");return O!=null?(O=xq(O,this.localeData()),this.add(O-e,"d")):e}function $q(O){if(!this.isValid())return O!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return O==null?e:this.add(O-e,"d")}function Ms(O){if(!this.isValid())return O!=null?this:NaN;if(O!=null){var e=Iq(O,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function bs(O){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||z3.call(this),O?this._weekdaysStrictRegex:this._weekdaysRegex):(r(this,"_weekdaysRegex")||(this._weekdaysRegex=Uq),this._weekdaysStrictRegex&&O?this._weekdaysStrictRegex:this._weekdaysRegex)}function zs(O){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||z3.call(this),O?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(r(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Hq),this._weekdaysShortStrictRegex&&O?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ps(O){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||z3.call(this),O?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(r(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=jq),this._weekdaysMinStrictRegex&&O?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function z3(){function O($0,c2){return c2.length-$0.length}var e=[],t=[],n=[],a=[],d,u,k,V,z0;for(d=0;d<7;d++)u=D([2e3,1]).day(d),k=$1(this.weekdaysMin(u,"")),V=$1(this.weekdaysShort(u,"")),z0=$1(this.weekdays(u,"")),e.push(k),t.push(V),n.push(z0),a.push(k),a.push(V),a.push(z0);e.sort(O),t.sort(O),n.sort(O),a.sort(O),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function p3(){return this.hours()%12||12}function Os(){return this.hours()||24}h("H",["HH",2],0,"hour"),h("h",["hh",2],0,p3),h("k",["kk",2],0,Os),h("hmm",0,0,function(){return""+p3.apply(this)+U0(this.minutes(),2)}),h("hmmss",0,0,function(){return""+p3.apply(this)+U0(this.minutes(),2)+U0(this.seconds(),2)}),h("Hmm",0,0,function(){return""+this.hours()+U0(this.minutes(),2)}),h("Hmmss",0,0,function(){return""+this.hours()+U0(this.minutes(),2)+U0(this.seconds(),2)});function Le(O,e){h(O,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}Le("a",!0),Le("A",!1);function me(O,e){return e._meridiemParse}E("a",me),E("A",me),E("H",L0,Zp),E("h",L0,eM),E("k",L0,eM),E("HH",L0,n1),E("hh",L0,n1),E("kk",L0,n1),E("hmm",re),E("hmmss",ie),E("Hmm",re),E("Hmmss",ie),s0(["H","HH"],I0),s0(["k","kk"],function(O,e,t){var n=M0(O);e[I0]=n===24?0:n}),s0(["a","A"],function(O,e,t){t._isPm=t._locale.isPM(O),t._meridiem=O}),s0(["h","hh"],function(O,e,t){e[I0]=M0(O),T(t).bigHour=!0}),s0("hmm",function(O,e,t){var n=O.length-2;e[I0]=M0(O.substr(0,n)),e[L1]=M0(O.substr(n)),T(t).bigHour=!0}),s0("hmmss",function(O,e,t){var n=O.length-4,a=O.length-2;e[I0]=M0(O.substr(0,n)),e[L1]=M0(O.substr(n,2)),e[b2]=M0(O.substr(a)),T(t).bigHour=!0}),s0("Hmm",function(O,e,t){var n=O.length-2;e[I0]=M0(O.substr(0,n)),e[L1]=M0(O.substr(n))}),s0("Hmmss",function(O,e,t){var n=O.length-4,a=O.length-2;e[I0]=M0(O.substr(0,n)),e[L1]=M0(O.substr(n,2)),e[b2]=M0(O.substr(a))});function os(O){return(O+"").toLowerCase().charAt(0)==="p"}var es=/[ap]\.?m?\.?/i,cs=cM("Hours",!0);function ts(O,e,t){return O>11?t?"pm":"PM":t?"am":"AM"}var Ne={calendar:q1,longDateFormat:Z1,invalidDate:k2,ordinal:L,dayOfMonthOrdinalParse:m,relativeTime:G,months:Lq,monthsShort:de,week:kq,weekdays:Yq,weekdaysMin:Fq,weekdaysShort:he,meridiemParse:es},y0={},VM={},KM;function ns(O,e){var t,n=Math.min(O.length,e.length);for(t=0;t<n;t+=1)if(O[t]!==e[t])return t;return n}function Be(O){return O&&O.toLowerCase().replace("_","-")}function As(O){for(var e=0,t,n,a,d;e<O.length;){for(d=Be(O[e]).split("-"),t=d.length,n=Be(O[e+1]),n=n?n.split("-"):null;t>0;){if(a=bz(d.slice(0,t).join("-")),a)return a;if(n&&n.length>=t&&ns(d,n)>=t-1)break;t--}e++}return KM}function as(O){return!!(O&&O.match("^[^/\\\\]*$"))}function bz(O){var e=null,t;if(y0[O]===void 0&&M&&M.exports&&as(O))try{e=KM._abbr,t=$o,t("./locale/"+O),u2(e)}catch{y0[O]=null}return y0[O]}function u2(O,e){var t;return O&&(i(e)?t=p2(O):t=O3(O,e),t?KM=t:typeof console<"u"&&console.warn&&console.warn("Locale "+O+" not found. Did you forget to load it?")),KM._abbr}function O3(O,e){if(e!==null){var t,n=Ne;if(e.abbr=O,y0[O]!=null)c1("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."),n=y0[O]._config;else if(e.parentLocale!=null)if(y0[e.parentLocale]!=null)n=y0[e.parentLocale]._config;else if(t=bz(e.parentLocale),t!=null)n=t._config;else return VM[e.parentLocale]||(VM[e.parentLocale]=[]),VM[e.parentLocale].push({name:O,config:e}),null;return y0[O]=new l0(Z0(n,e)),VM[O]&&VM[O].forEach(function(a){O3(a.name,a.config)}),u2(O),y0[O]}else return delete y0[O],null}function rs(O,e){if(e!=null){var t,n,a=Ne;y0[O]!=null&&y0[O].parentLocale!=null?y0[O].set(Z0(y0[O]._config,e)):(n=bz(O),n!=null&&(a=n._config),e=Z0(a,e),n==null&&(e.abbr=O),t=new l0(e),t.parentLocale=y0[O],y0[O]=t),u2(O)}else y0[O]!=null&&(y0[O].parentLocale!=null?(y0[O]=y0[O].parentLocale,O===u2()&&u2(O)):y0[O]!=null&&delete y0[O]);return y0[O]}function p2(O){var e;if(O&&O._locale&&O._locale._abbr&&(O=O._locale._abbr),!O)return KM;if(!c(O)){if(e=bz(O),e)return e;O=[O]}return As(O)}function is(){return t1(y0)}function o3(O){var e,t=O._a;return t&&T(O).overflow===-2&&(e=t[M2]<0||t[M2]>11?M2:t[k1]<1||t[k1]>M3(t[Q0],t[M2])?k1:t[I0]<0||t[I0]>24||t[I0]===24&&(t[L1]!==0||t[b2]!==0||t[C2]!==0)?I0:t[L1]<0||t[L1]>59?L1:t[b2]<0||t[b2]>59?b2:t[C2]<0||t[C2]>999?C2:-1,T(O)._overflowDayOfYear&&(e<Q0||e>k1)&&(e=k1),T(O)._overflowWeeks&&e===-1&&(e=Wq),T(O)._overflowWeekday&&e===-1&&(e=lq),T(O).overflow=e),O}var qs=/^\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)?)?$/,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=/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]],e3=[["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/]],Ws=/^\/?Date\((-?\d+)/i,ls=/^(?:(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}))$/,fs={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 ge(O){var e,t,n=O._i,a=qs.exec(n)||ss.exec(n),d,u,k,V,z0=zz.length,$0=e3.length;if(a){for(T(O).iso=!0,e=0,t=z0;e<t;e++)if(zz[e][1].exec(a[1])){u=zz[e][0],d=zz[e][2]!==!1;break}if(u==null){O._isValid=!1;return}if(a[3]){for(e=0,t=$0;e<t;e++)if(e3[e][1].exec(a[3])){k=(a[2]||" ")+e3[e][0];break}if(k==null){O._isValid=!1;return}}if(!d&&k!=null){O._isValid=!1;return}if(a[4])if(ds.exec(a[4]))V="Z";else{O._isValid=!1;return}O._f=u+(k||"")+(V||""),t3(O)}else O._isValid=!1}function us(O,e,t,n,a,d){var u=[Rs(O),de.indexOf(e),parseInt(t,10),parseInt(n,10),parseInt(a,10)];return d&&u.push(parseInt(d,10)),u}function Rs(O){var e=parseInt(O,10);return e<=49?2e3+e:e<=999?1900+e:e}function hs(O){return O.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ls(O,e,t){if(O){var n=he.indexOf(O),a=new Date(e[0],e[1],e[2]).getDay();if(n!==a)return T(t).weekdayMismatch=!0,t._isValid=!1,!1}return!0}function ms(O,e,t){if(O)return fs[O];if(e)return 0;var n=parseInt(t,10),a=n%100,d=(n-a)/100;return d*60+a}function Xe(O){var e=ls.exec(hs(O._i)),t;if(e){if(t=us(e[4],e[3],e[2],e[5],e[6],e[7]),!Ls(e[1],t,O))return;O._a=t,O._tzm=ms(e[8],e[9],e[10]),O._d=jM.apply(null,O._a),O._d.setUTCMinutes(O._d.getUTCMinutes()-O._tzm),T(O).rfc2822=!0}else O._isValid=!1}function Ns(O){var e=Ws.exec(O._i);if(e!==null){O._d=new Date(+e[1]);return}if(ge(O),O._isValid===!1)delete O._isValid;else return;if(Xe(O),O._isValid===!1)delete O._isValid;else return;O._strict?O._isValid=!1:p.createFromInputFallback(O)}p.createFromInputFallback=T0("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 tM(O,e,t){return O??e??t}function Bs(O){var e=new Date(p.now());return O._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function c3(O){var e,t,n=[],a,d,u;if(!O._d){for(a=Bs(O),O._w&&O._a[k1]==null&&O._a[M2]==null&&gs(O),O._dayOfYear!=null&&(u=tM(O._a[Q0],a[Q0]),(O._dayOfYear>UM(u)||O._dayOfYear===0)&&(T(O)._overflowDayOfYear=!0),t=jM(u,0,O._dayOfYear),O._a[M2]=t.getUTCMonth(),O._a[k1]=t.getUTCDate()),e=0;e<3&&O._a[e]==null;++e)O._a[e]=n[e]=a[e];for(;e<7;e++)O._a[e]=n[e]=O._a[e]==null?e===2?1:0:O._a[e];O._a[I0]===24&&O._a[L1]===0&&O._a[b2]===0&&O._a[C2]===0&&(O._nextDay=!0,O._a[I0]=0),O._d=(O._useUTC?jM:vq).apply(null,n),d=O._useUTC?O._d.getUTCDay():O._d.getDay(),O._tzm!=null&&O._d.setUTCMinutes(O._d.getUTCMinutes()-O._tzm),O._nextDay&&(O._a[I0]=24),O._w&&typeof O._w.d<"u"&&O._w.d!==d&&(T(O).weekdayMismatch=!0)}}function gs(O){var e,t,n,a,d,u,k,V,z0;e=O._w,e.GG!=null||e.W!=null||e.E!=null?(d=1,u=4,t=tM(e.GG,O._a[Q0],GM(m0(),1,4).year),n=tM(e.W,1),a=tM(e.E,1),(a<1||a>7)&&(V=!0)):(d=O._locale._week.dow,u=O._locale._week.doy,z0=GM(m0(),d,u),t=tM(e.gg,O._a[Q0],z0.year),n=tM(e.w,z0.week),e.d!=null?(a=e.d,(a<0||a>6)&&(V=!0)):e.e!=null?(a=e.e+d,(e.e<0||e.e>6)&&(V=!0)):a=d),n<1||n>z2(t,d,u)?T(O)._overflowWeeks=!0:V!=null?T(O)._overflowWeekday=!0:(k=Re(t,n,a,d,u),O._a[Q0]=k.year,O._dayOfYear=k.dayOfYear)}p.ISO_8601=function(){},p.RFC_2822=function(){};function t3(O){if(O._f===p.ISO_8601){ge(O);return}if(O._f===p.RFC_2822){Xe(O);return}O._a=[],T(O).empty=!0;var e=""+O._i,t,n,a,d,u,k=e.length,V=0,z0,$0;for(a=D0(O._f,O._locale).match(h1)||[],$0=a.length,t=0;t<$0;t++)d=a[t],n=(e.match(qq(d,O))||[])[0],n&&(u=e.substr(0,e.indexOf(n)),u.length>0&&T(O).unusedInput.push(u),e=e.slice(e.indexOf(n)+n.length),V+=n.length),P[d]?(n?T(O).empty=!1:T(O).unusedTokens.push(d),dq(d,n,O)):O._strict&&!n&&T(O).unusedTokens.push(d);T(O).charsLeftOver=k-V,e.length>0&&T(O).unusedInput.push(e),O._a[I0]<=12&&T(O).bigHour===!0&&O._a[I0]>0&&(T(O).bigHour=void 0),T(O).parsedDateParts=O._a.slice(0),T(O).meridiem=O._meridiem,O._a[I0]=Xs(O._locale,O._a[I0],O._meridiem),z0=T(O).era,z0!==null&&(O._a[Q0]=O._locale.erasConvertYear(z0,O._a[Q0])),c3(O),o3(O)}function Xs(O,e,t){var n;return t==null?e:O.meridiemHour!=null?O.meridiemHour(e,t):(O.isPM!=null&&(n=O.isPM(t),n&&e<12&&(e+=12),!n&&e===12&&(e=0)),e)}function ys(O){var e,t,n,a,d,u,k=!1,V=O._f.length;if(V===0){T(O).invalidFormat=!0,O._d=new Date(NaN);return}for(a=0;a<V;a++)d=0,u=!1,e=d0({},O),O._useUTC!=null&&(e._useUTC=O._useUTC),e._f=O._f[a],t3(e),y(e)&&(u=!0),d+=T(e).charsLeftOver,d+=T(e).unusedTokens.length*10,T(e).score=d,k?d<n&&(n=d,t=e):(n==null||d<n||u)&&(n=d,t=e,u&&(k=!0));x(O,t||e)}function Ts(O){if(!O._d){var e=jb(O._i),t=e.day===void 0?e.date:e.day;O._a=R([e.year,e.month,t,e.hour,e.minute,e.second,e.millisecond],function(n){return n&&parseInt(n,10)}),c3(O)}}function Ss(O){var e=new W0(o3(ye(O)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function ye(O){var e=O._i,t=O._f;return O._locale=O._locale||p2(O._l),e===null||t===void 0&&e===""?j({nullInput:!0}):(typeof e=="string"&&(O._i=e=O._locale.preparse(e)),g0(e)?new W0(o3(e)):(f(e)?O._d=e:c(t)?ys(O):t?t3(O):_s(O),y(O)||(O._d=null),O))}function _s(O){var e=O._i;i(e)?O._d=new Date(p.now()):f(e)?O._d=new Date(e.valueOf()):typeof e=="string"?Ns(O):c(e)?(O._a=R(e.slice(0),function(t){return parseInt(t,10)}),c3(O)):A(e)?Ts(O):l(e)?O._d=new Date(e):p.createFromInputFallback(O)}function Te(O,e,t,n,a){var d={};return(e===!0||e===!1)&&(n=e,e=void 0),(t===!0||t===!1)&&(n=t,t=void 0),(A(O)&&s(O)||c(O)&&O.length===0)&&(O=void 0),d._isAMomentObject=!0,d._useUTC=d._isUTC=a,d._l=t,d._i=O,d._f=e,d._strict=n,Ss(d)}function m0(O,e,t,n){return Te(O,e,t,n,!1)}var vs=T0("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var O=m0.apply(null,arguments);return this.isValid()&&O.isValid()?O<this?this:O:j()}),ws=T0("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var O=m0.apply(null,arguments);return this.isValid()&&O.isValid()?O>this?this:O:j()});function Se(O,e){var t,n;if(e.length===1&&c(e[0])&&(e=e[0]),!e.length)return m0();for(t=e[0],n=1;n<e.length;++n)(!e[n].isValid()||e[n][O](t))&&(t=e[n]);return t}function ks(){var O=[].slice.call(arguments,0);return Se("isBefore",O)}function Cs(){var O=[].slice.call(arguments,0);return Se("isAfter",O)}var Es=function(){return Date.now?Date.now():+new Date},QM=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ds(O){var e,t=!1,n,a=QM.length;for(e in O)if(r(O,e)&&!(C0.call(QM,e)!==-1&&(O[e]==null||!isNaN(O[e]))))return!1;for(n=0;n<a;++n)if(O[QM[n]]){if(t)return!1;parseFloat(O[QM[n]])!==M0(O[QM[n]])&&(t=!0)}return!0}function Ps(){return this._isValid}function xs(){return m1(NaN)}function pz(O){var e=jb(O),t=e.year||0,n=e.quarter||0,a=e.month||0,d=e.week||e.isoWeek||0,u=e.day||0,k=e.hour||0,V=e.minute||0,z0=e.second||0,$0=e.millisecond||0;this._isValid=Ds(e),this._milliseconds=+$0+z0*1e3+V*6e4+k*1e3*60*60,this._days=+u+d*7,this._months=+a+n*3+t*12,this._data={},this._locale=p2(),this._bubble()}function Oz(O){return O instanceof pz}function n3(O){return O<0?Math.round(-1*O)*-1:Math.round(O)}function Is(O,e,t){var n=Math.min(O.length,e.length),a=Math.abs(O.length-e.length),d=0,u;for(u=0;u<n;u++)M0(O[u])!==M0(e[u])&&d++;return d+a}function _e(O,e){h(O,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+U0(~~(t/60),2)+e+U0(~~t%60,2)})}_e("Z",":"),_e("ZZ",""),E("Z",Jb),E("ZZ",Jb),s0(["Z","ZZ"],function(O,e,t){t._useUTC=!0,t._tzm=A3(Jb,O)});var Ys=/([\+\-]|\d\d)/gi;function A3(O,e){var t=(e||"").match(O),n,a,d;return t===null?null:(n=t[t.length-1]||[],a=(n+"").match(Ys)||["-",0,0],d=+(a[1]*60)+M0(a[2]),d===0?0:a[0]==="+"?d:-d)}function a3(O,e){var t,n;return e._isUTC?(t=e.clone(),n=(g0(O)||f(O)?O.valueOf():m0(O).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+n),p.updateOffset(t,!1),t):m0(O).local()}function r3(O){return-Math.round(O._d.getTimezoneOffset())}p.updateOffset=function(){};function Fs(O,e,t){var n=this._offset||0,a;if(!this.isValid())return O!=null?this:NaN;if(O!=null){if(typeof O=="string"){if(O=A3(Jb,O),O===null)return this}else Math.abs(O)<16&&!t&&(O=O*60);return!this._isUTC&&e&&(a=r3(this)),this._offset=O,this._isUTC=!0,a!=null&&this.add(a,"m"),n!==O&&(!e||this._changeInProgress?Ce(this,m1(O-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,p.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:r3(this)}function Us(O,e){return O!=null?(typeof O!="string"&&(O=-O),this.utcOffset(O,e),this):-this.utcOffset()}function Hs(O){return this.utcOffset(0,O)}function js(O){return this._isUTC&&(this.utcOffset(0,O),this._isUTC=!1,O&&this.subtract(r3(this),"m")),this}function Gs(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var O=A3(rq,this._i);O!=null?this.utcOffset(O):this.utcOffset(0,!0)}return this}function Vs(O){return this.isValid()?(O=O?m0(O).utcOffset():0,(this.utcOffset()-O)%60===0):!1}function Ks(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Qs(){if(!i(this._isDSTShifted))return this._isDSTShifted;var O={},e;return d0(O,this),O=ye(O),O._a?(e=O._isUTC?D(O._a):m0(O._a),this._isDSTShifted=this.isValid()&&Is(O._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Js(){return this.isValid()?!this._isUTC:!1}function Zs(){return this.isValid()?this._isUTC:!1}function ve(){return this.isValid()?this._isUTC&&this._offset===0:!1}var $s=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,M5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function m1(O,e){var t=O,n=null,a,d,u;return Oz(O)?t={ms:O._milliseconds,d:O._days,M:O._months}:l(O)||!isNaN(+O)?(t={},e?t[e]=+O:t.milliseconds=+O):(n=$s.exec(O))?(a=n[1]==="-"?-1:1,t={y:0,d:M0(n[k1])*a,h:M0(n[I0])*a,m:M0(n[L1])*a,s:M0(n[b2])*a,ms:M0(n3(n[C2]*1e3))*a}):(n=M5.exec(O))?(a=n[1]==="-"?-1:1,t={y:E2(n[2],a),M:E2(n[3],a),w:E2(n[4],a),d:E2(n[5],a),h:E2(n[6],a),m:E2(n[7],a),s:E2(n[8],a)}):t==null?t={}:typeof t=="object"&&("from"in t||"to"in t)&&(u=b5(m0(t.from),m0(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}m1.fn=pz.prototype,m1.invalid=xs;function E2(O,e){var t=O&&parseFloat(O.replace(",","."));return(isNaN(t)?0:t)*e}function we(O,e){var t={};return t.months=e.month()-O.month()+(e.year()-O.year())*12,O.clone().add(t.months,"M").isAfter(e)&&--t.months,t.milliseconds=+e-+O.clone().add(t.months,"M"),t}function b5(O,e){var t;return O.isValid()&&e.isValid()?(e=a3(e,O),O.isBefore(e)?t=we(O,e):(t=we(e,O),t.milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function ke(O,e){return function(t,n){var a,d;return n!==null&&!isNaN(+n)&&(c1(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),d=t,t=n,n=d),a=m1(t,n),Ce(this,a,O),this}}function Ce(O,e,t,n){var a=e._milliseconds,d=n3(e._days),u=n3(e._months);O.isValid()&&(n=n??!0,u&&le(O,HM(O,"Month")+u*t),d&&se(O,"Date",HM(O,"Date")+d*t),a&&O._d.setTime(O._d.valueOf()+a*t),n&&p.updateOffset(O,d||u))}var z5=ke(1,"add"),p5=ke(-1,"subtract");function Ee(O){return typeof O=="string"||O instanceof String}function O5(O){return g0(O)||f(O)||Ee(O)||l(O)||e5(O)||o5(O)||O===null||O===void 0}function o5(O){var e=A(O)&&!s(O),t=!1,n=["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=n.length;for(a=0;a<u;a+=1)d=n[a],t=t||r(O,d);return e&&t}function e5(O){var e=c(O),t=!1;return e&&(t=O.filter(function(n){return!l(n)&&Ee(O)}).length===0),e&&t}function c5(O){var e=A(O)&&!s(O),t=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],a,d;for(a=0;a<n.length;a+=1)d=n[a],t=t||r(O,d);return e&&t}function t5(O,e){var t=O.diff(e,"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,e){arguments.length===1&&(arguments[0]?O5(arguments[0])?(O=arguments[0],e=void 0):c5(arguments[0])&&(e=arguments[0],O=void 0):(O=void 0,e=void 0));var t=O||m0(),n=a3(t,this).startOf("day"),a=p.calendarFormat(this,n)||"sameElse",d=e&&(X0(e[a])?e[a].call(this,t):e[a]);return this.format(d||this.localeData().calendar(a,this,m0(t)))}function A5(){return new W0(this)}function a5(O,e){var t=g0(O)?O:m0(O);return this.isValid()&&t.isValid()?(e=b0(e)||"millisecond",e==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(e).valueOf()):!1}function r5(O,e){var t=g0(O)?O:m0(O);return this.isValid()&&t.isValid()?(e=b0(e)||"millisecond",e==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(e).valueOf()<t.valueOf()):!1}function i5(O,e,t,n){var a=g0(O)?O:m0(O),d=g0(e)?e:m0(e);return this.isValid()&&a.isValid()&&d.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(a,t):!this.isBefore(a,t))&&(n[1]===")"?this.isBefore(d,t):!this.isAfter(d,t))):!1}function q5(O,e){var t=g0(O)?O:m0(O),n;return this.isValid()&&t.isValid()?(e=b0(e)||"millisecond",e==="millisecond"?this.valueOf()===t.valueOf():(n=t.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf())):!1}function s5(O,e){return this.isSame(O,e)||this.isAfter(O,e)}function d5(O,e){return this.isSame(O,e)||this.isBefore(O,e)}function W5(O,e,t){var n,a,d;if(!this.isValid())return NaN;if(n=a3(O,this),!n.isValid())return NaN;switch(a=(n.utcOffset()-this.utcOffset())*6e4,e=b0(e),e){case"year":d=oz(this,n)/12;break;case"month":d=oz(this,n);break;case"quarter":d=oz(this,n)/3;break;case"second":d=(this-n)/1e3;break;case"minute":d=(this-n)/6e4;break;case"hour":d=(this-n)/36e5;break;case"day":d=(this-n-a)/864e5;break;case"week":d=(this-n-a)/6048e5;break;default:d=this-n}return t?d:s1(d)}function oz(O,e){if(O.date()<e.date())return-oz(e,O);var t=(e.year()-O.year())*12+(e.month()-O.month()),n=O.clone().add(t,"months"),a,d;return e-n<0?(a=O.clone().add(t-1,"months"),d=(e-n)/(n-a)):(a=O.clone().add(t+1,"months"),d=(e-n)/(a-n)),-(t+d)||0}p.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",p.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function l5(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function f5(O){if(!this.isValid())return null;var e=O!==!0,t=e?this.clone().utc():this;return t.year()<0||t.year()>9999?h0(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):X0(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",h0(t,"Z")):h0(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function u5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var O="moment",e="",t,n,a,d;return this.isLocal()||(O=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),t="["+O+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",d=e+'[")]',this.format(t+n+a+d)}function R5(O){O||(O=this.isUtc()?p.defaultFormatUtc:p.defaultFormat);var e=h0(this,O);return this.localeData().postformat(e)}function h5(O,e){return this.isValid()&&(g0(O)&&O.isValid()||m0(O).isValid())?m1({to:this,from:O}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function L5(O){return this.from(m0(),O)}function m5(O,e){return this.isValid()&&(g0(O)&&O.isValid()||m0(O).isValid())?m1({from:this,to:O}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function N5(O){return this.to(m0(),O)}function De(O){var e;return O===void 0?this._locale._abbr:(e=p2(O),e!=null&&(this._locale=e),this)}var Pe=T0("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 xe(){return this._locale}var ez=1e3,nM=60*ez,cz=60*nM,Ie=(365*400+97)*24*cz;function AM(O,e){return(O%e+e)%e}function Ye(O,e,t){return O<100&&O>=0?new Date(O+400,e,t)-Ie:new Date(O,e,t).valueOf()}function Fe(O,e,t){return O<100&&O>=0?Date.UTC(O+400,e,t)-Ie:Date.UTC(O,e,t)}function B5(O){var e,t;if(O=b0(O),O===void 0||O==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?Fe:Ye,O){case"year":e=t(this.year(),0,1);break;case"quarter":e=t(this.year(),this.month()-this.month()%3,1);break;case"month":e=t(this.year(),this.month(),1);break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=t(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=AM(e+(this._isUTC?0:this.utcOffset()*nM),cz);break;case"minute":e=this._d.valueOf(),e-=AM(e,nM);break;case"second":e=this._d.valueOf(),e-=AM(e,ez);break}return this._d.setTime(e),p.updateOffset(this,!0),this}function g5(O){var e,t;if(O=b0(O),O===void 0||O==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?Fe:Ye,O){case"year":e=t(this.year()+1,0,1)-1;break;case"quarter":e=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=t(this.year(),this.month()+1,1)-1;break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=cz-AM(e+(this._isUTC?0:this.utcOffset()*nM),cz)-1;break;case"minute":e=this._d.valueOf(),e+=nM-AM(e,nM)-1;break;case"second":e=this._d.valueOf(),e+=ez-AM(e,ez)-1;break}return this._d.setTime(e),p.updateOffset(this,!0),this}function X5(){return this._d.valueOf()-(this._offset||0)*6e4}function y5(){return Math.floor(this.valueOf()/1e3)}function T5(){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 _5(){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 v5(){return this.isValid()?this.toISOString():null}function w5(){return y(this)}function k5(){return x({},T(this))}function C5(){return T(this).overflow}function E5(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}h("N",0,0,"eraAbbr"),h("NN",0,0,"eraAbbr"),h("NNN",0,0,"eraAbbr"),h("NNNN",0,0,"eraName"),h("NNNNN",0,0,"eraNarrow"),h("y",["y",1],"yo","eraYear"),h("y",["yy",2],0,"eraYear"),h("y",["yyy",3],0,"eraYear"),h("y",["yyyy",4],0,"eraYear"),E("N",i3),E("NN",i3),E("NNN",i3),E("NNNN",V5),E("NNNNN",K5),s0(["N","NN","NNN","NNNN","NNNNN"],function(O,e,t,n){var a=t._locale.erasParse(O,n,t._strict);a?T(t).era=a:T(t).invalidEra=O}),E("y",oM),E("yy",oM),E("yyy",oM),E("yyyy",oM),E("yo",Q5),s0(["y","yy","yyy","yyyy"],Q0),s0(["yo"],function(O,e,t,n){var a;t._locale._eraYearOrdinalRegex&&(a=O.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?e[Q0]=t._locale.eraYearOrdinalParse(O,a):e[Q0]=parseInt(O,10)});function D5(O,e){var t,n,a,d=this._eras||p2("en")._eras;for(t=0,n=d.length;t<n;++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 P5(O,e,t){var n,a,d=this.eras(),u,k,V;for(O=O.toUpperCase(),n=0,a=d.length;n<a;++n)if(u=d[n].name.toUpperCase(),k=d[n].abbr.toUpperCase(),V=d[n].narrow.toUpperCase(),t)switch(e){case"N":case"NN":case"NNN":if(k===O)return d[n];break;case"NNNN":if(u===O)return d[n];break;case"NNNNN":if(V===O)return d[n];break}else if([u,k,V].indexOf(O)>=0)return d[n]}function x5(O,e){var t=O.since<=O.until?1:-1;return e===void 0?p(O.since).year():p(O.since).year()+(e-O.offset)*t}function I5(){var O,e,t,n=this.localeData().eras();for(O=0,e=n.length;O<e;++O)if(t=this.clone().startOf("day").valueOf(),n[O].since<=t&&t<=n[O].until||n[O].until<=t&&t<=n[O].since)return n[O].name;return""}function Y5(){var O,e,t,n=this.localeData().eras();for(O=0,e=n.length;O<e;++O)if(t=this.clone().startOf("day").valueOf(),n[O].since<=t&&t<=n[O].until||n[O].until<=t&&t<=n[O].since)return n[O].narrow;return""}function F5(){var O,e,t,n=this.localeData().eras();for(O=0,e=n.length;O<e;++O)if(t=this.clone().startOf("day").valueOf(),n[O].since<=t&&t<=n[O].until||n[O].until<=t&&t<=n[O].since)return n[O].abbr;return""}function U5(){var O,e,t,n,a=this.localeData().eras();for(O=0,e=a.length;O<e;++O)if(t=a[O].since<=a[O].until?1:-1,n=this.clone().startOf("day").valueOf(),a[O].since<=n&&n<=a[O].until||a[O].until<=n&&n<=a[O].since)return(this.year()-p(a[O].since).year())*t+a[O].offset;return this.year()}function H5(O){return r(this,"_erasNameRegex")||q3.call(this),O?this._erasNameRegex:this._erasRegex}function j5(O){return r(this,"_erasAbbrRegex")||q3.call(this),O?this._erasAbbrRegex:this._erasRegex}function G5(O){return r(this,"_erasNarrowRegex")||q3.call(this),O?this._erasNarrowRegex:this._erasRegex}function i3(O,e){return e.erasAbbrRegex(O)}function V5(O,e){return e.erasNameRegex(O)}function K5(O,e){return e.erasNarrowRegex(O)}function Q5(O,e){return e._eraYearOrdinalRegex||oM}function q3(){var O=[],e=[],t=[],n=[],a,d,u,k,V,z0=this.eras();for(a=0,d=z0.length;a<d;++a)u=$1(z0[a].name),k=$1(z0[a].abbr),V=$1(z0[a].narrow),e.push(u),O.push(k),t.push(V),n.push(u),n.push(k),n.push(V);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+O.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}h(0,["gg",2],0,function(){return this.weekYear()%100}),h(0,["GG",2],0,function(){return this.isoWeekYear()%100});function tz(O,e){h(0,[O,O.length],0,e)}tz("gggg","weekYear"),tz("ggggg","weekYear"),tz("GGGG","isoWeekYear"),tz("GGGGG","isoWeekYear"),E("G",Qb),E("g",Qb),E("GG",L0,n1),E("gg",L0,n1),E("GGGG",Jp,Qp),E("gggg",Jp,Qp),E("GGGGG",Kb,Gb),E("ggggg",Kb,Gb),FM(["gggg","ggggg","GGGG","GGGGG"],function(O,e,t,n){e[n.substr(0,2)]=M0(O)}),FM(["gg","GG"],function(O,e,t,n){e[n]=p.parseTwoDigitYear(O)});function J5(O){return Ue.call(this,O,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Z5(O){return Ue.call(this,O,this.isoWeek(),this.isoWeekday(),1,4)}function $5(){return z2(this.year(),1,4)}function Md(){return z2(this.isoWeekYear(),1,4)}function bd(){var O=this.localeData()._week;return z2(this.year(),O.dow,O.doy)}function zd(){var O=this.localeData()._week;return z2(this.weekYear(),O.dow,O.doy)}function Ue(O,e,t,n,a){var d;return O==null?GM(this,n,a).year:(d=z2(O,n,a),e>d&&(e=d),pd.call(this,O,e,t,n,a))}function pd(O,e,t,n,a){var d=Re(O,e,t,n,a),u=jM(d.year,0,d.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}h("Q",0,"Qo","quarter"),E("Q",Ae),s0("Q",function(O,e){e[M2]=(M0(O)-1)*3});function Od(O){return O==null?Math.ceil((this.month()+1)/3):this.month((O-1)*3+this.month()%3)}h("D",["DD",2],"Do","date"),E("D",L0,eM),E("DD",L0,n1),E("Do",function(O,e){return O?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),s0(["D","DD"],k1),s0("Do",function(O,e){e[k1]=M0(O.match(L0)[0])});var He=cM("Date",!0);h("DDD",["DDDD",3],"DDDo","dayOfYear"),E("DDD",Vb),E("DDDD",ae),s0(["DDD","DDDD"],function(O,e,t){t._dayOfYear=M0(O)});function od(O){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return O==null?e:this.add(O-e,"d")}h("m",["mm",2],0,"minute"),E("m",L0,Zp),E("mm",L0,n1),s0(["m","mm"],L1);var ed=cM("Minutes",!1);h("s",["ss",2],0,"second"),E("s",L0,Zp),E("ss",L0,n1),s0(["s","ss"],b2);var cd=cM("Seconds",!1);h("S",0,0,function(){return~~(this.millisecond()/100)}),h(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),h(0,["SSS",3],0,"millisecond"),h(0,["SSSS",4],0,function(){return this.millisecond()*10}),h(0,["SSSSS",5],0,function(){return this.millisecond()*100}),h(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),h(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),h(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),h(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),E("S",Vb,Ae),E("SS",Vb,n1),E("SSS",Vb,ae);var R2,je;for(R2="SSSS";R2.length<=9;R2+="S")E(R2,oM);function td(O,e){e[C2]=M0(("0."+O)*1e3)}for(R2="S";R2.length<=9;R2+="S")s0(R2,td);je=cM("Milliseconds",!1),h("z",0,0,"zoneAbbr"),h("zz",0,0,"zoneName");function nd(){return this._isUTC?"UTC":""}function Ad(){return this._isUTC?"Coordinated Universal Time":""}var g=W0.prototype;g.add=z5,g.calendar=n5,g.clone=A5,g.diff=W5,g.endOf=g5,g.format=R5,g.from=h5,g.fromNow=L5,g.to=m5,g.toNow=N5,g.get=uq,g.invalidAt=C5,g.isAfter=a5,g.isBefore=r5,g.isBetween=i5,g.isSame=q5,g.isSameOrAfter=s5,g.isSameOrBefore=d5,g.isValid=w5,g.lang=Pe,g.locale=De,g.localeData=xe,g.max=ws,g.min=vs,g.parsingFlags=k5,g.set=Rq,g.startOf=B5,g.subtract=p5,g.toArray=S5,g.toObject=_5,g.toDate=T5,g.toISOString=f5,g.inspect=u5,typeof Symbol<"u"&&Symbol.for!=null&&(g[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),g.toJSON=v5,g.toString=l5,g.unix=y5,g.valueOf=X5,g.creationData=E5,g.eraName=I5,g.eraNarrow=Y5,g.eraAbbr=F5,g.eraYear=U5,g.year=qe,g.isLeapYear=fq,g.weekYear=J5,g.isoWeekYear=Z5,g.quarter=g.quarters=Od,g.month=fe,g.daysInMonth=Tq,g.week=g.weeks=Dq,g.isoWeek=g.isoWeeks=Pq,g.weeksInYear=bd,g.weeksInWeekYear=zd,g.isoWeeksInYear=$5,g.isoWeeksInISOWeekYear=Md,g.date=He,g.day=g.days=Zq,g.weekday=$q,g.isoWeekday=Ms,g.dayOfYear=od,g.hour=g.hours=cs,g.minute=g.minutes=ed,g.second=g.seconds=cd,g.millisecond=g.milliseconds=je,g.utcOffset=Fs,g.utc=Hs,g.local=js,g.parseZone=Gs,g.hasAlignedHourOffset=Vs,g.isDST=Ks,g.isLocal=Js,g.isUtcOffset=Zs,g.isUtc=ve,g.isUTC=ve,g.zoneAbbr=nd,g.zoneName=Ad,g.dates=T0("dates accessor is deprecated. Use date instead.",He),g.months=T0("months accessor is deprecated. Use month instead",fe),g.years=T0("years accessor is deprecated. Use year instead",qe),g.zone=T0("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Us),g.isDSTShifted=T0("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Qs);function ad(O){return m0(O*1e3)}function rd(){return m0.apply(null,arguments).parseZone()}function Ge(O){return O}var a0=l0.prototype;a0.calendar=f2,a0.longDateFormat=Kp,a0.invalidDate=W,a0.ordinal=S,a0.preparse=Ge,a0.postformat=Ge,a0.relativeTime=o0,a0.pastFuture=v0,a0.set=Y0,a0.eras=D5,a0.erasParse=P5,a0.erasConvertYear=x5,a0.erasAbbrRegex=j5,a0.erasNameRegex=H5,a0.erasNarrowRegex=G5,a0.months=Bq,a0.monthsShort=gq,a0.monthsParse=yq,a0.monthsRegex=_q,a0.monthsShortRegex=Sq,a0.week=wq,a0.firstDayOfYear=Eq,a0.firstDayOfWeek=Cq,a0.weekdays=Gq,a0.weekdaysMin=Kq,a0.weekdaysShort=Vq,a0.weekdaysParse=Jq,a0.weekdaysRegex=bs,a0.weekdaysShortRegex=zs,a0.weekdaysMinRegex=ps,a0.isPM=os,a0.meridiem=ts;function nz(O,e,t,n){var a=p2(),d=D().set(n,e);return a[t](d,O)}function Ve(O,e,t){if(l(O)&&(e=O,O=void 0),O=O||"",e!=null)return nz(O,e,t,"month");var n,a=[];for(n=0;n<12;n++)a[n]=nz(O,n,t,"month");return a}function s3(O,e,t,n){typeof O=="boolean"?(l(e)&&(t=e,e=void 0),e=e||""):(e=O,t=e,O=!1,l(e)&&(t=e,e=void 0),e=e||"");var a=p2(),d=O?a._week.dow:0,u,k=[];if(t!=null)return nz(e,(t+d)%7,n,"day");for(u=0;u<7;u++)k[u]=nz(e,(u+d)%7,n,"day");return k}function id(O,e){return Ve(O,e,"months")}function qd(O,e){return Ve(O,e,"monthsShort")}function sd(O,e,t){return s3(O,e,t,"weekdays")}function dd(O,e,t){return s3(O,e,t,"weekdaysShort")}function Wd(O,e,t){return s3(O,e,t,"weekdaysMin")}u2("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 e=O%10,t=M0(O%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return O+t}}),p.lang=T0("moment.lang is deprecated. Use moment.locale instead.",u2),p.langData=T0("moment.langData is deprecated. Use moment.localeData instead.",p2);var O2=Math.abs;function ld(){var O=this._data;return this._milliseconds=O2(this._milliseconds),this._days=O2(this._days),this._months=O2(this._months),O.milliseconds=O2(O.milliseconds),O.seconds=O2(O.seconds),O.minutes=O2(O.minutes),O.hours=O2(O.hours),O.months=O2(O.months),O.years=O2(O.years),this}function Ke(O,e,t,n){var a=m1(e,t);return O._milliseconds+=n*a._milliseconds,O._days+=n*a._days,O._months+=n*a._months,O._bubble()}function fd(O,e){return Ke(this,O,e,1)}function ud(O,e){return Ke(this,O,e,-1)}function Qe(O){return O<0?Math.floor(O):Math.ceil(O)}function Rd(){var O=this._milliseconds,e=this._days,t=this._months,n=this._data,a,d,u,k,V;return O>=0&&e>=0&&t>=0||O<=0&&e<=0&&t<=0||(O+=Qe(d3(t)+e)*864e5,e=0,t=0),n.milliseconds=O%1e3,a=s1(O/1e3),n.seconds=a%60,d=s1(a/60),n.minutes=d%60,u=s1(d/60),n.hours=u%24,e+=s1(u/24),V=s1(Je(e)),t+=V,e-=Qe(d3(V)),k=s1(t/12),t%=12,n.days=e,n.months=t,n.years=k,this}function Je(O){return O*4800/146097}function d3(O){return O*146097/4800}function hd(O){if(!this.isValid())return NaN;var e,t,n=this._milliseconds;if(O=b0(O),O==="month"||O==="quarter"||O==="year")switch(e=this._days+n/864e5,t=this._months+Je(e),O){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(e=this._days+Math.round(d3(this._months)),O){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return e*24+n/36e5;case"minute":return e*1440+n/6e4;case"second":return e*86400+n/1e3;case"millisecond":return Math.floor(e*864e5)+n;default:throw new Error("Unknown unit "+O)}}function o2(O){return function(){return this.as(O)}}var Ze=o2("ms"),Ld=o2("s"),md=o2("m"),Nd=o2("h"),Bd=o2("d"),gd=o2("w"),Xd=o2("M"),yd=o2("Q"),Td=o2("y"),Sd=Ze;function _d(){return m1(this)}function vd(O){return O=b0(O),this.isValid()?this[O+"s"]():NaN}function D2(O){return function(){return this.isValid()?this._data[O]:NaN}}var wd=D2("milliseconds"),kd=D2("seconds"),Cd=D2("minutes"),Ed=D2("hours"),Dd=D2("days"),Pd=D2("months"),xd=D2("years");function Id(){return s1(this.days()/7)}var e2=Math.round,aM={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Yd(O,e,t,n,a){return a.relativeTime(e||1,!!t,O,n)}function Fd(O,e,t,n){var a=m1(O).abs(),d=e2(a.as("s")),u=e2(a.as("m")),k=e2(a.as("h")),V=e2(a.as("d")),z0=e2(a.as("M")),$0=e2(a.as("w")),c2=e2(a.as("y")),h2=d<=t.ss&&["s",d]||d<t.s&&["ss",d]||u<=1&&["m"]||u<t.m&&["mm",u]||k<=1&&["h"]||k<t.h&&["hh",k]||V<=1&&["d"]||V<t.d&&["dd",V];return t.w!=null&&(h2=h2||$0<=1&&["w"]||$0<t.w&&["ww",$0]),h2=h2||z0<=1&&["M"]||z0<t.M&&["MM",z0]||c2<=1&&["y"]||["yy",c2],h2[2]=e,h2[3]=+O>0,h2[4]=n,Yd.apply(null,h2)}function Ud(O){return O===void 0?e2:typeof O=="function"?(e2=O,!0):!1}function Hd(O,e){return aM[O]===void 0?!1:e===void 0?aM[O]:(aM[O]=e,O==="s"&&(aM.ss=e-1),!0)}function jd(O,e){if(!this.isValid())return this.localeData().invalidDate();var t=!1,n=aM,a,d;return typeof O=="object"&&(e=O,O=!1),typeof O=="boolean"&&(t=O),typeof e=="object"&&(n=Object.assign({},aM,e),e.s!=null&&e.ss==null&&(n.ss=e.s-1)),a=this.localeData(),d=Fd(this,!t,n,a),t&&(d=a.pastFuture(+this,d)),a.postformat(d)}var W3=Math.abs;function rM(O){return(O>0)-(O<0)||+O}function Az(){if(!this.isValid())return this.localeData().invalidDate();var O=W3(this._milliseconds)/1e3,e=W3(this._days),t=W3(this._months),n,a,d,u,k=this.asSeconds(),V,z0,$0,c2;return k?(n=s1(O/60),a=s1(n/60),O%=60,n%=60,d=s1(t/12),t%=12,u=O?O.toFixed(3).replace(/\.?0+$/,""):"",V=k<0?"-":"",z0=rM(this._months)!==rM(k)?"-":"",$0=rM(this._days)!==rM(k)?"-":"",c2=rM(this._milliseconds)!==rM(k)?"-":"",V+"P"+(d?z0+d+"Y":"")+(t?z0+t+"M":"")+(e?$0+e+"D":"")+(a||n||O?"T":"")+(a?c2+a+"H":"")+(n?c2+n+"M":"")+(O?c2+u+"S":"")):"P0D"}var e0=pz.prototype;e0.isValid=Ps,e0.abs=ld,e0.add=fd,e0.subtract=ud,e0.as=hd,e0.asMilliseconds=Ze,e0.asSeconds=Ld,e0.asMinutes=md,e0.asHours=Nd,e0.asDays=Bd,e0.asWeeks=gd,e0.asMonths=Xd,e0.asQuarters=yd,e0.asYears=Td,e0.valueOf=Sd,e0._bubble=Rd,e0.clone=_d,e0.get=vd,e0.milliseconds=wd,e0.seconds=kd,e0.minutes=Cd,e0.hours=Ed,e0.days=Dd,e0.weeks=Id,e0.months=Pd,e0.years=xd,e0.humanize=jd,e0.toISOString=Az,e0.toString=Az,e0.toJSON=Az,e0.locale=De,e0.localeData=xe,e0.toIsoString=T0("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Az),e0.lang=Pe,h("X",0,0,"unix"),h("x",0,0,"valueOf"),E("x",Qb),E("X",iq),s0("X",function(O,e,t){t._d=new Date(parseFloat(O)*1e3)}),s0("x",function(O,e,t){t._d=new Date(M0(O))});//! moment.js
592
592
  return p.version="2.30.1",o(m0),p.fn=g,p.min=ks,p.max=Cs,p.now=Es,p.utc=D,p.unix=ad,p.months=id,p.isDate=f,p.locale=u2,p.invalid=j,p.duration=m1,p.isMoment=g0,p.weekdays=sd,p.parseZone=rd,p.localeData=p2,p.isDuration=Oz,p.monthsShort=qd,p.weekdaysMin=Wd,p.defineLocale=O3,p.updateLocale=rs,p.locales=is,p.weekdaysShort=dd,p.normalizeUnits=b0,p.relativeTimeRounding=Ud,p.relativeTimeThreshold=Hd,p.calendarFormat=t5,p.prototype=g,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 $o=="function"?si():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,c=/(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,A=[/^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:c,monthsShortRegex:c,monthsStrictRegex:p,monthsShortStrictRegex:o,monthsParse:A,longMonthsParse:A,shortMonthsParse:A,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(s,i){switch(i){case"D":return s+(s===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return s+(s===1?"er":"e");case"w":case"W":return s+(s===1?"re":"e")}},week:{dow:1,doy:4}});return r})})();function v2(M,b=!0){if(!M)return null;let z=M.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return b?z.toLowerCase():z}function be(M){return M?M==null?void 0:M.toLocaleString("fr-FR",{style:"currency",currency:"EUR",minimumFractionDigits:2}):"0 €"}function Gp(M,b="DD/MM/YYYY"){return J1.unix(M).isValid()?J1.unix(M).format(b):M}function ze(M,b="DD/MM/YYYY à HH:mm"){return Gp(M,b)}const pe=/^(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 Oe(M){return M!=null&&M!==""&&!isNaN(M)}function oe(M){return M&&J1(M,"DD/MM/YYYY",!0).isValid()}function ee(M){return typeof M=="boolean"}function Wi(M,b,z){const c=(M?1:0)-(b?1:0);return z?-c:c}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 ce(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 c=p-o;return z?c:-c}function Vp(M,b,z){const p=li(M,b);if(p!==null)return p;if(ee(M)&&ee(b))return Wi(M,b,z);if(pe.test(M)&&pe.test(b)){const r=di(M,b);return z?r:-r}if(Oe(M)&&Oe(b)){const r=parseFloat(M),s=parseFloat(b);return z?r-s:s-r}if(oe(M)&&oe(b)){const r=J1(M,"DD/MM/YYYY").unix(),s=J1(b,"DD/MM/YYYY").unix();return z?r-s:s-r}if(ce(M)&&ce(b))return fi(M,b,z);const o=typeof M=="string"?v2(M).toLowerCase():v2(String(M)).toLowerCase(),c=typeof b=="string"?v2(b).toLowerCase():v2(String(b)).toLowerCase(),A=o.localeCompare(c,void 0,{numeric:!0,sensitivity:"base"});return z?A:-A}function ui(M,b,z=!1){return!M||!Array.isArray(M)?M:M.sort((p,o)=>{const c=p==null?void 0:p[b],A=o==null?void 0:o[b];return Vp(c,A,z)})}function Ri(M,b=!1,z){return!M||!Array.isArray(M)?M:M.sort((p,o)=>z(p,o,b))}function te(M,b){let z=w2(M);if(!z)z={columns:b};else if(!z.columns)z.columns=b;else{let p=b.filter(function(c){return!z.columns.some(function(A){return A.id===c.id})});z.columns=z.columns.concat(p);let o=z.columns.filter(function(c){return!b.some(function(A){return c.id===A.id})});z.columns=z.columns.filter(function(c){return!o.some(function(A){return c.id===A.id})}),z.columns.filter(c=>{for(let A of b)A.id===c.id&&A.libelle!==c.libelle&&(c.libelle=A.libelle)})}OM(M,z)}function hi(M,b,z=null){let p=w2(M);p?z&&!p[z]&&(p[z]=b):z?(p={},p[z]=b):p=b,OM(M,p)}function w2(M){return JSON.parse(window.localStorage.getItem(M))}function OM(M,b,z=null){let p=w2(M);return z?p[z]=b:p=b,window.localStorage.setItem(M,JSON.stringify(p))}const Li=(M,b)=>{const z=M.__vccOpts||M;for(const[p,o]of b)z[p]=o;return z};Qt.add(fn,dn,Wn,Rn,un,Ln,mn,hn,ln);const mi={name:"AmsomTableDraggable",components:{VueDraggableNext:cA,FontAwesomeIcon:sn},props:{tableId:{type:String,default:"table-draggable",require:!0},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},infiniteScroll:{type:Boolean,default:!1},infiniteScrollIncrement:{type:Number,default:null},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"}]},tdClass:{type:String,default:""},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","contextmenu"],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,currentVisibleItems:0,scrollTimeout:null,stickyColumnsUpdateTimeout:null,normalizedItemsCache:new Map,deepSortCache:null,deepSortCacheKey:"",stickyColumnsAnimationFrame:null}},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:J1(this.pickedDate[0]).set({hour:0,minute:0}).unix(),fin:J1(this.pickedDate[1]).set({hour:23,minute:59}).unix()}},normalizedSearch(){return this.search?v2(this.search):""},hasDateFilter(){return this.dateFilterBounds&&Array.isArray(this.columnNameDateFilter)&&this.columnNameDateFilter.length>0},visibleColumns(){return this.columns.filter(M=>M.show&&(!M.onlyOnEditMode||this.lineEditMode))},filtereditems(){var M,b;return this.items?this.items.filter(z=>{const p=this.filterBy(z,this.normalizedSearch);if(this.hasDateFilter){const o=this.columnNameDateFilter.some(c=>{const A=z[c];if(A){const r=J1(A,"DD/MM/YYYY").unix();return r>=this.dateFilterBounds.deb&&r<=this.dateFilterBounds.fin}return!1});return p&&o}return p}):[]`${this.normalizedSearch}_${this.hasDateFilter}_${(M=this.dateFilterBounds)==null?void 0:M.deb}_${(b=this.dateFilterBounds)==null?void 0:b.fin}`},sortedItems(){if(!this.filtereditems)return[];if(!this.sortKey&&(!this.deepSorts||this.deepSortsList.length===0))return this.filtereditems;const M=this.columns.find(b=>b.id===this.sortKey);return this.deepSorts&&this.deepSortsList.length>0?this.deepSortsColumnList(this.deepSortsList,[...this.filtereditems]):M!=null&&M.customSort?Ri([...this.filtereditems],this.sortAsc,M.customSort):this.sortKey?ui([...this.filtereditems],this.sortKey,this.sortAsc):this.filtereditems},showeditems(){const M=this.sortedItems;if(this.infiniteScroll)return M.slice(0,this.currentVisibleItems);if(this.maxItemsPerPage===-1)return M;const b=(this.currentPage-1)*this.maxItemsPerPage,z=this.currentPage*this.maxItemsPerPage;return M.slice(b,z)},tableMaxHeight(){if(!this.infiniteScroll)return"auto";const M=this.trHeightPx||60,b=50,z=this.maxItemPerPage;return`${b+z*M}px`},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&&OM(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:{handler(M){var b;if(M)this.maxItemsPerPage=3;else{const z=this.localStorageMaxItemPerPageName!==null?w2(this.localStorageMaxItemPerPageName):this.localStorageItemName!==null?(b=w2(this.localStorageItemName))==null?void 0:b.maxItemPerPage:this.maxItemPerPage;this.maxItemsPerPage=z??this.maxItemPerPage}}},sortedItems:{handler(M){if(this.infiniteScroll){const b=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems===0?this.currentVisibleItems=Math.min(this.maxItemPerPage+b,M.length):this.currentVisibleItems=Math.min(this.currentVisibleItems,M.length)}this.infiniteScroll||(this.totalPages=this.newTotalPage(M.length))},immediate:!0},filtereditems:{handler(M,b){if(this.infiniteScroll&&b&&M.length!==b.length)if(M.length>b.length&&this.currentVisibleItems<M.length){const z=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+z,M.length)}else M.length<b.length&&this.currentVisibleItems>M.length&&(this.currentVisibleItems=Math.min(this.currentVisibleItems,M.length))},immediate:!1},maxItemPerPage:{handler(M){M!==this.maxItemsPerPage&&(this.maxItemsPerPage=M)},immediate:!0},maxItemsPerPage:{handler(M){if(!this.headerEditMode){if(this.localStorageItemName!==null&&OM(this.localStorageItemName,M,"maxItemPerPage"),this.localStorageMaxItemPerPageName!==null&&OM(this.localStorageMaxItemPerPageName,M),this.infiniteScroll){const b=this.infiniteScrollIncrement||M;this.currentVisibleItems=Math.min(M+b,this.sortedItems.length)}this.currentPage!==1&&!this.infiniteScroll&&(this.currentPage=1),this.infiniteScroll||(this.totalPages=this.newTotalPage(this.filtereditems.length))}}},search:{handler(M,b){M!==b&&(this.normalizedItemsCache.clear(),this.currentPage>1&&this.$nextTick(()=>{this.adjustPageAfterSearch()}),this.infiniteScroll&&this.$nextTick(()=>{const z=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+z,this.filtereditems.length)}))},immediate:!1},showeditems:{handler(M,b){M!==b&&(this.shouldAdjustPage(M)&&this.adjustPageAfterSearch(),M.length>0?this.checkAllCheckBox=M.every(z=>this.selectedItems.includes(z.id)):this.checkAllCheckBox=!1,this.infiniteScroll||(this.totalPages=this.newTotalPage(this.filtereditems.length)),this.columns.some(z=>z.stickyLeft||z.stickyRight)&&this.$nextTick(()=>{this.debouncedUpdateStickyColumns()}))},flush:"post"},deepSortsList:{handler(M){M&&M.length>0&&this.$emit("update:deepSortsListPreset",M),this.infiniteScroll&&this.currentVisibleItems>0&&this.$nextTick(()=>{const b=this.currentVisibleItems;this.currentVisibleItems=Math.min(b,this.sortedItems.length)})},deep:!0},deepSortsListPreset:{handler(M){M&&M.length>0&&JSON.stringify(M)!==JSON.stringify(this.deepSortsList)&&(this.deepSortsList=M.map(b=>{const z=this.columns.find(p=>p.id===b.id);return{...b,customSort:(z==null?void 0:z.customSort)||b.customSort||null}}))},deep:!0,immediate:!0},tdItemsList:{handler(M,b){M!==b&&this.columns.some(z=>z.stickyLeft||z.stickyRight)&&this.$nextTick(()=>{this.debouncedUpdateStickyColumns()})},deep:!0,immediate:!1}},mounted(){var M;if(this.localStorageItemName!==null){te(this.localStorageItemName,this.getRefactoColumns(this.copyDefaultColumns())),hi(this.localStorageItemName,this.maxItemPerPage,"maxItemPerPage");let b=w2(this.localStorageItemName);b&&(this.columns=this.getColumnsById(b.columns,this.defaultColumns),this.maxItemsPerPage=b.maxItemPerPage)}if(this.localStorageMaxItemPerPageName!==null){let b=w2(this.localStorageMaxItemPerPageName);b&&(this.maxItemsPerPage=b)}if(this.dynamicColumns&&(this.columns=this.getColumnsById(this.dynamicColumns,this.defaultColumns)),this.ckSelectedItems&&(this.selectedItems=this.ckSelectedItems),this.infiniteScroll){const b=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+b,this.filtereditems.length)}else this.totalPages=this.newTotalPage(this.filtereditems.length);if(this.initResizeObserver(),!this.deepSorts){const b=this.columns.find(z=>z.isSorted!==null&&z.isSorted!==void 0);b&&(this.sortKey=b.id,this.sortAsc=b.isSorted,this.currentHeaderSort=b)}this.deepSortsListPreset&&this.deepSortsListPreset.length>0&&this.deepSorts&&(this.deepSortsList=this.deepSortsListPreset.map(b=>{const z=this.columns.find(p=>p.id===b.id);return{...b,customSort:(z==null?void 0:z.customSort)||b.customSort||null}})),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"),this.infiniteScroll&&this.$nextTick(()=>{this.$refs.scrollContainer})},beforeUnmount(){this.cleanupResizeObserver(),window.removeEventListener("resize",this.checkTableOverflow),window.removeEventListener("scroll",this.handleTableScroll),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=null),this.stickyColumnsUpdateTimeout&&(clearTimeout(this.stickyColumnsUpdateTimeout),this.stickyColumnsUpdateTimeout=null),this.stickyColumnsAnimationFrame&&(cancelAnimationFrame(this.stickyColumnsAnimationFrame),this.stickyColumnsAnimationFrame=null),this.normalizedItemsCache.clear(),this.deepSortCache=null},methods:{moment:J1,unixToDateString:Gp,unixToDateTimeString:ze,toCurrencyEUR:be,formatColumnValue(M,b){const z=M[b.id];if(b.formatter&&typeof b.formatter=="function")return b.formatter(z,M);if(b.type)switch(b.type){case"unixDate":return z?Gp(z):"";case"unixDateTime":return z?ze(z):"";case"currency":return z!=null?be(z):"";default:return z}return z},shouldAdjustPage(M){return M.length===0&&this.filtereditems.length>0&&this.currentPage>1&&!this.infiniteScroll},getRefactoColumns(M){return M.map(b=>({id:b.id,show:b.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(`#${this.tableId}-bottom-scrollbar`);if(this.tableContainer&&M){const b=this.tableContainer.scrollHeight,z=window.innerHeight;this.showScrollbar=b>z,this.showScrollbar&&(document.querySelector(`#${this.tableId}-bottom-scrollbar .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(){!this.columns.some(z=>z.stickyLeft||z.stickyRight)||!document.getElementById(this.tableId)||(this.stickyColumnsAnimationFrame&&cancelAnimationFrame(this.stickyColumnsAnimationFrame),this.stickyColumnsAnimationFrame=requestAnimationFrame(()=>{const z=[];this.columns.forEach((c,A)=>{if(!c.stickyLeft&&!c.stickyRight)return;const r=document.getElementById(`${this.tableId}-${c.id}-th-${A}`);if(!r)return;const s=document.querySelectorAll(`#${this.tableId} [data-column-id="${c.id}"]`),i=r.getBoundingClientRect().width;let l=0;s.forEach(f=>{const R=f.getBoundingClientRect().width;R>l&&(l=R)}),z.push({column:c,thElement:r,tdElements:s,width:Math.max(l,i)-1})});let p=0,o=0;z.forEach(({column:c,thElement:A,tdElements:r,width:s})=>{if(c.stickyLeft){const i=`${p}px`;A.style.left=i,r.forEach(l=>{l.style.left=i}),p+=s}if(c.stickyRight){const i=`${o}px`;A.style.right=i,r.forEach(l=>{l.style.right=i}),o+=s}}),this.stickyColumnsAnimationFrame=null}))},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){const b=this.selectedItems.indexOf(M);if(b!==-1)this.selectedItems.splice(b,1),this.checkAllCheckBox=!1;else if(this.selectedItems.push(M),!this.checkAllCheckBox){const z=this.showeditems.map(p=>p.id);this.checkAllCheckBox=z.every(p=>this.selectedItems.includes(p))}this.$emit("update:ckSelectedItems",this.selectedItems)},toggleAllCheckBox(){const M=this.showeditems.map(b=>b.id);if(this.checkAllCheckBox)this.selectedItems=this.selectedItems.filter(b=>!M.includes(b)),this.checkAllCheckBox=!1;else{const b=new Set([...this.selectedItems,...M]);this.selectedItems=Array.from(b),this.checkAllCheckBox=!0}this.$emit("update:ckSelectedItems",this.selectedItems)},updateCurrentSort(M){this.currentHeaderSort&&(this.currentHeaderSort.isSorted=null);const b=this.infiniteScroll?this.currentVisibleItems:null;this.updateSortitems(M.id),M.isSorted=this.sortAsc,this.currentHeaderSort=M,this.infiniteScroll&&b&&this.$nextTick(()=>{this.currentVisibleItems=Math.min(b,this.sortedItems.length)})},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;const z=`${M.id}_${b}`;if(this.normalizedItemsCache.has(z))return this.normalizedItemsCache.get(z);const p=this.visibleColumns.some(o=>{if(o.customSearch&&typeof o.customSearch=="function")return o.customSearch(M,b);const c=M[o.id];if(o.type||o.formatter){const A=this.formatColumnValue(M,o);if(A&&v2(A.toString()).includes(b))return!0}return c&&v2(c.toString()).includes(b)});return this.normalizedItemsCache.size>1e3&&this.normalizedItemsCache.clear(),this.normalizedItemsCache.set(z,p),p},getDefaultMaxItemPerPage(){return this.maxItemPerPage},copyDefaultColumns(){return this.defaultColumns.map(M=>{const b={};for(const z in M)if(M.hasOwnProperty(z)){const p=M[z];typeof p=="function"||p===null||p===void 0?b[z]=p:Array.isArray(p)?b[z]=[...p]:typeof p=="object"?b[z]={...p}:b[z]=p}return b})},getTableContent(){return this.items},getColumns(){return this.columns},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&&OM(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&&te(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){const b=this.infiniteScroll?this.currentVisibleItems:null;this.deepSortCache=null,this.deepSortCacheKey="",this.deepSortsList.push({id:M.id,libelle:M.libelle,asc:!0,customSort:M.customSort||null}),this.infiniteScroll&&b&&this.$nextTick(()=>{this.currentVisibleItems=Math.min(b,this.sortedItems.length)})},toggleDeepSortDirection(M){this.deepSortCache=null,this.deepSortCacheKey="",M.asc=!M.asc},deepSortsColumnList(M,b){if(!M||M.length===0)return b;const z=JSON.stringify(M.map(p=>({id:p.id,asc:p.asc})));return this.deepSortCache&&this.deepSortCacheKey===z?b.sort((p,o)=>{for(const c of M){let A;if(c.customSort)A=c.customSort(p,o,c.asc);else{const r=p[c.id],s=o[c.id];A=Vp(r,s,c.asc)}if(A!==0)return A}return 0}):(this.deepSortCacheKey=z,this.deepSortCache=!0,b.sort((p,o)=>{for(const c of M){let A;if(c.customSort)A=c.customSort(p,o,c.asc);else{const r=p[c.id],s=o[c.id];A=Vp(r,s,c.asc)}if(A!==0)return A}return 0}))},handleScrollEvent(M){if(this.infiniteScroll){if(this.scrollTimeout)return;this.scrollTimeout=setTimeout(()=>{this.handleInfiniteScroll(M),this.scrollTimeout=null},50)}},handleInfiniteScroll(M){const{target:b}=M;if(b.scrollTop+b.clientHeight>=b.scrollHeight-10&&this.currentVisibleItems<this.sortedItems.length){const p=this.infiniteScrollIncrement||this.maxItemPerPage,o=Math.min(this.currentVisibleItems+p,this.sortedItems.length);o>this.currentVisibleItems&&(this.currentVisibleItems=o)}},handleContextMenu(M,b){let z=null;const p=M.target.closest("td");if(p){const o=p.getAttribute("data-column-id");o&&(z=this.columns.find(c=>c.id===o))}this.$emit("contextmenu",{event:M,item:b,column:z})},refreshStickyColumns(){this.columns.some(M=>M.stickyLeft||M.stickyRight)&&this.$nextTick(()=>{this.updateStickyColumns()})},debouncedUpdateStickyColumns(){this.stickyColumnsUpdateTimeout&&clearTimeout(this.stickyColumnsUpdateTimeout),this.stickyColumnsUpdateTimeout=setTimeout(()=>{this.updateStickyColumns(),this.stickyColumnsUpdateTimeout=null},50)}}},Ni={key:0,class:"mb-3 text-center"},Bi={key:1,class:"row mb-1 mx-auto"},gi={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"}},Xi={class:"text-nowrap"},yi={class:"d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1 mx-2 user-select-none"},Ti={key:0,class:"text-nowrap",style:{height:"20px"}},Si=["value"],_i={key:1,class:"d-flex align-items-center text-nowrap"},vi={key:0,class:"d-flex ms-2"},wi={class:"row mx-auto mb-3 rounded-0"},ki=["id"],Ci=["id"],Ei=["id","onDragstart","onDragend"],Di={class:"d-flex flex-column align-items-center"},Pi={key:0,class:"mx-auto my-auto mb-2 mt-2 hoverable d-inline-block"},xi={class:"d-inline-flex text-nowrap"},Ii={key:0,class:"ms-2 float-end"},Yi={key:1,class:"ms-2"},Fi={key:1},Ui=["id"],Hi=["id"],ji={class:"d-inline-flex text-nowrap"},Gi={key:1,class:"ms-2 hoverable"},Vi={key:0},Ki=["colspan"],Qi=["id"],Ji=["onClick","onContextmenu"],Zi=["data-column-id","onClick"],$i=["id","value"],Mq=["data-column-id"],bq={class:"row ms-auto mb-2"},zq={class:"m-0 pagination pagination-sm"},pq={class:"page-item hoverable"},Oq={class:"page-item hoverable"},oq=["onClick"],eq={class:"page-item hoverable"},cq={class:"page-item hoverable"},tq=["id"];function nq(M,b,z,p,o,c){var s;const A=q.resolveComponent("font-awesome-icon"),r=q.resolveComponent("vue-draggable-next");return q.openBlock(),q.createElementBlock(q.Fragment,null,[z.lineEditMode?(q.openBlock(),q.createElementBlock("div",Ni,[q.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"))},[q.createVNode(A,{icon:"fa-solid fa-plus",size:"xl"})])])):q.createCommentVNode("",!0),z.showLineNumber||z.showModifyColumnsBtn||z.showMaxItemPerPageBtn||z.deepSorts?(q.openBlock(),q.createElementBlock("div",Bi,[q.createElementVNode("div",{class:q.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?(q.openBlock(),q.createElementBlock("div",gi,[q.createElementVNode("b",Xi,q.toDisplayString(c.showItemsLinesNumber+" / "+c.filtereditems.length),1),b[20]||(b[20]=q.createElementVNode("span",{class:"ms-1"},"lignes",-1))])):q.createCommentVNode("",!0),z.deepSorts&&o.deepSortsList.length>0?(q.openBlock(),q.createElementBlock("div",{key:1,class:q.normalizeClass(["d-flex align-items-center flex-wrap",{"ms-4":z.showLineNumber}])},[b[21]||(b[21]=q.createElementVNode("span",{class:"me-1 text-secondary h-auto fs-7 mb-1 mb-lg-0"},"Tri :",-1)),q.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:q.withCtx(()=>[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(o.deepSortsList,(i,l)=>(q.openBlock(),q.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"}},[q.createVNode(A,{class:"hoverable",icon:"fa-solid fa-xmark",onClick:f=>o.deepSortsList.splice(l,1)},null,8,["onClick"]),q.createElementVNode("div",yi,[q.createElementVNode("span",null,q.toDisplayString(i.libelle),1)]),q.createVNode(A,{class:"hoverable",icon:i.asc?"fa-solid fa-arrow-down-short-wide":"fa-solid fa-arrow-down-wide-short",onClick:f=>c.toggleDeepSortDirection(i)},null,8,["icon","onClick"])]))),128))]),_:1},8,["modelValue"])],2)):q.createCommentVNode("",!0)],2),z.showMaxItemPerPageBtn||z.showModifyColumnsBtn?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.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?(q.openBlock(),q.createElementBlock("div",Ti,[z.maxItemPerPageList.length>0?q.withDirectives((q.openBlock(),q.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"},[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(z.maxItemPerPageList,i=>(q.openBlock(),q.createElementBlock("option",{key:i.value,value:i.value},q.toDisplayString(i.text),9,Si))),128))],512)),[[q.vModelSelect,o.maxItemsPerPage]]):q.createCommentVNode("",!0)])):q.createCommentVNode("",!0),z.showModifyColumnsBtn?(q.openBlock(),q.createElementBlock("div",_i,[o.headerEditMode?(q.openBlock(),q.createElementBlock("div",vi,[q.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)=>c.saveTablePreferences&&c.saveTablePreferences(...i))}," Sauvegarder "),q.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)=>c.resetTablePreferences&&c.resetTablePreferences(...i))}," Réinitialiser le tableau ")])):(q.openBlock(),q.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)=>c.editTablePreferences&&c.editTablePreferences(...i))}," Modifier colonnes "))])):q.createCommentVNode("",!0)],2)):q.createCommentVNode("",!0)])):q.createCommentVNode("",!0),q.createElementVNode("div",wi,[q.createElementVNode("div",{ref:"scrollContainer",class:q.normalizeClass(["col-12 p-0 overflow-x-auto mb-2",{border:z.infiniteScroll,"infinite-scroll-container":z.infiniteScroll}]),style:q.normalizeStyle(z.infiniteScroll?{maxHeight:c.tableMaxHeight,overflowY:"auto",borderRadius:"10px"}:{borderRadius:"10px !important"}),onScroll:b[15]||(b[15]=(...i)=>c.handleScrollEvent&&c.handleScrollEvent(...i))},[(q.openBlock(),q.createElementBlock("table",{id:z.tableId,ref:"table",key:o.forceTableUpdateIndex,class:q.normalizeClass(["table table-striped table-hover table-responsive align-middle border-1 border-top border-bottom position-relative m-0",[z.border?"table-bordered":"table-borderless",z.tableSm?"table-sm":""]]),style:q.normalizeStyle([{"border-collapse":"separate","border-spacing":"0"},{borderLeft:z.border?"":"1px solid #ddd",borderRight:z.border?"":"1px solid #ddd"}])},[q.createElementVNode("thead",null,[o.headerEditMode?(q.openBlock(),q.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:c.checkMove,group:"columns"},{default:q.withCtx(()=>[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(o.columns,(i,l)=>(q.openBlock(),q.createElementBlock(q.Fragment,{key:i.id},[i.id==="checkBox"?(q.openBlock(),q.createElementBlock("th",{key:0,id:`${z.tableId}-${i.id}-th-${l}`,class:q.normalizeClass(["text-center",[z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.infiniteScroll?"sticky-top":""]]),scope:"col",onClick:b[8]||(b[8]=q.withModifiers((...f)=>c.toggleAllCheckBox&&c.toggleAllCheckBox(...f),["stop"]))},[q.withDirectives(q.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]=q.withModifiers((...f)=>c.toggleAllCheckBox&&c.toggleAllCheckBox(...f),["stop"]))},null,512),[[q.vModelCheckbox,o.checkAllCheckBox]])],10,Ci)):(i.show||o.headerEditMode)&&(!i.onlyOnEditMode||z.lineEditMode)?(q.openBlock(),q.createElementBlock("th",{key:1,id:`${z.tableId}-${i.id}-th-${l}`,scope:"col",class:q.normalizeClass(["text-center",[i.isDragging?"hoverable-grabbing":z.headerBgColor+" hoverable-grab",i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.headerTextColor,z.infiniteScroll?"sticky-top":"",{"table-danger":!i.show}]]),onDragstart:f=>i.isDragging=!0,onDragend:f=>i.isDragging=!1},[q.createElementVNode("div",Di,[o.headerEditMode&&!i.keepShow?(q.openBlock(),q.createElementBlock("div",Pi,[i.show?(q.openBlock(),q.createBlock(A,{key:0,icon:"fa-solid fa-eye",class:"fa-lg",onClick:f=>i.show=!1},null,8,["onClick"])):(q.openBlock(),q.createBlock(A,{key:1,icon:"fa-solid fa-eye-slash",class:"fa-lg",onClick:f=>i.show=!0},null,8,["onClick"]))])):q.createCommentVNode("",!0),q.createElementVNode("div",xi,[q.renderSlot(M.$slots,"tableHeaderTh",{header:i},void 0,!0),i.isSortable&&!z.deepSorts?(q.openBlock(),q.createElementBlock("div",Ii,[q.createVNode(A,{icon:o.sortKey!==i.id||o.sortKey===i.id&&!o.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-down-short-wide",class:"hoverable",onClick:f=>c.updateCurrentSort(i)},null,8,["icon","onClick"])])):z.deepSorts&&!o.deepSortsList.some(f=>f.id===i.id)&&i.isSortable?(q.openBlock(),q.createElementBlock("div",Yi,[q.createVNode(A,{icon:"fa-solid fa-filter",onClick:f=>c.addDeepSort(i)},null,8,["onClick"])])):q.createCommentVNode("",!0)])])],42,Ei)):q.createCommentVNode("",!0)],64))),128))]),_:3},8,["modelValue","ghost-class","drag-class","move"])):(q.openBlock(),q.createElementBlock("tr",Fi,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(o.columns,(i,l)=>(q.openBlock(),q.createElementBlock(q.Fragment,{key:i.id},[i.id==="checkBox"?(q.openBlock(),q.createElementBlock("th",{key:0,id:`${z.tableId}-${i.id}-th-${l}`,class:q.normalizeClass(["text-center",[z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.infiniteScroll?"sticky-top":""]]),scope:"col",onClick:b[12]||(b[12]=q.withModifiers((...f)=>c.toggleAllCheckBox&&c.toggleAllCheckBox(...f),["stop"]))},[q.withDirectives(q.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]=q.withModifiers((...f)=>c.toggleAllCheckBox&&c.toggleAllCheckBox(...f),["stop"]))},null,512),[[q.vModelCheckbox,o.checkAllCheckBox]])],10,Ui)):i.show&&(!i.onlyOnEditMode||z.lineEditMode)?(q.openBlock(),q.createElementBlock("th",{key:1,id:`${z.tableId}-${i.id}-th-${l}`,scope:"col",class:q.normalizeClass(["text-center",[i.isDragging?"":z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.headerTextColor,z.infiniteScroll?"sticky-top":""]])},[q.createElementVNode("div",ji,[q.renderSlot(M.$slots,"tableHeaderTh",{header:i},void 0,!0),i.isSortable&&!z.deepSorts?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.normalizeClass(["ms-2 float-end hoverable",{"opacity-50":o.sortKey!==i.id}])},[q.createVNode(A,{icon:o.sortKey!==i.id||o.sortKey===i.id&&!o.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-down-short-wide",onClick:f=>c.updateCurrentSort(i)},null,8,["icon","onClick"])],2)):z.deepSorts&&!o.deepSortsList.some(f=>f.id===i.id)&&i.isSortable?(q.openBlock(),q.createElementBlock("div",Gi,[q.createVNode(A,{icon:"fa-solid fa-filter",onClick:f=>c.addDeepSort(i)},null,8,["onClick"])])):q.createCommentVNode("",!0)])],10,Hi)):q.createCommentVNode("",!0)],64))),128))]))]),q.createElementVNode("tbody",null,[((s=c.showeditems)==null?void 0:s.length)===0?(q.openBlock(),q.createElementBlock("tr",Vi,[q.createElementVNode("th",{colspan:o.columns.length,class:"text-center",style:{"border-top-left-radius":"0px !important","border-top-right-radius":"0px !important"}},[q.createElementVNode("span",{id:`${z.tableId}-no-value`,class:"text-danger fs-5"},q.toDisplayString(z.noValueText),9,Qi)],8,Ki)])):(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:1},q.renderList(c.showeditems,(i,l)=>(q.openBlock(),q.createElementBlock("tr",{key:i.id,class:q.normalizeClass([{hoverable:z.clickable&&!o.headerEditMode,"hoverable-no-drop":z.clickable&&o.headerEditMode},z.trFontSize]),style:q.normalizeStyle({height:z.trHeightPx+"px"}),onClick:f=>z.clickable&&!o.headerEditMode?c.selectSubject(i):null,onContextmenu:f=>c.handleContextMenu(f,i)},[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(o.columns,f=>(q.openBlock(),q.createElementBlock(q.Fragment,{key:f.id},[f.id==="checkBox"?(q.openBlock(),q.createElementBlock("td",{key:0,"data-column-id":f.id,class:q.normalizeClass(["text-center",[z.tdClass,i.lineState?c.lineStateClass(i.lineState):"",f.stickyLeft?"sticky-column-left":"",f.stickyRight?"sticky-column-right":""]]),onClick:q.withModifiers(R=>c.checkItem(i.id),["stop"])},[q.withDirectives(q.createElementVNode("input",{id:`${z.tableId}-checkbox-${l}`,"onUpdate:modelValue":b[13]||(b[13]=R=>o.selectedItems=R),type:"checkbox",class:"form-check-input hoverable",value:i.id,onClick:b[14]||(b[14]=q.withModifiers(()=>{},["stop"]))},null,8,$i),[[q.vModelCheckbox,o.selectedItems]])],10,Zi)):(f.show||o.headerEditMode)&&(!f.onlyOnEditMode||z.lineEditMode)?(q.openBlock(),q.createElementBlock("td",{key:1,"data-column-id":f.id,class:q.normalizeClass([[z.tdClass,f.show?"":"table-danger",!z.deepSorts&&f.isSorted!==null&&f.isSorted!==void 0?"bg-gray-200":"",i.lineState?c.lineStateClass(i.lineState):"",f.stickyLeft?"sticky-column-left":"",f.stickyRight?"sticky-column-right":""],"text-center text-nowrap"])},[q.renderSlot(M.$slots,"tableBodyTd",{header:f,item:i,formattedValue:c.formatColumnValue(i,f)},()=>[q.createTextVNode(q.toDisplayString(c.formatColumnValue(i,f)),1)],!0)],10,Mq)):q.createCommentVNode("",!0)],64))),128))],46,Ji))),128))])],14,ki))],38)]),q.createElementVNode("div",bq,[!z.infiniteScroll&&o.totalPages&&o.totalPages>1?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.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"}])},[q.createElementVNode("ul",zq,[q.createElementVNode("li",pq,[q.createElementVNode("a",{class:q.normalizeClass(["page-link",{disabled:o.currentPage===1}]),onClick:b[16]||(b[16]=i=>o.currentPage=1)}," « ",2)]),q.createElementVNode("li",Oq,[q.createElementVNode("a",{class:q.normalizeClass(["page-link",{disabled:o.currentPage===1}]),onClick:b[17]||(b[17]=i=>o.currentPage-=1)}," < ",2)]),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(c.currentDisplayPagination,i=>(q.openBlock(),q.createElementBlock("li",{key:i,class:q.normalizeClass(["page-item hoverable",{active:o.currentPage===i}])},[q.createElementVNode("a",{class:"page-link",onClick:l=>o.currentPage=i},q.toDisplayString(i),9,oq)],2))),128)),q.createElementVNode("li",eq,[q.createElementVNode("a",{class:q.normalizeClass(["page-link",{disabled:o.currentPage===o.totalPages}]),onClick:b[18]||(b[18]=i=>o.currentPage+=1)}," > ",2)]),q.createElementVNode("li",cq,[q.createElementVNode("a",{class:q.normalizeClass(["page-link",{disabled:o.currentPage===o.totalPages}]),onClick:b[19]||(b[19]=i=>o.currentPage=o.totalPages)}," » ",2)])])],2)):q.createCommentVNode("",!0),z.stickyScrollbarHorizontal?(q.openBlock(),q.createElementBlock("div",{key:1,id:`${z.tableId}-bottom-scrollbar`,class:q.normalizeClass(["bottom-scrollbar",{visible:o.showScrollbar}])},[...b[22]||(b[22]=[q.createElementVNode("div",{class:"scrollbar-content"},null,-1)])],10,tq)):q.createCommentVNode("",!0)])],64)}const ne=Li(mi,[["render",nq],["__scopeId","data-v-fac450ae"]]);t2.AmsomTableDraggable=ne,t2.default=ne,Object.defineProperties(t2,{__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,c=/(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,A=[/^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:c,monthsShortRegex:c,monthsStrictRegex:p,monthsShortStrictRegex:o,monthsParse:A,longMonthsParse:A,shortMonthsParse:A,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(s,i){switch(i){case"D":return s+(s===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return s+(s===1?"er":"e");case"w":case"W":return s+(s===1?"re":"e")}},week:{dow:1,doy:4}});return r})})();function v2(M,b=!0){if(!M)return null;let z=M.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"");return b?z.toLowerCase():z}function be(M){return M?M==null?void 0:M.toLocaleString("fr-FR",{style:"currency",currency:"EUR",minimumFractionDigits:2}):"0 €"}function Gp(M,b="DD/MM/YYYY"){return!M||!J1.unix(M).isValid()?M:J1.unix(M).format(b)}function ze(M,b="DD/MM/YYYY à HH:mm"){return Gp(M,b)}const pe=/^(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 Oe(M){return M!=null&&M!==""&&!isNaN(M)}function oe(M){return M&&J1(M,"DD/MM/YYYY",!0).isValid()}function ee(M){return typeof M=="boolean"}function Wi(M,b,z){const c=(M?1:0)-(b?1:0);return z?-c:c}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 ce(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 c=p-o;return z?c:-c}function Vp(M,b,z){const p=li(M,b);if(p!==null)return p;if(ee(M)&&ee(b))return Wi(M,b,z);if(pe.test(M)&&pe.test(b)){const r=di(M,b);return z?r:-r}if(Oe(M)&&Oe(b)){const r=parseFloat(M),s=parseFloat(b);return z?r-s:s-r}if(oe(M)&&oe(b)){const r=J1(M,"DD/MM/YYYY").unix(),s=J1(b,"DD/MM/YYYY").unix();return z?r-s:s-r}if(ce(M)&&ce(b))return fi(M,b,z);const o=typeof M=="string"?v2(M).toLowerCase():v2(String(M)).toLowerCase(),c=typeof b=="string"?v2(b).toLowerCase():v2(String(b)).toLowerCase(),A=o.localeCompare(c,void 0,{numeric:!0,sensitivity:"base"});return z?A:-A}function ui(M,b,z=!1){return!M||!Array.isArray(M)?M:M.sort((p,o)=>{const c=p==null?void 0:p[b],A=o==null?void 0:o[b];return Vp(c,A,z)})}function Ri(M,b=!1,z){return!M||!Array.isArray(M)?M:M.sort((p,o)=>z(p,o,b))}function te(M,b){let z=w2(M);if(!z)z={columns:b};else if(!z.columns)z.columns=b;else{let p=b.filter(function(c){return!z.columns.some(function(A){return A.id===c.id})});z.columns=z.columns.concat(p);let o=z.columns.filter(function(c){return!b.some(function(A){return c.id===A.id})});z.columns=z.columns.filter(function(c){return!o.some(function(A){return c.id===A.id})}),z.columns.filter(c=>{for(let A of b)A.id===c.id&&A.libelle!==c.libelle&&(c.libelle=A.libelle)})}OM(M,z)}function hi(M,b,z=null){let p=w2(M);p?z&&!p[z]&&(p[z]=b):z?(p={},p[z]=b):p=b,OM(M,p)}function w2(M){return JSON.parse(window.localStorage.getItem(M))}function OM(M,b,z=null){let p=w2(M);return z?p[z]=b:p=b,window.localStorage.setItem(M,JSON.stringify(p))}const Li=(M,b)=>{const z=M.__vccOpts||M;for(const[p,o]of b)z[p]=o;return z};Qt.add(fn,dn,Wn,Rn,un,Ln,mn,hn,ln);const mi={name:"AmsomTableDraggable",components:{VueDraggableNext:cA,FontAwesomeIcon:sn},props:{tableId:{type:String,default:"table-draggable",require:!0},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},infiniteScroll:{type:Boolean,default:!1},infiniteScrollIncrement:{type:Number,default:null},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"}]},tdClass:{type:String,default:""},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","contextmenu"],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,currentVisibleItems:0,scrollTimeout:null,stickyColumnsUpdateTimeout:null,normalizedItemsCache:new Map,deepSortCache:null,deepSortCacheKey:"",stickyColumnsAnimationFrame:null}},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:J1(this.pickedDate[0]).set({hour:0,minute:0}).unix(),fin:J1(this.pickedDate[1]).set({hour:23,minute:59}).unix()}},normalizedSearch(){return this.search?v2(this.search):""},hasDateFilter(){return this.dateFilterBounds&&Array.isArray(this.columnNameDateFilter)&&this.columnNameDateFilter.length>0},visibleColumns(){return this.columns.filter(M=>M.show&&(!M.onlyOnEditMode||this.lineEditMode))},filtereditems(){var M,b;return this.items?this.items.filter(z=>{const p=this.filterBy(z,this.normalizedSearch);if(this.hasDateFilter){const o=this.columnNameDateFilter.some(c=>{const A=z[c];if(A){const r=J1(A,"DD/MM/YYYY").unix();return r>=this.dateFilterBounds.deb&&r<=this.dateFilterBounds.fin}return!1});return p&&o}return p}):[]`${this.normalizedSearch}_${this.hasDateFilter}_${(M=this.dateFilterBounds)==null?void 0:M.deb}_${(b=this.dateFilterBounds)==null?void 0:b.fin}`},sortedItems(){if(!this.filtereditems)return[];if(!this.sortKey&&(!this.deepSorts||this.deepSortsList.length===0))return this.filtereditems;const M=this.columns.find(b=>b.id===this.sortKey);return this.deepSorts&&this.deepSortsList.length>0?this.deepSortsColumnList(this.deepSortsList,[...this.filtereditems]):M!=null&&M.customSort?Ri([...this.filtereditems],this.sortAsc,M.customSort):this.sortKey?ui([...this.filtereditems],this.sortKey,this.sortAsc):this.filtereditems},showeditems(){const M=this.sortedItems;if(this.infiniteScroll)return M.slice(0,this.currentVisibleItems);if(this.maxItemsPerPage===-1)return M;const b=(this.currentPage-1)*this.maxItemsPerPage,z=this.currentPage*this.maxItemsPerPage;return M.slice(b,z)},tableMaxHeight(){if(!this.infiniteScroll)return"auto";const M=this.trHeightPx||60,b=50,z=this.maxItemPerPage;return`${b+z*M}px`},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&&OM(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:{handler(M){var b;if(M)this.maxItemsPerPage=3;else{const z=this.localStorageMaxItemPerPageName!==null?w2(this.localStorageMaxItemPerPageName):this.localStorageItemName!==null?(b=w2(this.localStorageItemName))==null?void 0:b.maxItemPerPage:this.maxItemPerPage;this.maxItemsPerPage=z??this.maxItemPerPage}}},sortedItems:{handler(M){if(this.infiniteScroll){const b=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems===0?this.currentVisibleItems=Math.min(this.maxItemPerPage+b,M.length):this.currentVisibleItems=Math.min(this.currentVisibleItems,M.length)}this.infiniteScroll||(this.totalPages=this.newTotalPage(M.length))},immediate:!0},filtereditems:{handler(M,b){if(this.infiniteScroll&&b&&M.length!==b.length)if(M.length>b.length&&this.currentVisibleItems<M.length){const z=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+z,M.length)}else M.length<b.length&&this.currentVisibleItems>M.length&&(this.currentVisibleItems=Math.min(this.currentVisibleItems,M.length))},immediate:!1},maxItemPerPage:{handler(M){M!==this.maxItemsPerPage&&(this.maxItemsPerPage=M)},immediate:!0},maxItemsPerPage:{handler(M){if(!this.headerEditMode){if(this.localStorageItemName!==null&&OM(this.localStorageItemName,M,"maxItemPerPage"),this.localStorageMaxItemPerPageName!==null&&OM(this.localStorageMaxItemPerPageName,M),this.infiniteScroll){const b=this.infiniteScrollIncrement||M;this.currentVisibleItems=Math.min(M+b,this.sortedItems.length)}this.currentPage!==1&&!this.infiniteScroll&&(this.currentPage=1),this.infiniteScroll||(this.totalPages=this.newTotalPage(this.filtereditems.length))}}},search:{handler(M,b){M!==b&&(this.normalizedItemsCache.clear(),this.currentPage>1&&this.$nextTick(()=>{this.adjustPageAfterSearch()}),this.infiniteScroll&&this.$nextTick(()=>{const z=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+z,this.filtereditems.length)}))},immediate:!1},showeditems:{handler(M,b){M!==b&&(this.shouldAdjustPage(M)&&this.adjustPageAfterSearch(),M.length>0?this.checkAllCheckBox=M.every(z=>this.selectedItems.includes(z.id)):this.checkAllCheckBox=!1,this.infiniteScroll||(this.totalPages=this.newTotalPage(this.filtereditems.length)),this.columns.some(z=>z.stickyLeft||z.stickyRight)&&this.$nextTick(()=>{this.debouncedUpdateStickyColumns()}))},flush:"post"},deepSortsList:{handler(M){M&&M.length>0&&this.$emit("update:deepSortsListPreset",M),this.infiniteScroll&&this.currentVisibleItems>0&&this.$nextTick(()=>{const b=this.currentVisibleItems;this.currentVisibleItems=Math.min(b,this.sortedItems.length)})},deep:!0},deepSortsListPreset:{handler(M){M&&M.length>0&&JSON.stringify(M)!==JSON.stringify(this.deepSortsList)&&(this.deepSortsList=M.map(b=>{const z=this.columns.find(p=>p.id===b.id);return{...b,customSort:(z==null?void 0:z.customSort)||b.customSort||null}}))},deep:!0,immediate:!0},tdItemsList:{handler(M,b){M!==b&&this.columns.some(z=>z.stickyLeft||z.stickyRight)&&this.$nextTick(()=>{this.debouncedUpdateStickyColumns()})},deep:!0,immediate:!1}},mounted(){var M;if(this.localStorageItemName!==null){te(this.localStorageItemName,this.getRefactoColumns(this.copyDefaultColumns())),hi(this.localStorageItemName,this.maxItemPerPage,"maxItemPerPage");let b=w2(this.localStorageItemName);b&&(this.columns=this.getColumnsById(b.columns,this.defaultColumns),this.maxItemsPerPage=b.maxItemPerPage)}if(this.localStorageMaxItemPerPageName!==null){let b=w2(this.localStorageMaxItemPerPageName);b&&(this.maxItemsPerPage=b)}if(this.dynamicColumns&&(this.columns=this.getColumnsById(this.dynamicColumns,this.defaultColumns)),this.ckSelectedItems&&(this.selectedItems=this.ckSelectedItems),this.infiniteScroll){const b=this.infiniteScrollIncrement||this.maxItemPerPage;this.currentVisibleItems=Math.min(this.maxItemPerPage+b,this.filtereditems.length)}else this.totalPages=this.newTotalPage(this.filtereditems.length);if(this.initResizeObserver(),!this.deepSorts){const b=this.columns.find(z=>z.isSorted!==null&&z.isSorted!==void 0);b&&(this.sortKey=b.id,this.sortAsc=b.isSorted,this.currentHeaderSort=b)}this.deepSortsListPreset&&this.deepSortsListPreset.length>0&&this.deepSorts&&(this.deepSortsList=this.deepSortsListPreset.map(b=>{const z=this.columns.find(p=>p.id===b.id);return{...b,customSort:(z==null?void 0:z.customSort)||b.customSort||null}})),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"),this.infiniteScroll&&this.$nextTick(()=>{this.$refs.scrollContainer})},beforeUnmount(){this.cleanupResizeObserver(),window.removeEventListener("resize",this.checkTableOverflow),window.removeEventListener("scroll",this.handleTableScroll),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=null),this.stickyColumnsUpdateTimeout&&(clearTimeout(this.stickyColumnsUpdateTimeout),this.stickyColumnsUpdateTimeout=null),this.stickyColumnsAnimationFrame&&(cancelAnimationFrame(this.stickyColumnsAnimationFrame),this.stickyColumnsAnimationFrame=null),this.normalizedItemsCache.clear(),this.deepSortCache=null},methods:{moment:J1,unixToDateString:Gp,unixToDateTimeString:ze,toCurrencyEUR:be,formatColumnValue(M,b){const z=M[b.id];if(b.formatter&&typeof b.formatter=="function")return b.formatter(z,M);if(b.type)switch(b.type){case"unixDate":return z?Gp(z):"";case"unixDateTime":return z?ze(z):"";case"currency":return z!=null?be(z):"";default:return z}return z},shouldAdjustPage(M){return M.length===0&&this.filtereditems.length>0&&this.currentPage>1&&!this.infiniteScroll},getRefactoColumns(M){return M.map(b=>({id:b.id,show:b.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(`#${this.tableId}-bottom-scrollbar`);if(this.tableContainer&&M){const b=this.tableContainer.scrollHeight,z=window.innerHeight;this.showScrollbar=b>z,this.showScrollbar&&(document.querySelector(`#${this.tableId}-bottom-scrollbar .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(){!this.columns.some(z=>z.stickyLeft||z.stickyRight)||!document.getElementById(this.tableId)||(this.stickyColumnsAnimationFrame&&cancelAnimationFrame(this.stickyColumnsAnimationFrame),this.stickyColumnsAnimationFrame=requestAnimationFrame(()=>{const z=[];this.columns.forEach((c,A)=>{if(!c.stickyLeft&&!c.stickyRight)return;const r=document.getElementById(`${this.tableId}-${c.id}-th-${A}`);if(!r)return;const s=document.querySelectorAll(`#${this.tableId} [data-column-id="${c.id}"]`),i=r.getBoundingClientRect().width;let l=0;s.forEach(f=>{const R=f.getBoundingClientRect().width;R>l&&(l=R)}),z.push({column:c,thElement:r,tdElements:s,width:Math.max(l,i)-1})});let p=0,o=0;z.forEach(({column:c,thElement:A,tdElements:r,width:s})=>{if(c.stickyLeft){const i=`${p}px`;A.style.left=i,r.forEach(l=>{l.style.left=i}),p+=s}if(c.stickyRight){const i=`${o}px`;A.style.right=i,r.forEach(l=>{l.style.right=i}),o+=s}}),this.stickyColumnsAnimationFrame=null}))},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){const b=this.selectedItems.indexOf(M);if(b!==-1)this.selectedItems.splice(b,1),this.checkAllCheckBox=!1;else if(this.selectedItems.push(M),!this.checkAllCheckBox){const z=this.showeditems.map(p=>p.id);this.checkAllCheckBox=z.every(p=>this.selectedItems.includes(p))}this.$emit("update:ckSelectedItems",this.selectedItems)},toggleAllCheckBox(){const M=this.showeditems.map(b=>b.id);if(this.checkAllCheckBox)this.selectedItems=this.selectedItems.filter(b=>!M.includes(b)),this.checkAllCheckBox=!1;else{const b=new Set([...this.selectedItems,...M]);this.selectedItems=Array.from(b),this.checkAllCheckBox=!0}this.$emit("update:ckSelectedItems",this.selectedItems)},updateCurrentSort(M){this.currentHeaderSort&&(this.currentHeaderSort.isSorted=null);const b=this.infiniteScroll?this.currentVisibleItems:null;this.updateSortitems(M.id),M.isSorted=this.sortAsc,this.currentHeaderSort=M,this.infiniteScroll&&b&&this.$nextTick(()=>{this.currentVisibleItems=Math.min(b,this.sortedItems.length)})},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;const z=`${M.id}_${b}`;if(this.normalizedItemsCache.has(z))return this.normalizedItemsCache.get(z);const p=this.visibleColumns.some(o=>{if(o.customSearch&&typeof o.customSearch=="function")return o.customSearch(M,b);const c=M[o.id];if(o.type||o.formatter){const A=this.formatColumnValue(M,o);if(A&&v2(A.toString()).includes(b))return!0}return c&&v2(c.toString()).includes(b)});return this.normalizedItemsCache.size>1e3&&this.normalizedItemsCache.clear(),this.normalizedItemsCache.set(z,p),p},getDefaultMaxItemPerPage(){return this.maxItemPerPage},copyDefaultColumns(){return this.defaultColumns.map(M=>{const b={};for(const z in M)if(M.hasOwnProperty(z)){const p=M[z];typeof p=="function"||p===null||p===void 0?b[z]=p:Array.isArray(p)?b[z]=[...p]:typeof p=="object"?b[z]={...p}:b[z]=p}return b})},getTableContent(){return this.items},getColumns(){return this.columns},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&&OM(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&&te(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){const b=this.infiniteScroll?this.currentVisibleItems:null;this.deepSortCache=null,this.deepSortCacheKey="",this.deepSortsList.push({id:M.id,libelle:M.libelle,asc:!0,customSort:M.customSort||null}),this.infiniteScroll&&b&&this.$nextTick(()=>{this.currentVisibleItems=Math.min(b,this.sortedItems.length)})},toggleDeepSortDirection(M){this.deepSortCache=null,this.deepSortCacheKey="",M.asc=!M.asc},deepSortsColumnList(M,b){if(!M||M.length===0)return b;const z=JSON.stringify(M.map(p=>({id:p.id,asc:p.asc})));return this.deepSortCache&&this.deepSortCacheKey===z?b.sort((p,o)=>{for(const c of M){let A;if(c.customSort)A=c.customSort(p,o,c.asc);else{const r=p[c.id],s=o[c.id];A=Vp(r,s,c.asc)}if(A!==0)return A}return 0}):(this.deepSortCacheKey=z,this.deepSortCache=!0,b.sort((p,o)=>{for(const c of M){let A;if(c.customSort)A=c.customSort(p,o,c.asc);else{const r=p[c.id],s=o[c.id];A=Vp(r,s,c.asc)}if(A!==0)return A}return 0}))},handleScrollEvent(M){if(this.infiniteScroll){if(this.scrollTimeout)return;this.scrollTimeout=setTimeout(()=>{this.handleInfiniteScroll(M),this.scrollTimeout=null},50)}},handleInfiniteScroll(M){const{target:b}=M;if(b.scrollTop+b.clientHeight>=b.scrollHeight-10&&this.currentVisibleItems<this.sortedItems.length){const p=this.infiniteScrollIncrement||this.maxItemPerPage,o=Math.min(this.currentVisibleItems+p,this.sortedItems.length);o>this.currentVisibleItems&&(this.currentVisibleItems=o)}},handleContextMenu(M,b){let z=null;const p=M.target.closest("td");if(p){const o=p.getAttribute("data-column-id");o&&(z=this.columns.find(c=>c.id===o))}this.$emit("contextmenu",{event:M,item:b,column:z})},refreshStickyColumns(){this.columns.some(M=>M.stickyLeft||M.stickyRight)&&this.$nextTick(()=>{this.updateStickyColumns()})},debouncedUpdateStickyColumns(){this.stickyColumnsUpdateTimeout&&clearTimeout(this.stickyColumnsUpdateTimeout),this.stickyColumnsUpdateTimeout=setTimeout(()=>{this.updateStickyColumns(),this.stickyColumnsUpdateTimeout=null},50)}}},Ni={key:0,class:"mb-3 text-center"},Bi={key:1,class:"row mb-1 mx-auto"},gi={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"}},Xi={class:"text-nowrap"},yi={class:"d-flex justify-content-center align-items-center fs-7 px-2 py-0 rounded-1 mx-2 user-select-none"},Ti={key:0,class:"text-nowrap",style:{height:"20px"}},Si=["value"],_i={key:1,class:"d-flex align-items-center text-nowrap"},vi={key:0,class:"d-flex ms-2"},wi={class:"row mx-auto mb-3 rounded-0"},ki=["id"],Ci=["id"],Ei=["id","onDragstart","onDragend"],Di={class:"d-flex flex-column align-items-center"},Pi={key:0,class:"mx-auto my-auto mb-2 mt-2 hoverable d-inline-block"},xi={class:"d-inline-flex text-nowrap"},Ii={key:0,class:"ms-2 float-end"},Yi={key:1,class:"ms-2"},Fi={key:1},Ui=["id"],Hi=["id"],ji={class:"d-inline-flex text-nowrap"},Gi={key:1,class:"ms-2 hoverable"},Vi={key:0},Ki=["colspan"],Qi=["id"],Ji=["onClick","onContextmenu"],Zi=["data-column-id","onClick"],$i=["id","value"],Mq=["data-column-id"],bq={class:"row ms-auto mb-2"},zq={class:"m-0 pagination pagination-sm"},pq={class:"page-item hoverable"},Oq={class:"page-item hoverable"},oq=["onClick"],eq={class:"page-item hoverable"},cq={class:"page-item hoverable"},tq=["id"];function nq(M,b,z,p,o,c){var s;const A=q.resolveComponent("font-awesome-icon"),r=q.resolveComponent("vue-draggable-next");return q.openBlock(),q.createElementBlock(q.Fragment,null,[z.lineEditMode?(q.openBlock(),q.createElementBlock("div",Ni,[q.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"))},[q.createVNode(A,{icon:"fa-solid fa-plus",size:"xl"})])])):q.createCommentVNode("",!0),z.showLineNumber||z.showModifyColumnsBtn||z.showMaxItemPerPageBtn||z.deepSorts?(q.openBlock(),q.createElementBlock("div",Bi,[q.createElementVNode("div",{class:q.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?(q.openBlock(),q.createElementBlock("div",gi,[q.createElementVNode("b",Xi,q.toDisplayString(c.showItemsLinesNumber+" / "+c.filtereditems.length),1),b[20]||(b[20]=q.createElementVNode("span",{class:"ms-1"},"lignes",-1))])):q.createCommentVNode("",!0),z.deepSorts&&o.deepSortsList.length>0?(q.openBlock(),q.createElementBlock("div",{key:1,class:q.normalizeClass(["d-flex align-items-center flex-wrap",{"ms-4":z.showLineNumber}])},[b[21]||(b[21]=q.createElementVNode("span",{class:"me-1 text-secondary h-auto fs-7 mb-1 mb-lg-0"},"Tri :",-1)),q.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:q.withCtx(()=>[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(o.deepSortsList,(i,l)=>(q.openBlock(),q.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"}},[q.createVNode(A,{class:"hoverable",icon:"fa-solid fa-xmark",onClick:f=>o.deepSortsList.splice(l,1)},null,8,["onClick"]),q.createElementVNode("div",yi,[q.createElementVNode("span",null,q.toDisplayString(i.libelle),1)]),q.createVNode(A,{class:"hoverable",icon:i.asc?"fa-solid fa-arrow-down-short-wide":"fa-solid fa-arrow-down-wide-short",onClick:f=>c.toggleDeepSortDirection(i)},null,8,["icon","onClick"])]))),128))]),_:1},8,["modelValue"])],2)):q.createCommentVNode("",!0)],2),z.showMaxItemPerPageBtn||z.showModifyColumnsBtn?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.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?(q.openBlock(),q.createElementBlock("div",Ti,[z.maxItemPerPageList.length>0?q.withDirectives((q.openBlock(),q.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"},[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(z.maxItemPerPageList,i=>(q.openBlock(),q.createElementBlock("option",{key:i.value,value:i.value},q.toDisplayString(i.text),9,Si))),128))],512)),[[q.vModelSelect,o.maxItemsPerPage]]):q.createCommentVNode("",!0)])):q.createCommentVNode("",!0),z.showModifyColumnsBtn?(q.openBlock(),q.createElementBlock("div",_i,[o.headerEditMode?(q.openBlock(),q.createElementBlock("div",vi,[q.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)=>c.saveTablePreferences&&c.saveTablePreferences(...i))}," Sauvegarder "),q.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)=>c.resetTablePreferences&&c.resetTablePreferences(...i))}," Réinitialiser le tableau ")])):(q.openBlock(),q.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)=>c.editTablePreferences&&c.editTablePreferences(...i))}," Modifier colonnes "))])):q.createCommentVNode("",!0)],2)):q.createCommentVNode("",!0)])):q.createCommentVNode("",!0),q.createElementVNode("div",wi,[q.createElementVNode("div",{ref:"scrollContainer",class:q.normalizeClass(["col-12 p-0 overflow-x-auto mb-2",{border:z.infiniteScroll,"infinite-scroll-container":z.infiniteScroll}]),style:q.normalizeStyle(z.infiniteScroll?{maxHeight:c.tableMaxHeight,overflowY:"auto",borderRadius:"10px"}:{borderRadius:"10px !important"}),onScroll:b[15]||(b[15]=(...i)=>c.handleScrollEvent&&c.handleScrollEvent(...i))},[(q.openBlock(),q.createElementBlock("table",{id:z.tableId,ref:"table",key:o.forceTableUpdateIndex,class:q.normalizeClass(["table table-striped table-hover table-responsive align-middle border-1 border-top border-bottom position-relative m-0",[z.border?"table-bordered":"table-borderless",z.tableSm?"table-sm":""]]),style:q.normalizeStyle([{"border-collapse":"separate","border-spacing":"0"},{borderLeft:z.border?"":"1px solid #ddd",borderRight:z.border?"":"1px solid #ddd"}])},[q.createElementVNode("thead",null,[o.headerEditMode?(q.openBlock(),q.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:c.checkMove,group:"columns"},{default:q.withCtx(()=>[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(o.columns,(i,l)=>(q.openBlock(),q.createElementBlock(q.Fragment,{key:i.id},[i.id==="checkBox"?(q.openBlock(),q.createElementBlock("th",{key:0,id:`${z.tableId}-${i.id}-th-${l}`,class:q.normalizeClass(["text-center",[z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.infiniteScroll?"sticky-top":""]]),scope:"col",onClick:b[8]||(b[8]=q.withModifiers((...f)=>c.toggleAllCheckBox&&c.toggleAllCheckBox(...f),["stop"]))},[q.withDirectives(q.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]=q.withModifiers((...f)=>c.toggleAllCheckBox&&c.toggleAllCheckBox(...f),["stop"]))},null,512),[[q.vModelCheckbox,o.checkAllCheckBox]])],10,Ci)):(i.show||o.headerEditMode)&&(!i.onlyOnEditMode||z.lineEditMode)?(q.openBlock(),q.createElementBlock("th",{key:1,id:`${z.tableId}-${i.id}-th-${l}`,scope:"col",class:q.normalizeClass(["text-center",[i.isDragging?"hoverable-grabbing":z.headerBgColor+" hoverable-grab",i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.headerTextColor,z.infiniteScroll?"sticky-top":"",{"table-danger":!i.show}]]),onDragstart:f=>i.isDragging=!0,onDragend:f=>i.isDragging=!1},[q.createElementVNode("div",Di,[o.headerEditMode&&!i.keepShow?(q.openBlock(),q.createElementBlock("div",Pi,[i.show?(q.openBlock(),q.createBlock(A,{key:0,icon:"fa-solid fa-eye",class:"fa-lg",onClick:f=>i.show=!1},null,8,["onClick"])):(q.openBlock(),q.createBlock(A,{key:1,icon:"fa-solid fa-eye-slash",class:"fa-lg",onClick:f=>i.show=!0},null,8,["onClick"]))])):q.createCommentVNode("",!0),q.createElementVNode("div",xi,[q.renderSlot(M.$slots,"tableHeaderTh",{header:i},void 0,!0),i.isSortable&&!z.deepSorts?(q.openBlock(),q.createElementBlock("div",Ii,[q.createVNode(A,{icon:o.sortKey!==i.id||o.sortKey===i.id&&!o.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-down-short-wide",class:"hoverable",onClick:f=>c.updateCurrentSort(i)},null,8,["icon","onClick"])])):z.deepSorts&&!o.deepSortsList.some(f=>f.id===i.id)&&i.isSortable?(q.openBlock(),q.createElementBlock("div",Yi,[q.createVNode(A,{icon:"fa-solid fa-filter",onClick:f=>c.addDeepSort(i)},null,8,["onClick"])])):q.createCommentVNode("",!0)])])],42,Ei)):q.createCommentVNode("",!0)],64))),128))]),_:3},8,["modelValue","ghost-class","drag-class","move"])):(q.openBlock(),q.createElementBlock("tr",Fi,[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(o.columns,(i,l)=>(q.openBlock(),q.createElementBlock(q.Fragment,{key:i.id},[i.id==="checkBox"?(q.openBlock(),q.createElementBlock("th",{key:0,id:`${z.tableId}-${i.id}-th-${l}`,class:q.normalizeClass(["text-center",[z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.infiniteScroll?"sticky-top":""]]),scope:"col",onClick:b[12]||(b[12]=q.withModifiers((...f)=>c.toggleAllCheckBox&&c.toggleAllCheckBox(...f),["stop"]))},[q.withDirectives(q.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]=q.withModifiers((...f)=>c.toggleAllCheckBox&&c.toggleAllCheckBox(...f),["stop"]))},null,512),[[q.vModelCheckbox,o.checkAllCheckBox]])],10,Ui)):i.show&&(!i.onlyOnEditMode||z.lineEditMode)?(q.openBlock(),q.createElementBlock("th",{key:1,id:`${z.tableId}-${i.id}-th-${l}`,scope:"col",class:q.normalizeClass(["text-center",[i.isDragging?"":z.headerBgColor,i.stickyLeft?"sticky-column-left":"",i.stickyRight?"sticky-column-right":"",z.headerTextColor,z.infiniteScroll?"sticky-top":""]])},[q.createElementVNode("div",ji,[q.renderSlot(M.$slots,"tableHeaderTh",{header:i},void 0,!0),i.isSortable&&!z.deepSorts?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.normalizeClass(["ms-2 float-end hoverable",{"opacity-50":o.sortKey!==i.id}])},[q.createVNode(A,{icon:o.sortKey!==i.id||o.sortKey===i.id&&!o.sortAsc?"fa-solid fa-arrow-down-wide-short":"fa-solid fa-arrow-down-short-wide",onClick:f=>c.updateCurrentSort(i)},null,8,["icon","onClick"])],2)):z.deepSorts&&!o.deepSortsList.some(f=>f.id===i.id)&&i.isSortable?(q.openBlock(),q.createElementBlock("div",Gi,[q.createVNode(A,{icon:"fa-solid fa-filter",onClick:f=>c.addDeepSort(i)},null,8,["onClick"])])):q.createCommentVNode("",!0)])],10,Hi)):q.createCommentVNode("",!0)],64))),128))]))]),q.createElementVNode("tbody",null,[((s=c.showeditems)==null?void 0:s.length)===0?(q.openBlock(),q.createElementBlock("tr",Vi,[q.createElementVNode("th",{colspan:o.columns.length,class:"text-center",style:{"border-top-left-radius":"0px !important","border-top-right-radius":"0px !important"}},[q.createElementVNode("span",{id:`${z.tableId}-no-value`,class:"text-danger fs-5"},q.toDisplayString(z.noValueText),9,Qi)],8,Ki)])):(q.openBlock(!0),q.createElementBlock(q.Fragment,{key:1},q.renderList(c.showeditems,(i,l)=>(q.openBlock(),q.createElementBlock("tr",{key:i.id,class:q.normalizeClass([{hoverable:z.clickable&&!o.headerEditMode,"hoverable-no-drop":z.clickable&&o.headerEditMode},z.trFontSize]),style:q.normalizeStyle({height:z.trHeightPx+"px"}),onClick:f=>z.clickable&&!o.headerEditMode?c.selectSubject(i):null,onContextmenu:f=>c.handleContextMenu(f,i)},[(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(o.columns,f=>(q.openBlock(),q.createElementBlock(q.Fragment,{key:f.id},[f.id==="checkBox"?(q.openBlock(),q.createElementBlock("td",{key:0,"data-column-id":f.id,class:q.normalizeClass(["text-center",[z.tdClass,i.lineState?c.lineStateClass(i.lineState):"",f.stickyLeft?"sticky-column-left":"",f.stickyRight?"sticky-column-right":""]]),onClick:q.withModifiers(R=>c.checkItem(i.id),["stop"])},[q.withDirectives(q.createElementVNode("input",{id:`${z.tableId}-checkbox-${l}`,"onUpdate:modelValue":b[13]||(b[13]=R=>o.selectedItems=R),type:"checkbox",class:"form-check-input hoverable",value:i.id,onClick:b[14]||(b[14]=q.withModifiers(()=>{},["stop"]))},null,8,$i),[[q.vModelCheckbox,o.selectedItems]])],10,Zi)):(f.show||o.headerEditMode)&&(!f.onlyOnEditMode||z.lineEditMode)?(q.openBlock(),q.createElementBlock("td",{key:1,"data-column-id":f.id,class:q.normalizeClass([[z.tdClass,f.show?"":"table-danger",!z.deepSorts&&f.isSorted!==null&&f.isSorted!==void 0?"bg-gray-200":"",i.lineState?c.lineStateClass(i.lineState):"",f.stickyLeft?"sticky-column-left":"",f.stickyRight?"sticky-column-right":""],"text-center text-nowrap"])},[q.renderSlot(M.$slots,"tableBodyTd",{header:f,item:i,formattedValue:c.formatColumnValue(i,f)},()=>[q.createTextVNode(q.toDisplayString(c.formatColumnValue(i,f)),1)],!0)],10,Mq)):q.createCommentVNode("",!0)],64))),128))],46,Ji))),128))])],14,ki))],38)]),q.createElementVNode("div",bq,[!z.infiniteScroll&&o.totalPages&&o.totalPages>1?(q.openBlock(),q.createElementBlock("div",{key:0,class:q.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"}])},[q.createElementVNode("ul",zq,[q.createElementVNode("li",pq,[q.createElementVNode("a",{class:q.normalizeClass(["page-link",{disabled:o.currentPage===1}]),onClick:b[16]||(b[16]=i=>o.currentPage=1)}," « ",2)]),q.createElementVNode("li",Oq,[q.createElementVNode("a",{class:q.normalizeClass(["page-link",{disabled:o.currentPage===1}]),onClick:b[17]||(b[17]=i=>o.currentPage-=1)}," < ",2)]),(q.openBlock(!0),q.createElementBlock(q.Fragment,null,q.renderList(c.currentDisplayPagination,i=>(q.openBlock(),q.createElementBlock("li",{key:i,class:q.normalizeClass(["page-item hoverable",{active:o.currentPage===i}])},[q.createElementVNode("a",{class:"page-link",onClick:l=>o.currentPage=i},q.toDisplayString(i),9,oq)],2))),128)),q.createElementVNode("li",eq,[q.createElementVNode("a",{class:q.normalizeClass(["page-link",{disabled:o.currentPage===o.totalPages}]),onClick:b[18]||(b[18]=i=>o.currentPage+=1)}," > ",2)]),q.createElementVNode("li",cq,[q.createElementVNode("a",{class:q.normalizeClass(["page-link",{disabled:o.currentPage===o.totalPages}]),onClick:b[19]||(b[19]=i=>o.currentPage=o.totalPages)}," » ",2)])])],2)):q.createCommentVNode("",!0),z.stickyScrollbarHorizontal?(q.openBlock(),q.createElementBlock("div",{key:1,id:`${z.tableId}-bottom-scrollbar`,class:q.normalizeClass(["bottom-scrollbar",{visible:o.showScrollbar}])},[...b[22]||(b[22]=[q.createElementVNode("div",{class:"scrollbar-content"},null,-1)])],10,tq)):q.createCommentVNode("",!0)])],64)}const ne=Li(mi,[["render",nq],["__scopeId","data-v-fac450ae"]]);t2.AmsomTableDraggable=ne,t2.default=ne,Object.defineProperties(t2,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amsom-habitat/amsom-table",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",