@budibase/string-templates 2.16.3 → 2.17.0

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.
@@ -0,0 +1,4 @@
1
+ export class JsErrorTimeout extends Error {
2
+ constructor();
3
+ code: string;
4
+ }
@@ -0,0 +1,59 @@
1
+ var De=Object.defineProperty;var sn=Object.getOwnPropertyDescriptor;var fn=Object.getOwnPropertyNames;var on=Object.prototype.hasOwnProperty;var Ue=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Z=(e,t)=>()=>(e&&(t=e(e=0)),t);var U=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),an=(e,t)=>{for(var r in t)De(e,r,{get:t[r],enumerable:!0})},cn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fn(t))!on.call(e,i)&&i!==r&&De(e,i,{get:()=>t[i],enumerable:!(n=sn(t,i))||n.enumerable});return e};var ln=e=>cn(De({},"__esModule",{value:!0}),e);var gt=U((Te,qe)=>{(function(e,t){typeof Te=="object"&&typeof qe<"u"?qe.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Te,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",u="minute",s="hour",f="day",w="week",g="month",l="quarter",x="year",v="date",a="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var h=["th","st","nd","rd"],c=$%100;return"["+$+(h[(c-20)%10]||h[c]||h[0])+"]"}},Y=function($,h,c){var b=String($);return!b||b.length>=h?$:""+Array(h+1-b.length).join(c)+$},F={s:Y,z:function($){var h=-$.utcOffset(),c=Math.abs(h),b=Math.floor(c/60),d=c%60;return(h<=0?"+":"-")+Y(b,2,"0")+":"+Y(d,2,"0")},m:function $(h,c){if(h.date()<c.date())return-$(c,h);var b=12*(c.year()-h.year())+(c.month()-h.month()),d=h.clone().add(b,g),M=c-d<0,j=h.clone().add(b+(M?-1:1),g);return+(-(b+(c-d)/(M?d-j:j-d))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:g,y:x,w,d:f,D:v,h:s,m:u,s:i,ms:n,Q:l}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},q="en",S={};S[q]=I;var p="$isDayjsObject",o=function($){return $ instanceof B||!(!$||!$[p])},D=function $(h,c,b){var d;if(!h)return q;if(typeof h=="string"){var M=h.toLowerCase();S[M]&&(d=M),c&&(S[M]=c,d=M);var j=h.split("-");if(!d&&j.length>1)return $(j[0])}else{var _=h.name;S[_]=h,d=_}return!b&&d&&(q=d),d||!b&&q},N=function($,h){if(o($))return $.clone();var c=typeof h=="object"?h:{};return c.date=$,c.args=arguments,new B(c)},O=F;O.l=D,O.i=o,O.w=function($,h){return N($,{locale:h.$L,utc:h.$u,x:h.$x,$offset:h.$offset})};var B=function(){function $(c){this.$L=D(c.locale,null,!0),this.parse(c),this.$x=this.$x||c.x||{},this[p]=!0}var h=$.prototype;return h.parse=function(c){this.$d=function(b){var d=b.date,M=b.utc;if(d===null)return new Date(NaN);if(O.u(d))return new Date;if(d instanceof Date)return new Date(d);if(typeof d=="string"&&!/Z$/i.test(d)){var j=d.match(T);if(j){var _=j[2]-1||0,H=(j[7]||"0").substring(0,3);return M?new Date(Date.UTC(j[1],_,j[3]||1,j[4]||0,j[5]||0,j[6]||0,H)):new Date(j[1],_,j[3]||1,j[4]||0,j[5]||0,j[6]||0,H)}}return new Date(d)}(c),this.init()},h.init=function(){var c=this.$d;this.$y=c.getFullYear(),this.$M=c.getMonth(),this.$D=c.getDate(),this.$W=c.getDay(),this.$H=c.getHours(),this.$m=c.getMinutes(),this.$s=c.getSeconds(),this.$ms=c.getMilliseconds()},h.$utils=function(){return O},h.isValid=function(){return this.$d.toString()!==a},h.isSame=function(c,b){var d=N(c);return this.startOf(b)<=d&&d<=this.endOf(b)},h.isAfter=function(c,b){return N(c)<this.startOf(b)},h.isBefore=function(c,b){return this.endOf(b)<N(c)},h.$g=function(c,b,d){return O.u(c)?this[b]:this.set(d,c)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(c,b){var d=this,M=!!O.u(b)||b,j=O.p(c),_=function(se,Q){var re=O.w(d.$u?Date.UTC(d.$y,Q,se):new Date(d.$y,Q,se),d);return M?re:re.endOf(f)},H=function(se,Q){return O.w(d.toDate()[se].apply(d.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(Q)),d)},L=this.$W,G=this.$M,K=this.$D,de="set"+(this.$u?"UTC":"");switch(j){case x:return M?_(1,0):_(31,11);case g:return M?_(1,G):_(0,G+1);case w:var ue=this.$locale().weekStart||0,pe=(L<ue?L+7:L)-ue;return _(M?K-pe:K+(6-pe),G);case f:case v:return H(de+"Hours",0);case s:return H(de+"Minutes",1);case u:return H(de+"Seconds",2);case i:return H(de+"Milliseconds",3);default:return this.clone()}},h.endOf=function(c){return this.startOf(c,!1)},h.$set=function(c,b){var d,M=O.p(c),j="set"+(this.$u?"UTC":""),_=(d={},d[f]=j+"Date",d[v]=j+"Date",d[g]=j+"Month",d[x]=j+"FullYear",d[s]=j+"Hours",d[u]=j+"Minutes",d[i]=j+"Seconds",d[n]=j+"Milliseconds",d)[M],H=M===f?this.$D+(b-this.$W):b;if(M===g||M===x){var L=this.clone().set(v,1);L.$d[_](H),L.init(),this.$d=L.set(v,Math.min(this.$D,L.daysInMonth())).$d}else _&&this.$d[_](H);return this.init(),this},h.set=function(c,b){return this.clone().$set(c,b)},h.get=function(c){return this[O.p(c)]()},h.add=function(c,b){var d,M=this;c=Number(c);var j=O.p(b),_=function(G){var K=N(M);return O.w(K.date(K.date()+Math.round(G*c)),M)};if(j===g)return this.set(g,this.$M+c);if(j===x)return this.set(x,this.$y+c);if(j===f)return _(1);if(j===w)return _(7);var H=(d={},d[u]=t,d[s]=r,d[i]=e,d)[j]||1,L=this.$d.getTime()+c*H;return O.w(L,this)},h.subtract=function(c,b){return this.add(-1*c,b)},h.format=function(c){var b=this,d=this.$locale();if(!this.isValid())return d.invalidDate||a;var M=c||"YYYY-MM-DDTHH:mm:ssZ",j=O.z(this),_=this.$H,H=this.$m,L=this.$M,G=d.weekdays,K=d.months,de=d.meridiem,ue=function(Q,re,me,Oe){return Q&&(Q[re]||Q(b,M))||me[re].slice(0,Oe)},pe=function(Q){return O.s(_%12||12,Q,"0")},se=de||function(Q,re,me){var Oe=Q<12?"AM":"PM";return me?Oe.toLowerCase():Oe};return M.replace(E,function(Q,re){return re||function(me){switch(me){case"YY":return String(b.$y).slice(-2);case"YYYY":return O.s(b.$y,4,"0");case"M":return L+1;case"MM":return O.s(L+1,2,"0");case"MMM":return ue(d.monthsShort,L,K,3);case"MMMM":return ue(K,L);case"D":return b.$D;case"DD":return O.s(b.$D,2,"0");case"d":return String(b.$W);case"dd":return ue(d.weekdaysMin,b.$W,G,2);case"ddd":return ue(d.weekdaysShort,b.$W,G,3);case"dddd":return G[b.$W];case"H":return String(_);case"HH":return O.s(_,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return se(_,H,!0);case"A":return se(_,H,!1);case"m":return String(H);case"mm":return O.s(H,2,"0");case"s":return String(b.$s);case"ss":return O.s(b.$s,2,"0");case"SSS":return O.s(b.$ms,3,"0");case"Z":return j}return null}(Q)||j.replace(":","")})},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(c,b,d){var M,j=this,_=O.p(b),H=N(c),L=(H.utcOffset()-this.utcOffset())*t,G=this-H,K=function(){return O.m(j,H)};switch(_){case x:M=K()/12;break;case g:M=K();break;case l:M=K()/3;break;case w:M=(G-L)/6048e5;break;case f:M=(G-L)/864e5;break;case s:M=G/r;break;case u:M=G/t;break;case i:M=G/e;break;default:M=G}return d?M:O.a(M)},h.daysInMonth=function(){return this.endOf(g).$D},h.$locale=function(){return S[this.$L]},h.locale=function(c,b){if(!c)return this.$L;var d=this.clone(),M=D(c,b,!0);return M&&(d.$L=M),d},h.clone=function(){return O.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},$}(),J=B.prototype;return N.prototype=J,[["$ms",n],["$s",i],["$m",u],["$H",s],["$W",f],["$M",g],["$y",x],["$D",v]].forEach(function($){J[$[1]]=function(h){return this.$g(h,$[0],$[1])}}),N.extend=function($,h){return $.$i||($(h,B,N),$.$i=!0),N},N.locale=D,N.isDayjs=o,N.unix=function($){return N(1e3*$)},N.en=S[q],N.Ls=S,N.p={},N})});var yt=U((Ye,Ce)=>{(function(e,t){typeof Ye=="object"&&typeof Ce<"u"?Ce.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=t()})(Ye,function(){"use strict";var e,t,r=1e3,n=6e4,i=36e5,u=864e5,s=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f=31536e6,w=2628e6,g=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l={years:f,months:w,days:u,hours:i,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},x=function(S){return S instanceof F},v=function(S,p,o){return new F(S,o,p.$l)},a=function(S){return t.p(S)+"s"},T=function(S){return S<0},E=function(S){return T(S)?Math.ceil(S):Math.floor(S)},I=function(S){return Math.abs(S)},Y=function(S,p){return S?T(S)?{negative:!0,format:""+I(S)+p}:{negative:!1,format:""+S+p}:{negative:!1,format:""}},F=function(){function S(o,D,N){var O=this;if(this.$d={},this.$l=N,o===void 0&&(this.$ms=0,this.parseFromMilliseconds()),D)return v(o*l[a(D)],this);if(typeof o=="number")return this.$ms=o,this.parseFromMilliseconds(),this;if(typeof o=="object")return Object.keys(o).forEach(function($){O.$d[a($)]=o[$]}),this.calMilliseconds(),this;if(typeof o=="string"){var B=o.match(g);if(B){var J=B.slice(2).map(function($){return $!=null?Number($):0});return this.$d.years=J[0],this.$d.months=J[1],this.$d.weeks=J[2],this.$d.days=J[3],this.$d.hours=J[4],this.$d.minutes=J[5],this.$d.seconds=J[6],this.calMilliseconds(),this}}return this}var p=S.prototype;return p.calMilliseconds=function(){var o=this;this.$ms=Object.keys(this.$d).reduce(function(D,N){return D+(o.$d[N]||0)*l[N]},0)},p.parseFromMilliseconds=function(){var o=this.$ms;this.$d.years=E(o/f),o%=f,this.$d.months=E(o/w),o%=w,this.$d.days=E(o/u),o%=u,this.$d.hours=E(o/i),o%=i,this.$d.minutes=E(o/n),o%=n,this.$d.seconds=E(o/r),o%=r,this.$d.milliseconds=o},p.toISOString=function(){var o=Y(this.$d.years,"Y"),D=Y(this.$d.months,"M"),N=+this.$d.days||0;this.$d.weeks&&(N+=7*this.$d.weeks);var O=Y(N,"D"),B=Y(this.$d.hours,"H"),J=Y(this.$d.minutes,"M"),$=this.$d.seconds||0;this.$d.milliseconds&&($+=this.$d.milliseconds/1e3,$=Math.round(1e3*$)/1e3);var h=Y($,"S"),c=o.negative||D.negative||O.negative||B.negative||J.negative||h.negative,b=B.format||J.format||h.format?"T":"",d=(c?"-":"")+"P"+o.format+D.format+O.format+b+B.format+J.format+h.format;return d==="P"||d==="-P"?"P0D":d},p.toJSON=function(){return this.toISOString()},p.format=function(o){var D=o||"YYYY-MM-DDTHH:mm:ss",N={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return D.replace(s,function(O,B){return B||String(N[O])})},p.as=function(o){return this.$ms/l[a(o)]},p.get=function(o){var D=this.$ms,N=a(o);return N==="milliseconds"?D%=1e3:D=N==="weeks"?E(D/l[N]):this.$d[N],D||0},p.add=function(o,D,N){var O;return O=D?o*l[a(D)]:x(o)?o.$ms:v(o,this).$ms,v(this.$ms+O*(N?-1:1),this)},p.subtract=function(o,D){return this.add(o,D,!0)},p.locale=function(o){var D=this.clone();return D.$l=o,D},p.clone=function(){return v(this.$ms,this)},p.humanize=function(o){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!o)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},S}(),q=function(S,p,o){return S.add(p.years()*o,"y").add(p.months()*o,"M").add(p.days()*o,"d").add(p.hours()*o,"h").add(p.minutes()*o,"m").add(p.seconds()*o,"s").add(p.milliseconds()*o,"ms")};return function(S,p,o){e=o,t=o().$utils(),o.duration=function(O,B){var J=o.locale();return v(O,{$l:J},B)},o.isDuration=x;var D=p.prototype.add,N=p.prototype.subtract;p.prototype.add=function(O,B){return x(O)?q(this,O,1):D.bind(this)(O,B)},p.prototype.subtract=function(O,B){return x(O)?q(this,O,-1):N.bind(this)(O,B)}}})});var vt=U((Ee,Ie)=>{(function(e,t){typeof Ee=="object"&&typeof Ie<"u"?Ie.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=t()})(Ee,function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(i){var u=this,s=this.$locale();if(!this.isValid())return n.bind(this)(i);var f=this.$utils(),w=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(g){switch(g){case"Q":return Math.ceil((u.$M+1)/3);case"Do":return s.ordinal(u.$D);case"gggg":return u.weekYear();case"GGGG":return u.isoWeekYear();case"wo":return s.ordinal(u.week(),"W");case"w":case"ww":return f.s(u.week(),g==="w"?1:2,"0");case"W":case"WW":return f.s(u.isoWeek(),g==="W"?1:2,"0");case"k":case"kk":return f.s(String(u.$H===0?24:u.$H),g==="k"?1:2,"0");case"X":return Math.floor(u.$d.getTime()/1e3);case"x":return u.$d.getTime();case"z":return"["+u.offsetName()+"]";case"zzz":return"["+u.offsetName("long")+"]";default:return g}});return n.bind(this)(w)}}})});var $t=U((_e,We)=>{(function(e,t){typeof _e=="object"&&typeof We<"u"?We.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=t()})(_e,function(){"use strict";var e="day";return function(t,r,n){var i=function(f){return f.add(4-f.isoWeekday(),e)},u=r.prototype;u.isoWeekYear=function(){return i(this).year()},u.isoWeek=function(f){if(!this.$utils().u(f))return this.add(7*(f-this.isoWeek()),e);var w,g,l,x,v=i(this),a=(w=this.isoWeekYear(),g=this.$u,l=(g?n.utc:n)().year(w).startOf("year"),x=4-l.isoWeekday(),l.isoWeekday()>4&&(x+=7),l.add(x,e));return v.diff(a,"week")+1},u.isoWeekday=function(f){return this.$utils().u(f)?this.day()||7:this.day(this.day()%7?f:f-7)};var s=u.startOf;u.startOf=function(f,w){var g=this.$utils(),l=!!g.u(w)||w;return g.p(f)==="isoweek"?l?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(f,w)}}})});var bt=U((Fe,He)=>{(function(e,t){typeof Fe=="object"&&typeof He<"u"?He.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_weekYear=t()})(Fe,function(){"use strict";return function(e,t){t.prototype.weekYear=function(){var r=this.month(),n=this.week(),i=this.year();return n===1&&r===11?i+1:r===0&&n>=52?i-1:i}}})});var wt=U((Be,Le)=>{(function(e,t){typeof Be=="object"&&typeof Le<"u"?Le.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_weekOfYear=t()})(Be,function(){"use strict";var e="week",t="year";return function(r,n,i){var u=n.prototype;u.week=function(s){if(s===void 0&&(s=null),s!==null)return this.add(7*(s-this.week()),"day");var f=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var w=i(this).startOf(t).add(1,t).date(f),g=i(this).endOf(e);if(w.isBefore(g))return 1}var l=i(this).startOf(t).date(f).startOf(e).subtract(1,"millisecond"),x=this.diff(l,e,!0);return x<0?i(this).startOf("week").week():Math.ceil(x)},u.weeks=function(s){return s===void 0&&(s=null),this.week(s)}}})});var Ot=U((ze,Pe)=>{(function(e,t){typeof ze=="object"&&typeof Pe<"u"?Pe.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_relativeTime=t()})(ze,function(){"use strict";return function(e,t,r){e=e||{};var n=t.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(f,w,g,l){return n.fromToBase(f,w,g,l)}r.en.relativeTime=i,n.fromToBase=function(f,w,g,l,x){for(var v,a,T,E=g.$locale().relativeTime||i,I=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Y=I.length,F=0;F<Y;F+=1){var q=I[F];q.d&&(v=l?r(f).diff(g,q.d,!0):g.diff(f,q.d,!0));var S=(e.rounding||Math.round)(Math.abs(v));if(T=v>0,S<=q.r||!q.r){S<=1&&F>0&&(q=I[F-1]);var p=E[q.l];x&&(S=x(""+S)),a=typeof p=="string"?p.replace("%d",S):p(S,w,q.l,T);break}}if(w)return a;var o=T?E.future:E.past;return typeof o=="function"?o(a):o.replace("%s",a)},n.to=function(f,w){return u(f,w,this,!0)},n.from=function(f,w){return u(f,w,this)};var s=function(f){return f.$u?r.utc():r()};n.toNow=function(f){return this.to(s(this),f)},n.fromNow=function(f){return this.from(s(this),f)}}})});var xt=U((Re,Je)=>{(function(e,t){typeof Re=="object"&&typeof Je<"u"?Je.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Re,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,u){var s=i.prototype;u.utc=function(a){var T={date:a,utc:!0,args:arguments};return new i(T)},s.utc=function(a){var T=u(this.toDate(),{locale:this.$L,utc:!0});return a?T.add(this.utcOffset(),e):T},s.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var f=s.parse;s.parse=function(a){a.utc&&(this.$u=!0),this.$utils().u(a.$offset)||(this.$offset=a.$offset),f.call(this,a)};var w=s.init;s.init=function(){if(this.$u){var a=this.$d;this.$y=a.getUTCFullYear(),this.$M=a.getUTCMonth(),this.$D=a.getUTCDate(),this.$W=a.getUTCDay(),this.$H=a.getUTCHours(),this.$m=a.getUTCMinutes(),this.$s=a.getUTCSeconds(),this.$ms=a.getUTCMilliseconds()}else w.call(this)};var g=s.utcOffset;s.utcOffset=function(a,T){var E=this.$utils().u;if(E(a))return this.$u?0:E(this.$offset)?g.call(this):this.$offset;if(typeof a=="string"&&(a=function(q){q===void 0&&(q="");var S=q.match(t);if(!S)return null;var p=(""+S[0]).match(r)||["-",0,0],o=p[0],D=60*+p[1]+ +p[2];return D===0?0:o==="+"?D:-D}(a),a===null))return this;var I=Math.abs(a)<=16?60*a:a,Y=this;if(T)return Y.$offset=I,Y.$u=a===0,Y;if(a!==0){var F=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(Y=this.local().add(I+F,e)).$offset=I,Y.$x.$localOffset=F}else Y=this.utc();return Y};var l=s.format;s.format=function(a){var T=a||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,T)},s.valueOf=function(){var a=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*a},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var x=s.toDate;s.toDate=function(a){return a==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():x.call(this)};var v=s.diff;s.diff=function(a,T,E){if(a&&this.$u===a.$u)return v.call(this,a,T,E);var I=this.local(),Y=u(a).local();return v.call(I,Y,T,E)}}})});var St=U((Ge,Ze)=>{(function(e,t){typeof Ge=="object"&&typeof Ze<"u"?Ze.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Ge,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,i){var u,s=function(l,x,v){v===void 0&&(v={});var a=new Date(l),T=function(E,I){I===void 0&&(I={});var Y=I.timeZoneName||"short",F=E+"|"+Y,q=t[F];return q||(q=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:E,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:Y}),t[F]=q),q}(x,v);return T.formatToParts(a)},f=function(l,x){for(var v=s(l,x),a=[],T=0;T<v.length;T+=1){var E=v[T],I=E.type,Y=E.value,F=e[I];F>=0&&(a[F]=parseInt(Y,10))}var q=a[3],S=q===24?0:q,p=a[0]+"-"+a[1]+"-"+a[2]+" "+S+":"+a[4]+":"+a[5]+":000",o=+l;return(i.utc(p).valueOf()-(o-=o%1e3))/6e4},w=n.prototype;w.tz=function(l,x){l===void 0&&(l=u);var v=this.utcOffset(),a=this.toDate(),T=a.toLocaleString("en-US",{timeZone:l}),E=Math.round((a-new Date(T))/1e3/60),I=i(T,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(a.getTimezoneOffset()/15)-E,!0);if(x){var Y=I.utcOffset();I=I.add(v-Y,"minute")}return I.$x.$timezone=l,I},w.offsetName=function(l){var x=this.$x.$timezone||i.tz.guess(),v=s(this.valueOf(),x,{timeZoneName:l}).find(function(a){return a.type.toLowerCase()==="timezonename"});return v&&v.value};var g=w.startOf;w.startOf=function(l,x){if(!this.$x||!this.$x.$timezone)return g.call(this,l,x);var v=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return g.call(v,l,x).tz(this.$x.$timezone,!0)},i.tz=function(l,x,v){var a=v&&x,T=v||x||u,E=f(+i(),T);if(typeof l!="string")return i(l).tz(T);var I=function(S,p,o){var D=S-60*p*1e3,N=f(D,o);if(p===N)return[D,p];var O=f(D-=60*(N-p)*1e3,o);return N===O?[D,N]:[S-60*Math.min(N,O)*1e3,Math.max(N,O)]}(i.utc(l,a).valueOf(),E,T),Y=I[0],F=I[1],q=i(Y).utcOffset(F);return q.$x.$timezone=T,q},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(l){u=l}}})});var Mt=U((ki,Ke)=>{var X=gt();X.extend(yt());X.extend(vt());X.extend($t());X.extend(bt());X.extend(wt());X.extend(Ot());X.extend(xt());X.extend(St());function fe(e){return typeof e=="object"&&typeof e.hash=="object"}function Ve(e){return typeof e=="object"&&typeof e.options=="object"&&typeof e.app=="object"}function Qe(e,t,r){if(fe(e))return Qe({},t,e);if(fe(t))return Qe(e,r,t);let n=Ve(e)?e.context:{};r=r||{},fe(r)||(t=Object.assign({},t,r)),fe(r)&&r.hash.root===!0&&(t=Object.assign({},r.data.root,t));let i=Object.assign({},n,t,r.hash);return Ve(e)||(i=Object.assign({},e,i)),Ve(e)&&e.view&&e.view.data&&(i=Object.assign({},i,e.view.data)),i}function Xe(e,t,r){return fe(t)&&(r=t,t=null),fe(e)&&(r=e,t=null,e=null),{str:e,pattern:t,options:r}}function Nt(e,t,r){let n=Xe(e,t,r),i={lang:"en",date:new Date(n.str)},u=Qe(this,i,{});X.locale(u.lang||u.language)}Ke.exports.date=(e,t,r)=>{let n=Xe(e,t,r);if(n.str==null&&n.pattern==null)return X.locale("en"),X().format("MMMM DD, YYYY");Nt(n.str,n.pattern,n.options);let i=X(new Date(n.str));return typeof n.options=="string"?i=n.options.toLowerCase()==="utc"?i.utc():i.tz(n.options):i=i.tz(X.tz.guess()),n.pattern===""?i.toISOString():i.format(n.pattern)};Ke.exports.duration=(e,t,r)=>{let n=Xe(e,t);Nt(n.str,n.pattern);let i=X.duration(n.str,n.pattern);return r&&!fe(r)?i.format(r):i.humanize()}});var et=U((Di,At)=>{At.exports=function(e){return e!=null&&(jt(e)||dn(e)||!!e._isBuffer)};function jt(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function dn(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&jt(e.slice(0,0))}});var Dt=U((Ui,kt)=>{var hn=et(),pn=Object.prototype.toString;kt.exports=function(t){if(typeof t>"u")return"undefined";if(t===null)return"null";if(t===!0||t===!1||t instanceof Boolean)return"boolean";if(typeof t=="string"||t instanceof String)return"string";if(typeof t=="number"||t instanceof Number)return"number";if(typeof t=="function"||t instanceof Function)return"function";if(typeof Array.isArray<"u"&&Array.isArray(t))return"array";if(t instanceof RegExp)return"regexp";if(t instanceof Date)return"date";var r=pn.call(t);return r==="[object RegExp]"?"regexp":r==="[object Date]"?"date":r==="[object Arguments]"?"arguments":r==="[object Error]"?"error":hn(t)?"buffer":r==="[object Set]"?"set":r==="[object WeakSet]"?"weakset":r==="[object Map]"?"map":r==="[object WeakMap]"?"weakmap":r==="[object Symbol]"?"symbol":r==="[object Int8Array]"?"int8array":r==="[object Uint8Array]"?"uint8array":r==="[object Uint8ClampedArray]"?"uint8clampedarray":r==="[object Int16Array]"?"int16array":r==="[object Uint16Array]"?"uint16array":r==="[object Int32Array]"?"int32array":r==="[object Uint32Array]"?"uint32array":r==="[object Float32Array]"?"float32array":r==="[object Float64Array]"?"float64array":"object"}});var Yt=U((Ti,qt)=>{"use strict";var Ut=Dt(),Tt={arguments:"an arguments object",array:"an array",boolean:"a boolean",buffer:"a buffer",date:"a date",error:"an error",float32array:"a float32array",float64array:"a float64array",function:"a function",int16array:"an int16array",int32array:"an int32array",int8array:"an int8array",map:"a Map",null:"null",number:"a number",object:"an object",regexp:"a regular expression",set:"a Set",string:"a string",symbol:"a symbol",uint16array:"an uint16array",uint32array:"an uint32array",uint8array:"an uint8array",uint8clampedarray:"an uint8clampedarray",undefined:"undefined",weakmap:"a WeakMap",weakset:"a WeakSet"};function tt(e){return Tt[Ut(e)]}tt.types=Tt;tt.typeOf=Ut;qt.exports=tt});var xe=U((qi,Et)=>{var mn=Object.prototype.toString;Et.exports=function(t){if(t===void 0)return"undefined";if(t===null)return"null";var r=typeof t;if(r==="boolean")return"boolean";if(r==="string")return"string";if(r==="number")return"number";if(r==="symbol")return"symbol";if(r==="function")return bn(t)?"generatorfunction":"function";if(gn(t))return"array";if(xn(t))return"buffer";if(On(t))return"arguments";if(vn(t))return"date";if(yn(t))return"error";if($n(t))return"regexp";switch(Ct(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(wn(t))return"generator";switch(r=mn.call(t),r){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return r.slice(8,-1).toLowerCase().replace(/\s/g,"")};function Ct(e){return typeof e.constructor=="function"?e.constructor.name:null}function gn(e){return Array.isArray?Array.isArray(e):e instanceof Array}function yn(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function vn(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function $n(e){return e instanceof RegExp?!0:typeof e.flags=="string"&&typeof e.ignoreCase=="boolean"&&typeof e.multiline=="boolean"&&typeof e.global=="boolean"}function bn(e,t){return Ct(e)==="GeneratorFunction"}function wn(e){return typeof e.throw=="function"&&typeof e.return=="function"&&typeof e.next=="function"}function On(e){try{if(typeof e.length=="number"&&typeof e.callee=="function")return!0}catch(t){if(t.message.indexOf("callee")!==-1)return!0}return!1}function xn(e){return e.constructor&&typeof e.constructor.isBuffer=="function"?e.constructor.isBuffer(e):!1}});var ee=U((Wt,Ft)=>{"use strict";var Sn=Ue("util"),It=Yt(),Nn=xe(),m=Wt=Ft.exports;m.extend=_t;m.indexOf=Un;m.escapeExpression=Tn;m.isEmpty=En;m.createFrame=qn;m.blockParams=Yn;m.appendContextPath=Cn;var Mn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},jn=/[&<>"'`=]/g,An=/[&<>"'`=]/;function kn(e){return Mn[e]}function _t(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}var nt=Object.prototype.toString;m.toString=nt;var rt=function(t){return typeof t=="function"};rt(/x/)&&(m.isFunction=rt=function(e){return typeof e=="function"&&nt.call(e)==="[object Function]"});m.isFunction=rt;var Dn=Array.isArray||function(e){return e&&typeof e=="object"?nt.call(e)==="[object Array]":!1};m.isArray=Dn;function Un(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Tn(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return An.test(e)?e.replace(jn,kn):e}function qn(e){var t=_t({},e);return t._parent=e,t}function Yn(e,t){return e.path=t,e}function Cn(e,t){return(e?e+".":"")+t}m.expectedType=function(e,t,r){var n=It.types[t],i=Sn.inspect(r);return"expected "+e+" to be "+n+" but received "+It(r)+": "+i};m.isBlock=function(e){return m.isOptions(e)&&typeof e.fn=="function"&&typeof e.inverse=="function"};m.fn=function(e,t,r){return m.isOptions(e)?m.fn("",e,r):m.isOptions(t)?m.fn(e,{},t):m.isBlock(r)?r.fn(t):e};m.inverse=function(e,t,r){return m.isOptions(e)?m.identity("",e,r):m.isOptions(t)?m.inverse(e,{},t):m.isBlock(r)?r.inverse(t):e};m.value=function(e,t,r){return m.isOptions(e)?m.value(null,e,r):m.isOptions(t)?m.value(e,{},t):m.isBlock(r)?e?r.fn(t):r.inverse(t):e};m.isOptions=function(e){return m.isObject(e)&&m.isObject(e.hash)};m.isUndefined=function(e){return e==null||m.isOptions(e)&&e.hash!=null};m.isApp=function(e){return m.isObject(e)&&m.isObject(e.options)&&m.isObject(e.app)};m.options=function(e,t,r){if(m.isOptions(e))return m.options({},t,e);if(m.isOptions(t))return m.options(e,r,t);r=r||{},m.isOptions(r)||(t=Object.assign({},t,r));var n=Object.assign({},t,r.hash);return m.isObject(e)&&(n=Object.assign({},e.options,n)),n[r.name]&&(n=Object.assign({},n[r.name],n)),n};m.context=function(e,t,r){if(m.isOptions(e))return m.context({},t,e);if(m.isOptions(t))return m.context(e,r,t);var n=m.isApp(e)?e.context:{};r=r||{},m.isOptions(r)||(t=Object.assign({},t,r)),m.isOptions(r)&&r.hash.root===!0&&(t=Object.assign({},r.data.root,t));var i=Object.assign({},n,t,r.hash);return m.isApp(e)||(i=Object.assign({},e,i)),m.isApp(e)&&e.view&&e.view.data&&(i=Object.assign({},i,e.view.data)),i};m.isObject=function(e){return Nn(e)==="object"};function En(e){return e===0||typeof e=="boolean"?!1:e==null||(m.isObject(e)&&(e=Object.keys(e)),!e.length)}m.result=function(e){return typeof e=="function"?e.apply(this,[].slice.call(arguments,1)):e};m.identity=function(e){return e};m.isString=function(e){return typeof e=="string"&&e!==""};m.arrayify=function(e){return e!=null?Array.isArray(e)?e:[e]:[]};m.tryParse=function(e){try{return JSON.parse(e)}catch{}return{}}});var Se=U(he=>{"use strict";var In=ee();he.contains=function(e,t,r){return e==null||t==null||isNaN(e.length)?!1:e.indexOf(t,r)!==-1};he.chop=function(e){if(typeof e!="string")return"";var t=/^[-_.\W\s]+|[-_.\W\s]+$/g;return e.trim().replace(t,"")};he.changecase=function(e,t){if(typeof e!="string")return"";if(e.length===1)return e.toLowerCase();e=he.chop(e).toLowerCase(),typeof t!="function"&&(t=In.identity);var r=/[-_.\W\s]+(\w|$)/g;return e.replace(r,function(n,i){return t(i)})};he.random=function(e,t){return e+Math.floor(Math.random()*(t-e+1))}});var Bt=U((Ci,Ht)=>{"use strict";var _n=Se(),V=Ht.exports;V.abs=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.abs(e)};V.add=function(e,t){return!isNaN(e)&&!isNaN(t)?Number(e)+Number(t):typeof e=="string"&&typeof t=="string"?e+t:""};V.avg=function(){let e=[].concat.apply([],arguments);return e.pop(),V.sum(e)/e.length};V.ceil=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.ceil(e)};V.divide=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)/Number(t)};V.floor=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.floor(e)};V.minus=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)-Number(t)};V.modulo=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)%Number(t)};V.multiply=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)*Number(t)};V.plus=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)+Number(t)};V.random=function(e,t){if(isNaN(e))throw new TypeError("expected minimum to be a number");if(isNaN(t))throw new TypeError("expected maximum to be a number");return _n.random(e,t)};V.remainder=function(e,t){return e%t};V.round=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.round(e)};V.subtract=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)-Number(t)};V.sum=function(){for(var e=[].concat.apply([],arguments),t=e.length,r=0;t--;)isNaN(e[t])||(r+=Number(e[t]));return r}});var zt=U((Ei,Lt)=>{"use strict";Lt.exports=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}});var Ne=U((Ii,Gt)=>{var Jt=zt();Gt.exports=function(e,t,r){if(Jt(r)||(r={default:r}),!Rt(e))return typeof r.default<"u"?r.default:e;typeof t=="number"&&(t=String(t));let n=Array.isArray(t),i=typeof t=="string",u=r.separator||".",s=r.joinChar||(typeof u=="string"?u:".");if(!i&&!n)return e;if(i&&t in e)return it(t,e,r)?e[t]:r.default;let f=n?t:Wn(t,u,r),w=f.length,g=0;do{let l=f[g];for(typeof l=="number"&&(l=String(l));l&&l.slice(-1)==="\\";)l=Pt([l.slice(0,-1),f[++g]||""],s,r);if(l in e){if(!it(l,e,r))return r.default;e=e[l]}else{let x=!1,v=g+1;for(;v<w;)if(l=Pt([l,f[v++]],s,r),x=l in e){if(!it(l,e,r))return r.default;e=e[l],g=v-1;break}if(!x)return r.default}}while(++g<w&&Rt(e));return g===w?e:r.default};function Pt(e,t,r){return typeof r.join=="function"?r.join(e):e[0]+t+e[1]}function Wn(e,t,r){return typeof r.split=="function"?r.split(e):e.split(t)}function it(e,t,r){return typeof r.isValid=="function"?r.isValid(e,t):!0}function Rt(e){return Jt(e)||Array.isArray(e)||typeof e=="function"}});var ut=U((_i,Zt)=>{"use strict";Zt.exports=function(t){if(typeof t!="object")throw new TypeError("createFrame expects data to be an object");var r=Object.assign({},t);if(r._parent=t,r.extend=function(s){Object.assign(this,s)},arguments.length>1)for(var n=[].slice.call(arguments,1),i=n.length,u=-1;++u<i;)r.extend(n[u]||{});return r}});var Me=U((Wi,Vt)=>{"use strict";var y=ee(),C=Vt.exports,oe=Ne(),Fn=ut();C.after=function(e,t){return y.isUndefined(e)?"":(e=y.result(e),Array.isArray(e)?e.slice(t):"")};C.arrayify=function(e){return y.isUndefined(e)?[]:e?Array.isArray(e)?e:[e]:[]};C.before=function(e,t){return y.isUndefined(e)?"":(e=y.result(e),Array.isArray(e)?e.slice(0,t-1):"")};C.eachIndex=function(e,t){var r="";if(y.isUndefined(e))return"";if(e=y.result(e),Array.isArray(e))for(var n=0;n<e.length;n++)r+=t.fn({item:e[n],index:n});return r};C.filter=function(e,t,r){if(y.isUndefined(e))return r.inverse(this);if(e=y.result(e),Array.isArray(e)){var n="",i=[],u=r.hash&&(r.hash.property||r.hash.prop);if(u?i=e.filter(function(f){return t===oe(f,u)}):i=e.filter(function(f){return t===f}),i&&i.length>0){for(var s=0;s<i.length;s++)n+=r.fn(i[s]);return n}}return r.inverse(this)};C.first=function(e,t){return y.isUndefined(e)?[]:(e=y.result(e),Array.isArray(e)?isNaN(t)?e[0]:e.slice(0,t):[])};C.forEach=function(e,t){if(y.isUndefined(e))return t.inverse(this);if(e=y.result(e),Array.isArray(e)){for(var r=Fn(t,t.hash),n=e.length,i="",u=-1;++u<n;){var s=e[u];r.index=u,s.index=u+1,s.total=n,s.isFirst=u===0,s.isLast=u===n-1,i+=t.fn(s,{data:r})}return i}return t.inverse(this)};C.inArray=function(e,t,r){return y.isUndefined(e)?"":(e=y.result(e),Array.isArray(e)?y.value(y.indexOf(e,t)>-1,this,r):"")};C.isArray=function(e){return Array.isArray(e)};C.itemAt=function(e,t){if(y.isUndefined(e))return null;if(e=y.result(e),Array.isArray(e)){if(t=isNaN(t)?0:+t,t<0)return e[e.length+t];if(t<e.length)return e[t]}return null};C.join=function(e,t){return y.isUndefined(e)?"":typeof e=="string"?e:(e=y.result(e),Array.isArray(e)?(t=y.isString(t)?t:", ",e.join(t)):"")};C.equalsLength=function(e,t,r){y.isOptions(t)&&(r=t,t=0);var n=C.length(e);return y.value(n===t,this,r)};C.last=function(e,t){return y.isUndefined(e)||!Array.isArray(e)&&typeof value!="string"?"":isNaN(t)?e[e.length-1]:e.slice(-Math.abs(t))};C.length=function(e){return y.isUndefined(e)?0:(y.isObject(e)&&!y.isOptions(e)&&(e=Object.keys(e)),typeof e=="string"&&e.startsWith("[")&&e.endsWith("]")?e.split(",").length:typeof e=="string"||Array.isArray(e)?e.length:0)};C.lengthEqual=C.equalsLength;C.map=function(e,t){if(y.isUndefined(e)||!Array.isArray(e))return"";var r=e.length,n=new Array(r),i=-1;if(typeof t!="function")return e;for(;++i<r;)n[i]=t(e[i],i,e);return n};C.pluck=function(e,t){if(y.isUndefined(e))return"";if(e=y.result(e),Array.isArray(e)){for(var r=[],n=0;n<e.length;n++){var i=oe(e[n],t);typeof i<"u"&&r.push(i)}return r}return""};C.reverse=function(e){return y.isUndefined(e)?"":(e=y.result(e),Array.isArray(e)?(e.reverse(),e):e&&typeof e=="string"?e.split("").reverse().join(""):"")};C.some=function(e,t,r){if(y.isUndefined(e))return r.inverse(this);if(e=y.result(e),Array.isArray(e)){for(var n=0;n<e.length;n++)if(t(e[n],n,e))return r.fn(this)}return r.inverse(this)};C.sort=function(e,t){return y.isUndefined(e)?"":(e=y.result(e),Array.isArray(e)?oe(t,"hash.reverse")?e.sort().reverse():e.sort():"")};C.sortBy=function(e,t,r){if(y.isUndefined(e))return"";if(e=y.result(e),Array.isArray(e)){var n=[].slice.call(arguments);return n.pop(),!y.isString(t)&&typeof t!="function"?e.sort():typeof t=="function"?e.sort(t):e.sort((i,u)=>i[t]>u[t]?1:-1)}return""};C.withAfter=function(e,t,r){if(y.isUndefined(e))return"";if(e=y.result(e),Array.isArray(e)){e=e.slice(t);for(var n="",i=0;i<e.length;i++)n+=r.fn(e[i]);return n}return""};C.withBefore=function(e,t,r){if(y.isUndefined(e))return"";if(e=y.result(e),Array.isArray(e)){e=e.slice(0,-t);for(var n="",i=0;i<e.length;i++)n+=r.fn(e[i]);return n}return""};C.withFirst=function(e,t,r){if(y.isUndefined(e))return"";if(e=y.result(e),Array.isArray(e)){if(y.isUndefined(t)||(t=parseFloat(y.result(t))),y.isUndefined(t))return r=t,r.fn(e[0]);e=e.slice(0,t);for(var n="",i=0;i<e.length;i++)n+=r.fn(e[i]);return n}return""};C.withGroup=function(e,t,r){if(y.isUndefined(e))return"";var n="";if(e=y.result(e),Array.isArray(e)&&e.length>0){for(var i=[],u=0;u<e.length;u++)u>0&&u%t===0&&(n+=r.fn(i),i=[]),i.push(e[u]);n+=r.fn(i)}return n};C.withLast=function(e,t,r){if(y.isUndefined(e))return"";if(e=y.result(e),Array.isArray(e)){if(y.isUndefined(t)||(t=parseFloat(y.result(t))),y.isUndefined(t))return r=t,r.fn(e[e.length-1]);e=e.slice(-t);for(var n=e.length,i=-1,u="";++i<n;)u+=r.fn(e[i]);return u}return""};C.withSort=function(e,t,r){if(y.isUndefined(e))return"";if(e=y.result(e),Array.isArray(e)){var n="";if(y.isUndefined(t)){r=t,e=e.sort(),oe(r,"hash.reverse")&&(e=e.reverse());for(var i=0,u=e.length;i<u;i++)n+=r.fn(e[i]);return n}e.sort(function(w,g){return w=oe(w,t),g=oe(g,t),w>g?1:w<g?-1:0}),oe(r,"hash.reverse")&&(e=e.reverse());for(var s=e.length,f=-1;++f<s;)n+=r.fn(e[f]);return n}return""};C.unique=function(e,t){return y.isUndefined(e)?"":(e=y.result(e),Array.isArray(e)?e.filter(function(r,n,i){return i.indexOf(r)===n}):"")}});var Kt=U((Fi,Xt)=>{"use strict";var Qt=ee(),te=Xt.exports;te.bytes=function(e,t,r){if(e==null||isNaN(e)&&(e=e.length,!e))return"0 B";isNaN(t)&&(t=2);var n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"];t=Math.pow(10,t),e=Number(e);for(var i=n.length-1;i-->=0;){var u=Math.pow(10,i*3);if(u<=e+1){e=Math.round(e*t/u)/t,e+=" "+n[i];break}}return e};te.addCommas=function(e){return e.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")};te.phoneNumber=function(e){return e=e.toString(),"("+e.substr(0,3)+") "+e.substr(3,3)+"-"+e.substr(6,4)};te.toAbbr=function(e,t){isNaN(e)&&(e=0),Qt.isUndefined(t)&&(t=2),e=Number(e),t=Math.pow(10,t);for(var r=["k","m","b","t","q"],n=r.length-1;n>=0;){var i=Math.pow(10,(n+1)*3);if(i<=e+1){e=Math.round(e*t/i)/t,e+=r[n];break}n--}return e};te.toExponential=function(e,t){return isNaN(e)&&(e=0),Qt.isUndefined(t)&&(t=0),Number(e).toExponential(t)};te.toFixed=function(e,t){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),Number(e).toFixed(t)};te.toFloat=function(e){return parseFloat(e)};te.toInt=function(e){return parseInt(e,10)};te.toPrecision=function(e,t){return isNaN(e)&&(e=0),isNaN(t)&&(t=1),Number(e).toPrecision(t)}});var tr=U((Hi,er)=>{"use strict";var st=Ue("url"),ge=ee(),Hn=Ue("querystring"),ae=er.exports;ae.encodeURI=function(e){if(ge.isString(e))return encodeURIComponent(e)};ae.escape=function(e){if(ge.isString(e))return Hn.escape(e)};ae.decodeURI=function(e){if(ge.isString(e))return decodeURIComponent(e)};ae.urlResolve=function(e,t){return st.resolve(e,t)};ae.urlParse=function(e){return st.parse(e)};ae.stripQuerystring=function(e){if(ge.isString(e))return e.split("?")[0]};ae.stripProtocol=function(e){if(ge.isString(e)){var t=st.parse(e);return t.protocol="",t.format()}}});var ir=U((rr,nr)=>{"use strict";var z=ee(),ce=Se(),A=nr.exports;A.append=function(e,t){return typeof e=="string"&&typeof t=="string"?e+t:e};A.camelcase=function(e){return typeof e!="string"?"":ce.changecase(e,function(t){return t.toUpperCase()})};A.capitalize=function(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)};A.capitalizeAll=function(e){if(typeof e!="string")return"";if(z.isString(e))return e.replace(/\w\S*/g,function(t){return A.capitalize(t)})};A.center=function(e,t){if(typeof e!="string")return"";for(var r="",n=0;n<t;)r+="&nbsp;",n++;return r+e+r};A.chop=function(e){return typeof e!="string"?"":ce.chop(e)};A.dashcase=function(e){return typeof e!="string"?"":ce.changecase(e,function(t){return"-"+t})};A.dotcase=function(e){return typeof e!="string"?"":ce.changecase(e,function(t){return"."+t})};A.downcase=function(){return A.lowercase.apply(this,arguments)};A.ellipsis=function(e,t){if(z.isString(e))return e.length<=t?e:A.truncate(e,t)+"\u2026"};A.hyphenate=function(e){return typeof e!="string"?"":e.split(" ").join("-")};A.isString=function(e){return typeof e=="string"};A.lowercase=function(e){return z.isObject(e)&&e.fn?e.fn(this).toLowerCase():typeof e!="string"?"":e.toLowerCase()};A.occurrences=function(e,t){if(typeof e!="string")return"";for(var r=t.length,n=0,i=0;(n=e.indexOf(t,n))>-1;)i++,n+=r;return i};A.pascalcase=function(e){return typeof e!="string"?"":(e=ce.changecase(e,function(t){return t.toUpperCase()}),e.charAt(0).toUpperCase()+e.slice(1))};A.pathcase=function(e){return typeof e!="string"?"":ce.changecase(e,function(t){return"/"+t})};A.plusify=function(e,t){return typeof e!="string"?"":(z.isString(t)||(t=" "),e.split(t).join("+"))};A.prepend=function(e,t){return typeof e=="string"&&typeof t=="string"?t+e:e};A.raw=function(e){var t=e.fn(),r=z.options(this,e);if(r.escape!==!1)for(var n=0;(n=t.indexOf("{{",n))!==-1;)t[n-1]!=="\\"&&(t=t.slice(0,n)+"\\"+t.slice(n)),n+=3;return t};A.remove=function(e,t){return typeof e!="string"?"":z.isString(t)?e.split(t).join(""):e};A.removeFirst=function(e,t){return typeof e!="string"?"":z.isString(t)?e.replace(t,""):e};A.replace=function(e,t,r){return typeof e!="string"?"":z.isString(t)?(z.isString(r)||(r=""),e.split(t).join(r)):e};A.replaceFirst=function(e,t,r){return typeof e!="string"?"":z.isString(t)?(z.isString(r)||(r=""),e.replace(t,r)):e};A.reverse=Me().reverse;A.sentence=function(e){return typeof e!="string"?"":e.replace(/((?:\S[^\.\?\!]*)[\.\?\!]*)/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()})};A.snakecase=function(e){return typeof e!="string"?"":ce.changecase(e,function(t){return"_"+t})};A.split=function(e,t){return typeof e!="string"?"":(z.isString(t)||(t=","),e.split(t))};A.startsWith=function(e,t,r){var n=[].slice.call(arguments);return r=n.pop(),z.isString(t)&&t.indexOf(e)===0?r.fn(this):typeof r.inverse=="function"?r.inverse(this):""};A.titleize=function(e){if(typeof e!="string")return"";for(var t=e.replace(/[- _]+/g," "),r=t.split(" "),n=r.length,i=[],u=0;n--;){var s=r[u++];i.push(rr.capitalize(s))}return i.join(" ")};A.trim=function(e){return typeof e=="string"?e.trim():""};A.trimLeft=function(e){if(z.isString(e))return e.replace(/^\s+/,"")};A.trimRight=function(e){if(z.isString(e))return e.replace(/\s+$/,"")};A.truncate=function(e,t,r){if(z.isString(e))return typeof r!="string"&&(r=""),e.length>t?e.slice(0,t-r.length)+r:e};A.truncateWords=function(e,t,r){if(z.isString(e)&&!isNaN(t)){typeof r!="string"&&(r="\u2026");var n=Number(t),i=e.split(/[ \t]/);if(n>=i.length)return e;i=i.slice(0,n);var u=i.join(" ").trim();return u+r}};A.upcase=function(){return A.uppercase.apply(this,arguments)};A.uppercase=function(e){return z.isObject(e)&&e.fn?e.fn(this).toUpperCase():typeof e!="string"?"":e.toUpperCase()}});var sr=U((Bi,ur)=>{"use strict";var Bn=xe();ur.exports=function e(t){switch(Bn(t)){case"boolean":case"date":case"function":case"null":case"number":return!0;case"undefined":return!1;case"regexp":return t.source!=="(?:)"&&t.source!=="";case"buffer":return t.toString()!=="";case"error":return t.message!=="";case"string":case"arguments":return t.length!==0;case"file":case"map":case"set":return t.size!==0;case"array":case"object":for(let r of Object.keys(t))if(e(t[r]))return!0;return!1;default:return!0}}});var or=U((Li,fr)=>{"use strict";var Ln=Ne(),zn=sr();fr.exports=function(e,t,r){return Pn(e)&&(typeof t=="string"||Array.isArray(t))?zn(Ln(e,t,r)):!1};function Pn(e){return e!=null&&(typeof e=="object"||typeof e=="function"||Array.isArray(e))}});var cr=U((zi,ar)=>{"use strict";function ft(e,t){if(!e)return!0;let r=t||ft.keywords;Array.isArray(r)||(r=[r]);let n=typeof e=="string"?e.toLowerCase():null;for(let i of r)if(i===e||i===n)return!0;return!1}ft.keywords=["0","false","nada","nil","nay","nah","negative","no","none","nope","nul","null","nix","nyet","uh-uh","veto","zero"];ar.exports=ft});var dr=U((Pi,lr)=>{"use strict";lr.exports=function(t){let r=Math.abs(t);if(isNaN(r))throw new TypeError("expected a number");if(!Number.isInteger(r))throw new Error("expected an integer");if(!Number.isSafeInteger(r))throw new Error("value exceeds maximum safe integer");return r%2===1}});var gr=U((Ri,mr)=>{"use strict";var Rn=or(),k=ee(),Jn=Se(),hr=cr(),pr=dr(),W=mr.exports;W.and=function(){for(var e=arguments.length-1,t=arguments[e],r=!0,n=0;n<e;n++)if(!arguments[n]){r=!1;break}return k.value(r,this,t)};W.compare=function(e,t,r,n){if(arguments.length<4)throw new Error("handlebars Helper {{compare}} expects 4 arguments");var i;switch(t){case"==":i=e==r;break;case"===":i=e===r;break;case"!=":i=e!=r;break;case"!==":i=e!==r;break;case"<":i=e<r;break;case">":i=e>r;break;case"<=":i=e<=r;break;case">=":i=e>=r;break;case"typeof":i=typeof e===r;break;default:throw new Error("helper {{compare}}: invalid operator: `"+t+"`")}return k.value(i,this,n)};W.contains=function(e,t,r,n){typeof r=="object"&&(n=r,r=void 0);var i=Jn.contains(e,t,r);return k.value(i,this,n)};W.default=function(){for(var e=0;e<arguments.length-1;e++)if(arguments[e]!=null)return arguments[e];return""};W.eq=function(e,t,r){return arguments.length===2&&(r=t,t=r.hash.compare),k.value(e===t,this,r)};W.gt=function(e,t,r){return arguments.length===2&&(r=t,t=r.hash.compare),k.value(e>t,this,r)};W.gte=function(e,t,r){return arguments.length===2&&(r=t,t=r.hash.compare),k.value(e>=t,this,r)};W.has=function(e,t,r){return k.isOptions(e)&&(r=e,t=null,e=null),k.isOptions(t)&&(r=t,t=null),e===null?k.value(!1,this,r):arguments.length===2?k.value(Rn(this,e),this,r):(Array.isArray(e)||k.isString(e))&&k.isString(t)&&e.indexOf(t)>-1?k.fn(!0,this,r):k.isObject(e)&&k.isString(t)&&t in e?k.fn(!0,this,r):k.inverse(!1,this,r)};W.isFalsey=function(e,t){return k.value(hr(e),this,t)};W.isTruthy=function(e,t){return k.value(!hr(e),this,t)};W.ifEven=function(e,t){return k.value(!pr(e),this,t)};W.ifNth=function(e,t,r){var n=!isNaN(e)&&!isNaN(t)&&t%e===0;return k.value(n,this,r)};W.ifOdd=function(e,t){return k.value(pr(e),this,t)};W.is=function(e,t,r){return arguments.length===2&&(r=t,t=r.hash.compare),k.value(e==t,this,r)};W.isnt=function(e,t,r){return arguments.length===2&&(r=t,t=r.hash.compare),k.value(e!=t,this,r)};W.lt=function(e,t,r){return arguments.length===2&&(r=t,t=r.hash.compare),k.value(e<t,this,r)};W.lte=function(e,t,r){return arguments.length===2&&(r=t,t=r.hash.compare),k.value(e<=t,this,r)};W.neither=function(e,t,r){return k.value(!e&&!t,this,r)};W.not=function(e,t){return k.value(!e,this,t)};W.or=function(){for(var e=arguments.length-1,t=arguments[e],r=!1,n=0;n<e;n++)if(arguments[n]){r=!0;break}return k.value(r,this,t)};W.unlessEq=function(e,t,r){return k.isOptions(t)&&(r=t,t=r.hash.compare),k.value(e!==t,this,r)};W.unlessGt=function(e,t,r){return k.isOptions(t)&&(r=t,t=r.hash.compare),k.value(e<=t,this,r)};W.unlessLt=function(e,t,r){return k.isOptions(t)&&(r=t,t=r.hash.compare),k.value(e>=t,this,r)};W.unlessGteq=function(e,t,r){return k.isOptions(t)&&(r=t,t=r.hash.compare),k.value(e<t,this,r)};W.unlessLteq=function(e,t,r){return k.isOptions(t)&&(r=t,t=r.hash.compare),k.value(e>t,this,r)}});var vr=U((Ji,yr)=>{var Gn=et(),Zn=Object.prototype.toString;yr.exports=function(t){if(typeof t>"u")return"undefined";if(t===null)return"null";if(t===!0||t===!1||t instanceof Boolean)return"boolean";if(typeof t=="string"||t instanceof String)return"string";if(typeof t=="number"||t instanceof Number)return"number";if(typeof t=="function"||t instanceof Function)return"function";if(typeof Array.isArray<"u"&&Array.isArray(t))return"array";if(t instanceof RegExp)return"regexp";if(t instanceof Date)return"date";var r=Zn.call(t);return r==="[object RegExp]"?"regexp":r==="[object Date]"?"date":r==="[object Arguments]"?"arguments":r==="[object Error]"?"error":Gn(t)?"buffer":r==="[object Set]"?"set":r==="[object WeakSet]"?"weakset":r==="[object Map]"?"map":r==="[object WeakMap]"?"weakmap":r==="[object Symbol]"?"symbol":r==="[object Int8Array]"?"int8array":r==="[object Uint8Array]"?"uint8array":r==="[object Uint8ClampedArray]"?"uint8clampedarray":r==="[object Int16Array]"?"int16array":r==="[object Uint16Array]"?"uint16array":r==="[object Int32Array]"?"int32array":r==="[object Uint32Array]"?"uint32array":r==="[object Float32Array]"?"float32array":r==="[object Float64Array]"?"float64array":"object"}});var br=U((Gi,$r)=>{"use strict";var Vn=vr();$r.exports=function(t){var r=Vn(t);if(r!=="number"&&r!=="string")return!1;var n=+t;return n-n+1>=0&&t!==""}});var Or=U((Zi,wr)=>{"use strict";var Qn=br();wr.exports=function(t,r){if(!r)return t;if(!t)return{};for(var n=String(r).split(/[[.\]]/).filter(Boolean),i=n[n.length-1],u={};r=n.shift();)if(t=t[r],!t)return{};return Qn(i)?[t]:(u[i]=t,u)}});var Mr=U((Vi,Nr)=>{"use strict";var Xn=Object.hasOwnProperty,ye=ee(),Kn=Me(),P=Nr.exports,ei=Ne(),xr=Or(),Sr=ut();P.extend=function(){var e=[].slice.call(arguments),t={};ye.isOptions(e[e.length-1])&&(t=e.pop().hash,e.push(t));for(var r={},n=0;n<e.length;n++){var i=e[n];if(ye.isObject(i))for(var u=Object.keys(i),s=0;s<u.length;s++){var f=u[s];r[f]=i[f]}}return r};P.forIn=function(e,t){if(!ye.isOptions(t))return e.inverse(this);var r=Sr(t,t.hash),n="";for(var i in e)r.key=i,n+=t.fn(e[i],{data:r});return n};P.forOwn=function(e,t){if(!ye.isOptions(t))return e.inverse(this);var r=Sr(t,t.hash),n="";for(var i in e)e.hasOwnProperty(i)&&(r.key=i,n+=t.fn(e[i],{data:r}));return n};P.toPath=function(){for(var e=[],t=0;t<arguments.length;t++)(typeof arguments[t]=="string"||typeof arguments[t]=="number")&&e.push(arguments[t]);return e.join(".")};P.get=function(e,t,r){var n=ei(t,e);return r&&r.fn?n?r.fn(n):r.inverse(t):n};P.getObject=function(e,t){return xr(t,e)};P.hasOwn=function(e,t){return Xn.call(e,t)};P.isObject=function(e){return typeof e=="object"};P.JSONparse=function(e,t){return JSON.parse(e)};P.JSONstringify=function(e,t){return isNaN(t)&&(t=0),JSON.stringify(e,null,t)};P.merge=function(e){var t=[].slice.call(arguments),r={};return ye.isOptions(t[t.length-1])&&(r=t.pop().hash,t.push(r)),Object.assign.apply(null,t)};P.parseJSON=P.JSONparse;P.pick=function(e,t,r){for(var n=Kn.arrayify(e),i=n.length,u=-1,s={};++u<i;)s=P.extend({},s,xr(t,n[u]));return r.fn?Object.keys(s).length?r.fn(s):r.inverse(t):s};P.stringify=P.JSONstringify});var kr=U((Qi,Ar)=>{"use strict";var ti=ee(),jr=Ar.exports,ri=xe();jr.toRegex=function(e,t,r){var n=ti.options({},t,r);return new RegExp(e,n.flags)};jr.test=function(e,t){if(typeof e!="string")return!1;if(ri(t)!=="regexp")throw new TypeError("expected a regular expression");return t.test(e)}});import ni from"crypto";function ve(){return je>Ae.length-16&&(ni.randomFillSync(Ae),je=0),Ae.slice(je,je+=16)}var Ae,je,ot=Z(()=>{Ae=new Uint8Array(256),je=Ae.length});var Dr,Ur=Z(()=>{Dr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function ii(e){return typeof e=="string"&&Dr.test(e)}var ne,$e=Z(()=>{Ur();ne=ii});function le(e,t=0){return R[e[t+0]]+R[e[t+1]]+R[e[t+2]]+R[e[t+3]]+"-"+R[e[t+4]]+R[e[t+5]]+"-"+R[e[t+6]]+R[e[t+7]]+"-"+R[e[t+8]]+R[e[t+9]]+"-"+R[e[t+10]]+R[e[t+11]]+R[e[t+12]]+R[e[t+13]]+R[e[t+14]]+R[e[t+15]]}function ui(e,t=0){let r=le(e,t);if(!ne(r))throw TypeError("Stringified UUID is invalid");return r}var R,Tr,be=Z(()=>{$e();R=[];for(let e=0;e<256;++e)R.push((e+256).toString(16).slice(1));Tr=ui});function si(e,t,r){let n=t&&r||0,i=t||new Array(16);e=e||{};let u=e.node||qr,s=e.clockseq!==void 0?e.clockseq:at;if(u==null||s==null){let v=e.random||(e.rng||ve)();u==null&&(u=qr=[v[0]|1,v[1],v[2],v[3],v[4],v[5]]),s==null&&(s=at=(v[6]<<8|v[7])&16383)}let f=e.msecs!==void 0?e.msecs:Date.now(),w=e.nsecs!==void 0?e.nsecs:lt+1,g=f-ct+(w-lt)/1e4;if(g<0&&e.clockseq===void 0&&(s=s+1&16383),(g<0||f>ct)&&e.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");ct=f,lt=w,at=s,f+=122192928e5;let l=((f&268435455)*1e4+w)%4294967296;i[n++]=l>>>24&255,i[n++]=l>>>16&255,i[n++]=l>>>8&255,i[n++]=l&255;let x=f/4294967296*1e4&268435455;i[n++]=x>>>8&255,i[n++]=x&255,i[n++]=x>>>24&15|16,i[n++]=x>>>16&255,i[n++]=s>>>8|128,i[n++]=s&255;for(let v=0;v<6;++v)i[n+v]=u[v];return t||le(i)}var qr,at,ct,lt,Yr,Cr=Z(()=>{ot();be();ct=0,lt=0;Yr=si});function fi(e){if(!ne(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var ke,dt=Z(()=>{$e();ke=fi});function oi(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function we(e,t,r){function n(i,u,s,f){var w;if(typeof i=="string"&&(i=oi(i)),typeof u=="string"&&(u=ke(u)),((w=u)===null||w===void 0?void 0:w.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let g=new Uint8Array(16+i.length);if(g.set(u),g.set(i,u.length),g=r(g),g[6]=g[6]&15|t,g[8]=g[8]&63|128,s){f=f||0;for(let l=0;l<16;++l)s[f+l]=g[l];return s}return le(g)}try{n.name=e}catch{}return n.DNS=ai,n.URL=ci,n}var ai,ci,ht=Z(()=>{be();dt();ai="6ba7b810-9dad-11d1-80b4-00c04fd430c8",ci="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});import li from"crypto";function di(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),li.createHash("md5").update(e).digest()}var Er,Ir=Z(()=>{Er=di});var hi,_r,Wr=Z(()=>{ht();Ir();hi=we("v3",48,Er),_r=hi});import pi from"crypto";var pt,Fr=Z(()=>{pt={randomUUID:pi.randomUUID}});function mi(e,t,r){if(pt.randomUUID&&!t&&!e)return pt.randomUUID();e=e||{};let n=e.random||(e.rng||ve)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return le(n)}var Hr,Br=Z(()=>{Fr();ot();be();Hr=mi});import gi from"crypto";function yi(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),gi.createHash("sha1").update(e).digest()}var Lr,zr=Z(()=>{Lr=yi});var vi,Pr,Rr=Z(()=>{ht();zr();vi=we("v5",80,Lr),Pr=vi});var Jr,Gr=Z(()=>{Jr="00000000-0000-0000-0000-000000000000"});function $i(e){if(!ne(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}var Zr,Vr=Z(()=>{$e();Zr=$i});var Qr={};an(Qr,{NIL:()=>Jr,parse:()=>ke,stringify:()=>Tr,v1:()=>Yr,v3:()=>_r,v4:()=>Hr,v5:()=>Pr,validate:()=>ne,version:()=>Zr});var Xr=Z(()=>{Cr();Wr();Br();Rr();Gr();Vr();$e();be();dt()});var en=U((Hu,Kr)=>{var bi=(Xr(),ln(Qr)),wi=Kr.exports;wi.uuid=function(){return bi.v4()}});var nn=U((Bu,mt)=>{var{date:Oi,duration:xi}=Mt(),Si={math:Bt(),array:Me(),number:Kt(),url:tr(),string:ir(),comparison:gr(),object:Mr(),regex:kr(),uuid:en()},rn=["sortBy"];mt.exports.helpersToRemoveForJs=rn;var tn={date:Oi,duration:xi},ie;mt.exports.getJsHelperList=()=>{if(ie)return ie;ie={};for(let e of Object.values(Si))for(let[t,r]of Object.entries(e))ie[t]=(...n)=>r(...n,{});for(let e of Object.keys(tn))ie[e]=tn[e];for(let e of rn)delete ie[e];return Object.freeze(ie),ie}});var ji=U((Lu,un)=>{var{getJsHelperList:Ni}=nn(),Mi=Ni();un.exports={...Mi,stripProtocol:helpersStripProtocol}});export default ji();
2
+ /*! Bundled license information:
3
+
4
+ is-buffer/index.js:
5
+ (*!
6
+ * Determine if an object is a Buffer
7
+ *
8
+ * @author Feross Aboukhadijeh <https://feross.org>
9
+ * @license MIT
10
+ *)
11
+
12
+ isobject/index.js:
13
+ (*!
14
+ * isobject <https://github.com/jonschlinkert/isobject>
15
+ *
16
+ * Copyright (c) 2014-2017, Jon Schlinkert.
17
+ * Released under the MIT License.
18
+ *)
19
+
20
+ get-value/index.js:
21
+ (*!
22
+ * get-value <https://github.com/jonschlinkert/get-value>
23
+ *
24
+ * Copyright (c) 2014-2018, Jon Schlinkert.
25
+ * Released under the MIT License.
26
+ *)
27
+
28
+ has-values/index.js:
29
+ (*!
30
+ * has-values <https://github.com/jonschlinkert/has-values>
31
+ *
32
+ * Copyright (c) 2014-2018, Jon Schlinkert.
33
+ * Released under the MIT License.
34
+ *)
35
+
36
+ has-value/index.js:
37
+ (*!
38
+ * has-value <https://github.com/jonschlinkert/has-value>
39
+ *
40
+ * Copyright (c) 2014-2018, Jon Schlinkert.
41
+ * Released under the MIT License.
42
+ *)
43
+
44
+ is-number/index.js:
45
+ (*!
46
+ * is-number <https://github.com/jonschlinkert/is-number>
47
+ *
48
+ * Copyright (c) 2014-2015, Jon Schlinkert.
49
+ * Licensed under the MIT License.
50
+ *)
51
+
52
+ get-object/index.js:
53
+ (*!
54
+ * get-object <https://github.com/jonschlinkert/get-object>
55
+ *
56
+ * Copyright (c) 2014 Jon Schlinkert, contributors.
57
+ * Licensed under the MIT License
58
+ *)
59
+ */
@@ -0,0 +1,2 @@
1
+ declare const _exports: any;
2
+ export = _exports;
package/dist/index.d.mts CHANGED
@@ -19,3 +19,4 @@ export const convertToJS: (hbs: any) => string;
19
19
  export const setJSRunner: (runner: any) => any;
20
20
  export const FIND_ANY_HBS_REGEX: RegExp;
21
21
  export const helpersToRemoveForJs: string[];
22
+ export * from "./errors.js";
package/dist/index.d.ts CHANGED
@@ -15,4 +15,4 @@ export function doesContainString(template: string, string: string): boolean;
15
15
  export function convertToJS(hbs: any): string;
16
16
  import { FIND_ANY_HBS_REGEX } from "./utilities";
17
17
  import { helpersToRemoveForJs } from "./helpers/list";
18
- export { setJSRunner, FIND_ANY_HBS_REGEX, helpersToRemoveForJs };
18
+ export { setJSRunner, FIND_ANY_HBS_REGEX, JsErrorTimeout, helpersToRemoveForJs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/string-templates",
3
- "version": "2.16.3",
3
+ "version": "2.17.0",
4
4
  "description": "Handlebars wrapper for Budibase templating.",
5
5
  "main": "src/index.cjs",
6
6
  "module": "dist/bundle.mjs",
@@ -11,7 +11,9 @@
11
11
  "require": "./src/index.cjs",
12
12
  "import": "./dist/bundle.mjs"
13
13
  },
14
- "./package.json": "./package.json"
14
+ "./package.json": "./package.json",
15
+ "./index-helpers": "./dist/index-helpers.bundled.js",
16
+ "./test/utils": "./test/utils.js"
15
17
  },
16
18
  "files": [
17
19
  "dist",
@@ -19,8 +21,9 @@
19
21
  "manifest.json"
20
22
  ],
21
23
  "scripts": {
22
- "build": "tsc && rollup -c",
23
- "dev": "tsc && rollup -cw",
24
+ "build:esbuild": "esbuild --minify --bundle src/index-helpers.js --outfile=dist/index-helpers.bundled.js --platform=node --format=esm --external:handlebars",
25
+ "build": "yarn build:esbuild && tsc && rollup -c",
26
+ "dev": "concurrently \"yarn build:esbuild --watch\" \"tsc && rollup -cw\"",
24
27
  "test": "jest",
25
28
  "manifest": "node ./scripts/gen-collection-info.js"
26
29
  },
@@ -34,6 +37,7 @@
34
37
  "devDependencies": {
35
38
  "@rollup/plugin-commonjs": "^17.1.0",
36
39
  "@rollup/plugin-json": "^4.1.0",
40
+ "concurrently": "^8.2.2",
37
41
  "doctrine": "^3.0.0",
38
42
  "jest": "29.7.0",
39
43
  "marked": "^4.0.10",
@@ -45,5 +49,5 @@
45
49
  "rollup-plugin-terser": "^7.0.2",
46
50
  "typescript": "5.2.2"
47
51
  },
48
- "gitHead": "eb7d0685bb59b0304746b0fde865335b09e5f35c"
52
+ "gitHead": "2e6abd6111c2e9175336d6a620b15c02d716d0dd"
49
53
  }
package/src/errors.js ADDED
@@ -0,0 +1,11 @@
1
+ class JsErrorTimeout extends Error {
2
+ code = "ERR_SCRIPT_EXECUTION_TIMEOUT"
3
+
4
+ constructor() {
5
+ super()
6
+ }
7
+ }
8
+
9
+ module.exports = {
10
+ JsErrorTimeout,
11
+ }
@@ -42,7 +42,7 @@ module.exports.processJS = (handlebars, context) => {
42
42
  try {
43
43
  // Wrap JS in a function and immediately invoke it.
44
44
  // This is required to allow the final `return` statement to be valid.
45
- const js = `function run(){${atob(handlebars)}};run();`
45
+ const js = `(function(){${atob(handlebars)}})();`
46
46
 
47
47
  // Our $ context function gets a value from context.
48
48
  // We clone the context to avoid mutation in the binding affecting real
@@ -1,29 +1,42 @@
1
- const externalHandlebars = require("./external")
2
- const helperList = require("@budibase/handlebars-helpers")
1
+ const { date, duration } = require("./date")
3
2
 
4
- let helpers = undefined
3
+ // https://github.com/evanw/esbuild/issues/56
4
+ const externalCollections = {
5
+ math: require("@budibase/handlebars-helpers/lib/math"),
6
+ array: require("@budibase/handlebars-helpers/lib/array"),
7
+ number: require("@budibase/handlebars-helpers/lib/number"),
8
+ url: require("@budibase/handlebars-helpers/lib/url"),
9
+ string: require("@budibase/handlebars-helpers/lib/string"),
10
+ comparison: require("@budibase/handlebars-helpers/lib/comparison"),
11
+ object: require("@budibase/handlebars-helpers/lib/object"),
12
+ regex: require("@budibase/handlebars-helpers/lib/regex"),
13
+ uuid: require("@budibase/handlebars-helpers/lib/uuid"),
14
+ }
5
15
 
6
16
  const helpersToRemoveForJs = ["sortBy"]
7
17
  module.exports.helpersToRemoveForJs = helpersToRemoveForJs
8
18
 
19
+ const addedHelpers = {
20
+ date: date,
21
+ duration: duration,
22
+ }
23
+
24
+ let helpers = undefined
25
+
9
26
  module.exports.getJsHelperList = () => {
10
27
  if (helpers) {
11
28
  return helpers
12
29
  }
13
30
 
14
31
  helpers = {}
15
- let constructed = []
16
- for (let collection of externalHandlebars.externalCollections) {
17
- constructed.push(helperList[collection]())
18
- }
19
- for (let collection of constructed) {
32
+ for (let collection of Object.values(externalCollections)) {
20
33
  for (let [key, func] of Object.entries(collection)) {
21
34
  // Handlebars injects the hbs options to the helpers by default. We are adding an empty {} as a last parameter to simulate it
22
35
  helpers[key] = (...props) => func(...props, {})
23
36
  }
24
37
  }
25
- for (let key of Object.keys(externalHandlebars.addedHelpers)) {
26
- helpers[key] = externalHandlebars.addedHelpers[key]
38
+ for (let key of Object.keys(addedHelpers)) {
39
+ helpers[key] = addedHelpers[key]
27
40
  }
28
41
 
29
42
  for (const toRemove of helpersToRemoveForJs) {
@@ -0,0 +1,9 @@
1
+ const { getJsHelperList } = require("./helpers/list")
2
+
3
+ const helpers = getJsHelperList()
4
+ module.exports = {
5
+ ...helpers,
6
+ // pointing stripProtocol to a unexisting function to be able to declare it on isolated-vm
7
+ // eslint-disable-next-line no-undef
8
+ stripProtocol: helpersStripProtocol,
9
+ }
package/src/index.cjs CHANGED
@@ -36,3 +36,8 @@ if (!process.env.NO_JS) {
36
36
  return vm.run(js)
37
37
  })
38
38
  }
39
+
40
+ const errors = require("./errors")
41
+ for (const error in errors) {
42
+ module.exports[error] = errors[error]
43
+ }
package/src/index.js CHANGED
@@ -395,4 +395,9 @@ module.exports.convertToJS = hbs => {
395
395
  }
396
396
 
397
397
  module.exports.FIND_ANY_HBS_REGEX = FIND_ANY_HBS_REGEX
398
+
399
+ const errors = require("./errors")
400
+ // We cannot use dynamic exports, otherwise the typescript file will not be generating it
401
+ module.exports.JsErrorTimeout = errors.JsErrorTimeout
402
+
398
403
  module.exports.helpersToRemoveForJs = helpersToRemoveForJs
package/src/index.mjs CHANGED
@@ -38,3 +38,5 @@ if (process && !process.env.NO_JS) {
38
38
  return vm.runInNewContext(js, context, { timeout: 1000 })
39
39
  })
40
40
  }
41
+
42
+ export * from "./errors.js"