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