Free javascript Hosting


zietsman-chunk.js

Uploaded on Dec 29 2021 05:21 by currunite

(this.webpackJsonp = this.webpackJsonp || []).push([[0], {
1081: function(e, t, n) {
e.exports = n.p + "static/media/snapscan.f06a3226.png"
},
1082: function(e, t, n) {
e.exports = n.p + "static/media/zapper.14796ede.png"
},
1083: function(e, t, n) {
e.exports = n.p + "static/media/bank-card.6a5aa6f4.png"
},
1084: function(e, t, n) {
e.exports = n.p + "static/media/airdoshpay.80d7983b.png"
},
1235: function(e, t, n) {
var a = {
"./af": 423,
"./af.js": 423,
"./ar": 424,
"./ar-dz": 425,
"./ar-dz.js": 425,
"./ar-kw": 426,
"./ar-kw.js": 426,
"./ar-ly": 427,
"./ar-ly.js": 427,
"./ar-ma": 428,
"./ar-ma.js": 428,
"./ar-sa": 429,
"./ar-sa.js": 429,
"./ar-tn": 430,
"./ar-tn.js": 430,
"./ar.js": 424,
"./az": 431,
"./az.js": 431,
"./be": 432,
"./be.js": 432,
"./bg": 433,
"./bg.js": 433,
"./bm": 434,
"./bm.js": 434,
"./bn": 435,
"./bn-bd": 436,
"./bn-bd.js": 436,
"./bn.js": 435,
"./bo": 437,
"./bo.js": 437,
"./br": 438,
"./br.js": 438,
"./bs": 439,
"./bs.js": 439,
"./ca": 440,
"./ca.js": 440,
"./cs": 441,
"./cs.js": 441,
"./cv": 442,
"./cv.js": 442,
"./cy": 443,
"./cy.js": 443,
"./da": 444,
"./da.js": 444,
"./de": 445,
"./de-at": 446,
"./de-at.js": 446,
"./de-ch": 447,
"./de-ch.js": 447,
"./de.js": 445,
"./dv": 448,
"./dv.js": 448,
"./el": 449,
"./el.js": 449,
"./en-au": 450,
"./en-au.js": 450,
"./en-ca": 451,
"./en-ca.js": 451,
"./en-gb": 452,
"./en-gb.js": 452,
"./en-ie": 453,
"./en-ie.js": 453,
"./en-il": 454,
"./en-il.js": 454,
"./en-in": 455,
"./en-in.js": 455,
"./en-nz": 456,
"./en-nz.js": 456,
"./en-sg": 457,
"./en-sg.js": 457,
"./eo": 458,
"./eo.js": 458,
"./es": 459,
"./es-do": 460,
"./es-do.js": 460,
"./es-mx": 461,
"./es-mx.js": 461,
"./es-us": 462,
"./es-us.js": 462,
"./es.js": 459,
"./et": 463,
"./et.js": 463,
"./eu": 464,
"./eu.js": 464,
"./fa": 465,
"./fa.js": 465,
"./fi": 466,
"./fi.js": 466,
"./fil": 467,
"./fil.js": 467,
"./fo": 468,
"./fo.js": 468,
"./fr": 469,
"./fr-ca": 470,
"./fr-ca.js": 470,
"./fr-ch": 471,
"./fr-ch.js": 471,
"./fr.js": 469,
"./fy": 472,
"./fy.js": 472,
"./ga": 473,
"./ga.js": 473,
"./gd": 474,
"./gd.js": 474,
"./gl": 475,
"./gl.js": 475,
"./gom-deva": 476,
"./gom-deva.js": 476,
"./gom-latn": 477,
"./gom-latn.js": 477,
"./gu": 478,
"./gu.js": 478,
"./he": 479,
"./he.js": 479,
"./hi": 480,
"./hi.js": 480,
"./hr": 481,
"./hr.js": 481,
"./hu": 482,
"./hu.js": 482,
"./hy-am": 483,
"./hy-am.js": 483,
"./id": 484,
"./id.js": 484,
"./is": 485,
"./is.js": 485,
"./it": 486,
"./it-ch": 487,
"./it-ch.js": 487,
"./it.js": 486,
"./ja": 488,
"./ja.js": 488,
"./jv": 489,
"./jv.js": 489,
"./ka": 490,
"./ka.js": 490,
"./kk": 491,
"./kk.js": 491,
"./km": 492,
"./km.js": 492,
"./kn": 493,
"./kn.js": 493,
"./ko": 494,
"./ko.js": 494,
"./ku": 495,
"./ku.js": 495,
"./ky": 496,
"./ky.js": 496,
"./lb": 497,
"./lb.js": 497,
"./lo": 498,
"./lo.js": 498,
"./lt": 499,
"./lt.js": 499,
"./lv": 500,
"./lv.js": 500,
"./me": 501,
"./me.js": 501,
"./mi": 502,
"./mi.js": 502,
"./mk": 503,
"./mk.js": 503,
"./ml": 504,
"./ml.js": 504,
"./mn": 505,
"./mn.js": 505,
"./mr": 506,
"./mr.js": 506,
"./ms": 507,
"./ms-my": 508,
"./ms-my.js": 508,
"./ms.js": 507,
"./mt": 509,
"./mt.js": 509,
"./my": 510,
"./my.js": 510,
"./nb": 511,
"./nb.js": 511,
"./ne": 512,
"./ne.js": 512,
"./nl": 513,
"./nl-be": 514,
"./nl-be.js": 514,
"./nl.js": 513,
"./nn": 515,
"./nn.js": 515,
"./oc-lnc": 516,
"./oc-lnc.js": 516,
"./pa-in": 517,
"./pa-in.js": 517,
"./pl": 518,
"./pl.js": 518,
"./pt": 519,
"./pt-br": 520,
"./pt-br.js": 520,
"./pt.js": 519,
"./ro": 521,
"./ro.js": 521,
"./ru": 522,
"./ru.js": 522,
"./sd": 523,
"./sd.js": 523,
"./se": 524,
"./se.js": 524,
"./si": 525,
"./si.js": 525,
"./sk": 526,
"./sk.js": 526,
"./sl": 527,
"./sl.js": 527,
"./sq": 528,
"./sq.js": 528,
"./sr": 529,
"./sr-cyrl": 530,
"./sr-cyrl.js": 530,
"./sr.js": 529,
"./ss": 531,
"./ss.js": 531,
"./sv": 532,
"./sv.js": 532,
"./sw": 533,
"./sw.js": 533,
"./ta": 534,
"./ta.js": 534,
"./te": 535,
"./te.js": 535,
"./tet": 536,
"./tet.js": 536,
"./tg": 537,
"./tg.js": 537,
"./th": 538,
"./th.js": 538,
"./tk": 539,
"./tk.js": 539,
"./tl-ph": 540,
"./tl-ph.js": 540,
"./tlh": 541,
"./tlh.js": 541,
"./tr": 542,
"./tr.js": 542,
"./tzl": 543,
"./tzl.js": 543,
"./tzm": 544,
"./tzm-latn": 545,
"./tzm-latn.js": 545,
"./tzm.js": 544,
"./ug-cn": 546,
"./ug-cn.js": 546,
"./uk": 547,
"./uk.js": 547,
"./ur": 548,
"./ur.js": 548,
"./uz": 549,
"./uz-latn": 550,
"./uz-latn.js": 550,
"./uz.js": 549,
"./vi": 551,
"./vi.js": 551,
"./x-pseudo": 552,
"./x-pseudo.js": 552,
"./yo": 553,
"./yo.js": 553,
"./zh-cn": 554,
"./zh-cn.js": 554,
"./zh-hk": 555,
"./zh-hk.js": 555,
"./zh-mo": 556,
"./zh-mo.js": 556,
"./zh-tw": 557,
"./zh-tw.js": 557
};
function r(e) {
var t = o(e);
return n(t)
}
function o(e) {
if (!n.o(a, e)) {
var t = new Error("Cannot find module '" + e + "'");
throw t.code = "MODULE_NOT_FOUND", t
}
return a[e]
}
r.keys = function() {
return Object.keys(a)
},
r.resolve = o,
e.exports = r,
r.id = 1235
},
1241: function(e, t, n) {
var a = n(350),
r = n(1242);
"string" === typeof (r = r.__esModule ? r.default : r) && (r = [[e.i, r, ""]]);
var o = {
insert: "head",
singleton: !1
};
a(r, o);
e.exports = r.locals || {}
},
1242: function(e, t, n) {
(t = n(351)(!1)).push([e.i, "apple-pay-button {\n --apple-pay-button-width: 150px;\n --apple-pay-button-height: 30px;\n --apple-pay-button-border-radius: 3px;\n --apple-pay-button-padding: 0px 0px;\n --apple-pay-button-box-sizing: border-box;\n}\n\n.yellow {\n background-color: yellow;\n width: 200px;\n height: 50px;\n}\n", ""]),
e.exports = t
},
1265: function(e, t) {
e.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZlcnNpb249IjEiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiNGRkZGRkYiPjxwYXRoIGQ9Ik0xOC41LDEwLjJjMCwyLjU3LTIuMSw1Ljc5LTYuMTYsOS41MUwxMiwyMC4wMWwtMC4zNC0wLjMxQzcuNiwxNS45OSw1LjUsMTIuNzcsNS41LDEwLjIgYzAtMy44NCwyLjgyLTYuNyw2LjUtNi43UzE4LjUsNi4zNSwxOC41LDEwLjJ6IiBmaWxsLW9wYWNpdHk9Ii4zIi8+PHBhdGggZD0iTTEyLDJjNC4yLDAsOCwzLjIyLDgsOC4yYzAsMy4zMi0yLjY3LDcuMjUtOCwxMS44Yy01LjMzLTQuNTUtOC04LjQ4LTgtMTEuOEM0LDUuMjIsNy44LDIsMTIsMnogTTE4LDEwLjIgQzE4LDYuNTcsMTUuMzUsNCwxMiw0cy02LDIuNTctNiw2LjJjMCwyLjM0LDEuOTUsNS40NCw2LDkuMTRDMTYuMDUsMTUuNjQsMTgsMTIuNTQsMTgsMTAuMnogTTEyLDEyYy0xLjEsMC0yLTAuOS0yLTJzMC45LTIsMi0yIHMyLDAuOSwyLDJTMTMuMSwxMiwxMiwxMnoiLz48cGF0aCBkPSJNMCwwaDI0djI0SDBWMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4="
},
1266: function(e, t) {
e.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDVINXYyaDE0eiIgb3BhY2l0eT0iLjMiLz48cGF0aCBkPSJNNSAyMWgxNGMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yaC0xVjFoLTJ2Mkg4VjFINnYySDVjLTEuMTEgMC0xLjk5LjktMS45OSAyTDMgMTljMCAxLjEuODkgMiAyIDJ6TTUgN1Y1aDE0djJINXptMCAyaDE0djEwSDVWOXptNyAzaDV2NWgtNXoiLz48L3N2Zz4="
},
1267: function(e, t) {
e.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iI0ZGRkZGRiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDRjLTQuNDIgMC04IDMuNTgtOCA4czMuNTggOCA4IDggOC0zLjU4IDgtOC0zLjU4LTgtOC04em00LjI1IDEyLjE1TDExIDEzVjdoMS41djUuMjVsNC41IDIuNjctLjc1IDEuMjN6IiBvcGFjaXR5PSIuMyIvPjxwYXRoIGQ9Ik0xMS45OSAyQzYuNDcgMiAyIDYuNDggMiAxMnM0LjQ3IDEwIDkuOTkgMTBDMTcuNTIgMjIgMjIgMTcuNTIgMjIgMTJTMTcuNTIgMiAxMS45OSAyek0xMiAyMGMtNC40MiAwLTgtMy41OC04LThzMy41OC04IDgtOCA4IDMuNTggOCA4LTMuNTggOC04IDh6bS41LTEzSDExdjZsNS4yNSAzLjE1Ljc1LTEuMjMtNC41LTIuNjd6Ii8+PC9zdmc+"
},
1299: function(e, t, n) {
"use strict";
n.r(t);
var a = n(1316),
r = n(589),
o = n.n(r),
i = n(25),
l = n.n(i),
s = n(8),
c = n.n(s),
u = n(7),
d = n.n(u),
m = n(210),
g = n(0),
h = n.n(g),
p = n(661),
f = n(46),
y = n(19),
b = n(587),
w = g.createRef();
function E(e, t) {
var n;
null == (n = w.current) || n.navigate(e, t)
}
function v() {
var e;
null == (e = w.current) || e.goBack()
}
var C = n(126),
j = n(21),
S = n(305),
O = Boolean("localhost" === window.location.hostname || "[::1]" === window.location.hostname || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
function I(e, t) {
navigator.serviceWorker.register(e).then((function(e) {
e.onupdatefound = function() {
var n = e.installing;
null != n && (n.onstatechange = function() {
"installed" === n.state && (navigator.serviceWorker.controller ? (console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."), t && t.onUpdate && t.onUpdate(e)) : (console.log("Content is cached for offline use."), t && t.onSuccess && t.onSuccess(e)))
})
}
})).catch((function(e) {
console.error("Error during service worker registration:", e)
}))
}
var x = n(247),
T = n(5),
P = n.n(T),
M = n(12),
k = n(36);
function z(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
var D = k.a.get("window"),
R = function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? z(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : z(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}({}, {
bg: "white",
bg1: "rgba(255,255,255,0.1)",
bg2: "rgba(255,255,255,0.05)",
textSolid: "black",
balance: "#3CD7C4",
primary: "#f6f6f6",
secondary: "#9fa5c0",
primaryLight: "#272220",
primaryDark: "#eaeaea",
primaryOpaque: function(e) {
return "rgba(113, 113, 113, " + e + ")"
},
primaryText: "#2E3E5C",
labelText: "#FFFFFF",
inactive: "rgba(0,0,0,0.1)",
highlight: "#539bf8",
alert: "#FF756A",
success: "#39F787",
notice: "#FFBD00",
pay: "#38bbb1",
graydient: ["#D8D8D8", "transparent"],
gradientSuccess: ["#29E3BB", "#037CBA"],
gradientAlert: ["#FCAB26", "#EA4954"],
gradient1: ["#E77900", "#AE001F"],
shade1: "#EEEEEE",
shade2: "#D8D8D8",
shade3: "#B6B6B6",
shade4: "#A3A3A3"
}),
L = {
primary: M.a.select({
ios: "Gotham Rounded",
android: "gothamrounded"
}),
secondary: M.a.select({
ios: "Gotham Rounded",
android: "gothamrounded"
})
},
N = n(251),
A = n(595),
_ = "logging";
function B(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function W(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? B(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : B(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var U = {
globalInitialising: !0,
loading: !1,
authModal: !1,
emailAuthModal: !1,
authLoadingModal: !1,
authError: null
},
V = function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : U,
t = arguments.length > 1 ? arguments[1] : void 0;
switch (t.type) {
case "global_initialising":
return W(W({}, e), {}, {
globalInitialising: t.bool
});
case _:
return W(W({}, e), {}, {
loading: t.bool
});
case "show_auth_modal":
return W(W({}, e), {}, {
authModal: t.bool
});
case "show_email_auth_modal":
return W(W({}, e), {}, {
emailAuthModal: t.bool
});
case "show_auth_loading_modal":
return W(W({}, e), {}, {
authLoadingModal: t.bool
});
case "set_auth_error":
return W(W({}, e), {}, {
authError: t.err
});
default:
return e
}
};
function Y(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function H(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? Y(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Y(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var F = {
loading: !1,
user: null,
parsedCelllNo: "",
userPasses: [],
spinnerBalance: !1
},
Z = function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : F,
t = arguments.length > 1 ? arguments[1] : void 0;
switch (t.type) {
case _:
return H(H({}, e), {}, {
loading: !0
});
case "new_user_created_success":
case "found_user":
return H(H({}, e), {}, {
user: t.payload
});
case "user_passes_updated":
return H(H({}, e), {}, {
userPasses: t.purchasedItems.slice()
});
case "show_balance_spinner":
return H(H({}, e), {}, {
spinnerBalance: t.bool
});
case "parsed_cellno_success":
return H(H({}, e), {}, {
parsedCelllNo: t.cellNo
});
default:
return e
}
};
function G(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function q(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? G(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : G(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var Q = {
loading: !1,
imagesLoading: !0,
showCartModal: !1,
showPaymentProcessing: !1,
showPurchaseInProgress: !1,
showAltPayOptionsModal: !1,
paymentReceived: !1,
showTopUpInProgress: !1,
topUpDisplayAmount: 0,
topUpReceived: !1,
products: [],
product: {},
subCart: [],
productList: [],
imageCollection: [],
organiser: {},
showPendingPaymentMessage: !1,
pendingPaymentMessage: "Update message to show when a payment is pending, and purchased items are being processed"
},
J = function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Q,
t = arguments.length > 1 ? arguments[1] : void 0;
switch (t.type) {
case _:
return q(q({}, e), {}, {
loading: !0
});
case "pass_landed":
return q(q({}, e), {}, {
showPaymentProcessing: t.bool
});
case "images_loaded":
return q(q({}, e), {}, {
imagesLoading: t.payload
});
case "add_to_subcart_success":
return e.subCart.push(t.payload), q(q({}, e), {}, {
subCart: e.subCart.slice()
});
case "update_subcart_success":
return q(q({}, e), {}, {
subCart: t.payload.slice()
});
case "show_in_progress":
return q(q({}, e), {}, {
showPurchaseInProgress: t.bool
});
case "show_cart":
return q(q({}, e), {}, {
showCartModal: t.bool
});
case "show_alt_pay_options":
return q(q({}, e), {}, {
showAltPayOptionsModal: t.bool
});
case "fetch_events_success":
return q(q({}, e), {}, {
products: t.fetchedEvents
});
case "fetch_event_organiser_success":
return q(q({}, e), {}, {
organiser: t.organiserObj
});
case "fetch_events_products_success":
return q(q({}, e), {}, {
productList: t.eventProducts
});
case "fetch_events_images_success":
return q(q({}, e), {}, {
imageCollection: t.eventImages
});
case "inject_event":
return e.products.push(t.payload), q({}, e);
case "payment_received_ticket":
return q(q({}, e), {}, {
paymentReceived: !0,
subCart: [],
showPaymentProcessing: !0
});
case "show_in_progress_topup":
return q(q({}, e), {}, {
showTopUpInProgress: t.bool,
topUpDisplayAmount: t.topUpDisplayAmount
});
case "payment_received_topup":
return q(q({}, e), {}, {
topUpReceived: !0,
topUpDisplayAmount: 0
});
case "show_payment_pending_widget":
return q(q({}, e), {}, {
showPendingPaymentMessage: t.bool,
pendingPaymentMessage: t.message,
subCart: []
});
default:
return e
}
};
function X(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function K(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? X(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : X(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var $ = {
loading: !1,
passes: []
},
ee = function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : $,
t = arguments.length > 1 ? arguments[1] : void 0;
switch (t.type) {
case _:
return K(K({}, e), {}, {
loading: !0
});
default:
return e
}
};
function te(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function ne(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? te(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : te(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var ae = {
loading: !1,
gLoading: !1,
isQless: !1,
isCashless: !0,
isPrivate: !1,
inviteVerified: !0,
isEmailPasses: !1,
theme: {
backgroundImage: n(709),
colors: {}
},
privacy_policy: "",
tag_price: 20,
showLoadNewContent: !1,
carouselData: [{
id: "expressOrder",
title: "Express order",
description: "Skip the queue, order from your phone",
image: "https://www.enableds.com/products/appkit/images/pictures/7t.jpg"
}, {
id: 2,
title: "Discover",
description: "Explore events and offerings available",
image: "https://www.enableds.com/products/appkit/images/pictures/6t.jpg"
}, {
id: 3,
title: "Special Offers",
description: "View all deals available to you",
image: "https://www.enableds.com/products/appkit/images/pictures/4t.jpg"
}, {
id: 4,
title: "Find your friends",
description: "See what your friends are buying",
image: "https://www.enableds.com/products/appkit/images/pictures/3t.jpg"
}]
},
re = function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ae,
t = arguments.length > 1 ? arguments[1] : void 0;
switch (t.type) {
case _:
return ne(ne({}, e), {}, {
loading: !0
});
case "set_global_loading":
return ne(ne({}, e), {}, {
gLoading: t.bool
});
case "toggle_invite_status_success":
return ne(ne({}, e), {}, {
inviteVerified: t.payload
});
case "update_theme_image":
return e.theme.backgroundImage = t.payload, ne({}, e);
case "set_show_new_content":
return ne(ne({}, e), {}, {
showLoadNewContent: t.bool
});
case "update_refund_policy":
return ne(ne({}, e), {}, {
privacy_policy: t.payload
});
default:
return e
}
};
function oe(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function ie(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? oe(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : oe(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var le = {
loading: !1,
barProducts: []
},
se = function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : le,
t = arguments.length > 1 ? arguments[1] : void 0;
switch (t.type) {
case _:
return ie(ie({}, e), {}, {
loading: !0
});
case "fetch_bar_items_success":
return ie(ie({}, e), {}, {
barProducts: t.payload
});
default:
return e
}
};
function ce(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function ue(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? ce(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ce(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var de = {
loading: !1,
tagLinkSuccessModal: !1,
tagLinkFailModal: !1,
showTermsModal: !1
},
me = function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : de,
t = arguments.length > 1 ? arguments[1] : void 0;
switch (t.type) {
case _:
return ue(ue({}, e), {}, {
loading: t.bool
});
case "tag_link_success_modal":
return ue(ue({}, e), {}, {
tagLinkSuccessModal: t.bool
});
case "tag_link_fail_modal":
return ue(ue({}, e), {}, {
tagLinkFailModal: t.bool
});
case "set_show_terms_modal":
return ue(ue({}, e), {}, {
showTermsModal: t.bool
});
default:
return e
}
};
function ge(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function he(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? ge(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ge(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var pe = {
loading: !1,
dashboard: {}
},
fe = function() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : pe,
t = arguments.length > 1 ? arguments[1] : void 0;
switch (t.type) {
case _:
return he(he({}, e), {}, {
loading: !0
});
case "dashboard_fetch_success":
return he(he({}, e), {}, {
dashboard: t.payload
});
default:
return e
}
},
ye = Object(N.b)({
auth: V,
users: Z,
store: J,
pass: ee,
config: re,
seatOrder: se,
modal: me,
dashboard: fe
}),
be = function() {
return Object(N.c)(ye, {}, Object(N.a)(A.a))
},
we = n(4),
Ee = n.n(we),
ve = n(1),
Ce = n(23),
je = n(99),
Se = (n(588), n(710), n(1300), n(326), n(711), Object({
NODE_ENV: "production",
PUBLIC_URL: "",
APP_MANIFEST: {
name: "Airdosh",
description: "Your event wallet",
icon: "https://firebasestorage.googleapis.com/v0/b/cashless-c137a.appspot.com/o/adicon.png?alt=media&token=0672e5ae-c70c-4d15-b945-eaa7abf868ed",
notification: {
icon: "https://firebasestorage.googleapis.com/v0/b/cashless-c137a.appspot.com/o/adicon.png?alt=media&token=0672e5ae-c70c-4d15-b945-eaa7abf868ed"
},
icons: [{
src: "./src/assets/images/adicon.png",
sizes: "192x192",
type: "image/png"
}],
splash: {
image: "./src/assets/images/splash.png",
resizeMode: "contain",
backgroundColor: "#FFFFFF"
},
version: "1.0.2",
extra: {
devConfig: {
apiKey: "AIzaSyDYvjAn-5qCKEux4-A0sg3AZ8gY6KOjJIY",
authDomain: "dev-cashless.firebaseapp.com",
projectId: "dev-cashless",
storageBucket: "dev-cashless.appspot.com",
messagingSenderId: "580552190677",
appId: "1:580552190677:web:f06185dfa903d758c4905c",
measurementId: "G-BXCVPFSFPE"
},
prodConfig: {
apiKey: "AIzaSyAcnnMpu4Iohms4hjxAgFSd8DSChF1-f-k",
authDomain: "cashless-c137a.firebaseapp.com",
databaseURL: "https://cashless-c137a.firebaseio.com",
projectId: "cashless-c137a",
storageBucket: "cashless-c137a.appspot.com",
messagingSenderId: "86368413118",
appId: "1:86368413118:web:42e01a6a683dfba3ac05ef",
measurementId: "G-2C8J9B5RFX"
},
merchId: "w0BABvEj"
},
_internal: {
isDebug: !1,
projectRoot: "/Users/jacodewet/Dev/cashless-wallet-mvp",
dynamicConfigPath: "/Users/jacodewet/Dev/cashless-wallet-mvp/app.config.js",
staticConfigPath: "/Users/jacodewet/Dev/cashless-wallet-mvp/app.json",
packageJsonPath: "/Users/jacodewet/Dev/cashless-wallet-mvp/package.json"
},
slug: "airdosh",
sdkVersion: "39.0.0",
platforms: ["ios", "android", "web"],
web: {}
}
})),
Oe = (Se.NODE_ENV, Se.APP_MANIFEST.extra),
Ie = (Oe.devConfig, Oe.prodConfig);
je.a.initializeApp(Ie);
var xe = je.a.firestore(),
Te = je.a.auth(),
Pe = je.a.functions();
je.a.firestore().enablePersistence({
experimentalTabSynchronization: !0
}).then((function() {
return console.log("Persisting data")
})).catch((function(e) {
"failed-precondition" == e.code || e.code
}));
var Me = n(50),
ke = n.n(Me),
ze = n(1314),
De = n(22),
Re = n(1312),
Le = n(1311),
Ne = function(e) {
var t = Object(Le.a)({
"inter-black": n(828)
}),
a = c()(t, 1)[0],
r = e.numberOfLines;
e.ellipsizeMode;
return a ? h.a.createElement(y.a, {
style: [{
fontFamily: "inter-black",
fontSize: 30,
letterSpacing: -1
}, e.style],
numberOfLines: r,
ellipsizeMode: "tail"
}, e.children) : h.a.createElement(Re.a, null)
},
Ae = function(e) {
var t = e.numberOfLines,
a = (e.ellipsizeMode, Object(Le.a)({
"inter-bold": n(833)
}));
return c()(a, 1)[0] ? h.a.createElement(y.a, {
numberOfLines: t,
ellipsizeMode: "tail",
style: [{
fontFamily: "inter-bold",
fontSize: 16,
letterSpacing: -.8
}, e.style]
}, e.children) : h.a.createElement(Re.a, null)
};
var _e = n(51),
Be = n(48),
We = n(611),
Ue = n(628),
Ve = n(1318),
Ye = n(2);
var He = Object(De.d)((function(e) {
e.theme;
var t = e.count,
n = e.style;
return h.a.createElement(ve.a, {
style: [Fe.container, n]
}, h.a.createElement(Ae, {
style: {
color: "white",
fontSize: 10
}
}, t))
})),
Fe = Ye.a.create({
container: {
position: "absolute",
right: 10,
top: 10,
borderRadius: 30,
backgroundColor: "#FF5842",
padding: 3,
paddingHorizontal: 7,
alignItems: "center",
justifyContent: "center"
}
}),
Ze = (n(130), function(e) {
var t = e.style,
n = e.title,
a = e.headerRef,
r = e.onShowCartPress,
o = e.onBackPress,
i = e.subCart,
l = e.replaceIcon;
return h.a.createElement(_e.a, {
ref: a,
className: "sticky",
style: t
}, h.a.createElement(Ve.a, {
intensity: 10
}, h.a.createElement(Be.a, {
activeOpacity: .9,
underlayColor: "#DDDDDD",
onPress: o,
style: {
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
}
}, h.a.createElement(ve.a, {
style: {
width: "100%",
paddingHorizontal: 10,
backgroundColor: R.bg,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(ve.a, {
style: {
padding: 20
}
}, l ? l() : h.a.createElement(We.a, {
name: "ios-arrow-back",
size: 24,
color: R.textSolid
})), h.a.createElement(Ne, {
numberOfLines: 1,
ellipsizeMode: "tail",
style: {
marginHorizontal: 10,
paddingHorizontal: 10,
fontSize: 20,
alignText: "center",
color: R.textSolid
}
}, n), i && 0 !== (null == i ? void 0 : i.length) ? h.a.createElement(ve.a, null, h.a.createElement(Ue.a, {
name: "shopping-cart",
size: 24,
color: R.textSolid,
style: {
padding: 20,
paddingHorizontal: 25
},
onPress: r
}), h.a.createElement(He, {
count: i && i.reduce((function(e, t) {
return e + t.qty
}), 0)
})) : h.a.createElement(ve.a, {
style: {
width: 60
}
})))))
}),
Ge = n(18),
qe = n(34),
Qe = function(e) {
var t = Object(Le.a)({
"inter-semiB": n(835)
}),
a = c()(t, 1)[0],
r = e.style,
o = (e.ellipsizeMode, e.numberOfLines);
return a ? h.a.createElement(y.a, {
numberOfLines: o,
ellipsizeMode: "tail",
style: [{
fontFamily: "inter-semiB",
fontSize: 16,
letterSpacing: -1
}, r]
}, e.children) : h.a.createElement(Re.a, null)
};
function Je(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function Xe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? Je(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Je(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var Ke = new Date,
$e = xe.collection("customers"),
et = xe.collection("cashless_refunds");
var tt = function(e) {
return {
type: "found_user",
payload: e
}
},
nt = function(e) {
var t = e.cellphoneNumber,
n = void 0 === t ? null : t,
a = e.email,
r = void 0 === a ? null : a,
o = e.uid;
return function(e) {
var t = {
_id: o,
cellphoneNumber: n,
email: r,
activeTagId: "",
credit: 0,
createdAt: new Date
};
$e.doc(t._id).set(t).then((function() {
e({
type: "found_user",
payload: t
})
}))
}
},
at = function(e, t) {
var n = [];
$e.doc(t).collection("wallet").get().then((function(t) {
t.docChanges().forEach((function(e) {
n.push(e.doc.data())
})),
e({
type: "user_passes_updated",
purchasedItems: n
})
}))
},
rt = function(e) {
var t = e.user,
n = e.qr_id,
a = e.key,
r = e.value;
return function(e) {
return (o = t._id, xe.collection("customers").doc(o).collection("wallet")).doc(n).update(P()({}, a, r));
var o
}
},
ot = function(e) {
var t = e.user,
n = e.action;
return function(e) {
return (a = t._id, xe.collection("customers").doc(a).collection("log")).add({
action: n,
createdAt: Ke
});
var a
}
},
it = xe.collection("customers"),
lt = function(e) {
return {
type: "global_initialising",
bool: e
}
},
st = function(e) {
return {
type: "show_auth_modal",
bool: e
}
},
ct = function(e) {
return {
type: "show_email_auth_modal",
bool: e
}
},
ut = function(e) {
return {
type: "show_auth_loading_modal",
bool: e
}
},
dt = function(e) {
return {
type: "set_auth_error",
err: e
}
},
mt = function(e) {
return function(t) {
return d.a.async((function(n) {
for (;;)
switch (n.prev = n.next) {
case 0:
if (n.t0 = e, !n.t0) {
n.next = 4;
break
}
return n.next = 4, d.a.awrap(ot({
user: e,
action: {
label: "User logged out of wallet app.",
notes: ["no special notes"]
}
}));
case 4:
try {
Te.signOut(),
t({
type: "found_user",
payload: null
})
} catch (a) {}
case 5:
case "end":
return n.stop()
}
}), null, null, null, Promise)
}
},
gt = function(e) {
return {
type: "found_user",
payload: e
}
};
var ht = function(e) {
var t = e.newUser,
n = e.blockUserAutoCreate;
return function(e) {
var a;
return d.a.async((function(r) {
for (;;)
switch (r.prev = r.next) {
case 0:
return a = null, r.next = 3, d.a.awrap(it.where("_id", "==", t.uid).onSnapshot((function(r) {
if (r.forEach((function(e) {
a = e.data()
})), a)
e({
type: "found_user",
payload: a
});
else {
var o = t.phoneNumber,
i = t.email,
l = t.uid;
!n && e(nt({
cellphoneNumber: o,
email: i,
uid: l
})),
n && mt()
}
})));
case 3:
case "end":
return r.stop()
}
}), null, null, null, Promise)
}
},
pt = function(e) {
return {
type: "set_global_loading",
bool: e
}
},
ft = function(e) {
return {
type: "update_theme_image",
payload: e
}
},
yt = xe.collection("products");
function bt(e) {
for (var t = "", n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", a = e, r = 0; r < a; r++)
t += n.charAt(parseInt(Math.random() * n.length)),
-1 !== n.indexOf(r + 1) && (t = t);
return t
}
xe.collection("customers");
var wt = function(e) {
return function(t) {
t({
type: "add_to_subcart_success",
payload: e
})
}
},
Et = function(e) {
return {
type: "show_in_progress",
bool: e
}
},
vt = function(e) {
return {
type: "show_balance_spinner",
bool: e
}
},
Ct = function(e) {
return {
type: "show_cart",
bool: e
}
},
jt = function(e) {
return {
type: "show_alt_pay_options",
bool: e
}
},
St = function(e, t) {
return xe.collection("entities").doc(e).collection("events").doc(t).collection("products")
},
Ot = Pe.httpsCallable("sendEmail"),
It = function(e) {
return function(t) {
t({
type: "images_loaded",
payload: e
})
}
},
xt = function(e) {
var t = e.orgId,
n = e.event_id,
a = e.user;
return function(e) {
return d.a.async((function(r) {
for (;;)
switch (r.prev = r.next) {
case 0:
return r.abrupt("return", xe.collection("entities").doc(t).collection("events").doc(n).collection("comps").where("phone", "==", a.phoneNumber).get().then((function(t) {
var n = [];
t.forEach((function(e) {
e.exists && n.push(e.data())
}));
var r = 0 !== n.length && n[0].phone === a.phoneNumber;
return r && e({
type: "toggle_invite_status_success",
payload: !0
}), !r && e({
type: "toggle_invite_status_success",
payload: !1
}), r
})));
case 1:
case "end":
return r.stop()
}
}), null, null, null, Promise)
}
},
Tt = function(e) {
var t,
n = {
to: e.to,
message: {
subject: e.subject,
text: "You have emailed your event pass to yourself. Please remain vigilant and do not share this pass, or allow it to be copied.",
body: e.body,
attachments: e.attachments
}
};
return t = JSON.parse(JSON.stringify(n)), Ot({
emailTrigger: t
})
},
Pt = new Date,
Mt = function(e) {
return xe.collection("PENDING_PAYMENTS").doc(e)
},
kt = function(e) {
return function(t) {
return t({
type: "show_balance_spinner",
bool: e
})
}
},
zt = function(e) {
return function(t) {
return t({
type: "show_in_progress",
bool: e
})
}
},
Dt = function(e) {
return function(t) {
"splitTicket" === e || "buyTicket" === e ? (t({
type: "payment_received_ticket"
}), E("PassesHome")) : "topUp" === e && (t({
type: "payment_received_topup"
}), E("WalletOverview"))
}
},
Rt = function(e) {
return function(t) {
var n = e.user,
a = e.paymentType,
r = e.amount,
o = e.subCart,
i = e.orgId,
l = e.id,
s = e.type;
t(kt(!0));
var c = Pe.httpsCallable("yocoSplitPay");
new YocoSDK({
publicKey: "pk_live_03337986yLmGZjw68634"
}).showPopup({
amountInCents: 500,
currency: "ZAR",
customer: {
phone: n.cellphoneNumber
},
metadata: {
userId: n._id,
cellNo: n.cellphoneNumber,
email: n.email
},
callback: function(e) {
if (e.error)
e.error.message;
else
"splitTicket" === a && t(zt(!0)),
"buyTicket" === a && t(zt(!0)),
"topUp" === a && t((u = !0, d = r, function(e) {
return e({
type: "show_in_progress_topup",
bool: u,
topUpDisplayAmount: d
})
})),
c({
token: e.id,
amount: 100 * r,
orgId: i,
id: l,
type: s,
userId: n._id,
cellNo: n.cellphoneNumber,
email: n.email,
subCart: o,
paymentType: a
}).then((function(e) {
t(kt(!1)),
t(Dt(a))
})).catch((function(e) {
t(kt(!1)),
t(Et(!1)),
console.log("Yoco Cloud function error: ", e)
}));
var u,
d
},
onCancel: function() {
console.log("Yoco payment cancelled!"),
t(kt(!1))
},
image: "https://firebasestorage.googleapis.com/v0/b/cashless-c137a.appspot.com/o/ADround.png?alt=media&token=8a03c20d-5a89-47cb-8535-0c67a7f34806"
})
}
},
Lt = function(e) {
return function(t) {
var n = e.user,
a = (e.paymentType, e.amount),
r = (e.subCart, bt(15)),
o = encodeURI("http://2.zap.pe?t=6&i=51499:65013:7[34|" + a + "|11,33n|" + r + "|10:8[0n|" + n._id + "|10|customerId,0n|productId|10|productId,0n|paymentId|10|paymentId,0n|affiliate|10|affiliateId:10[39|ZAR,38|eventName"),
i = encodeURI("https://airdosh.web.app/");
f.a.openURL("https://www.zapper.com/payWithZapper/?qr=" + o + "&successCallbackURL=" + i),
setTimeout((function() {
v()
}), 500)
}
},
Nt = function(e) {
return function(t) {
var n = e.user,
a = e.paymentType,
r = e.amount,
o = e.subCart,
i = bt(15),
l = n.cellphoneNumber;
"buyTicket" !== a && "splitTicket" !== a || (f.a.openURL("https://pos.snapscan.io/qr/w0BABvEj?id=" + i + "&statementReference=" + l + "&userId=" + n._id + "&cellNo=" + n.cellphoneNumber + "&type=" + a + "&amount=" + 100 * r + "&strict=true"), Mt(i).set({
createdAt: Pt,
paymentType: a,
provider: "snapscan",
orderId: i,
userId: n._id,
cellNo: n.cellphoneNumber,
amount: r,
subCart: o
}).then((function() {
setTimeout((function() {
E("PassesHome")
}), 500),
t({
type: "show_payment_pending_widget",
bool: !0,
message: "You have a SNAP SCAN payment pending. Once succesfully completed, your purchased items will appear in your wallet. If failed, you may start again."
})
}))),
"topUp" === a && (f.a.openURL("https://pos.snapscan.io/qr/w0BABvEj?id=" + i + "&userId=" + n._id + "&cellNo=" + n.cellphoneNumber + "&type=" + a + "&amount=" + 100 * r + "&strict=true"), Mt(i).set({
createdAt: Pt,
paymentType: a,
provider: "snapscan",
orderId: i,
userId: n._id,
cellNo: n.cellphoneNumber,
amount: parseInt(r)
}).then((function() {
setTimeout((function() {
v()
}), 500),
t({
type: "show_payment_pending_widget",
bool: !0,
message: "You have a SNAP SCAN TOP UP pending, once succesfully completed your Top Up will appear in your wallet. If cancelled, you may try again."
})
})))
}
},
At = function(e) {
return {
type: "tag_link_success_modal",
bool: e
}
},
_t = function(e) {
return {
type: "tag_link_fail_modal",
bool: e
}
},
Bt = function(e) {
return {
type: "set_show_terms_modal",
bool: e
}
},
Wt = function(e) {
return {
type: "set_show_new_content",
bool: e
}
};
var Ut = Object(De.d)(Object(j.b)(null, {
showPendingPaymentWidget: function(e, t) {
return {
type: "show_payment_pending_widget",
bool: e,
message: t
}
}
})((function(e) {
e.theme,
e.showPendingPaymentMessage;
var t = e.pendingPaymentMessage;
return h.a.createElement(qe.a, {
className: "sticky",
colors: ["#FFF", "#FFF"],
start: {
x: 0,
y: 1
},
end: {
x: 1,
y: 0
},
style: Vt.container
}, h.a.createElement(Qe, {
style: {
color: R.primaryText,
fontSize: 14
}
}, t), h.a.createElement(Ge.a, {
style: Vt.gotIt,
onPress: function() {
return e.showPendingPaymentWidget(!1, "")
}
}, h.a.createElement(Qe, {
style: {
color: R.primaryText,
opacity: .7
}
}, "Got it!")))
}))),
Vt = Ye.a.create({
container: {
position: "absolute",
top: 0,
backgroundColor: "white",
borderRadius: 15,
margin: 15,
padding: 15,
flexDirection: "row",
alignItems: "center",
shadowColor: "rgba(0,0,0,0.6)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 10
},
gotIt: {
backgroundColor: R.primary,
borderRadius: 10,
padding: 20,
alignItems: "center",
justifyContent: "center"
}
}),
Yt = n(82),
Ht = function(e) {
var t = Object(Le.a)({
"open-sans-reg": n(836)
});
return c()(t, 1)[0] ? h.a.createElement(y.a, {
numberOfLines: e.numberOfLines,
ellipsizeMode: e.ellipsizeMode,
style: [{
fontFamily: "open-sans-reg",
fontSize: 16
}, e.style]
}, e.children) : h.a.createElement(Re.a, null)
},
Ft = n(45),
Zt = n(631),
Gt = function(e) {
var t = e.placeholder,
n = e.onMinusPress,
a = e.showMinus,
r = e.onChangeText,
o = (e.onFocus, e.focusStyle, e.autoFocus),
i = (e.onBlur, e.onSubmitEditing),
l = e.onKeyPress,
s = e.multiline,
u = (e.addStyle, e.addContainerStyle),
d = (e.highlightStyle, e.answerSelected, e.value),
m = e.validation,
p = e.input,
f = e.label,
y = e.keyboardType,
b = e.textContentType,
w = e.thisRef,
E = e.required,
v = Object(g.useState)(!1),
C = c()(v, 2),
j = C[0],
S = C[1],
O = Object(g.useState)(!1),
I = c()(O, 2),
x = I[0],
T = I[1],
P = Object(g.useState)(!1),
M = c()(P, 2),
k = M[0],
z = M[1];
Object(g.useEffect)((function() {
return m && x && m.includes("length") && d.length && z(!1), m && x && m.includes("length") && !d.length && z(!0), m && x && m.includes("email") && d.length && !d.includes("@") && z(!0), m && x && m.includes("email") && d.length && !d.includes(".") && z(!0), m && x && m.includes("email") && d.length && d.includes("@") && z(!1), m && x && m.includes("email") && d.length && d.includes(".") && z(!1), function() {
return T(!1)
}
}), [d]);
return h.a.createElement(ve.a, null, h.a.createElement(ve.a, {
style: [qt.inputContainer, {
borderColor: j ? R.balance : k ? R.alert : R.shade3,
borderWidth: j || k ? 2 : 1
}, u]
}, h.a.createElement(ve.a, {
style: {
position: "absolute",
top: -10,
left: 30,
backgroundColor: R.bg,
borderRadius: 5
}
}, h.a.createElement(ve.a, {
style: {
flex: 1,
borderRadius: 5,
paddingHorizontal: 5,
backgroundColor: R.bg1
}
}, h.a.createElement(Ae, {
style: {
color: R.balance,
fontSize: 14
}
}, f, E && " *"))), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
marginVertical: 10,
width: "100%",
alignItems: "center"
}
}, h.a.createElement(Ft.a, Ee()({}, p, {
ref: w,
style: {
outline: "none",
width: "100%",
fontSize: 18,
color: R.textSolid
},
multiline: s,
placeholder: t,
onChangeText: r,
value: d,
onFocus: function() {
return S(!0)
},
onBlur: function() {
S(!1),
T(!0),
(null == m ? void 0 : m.includes("length")) && (m && E && m.includes("length") && d.length > 0 ? z(!1) : z(!0)),
(null == m ? void 0 : m.includes("email")) && (m && E && m.includes("email") && d.length > 0 && d.includes("@") && d.includes(".") ? z(!1) : z(!0))
},
onSubmitEditing: i,
onKeyPress: l,
keyboardType: y,
textContentType: b,
autoFocus: o
})), a ? h.a.createElement(Ge.a, {
onPress: n,
style: {
marginLeft: 10
}
}, h.a.createElement(Zt.a, {
name: "minuscircle",
size: 24,
color: R.highlight
})) : null)), k && h.a.createElement(Ht, {
style: {
color: R.alert,
fontSize: 14
}
}, m.includes("email") ? "Valid email address required!" : "Required!"))
},
qt = Ye.a.create({
inputContainer: {
width: "95%",
height: 60,
paddingHorizontal: 30,
alignItems: "center",
justifyContent: "center",
borderRadius: 10
},
inputStyle: {
fontSize: 16,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent",
color: R.primaryText,
borderBottomWidth: 1,
borderBottomColor: R.shade1
},
inputTextFocussed: {
fontSize: 16,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent",
color: R.primaryText,
borderBottomColor: R.highlight,
borderBottomWidth: 2
}
}),
Qt = n(10),
Jt = n.n(Qt),
Xt = n(11),
Kt = n.n(Xt),
$t = n(9),
en = n.n($t),
tn = n(13),
nn = n.n(tn),
an = n(15),
rn = n.n(an),
on = n(6),
ln = n.n(on),
sn = n(657);
function cn(e) {
var t = function() {
if ("undefined" === typeof Reflect || !Reflect.construct)
return !1;
if (Reflect.construct.sham)
return !1;
if ("function" === typeof Proxy)
return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
} catch (e) {
return !1
}
}();
return function() {
var n,
a = ln()(e);
if (t) {
var r = ln()(this).constructor;
n = Reflect.construct(a, arguments, r)
} else
n = a.apply(this, arguments);
return rn()(this, n)
}
}
!function(e) {
nn()(n, e);
var t = cn(n);
function n() {
var e;
return Jt()(this, n), (e = t.call(this)).state = {
valid: "",
type: "",
value: ""
}, e.updateInfo = e.updateInfo.bind(en()(e)), e.renderInfo = e.renderInfo.bind(en()(e)), e
}
Kt()(n, [{
key: "updateInfo",
value: function() {
this.setState({
valid: this.phone.isValidNumber(),
type: this.phone.getNumberType(),
value: this.phone.getValue()
})
}
}, {
key: "renderInfo",
value: function() {
if (this.state.value)
return h.a.createElement(ve.a, {
style: un.info
}, h.a.createElement(y.a, null, "Is Valid:", " ", h.a.createElement(y.a, {
style: {
fontWeight: "bold"
}
}, this.state.valid.toString())), h.a.createElement(y.a, null, "Type: ", h.a.createElement(y.a, {
style: {
fontWeight: "bold"
}
}, this.state.type)), h.a.createElement(y.a, null, "Value:", " ", h.a.createElement(y.a, {
style: {
fontWeight: "bold"
}
}, this.state.value)))
}
}, {
key: "render",
value: function() {
var e = this;
return h.a.createElement(ve.a, {
style: un.container
}, h.a.createElement(sn.a, {
ref: function(t) {
e.phone = t
}
}), h.a.createElement(Ge.a, {
onPress: this.updateInfo,
style: un.button
}, h.a.createElement(y.a, null, "Get Info")), this.renderInfo())
}
}])
}(g.Component);
var un = Ye.a.create({
container: {
flex: 1,
alignItems: "center",
padding: 20,
paddingTop: 60
},
info: {
borderRadius: 5,
backgroundColor: "#f0f0f0",
padding: 10,
marginTop: 20
},
button: {
marginTop: 20,
padding: 10
}
}),
dn = function(e) {
var t = e.onPress,
n = e.addCol,
a = e.style;
return h.a.createElement(Be.a, {
activeOpacity: 1,
underlayColor: "white",
className: "sticky",
onPress: t,
style: [{
zIndex: 10,
position: "absolute",
top: 0,
left: 0,
backgroundColor: "transparent",
height: 90,
width: 70,
padding: 15,
paddingBottom: 0,
borderRadius: 15,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}, a]
}, h.a.createElement(ve.a, null, h.a.createElement(We.a, {
name: "ios-arrow-back",
size: 30,
color: n || R.highlight,
style: {
alignSelf: "flex-start",
marginLeft: 5
}
}), h.a.createElement(ve.a, {
style: {
width: 20,
backgroundColor: "transparent"
}
})))
},
mn = function(e) {
return h.a.createElement(ve.a, {
style: [gn.container, e.style]
}, h.a.createElement(ve.a, {
style: [gn.card, e.childStyle]
}, e.children))
},
gn = Ye.a.create({
container: {
width: D.width - 40,
backgroundColor: R.bg,
borderRadius: 15,
marginVertical: 10,
alignItems: "center",
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
card: {
flex: 1,
width: D.width - 40,
borderRadius: 15,
backgroundColor: R.bg1,
padding: 20
}
}),
hn = function(e) {
var t = e.route.params.item,
n = [t.color1, t.color2];
return h.a.createElement(qe.a, Ee()({}, e, {
colors: n,
start: {
x: 0,
y: 1
},
end: {
x: 1,
y: 0
},
style: [pn.container, e.style]
}), e.children)
},
pn = Ye.a.create({
container: {
width: D.width - 40,
borderRadius: 15,
marginVertical: 10,
padding: 20,
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
}
}),
fn = function(e) {
var t = e.subTitle,
n = e.title,
a = (e.body, e.style),
r = e.subTitleStyle;
e.titleStyle;
return h.a.createElement(ve.a, {
style: [{
backgroundColor: "transparent"
}, a]
}, h.a.createElement(ve.a, null, h.a.createElement(Ae, {
style: [{
color: R.balance,
marginLeft: 1
}, r]
}, t), h.a.createElement(Ne, {
style: [{
color: R.textSolid
}, e.titleStyle]
}, n)))
},
yn = function(e) {
var t = e.subTitle,
n = e.title,
a = e.body,
r = e.style,
o = e.subTitleStyle,
i = (e.titleStyle, e.bodyStyle);
return h.a.createElement(ve.a, {
style: [{
backgroundColor: "transparent"
}, r]
}, h.a.createElement(ve.a, null, h.a.createElement(Ae, {
style: [{
color: R.balance,
marginLeft: 1
}, o],
numberOfLines: 1,
ellipsizeMode: "tail"
}, t), h.a.createElement(Ne, {
style: {
color: R.textSolid
}
}, n)), h.a.createElement(Ae, {
style: [{
color: R.shade4,
fontSize: 14,
marginTop: 5
}, i]
}, a))
},
bn = function(e) {
var t = e.heading,
n = e.subHeading,
a = e.description,
r = void 0 === a ? null : a,
o = e.onClose;
return h.a.createElement(ve.a, {
style: {
width: "100%",
justifyContent: "space-between",
alignItems: "flex-start",
paddingBottom: 20,
borderBottomColor: R.bg2,
borderBottomWidth: 1,
marginBottom: 20
}
}, h.a.createElement(ve.a, null, h.a.createElement(Ae, {
style: {
fontSize: 14,
color: R.balance
}
}, n), h.a.createElement(Ne, {
style: {
fontSize: 26,
color: R.textSolid
}
}, t), null !== r && h.a.createElement(Ae, {
style: {
fontSize: 14,
color: R.shade4,
opacity: .7
}
}, r)), h.a.createElement(Ge.a, {
onPress: o,
style: {
position: "absolute",
top: -10,
right: -10,
width: 70,
height: 70,
padding: 30,
alignItems: "flex-start",
justifyContent: "center"
}
}, h.a.createElement(We.a, {
name: "ios-close",
size: 50,
color: R.textSolid
})))
},
wn = n(634),
En = n(26);
function vn(e) {
var t = e.type,
n = (e.style, e.addStyle),
a = e.title,
r = e.titleStyle,
o = e.icon,
i = (e.iconName, e.iconSize, e.iconColor, e.iconStyle, e.onPress),
l = e.disabled,
s = e.loading;
return h.a.createElement(Be.a, {
activeOpacity: .7,
underlayColor: "transparent",
onPress: i,
disabled: l,
style: [Cn.buttonStyle, "solid" === t ? Cn.buttonSolidStyle : Cn.buttonOutlineStyle, "solid" === t && l && Cn.buttonSolidStyleDisabled, "outline" === t && l && Cn.buttonOutlineStyleDisabled, !1, n]
}, h.a.createElement(ve.a, null, !s && o, !s && h.a.createElement(Qe, {
style: [t && "solid" === t ? Cn.titleSolidStyle : Cn.titleOutlineStyle, r]
}, a), s && h.a.createElement(En.a, {
size: "small",
color: "white",
style: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0
}
})))
}
var Cn = Ye.a.create({
buttonStyle: {
height: 60,
width: D.width - 80,
borderRadius: 10,
paddingHorizontal: 20,
alignItems: "center",
justifyContent: "center"
},
buttonOutlineStyle: {
borderWidth: 2,
borderColor: R.balance,
backgroundColor: "white"
},
buttonOutlineStyleDisabled: {
borderWidth: 2,
borderColor: R.primary,
backgroundColor: "white"
},
buttonSolidStyle: {
backgroundColor: R.balance
},
buttonSolidStyleDisabled: {
backgroundColor: "rgba(0,0,0,0.3)"
},
titleOutlineStyle: {
fontSize: 16,
color: R.balance
},
titleSolidStyle: {
fontSize: 16,
color: "white"
},
iconButton: {
justifyContent: "space-around",
margin: 10
}
});
var jn = Object(j.b)(null, {
signInOAuth: function(e) {
return function(t) {
je.a.auth().useDeviceLanguage();
je.a.auth().getRedirectResult().then((function(n) {
if (n.credential)
n.credential.accessToken;
var a,
r = n.user;
r ? t(ht({
newUser: r,
blockUserAutoCreate: !1
})) : je.a.auth().signInWithRedirect("facebook" === (a = e) ? new je.a.auth.FacebookAuthProvider : "twitter" === a ? new je.a.auth.TwitterAuthProvider : new je.a.auth.GoogleAuthProvider)
})).catch((function(e) {
e.code,
e.email,
e.credential;
t(dt(e.message))
}))
}
},
showAuthModal: st,
showEmailAuthModal: ct
})((function(e) {
return h.a.createElement(ve.a, {
style: {
alignItems: "center"
}
}, h.a.createElement(Qe, null, "Alternative sign in options"), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(ve.a, {
style: {
alignItems: "center"
}
}, h.a.createElement(Ge.a, {
style: Sn.iconStyle,
onPress: function() {
e.showEmailAuthModal(!0),
e.showAuthModal(!1)
}
}, h.a.createElement(wn.a, {
name: "email",
size: 22,
color: R.textSolid
})), h.a.createElement(Qe, null, "Email")), h.a.createElement(ve.a, {
style: {
alignItems: "center"
}
}, h.a.createElement(Ge.a, {
style: Sn.iconStyle,
onPress: function() {
return e.signInOAuth("google")
}
}, h.a.createElement(wn.a, {
name: "google",
size: 22,
color: R.textSolid
})), h.a.createElement(Qe, null, "Google"))))
})),
Sn = Ye.a.create({
iconStyle: {
backgroundColor: R.shade1,
borderRadius: 35,
height: 70,
width: 70,
padding: 10,
margin: 10,
alignItems: "center",
justifyContent: "center"
}
}),
On = (xe.collection("customers"), function(e) {
e.seconds;
var t = e.onResendPress,
n = e.timeLeft,
a = e.setTimeLeft;
return Object(g.useEffect)((function() {
if (n <= 0)
return a(null);
var e = setInterval((function() {
a(n - 1)
}), 1e3);
return function() {
return clearInterval(e)
}
}), [n]), h.a.createElement(_e.a, null, h.a.createElement(ve.a, {
style: {
alignItems: "center"
}
}, h.a.createElement(Ht, {
style: {
color: R.textSolid
}
}, " Didn't receive an SMS?"), n ? h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(Ht, {
style: {
color: R.textSolid
}
}, "You may retry in "), h.a.createElement(Ne, {
style: {
width: 28,
fontSize: 16,
marginBottom: -2,
color: R.textSolid,
textAlign: "center"
}
}, n), h.a.createElement(Ht, {
style: {
color: R.textSolid
}
}, " seconds")) : null, h.a.createElement(Ge.a, {
style: {
padding: 10
},
onPress: function() {
t(),
a(60),
window.recaptchaVerifier.clear()
},
disabled: n
}, h.a.createElement(Ht, {
style: {
color: n ? R.shade2 : R.balance
}
}, "Start again"))))
});
var In = Object(j.b)((function(e) {
var t = e.store.product;
return {
user: e.users.user,
product: t,
authError: e.auth.authError
}
}), {
foundUser: tt,
showAuthLoadingModal: ut,
setAuthError: dt,
getCreateUserObj: ht
})((function(e) {
var t = e.cellphoneNumber,
n = (e.onPress, e.onModalCancel),
a = (e.onSubmitPress, e.authError);
Object(g.useEffect)((function() {
return window.recaptchaVerifier = new je.a.auth.RecaptchaVerifier("reCAPTCHA-container", {
size: "invisible"
}), je.a.auth().useDeviceLanguage(), function() {
return window.recaptchaVerifier.clear()
}
}), []);
var r = Object(g.useRef)(null),
o = Object(g.useRef)(null),
i = Object(g.useState)(!1),
l = c()(i, 2),
s = l[0],
u = l[1],
m = Object(g.useState)("0" === t.charAt(0) ? t.replace("0", "+27") : "" === t ? "+27" : t),
p = c()(m, 2),
f = p[0],
y = p[1],
b = Object(g.useState)(""),
w = c()(b, 2),
E = w[0],
v = w[1],
C = Object(g.useState)(null),
j = c()(C, 2),
S = (j[0], j[1], Object(g.useState)(1)),
O = c()(S, 2),
I = O[0],
x = O[1],
T = Object(g.useState)(60),
P = c()(T, 2),
M = P[0],
k = P[1],
z = Object(g.useState)(1),
D = c()(z, 2),
L = D[0];
return D[1], new je.a.auth.PhoneAuthProvider, h.a.createElement(mn, null, h.a.createElement(ve.a, {
key: L,
ref: o,
nativeID: "reCAPTCHA-container",
style: {
backgroundColor: "white"
}
}), 1 === I ? h.a.createElement(ve.a, {
style: {
width: "100%",
padding: 20,
paddingTop: 0,
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(bn, {
heading: "One Time PIN",
subHeading: "Sign in securely using",
onClose: function() {
n(!1),
null !== a && dt(null) && x(1)
}
}), h.a.createElement(Gt, {
thisRef: r,
label: "Phone Number",
placeholder: "e.g. +27823334444",
onChangeText: y,
value: f,
style: xn.inputText,
keyboardType: "phone-pad",
autoCompleteType: "tel"
}), a && h.a.createElement(Ht, {
style: {
marginTop: 15,
textAlign: "center",
fontSize: 12,
color: "red"
}
}, a), h.a.createElement(De.a, {
loading: s,
title: "CONTINUE",
buttonStyle: {
height: 60,
width: 250,
margin: 20,
borderRadius: 10,
backgroundColor: R.balance,
alignSelf: "flex-start"
},
titleStyle: {
fontWeight: "bold",
fontSize: 14
},
onPress: function() {
var e;
return d.a.async((function(t) {
for (;;)
switch (t.prev = t.next) {
case 0:
dt(null),
u(!0);
try {
e = window.recaptchaVerifier,
je.a.auth().signInWithPhoneNumber(f, e).then((function(e) {
window.confirmationResult = e,
x(2),
u(!1)
})).catch((function(e) {
dt(e.message),
u(!1)
}))
} catch (n) {
u(!1),
dt(n.message)
}
case 3:
case "end":
return t.stop()
}
}), null, null, null, Promise)
},
disabled: f.length < 10
}), h.a.createElement(Ht, {
style: {
textAlign: "center",
fontSize: 12,
color: R.textSolid
}
}, "You will receive an OTP via SMS message for verification. Standard rates apply.")) : 2 === I ? h.a.createElement(ve.a, {
style: {
width: "100%",
padding: 20,
paddingTop: 0,
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(bn, {
heading: "Enter OTP",
subHeading: "SMS has been sent",
onClose: function() {
x(1),
n(!1)
}
}), h.a.createElement(Gt, {
label: "OTP",
placeholder: "enter One Time Pin",
onChangeText: v,
value: E,
style: xn.inputText,
keyboardType: "number-pad",
textContentType: "oneTimeCode"
}), a && h.a.createElement(Ht, {
style: {
textAlign: "center",
fontSize: 12,
color: "red"
}
}, a), h.a.createElement(De.a, {
loading: s,
title: "Sign In",
buttonStyle: {
height: 60,
width: 250,
margin: 20,
borderRadius: 10,
backgroundColor: R.balance,
alignSelf: "flex-start"
},
titleStyle: {
fontWeight: "bold",
fontSize: 14
},
onPress: function() {
var t;
return d.a.async((function(n) {
for (;;)
switch (n.prev = n.next) {
case 0:
return dt(null), u(!0), t = {}, n.next = 5, d.a.awrap(confirmationResult.confirm(E).then((function(n) {
return d.a.async((function(a) {
for (;;)
switch (a.prev = a.next) {
case 0:
return t = n.user, a.next = 3, d.a.awrap(e.getCreateUserObj({
newUser: t,
blockUserAutoCreate: !1
}).then((function(e) {})));
case 3:
u(!1),
e.showAuthLoadingModal(!0),
e.onModalCancel(),
x(1);
case 7:
case "end":
return a.stop()
}
}), null, null, null, Promise)
})).catch((function(e) {
dt(e.message),
u(!1)
})));
case 5:
v("");
case 6:
case "end":
return n.stop()
}
}), null, null, null, Promise)
},
disabled: E.length < 6
}), h.a.createElement(On, {
onResendPress: function() {
return dt(null), x(1), void window.recaptchaVerifier.render().then((function(e) {
grecaptcha.reset(e)
}))
},
timeLeft: M,
setTimeLeft: k
}), M <= 59 && h.a.createElement(Yt.a, {
animation: "bounceIn"
}, h.a.createElement(jn, null))) : null)
})),
xn = Ye.a.create({
modalContainer: {
flex: 1,
height: "95%",
width: "100%",
backgroundColor: "white",
borderTopRightRadius: 15,
borderTopLeftRadius: 15,
margin: -20,
marginTop: 10,
paddingTop: 30,
alignItems: "center",
alignSelf: "center"
}
});
var Tn = Object(j.b)((function(e) {
return {
authError: e.auth.authError
}
}), {
signInEmailPassword: function(e) {
var t = e.email,
n = e.password;
return function(e) {
Te.signInWithEmailAndPassword(t, n).then((function(t) {
var n = t.user;
e(ht({
newUser: n,
blockUserAutoCreate: !0
})),
e(dt(null)),
e(ct(!1))
})).catch((function(t) {
t.code;
e(dt(t.message))
}))
}
},
signUpEmailPassword: function(e) {
var t = e.email,
n = e.password;
return function(e) {
Te.createUserWithEmailAndPassword(t, n).then((function(t) {
var n = t.user;
e(ht({
newUser: n,
blockUserAutoCreate: !1
})),
e(dt(null)),
e(ct(!1))
})).catch((function(t) {
t.code;
e(dt(t.message))
}))
}
}
})((function(e) {
var t = e.authError,
n = Object(g.useState)(""),
a = c()(n, 2),
r = a[0],
o = a[1],
i = Object(g.useState)(""),
l = c()(i, 2),
s = l[0],
u = l[1],
d = Object(g.useState)(""),
m = c()(d, 2),
p = m[0],
f = m[1],
y = Object(g.useState)(!1),
b = c()(y, 2),
w = b[0],
E = b[1],
v = Object(g.useState)(!1),
C = c()(v, 2),
j = C[0];
return C[1], Object(g.useEffect)((function() {}), [t]), h.a.createElement(mn, null, h.a.createElement(ve.a, {
style: {
backgroundColor: R.bg,
borderRadius: 10
}
}, h.a.createElement(bn, {
heading: w ? "Sign In" : "Sign Up",
subHeading: "Email + Password",
onClose: function() {
e.onModalCancel(),
null !== t && dt(null)
}
}), h.a.createElement(ve.a, {
style: {
flex: 1,
backgroundColor: R.bg1,
paddingHorizontal: 20,
paddingVertical: 30,
borderRadius: 10,
width: "100%"
}
}, h.a.createElement(Gt, {
label: "Email",
placeholder: "Enter email address",
onChangeText: o,
value: r,
addContainerStyle: Pn.inputText,
autoFocus: !0,
keyboardType: "email-address"
}), h.a.createElement(Gt, {
secureTextEntry: !0,
label: "Password",
placeholder: "Enter password",
onChangeText: u,
value: s,
addContainerStyle: Pn.inputText
}), !w && h.a.createElement(Gt, {
secureTextEntry: !0,
label: "Re-enter password",
placeholder: "Re-enter password",
onChangeText: f,
value: p,
addContainerStyle: Pn.inputText,
keyboardType: "email-address"
}), t && h.a.createElement(Ht, {
style: Pn.errorText
}, t), h.a.createElement(De.a, {
loading: j,
title: w ? "Sign in" : "Sign up",
buttonStyle: {
height: 60,
borderRadius: 10,
marginVertical: 20,
backgroundColor: R.balance
},
titleStyle: {
fontWeight: "bold",
fontSize: 14
},
onPress: function() {
w ? e.signInEmailPassword({
email: r,
password: s
}) : e.signUpEmailPassword({
email: r,
password: s
})
}
}), h.a.createElement(Ge.a, {
onPress: function() {
return E(!w)
}
}, w && h.a.createElement(ve.a, {
style: Pn.footer
}, h.a.createElement(Ht, {
style: [Pn.message, {
marginRight: 5
}]
}, "Don't have an account?"), h.a.createElement(Ae, {
style: [Pn.message, {
color: R.pay
}]
}, "Sign Up")), !w && h.a.createElement(ve.a, {
style: Pn.footer
}, h.a.createElement(Ht, {
style: [Pn.message, {
marginRight: 5
}]
}, "Already have an account?"), h.a.createElement(Ae, {
style: [Pn.message, {
color: R.pay
}]
}, "Sign In"))))))
})),
Pn = Ye.a.create({
backButton: {
position: "absolute",
top: 20,
right: 20,
alignItems: "center",
justifyContent: "center",
backgroundColor: "white",
height: 40,
width: 40,
borderRadius: 20,
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
inputText: {
marginVertical: 10,
width: "100%",
textAlign: "center",
fontSize: 18,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent"
},
message: {
fontSize: 14,
color: R.secondary
},
errorText: {
marginTop: 15,
textAlign: "center",
fontSize: 12,
color: "red"
},
footer: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center"
}
}),
Mn = function(e) {
return setTimeout((function() {
e.onModalCancel(!1)
}), 2e3), h.a.createElement(ve.a, {
style: {
alignItems: "center",
marginTop: 30
}
}, h.a.createElement(Ue.a, {
name: "check-circle",
size: 50,
color: R.highlight
}), h.a.createElement(Ne, {
style: {
fontSize: 24,
margin: 20,
color: R.textSolid
}
}, "Sign In Success!"))
};
var kn = Object(j.b)((function(e) {
return {
user: e.users.user,
authError: e.auth.authError
}
}), {
setAuthError: dt,
showAuthLoadingModal: ut
})((function(e) {
var t = e.user,
n = (e.authError, Object(g.useState)(!1)),
a = c()(n, 2),
r = (a[0], a[1]);
return Object(g.useEffect)((function() {
t && r(!1);
var n = setTimeout((function() {
!t && r(!0) && e.setAuthError("Sign in timed out ;(")
}), 1e4);
return function() {
return clearTimeout(n)
}
}), [t]), h.a.createElement(mn, null, t ? h.a.createElement(Mn, e) : h.a.createElement(ve.a, {
style: {
alignItems: "center",
marginTop: 30
}
}, h.a.createElement(En.a, {
size: "large",
color: R.pay
}), h.a.createElement(Ne, {
style: {
fontSize: 24,
textAlign: "center",
margin: 20,
color: R.textSolid
}
}, "Opening your wallet...")))
})),
zn = n(1081),
Dn = n(1082),
Rn = n(1083),
Ln = n(1084);
function Nn(e) {
var t = e.name,
n = e.selected,
a = e.onPress,
r = e.size,
o = D.width / r,
i = "snapscan" === t ? zn : "zapper" === t ? Dn : "card" === t ? Rn : "airdosh" === t ? Ln : null;
return h.a.createElement(ve.a, {
style: [An.paymentOption, n && An.selectedPaymentOption]
}, h.a.createElement(ve.a, {
style: {
flex: 1
}
}, n && h.a.createElement(Ue.a, {
name: "check",
size: 24,
color: R.highlight,
style: {
marginBottom: 5
}
})), h.a.createElement(Ge.a, {
onPress: a
}, h.a.createElement(Ce.a, {
source: {
uri: i
},
style: {
width: o,
height: o,
opacity: .8
}
})))
}
var An = Ye.a.create({
paymentOption: {
alignItems: "center",
padding: 10,
borderRadius: 20,
justifyContent: "space-between"
},
selectedPaymentOption: {
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20,
backgroundColor: R.bg1
}
});
function _n(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function Bn(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? _n(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _n(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var Wn = function(e) {
return new Intl.NumberFormat("en-US", {
maximumSignificantDigits: 3
}).format(e)
};
var Un = Object(De.d)(Object(j.b)((function(e) {
var t = e.store,
n = t.subCart,
a = t.product,
r = e.users.user,
o = n.map((function(e) {
return e.qty * e.booking_fee
})).reduce((function(e, t) {
return e + t
}), 0) || 0;
return {
user: r,
subCart: n,
subCartTotal: n.map((function(e) {
return e.qty * e.price
})).reduce((function(e, t) {
return e + t
}), 0) + o,
event: a
}
}), {
showAltPaymentOptions: jt,
onYocoPay: Rt,
onZapperPay: Lt,
onSnapScanPay: Nt
})((function(e) {
var t = e.user,
n = e.subCart,
a = e.subCartTotal,
r = (null == t ? void 0 : t.credit) + (null == t ? void 0 : t.pendingCredit),
o = a - r,
i = Object(g.useState)("card"),
l = c()(i, 2),
s = l[0],
u = l[1];
return h.a.createElement(mn, null, h.a.createElement(fn, {
subTitle: "Select an option for",
title: "Split Payment"
}), h.a.createElement(Ae, null, "You are using your current wallet credit of R ", Wn(r), ". For the remaining R ", Wn(a - r), ", please select a payment option below."), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
justifyContent: "center",
marginTop: 15
}
}, h.a.createElement(Nn, {
name: "snapscan",
size: 7,
selected: "snapscan" === s,
onPress: function() {
return u("snapscan")
}
}), h.a.createElement(Nn, {
name: "zapper",
size: 7,
selected: "zapper" === s,
onPress: function() {
return u("zapper")
}
}), h.a.createElement(Nn, {
name: "card",
size: 7,
selected: "card" === s,
onPress: function() {
return u("card")
}
})), h.a.createElement(vn, {
type: "solid",
title: "Pay Now",
addStyle: {
marginTop: 20
},
onPress: function() {
"card" === s && e.onYocoPay(Bn(Bn(Bn({}, e.event), e.route.params.item), {}, {
user: t,
paymentType: "splitTicket",
amount: o,
subCart: n
})),
t && "zapper" === s && e.onZapperPay({
user: t,
paymentType: "splitTicket",
amount: o,
subCart: n
}),
t && "snapscan" === s && e.onSnapScanPay({
user: t,
paymentType: "splitTicket",
amount: o,
subCart: n
}),
e.showAltPaymentOptions(!1)
}
}))
}))),
Vn = (Ye.a.create({
container: {
borderRadius: 15,
margin: 15,
padding: 15,
flexDirection: "row",
alignItems: "center"
}
}), n(37)),
Yn = function(e) {
var t = e.placeholder,
n = e.onMinusPress,
a = e.showMinus,
r = e.onChangeText,
o = (e.onFocus, e.focusStyle, e.onBlur, e.onSubmitEditing),
i = e.onKeyPress,
l = e.multiline,
s = e.addStyle,
u = e.addContainerStyle,
d = (e.highlightStyle, e.answerSelected, e.value),
m = e.input,
p = e.label,
f = (e.type, e.keyboardType),
y = e.thisRef,
b = Object(g.useState)(!0),
w = c()(b, 2),
E = w[0],
v = w[1];
return h.a.createElement(ve.a, {
style: [{
width: "95%",
alignSelf: "center",
paddingHorizontal: 0
}, u]
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
marginVertical: 10,
width: "100%",
alignItems: "center"
}
}, h.a.createElement(De.c, Ee()({
ref: y,
style: {
outline: "none"
},
multiline: l,
inputContainerStyle: {
borderBottomColor: E ? "transparent" : R.primaryLight
},
labelStyle: {
color: E ? R.highlight : R.primaryText,
alignSelf: "center"
},
inputStyle: E ? [Hn.inputTextFocussed, s] : [Hn.inputStyle, s]
}, m, {
label: p,
placeholder: t,
onChangeText: r,
value: d,
onFocus: function() {
return v(!0)
},
onBlur: function() {
return v(!1)
},
onSubmitEditing: o,
onKeyPress: i,
keyboardType: f
})), a ? h.a.createElement(Ge.a, {
onPress: n,
style: {
marginLeft: 10
}
}, h.a.createElement(Zt.a, {
name: "minuscircle",
size: 24,
color: R.highlight
})) : null))
},
Hn = Ye.a.create({
inputStyle: {
fontSize: 18,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent",
color: R.primaryText,
borderBottomWidth: 1,
borderBottomColor: R.shade1
},
inputTextFocussed: {
fontSize: 18,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent",
color: R.primaryText,
borderBottomColor: R.highlight,
borderBottomWidth: 2
}
});
var Fn = n(234),
Zn = n.n(Fn);
function Gn(e) {
e.user;
var t = e.subCart,
n = (e.onCancel, e.onPressPay, t.map((function(e) {
return e.qty * e.price
})).reduce((function(e, t) {
return e + t
}), 0));
return h.a.createElement(ve.a, {
style: {
flex: 1
}
}, h.a.createElement(ve.a, {
style: {
width: "100%"
}
}, h.a.createElement(Ae, {
style: {
color: R.balance
}
}, "Order in progress"), h.a.createElement(Ne, null, "Payment Pending")), h.a.createElement(En.a, {
size: "large",
color: R.balance,
style: {
margin: 20
}
}), h.a.createElement(Vn.a, {
style: {
width: "100%",
marginTop: 10,
paddingBottom: 10
}
}, t.map((function(e, t) {
return h.a.createElement(ve.a, {
key: t,
style: {
paddingVertical: 20,
width: D.width - 80,
alignItems: "center"
}
}, h.a.createElement(ve.a, {
style: {
width: "100%",
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(ve.a, {
style: {
paddingVertical: 5,
paddingHorizontal: 10,
alignItems: "center",
justifyContent: "center",
borderRadius: 5,
backgroundColor: R.shade1,
marginRight: 10
}
}, h.a.createElement(Qe, null, e.qty)), h.a.createElement(Qe, null, e.prod_title)), h.a.createElement(Qe, {
style: {
width: "30%",
textAlign: "right"
}
}, "R ", (n = e.qty * e.price, new Intl.NumberFormat("en-US", {
maximumSignificantDigits: 3
}).format(n)))));
var n
}))), h.a.createElement(ve.a, {
style: {
width: "95%",
paddingTop: 10,
borderTopWidth: 1,
borderTopColor: R.shade1,
flexDirection: "row",
justifyContent: "space-between"
}
}, h.a.createElement(Ae, {
style: {
fontSize: 18
}
}, "Total"), h.a.createElement(Ae, {
style: {
fontSize: 18
}
}, "R ", n)), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
width: "95%"
}
}, h.a.createElement(De.a, {
title: "CLEAR",
type: "outline",
buttonStyle: {
height: 50,
width: (D.width - 80) / 2,
marginVertical: 10,
borderRadius: 25,
borderWidth: 1,
borderColor: R.shade2
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: R.shade3
},
onPress: function() {
return e.showInProgress(!1)
}
})), h.a.createElement(Ae, {
style: {
fontSize: 12,
color: R.alert,
textAlign: "center"
}
}, "Placing order will charge your bank account with R " + n))
}
function qn(e) {
e.user;
var t = e.subCart;
e.onCancel,
e.onPressPay,
t.map((function(e) {
return e.qty * e.price
})).reduce((function(e, t) {
return e + t
}), 0);
return h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center",
backgroundColor: R.bg1
}
}, h.a.createElement(ve.a, {
style: {
width: "100%"
}
}, h.a.createElement(Ae, {
style: {
color: R.balance
}
}, "Success"), h.a.createElement(Ne, null, "Payment Received")), h.a.createElement(ve.a, {
style: {
width: D.width - 80,
alignItems: "center",
justifyContent: "space-between",
padding: 20,
marginVertical: 20,
borderRadius: 20,
backgroundColor: R.notice
}
}, h.a.createElement(ve.a, {
style: {
width: "100%"
}
}, h.a.createElement(Ae, {
style: {
color: "gray"
}
}, "Woohoo"), h.a.createElement(Ne, {
style: {
color: "white"
}
}, "Congrats!"), h.a.createElement(Ae, {
style: {
color: "gray",
fontSize: 14
}
}, "Give us a minute to deliver your purchased items to your wallet.")), h.a.createElement(Ce.a, {
source: {
uri: Zn.a
},
resizeMode: "contain",
style: {
height: 150,
width: D.width - 120,
marginVertical: 20
}
}), h.a.createElement(De.a, {
title: "TAKE ME HERE",
type: "outline",
buttonStyle: {
height: 50,
width: (D.width - 80) / 1.5,
marginVertical: 10,
borderRadius: 25,
borderWidth: 2,
borderColor: "white",
marginTop: 10
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: "white"
},
onPress: function() {
return e.showInProgress(!1)
}
})))
}
var Qn = Object(j.b)((function(e) {
var t = e.store;
return {
subCart: t.subCart,
paymentReceived: t.paymentReceived
}
}), {
showInProgress: Et
})((function(e) {
var t = e.paymentReceived;
return h.a.createElement(ve.a, {
style: {
width: "100%",
alignItems: "center",
justifyContent: "space-between",
padding: 20,
borderRadius: 20,
backgroundColor: "white"
}
}, t ? h.a.createElement(qn, e) : h.a.createElement(Gn, e))
})),
Jn = n(642),
Xn = n.n(Jn);
function Kn(e) {
e.user,
e.subCart,
e.onCancel,
e.onPressPay;
var t = e.topUpDisplayAmount;
return h.a.createElement(ve.a, {
style: {
flex: 1
}
}, h.a.createElement(ve.a, {
style: {
width: "100%"
}
}, h.a.createElement(Ae, {
style: {
color: R.balance
}
}, "Top Up in progress"), h.a.createElement(Ne, null, "Top Up Pending")), h.a.createElement(En.a, {
size: "large",
color: R.balance,
style: {
margin: 20
}
}), h.a.createElement(ve.a, {
style: {
paddingVertical: 20,
width: D.width - 80,
alignItems: "center"
}
}, h.a.createElement(ve.a, {
style: {
width: "100%",
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(ve.a, {
style: {
paddingVertical: 5,
paddingHorizontal: 10,
alignItems: "center",
justifyContent: "center",
borderRadius: 5,
backgroundColor: R.shade1,
marginRight: 10
}
}, h.a.createElement(Qe, null, "1")), h.a.createElement(Qe, null, "Cashless Top Up")), h.a.createElement(Qe, {
style: {
width: "30%",
textAlign: "right"
}
}, "R ", t))), h.a.createElement(ve.a, {
style: {
width: "95%",
paddingTop: 10,
borderTopWidth: 1,
borderTopColor: R.shade1,
flexDirection: "row",
justifyContent: "space-between"
}
}, h.a.createElement(Ae, {
style: {
fontSize: 18
}
}, "Total"), h.a.createElement(Ae, {
style: {
fontSize: 18
}
}, "R ", t)), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
width: "95%"
}
}, h.a.createElement(De.a, {
title: "CLEAR",
type: "outline",
buttonStyle: {
height: 50,
width: (D.width - 80) / 2,
marginVertical: 10,
borderRadius: 25,
borderWidth: 1,
borderColor: R.shade2
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: R.shade3
},
onPress: function() {
return e.showInProgressTopUp(!1)
}
})), h.a.createElement(Ae, {
style: {
fontSize: 12,
color: R.alert,
textAlign: "center"
}
}, "Topping up your wallet with R " + t + "."))
}
function $n(e) {
e.user,
e.subCart,
e.onCancel,
e.onPressPay,
e.topUpDisplayAmount;
return h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center"
}
}, h.a.createElement(ve.a, {
style: {
width: "100%"
}
}, h.a.createElement(Ae, {
style: {
color: R.balance
}
}, "Success"), h.a.createElement(Ne, null, "Top Up Received")), h.a.createElement(ve.a, {
style: {
width: D.width - 80,
alignItems: "center",
justifyContent: "space-between",
padding: 20,
marginVertical: 20,
borderRadius: 20,
backgroundColor: R.notice
}
}, h.a.createElement(ve.a, {
style: {
width: "100%"
}
}, h.a.createElement(Ae, {
style: {
color: "gray"
}
}, "Woohoo"), h.a.createElement(Ne, {
style: {
color: "white"
}
}, "Congrats!"), h.a.createElement(Ae, {
style: {
color: "gray",
fontSize: 14
}
}, "Your Top Up is now available in your wallet.")), h.a.createElement(Ce.a, {
source: {
uri: Xn.a
},
resizeMode: "contain",
style: {
height: 150,
width: D.width - 120,
marginVertical: 20
}
}), h.a.createElement(De.a, {
title: "TAKE ME HERE",
type: "outline",
buttonStyle: {
height: 50,
width: (D.width - 80) / 1.5,
marginVertical: 10,
borderRadius: 25,
borderWidth: 2,
borderColor: "white",
marginTop: 10
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: "white"
},
onPress: function() {
return e.showInProgressTopUp(!1)
}
})))
}
var ea = Object(j.b)((function(e) {
var t = e.store;
return {
topUpDisplayAmount: t.topUpDisplayAmount,
topUpReceived: t.topUpReceived
}
}), {
showInProgressTopUp: function(e) {
return {
type: "show_in_progress_topup",
bool: e
}
}
})((function(e) {
var t = e.topUpReceived;
return h.a.createElement(ve.a, {
style: {
width: "100%",
alignItems: "center",
justifyContent: "space-between",
padding: 20,
borderRadius: 20,
backgroundColor: "white"
}
}, t ? h.a.createElement($n, e) : h.a.createElement(Kn, e))
})),
ta = D.width / 4,
na = function(e) {
var t = e.children,
n = e.color;
return h.a.createElement(ve.a, {
style: {
height: D.width / 1.3,
width: D.width / 1.3,
justifyContent: "space-between",
marginVertical: 80
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
justifyContent: "space-between"
}
}, h.a.createElement(ve.a, {
style: [aa.frameCorner, aa.borderTopLeft, {
borderColor: n
}]
}), h.a.createElement(ve.a, {
style: [aa.frameCorner, aa.borderTopRight, {
borderColor: n
}]
})), h.a.createElement(ve.a, {
style: aa.children
}, t), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
justifyContent: "space-between"
}
}, h.a.createElement(ve.a, {
style: [aa.frameCorner, aa.borderBottomLeft, {
borderColor: n
}]
}), h.a.createElement(ve.a, {
style: [aa.frameCorner, aa.borderBottomRight, {
borderColor: n
}]
})))
},
aa = Ye.a.create({
frameCorner: {
height: ta,
width: ta,
borderRadius: 20
},
children: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0,
alignItems: "center",
justifyContent: "center"
},
borderTopLeft: {
borderTopWidth: 2,
borderLeftWidth: 2,
borderTopRightRadius: 0,
borderBottomLeftRadius: 0
},
borderTopRight: {
borderRightWidth: 2,
borderTopWidth: 2,
borderTopLeftRadius: 0,
borderBottomRightRadius: 0
},
borderBottomLeft: {
borderLeftWidth: 2,
borderBottomWidth: 2,
borderBottomRightRadius: 0,
borderTopLeftRadius: 0
},
borderBottomRight: {
borderBottomWidth: 2,
borderRightWidth: 2,
borderTopRightRadius: 0,
borderBottomLeftRadius: 0
}
}),
ra = function(e) {
var t = e.onOk;
return h.a.createElement(ve.a, {
style: {
alignItems: "center"
}
}, h.a.createElement(yn, {
subTitle: "Tag Link",
title: "Success",
body: "Your RFID card is succesfully linked to your wallet balance. You may now use your RFID card to transact at any point of sale."
}), h.a.createElement(We.a, {
name: "ios-checkmark-circle",
size: 60,
color: R.pay,
style: {
margin: 20
}
}), h.a.createElement(Ae, {
style: {
color: R.pay,
fontSize: 18,
margin: 15
}
}, "Tag link success!"), h.a.createElement(De.a, {
title: "OK",
type: "outline",
buttonStyle: {
height: 50,
width: 180,
margin: 10,
borderRadius: 25,
borderWidth: 2,
borderColor: R.pay
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: R.pay
},
onPress: t
}))
},
oa = function(e) {
return h.a.createElement(mn, null, h.a.createElement(ra, e))
},
ia = function(e) {
var t = e.onOk;
return h.a.createElement(ve.a, {
style: {
alignItems: "center"
}
}, h.a.createElement(yn, {
subTitle: "Tag Link",
title: "Failed",
body: "Your RFID card may already be in use, be invalid or faulty. Make your way to the nearest help station to resolve the problem."
}), h.a.createElement(We.a, {
name: "md-close-circle",
size: 60,
color: R.alert,
style: {
margin: 20
}
}), h.a.createElement(Ae, {
style: {
color: R.alert,
fontSize: 18,
margin: 15
}
}, "Tag already in use!"), h.a.createElement(De.a, {
title: "OK",
type: "outline",
buttonStyle: {
height: 50,
width: 180,
margin: 10,
borderRadius: 25,
borderWidth: 2,
borderColor: R.alert
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: R.alert
},
onPress: t
}))
},
la = function(e) {
return h.a.createElement(mn, null, h.a.createElement(ia, e))
},
sa = n(204),
ca = (n(1085), function(e) {
e.onClearModal,
e.onAgree,
e.onDeny,
e.showButtons;
var t = e.privacy_policy;
Object(sa.a)().width;
return h.a.createElement(ve.a, {
style: ua.modalContainer
}, h.a.createElement(Ze, Ee()({}, e, {
title: "Terms of engagement",
style: {
zIndex: 10
},
onBackPress: function() {
return e.setShowTermsModal(!1)
}
})), h.a.createElement(Vn.a, {
contentContainerStyle: ua.scrollContainer
}, h.a.createElement(y.a, {
style: ua.textParagraph
}, t)))
}),
ua = Ye.a.create({
modalContainer: {
flex: 1,
backgroundColor: R.bg,
borderTopRightRadius: 15,
borderTopLeftRadius: 15,
margin: -20,
marginTop: 10,
alignItems: "center",
alignSelf: "center"
},
scrollContainer: {
flex: 1,
width: "100%",
paddingHorizontal: 20,
alignItems: "center"
},
textParagraph: {
textAlign: "center",
width: "80%",
marginVertical: 5,
color: R.textSolid
}
}),
da = (n(325), n(608)),
ma = n(659),
ga = n(154),
ha = (n(303), function(e) {
var t = e.items,
n = e.label,
a = e.addStyle,
r = e.onSelect,
o = e.selectedItem,
i = Object(g.useState)(!1),
l = c()(i, 2),
s = l[0];
l[1];
return h.a.createElement(ve.a, {
style: [pa.inputContainer, {
borderColor: s ? R.highlight : R.shade3,
borderWidth: s ? 2 : 1,
width: "100%"
}, a]
}, h.a.createElement(ve.a, {
style: {
position: "absolute",
top: -10,
left: 15,
backgroundColor: R.bg,
borderRadius: 5
}
}, h.a.createElement(ve.a, {
style: {
flex: 1,
borderRadius: 5,
backgroundColor: R.bg1
}
}, h.a.createElement(Ae, {
style: {
color: R.balance,
fontSize: 14,
paddingHorizontal: 5
}
}, n))), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
marginVertical: 10,
width: "120%",
alignItems: "center"
}
}, h.a.createElement(ga.a, {
selectedValue: o,
style: {
height: 50,
width: "100%",
borderWidth: 0,
backgroundColor: "transparent",
color: R.textSolid
},
onValueChange: function(e, t) {
return r(e)
}
}, t.map((function(e, t) {
return h.a.createElement(ga.a.Item, {
label: e.prod_title + " @ R" + e.price,
value: e.id,
key: t
})
})))))
}),
pa = Ye.a.create({
inputContainer: {
height: 50,
paddingHorizontal: 30,
marginVertical: 10,
alignItems: "center",
justifyContent: "center",
borderRadius: 10
},
inputStyle: {
fontSize: 16,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent",
color: R.primaryText,
borderBottomWidth: 1,
borderBottomColor: R.shade1
},
inputTextFocussed: {
fontSize: 16,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent",
color: R.primaryText,
borderBottomColor: R.highlight,
borderBottomWidth: 2
}
}),
fa = function(e) {
var t = e.items,
n = e.label,
a = e.addStyle,
r = e.selectedItem,
o = e.onSelect,
i = Object(g.useState)(!1),
l = c()(i, 2),
s = l[0];
l[1];
return h.a.createElement(ve.a, {
style: [ya.inputContainer, {
borderColor: s ? R.highlight : R.shade3,
borderWidth: s ? 2 : 1
}, a]
}, h.a.createElement(ve.a, {
style: {
position: "absolute",
top: -10,
left: 20,
backgroundColor: R.bg,
borderRadius: 5
}
}, h.a.createElement(ve.a, {
style: {
flex: 1,
borderRadius: 5,
paddingHorizontal: 5,
backgroundColor: R.bg1
}
}, h.a.createElement(Ae, {
style: {
color: R.balance,
fontSize: 14
}
}, n))), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
marginVertical: 10,
width: "100%",
alignItems: "center"
}
}, h.a.createElement(ga.a, {
selectedValue: r,
style: {
height: 50,
width: "100%",
borderWidth: 0,
backgroundColor: "transparent",
color: R.textSolid
},
onValueChange: function(e, t) {
o(parseFloat(e))
}
}, t.map((function(e, t) {
return h.a.createElement(ga.a.Item, {
label: e,
value: e,
key: t
})
})))))
},
ya = Ye.a.create({
inputContainer: {
height: 50,
paddingHorizontal: 30,
marginVertical: 10,
alignItems: "center",
justifyContent: "center",
borderRadius: 10
},
inputStyle: {
fontSize: 16,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent",
color: R.primaryText,
borderBottomWidth: 1,
borderBottomColor: R.shade1
},
inputTextFocussed: {
fontSize: 16,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent",
color: R.primaryText,
borderBottomColor: R.highlight,
borderBottomWidth: 2
}
});
function ba(e) {
var t = e.qty,
n = e.onIncPress,
a = e.onDecPress;
return h.a.createElement(ve.a, {
style: [wa.incContainer, e.style]
}, h.a.createElement(Ge.a, {
onPress: a,
style: wa.decreaseContainer
}, h.a.createElement(Qe, {
style: {
color: R.balance,
fontSize: 22
}
}, "-")), h.a.createElement(ve.a, {
style: wa.qtyContainer
}, h.a.createElement(Qe, {
style: {
color: R.textSolid
}
}, t)), h.a.createElement(Ge.a, {
onPress: n,
style: wa.increaseContainer
}, h.a.createElement(Qe, {
style: {
color: R.balance,
fontSize: 22
}
}, "+")))
}
var wa = Ye.a.create({
incContainer: {
height: 50,
width: D.width / 2.8,
borderRadius: 10,
margin: 10,
backgroundColor: R.bg2,
flexDirection: "row",
justifyContent: "center",
borderWidth: 1,
borderColor: R.shade1,
shadowColor: "rgba(0,0,0,0)"
},
decreaseContainer: {
width: "35%",
height: "100%",
alignItems: "center",
justifyContent: "center",
backgroundColor: "transparent",
paddingLeft: 5
},
increaseContainer: {
width: "35%",
height: "100%",
alignItems: "center",
justifyContent: "center",
backgroundColor: "transparent",
paddingRight: 5
},
qtyContainer: {
width: "30%",
height: "100%",
alignItems: "center",
justifyContent: "center",
borderLeftWidth: .5,
borderRightWidth: .5,
borderColor: R.bg2
}
});
function Ea(e) {
var t = e.onRemove;
return h.a.createElement(Ge.a, {
onPress: t,
style: [va.incContainer, {
alignItems: "center"
}]
}, h.a.createElement(Ue.a, {
name: "trash-2",
size: 18,
color: R.alert,
style: {
marginRight: 10
}
}), h.a.createElement(Qe, {
style: {
color: R.alert
}
}, "Remove"))
}
var va = Ye.a.create({
incContainer: {
height: 50,
width: D.width / 2.8,
borderRadius: 10,
margin: 10,
backgroundColor: R.bg2,
flexDirection: "row",
justifyContent: "center",
borderWidth: 1,
borderColor: R.shade1,
shadowColor: "rgba(0,0,0,0)"
}
}),
Ca = n(1317),
ja = function(e) {
var t = e.type,
n = (e.style, e.addStyle),
a = e.title,
r = e.titleStyle,
o = e.icon,
i = (e.iconName, e.iconSize, e.iconColor, e.iconStyle, e.onPress),
l = e.disabled,
s = e.loading,
c = Object(g.useRef)(null),
u = Object(Ca.a)(c);
return h.a.createElement(Be.a, {
activeOpacity: .8,
underlayColor: "transparent",
ref: c,
onPress: i,
disabled: l,
style: ["solid" === t ? Sa.buttonSolidStyle : Sa.buttonOutlineStyle, u && {
opacity: .7
}, n]
}, h.a.createElement(ve.a, null, !s && o, !s && h.a.createElement(Qe, {
style: [{
fontSize: 16,
color: "white"
}, r]
}, a), s && h.a.createElement(En.a, {
size: "small",
color: "white",
style: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0
}
})))
},
Sa = Ye.a.create({
buttonOutlineStyle: {
marginVertical: 20,
height: 60,
borderRadius: 30,
borderWidth: 2,
borderColor: R.balance,
backgroundColor: R.bg1,
alignItems: "center",
justifyContent: "center"
},
buttonSolidStyle: {
marginVertical: 20,
height: 60,
borderRadius: 30,
backgroundColor: R.balance,
alignItems: "center",
justifyContent: "center"
},
iconButton: {
justifyContent: "space-around",
margin: 10
}
});
var Oa = Object(De.d)(Object(j.b)(null, {
showAuthModal: st
})((function(e) {
e.theme;
var t = e.altTitle;
return h.a.createElement(ve.a, {
style: Ia.container
}, h.a.createElement(ve.a, {
style: {
width: "80%"
}
}, t ? h.a.createElement(Qe, {
style: Ia.alertText
}, t) : h.a.createElement(Qe, {
style: Ia.alertText
}, "To complete payment, sign in using One Time Pin. NO full signup required."), h.a.createElement(ja, {
title: "SIGN IN",
type: "solid",
addStyle: {
marginBottom: 0,
marginHorizontal: 20
},
onPress: function() {
e.showAuthModal(!0)
}
})))
}))),
Ia = Ye.a.create({
container: {
alignItems: "center"
},
alertText: {
textAlign: "center",
fontSize: 12,
color: R.alert,
margin: 10,
marginBottom: 0
}
}),
xa = n(68),
Ta = {
duration: 500,
create: {
type: xa.a.Types.linear,
property: xa.a.Properties.scaleXY
},
update: {
type: xa.a.Types.easeInEaseOut
}
};
function Pa() {
xa.a.configureNext(Ta)
}
function Ma(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function ka(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? Ma(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ma(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var za = function(e) {
return new Intl.NumberFormat("en-US", {
maximumSignificantDigits: 3
}).format(e)
},
Da = function(e) {
return h.a.createElement(ve.a, {
style: [{
height: .5,
width: "95%",
alignSelf: "center",
backgroundColor: R.bg2,
marginVertical: 15
}, e.style]
})
},
Ra = function(e) {
var t = e.prod;
return h.a.createElement(ve.a, {
style: {
width: "100%",
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
marginVertical: 5,
paddingHorizontal: 5
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
maxWidth: "75%"
}
}, h.a.createElement(ve.a, {
style: {
paddingVertical: 5,
paddingHorizontal: 10,
alignItems: "center",
justifyContent: "center",
borderRadius: 5,
backgroundColor: R.shade1,
marginRight: 10
}
}, h.a.createElement(Qe, {
style: {
color: R.textSolid
}
}, t.qty)), h.a.createElement(ve.a, {
style: {
maxWidth: "90%"
}
}, h.a.createElement(Qe, {
numberOfLines: 1,
ellipsizeMode: "tail",
style: {
fontSize: 10,
color: R.shade4
}
}, t.event_title), h.a.createElement(Qe, {
numberOfLines: 2,
ellipsizeMode: "tail",
style: {
color: R.textSolid
}
}, t.prod_title))), h.a.createElement(Qe, {
style: {
width: "25%",
textAlign: "right",
color: R.textSolid
}
}, "R ", za(t.qty * t.price)))
},
La = function(e) {
var t = e.fees;
return h.a.createElement(ve.a, {
style: {
width: "45%"
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(Ae, {
style: [{
color: R.balance,
fontSize: 12
}]
}, "Booking fees"), h.a.createElement(Ne, {
style: {
color: R.textSolid,
fontSize: 12
}
}, "R ", t)), h.a.createElement(ve.a, {
style: {
height: .5,
width: "95%",
alignSelf: "center",
backgroundColor: R.bg2,
marginVertical: 10
}
}), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(Ae, {
style: [{
color: R.balance,
fontSize: 12
}]
}, "VAT incl."), h.a.createElement(Ne, {
style: {
color: R.textSolid,
fontSize: 12
}
}, "15%")))
};
var Na = Object(j.b)((function(e) {
var t = e.users,
n = t.user,
a = t.userPasses,
r = e.config,
o = r.inviteVerified,
i = r.isCashless,
l = e.store,
s = l.subCart,
c = l.product,
u = s.map((function(e) {
return e.qty * e.booking_fee
})).reduce((function(e, t) {
return e + t
}), 0) || 0;
return {
user: n,
inviteVerified: o,
isCashless: i,
event: c,
subCart: s,
subCartTotal: s.map((function(e) {
return e.qty * e.price
})).reduce((function(e, t) {
return e + t
}), 0) + u,
subCartFees: u,
userPassesIds: a.map((function(e) {
return e.prod_id
}))
}
}), {
updateSubCart: function(e) {
return function(t) {
t({
type: "update_subcart_success",
payload: e
})
}
},
spinnerBalance: vt,
showInProgress: Et,
showAuthModal: st,
showCart: Ct,
showAltPaymentOptions: jt,
onYocoPay: Rt,
onZapperPay: Lt,
onSnapScanPay: Nt,
onAirDoshPay: function(e) {
return function(t) {
var n = e.user,
a = e.paymentType,
r = e.amount,
o = e.subCart,
i = Pe.httpsCallable("airDoshPay");
t(kt(!0)),
t(zt(!0)),
i({
user: n,
paymentType: a,
amount: r,
subCart: o
}).then((function(e) {
t(kt(!1)),
t(Dt(a))
}))
}
},
setShowTermsModal: Bt
})((function(e) {
var t = e.modalStyle,
n = e.childStyle,
a = e.onModalCancel,
r = (e.setShowTermsModal, e.user),
o = e.inviteVerified,
i = (e.isCashless, e.subCart),
l = e.subCartTotal,
s = e.subCartFees,
u = Object(g.useState)(null),
d = c()(u, 2),
m = d[0],
p = d[1],
f = Object(g.useState)("card"),
y = c()(f, 2),
b = y[0],
w = y[1],
E = Object(g.useState)(!1),
v = c()(E, 2),
C = v[0],
j = v[1],
S = Object(g.useState)(!1),
O = c()(S, 2),
I = O[0],
x = O[1];
function T(e) {
var t = window.document.getElementsByTagName("script")[0],
n = window.document.createElement("script");
n.src = e,
n.async = !0,
t.parentNode.insertBefore(n, t)
}
return Object(g.useEffect)((function() {
T("https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"),
T("https://js.yoco.com/sdk/v1/yoco-sdk-web.js")
}), []), Object(g.useEffect)((function() {
r && j(!1)
}), [r]), h.a.createElement(Yt.a, {
animation: "zoomInUp",
duration: 200
}, h.a.createElement(mn, {
style: t && t,
childStyle: n && n
}, !!t && h.a.createElement(We.a, {
name: "ios-close",
size: 50,
color: R.highlight,
style: {
zIndex: 10,
position: "absolute",
right: 20,
paddingHorizontal: 15,
backgroundColor: R.bg1,
borderRadius: 15
},
onPress: function() {
return a()
}
}), h.a.createElement(Vn.a, {
style: {
flex: 1
}
}, h.a.createElement(yn, {
subTitle: "Checkout",
title: "My Cart",
body: "Review the cart. Add or Remove items before Checkout.",
style: {
width: "70%"
}
}), h.a.createElement(ve.a, {
style: {
alignItems: "center",
marginHorizontal: 15
}
}, i.map((function(t, n) {
return h.a.createElement(Yt.a, {
key: n,
animation: "zoomIn",
duration: 300
}, h.a.createElement(ve.a, {
style: {
width: D.width - 80,
alignItems: "center"
}
}, h.a.createElement(Da, null), h.a.createElement(Ra, {
prod: t
}), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
justifyContent: "space-between"
}
}, h.a.createElement(ba, {
qty: t.qty,
onIncPress: function() {
var a = i[n],
r = a.pax,
o = a.paxSold,
l = a.max_per_cart,
s = t.qty,
c = !l || s <= l - 1,
u = e.userPassesIds.filter((function(e) {
return e === i[n].prod_id
})).length,
d = l && s + u >= l,
m = l && s === l,
g = r - o,
h = parseInt(i[n].qty) + 1;
s < g && c && (i[n].qty = h, e.updateSubCart(i), p(null)),
p(0 !== u && d ? {
index: n,
message: "You have already purchased the maximum quantity of " + (l && l) + "."
} : m ? {
index: n,
message: "Max quantity of " + (l && l) + " selected."
} : null)
},
onDecPress: function() {
p(null),
t.qty >= 2 ? (i[n].qty = i[n].qty - 1, e.updateSubCart(i)) : p({
index: n,
message: "Press the Remove button to discard item"
})
}
}), h.a.createElement(Ea, {
onRemove: function() {
i.splice(n, 1),
e.updateSubCart(i),
p(null)
}
})), !!m && m.index === n && h.a.createElement(Yt.a, {
animation: "bounceIn"
}, h.a.createElement(Qe, {
style: {
fontSize: 12,
color: R.alert
}
}, m.message))))
}))), h.a.createElement(mn, {
style: {
flex: 1,
alignItems: "flex-start",
alignSelf: "center",
backgroundColor: R.bg2,
borderWidth: 1,
borderColor: R.shade1,
width: D.width - 80,
shadowColor: "rgba(0,0,0,0.0)"
},
childStyle: {
flex: 1,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
width: D.width - 80
}
}, h.a.createElement(fn, {
subTitle: "Your Total",
title: "R " + za(l)
}), h.a.createElement(La, {
fees: s
})), h.a.createElement(Da, null), h.a.createElement(yn, {
subTitle: "Single Click Checkout",
title: "Payment Options",
body: "Checkout and pay using Snap Scan, Zapper, Credit Card or the balance in your wallet."
}), h.a.createElement(ve.a, {
style: {
marginTop: 15
}
}, !!r && "airdosh" === b && r.credit + r.pendingCredit > l && h.a.createElement(Ae, null, "You have R ", za(r.credit + r.pendingCredit), " in your wallet. Once you PAY NOW, your balance will be R", " ", za(r.credit + r.pendingCredit - l), " "), !!r && "airdosh" === b && r.credit + r.pendingCredit !== 0 && r.credit + r.pendingCredit < l && h.a.createElement(Ae, null, "You have R ", za(r.credit + r.pendingCredit), " in your wallet. You may use your wallet credit towards the purchase, then pay the balance of R", " ", za(l - (r.credit + r.pendingCredit)), " ", "using one of the alternative payment options"), "snapscan" === b ? h.a.createElement(Ae, {
style: {
color: R.notice
}
}, "You will be redirected to the Snap Scan app, your account details and the amount of R ", za(l), " will be pre-filled. Simply press PAY and return to the wallet to find your purchased items.") : "zapper" === b ? h.a.createElement(Ae, {
style: {
color: R.notice
}
}, "You will be redirected to the Zapper app, your account details and the amount of R ", za(l), " will be pre-filled. Simply press PAY and return to the wallet to find your purchased items.") : "card" === b ? h.a.createElement(Ae, {
style: {
color: R.notice
}
}, "Use your bank card for the once-off payment of R", " ", za(l), ". Upon successful payment, return to the wallet to find your purchased items.") : null), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
justifyContent: "center",
marginTop: 15,
padding: 15,
backgroundColor: R.bg2,
borderRadius: 15
}
}, h.a.createElement(Nn, {
name: "snapscan",
size: 7,
selected: "snapscan" === b,
onPress: function() {
Pa(),
w("snapscan")
}
}), h.a.createElement(Nn, {
name: "card",
size: 7,
selected: "card" === b,
onPress: function() {
Pa(),
w("card")
}
})), !o && h.a.createElement(Ae, {
style: _a.alertText
}, "Checkout available to invited guests only."), h.a.createElement(ve.a, null, !I && h.a.createElement(Ae, {
style: _a.alertText
}, "Accept the terms of purchase."), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(Ge.a, {
onPress: function() {
Pa(),
x(!I),
!r && j(!0)
},
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(ma.a, {
style: {
margin: 10
},
value: I,
color: I ? R.highlight : void 0
}), I ? h.a.createElement(Ht, {
style: {
color: R.textSolid
}
}, "Accepted terms of purchase") : h.a.createElement(Ht, {
style: {
color: R.textSolid
}
}, "I accept terms of purchase")), h.a.createElement(Ge.a, {
onPress: function() {
Pa(),
x(!I),
!r && j(!0)
},
style: {
padding: 10
}
}, h.a.createElement(da.a, {
onPress: function() {
return e.setShowTermsModal(!0)
},
name: "information-outline",
size: 25,
color: R.highlight
})))), !!C && h.a.createElement(Oa, null), r && "airdosh" === b && r.credit + r.pendingCredit < l ? h.a.createElement(vn, {
type: "solid",
title: "Split Payment",
addStyle: {
marginTop: 20
},
onPress: function() {
r && e.showCart(!1),
e.showAltPaymentOptions(!0)
}
}) : h.a.createElement(vn, {
type: "solid",
title: "Pay Now",
addStyle: {
marginTop: 20
},
disabled: !o || !I || !r,
onPress: function() {
!r && j(!0),
r && e.showCart(!1),
r && "card" === b && e.onYocoPay(ka(ka(ka(ka({}, e.event), e.route.params.item), e), {}, {
user: r,
paymentType: "buyTicket",
amount: l,
subCart: i
})),
r && "zapper" === b && e.onZapperPay({
user: r,
orgId: orgId,
event_id: event_id,
paymentType: "buyTicket",
amount: l,
subCart: i
}),
r && "snapscan" === b && e.onSnapScanPay({
user: r,
paymentType: "buyTicket",
amount: l,
subCart: i
}),
r && "airdosh" === b && r.credit + r.pendingCredit - l >= 0 && e.onAirDoshPay({
user: r,
paymentType: "buyTicket",
amount: l,
subCart: i
})
}
}))))
})),
Aa = D.width - 200,
_a = Ye.a.create({
incConcontainer: {
height: 50,
width: D.width / 2.8,
borderRadius: 25,
margin: 10,
backgroundColor: "white",
flexDirection: "row",
justifyContent: "center",
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 15
},
container: {
width: D.width - 40,
borderRadius: 15,
margin: 20,
marginVertical: 10,
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
image: {
width: "100%",
height: Aa,
borderTopLeftRadius: 15,
borderTopRightRadius: 15
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: D.width - 40,
height: Aa,
justifyContent: "flex-end",
padding: 20
},
alertText: {
textAlign: "center",
fontSize: 14,
color: R.alert,
margin: 10,
marginBottom: 0
}
}),
Ba = Ye.a.create({
container: {
flex: 1
},
bottomNavBar: {
flexDirection: "row",
margin: 10,
paddingVertical: 10,
paddingHorizontal: 30,
width: D.width / 2,
justifyContent: "space-between",
backgroundColor: "white",
opacity: .5,
borderRadius: 50
},
header: {
flex: 1,
alignItems: "center",
justifyContent: "space-between",
alignSelf: "stretch",
justifyContent: "space-between",
alignItems: "center",
elevation: 4
},
title: {
color: R.primary,
fontSize: 28
},
titleOverGradient: {
position: "absolute",
left: 20,
bottom: 10,
backgroundColor: "transparent",
fontSize: 25,
marginBottom: 0,
marginLeft: 0
},
name: {
fontSize: 26,
fontWeight: "500",
marginBottom: 20,
marginTop: 20,
color: R.highlight,
fontFamily: L.primary
},
z1: {
zIndex: 1
},
abs: {
position: "absolute"
},
fullWidth: {
width: "100%"
},
halfHeight: {
height: D.height / 2
},
fullHeight: {
height: D.height
},
width90: {
width: "90%"
},
itemsCenter: {
alignItems: "center"
},
justifyBetween: {
justifyContent: "space-between"
},
rowCenter: {
flexDirection: "row",
alignItems: "center"
},
rowCenterEnd: {
flexDirection: "row",
alignItems: "center",
justifyContent: "flex-end"
},
rowCenterAround: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-around"
},
rowCenterBetween: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
},
shadow1: {
shadowColor: "rgba(0,0,0,1)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: 1,
shadowRadius: 20
},
pasm: {
padding: 10
},
pxsm: {
paddingHorizontal: 10
},
pysm: {
paddingVertical: 10
},
ptsm: {
paddingTop: 10
},
pbsm: {
paddingBottom: 10
},
plsm: {
paddingLeft: 10
},
prsm: {
paddingRight: 10
},
mamd: {
margin: 10
},
mxmd: {
marginHorizontal: 10
},
mymd: {
marginVertical: 10
},
mtmd: {
marginTop: 10
},
mbmd: {
marginBottom: 10
},
mlmd: {
marginLeft: 10
},
mrmd: {
marginRight: 10
},
pamd: {
padding: 15
},
pxmd: {
paddingHorizontal: 15
},
pymd: {
paddingVertical: 15
},
ptmd: {
paddingTop: 15
},
pbmd: {
paddingBottom: 15
},
plmd: {
paddingLeft: 15
},
prmd: {
paddingRight: 15
},
mamd: {
margin: 15
},
mxmd: {
marginHorizontal: 15
},
mymd: {
marginVertical: 15
},
mtmd: {
marginTop: 15
},
mbmd: {
marginBottom: 15
},
mlmd: {
marginLeft: 15
},
mrmd: {
marginRight: 15
}
}),
Wa = n(53),
Ua = n(56),
Va = n(14),
Ya = n.n(Va);
var Ha = n(644),
Fa = n.n(Ha),
Za = n(645),
Ga = n.n(Za),
qa = (D.height, D.width, ["#E4E5E7", "#E4E5E7"]),
Qa = function(e) {
var t = e.disabled,
n = e.addStyle,
a = e.onPress,
r = e.children,
o = e.title;
return h.a.createElement(Ge.a, {
disabled: t,
onPress: a,
style: [{
position: "absolute",
backgroundColor: "transparent",
height: 80,
width: 80,
borderRadius: 40
}, n]
}, h.a.createElement(qe.a, {
colors: qa,
start: {
x: 0,
y: 1
},
end: {
x: 1,
y: 0
},
style: {
zIndex: 1,
position: "absolute",
top: 0,
width: "100%",
height: "100%",
alignItems: "center",
justifyContent: "center",
borderRadius: 40
}
}, r, h.a.createElement(Qe, {
style: {
position: "absolute",
bottom: -25,
width: 100,
textAlign: "center",
color: R.textSolid,
opacity: .7,
fontSize: 15
}
}, o)))
},
Ja = function(e) {
var t = e.user,
n = (e.item, e.bgcol),
a = e.addStyle;
return h.a.createElement(ve.a, {
style: [Ka.buttonContainer, a]
}, h.a.createElement(Qa, {
title: "Passes",
addStyle: {
bottom: -30,
left: -75
},
gradient: ["#CC0860", "#A3095D"],
onPress: function() {
return E("PassesHome")
}
}, h.a.createElement(da.a, {
name: "ticket-outline",
size: 35,
color: "#2E3E5C"
})), h.a.createElement(Qa, {
title: "Order",
addStyle: {
bottom: -95,
left: 10
},
gradient: ["#A3095D", "#770A5A"],
bgcol: n,
onPress: function() {
return E("OrderToSeatHome")
}
}, h.a.createElement(Ce.a, {
source: {
uri: Fa.a
},
resizeMode: "contain",
style: Ka.iconStyle
})), h.a.createElement(Qa, {
title: "Top Up",
addStyle: {
bottom: -95,
right: 10
},
gradient: ["#770A5A", "#3B0A54"],
bgcol: n,
onPress: function() {
E("PaymentHome", {
user: t
})
}
}, h.a.createElement(Ue.a, {
name: "plus",
size: 40,
color: "#2E3E5C"
})), h.a.createElement(Qa, {
title: "Market",
addStyle: {
bottom: -30,
right: -75
},
gradient: ["#3B0A54", "#0D0A4F"],
bgcol: n,
onPress: function() {
E("StoreHome")
}
}, h.a.createElement(Ce.a, {
source: {
uri: Ga.a
},
resizeMode: "contain",
style: Ka.iconStyle
})))
},
Xa = function(e) {
var t = e.user,
n = t && t.pendingCredit ? t.pendingCredit : 0;
null !== t && t.credit;
return h.a.createElement(ve.a, null, h.a.createElement(Ja, Ee()({
bgcol: R.highlight,
addStyle: {}
}, e)))
},
Ka = Ye.a.create({
buttonContainer: {
zIndex: 1,
marginTop: -215,
marginBottom: 130,
height: D.width > 375 ? 210 : D.width / 1.8,
width: D.width > 375 ? 210 : D.width / 1.8
},
iconStyle: {
height: 33,
width: 33
}
});
function $a(e) {
var t = function() {
if ("undefined" === typeof Reflect || !Reflect.construct)
return !1;
if (Reflect.construct.sham)
return !1;
if ("function" === typeof Proxy)
return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
} catch (e) {
return !1
}
}();
return function() {
var n,
a = ln()(e);
if (t) {
var r = ln()(this).constructor;
n = Reflect.construct(a, arguments, r)
} else
n = a.apply(this, arguments);
return rn()(this, n)
}
}
D.height;
var er = D.width,
tr = function(e) {
nn()(n, e);
var t = $a(n);
function n() {
return Jt()(this, n), t.apply(this, arguments)
}
return Kt()(n, [{
key: "render",
value: function() {
var e,
t = this.props,
n = (t.onPress, t.inviteVerified, t.isCashless, t.user),
a = t.spinner,
r = t.addStyle,
o = n && n.pendingCredit ? n.pendingCredit : 0,
i = null !== n ? n.credit + o : 0;
return h.a.createElement(ve.a, {
style: [nr.circleContainer, r]
}, n ? h.a.createElement(ve.a, {
style: nr.circle
}, h.a.createElement(Ae, {
style: {
fontSize: 14,
color: R.textSolid
}
}, "BALANCE"), h.a.createElement(ve.a, {
style: nr.amountContainer
}, a ? h.a.createElement(ve.a, null, h.a.createElement(En.a, {
size: "small",
color: "black"
}), h.a.createElement(Ht, {
style: {
fontSize: 10,
marginTop: 5
}
}, "Processing your balance...")) : h.a.createElement(Ne, {
style: {
color: R.textSolid,
fontSize: 36,
margin: 5,
marginBottom: 0
}
}, null == (e = parseInt(i)) ? void 0 : e.toFixed(2))), h.a.createElement(Ae, {
style: {
fontSize: 20,
color: R.textSolid
}
}, "ZAR")) : h.a.createElement(ve.a, {
style: {
backgroundColor: R.bg,
borderRadius: 50
}
}, h.a.createElement(vn, Ee()({}, this.props, {
title: "Sign In",
type: "solid",
addStyle: [nr.buttonAddStyle, {
backgroundColor: R.balance
}],
titleStyle: {
fontSize: 20,
color: "white"
}
}))))
}
}]), n
}(g.Component),
nr = Ye.a.create({
circleContainer: {
alignItems: "center",
justifyContent: "center",
height: D.width > 375 ? 210 : D.width / 1.8,
width: D.width > 375 ? 210 : D.width / 1.8,
marginTop: -105
},
circle: {
alignItems: "center",
justifyContent: "center",
backgroundColor: R.bg,
height: D.width > 375 ? 210 : D.width / 1.8,
width: D.width > 375 ? 210 : D.width / 1.8,
borderRadius: D.width / 3.6,
shadowColor: "rgba(45,185,177,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
amountContainer: {
width: "85%",
backgroundColor: R.bg1,
height: "35%",
borderRadius: 40,
alignItems: "center",
justifyContent: "center",
margin: 10,
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 13
},
buttonAddStyle: {
zIndex: 3,
width: er / 1.8,
height: 80,
borderRadius: 40,
borderColor: "#CC0860",
margin: 10
},
topUp: {
position: "absolute",
right: 0,
bottom: 0,
alignItems: "center",
justifyContent: "center",
backgroundColor: "white",
height: 60,
width: 60,
borderRadius: 30,
padding: 10,
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
}
}),
ar = function(e) {
var t = e.onClearModal;
return h.a.createElement(mn, {
style: rr.modalContainer,
childStyle: {
alignItems: "center"
}
}, h.a.createElement(bn, {
heading: "Limited Access",
subHeading: "Oops",
onClose: t
}), h.a.createElement(Ae, {
style: {
textAlign: "center",
width: "80%",
color: R.textSolid,
opacity: .7
}
}, "The wallet is available to invited guests only, some features may not be accessible to you. If this is in error, you may restart the process by clicking the link provided in the inital invite SMS. Alternatively you may browse around the app."), h.a.createElement(De.a, {
title: "OK",
type: "solid",
buttonStyle: {
height: 50,
width: 150,
margin: 10,
marginVertical: 20,
borderRadius: 10,
backgroundColor: R.balance
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: "white"
},
onPress: t
}))
},
rr = Ye.a.create({
modalContainer: {
alignItems: "center",
alignSelf: "center"
}
});
function or(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function ir(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? or(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : or(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
function lr(e) {
var t = function() {
if ("undefined" === typeof Reflect || !Reflect.construct)
return !1;
if (Reflect.construct.sham)
return !1;
if ("function" === typeof Proxy)
return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
} catch (e) {
return !1
}
}();
return function() {
var n,
a = ln()(e);
if (t) {
var r = ln()(this).constructor;
n = Reflect.construct(a, arguments, r)
} else
n = a.apply(this, arguments);
return rn()(this, n)
}
}
D.width,
D.height,
window.navigator,
window.navigator.standalone;
var sr = "https://wa.me/27834490928/?text=" + encodeURI("I need assistance with.."),
cr = function(e) {
var t,
n = e.navigation,
a = e.user;
return a ? h.a.createElement(ve.a, null, 0 === (null == a || null == (t = a.activeTagId) ? void 0 : t.length) ? h.a.createElement(De.a, {
title: "LINK NEW TAG",
type: "outline",
buttonStyle: {
height: 40,
width: 150,
borderRadius: 20,
borderWidth: 2,
borderColor: "white"
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: "white"
},
onPress: function() {
return n.navigate("LinkTag", a)
}
}) : h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(wn.a, {
name: "link",
size: 18,
color: R.highlight,
style: {
marginRight: 10
}
}), h.a.createElement(Ht, {
style: {
color: R.highlight,
fontWeight: "bold"
}
}, "Tag linked"))) : h.a.createElement(Ge.a, {
onPress: function() {
return f.a.openURL(sr)
},
style: {
flexDirection: "row",
alignItems: "center",
borderRadius: 30,
backgroundColor: "rgba(255,255,255,0.2)",
paddingVertical: 7,
paddingHorizontal: 20
}
}, h.a.createElement(wn.a, {
name: "whatsapp",
size: 24,
color: "white",
style: {
marginRight: 10
}
}), h.a.createElement(Ht, {
style: {
color: "white"
}
}, "Help"))
},
ur = function(e) {
nn()(n, e);
var t = lr(n);
function n() {
var e;
Jt()(this, n);
for (var a = arguments.length, r = new Array(a), o = 0; o < a; o++)
r[o] = arguments[o];
return (e = t.call.apply(t, [this].concat(r))).state = {
cellphoneNumber: "",
showInviteVerificationModal: !1
}, e
}
return Kt()(n, [{
key: "componentDidMount",
value: function() {
var e,
t,
n,
a,
r,
o,
i,
l,
s,
c = this;
return d.a.async((function(u) {
for (;;)
switch (u.prev = u.next) {
case 0:
if (t = this.props.navigation, n = this.props.route.params, a = !!n && !!n.orgId && !!n.event_id, r = "NAVIGATION_STATE", !a) {
u.next = 9;
break
}
o = this.props.route.params,
i = o.orgId,
l = o.event_id,
this.props.fetchSingleEvent(i, l).then((function(e) {
var n = e.wallet_url;
S.isMobile || D.width < 650 ? (c.props.updateThemeImage(e.titleImage), c.props.fetchAllEvents(), t.navigate("SingleEventDetail", ir({
item: e
}, c.props))) : t.dispatch(Ua.StackActions.replace("Desktop", {
screen: "DesktopWallet",
params: {
wallet_url: n
}
}))
})),
u.next = 14;
break;
case 9:
return this.props.fetchAllEvents(), this.props.setGlobalInitializing(!1), u.next = 13, d.a.awrap(C.a.removeItem(r));
case 13:
E("WalletOverview");
case 14:
s = (null == (e = this.props.route.params) ? void 0 : e.cellNo) || "0",
this.setState({
cellphoneNumber: s
}),
this.props.parseCellNo(s);
case 17:
case "end":
return u.stop()
}
}), null, this, null, Promise)
}
}, {
key: "componentDidUpdate",
value: function(e) {
var t = this.props.user;
this.props.route.params !== e.route.params && this.props.updateUser(this.props.route.params),
t && !e.user && this.props.fetchUser(t._id)
}
}, {
key: "render",
value: function() {
var e = this,
t = this.state.cellphoneNumber,
n = this.props.navigation,
a = Ba.abs,
r = Ba.z1,
o = Ba.fullWidth,
i = (Ba.fullHeight, Ba.halfHeight, Ba.itemsCenter),
l = (Ba.justifyBetween, Ba.pxsm),
s = Ba.ptsm,
c = Ba.rowCenterAround,
u = Ba.rowCenterBetween,
d = Ba.masm,
m = (Ba.width90, this.props),
g = m.user,
p = m.product,
f = m.spinnerBalance,
y = m.backgroundImage,
b = (m.carouselData, m.showPurchaseInProgress),
w = m.currentPurchaseObj,
E = (m.inviteVerified, this.state.showInviteVerificationModal);
Te.currentUser;
return h.a.createElement(_e.a, {
style: {
backgroundColor: "black",
flex: 1,
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(Wa.a, {
source: {
uri: y
},
resizeMode: "cover",
style: [r, o, i, {
height: D.height / 1.7
}]
}, h.a.createElement(qe.a, {
colors: ["rgba(0,0,0, 0.7)", "rgba(0,0,0,0.2)", "transparent", "transparent", "transparent", "transparent"],
style: [a, o, {
top: 0,
height: "100%"
}]
}), h.a.createElement(ve.a, {
style: [i, o]
}, h.a.createElement(ve.a, {
style: [o, l, s, c]
}, h.a.createElement(Ge.a, {
disabled: null === g,
style: [u, d, {
width: 90
}],
onPress: function() {
return n.navigate("Settings", {
user: g
})
}
}, h.a.createElement(Ue.a, {
name: "settings",
size: 25,
color: R.shade3,
style: {
marginRight: 3
}
}), h.a.createElement(Ue.a, {
name: "user",
size: 28,
color: R.shade3
}), g ? h.a.createElement(Ue.a, {
name: "shield",
size: 27,
color: R.pay
}) : h.a.createElement(Ue.a, {
name: "shield-off",
size: 27,
color: R.shade3
})), h.a.createElement(cr, this.props)))), h.a.createElement(qe.a, {
colors: [R.bg, R.bg],
style: {
zIndex: 2,
flex: 1,
width: "100%",
alignItems: "center",
backgroundColor: "black"
}
}, h.a.createElement(tr, Ee()({}, this.props, {
parsedCellNo: t,
addStyle: {
zIndex: 2
},
user: g,
onPress: function() {
e.props.showAuthModal(!0)
},
spinner: f
})), h.a.createElement(Xa, {
user: g,
item: p,
addStyle: {
zIndex: 3
}
})), h.a.createElement(ke.a, {
isVisible: b,
onBackdropPress: function() {
return console.log("onBackdropPress, whatevs")
}
}, h.a.createElement(Qn, {
user: g,
cellphoneNumber: t,
currentPurchaseObj: w
})), h.a.createElement(ke.a, {
isVisible: E,
onBackdropPress: function() {
return e.setState({
showInviteVerificationModal: !1
})
}
}, h.a.createElement(ar, {
onClearModal: function() {
return e.setState({
showInviteVerificationModal: !1
})
}
})))
}
}]), n
}(g.Component),
dr = Object(j.b)((function(e) {
var t = e.users,
n = t.user,
a = t.spinnerBalance,
r = e.config,
o = r.theme,
i = r.carouselData,
l = r.inviteVerified,
s = r.isCashless,
c = e.store,
u = c.showPurchaseInProgress,
d = c.currentPurchaseObj;
return {
user: n,
product: c.product,
inviteVerified: l,
isCashless: s,
spinnerBalance: a,
backgroundImage: o.backgroundImage,
carouselData: i,
showPurchaseInProgress: u,
currentPurchaseObj: d
}
}), {
setGlobalInitializing: lt,
updateUser: gt,
fetchUser: function(e) {
return function(t) {
$e.doc(e).get().then((function(n) {
var a = n.data();
tt(a),
at(t, e)
}))
}
},
verifyGuestByCell: xt,
fetchAllEvents: function() {
return function(e) {
xe.collectionGroup("events").get().then((function(t) {
var n = [];
t.forEach((function(e) {
n.push(e.data())
})),
e({
type: "fetch_events_success",
fetchedEvents: n
})
}))
}
},
fetchSingleEvent: function(e, t) {
return function(n) {
return xe.collection("entities").doc(e).collection("events").doc(t).get().then((function(e) {
if (e.exists)
return e.data()
}))
}
},
fetchDashboard: function(e, t) {
return function(e) {}
},
showAuthModal: st,
parseCellNo: function(e) {
return {
type: "parsed_cellno_success",
cellNo: e
}
},
updateThemeImage: ft
})(ur),
mr = function(e) {
var t = e.placeholder,
n = e.onChangeText,
a = e.addStyle,
r = e.value,
o = e.keyboardType,
i = e.secureTextEntry,
l = Object(g.useState)(!1),
s = c()(l, 2),
u = s[0],
d = s[1];
return h.a.createElement(ve.a, {
style: u ? gr.focussedInputContainer : gr.inputContainer
}, h.a.createElement(y.a, {
style: [{
marginLeft: 20,
color: R.textSolid
}, u && {
color: R.pay,
fontWeight: "bold"
}]
}, "ZAR"), h.a.createElement(Ft.a, {
onChangeText: n,
value: r,
style: [gr.inputStyle, {
fontSize: 16
}, a],
autoCapitalize: "none",
placeholder: t,
autoCorrect: !1,
secureTextEntry: i,
keyboardType: o,
onFocus: function() {
return d(!0)
},
onBlur: function() {
return d(!1)
}
}))
},
gr = Ye.a.create({
focussedInputContainer: {
height: 60,
width: "100%",
borderWidth: 2,
borderRadius: 10,
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
borderColor: R.pay,
paddingHorizontal: 20,
paddingVertical: 5,
marginTop: 15
},
inputContainer: {
height: 60,
width: "100%",
borderWidth: 1,
borderRadius: 10,
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
borderColor: R.shade2,
paddingHorizontal: 20,
paddingVertical: 5,
marginTop: 15
},
inputStyle: {
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent",
color: R.textSolid,
paddingHorizontal: 10
},
inputTextFocussed: {
color: R.primaryText,
paddingHorizontal: 10,
borderBottomColor: R.highlight,
borderBottomWidth: 2
}
});
n(1241);
function hr(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function pr(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? hr(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : hr(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
function fr(e) {
var t = function() {
if ("undefined" === typeof Reflect || !Reflect.construct)
return !1;
if (Reflect.construct.sham)
return !1;
if ("function" === typeof Proxy)
return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), !0
} catch (e) {
return !1
}
}();
return function() {
var n,
a = ln()(e);
if (t) {
var r = ln()(this).constructor;
n = Reflect.construct(a, arguments, r)
} else
n = a.apply(this, arguments);
return rn()(this, n)
}
}
var yr = D.width / 5,
br = je.a.functions().httpsCallable("appleSession"),
wr = function(e) {
nn()(n, e);
var t = fr(n);
function n() {
var e;
Jt()(this, n);
for (var a = arguments.length, r = new Array(a), o = 0; o < a; o++)
r[o] = arguments[o];
return (e = t.call.apply(t, [this].concat(r))).state = {
paymentMethod: "snapscan",
topUpAmount: 0,
minAmountNotice: !1,
signInNotice: !1
}, e.onApplePay = function() {
var e = new ApplePaySession(3, {
countryCode: "ZA",
currencyCode: "ZAR",
supportedNetworks: ["visa", "masterCard", "amex", "discover"],
merchantCapabilities: ["supports3DS"],
total: {
label: "Airdosh top up",
amount: "10.00"
}
});
e.begin(),
e.onvalidatemerchant = function(t) {
var n;
return d.a.async((function(a) {
for (;;)
switch (a.prev = a.next) {
case 0:
return n = t.validationURL, a.next = 3, d.a.awrap(br({
validationURL: n
}).then((function(e) {
return e.json()
})).then((function(t) {
e.completeMerchantValidation(t)
})).catch((function(e) {
console.error("Error fetching merchant session", e)
})));
case 3:
case "end":
return a.stop()
}
}), null, null, null, Promise)
}
}, e
}
return Kt()(n, [{
key: "componentDidMount",
value: function() {
this.loadJS("https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js", 0),
this.loadJS("https://js.yoco.com/sdk/v1/yoco-sdk-web.js", 1)
}
}, {
key: "componentDidUpdate",
value: function(e, t) {
var n = this.props.route.params,
a = n.user,
r = (n.orgId, n.event_id, this.state.signInNotice),
o = this.state,
i = o.topUpAmount;
o.minAmountNotice;
i > 2 && !0 === t.minAmountNotice && this.setState({
minAmountNotice: !1
}),
a && r && !e.user && !t.signInNotice && this.setState({
signInNotice: !1
})
}
}, {
key: "loadJS",
value: function(e, t) {
var n = window.document.getElementsByTagName("script")[t],
a = window.document.createElement("script");
a.src = e,
a.async = !0,
n.parentNode.insertBefore(a, n)
}
}, {
key: "render",
value: function() {
var e = this,
t = this.state,
n = t.paymentMethod,
a = t.topUpAmount,
r = t.minAmountNotice,
o = t.signInNotice,
i = this.props.route.params.user,
l = this.props,
s = (l.orgId, l.event_id, l.isCashless),
c = l.hasCashlessEvents;
return h.a.createElement(ve.a, {
style: {
flex: 1,
backgroundColor: R.bg,
alignItems: "center"
}
}, h.a.createElement(mn, {
style: {
alignSelf: "center",
marginTop: 20
}
}, h.a.createElement(ve.a, {
style: {
flex: 1
}
}, h.a.createElement(fn, {
style: {
marginBottom: 10
},
subTitle: "Top up wallet funds",
title: "Payment Options"
}), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
justifyContent: "center",
marginTop: 15
}
}, h.a.createElement(Nn, {
name: "snapscan",
size: 5,
selected: "snapscan" === n,
onPress: function() {
return e.setState({
paymentMethod: "snapscan"
})
}
}), h.a.createElement(Nn, {
name: "card",
size: 5,
selected: "card" === n,
onPress: function() {
return e.setState({
paymentMethod: "card"
})
}
})), o ? h.a.createElement(ve.a, null, h.a.createElement(Ht, {
style: vr.alertText
}, "Sign in to upload funds."), h.a.createElement(ja, {
title: "SIGN IN",
addStyle: {
marginBottom: 0
},
onPress: function() {
return e.props.showAuthModal(!0)
}
})) : h.a.createElement(mr, {
addStyle: {
height: 60
},
value: 0 === a ? "" : a,
onChangeText: function(t) {
return e.setState({
topUpAmount: t
})
},
style: {
fontSize: 16,
width: D.width / 2,
height: 60
},
autoCapitalize: "none",
placeholder: "Amount",
autoCorrect: !1,
keyboardType: "numeric"
}), r && h.a.createElement(Ht, {
style: vr.alertText
}, "A minimum amount of R10 must be uploaded"), h.a.createElement(De.a, {
title: "Pay",
disabled: !s || !c,
buttonStyle: {
height: 60,
width: "100%",
marginVertical: 20,
borderRadius: 10,
backgroundColor: R.highlight,
alignSelf: "flex-start"
},
titleStyle: {
fontWeight: "bold",
fontSize: 18
},
onPress: function() {
!i && e.setState({
signInNotice: !0
}),
i && a < 10 && e.setState({
minAmountNotice: !0
}),
i && a > 10 && "card" === n && e.props.onYocoPay(pr(pr({}, e.props.route.params), {}, {
user: i,
paymentType: "topUp",
amount: a
})),
i && "zapper" === n && e.props.onZapperPay({
user: i,
paymentType: "topUp",
amount: a
}),
i && "snapscan" === n && e.props.onSnapScanPay({
user: i,
paymentType: "topUp",
amount: a
})
}
}), !s && h.a.createElement(Ae, {
style: vr.alertText
}, "Cashless top up not available currently."), c ? h.a.createElement(Ae, {
style: {
textAlign: "center",
margin: 20,
color: R.shade3
}
}, "The uploaded funds will reflect in your wallet, as well as your linked RFID card.") : h.a.createElement(ve.a, null, h.a.createElement(Ht, {
style: vr.alertText
}, "Currently you do not own tickets to any cashless events. We suggest not topping up until you do."), h.a.createElement(De.a, {
title: "Vist Marketplace",
onPress: function() {
return E("StoreHome")
},
buttonStyle: {
height: 50,
width: "100%",
marginVertical: 20,
borderRadius: 10,
backgroundColor: "rgba(83,155,248,0.1)",
alignSelf: "flex-start"
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: R.highlight
}
})))))
}
}]), n
}(g.Component),
Er = Object(j.b)((function(e) {
var t = e.config.isCashless,
n = e.store.products,
a = e.users.userPasses,
r = (new Date).getTime() / 1e3,
o = a.filter((function(e) {
var t,
n;
return (null == (t = e.date) || null == (n = t.startTime) ? void 0 : n.seconds) > r && e.valid && 0 !== e.price
})).map((function(e) {
return e.event_id
}));
return {
hasCashlessEvents: 0 !== n.filter((function(e) {
return o.includes(e.event_id)
})).length,
isCashless: t
}
}), {
showAuthModal: st,
onYocoPay: Rt,
onZapperPay: Lt,
onSnapScanPay: Nt,
spinnerBalance: vt
})(wr),
vr = Ye.a.create({
container: {
flex: 1
},
paymentOption: {
height: yr + 40,
width: yr + 10,
alignItems: "center",
padding: 5,
borderRadius: 20,
justifyContent: "space-between"
},
selectedPaymentOption: {
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
alertText: {
textAlign: "center",
fontSize: 14,
color: R.alert,
margin: 10,
marginBottom: 0
},
title: {
fontWeight: "bold",
color: R.primaryText,
fontSize: 30
}
}),
Cr = n(602),
jr = function(e) {
var t = e.onUnlink,
n = e.onClearModal,
a = e.isAtagLinked;
return h.a.createElement(mn, {
style: Sr.modalContainer
}, h.a.createElement(bn, {
heading: "Unlink RFID Card",
subHeading: "Contactless card",
onClose: n
}), h.a.createElement(ve.a, {
style: {
alignItems: "center"
}
}, a ? h.a.createElement(Ae, null, "Are you sure you want to unlink?") : h.a.createElement(Ae, null, "No tag currently linked"), h.a.createElement(De.a, {
title: "UNLINK TAG",
type: "solid",
disabled: !a,
buttonStyle: {
height: 40,
width: 150,
marginVertical: 20,
borderRadius: 20,
backgroundColor: R.highlight
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: "white"
},
onPress: t
}), h.a.createElement(Ae, {
style: {
textAlign: "center",
width: "80%",
color: "gray"
}
}, "Note: When unlinking your contactless card, you will no longer be able to make payments with the card. If the card was faulty, replace and link a new card. If unlinking was in error, you may relink a card by rescanning the QR code.")))
},
Sr = Ye.a.create({
modalContainer: {
alignItems: "center",
alignSelf: "center"
}
}),
Or = function(e) {
var t = e.onSignout,
n = e.onClearModal;
return h.a.createElement(mn, {
style: Ir.modalContainer,
childStyle: {
alignItems: "center"
}
}, h.a.createElement(bn, {
heading: "Sign Out",
subHeading: "Until next time",
onClose: n
}), h.a.createElement(De.a, {
title: "SIGN OUT",
type: "solid",
buttonStyle: {
height: 60,
width: 150,
margin: 10,
marginBottom: 20,
borderRadius: 10,
backgroundColor: R.highlight
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: "white"
},
onPress: t
}), h.a.createElement(Ae, {
style: {
textAlign: "center",
width: "80%",
marginVertical: 20,
color: R.textSolid,
opacity: .7
}
}, "Note: While signed out of the wallet, access to features such as transacting and top ups are disabled. To continue using wallet, sign in again using your cell number."))
},
Ir = Ye.a.create({
modalContainer: {
alignItems: "center",
alignSelf: "center"
}
}),
xr = n(625),
Tr = "https://docs.google.com/forms/d/e/1FAIpQLSf71zd7rQZZXfxcL30IjsL2z2IC9G8ADTunRDt4sO0-Gg05fA/viewform",
Pr = function(e) {
return h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(xr.a, {
name: "check",
size: 35,
color: R.pay
}), h.a.createElement(Ht, {
style: Dr.mediumText
}, "Success"), h.a.createElement(Ht, {
style: {
textAlign: "center",
width: "80%",
fontSize: 14
}
}, "You will receive a refund within 48 hours."), h.a.createElement(Ht, {
style: Dr.mediumText
}, "Thank you!"), h.a.createElement(vn, {
type: "outline",
title: "Done",
onPress: function() {
e.onClearModal()
}
}))
},
Mr = function() {
return h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(En.a, {
size: "large",
color: R.pay
}), h.a.createElement(Ht, {
style: Dr.mediumText
}, "Requesting refund..."))
},
kr = function(e) {
return h.a.createElement(vn, Ee()({}, e, {
type: "solid",
addStyle: {
marginVertical: 20
}
}))
};
var zr = Object(j.b)((function(e) {
var t = (new Date).getTime() / 1e3,
n = e.users;
return {
user: n.user,
userRefundablePasses: n.userPasses.filter((function(e) {
var n,
a;
return (null == (n = e.date) || null == (a = n.startTime) ? void 0 : a.seconds) > t && e.valid && 0 !== e.price
}))
}
}), {
cashOut: function(e) {
return function(t) {
return d.a.async((function(t) {
for (;;)
switch (t.prev = t.next) {
case 0:
return t.next = 2, d.a.awrap(et.doc(e._id).set(Xe(Xe({}, e), {}, {
requestAt: Ke
})));
case 2:
return t.abrupt("return", $e.doc(e._id).update({
credit: 0,
pendingCredit: 0
}));
case 3:
case "end":
return t.stop()
}
}), null, null, null, Promise)
}
}
})((function(e) {
var t = e.onClearModal,
n = e.route.params.user,
a = (e.userRefundablePasses, n.cellphoneNumber),
r = Object(g.useState)(a),
o = c()(r, 2),
i = o[0],
l = o[1],
s = Object(g.useState)(!1),
u = c()(s, 2),
d = u[0],
m = u[1],
p = Object(g.useState)(!1),
y = c()(p, 2),
b = y[0],
w = y[1],
E = Object(g.useState)(!1),
v = c()(E, 2),
C = (v[0], v[1]),
j = Object(g.useState)([]),
S = c()(j, 2);
return S[0], S[1], Object(g.useEffect)((function() {
m(!1),
w(!1),
C(!1)
}), [t]), h.a.createElement(ve.a, {
style: Dr.modalContainer
}, h.a.createElement(ve.a, {
style: {
width: "100%",
padding: 20,
paddingBottom: 0
}
}, h.a.createElement(bn, {
heading: "FNB e-Wallet",
subHeading: "Request Refund",
body: "NOT required to be an FNB client.",
onClose: t
})), h.a.createElement(Vn.a, {
style: {
paddingBottom: 40
},
contentContainerStyle: Dr.scrollContainer
}, d ? h.a.createElement(Mr, null) : b ? h.a.createElement(Pr, e) : h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center"
}
}, n.credit + n.pendingCredit === 0 ? h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center"
}
}, h.a.createElement(Ht, {
style: {
textAlign: "center",
width: "80%",
fontSize: 14
}
}, "It seems that you have no refundable funds in your cashless wallet. If you are looking to get a refund on tickets purchased, please request a refund by submitting your bank details using the form below. You will be notified of the refund status."), h.a.createElement(Ht, {
style: Dr.mediumText
}, "Note: Refund policy of the organiser and other fees may apply."), h.a.createElement(kr, {
title: "Open Refund Form",
onPress: function() {
return f.a.openURL(Tr)
}
})) : h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center"
}
}, h.a.createElement(Ht, {
style: {
textAlign: "center",
width: "80%",
fontSize: 14
}
}, "You are about to cash out the remaining funds in your Airdosh wallet. You will receive the funds via FNB e-wallet. FNB will send you an SMS to confirm the refund, along with instructions on claiming the funds. E-wallet may be used to withdraw cash from FNB ATMs, buy prepaid airtime, electricity, and more."), h.a.createElement(Ht, {
style: Dr.mediumText
}, "Note: Refund fee of R20 applies."), h.a.createElement(ve.a, {
style: {
width: D.width - 80,
alignItems: "center",
justifyContent: "center",
marginVertical: 20
}
}, h.a.createElement(Gt, {
label: "Phone Number",
placeholder: "e.g. +27823334444",
onChangeText: l,
value: i,
keyboardType: "phone-pad",
autoCompleteType: "tel"
}), h.a.createElement(kr, {
loading: d,
title: "Refund Now",
onPress: function() {
m(!0),
e.cashOut(n).then((function() {
m(!1),
w(!0),
RootNavigation.navigate("WalletOverview")
})).catch((function() {
C(!0)
}))
}
})), h.a.createElement(Ht, {
style: {
textAlign: "center",
width: "80%",
fontSize: 14
}
}, "If you are looking to get a refund on tickets purchased, please request a refund by submitting your bank details using the form below. You will be notified of the refund status."), h.a.createElement(kr, {
title: "Open Refund Form",
onPress: function() {
return f.a.openURL(Tr)
}
})))))
})),
Dr = Ye.a.create({
modalContainer: {
flex: 1,
backgroundColor: "white",
borderTopRightRadius: 15,
borderTopLeftRadius: 15,
margin: -20,
marginTop: 10,
paddingHorizontal: 20,
alignItems: "center"
},
scrollContainer: {
width: "100%",
alignItems: "center",
justifyContent: "center"
},
mediumText: {
fontSize: 14,
textAlign: "center",
fontWeight: "bold",
color: R.textSolid,
width: "100%",
margin: 10
},
miniPassContainer: {
width: D.width - 40,
borderRadius: 15,
marginVertical: 10,
padding: 20,
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
selectedPass: {
flexDirection: "row",
alignItems: "center",
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20,
backgroundColor: R.bg1
}
}),
Rr = function(e) {
var t = e.title,
n = e.onPress;
return h.a.createElement(Ge.a, {
onPress: n,
style: Nr.itemButton
}, h.a.createElement(Ae, {
style: {
color: R.textSolid
}
}, t))
};
var Lr = Object(j.b)((function(e) {
var t = e.config;
return {
inviteVerified: t.inviteVerified,
isCashless: t.isCashless
}
}), {
signOut: mt
})((function(e) {
var t = e.navigation,
n = e.isCashless,
a = e.route.params.user,
r = Object(g.useState)(!1),
o = c()(r, 2),
i = o[0],
l = o[1],
s = Object(g.useState)(!1),
u = c()(s, 2),
d = u[0],
m = u[1],
p = Object(g.useState)(!1),
f = c()(p, 2),
y = f[0],
b = f[1];
void 0 !== a.pendingCredit && a.pendingCredit;
return a.credit, h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center",
justifyContent: "center",
paddingTop: 10,
backgroundColor: R.bg
}
}, h.a.createElement(Cr.a, {
name: "gear",
size: 35,
color: R.textSolid,
style: {
margin: 15
}
}), h.a.createElement(Rr, {
title: "Sign Out",
onPress: function() {
return m(!0)
}
}), n && h.a.createElement(Rr, {
title: "Unlink Tag",
onPress: function() {
return l(!0)
}
}), n && h.a.createElement(Rr, {
title: "Request refund",
onPress: function() {
return b(!0)
}
}), h.a.createElement(Rr, {
title: "Contact"
}), h.a.createElement(Rr, {
title: "Privacy policy"
}), h.a.createElement(Rr, {
title: "Terms of Use"
}), h.a.createElement(ke.a, {
isVisible: i,
onBackdropPress: function() {
return l(!1)
}
}, h.a.createElement(jr, {
isAtagLinked: "" !== a.activeTagId && "0" === a.activeTagId.charAt(0) && "x" === a.activeTagId.charAt(1),
onUnlink: function() {
return function(e) {
return $e.doc(e._id).update({
activeTagId: "",
pendingCredit: je.a.firestore.FieldValue.increment(e.credit),
credit: 0
}).then(E("WalletOverview"))
}(a)
},
onClearModal: function() {
return l(!1)
}
})), h.a.createElement(ke.a, {
isVisible: d,
onBackdropPress: function() {
return m(!1)
}
}, h.a.createElement(Or, {
onSignout: function() {
e.signOut(a),
m(!1),
t.navigate("WalletOverview")
},
onClearModal: function() {
return m(!1)
}
})), h.a.createElement(ke.a, {
isVisible: y,
onBackdropPress: function() {
return b(!1)
}
}, h.a.createElement(zr, Ee()({}, e, {
onCashout: function() {
b(!1)
},
onClearModal: function() {
return b(!1)
}
}))))
})),
Nr = Ye.a.create({
itemButton: {
width: "90%",
alignItems: "center",
justifyContent: "center",
margin: 5,
padding: 20,
backgroundColor: R.shade1,
borderRadius: 5
}
}),
Ar = n(1313),
_r = n(314),
Br = n(1315),
Wr = n(313),
Ur = function(e) {
var t,
n,
a = e.onScanned,
r = Object(g.useState)(!1),
o = c()(r, 2),
i = o[0],
l = o[1],
s = Object(g.useState)(Br.a.Constants.Type.back),
u = c()(s, 2),
d = u[0],
m = (u[1], Ar.a(_r.a, {
ask: !0
})),
p = c()(m, 2),
f = p[0],
y = (p[1], Object(g.useRef)());
Wr.a.Constants.BarCodeType.qr;
var b = function(e) {
var t = "";
e.includes("https://airdosh-wallet.firebaseapp.com/") && (t = e.replace("https://airdosh-wallet.firebaseapp.com/", "0x")),
e.includes("https://wallet.airdosh.co.za/") && (t = e.replace("https://wallet.airdosh.co.za/", "0x")),
a(t)
};
return null != f && null != (t = f.permissions) && null != (n = t.camera) && n.granted ? h.a.createElement(ve.a, {
style: {
flex: 1
}
}, h.a.createElement(Br.a, {
ref: y,
style: {
height: D.height,
width: D.width
},
type: d,
flashMode: Br.a.Constants.FlashMode.torch,
onBarCodeScanned: i ? void 0 : function(e) {
e.type;
var t = e.data;
l(!0),
0 === t.charAt(0) && "x" === t.charAt(1) ? a(t) : b(t)
},
barCodeScannerSettings: {
barCodeTypes: [Wr.a.Constants.BarCodeType.qr]
}
})) : h.a.createElement(ve.a, null, h.a.createElement(En.a, {
color: R.notice
}))
},
Vr = function() {
return h.a.createElement(ve.a, {
style: {
alignItems: "center"
}
}, h.a.createElement(Ne, {
style: {
color: R.notice,
margin: 15
}
}, "Scan QR code"), h.a.createElement(na, {
color: R.notice
}), h.a.createElement(De.a, {
title: "Cancel",
type: "outline",
buttonStyle: {
height: 50,
width: D.width - 80,
borderRadius: 25,
borderWidth: 2,
borderColor: R.notice
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: R.notice
},
onPress: function() {
return v()
}
}))
};
var Yr = Object(j.b)((function(e) {
return {
tag_price: e.config.tag_price
}
}), {
insertTagId: function(e) {
var t = e.userId,
n = e.val,
a = e.tag_price;
return function(e) {
var r = je.a.firestore.FieldValue.increment(-a);
$e.doc(t).update({
activeTagId: n,
credit: r
}).then((function() {
e(ot({
user: {
_id: t
},
action: {
label: "User linked an RFID tag to their wallet",
notes: ["Amount paid for tag - R " + a, "Tag ID - " + n, "User ID - " + t]
}
}))
}))
}
},
isTagInUse: function(e) {
return function(t) {
var n,
a;
return d.a.async((function(t) {
for (;;)
switch (t.prev = t.next) {
case 0:
return t.next = 2, d.a.awrap($e.where("activeTagId", "==", e).get());
case 2:
return n = t.sent, a = [], n.forEach((function(e) {
a.push(e.data())
})), t.abrupt("return", 0 !== a.length);
case 6:
case "end":
return t.stop()
}
}), null, null, null, Promise)
}
},
showTagLinkFailModal: _t,
showTagLinkSuccesModal: At
})((function(e) {
var t = e.route,
n = e.tag_price,
a = Object(g.useState)(!1),
r = c()(a, 2),
o = r[0],
i = (r[1], t.params._id);
return h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center",
justifyContent: "center",
marginTop: -50
}
}, h.a.createElement(Ur, Ee()({}, e, {
onScanned: function(t) {
return function(t) {
var a,
r,
l;
return d.a.async((function(s) {
for (;;)
switch (s.prev = s.next) {
case 0:
return a = "x" === t.charAt(1), s.next = 3, d.a.awrap(e.isTagInUse(t));
case 3:
r = s.sent,
l = !a && !o || r && !o,
a && !r && !o && (e.insertTagId({
userId: i,
val: t,
tag_price: n
}), e.showTagLinkSuccesModal(!0), E("WalletOverview")),
l && (e.showTagLinkFailModal(!0), E("WalletOverview"));
case 8:
case "end":
return s.stop()
}
}), null, null, null, Promise)
}(t)
}
})), h.a.createElement(ve.a, {
style: [Hr.overlayStyle]
}, h.a.createElement(qe.a, {
colors: ["rgba(0,0,0,0.8)", "transparent"],
style: Hr.gradient
}), h.a.createElement(Vr, null)))
})),
Hr = Ye.a.create({
overlayStyle: {
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
alignItems: "center",
justifyContent: "center"
},
confirmFrame: {
height: D.width / 2,
width: D.width / 2,
borderWidth: 4,
borderRadius: 5,
borderColor: R.pay,
alignItems: "center",
justifyContent: "center"
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: D.width,
height: 250,
justifyContent: "flex-end",
padding: 20
}
}),
Fr = n(63),
Zr = (n(1265), n(1266), n(1267), function(e) {
return Ya()(1e3 * e).format("Do")
}),
Gr = function(e) {
var t,
n,
a = e.oneColor,
r = e.showTimes,
o = e.item,
i = o.date,
l = o.location;
return h.a.createElement(ve.a, {
style: {
marginVertical: 15
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(Ue.a, {
name: "calendar",
size: 16,
color: R.primaryText,
style: [{
width: "7%"
}, a]
}), h.a.createElement(Ae, {
style: [{
color: R.primaryText,
fontSize: 14,
width: "90%"
}, a]
}, function(e) {
var t = e.startTime,
n = e.endTime;
return Zr(t) === Zr(n) ? "" + Ya()(1e3 * t.seconds).format("dddd Do MMM `YY") : Ya()(1e3 * t.seconds).format("Do MMM YYYY") + " - " + Ya()(1e3 * n.seconds).format("Do MMM YYYY")
}(i))), r && h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(Ue.a, {
name: "clock",
size: 16,
color: "black",
style: [{
width: "7%"
}, a]
}), h.a.createElement(Ae, {
style: [{
color: R.primaryText,
fontSize: 14,
width: "90%"
}, a]
}, Ya()(1e3 * (null == i || null == (t = i.startTime) ? void 0 : t.seconds)).format("hh:mm a"), " -", Ya()(1e3 * (null == i || null == (n = i.endTime) ? void 0 : n.seconds)).format("hh:mm a"))), (null == l ? void 0 : l.address) && h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(Ue.a, {
name: "map-pin",
size: 16,
color: R.primaryText,
style: [{
width: "7%"
}, a]
}), h.a.createElement(Ae, {
style: [{
color: R.primaryText,
fontSize: 14,
width: "90%"
}, a]
}, null == l ? void 0 : l.address)))
};
function qr(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function Qr(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? qr(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : qr(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var Jr = function(e) {
return Ya()(1e3 * e).format("Do")
},
Xr = function(e) {
var t,
n,
a = e.onPress,
r = e.item,
o = (r.type, r.event_title),
i = r.event_description,
l = r.titleImage,
s = r.date;
r.location,
r.price,
r.influencers,
r.attendanceCount;
return h.a.createElement(Be.a, {
activeOpacity: .8,
underlayColor: "transparent",
onPress: function() {
a(),
E("EventDetail", Qr({}, e))
},
style: $r.container
}, h.a.createElement(ve.a, null, h.a.createElement(ve.a, {
style: {
justifyContent: "flex-end"
}
}, h.a.createElement(Ce.a, {
source: {
uri: l
},
resizeMode: "cover",
style: [$r.image, {
zIndex: 1
}]
}), h.a.createElement(qe.a, {
colors: ["transparent", "rgba(0,0,0,0.3)", "rgba(0,0,0,0.5)"],
style: [$r.gradient, {
zIndex: 2
}]
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(ve.a, null), h.a.createElement(De.a, {
title: "Book Now",
buttonStyle: {
borderColor: R.bg,
borderWidth: 2,
height: 45,
width: 130,
alignSelf: "flex-end",
borderRadius: 30,
backgroundColor: "transparent"
},
titleStyle: {
fontWeight: "bold",
fontSize: 14
},
onPress: function() {
return E("EventDetail", Qr({}, e))
}
})))), h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
padding: 15,
zIndex: 0
}
}, h.a.createElement(Ne, {
style: {
color: R.primaryText
}
}, o), h.a.createElement(Ae, {
numberOfLines: 3,
ellipsizeMode: "tail",
style: {
color: R.shade4,
fontSize: 14,
marginBottom: 10
}
}, i), h.a.createElement(Gr, Ee()({}, e, {
showTimes: !0,
showTimes: Jr(null == (t = s.startTime) ? void 0 : t.seconds) === Jr(null == (n = s.endTime) ? void 0 : n.seconds)
})))))
},
Kr = D.width - 100,
$r = Ye.a.create({
container: {
width: D.width - 40,
borderRadius: 15,
margin: 20,
marginVertical: 10,
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
image: {
width: "100%",
height: Kr,
borderTopLeftRadius: 15,
borderTopRightRadius: 15
},
gradient: {
flex: 1,
position: "absolute",
bottom: 0,
width: D.width - 40,
justifyContent: "flex-end",
padding: 20
}
});
function eo(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
var to = function(e) {
var t = e.item,
n = (t.type, t.event_title),
a = (t.event_description, t.titleImage),
r = t.date,
o = t.location;
t.price;
return h.a.createElement(Ge.a, {
onPress: function() {
return E("EventDetail", function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? eo(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : eo(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}({}, e))
},
style: no.container
}, h.a.createElement(ve.a, {
style: {
width: "30%",
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(Ne, {
style: {
color: R.shade3
}
}, "FRI"), h.a.createElement(Ne, {
style: {
color: R.primaryText
}
}, "15th")), h.a.createElement(ve.a, {
style: {
width: "70%"
}
}, h.a.createElement(Ce.a, {
source: {
uri: a
},
resizeMode: "cover",
style: no.image
}), h.a.createElement(ve.a, {
style: no.imageBackground
}, h.a.createElement(Ne, {
style: {
color: "white",
fontSize: 22
}
}, n), h.a.createElement((function() {
var e;
return h.a.createElement(ve.a, {
style: {
marginVertical: 15
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(Ue.a, {
name: "calendar",
size: 16,
color: "white",
style: {
marginRight: 5
}
}), h.a.createElement(Ae, {
style: {
color: "white",
fontSize: 12
}
}, Ya()(1e3 * (null == r || null == (e = r.startTime) ? void 0 : e.seconds)).format("dddd Do MMMM YYYY"))), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(xr.a, {
name: "location-pin",
size: 16,
color: "white",
style: {
marginRight: 5
}
}), h.a.createElement(Ae, {
style: {
color: "white",
fontSize: 12
}
}, null == o ? void 0 : o.address)))
}), null))))
},
no = Ye.a.create({
container: {
flex: 1,
backgroundColor: "white",
width: D.width - 20,
height: 200,
paddingLeft: -20,
borderTopRightRadius: 15,
borderBottomRightRadius: 15,
flexDirection: "row",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
image: {
width: "100%",
height: 200,
borderTopRightRadius: 15,
borderBottomRightRadius: 15
},
imageBackground: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0,
width: "100%",
height: "100%",
padding: 15,
justifyContent: "center",
backgroundColor: "rgba(0,0,0,0.7)",
borderTopRightRadius: 15,
borderBottomRightRadius: 15
}
});
function ao(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
var ro = function(e) {
var t = e.item,
n = (t.type, t.title),
a = t.description,
r = t.titleImage,
o = t.date,
i = t.location,
l = t.price;
return h.a.createElement(Ge.a, {
onPress: function() {
return E("MerchDetail", function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? ao(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ao(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}({}, e))
},
style: [oo.container, {
height: 450,
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20,
margin: 20
}]
}, h.a.createElement(ve.a, {
style: oo.container
}, h.a.createElement(Ce.a, {
source: {
uri: r
},
resizeMode: "cover",
style: oo.image
}), h.a.createElement(qe.a, {
colors: ["transparent", "rgba(0,0,0,0.8)"],
style: oo.gradient
}, h.a.createElement(Ne, {
style: {
color: "white"
}
}, n), h.a.createElement(y.a, {
style: {
color: "white"
}
}, a))), h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
height: 155,
padding: 15
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
marginBottom: 10
}
}, h.a.createElement(Ne, null, "R ", l), h.a.createElement(De.a, {
title: "Buy now",
buttonStyle: {
height: 30,
width: 100,
borderRadius: 30,
backgroundColor: R.pay,
alignSelf: "flex-start"
},
titleStyle: {
fontWeight: "bold",
fontSize: 12
},
onPress: function() {
return console.log("Book now!")
}
})), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(Ue.a, {
name: "calendar",
size: 16,
color: "black",
style: {
marginRight: 5
}
}), h.a.createElement(y.a, null, o)), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(xr.a, {
name: "location-pin",
size: 16,
color: "black",
style: {
marginRight: 5
}
}), h.a.createElement(y.a, null, null == i ? void 0 : i.address))))
},
oo = Ye.a.create({
container: {
flex: 1,
width: D.width - 40,
height: D.width - 80,
borderRadius: 15
},
image: {
width: "100%",
height: D.width - 80,
borderTopLeftRadius: 15,
borderTopRightRadius: 15
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: D.width - 40,
height: D.width - 80,
justifyContent: "flex-end",
padding: 20
}
});
var io = Object(j.b)((function(e) {
var t = e.store.products,
n = e.store.subCart;
return {
user: e.users.user,
products: t.filter((function(e) {
return e.live_status
})).filter((function(e) {
return !e.is_private
})).sort((function(e, t) {
var n,
a,
r,
o;
return new Date(null == e || null == (n = e.date) || null == (a = n.startTime) ? void 0 : a.seconds) - new Date(null == t || null == (r = t.date) || null == (o = r.startTime) ? void 0 : o.seconds)
})),
subCart: n
}
}), {
showCart: Ct,
setGlobalLoading: pt
})((function(e) {
e.navigation;
var t = e.products,
n = e.subCart,
a = Object(g.useRef)(),
r = Object(g.useRef)();
return Object(g.useEffect)((function() {
var e = a.current.offsetTop,
t = r.current.offsetTop,
n = window.addEventListener("scroll", (function() {
var n,
o,
i,
l,
s,
c,
u,
d;
window.pageYOffset > e ? null == a || null == (n = a.current) || null == (o = n.classList) || o.add("sticky") : null == a || null == (i = a.current) || null == (l = i.classList) || l.remove("sticky"),
window.pageYOffset > t ? null == r || null == (s = r.current) || null == (c = s.classList) || c.add("sticky") : null == r || null == (u = r.current) || null == (d = u.classList) || d.remove("sticky")
}));
return function() {
window.removeEventListener("scroll", n)
}
}), []), h.a.createElement(ve.a, {
style: {
backgroundColor: "rgba(0,0,0,0.005)",
flex: 1
}
}, h.a.createElement(ve.a, {
ref: r,
className: "sticky",
style: {
backgroundColor: "rgba(0,0,0,0.2)"
}
}, h.a.createElement(Ve.a, {
intensity: 10,
tint: "dark",
style: {
position: "absolute",
top: 0,
width: "100%",
height: 50
}
})), h.a.createElement(Ze, Ee()({}, e, {
headerRef: a,
subCart: n,
title: "Market place",
onShowCartPress: function() {
return e.showCart(!0)
},
onBackPress: function() {
return v()
}
})), h.a.createElement(ve.a, {
style: {
flex: 1,
paddingHorizontal: 20,
width: D.width,
alignItems: "center"
}
}, h.a.createElement(Fr.a, {
data: t,
renderItem: function(t) {
var n = t.item;
t.i;
return function(e) {
var t = e.item.type;
return "event2" === t ? h.a.createElement(Xr, e) : "event1" === t ? h.a.createElement(to, e) : "merchandise" === t ? h.a.createElement(ro, e) : null
}({
item: n,
onPress: function() {
return e.setGlobalLoading(!0)
}
})
},
keyExtractor: function(e) {
return e.id
}
})))
})),
lo = (Ye.a.create({
backButton: {
position: "absolute",
top: 20,
right: 20,
alignItems: "center",
justifyContent: "center",
backgroundColor: R.bg,
height: 40,
width: 40,
borderRadius: 20,
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
}
}), n(17)),
so = n(105),
co = n(605);
function uo(e) {
var t = e.onAdd,
n = e.disabled;
return h.a.createElement(Ge.a, {
disabled: n,
onPress: t,
style: [mo.incContainer, {
alignItems: "center"
}, n && {
backgroundColor: "gray"
}]
}, h.a.createElement(co.a, {
name: "add-shopping-cart",
size: 18,
color: "white",
style: {
marginRight: 10
}
}), h.a.createElement(Qe, {
style: {
color: "white"
}
}, "Add"))
}
var mo = Ye.a.create({
incContainer: {
height: 50,
width: D.width / 2.8,
borderRadius: 10,
margin: 10,
backgroundColor: R.balance,
flexDirection: "row",
justifyContent: "center",
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 15
}
}),
go = D.width,
ho = function(e) {
var t = e.qty,
n = e.item,
a = n.pax,
r = n.paxSold,
o = n.max_per_cart,
i = n.prod_id,
l = (n.userPassesIds, e.userPassesIds.filter((function(e) {
return e === i
})).length),
s = o && t + l >= o,
c = !o || t <= o - 1,
u = o && t === o,
d = a - r;
return h.a.createElement(ve.a, null, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
justifyContent: "space-between"
}
}, h.a.createElement(ba, {
style: {
backgroundColor: "rgba(255,255,255,0.9)",
marginLeft: 0
},
qty: t,
onIncPress: function() {
return t < d && c && e.setQty(t + 1)
},
onDecPress: function() {
return 1 !== t && e.setQty(t - 1)
}
}), h.a.createElement(uo, {
onAdd: e.onPress,
disabled: r >= a
})), 0 !== l && s && u ? h.a.createElement(Ae, {
style: fo.alertText
}, "You have already purchased the maximum quantity of", " ", o && o) : u ? h.a.createElement(Ae, {
style: fo.alertText
}, "Max quantity of ", o && o, " selected.") : null)
};
var po = Object(j.b)(null, {
toggleImagesLoading: It
})((function(e) {
var t,
n,
a = Object(g.useState)(!0),
r = c()(a, 2),
o = r[0],
i = r[1],
l = Object(g.useState)(1),
s = c()(l, 2),
u = s[0],
d = s[1],
m = e.style,
p = e.user,
f = e.item,
y = (e.disabled, e.expand),
b = (e.isStart, e.isEnd);
return h.a.createElement(so.a, {
disabled: "expressOrder" === f.id && !p && !0,
onPress: function() {
e.setExpand()
},
style: [{
alignItems: "center",
width: go,
height: go,
paddingHorizontal: 20,
marginRight: b ? 0 : -60,
backgroundColor: "transparent"
}, m]
}, h.a.createElement(Wa.a, {
style: {
flex: 1,
width: go - 40,
justifyContent: "flex-end",
marginBottom: 5,
borderRadius: 15,
borderWidth: .5,
borderColor: R.bg1,
overflow: "hidden"
},
source: {
uri: f.url
},
onLoadEnd: function() {
return i(!1)
}
}, h.a.createElement(qe.a, {
colors: y ? ["transparent", "rgba(0,0,0,0.5)", "rgba(0,0,0,0.7)"] : ["transparent", "rgba(0,0,0,0.3)", "rgba(0,0,0,0.7)"],
style: {
justifyContent: "flex-end",
borderRadius: 15,
padding: 20
}
}, !!o && h.a.createElement(En.a, {
size: "large",
color: "black",
style: {
padding: 30
}
}), h.a.createElement(ve.a, null, !(null == f || !f.note) && h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
marginVertical: 5
}
}, h.a.createElement(Ne, {
style: {
fontSize: 12,
paddingVertical: 2,
paddingHorizontal: 7,
borderRadius: 20,
color: R.primaryText,
backgroundColor: "white"
}
}, null == f ? void 0 : f.note), h.a.createElement(wn.a, {
name: "eye",
size: 18,
color: "transparent",
style: {
alignSelf: "flex-end"
}
})), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, !(null == f || !f.startTime) && h.a.createElement(Ae, {
style: {
color: R.primary,
marginRight: 5
}
}, (n = null == f || null == (t = f.startTime) ? void 0 : t.seconds, Ya()(1e3 * n).format("MMM Do `YY")), " |"), h.a.createElement(Ae, {
style: {
color: R.primary
}
}, "From R ", null == f ? void 0 : f.price)), h.a.createElement(Ne, {
style: {
fontSize: 22,
color: R.primary
}
}, f.prod_title), !!y && h.a.createElement(ho, Ee()({}, e, {
onPress: function() {
return e.onAddItem(f.prod_id, u)
},
setQty: function(e) {
return d(e)
},
qty: u
})), y ? h.a.createElement(Vn.a, {
style: {
maxHeight: 150,
marginHorizontal: -15,
paddingHorizontal: 15
}
}, h.a.createElement(Ae, {
style: {
width: "100%",
color: R.primary
}
}, f.prod_description)) : h.a.createElement(Ae, {
style: {
width: "100%",
color: R.primary
},
numberOfLines: 2
}, f.prod_description)))))
})),
fo = Ye.a.create({
alertText: {
textAlign: "left",
fontSize: 14,
color: R.alert,
margin: 5
}
});
function yo(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function bo(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? yo(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : yo(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
k.a.get("window").width,
D.width;
var wo = Object(j.b)((function(e) {
return {
productList: e.store.productList,
userPassesIds: e.users.userPasses.map((function(e) {
return e.prod_id
}))
}
}), {
addToCart: wt
})((function(e) {
e.addStyle;
var t = e.carouselData,
n = e.productList,
a = e.route.params.item,
r = (Object(g.useRef)(null), Object(g.useState)(!1)),
o = c()(r, 2),
i = (o[0], o[1], Object(g.useState)(!1)),
l = c()(i, 2),
s = (l[0], l[1], Object(g.useState)(!1)),
u = c()(s, 2),
d = u[0],
m = u[1];
Object(g.useEffect)((function() {}), [t]);
var p = h.a.useState(D.width),
f = c()(p, 2),
y = f[0],
b = (f[1], D.width),
w = (y - b) / 2,
E = h.a.useRef(new lo.a.ValueXY).current;
return h.a.createElement(Yt.a, {
animation: "zoomInUp",
duration: 500
}, h.a.createElement(Fr.a, {
horizontal: !0,
data: t,
style: {
backgroundColor: "white",
width: D.width
},
contentInsetAdjustmentBehavior: "never",
snapToAlignment: "center",
decelerationRate: "fast",
automaticallyAdjustContentInsets: !1,
showsHorizontalScrollIndicator: !1,
showsVerticalScrollIndicator: !1,
scrollEventThrottle: 1,
snapToInterval: D.width,
contentInset: {
left: w,
right: w
},
contentOffset: {
x: -1 * w,
y: 0
},
onScroll: lo.a.event([{
nativeEvent: {
contentOffset: {
x: E.x
}
}
}], {
useNativeDriver: !1
}),
keyExtractor: function(e, t) {
return t + "-" + e
},
pagingEnabled: !0,
renderItem: function(r) {
var o = r.item,
i = r.index;
return h.a.createElement(lo.a.View, {
style: {
transform: [{
scale: E.x.interpolate({
inputRange: [(i - 1) * b - w, i * b - w, (i + 1) * b - w],
outputRange: [.8, 1, .8],
extrapolate: "clamp"
})
}]
}
}, h.a.createElement(po, Ee()({
item: o,
isStart: 0 === i,
isEnd: t.length - 1 === i,
onAddItem: function(t, r) {
var o = n.findIndex((function(e) {
return e.id === t
}));
e.addToCart(bo(bo({
prod_id: n[o].id
}, n[o]), {}, {
qty: r
}, a)),
e.onProductAdded()
}
}, e, {
expand: d,
setExpand: function() {
return m(!d)
}
})))
}
}))
})),
Eo = function(e) {
var t = e.style,
n = e.title,
a = e.headerRef,
r = (e.onShowCartPress, e.onBackPress);
e.subCart;
return h.a.createElement(_e.a, {
ref: a,
className: "sticky",
style: [{
width: "100%"
}, t]
}, h.a.createElement(Ge.a, {
onPress: r,
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(We.a, {
name: "ios-arrow-back",
size: 24,
color: R.textSolid,
style: {
padding: 20,
paddingHorizontal: 25
}
}), h.a.createElement(Ne, {
numberOfLines: 1,
ellipsizeMode: "tail",
style: {
width: "70%",
fontSize: 20,
justifyContent: "center",
textAlign: "center",
color: R.textSolid
}
}, n)))
},
vo = D.width - 40,
Co = function(e) {
var t = e.item,
n = e.onClearModal,
a = (e.onAgree, e.onDeny, e.showButtons, Object(g.useState)(!0)),
r = c()(a, 2),
o = r[0],
i = r[1];
return h.a.createElement(ve.a, {
style: jo.modalContainer
}, h.a.createElement(Eo, Ee()({}, e, {
title: null == t ? void 0 : t.prod_title,
style: {
zIndex: 10
},
onBackPress: n
})), h.a.createElement(Vn.a, {
contentContainerStyle: jo.scrollContainer
}, h.a.createElement(Wa.a, {
style: {
height: vo,
width: vo,
marginHorizontal: 20,
marginTop: 10,
borderRadius: 15,
borderWidth: .5,
borderColor: R.bg1,
overflow: "hidden",
shadowColor: "rgba(255,255,255,0.5)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 10
},
source: {
uri: null == t ? void 0 : t.url
},
onLoadEnd: function() {
return i(!1)
}
}, h.a.createElement(qe.a, {
colors: ["transparent", "transparent", "black"],
style: {
flex: 1,
borderRadius: 15,
padding: 20,
justifyContent: "flex-end"
}
}, o && h.a.createElement(En.a, {
size: "large",
color: "black"
}), h.a.createElement(Ae, {
style: {
width: .4 * D.width,
color: R.primary
}
}, "From R ", null == t ? void 0 : t.price), h.a.createElement(Ne, {
style: {
fontSize: 22,
color: R.primary
}
}, null == t ? void 0 : t.prod_title))), h.a.createElement(Ae, {
style: {
width: "85%",
marginVertical: 20,
color: R.textSolid,
opacity: .7
}
}, null == t ? void 0 : t.prod_description)))
},
jo = Ye.a.create({
modalContainer: {
flex: 1,
backgroundColor: R.bg,
borderTopRightRadius: 15,
borderTopLeftRadius: 15,
margin: -20,
marginTop: 10,
alignItems: "center",
alignSelf: "center",
borderWidth: .5,
borderColor: R.bg1
},
scrollContainer: {
width: "100%",
alignItems: "center",
alignSelf: "center"
}
}),
So = function(e) {
return Ya()(1e3 * e).format("Do")
},
Oo = function(e) {
var t = e.startTime,
n = e.endTime;
return So(t) === So(n) ? "" + Ya()(1e3 * t.seconds).format("dddd Do MMM `YY") : Ya()(1e3 * t.seconds).format("Do MMM YYYY") + " - " + Ya()(1e3 * n.seconds).format("Do MMM YYYY")
};
var Io = Object(j.b)(null, {})((function(e) {
var t = e.route.params.item,
n = t.date,
a = t.event_title,
r = t.event_description,
o = (t.color1, t.color2, Object(g.useState)(!1)),
i = c()(o, 2),
l = i[0],
s = i[1];
return h.a.createElement(hn, e, h.a.createElement(fn, {
subTitle: Oo(n),
title: a,
subTitleStyle: {
color: "rgba(255,255,255,0.7)"
},
titleStyle: {
color: "white"
}
}), h.a.createElement(Be.a, {
activeOpacity: .9,
underlayColor: "transparent",
onPress: function() {
return s(!l)
}
}, h.a.createElement(ve.a, null, l ? h.a.createElement(Ae, {
style: {
color: "rgba(255,255,255,0.7)",
fontSize: 14,
marginBottom: 10
}
}, r) : h.a.createElement(Ae, {
numberOfLines: 3,
ellipsizeMode: "tail",
style: {
color: "rgba(255,255,255,0.7)",
fontSize: 14,
marginBottom: 10
}
}, r), h.a.createElement(ve.a, {
style: {
alignItems: "flex-end"
}
}, l ? h.a.createElement(ve.a, {
style: To.expandButton
}, h.a.createElement(Ae, {
style: {
color: "white",
opacity: .7
}
}, " ", "Less", " ")) : h.a.createElement(ve.a, {
style: To.expandButton
}, h.a.createElement(Ae, {
style: {
color: "white",
opacity: .7
}
}, " ", "More", " "))))), h.a.createElement(Gr, Ee()({
oneColor: {
color: "white"
},
showTimes: So(n.startTime.seconds) === So(n.endTime.seconds)
}, e.route.params)))
})),
xo = D.width - 200,
To = Ye.a.create({
container: {
width: D.width - 40,
borderRadius: 15,
margin: 20,
marginVertical: 10,
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
image: {
width: "100%",
height: xo,
borderTopLeftRadius: 15,
borderTopRightRadius: 15
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: D.width - 40,
height: xo,
justifyContent: "flex-end",
padding: 20
},
expandButton: {
paddingHorizontal: 10,
paddingVertical: 5,
backgroundColor: "rgba(0,0,0,0.05)",
borderRadius: 8
}
}),
Po = n(575),
Mo = function(e) {
var t = Object(g.useState)(!1),
n = c()(t, 2),
a = n[0],
r = n[1],
o = e.route.params.item.location;
return h.a.createElement(mn, null, h.a.createElement(ve.a, null, h.a.createElement(Ce.a, {
source: {
uri: Po
},
resizeMode: "cover",
style: zo.image
}), h.a.createElement(qe.a, {
colors: ["transparent", "rgba(0,0,0,0.4)"],
style: zo.gradient
}, h.a.createElement(De.a, {
title: "GET DIRECTIONS",
type: "outline",
buttonStyle: {
height: 40,
width: 150,
borderRadius: 30,
borderWidth: 2,
borderColor: "white"
},
titleStyle: {
fontWeight: "bold",
fontSize: 12,
color: "white"
},
onPress: function() {
return f.a.openURL(null == o ? void 0 : o.mapLink)
}
}))), h.a.createElement(fn, {
style: {
marginTop: 20
},
subTitle: (null == o ? void 0 : o.address) || "Get Directions",
title: "Event Location",
body: null == o ? void 0 : o.directions
}), h.a.createElement(Ge.a, {
onPress: function() {
return r(!a)
}
}, a ? h.a.createElement(Ae, {
style: {
color: R.shade4,
fontSize: 14,
marginBottom: 10
}
}, null == o ? void 0 : o.directions) : h.a.createElement(Ae, {
numberOfLines: 3,
ellipsizeMode: "tail",
style: {
color: R.shade4,
fontSize: 14,
marginBottom: 10
}
}, null == o ? void 0 : o.directions), h.a.createElement(ve.a, {
style: {
alignItems: "flex-end"
}
}, a ? h.a.createElement(ve.a, {
style: zo.expandButton
}, h.a.createElement(Ae, {
style: zo.expandButtonText
}, " ", "Less", " ")) : h.a.createElement(ve.a, {
style: zo.expandButton
}, h.a.createElement(Ae, {
style: zo.expandButtonText
}, " ", "More", " ")))))
},
ko = D.width - 220,
zo = Ye.a.create({
container: {
width: D.width - 40,
borderRadius: 15,
margin: 20,
marginVertical: 10,
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
image: {
width: D.width - 40,
height: ko,
borderTopLeftRadius: 15,
borderTopRightRadius: 15,
marginHorizontal: -20,
marginTop: -20
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: D.width - 40,
height: ko,
justifyContent: "flex-end",
padding: 20,
marginHorizontal: -20,
marginTop: -20
},
expandButton: {
paddingHorizontal: 10,
paddingVertical: 5,
backgroundColor: "rgba(0,0,0,0.05)",
borderRadius: 8
},
expandButtonText: {
color: R.textSolid
}
}),
Do = n(660),
Ro = n(651),
Lo = n.n(Ro),
No = n(652),
Ao = n.n(No),
_o = function(e) {
var t = e.title,
n = e.children;
return h.a.createElement(ve.a, {
style: {
width: "50%",
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, n, h.a.createElement(Ae, {
style: {
fontSize: 14,
color: R.shade4,
marginLeft: 10
}
}, t))
},
Bo = function(e) {
var t = e.route.params.item.amenities || [];
return h.a.createElement(ve.a, {
style: {
flexDirection: "row",
flexWrap: "wrap",
justifyContent: "space-between",
marginRight: 10
}
}, t.includes("parking") && h.a.createElement(_o, {
title: "Parking"
}, h.a.createElement(Do.a, {
name: "car-alt",
size: 18,
color: R.shade4
})), t.includes("swim") && h.a.createElement(_o, {
title: "Swimming"
}, h.a.createElement(Do.a, {
name: "swimmer",
size: 18,
color: R.shade4
})), t.includes("food") && h.a.createElement(_o, {
title: "Food Market"
}, h.a.createElement(da.a, {
name: "food-fork-drink",
size: 20,
color: R.shade4
})), t.includes("lgbtq-safe") && h.a.createElement(_o, {
title: "LGBTQ Safe"
}, h.a.createElement(da.a, {
name: "cards-heart",
size: 20,
color: R.shade4
})), t.includes("taxi-only") && h.a.createElement(_o, {
title: "UBER only"
}, h.a.createElement(da.a, {
name: "taxi",
size: 20,
color: R.shade4
})), t.includes("yoga") && h.a.createElement(_o, {
title: "Yoga"
}, h.a.createElement(Ce.a, {
source: {
uri: Lo.a
},
resizeMode: "contain",
style: Vo.iconStyle
})), t.includes("sound-journey") && h.a.createElement(_o, {
title: "Sound journey"
}, h.a.createElement(Ce.a, {
source: {
uri: Ao.a
},
resizeMode: "contain",
style: Vo.iconStyle
})), t.includes("cashless") && h.a.createElement(_o, {
title: "Cashless"
}, h.a.createElement(da.a, {
name: "contactless-payment",
size: 18,
color: R.shade4
})))
},
Wo = function(e) {
return h.a.createElement(mn, null, h.a.createElement(fn, {
style: {
marginBottom: 10
},
subTitle: "Included",
title: "Amenities"
}), h.a.createElement(Bo, e))
},
Uo = D.width - 200,
Vo = Ye.a.create({
container: {
width: D.width - 40,
borderRadius: 15,
padding: 15,
margin: 20,
marginVertical: 10,
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
image: {
width: "100%",
height: Uo,
borderTopLeftRadius: 15,
borderTopRightRadius: 15
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: D.width - 40,
height: Uo,
justifyContent: "flex-end",
padding: 20
},
iconStyle: {
height: 22,
width: 22,
color: R.shade4
}
});
function Yo(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function Ho(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? Yo(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Yo(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
n(575);
var Fo = function() {
for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 10, t = [1], n = 0; n < e + 1; n++)
0 !== n && !t.includes(n) && t.push(n);
return t
};
var Zo = Object(j.b)(null, {
addToCart: wt
})((function(e) {
var t,
n = e.productList,
a = e.route.params.item,
r = e.onProductAdded;
Object(g.useEffect)((function() {
var e;
s(null == (e = n[0]) ? void 0 : e.id)
}), [n]);
var o = Object(g.useState)(n[0].id),
i = c()(o, 2),
l = i[0],
s = i[1],
u = Object(g.useState)(1),
d = c()(u, 2),
m = d[0],
p = d[1],
f = n.findIndex((function(e) {
return e.id === l
})),
y = (null == (t = n[f]) ? void 0 : t.max_per_cart) || null;
return h.a.createElement(mn, null, h.a.createElement(yn, {
subTitle: "My Cart",
title: "Select Tickets",
body: "Select your ticket type & quantity. Add to your cart. Pay with a single click. Easiest checkout ever."
}), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
marginTop: 10
}
}, h.a.createElement(fa, {
label: "Qty",
items: Fo(y),
selectedItem: m,
onSelect: function(e) {
return p(e)
},
addStyle: {
marginRight: 5,
width: .3 * (D.width - 80)
}
}), h.a.createElement(ha, {
label: "Select Tickets",
items: n,
selectedItem: l,
onSelect: function(e) {
return s(e)
},
addStyle: {
marginLeft: 5,
width: .65 * (D.width - 80)
}
})), h.a.createElement(vn, {
type: "solid",
title: "Add to Cart",
disabled: 0 === n.length,
addStyle: {
marginTop: 10
},
onPress: function() {
var t = n.findIndex((function(e) {
return e.id === l
}));
e.addToCart(Ho(Ho({
prod_id: n[t].id
}, n[t]), {}, {
qty: m
}, a)),
r()
}
}))
})),
Go = D.width - 200,
qo = (Ye.a.create({
container: {
width: D.width - 40,
borderRadius: 15,
margin: 20,
marginVertical: 10,
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
image: {
width: "100%",
height: Go,
borderTopLeftRadius: 15,
borderTopRightRadius: 15
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: D.width - 40,
height: Go,
justifyContent: "flex-end",
padding: 20
}
}), n(618)),
Qo = n(81),
Jo = n(307),
Xo = n.n(Jo),
Ko = n(308),
$o = n.n(Ko),
ei = n(244),
ti = n.n(ei),
ni = n(245),
ai = n.n(ni),
ri = n(309),
oi = n.n(ri),
ii = (n(581), function(e) {
var t = e.uri,
n = e.link;
return h.a.createElement(Ge.a, {
style: {
margin: 12,
marginLeft: 0
},
onPress: function() {
return f.a.openURL(n)
}
}, h.a.createElement(Ce.a, {
source: {
uri: t
},
style: si.icon
}))
});
var li = Object(De.d)((function(e) {
var t = e.style,
n = e.theme,
a = (e.organiser, e.user, e.route.params.item),
r = (a.date, a.id, a.event_title),
o = (a.event_description, a.influencers, a.attendanceCount, n.colors);
return o.primary, o.secondary, o.secondary2, o.white, o.black, h.a.createElement(ve.a, {
style: [si.container, t]
}, h.a.createElement(ii, {
uri: ai.a,
link: "mailto:?subject=You are invited to " + r + ". Follow the link to the event wallet and to purchase your tickets&body=https://wallet.airdosh.co.za"
}), h.a.createElement(ii, {
uri: ti.a,
link: "whatsapp://send?text=You are invited to " + r + ". Follow the link below to the event wallet and to purchase your tickets! https://wallet.airdosh.co.za"
}))
})),
si = Ye.a.create({
container: {
flex: 1,
flexDirection: "row",
alignItems: "center",
flexWrap: "wrap"
},
icon: {
width: 45,
height: 45
}
});
var ci = Object(j.b)((function(e) {
return {
user: e.users.user
}
}), {})((function(e) {
var t = e.user,
n = e.route.params.item,
a = (n.date, n.id),
r = n.event_title;
n.event_description,
n.influencers,
n.attendanceCount,
Object(g.useEffect)((function() {
window.fbAsyncInit = function() {
FB.init({
appId: "3674052485983914",
autoLogAppEvents: !0,
xfbml: !0,
version: "v10.0"
}),
FB.AppEvents.logPageView()
},
function(e, t, n) {
var a,
r = e.getElementsByTagName(t)[0];
e.getElementById(n) || ((a = e.createElement(t)).id = n, a.src = "https://connect.facebook.net/en_US/sdk.js", r.parentNode.insertBefore(a, r))
}(document, "script", "facebook-jssdk")
}), []);
var o = Object(g.useState)(!1),
i = c()(o, 2),
l = i[0],
s = i[1],
u = Object(g.useState)(!1),
d = c()(u, 2),
m = d[0],
p = d[1],
f = Object(g.useState)(!1),
y = c()(f, 2),
b = y[0],
w = y[1];
return h.a.createElement(mn, null, h.a.createElement(yn, {
subTitle: "Rewards",
title: "Campaign",
body: "Earn cash in your wallet, promote this event. Campaigns offer a reward for every referral, that results in the purchase of a ticket."
}), l && h.a.createElement(ve.a, {
style: di.qrContainer
}, h.a.createElement(Qo.a, {
value: "https://wallet.airdosh.co.za/" + a + "/" + t._id,
size: 200
})), b && h.a.createElement(Oa, {
altTitle: "In order to start sharing and earning rewards, sign in using One Time Pin. NO full signup required."
}), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
justifyContent: "center"
}
}, h.a.createElement(vn, {
type: "solid",
icon: h.a.createElement(qo.a, {
name: "facebook",
size: 24,
color: "white"
}),
addStyle: {
marginTop: 20,
width: "50%",
marginHorizontal: 5
},
onPress: function() {
!t && w(!0),
t && FB.ui({
display: "popup",
method: "share",
href: "https://wallet.airdosh.co.za",
redirect_uri: "https://wallet.airdosh.co.za",
hashtag: "#influencer",
quote: "You are invited to " + r + ". Click the link below to purchase tickets! https://wallet.airdosh.co.za/" + a + "/" + t._id
}, (function(e) {}))
}
}), h.a.createElement(vn, {
type: "solid",
addStyle: {
marginTop: 20,
width: "20%",
marginHorizontal: 5
},
onPress: function() {
t && s(!l),
!t && w(!0)
},
icon: h.a.createElement(wn.a, {
name: "qrcode",
size: 18,
color: "white"
})
}), h.a.createElement(vn, {
type: "solid",
addStyle: {
marginTop: 20,
width: "20%",
marginHorizontal: 5
},
onPress: function() {
t && p(!m),
!t && w(!0)
},
icon: h.a.createElement(wn.a, {
name: "share",
size: 18,
color: "white"
})
})), m && h.a.createElement(li, e))
})),
ui = D.width - 200,
di = Ye.a.create({
container: {
width: D.width - 40,
borderRadius: 15,
margin: 20,
marginVertical: 10,
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
image: {
width: "100%",
height: ui,
borderTopLeftRadius: 15,
borderTopRightRadius: 15
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: D.width - 40,
height: ui,
justifyContent: "flex-end",
padding: 20
},
qrContainer: {
flex: 1,
backgroundColor: "white",
alignItems: "center",
justifyContent: "center",
padding: 15,
margin: 20,
borderRadius: 10
}
}),
mi = (n(581), function(e) {
var t = e.uri,
n = e.link;
return h.a.createElement(Ge.a, {
style: {
margin: 12,
marginLeft: 0
},
onPress: function() {
return f.a.openURL(n)
}
}, h.a.createElement(Ce.a, {
source: {
uri: t
},
style: hi.icon
}))
});
var gi = Object(De.d)((function(e) {
var t,
n,
a,
r,
o,
i = e.style,
l = e.theme,
s = e.organiser,
c = l.colors;
return c.primary, c.secondary, c.secondary2, c.white, c.black, h.a.createElement(ve.a, {
style: [hi.container, i]
}, (null == (t = s.org_urls) ? void 0 : t.facebook) && h.a.createElement(mi, {
uri: $o.a,
link: s.org_urls.facebook
}), (null == (n = s.org_urls) ? void 0 : n.instagram) && h.a.createElement(mi, {
uri: Xo.a,
link: s.org_urls.instagram
}), (null == (a = s.org_urls) ? void 0 : a.web) && h.a.createElement(mi, {
uri: oi.a,
link: s.org_urls.web
}), (null == (r = s.org_contact) ? void 0 : r.email) && h.a.createElement(mi, {
uri: ai.a,
link: "mailto:" + s.org_contact.email + "?subject=I need help with my tickets!&body=Here is my problem..."
}), (null == (o = s.org_contact) ? void 0 : o.whatsapp) && h.a.createElement(mi, {
uri: ti.a,
link: "whatsapp://send?phone=" + s.org_contact.whatsapp + "text=Hi there!"
}))
})),
hi = Ye.a.create({
container: {
flex: 1,
flexDirection: "row",
alignItems: "center",
flexWrap: "wrap"
},
icon: {
width: 45,
height: 45
}
}),
pi = function(e) {
var t = e.organiser,
n = t.org_about,
a = t.org_name,
r = Object(g.useState)(!1),
o = c()(r, 2),
i = o[0],
l = o[1];
return h.a.createElement(mn, null, h.a.createElement(fn, {
style: {
marginBottom: 10
},
subTitle: "About",
title: "The Organiser"
}), h.a.createElement(Ge.a, {
onPress: function() {
return l(!i)
}
}, i ? h.a.createElement(Ae, {
style: {
color: R.shade4,
fontSize: 14,
marginBottom: 10
}
}, a, " - ", n) : h.a.createElement(Ae, {
numberOfLines: 3,
ellipsizeMode: "tail",
style: {
color: R.shade4,
fontSize: 14,
marginBottom: 10
}
}, a, " - ", n)), h.a.createElement(gi, e))
},
fi = D.width - 200,
yi = (Ye.a.create({
container: {
width: D.width - 40,
borderRadius: 15,
padding: 15,
margin: 20,
marginVertical: 10,
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
image: {
width: "100%",
height: fi,
borderTopLeftRadius: 15,
borderTopRightRadius: 15
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: D.width - 40,
height: fi,
justifyContent: "flex-end",
padding: 20
}
}), n(654)),
bi = n.n(yi);
function wi(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
t && (a = a.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}))),
n.push.apply(n, a)
}
return n
}
function Ei(e) {
for (var t = 1; t < arguments.length; t++) {
var n = null != arguments[t] ? arguments[t] : {};
t % 2 ? wi(Object(n), !0).forEach((function(t) {
P()(e, t, n[t])
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : wi(Object(n)).forEach((function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t))
}))
}
return e
}
var vi = Object(j.b)((function(e) {
var t = e.store,
n = t.subCart,
a = t.productList,
r = t.imageCollection,
o = t.organiser,
i = t.imagesLoading;
e.dashboard.dashboard;
return {
subCart: n,
organiser: o,
imagesLoading: i,
imageCollection: r,
productList: a.filter((function(e) {
return e.available && e.paxSold < e.pax && 0 !== e.pax
})).sort((function(e, t) {
return e.sort_order - t.sort_order
})),
textAndImages: r.filter((function(e) {
return e.prod_id
})).map((function(e, t) {
var n = a.filter((function(t) {
return t.id === e.prod_id && t.available
})).reduce((function(e, t) {
return t
}), {}),
r = n.available && 0 !== n.pax && n.paxSold >= n.pax,
o = n.available && 0 === n.pax,
i = n.pax - n.paxSold < 10,
l = n.pax - n.paxSold < 0 ? 0 : n.pax - n.paxSold;
return o || r || !n.available ? r ? Ei(Ei(Ei({}, n), e), {}, {
note: "Sold Out"
}) : o ? Ei(Ei(Ei({}, n), e), {}, {
note: "Launching soon"
}) : null : Ei(Ei(Ei({}, n), e), {}, {
note: o || r || !i ? null : l + " left"
})
})).filter((function(e) {
return null !== e
})).sort((function(e, t) {
return e.sort_order - t.sort_order
}))
}
}), {
setGlobalInitializing: lt,
setGlobalLoading: pt,
toggleImagesLoading: It,
fetchOrganiser: function(e, t) {
return function(t) {
(function(e, t) {
return xe.collection("entities").doc(e)
})(e).get().then((function(e) {
if (e.exists) {
var n = e.data();
t({
type: "fetch_event_organiser_success",
organiserObj: n
})
}
}))
}
},
fetchEventProducts: function(e, t) {
return function(n) {
var a;
return d.a.async((function(r) {
for (;;)
switch (r.prev = r.next) {
case 0:
return a = [], r.next = 3, d.a.awrap(St(e, t).get().then((function(e) {
e.forEach((function(e) {
a.push(e.data())
})),
n({
type: "fetch_events_products_success",
eventProducts: a
})
})));
case 3:
return r.abrupt("return", a);
case 4:
case "end":
return r.stop()
}
}), null, null, null, Promise)
}
},
fetchEventImageCollection: function(e, t) {
return function(n) {
(function(e, t) {
return xe.collection("entities").doc(e).collection("events").doc(t).collection("imageCollection")
})(e, t).get().then((function(e) {
var t = [];
e.forEach((function(e) {
t.push(e.data())
})),
n({
type: "fetch_events_images_success",
eventImages: t
})
}))
}
},
updateThemeImage: ft,
setShowTermsModal: Bt,
setRefundPolicy: function(e) {
return {
type: "update_refund_policy",
payload: e
}
},
addToCart: wt
})((function(e) {
var t = e.route.params.item,
n = t.id,
a = t.orgId,
r = t.event_title,
o = (t.titleImage, t.refund_policy),
i = e.subCart,
l = e.productList,
s = e.imageCollection,
u = e.textAndImages,
m = (e.organiser, e.imagesLoading),
p = Object(g.useRef)(),
f = Object(g.useRef)(),
y = Object(g.useState)(!1),
b = c()(y, 2),
w = (b[0], b[1]),
v = Object(g.useState)(null),
C = c()(v, 2),
j = C[0],
S = C[1],
O = Object(g.useState)(!1),
I = c()(O, 2),
x = I[0],
T = I[1];
Object(g.useEffect)((function() {
e.fetchEventProducts(a, n),
e.fetchEventImageCollection(a, n),
e.fetchOrganiser(a, n),
e.setRefundPolicy(o);
var t = p.current.offsetTop,
r = window.addEventListener("scroll", (function() {
var e,
n,
a,
r;
window.pageYOffset > t ? null == p || null == (e = p.current) || null == (n = e.classList) || n.add("sticky") : null == p || null == (a = p.current) || null == (r = a.classList) || r.remove("sticky")
}));
return function() {
window.removeEventListener("scroll", r)
}
}), []),
Object(g.useEffect)((function() {
!function() {
var t,
n,
a,
r,
o,
i,
l,
s,
c,
u;
d.a.async((function(m) {
for (;;)
switch (m.prev = m.next) {
case 0:
if (r = null == e || null == (t = e.route) || null == (n = t.params) || null == (a = n.route) ? void 0 : a.params, !(!!r && !!r.prod_id)) {
m.next = 11;
break
}
return o = r.orgId, i = r.event_id, l = r.prod_id, m.next = 6, d.a.awrap(e.fetchEventProducts(o, i));
case 6:
s = m.sent,
c = e.route.params.item,
u = s.findIndex((function(e) {
return e.id === l
})),
e.addToCart(Ei(Ei({
prod_id: l
}, s[u]), {}, {
qty: 1
}, c)),
setTimeout((function() {
P()
}), 2100);
case 11:
case "end":
return m.stop()
}
}), null, null, null, Promise)
}()
}), []),
Object(g.useEffect)((function() {
return s.length && s.forEach((function(e) {
return Ce.a.prefetch(e.url)
})), function() {
setTimeout((function() {
e.toggleImagesLoading(!1)
}), 2e3)
}
}), [s]),
Object(g.useEffect)((function() {
setTimeout((function() {
e.setGlobalInitializing(!1),
e.setGlobalLoading(!1)
}), 1500)
}), []);
var P = function() {
var e = f.current.getBoundingClientRect();
window.scrollTo(e.left, e.top + window.scrollY - 79)
};
return h.a.createElement(ve.a, {
style: {
backgroundColor: R.bg
}
}, h.a.createElement(Ze, Ee()({}, e, {
headerRef: p,
subCart: i,
title: r,
onBackPress: function() {
E("WalletOverview")
},
onShowCartPress: function() {
P()
},
replaceIcon: function() {
return h.a.createElement(Ce.a, {
source: {
uri: bi.a
},
resizeMode: "contain",
style: Ci.iconStyle
})
}
})), h.a.createElement(ve.a, {
style: Ci.container
}, !m && h.a.createElement(wo, Ee()({}, e, {
carouselData: u,
onPress: function(e) {
S(e),
T(!0)
},
onProductAdded: function() {
P()
}
})), h.a.createElement(Io, e), 0 !== l.length && h.a.createElement(Zo, Ee()({}, e, {
productList: l,
onProductAdded: function() {
P()
}
})), h.a.createElement(ve.a, {
ref: f
}, 0 !== i.length && h.a.createElement(Na, Ee()({}, e, {
thisRef: f,
setShowTermsModal: function(e) {
return w(e)
}
}))), h.a.createElement(Mo, e), !!e.route.params.item.amenities && h.a.createElement(Wo, e), h.a.createElement(ci, e), h.a.createElement(pi, e)), h.a.createElement(ke.a, {
isVisible: x && j,
onBackdropPress: function() {
return T(!1)
}
}, h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
borderRadius: 15,
width: "100%",
height: "100%",
marginVertical: 20
}
}, h.a.createElement(Co, {
item: j,
onClearModal: function() {
return T(!1)
}
}))))
})),
Ci = Ye.a.create({
container: {
flex: 1,
alignItems: "center",
paddingBottom: 20
},
iconStyle: {
height: 22,
width: 22,
color: R.shade4
}
}),
ji = function(e) {
var t = e.route.params.item,
n = (t.type, t.title),
a = t.description,
r = t.titleImage,
o = t.price;
t.options;
return h.a.createElement(ve.a, {
style: Si.container
}, h.a.createElement(Ce.a, {
source: {
uri: r
},
resizeMode: "cover",
style: Si.image
}), h.a.createElement(dn, {
addCol: "white",
onPress: function() {
return v()
}
}), h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
padding: 15
}
}, h.a.createElement(Ne, {
style: {
color: R.primaryText
}
}, n), h.a.createElement(y.a, {
style: {
color: R.primaryText
}
}, a)), h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
height: 155,
padding: 15
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
marginBottom: 10
}
}, h.a.createElement(Ne, null, "R ", o), h.a.createElement(De.a, {
title: "Buy now",
buttonStyle: {
height: 50,
width: 150,
borderRadius: 30,
backgroundColor: R.pay,
alignSelf: "flex-start"
},
titleStyle: {
fontWeight: "bold",
fontSize: 16
},
onPress: function() {
return console.log("Book now!")
}
}))), h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
padding: 15,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(y.a, null, "LOCATION"), h.a.createElement(ve.a, {
style: {
flexDirection: "row"
}
}, h.a.createElement(Ge.a, null, h.a.createElement(y.a, {
style: {
color: R.highlight,
marginRight: 10
}
}, "How do i get there?")), h.a.createElement(We.a, {
name: "ios-arrow-forward",
size: 16,
color: R.highlight
}))))
},
Si = Ye.a.create({
container: {
flex: 1
},
image: {
width: "100%",
height: D.width - 140
},
gradient: {
flex: 1,
position: "absolute",
top: 0,
width: "100%",
height: D.width - 140,
justifyContent: "flex-end",
padding: 20
}
}),
Oi = Object(ze.a)();
var Ii = Object(j.b)((function(e) {
return {
subCart: e.store.subCart
}
}), {})((function(e) {
return e.navigation, e.subCart, h.a.createElement(Oi.Navigator, {
screenOptions: {
headerStyle: {
backgroundColor: R.primaryDark,
shadowOffset: {
height: 0
}
},
headerTitleAlign: "center",
headerTitleStyle: {
fontWeight: "bold",
fontSize: 17,
color: R.primaryText
}
}
}, h.a.createElement(Oi.Screen, {
name: "StoreHome",
component: io,
options: {
headerShown: !1
}
}), h.a.createElement(Oi.Screen, {
name: "EventDetail",
component: vi,
options: {
headerShown: !1
}
}), h.a.createElement(Oi.Screen, {
name: "MerchDetail",
component: ji,
options: {
headerShown: !1
}
}))
})),
xi = n(27),
Ti = n.n(xi),
Pi = n(123),
Mi = n(656),
ki = (n(1297), function(e) {
var t = e.item,
n = (t.id, t.type, t.createdAt, t.updatedAt, t.titleTeam),
a = t.rivalTeam,
r = t.description,
o = (t.titleImage, t.date),
i = t.location,
l = t.price,
s = t.block,
c = t.row,
u = t.seat,
d = t.admission,
m = t.qr,
g = function(e) {
var t = e.label,
n = e.param;
return h.a.createElement(ve.a, {
style: {
alignItems: "center",
margin: 5,
marginHorizontal: 10
}
}, h.a.createElement(y.a, {
style: {
fontSize: 20,
fontWeight: "bold",
color: "white"
}
}, n), h.a.createElement(y.a, {
style: {
color: "white"
}
}, t))
};
return h.a.createElement(ve.a, {
style: zi.cardContainer
}, h.a.createElement(qe.a, {
colors: R.gradient1,
start: {
x: 0,
y: 1
},
end: {
x: 1,
y: 0
},
style: {
flex: 1,
width: "100%",
borderRadius: 15,
padding: 15,
justifyContent: "space-between"
}
}, h.a.createElement(ve.a, {
style: zi.infoContainer
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(g, {
label: "Block",
param: s
}), h.a.createElement(g, {
label: "Row",
param: c
}), h.a.createElement(g, {
label: "Seat",
param: u
}), h.a.createElement(g, {
label: "Admission",
param: d
})), 0 !== n.length && 0 !== a.length ? h.a.createElement(ve.a, {
style: {
alignItems: "center"
}
}, h.a.createElement(Ne, {
style: {
color: "white",
fontSize: 22
}
}, n), h.a.createElement(y.a, {
style: {
color: "white"
}
}, "VS"), h.a.createElement(Ne, {
style: {
color: "white",
fontSize: 22
}
}, a)) : h.a.createElement(Ne, {
style: {
color: "white",
fontSize: 22
}
}, r), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(Ue.a, {
name: "calendar",
size: 16,
color: "white",
style: {
marginRight: 5
}
}), h.a.createElement(y.a, {
style: {
color: "white"
}
}, Ya()(o.seconds).format("dddd Do MMMM YYYY"))), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginVertical: 5
}
}, h.a.createElement(xr.a, {
name: "location-pin",
size: 16,
color: "white",
style: {
marginRight: 5
}
}), h.a.createElement(y.a, {
style: {
color: "white"
}
}, null == i ? void 0 : i.address)), h.a.createElement(Ne, {
style: {
color: "white",
fontSize: 18
}
}, "ZAR ", l)), h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
width: "100%",
alignItems: "center"
}
}, h.a.createElement(ve.a, {
style: {
backgroundColor: "white",
alignItems: "center",
padding: 15,
margin: 20,
marginBottom: 0,
borderRadius: 10
}
}, h.a.createElement(Qo.a, {
value: m,
size: 150
}), h.a.createElement((function() {
return h.a.createElement(ve.a, {
style: {
position: "absolute",
top: 0,
bottom: 0,
alignItems: "center",
justifyContent: "center",
backgroundColor: "rgba(255,255,255,0.9)",
height: "100%",
width: "90%"
}
}, h.a.createElement(De.a, {
title: "Sign In",
type: "outline",
buttonStyle: {
height: 50,
width: 130,
margin: 20,
borderRadius: 30,
borderWidth: 2,
backgroundColor: "white",
borderColor: "black",
alignSelf: "flex-start",
shadowColor: "rgba(0,0,0,0.6)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
titleStyle: {
fontWeight: "bold",
fontSize: 18,
color: "black"
},
onPress: e.onPress
}))
}), null)))))
}),
zi = Ye.a.create({
infoContainer: {
alignItems: "center",
justifyContent: "center"
},
cardContainer: {
flex: 1,
width: "100%",
height: D.height - 120,
borderRadius: 15,
alignItems: "center",
backgroundColor: "white",
margin: 5,
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
}
}),
Di = function(e) {
return Ya()(1e3 * e.seconds).format("hh:mm a")
},
Ri = function(e) {
return Ya()(1e3 * e).format("Do")
},
Li = function(e) {
var t = e.startTime,
n = e.endTime;
return Ri(t) === Ri(n) ? "" + Ya()(1e3 * t.seconds).format("Do MMM `YY") : Ya()(1e3 * t.seconds).format("Do") + " - " + Ya()(1e3 * n.seconds).format("Do MMM `YY")
},
Ni = function(e) {
return h.a.createElement(ve.a, {
style: {
position: "absolute",
top: 0,
bottom: 0,
alignItems: "center",
justifyContent: "center",
backgroundColor: "rgba(255,255,255,0.9)",
height: "100%",
width: "90%"
}
}, h.a.createElement(Ae, null, e.qr_label || "Scanned"))
},
Ai = function(e) {
return h.a.createElement(Ge.a, {
onPress: function() {
return e.onOwnerPress(e.item.qr_id)
},
style: {
position: "absolute",
top: 0,
bottom: 0,
alignItems: "center",
justifyContent: "center",
backgroundColor: "rgba(255,255,255,0.9)",
height: "100%",
width: "90%"
}
}, h.a.createElement(ve.a, {
style: {
padding: 10,
backgroundColor: "black",
borderRadius: 10
}
}, h.a.createElement(Ae, {
style: {
textAlign: "center",
fontSize: 12,
color: "white"
}
}, "To expose, add name of pass owner")))
},
_i = function(e) {
var t = e.label,
n = e.param;
return h.a.createElement(ve.a, {
style: {
width: "100%"
}
}, h.a.createElement(Qe, {
style: {
fontSize: 12,
color: "white",
opacity: .7,
marginVertical: 5
}
}, t), h.a.createElement(Qe, {
numberOfLines: 2,
style: {
fontSize: 16,
fontWeight: "bold",
color: "white"
}
}, n))
},
Bi = function(e) {
var t = e.isEmailPasses,
n = e.emailLoading,
a = e.item,
r = a.qr_id,
o = (a.orgId, a.event_id, a.event_title),
i = (a.event_description, a.location),
l = (a.titleImage, a.productTitle),
s = (a.price, a.type, a.purchaseDate, a.hide_qr),
c = a.owner,
u = a.valid,
d = a.color1,
m = a.color2,
p = e.item,
y = p.date,
b = p.startTime,
w = p.endTime,
E = e.item.action_email && e.item.action_email || null,
v = Object(g.useRef)(),
C = [d, m],
j = c.name && c.name.length && c.surname && c.surname.length;
return h.a.createElement(Pi.a, {
ref: v,
options: {
format: "jpg",
quality: .1
},
style: {
width: "100%"
}
}, h.a.createElement(_e.a, {
style: Wi.cardContainer,
nativeID: "viewShot"
}, h.a.createElement(qe.a, {
colors: C,
start: {
x: 0,
y: 1
},
end: {
x: 1,
y: 0
},
style: {
flex: 1,
width: "100%",
borderRadius: 15,
padding: 20,
justifyContent: "flex-end"
}
}, h.a.createElement(ve.a, {
style: Wi.infoContainer
}, h.a.createElement(ve.a, {
style: {
width: "100%",
flexDirection: "row",
alignItems: "flex-start",
justifyContent: "space-between",
marginBottom: 15
}
}, h.a.createElement(ve.a, {
style: {
width: "60%"
}
}, h.a.createElement(_i, {
label: "Valid date",
param: Li(b && !w ? {
startTime: b
} : b && w ? {
startTime: b,
endTime: w
} : y)
}), h.a.createElement(_i, {
label: "Admit",
param: l
})), h.a.createElement(ve.a, {
style: {
width: "40%"
}
}, h.a.createElement(_i, {
label: "Start",
param: Di(b || y.startTime)
}), h.a.createElement(_i, {
label: "End",
param: Di(w || y.endTime)
}))), h.a.createElement(Ne, {
style: {
color: "white",
fontSize: D.height < 700 ? 20 : 32
}
}, o), h.a.createElement(ve.a, {
style: {
padding: 10,
backgroundColor: "rgba(255,255,255,0.2)",
borderRadius: 15,
marginVertical: 20
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(xr.a, {
name: "location-pin",
size: 16,
color: "white",
style: {
marginRight: 5
}
}), h.a.createElement(Qe, {
style: {
flex: 1,
color: "white"
}
}, null == i ? void 0 : i.address), (null == i ? void 0 : i.mapLink) && h.a.createElement(Ge.a, {
style: {
backgroundColor: "rgba(255,255,255, 0.2)",
borderRadius: 10,
padding: 10,
alignItems: "center",
justifyContent: "center",
alignSelf: "flex-end"
},
onPress: function() {
return (null == i ? void 0 : i.mapLink) && f.a.openURL(null == i ? void 0 : i.mapLink)
}
}, h.a.createElement(Qe, {
style: {
color: "white"
}
}, "GO"))))), h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
width: "100%",
alignItems: "center"
}
}, j && h.a.createElement(so.a, {
onPress: e.onOwnerNamePress
}, h.a.createElement(Ht, {
style: {
color: "white"
}
}, c.name, " ", c.surname)), h.a.createElement(ve.a, {
style: {
backgroundColor: "white",
alignItems: "center",
padding: 15,
margin: 20,
marginBottom: 0,
borderRadius: 10
}
}, h.a.createElement(Qo.a, {
value: r,
size: 150
}), !u && h.a.createElement(Ni, null), !j && !s && h.a.createElement(Ai, e)), h.a.createElement(Ht, {
style: {
color: "white"
}
}, r)), h.a.createElement(Ge.a, {
onPress: function() {
return e.setShowTermsModal(!0)
},
style: {
padding: 20,
position: "absolute",
bottom: 0,
right: 0
}
}, h.a.createElement(da.a, {
name: "information-outline",
size: 25,
color: "white"
})), h.a.createElement(Ge.a, {
onPress: function() {
return e.onEmailPress(v, r)
},
style: {
padding: 20,
position: "absolute",
bottom: 0,
left: 0
}
}, t && h.a.createElement(ve.a, null, n ? h.a.createElement(En.a, {
size: "small",
color: "white"
}) : h.a.createElement(ve.a, null, !0 === E ? h.a.createElement(da.a, {
name: "email-check-outline",
size: 25,
color: "white"
}) : !1 === E ? h.a.createElement(da.a, {
name: "email-alert-outline",
size: 25,
color: "white"
}) : h.a.createElement(da.a, {
name: "email-outline",
size: 25,
color: "white"
})))))))
},
Wi = Ye.a.create({
infoContainer: {
flex: 1
},
cardContainer: {
flex: 1,
width: "100%",
height: D.height - 100,
borderRadius: 15,
alignItems: "center",
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
}
}),
Ui = function(e) {
return Ya()(1e3 * e.seconds).format("hh:mm a")
},
Vi = function(e) {
return Ya()(1e3 * e).format("Do")
},
Yi = function(e) {
var t = e.startTime,
n = e.endTime;
return Vi(t) === Vi(n) ? "" + Ya()(1e3 * t.seconds).format("Do MMM `YY") : Ya()(1e3 * t.seconds).format("Do") + " - " + Ya()(1e3 * n.seconds).format("Do MMM `YY")
},
Hi = function(e) {
return h.a.createElement(ve.a, {
style: {
position: "absolute",
top: 0,
bottom: 0,
alignItems: "center",
justifyContent: "center",
backgroundColor: "rgba(255,255,255,0.9)",
height: "100%",
width: "90%"
}
}, h.a.createElement(Ae, null, e.qr_label || "Scanned"))
},
Fi = function(e) {
return h.a.createElement(Ge.a, {
onPress: function() {
return e.onOwnerPress(e.item.qr_id)
},
style: {
position: "absolute",
top: 0,
bottom: 0,
alignItems: "center",
justifyContent: "center",
backgroundColor: "rgba(255,255,255,0.9)",
height: "100%",
width: "90%"
}
}, h.a.createElement(ve.a, {
style: {
padding: 10,
backgroundColor: "black",
borderRadius: 10
}
}, h.a.createElement(Ae, {
style: {
textAlign: "center",
fontSize: 12,
color: "white"
}
}, "To expose, add name of pass owner")))
},
Zi = function(e) {
var t = e.label,
n = e.param;
return h.a.createElement(ve.a, {
style: {
width: "100%"
}
}, h.a.createElement(Qe, {
style: {
fontSize: 12,
color: "white",
opacity: .7,
marginVertical: 5
}
}, t), h.a.createElement(Qe, {
numberOfLines: 2,
style: {
fontSize: 16,
fontWeight: "bold",
color: "white"
}
}, n))
},
Gi = function(e) {
var t = e.isEmailPasses,
n = e.emailLoading,
a = e.item,
r = a.qr_id,
o = a.passes_count,
i = (a.orgId, a.event_id, a.event_title),
l = (a.event_description, a.location),
s = (a.titleImage, a.productTitle),
c = a.hide_qr,
u = (a.price, a.type, a.purchaseDate, a.owner),
d = a.valid,
m = a.color1,
p = a.color2,
y = e.item,
b = y.date,
w = y.startTime,
E = y.endTime,
v = e.item.action_email && e.item.action_email || null,
C = Object(g.useRef)(),
j = [m, p],
S = u.name && u.name.length && u.surname && u.surname.length;
return h.a.createElement(Pi.a, {
ref: C,
options: {
format: "jpg",
quality: .1
},
style: {
width: "100%"
}
}, h.a.createElement(_e.a, {
style: qi.cardContainer,
nativeID: "viewShot"
}, h.a.createElement(qe.a, {
colors: j,
start: {
x: 0,
y: 1
},
end: {
x: 1,
y: 0
},
style: {
flex: 1,
width: "100%",
borderRadius: 15,
padding: 20,
justifyContent: "flex-end"
}
}, h.a.createElement(ve.a, {
style: qi.infoContainer
}, h.a.createElement(ve.a, {
style: {
width: "100%",
flexDirection: "row",
alignItems: "flex-start",
justifyContent: "space-between",
marginBottom: 15
}
}, h.a.createElement(ve.a, {
style: {
width: "60%"
}
}, h.a.createElement(Zi, {
label: "Valid date",
param: Yi(w && !E ? {
startTime: w
} : w && E ? {
startTime: w,
endTime: E
} : b)
}), h.a.createElement(Zi, {
label: "Admit",
param: s
})), h.a.createElement(ve.a, {
style: {
width: "40%"
}
}, h.a.createElement(Zi, {
label: "Start",
param: Ui(w || b.startTime)
}), h.a.createElement(Zi, {
label: "End",
param: Ui(E || b.endTime)
}), o && h.a.createElement(Zi, {
label: "Table PAX",
param: o
}))), h.a.createElement(Ne, {
style: {
color: "white",
fontSize: D.height < 700 ? 20 : 32
}
}, i), h.a.createElement(ve.a, {
style: {
padding: 10,
backgroundColor: "rgba(255,255,255,0.2)",
borderRadius: 15,
marginVertical: 20
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(xr.a, {
name: "location-pin",
size: 16,
color: "white",
style: {
marginRight: 5
}
}), h.a.createElement(Qe, {
style: {
flex: 1,
color: "white"
}
}, null == l ? void 0 : l.address), (null == l ? void 0 : l.mapLink) && h.a.createElement(Ge.a, {
style: {
backgroundColor: "rgba(255,255,255, 0.2)",
borderRadius: 10,
padding: 10,
alignItems: "center",
justifyContent: "center",
alignSelf: "flex-end"
},
onPress: function() {
return (null == l ? void 0 : l.mapLink) && f.a.openURL(null == l ? void 0 : l.mapLink)
}
}, h.a.createElement(Qe, {
style: {
color: "white"
}
}, "GO"))))), h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
width: "100%",
alignItems: "center"
}
}, S && h.a.createElement(so.a, {
onPress: e.onOwnerNamePress
}, h.a.createElement(Ht, {
style: {
color: "white"
}
}, u.name, " ", u.surname)), h.a.createElement(ve.a, {
style: {
backgroundColor: "white",
alignItems: "center",
padding: 15,
margin: 20,
marginBottom: 0,
borderRadius: 10
}
}, h.a.createElement(Qo.a, {
value: r,
size: 150
}), !d && h.a.createElement(Hi, null), !S && c && h.a.createElement(Fi, e)), h.a.createElement(Ht, {
style: {
color: "white"
}
}, r)), h.a.createElement(Ge.a, {
onPress: function() {
return e.setShowTermsModal(!0)
},
style: {
padding: 20,
position: "absolute",
bottom: 0,
right: 0
}
}, h.a.createElement(da.a, {
name: "information-outline",
size: 25,
color: "white"
})), h.a.createElement(Ge.a, {
onPress: function() {
return e.onEmailPress(C, r)
},
style: {
padding: 20,
position: "absolute",
bottom: 0,
left: 0
}
}, t && h.a.createElement(ve.a, null, n ? h.a.createElement(En.a, {
size: "small",
color: "white"
}) : h.a.createElement(ve.a, null, !0 === v ? h.a.createElement(da.a, {
name: "email-check-outline",
size: 25,
color: "white"
}) : !1 === v ? h.a.createElement(da.a, {
name: "email-alert-outline",
size: 25,
color: "white"
}) : h.a.createElement(da.a, {
name: "email-outline",
size: 25,
color: "white"
})))))))
},
qi = Ye.a.create({
infoContainer: {
flex: 1
},
cardContainer: {
flex: 1,
width: "100%",
height: D.height - 100,
borderRadius: 15,
alignItems: "center",
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
}
}),
Qi = function(e) {
return h.a.createElement(ve.a, {
style: {
position: "absolute",
top: 0,
bottom: 0,
alignItems: "center",
justifyContent: "center",
backgroundColor: "rgba(255,255,255,0.9)",
height: "100%",
width: "90%"
}
}, h.a.createElement(Ae, null, "SCANNED"))
},
Ji = function(e) {
var t = e.label,
n = e.param;
return h.a.createElement(ve.a, {
style: {
width: "100%"
}
}, h.a.createElement(Qe, {
style: {
fontSize: 12,
color: "white",
opacity: .7,
marginVertical: 5
}
}, t), h.a.createElement(Qe, {
numberOfLines: 2,
style: {
fontSize: 16,
fontWeight: "bold",
color: "white"
}
}, n))
},
Xi = function(e) {
var t,
n,
a,
r,
o = e.isEmailPasses,
i = e.emailLoading,
l = e.item,
s = l.qr_id,
c = (l.orgId, l.event_id, l.event_title),
u = (l.event_description, l.date),
d = l.location,
m = (l.titleImage, l.productTitle),
p = (l.price, l.type, l.purchaseDate, l.owner, l.valid),
y = l.color1,
b = l.color2,
w = e.item.action_email && e.item.action_email || null,
E = Object(g.useRef)(),
v = [y, b];
return h.a.createElement(Pi.a, {
ref: E,
options: {
format: "jpg",
quality: .1
},
style: {
width: "100%"
}
}, h.a.createElement(_e.a, {
style: Ki.cardContainer,
nativeID: "viewShot"
}, h.a.createElement(qe.a, {
colors: v,
start: {
x: 0,
y: 1
},
end: {
x: 1,
y: 0
},
style: {
flex: 1,
width: "100%",
borderRadius: 15,
padding: 20,
justifyContent: "flex-end"
}
}, h.a.createElement(ve.a, {
style: Ki.infoContainer
}, h.a.createElement(ve.a, {
style: {
width: "100%",
flexDirection: "row",
justifyContent: "space-between",
marginBottom: 15
}
}, h.a.createElement(ve.a, {
style: {
width: "60%"
}
}, h.a.createElement(Ji, {
label: "When",
param: (a = null == u || null == (t = u.startTime) ? void 0 : t.seconds, r = null == u || null == (n = u.endTime) ? void 0 : n.seconds, Ya()(1e3 * a).format("Do") + " - " + Ya()(1e3 * r).format("Do MMM `YY"))
}), h.a.createElement(Ji, {
label: "Admit",
param: m
})), h.a.createElement(ve.a, {
style: {
flex: 1,
width: "20%",
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(Do.a, {
name: "campground",
size: 38,
color: "white"
}))), h.a.createElement(Ne, {
style: {
color: "white",
fontSize: D.height < 700 ? 20 : 32
}
}, c), h.a.createElement(ve.a, {
style: {
padding: 10,
backgroundColor: "rgba(255,255,255,0.2)",
borderRadius: 15,
marginVertical: 20
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(xr.a, {
name: "location-pin",
size: 16,
color: "white",
style: {
marginRight: 5
}
}), h.a.createElement(Qe, {
style: {
flex: 1,
color: "white"
}
}, null == d ? void 0 : d.address), (null == d ? void 0 : d.mapLink) && h.a.createElement(Ge.a, {
style: {
backgroundColor: "rgba(255,255,255, 0.2)",
borderRadius: 10,
padding: 10,
alignItems: "center",
justifyContent: "center",
alignSelf: "flex-end"
},
onPress: function() {
return (null == d ? void 0 : d.mapLink) && f.a.openURL(null == d ? void 0 : d.mapLink)
}
}, h.a.createElement(Qe, {
style: {
color: "white"
}
}, "GO"))))), h.a.createElement(ve.a, {
style: {
backgroundColor: "transparent",
width: "100%",
alignItems: "center"
}
}, h.a.createElement(ve.a, {
style: {
backgroundColor: "white",
alignItems: "center",
padding: 15,
margin: 20,
marginBottom: 0,
borderRadius: 10
}
}, h.a.createElement(Qo.a, {
value: s,
size: 150
}), !p && h.a.createElement(Qi, null)), h.a.createElement(Ht, {
style: {
color: "white"
}
}, s)), h.a.createElement(Ge.a, {
onPress: function() {
return e.setShowTermsModal(!0)
},
style: {
padding: 20,
position: "absolute",
bottom: 0,
right: 0
}
}, h.a.createElement(da.a, {
name: "information-outline",
size: 25,
color: "white"
})), h.a.createElement(Ge.a, {
onPress: function() {
return e.onEmailPress(E, s)
},
style: {
padding: 20,
position: "absolute",
bottom: 0,
left: 0
}
}, o && h.a.createElement(ve.a, null, o && i ? h.a.createElement(En.a, {
size: "small",
color: "white"
}) : h.a.createElement(ve.a, null, !0 === w ? h.a.createElement(da.a, {
name: "email-check-outline",
size: 25,
color: "white"
}) : !1 === w ? h.a.createElement(da.a, {
name: "email-alert-outline",
size: 25,
color: "white"
}) : h.a.createElement(da.a, {
name: "email-outline",
size: 25,
color: "white"
})))))))
},
Ki = Ye.a.create({
infoContainer: {
flex: 1
},
cardContainer: {
flex: 1,
width: "100%",
height: D.height - 100,
borderRadius: 15,
alignItems: "center",
backgroundColor: "white",
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
}
});
var $i = Object(j.b)((function(e) {
var t = e.users,
n = t.user;
t.userPasses;
return {
user: n
}
}), {
updateUserPass: rt
})((function(e) {
var t = e.user,
n = e.onModalClose,
a = e.showOwnerModal,
r = e.itemToUpdate,
o = e.isCovidScreen,
i = Object(g.useState)(!1),
l = c()(i, 2),
s = l[0],
u = l[1],
d = Object(g.useState)(""),
p = c()(d, 2),
f = p[0],
y = p[1],
b = Object(g.useState)(""),
w = c()(b, 2),
E = w[0],
v = w[1],
C = Object(g.useState)(""),
j = c()(C, 2),
S = j[0],
O = j[1],
I = Object(g.useState)(""),
x = c()(I, 2),
T = x[0],
P = x[1],
M = Object(g.useState)(""),
k = c()(M, 2),
z = k[0],
D = k[1],
L = Object(g.useState)(""),
N = c()(L, 2),
A = N[0],
_ = N[1],
B = Object(g.useState)(!1),
W = c()(B, 2),
U = W[0],
V = W[1],
Y = Object(g.useState)(null),
H = c()(Y, 2),
F = (H[0], H[1], E.length && S.length && f.length && f.includes("@") && f.includes("."));
Object(g.useEffect)((function() {
null !== r && G(r)
}), [r]),
Object(g.useEffect)((function() {
!1 === a && (v(""), O(""), y(""), P(""), D(""), _(""))
}), [a]);
var Z = {
owner: {
name: "",
surname: "",
email: ""
}
},
G = function() {
var e,
t,
n,
a,
r,
o,
i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Z;
null != i && null != (e = i.owner) && null != (t = e.name) && t.length || null != i && null != (n = i.owner) && null != (a = n.surname) && a.length || null != i && null != (r = i.owner) && null != (o = r.email) && o.length ? (v(i.owner.name), O(i.owner.surname), y(i.owner.email)) : (v(""), O(""), y(""))
};
return h.a.createElement(ve.a, {
style: {
backgroundColor: R.bg,
borderRadius: 10,
maxHeight: "100%"
}
}, h.a.createElement(ve.a, {
style: {
flex: 1,
backgroundColor: R.bg1,
paddingVertical: 20,
borderRadius: 10,
width: "100%"
}
}, h.a.createElement(ve.a, {
style: {
paddingHorizontal: 20
}
}, h.a.createElement(bn, {
heading: "Ticket owner",
subHeading: "Name + contact info",
description: "Enter details for important updates and proof of ownership",
onClose: n
})), h.a.createElement(Vn.a, {
style: {
paddingHorizontal: 20
}
}, h.a.createElement(Gt, {
required: !0,
label: "First name",
placeholder: "Enter ticket owner first name",
onChangeText: v,
value: E,
addContainerStyle: el.inputText,
autoFocus: !0,
validation: ["length"]
}), h.a.createElement(Gt, {
required: !0,
label: "Last name",
placeholder: "Enter ticket owner last name",
onChangeText: O,
value: S,
addContainerStyle: el.inputText,
validation: ["length"]
}), h.a.createElement(Gt, {
required: !0,
label: "Email address",
placeholder: "Enter ticket owner email address",
onChangeText: y,
value: f,
addContainerStyle: el.inputText,
keyboardType: "email-address",
validation: ["email"]
}), o && h.a.createElement(ve.a, null, h.a.createElement(Gt, {
label: "Mobile number",
placeholder: "Enter ticket owner mobile number",
onChangeText: P,
value: T,
addContainerStyle: el.inputText,
keyboardType: "phone-pad"
}), h.a.createElement(Gt, {
required: !0,
label: "ID / Passport",
placeholder: "Local ID or Passport number",
onChangeText: D,
value: z,
addContainerStyle: el.inputText,
validation: ["length"]
}), h.a.createElement(Gt, {
required: !0,
label: "Temperature",
placeholder: "Enter screening temperature",
onChangeText: _,
value: A,
addContainerStyle: el.inputText,
keyboardType: "numeric",
validation: ["length"]
}), h.a.createElement(m.a, {
onPress: function() {
return V(!U)
},
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
backgroundColor: R.bg1,
borderRadius: 10,
marginVertical: 15,
padding: 15
}
}, U ? h.a.createElement(De.b, {
name: "radio-button-checked",
type: "material",
color: R.pay,
size: 25,
iconStyle: {
marginRight: 10
}
}) : h.a.createElement(De.b, {
name: "radio-button-unchecked",
type: "material",
color: R.secondary,
size: 25,
iconStyle: {
marginRight: 10
}
}), h.a.createElement(Ae, {
style: {
fontSize: 14,
color: U ? "white" : R.secondary
}
}, "Agree to terms of entry"))), h.a.createElement(ve.a, null, h.a.createElement(Ae, {
style: el.message
}))), h.a.createElement(ve.a, {
style: {
paddingHorizontal: 20
}
}, h.a.createElement(De.a, {
loading: s,
disabled: !F,
title: "Submit",
buttonStyle: {
height: 60,
borderRadius: 10,
marginTop: 20,
backgroundColor: R.balance
},
titleStyle: {
fontWeight: "bold",
fontSize: 14
},
onPress: function() {
F && u(!0),
F && e.updateUserPass({
user: t,
qr_id: r.qr_id,
key: "owner",
value: {
phone: t.cellphoneNumber,
name: E,
surname: S,
email: f,
mobile: T,
passport: z,
temperature: A,
agree: U
}
}).then((function() {
n(),
u(!1)
}))
}
}))))
})),
el = Ye.a.create({
backButton: {
position: "absolute",
top: 20,
right: 20,
alignItems: "center",
justifyContent: "center",
backgroundColor: "white",
height: 40,
width: 40,
borderRadius: 20,
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
inputText: {
marginTop: 15,
marginBottom: 5,
width: "100%",
textAlign: "center",
fontSize: 18,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent"
},
message: {
fontSize: 14,
paddingHorizontal: 40,
color: R.secondary,
textAlign: "center"
}
}),
tl = D.width,
nl = (D.height, .9 * tl),
al = (tl - nl) / 2;
var rl = function(e) {
var t = e.item;
return "pass" === t.type ? h.a.createElement(ki, Ee()({
demo: !0
}, e)) : "event_pass" === t.type ? h.a.createElement(Bi, e) : "event_accom" === t.type ? h.a.createElement(Xi, e) : "event_multi_pass" === t.type ? h.a.createElement(Gi, e) : "event_pass_comp" === t.type ? h.a.createElement(Bi, e) : null
};
var ol = Object(j.b)((function(e) {
var t = e.users,
n = t.user,
a = t.userPasses,
r = e.store,
o = r.subCart,
i = r.showPaymentProcessing,
l = e.config.isEmailPasses,
s = (a.length ? a : []).sort((function(e, t) {
var n,
a,
r,
o;
return (null == (n = t.date) || null == (a = n.startTime) ? void 0 : a.seconds) - (null == (r = e.date) || null == (o = r.startTime) ? void 0 : o.seconds)
}));
return {
user: n,
subCart: o,
noPasses: 0 === a.length,
passes: [{
qr_id: "empty-left"
}].concat(Ti()(s), [{
qr_id: "empty-right"
}]),
isEmailPasses: l,
showPaymentProcessing: i
}
}), {
showCart: Ct,
togglePaymentLoading: function(e) {
return function(t) {
t({
type: "pass_landed",
bool: e
})
}
},
sendMailToSelf: Tt,
userLogAction: ot,
updateUserPass: rt,
updateCustomer: function(e) {
return function(t) {
$e.doc(e._id).update(e).then((function() {
return t({
type: "found_user",
payload: e
})
}))
}
},
setShowTermsModal: Bt,
listenUserWallet: function(e) {
return function(t) {
var n = [];
return $e.doc(e).collection("wallet").onSnapshot((function(e) {
e.docChanges().forEach((function(e) {
if ("added" === e.type && n.push(e.doc.data()), "modified" === e.type) {
var t = n.findIndex((function(t) {
return t.qr_id === e.doc.data().qr_id
}));
n.splice(t, 1, e.doc.data())
}
})),
t({
type: "user_passes_updated",
purchasedItems: n
})
}))
}
}
})((function(e) {
e.navigation;
var t = e.passes,
n = e.noPasses,
a = e.user,
r = e.subCart,
o = e.showPaymentProcessing,
i = Object(g.useRef)(),
l = Object(g.useState)(!1),
s = c()(l, 2),
u = s[0],
m = s[1],
p = Object(g.useState)(!1),
f = c()(p, 2),
y = f[0],
b = f[1],
w = Object(g.useState)(""),
E = c()(w, 2),
C = E[0],
j = E[1],
S = Object(g.useState)(""),
O = c()(S, 2),
I = (O[0], O[1], Object(g.useState)("")),
x = c()(I, 2),
T = (x[0], x[1], Object(g.useState)(!1)),
P = c()(T, 2),
k = P[0],
z = P[1],
L = Object(g.useState)(null),
N = c()(L, 2),
A = N[0],
_ = N[1],
B = Object(g.useState)(null),
W = c()(B, 2),
U = W[0],
V = W[1],
Y = Object(g.useState)(null),
H = c()(Y, 2),
F = H[0],
Z = H[1],
G = Object(g.useState)(null),
q = c()(G, 2),
Q = q[0],
J = q[1],
X = Object(g.useRef)(new lo.a.Value(0)).current;
Object(g.useEffect)((function() {
var e = i.current.offsetTop,
t = window.addEventListener("scroll", (function() {
var t,
n,
a,
r;
window.pageYOffset > e ? null == i || null == (t = i.current) || null == (n = t.classList) || n.add("sticky") : null == i || null == (a = i.current) || null == (r = a.classList) || r.remove("sticky")
}));
return function() {
window.removeEventListener("scroll", t)
}
}), []),
Object(g.useEffect)((function() {
e.passes,
e.noPasses;
var t = e.user,
n = (e.subCart, function() {
return null
});
try {
n = e.listenUserWallet(null == t ? void 0 : t._id)
} catch (a) {}
return function() {
n()
}
}), []);
var K = function(e) {
var t = Object(g.useRef)();
return Object(g.useEffect)((function() {
t.current = e
})), t.current
}(t);
return Object(g.useEffect)((function() {
var t = e.passes;
try {
K && o && "undefined" !== K && (null == t ? void 0 : t.length) !== (null == K ? void 0 : K.length) && e.togglePaymentLoading(!1)
} catch (n) {}
}), [t]), h.a.createElement(ve.a, {
style: {
flex: 1,
backgroundColor: R.bg
}
}, h.a.createElement(Ze, Ee()({}, e, {
headerRef: i,
subCart: r,
title: "My passes",
onBackPress: function() {
return v()
},
onShowCartPress: function() {
return e.showCart(!0)
},
style: {
zIndex: 10
}
})), n && h.a.createElement(ve.a, {
style: {
flex: 1,
justifyContent: "flex-end",
zIndex: 10
}
}, h.a.createElement(Ce.a, {
source: {
uri: Zn.a
},
resizeMode: "contain",
style: {
height: 180,
width: D.width,
marginVertical: 20
}
}), a ? h.a.createElement(Ae, {
style: il.message
}, "You have no passes yet. If you have just purchased a pass, give the app a minute, as additional checks may be in progress.") : h.a.createElement(ve.a, null, h.a.createElement(Ae, {
style: il.message
}, "Your event passes are stored here. Sign in to view or purchase passes."))), o ? h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(Ae, {
style: il.message
}, "Your payment was succesful. Wait one moment while we deliver your passes."), h.a.createElement(De.a, {
title: "Clear",
type: "outline",
buttonStyle: {
height: 60,
width: 180,
margin: 20,
borderRadius: 30,
borderWidth: 2,
borderColor: R.shade4
},
titleStyle: {
fontWeight: "bold",
fontSize: 12,
color: R.shade4
},
onPress: function() {
return e.togglePaymentLoading(!1)
}
})) : h.a.createElement(lo.a.FlatList, {
style: {
width: tl,
marginTop: -170,
zIndex: 0
},
showsHorizontalScrollIndicator: !1,
data: t,
keyExtractor: function(e) {
return (null == e ? void 0 : e.qr_id) + ""
},
horizontal: !0,
bounces: !1,
decelerationRate: "ios" === M.a.OS ? 0 : .98,
contentContainerStyle: {
alignItems: "center"
},
snapToInterval: nl,
snapToAlignment: "start",
pagingEnabled: !0,
onScroll: lo.a.event([{
nativeEvent: {
contentOffset: {
x: X
}
}
}]),
scrollEventThrottle: 16,
renderItem: function(t) {
var n = t.item,
a = t.index,
r = [(a - 2) * nl, (a - 1) * nl, a * nl],
o = X.interpolate({
inputRange: r,
outputRange: [100, 80, 100],
extrapolate: "clamp"
});
return n.type ? h.a.createElement(ve.a, {
style: {
width: nl
}
}, h.a.createElement(lo.a.View, {
style: {
marginHorizontal: 5,
alignItems: "center",
transform: [{
translateY: o
}]
}
}, h.a.createElement(rl, Ee()({}, e, {
item: n,
onEmailPress: function(e, t) {
m(!0),
J(e),
V(t)
},
emailLoading: k,
emailDelivered: A,
onOwnerPress: function(e) {
b(!0),
Z(n)
},
onOwnerNamePress: function() {
b(!0),
Z(n)
}
})))) : h.a.createElement(ve.a, {
style: {
width: al
}
})
}
}), h.a.createElement(ke.a, {
isVisible: y,
onBackdropPress: function() {
return b(!1)
}
}, h.a.createElement($i, {
onModalClose: function() {
return b(!1)
},
showOwnerModal: y,
itemToUpdate: F
})), h.a.createElement(ke.a, {
isVisible: u,
onBackdropPress: function() {
return m(!1)
}
}, h.a.createElement(ve.a, {
style: {
backgroundColor: "white",
paddingHorizontal: 20,
paddingVertical: 30,
borderRadius: 10,
width: "100%"
}
}, h.a.createElement(Gt, {
label: "Email",
placeholder: "Enter email address",
onChangeText: j,
value: C,
addContainerStyle: il.inputText,
keyboardType: "email-address",
autoFocus: !0
}), h.a.createElement(De.a, {
title: "EMAIL PASS",
buttonStyle: {
height: 60,
borderRadius: 30,
marginVertical: 20,
backgroundColor: R.highlight
},
titleStyle: {
fontWeight: "bold",
fontSize: 14
},
onPress: function() {
(function(e) {
var t,
n;
return d.a.async((function(a) {
for (;;)
switch (a.prev = a.next) {
case 0:
return e.ref, t = e.emailInput, a.next = 3, d.a.awrap(Mi.a(document.getElementById("viewShot")));
case 3:
return n = a.sent, "Email body", a.abrupt("return", Tt({
body: "Email body",
to: t,
subject: "Airdosh ticket email.",
attachments: [{
filename: "pass.png",
path: n,
encoding: "base64"
}]
}));
case 6:
case "end":
return a.stop()
}
}), null, null, null, Promise)
})({
ref: Q,
emailInput: emailInput
}).then((function(t) {
z(!1),
_(t),
t && e.updateUserPass({
user: a,
qr_id: U,
key: "action_email",
value: !0
}),
e.userLogAction({
user: a,
action: {
label: "User emailed pass to " + emailInput,
notes: ["QR ID - " + U]
}
})
})),
m(!1),
z(!0)
}
}), h.a.createElement(ve.a, null, h.a.createElement(Ae, {
style: il.message
}, "You are about to share an event pass. Please remain vigilant, and do not let your pass be copied.")))))
})),
il = Ye.a.create({
backButton: {
position: "absolute",
top: 20,
right: 20,
alignItems: "center",
justifyContent: "center",
backgroundColor: "white",
height: 40,
width: 40,
borderRadius: 20,
shadowColor: "rgba(0,0,0,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
inputText: {
marginVertical: 10,
width: "100%",
textAlign: "center",
fontSize: 18,
outlineStyle: "none",
outlineWidth: 0,
outlineColor: "transparent"
},
message: {
fontSize: 14,
paddingHorizontal: 40,
color: R.secondary,
textAlign: "center"
}
}),
ll = Object(ze.a)();
function sl(e) {
e.navigation;
return h.a.createElement(ll.Navigator, {
screenOptions: {
headerStyle: {
backgroundColor: R.primaryDark,
shadowOffset: {
height: 0
}
},
headerTitleAlign: "center",
headerTitleStyle: {
fontWeight: "bold",
fontSize: 17,
color: R.primaryText
}
}
}, h.a.createElement(ll.Screen, {
name: "PassesHome",
component: ol,
options: {
headerShown: !1
}
}))
}
var cl = function() {
return h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(Ce.a, {
style: {
width: D.width / 2,
height: 35,
marginTop: 20
},
source: n(584),
resizeMode: "contain"
}), h.a.createElement(y.a, {
style: {
color: R.pay,
fontWeight: "bold",
margin: 20
}
}, "Opening Wallet..."), h.a.createElement(En.a, {
size: "large",
color: R.pay
}))
},
ul = n(585);
var dl = Object(j.b)(null, {
setGlobalInitializing: lt
})((function(e) {
var t = Object(g.useState)("https://wallet.airdosh.co.za/"),
n = c()(t, 2),
a = n[0],
r = n[1];
return Object(g.useEffect)((function() {
var t = e.route.params;
t && r(t.wallet_url),
e.setGlobalInitializing(!1)
})), h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(Wa.a, {
source: {
uri: ul
},
resizeMode: "contain",
style: {
height: 600,
width: 250
}
}, h.a.createElement(ve.a, {
style: ml.qrContainer
}, h.a.createElement(Qo.a, {
value: a,
size: 200
}))), h.a.createElement(ve.a, {
style: {
width: "35%",
padding: 20
}
}, h.a.createElement(Ne, null, "Scan QR code"), h.a.createElement(Ae, {
style: {
color: "grey",
marginTop: 10
}
}, "Airdosh is a mobile-first wallet platform. Please use your mobile phone to scan the QR code. This will open the mobile wallet web app. You will be able to purchase tickets using VISA, Mastercard or Snapscan. No elaborate sign up, simply login in using One Time Pin sent to you by SMS.", " "))))
})),
ml = Ye.a.create({
qrContainer: {
flex: 1,
alignItems: "center",
justifyContent: "center",
padding: 15,
margin: 20,
borderRadius: 10
}
}),
gl = Object(ze.a)();
n(585);
var hl = Object(j.b)((function(e) {
e.users.user;
var t = e.auth.globalInitialising,
n = e.config,
a = n.theme,
r = (n.carouselData, n.isPrivate);
n.isCashless;
return {
globalInitialising: t,
orgId: n.orgId,
event_id: n.event_id,
isPrivate: r,
backgroundImage: a.backgroundImage
}
}), {})((function(e) {
window.navigator,
window.navigator.standalone,
e.navigation,
e.globalInitialising,
e.orgId,
e.event_id,
e.isPrivate;
var t = e.backgroundImage,
n = Object(g.useState)(!0),
a = c()(n, 2),
r = a[0],
o = a[1],
i = Object(g.useState)(!0),
l = c()(i, 2),
s = (l[0], l[1], Object(g.useState)(!0)),
u = c()(s, 2),
m = u[0],
p = u[1],
f = Object(g.useState)(null),
y = c()(f, 2);
return y[0], y[1], Object(g.useEffect)((function() {
d.a.async((function(e) {
for (;;)
switch (e.prev = e.next) {
case 0:
return e.next = 2, d.a.awrap(Ce.a.prefetch(t));
case 2:
p(!1);
case 3:
case "end":
return e.stop()
}
}), null, null, null, Promise);
var e = setTimeout((function() {
o(!1)
}), 1e3);
return function() {
return e
}
}), []), r || m ? h.a.createElement(cl, null) : h.a.createElement(gl.Navigator, {
screenOptions: {
headerStyle: {
backgroundColor: R.primaryDark,
shadowOffset: {
height: 0
}
},
headerTitleAlign: "center",
headerTitleStyle: {
fontWeight: "bold",
fontFamily: L.primary,
fontSize: 17,
color: R.primaryText
}
}
}, h.a.createElement(gl.Screen, Ee()({}, e, {
name: "DesktopWallet",
component: dl,
options: {
headerShown: !1
}
})))
})),
pl = (Ye.a.create({}), function() {
return h.a.createElement(ve.a, {
style: {
height: .5,
width: "95%",
alignSelf: "center",
backgroundColor: R.shade1,
marginVertical: 15
}
})
});
function fl(e) {
var t = e.user,
n = e.products,
a = e.selectedProducts,
r = e.onEditPress,
o = e.showEditDeliveryDetails,
i = e.onNameChange,
l = e.onTableChange,
s = e.onCancel,
u = e.onPressPay,
d = Object(g.useState)((null == t ? void 0 : t.displayName) || ""),
m = c()(d, 2),
p = m[0],
f = m[1],
y = Object(g.useState)((null == t ? void 0 : t.tableNo) || ""),
b = c()(y, 2),
w = b[0],
E = b[1],
v = n.filter((function(e) {
return null == a ? void 0 : a.includes(e.id)
})),
C = v.reduce((function(e, t) {
return e + t.price
}), 0);
return h.a.createElement(_e.a, {
style: {
flex: 1
}
}, h.a.createElement(ve.a, {
style: {
width: "100%",
height: D.height - 40,
alignItems: "center",
padding: 20,
borderRadius: 20,
backgroundColor: "white"
}
}, h.a.createElement(fn, {
subTitle: "Review",
title: "Order Items",
style: {
alignSelf: "flex-start"
}
}), h.a.createElement(pl, null), h.a.createElement(Vn.a, {
style: {
width: "100%",
marginTop: 10,
paddingBottom: 10
}
}, v && v.map((function(e, t) {
return h.a.createElement(ve.a, {
key: t,
style: {
width: "95%",
marginVertical: 5,
flexDirection: "row",
justifyContent: "space-between"
}
}, h.a.createElement(Qe, {
numberOfLines: 1,
style: {
color: "gray",
maxWidth: "70%"
}
}, e.name), h.a.createElement(Qe, {
style: {
width: "30%",
textAlign: "right"
}
}, "R ", e.price.toFixed(2)))
}))), h.a.createElement(ve.a, {
style: {
width: "95%",
paddingTop: 10,
borderTopWidth: 1,
borderTopColor: R.shade1,
flexDirection: "row",
justifyContent: "space-between"
}
}, h.a.createElement(Ae, {
style: {
fontSize: 18
}
}, "Total"), h.a.createElement(Ae, {
style: {
fontSize: 18
}
}, "R ", C.toFixed(2))), o ? h.a.createElement(ve.a, {
style: {
width: "100%",
alignItems: "center"
}
}, h.a.createElement(Ne, {
style: {
marginBottom: 10
}
}, "Who? Where?"), h.a.createElement(ve.a, {
style: {
width: "100%",
flexDirection: "row",
borderRadius: 15,
shadowColor: "rgba(45,185,177,0.4)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
}
}, h.a.createElement(ve.a, {
style: {
width: "50%",
borderTopLeftRadius: 15,
borderBottomLeftRadius: 15,
borderRightWidth: 1,
borderRightColor: R.shade1
}
}, h.a.createElement(Yn, {
label: "Name",
placeholder: "Enter name here.",
onChangeText: function(e) {
f(e),
i(e)
},
value: p,
addStyle: {
fontSize: 12,
textAlign: "center",
width: "50%"
},
addContainerStyle: {
width: "100%"
},
autoFocus: !0
})), h.a.createElement(ve.a, {
style: {
width: "50%",
borderBottomRightRadius: 15,
borderTopRightRadius: 15
}
}, h.a.createElement(Yn, {
label: "Table no.",
placeholder: "Enter table no.",
onChangeText: function(e) {
E(e),
l(e)
},
value: w,
addStyle: {
fontSize: 12,
textAlign: "center",
width: "50%"
},
keyboardType: "number-pad",
autoFocus: !0
})))) : h.a.createElement(ve.a, {
style: {
flexDirection: "row",
flexWrap: "wrap",
alignItems: "center"
}
}, h.a.createElement(mn, {
style: {
width: D.width - 70,
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(ve.a, null, h.a.createElement(Ht, null, "Delivering items to"), h.a.createElement(Ae, {
style: {
fontSize: 16
}
}, null == t ? void 0 : t.displayName), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center"
}
}, h.a.createElement(Ht, null, "at table no."), h.a.createElement(Ae, {
style: {
fontSize: 16,
marginBottom: -2
}
}, " ", null == t ? void 0 : t.tableNo))), h.a.createElement(De.a, {
title: "Edit",
type: "outline",
buttonStyle: {
height: 50,
width: 100,
margin: 5,
borderRadius: 25,
borderWidth: 1,
borderColor: R.highlight,
backgroundColor: "white"
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: R.highlight
},
onPress: r
}))), h.a.createElement(ve.a, {
style: {
flexDirection: "row",
alignItems: "center",
marginHorizontal: 20
}
}, h.a.createElement(De.a, {
title: "Cancel",
type: "outline",
buttonStyle: {
height: 50,
width: D.width / 2 - 60,
marginVertical: 10,
borderRadius: 25,
borderWidth: 1,
borderColor: R.shade2
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: R.shade3
},
onPress: s
}), h.a.createElement(De.a, {
title: "Pay R " + C.toFixed(2),
type: "solid",
disabled: !0,
buttonStyle: {
height: 50,
width: D.width / 2 - 10,
marginVertical: 10,
marginLeft: 10,
borderRadius: 25,
backgroundColor: R.highlight
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: "white"
},
onPress: u
})), h.a.createElement(Ht, {
style: {
fontSize: 12,
color: R.alert,
textAlign: "center"
}
}, "Placing order will charge your bank account with R " + C.toFixed(2))))
}
var yl = Object(De.d)((function(e) {
var t = e.isQless,
n = e.selectedProducts,
a = e.onPress,
r = e.footerRef;
return h.a.createElement(_e.a, {
style: bl.footerContainer,
ref: r,
className: "sticky"
}, !t && h.a.createElement(Ae, {
style: bl.alertText
}, '"express order" is not available.'), h.a.createElement(De.a, {
title: "Order",
type: "solid",
disabled: 0 === (null == n ? void 0 : n.length) || !t,
buttonStyle: {
height: 50,
width: 200,
margin: 10,
borderRadius: 25,
backgroundColor: R.highlight
},
titleStyle: {
fontWeight: "bold",
fontSize: 14,
color: "white"
},
onPress: a
}))
})),
bl = Ye.a.create({
footerContainer: {
position: "absolute",
bottom: 0,
width: "100%",
alignItems: "center",
justifyContent: "center",
backgroundColor: "white"
},
alertText: {
textAlign: "center",
fontSize: 14,
color: R.alert,
margin: 10,
marginBottom: 0
}
});
var wl = Object(De.d)((function(e) {
e.theme;
var t = e.item,
n = e.selectedProducts,
a = e.addItem,
r = e.removeItem,
o = Object(g.useState)(!1),
i = c()(o, 2),
l = i[0],
s = i[1];
return Object(g.useEffect)((function() {
0 === (null == n ? void 0 : n.length) && s(!1)
}), [n]), h.a.createElement(Ge.a, {
onPress: function() {
s(!l),
l ? r(t.id) : a(t.id)
},
style: [El.productContainer, l && {
borderWidth: 3,
borderColor: R.pay
}]
}, h.a.createElement(Ae, {
style: {
marginBottom: 5,
marginLeft: 5,
color: "gray"
}
}, t.name), h.a.createElement(Ne, {
style: {}
}, " R ", t.price), l && h.a.createElement(ve.a, {
style: El.selectedProductCheck
}, h.a.createElement(Do.a, {
name: "check",
size: 16,
color: "white"
})))
})),
El = Ye.a.create({
productContainer: {
flex: 1,
width: D.width / 2 - 20,
margin: 5,
padding: 10,
borderRadius: 15,
justifyContent: "center",
shadowColor: "rgba(0,0,0,0.2)",
shadowOffset: {
width: 0,
height: 0
},
shadowOpacity: .5,
shadowRadius: 20
},
selectedProductCheck: {
position: "absolute",
right: 0,
bottom: 0,
height: 30,
width: 30,
alignItems: "center",
justifyContent: "center",
borderTopLeftRadius: 10,
borderBottomRightRadius: 10,
backgroundColor: R.pay
}
});
var vl = Object(De.d)((function(e) {
e.theme;
var t = e.user;
return h.a.createElement(ve.a, {
style: {
width: "100%",
height: "50%",
alignItems: "center",
padding: 20,
borderRadius: 20,
backgroundColor: "white"
}
}, h.a.createElement(En.a, {
size: "large",
color: R.pay
}), h.a.createElement(Ht, null, "Placing order..."), h.a.createElement(Ne, {
style: {
fontSize: 16
}
}, "Your new Balance: "), h.a.createElement(Ne, null, "R ", ((null == t ? void 0 : t.credit) + (null == t ? void 0 : t.pendingCredit)).toFixed(2)), h.a.createElement(Ht, null, "Your order will be delivered to your table"))
}));
Ye.a.create({
container: {
borderRadius: 15,
margin: 15,
padding: 15,
flexDirection: "row",
alignItems: "center"
}
});
var Cl = 2,
jl = function(e, t) {
for (var n = Math.floor(e.length / t), a = e.length - n * t; a !== t && 0 !== a;)
e.push({
key: "blank-" + a,
empty: !0
}),
a++;
return e
},
Sl = Object(j.b)((function(e) {
var t = e.seatOrder.barProducts;
return {
user: e.users.user,
isQless: e.config.isQless,
barProducts: t,
sortedBarProducts: jl(t, Cl)
}
}), {
fetchBarProducts: function() {
return function(e) {
yt.get().then((function(t) {
var n = [];
t.forEach((function(e) {
n.push(e.data())
})),
e({
type: "fetch_bar_items_success",
payload: n
})
})).catch((function(e) {
console.log("Error getting documents: ", e)
}))
}
},
updateNameAndTable: function(e, t, n) {
return function(a) {
return $e.doc(e._id).update({
displayName: t,
tableNo: n
})
}
},
showCart: Ct
})((function(e) {
var t = e.user,
n = (e.isQless, e.barProducts),
a = e.sortedBarProducts,
r = Object(g.useRef)(),
o = Object(g.useRef)(),
i = Object(g.useState)([]),
l = c()(i, 2),
s = l[0],
u = l[1],
d = Object(g.useState)(!1),
m = c()(d, 2),
p = m[0],
f = m[1],
y = Object(g.useState)(!1),
b = c()(y, 2),
w = b[0],
E = b[1],
C = Object(g.useState)(!1),
j = c()(C, 2),
S = j[0],
O = j[1],
I = Object(g.useState)(),
x = c()(I, 2),
T = x[0],
P = x[1],
M = Object(g.useState)(),
k = c()(M, 2),
z = k[0],
D = k[1];
return Object(g.useEffect)((function() {
var t,
n;
e.fetchBarProducts();
var a = r.current.offsetTop;
null == o || null == (t = o.current) || null == (n = t.classList) || n.add("sticky");
var i = window.addEventListener("scroll", (function() {
var e,
t,
n,
o;
window.pageYOffset > a ? null == r || null == (e = r.current) || null == (t = e.classList) || t.add("sticky") : null == r || null == (n = r.current) || null == (o = n.classList) || o.remove("sticky")
}));
return function() {
window.removeEventListener("scroll", i)
}
}), []), h.a.createElement(ve.a, {
style: {
flex: 1,
backgroundColor: "white"
}
}, h.a.createElement(Ze, Ee()({}, e, {
headerRef: r,
title: "Express order",
onBackPress: function() {
return v()
},
onShowCartPress: function() {
return e.showCart(!0)
}
})), h.a.createElement(ve.a, {
style: {
flex: 1,
alignItems: "center"
}
}, h.a.createElement(Fr.a, {
style: {
width: "100%",
paddingBottom: 75,
paddingTop: 15,
paddingHorizontal: 10
},
data: a,
renderItem: function(t) {
var n = t.item;
return h.a.createElement(wl, Ee()({}, e, {
item: n,
addItem: function(e) {
s.push(e),
u(s)
},
removeItem: function(e) {
var t = null == s ? void 0 : s.findIndex((function(t) {
return t === e
}));
s.splice(t, 1),
u(s)
}
}))
},
keyExtractor: function(e) {
return e.id
},
numColumns: Cl
}), h.a.createElement(yl, Ee()({}, e, {
footerRef: o,
onPress: function() {
return f(!0)
}
}))), h.a.createElement(ke.a, {
isVisible: p,
onBackdropPress: function() {
return f(!1)
}
}, h.a.createElement(fl, Ee()({}, e, {
products: n,
selectedProducts: s,
showEditDeliveryDetails: S,
onEditPress: function() {
D(""),
O(!0)
},
onNameChange: function(e) {
return P(e)
},
onTableChange: function(e) {
return D(e)
},
onPressPay: function() {
return e.updateNameAndTable(t, T, z), f(!1), void E(!1)
},
onCancel: function() {
return f(!1)
}
}))), h.a.createElement(ke.a, {
isVisible: w,
onBackdropPress: function() {
return E(!1)
}
}, h.a.createElement(vl, Ee()({}, e, {
onClear: function() {
return E(!1)
}
}))))
})),
Ol = (Ye.a.create({}), function() {
return h.a.createElement(ve.a, {
style: {
flex: 1,
height: D.height,
width: D.width,
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0,
backgroundColor: "white",
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(En.a, {
size: "large",
color: R.pay
}))
}),
Il = function() {
return h.a.createElement(ve.a, {
style: {
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0,
flex: 1,
backgroundColor: "white",
alignItems: "center",
justifyContent: "center"
}
}, h.a.createElement(Ce.a, {
style: {
width: D.width / 2,
height: 35,
marginTop: 20
},
source: n(584),
resizeMode: "contain"
}), h.a.createElement(y.a, {
style: {
color: R.pay,
fontWeight: "bold",
margin: 20
}
}, "Opening Wallet..."), h.a.createElement(En.a, {
size: "large",
color: R.pay
}))
},
xl = Object(ze.a)();
xe.collection("customers");
var Tl = Object(x.b)(Object(j.b)((function(e) {
var t = e.users,
n = (t.user, t.parsedCelllNo),
a = e.auth,
r = a.globalInitialising,
o = a.authModal,
i = a.emailAuthModal,
l = a.authLoadingModal,
s = e.modal,
c = s.tagLinkSuccessModal,
u = s.tagLinkFailModal,
d = s.showTermsModal,
m = e.store,
g = m.showCartModal,
h = m.showAltPayOptionsModal,
p = (m.showPurchaseInProgress, m.showTopUpInProgress),
f = m.showPendingPaymentMessage,
y = m.pendingPaymentMessage,
b = e.config,
w = b.gLoading,
E = b.theme,
v = (b.carouselData, b.isPrivate),
C = (b.isCashless, b.orgId),
j = b.event_id,
S = b.privacy_policy,
O = b.showLoadNewContent;
return {
globalInitialising: r,
gLoading: w,
orgId: C,
event_id: j,
isPrivate: v,
parsedCelllNo: n,
authModal: o,
emailAuthModal: i,
authLoadingModal: l,
showCartModal: g,
showAltPayOptionsModal: h,
showTopUpInProgress: p,
showPendingPaymentMessage: f,
pendingPaymentMessage: y,
tagLinkSuccessModal: c,
tagLinkFailModal: u,
showTermsModal: d,
backgroundImage: E.backgroundImage,
privacy_policy: S,
showLoadNewContent: O
}
}), {
setGlobalInitializing: lt,
verifyGuestByCell: xt,
getCreateUserObj: ht,
foundUser: tt,
updateUser: gt,
showAuthModal: st,
showEmailAuthModal: ct,
showAuthLoadingModal: ut,
showCart: Ct,
showAltPaymentOptions: jt,
showTagLinkSuccesModal: At,
showTagLinkFailModal: _t,
setShowTermsModal: Bt,
setShowNewContent: Wt
})((function(e) {
window.navigator,
window.navigator.standalone,
e.navigation;
var t = e.globalInitialising,
n = e.gLoading,
a = e.orgId,
r = e.event_id,
o = e.isPrivate,
i = e.authModal,
l = e.emailAuthModal,
s = e.authLoadingModal,
u = e.parsedCelllNo,
m = e.showCartModal,
p = e.showAltPayOptionsModal,
f = e.showPurchaseInProgress,
y = e.showTopUpInProgress,
b = e.showPendingPaymentMessage,
w = (e.pendingPaymentMessage, e.tagLinkSuccessModal),
E = e.tagLinkFailModal,
C = e.showTermsModal,
j = e.showLoadNewContent,
S = e.backgroundImage,
O = Object(g.useState)(!0),
I = c()(O, 2),
x = I[0],
T = I[1],
P = Object(g.useState)(!0),
M = c()(P, 2),
k = (M[0], M[1], Object(g.useState)(!0)),
z = c()(k, 2),
N = z[0],
A = z[1],
_ = Object(g.useState)(null),
B = c()(_, 2),
W = (B[0], B[1]),
U = (e.newServiceWorkerDetected, e.onLoadNewServiceWorkerAccept);
function V(t) {
W(t),
o && t && e.verifyGuestByCell({
orgId: a,
event_id: r,
user: t
});
t && t.phoneNumber;
t ? e.getCreateUserObj({
newUser: t,
blockUserAutoCreate: !0
}).then((function() {
return T(!1)
})) : T(!1)
}
return Object(g.useEffect)((function() {
d.a.async((function(e) {
for (;;)
switch (e.prev = e.next) {
case 0:
return e.next = 2, d.a.awrap(Ce.a.prefetch(S));
case 2:
A(!1);
case 3:
case "end":
return e.stop()
}
}), null, null, null, Promise);
var e = Te.onAuthStateChanged(V);
return function() {
return e
}
}), []), x || N ? h.a.createElement(cl, null) : h.a.createElement(ve.a, {
style: {
flex: 1,
backgroundColor: "black"
}
}, h.a.createElement(xl.Navigator, {
screenOptions: {
headerStyle: {
backgroundColor: R.primaryDark,
shadowOffset: {
height: 0
}
},
headerTitleAlign: "center",
headerTitleStyle: {
fontWeight: "bold",
fontFamily: L.primary,
fontSize: 17,
color: R.primaryText
}
}
}, h.a.createElement(xl.Screen, {
name: "WalletOverview",
component: dr,
options: {
headerShown: !1
}
}), h.a.createElement(xl.Screen, {
name: "PaymentHome",
component: Er,
options: {
header: function() {
return h.a.createElement(Ze, {
title: "Top Up",
onBackPress: function() {
return v()
}
})
},
headerStyle: {
backgroundColor: "transparent",
borderBottomColor: "transparent"
}
}
}), h.a.createElement(xl.Screen, {
name: "StoreHome",
component: Ii,
options: {
headerShown: !1
}
}), h.a.createElement(xl.Screen, {
name: "PassesHome",
component: sl,
options: {
headerShown: !1
}
}), h.a.createElement(xl.Screen, {
name: "OrderToSeatHome",
component: Sl,
options: {
headerShown: !1
}
}), h.a.createElement(xl.Screen, {
name: "LinkTag",
component: Yr,
options: {
headerShown: !1
}
}), h.a.createElement(xl.Screen, {
name: "Settings",
component: Lr,
options: {
header: function() {
return h.a.createElement(Ze, {
title: "User Settings",
onBackPress: function() {
return v()
}
})
},
headerStyle: {
backgroundColor: "transparent",
borderBottomColor: "transparent"
}
}
}), h.a.createElement(xl.Screen, {
name: "SingleEventDetail",
component: vi,
options: {
headerShown: !1
}
}), h.a.createElement(xl.Screen, {
name: "Desktop",
component: hl,
options: {
headerShown: !1
}
})), !1 !== b && h.a.createElement(Ut, e), h.a.createElement(ke.a, {
isVisible: i,
onBackdropPress: function() {
return e.showAuthModal(!1)
}
}, h.a.createElement(In, {
cellphoneNumber: u,
onModalCancel: function() {
return e.showAuthModal(!1)
},
onSubmitPress: function() {
return e.findUser(cellphoneNumber)
}
})), h.a.createElement(ke.a, {
isVisible: l,
onBackdropPress: function() {
return e.showEmailAuthModal(!1)
}
}, h.a.createElement(Tn, {
onModalCancel: function() {
return e.showEmailAuthModal(!1)
}
})), h.a.createElement(ke.a, {
isVisible: s,
onBackdropPress: function() {
return e.showAuthLoadingModal(!1)
}
}, h.a.createElement(kn, {
onModalCancel: function() {
return e.showAuthLoadingModal(!1)
}
})), h.a.createElement(ke.a, {
isVisible: m,
onBackdropPress: function() {
return e.showCart(!1)
}
}, h.a.createElement(Na, Ee()({}, e, {
modalStyle: {
height: D.height - 40
},
onModalCancel: function() {
return e.showCart(!1)
}
}))), h.a.createElement(ke.a, {
isVisible: p,
onBackdropPress: function() {
return e.showAltPaymentOptions(!1)
}
}, h.a.createElement(Un, e)), h.a.createElement(ke.a, {
isVisible: f,
onBackdropPress: function() {
return console.log("onBackdropPress, whatevs")
}
}, h.a.createElement(Qn, null)), h.a.createElement(ke.a, {
isVisible: y,
onBackdropPress: function() {
return console.log("onBackdropPress, whatevs")
}
}, h.a.createElement(ea, null)), h.a.createElement(ke.a, {
isVisible: w,
onBackdropPress: function() {
return e.showTagLinkSuccesModal(!1)
}
}, h.a.createElement(oa, {
onOk: function() {
return e.showTagLinkSuccesModal(!1)
}
})), h.a.createElement(ke.a, {
isVisible: E,
onBackdropPress: function() {
return e.showTagLinkFailModal(!1)
}
}, h.a.createElement(la, {
onOk: function() {
return e.showTagLinkFailModal(!1)
}
})), h.a.createElement(ke.a, {
isVisible: j,
onBackdropPress: function() {
return e.setShowNewContent(!1)
}
}, h.a.createElement(ve.a, {
style: {
flex: 1,
justifyContent: "flex-end"
}
}, h.a.createElement(ve.a, {
style: {
height: 70,
borderRadius: 15,
padding: 10,
paddingLeft: 20,
backgroundColor: "white",
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
}
}, h.a.createElement(Ae, null, "New content available!"), h.a.createElement(De.a, {
title: "Refresh",
buttonStyle: {
borderRadius: 10,
color: R.pay,
padding: 15
},
titleStyle: {
fontWeight: "bold",
fontSize: 14
},
onPress: function() {
U(),
e.setShowNewContent(!1)
}
}, h.a.createElement(Ae, null, "Refresh"))))), h.a.createElement(ke.a, {
isVisible: C,
onBackdropPress: function() {
return e.setShowTermsModal(!1)
}
}, h.a.createElement(ca, Ee()({}, e, {
onClearModal: function() {
return e.setShowTermsModal(!1)
}
}))), t && h.a.createElement(Il, null), n && h.a.createElement(Ol, null))
}))),
Pl = ["title"],
Ml = be(),
kl = {
prefixes: ["http://localhost:19006/", "pilotmac.local:19006/", "https://airdosh-wallet.firebaseapp.com/", "https://airdosh-wallet.web.app/", "https://wallet.airdosh.co.za/"],
config: {
screens: {
WalletOverview: {
path: "user/:cellNo?",
parse: {
cellNo: function(e) {
return e
}
}
},
WalletOverview: {
path: "event/:orgId?/:event_id?/:prod_id?",
parse: {
orgId: function(e) {
return e
},
event_id: function(e) {
return e
},
prod_id: function(e) {
return e
}
}
}
}
}
};
!function(e) {
if ("serviceWorker" in navigator) {
if (new URL("", window.location.href).origin !== window.location.origin)
return;
window.addEventListener("load", (function() {
var t = "/service-worker.js";
O ? (!function(e, t) {
fetch(e, {
headers: {
"Service-Worker": "script"
}
}).then((function(n) {
var a = n.headers.get("content-type");
404 === n.status || null != a && -1 === a.indexOf("javascript") ? navigator.serviceWorker.ready.then((function(e) {
e.unregister().then((function() {
window.location.reload()
}))
})) : I(e, t)
})).catch((function() {
console.log("No internet connection found. App is running in offline mode.")
}))
}(t, e), navigator.serviceWorker.ready.then((function() {
console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")
}))) : I(t, e)
}))
}
}({
onUpdate: function(e) {
console.log("New Airdosh update available"),
Ml.dispatch(Wt(!0)),
Object(x.a)(e)
}
}),
o.a.config({
path: "/Users/jacodewet/Dev/pangea-wallet/.env"
}),
Object(a.a)((function() {
var e = Object(g.useState)(!1),
t = c()(e, 2),
n = t[0],
a = t[1],
r = Object(g.useState)(),
o = c()(r, 2),
i = o[0],
s = o[1];
Object(g.useEffect)((function() {
n || function() {
var e,
t,
n,
r,
o;
d.a.async((function(i) {
for (;;)
switch (i.prev = i.next) {
case 0:
return i.prev = 0, i.next = 3, d.a.awrap(f.a.getInitialURL());
case 3:
return e = i.sent, i.next = 6, d.a.awrap(C.a.getItem("NAVIGATION_STATE"));
case 6:
return t = i.sent, i.next = 9, d.a.awrap(C.a.getItem("EVENT_URL"));
case 9:
n = i.sent,
(r = e !== n && e.includes("/event/")) && C.a.setItem("EVENT_URL", e),
!r && t && s(JSON.parse(t)),
void 0 !== (o = t ? JSON.parse(t) : void 0) && !r && s(o);
case 15:
return i.prev = 15, a(!0), i.finish(15);
case 18:
case "end":
return i.stop()
}
}), null, null, [[0, , 15, 18]], Promise)
}()
}), [n]),
Object(g.useEffect)((function() {}));
try {
var u = je.a.messaging();
u.getToken().then((function(e) {
e && e
})).catch((function(e) {
console.log("An error ocurred while retrieving token. ", e)
})),
u.onMessage((function(e) {
var t = e.notification;
t.title,
l()(t, Pl);
navigator.serviceWorker.register("firebase-messaging-sw.js"),
Notification.requestPermission((function(t) {
"granted" === t && navigator.serviceWorker.ready.then((function(t) {
t.showNotification(e.notification.title, {
body: e.notification.body,
tag: e.notification.tag
})
}))
}))
}))
} catch (m) {
console.log("Messaging error", m)
}
return n ? h.a.createElement(p.b, null, h.a.createElement(g.Fragment, null, h.a.createElement(j.a, {
store: Ml
}, h.a.createElement(b.a, {
initialState: i,
onStateChange: function(e) {
return C.a.setItem("NAVIGATION_STATE", JSON.stringify(e))
},
ref: w,
linking: kl,
fallback: h.a.createElement(y.a, null, "Loading...")
}, h.a.createElement(Tl, {
linking: kl
}))))) : null
}))
},
130: function(e, t, n) {
var a = n(350),
r = n(834);
"string" === typeof (r = r.__esModule ? r.default : r) && (r = [[e.i, r, ""]]);
var o = {
insert: "head",
singleton: !1
};
a(r, o);
e.exports = r.locals || {}
},
234: function(e, t, n) {
e.exports = n.p + "static/media/ticketStack.c0613e7c.svg"
},
244: function(e, t, n) {
e.exports = n.p + "static/media/whatsapp.4091ca99.svg"
},
245: function(e, t) {
e.exports = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQ4IiBoZWlnaHQ9IjQ4IiByeD0iNyIgZmlsbD0iIzA5NzFCRCIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyIDE2Ljc3NTRDMTIgMTYuNzc1NCAyMS42NTk1IDIyLjI1MyAyMy41MzQ0IDIyLjI1M0MyNS40OTk1IDIyLjI1MyAzNS4wNTQ0IDE2Ljg4IDM1LjA1NDQgMTYuODhMMzUuMDY5OCAxNS45MkMzNS4wNjk4IDE0Ljg2MDIgMzQuMjA5NiAxNCAzMy4xNDY5IDE0SDEzLjkyMTlDMTIuODYwMiAxNCAxMiAxNC44NjAyIDEyIDE1LjkyVjE2Ljc3NTRaTTM1LjA1NDQgMTkuNzZDMzUuMDU0NCAxOS43NiAyNS41ODk4IDI0Ljg5MyAyMy41MzQ0IDI0Ljg5M0MyMS42NTk1IDI0Ljg5MyAxMi4wMTQ0IDE5Ljc2IDEyLjAxNTQgMTkuNzZMMTIgMzEuMjhDMTIgMzIuMzM5OCAxMi44NjExIDMzLjIgMTMuOTIxOSAzMy4ySDMzLjE0NjlDMzQuMjA5NiAzMy4yIDM1LjA2OTggMzIuMzM5OCAzNS4wNjk4IDMxLjI4TDM1LjA1NDQgMTkuNzZaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K"
},
307: function(e, t, n) {
e.exports = n.p + "static/media/instagram.8b2bc626.svg"
},
308: function(e, t) {
e.exports = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQ4IiBoZWlnaHQ9IjQ4IiByeD0iNiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyKSIvPgo8cGF0aCBkPSJNMzEuODIwNiAyNi40MjIzTDMyLjc1MzQgMjAuNDk1MUgyNi45MTc4VjE2LjY1MDVDMjYuOTE3OCAxNS4wMjg2IDI3LjczMTUgMTMuNDQ2NiAzMC4zNDUyIDEzLjQ0NjZIMzNWOC40MDA0OUMzMyA4LjQwMDQ5IDMwLjU5MTggOCAyOC4yOTA0IDhDMjMuNDgyMyA4IDIwLjM0MjUgMTAuODM5NCAyMC4zNDI1IDE1Ljk3NzdWMjAuNDk1MUgxNVYyNi40MjIzSDIwLjM0MjVWNDAuNzUxN0MyMS40MTUxIDQwLjkxNTkgMjIuNTEyNCA0MSAyMy42MzAyIDQxQzI0Ljc0OCA0MSAyNS44NDUzIDQwLjkxNTkgMjYuOTE3OCA0MC43NTE3VjI2LjQyMjNIMzEuODIwNloiIGZpbGw9IndoaXRlIi8+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXIiIHgxPSIyNCIgeTE9IjAiIHgyPSIyNCIgeTI9IjQ4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiMxOEFDRkUiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDI2NkUxIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg=="
},
309: function(e, t, n) {
e.exports = n.p + "static/media/web.06682653.svg"
},
575: function(e, t, n) {
e.exports = n.p + "static/media/map.94513782.png"
},
581: function(e, t, n) {
e.exports = n.p + "static/media/ADappicon.c1b4eea6.png"
},
584: function(e, t, n) {
e.exports = n.p + "static/media/splash.641217e5.png"
},
585: function(e, t, n) {
e.exports = n.p + "static/media/framer.e06f275b.svg"
},
642: function(e, t, n) {
e.exports = n.p + "static/media/walletPlus.2fcb8039.svg"
},
644: function(e, t) {
e.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzJFM0U1QyI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE0Ljc3IDlMMTIgMTIuMTEgOS4yMyA5aDUuNTRNMjEgM0gzdjJsOCA5djVINnYyaDEydi0yaC01di01bDgtOVYzek03LjQzIDdMNS42NiA1aDEyLjY5bC0xLjc4IDJINy40M3oiLz48L3N2Zz4="
},
645: function(e, t, n) {
e.exports = n.p + "static/media/storefront.628adafd.svg"
},
651: function(e, t) {
e.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiNBM0EzQTMiPjxnPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjwvZz48Zz48Zz48Y2lyY2xlIGN4PSIxMiIgY3k9IjYiIHI9IjIiLz48cGF0aCBkPSJNMjEsMTZ2LTJjLTIuMjQsMC00LjE2LTAuOTYtNS42LTIuNjhsLTEuMzQtMS42QzEzLjY4LDkuMjYsMTMuMTIsOSwxMi41Myw5aC0xLjA1Yy0wLjU5LDAtMS4xNSwwLjI2LTEuNTMsMC43MmwtMS4zNCwxLjYgQzcuMTYsMTMuMDQsNS4yNCwxNCwzLDE0djJjMi43NywwLDUuMTktMS4xNyw3LTMuMjVWMTVsLTMuODgsMS41NUM1LjQ1LDE2LjgyLDUsMTcuNDgsNSwxOC4yMUM1LDE5LjIsNS44LDIwLDYuNzksMjBIOXYtMC41IGMwLTEuMzgsMS4xMi0yLjUsMi41LTIuNWgzYzAuMjgsMCwwLjUsMC4yMiwwLjUsMC41UzE0Ljc4LDE4LDE0LjUsMThoLTNjLTAuODMsMC0xLjUsMC42Ny0xLjUsMS41VjIwaDcuMjEgQzE4LjIsMjAsMTksMTkuMiwxOSwxOC4yMWMwLTAuNzMtMC40NS0xLjM5LTEuMTItMS42NkwxNCwxNXYtMi4yNUMxNS44MSwxNC44MywxOC4yMywxNiwyMSwxNnoiLz48L2c+PC9nPjwvc3ZnPg=="
},
652: function(e, t) {
e.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iI0EzQTNBMyI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTcgMThoMlY2SDd2MTJ6bTQgNGgyVjJoLTJ2MjB6bS04LThoMnYtNEgzdjR6bTEyIDRoMlY2aC0ydjEyem00LTh2NGgydi00aC0yeiIvPjwvc3ZnPg=="
},
654: function(e, t) {
e.exports = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTI1LjUgMTIuMzA4NkwxNC43NDQ5IDMuNjM2MTFDMTQuMzYxNCAzLjIyNzYxIDEzLjg1MzggMyAxMy4zMjYxIDNDMTIuNzk4NCAzIDEyLjI5MDcgMy4yMjc2MSAxMS45MDczIDMuNjM2MTFMNC4yOTM4NiAxMS43NDM5QzMuODg1MTggMTIuMTc5IDMuNTU5NjIgMTIuNzAzNSAzLjMzNzE0IDEzLjI4NTNDMy4xMTQ2NiAxMy44NjcyIDIuOTk5OTQgMTQuNDk0IDMgMTUuMTI3NlYyNC4yMzM3QzMgMjQuODUwOSAzLjIxNzU4IDI1LjQ0MjggMy42MDQ4OSAyNS44NzkzQzMuOTkyMTkgMjYuMzE1NyA0LjUxNzQ5IDI2LjU2MDkgNS4wNjUyMiAyNi41NjA5SDIxLjU4N0MyMi4xMzQ3IDI2LjU2MDkgMjIuNjYgMjYuMzE1NyAyMy4wNDczIDI1Ljg3OTNDMjMuNDM0NiAyNS40NDI4IDIzLjY1MjIgMjQuODUwOSAyMy42NTIyIDI0LjIzMzdWMTcuMjUyMUgxMS4yNjA5TTE0LjM1ODcgMTMuNzYxNEwxMS4yNjA5IDE3LjI1MjFNMTEuMjYwOSAxNy4yNTIxTDE0LjM1ODcgMjAuNzQyOCIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIyLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K"
},
676: function(e, t, n) {
e.exports = n(1299)
},
709: function(e, t, n) {
e.exports = n.p + "static/media/chick.fc589355.png"
},
828: function(e, t, n) {
e.exports = n.p + "./fonts/Montserrat-Black.ttf"
},
833: function(e, t, n) {
e.exports = n.p + "./fonts/Montserrat-Bold.ttf"
},
834: function(e, t, n) {
(t = n(351)(!1)).push([e.i, ".sticky {\n position: sticky;\n top: 0;\n width: 100%;\n z-index: 10;\n}\n", ""]),
e.exports = t
},
835: function(e, t, n) {
e.exports = n.p + "./fonts/Montserrat-SemiBold.ttf"
},
836: function(e, t, n) {
e.exports = n.p + "./fonts/Montserrat-Medium.ttf"
}
}, [[676, 1, 2]]]);
//# sourceMappingURL=app.b4da99ba.chunk.js.map

Back to list