diff --git a/CHECKSUMS.txt b/CHECKSUMS.txt index ee9947b85b1ac8ee982bede0de4c7c93665db672..afcaae5ec3173797df93e60eb9058b0f0b4e6518 100644 --- a/CHECKSUMS.txt +++ b/CHECKSUMS.txt @@ -1,23 +1,23 @@ -Cover Charge v0.3.12.115: web apps, plus the Cover Charge for Display tablet app for Android (downloads/android/, its SHA-256 is in downloads/android/SHA256.txt). No phone APKs were built for v0.1.2 to v0.3.12.115. +Cover Charge v0.3.12.116: web apps, plus the Cover Charge for Display tablet app for Android (downloads/android/, its SHA-256 is in downloads/android/SHA256.txt). No phone APKs were built for v0.1.2 to v0.3.12.116. SHA-256 of each web app's start page, service worker, manifest and logo: -f6627242620c5591e8444e99db21a97035fd5805ffdac4fc6ea5f47421ae1967 owner-app/index.html -5b6e4e3028756c088263b24de759b10163313d0bee9bd19ed2485fea72ae3dc5 owner-app/sw.js +b5ef5202d7e8ca8e37c03583c234070bcd1f6099ed329e56f2be8036d433057d owner-app/index.html +a3424554793db286868ab21de5cb25fd3768932e6a96c3a6a530ec54b1285e75 owner-app/sw.js e305c44d11a9c25f37372f3fa4d329d4ffb04df2edee6e7b4b9ac91f3875ac67 owner-app/manifest.webmanifest cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 owner-app/brand-logo.png -132ae2400aa5e7ccbc83d6d3097e4879261eb7377aad98211ed019d1e476fb67 staff-app/index.html -998ebf31ebf19901e99666e509240ae73e4c34b48cff443e5f9d5e519d996569 staff-app/sw.js +de523c719981a98e4d9947666cc10dfd042897e470d839face3fb3eed31ba189 staff-app/index.html +72d2181da8c043d705f38d3f4489daa1ead361946fd04fdcde029aa33fe7725e staff-app/sw.js bd1d310ebf8e2a80808e100c41fb7fe1c4369d3026478f3ad8eececaeadaf4ac staff-app/manifest.webmanifest cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 staff-app/brand-logo.png -6b72cc4756b0590bccbfe5a4429951ba34ffa8d3dbc3229c925a2d77393639ec customer-app/index.html -35374bfb510238edb65350a7a70a2ec138a5ab74beb46cff2adeb8c6cbc44c5f customer-app/sw.js +04205f726aa830d4b6bbe9bc34110607d6b6099b7694aca98ea1377525290a98 customer-app/index.html +d83a27b6a20776f7dbf74e833378cbabdeb0bc41c9cfea145207a4b672d003f4 customer-app/sw.js 3bfb1fd10cc13f09ca6be65c461e1f6b5750ae51a3ece12e079750b2a066052e customer-app/manifest.webmanifest cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 customer-app/brand-logo.png -12b5a4a8dc46ad60b81392572d58377396a0990cc108b8817f6104db32d6ca70 display-app/index.html -b130e1ab1e30a290d53ce2d5b499dc2c14b38c4c43f3808dcf5dff324f27632e display-app/sw.js +ce4e9fbd836331b82940ca9b88c67b9e3db9c204f647cf8e6293f3817d0e0567 display-app/index.html +087aa40b8f91d7b32df647ab830ceb3246b6420a4df217c046e2b66b347eb2fb display-app/sw.js 35e2721b86eb1ae1605e55bee64177adcee72f4e53a24ac417d19ea2873434a1 display-app/manifest.webmanifest cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 display-app/brand-logo.png -ef0d4e6f31946eab1d06e9930baccd5e8b810b08eee87f0d1714a5501d7da640 chef-app/index.html -3ad60b3cb164f5756633f786f3bca52d2c56ddeadb721d099dc8b5f18d2d970c chef-app/sw.js +713c7f994d8562d5b575e12ff5bb3e1233b966f0a90dbeff6fc9fd5f8d34d00e chef-app/index.html +5633f210619fca36eaac11d7ab362e896d7a821e24f9928299eae3eab0704ca3 chef-app/sw.js 97ed43decde8a888e22b7411e13a2122c6f8b9944cf38b2e28e8f62ef2e25397 chef-app/manifest.webmanifest cc3dd9b8a359ba6c3f28d625c27cc6a01a46233311c2a5f5c8aaf09e91be8239 chef-app/brand-logo.png diff --git a/chef-app/_expo/static/js/web/bundle.js b/chef-app/_expo/static/js/web/bundle.js index e44ef1bbfbe322270982ce3a7c78c05508fc93fd..a26cceae7c484e470505e95019d273275235fb94 100644 --- a/chef-app/_expo/static/js/web/bundle.js +++ b/chef-app/_expo/static/js/web/bundle.js @@ -19,8 +19,8 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]); __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]); __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='42c3b21ce2b1',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lillie",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]); -__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?[new RegExp(`${/^[A-Za-z]/.test(a)?'(?r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]); __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]); __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*vu(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.115'},1039,[]); +__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.116'},1039,[]); __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]); __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]); __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]); diff --git a/chef-app/admin.html b/chef-app/admin.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/admin.html +++ b/chef-app/admin.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer.html b/chef-app/customer.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer.html +++ b/chef-app/customer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage.html b/chef-app/customer/anchorage.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage.html +++ b/chef-app/customer/anchorage.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/book.html b/chef-app/customer/anchorage/book.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/book.html +++ b/chef-app/customer/anchorage/book.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/feedback.html b/chef-app/customer/anchorage/feedback.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/feedback.html +++ b/chef-app/customer/anchorage/feedback.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/gift.html b/chef-app/customer/anchorage/gift.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/gift.html +++ b/chef-app/customer/anchorage/gift.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/lost.html b/chef-app/customer/anchorage/lost.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/lost.html +++ b/chef-app/customer/anchorage/lost.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/loyalty.html b/chef-app/customer/anchorage/loyalty.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/loyalty.html +++ b/chef-app/customer/anchorage/loyalty.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/merch.html b/chef-app/customer/anchorage/merch.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/merch.html +++ b/chef-app/customer/anchorage/merch.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/offers.html b/chef-app/customer/anchorage/offers.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/offers.html +++ b/chef-app/customer/anchorage/offers.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/refer.html b/chef-app/customer/anchorage/refer.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/refer.html +++ b/chef-app/customer/anchorage/refer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/waitlist.html b/chef-app/customer/anchorage/waitlist.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/waitlist.html +++ b/chef-app/customer/anchorage/waitlist.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/anchorage/whatson.html b/chef-app/customer/anchorage/whatson.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/anchorage/whatson.html +++ b/chef-app/customer/anchorage/whatson.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/basket.html b/chef-app/customer/basket.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/basket.html +++ b/chef-app/customer/basket.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/customer/profile.html b/chef-app/customer/profile.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/customer/profile.html +++ b/chef-app/customer/profile.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/demo.html b/chef-app/demo.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/demo.html +++ b/chef-app/demo.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/display.html b/chef-app/display.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/display.html +++ b/chef-app/display.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/index.html b/chef-app/index.html index db8dabd4470d760795c79a020a325773f67f97b8..b6d2b63d8ac086b0a55c76c586e6fc8ec4458db0 100644 --- a/chef-app/index.html +++ b/chef-app/index.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/kitchen.html b/chef-app/kitchen.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/kitchen.html +++ b/chef-app/kitchen.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/owner.html b/chef-app/owner.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/owner.html +++ b/chef-app/owner.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/staff.html b/chef-app/staff.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/staff.html +++ b/chef-app/staff.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/chef-app/sw.js b/chef-app/sw.js index 1a9dd4cf784ff7a9cc0afa0a14982172540c4023..9a6eac6975869533e33dc3045eb8b83e662b7357 100644 --- a/chef-app/sw.js +++ b/chef-app/sw.js @@ -1,7 +1,7 @@ // Anchorage Head Chef service worker: precache the app shell so it opens offline after the first visit. -const V = "cc-chef-9c601505df"; +const V = "cc-chef-6e46ce179d"; const BASE = "/chef-app/"; -const PRECACHE = ["/chef-app/apple-touch-icon.png", "/chef-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/chef-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/chef-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/chef-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/chef-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/chef-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/chef-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/chef-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/chef-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/chef-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/chef-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/chef-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/chef-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/chef-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/chef-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/chef-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/chef-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/chef-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/chef-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/chef-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/chef-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/chef-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/chef-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/chef-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/chef-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/chef-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/chef-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/chef-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/chef-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/chef-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/chef-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/chef-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/chef-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/chef-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/chef-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/chef-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/chef-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/chef-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/chef-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/chef-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/chef-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/chef-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/chef-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/chef-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/chef-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/chef-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/chef-app/brand-logo.png", "/chef-app/favicon.ico", "/chef-app/icon-192.png", "/chef-app/icon-512.png", "/chef-app/icon-maskable-192.png", "/chef-app/icon-maskable-512.png", "/chef-app/manifest.webmanifest", "/chef-app/index.html", "/chef-app/_expo/static/js/web/bundle.js?v=9c601505dfe955add5cb934fcc972a1d4656f9ebb0ff7a631a3f50ed017f5ee5"]; +const PRECACHE = ["/chef-app/apple-touch-icon.png", "/chef-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/chef-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/chef-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/chef-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/chef-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/chef-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/chef-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/chef-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/chef-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/chef-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/chef-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/chef-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/chef-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/chef-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/chef-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/chef-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/chef-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/chef-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/chef-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/chef-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/chef-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/chef-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/chef-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/chef-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/chef-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/chef-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/chef-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/chef-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/chef-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/chef-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/chef-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/chef-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/chef-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/chef-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/chef-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/chef-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/chef-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/chef-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/chef-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/chef-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/chef-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/chef-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/chef-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/chef-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/chef-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/chef-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/chef-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/chef-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/chef-app/brand-logo.png", "/chef-app/favicon.ico", "/chef-app/icon-192.png", "/chef-app/icon-512.png", "/chef-app/icon-maskable-192.png", "/chef-app/icon-maskable-512.png", "/chef-app/manifest.webmanifest", "/chef-app/index.html", "/chef-app/_expo/static/js/web/bundle.js?v=6e46ce179d04e9d82ea99574c59161f25b77d6c525db6c9e174f759b7bf62c5c"]; // Hugging Face serves large files (fonts) through a redirect to its CDN. Browsers refuse to hand a *redirected* cached // response to a page, so store a plain copy instead (otherwise fonts, and so the app, fail to load offline). const plain = r => r.redirected ? r.blob().then(b => new Response(b, { status: 200, headers: { 'Content-Type': r.headers.get('Content-Type') || b.type || 'application/octet-stream' } })) : Promise.resolve(r); diff --git a/chef-app/team.html b/chef-app/team.html index 8cd8bb98544b41e6e183b1a72462eb1653633062..abcf015107fa0280cd4abae8b6db34d483afe163 100644 --- a/chef-app/team.html +++ b/chef-app/team.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/_expo/static/js/web/bundle.js b/customer-app/_expo/static/js/web/bundle.js index 89c59214289706d3874ce4d2e81b74a5bb640a4e..86aa9bb9b96a4a33ebd5aef590e14b80ab2265c4 100644 --- a/customer-app/_expo/static/js/web/bundle.js +++ b/customer-app/_expo/static/js/web/bundle.js @@ -19,8 +19,8 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]); __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]); __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='42c3b21ce2b1',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lillie",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]); -__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?[new RegExp(`${/^[A-Za-z]/.test(a)?'(?r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]); __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]); __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*vu(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.115'},1039,[]); +__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.116'},1039,[]); __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]); __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]); __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]); diff --git a/customer-app/admin.html b/customer-app/admin.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/admin.html +++ b/customer-app/admin.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer.html b/customer-app/customer.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer.html +++ b/customer-app/customer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage.html b/customer-app/customer/anchorage.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage.html +++ b/customer-app/customer/anchorage.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/book.html b/customer-app/customer/anchorage/book.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/book.html +++ b/customer-app/customer/anchorage/book.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/feedback.html b/customer-app/customer/anchorage/feedback.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/feedback.html +++ b/customer-app/customer/anchorage/feedback.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/gift.html b/customer-app/customer/anchorage/gift.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/gift.html +++ b/customer-app/customer/anchorage/gift.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/lost.html b/customer-app/customer/anchorage/lost.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/lost.html +++ b/customer-app/customer/anchorage/lost.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/loyalty.html b/customer-app/customer/anchorage/loyalty.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/loyalty.html +++ b/customer-app/customer/anchorage/loyalty.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/merch.html b/customer-app/customer/anchorage/merch.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/merch.html +++ b/customer-app/customer/anchorage/merch.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/offers.html b/customer-app/customer/anchorage/offers.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/offers.html +++ b/customer-app/customer/anchorage/offers.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/refer.html b/customer-app/customer/anchorage/refer.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/refer.html +++ b/customer-app/customer/anchorage/refer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/waitlist.html b/customer-app/customer/anchorage/waitlist.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/waitlist.html +++ b/customer-app/customer/anchorage/waitlist.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/anchorage/whatson.html b/customer-app/customer/anchorage/whatson.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/anchorage/whatson.html +++ b/customer-app/customer/anchorage/whatson.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/basket.html b/customer-app/customer/basket.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/basket.html +++ b/customer-app/customer/basket.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/customer/profile.html b/customer-app/customer/profile.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/customer/profile.html +++ b/customer-app/customer/profile.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/demo.html b/customer-app/demo.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/demo.html +++ b/customer-app/demo.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/display.html b/customer-app/display.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/display.html +++ b/customer-app/display.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/index.html b/customer-app/index.html index f2e6aa363b1fcf1e55a64bf6923fc8846eeede84..a3cd747da0a714b91497f98d703a37a7f9be1c02 100644 --- a/customer-app/index.html +++ b/customer-app/index.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/kitchen.html b/customer-app/kitchen.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/kitchen.html +++ b/customer-app/kitchen.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/owner.html b/customer-app/owner.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/owner.html +++ b/customer-app/owner.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/staff.html b/customer-app/staff.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/staff.html +++ b/customer-app/staff.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/customer-app/sw.js b/customer-app/sw.js index e4290afa61d6c8544218d4edac61461a9cd9f43c..413cebb11c79ec91a37506681bbf46738b1afaaa 100644 --- a/customer-app/sw.js +++ b/customer-app/sw.js @@ -1,7 +1,7 @@ // Anchorage service worker: precache the app shell so it opens offline after the first visit. -const V = "cc-customer-f8e3769f1b"; +const V = "cc-customer-46f6f742eb"; const BASE = "/customer-app/"; -const PRECACHE = ["/customer-app/apple-touch-icon.png", "/customer-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/customer-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/customer-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/customer-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/customer-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/customer-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/customer-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/customer-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/customer-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/customer-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/customer-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/customer-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/customer-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/customer-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/customer-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/customer-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/customer-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/customer-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/customer-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/customer-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/customer-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/customer-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/customer-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/customer-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/customer-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/customer-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/customer-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/customer-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/customer-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/customer-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/customer-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/customer-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/customer-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/customer-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/customer-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/customer-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/customer-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/customer-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/customer-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/customer-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/customer-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/customer-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/customer-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/customer-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/customer-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/customer-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/customer-app/brand-logo.png", "/customer-app/favicon.ico", "/customer-app/icon-192.png", "/customer-app/icon-512.png", "/customer-app/icon-maskable-192.png", "/customer-app/icon-maskable-512.png", "/customer-app/manifest.webmanifest", "/customer-app/index.html", "/customer-app/_expo/static/js/web/bundle.js?v=f8e3769f1bac04e8e63ad821a3e47efe636885f109c0d658d597ac4b6db98c53"]; +const PRECACHE = ["/customer-app/apple-touch-icon.png", "/customer-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/customer-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/customer-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/customer-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/customer-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/customer-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/customer-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/customer-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/customer-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/customer-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/customer-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/customer-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/customer-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/customer-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/customer-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/customer-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/customer-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/customer-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/customer-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/customer-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/customer-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/customer-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/customer-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/customer-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/customer-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/customer-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/customer-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/customer-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/customer-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/customer-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/customer-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/customer-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/customer-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/customer-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/customer-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/customer-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/customer-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/customer-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/customer-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/customer-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/customer-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/customer-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/customer-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/customer-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/customer-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/customer-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/customer-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/customer-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/customer-app/brand-logo.png", "/customer-app/favicon.ico", "/customer-app/icon-192.png", "/customer-app/icon-512.png", "/customer-app/icon-maskable-192.png", "/customer-app/icon-maskable-512.png", "/customer-app/manifest.webmanifest", "/customer-app/index.html", "/customer-app/_expo/static/js/web/bundle.js?v=46f6f742eb60505661e8635ec3ce74ed280482a3865d81fb33ee836da2d3e24f"]; // Hugging Face serves large files (fonts) through a redirect to its CDN. Browsers refuse to hand a *redirected* cached // response to a page, so store a plain copy instead (otherwise fonts, and so the app, fail to load offline). const plain = r => r.redirected ? r.blob().then(b => new Response(b, { status: 200, headers: { 'Content-Type': r.headers.get('Content-Type') || b.type || 'application/octet-stream' } })) : Promise.resolve(r); diff --git a/customer-app/team.html b/customer-app/team.html index 3b8471aa2e3939b3d4c1034090cf492f2026936b..e5c618de3801d2460d678dcdad585929e7819596 100644 --- a/customer-app/team.html +++ b/customer-app/team.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/_expo/static/js/web/bundle.js b/display-app/_expo/static/js/web/bundle.js index 03e538e78116158cc79ff68319f95c2a9d788268..cc6e158692471a5dda63e6798030cf0b1e26df2f 100644 --- a/display-app/_expo/static/js/web/bundle.js +++ b/display-app/_expo/static/js/web/bundle.js @@ -19,8 +19,8 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]); __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]); __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='42c3b21ce2b1',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lillie",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]); -__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?[new RegExp(`${/^[A-Za-z]/.test(a)?'(?r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]); __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]); __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*vu(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.115'},1039,[]); +__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.116'},1039,[]); __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]); __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]); __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]); diff --git a/display-app/admin.html b/display-app/admin.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/admin.html +++ b/display-app/admin.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer.html b/display-app/customer.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer.html +++ b/display-app/customer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage.html b/display-app/customer/anchorage.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage.html +++ b/display-app/customer/anchorage.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/book.html b/display-app/customer/anchorage/book.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/book.html +++ b/display-app/customer/anchorage/book.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/feedback.html b/display-app/customer/anchorage/feedback.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/feedback.html +++ b/display-app/customer/anchorage/feedback.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/gift.html b/display-app/customer/anchorage/gift.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/gift.html +++ b/display-app/customer/anchorage/gift.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/lost.html b/display-app/customer/anchorage/lost.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/lost.html +++ b/display-app/customer/anchorage/lost.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/loyalty.html b/display-app/customer/anchorage/loyalty.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/loyalty.html +++ b/display-app/customer/anchorage/loyalty.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/merch.html b/display-app/customer/anchorage/merch.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/merch.html +++ b/display-app/customer/anchorage/merch.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/offers.html b/display-app/customer/anchorage/offers.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/offers.html +++ b/display-app/customer/anchorage/offers.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/refer.html b/display-app/customer/anchorage/refer.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/refer.html +++ b/display-app/customer/anchorage/refer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/waitlist.html b/display-app/customer/anchorage/waitlist.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/waitlist.html +++ b/display-app/customer/anchorage/waitlist.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/anchorage/whatson.html b/display-app/customer/anchorage/whatson.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/anchorage/whatson.html +++ b/display-app/customer/anchorage/whatson.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/basket.html b/display-app/customer/basket.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/basket.html +++ b/display-app/customer/basket.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/customer/profile.html b/display-app/customer/profile.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/customer/profile.html +++ b/display-app/customer/profile.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/demo.html b/display-app/demo.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/demo.html +++ b/display-app/demo.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/display.html b/display-app/display.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/display.html +++ b/display-app/display.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/index.html b/display-app/index.html index a19bec1446fed3f7a62b6d040a1e6eae473004ec..8874a90efa5ac96351ba7c515593cde1aaee4a6f 100644 --- a/display-app/index.html +++ b/display-app/index.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/kitchen.html b/display-app/kitchen.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/kitchen.html +++ b/display-app/kitchen.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/owner.html b/display-app/owner.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/owner.html +++ b/display-app/owner.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/staff.html b/display-app/staff.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/staff.html +++ b/display-app/staff.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/display-app/sw.js b/display-app/sw.js index ba43530e0613eadf139388b45ae032e8b255c539..7a7b6e090c5d8f0f875fedf3c6a6533046e95ce1 100644 --- a/display-app/sw.js +++ b/display-app/sw.js @@ -1,7 +1,7 @@ // Anchorage Display service worker: precache the app shell so it opens offline after the first visit. -const V = "cc-display-4258145708"; +const V = "cc-display-7cc159a4bd"; const BASE = "/display-app/"; -const PRECACHE = ["/display-app/apple-touch-icon.png", "/display-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/display-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/display-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/display-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/display-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/display-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/display-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/display-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/display-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/display-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/display-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/display-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/display-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/display-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/display-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/display-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/display-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/display-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/display-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/display-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/display-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/display-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/display-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/display-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/display-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/display-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/display-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/display-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/display-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/display-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/display-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/display-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/display-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/display-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/display-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/display-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/display-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/display-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/display-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/display-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/display-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/display-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/display-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/display-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/display-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/display-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/display-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/display-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/display-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/display-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/display-app/brand-logo.png", "/display-app/favicon.ico", "/display-app/icon-192.png", "/display-app/icon-512.png", "/display-app/icon-maskable-192.png", "/display-app/icon-maskable-512.png", "/display-app/manifest.webmanifest", "/display-app/index.html", "/display-app/_expo/static/js/web/bundle.js?v=42581457082d5b7dbd9191a24dd5067c178b1b13762c8688aab12bba2ab6cff2"]; +const PRECACHE = ["/display-app/apple-touch-icon.png", "/display-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/display-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/display-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/display-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/display-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/display-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/display-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/display-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/display-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/display-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/display-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/display-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/display-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/display-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/display-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/display-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/display-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/display-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/display-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/display-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/display-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/display-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/display-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/display-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/display-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/display-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/display-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/display-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/display-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/display-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/display-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/display-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/display-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/display-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/display-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/display-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/display-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/display-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/display-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/display-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/display-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/display-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/display-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/display-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/display-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/display-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/display-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/display-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/display-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/display-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/display-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/display-app/brand-logo.png", "/display-app/favicon.ico", "/display-app/icon-192.png", "/display-app/icon-512.png", "/display-app/icon-maskable-192.png", "/display-app/icon-maskable-512.png", "/display-app/manifest.webmanifest", "/display-app/index.html", "/display-app/_expo/static/js/web/bundle.js?v=7cc159a4bd225bfa9f7980dfc3e25cd4529358b5d86fc0501889bcd5a815fe3c"]; // Hugging Face serves large files (fonts) through a redirect to its CDN. Browsers refuse to hand a *redirected* cached // response to a page, so store a plain copy instead (otherwise fonts, and so the app, fail to load offline). const plain = r => r.redirected ? r.blob().then(b => new Response(b, { status: 200, headers: { 'Content-Type': r.headers.get('Content-Type') || b.type || 'application/octet-stream' } })) : Promise.resolve(r); diff --git a/display-app/team.html b/display-app/team.html index f6d7a47ff6e8f8b9a370d8a21bad2bc8ecadb89d..2cc9166db86bf92eff12f10c0727915772727d78 100644 --- a/display-app/team.html +++ b/display-app/team.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/index.html b/index.html index a2bb63bcc67a3a9ab5068d8124b655b29f05a4e1..a295eb49bdc8235150205885ae814bcd48b43895 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ -Cover Charge: try the apps (v0.3.12.115) +Cover Charge: try the apps (v0.3.12.116) @@ -63,7 +63,7 @@ footer{margin-top:28px;color:var(--muted);font-size:.8rem;text-align:center} Cover Charge logo

covercharge

All in one restaurant booking app

-

Cover Charge: try the apps (v0.3.12.115)

+

Cover Charge: try the apps (v0.3.12.116)

The Anchorage, Harbour View, Dunure

@@ -129,7 +129,7 @@ footer{margin-top:28px;color:var(--muted);font-size:.8rem;text-align:center}
-

Cover Charge v0.3.12.115

+

Cover Charge v0.3.12.116

diff --git a/owner-app/_expo/static/js/web/bundle.js b/owner-app/_expo/static/js/web/bundle.js index beebcf0fa7fe14ddb8fe89ead5a1fe5a223c5338..a0a63339b9bd2dce97ef816ba9f5c0d002465451 100644 --- a/owner-app/_expo/static/js/web/bundle.js +++ b/owner-app/_expo/static/js/web/bundle.js @@ -19,8 +19,8 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]); __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]); __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='42c3b21ce2b1',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lillie",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]); -__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?[new RegExp(`${/^[A-Za-z]/.test(a)?'(?r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]); __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]); __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*vu(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.115'},1039,[]); +__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.116'},1039,[]); __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]); __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]); __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]); diff --git a/owner-app/admin.html b/owner-app/admin.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/admin.html +++ b/owner-app/admin.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer.html b/owner-app/customer.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer.html +++ b/owner-app/customer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage.html b/owner-app/customer/anchorage.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage.html +++ b/owner-app/customer/anchorage.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/book.html b/owner-app/customer/anchorage/book.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/book.html +++ b/owner-app/customer/anchorage/book.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/feedback.html b/owner-app/customer/anchorage/feedback.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/feedback.html +++ b/owner-app/customer/anchorage/feedback.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/gift.html b/owner-app/customer/anchorage/gift.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/gift.html +++ b/owner-app/customer/anchorage/gift.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/lost.html b/owner-app/customer/anchorage/lost.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/lost.html +++ b/owner-app/customer/anchorage/lost.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/loyalty.html b/owner-app/customer/anchorage/loyalty.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/loyalty.html +++ b/owner-app/customer/anchorage/loyalty.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/merch.html b/owner-app/customer/anchorage/merch.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/merch.html +++ b/owner-app/customer/anchorage/merch.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/offers.html b/owner-app/customer/anchorage/offers.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/offers.html +++ b/owner-app/customer/anchorage/offers.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/refer.html b/owner-app/customer/anchorage/refer.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/refer.html +++ b/owner-app/customer/anchorage/refer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/waitlist.html b/owner-app/customer/anchorage/waitlist.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/waitlist.html +++ b/owner-app/customer/anchorage/waitlist.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/anchorage/whatson.html b/owner-app/customer/anchorage/whatson.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/anchorage/whatson.html +++ b/owner-app/customer/anchorage/whatson.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/basket.html b/owner-app/customer/basket.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/basket.html +++ b/owner-app/customer/basket.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/customer/profile.html b/owner-app/customer/profile.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/customer/profile.html +++ b/owner-app/customer/profile.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/demo.html b/owner-app/demo.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/demo.html +++ b/owner-app/demo.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/display.html b/owner-app/display.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/display.html +++ b/owner-app/display.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/index.html b/owner-app/index.html index af927a6cb00d23dadf1646ac2aac8cad2dd82a11..b7fa0b4171f028c6d65cb144cc0979aafaa99c79 100644 --- a/owner-app/index.html +++ b/owner-app/index.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/kitchen.html b/owner-app/kitchen.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/kitchen.html +++ b/owner-app/kitchen.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/owner.html b/owner-app/owner.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/owner.html +++ b/owner-app/owner.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/staff.html b/owner-app/staff.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/staff.html +++ b/owner-app/staff.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/owner-app/sw.js b/owner-app/sw.js index de5109016a71053bfdc07fc1aa7848d74469aac1..5fad7c0c7ad34bcf593413f50bc44ebcfdb90ea4 100644 --- a/owner-app/sw.js +++ b/owner-app/sw.js @@ -1,7 +1,7 @@ // Anchorage Manager service worker: precache the app shell so it opens offline after the first visit. -const V = "cc-owner-308fb03158"; +const V = "cc-owner-b7a688b8f8"; const BASE = "/owner-app/"; -const PRECACHE = ["/owner-app/apple-touch-icon.png", "/owner-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/owner-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/owner-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/owner-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/owner-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/owner-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/owner-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/owner-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/owner-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/owner-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/owner-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/owner-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/owner-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/owner-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/owner-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/owner-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/owner-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/owner-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/owner-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/owner-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/owner-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/owner-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/owner-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/owner-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/owner-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/owner-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/owner-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/owner-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/owner-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/owner-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/owner-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/owner-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/owner-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/owner-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/owner-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/owner-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/owner-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/owner-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/owner-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/owner-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/owner-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/owner-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/owner-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/owner-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/owner-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/owner-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/owner-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/owner-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/owner-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/owner-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/owner-app/brand-logo.png", "/owner-app/favicon.ico", "/owner-app/icon-192.png", "/owner-app/icon-512.png", "/owner-app/icon-maskable-192.png", "/owner-app/icon-maskable-512.png", "/owner-app/manifest.webmanifest", "/owner-app/index.html", "/owner-app/_expo/static/js/web/bundle.js?v=308fb031583a193c778e3c823bcf25b3003c4631367be3737f19d04d967a0d84"]; +const PRECACHE = ["/owner-app/apple-touch-icon.png", "/owner-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/owner-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/owner-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/owner-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/owner-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/owner-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/owner-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/owner-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/owner-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/owner-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/owner-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/owner-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/owner-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/owner-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/owner-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/owner-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/owner-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/owner-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/owner-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/owner-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/owner-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/owner-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/owner-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/owner-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/owner-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/owner-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/owner-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/owner-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/owner-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/owner-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/owner-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/owner-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/owner-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/owner-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/owner-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/owner-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/owner-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/owner-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/owner-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/owner-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/owner-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/owner-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/owner-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/owner-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/owner-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/owner-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/owner-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/owner-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/owner-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/owner-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/owner-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/owner-app/brand-logo.png", "/owner-app/favicon.ico", "/owner-app/icon-192.png", "/owner-app/icon-512.png", "/owner-app/icon-maskable-192.png", "/owner-app/icon-maskable-512.png", "/owner-app/manifest.webmanifest", "/owner-app/index.html", "/owner-app/_expo/static/js/web/bundle.js?v=b7a688b8f85089110108845dbae2e6b951c20babac10fe8e94d176f031396653"]; // Hugging Face serves large files (fonts) through a redirect to its CDN. Browsers refuse to hand a *redirected* cached // response to a page, so store a plain copy instead (otherwise fonts, and so the app, fail to load offline). const plain = r => r.redirected ? r.blob().then(b => new Response(b, { status: 200, headers: { 'Content-Type': r.headers.get('Content-Type') || b.type || 'application/octet-stream' } })) : Promise.resolve(r); diff --git a/owner-app/team.html b/owner-app/team.html index 5f53fd7196e3412fc26544bf322937f0c4c8c886..37e8956c35974d8eec09116ab4af1c176e3707ad 100644 --- a/owner-app/team.html +++ b/owner-app/team.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/_expo/static/js/web/bundle.js b/staff-app/_expo/static/js/web/bundle.js index 2653a6459ee3f4f1901ba66e253a118d8e72dfba..923aabf16230bdeda5cd859c9c4daf69c7a1d6bd 100644 --- a/staff-app/_expo/static/js/web/bundle.js +++ b/staff-app/_expo/static/js/web/bundle.js @@ -19,8 +19,8 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v __d(function(g,_r,_i,_a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TAKINGS_FIELDS",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"NO_SERVICE_SPLIT",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"TAKINGS_KEYS",{enumerable:!0,get:function(){return n}}),_e.withTakingsFields=function(n){n=n.filter(e=>!t.includes(e.key));const r=new Set(n.map(e=>e.key)),o=e.filter(e=>!r.has(e.key)).map(e=>({...e}));if(!o.length)return n;const a=n.findIndex(e=>'cash'===e.key),i=a<0?n.length:a+1;return[...n.slice(0,i),...o,...n.slice(i)]},Object.defineProperty(_e,"grossOf",{enumerable:!0,get:function(){return r}}),Object.defineProperty(_e,"ANCHORAGE_CASH_UP",{enumerable:!0,get:function(){return o}}),_e.cashFieldsForRecord=function(e,t){if(!t?.length)return e;const n=new Set,r=[];for(const o of t){const t=a[o],i=t?.key??`cu-${o.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'')||'figure'}`,l=e.find(e=>e.key===i);r.push({...l,...t??{kind:'money'},key:i,label:o}),n.add(i)}return[...r,...e.filter(e=>!n.has(e.key))]},Object.defineProperty(_e,"DEFAULT_CASHUP_FIELDS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"DEFAULT_SALES_FIELDS",{enumerable:!0,get:function(){return l}}),_e.parseAmount=function(e,t="money"){const n=e.replace(/[\xa3,\s]/g,'');return n?'number'===t?/^\d{1,6}$/.test(n)?Number(n):null:/^-?\d{1,7}(\.\d{1,2})?$/.test(n)?Math.round(100*Number(n))/100:null:null},Object.defineProperty(_e,"isBlank",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"ymdUTC",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"addDaysYmd",{enumerable:!0,get:function(){return d}}),_e.weekStartOf=function(e){const t=(c(e).getUTCDay()+6)%7;return d(e,-t)},_e.combinedTips=function(e){const t='number'==typeof e.cashTips?e.cashTips:null,n='number'==typeof e.cardTips?e.cardTips:null;return null==t&&null==n?null:Math.round(100*((t??0)+(n??0)))/100},Object.defineProperty(_e,"takings",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"missing",{enumerable:!0,get:function(){return f}}),_e.dailySeries=function(e,t,n,r=y){const o=new Map(e.filter(e=>e.confirmedAt).map(e=>[e.date,e]));return Array.from({length:n},(e,a)=>{const i=d(t,a-n+1),l=o.get(i);return{date:i,value:l?r(l.vals):null}})},_e.weekCompare=function(e,t,n="net"){const r=t=>{const r=e.find(e=>e.weekStart===t&&e.confirmedAt),o=r?.vals[n];return'number'==typeof o?o:null},o=r(t),a=r(d(t,-7)),i=null!=o&&null!=a&&0!==a?Math.round((o-a)/a*1e3)/10:null;return{now:o,prev:a,change:i}},_e.tipsPot=function(e,t,n,r){const o=t.filter(e=>'payout'===e.kind&&e.throughDate).sort((e,t)=>e.at.localeCompare(t.at)),a=o[o.length-1],i=a?d(a.throughDate,1):n,l=e.filter(e=>e.date>=i&&e.date<=r).sort((e,t)=>e.date.localeCompare(t.date)),u=t.filter(e=>'correction'===e.kind&&e.forDate&&e.forDate>=i&&e.forDate<=r&&(!a||e.at>a.at)),s=Math.round(100*(l.reduce((e,t)=>e+t.total,0)+u.reduce((e,t)=>e+t.amount,0)))/100;return{from:i,total:Math.max(0,s),days:l,corrections:u,lastPayout:a??null,history:o.slice().reverse()}},_e.shareByHours=function(e,t,n){return e>0&&t>0&&n>0?Math.round(e*(t/n)*100)/100:0},_e.cashLocked=function(e,t=Date.now()){return!(!e.onServer||!e.confirmedAt)&&!(e.unlockedUntil&&Date.parse(e.unlockedUntil)>t)},_e.changedFields=function(e,t){const n=e??{},r=t??{},o=[],a=n.vals??{},i=r.vals??{};for(const e of new Set([...Object.keys(a),...Object.keys(i)]))JSON.stringify(a[e])!==JSON.stringify(i[e])&&o.push(e);JSON.stringify(n.categories??null)!==JSON.stringify(r.categories??null)&&(n.categories||r.categories)&&o.push('categories');JSON.stringify(n.photos??[])!==JSON.stringify(r.photos??[])&&e&&t&&o.push('photos');return o},Object.defineProperty(_e,"dayTakingsOf",{enumerable:!0,get:function(){return m}}),Object.defineProperty(_e,"daysInMonth",{enumerable:!0,get:function(){return p}}),_e.addMonths=b,Object.defineProperty(_e,"monthName",{enumerable:!0,get:function(){return T}}),Object.defineProperty(_e,"shortDay",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"longDay",{enumerable:!0,get:function(){return C}}),_e.poundsWhole=function(e){const t=e<0,n=String(Math.round(Math.abs(e))).replace(/\B(?=(\d{3})+(?!\d))/g,',');return`${t?'-':''}\xa3${n}`},_e.monthTakings=function(e,t,n,r){const o=new Map;for(const n of e){if(n.rid!==t)continue;const e=m(n);null!=e&&o.set(n.date,e)}const a=Number(n.slice(0,4)),i=Number(n.slice(5,7)),l=p(a,i),u=Array.from({length:l},(e,t)=>{const a=`${n}-${String(t+1).padStart(2,'0')}`,i=o.get(a),l=null!=i&&a<=r?'recorded':a>r?'future':a===r?'pending':'missing';return{date:a,day:t+1,value:'recorded'===l?i:null,state:l}}),s=u.filter(e=>'recorded'===e.state),c=Math.round(100*s.reduce((e,t)=>e+(t.value??0),0))/100,d=s.reduce((e,t)=>!e||t.value>e.value?{date:t.date,value:t.value}:e,null),y=r.slice(0,7)===n,f=n0?Math.round((c-O)/O*100):null;return{ym:n,month:T(n),days:u,total:c,recorded:s.length,current:y,past:f,best:d,vsPct:D}},Object.defineProperty(_e,"firstTakingsMonth",{enumerable:!0,get:function(){return D}}),_e.canSeeMonthTakings=function(e,t,n={}){return!n.inStaffApp&&'owner'===e&&(t?'owner'===t.role||!0===t.ownerAccess:!n.live)},_e.ownerHomeLayout=function(e,t,n=!1){return!n&&'owner'===e&&(!t||'owner'===t.role||!0===t.ownerAccess)};const e=[{key:'gross',label:'Gross takings',kind:'money',fixed:!0,optional:!0},{key:'food',label:'Food takings (optional)',kind:'money',fixed:!0,optional:!0},{key:'drink',label:'Drink takings (optional)',kind:'money',fixed:!0,optional:!0}],t=['lunchGross','dinnerGross'],n=e.map(e=>e.key);const r=e=>'number'==typeof e.gross?e.gross:null,o=['Z total','Card total','Cash total','Paid out','Card tips','Cash tips'],a={'Z total':{key:'zTotal',kind:'money'},'Card total':{key:'card',kind:'money'},'Cash total':{key:'cash',kind:'money'},'Paid out':{key:'paidOut',kind:'money'},'Card tips':{key:'cardTips',kind:'money',fixed:!0},'Cash tips':{key:'cashTips',kind:'money',fixed:!0}};const i=[{key:'card',label:'Card takings',kind:'money'},{key:'cash',label:'Cash takings',kind:'money'},...e,{key:'float',label:'Float (tills)',kind:'money'},{key:'cashTips',label:'Cash tips total',kind:'money',fixed:!0},{key:'cardTips',label:'Card tips total',kind:'money',fixed:!0},{key:'overUnder',label:'Over / under (discrepancy)',kind:'money'},{key:'notes',label:'Notes',kind:'text'}],l=[{key:'gross',label:'Gross sales',kind:'money'},{key:'net',label:'Net sales',kind:'money',fixed:!0},{key:'vat',label:'VAT',kind:'money'},{key:'covers',label:'Covers',kind:'number'},{key:'discounts',label:'Discounts',kind:'money'},{key:'refunds',label:'Refunds',kind:'money'}];const u=e=>null==e||''===e,s=e=>e.toISOString().slice(0,10),c=e=>new Date(`${e}T12:00:00Z`),d=(e,t)=>{const n=c(e);return n.setUTCDate(n.getUTCDate()+t),s(n)};const y=e=>{const t='number'==typeof e.card?e.card:null,n='number'==typeof e.cash?e.cash:null;return null==t&&null==n?null:(t??0)+(n??0)},f=(e,t)=>e.filter(e=>'text'!==e.kind&&!e.optional&&u(t[e.key])).map(e=>e.key);const m=e=>e.confirmedAt?r(e.vals)??y(e.vals):null,p=(e,t)=>new Date(Date.UTC(e,t,0)).getUTCDate();function b(e,t){const n=Number(e.slice(0,4)),r=Number(e.slice(5,7))-1+t;return`${n+Math.floor(r/12)}-${String((r%12+12)%12+1).padStart(2,'0')}`}const k=['January','February','March','April','May','June','July','August','September','October','November','December'],h=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],S=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],T=e=>k[Number(e.slice(5,7))-1]??'',O=e=>{const t=c(e);return`${h[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()].slice(0,3)}`},C=e=>{const t=c(e);return`${S[t.getUTCDay()]} ${t.getUTCDate()} ${k[t.getUTCMonth()]}`};const D=(e,t)=>e.filter(e=>e.rid===t&&null!=m(e)).map(e=>e.date.slice(0,7)).sort()[0]??null},13,[]); __d(function(g,r,i,a,_m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEPOSIT_DEFAULT",{enumerable:!0,get:function(){return e}}),_e.depositOf=function(t){const n=t?.deposit;return n&&'object'==typeof n?{on:n.on??e.on,...!0===n.needsConfirmation?{needsConfirmation:!0}:{},perPersonPence:Number.isFinite(n.perPersonPence)?Math.max(0,Math.round(n.perPersonPence)):n.needsConfirmation?0:e.perPersonPence,fromParty:Number.isFinite(n.fromParty)?Math.max(1,Math.round(n.fromParty)):n.needsConfirmation?1:e.fromParty,refundable:'boolean'==typeof n.refundable?n.refundable:null,cutoffHours:Number.isFinite(n.cutoffHours)?Math.max(0,Math.round(n.cutoffHours)):null,policy:'string'==typeof n.policy?n.policy.slice(0,600):'',wixLinksOn:!0===n.wixLinksOn,wixLinkHours:Number.isFinite(n.wixLinkHours)?Math.max(1,Math.min(168,Math.round(n.wixLinkHours))):48}:{...e}},_e.depositDue=t,_e.depositWords=function(e,o,s){if(e.needsConfirmation&&!e.on)return[e.policy.trim()||'Deposit policy awaiting venue confirmation.'];if(e.needsConfirmation)return['Table deposit policy not set yet. Ticketed event deposits are separate and are not a table policy.'];const d=t(e,o);if(!d)return[];const p=[`A deposit of ${n(d)} (${n(e.perPersonPence)} per person) is needed for ${e.fromParty} or more guests.`];!0===e.refundable?p.push(e.cutoffHours?`Refundable if you cancel at least ${e.cutoffHours} hours before your booking.`:'Refundable if you cancel.'):!1===e.refundable?p.push('The deposit is not refundable.'):p.push(`Ask ${s} about refunds.`);e.policy.trim()&&p.push(e.policy.trim());return p.push(e.wixLinksOn?`${s} will send you a link to pay the deposit securely through website bookings.`:`No payment is taken in the app yet: ${s} will tell you how to pay the deposit.`),p},_e.depositState=o,_e.wixPayStatus=s,_e.knownPaid=d,_e.fromWixOrder=p,_e.estimatedWix=u,_e.depositBadge=l,_e.canTickDeposit=function(e){const t=s(e);return'NOT_PAID'!==t&&'PAID'!==t&&'FULLY_REFUNDED'!==t&&'PARTIALLY_REFUNDED'!==t&&('paid'!==e.depositLink?.state&&'due'===o(e))},_e.canSendDepositLink=function(e,t){return!(!t.wixLinksOn||s(e))&&(!e.walkIn&&!['cancelled','finished','noshow','declined'].includes(e.status??'')&&('due'===o(e)&&'paid'!==e.depositLink?.state))},_e.depositTerms=function(e){const t=[];!0===e.refundable?t.push(e.cutoffHours?`The deposit is refundable if you cancel at least ${e.cutoffHours} hours before.`:'The deposit is refundable if you cancel.'):!1===e.refundable&&t.push('The deposit is not refundable.');e.policy.trim()&&t.push(e.policy.trim());return t.join(' ')},_e.depositLinkMessage=function(e){const t=(e.name||'').trim().split(/\s+/)[0]||'there',[o,s,d]=e.date.split('-').map(Number),p=new Date(o,(s||1)-1,d||1).toLocaleDateString('en-GB',{weekday:'long',day:'numeric',month:'long'}),u=e.expiresAt?new Date(e.expiresAt).toLocaleString('en-GB',{timeZone:'Europe/London',weekday:'long',day:'numeric',month:'long',hour:'numeric',minute:'2-digit',hourCycle:'h12'}).replace(/\s?(am|pm)$/i,e=>e.trim().toLowerCase()):'',l=[`Hello ${t}, thank you for booking ${e.venue} for ${e.partySize} on ${p} at ${e.time.slice(0,5)}.`,`To hold your table, please pay the ${n(e.amountPence)} deposit here: ${e.url}`];u&&l.push(`The link works until ${u}.`);e.terms?.trim()&&l.push(e.terms.trim());return l.push(`Thank you, ${e.venue}`),l.join('\n')},_e.depositView=c,_e.depositShort=function(e){const t=c(e,!1);return t?t.a11y.split(',')[0]:null};const e={on:!0,perPersonPence:1e3,fromParty:6,refundable:null,cutoffHours:null,policy:''};function t(e,t){return!e.on||e.perPersonPence<=0||t`\xa3${(e/100).toFixed(e%100?2:0)}`;function o(e){if('deposit'!==e.security)return'none';const t=e.depositDue??e.depositPaid??0;return t?(e.depositPaid??0)>=t?'paid':'due':'none'}function s(e){const t=e.wix?.paymentStatus;return t&&['FREE','NOT_PAID','PAID','PARTIALLY_PAID','PARTIALLY_REFUNDED','FULLY_REFUNDED'].includes(t)?t:null}function d(e){return'paid'===e.depositLink?.state&&(e.depositLink.paidPence??0)>0?e.depositLink.paidPence:e.depositPaidBy&&'Wix'!==e.depositPaidBy&&(e.depositPaid??0)>0&&!e.wix?.depositEstimated||p(e)&&(e.depositPaid??0)>0?e.depositPaid:null}function p(e){return'wix-order'===e.wix?.amountSource||'wix-order'===e.depositSource}function u(e){if(p(e)||!e.wix?.depositEstimated&&'estimate'!==e.depositSource)return null;const t=e.depositPaid??0;if(t<=0)return null;const n=e.partySize??0;return{pence:t,perHead:e.wix?.perPersonPence??(n?Math.round(t/n):0),party:n}}function l(e,t=n){const p=s(e),l=d(e);if(p&&'FREE'!==p){if(e.depositPaidBy&&l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};if('PAID'===p){if(l)return{label:`Deposit paid \xb7 ${t(l)}`,kind:'gold'};const n=u(e);return n?{label:n.party&&n.perHead?`Deposit paid (about ${t(n.pence)}, ${n.party} \xd7 ${t(n.perHead)})`:`Deposit paid (about ${t(n.pence)})`,kind:'gold'}:{label:'Deposit paid on website bookings',kind:'gold'}}return'PARTIALLY_PAID'===p?{label:l&&(e.depositDue??0)>l?`Part paid on website bookings \xb7 ${t(l)} of ${t(e.depositDue)}`:'Part paid on website bookings',kind:'amber'}:'NOT_PAID'===p?{label:(e.depositDue??0)>0?`Deposit not paid \xb7 ${t(e.depositDue)} due`:'Deposit not paid',kind:'amber'}:'FULLY_REFUNDED'===p?{label:'Deposit refunded on website bookings',kind:'neutral'}:{label:'Deposit part refunded on website bookings',kind:'neutral'}}const c=o(e);if('none'===c)return null;const f=e.depositLink;return'paid'===f?.state?{label:l?`Deposit paid on website bookings \xb7 ${t(l)}`:'Deposit paid on website bookings',kind:'gold'}:'paid'===c?{label:l?`Deposit paid \xb7 ${t(l)}`:'Deposit paid',kind:'gold'}:'open'===f?.state?{label:`Deposit link sent \xb7 waiting \xb7 ${t(f.amountPence??e.depositDue??0)}`,kind:'amber'}:'expired'===f?.state?{label:'Deposit link ran out \xb7 send a new one',kind:'amber'}:{label:`Deposit due \xb7 ${t(e.depositDue??0)}`,kind:'amber'}}function c(e,t,o=n){const d=l(e,o);if(!d)return null;const c=s(e),f=d.label.startsWith('Deposit paid');if(!t)return f?{label:'\u2713 Deposit paid',kind:'gold',a11y:'Deposit paid',paid:f}:'PARTIALLY_PAID'===c?{label:'Deposit part paid',kind:'amber',a11y:'Deposit part paid',paid:f}:'FULLY_REFUNDED'===c||'PARTIALLY_REFUNDED'===c?{label:'Deposit refunded',kind:'neutral',a11y:'Deposit refunded',paid:f}:'NOT_PAID'===c?{label:'Deposit not paid',kind:'amber',a11y:'Deposit not paid yet',paid:f}:{label:'Deposit due',kind:'amber',a11y:'Deposit due, not paid yet',paid:f};const b='PAID'===c?u(e):null,m=b&&b.perHead?`Website bookings shows paid; amount worked out at ${o(b.perHead)} a head`:p(e)&&f?'Amount from the website bookings order':void 0,D=d.label.replace(/ \xb7 /g,', ').replace(/\xd7/g,'times').replace(/[()]/g,'')+(m?`. ${m}`:'');return{label:d.label,kind:d.kind,a11y:D,note:m,paid:f}}},14,[]); __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return t.ROSTER_VERSION}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n=r(d[1]).IS_ISOLATED_VENUE?[]:t.ROSTER},15,[16,5]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROSTER_VERSION",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ROSTER",{enumerable:!0,get:function(){return t}});const n='42c3b21ce2b1',t=[{id:"st-tracy",name:"Tracy",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"0282340e0cd9049e4c6c65aad054567668ae171420f8232d01339f9b9a4f673e",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#2A2520",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"beehive",suit:"#F2EAD8",antenna:"star"}},{id:"st-james",name:"James",level:"Owner",role:"owner",job:"Owner",dept:"Management",app:"owner",tokenHash:"22d4e0fa4684c4524d7e309f998698ee6a5f13cf45ce184f829535770122bc77",hourlyPence:null,salaried:!0,noTax:!1,avatar:{bg:"#4A3F35",ring:"#E9B949",skin:"#E8B48F",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"ball"}},{id:"st-gordon",name:"Gordon",level:"Manager",role:"manager",job:"General Manager",dept:"Kitchen",app:"owner",tokenHash:"85f1379e164f05372f7b4c36a9a9eaeca53f702b2002b1e9ec2286b16754a123",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#CFA45F",skin:"#F4D2B8",hair:"#7A4E2A",hairStyle:"crop",suit:"#FFFFFF",antenna:"ball",specs:!0}},{id:"st-bisto",name:"Bisto",level:"Head Chef",role:"staff",job:"Head Chef",dept:"Kitchen",app:"chef",nickname:"Preston",tokenHash:"a30424e45d351eaed9dfa126c9bb474aec456488cc5ff3e47160169d804589de",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#B8913A",skin:"#C68B5E",hair:"#151515",hairStyle:"quiff",suit:"#FFFFFF",antenna:"star"}},{id:"st-lenny",name:"Lenny",level:"Staff",role:"staff",job:"Commis Chef",dept:"Kitchen",app:"staff",tokenHash:"3a2d450706725227a93f77e1bc53460ad863eadd4437bc6f6f87b51e67c14ee8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#E9B949",skin:"#F1C7A5",hair:"#C2462E",hairStyle:"curls",suit:"#FFFFFF",antenna:"none"}},{id:"st-agate",name:"Agate",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"7abf5c5d9edc3a95f366e87be81612769e06dc42dee3b917845cd1de506d0474",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#E9B949",skin:"#E8B48F",hair:"#151515",hairStyle:"bob",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-finn",name:"Finn",level:"Staff",role:"staff",job:"Bar staff",dept:"Bar",app:"staff",nickname:"Paddy",tokenHash:"8a8a3102bedf69cfb1463dcafeef8663ed7e6ef9c0b87b9129e872f6647689a1",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#B8913A",skin:"#A86B45",hair:"#2B1B12",hairStyle:"quiff",suit:"#F2EAD8",antenna:"star"}},{id:"st-eilidh",name:"Eilidh",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"38f1a41686f2990237e33147142714d1950775c37d3ca1e73a57d191704f5a43",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F4D2B8",hair:"#C2462E",hairStyle:"flip",suit:"#F2EAD8",antenna:"ball"}},{id:"st-emily",name:"Emily",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"96a8d606148e6f160f1f56cbd10df7d40a102e9406a56a397043e08736e692d8",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#CFA45F",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"bob",suit:"#F2EAD8",antenna:"none"}},{id:"st-gabrielle",name:"Gabrielle",level:"Staff",role:"staff",job:"Front of house",dept:"Front of house",app:"staff",tokenHash:"49193baef50a9d51202dce5b7664264b87c89e59d2ab055573a02db85a6ee7a7",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#3A3029",ring:"#CFA45F",skin:"#8D5B3E",hair:"#151515",hairStyle:"curls",suit:"#F2EAD8",antenna:"ball"}},{id:"st-cameron",name:"Cameron Mc",level:"Staff",role:"staff",job:"Front of house (temp)",dept:"Front of house",app:"staff",tokenHash:"aecb1b8c6c2be2446f6a70fd8fce49389821fbb77ccd7b49285807d4b984b127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#8A6A3B",ring:"#B8913A",skin:"#E8B48F",hair:"#7A4E2A",hairStyle:"crop",suit:"#F2EAD8",antenna:"star",specs:!0}},{id:"st-lillie",name:"Lillie",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"cc3ba48d53dc896306b7130d7f1873fdee4b999f52c771822677993a30d0070c",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#D9A441",ring:"#CFA45F",skin:"#F4D2B8",hair:"#2B1B12",hairStyle:"flip",suit:"#FFFFFF",antenna:"star"}},{id:"st-mia",name:"Mia",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"b059384435aaf4f1b715a2d5ac271b3a319a328293727329aa3f0865113ce9db",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#2A2520",ring:"#CFA45F",skin:"#C68B5E",hair:"#151515",hairStyle:"beehive",suit:"#FFFFFF",antenna:"ball"}},{id:"st-jack",name:"Jack",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"4b3b1835012643aac15037450ba44ac26bb6b91ff17b26a0d46c7163435b1686",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#B89A72",ring:"#E9B949",skin:"#F1C7A5",hair:"#D9B26A",hairStyle:"quiff",suit:"#FFFFFF",antenna:"none"}},{id:"st-harvey",name:"Harvey",level:"Staff",role:"staff",job:"Kitchen porter (KP)",dept:"Kitchen",app:"staff",tokenHash:"c5c4e71d1a9eea7116face538ddba4084037bf2f16eae4ba6910d1a1b8036127",hourlyPence:null,salaried:!1,noTax:!1,avatar:{bg:"#4A3F35",ring:"#B8913A",skin:"#A86B45",hair:"#7A4E2A",hairStyle:"curls",suit:"#FFFFFF",antenna:"star",specs:!0}}]},16,[]); -__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PITCH_VENUE",{enumerable:!0,get:function(){return a}}),Object.defineProperty(e,"PITCH_TEAM",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PITCH_TEXT",{enumerable:!0,get:function(){return o}}),e.pitchText=function(a){let n=a;for(const[a,t]of o)a.test(n)?(a.lastIndex=0,n=n.replace(a,t)):a.lastIndex=0;return n};const a={name:'The Harbour Kitchen',tagline:'Harbourside seafood & seasonal plates',location:'12 Quay Street, Portmorran',phone:'01632 960 123',website:'harbourkitchen.example'},n={'st-tracy':{name:'Morgan',job:'Owner',hourlyPence:null,salaried:!0},'st-gordon':{name:'Alex',job:'General Manager',dept:'Management',hourlyPence:null,salaried:!0},'st-bisto':{name:'Ravi',job:'Head Chef',hourlyPence:null,salaried:!0},'st-agate':{name:'Priya',job:'Front of house supervisor',hourlyPence:1450},'st-lenny':{name:'Tom',job:'Commis Chef',hourlyPence:1325},'st-finn':{name:'Lewis',job:'Bar staff',hourlyPence:1290},'st-eilidh':{name:'Chloe',job:'Front of house',hourlyPence:1271},'st-emily':{name:'Ellie',job:'Front of house',hourlyPence:1271},'st-lillie':{name:'Jordan',job:'Kitchen porter (KP)',hourlyPence:1271},'st-jack':{name:'Sam',job:'Kitchen porter (KP)',hourlyPence:1271}},o=[['Harbour View, Dunure, South Ayrshire',a.location],['Harbour View, Dunure',a.location],['Harbour View mug','Harbour Kitchen mug'],['Harbour View','Quay Street'],['anchoragedunure.com',a.website],['01292 502826',a.phone],['Mini Anchors','Little Crew'],['The Anchorage',a.name],['Anchorage','Harbour Kitchen'],['ANCHORAGE','HARBOUR KITCHEN'],['South Ayrshire','the Firth coast'],['Ayrshire','the Firth coast'],['Dunure','Portmorran'],['Kittyfisher boat (Big Sean)','Coastal Fish Co'],['Kittyfisher','Coastal Fish Co'],['Big Sean','Coastal Fish Co'],['Example Fish Co.','Coastal Fish Co'],['Sample Dairy Ltd','Hillside Dairy'],['Sample Fruit & Veg','Fieldfare Veg'],['Mills milk','Hillside Dairy milk'],['Mills','Hillside Dairy'],['J. Pieroni & Sons','Fieldfare Veg'],["Pieroni's",'Fieldfare Veg'],['Pieroni','Fieldfare Veg'],['Alsons (drinks)','Drinks wholesaler'],['Alsons','the drinks wholesaler'],['Spes Bona','the deli wholesaler'],['Tarelgin','the butcher'],['Reids','the bakery'],['Reeds','the bakery'],['Example Butchers Ltd','Quayside Butchers'],['Example Dry Goods Wholesale','Dry goods wholesaler'],['Sample Brewing Co.','Harbourside Brewing'],['Example Cleaning Supplies','Cleaning supplies'],['Sample Packaging Ltd','Packaging supplier'],['Example Kitchen Repairs','Kitchen repairs'],['Preston','Ravi'],['Bisto','Ravi'],['Tracy','Morgan'],['James','Morgan'],['Gordon','Alex'],['Agate','Priya'],['Lenny','Tom'],['Finn','Lewis'],['Eilidh','Chloe'],['Emily','Ellie'],['Gabrielle','Ellie'],['Cameron Mc','Sam'],['Cameron','Sam'],['Lillie','Jordan'],['Mia','Jordan'],['Jack','Sam'],['Harvey','Jordan'],['Anna','the supplier'],['(preview)',''],[' (example)','']].map(([a,n])=>[new RegExp(`${/^[A-Za-z]/.test(a)?'(?[new RegExp(`${/^[A-Za-z]/.test(a)?'(?r.importAll(t,s);{const l=o?.[String(t)];if(Array.isArray(l)){const c=globalThis[`${__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`];if(c?.isReady?.(l))return u();const f=n(t,o);if(null!=f)return f.then(u);throw new Error(`Cannot import module ${s??t}: the async bundle loader is unavailable. Load the initial Expo bundle before importing these chunks: ${l.join(', ')}`)}try{return u()}catch(s){const l=n(t,o);if(null!=l)return l.then(u);throw s}}const l=n(t,o);return null!=l?l.then(u):u()}function o(n,o,s){const u=t(n,o,s),l=Promise.resolve(u);return l._result=u,l}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n const IMPORT_SCRIPTS = importScripts;\n const FETCH = fetch;\n const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n self.fetch = function(input, init) {\n return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n };\n self.importScripts = function(...urls) {\n return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n };\n importScripts(ASYNC_WORKER_BASE);\n `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},1036,[]); __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"currentScrollY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"screenGeneration",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"restoreScroll",{enumerable:!0,get:function(){return o}}),_e.useScrollMemory=function(u){const c=(0,e.useRef)(0),o=(0,e.useRef)(0),l=(0,e.useRef)(0),s=(0,e.useRef)(0),f=(0,e.useRef)(0),v=(0,e.useRef)(null),y=(0,e.useRef)([]),h=()=>{y.current.forEach(clearTimeout),y.current=[]},b=()=>{const e=v.current;null!=e&&(u.current?.scrollTo({y:e,animated:!1}),f.current-s.current>=e-2&&(c.current=e,o.current=e,v.current=null,h()))},p=(0,e.useCallback)(e=>{if(h(),v.current=Math.max(0,e),e<=0)return v.current=null,u.current?.scrollTo({y:0,animated:!1}),c.current=0,void(o.current=0);for(const e of[0,30,80,160,320,600,1e3,1600,2500])y.current.push(setTimeout(b,e));y.current.push(setTimeout(()=>{v.current=null},2600))},[]);t={y:()=>o.current,restore:p};const R=(0,e.useCallback)(()=>{n++;return o.current},[]);return{props:{scrollEventThrottle:32,onScroll:e=>{const t=e.nativeEvent.contentOffset.y;c.current=t,s.current=e.nativeEvent.layoutMeasurement.height,f.current=e.nativeEvent.contentSize.height,Date.now()-l.current>250&&null==v.current&&(o.current=t)},onScrollBeginDrag:()=>{v.current=null,h()},onContentSizeChange:(e,t)=>{f.current=t,l.current=Date.now(),b()},onLayout:e=>{s.current=e.nativeEvent.layout.height}},restore:p,leave:R}};var e=r(d[0]);let t=null,n=0;const u=()=>t?t.y():0,c=()=>n,o=e=>t?.restore(e)},1037,[34]); __d(function(_g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useBackLayers",{enumerable:!0,get:function(){return f}}),_e.runBackLayer=function(){const e=f.getState().layers,t=e[e.length-1];return!!t&&(t.fn(),!0)},_e.useBackLayer=function(e,n,o=!0){const s=(0,t.useRef)(n);s.current=n,(0,t.useEffect)(()=>{if(!e)return;const t=++y,n=(0,u.currentScrollY)(),l=(0,u.screenGeneration)();return f.setState(e=>({layers:[...e.layers,{id:t,fn:()=>s.current(),own:o}]})),()=>{f.setState(e=>({layers:e.layers.filter(e=>e.id!==t)})),(0,u.screenGeneration)()===l&&(0,u.restoreScroll)(n)}},[e,o])},Object.defineProperty(_e,"useInnerBackShown",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"BACK_GUTTER",{enumerable:!0,get:function(){return p}}),_e.BackTitleRow=function({back:e,onBack:n,title:s}){const[l,u]=(0,t.useState)(0),[f,y]=(0,t.useState)({w:96,h:48}),[w,b]=(0,t.useState)(0),S=Array.from(new Set(String(s??'').split(/\s+/).filter(Boolean)));String(s??'').length>=20&&S.length>=3&&S.push('00000000');const v=Math.max(p,Math.ceil(f.w)+4),j=e&&l>0&&l-2*vu(Math.round(e.nativeEvent.layout.width)),style:{minHeight:44,justifyContent:'center',alignItems:'center',paddingHorizontal:e&&!j?v:0,paddingTop:j?f.h:0},children:[e?(0,h.jsx)(o.default,{style:{position:'absolute',left:0,top:0},onLayout:e=>{const t=Math.round(e.nativeEvent.layout.width),n=Math.round(e.nativeEvent.layout.height);y(e=>e.w===t&&e.h===n?e:{w:t,h:n})},children:(0,h.jsx)(g,{onPress:n})}):null,(0,h.jsx)(c.T,{size:22,weight:"bold",center:!0,accessibilityRole:"header",children:s}),e&&S.length?(0,h.jsx)(o.default,{"aria-hidden":!0,importantForAccessibility:"no-hide-descendants",pointerEvents:"none",style:{position:'absolute',left:0,top:0,opacity:0,alignItems:'flex-start'},onLayout:e=>b(Math.ceil(e.nativeEvent.layout.width)),children:S.map(e=>(0,h.jsx)(c.T,{size:22,weight:"bold",numberOfLines:1,style:{alignSelf:'flex-start'},children:e},e))}):null]})},_e.BackButton=g,_e.useWebBack=function(e){const n=(0,t.useRef)(e);n.current=e,(0,t.useEffect)(()=>{if('undefined'==typeof window||!window.history?.pushState)return;const e=()=>{try{window.history.pushState({...window.history.state??{},ccBack:Date.now()},'',window.location.href)}catch{}};e();const t=t=>{n.current()&&(t.stopImmediatePropagation?.(),e())};return window.addEventListener('popstate',t,!0),()=>window.removeEventListener('popstate',t,!0)},[])};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]);const f=(0,s.create)(()=>({layers:[]}));let y=0;const w=()=>f(e=>e.layers.some(e=>e.own)),p=100;function g({onPress:e,testID:t="screen-back",label:o="Back"}){return(0,h.jsx)(n.default,{testID:t,accessibilityRole:"button",accessibilityLabel:o,onPress:e,hitSlop:8,style:({pressed:e})=>({minHeight:48,minWidth:96,justifyContent:'center',paddingRight:12,opacity:e?.6:1,alignSelf:'flex-start'}),children:(0,h.jsxs)(c.T,{size:18,weight:"semibold",colour:l.colours.gold,children:["\u2039 ",o]})})}},1038,[34,236,402,102,815,837,794,1037,25]); -__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.115'},1039,[]); +__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"APP_VERSION",{enumerable:!0,get:function(){return t}});const t='v0.3.12.116'},1039,[]); __d(function(_g,_r,i,_a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotificationsSettings=function({rid:e}){(0,n.useEffect)(()=>{c.useNotifs.getState().ensure(e),(0,j.readPushLive)()},[e]);const t=(0,c.useNotifs)(e=>e.items).filter(t=>t.rid===e&&!t.removed),s=(0,h.useOwner)(e=>e.staff),o=(0,j.usePushLive)(),[l,p]=(0,n.useState)(null),[f,g]=(0,n.useState)(null),[x,b]=(0,n.useState)(!1),y=c.useNotifs.getState(),T=s.map(e=>({id:e.id,role:e.role,level:e.level,job:e.job,department:e.dept,active:e.active})),v=e=>{const t=(0,u.resolveRecipients)(e,T,[]),n=[...e.recipients.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...(e.recipients.onShiftIn??[]).map(e=>u.SHIFT_FILTER_LABEL[e])];e.recipients.fallback&&n.push(`else ${[...e.recipients.fallback.groups.map(e=>u.NOTIF_GROUP_LABEL[e]),...e.recipients.fallback.staff.map(e=>I(s.find(t=>t.id===e)?.name??e))].join(', ')}`);const o=e.recipients.staff.map(e=>I(s.find(t=>t.id===e)?.name??e));return[...n,...o].join(', ')+(t.length||(e.recipients.onShiftIn??[]).length?'':' (nobody yet)')};return(0,k.jsxs)(a.default,{style:{gap:10},testID:"notif-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: these remind people at a set time, e.g. the Mills milk order. They show in the app as a gold slider with Done and Later. Done is logged with the name and time. Times are UK time."}),(0,k.jsxs)(a.default,{testID:"push-live-status",style:{borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:10,padding:8,gap:4},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Send to phones"}),(0,k.jsx)(r.Badge,{kind:o.live?'gold':'neutral',label:o.live?'ON':'OFF'})]}),(0,k.jsx)(r.Muted,{size:12,children:o.live?'Phone notifications go to people who turned them on.':'Off: nothing goes to anyone\u2019s phone yet. In-app reminders still work.'}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:"push-live-toggle",label:o.live?'Switch phone notifications off':'Switch phone notifications on\u2026',onPress:()=>b(!0)})]}),(0,k.jsx)(R,{}),t.map(e=>l===e.id?(0,k.jsx)(D,{init:e,onCancel:()=>p(null),onSave:t=>{y.update(e.id,t),p(null)}},e.id):(0,k.jsxs)(a.default,{testID:`notif-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:12,padding:10,gap:4,opacity:e.paused?.6:1},children:[(0,k.jsxs)(r.Row,{style:{justifyContent:'space-between'},children:[(0,k.jsx)(r.T,{weight:"semibold",style:{flex:1},children:e.title}),e.paused?(0,k.jsx)(r.Badge,{kind:"neutral",label:"Off"}):null]}),(0,k.jsx)(r.Muted,{size:13,children:e.message}),(0,k.jsxs)(r.Muted,{size:12,children:[(0,u.scheduleText)(e)," \xb7 ",v(e)," \xb7 ",[e.sendBy.inApp?'In app':'',e.sendBy.push?'Phone':''].filter(Boolean).join(' + ')]}),(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",testID:`notif-edit-${e.seed??e.id}`,label:"Edit",onPress:()=>p(e.id)}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.paused?'Switch on':'Switch off',onPress:()=>y.update(e.id,{paused:!e.paused})}),(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Remove",onPress:()=>g(e)})]})]},e.id)),'new'===l?(0,k.jsx)(D,{init:C,onCancel:()=>p(null),onSave:t=>{y.add(e,t),p(null)}}):(0,k.jsx)(r.Button,{small:!0,testID:"notif-add",label:"Add a notification",onPress:()=>p('new')}),(0,k.jsxs)(r.Sheet,{visible:!!f,onClose:()=>g(null),title:"Remove this notification?",children:[(0,k.jsx)(r.T,{children:f?.title}),(0,k.jsx)(r.Muted,{children:"Nobody gets it after this. Reset to default restores the configured rules."}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{label:"Remove",onPress:()=>{f&&y.remove(f.id),g(null)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>g(null)})]})]}),(0,k.jsxs)(r.Sheet,{visible:x,onClose:()=>b(!1),title:o.live?'Switch phone notifications off?':'Switch phone notifications on?',testID:"push-live-confirm",children:[(0,k.jsx)(r.T,{children:o.live?'Nothing more goes to phones. In-app reminders keep working.':'From the next scheduled time, everyone ticked on a notification with \u201cPhone notification\u201d gets it on any phone where they turned phone notifications on.'}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{testID:"push-live-yes",label:o.live?'Switch off':'Yes, switch on',onPress:()=>{(0,j.setPushLive)(!o.live).then(e=>(0,w.notify)({id:'push-live',tone:e.ok?'normal':'warn',title:e.ok?o.live?'Phone notifications are off':'Phone notifications are on':'Not changed',body:e.message??'',timeoutMs:7e3})),b(!1)}}),(0,k.jsx)(r.Button,{kind:"ghost",label:"Cancel",onPress:()=>b(!1)})]})]})]})},_e.PushButton=R,_e.OrderListsSettings=function({rid:e}){(0,n.useEffect)(()=>{p.useOrderLists.getState().ensure(e)},[e]);const s=(0,p.useOrderLists)(e=>e.lists).filter(t=>t.rid===e),o=(0,p.orderSettingsOf)(e);(0,p.useOrderLists)(t=>t.settings[e]);const l=p.useOrderLists.getState(),[c,u]=(0,n.useState)(''),[h,g]=(0,n.useState)({});return(0,k.jsxs)(a.default,{style:{gap:10},testID:"order-list-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:"Tip: running lists (like Alsons drinks) collect items until you order; trip lists (like Cash and carry) are for one shopping day. Logos and phone numbers are set on each list."}),(0,k.jsx)(r.Toggle,{testID:"order-allow-staff",label:"Let all staff add items",value:o.allowStaff,onChange:t=>l.setSettings(e,{allowStaff:t})}),(0,k.jsx)(r.Muted,{size:12,children:"Staff can add items and see the lists. Only managers and the Head Chef tick, remove or finish an order."}),(0,k.jsx)(r.T,{weight:"semibold",children:"Default trip day"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:o.defaultTripDay===t,onPress:()=>l.setSettings(e,{defaultTripDay:t})},t))}),s.map(e=>(0,k.jsxs)(a.default,{testID:`order-list-row-${e.seed??e.id}`,style:{borderWidth:1,borderColor:d.colours.hairline,borderRadius:10,padding:8,gap:6,opacity:e.archived?.55:1},children:[(0,k.jsxs)(r.Row,{gap:6,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:`Rename ${e.name}`,value:h[e.id]??e.name,onChangeText:t=>g(s=>({...s,[e.id]:t})),onBlur:()=>{const t=(h[e.id]??'').trim();t&&t!==e.name&&l.updateList(e.id,{name:t})},style:{...T,flex:1,minWidth:0}}),(0,k.jsx)(r.Badge,{kind:"neutral",label:'trip'===e.kind?'Trip':'Running'})]}),'trip'===e.kind?(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(t=>(0,k.jsx)(r.Chip,{label:f.DAY_FULL[t].slice(0,3),selected:(e.tripDay??o.defaultTripDay)===t,onPress:()=>l.updateList(e.id,{tripDay:t})},t))}):null,(0,k.jsx)(r.Row,{gap:6,children:(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:e.archived?'Bring back':'Archive',onPress:()=>l.updateList(e.id,{archived:!e.archived})})})]},e.id)),(0,k.jsxs)(r.Row,{gap:6,wrap:!0,children:[(0,k.jsx)(t.TextInput,{accessibilityLabel:"New list name",testID:"order-new-name",value:c,onChangeText:u,placeholder:"e.g. Butcher",placeholderTextColor:d.colours.muted,style:{...T,flexGrow:1,flexBasis:160,minWidth:0}}),(0,k.jsx)(r.Button,{small:!0,label:"Add running",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'running'}),u('')}}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"Add trip",disabled:c.trim().length<2,onPress:()=>{l.addList(e,{name:c.trim(),kind:'trip',tripDay:o.defaultTripDay}),u('')}})]})]})},Object.defineProperty(_e,"resetOrderLists",{enumerable:!0,get:function(){return B}}),_e.ClockAreaSettings=function({rid:e,me:c}){(0,g.useClockArea)(t=>t.areas[e]);const u=(0,g.areaOf)(e);const h=g.useClockArea.getState(),p=(0,s.privateClockVenue)(e),[f,j]=(0,n.useState)(null==u.lat?'':String(u.lat)),[y,w]=(0,n.useState)(null==u.lng?'':String(u.lng)),[v,S]=(0,n.useState)(!1),[I,C]=(0,n.useState)(''),[L,D]=(0,n.useState)(u.breakOptions.join(', ')),R=(t,s)=>{const n=Number(t),o=Number(s);t.trim()||s.trim()?Number.isFinite(n)&&Number.isFinite(o)&&Math.abs(n)<=90&&Math.abs(o)<=180&&h.set(e,{lat:n,lng:o},c):h.set(e,{lat:null,lng:null},c)},B=async()=>{if(p)return;S(!0),C('');const t=await(0,b.getFix)();if(S(!1),'object'!=typeof t)return void C('denied'===t?'Location is blocked for this app. Allow it in your browser or phone settings.':'Couldn\u2019t get your location. Try again outside or near a window.');const s=t.lat.toFixed(6),n=t.lng.toFixed(6);j(s),w(n),h.set(e,{lat:Number(s),lng:Number(n)},c),C(`Centre set to where you are (accurate to about ${Math.round(t.acc)} m).`)},P=(0,x.areaSet)(u);return(0,k.jsxs)(a.default,{style:{gap:10},testID:"clock-area-settings",children:[(0,k.jsx)(r.Muted,{size:13,children:p?'The address-matched pub centre is configured below. Only clock-in checks location; only pass/fail is saved. No background, clock-out or break checks. Change the radius or centre here; use a manager override for a refused check.':'Tip: stand in the middle of the venue and tap \u201cUse my current location\u201d. Clocking in, out and breaks then only work within the distance below. Rota and pay screens are never blocked.'}),P?null:(0,k.jsx)(r.Banner,{kind:"warn",title:"Clock-in area not set yet",children:"Until you set the centre, staff can clock in from anywhere."}),p?(0,k.jsx)(r.Muted,{children:"Clock-in at the pub is required. A manager can record an exception with a reason."}):(0,k.jsx)(r.Toggle,{testID:"clock-area-on",label:"Check people are at the venue",value:u.on,onChange:t=>h.set(e,{on:t},c)}),p?null:(0,k.jsx)(r.Button,{testID:"clock-area-here",label:v?'Finding you\u2026':'\ud83d\udccd Use my current location',disabled:v,onPress:()=>{B()}}),I?(0,k.jsx)(r.Muted,{size:13,children:I}):null,(0,k.jsxs)(r.Row,{wrap:!0,gap:8,children:[(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Latitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Latitude",testID:"clock-area-lat",value:f,onChangeText:j,onBlur:()=>R(f,y),placeholder:"55.40\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]}),(0,k.jsxs)(a.default,{style:{gap:2},children:[(0,k.jsx)(r.Muted,{size:12,children:"Longitude"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Longitude",testID:"clock-area-lng",value:y,onChangeText:w,onBlur:()=>R(f,y),placeholder:"-4.75\u2026",placeholderTextColor:d.colours.muted,style:{...T,width:130}})]})]}),P?(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"clock-area-map",onPress:()=>{o.default.openURL(`https://www.openstreetmap.org/?mlat=${u.lat}&mlon=${u.lng}#map=18/${u.lat}/${u.lng}`)},children:(0,k.jsx)(r.T,{size:13,colour:d.colours.gold,children:"See the pin on a map \u203a"})}):null,(0,k.jsx)(r.T,{weight:"semibold",children:"How far from the centre"}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"\u2212",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius-10)},c)}),(0,k.jsxs)(r.T,{weight:"semibold",style:{minWidth:70,textAlign:'center'},children:[u.radius," m"]}),(0,k.jsx)(r.Button,{small:!0,kind:"secondary",label:"+",onPress:()=>h.set(e,{radius:(0,x.clampRadius)(u.radius+10)},c)})]}),(0,k.jsxs)(r.Muted,{size:12,children:["At least ",x.MIN_RADIUS," m. Phones aren\u2019t exact, so up to 50 m of the phone\u2019s own accuracy is added on top."]}),(0,k.jsx)(r.T,{weight:"semibold",children:"Forgotten break: lengths to offer at clock-out"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Break lengths in minutes",testID:"clock-break-options",value:L,onChangeText:D,onBlur:()=>{const t=L.split(/[ ,]+/).map(Number).filter(e=>Number.isFinite(e)&&e>0&&e<=180);t.length&&h.set(e,{breakOptions:[...new Set(t)].sort((e,t)=>e-t)},c),D((0,g.areaOf)(e).breakOptions.join(', '))},style:T}),(0,k.jsxs)(r.Muted,{size:12,children:["Minutes, e.g. 5, 10, 15, 20, 30, 45, 60. Shows as ",u.breakOptions.map(x.breakLabel).join(', ')," and \u201cNo break\u201d."]}),p?(0,k.jsx)(r.Muted,{children:"No automatic arrival checks: staff location is used only at clock-in."}):(0,k.jsxs)(k.Fragment,{children:[" ",(0,k.jsx)(r.T,{weight:"semibold",children:"Not on the rota"}),(0,k.jsx)(r.Toggle,{testID:"clock-offrota-on",label:"Ask people at the venue who aren\u2019t on the rota if they want to clock in",value:u.offRotaPrompt,onChange:t=>h.set(e,{offRotaPrompt:t},c)}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota question",testID:"clock-offrota-title",value:u.offRotaTitle,onChangeText:t=>h.set(e,{offRotaTitle:t||x.DEFAULT_CLOCK_AREA.offRotaTitle},c),style:T}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Off-rota second line",testID:"clock-offrota-body",value:u.offRotaBody,onChangeText:t=>h.set(e,{offRotaBody:t||x.DEFAULT_CLOCK_AREA.offRotaBody},c),style:T}),(0,k.jsx)(r.Muted,{size:12,children:"This only checks while the app is open (web apps can\u2019t watch location in the background; that would need a native app)."})]})]})},Object.defineProperty(_e,"resetClockArea",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"COOKSAFE_URL",{enumerable:!0,get:function(){return O}}),_e.FoodSafetyCard=function({children:e}){return(0,k.jsx)(r.Card,{children:(0,k.jsxs)(a.default,{testID:"food-safety",style:{gap:6},children:[(0,k.jsx)(r.T,{size:17,weight:"semibold",children:"Food safety"}),(0,k.jsxs)(r.T,{children:["Based on ",(0,k.jsx)(r.T,{weight:"bold",colour:d.colours.gold,children:"CookSafe"})," (Food Standards Scotland)"]}),(0,k.jsx)(r.Muted,{size:12,children:"CoverCharge is not endorsed by Food Standards Scotland."}),(0,k.jsx)(l.default,{accessibilityRole:"link",testID:"cooksafe-link",onPress:()=>{o.default.openURL(O)},children:(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"Open the CookSafe guidance \u203a"})}),(0,k.jsx)(r.Muted,{size:13,children:"Full logs coming in the next update."}),e]})})};var t=_r(_d[0]),s=_r(_d[1]),n=_r(_d[2]),o=e(_r(_d[3])),l=e(_r(_d[4])),a=e(_r(_d[5])),r=_r(_d[6]),d=_r(_d[7]),c=_r(_d[8]),u=_r(_d[9]),h=_r(_d[10]),p=_r(_d[11]),f=_r(_d[12]),g=_r(_d[13]),x=_r(_d[14]),b=_r(_d[15]),j=_r(_d[16]),y=_r(_d[17]),w=_r(_d[18]),k=_r(_d[19]);const T={minHeight:44,borderRadius:10,borderWidth:1,borderColor:d.colours.hairline,backgroundColor:d.colours.surface2,color:d.colours.text,paddingHorizontal:10,fontSize:15},v=[1,2,3,4,5,6,0],S=['on_shift','everyone','managers','head_chef','kitchen','foh'],I=e=>e.replace(' (example)',''),C={title:'',message:'',days:[3,4,5,6,0],time:'21:00',recipients:{staff:[],groups:[]},sendBy:{inApp:!0,push:!1}};function L({value:e,onChange:t}){const s=(0,h.useOwner)(e=>e.staff).filter(e=>e.active);return(0,k.jsxs)(a.default,{style:{gap:6},testID:"notif-recipients",children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Who gets it"}),(0,k.jsx)(r.Muted,{size:12,children:"Tick people, or pick a group (groups follow the team as it changes)."}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:S.map(s=>(0,k.jsx)(r.Chip,{testID:`notif-group-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:e.groups.includes(s),onPress:()=>t({...e,groups:e.groups.includes(s)?e.groups.filter(e=>e!==s):[...e.groups,s]})},s))}),(0,k.jsx)(r.Muted,{size:12,children:"Only people on shift when it goes, in:"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:Object.keys(u.SHIFT_FILTER_LABEL).map(s=>{const n=(e.onShiftIn??[]).includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-onshift-${s}`,label:u.SHIFT_FILTER_LABEL[s],selected:n,onPress:()=>t({...e,onShiftIn:n?(e.onShiftIn??[]).filter(e=>e!==s):[...e.onShiftIn??[],s]})},s)})}),(0,k.jsx)(a.default,{style:{gap:2},children:s.map(s=>{const n=e.staff.includes(s.id);return(0,k.jsxs)(l.default,{testID:`notif-tick-${s.id}`,accessibilityRole:"checkbox",accessibilityState:{checked:n},onPress:()=>t({...e,staff:n?e.staff.filter(e=>e!==s.id):[...e.staff,s.id]}),style:{flexDirection:'row',alignItems:'center',gap:10,paddingVertical:6},children:[(0,k.jsx)(a.default,{style:{width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:d.colours.gold,alignItems:'center',justifyContent:'center',backgroundColor:n?'#2a2414':'transparent'},children:n?(0,k.jsx)(r.T,{size:14,colour:d.colours.gold,children:"\u2713"}):null}),(0,k.jsx)(r.T,{style:{flex:1},children:(0,h.staffLabel)({name:I(s.name),nickname:s.nickname})}),(0,k.jsx)(r.Muted,{size:12,children:'Head Chef'===s.level?'Head Chef':s.job})]},s.id)})}),(0,k.jsx)(r.Muted,{size:12,children:"If nobody above matches when it goes, send it to:"}),(0,k.jsxs)(r.Row,{wrap:!0,gap:6,children:[S.filter(e=>'on_shift'!==e).map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.groups.includes(s);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s}`,label:u.NOTIF_GROUP_LABEL[s],selected:o,onPress:()=>{const l=o?n.groups.filter(e=>e!==s):[...n.groups,s];t({...e,fallback:l.length||n.staff.length?{...n,groups:l}:void 0})}},s)}),s.map(s=>{const n=e.fallback??{staff:[],groups:[]},o=n.staff.includes(s.id);return(0,k.jsx)(r.Chip,{testID:`notif-fallback-${s.id}`,label:I(s.name),selected:o,onPress:()=>{const l=o?n.staff.filter(e=>e!==s.id):[...n.staff,s.id];t({...e,fallback:l.length||n.groups.length?{...n,staff:l}:void 0})}},s.id)})]})]})}function D({init:e,onSave:s,onCancel:o}){const[l,c]=(0,n.useState)(e),[h,p]=(0,n.useState)(!!e.dayTimes&&Object.keys(e.dayTimes).length>0),f=(0,u.validateNotif)(l),g=e=>c(t=>({...t,...e}));return(0,k.jsxs)(a.default,{testID:"notif-editor",style:{gap:8,borderWidth:1,borderColor:d.colours.accentBorder,borderRadius:12,padding:10},children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Title"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification title",testID:"notif-title",value:l.title,onChangeText:e=>g({title:e}),maxLength:60,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Message"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Notification message",testID:"notif-message",value:l.message,onChangeText:e=>g({message:e}),maxLength:160,style:T}),(0,k.jsx)(r.T,{weight:"semibold",children:"Days"}),(0,k.jsx)(r.Row,{wrap:!0,gap:6,children:v.map(e=>(0,k.jsx)(r.Chip,{testID:`notif-day-${e}`,label:u.NOTIF_DAY_NAMES[e],selected:l.days.includes(e),onPress:()=>g({days:l.days.includes(e)?l.days.filter(t=>t!==e):[...l.days,e]})},e))}),(0,k.jsxs)(r.Row,{gap:8,children:[(0,k.jsx)(r.T,{weight:"semibold",children:"Time (UK)"}),(0,k.jsx)(t.TextInput,{accessibilityLabel:"Time",testID:"notif-time",value:l.time,onChangeText:e=>g({time:e}),placeholder:"21:00",style:{...T,width:90,borderColor:(0,u.validHm)(l.time)?d.colours.hairline:d.colours.red}})]}),(0,k.jsx)(r.Toggle,{label:"A different time on some days",value:h,onChange:e=>{p(e),e||g({dayTimes:void 0})}}),h?(0,k.jsx)(r.Row,{wrap:!0,gap:8,children:v.filter(e=>l.days.includes(e)).map(e=>(0,k.jsxs)(r.Row,{gap:4,children:[(0,k.jsx)(r.T,{size:13,children:u.NOTIF_DAY_NAMES[e]}),(0,k.jsx)(t.TextInput,{accessibilityLabel:`${u.NOTIF_DAY_NAMES[e]} time`,testID:`notif-daytime-${e}`,value:l.dayTimes?.[String(e)]??'',placeholder:l.time,onChangeText:t=>{const s={...l.dayTimes??{}};t.trim()?s[String(e)]=t.trim():delete s[String(e)],g({dayTimes:s})},style:{...T,width:74}})]},e))}):null,(0,k.jsx)(L,{value:l.recipients,onChange:e=>g({recipients:e})}),(0,k.jsx)(r.T,{weight:"semibold",children:"Send by"}),(0,k.jsx)(r.Toggle,{testID:"notif-inapp",label:"In the app (gold slider, Done / Later)",value:l.sendBy.inApp,onChange:e=>g({sendBy:{...l.sendBy,inApp:e}})}),(0,k.jsx)(r.Toggle,{testID:"notif-push",label:"Phone notification (when phones are switched on)",value:l.sendBy.push,onChange:e=>g({sendBy:{...l.sendBy,push:e}})}),f?(0,k.jsx)(r.Muted,{size:13,children:f}):null,(0,k.jsxs)(r.Row,{gap:8,style:{justifyContent:'flex-end'},children:[(0,k.jsx)(r.Button,{small:!0,kind:"ghost",label:"Cancel",onPress:o}),(0,k.jsx)(r.Button,{small:!0,testID:"notif-save",label:"Save",disabled:!!f,onPress:()=>s({...l,title:l.title.trim(),message:l.message.trim(),days:[...l.days].sort()})})]})]})}function R(){const[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)('');return(0,n.useEffect)(()=>{(0,y.pushState)().then(t)},[]),e&&'unsupported'!==e?(0,k.jsxs)(a.default,{testID:"push-button",style:{gap:4},children:[(0,k.jsx)(r.Button,{small:!0,kind:'on'===e?'ghost':'secondary',testID:"push-turn-on",label:'on'===e?'Phone notifications are on for this phone \xb7 Turn off':'\ud83d\udd14 Turn on phone notifications',onPress:()=>{('on'===e?(0,y.turnOffPush)():(0,y.turnOnPush)()).then(e=>{o(e.message),(0,y.pushState)().then(t)})}}),(0,k.jsx)(r.Muted,{size:12,children:s||('ios-home-screen'===e?'iPhone: add this app to your Home Screen first (iOS 16.4 or later).':'For this phone only. Each person turns it on on their own phone.')})]}):null}const B=e=>p.useOrderLists.getState().resetSettings(e);const P=(e,t)=>g.useClockArea.getState().reset(e,t),O='https://www.foodstandards.gov.scot/publications-and-research/publications/cooksafe-manual'},1040,[796,988,34,379,402,102,794,837,1018,1019,862,1022,1023,1024,989,1041,982,1042,991,25]); __d(function(_g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getFix=function(e=1e4){const t='undefined'!=typeof navigator?navigator.geolocation:void 0;return t?new Promise(o=>{let n=!1;const c=e=>{n||(n=!0,o(e))},u=setTimeout(()=>c('timeout'),e+1500);try{t.getCurrentPosition(e=>{clearTimeout(u),c({lat:e.coords.latitude,lng:e.coords.longitude,acc:e.coords.accuracy??999})},e=>{clearTimeout(u),c(1===e.code?'denied':3===e.code?'timeout':'unavailable')},{enableHighAccuracy:!0,timeout:e,maximumAge:0})}catch{clearTimeout(u),c('unsupported')}}):Promise.resolve('unsupported')},_e.locationAllowed=async function(){try{const e=await(navigator.permissions?.query({name:'geolocation'}));return'granted'===e?.state}catch{return!1}}},1041,[]); __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.pushState=f,e.turnOnPush=async function(){const u=await f();if('ios-home-screen'===u)return{ok:!1,message:'On iPhone, add this app to your Home Screen first (Share \u203a Add to Home Screen, iOS 16.4 or later), then open it from there.'};if('unsupported'===u)return{ok:!1,message:'This browser can\u2019t get phone notifications. Try Chrome on Android, or the app from your iPhone Home Screen.'};if('blocked'===u)return{ok:!1,message:'Notifications are blocked for this app. Allow them in your phone\u2019s settings, then try again.'};const c=i.useSync.getState();if('staff'!==c.kind||!c.venueId||!c.staffRef)return{ok:!1,message:'Sign in from your personal link first.'};if('granted'!==await Notification.requestPermission())return{ok:!1,message:'You didn\u2019t allow notifications, so nothing changed.'};const p=await navigator.serviceWorker.ready,h=(await p.pushManager.getSubscription()??await p.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:s(n.VAPID_PUBLIC_KEY)})).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys?.auth)return{ok:!1,message:'Your browser didn\u2019t give a usable subscription. Try again.'};const l=(0,t.getSupabase)(),{error:y}=await l.from('push_subscriptions').upsert({venue_id:c.venueId,staff_ref:c.staffRef,app:o.APP_VARIANT,endpoint:h.endpoint,p256dh:h.keys.p256dh,auth:h.keys.auth,user_agent:navigator.userAgent.slice(0,200)},{onConflict:'user_id,endpoint'});return y?{ok:!1,message:`Couldn\u2019t save this phone: ${y.message}`}:{ok:!0,message:'Phone notifications are on for this device.'}},e.turnOffPush=async function(){const n=await(navigator.serviceWorker?.getRegistration()),i=await(n?.pushManager.getSubscription());if(!i)return{ok:!0,message:'Phone notifications are off for this device.'};const o=i.endpoint;await i.unsubscribe();try{const n=(0,t.getSupabase)();await n.from('push_subscriptions').delete().eq('endpoint',o)}catch{}return{ok:!0,message:'Phone notifications are off for this device.'}};var n=r(d[0]),t=r(d[1]),i=r(d[2]),o=r(d[3]);const s=n=>{const t=atob(n.replace(/-/g,'+').replace(/_/g,'/')+'='.repeat((4-n.length%4)%4)),i=new Uint8Array(t.length);for(let n=0;n'undefined'!=typeof navigator&&/iPhone|iPad|iPod/.test(navigator.userAgent),c=()=>'undefined'!=typeof window&&(window.matchMedia?.('(display-mode: standalone)').matches||!0===navigator.standalone);async function f(){if('undefined'==typeof window||!('serviceWorker'in navigator))return'unsupported';if(!('PushManager'in window)||'undefined'==typeof Notification)return u()&&!c()?'ios-home-screen':'unsupported';if('denied'===Notification.permission)return'blocked';const n=await navigator.serviceWorker.getRegistration();return await(n?.pushManager.getSubscription())?'on':'off'}},1042,[1043,928,982,843]); diff --git a/staff-app/admin.html b/staff-app/admin.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/admin.html +++ b/staff-app/admin.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer.html b/staff-app/customer.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer.html +++ b/staff-app/customer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage.html b/staff-app/customer/anchorage.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage.html +++ b/staff-app/customer/anchorage.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/book.html b/staff-app/customer/anchorage/book.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/book.html +++ b/staff-app/customer/anchorage/book.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/feedback.html b/staff-app/customer/anchorage/feedback.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/feedback.html +++ b/staff-app/customer/anchorage/feedback.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/gift.html b/staff-app/customer/anchorage/gift.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/gift.html +++ b/staff-app/customer/anchorage/gift.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/lost.html b/staff-app/customer/anchorage/lost.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/lost.html +++ b/staff-app/customer/anchorage/lost.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/loyalty.html b/staff-app/customer/anchorage/loyalty.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/loyalty.html +++ b/staff-app/customer/anchorage/loyalty.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/merch.html b/staff-app/customer/anchorage/merch.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/merch.html +++ b/staff-app/customer/anchorage/merch.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/offers.html b/staff-app/customer/anchorage/offers.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/offers.html +++ b/staff-app/customer/anchorage/offers.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/refer.html b/staff-app/customer/anchorage/refer.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/refer.html +++ b/staff-app/customer/anchorage/refer.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/waitlist.html b/staff-app/customer/anchorage/waitlist.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/waitlist.html +++ b/staff-app/customer/anchorage/waitlist.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/anchorage/whatson.html b/staff-app/customer/anchorage/whatson.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/anchorage/whatson.html +++ b/staff-app/customer/anchorage/whatson.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/basket.html b/staff-app/customer/basket.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/basket.html +++ b/staff-app/customer/basket.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/customer/profile.html b/staff-app/customer/profile.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/customer/profile.html +++ b/staff-app/customer/profile.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/demo.html b/staff-app/demo.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/demo.html +++ b/staff-app/demo.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/display.html b/staff-app/display.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/display.html +++ b/staff-app/display.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/index.html b/staff-app/index.html index f833894d901cdb0fb320e65e547e513528fcdde5..a4760ccbbe2a082e4ba4b504e64601bab7ffb8e2 100644 --- a/staff-app/index.html +++ b/staff-app/index.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/kitchen.html b/staff-app/kitchen.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/kitchen.html +++ b/staff-app/kitchen.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/owner.html b/staff-app/owner.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/owner.html +++ b/staff-app/owner.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/staff.html b/staff-app/staff.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/staff.html +++ b/staff-app/staff.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - + diff --git a/staff-app/sw.js b/staff-app/sw.js index 97b15a59e1776a26570b425851af7725ce7134e5..2e0309d8e100de7ec3566374ccf3a4c177236397 100644 --- a/staff-app/sw.js +++ b/staff-app/sw.js @@ -1,7 +1,7 @@ // Anchorage Staff service worker: precache the app shell so it opens offline after the first visit. -const V = "cc-staff-720627b411"; +const V = "cc-staff-f08e832750"; const BASE = "/staff-app/"; -const PRECACHE = ["/staff-app/apple-touch-icon.png", "/staff-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/staff-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/staff-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/staff-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/staff-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/staff-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/staff-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/staff-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/staff-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/staff-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/staff-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/staff-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/staff-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/staff-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/staff-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/staff-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/staff-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/staff-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/staff-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/staff-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/staff-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/staff-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/staff-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/staff-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/staff-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/staff-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/staff-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/staff-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/staff-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/staff-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/staff-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/staff-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/staff-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/staff-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/staff-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/staff-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/staff-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/staff-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/staff-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/staff-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/staff-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/staff-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/staff-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/staff-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/staff-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/staff-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/staff-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/staff-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/staff-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/staff-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/staff-app/brand-logo.png", "/staff-app/favicon.ico", "/staff-app/icon-192.png", "/staff-app/icon-512.png", "/staff-app/icon-maskable-192.png", "/staff-app/icon-maskable-512.png", "/staff-app/manifest.webmanifest", "/staff-app/index.html", "/staff-app/_expo/static/js/web/bundle.js?v=720627b411989b250d7dc2859357bf5c20d50b6075e0789ba7d1f7464596b215"]; +const PRECACHE = ["/staff-app/apple-touch-icon.png", "/staff-app/assets/assets/brand/3idiots-hero.e5dfd53739f05086b1956e72d585a66a.png", "/staff-app/assets/assets/brand/3idiots.df4a76d2130f0e5b0042f06a8c88693a.png", "/staff-app/assets/assets/brand/abbotsford-hero.78fcb8ee06ee22c4ca659c9254db7512.png", "/staff-app/assets/assets/brand/abbotsford.b26602bba5ce4969733c5422a45ad053.png", "/staff-app/assets/assets/brand/anchorage-hero.0450b828e4f9c1f4456240096598f6f5.png", "/staff-app/assets/assets/brand/anchorage.fea5ce2f6fd18bf2950aa21c0980ed8e.png", "/staff-app/assets/assets/brand/brae.8de9e89ac30966c6669de990370d8e40.png", "/staff-app/assets/assets/brand/cecchinis-hero.f77780fcc94fd668cf35d66d6dc52d81.png", "/staff-app/assets/assets/brand/cecchinis.ebf752fef363247848ae7c0d91938765.png", "/staff-app/assets/assets/brand/drunkencoo-hero.65c21c4da9e466cf4bffc969639a1427.png", "/staff-app/assets/assets/brand/drunkencoo.f6d92af3b14e4205a3deaf4434754c51.png", "/staff-app/assets/assets/brand/greenside-hero.1caec5a6cb939434cccb5f3a613b50f8.png", "/staff-app/assets/assets/brand/greenside.9d1556db97dcb903a3c57e2063ee2255.png", "/staff-app/assets/assets/brand/kirkmichael-hero.63b13cde7fd82eb622622b39ac80c394.png", "/staff-app/assets/assets/brand/kirkmichael.63b13cde7fd82eb622622b39ac80c394.png", "/staff-app/assets/assets/brand/kirkton-hero.9d0837b292c2f4f30f4521d806bb28c3.png", "/staff-app/assets/assets/brand/kirkton.bcf8d846df4861474d224a7a77f498fb.png", "/staff-app/assets/assets/brand/mrbasrais-hero.4ce74641cfcf52d099157c84005b9d2a.png", "/staff-app/assets/assets/brand/mrbasrais.7cc4086dd12ace82529795f1c9f8c900.png", "/staff-app/assets/assets/brand/pizzaioli-hero.1896657c08264cefb49b401891d5448d.png", "/staff-app/assets/assets/brand/pizzaioli.db8c000b62ee407121aa8b90ce45e170.png", "/staff-app/assets/assets/brand/rupeeroom-hero.969fa372add526aaacf3a6c009b8ac92.png", "/staff-app/assets/assets/brand/rupeeroom.689e6fb536dc0845eeb174a1ec7bd346.png", "/staff-app/assets/assets/brand/saltmarsh.85a6a65732635e5148478d743d9ca884.png", "/staff-app/assets/assets/brand/smokinggoat-hero.0588f17ef0eed7f757f22916cd4d37db.png", "/staff-app/assets/assets/brand/smokinggoat.20a3a1970596ab43c5d6468d4ed549a7.png", "/staff-app/assets/assets/brand/souters.f4c58d9349b6e1700fe5abcc9e9b665c.png", "/staff-app/assets/assets/brand/wildings-hero-logo-text.4661e4b935726f2511f9c17a1567c89a.png", "/staff-app/assets/assets/brand/wildings.076f4fcd06d19a0af0205c410f461b14.png", "/staff-app/assets/assets/brand/williewastles-hero.b9d53d27b66f903b5618a7177b2ffad4.png", "/staff-app/assets/assets/brand/williewastles.055a77893ced99bf3a6c5402ba5baac6.png", "/staff-app/assets/assets/brand/yasmins-hero.a5aef62e37dfcecbe0afc056186f4ad9.png", "/staff-app/assets/assets/brand/yasmins.8482602e9f0a965655924835625cb02b.png", "/staff-app/assets/assets/recipes/fishsupper.1609c58319e1e8721f5c639049fb054e.jpg", "/staff-app/assets/assets/recipes/lobster.2fb3485c8e372972099259017358c1b8.jpg", "/staff-app/assets/assets/recipes/moules.a4f342fc7e7fb62c8a0b5c1678bbea3f.jpg", "/staff-app/assets/assets/recipes/skink.4ce7b7c676f9cdcd0a060eda46f5a00e.jpg", "/staff-app/assets/assets/recipes/stp.1061ced765efdcafff2554adc3fc7113.jpg", "/staff-app/assets/assets/specials/sample-chalkboard.e7b4e4450a8483d4219bc6a214158d8f.jpg", "/staff-app/assets/node_modules/@expo-google-fonts/poppins/400Regular/Poppins_400Regular.093ee89be9ede30383f39a899c485a82.ttf", "/staff-app/assets/node_modules/@expo-google-fonts/poppins/500Medium/Poppins_500Medium.bf59c687bc6d3a70204d3944082c5cc0.ttf", "/staff-app/assets/node_modules/@expo-google-fonts/poppins/600SemiBold/Poppins_600SemiBold.6f1520d107205975713ba09df778f93f.ttf", "/staff-app/assets/node_modules/@expo-google-fonts/poppins/700Bold/Poppins_700Bold.08c20a487911694291bd8c5de41315ad.ttf", "/staff-app/assets/node_modules/expo-router/assets/arrow_down.017bc6ba3fc25503e5eb5e53826d48a8.png", "/staff-app/assets/node_modules/expo-router/assets/error.d1ea1496f9057eb392d5bbf3732a61b7.png", "/staff-app/assets/node_modules/expo-router/assets/file.19eeb73b9593a38f8e9f418337fc7d10.png", "/staff-app/assets/node_modules/expo-router/assets/forward.d8b800c443b8972542883e0b9de2bdc6.png", "/staff-app/assets/node_modules/expo-router/assets/pkg.ab19f4cbc543357183a20571f68380a3.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@2x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@3x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55@4x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@2x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@3x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/close-icon.808e1b1b9b53114ec2838071a7e6daa7@4x.png", "/staff-app/assets/node_modules/expo-router/assets/react-navigation/elements/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png", "/staff-app/assets/node_modules/expo-router/assets/sitemap.412dd9275b6b48ad28f5e3d81bb1f626.png", "/staff-app/assets/node_modules/expo-router/assets/unmatched.20e71bdf79e3a97bf55fd9e164041578.png", "/staff-app/brand-logo.png", "/staff-app/favicon.ico", "/staff-app/icon-192.png", "/staff-app/icon-512.png", "/staff-app/icon-maskable-192.png", "/staff-app/icon-maskable-512.png", "/staff-app/manifest.webmanifest", "/staff-app/index.html", "/staff-app/_expo/static/js/web/bundle.js?v=f08e8327500091035320a86ea1b2b3cd1595d201eb2472674c0a8bc9d96410c2"]; // Hugging Face serves large files (fonts) through a redirect to its CDN. Browsers refuse to hand a *redirected* cached // response to a page, so store a plain copy instead (otherwise fonts, and so the app, fail to load offline). const plain = r => r.redirected ? r.blob().then(b => new Response(b, { status: 200, headers: { 'Content-Type': r.headers.get('Content-Type') || b.type || 'application/octet-stream' } })) : Promise.resolve(r); diff --git a/staff-app/team.html b/staff-app/team.html index 5b2f7567cdbad664120da1b03abf4897dbc56a76..99c76dcd3e5a13f2e6d160d0857cf67622d95f64 100644 --- a/staff-app/team.html +++ b/staff-app/team.html @@ -96,5 +96,5 @@ function ccWatch(r){if(r.waiting&&navigator.serviceWorker.controller)ccShowUpdat }, 1000); })(); - +