@orderingstack/front-hooks 3.7.0 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var Y=require("react"),Nt=require("@orderingstack/ordering-core-react"),Rn=require("react-i18next");function Le(e,r){const t=Y.useRef(),[n,a]=Y.useState(null);return Y.useEffect(()=>{t.current=e},[e]),Y.useEffect(()=>{function i(){var s;(s=t.current)==null||s.call(t)}if(r!==null){const s=setInterval(i,r);return a(s),()=>{a(null),clearInterval(s)}}},[r]),()=>{n&&clearInterval(n)}}var X=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Nn=Object.prototype;function Pn(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||Nn;return e===t}var xe=Pn;function Un(e,r){return function(t){return e(r(t))}}var Pt=Un,Mn=Pt,Fn=Mn(Object.keys,Object),Bn=Fn,Hn=xe,Yn=Bn,Gn=Object.prototype,qn=Gn.hasOwnProperty;function Wn(e){if(!Hn(e))return Yn(e);var r=[];for(var t in Object(e))qn.call(e,t)&&t!="constructor"&&r.push(t);return r}var Ut=Wn,Kn=typeof X=="object"&&X&&X.Object===Object&&X,Mt=Kn,Vn=Mt,kn=typeof self=="object"&&self&&self.Object===Object&&self,Jn=Vn||kn||Function("return this")(),K=Jn,zn=K,Zn=zn.Symbol,Re=Zn,Dr=Re,Ft=Object.prototype,Xn=Ft.hasOwnProperty,Qn=Ft.toString,he=Dr?Dr.toStringTag:void 0;function ea(e){var r=Xn.call(e,he),t=e[he];try{e[he]=void 0;var n=!0}catch{}var a=Qn.call(e);return n&&(r?e[he]=t:delete e[he]),a}var ra=ea,ta=Object.prototype,na=ta.toString;function aa(e){return na.call(e)}var ia=aa,jr=Re,sa=ra,oa=ia,ua="[object Null]",fa="[object Undefined]",Lr=jr?jr.toStringTag:void 0;function ca(e){return e==null?e===void 0?fa:ua:Lr&&Lr in Object(e)?sa(e):oa(e)}var Ne=ca;function la(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var $e=la,da=Ne,ha=$e,pa="[object AsyncFunction]",va="[object Function]",ga="[object GeneratorFunction]",$a="[object Proxy]";function ya(e){if(!ha(e))return!1;var r=da(e);return r==va||r==ga||r==pa||r==$a}var Bt=ya,ma=K,ba=ma["__core-js_shared__"],_a=ba,We=_a,xr=function(){var e=/[^.]+$/.exec(We&&We.keys&&We.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Aa(e){return!!xr&&xr in e}var Ea=Aa,Ta=Function.prototype,Oa=Ta.toString;function Sa(e){if(e!=null){try{return Oa.call(e)}catch{}try{return e+""}catch{}}return""}var Ht=Sa,wa=Bt,Ia=Ea,Ca=$e,Da=Ht,ja=/[\\^$.*+?()[\]{}|]/g,La=/^\[object .+?Constructor\]$/,xa=Function.prototype,Ra=Object.prototype,Na=xa.toString,Pa=Ra.hasOwnProperty,Ua=RegExp("^"+Na.call(Pa).replace(ja,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ma(e){if(!Ca(e)||Ia(e))return!1;var r=wa(e)?Ua:La;return r.test(Da(e))}var Fa=Ma;function Ba(e,r){return e==null?void 0:e[r]}var Ha=Ba,Ya=Fa,Ga=Ha;function qa(e,r){var t=Ga(e,r);return Ya(t)?t:void 0}var Q=qa,Wa=Q,Ka=K,Va=Wa(Ka,"DataView"),ka=Va,Ja=Q,za=K,Za=Ja(za,"Map"),lr=Za,Xa=Q,Qa=K,ei=Xa(Qa,"Promise"),ri=ei,ti=Q,ni=K,ai=ti(ni,"Set"),ii=ai,si=Q,oi=K,ui=si(oi,"WeakMap"),fi=ui,Xe=ka,Qe=lr,er=ri,rr=ii,tr=fi,Yt=Ne,ie=Ht,Rr="[object Map]",ci="[object Object]",Nr="[object Promise]",Pr="[object Set]",Ur="[object WeakMap]",Mr="[object DataView]",li=ie(Xe),di=ie(Qe),hi=ie(er),pi=ie(rr),vi=ie(tr),Z=Yt;(Xe&&Z(new Xe(new ArrayBuffer(1)))!=Mr||Qe&&Z(new Qe)!=Rr||er&&Z(er.resolve())!=Nr||rr&&Z(new rr)!=Pr||tr&&Z(new tr)!=Ur)&&(Z=function(e){var r=Yt(e),t=r==ci?e.constructor:void 0,n=t?ie(t):"";if(n)switch(n){case li:return Mr;case di:return Rr;case hi:return Nr;case pi:return Pr;case vi:return Ur}return r});var ye=Z;function gi(e){return e!=null&&typeof e=="object"}var se=gi,$i=Ne,yi=se,mi="[object Arguments]";function bi(e){return yi(e)&&$i(e)==mi}var _i=bi,Fr=_i,Ai=se,Gt=Object.prototype,Ei=Gt.hasOwnProperty,Ti=Gt.propertyIsEnumerable,Oi=Fr(function(){return arguments}())?Fr:function(e){return Ai(e)&&Ei.call(e,"callee")&&!Ti.call(e,"callee")},qt=Oi,Si=Array.isArray,me=Si,wi=9007199254740991;function Ii(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wi}var Wt=Ii,Ci=Bt,Di=Wt;function ji(e){return e!=null&&Di(e.length)&&!Ci(e)}var dr=ji,ae={exports:{}};function Li(){return!1}var xi=Li;(function(e,r){var t=K,n=xi,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,f=s?t.Buffer:void 0,o=f?f.isBuffer:void 0,v=o||n;e.exports=v})(ae,ae.exports);var Ri=Ne,Ni=Wt,Pi=se,Ui="[object Arguments]",Mi="[object Array]",Fi="[object Boolean]",Bi="[object Date]",Hi="[object Error]",Yi="[object Function]",Gi="[object Map]",qi="[object Number]",Wi="[object Object]",Ki="[object RegExp]",Vi="[object Set]",ki="[object String]",Ji="[object WeakMap]",zi="[object ArrayBuffer]",Zi="[object DataView]",Xi="[object Float32Array]",Qi="[object Float64Array]",es="[object Int8Array]",rs="[object Int16Array]",ts="[object Int32Array]",ns="[object Uint8Array]",as="[object Uint8ClampedArray]",is="[object Uint16Array]",ss="[object Uint32Array]",P={};P[Xi]=P[Qi]=P[es]=P[rs]=P[ts]=P[ns]=P[as]=P[is]=P[ss]=!0;P[Ui]=P[Mi]=P[zi]=P[Fi]=P[Zi]=P[Bi]=P[Hi]=P[Yi]=P[Gi]=P[qi]=P[Wi]=P[Ki]=P[Vi]=P[ki]=P[Ji]=!1;function os(e){return Pi(e)&&Ni(e.length)&&!!P[Ri(e)]}var us=os;function fs(e){return function(r){return e(r)}}var hr=fs,ve={exports:{}};(function(e,r){var t=Mt,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&t.process,f=function(){try{var o=a&&a.require&&a.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}}();e.exports=f})(ve,ve.exports);var cs=us,ls=hr,Br=ve.exports,Hr=Br&&Br.isTypedArray,ds=Hr?ls(Hr):cs,pr=ds,hs=Ut,ps=ye,vs=qt,gs=me,$s=dr,ys=ae.exports,ms=xe,bs=pr,_s="[object Map]",As="[object Set]",Es=Object.prototype,Ts=Es.hasOwnProperty;function Os(e){if(e==null)return!0;if($s(e)&&(gs(e)||typeof e=="string"||typeof e.splice=="function"||ys(e)||bs(e)||vs(e)))return!e.length;var r=ps(e);if(r==_s||r==As)return!e.size;if(ms(e))return!hs(e).length;for(var t in e)if(Ts.call(e,t))return!1;return!0}var vr=Os,Kt={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(X,function(){var t="minute",n=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,s,f){var o=s.prototype;f.utc=function(p){var T={date:p,utc:!0,args:arguments};return new s(T)},o.utc=function(p){var T=f(this.toDate(),{locale:this.$L,utc:!0});return p?T.add(this.utcOffset(),t):T},o.local=function(){return f(this.toDate(),{locale:this.$L,utc:!1})};var v=o.parse;o.parse=function(p){p.utc&&(this.$u=!0),this.$utils().u(p.$offset)||(this.$offset=p.$offset),v.call(this,p)};var m=o.init;o.init=function(){if(this.$u){var p=this.$d;this.$y=p.getUTCFullYear(),this.$M=p.getUTCMonth(),this.$D=p.getUTCDate(),this.$W=p.getUTCDay(),this.$H=p.getUTCHours(),this.$m=p.getUTCMinutes(),this.$s=p.getUTCSeconds(),this.$ms=p.getUTCMilliseconds()}else m.call(this)};var $=o.utcOffset;o.utcOffset=function(p,T){var j=this.$utils().u;if(j(p))return this.$u?0:j(this.$offset)?$.call(this):this.$offset;if(typeof p=="string"&&(p=function(l){l===void 0&&(l="");var y=l.match(n);if(!y)return null;var w=(""+y[0]).match(a)||["-",0,0],O=w[0],I=60*+w[1]+ +w[2];return I===0?0:O==="+"?I:-I}(p),p===null))return this;var u=Math.abs(p)<=16?60*p:p,c=this;if(T)return c.$offset=u,c.$u=p===0,c;if(p!==0){var d=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(c=this.local().add(u+d,t)).$offset=u,c.$x.$localOffset=d}else c=this.utc();return c};var h=o.format;o.format=function(p){var T=p||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,T)},o.valueOf=function(){var p=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*p},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var g=o.toDate;o.toDate=function(p){return p==="s"&&this.$offset?f(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var A=o.diff;o.diff=function(p,T,j){if(p&&this.$u===p.$u)return A.call(this,p,T,j);var u=this.local(),c=f(p).local();return A.call(u,c,T,j)}}})})(Kt);var Ss=Kt.exports,Vt={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(X,function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(a,i,s){var f,o=function(h,g,A){A===void 0&&(A={});var p=new Date(h),T=function(j,u){u===void 0&&(u={});var c=u.timeZoneName||"short",d=j+"|"+c,l=n[d];return l||(l=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:j,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:c}),n[d]=l),l}(g,A);return T.formatToParts(p)},v=function(h,g){for(var A=o(h,g),p=[],T=0;T<A.length;T+=1){var j=A[T],u=j.type,c=j.value,d=t[u];d>=0&&(p[d]=parseInt(c,10))}var l=p[3],y=l===24?0:l,w=p[0]+"-"+p[1]+"-"+p[2]+" "+y+":"+p[4]+":"+p[5]+":000",O=+h;return(s.utc(w).valueOf()-(O-=O%1e3))/6e4},m=i.prototype;m.tz=function(h,g){h===void 0&&(h=f);var A=this.utcOffset(),p=this.toDate(),T=p.toLocaleString("en-US",{timeZone:h}),j=Math.round((p-new Date(T))/1e3/60),u=s(T).$set("millisecond",this.$ms).utcOffset(15*-Math.round(p.getTimezoneOffset()/15)-j,!0);if(g){var c=u.utcOffset();u=u.add(A-c,"minute")}return u.$x.$timezone=h,u},m.offsetName=function(h){var g=this.$x.$timezone||s.tz.guess(),A=o(this.valueOf(),g,{timeZoneName:h}).find(function(p){return p.type.toLowerCase()==="timezonename"});return A&&A.value};var $=m.startOf;m.startOf=function(h,g){if(!this.$x||!this.$x.$timezone)return $.call(this,h,g);var A=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return $.call(A,h,g).tz(this.$x.$timezone,!0)},s.tz=function(h,g,A){var p=A&&g,T=A||g||f,j=v(+s(),T);if(typeof h!="string")return s(h).tz(T);var u=function(y,w,O){var I=y-60*w*1e3,x=v(I,O);if(w===x)return[I,w];var k=v(I-=60*(x-w)*1e3,O);return x===k?[I,x]:[y-60*Math.min(x,k)*1e3,Math.max(x,k)]}(s.utc(h,p).valueOf(),j,T),c=u[0],d=u[1],l=s(c).utcOffset(d);return l.$x.$timezone=T,l},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(h){f=h}}})})(Vt);var ws=Vt.exports,kt={exports:{}};(function(e,r){(function(t,n){e.exports=n()})(X,function(){var t=1e3,n=6e4,a=36e5,i="millisecond",s="second",f="minute",o="hour",v="day",m="week",$="month",h="quarter",g="year",A="date",p="Invalid Date",T=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,j=/\[([^\]]+)]|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,u={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("_")},c=function(L,E,b){var S=String(L);return!S||S.length>=E?L:""+Array(E+1-S.length).join(b)+L},d={s:c,z:function(L){var E=-L.utcOffset(),b=Math.abs(E),S=Math.floor(b/60),_=b%60;return(E<=0?"+":"-")+c(S,2,"0")+":"+c(_,2,"0")},m:function L(E,b){if(E.date()<b.date())return-L(b,E);var S=12*(b.year()-E.year())+(b.month()-E.month()),_=E.clone().add(S,$),D=b-_<0,C=E.clone().add(S+(D?-1:1),$);return+(-(S+(b-_)/(D?_-C:C-_))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:$,y:g,w:m,d:v,D:A,h:o,m:f,s,ms:i,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},l="en",y={};y[l]=u;var w=function(L){return L instanceof k},O=function L(E,b,S){var _;if(!E)return l;if(typeof E=="string"){var D=E.toLowerCase();y[D]&&(_=D),b&&(y[D]=b,_=D);var C=E.split("-");if(!_&&C.length>1)return L(C[0])}else{var R=E.name;y[R]=E,_=R}return!S&&_&&(l=_),_||!S&&l},I=function(L,E){if(w(L))return L.clone();var b=typeof E=="object"?E:{};return b.date=L,b.args=arguments,new k(b)},x=d;x.l=O,x.i=w,x.w=function(L,E){return I(L,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var k=function(){function L(b){this.$L=O(b.locale,null,!0),this.parse(b)}var E=L.prototype;return E.parse=function(b){this.$d=function(S){var _=S.date,D=S.utc;if(_===null)return new Date(NaN);if(x.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var C=_.match(T);if(C){var R=C[2]-1||0,M=(C[7]||"0").substring(0,3);return D?new Date(Date.UTC(C[1],R,C[3]||1,C[4]||0,C[5]||0,C[6]||0,M)):new Date(C[1],R,C[3]||1,C[4]||0,C[5]||0,C[6]||0,M)}}return new Date(_)}(b),this.$x=b.x||{},this.init()},E.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},E.$utils=function(){return x},E.isValid=function(){return this.$d.toString()!==p},E.isSame=function(b,S){var _=I(b);return this.startOf(S)<=_&&_<=this.endOf(S)},E.isAfter=function(b,S){return I(b)<this.startOf(S)},E.isBefore=function(b,S){return this.endOf(S)<I(b)},E.$g=function(b,S,_){return x.u(b)?this[S]:this.set(_,b)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(b,S){var _=this,D=!!x.u(S)||S,C=x.p(b),R=function(re,G){var z=x.w(_.$u?Date.UTC(_.$y,G,re):new Date(_.$y,G,re),_);return D?z:z.endOf(v)},M=function(re,G){return x.w(_.toDate()[re].apply(_.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(G)),_)},U=this.$W,B=this.$M,J=this.$D,V="set"+(this.$u?"UTC":"");switch(C){case g:return D?R(1,0):R(31,11);case $:return D?R(1,B):R(0,B+1);case m:var le=this.$locale().weekStart||0,de=(U<le?U+7:U)-le;return R(D?J-de:J+(6-de),B);case v:case A:return M(V+"Hours",0);case o:return M(V+"Minutes",1);case f:return M(V+"Seconds",2);case s:return M(V+"Milliseconds",3);default:return this.clone()}},E.endOf=function(b){return this.startOf(b,!1)},E.$set=function(b,S){var _,D=x.p(b),C="set"+(this.$u?"UTC":""),R=(_={},_[v]=C+"Date",_[A]=C+"Date",_[$]=C+"Month",_[g]=C+"FullYear",_[o]=C+"Hours",_[f]=C+"Minutes",_[s]=C+"Seconds",_[i]=C+"Milliseconds",_)[D],M=D===v?this.$D+(S-this.$W):S;if(D===$||D===g){var U=this.clone().set(A,1);U.$d[R](M),U.init(),this.$d=U.set(A,Math.min(this.$D,U.daysInMonth())).$d}else R&&this.$d[R](M);return this.init(),this},E.set=function(b,S){return this.clone().$set(b,S)},E.get=function(b){return this[x.p(b)]()},E.add=function(b,S){var _,D=this;b=Number(b);var C=x.p(S),R=function(B){var J=I(D);return x.w(J.date(J.date()+Math.round(B*b)),D)};if(C===$)return this.set($,this.$M+b);if(C===g)return this.set(g,this.$y+b);if(C===v)return R(1);if(C===m)return R(7);var M=(_={},_[f]=n,_[o]=a,_[s]=t,_)[C]||1,U=this.$d.getTime()+b*M;return x.w(U,this)},E.subtract=function(b,S){return this.add(-1*b,S)},E.format=function(b){var S=this,_=this.$locale();if(!this.isValid())return _.invalidDate||p;var D=b||"YYYY-MM-DDTHH:mm:ssZ",C=x.z(this),R=this.$H,M=this.$m,U=this.$M,B=_.weekdays,J=_.months,V=function(G,z,qe,_e){return G&&(G[z]||G(S,D))||qe[z].slice(0,_e)},le=function(G){return x.s(R%12||12,G,"0")},de=_.meridiem||function(G,z,qe){var _e=G<12?"AM":"PM";return qe?_e.toLowerCase():_e},re={YY:String(this.$y).slice(-2),YYYY:this.$y,M:U+1,MM:x.s(U+1,2,"0"),MMM:V(_.monthsShort,U,J,3),MMMM:V(J,U),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:V(_.weekdaysMin,this.$W,B,2),ddd:V(_.weekdaysShort,this.$W,B,3),dddd:B[this.$W],H:String(R),HH:x.s(R,2,"0"),h:le(1),hh:le(2),a:de(R,M,!0),A:de(R,M,!1),m:String(M),mm:x.s(M,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:C};return D.replace(j,function(G,z){return z||re[G]||C.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(b,S,_){var D,C=x.p(S),R=I(b),M=(R.utcOffset()-this.utcOffset())*n,U=this-R,B=x.m(this,R);return B=(D={},D[g]=B/12,D[$]=B,D[h]=B/3,D[m]=(U-M)/6048e5,D[v]=(U-M)/864e5,D[o]=U/a,D[f]=U/n,D[s]=U/t,D)[C]||U,_?B:x.a(B)},E.daysInMonth=function(){return this.endOf($).$D},E.$locale=function(){return y[this.$L]},E.locale=function(b,S){if(!b)return this.$L;var _=this.clone(),D=O(b,S,!0);return D&&(_.$L=D),_},E.clone=function(){return x.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},L}(),Cr=k.prototype;return I.prototype=Cr,[["$ms",i],["$s",s],["$m",f],["$H",o],["$W",v],["$M",$],["$y",g],["$D",A]].forEach(function(L){Cr[L[1]]=function(E){return this.$g(E,L[0],L[1])}}),I.extend=function(L,E){return L.$i||(L(E,k,I),L.$i=!0),I},I.locale=O,I.isDayjs=w,I.unix=function(L){return I(1e3*L)},I.en=y[l],I.Ls=y,I.p={},I})})(kt);var ge=kt.exports;ge.extend(Ss);ge.extend(ws);const Jt=["SUN","MON","TUE","WED","THU","FRI","SAT"],Ie=e=>{const[r,t]=e.split(":");return{hour:parseInt(r||"0",10),minutes:parseInt(t||"0",10)}};function nr(e,r,t){const{availability:n}=e;if(!n)return!0;if(vr(n))return!1;const a=t?ge(t).tz(r):ge().tz(r),i=a.day(),s=n[Jt[i]];if(!Array.isArray(s)||s.length!==2)return!1;const f=a.hour(),o=a.minute(),v=Ie(s[0]),m=Ie(s[1]);return f<v.hour||f===v.hour&&o<v.minutes?!1:!(f>m.hour||f===m.hour&&o>m.minutes)}const ar=(e,r=void 0,t=void 0,n=!1)=>n?e.map(i=>{let s;return Array.isArray(i.items)&&(s=ar(i.items,r,t,n)),{...i,items:s,outsideAvailabilitySlot:!nr(i,r,t)||(s==null?void 0:s.every(f=>f.outsideAvailabilitySlot))||!1}}):e.filter(i=>nr(i,r,t)).map(i=>Array.isArray(i.items)?{...i,items:ar(i.items,r,t)}:i),Yr=(e,r=void 0,t=void 0,n=!1)=>{let a=[];return e.forEach(i=>{if(!Array.isArray(i.items)){a.push(i);return}const s=ar(i.items,r,t,n);s.length>0&&a.push({...i,items:s})}),n&&(a=a.map(i=>!i.items||!Array.isArray(i.items)?i:{...i,outsideAvailabilitySlot:!nr(i,r,t)||i.items.every(s=>s.outsideAvailabilitySlot)})),a};function pe(e){const r=e==null?void 0:e.week;if(!e||!e.active||!r)return!1;const t=ge(),n=t.day(),a=r[Jt[n]];return a?a.some(i=>Is(t,i)):!1}function Is(e,r){const t=e.hour(),n=e.minute(),a=Ie(r.from),i=Ie(r.to);return t<a.hour||t===a.hour&&n<a.minutes?!1:!(t>i.hour||t===i.hour&&n>i.minutes)}function Cs(){this.__data__=[],this.size=0}var Ds=Cs;function js(e,r){return e===r||e!==e&&r!==r}var gr=js,Ls=gr;function xs(e,r){for(var t=e.length;t--;)if(Ls(e[t][0],r))return t;return-1}var Pe=xs,Rs=Pe,Ns=Array.prototype,Ps=Ns.splice;function Us(e){var r=this.__data__,t=Rs(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():Ps.call(r,t,1),--this.size,!0}var Ms=Us,Fs=Pe;function Bs(e){var r=this.__data__,t=Fs(r,e);return t<0?void 0:r[t][1]}var Hs=Bs,Ys=Pe;function Gs(e){return Ys(this.__data__,e)>-1}var qs=Gs,Ws=Pe;function Ks(e,r){var t=this.__data__,n=Ws(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var Vs=Ks,ks=Ds,Js=Ms,zs=Hs,Zs=qs,Xs=Vs;function oe(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}oe.prototype.clear=ks;oe.prototype.delete=Js;oe.prototype.get=zs;oe.prototype.has=Zs;oe.prototype.set=Xs;var Ue=oe,Qs=Ue;function eo(){this.__data__=new Qs,this.size=0}var ro=eo;function to(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var no=to;function ao(e){return this.__data__.get(e)}var io=ao;function so(e){return this.__data__.has(e)}var oo=so,uo=Q,fo=uo(Object,"create"),Me=fo,Gr=Me;function co(){this.__data__=Gr?Gr(null):{},this.size=0}var lo=co;function ho(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var po=ho,vo=Me,go="__lodash_hash_undefined__",$o=Object.prototype,yo=$o.hasOwnProperty;function mo(e){var r=this.__data__;if(vo){var t=r[e];return t===go?void 0:t}return yo.call(r,e)?r[e]:void 0}var bo=mo,_o=Me,Ao=Object.prototype,Eo=Ao.hasOwnProperty;function To(e){var r=this.__data__;return _o?r[e]!==void 0:Eo.call(r,e)}var Oo=To,So=Me,wo="__lodash_hash_undefined__";function Io(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=So&&r===void 0?wo:r,this}var Co=Io,Do=lo,jo=po,Lo=bo,xo=Oo,Ro=Co;function ue(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}ue.prototype.clear=Do;ue.prototype.delete=jo;ue.prototype.get=Lo;ue.prototype.has=xo;ue.prototype.set=Ro;var No=ue,qr=No,Po=Ue,Uo=lr;function Mo(){this.size=0,this.__data__={hash:new qr,map:new(Uo||Po),string:new qr}}var Fo=Mo;function Bo(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var Ho=Bo,Yo=Ho;function Go(e,r){var t=e.__data__;return Yo(r)?t[typeof r=="string"?"string":"hash"]:t.map}var Fe=Go,qo=Fe;function Wo(e){var r=qo(this,e).delete(e);return this.size-=r?1:0,r}var Ko=Wo,Vo=Fe;function ko(e){return Vo(this,e).get(e)}var Jo=ko,zo=Fe;function Zo(e){return zo(this,e).has(e)}var Xo=Zo,Qo=Fe;function eu(e,r){var t=Qo(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}var ru=eu,tu=Fo,nu=Ko,au=Jo,iu=Xo,su=ru;function fe(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}fe.prototype.clear=tu;fe.prototype.delete=nu;fe.prototype.get=au;fe.prototype.has=iu;fe.prototype.set=su;var zt=fe,ou=Ue,uu=lr,fu=zt,cu=200;function lu(e,r){var t=this.__data__;if(t instanceof ou){var n=t.__data__;if(!uu||n.length<cu-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new fu(n)}return t.set(e,r),this.size=t.size,this}var du=lu,hu=Ue,pu=ro,vu=no,gu=io,$u=oo,yu=du;function ce(e){var r=this.__data__=new hu(e);this.size=r.size}ce.prototype.clear=pu;ce.prototype.delete=vu;ce.prototype.get=gu;ce.prototype.has=$u;ce.prototype.set=yu;var Zt=ce,mu="__lodash_hash_undefined__";function bu(e){return this.__data__.set(e,mu),this}var _u=bu;function Au(e){return this.__data__.has(e)}var Eu=Au,Tu=zt,Ou=_u,Su=Eu;function Ce(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Tu;++r<t;)this.add(e[r])}Ce.prototype.add=Ce.prototype.push=Ou;Ce.prototype.has=Su;var wu=Ce;function Iu(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}var Cu=Iu;function Du(e,r){return e.has(r)}var ju=Du,Lu=wu,xu=Cu,Ru=ju,Nu=1,Pu=2;function Uu(e,r,t,n,a,i){var s=t&Nu,f=e.length,o=r.length;if(f!=o&&!(s&&o>f))return!1;var v=i.get(e),m=i.get(r);if(v&&m)return v==r&&m==e;var $=-1,h=!0,g=t&Pu?new Lu:void 0;for(i.set(e,r),i.set(r,e);++$<f;){var A=e[$],p=r[$];if(n)var T=s?n(p,A,$,r,e,i):n(A,p,$,e,r,i);if(T!==void 0){if(T)continue;h=!1;break}if(g){if(!xu(r,function(j,u){if(!Ru(g,u)&&(A===j||a(A,j,t,n,i)))return g.push(u)})){h=!1;break}}else if(!(A===p||a(A,p,t,n,i))){h=!1;break}}return i.delete(e),i.delete(r),h}var Xt=Uu,Mu=K,Fu=Mu.Uint8Array,Qt=Fu;function Bu(e){var r=-1,t=Array(e.size);return e.forEach(function(n,a){t[++r]=[a,n]}),t}var Hu=Bu;function Yu(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var Gu=Yu,Wr=Re,Kr=Qt,qu=gr,Wu=Xt,Ku=Hu,Vu=Gu,ku=1,Ju=2,zu="[object Boolean]",Zu="[object Date]",Xu="[object Error]",Qu="[object Map]",ef="[object Number]",rf="[object RegExp]",tf="[object Set]",nf="[object String]",af="[object Symbol]",sf="[object ArrayBuffer]",of="[object DataView]",Vr=Wr?Wr.prototype:void 0,Ke=Vr?Vr.valueOf:void 0;function uf(e,r,t,n,a,i,s){switch(t){case of:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case sf:return!(e.byteLength!=r.byteLength||!i(new Kr(e),new Kr(r)));case zu:case Zu:case ef:return qu(+e,+r);case Xu:return e.name==r.name&&e.message==r.message;case rf:case nf:return e==r+"";case Qu:var f=Ku;case tf:var o=n&ku;if(f||(f=Vu),e.size!=r.size&&!o)return!1;var v=s.get(e);if(v)return v==r;n|=Ju,s.set(e,r);var m=Wu(f(e),f(r),n,a,i,s);return s.delete(e),m;case af:if(Ke)return Ke.call(e)==Ke.call(r)}return!1}var ff=uf;function cf(e,r){for(var t=-1,n=r.length,a=e.length;++t<n;)e[a+t]=r[t];return e}var en=cf,lf=en,df=me;function hf(e,r,t){var n=r(e);return df(e)?n:lf(n,t(e))}var rn=hf;function pf(e,r){for(var t=-1,n=e==null?0:e.length,a=0,i=[];++t<n;){var s=e[t];r(s,t,e)&&(i[a++]=s)}return i}var vf=pf;function gf(){return[]}var tn=gf,$f=vf,yf=tn,mf=Object.prototype,bf=mf.propertyIsEnumerable,kr=Object.getOwnPropertySymbols,_f=kr?function(e){return e==null?[]:(e=Object(e),$f(kr(e),function(r){return bf.call(e,r)}))}:yf,$r=_f;function Af(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Ef=Af,Tf=9007199254740991,Of=/^(?:0|[1-9]\d*)$/;function Sf(e,r){var t=typeof e;return r=r==null?Tf:r,!!r&&(t=="number"||t!="symbol"&&Of.test(e))&&e>-1&&e%1==0&&e<r}var wf=Sf,If=Ef,Cf=qt,Df=me,jf=ae.exports,Lf=wf,xf=pr,Rf=Object.prototype,Nf=Rf.hasOwnProperty;function Pf(e,r){var t=Df(e),n=!t&&Cf(e),a=!t&&!n&&jf(e),i=!t&&!n&&!a&&xf(e),s=t||n||a||i,f=s?If(e.length,String):[],o=f.length;for(var v in e)(r||Nf.call(e,v))&&!(s&&(v=="length"||a&&(v=="offset"||v=="parent")||i&&(v=="buffer"||v=="byteLength"||v=="byteOffset")||Lf(v,o)))&&f.push(v);return f}var nn=Pf,Uf=nn,Mf=Ut,Ff=dr;function Bf(e){return Ff(e)?Uf(e):Mf(e)}var yr=Bf,Hf=rn,Yf=$r,Gf=yr;function qf(e){return Hf(e,Gf,Yf)}var an=qf,Jr=an,Wf=1,Kf=Object.prototype,Vf=Kf.hasOwnProperty;function kf(e,r,t,n,a,i){var s=t&Wf,f=Jr(e),o=f.length,v=Jr(r),m=v.length;if(o!=m&&!s)return!1;for(var $=o;$--;){var h=f[$];if(!(s?h in r:Vf.call(r,h)))return!1}var g=i.get(e),A=i.get(r);if(g&&A)return g==r&&A==e;var p=!0;i.set(e,r),i.set(r,e);for(var T=s;++$<o;){h=f[$];var j=e[h],u=r[h];if(n)var c=s?n(u,j,h,r,e,i):n(j,u,h,e,r,i);if(!(c===void 0?j===u||a(j,u,t,n,i):c)){p=!1;break}T||(T=h=="constructor")}if(p&&!T){var d=e.constructor,l=r.constructor;d!=l&&"constructor"in e&&"constructor"in r&&!(typeof d=="function"&&d instanceof d&&typeof l=="function"&&l instanceof l)&&(p=!1)}return i.delete(e),i.delete(r),p}var Jf=kf,Ve=Zt,zf=Xt,Zf=ff,Xf=Jf,zr=ye,Zr=me,Xr=ae.exports,Qf=pr,ec=1,Qr="[object Arguments]",et="[object Array]",Ae="[object Object]",rc=Object.prototype,rt=rc.hasOwnProperty;function tc(e,r,t,n,a,i){var s=Zr(e),f=Zr(r),o=s?et:zr(e),v=f?et:zr(r);o=o==Qr?Ae:o,v=v==Qr?Ae:v;var m=o==Ae,$=v==Ae,h=o==v;if(h&&Xr(e)){if(!Xr(r))return!1;s=!0,m=!1}if(h&&!m)return i||(i=new Ve),s||Qf(e)?zf(e,r,t,n,a,i):Zf(e,r,o,t,n,a,i);if(!(t&ec)){var g=m&&rt.call(e,"__wrapped__"),A=$&&rt.call(r,"__wrapped__");if(g||A){var p=g?e.value():e,T=A?r.value():r;return i||(i=new Ve),a(p,T,t,n,i)}}return h?(i||(i=new Ve),Xf(e,r,t,n,a,i)):!1}var nc=tc,ac=nc,tt=se;function sn(e,r,t,n,a){return e===r?!0:e==null||r==null||!tt(e)&&!tt(r)?e!==e&&r!==r:ac(e,r,t,n,sn,a)}var ic=sn,sc=ic;function oc(e,r){return sc(e,r)}var on=oc;function uc(e,r=!1,t=void 0,n=60){const[a,i]=Y.useState(e&&Yr(e,t,void 0,r));Le(s,n*1e3);function s(){const f=e&&Yr(e,t,void 0,r);on(f,a)||(console.log("menu has changed",f),i(f))}return Y.useEffect(s,[a,e]),a}var nt;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.PROCESSING="PROCESSING",e.PAID="PAID",e.FAILED="FAILED",e.PRINTING_RECEIPT="PRINTING_RECEIPT",e.PRINTING_RECEIPT_SUCCESS="PRINTING_RECEIPT_SUCCESS",e.SENDING_RECEIPT="SENDING_RECEIPT",e.SENDING_RECEIPT_SUCCESS="SENDING_RECEIPT_SUCCESS",e.ERROR="ERROR"})(nt||(nt={}));var at;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(at||(at={}));var ir;(function(e){e.GROUP="3e/group",e.PRODUCT="3e/product",e.CATEGORY="3e/group/category",e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query"})(ir||(ir={}));var it;(function(e){e.GROUP="group",e.PRODUCT="product"})(it||(it={}));var st;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN"})(st||(st={}));var ot;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(ot||(ot={}));var ut;(function(e){e.CASH="CASH",e.CARD="CARD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(ut||(ut={}));var ft;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT"})(ft||(ft={}));var ct;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(ct||(ct={}));var lt;(function(e){e.GROUP="group",e.PRODUCT="product"})(lt||(lt={}));var dt;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.UBER_DELIVERY="UBER_DELIVERY",e.BOLT_DELIVERY="BOLT_DELIVERY",e.WOLT_DELIVERY="WOLT_DELIVERY"})(dt||(dt={}));function fc(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var cc=fc,lc=Q,dc=function(){try{var e=lc(Object,"defineProperty");return e({},"",{}),e}catch{}}(),hc=dc,ht=hc;function pc(e,r,t){r=="__proto__"&&ht?ht(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}var un=pc,vc=un,gc=gr,$c=Object.prototype,yc=$c.hasOwnProperty;function mc(e,r,t){var n=e[r];(!(yc.call(e,r)&&gc(n,t))||t===void 0&&!(r in e))&&vc(e,r,t)}var fn=mc,bc=fn,_c=un;function Ac(e,r,t,n){var a=!t;t||(t={});for(var i=-1,s=r.length;++i<s;){var f=r[i],o=n?n(t[f],e[f],f,t,e):void 0;o===void 0&&(o=e[f]),a?_c(t,f,o):bc(t,f,o)}return t}var Be=Ac,Ec=Be,Tc=yr;function Oc(e,r){return e&&Ec(r,Tc(r),e)}var Sc=Oc;function wc(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var Ic=wc,Cc=$e,Dc=xe,jc=Ic,Lc=Object.prototype,xc=Lc.hasOwnProperty;function Rc(e){if(!Cc(e))return jc(e);var r=Dc(e),t=[];for(var n in e)n=="constructor"&&(r||!xc.call(e,n))||t.push(n);return t}var Nc=Rc,Pc=nn,Uc=Nc,Mc=dr;function Fc(e){return Mc(e)?Pc(e,!0):Uc(e)}var mr=Fc,Bc=Be,Hc=mr;function Yc(e,r){return e&&Bc(r,Hc(r),e)}var Gc=Yc,sr={exports:{}};(function(e,r){var t=K,n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?t.Buffer:void 0,f=s?s.allocUnsafe:void 0;function o(v,m){if(m)return v.slice();var $=v.length,h=f?f($):new v.constructor($);return v.copy(h),h}e.exports=o})(sr,sr.exports);function qc(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var Wc=qc,Kc=Be,Vc=$r;function kc(e,r){return Kc(e,Vc(e),r)}var Jc=kc,zc=Pt,Zc=zc(Object.getPrototypeOf,Object),cn=Zc,Xc=en,Qc=cn,el=$r,rl=tn,tl=Object.getOwnPropertySymbols,nl=tl?function(e){for(var r=[];e;)Xc(r,el(e)),e=Qc(e);return r}:rl,ln=nl,al=Be,il=ln;function sl(e,r){return al(e,il(e),r)}var ol=sl,ul=rn,fl=ln,cl=mr;function ll(e){return ul(e,cl,fl)}var dl=ll,hl=Object.prototype,pl=hl.hasOwnProperty;function vl(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&pl.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var gl=vl,pt=Qt;function $l(e){var r=new e.constructor(e.byteLength);return new pt(r).set(new pt(e)),r}var br=$l,yl=br;function ml(e,r){var t=r?yl(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var bl=ml,_l=/\w*$/;function Al(e){var r=new e.constructor(e.source,_l.exec(e));return r.lastIndex=e.lastIndex,r}var El=Al,vt=Re,gt=vt?vt.prototype:void 0,$t=gt?gt.valueOf:void 0;function Tl(e){return $t?Object($t.call(e)):{}}var Ol=Tl,Sl=br;function wl(e,r){var t=r?Sl(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var Il=wl,Cl=br,Dl=bl,jl=El,Ll=Ol,xl=Il,Rl="[object Boolean]",Nl="[object Date]",Pl="[object Map]",Ul="[object Number]",Ml="[object RegExp]",Fl="[object Set]",Bl="[object String]",Hl="[object Symbol]",Yl="[object ArrayBuffer]",Gl="[object DataView]",ql="[object Float32Array]",Wl="[object Float64Array]",Kl="[object Int8Array]",Vl="[object Int16Array]",kl="[object Int32Array]",Jl="[object Uint8Array]",zl="[object Uint8ClampedArray]",Zl="[object Uint16Array]",Xl="[object Uint32Array]";function Ql(e,r,t){var n=e.constructor;switch(r){case Yl:return Cl(e);case Rl:case Nl:return new n(+e);case Gl:return Dl(e,t);case ql:case Wl:case Kl:case Vl:case kl:case Jl:case zl:case Zl:case Xl:return xl(e,t);case Pl:return new n;case Ul:case Bl:return new n(e);case Ml:return jl(e);case Fl:return new n;case Hl:return Ll(e)}}var ed=Ql,rd=$e,yt=Object.create,td=function(){function e(){}return function(r){if(!rd(r))return{};if(yt)return yt(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}(),nd=td,ad=nd,id=cn,sd=xe;function od(e){return typeof e.constructor=="function"&&!sd(e)?ad(id(e)):{}}var ud=od,fd=ye,cd=se,ld="[object Map]";function dd(e){return cd(e)&&fd(e)==ld}var hd=dd,pd=hd,vd=hr,mt=ve.exports,bt=mt&&mt.isMap,gd=bt?vd(bt):pd,$d=gd,yd=ye,md=se,bd="[object Set]";function _d(e){return md(e)&&yd(e)==bd}var Ad=_d,Ed=Ad,Td=hr,_t=ve.exports,At=_t&&_t.isSet,Od=At?Td(At):Ed,Sd=Od,wd=Zt,Id=cc,Cd=fn,Dd=Sc,jd=Gc,Ld=sr.exports,xd=Wc,Rd=Jc,Nd=ol,Pd=an,Ud=dl,Md=ye,Fd=gl,Bd=ed,Hd=ud,Yd=me,Gd=ae.exports,qd=$d,Wd=$e,Kd=Sd,Vd=yr,kd=mr,Jd=1,zd=2,Zd=4,dn="[object Arguments]",Xd="[object Array]",Qd="[object Boolean]",eh="[object Date]",rh="[object Error]",hn="[object Function]",th="[object GeneratorFunction]",nh="[object Map]",ah="[object Number]",pn="[object Object]",ih="[object RegExp]",sh="[object Set]",oh="[object String]",uh="[object Symbol]",fh="[object WeakMap]",ch="[object ArrayBuffer]",lh="[object DataView]",dh="[object Float32Array]",hh="[object Float64Array]",ph="[object Int8Array]",vh="[object Int16Array]",gh="[object Int32Array]",$h="[object Uint8Array]",yh="[object Uint8ClampedArray]",mh="[object Uint16Array]",bh="[object Uint32Array]",N={};N[dn]=N[Xd]=N[ch]=N[lh]=N[Qd]=N[eh]=N[dh]=N[hh]=N[ph]=N[vh]=N[gh]=N[nh]=N[ah]=N[pn]=N[ih]=N[sh]=N[oh]=N[uh]=N[$h]=N[yh]=N[mh]=N[bh]=!0;N[rh]=N[hn]=N[fh]=!1;function Oe(e,r,t,n,a,i){var s,f=r&Jd,o=r&zd,v=r&Zd;if(t&&(s=a?t(e,n,a,i):t(e)),s!==void 0)return s;if(!Wd(e))return e;var m=Yd(e);if(m){if(s=Fd(e),!f)return xd(e,s)}else{var $=Md(e),h=$==hn||$==th;if(Gd(e))return Ld(e,f);if($==pn||$==dn||h&&!a){if(s=o||h?{}:Hd(e),!f)return o?Nd(e,jd(s,e)):Rd(e,Dd(s,e))}else{if(!N[$])return a?e:{};s=Bd(e,$,f)}}i||(i=new wd);var g=i.get(e);if(g)return g;i.set(e,s),Kd(e)?e.forEach(function(T){s.add(Oe(T,r,t,T,e,i))}):qd(e)&&e.forEach(function(T,j){s.set(j,Oe(T,r,t,j,e,i))});var A=v?o?Ud:Pd:o?kd:Vd,p=m?void 0:A(e);return Id(p||e,function(T,j){p&&(j=T,T=e[j]),Cd(s,j,Oe(T,r,t,j,e,i))}),s}var _h=Oe,Ah=_h,Eh=1,Th=4;function Oh(e){return Ah(e,Eh|Th)}var Sh=Oh;function wh(e,r){if(!r||!r.filter||!e||!e.filter||e.kind!==ir.CONFIG)return!0;if(e.filter&&e.items){const t=Object.values(e.filter).flat().filter(n=>{var a,i,s,f;return r.filter[(i=(a=e.items)==null?void 0:a[0])==null?void 0:i.fltCtx]&&Object.values(r.filter[(f=(s=e.items)==null?void 0:s[0])==null?void 0:f.fltCtx]).includes(n)});if(Array.isArray(t)&&t.length===0)return!1}return!0}const De=(e,r,t=0)=>{if(!e)return 0;let n=parseFloat(e.price)||0;const{items:a}=e,i=Sh(r);return wh(e,i)&&Array.isArray(a)&&a.forEach(s=>{let f=0;if(s.kind!=="3e/product")f=De(s,i,t+1);else{const{selected:o={}}=i,{selCtx:v,id:m}=s;v in o&&m in o[v]&&(f=De(s,i,t+1)*o[v][m],delete i.selected[v][m])}n+=f}),Math.round(100*n)/100},Ih=({product:e,state:r,selected:t,cheapestGroupOptionsProduct:n})=>{var o;const a=r?De(e,r):0,i=e.state&&!vr((o=e==null?void 0:e.state)==null?void 0:o.selected)?De(e,e.state):0,s=e.minPrice&&parseFloat(e.price)===a;let f=t||!!n||parseFloat(e.price)===0?a||i:parseFloat(e.price);return n!==void 0&&(f-=n),s&&e.minPrice&&(f=parseFloat(e.minPrice)),{displayPrice:f,showAsMinPrice:s,calculatedPriceDefaultProductState:i}};function _r(e){const r=[];return e.reduce((t,n)=>{if(t[n.hash]||(t[n.hash]={...n,quantity:0,discounted:0,discounts:[],firstProductQuantity:n.quantity,itemsToRemove:[]},r.push(t[n.hash])),t[n.hash].quantity+=n.quantity,t[n.hash].itemsToRemove.push(n.id),n.discounts){t[n.hash].discounts||(t[n.hash].discounts=[]),t[n.hash].discounts=t[n.hash].discounts.concat(n.discounts),t[n.hash].discounted=0;for(let a=0;a<t[n.hash].discounts.length;a+=1)t[n.hash].discounts[a]&&(t[n.hash].discounted+=parseFloat(t[n.hash].discounts[a].discountPrice))}return t},{}),r}function Ch(e){return _r(e)}function Dh(e){return!e||e.length===0?null:_r(e.flatMap(r=>r.lines))}var Ar={exports:{}},vn=function(r,t){return function(){for(var a=new Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return r.apply(t,a)}},jh=vn,ee=Object.prototype.toString;function Er(e){return ee.call(e)==="[object Array]"}function or(e){return typeof e=="undefined"}function Lh(e){return e!==null&&!or(e)&&e.constructor!==null&&!or(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function xh(e){return ee.call(e)==="[object ArrayBuffer]"}function Rh(e){return typeof FormData!="undefined"&&e instanceof FormData}function Nh(e){var r;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&e.buffer instanceof ArrayBuffer,r}function Ph(e){return typeof e=="string"}function Uh(e){return typeof e=="number"}function gn(e){return e!==null&&typeof e=="object"}function Se(e){if(ee.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function Mh(e){return ee.call(e)==="[object Date]"}function Fh(e){return ee.call(e)==="[object File]"}function Bh(e){return ee.call(e)==="[object Blob]"}function $n(e){return ee.call(e)==="[object Function]"}function Hh(e){return gn(e)&&$n(e.pipe)}function Yh(e){return typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams}function Gh(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function qh(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function Tr(e,r){if(!(e===null||typeof e=="undefined"))if(typeof e!="object"&&(e=[e]),Er(e))for(var t=0,n=e.length;t<n;t++)r.call(null,e[t],t,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.call(null,e[a],a,e)}function ur(){var e={};function r(a,i){Se(e[i])&&Se(a)?e[i]=ur(e[i],a):Se(a)?e[i]=ur({},a):Er(a)?e[i]=a.slice():e[i]=a}for(var t=0,n=arguments.length;t<n;t++)Tr(arguments[t],r);return e}function Wh(e,r,t){return Tr(r,function(a,i){t&&typeof a=="function"?e[i]=jh(a,t):e[i]=a}),e}function Kh(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var q={isArray:Er,isArrayBuffer:xh,isBuffer:Lh,isFormData:Rh,isArrayBufferView:Nh,isString:Ph,isNumber:Uh,isObject:gn,isPlainObject:Se,isUndefined:or,isDate:Mh,isFile:Fh,isBlob:Bh,isFunction:$n,isStream:Hh,isURLSearchParams:Yh,isStandardBrowserEnv:qh,forEach:Tr,merge:ur,extend:Wh,trim:Gh,stripBOM:Kh},te=q;function Et(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var yn=function(r,t,n){if(!t)return r;var a;if(n)a=n(t);else if(te.isURLSearchParams(t))a=t.toString();else{var i=[];te.forEach(t,function(o,v){o===null||typeof o=="undefined"||(te.isArray(o)?v=v+"[]":o=[o],te.forEach(o,function($){te.isDate($)?$=$.toISOString():te.isObject($)&&($=JSON.stringify($)),i.push(Et(v)+"="+Et($))}))}),a=i.join("&")}if(a){var s=r.indexOf("#");s!==-1&&(r=r.slice(0,s)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r},Vh=q;function He(){this.handlers=[]}He.prototype.use=function(r,t,n){return this.handlers.push({fulfilled:r,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};He.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)};He.prototype.forEach=function(r){Vh.forEach(this.handlers,function(n){n!==null&&r(n)})};var kh=He,Jh=q,zh=function(r,t){Jh.forEach(r,function(a,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(r[t]=a,delete r[i])})},mn=function(r,t,n,a,i){return r.config=t,n&&(r.code=n),r.request=a,r.response=i,r.isAxiosError=!0,r.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},r},Zh=mn,bn=function(r,t,n,a,i){var s=new Error(r);return Zh(s,t,n,a,i)},Xh=bn,Qh=function(r,t,n){var a=n.config.validateStatus;!n.status||!a||a(n.status)?r(n):t(Xh("Request failed with status code "+n.status,n.config,null,n.request,n))},Ee=q,ep=Ee.isStandardBrowserEnv()?function(){return{write:function(t,n,a,i,s,f){var o=[];o.push(t+"="+encodeURIComponent(n)),Ee.isNumber(a)&&o.push("expires="+new Date(a).toGMTString()),Ee.isString(i)&&o.push("path="+i),Ee.isString(s)&&o.push("domain="+s),f===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),rp=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)},tp=function(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r},np=rp,ap=tp,ip=function(r,t){return r&&!np(t)?ap(r,t):t},ke=q,sp=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],op=function(r){var t={},n,a,i;return r&&ke.forEach(r.split(`
2
- `),function(f){if(i=f.indexOf(":"),n=ke.trim(f.substr(0,i)).toLowerCase(),a=ke.trim(f.substr(i+1)),n){if(t[n]&&sp.indexOf(n)>=0)return;n==="set-cookie"?t[n]=(t[n]?t[n]:[]).concat([a]):t[n]=t[n]?t[n]+", "+a:a}}),t},Tt=q,up=Tt.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),n;function a(i){var s=i;return r&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=a(window.location.href),function(s){var f=Tt.isString(s)?a(s):s;return f.protocol===n.protocol&&f.host===n.host}}():function(){return function(){return!0}}(),Te=q,fp=Qh,cp=ep,lp=yn,dp=ip,hp=op,pp=up,Je=bn,Ot=function(r){return new Promise(function(n,a){var i=r.data,s=r.headers,f=r.responseType;Te.isFormData(i)&&delete s["Content-Type"];var o=new XMLHttpRequest;if(r.auth){var v=r.auth.username||"",m=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";s.Authorization="Basic "+btoa(v+":"+m)}var $=dp(r.baseURL,r.url);o.open(r.method.toUpperCase(),lp($,r.params,r.paramsSerializer),!0),o.timeout=r.timeout;function h(){if(!!o){var A="getAllResponseHeaders"in o?hp(o.getAllResponseHeaders()):null,p=!f||f==="text"||f==="json"?o.responseText:o.response,T={data:p,status:o.status,statusText:o.statusText,headers:A,config:r,request:o};fp(n,a,T),o=null}}if("onloadend"in o?o.onloadend=h:o.onreadystatechange=function(){!o||o.readyState!==4||o.status===0&&!(o.responseURL&&o.responseURL.indexOf("file:")===0)||setTimeout(h)},o.onabort=function(){!o||(a(Je("Request aborted",r,"ECONNABORTED",o)),o=null)},o.onerror=function(){a(Je("Network Error",r,null,o)),o=null},o.ontimeout=function(){var p="timeout of "+r.timeout+"ms exceeded";r.timeoutErrorMessage&&(p=r.timeoutErrorMessage),a(Je(p,r,r.transitional&&r.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",o)),o=null},Te.isStandardBrowserEnv()){var g=(r.withCredentials||pp($))&&r.xsrfCookieName?cp.read(r.xsrfCookieName):void 0;g&&(s[r.xsrfHeaderName]=g)}"setRequestHeader"in o&&Te.forEach(s,function(p,T){typeof i=="undefined"&&T.toLowerCase()==="content-type"?delete s[T]:o.setRequestHeader(T,p)}),Te.isUndefined(r.withCredentials)||(o.withCredentials=!!r.withCredentials),f&&f!=="json"&&(o.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&o.addEventListener("progress",r.onDownloadProgress),typeof r.onUploadProgress=="function"&&o.upload&&o.upload.addEventListener("progress",r.onUploadProgress),r.cancelToken&&r.cancelToken.promise.then(function(p){!o||(o.abort(),a(p),o=null)}),i||(i=null),o.send(i)})},F=q,St=zh,vp=mn,gp={"Content-Type":"application/x-www-form-urlencoded"};function wt(e,r){!F.isUndefined(e)&&F.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function $p(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Ot),e}function yp(e,r,t){if(F.isString(e))try{return(r||JSON.parse)(e),F.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}var Ye={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:$p(),transformRequest:[function(r,t){return St(t,"Accept"),St(t,"Content-Type"),F.isFormData(r)||F.isArrayBuffer(r)||F.isBuffer(r)||F.isStream(r)||F.isFile(r)||F.isBlob(r)?r:F.isArrayBufferView(r)?r.buffer:F.isURLSearchParams(r)?(wt(t,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):F.isObject(r)||t&&t["Content-Type"]==="application/json"?(wt(t,"application/json"),yp(r)):r}],transformResponse:[function(r){var t=this.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||a&&F.isString(r)&&r.length)try{return JSON.parse(r)}catch(s){if(i)throw s.name==="SyntaxError"?vp(s,this,"E_JSON_PARSE"):s}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};Ye.headers={common:{Accept:"application/json, text/plain, */*"}};F.forEach(["delete","get","head"],function(r){Ye.headers[r]={}});F.forEach(["post","put","patch"],function(r){Ye.headers[r]=F.merge(gp)});var Or=Ye,mp=q,bp=Or,_p=function(r,t,n){var a=this||bp;return mp.forEach(n,function(s){r=s.call(a,r,t)}),r},_n=function(r){return!!(r&&r.__CANCEL__)},It=q,ze=_p,Ap=_n,Ep=Or;function Ze(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Tp=function(r){Ze(r),r.headers=r.headers||{},r.data=ze.call(r,r.data,r.headers,r.transformRequest),r.headers=It.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),It.forEach(["delete","get","head","post","put","patch","common"],function(a){delete r.headers[a]});var t=r.adapter||Ep.adapter;return t(r).then(function(a){return Ze(r),a.data=ze.call(r,a.data,a.headers,r.transformResponse),a},function(a){return Ap(a)||(Ze(r),a&&a.response&&(a.response.data=ze.call(r,a.response.data,a.response.headers,r.transformResponse))),Promise.reject(a)})},H=q,An=function(r,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],f=["validateStatus"];function o(h,g){return H.isPlainObject(h)&&H.isPlainObject(g)?H.merge(h,g):H.isPlainObject(g)?H.merge({},g):H.isArray(g)?g.slice():g}function v(h){H.isUndefined(t[h])?H.isUndefined(r[h])||(n[h]=o(void 0,r[h])):n[h]=o(r[h],t[h])}H.forEach(a,function(g){H.isUndefined(t[g])||(n[g]=o(void 0,t[g]))}),H.forEach(i,v),H.forEach(s,function(g){H.isUndefined(t[g])?H.isUndefined(r[g])||(n[g]=o(void 0,r[g])):n[g]=o(void 0,t[g])}),H.forEach(f,function(g){g in t?n[g]=o(r[g],t[g]):g in r&&(n[g]=o(void 0,r[g]))});var m=a.concat(i).concat(s).concat(f),$=Object.keys(r).concat(Object.keys(t)).filter(function(g){return m.indexOf(g)===-1});return H.forEach($,v),n};const Op="axios",Sp="0.21.4",wp="Promise based HTTP client for the browser and node.js",Ip="index.js",Cp={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},Dp={type:"git",url:"https://github.com/axios/axios.git"},jp=["xhr","http","ajax","promise","node"],Lp="Matt Zabriskie",xp="MIT",Rp={url:"https://github.com/axios/axios/issues"},Np="https://axios-http.com",Pp={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},Up={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},Mp="dist/axios.min.js",Fp="dist/axios.min.js",Bp="./index.d.ts",Hp={"follow-redirects":"^1.14.0"},Yp=[{path:"./dist/axios.min.js",threshold:"5kB"}];var Gp={name:Op,version:Sp,description:wp,main:Ip,scripts:Cp,repository:Dp,keywords:jp,author:Lp,license:xp,bugs:Rp,homepage:Np,devDependencies:Pp,browser:Up,jsdelivr:Mp,unpkg:Fp,typings:Bp,dependencies:Hp,bundlesize:Yp},En=Gp,Sr={};["object","boolean","number","function","string","symbol"].forEach(function(e,r){Sr[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});var Ct={},qp=En.version.split(".");function Tn(e,r){for(var t=r?r.split("."):qp,n=e.split("."),a=0;a<3;a++){if(t[a]>n[a])return!0;if(t[a]<n[a])return!1}return!1}Sr.transitional=function(r,t,n){var a=t&&Tn(t);function i(s,f){return"[Axios v"+En.version+"] Transitional option '"+s+"'"+f+(n?". "+n:"")}return function(s,f,o){if(r===!1)throw new Error(i(f," has been removed in "+t));return a&&!Ct[f]&&(Ct[f]=!0,console.warn(i(f," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(s,f,o):!0}};function Wp(e,r,t){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var i=n[a],s=r[i];if(s){var f=e[i],o=f===void 0||s(f,i,e);if(o!==!0)throw new TypeError("option "+i+" must be "+o);continue}if(t!==!0)throw Error("Unknown option "+i)}}var Kp={isOlderVersion:Tn,assertOptions:Wp,validators:Sr},On=q,Vp=yn,Dt=kh,jt=Tp,Ge=An,Sn=Kp,ne=Sn.validators;function be(e){this.defaults=e,this.interceptors={request:new Dt,response:new Dt}}be.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=Ge(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var t=r.transitional;t!==void 0&&Sn.assertOptions(t,{silentJSONParsing:ne.transitional(ne.boolean,"1.0.0"),forcedJSONParsing:ne.transitional(ne.boolean,"1.0.0"),clarifyTimeoutError:ne.transitional(ne.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(a=a&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var i=[];this.interceptors.response.forEach(function(h){i.push(h.fulfilled,h.rejected)});var s;if(!a){var f=[jt,void 0];for(Array.prototype.unshift.apply(f,n),f=f.concat(i),s=Promise.resolve(r);f.length;)s=s.then(f.shift(),f.shift());return s}for(var o=r;n.length;){var v=n.shift(),m=n.shift();try{o=v(o)}catch($){m($);break}}try{s=jt(o)}catch($){return Promise.reject($)}for(;i.length;)s=s.then(i.shift(),i.shift());return s};be.prototype.getUri=function(r){return r=Ge(this.defaults,r),Vp(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")};On.forEach(["delete","get","head","options"],function(r){be.prototype[r]=function(t,n){return this.request(Ge(n||{},{method:r,url:t,data:(n||{}).data}))}});On.forEach(["post","put","patch"],function(r){be.prototype[r]=function(t,n,a){return this.request(Ge(a||{},{method:r,url:t,data:n}))}});var kp=be;function wr(e){this.message=e}wr.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};wr.prototype.__CANCEL__=!0;var wn=wr,Jp=wn;function je(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(a){r=a});var t=this;e(function(a){t.reason||(t.reason=new Jp(a),r(t.reason))})}je.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};je.source=function(){var r,t=new je(function(a){r=a});return{token:t,cancel:r}};var zp=je,Zp=function(r){return function(n){return r.apply(null,n)}},Xp=function(r){return typeof r=="object"&&r.isAxiosError===!0},Lt=q,Qp=vn,we=kp,ev=An,rv=Or;function In(e){var r=new we(e),t=Qp(we.prototype.request,r);return Lt.extend(t,we.prototype,r),Lt.extend(t,r),t}var W=In(rv);W.Axios=we;W.create=function(r){return In(ev(W.defaults,r))};W.Cancel=wn;W.CancelToken=zp;W.isCancel=_n;W.all=function(r){return Promise.all(r)};W.spread=Zp;W.isAxiosError=Xp;Ar.exports=W;Ar.exports.default=W;var tv=Ar.exports;const nv=(e,r)=>{var t,n,a;return e&&((t=e==null?void 0:e.url)==null?void 0:t.length)>0&&(((n=e.url.find(i=>i.locale===r))==null?void 0:n.value)||((a=e.url.find(i=>i.locale==="*"))==null?void 0:a.value))||null},av=(e,r)=>{var t,n;return((t=e==null?void 0:e.find)==null?void 0:t.call(e,a=>a.venue===r))||((n=e==null?void 0:e.find)==null?void 0:n.call(e,a=>a.venue==="*"))};function Ir(e,r=600,t=!0,n,a){var j,u;if(!n||!a)throw new Error("baseUrl or tenant was not provided");const i=`${e}_${a}_${n}`,s=`${n.endsWith("/")?n.slice(0,-1):n}/cms-api/content/${a}/${e}`,f=((j=T())==null?void 0:j.value)||null,[o,v]=Y.useState(((u=T())==null?void 0:u.timestamp)||0),[m,$]=Y.useState(f||null),[h,g]=Y.useState(!1);function A(){tv.get(s).then(c=>{if(vr(c.data))throw new Error(`CMS data '${e}' is an empty object`);on(c.data,m)||$(c.data),h&&g(!1),t&&p(c.data)}).catch(c=>{console.error(c),g(!0)})}function p(c){const d=new Date().valueOf(),l=JSON.stringify({value:c,timestamp:d});localStorage.setItem(i,l),v(d)}function T(){try{const c=localStorage.getItem(i);if(c)return JSON.parse(c)}catch(c){console.warn(c)}return null}return Y.useEffect(()=>{new Date().valueOf()-o>r*1e3&&A()},[]),Le(A,r*1e3),{value:m,isError:h,isLoading:!h&&!m}}function Cn(e,r=600,t=!0,n,a,i){var f,o,v,m;if(!n||!a||!i)throw new Error("baseUrl, tenant or venue was not provided");const s=Ir(e,r,t,n,a);return{value:((o=(f=s.value)==null?void 0:f.find)==null?void 0:o.call(f,$=>$.venue===i))||((m=(v=s.value)==null?void 0:v.find)==null?void 0:m.call(v,$=>$.venue==="*"))||null,isError:s.isError}}function iv(e,r,t,n=300,a=!0){var m,$,h,g;const i=Y.useContext(Nt.ConfigContext);if(!i)throw new Error("Missing config context");const{value:s,isError:f}=Cn(e,n,a,i.baseUrl,i.tenant,r);let o=null,v=null;return s&&((m=s==null?void 0:s.url)==null?void 0:m.length)>0&&(o=(($=s.url.find(A=>A.locale===t))==null?void 0:$.value)||((h=s.url.find(A=>A.locale==="*"))==null?void 0:h.value)||null),!o&&s&&((g=s==null?void 0:s.url)==null?void 0:g.length)>0&&(v=s.url[0].value),{url:o,fallbackUrl:v,isError:f}}function Dn({kioskMediaId:e,kioskMediaType:r,intervalSeconds:t=600,withLocalStorage:n=!0,baseUrl:a,tenant:i,venue:s,locale:f}){var p;const{value:o,isError:v,isLoading:m}=Ir(e,t,n,a,i),$=(o==null?void 0:o[r])||[],h=av($,s),g=nv(h,f),A=!g&&h&&((p=h==null?void 0:h.url)==null?void 0:p.length)>0?h.url[0].value:null;return{url:g,fallbackUrl:A,mediaType:h==null?void 0:h.mediaType,isError:v,isLoading:m}}function sv({kioskMediaId:e,kioskMediaType:r,venue:t,intervalSeconds:n=600,withLocalStorage:a=!0}){const i=Y.useContext(Nt.ConfigContext);if(!i)throw new Error("Missing config context");const{i18n:{language:s}}=Rn.useTranslation();return Dn({kioskMediaId:e,kioskMediaType:r,intervalSeconds:n,withLocalStorage:a,venue:t,baseUrl:i.baseUrl,tenant:i.tenant,locale:s})}function ov(e,r){Y.useEffect(()=>{const t=n=>{!e.current||e.current.contains(n.target)||r(n)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,r])}function uv(e){const[r,t]=Y.useState(pe(e==null?void 0:e.DINE_IN)),[n,a]=Y.useState(pe(e==null?void 0:e.TAKE_AWAY));function i(){const s=pe(e==null?void 0:e.DINE_IN),f=pe(e==null?void 0:e.TAKE_AWAY);s!==r&&(console.log("dine in open changed",r,"=>",s),t(s)),f!==n&&(console.log("take away open changed",n,"=>",f),a(f))}return Y.useEffect(()=>{i()},[e]),Le(i,6e4),{dineInOpen:r,takeAwayOpen:n,loaded:!!e}}var fr={},fv=e=>encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),jn="%[a-f0-9]{2}",xt=new RegExp("("+jn+")|([^%]+?)","gi"),Rt=new RegExp("("+jn+")+","gi");function cr(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;var t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],cr(t),cr(n))}function cv(e){try{return decodeURIComponent(e)}catch{for(var r=e.match(xt)||[],t=1;t<r.length;t++)e=cr(r,t).join(""),r=e.match(xt)||[];return e}}function lv(e){for(var r={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},t=Rt.exec(e);t;){try{r[t[0]]=decodeURIComponent(t[0])}catch{var n=cv(t[0]);n!==t[0]&&(r[t[0]]=n)}t=Rt.exec(e)}r["%C2"]="\uFFFD";for(var a=Object.keys(r),i=0;i<a.length;i++){var s=a[i];e=e.replace(new RegExp(s,"g"),r[s])}return e}var dv=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return lv(e)}},hv=(e,r)=>{if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r==="")return[e];const t=e.indexOf(r);return t===-1?[e]:[e.slice(0,t),e.slice(t+r.length)]},pv=function(e,r){for(var t={},n=Object.keys(e),a=Array.isArray(r),i=0;i<n.length;i++){var s=n[i],f=e[s];(a?r.indexOf(s)!==-1:r(s,f,e))&&(t[s]=f)}return t};(function(e){const r=fv,t=dv,n=hv,a=pv,i=u=>u==null,s=Symbol("encodeFragmentIdentifier");function f(u){switch(u.arrayFormat){case"index":return c=>(d,l)=>{const y=d.length;return l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[m(c,u),"[",y,"]"].join("")]:[...d,[m(c,u),"[",m(y,u),"]=",m(l,u)].join("")]};case"bracket":return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[m(c,u),"[]"].join("")]:[...d,[m(c,u),"[]=",m(l,u)].join("")];case"colon-list-separator":return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[m(c,u),":list="].join("")]:[...d,[m(c,u),":list=",m(l,u)].join("")];case"comma":case"separator":case"bracket-separator":{const c=u.arrayFormat==="bracket-separator"?"[]=":"=";return d=>(l,y)=>y===void 0||u.skipNull&&y===null||u.skipEmptyString&&y===""?l:(y=y===null?"":y,l.length===0?[[m(d,u),c,m(y,u)].join("")]:[[l,m(y,u)].join(u.arrayFormatSeparator)])}default:return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,m(c,u)]:[...d,[m(c,u),"=",m(l,u)].join("")]}}function o(u){let c;switch(u.arrayFormat){case"index":return(d,l,y)=>{if(c=/\[(\d*)\]$/.exec(d),d=d.replace(/\[\d*\]$/,""),!c){y[d]=l;return}y[d]===void 0&&(y[d]={}),y[d][c[1]]=l};case"bracket":return(d,l,y)=>{if(c=/(\[\])$/.exec(d),d=d.replace(/\[\]$/,""),!c){y[d]=l;return}if(y[d]===void 0){y[d]=[l];return}y[d]=[].concat(y[d],l)};case"colon-list-separator":return(d,l,y)=>{if(c=/(:list)$/.exec(d),d=d.replace(/:list$/,""),!c){y[d]=l;return}if(y[d]===void 0){y[d]=[l];return}y[d]=[].concat(y[d],l)};case"comma":case"separator":return(d,l,y)=>{const w=typeof l=="string"&&l.includes(u.arrayFormatSeparator),O=typeof l=="string"&&!w&&$(l,u).includes(u.arrayFormatSeparator);l=O?$(l,u):l;const I=w||O?l.split(u.arrayFormatSeparator).map(x=>$(x,u)):l===null?l:$(l,u);y[d]=I};case"bracket-separator":return(d,l,y)=>{const w=/(\[\])$/.test(d);if(d=d.replace(/\[\]$/,""),!w){y[d]=l&&$(l,u);return}const O=l===null?[]:l.split(u.arrayFormatSeparator).map(I=>$(I,u));if(y[d]===void 0){y[d]=O;return}y[d]=[].concat(y[d],O)};default:return(d,l,y)=>{if(y[d]===void 0){y[d]=l;return}y[d]=[].concat(y[d],l)}}}function v(u){if(typeof u!="string"||u.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function m(u,c){return c.encode?c.strict?r(u):encodeURIComponent(u):u}function $(u,c){return c.decode?t(u):u}function h(u){return Array.isArray(u)?u.sort():typeof u=="object"?h(Object.keys(u)).sort((c,d)=>Number(c)-Number(d)).map(c=>u[c]):u}function g(u){const c=u.indexOf("#");return c!==-1&&(u=u.slice(0,c)),u}function A(u){let c="";const d=u.indexOf("#");return d!==-1&&(c=u.slice(d)),c}function p(u){u=g(u);const c=u.indexOf("?");return c===-1?"":u.slice(c+1)}function T(u,c){return c.parseNumbers&&!Number.isNaN(Number(u))&&typeof u=="string"&&u.trim()!==""?u=Number(u):c.parseBooleans&&u!==null&&(u.toLowerCase()==="true"||u.toLowerCase()==="false")&&(u=u.toLowerCase()==="true"),u}function j(u,c){c=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},c),v(c.arrayFormatSeparator);const d=o(c),l=Object.create(null);if(typeof u!="string"||(u=u.trim().replace(/^[?#&]/,""),!u))return l;for(const y of u.split("&")){if(y==="")continue;let[w,O]=n(c.decode?y.replace(/\+/g," "):y,"=");O=O===void 0?null:["comma","separator","bracket-separator"].includes(c.arrayFormat)?O:$(O,c),d($(w,c),O,l)}for(const y of Object.keys(l)){const w=l[y];if(typeof w=="object"&&w!==null)for(const O of Object.keys(w))w[O]=T(w[O],c);else l[y]=T(w,c)}return c.sort===!1?l:(c.sort===!0?Object.keys(l).sort():Object.keys(l).sort(c.sort)).reduce((y,w)=>{const O=l[w];return Boolean(O)&&typeof O=="object"&&!Array.isArray(O)?y[w]=h(O):y[w]=O,y},Object.create(null))}e.extract=p,e.parse=j,e.stringify=(u,c)=>{if(!u)return"";c=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},c),v(c.arrayFormatSeparator);const d=O=>c.skipNull&&i(u[O])||c.skipEmptyString&&u[O]==="",l=f(c),y={};for(const O of Object.keys(u))d(O)||(y[O]=u[O]);const w=Object.keys(y);return c.sort!==!1&&w.sort(c.sort),w.map(O=>{const I=u[O];return I===void 0?"":I===null?m(O,c):Array.isArray(I)?I.length===0&&c.arrayFormat==="bracket-separator"?m(O,c)+"[]":I.reduce(l(O),[]).join("&"):m(O,c)+"="+m(I,c)}).filter(O=>O.length>0).join("&")},e.parseUrl=(u,c)=>{c=Object.assign({decode:!0},c);const[d,l]=n(u,"#");return Object.assign({url:d.split("?")[0]||"",query:j(p(u),c)},c&&c.parseFragmentIdentifier&&l?{fragmentIdentifier:$(l,c)}:{})},e.stringifyUrl=(u,c)=>{c=Object.assign({encode:!0,strict:!0,[s]:!0},c);const d=g(u.url).split("?")[0]||"",l=e.extract(u.url),y=e.parse(l,{sort:!1}),w=Object.assign(y,u.query);let O=e.stringify(w,c);O&&(O=`?${O}`);let I=A(u.url);return u.fragmentIdentifier&&(I=`#${c[s]?m(u.fragmentIdentifier,c):u.fragmentIdentifier}`),`${d}${O}${I}`},e.pick=(u,c,d)=>{d=Object.assign({parseFragmentIdentifier:!0,[s]:!1},d);const{url:l,query:y,fragmentIdentifier:w}=e.parseUrl(u,d);return e.stringifyUrl({url:l,query:a(y,c),fragmentIdentifier:w},d)},e.exclude=(u,c,d)=>{const l=Array.isArray(c)?y=>!c.includes(y):(y,w)=>!c(y,w);return e.pick(u,l,d)}})(fr);const vv=[".png",".jpg",".jpeg",".webp",".bmp",".tiff"];function Ln(e,r=500){const t=fr.parseUrl(e);if(!(e.startsWith("https://orderingstackmedia.blob.core.windows.net/pictures")||e.startsWith("https://orderingstack-mmedia-tools.azurewebsites.net/api/img/")))return e;const n=t.url.substring(t.url.lastIndexOf("."));return vv.includes(n)?fr.stringifyUrl({url:t.url.replace("https://orderingstackmedia.blob.core.windows.net/pictures/","https://orderingstack-mmedia-tools.azurewebsites.net/api/img/"),query:{...t.query,w:r}}):e}function gv(e,r=500){return Ln(e,r)}function xn(e){let r=0;return e==null||e.forEach(t=>r+=Number(t.discountPrice)),r}function $v(e){return xn(e.discounts)}function yv(e,r,t=",",n=2){return`${Number(e).toFixed(n).replace(".",t)}${r?"\xA0"+r:""}`}exports.addDiscounts=xn;exports.formatPrice=yv;exports.getGroupedBucketLines=Dh;exports.getMediaUrl=Ln;exports.groupOrderLines=_r;exports.isChannelOpen=pe;exports.summarizeLineDiscounts=$v;exports.useAvailability=uc;exports.useCms=Ir;exports.useDisplayPrice=Ih;exports.useGroupOrderLines=Ch;exports.useInterval=Le;exports.useKioskChannelsAvailability=uv;exports.useKioskMediaCms=Dn;exports.useKioskMediaCmsWithContext=sv;exports.useLocalizedVenueMedia=iv;exports.useMediaUrl=gv;exports.useOnClickOutside=ov;exports.useVenueCms=Cn;
2
+ `),function(f){if(i=f.indexOf(":"),n=ke.trim(f.substr(0,i)).toLowerCase(),a=ke.trim(f.substr(i+1)),n){if(t[n]&&sp.indexOf(n)>=0)return;n==="set-cookie"?t[n]=(t[n]?t[n]:[]).concat([a]):t[n]=t[n]?t[n]+", "+a:a}}),t},Tt=q,up=Tt.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),n;function a(i){var s=i;return r&&(t.setAttribute("href",s),s=t.href),t.setAttribute("href",s),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=a(window.location.href),function(s){var f=Tt.isString(s)?a(s):s;return f.protocol===n.protocol&&f.host===n.host}}():function(){return function(){return!0}}(),Te=q,fp=Qh,cp=ep,lp=yn,dp=ip,hp=op,pp=up,Je=bn,Ot=function(r){return new Promise(function(n,a){var i=r.data,s=r.headers,f=r.responseType;Te.isFormData(i)&&delete s["Content-Type"];var o=new XMLHttpRequest;if(r.auth){var v=r.auth.username||"",m=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";s.Authorization="Basic "+btoa(v+":"+m)}var $=dp(r.baseURL,r.url);o.open(r.method.toUpperCase(),lp($,r.params,r.paramsSerializer),!0),o.timeout=r.timeout;function h(){if(!!o){var A="getAllResponseHeaders"in o?hp(o.getAllResponseHeaders()):null,p=!f||f==="text"||f==="json"?o.responseText:o.response,T={data:p,status:o.status,statusText:o.statusText,headers:A,config:r,request:o};fp(n,a,T),o=null}}if("onloadend"in o?o.onloadend=h:o.onreadystatechange=function(){!o||o.readyState!==4||o.status===0&&!(o.responseURL&&o.responseURL.indexOf("file:")===0)||setTimeout(h)},o.onabort=function(){!o||(a(Je("Request aborted",r,"ECONNABORTED",o)),o=null)},o.onerror=function(){a(Je("Network Error",r,null,o)),o=null},o.ontimeout=function(){var p="timeout of "+r.timeout+"ms exceeded";r.timeoutErrorMessage&&(p=r.timeoutErrorMessage),a(Je(p,r,r.transitional&&r.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",o)),o=null},Te.isStandardBrowserEnv()){var g=(r.withCredentials||pp($))&&r.xsrfCookieName?cp.read(r.xsrfCookieName):void 0;g&&(s[r.xsrfHeaderName]=g)}"setRequestHeader"in o&&Te.forEach(s,function(p,T){typeof i=="undefined"&&T.toLowerCase()==="content-type"?delete s[T]:o.setRequestHeader(T,p)}),Te.isUndefined(r.withCredentials)||(o.withCredentials=!!r.withCredentials),f&&f!=="json"&&(o.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&o.addEventListener("progress",r.onDownloadProgress),typeof r.onUploadProgress=="function"&&o.upload&&o.upload.addEventListener("progress",r.onUploadProgress),r.cancelToken&&r.cancelToken.promise.then(function(p){!o||(o.abort(),a(p),o=null)}),i||(i=null),o.send(i)})},F=q,St=zh,vp=mn,gp={"Content-Type":"application/x-www-form-urlencoded"};function wt(e,r){!F.isUndefined(e)&&F.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function $p(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Ot),e}function yp(e,r,t){if(F.isString(e))try{return(r||JSON.parse)(e),F.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}var Ye={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:$p(),transformRequest:[function(r,t){return St(t,"Accept"),St(t,"Content-Type"),F.isFormData(r)||F.isArrayBuffer(r)||F.isBuffer(r)||F.isStream(r)||F.isFile(r)||F.isBlob(r)?r:F.isArrayBufferView(r)?r.buffer:F.isURLSearchParams(r)?(wt(t,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):F.isObject(r)||t&&t["Content-Type"]==="application/json"?(wt(t,"application/json"),yp(r)):r}],transformResponse:[function(r){var t=this.transitional,n=t&&t.silentJSONParsing,a=t&&t.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||a&&F.isString(r)&&r.length)try{return JSON.parse(r)}catch(s){if(i)throw s.name==="SyntaxError"?vp(s,this,"E_JSON_PARSE"):s}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};Ye.headers={common:{Accept:"application/json, text/plain, */*"}};F.forEach(["delete","get","head"],function(r){Ye.headers[r]={}});F.forEach(["post","put","patch"],function(r){Ye.headers[r]=F.merge(gp)});var Or=Ye,mp=q,bp=Or,_p=function(r,t,n){var a=this||bp;return mp.forEach(n,function(s){r=s.call(a,r,t)}),r},_n=function(r){return!!(r&&r.__CANCEL__)},It=q,ze=_p,Ap=_n,Ep=Or;function Ze(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Tp=function(r){Ze(r),r.headers=r.headers||{},r.data=ze.call(r,r.data,r.headers,r.transformRequest),r.headers=It.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),It.forEach(["delete","get","head","post","put","patch","common"],function(a){delete r.headers[a]});var t=r.adapter||Ep.adapter;return t(r).then(function(a){return Ze(r),a.data=ze.call(r,a.data,a.headers,r.transformResponse),a},function(a){return Ap(a)||(Ze(r),a&&a.response&&(a.response.data=ze.call(r,a.response.data,a.response.headers,r.transformResponse))),Promise.reject(a)})},H=q,An=function(r,t){t=t||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],f=["validateStatus"];function o(h,g){return H.isPlainObject(h)&&H.isPlainObject(g)?H.merge(h,g):H.isPlainObject(g)?H.merge({},g):H.isArray(g)?g.slice():g}function v(h){H.isUndefined(t[h])?H.isUndefined(r[h])||(n[h]=o(void 0,r[h])):n[h]=o(r[h],t[h])}H.forEach(a,function(g){H.isUndefined(t[g])||(n[g]=o(void 0,t[g]))}),H.forEach(i,v),H.forEach(s,function(g){H.isUndefined(t[g])?H.isUndefined(r[g])||(n[g]=o(void 0,r[g])):n[g]=o(void 0,t[g])}),H.forEach(f,function(g){g in t?n[g]=o(r[g],t[g]):g in r&&(n[g]=o(void 0,r[g]))});var m=a.concat(i).concat(s).concat(f),$=Object.keys(r).concat(Object.keys(t)).filter(function(g){return m.indexOf(g)===-1});return H.forEach($,v),n};const Op="axios",Sp="0.21.4",wp="Promise based HTTP client for the browser and node.js",Ip="index.js",Cp={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},Dp={type:"git",url:"https://github.com/axios/axios.git"},jp=["xhr","http","ajax","promise","node"],Lp="Matt Zabriskie",xp="MIT",Rp={url:"https://github.com/axios/axios/issues"},Np="https://axios-http.com",Pp={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},Up={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},Mp="dist/axios.min.js",Fp="dist/axios.min.js",Bp="./index.d.ts",Hp={"follow-redirects":"^1.14.0"},Yp=[{path:"./dist/axios.min.js",threshold:"5kB"}];var Gp={name:Op,version:Sp,description:wp,main:Ip,scripts:Cp,repository:Dp,keywords:jp,author:Lp,license:xp,bugs:Rp,homepage:Np,devDependencies:Pp,browser:Up,jsdelivr:Mp,unpkg:Fp,typings:Bp,dependencies:Hp,bundlesize:Yp},En=Gp,Sr={};["object","boolean","number","function","string","symbol"].forEach(function(e,r){Sr[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});var Ct={},qp=En.version.split(".");function Tn(e,r){for(var t=r?r.split("."):qp,n=e.split("."),a=0;a<3;a++){if(t[a]>n[a])return!0;if(t[a]<n[a])return!1}return!1}Sr.transitional=function(r,t,n){var a=t&&Tn(t);function i(s,f){return"[Axios v"+En.version+"] Transitional option '"+s+"'"+f+(n?". "+n:"")}return function(s,f,o){if(r===!1)throw new Error(i(f," has been removed in "+t));return a&&!Ct[f]&&(Ct[f]=!0,console.warn(i(f," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(s,f,o):!0}};function Wp(e,r,t){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var i=n[a],s=r[i];if(s){var f=e[i],o=f===void 0||s(f,i,e);if(o!==!0)throw new TypeError("option "+i+" must be "+o);continue}if(t!==!0)throw Error("Unknown option "+i)}}var Kp={isOlderVersion:Tn,assertOptions:Wp,validators:Sr},On=q,Vp=yn,Dt=kh,jt=Tp,Ge=An,Sn=Kp,ne=Sn.validators;function be(e){this.defaults=e,this.interceptors={request:new Dt,response:new Dt}}be.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=Ge(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var t=r.transitional;t!==void 0&&Sn.assertOptions(t,{silentJSONParsing:ne.transitional(ne.boolean,"1.0.0"),forcedJSONParsing:ne.transitional(ne.boolean,"1.0.0"),clarifyTimeoutError:ne.transitional(ne.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(a=a&&h.synchronous,n.unshift(h.fulfilled,h.rejected))});var i=[];this.interceptors.response.forEach(function(h){i.push(h.fulfilled,h.rejected)});var s;if(!a){var f=[jt,void 0];for(Array.prototype.unshift.apply(f,n),f=f.concat(i),s=Promise.resolve(r);f.length;)s=s.then(f.shift(),f.shift());return s}for(var o=r;n.length;){var v=n.shift(),m=n.shift();try{o=v(o)}catch($){m($);break}}try{s=jt(o)}catch($){return Promise.reject($)}for(;i.length;)s=s.then(i.shift(),i.shift());return s};be.prototype.getUri=function(r){return r=Ge(this.defaults,r),Vp(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")};On.forEach(["delete","get","head","options"],function(r){be.prototype[r]=function(t,n){return this.request(Ge(n||{},{method:r,url:t,data:(n||{}).data}))}});On.forEach(["post","put","patch"],function(r){be.prototype[r]=function(t,n,a){return this.request(Ge(a||{},{method:r,url:t,data:n}))}});var kp=be;function wr(e){this.message=e}wr.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};wr.prototype.__CANCEL__=!0;var wn=wr,Jp=wn;function je(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(a){r=a});var t=this;e(function(a){t.reason||(t.reason=new Jp(a),r(t.reason))})}je.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};je.source=function(){var r,t=new je(function(a){r=a});return{token:t,cancel:r}};var zp=je,Zp=function(r){return function(n){return r.apply(null,n)}},Xp=function(r){return typeof r=="object"&&r.isAxiosError===!0},Lt=q,Qp=vn,we=kp,ev=An,rv=Or;function In(e){var r=new we(e),t=Qp(we.prototype.request,r);return Lt.extend(t,we.prototype,r),Lt.extend(t,r),t}var W=In(rv);W.Axios=we;W.create=function(r){return In(ev(W.defaults,r))};W.Cancel=wn;W.CancelToken=zp;W.isCancel=_n;W.all=function(r){return Promise.all(r)};W.spread=Zp;W.isAxiosError=Xp;Ar.exports=W;Ar.exports.default=W;var tv=Ar.exports;const nv=(e,r)=>{var t,n,a;return e&&((t=e==null?void 0:e.url)==null?void 0:t.length)>0&&(((n=e.url.find(i=>i.locale===r))==null?void 0:n.value)||((a=e.url.find(i=>i.locale==="*"))==null?void 0:a.value))||null},av=(e,r)=>{var t,n;return((t=e==null?void 0:e.find)==null?void 0:t.call(e,a=>a.venue===r))||((n=e==null?void 0:e.find)==null?void 0:n.call(e,a=>a.venue==="*"))};function Ir(e,r=600,t=!0,n,a){var j,u;if(!n||!a)throw new Error("baseUrl or tenant was not provided");const i=`${e}_${a}_${n}`,s=`${n.endsWith("/")?n.slice(0,-1):n}/cms-api/content/${a}/${e}`,f=((j=T())==null?void 0:j.value)||null,[o,v]=Y.useState(((u=T())==null?void 0:u.timestamp)||0),[m,$]=Y.useState(f||null),[h,g]=Y.useState(!1);function A(){tv.get(s).then(c=>{if(vr(c.data))throw new Error(`CMS data '${e}' is an empty object`);on(c.data,m)||$(c.data),h&&g(!1),t&&p(c.data)}).catch(c=>{console.error(c),g(!0)})}function p(c){const d=new Date().valueOf(),l=JSON.stringify({value:c,timestamp:d});localStorage.setItem(i,l),v(d)}function T(){try{const c=localStorage.getItem(i);if(c)return JSON.parse(c)}catch(c){console.warn(c)}return null}return Y.useEffect(()=>{new Date().valueOf()-o>r*1e3&&A()},[]),Le(A,r*1e3),{value:m,isError:h,isLoading:!h&&!m}}function Cn(e,r=600,t=!0,n,a,i){var f,o,v,m;if(!n||!a||!i)throw new Error("baseUrl, tenant or venue was not provided");const s=Ir(e,r,t,n,a);return{value:((o=(f=s.value)==null?void 0:f.find)==null?void 0:o.call(f,$=>$.venue===i))||((m=(v=s.value)==null?void 0:v.find)==null?void 0:m.call(v,$=>$.venue==="*"))||null,isError:s.isError}}function iv(e,r,t,n=300,a=!0){var m,$,h,g;const i=Y.useContext(Nt.ConfigContext);if(!i)throw new Error("Hook was used outside config context");const{value:s,isError:f}=Cn(e,n,a,i.baseUrl,i.tenant,r);let o=null,v=null;return s&&((m=s==null?void 0:s.url)==null?void 0:m.length)>0&&(o=(($=s.url.find(A=>A.locale===t))==null?void 0:$.value)||((h=s.url.find(A=>A.locale==="*"))==null?void 0:h.value)||null),!o&&s&&((g=s==null?void 0:s.url)==null?void 0:g.length)>0&&(v=s.url[0].value),{url:o,fallbackUrl:v,isError:f,mediaType:s==null?void 0:s.mediaType}}function Dn({kioskMediaId:e,kioskMediaType:r,intervalSeconds:t=600,withLocalStorage:n=!0,baseUrl:a,tenant:i,venue:s,locale:f}){var p;const{value:o,isError:v,isLoading:m}=Ir(e,t,n,a,i),$=(o==null?void 0:o[r])||[],h=av($,s),g=nv(h,f),A=!g&&h&&((p=h==null?void 0:h.url)==null?void 0:p.length)>0?h.url[0].value:null;return{url:g,fallbackUrl:A,mediaType:h==null?void 0:h.mediaType,isError:v,isLoading:m}}function sv({kioskMediaId:e,kioskMediaType:r,venue:t,intervalSeconds:n=600,withLocalStorage:a=!0}){const i=Y.useContext(Nt.ConfigContext);if(!i)throw new Error("Missing config context");const{i18n:{language:s}}=Rn.useTranslation();return Dn({kioskMediaId:e,kioskMediaType:r,intervalSeconds:n,withLocalStorage:a,venue:t,baseUrl:i.baseUrl,tenant:i.tenant,locale:s})}function ov(e,r){Y.useEffect(()=>{const t=n=>{!e.current||e.current.contains(n.target)||r(n)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,r])}function uv(e){const[r,t]=Y.useState(pe(e==null?void 0:e.DINE_IN)),[n,a]=Y.useState(pe(e==null?void 0:e.TAKE_AWAY));function i(){const s=pe(e==null?void 0:e.DINE_IN),f=pe(e==null?void 0:e.TAKE_AWAY);s!==r&&(console.log("dine in open changed",r,"=>",s),t(s)),f!==n&&(console.log("take away open changed",n,"=>",f),a(f))}return Y.useEffect(()=>{i()},[e]),Le(i,6e4),{dineInOpen:r,takeAwayOpen:n,loaded:!!e}}var fr={},fv=e=>encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),jn="%[a-f0-9]{2}",xt=new RegExp("("+jn+")|([^%]+?)","gi"),Rt=new RegExp("("+jn+")+","gi");function cr(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;var t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],cr(t),cr(n))}function cv(e){try{return decodeURIComponent(e)}catch{for(var r=e.match(xt)||[],t=1;t<r.length;t++)e=cr(r,t).join(""),r=e.match(xt)||[];return e}}function lv(e){for(var r={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},t=Rt.exec(e);t;){try{r[t[0]]=decodeURIComponent(t[0])}catch{var n=cv(t[0]);n!==t[0]&&(r[t[0]]=n)}t=Rt.exec(e)}r["%C2"]="\uFFFD";for(var a=Object.keys(r),i=0;i<a.length;i++){var s=a[i];e=e.replace(new RegExp(s,"g"),r[s])}return e}var dv=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return lv(e)}},hv=(e,r)=>{if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r==="")return[e];const t=e.indexOf(r);return t===-1?[e]:[e.slice(0,t),e.slice(t+r.length)]},pv=function(e,r){for(var t={},n=Object.keys(e),a=Array.isArray(r),i=0;i<n.length;i++){var s=n[i],f=e[s];(a?r.indexOf(s)!==-1:r(s,f,e))&&(t[s]=f)}return t};(function(e){const r=fv,t=dv,n=hv,a=pv,i=u=>u==null,s=Symbol("encodeFragmentIdentifier");function f(u){switch(u.arrayFormat){case"index":return c=>(d,l)=>{const y=d.length;return l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[m(c,u),"[",y,"]"].join("")]:[...d,[m(c,u),"[",m(y,u),"]=",m(l,u)].join("")]};case"bracket":return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[m(c,u),"[]"].join("")]:[...d,[m(c,u),"[]=",m(l,u)].join("")];case"colon-list-separator":return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,[m(c,u),":list="].join("")]:[...d,[m(c,u),":list=",m(l,u)].join("")];case"comma":case"separator":case"bracket-separator":{const c=u.arrayFormat==="bracket-separator"?"[]=":"=";return d=>(l,y)=>y===void 0||u.skipNull&&y===null||u.skipEmptyString&&y===""?l:(y=y===null?"":y,l.length===0?[[m(d,u),c,m(y,u)].join("")]:[[l,m(y,u)].join(u.arrayFormatSeparator)])}default:return c=>(d,l)=>l===void 0||u.skipNull&&l===null||u.skipEmptyString&&l===""?d:l===null?[...d,m(c,u)]:[...d,[m(c,u),"=",m(l,u)].join("")]}}function o(u){let c;switch(u.arrayFormat){case"index":return(d,l,y)=>{if(c=/\[(\d*)\]$/.exec(d),d=d.replace(/\[\d*\]$/,""),!c){y[d]=l;return}y[d]===void 0&&(y[d]={}),y[d][c[1]]=l};case"bracket":return(d,l,y)=>{if(c=/(\[\])$/.exec(d),d=d.replace(/\[\]$/,""),!c){y[d]=l;return}if(y[d]===void 0){y[d]=[l];return}y[d]=[].concat(y[d],l)};case"colon-list-separator":return(d,l,y)=>{if(c=/(:list)$/.exec(d),d=d.replace(/:list$/,""),!c){y[d]=l;return}if(y[d]===void 0){y[d]=[l];return}y[d]=[].concat(y[d],l)};case"comma":case"separator":return(d,l,y)=>{const w=typeof l=="string"&&l.includes(u.arrayFormatSeparator),O=typeof l=="string"&&!w&&$(l,u).includes(u.arrayFormatSeparator);l=O?$(l,u):l;const I=w||O?l.split(u.arrayFormatSeparator).map(x=>$(x,u)):l===null?l:$(l,u);y[d]=I};case"bracket-separator":return(d,l,y)=>{const w=/(\[\])$/.test(d);if(d=d.replace(/\[\]$/,""),!w){y[d]=l&&$(l,u);return}const O=l===null?[]:l.split(u.arrayFormatSeparator).map(I=>$(I,u));if(y[d]===void 0){y[d]=O;return}y[d]=[].concat(y[d],O)};default:return(d,l,y)=>{if(y[d]===void 0){y[d]=l;return}y[d]=[].concat(y[d],l)}}}function v(u){if(typeof u!="string"||u.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function m(u,c){return c.encode?c.strict?r(u):encodeURIComponent(u):u}function $(u,c){return c.decode?t(u):u}function h(u){return Array.isArray(u)?u.sort():typeof u=="object"?h(Object.keys(u)).sort((c,d)=>Number(c)-Number(d)).map(c=>u[c]):u}function g(u){const c=u.indexOf("#");return c!==-1&&(u=u.slice(0,c)),u}function A(u){let c="";const d=u.indexOf("#");return d!==-1&&(c=u.slice(d)),c}function p(u){u=g(u);const c=u.indexOf("?");return c===-1?"":u.slice(c+1)}function T(u,c){return c.parseNumbers&&!Number.isNaN(Number(u))&&typeof u=="string"&&u.trim()!==""?u=Number(u):c.parseBooleans&&u!==null&&(u.toLowerCase()==="true"||u.toLowerCase()==="false")&&(u=u.toLowerCase()==="true"),u}function j(u,c){c=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},c),v(c.arrayFormatSeparator);const d=o(c),l=Object.create(null);if(typeof u!="string"||(u=u.trim().replace(/^[?#&]/,""),!u))return l;for(const y of u.split("&")){if(y==="")continue;let[w,O]=n(c.decode?y.replace(/\+/g," "):y,"=");O=O===void 0?null:["comma","separator","bracket-separator"].includes(c.arrayFormat)?O:$(O,c),d($(w,c),O,l)}for(const y of Object.keys(l)){const w=l[y];if(typeof w=="object"&&w!==null)for(const O of Object.keys(w))w[O]=T(w[O],c);else l[y]=T(w,c)}return c.sort===!1?l:(c.sort===!0?Object.keys(l).sort():Object.keys(l).sort(c.sort)).reduce((y,w)=>{const O=l[w];return Boolean(O)&&typeof O=="object"&&!Array.isArray(O)?y[w]=h(O):y[w]=O,y},Object.create(null))}e.extract=p,e.parse=j,e.stringify=(u,c)=>{if(!u)return"";c=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},c),v(c.arrayFormatSeparator);const d=O=>c.skipNull&&i(u[O])||c.skipEmptyString&&u[O]==="",l=f(c),y={};for(const O of Object.keys(u))d(O)||(y[O]=u[O]);const w=Object.keys(y);return c.sort!==!1&&w.sort(c.sort),w.map(O=>{const I=u[O];return I===void 0?"":I===null?m(O,c):Array.isArray(I)?I.length===0&&c.arrayFormat==="bracket-separator"?m(O,c)+"[]":I.reduce(l(O),[]).join("&"):m(O,c)+"="+m(I,c)}).filter(O=>O.length>0).join("&")},e.parseUrl=(u,c)=>{c=Object.assign({decode:!0},c);const[d,l]=n(u,"#");return Object.assign({url:d.split("?")[0]||"",query:j(p(u),c)},c&&c.parseFragmentIdentifier&&l?{fragmentIdentifier:$(l,c)}:{})},e.stringifyUrl=(u,c)=>{c=Object.assign({encode:!0,strict:!0,[s]:!0},c);const d=g(u.url).split("?")[0]||"",l=e.extract(u.url),y=e.parse(l,{sort:!1}),w=Object.assign(y,u.query);let O=e.stringify(w,c);O&&(O=`?${O}`);let I=A(u.url);return u.fragmentIdentifier&&(I=`#${c[s]?m(u.fragmentIdentifier,c):u.fragmentIdentifier}`),`${d}${O}${I}`},e.pick=(u,c,d)=>{d=Object.assign({parseFragmentIdentifier:!0,[s]:!1},d);const{url:l,query:y,fragmentIdentifier:w}=e.parseUrl(u,d);return e.stringifyUrl({url:l,query:a(y,c),fragmentIdentifier:w},d)},e.exclude=(u,c,d)=>{const l=Array.isArray(c)?y=>!c.includes(y):(y,w)=>!c(y,w);return e.pick(u,l,d)}})(fr);const vv=[".png",".jpg",".jpeg",".webp",".bmp",".tiff"];function Ln(e,r=500){const t=fr.parseUrl(e);if(!(e.startsWith("https://orderingstackmedia.blob.core.windows.net/pictures")||e.startsWith("https://orderingstack-mmedia-tools.azurewebsites.net/api/img/")))return e;const n=t.url.substring(t.url.lastIndexOf("."));return vv.includes(n)?fr.stringifyUrl({url:t.url.replace("https://orderingstackmedia.blob.core.windows.net/pictures/","https://orderingstack-mmedia-tools.azurewebsites.net/api/img/"),query:{...t.query,w:r}}):e}function gv(e,r=500){return Ln(e,r)}function xn(e){let r=0;return e==null||e.forEach(t=>r+=Number(t.discountPrice)),r}function $v(e){return xn(e.discounts)}function yv(e,r,t=",",n=2){return`${Number(e).toFixed(n).replace(".",t)}${r?"\xA0"+r:""}`}exports.addDiscounts=xn;exports.formatPrice=yv;exports.getGroupedBucketLines=Dh;exports.getMediaUrl=Ln;exports.groupOrderLines=_r;exports.isChannelOpen=pe;exports.summarizeLineDiscounts=$v;exports.useAvailability=uc;exports.useCms=Ir;exports.useDisplayPrice=Ih;exports.useGroupOrderLines=Ch;exports.useInterval=Le;exports.useKioskChannelsAvailability=uv;exports.useKioskMediaCms=Dn;exports.useKioskMediaCmsWithContext=sv;exports.useLocalizedVenueMedia=iv;exports.useMediaUrl=gv;exports.useOnClickOutside=ov;exports.useVenueCms=Cn;
3
3
  //# sourceMappingURL=index.cjs.js.map