@tealca/core-components 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -110,4 +110,4 @@ var Vh;function $(){return Vh.apply(null,arguments)}function cS(e){Vh=e}function
|
|
|
110
110
|
[`+i+"] ";for(a in arguments[0])Ce(arguments[0],a)&&(s+=a+": "+arguments[0][a]+", ");s=s.slice(0,-2)}else s=arguments[i];n.push(s)}Bh(e+`
|
|
111
111
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
112
112
|
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var ud={};function Wh(e,t){$.deprecationHandler!=null&&$.deprecationHandler(e,t),ud[e]||(Bh(t),ud[e]=!0)}$.suppressDeprecationWarnings=!1;$.deprecationHandler=null;function Bt(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function dS(e){var t,r;for(r in e)Ce(e,r)&&(t=e[r],Bt(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function yo(e,t){var r=yr({},e),n;for(n in t)Ce(t,n)&&(Zr(e[n])&&Zr(t[n])?(r[n]={},yr(r[n],e[n]),yr(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)Ce(e,n)&&!Ce(t,n)&&Zr(e[n])&&(r[n]=yr({},r[n]));return r}function el(e){e!=null&&this.set(e)}var xo;Object.keys?xo=Object.keys:xo=function(e){var t,r=[];for(t in e)Ce(e,t)&&r.push(t);return r};var fS={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function hS(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return Bt(n)?n.call(t,r):n}function Ut(e,t,r){var n=""+Math.abs(e),s=t-n.length,i=e>=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var tl=/(\[[^\[]*\])|(\\)?([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,Zs=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,za={},bn={};function Q(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(bn[e]=s),t&&(bn[t[0]]=function(){return Ut(s.apply(this,arguments),t[1],t[2])}),r&&(bn[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function pS(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function gS(e){var t=e.match(tl),r,n;for(r=0,n=t.length;r<n;r++)bn[t[r]]?t[r]=bn[t[r]]:t[r]=pS(t[r]);return function(s){var i="",a;for(a=0;a<n;a++)i+=Bt(t[a])?t[a].call(s,e):t[a];return i}}function ii(e,t){return e.isValid()?(t=Yh(t,e.localeData()),za[t]=za[t]||gS(t),za[t](e)):e.localeData().invalidDate()}function Yh(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(Zs.lastIndex=0;r>=0&&Zs.test(e);)e=e.replace(Zs,n),Zs.lastIndex=0,r-=1;return e}var mS={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 vS(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(tl).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var yS="Invalid date";function xS(){return this._invalidDate}var bS="%d",wS=/\d{1,2}/;function ES(e){return this._ordinal.replace("%d",e)}var SS={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 kS(e,t,r,n){var s=this._relativeTime[r];return Bt(s)?s(e,t,r,n):s.replace(/%d/i,e)}function _S(e,t){var r=this._relativeTime[e>0?"future":"past"];return Bt(r)?r(t):r.replace(/%s/i,t)}var dd={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 Ct(e){return typeof e=="string"?dd[e]||dd[e.toLowerCase()]:void 0}function rl(e){var t={},r,n;for(n in e)Ce(e,n)&&(r=Ct(n),r&&(t[r]=e[n]));return t}var CS={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 OS(e){var t=[],r;for(r in e)Ce(e,r)&&t.push({unit:r,priority:CS[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var Hh=/\d/,vt=/\d\d/,Gh=/\d{3}/,nl=/\d{4}/,ia=/[+-]?\d{6}/,$e=/\d\d?/,qh=/\d\d\d\d?/,Zh=/\d\d\d\d\d\d?/,aa=/\d{1,3}/,sl=/\d{1,4}/,oa=/[+-]?\d{1,6}/,In=/\d+/,la=/[+-]?\d+/,LS=/Z|[+-]\d\d:?\d\d/gi,ca=/Z|[+-]\d\d(?::?\d\d)?/gi,jS=/[+-]?\d+(\.\d{1,3})?/,js=/[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,Fn=/^[1-9]\d?/,il=/^([1-9]\d|\d)/,Ti;Ti={};function H(e,t,r){Ti[e]=Bt(t)?t:function(n,s){return n&&r?r:t}}function MS(e,t){return Ce(Ti,e)?Ti[e](t._strict,t._locale):new RegExp(NS(e))}function NS(e){return rr(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,i){return r||n||s||i}))}function rr(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Et(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function be(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=Et(t)),r}var bo={};function Te(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),ir(t)&&(n=function(i,a){a[t]=be(i)}),s=e.length,r=0;r<s;r++)bo[e[r]]=n}function Ms(e,t){Te(e,function(r,n,s,i){s._w=s._w||{},t(r,s._w,s,i)})}function TS(e,t,r){t!=null&&Ce(bo,e)&&bo[e](t,r._a,r,e)}function ua(e){return e%4===0&&e%100!==0||e%400===0}var rt=0,er=1,Ft=2,He=3,Lt=4,tr=5,Wr=6,DS=7,PS=8;Q("Y",0,0,function(){var e=this.year();return e<=9999?Ut(e,4):"+"+e});Q(0,["YY",2],0,function(){return this.year()%100});Q(0,["YYYY",4],0,"year");Q(0,["YYYYY",5],0,"year");Q(0,["YYYYYY",6,!0],0,"year");H("Y",la);H("YY",$e,vt);H("YYYY",sl,nl);H("YYYYY",oa,ia);H("YYYYYY",oa,ia);Te(["YYYYY","YYYYYY"],rt);Te("YYYY",function(e,t){t[rt]=e.length===2?$.parseTwoDigitYear(e):be(e)});Te("YY",function(e,t){t[rt]=$.parseTwoDigitYear(e)});Te("Y",function(e,t){t[rt]=parseInt(e,10)});function rs(e){return ua(e)?366:365}$.parseTwoDigitYear=function(e){return be(e)+(be(e)>68?1900:2e3)};var Kh=$n("FullYear",!0);function AS(){return ua(this.year())}function $n(e,t){return function(r){return r!=null?(Jh(this,e,r),$.updateOffset(this,t),this):ps(this,e)}}function ps(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Jh(e,t,r){var n,s,i,a,o;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}i=r,a=e.month(),o=e.date(),o=o===29&&a===1&&!ua(i)?28:o,s?n.setUTCFullYear(i,a,o):n.setFullYear(i,a,o)}}function RS(e){return e=Ct(e),Bt(this[e])?this[e]():this}function IS(e,t){if(typeof e=="object"){e=rl(e);var r=OS(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=Ct(e),Bt(this[e]))return this[e](t);return this}function FS(e,t){return(e%t+t)%t}var Be;Array.prototype.indexOf?Be=Array.prototype.indexOf:Be=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function al(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=FS(t,12);return e+=(t-r)/12,r===1?ua(e)?29:28:31-r%7%2}Q("M",["MM",2],"Mo",function(){return this.month()+1});Q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Q("MMMM",0,0,function(e){return this.localeData().months(this,e)});H("M",$e,Fn);H("MM",$e,vt);H("MMM",function(e,t){return t.monthsShortRegex(e)});H("MMMM",function(e,t){return t.monthsRegex(e)});Te(["M","MM"],function(e,t){t[er]=be(e)-1});Te(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[er]=s:fe(r).invalidMonth=e});var $S="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Xh="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Qh=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,US=js,VS=js;function zS(e,t){return e?Mt(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Qh).test(t)?"format":"standalone"][e.month()]:Mt(this._months)?this._months:this._months.standalone}function BS(e,t){return e?Mt(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Qh.test(t)?"format":"standalone"][e.month()]:Mt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function WS(e,t,r){var n,s,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=zt([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?t==="MMM"?(s=Be.call(this._shortMonthsParse,a),s!==-1?s:null):(s=Be.call(this._longMonthsParse,a),s!==-1?s:null):t==="MMM"?(s=Be.call(this._shortMonthsParse,a),s!==-1?s:(s=Be.call(this._longMonthsParse,a),s!==-1?s:null)):(s=Be.call(this._longMonthsParse,a),s!==-1?s:(s=Be.call(this._shortMonthsParse,a),s!==-1?s:null))}function YS(e,t,r){var n,s,i;if(this._monthsParseExact)return WS.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=zt([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(i="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function ep(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=be(t);else if(t=e.localeData().monthsParse(t),!ir(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,al(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function tp(e){return e!=null?(ep(this,e),$.updateOffset(this,!0),this):ps(this,"Month")}function HS(){return al(this.year(),this.month())}function GS(e){return this._monthsParseExact?(Ce(this,"_monthsRegex")||rp.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Ce(this,"_monthsShortRegex")||(this._monthsShortRegex=US),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function qS(e){return this._monthsParseExact?(Ce(this,"_monthsRegex")||rp.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Ce(this,"_monthsRegex")||(this._monthsRegex=VS),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function rp(){function e(c,d){return d.length-c.length}var t=[],r=[],n=[],s,i,a,o;for(s=0;s<12;s++)i=zt([2e3,s]),a=rr(this.monthsShort(i,"")),o=rr(this.months(i,"")),t.push(a),r.push(o),n.push(o),n.push(a);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ZS(e,t,r,n,s,i,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,r,n,s,i,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,r,n,s,i,a),o}function gs(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Di(e,t,r){var n=7+t-r,s=(7+gs(e,0,n).getUTCDay()-t)%7;return-s+n-1}function np(e,t,r,n,s){var i=(7+r-n)%7,a=Di(e,n,s),o=1+7*(t-1)+i+a,c,d;return o<=0?(c=e-1,d=rs(c)+o):o>rs(e)?(c=e+1,d=o-rs(e)):(c=e,d=o),{year:c,dayOfYear:d}}function ms(e,t,r){var n=Di(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,i,a;return s<1?(a=e.year()-1,i=s+nr(a,t,r)):s>nr(e.year(),t,r)?(i=s-nr(e.year(),t,r),a=e.year()+1):(a=e.year(),i=s),{week:i,year:a}}function nr(e,t,r){var n=Di(e,t,r),s=Di(e+1,t,r);return(rs(e)-n+s)/7}Q("w",["ww",2],"wo","week");Q("W",["WW",2],"Wo","isoWeek");H("w",$e,Fn);H("ww",$e,vt);H("W",$e,Fn);H("WW",$e,vt);Ms(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=be(e)});function KS(e){return ms(e,this._week.dow,this._week.doy).week}var JS={dow:0,doy:6};function XS(){return this._week.dow}function QS(){return this._week.doy}function ek(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function tk(e){var t=ms(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Q("d",0,"do","day");Q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Q("e",0,0,"weekday");Q("E",0,0,"isoWeekday");H("d",$e);H("e",$e);H("E",$e);H("dd",function(e,t){return t.weekdaysMinRegex(e)});H("ddd",function(e,t){return t.weekdaysShortRegex(e)});H("dddd",function(e,t){return t.weekdaysRegex(e)});Ms(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:fe(r).invalidWeekday=e});Ms(["d","e","E"],function(e,t,r,n){t[n]=be(e)});function rk(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function nk(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ol(e,t){return e.slice(t,7).concat(e.slice(0,t))}var sk="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),sp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ik="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ak=js,ok=js,lk=js;function ck(e,t){var r=Mt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ol(r,this._week.dow):e?r[e.day()]:r}function uk(e){return e===!0?ol(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function dk(e){return e===!0?ol(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function fk(e,t,r){var n,s,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=zt([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(s=Be.call(this._weekdaysParse,a),s!==-1?s:null):t==="ddd"?(s=Be.call(this._shortWeekdaysParse,a),s!==-1?s:null):(s=Be.call(this._minWeekdaysParse,a),s!==-1?s:null):t==="dddd"?(s=Be.call(this._weekdaysParse,a),s!==-1||(s=Be.call(this._shortWeekdaysParse,a),s!==-1)?s:(s=Be.call(this._minWeekdaysParse,a),s!==-1?s:null)):t==="ddd"?(s=Be.call(this._shortWeekdaysParse,a),s!==-1||(s=Be.call(this._weekdaysParse,a),s!==-1)?s:(s=Be.call(this._minWeekdaysParse,a),s!==-1?s:null)):(s=Be.call(this._minWeekdaysParse,a),s!==-1||(s=Be.call(this._weekdaysParse,a),s!==-1)?s:(s=Be.call(this._shortWeekdaysParse,a),s!==-1?s:null))}function hk(e,t,r){var n,s,i;if(this._weekdaysParseExact)return fk.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=zt([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function pk(e){if(!this.isValid())return e!=null?this:NaN;var t=ps(this,"Day");return e!=null?(e=rk(e,this.localeData()),this.add(e-t,"d")):t}function gk(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function mk(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=nk(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function vk(e){return this._weekdaysParseExact?(Ce(this,"_weekdaysRegex")||ll.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Ce(this,"_weekdaysRegex")||(this._weekdaysRegex=ak),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function yk(e){return this._weekdaysParseExact?(Ce(this,"_weekdaysRegex")||ll.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ce(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ok),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function xk(e){return this._weekdaysParseExact?(Ce(this,"_weekdaysRegex")||ll.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ce(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=lk),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ll(){function e(f,h){return h.length-f.length}var t=[],r=[],n=[],s=[],i,a,o,c,d;for(i=0;i<7;i++)a=zt([2e3,1]).day(i),o=rr(this.weekdaysMin(a,"")),c=rr(this.weekdaysShort(a,"")),d=rr(this.weekdays(a,"")),t.push(o),r.push(c),n.push(d),s.push(o),s.push(c),s.push(d);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function cl(){return this.hours()%12||12}function bk(){return this.hours()||24}Q("H",["HH",2],0,"hour");Q("h",["hh",2],0,cl);Q("k",["kk",2],0,bk);Q("hmm",0,0,function(){return""+cl.apply(this)+Ut(this.minutes(),2)});Q("hmmss",0,0,function(){return""+cl.apply(this)+Ut(this.minutes(),2)+Ut(this.seconds(),2)});Q("Hmm",0,0,function(){return""+this.hours()+Ut(this.minutes(),2)});Q("Hmmss",0,0,function(){return""+this.hours()+Ut(this.minutes(),2)+Ut(this.seconds(),2)});function ip(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}ip("a",!0);ip("A",!1);function ap(e,t){return t._meridiemParse}H("a",ap);H("A",ap);H("H",$e,il);H("h",$e,Fn);H("k",$e,Fn);H("HH",$e,vt);H("hh",$e,vt);H("kk",$e,vt);H("hmm",qh);H("hmmss",Zh);H("Hmm",qh);H("Hmmss",Zh);Te(["H","HH"],He);Te(["k","kk"],function(e,t,r){var n=be(e);t[He]=n===24?0:n});Te(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});Te(["h","hh"],function(e,t,r){t[He]=be(e),fe(r).bigHour=!0});Te("hmm",function(e,t,r){var n=e.length-2;t[He]=be(e.substr(0,n)),t[Lt]=be(e.substr(n)),fe(r).bigHour=!0});Te("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[He]=be(e.substr(0,n)),t[Lt]=be(e.substr(n,2)),t[tr]=be(e.substr(s)),fe(r).bigHour=!0});Te("Hmm",function(e,t,r){var n=e.length-2;t[He]=be(e.substr(0,n)),t[Lt]=be(e.substr(n))});Te("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[He]=be(e.substr(0,n)),t[Lt]=be(e.substr(n,2)),t[tr]=be(e.substr(s))});function wk(e){return(e+"").toLowerCase().charAt(0)==="p"}var Ek=/[ap]\.?m?\.?/i,Sk=$n("Hours",!0);function kk(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var op={calendar:fS,longDateFormat:mS,invalidDate:yS,ordinal:bS,dayOfMonthOrdinalParse:wS,relativeTime:SS,months:$S,monthsShort:Xh,week:JS,weekdays:sk,weekdaysMin:ik,weekdaysShort:sp,meridiemParse:Ek},Ue={},qn={},vs;function _k(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function fd(e){return e&&e.toLowerCase().replace("_","-")}function Ck(e){for(var t=0,r,n,s,i;t<e.length;){for(i=fd(e[t]).split("-"),r=i.length,n=fd(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=da(i.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&_k(i,n)>=r-1)break;r--}t++}return vs}function Ok(e){return!!(e&&e.match("^[^/\\\\]*$"))}function da(e){var t=null,r;if(Ue[e]===void 0&&typeof module<"u"&&module&&module.exports&&Ok(e))try{t=vs._abbr,r=require,r("./locale/"+e),Er(t)}catch{Ue[e]=null}return Ue[e]}function Er(e,t){var r;return e&&(lt(t)?r=or(e):r=ul(e,t),r?vs=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),vs._abbr}function ul(e,t){if(t!==null){var r,n=op;if(t.abbr=e,Ue[e]!=null)Wh("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=Ue[e]._config;else if(t.parentLocale!=null)if(Ue[t.parentLocale]!=null)n=Ue[t.parentLocale]._config;else if(r=da(t.parentLocale),r!=null)n=r._config;else return qn[t.parentLocale]||(qn[t.parentLocale]=[]),qn[t.parentLocale].push({name:e,config:t}),null;return Ue[e]=new el(yo(n,t)),qn[e]&&qn[e].forEach(function(s){ul(s.name,s.config)}),Er(e),Ue[e]}else return delete Ue[e],null}function Lk(e,t){if(t!=null){var r,n,s=op;Ue[e]!=null&&Ue[e].parentLocale!=null?Ue[e].set(yo(Ue[e]._config,t)):(n=da(e),n!=null&&(s=n._config),t=yo(s,t),n==null&&(t.abbr=e),r=new el(t),r.parentLocale=Ue[e],Ue[e]=r),Er(e)}else Ue[e]!=null&&(Ue[e].parentLocale!=null?(Ue[e]=Ue[e].parentLocale,e===Er()&&Er(e)):Ue[e]!=null&&delete Ue[e]);return Ue[e]}function or(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return vs;if(!Mt(e)){if(t=da(e),t)return t;e=[e]}return Ck(e)}function jk(){return xo(Ue)}function dl(e){var t,r=e._a;return r&&fe(e).overflow===-2&&(t=r[er]<0||r[er]>11?er:r[Ft]<1||r[Ft]>al(r[rt],r[er])?Ft:r[He]<0||r[He]>24||r[He]===24&&(r[Lt]!==0||r[tr]!==0||r[Wr]!==0)?He:r[Lt]<0||r[Lt]>59?Lt:r[tr]<0||r[tr]>59?tr:r[Wr]<0||r[Wr]>999?Wr:-1,fe(e)._overflowDayOfYear&&(t<rt||t>Ft)&&(t=Ft),fe(e)._overflowWeeks&&t===-1&&(t=DS),fe(e)._overflowWeekday&&t===-1&&(t=PS),fe(e).overflow=t),e}var Mk=/^\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)?)?$/,Nk=/^\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)?)?$/,Tk=/Z|[+-]\d\d(?::?\d\d)?/,Ks=[["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]],Ba=[["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/]],Dk=/^\/?Date\((-?\d+)/i,Pk=/^(?:(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}))$/,Ak={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function lp(e){var t,r,n=e._i,s=Mk.exec(n)||Nk.exec(n),i,a,o,c,d=Ks.length,f=Ba.length;if(s){for(fe(e).iso=!0,t=0,r=d;t<r;t++)if(Ks[t][1].exec(s[1])){a=Ks[t][0],i=Ks[t][2]!==!1;break}if(a==null){e._isValid=!1;return}if(s[3]){for(t=0,r=f;t<r;t++)if(Ba[t][1].exec(s[3])){o=(s[2]||" ")+Ba[t][0];break}if(o==null){e._isValid=!1;return}}if(!i&&o!=null){e._isValid=!1;return}if(s[4])if(Tk.exec(s[4]))c="Z";else{e._isValid=!1;return}e._f=a+(o||"")+(c||""),hl(e)}else e._isValid=!1}function Rk(e,t,r,n,s,i){var a=[Ik(e),Xh.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return i&&a.push(parseInt(i,10)),a}function Ik(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Fk(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function $k(e,t,r){if(e){var n=sp.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return fe(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Uk(e,t,r){if(e)return Ak[e];if(t)return 0;var n=parseInt(r,10),s=n%100,i=(n-s)/100;return i*60+s}function cp(e){var t=Pk.exec(Fk(e._i)),r;if(t){if(r=Rk(t[4],t[3],t[2],t[5],t[6],t[7]),!$k(t[1],r,e))return;e._a=r,e._tzm=Uk(t[8],t[9],t[10]),e._d=gs.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),fe(e).rfc2822=!0}else e._isValid=!1}function Vk(e){var t=Dk.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(lp(e),e._isValid===!1)delete e._isValid;else return;if(cp(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:$.createFromInputFallback(e)}$.createFromInputFallback=_t("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(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function gn(e,t,r){return e??t??r}function zk(e){var t=new Date($.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function fl(e){var t,r,n=[],s,i,a;if(!e._d){for(s=zk(e),e._w&&e._a[Ft]==null&&e._a[er]==null&&Bk(e),e._dayOfYear!=null&&(a=gn(e._a[rt],s[rt]),(e._dayOfYear>rs(a)||e._dayOfYear===0)&&(fe(e)._overflowDayOfYear=!0),r=gs(a,0,e._dayOfYear),e._a[er]=r.getUTCMonth(),e._a[Ft]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[He]===24&&e._a[Lt]===0&&e._a[tr]===0&&e._a[Wr]===0&&(e._nextDay=!0,e._a[He]=0),e._d=(e._useUTC?gs:ZS).apply(null,n),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[He]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(fe(e).weekdayMismatch=!0)}}function Bk(e){var t,r,n,s,i,a,o,c,d;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,a=4,r=gn(t.GG,e._a[rt],ms(Fe(),1,4).year),n=gn(t.W,1),s=gn(t.E,1),(s<1||s>7)&&(c=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,d=ms(Fe(),i,a),r=gn(t.gg,e._a[rt],d.year),n=gn(t.w,d.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(c=!0)):s=i),n<1||n>nr(r,i,a)?fe(e)._overflowWeeks=!0:c!=null?fe(e)._overflowWeekday=!0:(o=np(r,n,s,i,a),e._a[rt]=o.year,e._dayOfYear=o.dayOfYear)}$.ISO_8601=function(){};$.RFC_2822=function(){};function hl(e){if(e._f===$.ISO_8601){lp(e);return}if(e._f===$.RFC_2822){cp(e);return}e._a=[],fe(e).empty=!0;var t=""+e._i,r,n,s,i,a,o=t.length,c=0,d,f;for(s=Yh(e._f,e._locale).match(tl)||[],f=s.length,r=0;r<f;r++)i=s[r],n=(t.match(MS(i,e))||[])[0],n&&(a=t.substr(0,t.indexOf(n)),a.length>0&&fe(e).unusedInput.push(a),t=t.slice(t.indexOf(n)+n.length),c+=n.length),bn[i]?(n?fe(e).empty=!1:fe(e).unusedTokens.push(i),TS(i,n,e)):e._strict&&!n&&fe(e).unusedTokens.push(i);fe(e).charsLeftOver=o-c,t.length>0&&fe(e).unusedInput.push(t),e._a[He]<=12&&fe(e).bigHour===!0&&e._a[He]>0&&(fe(e).bigHour=void 0),fe(e).parsedDateParts=e._a.slice(0),fe(e).meridiem=e._meridiem,e._a[He]=Wk(e._locale,e._a[He],e._meridiem),d=fe(e).era,d!==null&&(e._a[rt]=e._locale.erasConvertYear(d,e._a[rt])),fl(e),dl(e)}function Wk(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Yk(e){var t,r,n,s,i,a,o=!1,c=e._f.length;if(c===0){fe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<c;s++)i=0,a=!1,t=Qo({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],hl(t),Xo(t)&&(a=!0),i+=fe(t).charsLeftOver,i+=fe(t).unusedTokens.length*10,fe(t).score=i,o?i<n&&(n=i,r=t):(n==null||i<n||a)&&(n=i,r=t,a&&(o=!0));yr(e,r||t)}function Hk(e){if(!e._d){var t=rl(e._i),r=t.day===void 0?t.date:t.day;e._a=zh([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),fl(e)}}function Gk(e){var t=new Ls(dl(up(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function up(e){var t=e._i,r=e._f;return e._locale=e._locale||or(e._l),t===null||r===void 0&&t===""?sa({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Nt(t)?new Ls(dl(t)):(Os(t)?e._d=t:Mt(r)?Yk(e):r?hl(e):qk(e),Xo(e)||(e._d=null),e))}function qk(e){var t=e._i;lt(t)?e._d=new Date($.now()):Os(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Vk(e):Mt(t)?(e._a=zh(t.slice(0),function(r){return parseInt(r,10)}),fl(e)):Zr(t)?Hk(e):ir(t)?e._d=new Date(t):$.createFromInputFallback(e)}function dp(e,t,r,n,s){var i={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Zr(e)&&Jo(e)||Mt(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=s,i._l=r,i._i=e,i._f=t,i._strict=n,Gk(i)}function Fe(e,t,r,n){return dp(e,t,r,n,!1)}var Zk=_t("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Fe.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:sa()}),Kk=_t("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Fe.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:sa()});function fp(e,t){var r,n;if(t.length===1&&Mt(t[0])&&(t=t[0]),!t.length)return Fe();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Jk(){var e=[].slice.call(arguments,0);return fp("isBefore",e)}function Xk(){var e=[].slice.call(arguments,0);return fp("isAfter",e)}var Qk=function(){return Date.now?Date.now():+new Date},Zn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function e4(e){var t,r=!1,n,s=Zn.length;for(t in e)if(Ce(e,t)&&!(Be.call(Zn,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[Zn[n]]){if(r)return!1;parseFloat(e[Zn[n]])!==be(e[Zn[n]])&&(r=!0)}return!0}function t4(){return this._isValid}function r4(){return Dt(NaN)}function fa(e){var t=rl(e),r=t.year||0,n=t.quarter||0,s=t.month||0,i=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,c=t.minute||0,d=t.second||0,f=t.millisecond||0;this._isValid=e4(t),this._milliseconds=+f+d*1e3+c*6e4+o*1e3*60*60,this._days=+a+i*7,this._months=+s+n*3+r*12,this._data={},this._locale=or(),this._bubble()}function ai(e){return e instanceof fa}function wo(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function n4(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),i=0,a;for(a=0;a<n;a++)be(e[a])!==be(t[a])&&i++;return i+s}function hp(e,t){Q(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Ut(~~(r/60),2)+t+Ut(~~r%60,2)})}hp("Z",":");hp("ZZ","");H("Z",ca);H("ZZ",ca);Te(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=pl(ca,e)});var s4=/([\+\-]|\d\d)/gi;function pl(e,t){var r=(t||"").match(e),n,s,i;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(s4)||["-",0,0],i=+(s[1]*60)+be(s[2]),i===0?0:s[0]==="+"?i:-i)}function gl(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(Nt(e)||Os(e)?e.valueOf():Fe(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),$.updateOffset(r,!1),r):Fe(e).local()}function Eo(e){return-Math.round(e._d.getTimezoneOffset())}$.updateOffset=function(){};function i4(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=pl(ca,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=Eo(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?mp(this,Dt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,$.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Eo(this)}function a4(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function o4(e){return this.utcOffset(0,e)}function l4(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Eo(this),"m")),this}function c4(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=pl(LS,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function u4(e){return this.isValid()?(e=e?Fe(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function d4(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function f4(){if(!lt(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Qo(e,this),e=up(e),e._a?(t=e._isUTC?zt(e._a):Fe(e._a),this._isDSTShifted=this.isValid()&&n4(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function h4(){return this.isValid()?!this._isUTC:!1}function p4(){return this.isValid()?this._isUTC:!1}function pp(){return this.isValid()?this._isUTC&&this._offset===0:!1}var g4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,m4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Dt(e,t){var r=e,n=null,s,i,a;return ai(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ir(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=g4.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:be(n[Ft])*s,h:be(n[He])*s,m:be(n[Lt])*s,s:be(n[tr])*s,ms:be(wo(n[Wr]*1e3))*s}):(n=m4.exec(e))?(s=n[1]==="-"?-1:1,r={y:Fr(n[2],s),M:Fr(n[3],s),w:Fr(n[4],s),d:Fr(n[5],s),h:Fr(n[6],s),m:Fr(n[7],s),s:Fr(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(a=v4(Fe(r.from),Fe(r.to)),r={},r.ms=a.milliseconds,r.M=a.months),i=new fa(r),ai(e)&&Ce(e,"_locale")&&(i._locale=e._locale),ai(e)&&Ce(e,"_isValid")&&(i._isValid=e._isValid),i}Dt.fn=fa.prototype;Dt.invalid=r4;function Fr(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function hd(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function v4(e,t){var r;return e.isValid()&&t.isValid()?(t=gl(t,e),e.isBefore(t)?r=hd(e,t):(r=hd(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function gp(e,t){return function(r,n){var s,i;return n!==null&&!isNaN(+n)&&(Wh(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),s=Dt(r,n),mp(this,s,e),this}}function mp(e,t,r,n){var s=t._milliseconds,i=wo(t._days),a=wo(t._months);e.isValid()&&(n=n??!0,a&&ep(e,ps(e,"Month")+a*r),i&&Jh(e,"Date",ps(e,"Date")+i*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&$.updateOffset(e,i||a))}var y4=gp(1,"add"),x4=gp(-1,"subtract");function vp(e){return typeof e=="string"||e instanceof String}function b4(e){return Nt(e)||Os(e)||vp(e)||ir(e)||E4(e)||w4(e)||e===null||e===void 0}function w4(e){var t=Zr(e)&&!Jo(e),r=!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"],s,i,a=n.length;for(s=0;s<a;s+=1)i=n[s],r=r||Ce(e,i);return t&&r}function E4(e){var t=Mt(e),r=!1;return t&&(r=e.filter(function(n){return!ir(n)&&vp(e)}).length===0),t&&r}function S4(e){var t=Zr(e)&&!Jo(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,i;for(s=0;s<n.length;s+=1)i=n[s],r=r||Ce(e,i);return t&&r}function k4(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function _4(e,t){arguments.length===1&&(arguments[0]?b4(arguments[0])?(e=arguments[0],t=void 0):S4(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Fe(),n=gl(r,this).startOf("day"),s=$.calendarFormat(this,n)||"sameElse",i=t&&(Bt(t[s])?t[s].call(this,r):t[s]);return this.format(i||this.localeData().calendar(s,this,Fe(r)))}function C4(){return new Ls(this)}function O4(e,t){var r=Nt(e)?e:Fe(e);return this.isValid()&&r.isValid()?(t=Ct(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function L4(e,t){var r=Nt(e)?e:Fe(e);return this.isValid()&&r.isValid()?(t=Ct(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function j4(e,t,r,n){var s=Nt(e)?e:Fe(e),i=Nt(t)?t:Fe(t);return this.isValid()&&s.isValid()&&i.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(i,r):!this.isAfter(i,r))):!1}function M4(e,t){var r=Nt(e)?e:Fe(e),n;return this.isValid()&&r.isValid()?(t=Ct(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function N4(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function T4(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function D4(e,t,r){var n,s,i;if(!this.isValid())return NaN;if(n=gl(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=Ct(t),t){case"year":i=oi(this,n)/12;break;case"month":i=oi(this,n);break;case"quarter":i=oi(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-s)/864e5;break;case"week":i=(this-n-s)/6048e5;break;default:i=this-n}return r?i:Et(i)}function oi(e,t){if(e.date()<t.date())return-oi(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,i;return t-n<0?(s=e.clone().add(r-1,"months"),i=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),i=(t-n)/(s-n)),-(r+i)||0}$.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";$.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function P4(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function A4(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?ii(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Bt(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ii(r,"Z")):ii(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function R4(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(r+n+s+i)}function I4(e){e||(e=this.isUtc()?$.defaultFormatUtc:$.defaultFormat);var t=ii(this,e);return this.localeData().postformat(t)}function F4(e,t){return this.isValid()&&(Nt(e)&&e.isValid()||Fe(e).isValid())?Dt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function $4(e){return this.from(Fe(),e)}function U4(e,t){return this.isValid()&&(Nt(e)&&e.isValid()||Fe(e).isValid())?Dt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function V4(e){return this.to(Fe(),e)}function yp(e){var t;return e===void 0?this._locale._abbr:(t=or(e),t!=null&&(this._locale=t),this)}var xp=_t("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function bp(){return this._locale}var Pi=1e3,wn=60*Pi,Ai=60*wn,wp=(365*400+97)*24*Ai;function En(e,t){return(e%t+t)%t}function Ep(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-wp:new Date(e,t,r).valueOf()}function Sp(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-wp:Date.UTC(e,t,r)}function z4(e){var t,r;if(e=Ct(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Sp:Ep,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=En(t+(this._isUTC?0:this.utcOffset()*wn),Ai);break;case"minute":t=this._d.valueOf(),t-=En(t,wn);break;case"second":t=this._d.valueOf(),t-=En(t,Pi);break}return this._d.setTime(t),$.updateOffset(this,!0),this}function B4(e){var t,r;if(e=Ct(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Sp:Ep,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ai-En(t+(this._isUTC?0:this.utcOffset()*wn),Ai)-1;break;case"minute":t=this._d.valueOf(),t+=wn-En(t,wn)-1;break;case"second":t=this._d.valueOf(),t+=Pi-En(t,Pi)-1;break}return this._d.setTime(t),$.updateOffset(this,!0),this}function W4(){return this._d.valueOf()-(this._offset||0)*6e4}function Y4(){return Math.floor(this.valueOf()/1e3)}function H4(){return new Date(this.valueOf())}function G4(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function q4(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Z4(){return this.isValid()?this.toISOString():null}function K4(){return Xo(this)}function J4(){return yr({},fe(this))}function X4(){return fe(this).overflow}function Q4(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Q("N",0,0,"eraAbbr");Q("NN",0,0,"eraAbbr");Q("NNN",0,0,"eraAbbr");Q("NNNN",0,0,"eraName");Q("NNNNN",0,0,"eraNarrow");Q("y",["y",1],"yo","eraYear");Q("y",["yy",2],0,"eraYear");Q("y",["yyy",3],0,"eraYear");Q("y",["yyyy",4],0,"eraYear");H("N",ml);H("NN",ml);H("NNN",ml);H("NNNN",u_);H("NNNNN",d_);Te(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?fe(r).era=s:fe(r).invalidEra=e});H("y",In);H("yy",In);H("yyy",In);H("yyyy",In);H("yo",f_);Te(["y","yy","yyy","yyyy"],rt);Te(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[rt]=r._locale.eraYearOrdinalParse(e,s):t[rt]=parseInt(e,10)});function e_(e,t){var r,n,s,i=this._eras||or("en")._eras;for(r=0,n=i.length;r<n;++r){switch(typeof i[r].since){case"string":s=$(i[r].since).startOf("day"),i[r].since=s.valueOf();break}switch(typeof i[r].until){case"undefined":i[r].until=1/0;break;case"string":s=$(i[r].until).startOf("day").valueOf(),i[r].until=s.valueOf();break}}return i}function t_(e,t,r){var n,s,i=this.eras(),a,o,c;for(e=e.toUpperCase(),n=0,s=i.length;n<s;++n)if(a=i[n].name.toUpperCase(),o=i[n].abbr.toUpperCase(),c=i[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(o===e)return i[n];break;case"NNNN":if(a===e)return i[n];break;case"NNNNN":if(c===e)return i[n];break}else if([a,o,c].indexOf(e)>=0)return i[n]}function r_(e,t){var r=e.since<=e.until?1:-1;return t===void 0?$(e.since).year():$(e.since).year()+(t-e.offset)*r}function n_(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function s_(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function i_(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function a_(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-$(s[e].since).year())*r+s[e].offset;return this.year()}function o_(e){return Ce(this,"_erasNameRegex")||vl.call(this),e?this._erasNameRegex:this._erasRegex}function l_(e){return Ce(this,"_erasAbbrRegex")||vl.call(this),e?this._erasAbbrRegex:this._erasRegex}function c_(e){return Ce(this,"_erasNarrowRegex")||vl.call(this),e?this._erasNarrowRegex:this._erasRegex}function ml(e,t){return t.erasAbbrRegex(e)}function u_(e,t){return t.erasNameRegex(e)}function d_(e,t){return t.erasNarrowRegex(e)}function f_(e,t){return t._eraYearOrdinalRegex||In}function vl(){var e=[],t=[],r=[],n=[],s,i,a,o,c,d=this.eras();for(s=0,i=d.length;s<i;++s)a=rr(d[s].name),o=rr(d[s].abbr),c=rr(d[s].narrow),t.push(a),e.push(o),r.push(c),n.push(a),n.push(o),n.push(c);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Q(0,["gg",2],0,function(){return this.weekYear()%100});Q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ha(e,t){Q(0,[e,e.length],0,t)}ha("gggg","weekYear");ha("ggggg","weekYear");ha("GGGG","isoWeekYear");ha("GGGGG","isoWeekYear");H("G",la);H("g",la);H("GG",$e,vt);H("gg",$e,vt);H("GGGG",sl,nl);H("gggg",sl,nl);H("GGGGG",oa,ia);H("ggggg",oa,ia);Ms(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=be(e)});Ms(["gg","GG"],function(e,t,r,n){t[n]=$.parseTwoDigitYear(e)});function h_(e){return kp.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function p_(e){return kp.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function g_(){return nr(this.year(),1,4)}function m_(){return nr(this.isoWeekYear(),1,4)}function v_(){var e=this.localeData()._week;return nr(this.year(),e.dow,e.doy)}function y_(){var e=this.localeData()._week;return nr(this.weekYear(),e.dow,e.doy)}function kp(e,t,r,n,s){var i;return e==null?ms(this,n,s).year:(i=nr(e,n,s),t>i&&(t=i),x_.call(this,e,t,r,n,s))}function x_(e,t,r,n,s){var i=np(e,t,r,n,s),a=gs(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}Q("Q",0,"Qo","quarter");H("Q",Hh);Te("Q",function(e,t){t[er]=(be(e)-1)*3});function b_(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Q("D",["DD",2],"Do","date");H("D",$e,Fn);H("DD",$e,vt);H("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Te(["D","DD"],Ft);Te("Do",function(e,t){t[Ft]=be(e.match($e)[0])});var _p=$n("Date",!0);Q("DDD",["DDDD",3],"DDDo","dayOfYear");H("DDD",aa);H("DDDD",Gh);Te(["DDD","DDDD"],function(e,t,r){r._dayOfYear=be(e)});function w_(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Q("m",["mm",2],0,"minute");H("m",$e,il);H("mm",$e,vt);Te(["m","mm"],Lt);var E_=$n("Minutes",!1);Q("s",["ss",2],0,"second");H("s",$e,il);H("ss",$e,vt);Te(["s","ss"],tr);var S_=$n("Seconds",!1);Q("S",0,0,function(){return~~(this.millisecond()/100)});Q(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Q(0,["SSS",3],0,"millisecond");Q(0,["SSSS",4],0,function(){return this.millisecond()*10});Q(0,["SSSSS",5],0,function(){return this.millisecond()*100});Q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});H("S",aa,Hh);H("SS",aa,vt);H("SSS",aa,Gh);var xr,Cp;for(xr="SSSS";xr.length<=9;xr+="S")H(xr,In);function k_(e,t){t[Wr]=be(("0."+e)*1e3)}for(xr="S";xr.length<=9;xr+="S")Te(xr,k_);Cp=$n("Milliseconds",!1);Q("z",0,0,"zoneAbbr");Q("zz",0,0,"zoneName");function __(){return this._isUTC?"UTC":""}function C_(){return this._isUTC?"Coordinated Universal Time":""}var R=Ls.prototype;R.add=y4;R.calendar=_4;R.clone=C4;R.diff=D4;R.endOf=B4;R.format=I4;R.from=F4;R.fromNow=$4;R.to=U4;R.toNow=V4;R.get=RS;R.invalidAt=X4;R.isAfter=O4;R.isBefore=L4;R.isBetween=j4;R.isSame=M4;R.isSameOrAfter=N4;R.isSameOrBefore=T4;R.isValid=K4;R.lang=xp;R.locale=yp;R.localeData=bp;R.max=Kk;R.min=Zk;R.parsingFlags=J4;R.set=IS;R.startOf=z4;R.subtract=x4;R.toArray=G4;R.toObject=q4;R.toDate=H4;R.toISOString=A4;R.inspect=R4;typeof Symbol<"u"&&Symbol.for!=null&&(R[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});R.toJSON=Z4;R.toString=P4;R.unix=Y4;R.valueOf=W4;R.creationData=Q4;R.eraName=n_;R.eraNarrow=s_;R.eraAbbr=i_;R.eraYear=a_;R.year=Kh;R.isLeapYear=AS;R.weekYear=h_;R.isoWeekYear=p_;R.quarter=R.quarters=b_;R.month=tp;R.daysInMonth=HS;R.week=R.weeks=ek;R.isoWeek=R.isoWeeks=tk;R.weeksInYear=v_;R.weeksInWeekYear=y_;R.isoWeeksInYear=g_;R.isoWeeksInISOWeekYear=m_;R.date=_p;R.day=R.days=pk;R.weekday=gk;R.isoWeekday=mk;R.dayOfYear=w_;R.hour=R.hours=Sk;R.minute=R.minutes=E_;R.second=R.seconds=S_;R.millisecond=R.milliseconds=Cp;R.utcOffset=i4;R.utc=o4;R.local=l4;R.parseZone=c4;R.hasAlignedHourOffset=u4;R.isDST=d4;R.isLocal=h4;R.isUtcOffset=p4;R.isUtc=pp;R.isUTC=pp;R.zoneAbbr=__;R.zoneName=C_;R.dates=_t("dates accessor is deprecated. Use date instead.",_p);R.months=_t("months accessor is deprecated. Use month instead",tp);R.years=_t("years accessor is deprecated. Use year instead",Kh);R.zone=_t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",a4);R.isDSTShifted=_t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",f4);function O_(e){return Fe(e*1e3)}function L_(){return Fe.apply(null,arguments).parseZone()}function Op(e){return e}var Oe=el.prototype;Oe.calendar=hS;Oe.longDateFormat=vS;Oe.invalidDate=xS;Oe.ordinal=ES;Oe.preparse=Op;Oe.postformat=Op;Oe.relativeTime=kS;Oe.pastFuture=_S;Oe.set=dS;Oe.eras=e_;Oe.erasParse=t_;Oe.erasConvertYear=r_;Oe.erasAbbrRegex=l_;Oe.erasNameRegex=o_;Oe.erasNarrowRegex=c_;Oe.months=zS;Oe.monthsShort=BS;Oe.monthsParse=YS;Oe.monthsRegex=qS;Oe.monthsShortRegex=GS;Oe.week=KS;Oe.firstDayOfYear=QS;Oe.firstDayOfWeek=XS;Oe.weekdays=ck;Oe.weekdaysMin=dk;Oe.weekdaysShort=uk;Oe.weekdaysParse=hk;Oe.weekdaysRegex=vk;Oe.weekdaysShortRegex=yk;Oe.weekdaysMinRegex=xk;Oe.isPM=wk;Oe.meridiem=kk;function Ri(e,t,r,n){var s=or(),i=zt().set(n,t);return s[r](i,e)}function Lp(e,t,r){if(ir(e)&&(t=e,e=void 0),e=e||"",t!=null)return Ri(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Ri(e,n,r,"month");return s}function yl(e,t,r,n){typeof e=="boolean"?(ir(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,ir(t)&&(r=t,t=void 0),t=t||"");var s=or(),i=e?s._week.dow:0,a,o=[];if(r!=null)return Ri(t,(r+i)%7,n,"day");for(a=0;a<7;a++)o[a]=Ri(t,(a+i)%7,n,"day");return o}function j_(e,t){return Lp(e,t,"months")}function M_(e,t){return Lp(e,t,"monthsShort")}function N_(e,t,r){return yl(e,t,r,"weekdays")}function T_(e,t,r){return yl(e,t,r,"weekdaysShort")}function D_(e,t,r){return yl(e,t,r,"weekdaysMin")}Er("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(e){var t=e%10,r=be(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});$.lang=_t("moment.lang is deprecated. Use moment.locale instead.",Er);$.langData=_t("moment.langData is deprecated. Use moment.localeData instead.",or);var qt=Math.abs;function P_(){var e=this._data;return this._milliseconds=qt(this._milliseconds),this._days=qt(this._days),this._months=qt(this._months),e.milliseconds=qt(e.milliseconds),e.seconds=qt(e.seconds),e.minutes=qt(e.minutes),e.hours=qt(e.hours),e.months=qt(e.months),e.years=qt(e.years),this}function jp(e,t,r,n){var s=Dt(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function A_(e,t){return jp(this,e,t,1)}function R_(e,t){return jp(this,e,t,-1)}function pd(e){return e<0?Math.floor(e):Math.ceil(e)}function I_(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,i,a,o,c;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=pd(So(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Et(e/1e3),n.seconds=s%60,i=Et(s/60),n.minutes=i%60,a=Et(i/60),n.hours=a%24,t+=Et(a/24),c=Et(Mp(t)),r+=c,t-=pd(So(c)),o=Et(r/12),r%=12,n.days=t,n.months=r,n.years=o,this}function Mp(e){return e*4800/146097}function So(e){return e*146097/4800}function F_(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=Ct(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Mp(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(So(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function lr(e){return function(){return this.as(e)}}var Np=lr("ms"),$_=lr("s"),U_=lr("m"),V_=lr("h"),z_=lr("d"),B_=lr("w"),W_=lr("M"),Y_=lr("Q"),H_=lr("y"),G_=Np;function q_(){return Dt(this)}function Z_(e){return e=Ct(e),this.isValid()?this[e+"s"]():NaN}function sn(e){return function(){return this.isValid()?this._data[e]:NaN}}var K_=sn("milliseconds"),J_=sn("seconds"),X_=sn("minutes"),Q_=sn("hours"),eC=sn("days"),tC=sn("months"),rC=sn("years");function nC(){return Et(this.days()/7)}var Zt=Math.round,yn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function sC(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function iC(e,t,r,n){var s=Dt(e).abs(),i=Zt(s.as("s")),a=Zt(s.as("m")),o=Zt(s.as("h")),c=Zt(s.as("d")),d=Zt(s.as("M")),f=Zt(s.as("w")),h=Zt(s.as("y")),p=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||a<=1&&["m"]||a<r.m&&["mm",a]||o<=1&&["h"]||o<r.h&&["hh",o]||c<=1&&["d"]||c<r.d&&["dd",c];return r.w!=null&&(p=p||f<=1&&["w"]||f<r.w&&["ww",f]),p=p||d<=1&&["M"]||d<r.M&&["MM",d]||h<=1&&["y"]||["yy",h],p[2]=t,p[3]=+e>0,p[4]=n,sC.apply(null,p)}function aC(e){return e===void 0?Zt:typeof e=="function"?(Zt=e,!0):!1}function oC(e,t){return yn[e]===void 0?!1:t===void 0?yn[e]:(yn[e]=t,e==="s"&&(yn.ss=t-1),!0)}function lC(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=yn,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},yn,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),i=iC(this,!r,n,s),r&&(i=s.pastFuture(+this,i)),s.postformat(i)}var Wa=Math.abs;function pn(e){return(e>0)-(e<0)||+e}function pa(){if(!this.isValid())return this.localeData().invalidDate();var e=Wa(this._milliseconds)/1e3,t=Wa(this._days),r=Wa(this._months),n,s,i,a,o=this.asSeconds(),c,d,f,h;return o?(n=Et(e/60),s=Et(n/60),e%=60,n%=60,i=Et(r/12),r%=12,a=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=o<0?"-":"",d=pn(this._months)!==pn(o)?"-":"",f=pn(this._days)!==pn(o)?"-":"",h=pn(this._milliseconds)!==pn(o)?"-":"",c+"P"+(i?d+i+"Y":"")+(r?d+r+"M":"")+(t?f+t+"D":"")+(s||n||e?"T":"")+(s?h+s+"H":"")+(n?h+n+"M":"")+(e?h+a+"S":"")):"P0D"}var Se=fa.prototype;Se.isValid=t4;Se.abs=P_;Se.add=A_;Se.subtract=R_;Se.as=F_;Se.asMilliseconds=Np;Se.asSeconds=$_;Se.asMinutes=U_;Se.asHours=V_;Se.asDays=z_;Se.asWeeks=B_;Se.asMonths=W_;Se.asQuarters=Y_;Se.asYears=H_;Se.valueOf=G_;Se._bubble=I_;Se.clone=q_;Se.get=Z_;Se.milliseconds=K_;Se.seconds=J_;Se.minutes=X_;Se.hours=Q_;Se.days=eC;Se.weeks=nC;Se.months=tC;Se.years=rC;Se.humanize=lC;Se.toISOString=pa;Se.toString=pa;Se.toJSON=pa;Se.locale=yp;Se.localeData=bp;Se.toIsoString=_t("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",pa);Se.lang=xp;Q("X",0,0,"unix");Q("x",0,0,"valueOf");H("x",la);H("X",jS);Te("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});Te("x",function(e,t,r){r._d=new Date(be(e))});//! moment.js
|
|
113
|
-
$.version="2.30.1";cS(Fe);$.fn=R;$.min=Jk;$.max=Xk;$.now=Qk;$.utc=zt;$.unix=O_;$.months=j_;$.isDate=Os;$.locale=Er;$.invalid=sa;$.duration=Dt;$.isMoment=Nt;$.weekdays=N_;$.parseZone=L_;$.localeData=or;$.isDuration=ai;$.monthsShort=M_;$.weekdaysMin=D_;$.defineLocale=ul;$.updateLocale=Lk;$.locales=jk;$.weekdaysShort=T_;$.normalizeUnits=Ct;$.relativeTimeRounding=aC;$.relativeTimeThreshold=oC;$.calendarFormat=k4;$.prototype=R;$.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"};var Xt=(e=>(e[e.STANDARD=60]="STANDARD",e[e.DOCUMENT=61]="DOCUMENT",e[e.INTERNATIONAL_DOCUMENT=62]="INTERNATIONAL_DOCUMENT",e[e.INTERNATIONAL_STANDARD=63]="INTERNATIONAL_STANDARD",e[e.ECONOMIC=64]="ECONOMIC",e[e.SAVER=70]="SAVER",e[e.NATIONAL_LOCKER=81]="NATIONAL_LOCKER",e[e.INTERNAL_MAIL=99]="INTERNAL_MAIL",e))(Xt||{}),Tp=(e=>(e[e.ANULLED=6]="ANULLED",e[e.PAID=10]="PAID",e[e.PENDING=11]="PENDING",e[e.PARTIAL_PAID=20]="PARTIAL_PAID",e[e.TO_ISSUE=59]="TO_ISSUE",e[e.ISSUED=60]="ISSUED",e))(Tp||{}),ns=(e=>(e[e.INVOICE=2]="INVOICE",e[e.CREDIT_NOTE=4]="CREDIT_NOTE",e[e.ORDER=6]="ORDER",e))(ns||{}),xl=(e=>(e[e.CASH=1]="CASH",e[e.COD=2]="COD",e[e.CREDIT=3]="CREDIT",e[e.BOXOFFICE_CREDIT=4]="BOXOFFICE_CREDIT",e[e.DEST_BOXOFFICE_CREDIT=5]="DEST_BOXOFFICE_CREDIT",e[e.EXEMPT=6]="EXEMPT",e))(xl||{}),Dp=(e=>(e[e.INTERNATIONAL=1]="INTERNATIONAL",e[e.NATIONAL=2]="NATIONAL",e))(Dp||{}),Ge=(e=>(e[e.OFFICE=10]="OFFICE",e[e.HOME=20]="HOME",e[e.INTERNATIONAL=21]="INTERNATIONAL",e))(Ge||{}),br=(e=>(e[e.PERSON=0]="PERSON",e[e.BOX_ACCOUNT=1]="BOX_ACCOUNT",e))(br||{});const Pp={shipper:null,consigneeType:{id:"0",value:0,label:"Persona"},consignee:null,boxAccount:null,pickupType:{id:Ge.OFFICE.toString(),value:{deliveryTypeID:Ge.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},originStore:null,originAddress:null,deliveryType:{id:Ge.OFFICE.toString(),value:{deliveryTypeID:Ge.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},destinationStore:null,destinationAddress:null};var zr=(e=>(e[e.ACTIVE=1]="ACTIVE",e[e.ANNULLED=3]="ANNULLED",e[e.DRAFT=5]="DRAFT",e[e.REPLACED=55]="REPLACED",e[e.DELIVERED=30]="DELIVERED",e))(zr||{});const Ap=({invoice:e,onClick:t})=>{const r=u.useMemo(()=>{switch(e.type){case ns.INVOICE:return"Factura:";case ns.CREDIT_NOTE:return"Nota de Crédito:";case ns.ORDER:return"Orden:"}},[e.type]);return l.jsxs("div",{className:"border cursor-pointer border-gray-300 dark:border-gray-700 rounded-lg p-4 hover:shadow-md transition-all text-gray-800 dark:text-gray-200 bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 duration-100",onClick:t,children:[l.jsxs("div",{className:"flex items-center justify-between mb-3 gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(xv,{className:"w-4 h-4 text-indigo-600 dark:text-indigo-400"}),l.jsxs("span",{className:"font-semibold text-sm text-card-foreground dark:text-gray-200",children:[r," ",l.jsx("span",{className:"text-gray-900 dark:text-gray-100 font-bold",children:e.invoiceNumber})]})]}),l.jsx(Sn,{color:"primary",children:e.statusName})]}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[l.jsxs("div",{className:"col-span-3 md:col-span-2",children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(of,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Cliente"})]}),l.jsx("p",{className:"text-sm font-bold text-card-foreground dark:text-gray-100",children:e.accountFullName}),l.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground mt-0.5 text-gray-600 dark:text-gray-400",children:[l.jsx(af,{className:"w-3 h-3"}),l.jsx("span",{className:"text-xs",children:$(e.invoiceDate).format("DD/MM/YYYY, hh:mm A")})]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(JE,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Total"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Con IVA"})]}),e.balanceAmount>=0&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(Ln,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Por Cobrar"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(e.balanceAmount,0).toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Saldo pendiente"})]}),e.balanceAmount<0&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(Ln,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Reintegrar"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(-e.balanceAmount,0).toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Monto a devolver"})]})]})]})};function cC(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M19 12v7a1.78 1.78 0 0 1 -3.1 1.4a1.65 1.65 0 0 0 -2.6 0a1.65 1.65 0 0 1 -2.6 0a1.65 1.65 0 0 0 -2.6 0a1.78 1.78 0 0 1 -3.1 -1.4v-14a2 2 0 0 1 2 -2h7l5 5v4.25"},child:[]}]})(e)}function uC(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.916 11.707a3 3 0 1 0 -2.916 2.293"},child:[]},{tag:"path",attr:{d:"M11.991 21.485a1.994 1.994 0 0 1 -1.404 -.585l-4.244 -4.243a8 8 0 1 1 13.651 -5.351"},child:[]},{tag:"path",attr:{d:"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M20.2 20.2l1.8 1.8"},child:[]}]})(e)}function dC(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M10 20h-6"},child:[]},{tag:"path",attr:{d:"M14 20h6"},child:[]},{tag:"path",attr:{d:"M12 15l-2 -2h-3a1 1 0 0 1 -1 -1v-8a1 1 0 0 1 1 -1h10a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-3l-2 2z"},child:[]},{tag:"path",attr:{d:"M12 6v2"},child:[]},{tag:"path",attr:{d:"M12 11v.01"},child:[]}]})(e)}const Rp=({invoices:e,onInvoiceClick:t,wrapperClassName:r})=>l.jsx("div",{className:I("w-full mx-auto",r),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(cC,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Facturas"})]})}),l.jsx("div",{className:"p-2 md:p-4 space-y-4",children:e.map(n=>l.jsx(Ap,{invoice:n,onClick:()=>t?.(n)},n.invoiceID))})]})}),fC={category:null,weight:null,height:null,width:null,length:null,quantity:1},hC=({serviceId:e,categoryTypeId:t,formik:r,warningSchema:n})=>{const{values:s,touched:i,errors:a,handleChange:o,handleBlur:c,handleSubmit:d,setFieldValue:f}=r,h=u.useContext(Pn),[p,m]=u.useState(null),[g,x]=u.useState(null),[y,b]=u.useState([]),[E,k]=u.useState(""),[S,v]=u.useState({}),w=u.useMemo(()=>a,[a]);return u.useEffect(()=>{(async()=>{const M=await ph(h.api,t);M.error||!M.data||(b(M.data.map(O=>({id:O.categoryId.toString(),label:O.categoryName,value:O}))),x(M.data.find(O=>ux.includes(O.categoryId))??null),m(M.data.find(O=>cx.includes(O.categoryId))??null))})()},[t,h.api]),u.useEffect(()=>{p&&(e===Xt.DOCUMENT||e===Xt.INTERNATIONAL_DOCUMENT)?(k(p.categoryName),f("category",{id:p.categoryId.toString(),label:p.categoryName,value:p}),f("height",ja.HEIGHT),f("width",ja.WIDTH),f("length",ja.LENGTH)):(k(""),f("category",null),f("height",""),f("width",""),f("length",""))},[e,p,f]),u.useEffect(()=>{(async(M,O)=>{try{return await M.validate(O,{abortEarly:!1}),{}}catch(D){if(D instanceof Qe){const P={};return D.inner.forEach(U=>{U.path&&(P[U.path]=U.message)}),P}return{}}})(n,s).then(M=>{v(M)})},[s,n]),l.jsx("div",{className:"w-full max-w-2xl",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(St,{label:"Categoría",id:"category",name:"category",placeholder:"Seleccione una categoría",options:y,selected:s.category,searchText:E,disabled:e===Xt.DOCUMENT,error:i.category&&a.category,onSelectOption:_=>f("category",_),onBlur:c,setSearchText:k,footerOption:g?{label:g.categoryName,id:g.categoryId.toString(),value:g}:void 0})}),l.jsxs("div",{className:I("space-y-2",{hidden:e===Xt.DOCUMENT}),children:[l.jsx("h4",{className:"text-gray-700 dark:text-white",children:"Dimensiones en cm."}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(et,{label:"Altura",id:"height",name:"height",type:"number",step:"0.01",placeholder:"0.00",value:s.height??"",onChange:o,onBlur:c,error:i.height&&a.height})}),l.jsx("div",{className:"space-y-2",children:l.jsx(et,{label:"Ancho",id:"width",name:"width",type:"number",step:"0.01",placeholder:"0.00",value:s.width??"",onChange:o,onBlur:c,error:i.width&&a.width})}),l.jsx("div",{className:"space-y-2",children:l.jsx(et,{label:"Largo",id:"length",name:"length",type:"number",step:"0.01",placeholder:"0.00",value:s.length??"",onChange:o,onBlur:c,error:i.length&&a.length})})]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(et,{label:"Peso (kg)",id:"weight",name:"weight",type:"number",step:"0.01",placeholder:"0.00",value:s.weight??"",onChange:o,onBlur:c,error:i.weight&&a.weight})}),l.jsx("div",{className:"space-y-2",children:l.jsx(Df,{label:"Cantidad",id:"quantity",name:"quantity",min:"1",value:s.quantity,disabled:e===Xt.DOCUMENT,onChange:o,onBlur:c,error:i.quantity&&a.quantity})})]}),l.jsxs("div",{className:"flex flex-col gap-2",children:[S.totalWeightWarn&&l.jsx(nf,{description:S.totalWeightWarn}),w.totalWeightError&&l.jsx(Jn,{description:w.totalWeightError}),w.minVolumeError&&l.jsx(Jn,{description:w.minVolumeError}),w.maxVolumeError&&l.jsx(Jn,{description:w.maxVolumeError}),w.densityError&&l.jsx(Jn,{description:w.densityError})]}),l.jsx(mt,{type:"submit",className:"w-full",onClick:()=>d(),children:"+ Agregar"})]})})},pC=({serviceId:e,categoryTypeId:t,totalWeight:r,validationConfig:n,onSubmit:s})=>{const i=u.useMemo(()=>{const{minWeight:o=0,minVolume:c,maxVolume:d,minDensity:f,maxDensity:h,maxDocumentWeight:p=1/0,maxTotalWeight:m=1/0}=n??{};let{maxWeight:g=1/0}=n??{};return(e===Xt.DOCUMENT||e===Xt.INTERNATIONAL_DOCUMENT)&&(g=p),kr({category:Sr().nullable().required("La categoría es requerida"),weight:Ot().typeError("Debe ser un número").required("El peso es requerido").test({name:"min-weight",exclusive:!1,test:x=>x==null||x>=o,message:`El peso mínimo es ${o.toFixed(2)}kg`}).test({name:"max-weight",exclusive:!1,test:x=>x==null||x<=g,message:`El peso máximo es ${g.toFixed(2)}kg`}),height:Ot().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("La altura es requerida"),width:Ot().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El ancho es requerido"),length:Ot().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El largo es requerido"),quantity:Ot().typeError("Debe ser un número").integer("Debe ser un número entero").min(1,"Debe ser al menos 1").required("La cantidad es requerida")}).test({name:"total-weight-check-global",test:function(x){const{weight:y,quantity:b}=x;if(y===null||r===void 0)return!0;const E=y*b,k=r+E;return m!==void 0&&k>m?this.createError({path:"totalWeightError",message:`El peso total (${k.toFixed(2)}kg) excede el máximo (${m.toFixed(2)}kg)`}):!0}}).test({name:"volume-check",test:function(x){const{height:y,width:b,length:E}=x;if(y===null||b===null||E===null)return!0;const k=y*b*E;return c!==void 0&&k<c?this.createError({path:"minVolumeError",message:`El volumen (${k.toFixed(2)}cm³) es menor al mínimo (${c.toFixed(2)}cm³)`}):d!==void 0&&k>d?this.createError({path:"maxVolumeError",message:`El volumen (${k.toFixed(2)}cm³) es mayor al máximo (${d.toFixed(2)}cm³)`}):!0}}).test({name:"density-check",test:function(x){const{height:y,width:b,length:E,weight:k}=x;if(y===null||b===null||E===null||k===null)return!0;const S=y*b*E;if(S===0)return!0;const v=k/S;return f!==void 0&&v<f||h!==void 0&&v>h?this.createError({path:"densityError",message:"Las medidas son inválidas, por favor revíselas y corríjalas"}):!0}})},[n,r,e]),a=u.useMemo(()=>{const{maxTotalWeightWarn:o=1/0}=n??{};return kr({category:Sr().nullable().required(),weight:Ot().required(),height:Ot().required(),width:Ot().required(),length:Ot().required(),quantity:Ot().required()}).test({name:"total-weight-check-global-warn",test:function(c){const{weight:d,quantity:f}=c;if(!d||!f||r===void 0)return!0;const h=d*f,p=r+h;return o!==void 0&&p>o?this.createError({path:"totalWeightWarn",message:`El peso total (${p.toFixed(2)}kg) excede el recomendado (${o.toFixed(2)}kg)`}):!0}})},[n,r]);return l.jsx(ks,{initialValues:fC,validationSchema:i,onSubmit:s,children:o=>l.jsx(hC,{serviceId:e,categoryTypeId:t,formik:o,warningSchema:a})})},Ip=({parcel:e,index:t,checked:r,editable:n,editing:s,disabledActions:i,onChangeChecked:a,onPrintParcel:o,onDuplicate:c,onEdit:d})=>l.jsxs("tr",{className:I("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",s&&"border-2 border-indigo-600 dark:border-indigo-400",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsxs("td",{className:"text-muted-foreground px-3 sm:px-4 font-bold",children:[n&&l.jsx(Fi,{label:"",id:`parcel-${e.pieceNumber}-checkbox`,checked:r,disabled:i,onChangeChecked:a}),!n&&e.pieceNumber]}),l.jsxs("td",{className:"sm:hidden px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[l.jsxs("p",{children:[e.weight.toFixed(2)," kg"]}),l.jsxs("p",{children:[e.length,"x",e.width,"x",e.height," cm"]}),l.jsx("p",{className:"font-normal",children:e.contentDescription})]}),l.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.weight.toFixed(2)," kg"]}),l.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.length,"x",e.width,"x",e.height," cm"]}),l.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.contentDescription}),l.jsxs("td",{className:"text-right px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[n&&!i&&l.jsxs("div",{className:"flex gap-2 items-cetner justify-end",children:[l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:c,children:l.jsx(eS,{className:"h-4 w-4"})}),l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:d,children:l.jsx(Uh,{className:"h-4 w-4"})})]}),!n&&!i&&l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-8 w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Imprimir",onClick:o,children:l.jsx(sS,{className:"h-4 w-4"})}),s&&l.jsx("span",{className:"italic",children:"Editando"})]})]}),Fp=({parcels:e,totalPhysicalWeight:t,totalDimensionalWeight:r,totalChargedWeight:n,totalVolume:s,dimensionalFactor:i,editingParcel:a,editable:o,onPrintParcel:c,onDelete:d,onDuplicate:f,onSelectEdit:h,onCancelEdit:p,onPrintShipment:m,wrapperClassName:g})=>{const[x,y]=u.useState([]),b=u.useMemo(()=>x.every(S=>S),[x]),E=(S,v)=>{y(w=>[...w.slice(0,v),S,...w.slice(v+1)])},k=()=>{y(b?Array.from({length:e.length},()=>!1):Array.from({length:e.length},()=>!0))};return u.useEffect(()=>{y(Array.from({length:e.length},()=>!1))},[e.length,a]),l.jsx("div",{className:I("w-full mx-auto",g),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Ln,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Piezas"})]})}),l.jsxs("div",{className:"p-4",children:[l.jsxs(Ui,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsxs("th",{className:"w-16 font-bold text-xs uppercase tracking-wider text-left px-3 sm:px-4 py-2",children:[o&&l.jsx(Fi,{label:"",id:"parcel-table-all-checked-checkbox",checked:b,disabled:!!a,onChangeChecked:k}),!o&&"#"]}),l.jsx("th",{className:"sm:hidden text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(iv,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Pieza"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(lS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Peso"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(iS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Dimensiones"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Pd,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Categoría"})]})}),l.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:l.jsxs("div",{className:"flex items-center w-full justify-end gap-2",children:[l.jsx(rS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{className:"hidden sm:inline-block",children:"Acciones"})]})})]})}),l.jsx("tbody",{children:e.map((S,v)=>l.jsx(Ip,{parcel:S,index:v,editing:a?.pieceNumber===S.pieceNumber,checked:x[v],disabledActions:!!a,onChangeChecked:w=>E(w,v),onPrintParcel:()=>c?.(S),onDuplicate:()=>f?.(S),onEdit:()=>h?.(S),editable:o},S.pieceNumber))})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between text-xs mt-4",children:[l.jsxs("div",{className:"flex flex-col sm:block w-full sm:w-fit justify-center items-center",children:[!o&&m&&l.jsxs(mt,{className:"w-full md:w-36",onClick:m,children:[l.jsx(hv,{className:"w-4 h-4 inline mr-2"}),"Imprimir Guía"]}),o&&!a&&l.jsxs(as,{className:"!w-full my-2 sm:my-0",disabled:x.every(S=>!S),onClick:()=>d?.(e.filter((S,v)=>x[v])),children:[l.jsx(G0,{className:"mr-2 w-4 h-4"}),"Eliminar"]}),!!a&&l.jsxs(as,{onClick:p,children:[l.jsx(Rd,{className:"mr-2 w-5 h-5"}),"Cancelar Edición"]})]}),l.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground font-semibold",children:"Peso por facturar"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:[n.toFixed(2)," kg"]})]}),l.jsx(kn,{}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Peso físico"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[t.toFixed(2)," kg"]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Peso volumétrico"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[r.toFixed(2)," kg"]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Volumen"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[s.toFixed(2)," cm",l.jsx("sup",{children:"3"})]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Factor volumétrico"}),l.jsx("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:i.toFixed(2)})]})]})]})]})]})})},ko=({isShipper:e=!1,account:t,store:r,deliveryType:n,isAccountBillTo:s,address:i})=>{const a=u.useMemo(()=>n===Ge.HOME&&e?"Recolecta":n===Ge.HOME&&!e?"A Domicilio":"En Tienda",[e,n]);return l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/10 dark:bg-indigo-900 p-2",children:l.jsx(of,{className:"h-5 w-5 text-indigo-600 dark:text-indigo-300"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e?"Remitente":"Destinatario"}),s&&l.jsx(Sn,{color:"primary",children:"Cuenta a facturar"})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("div",{children:l.jsx("p",{className:"text-lg font-bold text-div-foreground text-gray-900 dark:text-gray-200",children:t.fullName})}),l.jsx(kn,{className:"my-2"}),l.jsxs("div",{className:"space-y-1.5 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(XE,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsxs("span",{className:"font-mono",children:[t.taxIdentificationType,"-",t.identificationNumber]})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(Xg,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:t.email})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(nS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:t.phone})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(Ad,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:a})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(aS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsxs("span",{children:[r.code," - ",r.commercialName]})]}),i&&n===Ge.HOME&&l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(tS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:i.addressLine1})]})]})]})]})},$p=({shipment:e,wrapperClassName:t})=>{const r=u.useMemo(()=>{const n={lat:e.originAddress.latitude,lng:e.originAddress.longitude,name:`Origen (${e.pickupType.deliveryTypeID===Ge.OFFICE?"En Tienda":"Recolecta"})`},s={lat:e.destinationAddress.latitude,lng:e.destinationAddress.longitude,name:`Destino (${e.deliveryType.deliveryTypeID===Ge.OFFICE?"En Tienda":"A Domicilio"})`};return[n,s]},[e]);return l.jsx("div",{className:I("w-full mx-auto",t),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg w-full h-full flex flex-col",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Qd,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Ruta"})]})}),l.jsxs("div",{className:"flex flex-col p-4 w-full h-full flex-1 gap-2",children:[l.jsx("div",{className:"w-full h-full",children:l.jsx(tf,{coordinates:r})}),l.jsxs("p",{className:"text-xs text-gray-800 dark:text-gray-300",children:["Ubicación actual:"," ",l.jsxs("span",{className:"font-semibold",children:[e.lastKnowStoreLocation.code," -"," ",e.lastKnowStoreLocation.commercialName]})]}),l.jsx("div",{className:"flex items-center justify-center w-full text-center",children:l.jsx(Ye,{children:"Agregar recargo por entrega a domicilio"})})]})]})})},Up=[{id:Ge.OFFICE.toString(),label:"Tienda",value:{deliveryTypeID:Ge.OFFICE,deliveryTypeName:"Tienda"}},{id:Ge.HOME.toString(),label:"A Domicilio",value:{deliveryTypeID:Ge.HOME,deliveryTypeName:"A Domicilio"}}],gC=[...Up,{id:Ge.INTERNATIONAL.toString(),label:"Internacional",value:{deliveryTypeID:Ge.INTERNATIONAL,deliveryTypeName:"Internacional"}}],Vp=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,{store:a}=u.useContext(Fo),o=d=>{i("pickupType",d),d.value.deliveryTypeID===Ge.OFFICE?(i("originStore",a),i("originAddress",a?.address??null)):(i("originStore",null),i("originAddress",null))},c=d=>{i("deliveryType",d),i("destinationStore",null),i("destinationAddress",null)};return l.jsx("div",{className:"w-full mx-auto",children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(uC,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Direcciones"})]})}),l.jsxs("div",{className:"flex flex-col w-full gap-4 p-4",children:[l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Origen ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(Si,{id:"pickupType",name:"pickupType",label:"",options:Up,selected:t.pickupType,onSelectOption:o,onBlur:s,wrapperClassName:"flex-row"})})]}),l.jsx("div",{className:"w-full",children:t.pickupType?.value.deliveryTypeID===Ge.OFFICE&&l.jsx(St,{disabled:!0,label:"",id:"originStore",name:"originStore",placeholder:"Seleccione una tienda",options:[],selected:t.originStore,searchText:t.originStore?.value.commercialName,error:r.originStore&&n.originStore,onSelectOption:()=>{},onBlur:s})})]}),l.jsx("div",{className:"flex-1",children:l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Destino ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(Si,{id:"deliveryType",name:"deliveryType",label:"",options:gC,selected:t.deliveryType,onSelectOption:c,onBlur:s,wrapperClassName:"flex-row"})})]})})]})]})})},zp=({user:e,date:t,observation:r,wrapperClassName:n})=>l.jsxs("div",{className:I("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",n),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:l.jsx(Qg,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Entrega"})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Usuario: "}),l.jsx("span",{className:"text-sm text-muted-foreground",children:e})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Fecha: "}),l.jsx("span",{className:"text-sm text-muted-foreground",children:$(t).format("DD/MM/YYYY, hh:mm A")})]}),l.jsxs("div",{children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Observaciones:"," "]}),l.jsx("span",{className:"text-sm text-muted-foreground",children:r||"—"})]})]})]}),mC=e=>{switch(e){case zr.ACTIVE:return"primary";case zr.ANNULLED:return"danger";case zr.DELIVERED:return"success";case zr.DRAFT:return"warning";case zr.REPLACED:default:return"default"}},Bp=({shipment:e,onSubstituteForClick:t,onSubstitutedByClick:r})=>l.jsx("div",{className:"bg-gradient-subtle",children:l.jsxs("div",{className:"mx-auto max-w-6xl",children:[l.jsx("div",{className:"mb-6 overflow-hidden border-none shadow-lg",children:l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:l.jsxs("div",{className:"flex relative items-start justify-between",children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:l.jsx(Ln,{className:"h-8 w-8"})}),l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),l.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.shipmentNumber}),l.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",$(e.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]}),l.jsxs("p",{className:I("text-sm",!e.substituteFor&&"hidden"),children:["Sustituto de:"," ",l.jsx(Ye,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:t,children:e.substituteFor})]}),l.jsxs("p",{className:I("text-sm",!e.substitutedBy&&"hidden"),children:["Sustituido por:"," ",l.jsx(Ye,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:r,children:e.substitutedBy})]})]})]}),l.jsx(Sn,{color:mC(e.status.id),className:"!text-base absolute top-0 right-0",children:e.status.name})]})})}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[l.jsx("div",{className:"lg:col-span-2",children:l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:l.jsx(ko,{isShipper:!0,account:e.shipper,store:e.originStore,deliveryType:e.pickupType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.shipper.id,address:e.originAddress})}),l.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:l.jsx(ko,{account:e.consignee,store:e.destinationStore,deliveryType:e.deliveryType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.consignee.id,address:e.destinationAddress})})]})}),l.jsx("div",{className:"lg:col-span-1",children:l.jsxs("div",{className:"sticky top-8 border-none shadow-lg bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-400 rounded-b-lg",children:[l.jsx("div",{className:"bg-indigo-600 text-gray-100 dark:bg-indigo-700 p-4",children:l.jsxs("h2",{className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx(Ln,{className:"h-5 w-5"}),"Resumen"]})}),l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"gap-2 mb-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Servicio"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.service.serviceShortName})]}),l.jsxs("div",{className:"gap-2 mb-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Modalidad de Pago"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.paymentMode.paymentModeName})]}),e.paymentMode.paymentModeID===xl.CREDIT&&l.jsxs("div",{className:"gap-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Crédito de"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.billTo.fullName})]}),l.jsx(kn,{className:"my-4"}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Con impuestos"}),l.jsxs("span",{className:"text-lg font-bold text-indigo-600 dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Nº de piezas"}),l.jsx("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.totalPieces})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Peso por facturar"}),l.jsxs("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:[e.totalChargedWeight.toFixed(2)," Kg"]})]})]})]})]})})]})]})}),Wp=({item:e,index:t})=>l.jsxs("tr",{className:I("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:[l.jsx("p",{children:e.itemDescription}),l.jsx("p",{className:"sm:hidden font-normal",children:e.itemDetails})]}),l.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.itemDetails}),l.jsxs("td",{className:"px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold text-right text-sm",children:[e.subTotalAmount<0&&"-","$",Math.abs(e.subTotalAmount).toFixed(2)]})]}),Yp=({items:e,subTotalAmount:t,vatAmount:r,postalTaxAmount:n,totalAmount:s,wrapperClassName:i})=>l.jsx("div",{className:I("w-full mx-auto",i),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(uv,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Items"})]})}),l.jsxs("div",{className:"p-4",children:[l.jsxs(Ui,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Pd,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Servicio"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(cv,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Detalles"})]})}),l.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(QE,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Costo"})]})})]})}),l.jsx("tbody",{children:e.map((a,o)=>l.jsx(Wp,{item:a,index:o},a.itemID))})]}),l.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-end text-sm mt-4",children:l.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground font-semibold uppercase",children:"Subtotal"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",t.toFixed(2)]})]}),l.jsx(kn,{}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground",children:"IVA (16%)"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",r.toFixed(2)]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground",children:"Franqueo Postal"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",n.toFixed(2)]})]}),l.jsx(kn,{}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"font-bold text-muted-foreground uppercase",children:"Total"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",s.toFixed(2)]})]})]})})]})]})}),Hp=({tracking:e,index:t})=>l.jsxs("tr",{className:I("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsx("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:$(e.date).format("DD/MM/YYYY, hh:mm A")}),l.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[l.jsx("p",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:e.description}),l.jsx("p",{className:"font-normal",children:e.details})]})]}),Gp=({trackings:e,onPublicAppClick:t,wrapperClassName:r})=>l.jsx("div",{className:I("w-full mx-auto",r),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Ad,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Tracking"})]})}),l.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[l.jsx("p",{className:I(!t&&"hidden"),children:l.jsx(Ye,{onClick:t,children:"Ver guía en Tealca Consultas"})}),l.jsxs(Ui,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(af,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Fecha"})]})}),l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(dC,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Evento"})]})})]})}),l.jsx("tbody",{children:e.map((n,s)=>l.jsx(Hp,{tracking:n,index:s},n.trackingID))})]})]})]})}),qp=({showPOD:e,showInvoice:t,isPhysicalLiability:r,isPhysicalPOD:n,invoiceNumber:s,onShowLiabilityWaiver:i,onDownloadLiabilityWaiver:a,onShowPOD:o,onDownloadPOD:c,onShowInvoiceAttachments:d,wrapperClassName:f})=>l.jsxs("div",{className:I("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",f),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:l.jsx(X0,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Documentos Digitales"})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Declaración Jurada:"," "]}),l.jsx("span",{className:I("ml-3 text-sm text-muted-foreground",!r&&"hidden"),children:"Llenada en el documento físico"}),l.jsx("p",{className:"ml-4",children:l.jsx(Ye,{onClick:i,className:I("text-sm text-muted-foreground",r&&"hidden"),children:"Ver Declaración Jurada"})}),l.jsx("p",{className:"ml-4",children:l.jsx(Ye,{onClick:a,className:I("text-sm text-muted-foreground",r&&"hidden"),children:"Descargar Declaración Jurada"})})]}),l.jsxs("div",{className:I(!e&&"hidden"),children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"POD: "}),l.jsx("span",{className:I("ml-3 text-sm text-muted-foreground",!n&&"hidden"),children:"Llenada en el documento físico"}),l.jsx("p",{className:"ml-4",children:l.jsx(Ye,{onClick:o,className:I("text-sm text-muted-foreground",n&&"hidden"),children:"Ver POD"})}),l.jsx("p",{className:"ml-4",children:l.jsx(Ye,{onClick:c,className:I("text-sm text-muted-foreground",n&&"hidden"),children:"Descargar POD"})})]}),l.jsxs("div",{className:I(!t&&"hidden"),children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Factura de la mercancia:"," "]}),l.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:l.jsx("span",{children:s})}),l.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:l.jsx(Ye,{onClick:d,children:"Ver Adjuntos"})})]})]})]}),vC=({shipment:e,trackings:t,showLiabilityWaiver:r,showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:o,onSubstituteForClick:c,onSubstitutedByClick:d,onInvoiceClick:f,onPublicAppClick:h,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:m,onShowPOD:g,onDownloadPOD:x,onShowInvoiceAttachments:y,onPrintParcel:b,onPrintShipment:E,onEdit:k,onCancel:S,onDeliver:v})=>{const[w,_]=u.useState(!1);return l.jsxs("div",{className:"flex flex-col gap-8",children:[l.jsx(Bp,{shipment:e,onSubstituteForClick:c,onSubstitutedByClick:d}),l.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 shadow-sm overflow-hidden",children:[l.jsxs("div",{className:"w-full flex items-center justify-between p-5 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 text-xl font-bold text-gray-800 dark:text-gray-200",onClick:()=>_(!w),children:[l.jsx("span",{children:"Detalles"}),l.jsx(Do,{className:I("ml-2 transition-transform duration-1000 text-gray-500 dark:text-gray-300",w?"rotate-180":"rotate-0"),"aria-label":w?"Colapsar":"Expandir"})]}),l.jsx(Nd,{active:w,duration:1e3,children:l.jsxs("div",{className:"flex flex-col p-2 md:p-4 lg:p-6 gap-14 pb-16",children:[e.invoices.length>0&&l.jsx(Rp,{invoices:e.invoices,onInvoiceClick:f}),e.parcels.length>0&&l.jsx(Fp,{parcels:e.parcels,totalPhysicalWeight:e.totalPhysicalWeight,totalDimensionalWeight:e.totalDimensionalWeight,totalChargedWeight:e.totalChargedWeight,totalVolume:e.totalVolume,dimensionalFactor:e.dimensionalFactor,onPrintParcel:b,onPrintShipment:E}),e.items.length>0&&l.jsx(Yp,{items:e.items,subTotalAmount:e.subTotalAmount,vatAmount:e.vatAmount,postalTaxAmount:e.postalTaxAmount,totalAmount:e.totalAmount}),t.length>0&&l.jsx(Gp,{trackings:t,onPublicAppClick:h}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.deliveryDate&&e.deliveryUser&&l.jsx(zp,{user:e.deliveryUser,date:e.deliveryDate,observation:e.deliveryObservation}),r&&l.jsx(qp,{showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:o,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:m,onShowPOD:g,onDownloadPOD:x,onShowInvoiceAttachments:y})]}),l.jsx($p,{shipment:e,wrapperClassName:"h-[30rem]"})]})})]}),l.jsx("div",{className:"mt-2 md:mt-6 w-full flex flex-col gap-4 md:gap-0",children:l.jsxs("div",{className:"w-full flex flex-col-reverse md:flex-row justify-between items-center gap-4",children:[l.jsx("div",{className:"flex flex-col-reverse md:flex-row gap-4 items-center w-full",children:S&&l.jsxs(Ye,{onClick:S,children:[l.jsx(Rd,{className:"w-5 h-5 inline mr-1 mb-0.5"}),"Anular"]})}),l.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-center w-full md:w-fit",children:[k&&l.jsxs(mt,{className:"w-full md:w-36",onClick:k,children:[l.jsx(Uh,{className:"w-4 h-4 inline mr-2"}),"Editar"]}),v&&l.jsxs(mt,{className:"w-full md:w-36",onClick:v,children:[l.jsx(yv,{className:"w-4 h-4 inline mr-2"}),"Entregar"]})]})]})})]})},gd={id:"",label:"Crear nuevo",value:null},yC=[{id:br.PERSON.toString(),label:"Persona",value:br.PERSON},{id:br.BOX_ACCOUNT.toString(),label:"Casillero",value:br.BOX_ACCOUNT}],Zp=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,[a,o]=u.useState(!1),[c,d]=u.useState(!1),[f,h]=u.useState(""),[p,m]=u.useState(""),g=b=>{if(b.value===null){o(!0);return}i("shipper",b),i("consigneeType",{id:br.PERSON.toString(),label:"Persona",value:br.PERSON}),i("consignee",null)},x=b=>{i("consigneeType",b),i("consignee",null)},y=b=>{if(b.value===null){d(!0);return}i("consignee",b)};return l.jsx("div",{className:"w-full mx-auto",children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(oS,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Partes Involucradas"})]})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 w-full gap-4 p-4 md:h-28",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx(St,{required:!0,label:"Remitente",id:"shipper",name:"shipper",placeholder:"Seleccione un remitente",options:[],selected:t.shipper,searchText:f,error:r.shipper&&n.shipper,onSelectOption:g,onBlur:s,setSearchText:h,footerOption:gd}),l.jsxs(wi,{open:a,onClose:()=>o(!1),children:[l.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),l.jsx(ao,{onSubmit:()=>{},onCancel:b=>{o(!1),b.resetForm()}})]})]}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Destinatario ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(Si,{id:"consigneeType",name:"consigneeType",label:"",options:yC,selected:t.consigneeType,disabled:!t.shipper,onSelectOption:x,onBlur:s,wrapperClassName:"flex-row"})})]}),l.jsx("div",{className:"w-full",children:l.jsx(St,{label:"",id:"consignee",name:"consignee",placeholder:"Seleccione un destinatario",options:[],selected:t.consignee,disabled:!t.shipper,searchText:p,error:r.consignee&&n.consignee,onSelectOption:y,onBlur:s,setSearchText:m,footerOption:gd})}),l.jsxs(wi,{open:c,onClose:()=>d(!1),children:[l.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),l.jsx(ao,{onSubmit:()=>{},onCancel:b=>{d(!1),b.resetForm()}})]})]})]})]})})},xC=({formik:e})=>l.jsxs("div",{className:"flex flex-col gap-6",children:[l.jsx(Zp,{formik:e}),l.jsx(Vp,{formik:e})]}),bC=({index:e,shipment:t})=>l.jsxs("div",{className:"flex flex-col gap-8 w-full",children:[l.jsx("div",{className:"overflow-hidden border-none shadow-lg",children:l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:l.jsx("div",{className:"flex relative items-start justify-between",children:l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:l.jsx(Ln,{className:"h-8 w-8"})}),t&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),l.jsxs("h1",{className:"text-3xl font-bold tracking-tight",children:[t.shipmentNumber," ",l.jsx("span",{className:"font-normal italic",children:"(Edición)"})]}),l.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",$(t.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]})]}),l.jsx(Sn,{color:"default",className:"!text-base absolute top-0 right-0",children:t.status.name})]}),!t&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Guía Número"}),l.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.toString().padStart(3,"0")})]}),l.jsx(Sn,{color:"primary",className:"!text-base absolute top-0 right-0",children:"Nueva Guía"})]})]})})})}),l.jsx(ks,{initialValues:Pp,onSubmit:()=>{},children:r=>l.jsx(xC,{formik:r})})]}),Js=PE({reducer:{auth:qE}}),wC=(e,t=!1)=>{const r=t?"-":"_";return e.replace(/[A-Z]/g,n=>`${r}${n.toLowerCase()}`)},jn=(e,t=!1)=>Array.isArray(e)?e.map(r=>jn(r)):e!==null&&e.constructor===Object?Object.keys(e).reduce((r,n)=>(r[wC(n,t)]=jn(e[n]),r),{}):e;function EC(e){return e.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_",""))}function Ii(e){if(Array.isArray(e))return e.map(Ii);if(e!==null&&typeof e=="object"){const t={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=EC(r);t[n]=Ii(e[r])}return t}return e}const Kp=(e,t)=>u.useMemo(()=>{const n=Ie.create({baseURL:e});return n.interceptors.request.use(s=>{const i=Js.getState().auth.accessToken;return i&&s.headers&&(s.headers.Authorization=`Bearer ${i}`),s.data&&(s.data=jn(s.data)),s.params&&(s.params=jn(s.params,!0)),s},s=>Promise.reject(s)),n.interceptors.response.use(s=>(s.data&&(s.data=Ii(s.data)),s),async s=>{const i=s.config;if(s.response.status===401&&!i._retry){i._retry=!0;const a=Js.getState().auth.refreshToken;if(a)try{const o=await hh(t,a);if(o.data){const{accessToken:c}=o.data,d=Js.getState().auth;if(d.user)return Js.dispatch($h({user:d.user,...o.data})),i.headers.Authorization=`Bearer ${c}`,Ie(i)}}catch(o){return Promise.reject(o)}}return Promise.reject(s)}),n},[e,t]),Jp=e=>u.useMemo(()=>{const r=Ie.create({baseURL:e,headers:{"Content-Type":"application/json"}});return r.interceptors.request.use(n=>(n.data&&(n.data=jn(n.data)),n.params&&(n.params=jn(n.params,!0)),n),n=>Promise.reject(n)),r.interceptors.response.use(n=>(n.data&&(n.data=Ii(n.data)),n),n=>Promise.reject(n)),r},[e]),SC=({children:e,applicationId:t})=>{const r=Jp(void 0),n=Kp("http://localhost:8000/api",r),[s,i]=u.useState(null);return u.useEffect(()=>{(async()=>{const o=await ch(r,t);if(o.error||!o.data){console.error(o.message);return}i(o.data)})()},[t,r]),l.jsx(Pn.Provider,{value:{application:s,googleMapsApiKey:"AIzaSyD0g8yZAA0ZaqaLsrRkGmDQdFbhCEAPdYs",clientId:"docuNxInnND1MUSqVr3ROV8ms986ZRjnbyA77ypt",clientSecret:"0SAgl6C4IsMObrysxXHG6npwGyH8jgIkiMtLoGD6Pchu1tBGPZvIZjmjYmAo3pItBoIqOHipjkQNcI03URn1i7LgtaAsDOHFSdv3suDFz9J3kS8WHMnq0tE1Lg1advs7",api:n,basicApi:r},children:e})};exports.AccountForm=ao;exports.AnimatedCollapse=Nd;exports.AppContext=Pn;exports.AppProvider=SC;exports.AuthContext=Fo;exports.Badge=Sn;exports.Button=Oo;exports.CategoryTypeID=Dp;exports.Checkbox=Fi;exports.ConsigneeType=br;exports.DeliveryTypeID=Ge;exports.ErrorCard=Jn;exports.ForgotPassword=Rw;exports.GoogleMap=tf;exports.InputCheckboxSelect=Jy;exports.InputDate=Xy;exports.InputFile=Qy;exports.InputFileDrop=ex;exports.InputGoogleMap=Tf;exports.InputInteger=Df;exports.InputLocationSelect=ax;exports.InputRadioSelect=Si;exports.InputSelect=St;exports.InputSelectGrouped=ox;exports.InputText=et;exports.InputTextArea=lx;exports.InvoiceStatus=Tp;exports.InvoiceSummary=Ap;exports.InvoiceSummaryList=Rp;exports.InvoiceType=ns;exports.Link=Ye;exports.LoadingSpinner=$i;exports.Login=KE;exports.Modal=wi;exports.ParcelForm=pC;exports.ParcelRow=Ip;exports.ParcelTable=Fp;exports.PaymentModeID=xl;exports.Popover=rf;exports.PopoverMenu=K0;exports.PrimaryButton=mt;exports.SecondaryButton=as;exports.Separator=kn;exports.ServiceID=Xt;exports.ShipmentAccountSummary=ko;exports.ShipmentAddresses=$p;exports.ShipmentAddressesForm=Vp;exports.ShipmentDeliveryData=zp;exports.ShipmentDetails=vC;exports.ShipmentDocument=qp;exports.ShipmentForm=bC;exports.ShipmentItemRow=Wp;exports.ShipmentItemTable=Yp;exports.ShipmentPartiesForm=Zp;exports.ShipmentStatusID=zr;exports.ShipmentSummary=Bp;exports.SideMenu=Zy;exports.Switch=J0;exports.Table=Ui;exports.TrackingRow=Hp;exports.TrackingTable=Gp;exports.WarningCard=nf;exports.getApplication=ch;exports.getCategories=ph;exports.getCountries=dh;exports.getTaxIdentificationTypes=uh;exports.getToken=fh;exports.refreshToken=hh;exports.shipmentInitialValues=Pp;exports.useApi=Kp;exports.useBasicApi=Jp;
|
|
113
|
+
$.version="2.30.1";cS(Fe);$.fn=R;$.min=Jk;$.max=Xk;$.now=Qk;$.utc=zt;$.unix=O_;$.months=j_;$.isDate=Os;$.locale=Er;$.invalid=sa;$.duration=Dt;$.isMoment=Nt;$.weekdays=N_;$.parseZone=L_;$.localeData=or;$.isDuration=ai;$.monthsShort=M_;$.weekdaysMin=D_;$.defineLocale=ul;$.updateLocale=Lk;$.locales=jk;$.weekdaysShort=T_;$.normalizeUnits=Ct;$.relativeTimeRounding=aC;$.relativeTimeThreshold=oC;$.calendarFormat=k4;$.prototype=R;$.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"};var Xt=(e=>(e[e.STANDARD=60]="STANDARD",e[e.DOCUMENT=61]="DOCUMENT",e[e.INTERNATIONAL_DOCUMENT=62]="INTERNATIONAL_DOCUMENT",e[e.INTERNATIONAL_STANDARD=63]="INTERNATIONAL_STANDARD",e[e.ECONOMIC=64]="ECONOMIC",e[e.SAVER=70]="SAVER",e[e.NATIONAL_LOCKER=81]="NATIONAL_LOCKER",e[e.INTERNAL_MAIL=99]="INTERNAL_MAIL",e))(Xt||{}),Tp=(e=>(e[e.ANULLED=6]="ANULLED",e[e.PAID=10]="PAID",e[e.PENDING=11]="PENDING",e[e.PARTIAL_PAID=20]="PARTIAL_PAID",e[e.TO_ISSUE=59]="TO_ISSUE",e[e.ISSUED=60]="ISSUED",e))(Tp||{}),ns=(e=>(e[e.INVOICE=2]="INVOICE",e[e.CREDIT_NOTE=4]="CREDIT_NOTE",e[e.ORDER=6]="ORDER",e))(ns||{}),xl=(e=>(e[e.CASH=1]="CASH",e[e.COD=2]="COD",e[e.CREDIT=3]="CREDIT",e[e.BOXOFFICE_CREDIT=4]="BOXOFFICE_CREDIT",e[e.DEST_BOXOFFICE_CREDIT=5]="DEST_BOXOFFICE_CREDIT",e[e.EXEMPT=6]="EXEMPT",e))(xl||{}),Dp=(e=>(e[e.INTERNATIONAL=1]="INTERNATIONAL",e[e.NATIONAL=2]="NATIONAL",e))(Dp||{}),Ge=(e=>(e[e.OFFICE=10]="OFFICE",e[e.HOME=20]="HOME",e[e.INTERNATIONAL=21]="INTERNATIONAL",e))(Ge||{}),br=(e=>(e[e.PERSON=0]="PERSON",e[e.BOX_ACCOUNT=1]="BOX_ACCOUNT",e))(br||{});const Pp={shipper:null,consigneeType:{id:"0",value:0,label:"Persona"},consignee:null,boxAccount:null,pickupType:{id:Ge.OFFICE.toString(),value:{deliveryTypeID:Ge.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},originStore:null,originAddress:null,deliveryType:{id:Ge.OFFICE.toString(),value:{deliveryTypeID:Ge.OFFICE,deliveryTypeName:"Tienda"},label:"Tienda"},destinationStore:null,destinationAddress:null};var zr=(e=>(e[e.ACTIVE=1]="ACTIVE",e[e.ANNULLED=3]="ANNULLED",e[e.DRAFT=5]="DRAFT",e[e.REPLACED=55]="REPLACED",e[e.DELIVERED=30]="DELIVERED",e))(zr||{});const Ap=({invoice:e,onClick:t})=>{const r=u.useMemo(()=>{switch(e.type){case ns.INVOICE:return"Factura:";case ns.CREDIT_NOTE:return"Nota de Crédito:";case ns.ORDER:return"Orden:"}},[e.type]);return l.jsxs("div",{className:"border cursor-pointer border-gray-300 dark:border-gray-700 rounded-lg p-4 hover:shadow-md transition-all text-gray-800 dark:text-gray-200 bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 duration-100",onClick:t,children:[l.jsxs("div",{className:"flex items-center justify-between mb-3 gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(xv,{className:"w-4 h-4 text-indigo-600 dark:text-indigo-400"}),l.jsxs("span",{className:"font-semibold text-sm text-card-foreground dark:text-gray-200",children:[r," ",l.jsx("span",{className:"text-gray-900 dark:text-gray-100 font-bold",children:e.invoiceNumber})]})]}),l.jsx(Sn,{color:"primary",children:e.statusName})]}),l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[l.jsxs("div",{className:"col-span-3 md:col-span-2",children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(of,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Cliente"})]}),l.jsx("p",{className:"text-sm font-bold text-card-foreground dark:text-gray-100",children:e.accountFullName}),l.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground mt-0.5 text-gray-600 dark:text-gray-400",children:[l.jsx(af,{className:"w-3 h-3"}),l.jsx("span",{className:"text-xs",children:$(e.invoiceDate).format("DD/MM/YYYY, hh:mm A")})]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(JE,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Total"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Con IVA"})]}),e.balanceAmount>=0&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(Ln,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Por Cobrar"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(e.balanceAmount,0).toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Saldo pendiente"})]}),e.balanceAmount<0&&l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[l.jsx(Ln,{className:"w-3 h-3 text-indigo-600 dark:text-indigo-400"}),l.jsx("h3",{className:"font-semibold text-xs text-card-foreground dark:text-gray-200",children:"Reintegrar"})]}),l.jsxs("p",{className:"text-sm font-bold text-card-foreground dark:text-indigo-400",children:["$",Math.max(-e.balanceAmount,0).toFixed(2)]}),l.jsx("p",{className:"text-xs text-muted-foreground text-gray-600 dark:text-gray-400",children:"Monto a devolver"})]})]})]})};function cC(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M19 12v7a1.78 1.78 0 0 1 -3.1 1.4a1.65 1.65 0 0 0 -2.6 0a1.65 1.65 0 0 1 -2.6 0a1.65 1.65 0 0 0 -2.6 0a1.78 1.78 0 0 1 -3.1 -1.4v-14a2 2 0 0 1 2 -2h7l5 5v4.25"},child:[]}]})(e)}function uC(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.916 11.707a3 3 0 1 0 -2.916 2.293"},child:[]},{tag:"path",attr:{d:"M11.991 21.485a1.994 1.994 0 0 1 -1.404 -.585l-4.244 -4.243a8 8 0 1 1 13.651 -5.351"},child:[]},{tag:"path",attr:{d:"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M20.2 20.2l1.8 1.8"},child:[]}]})(e)}function dC(e){return X({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M10 20h-6"},child:[]},{tag:"path",attr:{d:"M14 20h6"},child:[]},{tag:"path",attr:{d:"M12 15l-2 -2h-3a1 1 0 0 1 -1 -1v-8a1 1 0 0 1 1 -1h10a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-3l-2 2z"},child:[]},{tag:"path",attr:{d:"M12 6v2"},child:[]},{tag:"path",attr:{d:"M12 11v.01"},child:[]}]})(e)}const Rp=({invoices:e,onInvoiceClick:t,wrapperClassName:r})=>l.jsx("div",{className:I("w-full mx-auto",r),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(cC,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Facturas"})]})}),l.jsx("div",{className:"p-2 md:p-4 space-y-4",children:e.map(n=>l.jsx(Ap,{invoice:n,onClick:()=>t?.(n)},n.invoiceID))})]})}),fC={category:null,weight:null,height:null,width:null,length:null,quantity:1},hC=({serviceId:e,categoryTypeId:t,formik:r,warningSchema:n})=>{const{values:s,touched:i,errors:a,handleChange:o,handleBlur:c,handleSubmit:d,setFieldValue:f}=r,h=u.useContext(Pn),[p,m]=u.useState(null),[g,x]=u.useState(null),[y,b]=u.useState([]),[E,k]=u.useState(""),[S,v]=u.useState({}),w=u.useMemo(()=>a,[a]);return u.useEffect(()=>{(async()=>{const M=await ph(h.api,t);M.error||!M.data||(b(M.data.map(O=>({id:O.categoryId.toString(),label:O.categoryName,value:O}))),x(M.data.find(O=>ux.includes(O.categoryId))??null),m(M.data.find(O=>cx.includes(O.categoryId))??null))})()},[t,h.api]),u.useEffect(()=>{p&&(e===Xt.DOCUMENT||e===Xt.INTERNATIONAL_DOCUMENT)?(k(p.categoryName),f("category",{id:p.categoryId.toString(),label:p.categoryName,value:p}),f("height",ja.HEIGHT),f("width",ja.WIDTH),f("length",ja.LENGTH)):(k(""),f("category",null),f("height",""),f("width",""),f("length",""))},[e,p,f]),u.useEffect(()=>{(async(M,O)=>{try{return await M.validate(O,{abortEarly:!1}),{}}catch(D){if(D instanceof Qe){const P={};return D.inner.forEach(U=>{U.path&&(P[U.path]=U.message)}),P}return{}}})(n,s).then(M=>{v(M)})},[s,n]),l.jsx("div",{className:"w-full max-w-2xl",children:l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(St,{label:"Categoría",id:"category",name:"category",placeholder:"Seleccione una categoría",options:y,selected:s.category,searchText:E,disabled:e===Xt.DOCUMENT,error:i.category&&a.category,onSelectOption:_=>f("category",_),onBlur:c,setSearchText:k,footerOption:g?{label:g.categoryName,id:g.categoryId.toString(),value:g}:void 0})}),l.jsxs("div",{className:I("space-y-2",{hidden:e===Xt.DOCUMENT}),children:[l.jsx("h4",{className:"text-gray-700 dark:text-white",children:"Dimensiones en cm."}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(et,{label:"Altura",id:"height",name:"height",type:"number",step:"0.01",placeholder:"0.00",value:s.height??"",onChange:o,onBlur:c,error:i.height&&a.height})}),l.jsx("div",{className:"space-y-2",children:l.jsx(et,{label:"Ancho",id:"width",name:"width",type:"number",step:"0.01",placeholder:"0.00",value:s.width??"",onChange:o,onBlur:c,error:i.width&&a.width})}),l.jsx("div",{className:"space-y-2",children:l.jsx(et,{label:"Largo",id:"length",name:"length",type:"number",step:"0.01",placeholder:"0.00",value:s.length??"",onChange:o,onBlur:c,error:i.length&&a.length})})]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsx("div",{className:"space-y-2",children:l.jsx(et,{label:"Peso (kg)",id:"weight",name:"weight",type:"number",step:"0.01",placeholder:"0.00",value:s.weight??"",onChange:o,onBlur:c,error:i.weight&&a.weight})}),l.jsx("div",{className:"space-y-2",children:l.jsx(Df,{label:"Cantidad",id:"quantity",name:"quantity",min:"1",value:s.quantity,disabled:e===Xt.DOCUMENT,onChange:o,onBlur:c,error:i.quantity&&a.quantity})})]}),l.jsxs("div",{className:"flex flex-col gap-2",children:[S.totalWeightWarn&&l.jsx(nf,{description:S.totalWeightWarn}),w.totalWeightError&&l.jsx(Jn,{description:w.totalWeightError}),w.minVolumeError&&l.jsx(Jn,{description:w.minVolumeError}),w.maxVolumeError&&l.jsx(Jn,{description:w.maxVolumeError}),w.densityError&&l.jsx(Jn,{description:w.densityError})]}),l.jsx(mt,{type:"submit",className:"w-full",onClick:()=>d(),children:"+ Agregar"})]})})},pC=({serviceId:e,categoryTypeId:t,totalWeight:r,validationConfig:n,onSubmit:s})=>{const i=u.useMemo(()=>{const{minWeight:o=0,minVolume:c,maxVolume:d,minDensity:f,maxDensity:h,maxDocumentWeight:p=1/0,maxTotalWeight:m=1/0}=n??{};let{maxWeight:g=1/0}=n??{};return(e===Xt.DOCUMENT||e===Xt.INTERNATIONAL_DOCUMENT)&&(g=p),kr({category:Sr().nullable().required("La categoría es requerida"),weight:Ot().typeError("Debe ser un número").required("El peso es requerido").test({name:"min-weight",exclusive:!1,test:x=>x==null||x>=o,message:`El peso mínimo es ${o.toFixed(2)}kg`}).test({name:"max-weight",exclusive:!1,test:x=>x==null||x<=g,message:`El peso máximo es ${g.toFixed(2)}kg`}),height:Ot().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("La altura es requerida"),width:Ot().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El ancho es requerido"),length:Ot().typeError("Debe ser un número").integer("Debe ser un número entero").positive("Debe ser mayor a 0").required("El largo es requerido"),quantity:Ot().typeError("Debe ser un número").integer("Debe ser un número entero").min(1,"Debe ser al menos 1").required("La cantidad es requerida")}).test({name:"total-weight-check-global",test:function(x){const{weight:y,quantity:b}=x;if(y===null||r===void 0)return!0;const E=y*b,k=r+E;return m!==void 0&&k>m?this.createError({path:"totalWeightError",message:`El peso total (${k.toFixed(2)}kg) excede el máximo (${m.toFixed(2)}kg)`}):!0}}).test({name:"volume-check",test:function(x){const{height:y,width:b,length:E}=x;if(y===null||b===null||E===null)return!0;const k=y*b*E;return c!==void 0&&k<c?this.createError({path:"minVolumeError",message:`El volumen (${k.toFixed(2)}cm³) es menor al mínimo (${c.toFixed(2)}cm³)`}):d!==void 0&&k>d?this.createError({path:"maxVolumeError",message:`El volumen (${k.toFixed(2)}cm³) es mayor al máximo (${d.toFixed(2)}cm³)`}):!0}}).test({name:"density-check",test:function(x){const{height:y,width:b,length:E,weight:k}=x;if(y===null||b===null||E===null||k===null)return!0;const S=y*b*E;if(S===0)return!0;const v=k/S;return f!==void 0&&v<f||h!==void 0&&v>h?this.createError({path:"densityError",message:"Las medidas son inválidas, por favor revíselas y corríjalas"}):!0}})},[n,r,e]),a=u.useMemo(()=>{const{maxTotalWeightWarn:o=1/0}=n??{};return kr({category:Sr().nullable().required(),weight:Ot().required(),height:Ot().required(),width:Ot().required(),length:Ot().required(),quantity:Ot().required()}).test({name:"total-weight-check-global-warn",test:function(c){const{weight:d,quantity:f}=c;if(!d||!f||r===void 0)return!0;const h=d*f,p=r+h;return o!==void 0&&p>o?this.createError({path:"totalWeightWarn",message:`El peso total (${p.toFixed(2)}kg) excede el recomendado (${o.toFixed(2)}kg)`}):!0}})},[n,r]);return l.jsx(ks,{initialValues:fC,validationSchema:i,onSubmit:s,children:o=>l.jsx(hC,{serviceId:e,categoryTypeId:t,formik:o,warningSchema:a})})},Ip=({parcel:e,index:t,checked:r,editable:n,editing:s,disabledActions:i,onChangeChecked:a,onPrintParcel:o,onDuplicate:c,onEdit:d})=>l.jsxs("tr",{className:I("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",s&&"border-2 border-indigo-600 dark:border-indigo-400",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsxs("td",{className:"text-muted-foreground px-3 sm:px-4 font-bold",children:[n&&l.jsx(Fi,{label:"",id:`parcel-${e.pieceNumber}-checkbox`,checked:r,disabled:i,onChangeChecked:a}),!n&&e.pieceNumber]}),l.jsxs("td",{className:"sm:hidden px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[l.jsxs("p",{children:[e.weight.toFixed(2)," kg"]}),l.jsxs("p",{children:[e.length,"x",e.width,"x",e.height," cm"]}),l.jsx("p",{className:"font-normal",children:e.contentDescription})]}),l.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.weight.toFixed(2)," kg"]}),l.jsxs("td",{className:"hidden sm:table-cell px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold",children:[e.length,"x",e.width,"x",e.height," cm"]}),l.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.contentDescription}),l.jsxs("td",{className:"text-right px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[n&&!i&&l.jsxs("div",{className:"flex gap-2 items-cetner justify-end",children:[l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:c,children:l.jsx(eS,{className:"h-4 w-4"})}),l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-6 w-6 sm:h-8 sm:w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Acciones",onClick:d,children:l.jsx(Uh,{className:"h-4 w-4"})})]}),!n&&!i&&l.jsx("button",{type:"button",className:"inline-flex items-center justify-center h-8 w-8 rounded hover:bg-indigo-100 dark:hover:bg-indigo-800 transition-colors text-indigo-600 dark:text-indigo-300 hover:text-indigo-900 dark:hover:text-white cursor-pointer",title:"Imprimir",onClick:o,children:l.jsx(sS,{className:"h-4 w-4"})}),s&&l.jsx("span",{className:"italic",children:"Editando"})]})]}),Fp=({parcels:e,totalPhysicalWeight:t,totalDimensionalWeight:r,totalChargedWeight:n,totalVolume:s,dimensionalFactor:i,editingParcel:a,editable:o,onPrintParcel:c,onDelete:d,onDuplicate:f,onSelectEdit:h,onCancelEdit:p,onPrintShipment:m,wrapperClassName:g})=>{const[x,y]=u.useState([]),b=u.useMemo(()=>x.every(S=>S),[x]),E=(S,v)=>{y(w=>[...w.slice(0,v),S,...w.slice(v+1)])},k=()=>{y(b?Array.from({length:e.length},()=>!1):Array.from({length:e.length},()=>!0))};return u.useEffect(()=>{y(Array.from({length:e.length},()=>!1))},[e.length,a]),l.jsx("div",{className:I("w-full mx-auto",g),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Ln,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Piezas"})]})}),l.jsxs("div",{className:"p-4",children:[l.jsxs(Ui,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsxs("th",{className:"w-16 font-bold text-xs uppercase tracking-wider text-left px-3 sm:px-4 py-2",children:[o&&l.jsx(Fi,{label:"",id:"parcel-table-all-checked-checkbox",checked:b,disabled:!!a,onChangeChecked:k}),!o&&"#"]}),l.jsx("th",{className:"sm:hidden text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(iv,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Pieza"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(lS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Peso"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(iS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Dimensiones"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Pd,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Categoría"})]})}),l.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:l.jsxs("div",{className:"flex items-center w-full justify-end gap-2",children:[l.jsx(rS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{className:"hidden sm:inline-block",children:"Acciones"})]})})]})}),l.jsx("tbody",{children:e.map((S,v)=>l.jsx(Ip,{parcel:S,index:v,editing:a?.pieceNumber===S.pieceNumber,checked:x[v],disabledActions:!!a,onChangeChecked:w=>E(w,v),onPrintParcel:()=>c?.(S),onDuplicate:()=>f?.(S),onEdit:()=>h?.(S),editable:o},S.pieceNumber))})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between text-xs mt-4",children:[l.jsxs("div",{className:"flex flex-col sm:block w-full sm:w-fit justify-center items-center",children:[!o&&m&&l.jsxs(mt,{className:"w-full md:w-36",onClick:m,children:[l.jsx(hv,{className:"w-4 h-4 inline mr-2"}),"Imprimir Guía"]}),o&&!a&&l.jsxs(as,{className:"!w-full my-2 sm:my-0",disabled:x.every(S=>!S),onClick:()=>d?.(e.filter((S,v)=>x[v])),children:[l.jsx(G0,{className:"mr-2 w-4 h-4"}),"Eliminar"]}),!!a&&l.jsxs(as,{onClick:p,children:[l.jsx(Rd,{className:"mr-2 w-5 h-5"}),"Cancelar Edición"]})]}),l.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground font-semibold",children:"Peso por facturar"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:[n.toFixed(2)," kg"]})]}),l.jsx(kn,{}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Peso físico"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[t.toFixed(2)," kg"]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Peso volumétrico"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[r.toFixed(2)," kg"]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Volumen"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:[s.toFixed(2)," cm",l.jsx("sup",{children:"3"})]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-12",children:[l.jsx("span",{className:"text-muted-foreground",children:"Factor volumétrico"}),l.jsx("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:i.toFixed(2)})]})]})]})]})]})})},ko=({isShipper:e=!1,account:t,store:r,deliveryType:n,isAccountBillTo:s,address:i})=>{const a=u.useMemo(()=>n===Ge.HOME&&e?"Recolecta":n===Ge.HOME&&!e?"A Domicilio":"En Tienda",[e,n]);return l.jsxs("div",{children:[l.jsxs("div",{className:"mb-2 flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/10 dark:bg-indigo-900 p-2",children:l.jsx(of,{className:"h-5 w-5 text-indigo-600 dark:text-indigo-300"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e?"Remitente":"Destinatario"}),s&&l.jsx(Sn,{color:"primary",children:"Cuenta a facturar"})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("div",{children:l.jsx("p",{className:"text-lg font-bold text-div-foreground text-gray-900 dark:text-gray-200",children:t.fullName})}),l.jsx(kn,{className:"my-2"}),l.jsxs("div",{className:"space-y-1.5 text-xs",children:[l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(XE,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsxs("span",{className:"font-mono",children:[t.taxIdentificationType,"-",t.identificationNumber]})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(Xg,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:t.email})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(nS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:t.phone})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(Ad,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:a})]}),l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(aS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsxs("span",{children:[r.code," - ",r.commercialName]})]}),i&&n===Ge.HOME&&l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-gray-700 dark:text-gray-400",children:[l.jsx(tS,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:i.addressLine1})]})]})]})]})},$p=({shipment:e,wrapperClassName:t})=>{const r=u.useMemo(()=>{const n={lat:e.originAddress.latitude,lng:e.originAddress.longitude,name:`Origen (${e.pickupType.deliveryTypeID===Ge.OFFICE?"En Tienda":"Recolecta"})`},s={lat:e.destinationAddress.latitude,lng:e.destinationAddress.longitude,name:`Destino (${e.deliveryType.deliveryTypeID===Ge.OFFICE?"En Tienda":"A Domicilio"})`};return[n,s]},[e]);return l.jsx("div",{className:I("w-full mx-auto",t),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg w-full h-full flex flex-col",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Qd,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Ruta"})]})}),l.jsxs("div",{className:"flex flex-col p-4 w-full h-full flex-1 gap-2",children:[l.jsx("div",{className:"w-full h-full",children:l.jsx(tf,{coordinates:r})}),l.jsxs("p",{className:"text-xs text-gray-800 dark:text-gray-300",children:["Ubicación actual:"," ",l.jsxs("span",{className:"font-semibold",children:[e.lastKnowStoreLocation.code," -"," ",e.lastKnowStoreLocation.commercialName]})]}),l.jsx("div",{className:"flex items-center justify-center w-full text-center",children:l.jsx(Ye,{children:"Agregar recargo por entrega a domicilio"})})]})]})})},Up=[{id:Ge.OFFICE.toString(),label:"Tienda",value:{deliveryTypeID:Ge.OFFICE,deliveryTypeName:"Tienda"}},{id:Ge.HOME.toString(),label:"A Domicilio",value:{deliveryTypeID:Ge.HOME,deliveryTypeName:"A Domicilio"}}],gC=[...Up,{id:Ge.INTERNATIONAL.toString(),label:"Internacional",value:{deliveryTypeID:Ge.INTERNATIONAL,deliveryTypeName:"Internacional"}}],Vp=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,{store:a}=u.useContext(Fo),o=d=>{i("pickupType",d),d.value.deliveryTypeID===Ge.OFFICE?(i("originStore",a),i("originAddress",a?.address??null)):(i("originStore",null),i("originAddress",null))},c=d=>{i("deliveryType",d),i("destinationStore",null),i("destinationAddress",null)};return l.jsx("div",{className:"w-full mx-auto",children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(uC,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Direcciones"})]})}),l.jsxs("div",{className:"flex flex-col w-full gap-4 p-4",children:[l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Origen ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(Si,{id:"pickupType",name:"pickupType",label:"",options:Up,selected:t.pickupType,onSelectOption:o,onBlur:s,wrapperClassName:"flex-row"})})]}),l.jsx("div",{className:"w-full",children:t.pickupType?.value.deliveryTypeID===Ge.OFFICE&&l.jsx(St,{disabled:!0,label:"",id:"originStore",name:"originStore",placeholder:"Seleccione una tienda",options:[],selected:t.originStore,searchText:t.originStore?.value.commercialName,error:r.originStore&&n.originStore,onSelectOption:()=>{},onBlur:s})})]}),l.jsx("div",{className:"flex-1",children:l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Destino ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(Si,{id:"deliveryType",name:"deliveryType",label:"",options:gC,selected:t.deliveryType,onSelectOption:c,onBlur:s,wrapperClassName:"flex-row"})})]})})]})]})})},zp=({user:e,date:t,observation:r,wrapperClassName:n})=>l.jsxs("div",{className:I("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",n),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:l.jsx(Qg,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Entrega"})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Usuario: "}),l.jsx("span",{className:"text-sm text-muted-foreground",children:e})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Fecha: "}),l.jsx("span",{className:"text-sm text-muted-foreground",children:$(t).format("DD/MM/YYYY, hh:mm A")})]}),l.jsxs("div",{children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Observaciones:"," "]}),l.jsx("span",{className:"text-sm text-muted-foreground",children:r||"—"})]})]})]}),mC=e=>{switch(e){case zr.ACTIVE:return"primary";case zr.ANNULLED:return"danger";case zr.DELIVERED:return"success";case zr.DRAFT:return"warning";case zr.REPLACED:default:return"default"}},Bp=({shipment:e,onSubstituteForClick:t,onSubstitutedByClick:r})=>l.jsx("div",{className:"bg-gradient-subtle",children:l.jsxs("div",{className:"mx-auto max-w-6xl",children:[l.jsx("div",{className:"mb-6 overflow-hidden border-none shadow-lg",children:l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:l.jsxs("div",{className:"flex relative items-start justify-between",children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:l.jsx(Ln,{className:"h-8 w-8"})}),l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),l.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.shipmentNumber}),l.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",$(e.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]}),l.jsxs("p",{className:I("text-sm",!e.substituteFor&&"hidden"),children:["Sustituto de:"," ",l.jsx(Ye,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:t,children:e.substituteFor})]}),l.jsxs("p",{className:I("text-sm",!e.substitutedBy&&"hidden"),children:["Sustituido por:"," ",l.jsx(Ye,{className:"text-white hover:text-white/80 underline dark:no-underline font-semibold",onClick:r,children:e.substitutedBy})]})]})]}),l.jsx(Sn,{color:mC(e.status.id),className:"!text-base absolute top-0 right-0",children:e.status.name})]})})}),l.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[l.jsx("div",{className:"lg:col-span-2",children:l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[l.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:l.jsx(ko,{isShipper:!0,account:e.shipper,store:e.originStore,deliveryType:e.pickupType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.shipper.id,address:e.originAddress})}),l.jsx("div",{className:"border-none shadow-md transition-all hover:shadow-xl p-6 bg-gray-100 dark:bg-gray-800 rounded-lg",children:l.jsx(ko,{account:e.consignee,store:e.destinationStore,deliveryType:e.deliveryType.deliveryTypeID,isAccountBillTo:e.billTo.id===e.consignee.id,address:e.destinationAddress})})]})}),l.jsx("div",{className:"lg:col-span-1",children:l.jsxs("div",{className:"sticky top-8 border-none shadow-lg bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-400 rounded-b-lg",children:[l.jsx("div",{className:"bg-indigo-600 text-gray-100 dark:bg-indigo-700 p-4",children:l.jsxs("h2",{className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx(Ln,{className:"h-5 w-5"}),"Resumen"]})}),l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"gap-2 mb-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Servicio"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.service.serviceShortName})]}),l.jsxs("div",{className:"gap-2 mb-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Modalidad de Pago"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.paymentMode.paymentModeName})]}),e.paymentMode.paymentModeID===xl.CREDIT&&l.jsxs("div",{className:"gap-2",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:"Crédito de"}),l.jsx("p",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.billTo.fullName})]}),l.jsx(kn,{className:"my-4"}),l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Con impuestos"}),l.jsxs("span",{className:"text-lg font-bold text-indigo-600 dark:text-indigo-400",children:["$",e.totalAmount.toFixed(2)]})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Nº de piezas"}),l.jsx("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:e.totalPieces})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:"Peso por facturar"}),l.jsxs("span",{className:"font-semibold text-div-foreground text-gray-900 dark:text-gray-200",children:[e.totalChargedWeight.toFixed(2)," Kg"]})]})]})]})]})})]})]})}),Wp=({item:e,index:t})=>l.jsxs("tr",{className:I("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:[l.jsx("p",{children:e.itemDescription}),l.jsx("p",{className:"sm:hidden font-normal",children:e.itemDetails})]}),l.jsx("td",{className:"hidden sm:table-cell text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:e.itemDetails}),l.jsxs("td",{className:"px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 truncate font-semibold text-right text-sm",children:[e.subTotalAmount<0&&"-","$",Math.abs(e.subTotalAmount).toFixed(2)]})]}),Yp=({items:e,subTotalAmount:t,vatAmount:r,postalTaxAmount:n,totalAmount:s,wrapperClassName:i})=>l.jsx("div",{className:I("w-full mx-auto",i),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(uv,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Items"})]})}),l.jsxs("div",{className:"p-4",children:[l.jsxs(Ui,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Pd,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Servicio"})]})}),l.jsx("th",{className:"hidden sm:table-cell text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(cv,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Detalles"})]})}),l.jsx("th",{className:"w-24 text-right text-xs uppercase font-semibold tracking-wider px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(QE,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Costo"})]})})]})}),l.jsx("tbody",{children:e.map((a,o)=>l.jsx(Wp,{item:a,index:o},a.itemID))})]}),l.jsx("div",{className:"flex flex-col sm:flex-row gap-4 justify-end text-sm mt-4",children:l.jsxs("div",{className:"space-y-1 text-gray-800 dark:text-gray-300",children:[l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground font-semibold uppercase",children:"Subtotal"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",t.toFixed(2)]})]}),l.jsx(kn,{}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground",children:"IVA (16%)"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",r.toFixed(2)]})]}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"text-muted-foreground",children:"Franqueo Postal"}),l.jsxs("span",{className:"text-indigo-600 dark:text-indigo-400 truncate",children:["$",n.toFixed(2)]})]}),l.jsx(kn,{}),l.jsxs("div",{className:"flex items-center justify-between gap-16",children:[l.jsx("span",{className:"font-bold text-muted-foreground uppercase",children:"Total"}),l.jsxs("span",{className:"font-bold text-indigo-600 dark:text-indigo-400 truncate",children:["$",s.toFixed(2)]})]})]})})]})]})}),Hp=({tracking:e,index:t})=>l.jsxs("tr",{className:I("hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors duration-100 font-normal text-xs h-12",t%2===0?"bg-gray-100 dark:bg-gray-700":"bg-gray-200 dark:bg-gray-800"),children:[l.jsx("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3 font-semibold",children:$(e.date).format("DD/MM/YYYY, hh:mm A")}),l.jsxs("td",{className:"text-muted-foreground px-2 py-1 sm:px-3 sm:py-2 md:px-4 md:py-3",children:[l.jsx("p",{className:"font-semibold text-indigo-600 dark:text-indigo-400",children:e.description}),l.jsx("p",{className:"font-normal",children:e.details})]})]}),Gp=({trackings:e,onPublicAppClick:t,wrapperClassName:r})=>l.jsx("div",{className:I("w-full mx-auto",r),children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(Ad,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-xl font-bold",children:"Tracking"})]})}),l.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[l.jsx("p",{className:I(!t&&"hidden"),children:l.jsx(Ye,{onClick:t,children:"Ver guía en Tealca Consultas"})}),l.jsxs(Ui,{children:[l.jsx("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-800",children:l.jsxs("tr",{className:"border-b-2",children:[l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(af,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Fecha"})]})}),l.jsx("th",{className:"text-xs uppercase font-semibold tracking-wider text-left px-4 py-2",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(dC,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"}),l.jsx("span",{children:"Evento"})]})})]})}),l.jsx("tbody",{children:e.map((n,s)=>l.jsx(Hp,{tracking:n,index:s},n.trackingID))})]})]})]})}),qp=({showPOD:e,showInvoice:t,isPhysicalLiability:r,isPhysicalPOD:n,invoiceNumber:s,onShowLiabilityWaiver:i,onDownloadLiabilityWaiver:a,onShowPOD:o,onDownloadPOD:c,onShowInvoiceAttachments:d,wrapperClassName:f})=>l.jsxs("div",{className:I("flex flex-col gap-6 rounded-lg border p-6 border-gray-300 dark:border-gray-700 text-gray-800 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 max-w-full",f),children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-600/60 dark:bg-indigo-300/20 p-2 backdrop-blur-sm text-gray-100",children:l.jsx(X0,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Documentos Digitales"})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsxs("div",{children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Declaración Jurada:"," "]}),l.jsx("span",{className:I("ml-3 text-sm text-muted-foreground",!r&&"hidden"),children:"Llenada en el documento físico"}),l.jsx("p",{className:"ml-4",children:l.jsx(Ye,{onClick:i,className:I("text-sm text-muted-foreground",r&&"hidden"),children:"Ver Declaración Jurada"})}),l.jsx("p",{className:"ml-4",children:l.jsx(Ye,{onClick:a,className:I("text-sm text-muted-foreground",r&&"hidden"),children:"Descargar Declaración Jurada"})})]}),l.jsxs("div",{className:I(!e&&"hidden"),children:[l.jsx("span",{className:"text-sm font-medium text-foreground",children:"POD: "}),l.jsx("span",{className:I("ml-3 text-sm text-muted-foreground",!n&&"hidden"),children:"Llenada en el documento físico"}),l.jsx("p",{className:"ml-4",children:l.jsx(Ye,{onClick:o,className:I("text-sm text-muted-foreground",n&&"hidden"),children:"Ver POD"})}),l.jsx("p",{className:"ml-4",children:l.jsx(Ye,{onClick:c,className:I("text-sm text-muted-foreground",n&&"hidden"),children:"Descargar POD"})})]}),l.jsxs("div",{className:I(!t&&"hidden"),children:[l.jsxs("span",{className:"text-sm font-medium text-foreground",children:["Factura de la mercancia:"," "]}),l.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:l.jsx("span",{children:s})}),l.jsx("p",{className:"ml-4 text-sm text-muted-foreground",children:l.jsx(Ye,{onClick:d,children:"Ver Adjuntos"})})]})]})]}),vC=({shipment:e,trackings:t,showLiabilityWaiver:r,showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:o,onSubstituteForClick:c,onSubstitutedByClick:d,onInvoiceClick:f,onPublicAppClick:h,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:m,onShowPOD:g,onDownloadPOD:x,onShowInvoiceAttachments:y,onPrintParcel:b,onPrintShipment:E,onEdit:k,onCancel:S,onDeliver:v})=>{const[w,_]=u.useState(!1);return l.jsxs("div",{className:"flex flex-col gap-8",children:[l.jsx(Bp,{shipment:e,onSubstituteForClick:c,onSubstitutedByClick:d}),l.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 shadow-sm overflow-hidden",children:[l.jsxs("div",{className:"w-full flex items-center justify-between p-5 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 text-xl font-bold text-gray-800 dark:text-gray-200",onClick:()=>_(!w),children:[l.jsx("span",{children:"Detalles"}),l.jsx(Do,{className:I("ml-2 transition-transform duration-1000 text-gray-500 dark:text-gray-300",w?"rotate-180":"rotate-0"),"aria-label":w?"Colapsar":"Expandir"})]}),l.jsx(Nd,{active:w,duration:1e3,children:l.jsxs("div",{className:"flex flex-col p-2 md:p-4 lg:p-6 gap-14 pb-16",children:[e.invoices.length>0&&l.jsx(Rp,{invoices:e.invoices,onInvoiceClick:f}),e.parcels.length>0&&l.jsx(Fp,{parcels:e.parcels,totalPhysicalWeight:e.totalPhysicalWeight,totalDimensionalWeight:e.totalDimensionalWeight,totalChargedWeight:e.totalChargedWeight,totalVolume:e.totalVolume,dimensionalFactor:e.dimensionalFactor,onPrintParcel:b,onPrintShipment:E}),e.items.length>0&&l.jsx(Yp,{items:e.items,subTotalAmount:e.subTotalAmount,vatAmount:e.vatAmount,postalTaxAmount:e.postalTaxAmount,totalAmount:e.totalAmount}),t.length>0&&l.jsx(Gp,{trackings:t,onPublicAppClick:h}),l.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.deliveryDate&&e.deliveryUser&&l.jsx(zp,{user:e.deliveryUser,date:e.deliveryDate,observation:e.deliveryObservation}),r&&l.jsx(qp,{showPOD:n,showInvoice:s,isPhysicalLiability:i,isPhysicalPOD:a,invoiceNumber:o,onShowLiabilityWaiver:p,onDownloadLiabilityWaiver:m,onShowPOD:g,onDownloadPOD:x,onShowInvoiceAttachments:y})]}),l.jsx($p,{shipment:e,wrapperClassName:"h-[30rem]"})]})})]}),l.jsx("div",{className:"mt-2 md:mt-6 w-full flex flex-col gap-4 md:gap-0",children:l.jsxs("div",{className:"w-full flex flex-col-reverse md:flex-row justify-between items-center gap-4",children:[l.jsx("div",{className:"flex flex-col-reverse md:flex-row gap-4 items-center w-full",children:S&&l.jsxs(Ye,{onClick:S,children:[l.jsx(Rd,{className:"w-5 h-5 inline mr-1 mb-0.5"}),"Anular"]})}),l.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-center w-full md:w-fit",children:[k&&l.jsxs(mt,{className:"w-full md:w-36",onClick:k,children:[l.jsx(Uh,{className:"w-4 h-4 inline mr-2"}),"Editar"]}),v&&l.jsxs(mt,{className:"w-full md:w-36",onClick:v,children:[l.jsx(yv,{className:"w-4 h-4 inline mr-2"}),"Entregar"]})]})]})})]})},gd={id:"",label:"Crear nuevo",value:null},yC=[{id:br.PERSON.toString(),label:"Persona",value:br.PERSON},{id:br.BOX_ACCOUNT.toString(),label:"Casillero",value:br.BOX_ACCOUNT}],Zp=({formik:e})=>{const{values:t,touched:r,errors:n,handleBlur:s,setFieldValue:i}=e,[a,o]=u.useState(!1),[c,d]=u.useState(!1),[f,h]=u.useState(""),[p,m]=u.useState(""),g=b=>{if(b.value===null){o(!0);return}i("shipper",b),i("consigneeType",{id:br.PERSON.toString(),label:"Persona",value:br.PERSON}),i("consignee",null)},x=b=>{i("consigneeType",b),i("consignee",null)},y=b=>{if(b.value===null){d(!0);return}i("consignee",b)};return l.jsx("div",{className:"w-full mx-auto",children:l.jsxs("div",{className:"shadow-lg bg-white dark:bg-gray-900 rounded-lg",children:[l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 dark:from-indigo-800 dark:to-indigo-600 p-3",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-2 backdrop-blur-sm",children:l.jsx(oS,{className:"w-5 h-5"})}),l.jsx("h1",{className:"text-lg font-bold",children:"Partes Involucradas"})]})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 w-full gap-4 p-4 md:h-28",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx(St,{required:!0,label:"Remitente",id:"shipper",name:"shipper",placeholder:"Seleccione un remitente",options:[],selected:t.shipper,searchText:f,error:r.shipper&&n.shipper,onSelectOption:g,onBlur:s,setSearchText:h,footerOption:gd}),l.jsxs(wi,{open:a,onClose:()=>o(!1),children:[l.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),l.jsx(ao,{onSubmit:()=>{},onCancel:b=>{o(!1),b.resetForm()}})]})]}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"flex items-center gap-8 pr-2 justify-between text-sm font-medium leading-6 text-gray-700 truncate dark:text-gray-200",children:[l.jsxs("p",{children:["Destinatario ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsx("div",{className:"mb-1",children:l.jsx(Si,{id:"consigneeType",name:"consigneeType",label:"",options:yC,selected:t.consigneeType,disabled:!t.shipper,onSelectOption:x,onBlur:s,wrapperClassName:"flex-row"})})]}),l.jsx("div",{className:"w-full",children:l.jsx(St,{label:"",id:"consignee",name:"consignee",placeholder:"Seleccione un destinatario",options:[],selected:t.consignee,disabled:!t.shipper,searchText:p,error:r.consignee&&n.consignee,onSelectOption:y,onBlur:s,setSearchText:m,footerOption:gd})}),l.jsxs(wi,{open:c,onClose:()=>d(!1),children:[l.jsx("h2",{className:"text-lg font-bold text-gray-900 dark:text-white mb-4",children:"Crear nuevo cliente"}),l.jsx(ao,{onSubmit:()=>{},onCancel:b=>{d(!1),b.resetForm()}})]})]})]})]})})},xC=({formik:e})=>l.jsxs("div",{className:"flex flex-col gap-6",children:[l.jsx(Zp,{formik:e}),l.jsx(Vp,{formik:e})]}),bC=({index:e,shipment:t})=>l.jsxs("div",{className:"flex flex-col gap-8 w-full",children:[l.jsx("div",{className:"overflow-hidden border-none shadow-lg",children:l.jsx("div",{className:"bg-gradient-to-r from-indigo-600 to-indigo-400 p-6 dark:from-indigo-800 dark:to-indigo-600",children:l.jsx("div",{className:"flex relative items-start justify-between",children:l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"rounded-lg bg-indigo-100/20 dark:bg-indigo-300/20 p-3 backdrop-blur-sm hidden md:block",children:l.jsx(Ln,{className:"h-8 w-8"})}),t&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Número de Guía"}),l.jsxs("h1",{className:"text-3xl font-bold tracking-tight",children:[t.shipmentNumber," ",l.jsx("span",{className:"font-normal italic",children:"(Edición)"})]}),l.jsxs("p",{className:"mt-2 text-sm opacity-90",children:["Creación:"," ",$(t.shipmentHeaderDate).format("DD/MM/YYYY, hh:mm A")]})]}),l.jsx(Sn,{color:"default",className:"!text-base absolute top-0 right-0",children:t.status.name})]}),!t&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("p",{className:"mb-1 text-sm font-medium opacity-90",children:"Guía Número"}),l.jsx("h1",{className:"text-3xl font-bold tracking-tight",children:e.toString().padStart(3,"0")})]}),l.jsx(Sn,{color:"primary",className:"!text-base absolute top-0 right-0",children:"Nueva Guía"})]})]})})})}),l.jsx(ks,{initialValues:Pp,onSubmit:()=>{},children:r=>l.jsx(xC,{formik:r})})]}),Js=PE({reducer:{auth:qE}}),wC=(e,t=!1)=>{const r=t?"-":"_";return e.replace(/[A-Z]/g,n=>`${r}${n.toLowerCase()}`)},jn=(e,t=!1)=>Array.isArray(e)?e.map(r=>jn(r)):e!==null&&e.constructor===Object?Object.keys(e).reduce((r,n)=>(r[wC(n,t)]=jn(e[n]),r),{}):e;function EC(e){return e.replace(/([-_][a-z])/gi,t=>t.toUpperCase().replace("-","").replace("_",""))}function Ii(e){if(Array.isArray(e))return e.map(Ii);if(e!==null&&typeof e=="object"){const t={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=EC(r);t[n]=Ii(e[r])}return t}return e}const Kp=(e,t)=>u.useMemo(()=>{const n=Ie.create({baseURL:e});return n.interceptors.request.use(s=>{const i=Js.getState().auth.accessToken;return i&&s.headers&&(s.headers.Authorization=`Bearer ${i}`),s.data&&(s.data=jn(s.data)),s.params&&(s.params=jn(s.params,!0)),s},s=>Promise.reject(s)),n.interceptors.response.use(s=>(s.data&&(s.data=Ii(s.data)),s),async s=>{const i=s.config;if(s.response.status===401&&!i._retry){i._retry=!0;const a=Js.getState().auth.refreshToken;if(a)try{const o=await hh(t,a);if(o.data){const{accessToken:c}=o.data,d=Js.getState().auth;if(d.user)return Js.dispatch($h({user:d.user,...o.data})),i.headers.Authorization=`Bearer ${c}`,Ie(i)}}catch(o){return Promise.reject(o)}}return Promise.reject(s)}),n},[e,t]),Jp=e=>u.useMemo(()=>{const r=Ie.create({baseURL:e,headers:{"Content-Type":"application/json"}});return r.interceptors.request.use(n=>(n.data&&(n.data=jn(n.data)),n.params&&(n.params=jn(n.params,!0)),n),n=>Promise.reject(n)),r.interceptors.response.use(n=>(n.data&&(n.data=Ii(n.data)),n),n=>Promise.reject(n)),r},[e]),SC=({children:e,applicationId:t})=>{const r=Jp("http://localhost:8000/api"),n=Kp("http://localhost:8000/api",r),[s,i]=u.useState(null);return u.useEffect(()=>{(async()=>{const o=await ch(r,t);if(o.error||!o.data){console.error(o.message);return}i(o.data)})()},[t,r]),l.jsx(Pn.Provider,{value:{application:s,googleMapsApiKey:"AIzaSyD0g8yZAA0ZaqaLsrRkGmDQdFbhCEAPdYs",clientId:"docuNxInnND1MUSqVr3ROV8ms986ZRjnbyA77ypt",clientSecret:"0SAgl6C4IsMObrysxXHG6npwGyH8jgIkiMtLoGD6Pchu1tBGPZvIZjmjYmAo3pItBoIqOHipjkQNcI03URn1i7LgtaAsDOHFSdv3suDFz9J3kS8WHMnq0tE1Lg1advs7",api:n,basicApi:r},children:e})};exports.AccountForm=ao;exports.AnimatedCollapse=Nd;exports.AppContext=Pn;exports.AppProvider=SC;exports.AuthContext=Fo;exports.Badge=Sn;exports.Button=Oo;exports.CategoryTypeID=Dp;exports.Checkbox=Fi;exports.ConsigneeType=br;exports.DeliveryTypeID=Ge;exports.ErrorCard=Jn;exports.ForgotPassword=Rw;exports.GoogleMap=tf;exports.InputCheckboxSelect=Jy;exports.InputDate=Xy;exports.InputFile=Qy;exports.InputFileDrop=ex;exports.InputGoogleMap=Tf;exports.InputInteger=Df;exports.InputLocationSelect=ax;exports.InputRadioSelect=Si;exports.InputSelect=St;exports.InputSelectGrouped=ox;exports.InputText=et;exports.InputTextArea=lx;exports.InvoiceStatus=Tp;exports.InvoiceSummary=Ap;exports.InvoiceSummaryList=Rp;exports.InvoiceType=ns;exports.Link=Ye;exports.LoadingSpinner=$i;exports.Login=KE;exports.Modal=wi;exports.ParcelForm=pC;exports.ParcelRow=Ip;exports.ParcelTable=Fp;exports.PaymentModeID=xl;exports.Popover=rf;exports.PopoverMenu=K0;exports.PrimaryButton=mt;exports.SecondaryButton=as;exports.Separator=kn;exports.ServiceID=Xt;exports.ShipmentAccountSummary=ko;exports.ShipmentAddresses=$p;exports.ShipmentAddressesForm=Vp;exports.ShipmentDeliveryData=zp;exports.ShipmentDetails=vC;exports.ShipmentDocument=qp;exports.ShipmentForm=bC;exports.ShipmentItemRow=Wp;exports.ShipmentItemTable=Yp;exports.ShipmentPartiesForm=Zp;exports.ShipmentStatusID=zr;exports.ShipmentSummary=Bp;exports.SideMenu=Zy;exports.Switch=J0;exports.Table=Ui;exports.TrackingRow=Hp;exports.TrackingTable=Gp;exports.WarningCard=nf;exports.getApplication=ch;exports.getCategories=ph;exports.getCountries=dh;exports.getTaxIdentificationTypes=uh;exports.getToken=fh;exports.refreshToken=hh;exports.shipmentInitialValues=Pp;exports.useApi=Kp;exports.useBasicApi=Jp;
|
|
@@ -19478,7 +19478,7 @@ const kO = (e, t) => Ze(() => {
|
|
|
19478
19478
|
(n) => Promise.reject(n)
|
|
19479
19479
|
), r;
|
|
19480
19480
|
}, [e]), lL = ({ children: e, applicationId: t }) => {
|
|
19481
|
-
const r = EO(
|
|
19481
|
+
const r = EO("http://localhost:8000/api"), n = kO("http://localhost:8000/api", r), [s, i] = C(null);
|
|
19482
19482
|
return x(() => {
|
|
19483
19483
|
(async () => {
|
|
19484
19484
|
const o = await dw(r, t);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tealca/core-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.15",
|
|
5
5
|
"description": "A collection of shared UI components for Tealca's applications.",
|
|
6
6
|
"main": "dist/tealca-core-components.cjs.js",
|
|
7
7
|
"module": "dist/tealca-core-components.es.js",
|
|
@@ -72,8 +72,6 @@
|
|
|
72
72
|
"jsdom": "^26.1.0",
|
|
73
73
|
"playwright": "^1.55.0",
|
|
74
74
|
"prettier": "^3.6.2",
|
|
75
|
-
"react": "^18.2.0",
|
|
76
|
-
"react-dom": "^18.2.0",
|
|
77
75
|
"storybook": "^9.1.4",
|
|
78
76
|
"typescript": "~5.8.3",
|
|
79
77
|
"typescript-eslint": "^8.39.1",
|