@timardex/cluemart-server-shared 1.1.38 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,1469 @@
1
+ import {
2
+ __commonJS,
3
+ __toESM
4
+ } from "./chunk-3QS3WKRC.mjs";
5
+
6
+ // node_modules/react/cjs/react.production.js
7
+ var require_react_production = __commonJS({
8
+ "node_modules/react/cjs/react.production.js"(exports) {
9
+ "use strict";
10
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
11
+ var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
12
+ var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
13
+ var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
14
+ var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
15
+ var REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer");
16
+ var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
17
+ var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
18
+ var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
19
+ var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
20
+ var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
21
+ var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
22
+ var REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition");
23
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
24
+ function getIteratorFn(maybeIterable) {
25
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
26
+ maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
27
+ return "function" === typeof maybeIterable ? maybeIterable : null;
28
+ }
29
+ var ReactNoopUpdateQueue = {
30
+ isMounted: function() {
31
+ return false;
32
+ },
33
+ enqueueForceUpdate: function() {
34
+ },
35
+ enqueueReplaceState: function() {
36
+ },
37
+ enqueueSetState: function() {
38
+ }
39
+ };
40
+ var assign = Object.assign;
41
+ var emptyObject = {};
42
+ function Component(props, context, updater) {
43
+ this.props = props;
44
+ this.context = context;
45
+ this.refs = emptyObject;
46
+ this.updater = updater || ReactNoopUpdateQueue;
47
+ }
48
+ Component.prototype.isReactComponent = {};
49
+ Component.prototype.setState = function(partialState, callback) {
50
+ if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
51
+ throw Error(
52
+ "takes an object of state variables to update or a function which returns an object of state variables."
53
+ );
54
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
55
+ };
56
+ Component.prototype.forceUpdate = function(callback) {
57
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
58
+ };
59
+ function ComponentDummy() {
60
+ }
61
+ ComponentDummy.prototype = Component.prototype;
62
+ function PureComponent(props, context, updater) {
63
+ this.props = props;
64
+ this.context = context;
65
+ this.refs = emptyObject;
66
+ this.updater = updater || ReactNoopUpdateQueue;
67
+ }
68
+ var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
69
+ pureComponentPrototype.constructor = PureComponent;
70
+ assign(pureComponentPrototype, Component.prototype);
71
+ pureComponentPrototype.isPureReactComponent = true;
72
+ var isArrayImpl = Array.isArray;
73
+ function noop() {
74
+ }
75
+ var ReactSharedInternals = { H: null, A: null, T: null, S: null };
76
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
77
+ function ReactElement(type, key, props) {
78
+ var refProp = props.ref;
79
+ return {
80
+ $$typeof: REACT_ELEMENT_TYPE,
81
+ type,
82
+ key,
83
+ ref: void 0 !== refProp ? refProp : null,
84
+ props
85
+ };
86
+ }
87
+ function cloneAndReplaceKey(oldElement, newKey) {
88
+ return ReactElement(oldElement.type, newKey, oldElement.props);
89
+ }
90
+ function isValidElement(object) {
91
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
92
+ }
93
+ function escape(key) {
94
+ var escaperLookup = { "=": "=0", ":": "=2" };
95
+ return "$" + key.replace(/[=:]/g, function(match) {
96
+ return escaperLookup[match];
97
+ });
98
+ }
99
+ var userProvidedKeyEscapeRegex = /\/+/g;
100
+ function getElementKey(element, index) {
101
+ return "object" === typeof element && null !== element && null != element.key ? escape("" + element.key) : index.toString(36);
102
+ }
103
+ function resolveThenable(thenable) {
104
+ switch (thenable.status) {
105
+ case "fulfilled":
106
+ return thenable.value;
107
+ case "rejected":
108
+ throw thenable.reason;
109
+ default:
110
+ switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
111
+ function(fulfilledValue) {
112
+ "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
113
+ },
114
+ function(error) {
115
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
116
+ }
117
+ )), thenable.status) {
118
+ case "fulfilled":
119
+ return thenable.value;
120
+ case "rejected":
121
+ throw thenable.reason;
122
+ }
123
+ }
124
+ throw thenable;
125
+ }
126
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
127
+ var type = typeof children;
128
+ if ("undefined" === type || "boolean" === type) children = null;
129
+ var invokeCallback = false;
130
+ if (null === children) invokeCallback = true;
131
+ else
132
+ switch (type) {
133
+ case "bigint":
134
+ case "string":
135
+ case "number":
136
+ invokeCallback = true;
137
+ break;
138
+ case "object":
139
+ switch (children.$$typeof) {
140
+ case REACT_ELEMENT_TYPE:
141
+ case REACT_PORTAL_TYPE:
142
+ invokeCallback = true;
143
+ break;
144
+ case REACT_LAZY_TYPE:
145
+ return invokeCallback = children._init, mapIntoArray(
146
+ invokeCallback(children._payload),
147
+ array,
148
+ escapedPrefix,
149
+ nameSoFar,
150
+ callback
151
+ );
152
+ }
153
+ }
154
+ if (invokeCallback)
155
+ return callback = callback(children), invokeCallback = "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar, isArrayImpl(callback) ? (escapedPrefix = "", null != invokeCallback && (escapedPrefix = invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
156
+ return c;
157
+ })) : null != callback && (isValidElement(callback) && (callback = cloneAndReplaceKey(
158
+ callback,
159
+ escapedPrefix + (null == callback.key || children && children.key === callback.key ? "" : ("" + callback.key).replace(
160
+ userProvidedKeyEscapeRegex,
161
+ "$&/"
162
+ ) + "/") + invokeCallback
163
+ )), array.push(callback)), 1;
164
+ invokeCallback = 0;
165
+ var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
166
+ if (isArrayImpl(children))
167
+ for (var i = 0; i < children.length; i++)
168
+ nameSoFar = children[i], type = nextNamePrefix + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
169
+ nameSoFar,
170
+ array,
171
+ escapedPrefix,
172
+ type,
173
+ callback
174
+ );
175
+ else if (i = getIteratorFn(children), "function" === typeof i)
176
+ for (children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
177
+ nameSoFar = nameSoFar.value, type = nextNamePrefix + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
178
+ nameSoFar,
179
+ array,
180
+ escapedPrefix,
181
+ type,
182
+ callback
183
+ );
184
+ else if ("object" === type) {
185
+ if ("function" === typeof children.then)
186
+ return mapIntoArray(
187
+ resolveThenable(children),
188
+ array,
189
+ escapedPrefix,
190
+ nameSoFar,
191
+ callback
192
+ );
193
+ array = String(children);
194
+ throw Error(
195
+ "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
196
+ );
197
+ }
198
+ return invokeCallback;
199
+ }
200
+ function mapChildren(children, func, context) {
201
+ if (null == children) return children;
202
+ var result = [], count = 0;
203
+ mapIntoArray(children, result, "", "", function(child) {
204
+ return func.call(context, child, count++);
205
+ });
206
+ return result;
207
+ }
208
+ function lazyInitializer(payload) {
209
+ if (-1 === payload._status) {
210
+ var ctor = payload._result, thenable = ctor();
211
+ thenable.then(
212
+ function(moduleObject) {
213
+ if (0 === payload._status || -1 === payload._status)
214
+ payload._status = 1, payload._result = moduleObject, void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
215
+ },
216
+ function(error) {
217
+ if (0 === payload._status || -1 === payload._status)
218
+ payload._status = 2, payload._result = error, void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
219
+ }
220
+ );
221
+ -1 === payload._status && (payload._status = 0, payload._result = thenable);
222
+ }
223
+ if (1 === payload._status) return payload._result.default;
224
+ throw payload._result;
225
+ }
226
+ var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
227
+ if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
228
+ var event = new window.ErrorEvent("error", {
229
+ bubbles: true,
230
+ cancelable: true,
231
+ message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
232
+ error
233
+ });
234
+ if (!window.dispatchEvent(event)) return;
235
+ } else if ("object" === typeof process && "function" === typeof process.emit) {
236
+ process.emit("uncaughtException", error);
237
+ return;
238
+ }
239
+ console.error(error);
240
+ };
241
+ function startTransition(scope) {
242
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
243
+ currentTransition.types = null !== prevTransition ? prevTransition.types : null;
244
+ ReactSharedInternals.T = currentTransition;
245
+ try {
246
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
247
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
248
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && returnValue.then(noop, reportGlobalError);
249
+ } catch (error) {
250
+ reportGlobalError(error);
251
+ } finally {
252
+ null !== prevTransition && null !== currentTransition.types && (prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
253
+ }
254
+ }
255
+ function addTransitionType(type) {
256
+ var transition = ReactSharedInternals.T;
257
+ if (null !== transition) {
258
+ var transitionTypes = transition.types;
259
+ null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
260
+ } else startTransition(addTransitionType.bind(null, type));
261
+ }
262
+ var Children = {
263
+ map: mapChildren,
264
+ forEach: function(children, forEachFunc, forEachContext) {
265
+ mapChildren(
266
+ children,
267
+ function() {
268
+ forEachFunc.apply(this, arguments);
269
+ },
270
+ forEachContext
271
+ );
272
+ },
273
+ count: function(children) {
274
+ var n = 0;
275
+ mapChildren(children, function() {
276
+ n++;
277
+ });
278
+ return n;
279
+ },
280
+ toArray: function(children) {
281
+ return mapChildren(children, function(child) {
282
+ return child;
283
+ }) || [];
284
+ },
285
+ only: function(children) {
286
+ if (!isValidElement(children))
287
+ throw Error(
288
+ "React.Children.only expected to receive a single React element child."
289
+ );
290
+ return children;
291
+ }
292
+ };
293
+ exports.Activity = REACT_ACTIVITY_TYPE;
294
+ exports.Children = Children;
295
+ exports.Component = Component;
296
+ exports.Fragment = REACT_FRAGMENT_TYPE;
297
+ exports.Profiler = REACT_PROFILER_TYPE;
298
+ exports.PureComponent = PureComponent;
299
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
300
+ exports.Suspense = REACT_SUSPENSE_TYPE;
301
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
302
+ exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
303
+ exports.__COMPILER_RUNTIME = {
304
+ __proto__: null,
305
+ c: function(size) {
306
+ return ReactSharedInternals.H.useMemoCache(size);
307
+ }
308
+ };
309
+ exports.addTransitionType = addTransitionType;
310
+ exports.cache = function(fn) {
311
+ return function() {
312
+ return fn.apply(null, arguments);
313
+ };
314
+ };
315
+ exports.cacheSignal = function() {
316
+ return null;
317
+ };
318
+ exports.cloneElement = function(element, config, children) {
319
+ if (null === element || void 0 === element)
320
+ throw Error(
321
+ "The argument must be a React element, but you passed " + element + "."
322
+ );
323
+ var props = assign({}, element.props), key = element.key;
324
+ if (null != config)
325
+ for (propName in void 0 !== config.key && (key = "" + config.key), config)
326
+ !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
327
+ var propName = arguments.length - 2;
328
+ if (1 === propName) props.children = children;
329
+ else if (1 < propName) {
330
+ for (var childArray = Array(propName), i = 0; i < propName; i++)
331
+ childArray[i] = arguments[i + 2];
332
+ props.children = childArray;
333
+ }
334
+ return ReactElement(element.type, key, props);
335
+ };
336
+ exports.createContext = function(defaultValue) {
337
+ defaultValue = {
338
+ $$typeof: REACT_CONTEXT_TYPE,
339
+ _currentValue: defaultValue,
340
+ _currentValue2: defaultValue,
341
+ _threadCount: 0,
342
+ Provider: null,
343
+ Consumer: null
344
+ };
345
+ defaultValue.Provider = defaultValue;
346
+ defaultValue.Consumer = {
347
+ $$typeof: REACT_CONSUMER_TYPE,
348
+ _context: defaultValue
349
+ };
350
+ return defaultValue;
351
+ };
352
+ exports.createElement = function(type, config, children) {
353
+ var propName, props = {}, key = null;
354
+ if (null != config)
355
+ for (propName in void 0 !== config.key && (key = "" + config.key), config)
356
+ hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (props[propName] = config[propName]);
357
+ var childrenLength = arguments.length - 2;
358
+ if (1 === childrenLength) props.children = children;
359
+ else if (1 < childrenLength) {
360
+ for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
361
+ childArray[i] = arguments[i + 2];
362
+ props.children = childArray;
363
+ }
364
+ if (type && type.defaultProps)
365
+ for (propName in childrenLength = type.defaultProps, childrenLength)
366
+ void 0 === props[propName] && (props[propName] = childrenLength[propName]);
367
+ return ReactElement(type, key, props);
368
+ };
369
+ exports.createRef = function() {
370
+ return { current: null };
371
+ };
372
+ exports.forwardRef = function(render) {
373
+ return { $$typeof: REACT_FORWARD_REF_TYPE, render };
374
+ };
375
+ exports.isValidElement = isValidElement;
376
+ exports.lazy = function(ctor) {
377
+ return {
378
+ $$typeof: REACT_LAZY_TYPE,
379
+ _payload: { _status: -1, _result: ctor },
380
+ _init: lazyInitializer
381
+ };
382
+ };
383
+ exports.memo = function(type, compare) {
384
+ return {
385
+ $$typeof: REACT_MEMO_TYPE,
386
+ type,
387
+ compare: void 0 === compare ? null : compare
388
+ };
389
+ };
390
+ exports.startTransition = startTransition;
391
+ exports.unstable_useCacheRefresh = function() {
392
+ return ReactSharedInternals.H.useCacheRefresh();
393
+ };
394
+ exports.use = function(usable) {
395
+ return ReactSharedInternals.H.use(usable);
396
+ };
397
+ exports.useActionState = function(action, initialState, permalink) {
398
+ return ReactSharedInternals.H.useActionState(action, initialState, permalink);
399
+ };
400
+ exports.useCallback = function(callback, deps) {
401
+ return ReactSharedInternals.H.useCallback(callback, deps);
402
+ };
403
+ exports.useContext = function(Context) {
404
+ return ReactSharedInternals.H.useContext(Context);
405
+ };
406
+ exports.useDebugValue = function() {
407
+ };
408
+ exports.useDeferredValue = function(value, initialValue) {
409
+ return ReactSharedInternals.H.useDeferredValue(value, initialValue);
410
+ };
411
+ exports.useEffect = function(create, deps) {
412
+ return ReactSharedInternals.H.useEffect(create, deps);
413
+ };
414
+ exports.useEffectEvent = function(callback) {
415
+ return ReactSharedInternals.H.useEffectEvent(callback);
416
+ };
417
+ exports.useId = function() {
418
+ return ReactSharedInternals.H.useId();
419
+ };
420
+ exports.useImperativeHandle = function(ref, create, deps) {
421
+ return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
422
+ };
423
+ exports.useInsertionEffect = function(create, deps) {
424
+ return ReactSharedInternals.H.useInsertionEffect(create, deps);
425
+ };
426
+ exports.useLayoutEffect = function(create, deps) {
427
+ return ReactSharedInternals.H.useLayoutEffect(create, deps);
428
+ };
429
+ exports.useMemo = function(create, deps) {
430
+ return ReactSharedInternals.H.useMemo(create, deps);
431
+ };
432
+ exports.useOptimistic = function(passthrough, reducer) {
433
+ return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
434
+ };
435
+ exports.useReducer = function(reducer, initialArg, init) {
436
+ return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
437
+ };
438
+ exports.useRef = function(initialValue) {
439
+ return ReactSharedInternals.H.useRef(initialValue);
440
+ };
441
+ exports.useState = function(initialState) {
442
+ return ReactSharedInternals.H.useState(initialState);
443
+ };
444
+ exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
445
+ return ReactSharedInternals.H.useSyncExternalStore(
446
+ subscribe,
447
+ getSnapshot,
448
+ getServerSnapshot
449
+ );
450
+ };
451
+ exports.useTransition = function() {
452
+ return ReactSharedInternals.H.useTransition();
453
+ };
454
+ exports.version = "19.3.0";
455
+ }
456
+ });
457
+
458
+ // node_modules/react/cjs/react.development.js
459
+ var require_react_development = __commonJS({
460
+ "node_modules/react/cjs/react.development.js"(exports, module) {
461
+ "use strict";
462
+ "production" !== process.env.NODE_ENV && (function() {
463
+ function defineDeprecationWarning(methodName, info) {
464
+ Object.defineProperty(Component.prototype, methodName, {
465
+ get: function() {
466
+ console.warn(
467
+ "%s(...) is deprecated in plain JavaScript React classes. %s",
468
+ info[0],
469
+ info[1]
470
+ );
471
+ }
472
+ });
473
+ }
474
+ function getIteratorFn(maybeIterable) {
475
+ if (null === maybeIterable || "object" !== typeof maybeIterable)
476
+ return null;
477
+ maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
478
+ return "function" === typeof maybeIterable ? maybeIterable : null;
479
+ }
480
+ function warnNoop(publicInstance, callerName) {
481
+ publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
482
+ var warningKey = publicInstance + "." + callerName;
483
+ didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
484
+ "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
485
+ callerName,
486
+ publicInstance
487
+ ), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
488
+ }
489
+ function Component(props, context, updater) {
490
+ this.props = props;
491
+ this.context = context;
492
+ this.refs = emptyObject;
493
+ this.updater = updater || ReactNoopUpdateQueue;
494
+ }
495
+ function ComponentDummy() {
496
+ }
497
+ function PureComponent(props, context, updater) {
498
+ this.props = props;
499
+ this.context = context;
500
+ this.refs = emptyObject;
501
+ this.updater = updater || ReactNoopUpdateQueue;
502
+ }
503
+ function noop() {
504
+ }
505
+ function testStringCoercion(value) {
506
+ return "" + value;
507
+ }
508
+ function checkKeyStringCoercion(value) {
509
+ try {
510
+ testStringCoercion(value);
511
+ var JSCompiler_inline_result = false;
512
+ } catch (e) {
513
+ JSCompiler_inline_result = true;
514
+ }
515
+ if (JSCompiler_inline_result) {
516
+ JSCompiler_inline_result = console;
517
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
518
+ var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
519
+ JSCompiler_temp_const.call(
520
+ JSCompiler_inline_result,
521
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
522
+ JSCompiler_inline_result$jscomp$0
523
+ );
524
+ return testStringCoercion(value);
525
+ }
526
+ }
527
+ function getComponentNameFromType(type) {
528
+ if (null == type) return null;
529
+ if ("function" === typeof type)
530
+ return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
531
+ if ("string" === typeof type) return type;
532
+ switch (type) {
533
+ case REACT_FRAGMENT_TYPE:
534
+ return "Fragment";
535
+ case REACT_PROFILER_TYPE:
536
+ return "Profiler";
537
+ case REACT_STRICT_MODE_TYPE:
538
+ return "StrictMode";
539
+ case REACT_SUSPENSE_TYPE:
540
+ return "Suspense";
541
+ case REACT_SUSPENSE_LIST_TYPE:
542
+ return "SuspenseList";
543
+ case REACT_ACTIVITY_TYPE:
544
+ return "Activity";
545
+ case REACT_VIEW_TRANSITION_TYPE:
546
+ return "ViewTransition";
547
+ }
548
+ if ("object" === typeof type)
549
+ switch ("number" === typeof type.tag && console.error(
550
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
551
+ ), type.$$typeof) {
552
+ case REACT_PORTAL_TYPE:
553
+ return "Portal";
554
+ case REACT_CONTEXT_TYPE:
555
+ return type.displayName || "Context";
556
+ case REACT_CONSUMER_TYPE:
557
+ return (type._context.displayName || "Context") + ".Consumer";
558
+ case REACT_FORWARD_REF_TYPE:
559
+ var innerType = type.render;
560
+ type = type.displayName;
561
+ type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
562
+ return type;
563
+ case REACT_MEMO_TYPE:
564
+ return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
565
+ case REACT_LAZY_TYPE:
566
+ innerType = type._payload;
567
+ type = type._init;
568
+ try {
569
+ return getComponentNameFromType(type(innerType));
570
+ } catch (x) {
571
+ }
572
+ }
573
+ return null;
574
+ }
575
+ function getTaskName(type) {
576
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
577
+ if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
578
+ return "<...>";
579
+ try {
580
+ var name = getComponentNameFromType(type);
581
+ return name ? "<" + name + ">" : "<...>";
582
+ } catch (x) {
583
+ return "<...>";
584
+ }
585
+ }
586
+ function getOwner() {
587
+ var dispatcher = ReactSharedInternals.A;
588
+ return null === dispatcher ? null : dispatcher.getOwner();
589
+ }
590
+ function UnknownOwner() {
591
+ return Error("react-stack-top-frame");
592
+ }
593
+ function hasValidKey(config) {
594
+ if (hasOwnProperty.call(config, "key")) {
595
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
596
+ if (getter && getter.isReactWarning) return false;
597
+ }
598
+ return void 0 !== config.key;
599
+ }
600
+ function defineKeyPropWarningGetter(props, displayName) {
601
+ function warnAboutAccessingKey() {
602
+ specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
603
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
604
+ displayName
605
+ ));
606
+ }
607
+ warnAboutAccessingKey.isReactWarning = true;
608
+ Object.defineProperty(props, "key", {
609
+ get: warnAboutAccessingKey,
610
+ configurable: true
611
+ });
612
+ }
613
+ function elementRefGetterWithDeprecationWarning() {
614
+ var componentName = getComponentNameFromType(this.type);
615
+ didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
616
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
617
+ ));
618
+ componentName = this.props.ref;
619
+ return void 0 !== componentName ? componentName : null;
620
+ }
621
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
622
+ var refProp = props.ref;
623
+ type = {
624
+ $$typeof: REACT_ELEMENT_TYPE,
625
+ type,
626
+ key,
627
+ props,
628
+ _owner: owner
629
+ };
630
+ null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
631
+ enumerable: false,
632
+ get: elementRefGetterWithDeprecationWarning
633
+ }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
634
+ type._store = {};
635
+ Object.defineProperty(type._store, "validated", {
636
+ configurable: false,
637
+ enumerable: false,
638
+ writable: true,
639
+ value: 0
640
+ });
641
+ Object.defineProperty(type, "_debugInfo", {
642
+ configurable: false,
643
+ enumerable: false,
644
+ writable: true,
645
+ value: null
646
+ });
647
+ Object.defineProperty(type, "_debugStack", {
648
+ configurable: false,
649
+ enumerable: false,
650
+ writable: true,
651
+ value: debugStack
652
+ });
653
+ Object.defineProperty(type, "_debugTask", {
654
+ configurable: false,
655
+ enumerable: false,
656
+ writable: true,
657
+ value: debugTask
658
+ });
659
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
660
+ return type;
661
+ }
662
+ function cloneAndReplaceKey(oldElement, newKey) {
663
+ newKey = ReactElement(
664
+ oldElement.type,
665
+ newKey,
666
+ oldElement.props,
667
+ oldElement._owner,
668
+ oldElement._debugStack,
669
+ oldElement._debugTask
670
+ );
671
+ oldElement._store && (newKey._store.validated = oldElement._store.validated);
672
+ return newKey;
673
+ }
674
+ function validateChildKeys(node) {
675
+ isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
676
+ }
677
+ function isValidElement(object) {
678
+ return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
679
+ }
680
+ function escape(key) {
681
+ var escaperLookup = { "=": "=0", ":": "=2" };
682
+ return "$" + key.replace(/[=:]/g, function(match) {
683
+ return escaperLookup[match];
684
+ });
685
+ }
686
+ function getElementKey(element, index) {
687
+ return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
688
+ }
689
+ function resolveThenable(thenable) {
690
+ switch (thenable.status) {
691
+ case "fulfilled":
692
+ return thenable.value;
693
+ case "rejected":
694
+ throw thenable.reason;
695
+ default:
696
+ switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
697
+ function(fulfilledValue) {
698
+ "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
699
+ },
700
+ function(error) {
701
+ "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
702
+ }
703
+ )), thenable.status) {
704
+ case "fulfilled":
705
+ return thenable.value;
706
+ case "rejected":
707
+ throw thenable.reason;
708
+ }
709
+ }
710
+ throw thenable;
711
+ }
712
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
713
+ var type = typeof children;
714
+ if ("undefined" === type || "boolean" === type) children = null;
715
+ var invokeCallback = false;
716
+ if (null === children) invokeCallback = true;
717
+ else
718
+ switch (type) {
719
+ case "bigint":
720
+ case "string":
721
+ case "number":
722
+ invokeCallback = true;
723
+ break;
724
+ case "object":
725
+ switch (children.$$typeof) {
726
+ case REACT_ELEMENT_TYPE:
727
+ case REACT_PORTAL_TYPE:
728
+ invokeCallback = true;
729
+ break;
730
+ case REACT_LAZY_TYPE:
731
+ return invokeCallback = children._init, mapIntoArray(
732
+ invokeCallback(children._payload),
733
+ array,
734
+ escapedPrefix,
735
+ nameSoFar,
736
+ callback
737
+ );
738
+ }
739
+ }
740
+ if (invokeCallback) {
741
+ invokeCallback = children;
742
+ callback = callback(invokeCallback);
743
+ var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
744
+ isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
745
+ return c;
746
+ })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
747
+ callback,
748
+ escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
749
+ userProvidedKeyEscapeRegex,
750
+ "$&/"
751
+ ) + "/") + childKey
752
+ ), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
753
+ return 1;
754
+ }
755
+ invokeCallback = 0;
756
+ childKey = "" === nameSoFar ? "." : nameSoFar + ":";
757
+ if (isArrayImpl(children))
758
+ for (var i = 0; i < children.length; i++)
759
+ nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
760
+ nameSoFar,
761
+ array,
762
+ escapedPrefix,
763
+ type,
764
+ callback
765
+ );
766
+ else if (i = getIteratorFn(children), "function" === typeof i)
767
+ for (i === children.entries && (didWarnAboutMaps || console.warn(
768
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
769
+ ), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
770
+ nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
771
+ nameSoFar,
772
+ array,
773
+ escapedPrefix,
774
+ type,
775
+ callback
776
+ );
777
+ else if ("object" === type) {
778
+ if ("function" === typeof children.then)
779
+ return mapIntoArray(
780
+ resolveThenable(children),
781
+ array,
782
+ escapedPrefix,
783
+ nameSoFar,
784
+ callback
785
+ );
786
+ array = String(children);
787
+ throw Error(
788
+ "Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
789
+ );
790
+ }
791
+ return invokeCallback;
792
+ }
793
+ function mapChildren(children, func, context) {
794
+ if (null == children) return children;
795
+ var result = [], count = 0;
796
+ mapIntoArray(children, result, "", "", function(child) {
797
+ return func.call(context, child, count++);
798
+ });
799
+ return result;
800
+ }
801
+ function lazyInitializer(payload) {
802
+ if (-1 === payload._status) {
803
+ var resolveDebugValue = null, rejectDebugValue = null, ioInfo = payload._ioInfo;
804
+ null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(resolve, reject) {
805
+ resolveDebugValue = resolve;
806
+ rejectDebugValue = reject;
807
+ }));
808
+ ioInfo = payload._result;
809
+ var thenable = ioInfo();
810
+ thenable.then(
811
+ function(moduleObject) {
812
+ if (0 === payload._status || -1 === payload._status) {
813
+ payload._status = 1;
814
+ payload._result = moduleObject;
815
+ var _ioInfo = payload._ioInfo;
816
+ if (null != _ioInfo) {
817
+ _ioInfo.end = performance.now();
818
+ var debugValue = null == moduleObject ? void 0 : moduleObject.default;
819
+ resolveDebugValue(debugValue);
820
+ _ioInfo.value.status = "fulfilled";
821
+ _ioInfo.value.value = debugValue;
822
+ }
823
+ void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
824
+ }
825
+ },
826
+ function(error) {
827
+ if (0 === payload._status || -1 === payload._status) {
828
+ payload._status = 2;
829
+ payload._result = error;
830
+ var _ioInfo2 = payload._ioInfo;
831
+ null != _ioInfo2 && (_ioInfo2.end = performance.now(), _ioInfo2.value.then(noop, noop), rejectDebugValue(error), _ioInfo2.value.status = "rejected", _ioInfo2.value.reason = error);
832
+ void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
833
+ }
834
+ }
835
+ );
836
+ ioInfo = payload._ioInfo;
837
+ if (null != ioInfo) {
838
+ var displayName = thenable.displayName;
839
+ "string" === typeof displayName && (ioInfo.name = displayName);
840
+ }
841
+ -1 === payload._status && (payload._status = 0, payload._result = thenable);
842
+ }
843
+ if (1 === payload._status)
844
+ return ioInfo = payload._result, void 0 === ioInfo && console.error(
845
+ "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
846
+ ioInfo
847
+ ), "default" in ioInfo || console.error(
848
+ "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
849
+ ioInfo
850
+ ), ioInfo.default;
851
+ throw payload._result;
852
+ }
853
+ function resolveDispatcher() {
854
+ var dispatcher = ReactSharedInternals.H;
855
+ null === dispatcher && console.error(
856
+ "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
857
+ );
858
+ return dispatcher;
859
+ }
860
+ function releaseAsyncTransition() {
861
+ ReactSharedInternals.asyncTransitions--;
862
+ }
863
+ function startTransition(scope) {
864
+ var prevTransition = ReactSharedInternals.T, currentTransition = {};
865
+ currentTransition.types = null !== prevTransition ? prevTransition.types : null;
866
+ currentTransition._updatedFibers = /* @__PURE__ */ new Set();
867
+ ReactSharedInternals.T = currentTransition;
868
+ try {
869
+ var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
870
+ null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
871
+ "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
872
+ } catch (error) {
873
+ reportGlobalError(error);
874
+ } finally {
875
+ null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
876
+ "Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
877
+ )), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
878
+ "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
879
+ ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
880
+ }
881
+ }
882
+ function addTransitionType(type) {
883
+ var transition = ReactSharedInternals.T;
884
+ if (null !== transition) {
885
+ var transitionTypes = transition.types;
886
+ null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);
887
+ } else
888
+ 0 === ReactSharedInternals.asyncTransitions && console.error(
889
+ "addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."
890
+ ), startTransition(addTransitionType.bind(null, type));
891
+ }
892
+ function enqueueTask(task) {
893
+ if (null === enqueueTaskImpl)
894
+ try {
895
+ var requireString = ("require" + Math.random()).slice(0, 7);
896
+ enqueueTaskImpl = (module && module[requireString]).call(
897
+ module,
898
+ "timers"
899
+ ).setImmediate;
900
+ } catch (_err) {
901
+ enqueueTaskImpl = function(callback) {
902
+ false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
903
+ "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
904
+ ));
905
+ var channel = new MessageChannel();
906
+ channel.port1.onmessage = callback;
907
+ channel.port2.postMessage(void 0);
908
+ };
909
+ }
910
+ return enqueueTaskImpl(task);
911
+ }
912
+ function aggregateErrors(errors) {
913
+ return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
914
+ }
915
+ function popActScope(prevActQueue, prevActScopeDepth) {
916
+ prevActScopeDepth !== actScopeDepth - 1 && console.error(
917
+ "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
918
+ );
919
+ actScopeDepth = prevActScopeDepth;
920
+ }
921
+ function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
922
+ var queue = ReactSharedInternals.actQueue;
923
+ if (null !== queue)
924
+ if (0 !== queue.length)
925
+ try {
926
+ flushActQueue(queue);
927
+ enqueueTask(function() {
928
+ return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
929
+ });
930
+ return;
931
+ } catch (error) {
932
+ ReactSharedInternals.thrownErrors.push(error);
933
+ }
934
+ else ReactSharedInternals.actQueue = null;
935
+ 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
936
+ }
937
+ function flushActQueue(queue) {
938
+ if (!isFlushing) {
939
+ isFlushing = true;
940
+ var i = 0;
941
+ try {
942
+ for (; i < queue.length; i++) {
943
+ var callback = queue[i];
944
+ do {
945
+ ReactSharedInternals.didUsePromise = false;
946
+ var continuation = callback(false);
947
+ if (null !== continuation) {
948
+ if (ReactSharedInternals.didUsePromise) {
949
+ queue[i] = callback;
950
+ queue.splice(0, i);
951
+ return;
952
+ }
953
+ callback = continuation;
954
+ } else break;
955
+ } while (1);
956
+ }
957
+ queue.length = 0;
958
+ } catch (error) {
959
+ queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
960
+ } finally {
961
+ isFlushing = false;
962
+ }
963
+ }
964
+ }
965
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
966
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
967
+ isMounted: function() {
968
+ return false;
969
+ },
970
+ enqueueForceUpdate: function(publicInstance) {
971
+ warnNoop(publicInstance, "forceUpdate");
972
+ },
973
+ enqueueReplaceState: function(publicInstance) {
974
+ warnNoop(publicInstance, "replaceState");
975
+ },
976
+ enqueueSetState: function(publicInstance) {
977
+ warnNoop(publicInstance, "setState");
978
+ }
979
+ }, assign = Object.assign, emptyObject = {};
980
+ Object.freeze(emptyObject);
981
+ Component.prototype.isReactComponent = {};
982
+ Component.prototype.setState = function(partialState, callback) {
983
+ if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
984
+ throw Error(
985
+ "takes an object of state variables to update or a function which returns an object of state variables."
986
+ );
987
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
988
+ };
989
+ Component.prototype.forceUpdate = function(callback) {
990
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
991
+ };
992
+ var deprecatedAPIs = {
993
+ isMounted: [
994
+ "isMounted",
995
+ "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
996
+ ],
997
+ replaceState: [
998
+ "replaceState",
999
+ "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
1000
+ ]
1001
+ };
1002
+ for (fnName in deprecatedAPIs)
1003
+ deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1004
+ ComponentDummy.prototype = Component.prototype;
1005
+ deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
1006
+ deprecatedAPIs.constructor = PureComponent;
1007
+ assign(deprecatedAPIs, Component.prototype);
1008
+ deprecatedAPIs.isPureReactComponent = true;
1009
+ var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = {
1010
+ H: null,
1011
+ A: null,
1012
+ T: null,
1013
+ S: null,
1014
+ actQueue: null,
1015
+ asyncTransitions: 0,
1016
+ isBatchingLegacy: false,
1017
+ didScheduleLegacyUpdate: false,
1018
+ didUsePromise: false,
1019
+ thrownErrors: [],
1020
+ getCurrentStack: null,
1021
+ recentlyCreatedOwnerStacks: 0
1022
+ }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
1023
+ return null;
1024
+ };
1025
+ deprecatedAPIs = {
1026
+ react_stack_bottom_frame: function(callStackForError) {
1027
+ return callStackForError();
1028
+ }
1029
+ };
1030
+ var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
1031
+ var didWarnAboutElementRef = {};
1032
+ var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
1033
+ deprecatedAPIs,
1034
+ UnknownOwner
1035
+ )();
1036
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1037
+ var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
1038
+ if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
1039
+ var event = new window.ErrorEvent("error", {
1040
+ bubbles: true,
1041
+ cancelable: true,
1042
+ message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
1043
+ error
1044
+ });
1045
+ if (!window.dispatchEvent(event)) return;
1046
+ } else if ("object" === typeof process && "function" === typeof process.emit) {
1047
+ process.emit("uncaughtException", error);
1048
+ return;
1049
+ }
1050
+ console.error(error);
1051
+ }, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
1052
+ queueMicrotask(function() {
1053
+ return queueMicrotask(callback);
1054
+ });
1055
+ } : enqueueTask;
1056
+ deprecatedAPIs = Object.freeze({
1057
+ __proto__: null,
1058
+ c: function(size) {
1059
+ return resolveDispatcher().useMemoCache(size);
1060
+ }
1061
+ });
1062
+ var fnName = {
1063
+ map: mapChildren,
1064
+ forEach: function(children, forEachFunc, forEachContext) {
1065
+ mapChildren(
1066
+ children,
1067
+ function() {
1068
+ forEachFunc.apply(this, arguments);
1069
+ },
1070
+ forEachContext
1071
+ );
1072
+ },
1073
+ count: function(children) {
1074
+ var n = 0;
1075
+ mapChildren(children, function() {
1076
+ n++;
1077
+ });
1078
+ return n;
1079
+ },
1080
+ toArray: function(children) {
1081
+ return mapChildren(children, function(child) {
1082
+ return child;
1083
+ }) || [];
1084
+ },
1085
+ only: function(children) {
1086
+ if (!isValidElement(children))
1087
+ throw Error(
1088
+ "React.Children.only expected to receive a single React element child."
1089
+ );
1090
+ return children;
1091
+ }
1092
+ };
1093
+ exports.Activity = REACT_ACTIVITY_TYPE;
1094
+ exports.Children = fnName;
1095
+ exports.Component = Component;
1096
+ exports.Fragment = REACT_FRAGMENT_TYPE;
1097
+ exports.Profiler = REACT_PROFILER_TYPE;
1098
+ exports.PureComponent = PureComponent;
1099
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
1100
+ exports.Suspense = REACT_SUSPENSE_TYPE;
1101
+ exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
1102
+ exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
1103
+ exports.__COMPILER_RUNTIME = deprecatedAPIs;
1104
+ exports.act = function(callback) {
1105
+ var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
1106
+ actScopeDepth++;
1107
+ var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
1108
+ try {
1109
+ var result = callback();
1110
+ } catch (error) {
1111
+ ReactSharedInternals.thrownErrors.push(error);
1112
+ }
1113
+ if (0 < ReactSharedInternals.thrownErrors.length)
1114
+ throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1115
+ if (null !== result && "object" === typeof result && "function" === typeof result.then) {
1116
+ var thenable = result;
1117
+ queueSeveralMicrotasks(function() {
1118
+ didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1119
+ "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
1120
+ ));
1121
+ });
1122
+ return {
1123
+ then: function(resolve, reject) {
1124
+ didAwaitActCall = true;
1125
+ thenable.then(
1126
+ function(returnValue) {
1127
+ popActScope(prevActQueue, prevActScopeDepth);
1128
+ if (0 === prevActScopeDepth) {
1129
+ try {
1130
+ flushActQueue(queue), enqueueTask(function() {
1131
+ return recursivelyFlushAsyncActWork(
1132
+ returnValue,
1133
+ resolve,
1134
+ reject
1135
+ );
1136
+ });
1137
+ } catch (error$0) {
1138
+ ReactSharedInternals.thrownErrors.push(error$0);
1139
+ }
1140
+ if (0 < ReactSharedInternals.thrownErrors.length) {
1141
+ var _thrownError = aggregateErrors(
1142
+ ReactSharedInternals.thrownErrors
1143
+ );
1144
+ ReactSharedInternals.thrownErrors.length = 0;
1145
+ reject(_thrownError);
1146
+ }
1147
+ } else resolve(returnValue);
1148
+ },
1149
+ function(error) {
1150
+ popActScope(prevActQueue, prevActScopeDepth);
1151
+ 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
1152
+ ReactSharedInternals.thrownErrors
1153
+ ), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
1154
+ }
1155
+ );
1156
+ }
1157
+ };
1158
+ }
1159
+ var returnValue$jscomp$0 = result;
1160
+ popActScope(prevActQueue, prevActScopeDepth);
1161
+ 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
1162
+ didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
1163
+ "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
1164
+ ));
1165
+ }), ReactSharedInternals.actQueue = null);
1166
+ if (0 < ReactSharedInternals.thrownErrors.length)
1167
+ throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
1168
+ return {
1169
+ then: function(resolve, reject) {
1170
+ didAwaitActCall = true;
1171
+ 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
1172
+ return recursivelyFlushAsyncActWork(
1173
+ returnValue$jscomp$0,
1174
+ resolve,
1175
+ reject
1176
+ );
1177
+ })) : resolve(returnValue$jscomp$0);
1178
+ }
1179
+ };
1180
+ };
1181
+ exports.addTransitionType = addTransitionType;
1182
+ exports.cache = function(fn) {
1183
+ return function() {
1184
+ return fn.apply(null, arguments);
1185
+ };
1186
+ };
1187
+ exports.cacheSignal = function() {
1188
+ return null;
1189
+ };
1190
+ exports.captureOwnerStack = function() {
1191
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
1192
+ return null === getCurrentStack ? null : getCurrentStack();
1193
+ };
1194
+ exports.cloneElement = function(element, config, children) {
1195
+ if (null === element || void 0 === element)
1196
+ throw Error(
1197
+ "The argument must be a React element, but you passed " + element + "."
1198
+ );
1199
+ var props = assign({}, element.props), key = element.key, owner = element._owner;
1200
+ if (null != config) {
1201
+ var JSCompiler_inline_result;
1202
+ a: {
1203
+ if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
1204
+ config,
1205
+ "ref"
1206
+ ).get) && JSCompiler_inline_result.isReactWarning) {
1207
+ JSCompiler_inline_result = false;
1208
+ break a;
1209
+ }
1210
+ JSCompiler_inline_result = void 0 !== config.ref;
1211
+ }
1212
+ JSCompiler_inline_result && (owner = getOwner());
1213
+ hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
1214
+ for (propName in config)
1215
+ !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
1216
+ }
1217
+ var propName = arguments.length - 2;
1218
+ if (1 === propName) props.children = children;
1219
+ else if (1 < propName) {
1220
+ JSCompiler_inline_result = Array(propName);
1221
+ for (var i = 0; i < propName; i++)
1222
+ JSCompiler_inline_result[i] = arguments[i + 2];
1223
+ props.children = JSCompiler_inline_result;
1224
+ }
1225
+ props = ReactElement(
1226
+ element.type,
1227
+ key,
1228
+ props,
1229
+ owner,
1230
+ element._debugStack,
1231
+ element._debugTask
1232
+ );
1233
+ for (key = 2; key < arguments.length; key++)
1234
+ validateChildKeys(arguments[key]);
1235
+ return props;
1236
+ };
1237
+ exports.createContext = function(defaultValue) {
1238
+ defaultValue = {
1239
+ $$typeof: REACT_CONTEXT_TYPE,
1240
+ _currentValue: defaultValue,
1241
+ _currentValue2: defaultValue,
1242
+ _threadCount: 0,
1243
+ Provider: null,
1244
+ Consumer: null
1245
+ };
1246
+ defaultValue.Provider = defaultValue;
1247
+ defaultValue.Consumer = {
1248
+ $$typeof: REACT_CONSUMER_TYPE,
1249
+ _context: defaultValue
1250
+ };
1251
+ defaultValue._currentRenderer = null;
1252
+ defaultValue._currentRenderer2 = null;
1253
+ return defaultValue;
1254
+ };
1255
+ exports.createElement = function(type, config, children) {
1256
+ for (var i = 2; i < arguments.length; i++)
1257
+ validateChildKeys(arguments[i]);
1258
+ var propName;
1259
+ i = {};
1260
+ var key = null;
1261
+ if (null != config)
1262
+ for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
1263
+ "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
1264
+ )), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
1265
+ hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
1266
+ var childrenLength = arguments.length - 2;
1267
+ if (1 === childrenLength) i.children = children;
1268
+ else if (1 < childrenLength) {
1269
+ for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
1270
+ childArray[_i] = arguments[_i + 2];
1271
+ Object.freeze && Object.freeze(childArray);
1272
+ i.children = childArray;
1273
+ }
1274
+ if (type && type.defaultProps)
1275
+ for (propName in childrenLength = type.defaultProps, childrenLength)
1276
+ void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1277
+ key && defineKeyPropWarningGetter(
1278
+ i,
1279
+ "function" === typeof type ? type.displayName || type.name || "Unknown" : type
1280
+ );
1281
+ (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++) ? (childArray = Error.stackTraceLimit, Error.stackTraceLimit = 10, childrenLength = Error("react-stack-top-frame"), Error.stackTraceLimit = childArray) : childrenLength = unknownOwnerDebugStack;
1282
+ return ReactElement(
1283
+ type,
1284
+ key,
1285
+ i,
1286
+ getOwner(),
1287
+ childrenLength,
1288
+ propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1289
+ );
1290
+ };
1291
+ exports.createRef = function() {
1292
+ var refObject = { current: null };
1293
+ Object.seal(refObject);
1294
+ return refObject;
1295
+ };
1296
+ exports.forwardRef = function(render) {
1297
+ null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
1298
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1299
+ ) : "function" !== typeof render ? console.error(
1300
+ "forwardRef requires a render function but was given %s.",
1301
+ null === render ? "null" : typeof render
1302
+ ) : 0 !== render.length && 2 !== render.length && console.error(
1303
+ "forwardRef render functions accept exactly two parameters: props and ref. %s",
1304
+ 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
1305
+ );
1306
+ null != render && null != render.defaultProps && console.error(
1307
+ "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1308
+ );
1309
+ var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
1310
+ Object.defineProperty(elementType, "displayName", {
1311
+ enumerable: false,
1312
+ configurable: true,
1313
+ get: function() {
1314
+ return ownName;
1315
+ },
1316
+ set: function(name) {
1317
+ ownName = name;
1318
+ render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
1319
+ }
1320
+ });
1321
+ return elementType;
1322
+ };
1323
+ exports.isValidElement = isValidElement;
1324
+ exports.lazy = function(ctor) {
1325
+ ctor = { _status: -1, _result: ctor };
1326
+ var lazyType = {
1327
+ $$typeof: REACT_LAZY_TYPE,
1328
+ _payload: ctor,
1329
+ _init: lazyInitializer
1330
+ }, ioInfo = {
1331
+ name: "lazy",
1332
+ start: -1,
1333
+ end: -1,
1334
+ value: null,
1335
+ owner: null,
1336
+ debugStack: Error("react-stack-top-frame"),
1337
+ debugTask: console.createTask ? console.createTask("lazy()") : null
1338
+ };
1339
+ ctor._ioInfo = ioInfo;
1340
+ lazyType._debugInfo = [{ awaited: ioInfo }];
1341
+ return lazyType;
1342
+ };
1343
+ exports.memo = function(type, compare) {
1344
+ null == type && console.error(
1345
+ "memo: The first argument must be a component. Instead received: %s",
1346
+ null === type ? "null" : typeof type
1347
+ );
1348
+ compare = {
1349
+ $$typeof: REACT_MEMO_TYPE,
1350
+ type,
1351
+ compare: void 0 === compare ? null : compare
1352
+ };
1353
+ var ownName;
1354
+ Object.defineProperty(compare, "displayName", {
1355
+ enumerable: false,
1356
+ configurable: true,
1357
+ get: function() {
1358
+ return ownName;
1359
+ },
1360
+ set: function(name) {
1361
+ ownName = name;
1362
+ type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
1363
+ }
1364
+ });
1365
+ return compare;
1366
+ };
1367
+ exports.startTransition = startTransition;
1368
+ exports.unstable_useCacheRefresh = function() {
1369
+ return resolveDispatcher().useCacheRefresh();
1370
+ };
1371
+ exports.use = function(usable) {
1372
+ return resolveDispatcher().use(usable);
1373
+ };
1374
+ exports.useActionState = function(action, initialState, permalink) {
1375
+ return resolveDispatcher().useActionState(
1376
+ action,
1377
+ initialState,
1378
+ permalink
1379
+ );
1380
+ };
1381
+ exports.useCallback = function(callback, deps) {
1382
+ return resolveDispatcher().useCallback(callback, deps);
1383
+ };
1384
+ exports.useContext = function(Context) {
1385
+ var dispatcher = resolveDispatcher();
1386
+ Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
1387
+ "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1388
+ );
1389
+ return dispatcher.useContext(Context);
1390
+ };
1391
+ exports.useDebugValue = function(value, formatterFn) {
1392
+ return resolveDispatcher().useDebugValue(value, formatterFn);
1393
+ };
1394
+ exports.useDeferredValue = function(value, initialValue) {
1395
+ return resolveDispatcher().useDeferredValue(value, initialValue);
1396
+ };
1397
+ exports.useEffect = function(create, deps) {
1398
+ null == create && console.warn(
1399
+ "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1400
+ );
1401
+ return resolveDispatcher().useEffect(create, deps);
1402
+ };
1403
+ exports.useEffectEvent = function(callback) {
1404
+ return resolveDispatcher().useEffectEvent(callback);
1405
+ };
1406
+ exports.useId = function() {
1407
+ return resolveDispatcher().useId();
1408
+ };
1409
+ exports.useImperativeHandle = function(ref, create, deps) {
1410
+ return resolveDispatcher().useImperativeHandle(ref, create, deps);
1411
+ };
1412
+ exports.useInsertionEffect = function(create, deps) {
1413
+ null == create && console.warn(
1414
+ "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1415
+ );
1416
+ return resolveDispatcher().useInsertionEffect(create, deps);
1417
+ };
1418
+ exports.useLayoutEffect = function(create, deps) {
1419
+ null == create && console.warn(
1420
+ "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1421
+ );
1422
+ return resolveDispatcher().useLayoutEffect(create, deps);
1423
+ };
1424
+ exports.useMemo = function(create, deps) {
1425
+ return resolveDispatcher().useMemo(create, deps);
1426
+ };
1427
+ exports.useOptimistic = function(passthrough, reducer) {
1428
+ return resolveDispatcher().useOptimistic(passthrough, reducer);
1429
+ };
1430
+ exports.useReducer = function(reducer, initialArg, init) {
1431
+ return resolveDispatcher().useReducer(reducer, initialArg, init);
1432
+ };
1433
+ exports.useRef = function(initialValue) {
1434
+ return resolveDispatcher().useRef(initialValue);
1435
+ };
1436
+ exports.useState = function(initialState) {
1437
+ return resolveDispatcher().useState(initialState);
1438
+ };
1439
+ exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
1440
+ return resolveDispatcher().useSyncExternalStore(
1441
+ subscribe,
1442
+ getSnapshot,
1443
+ getServerSnapshot
1444
+ );
1445
+ };
1446
+ exports.useTransition = function() {
1447
+ return resolveDispatcher().useTransition();
1448
+ };
1449
+ exports.version = "19.3.0";
1450
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1451
+ })();
1452
+ }
1453
+ });
1454
+
1455
+ // node_modules/react/index.js
1456
+ var require_react = __commonJS({
1457
+ "node_modules/react/index.js"(exports, module) {
1458
+ "use strict";
1459
+ if (process.env.NODE_ENV === "production") {
1460
+ module.exports = require_react_production();
1461
+ } else {
1462
+ module.exports = require_react_development();
1463
+ }
1464
+ }
1465
+ });
1466
+
1
1467
  // node_modules/@timardex/cluemart-shared/dist/index.mjs
2
1468
  import dayjs from "dayjs";
3
1469
  import customParseFormat from "dayjs/plugin/customParseFormat.js";
@@ -207,6 +1673,7 @@ setVerbosity(globalThis.__DEV__ !== false ? "log" : "silent");
207
1673
 
208
1674
  // node_modules/@timardex/cluemart-shared/dist/index.mjs
209
1675
  import { print } from "graphql";
1676
+ var import_react = __toESM(require_react(), 1);
210
1677
  var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus22) => {
211
1678
  EnumInviteStatus22["ACCEPTED"] = "Accepted";
212
1679
  EnumInviteStatus22["COMPLETED"] = "Completed";
@@ -292,8 +1759,8 @@ var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource22) => {
292
1759
  return EnumRelationResource22;
293
1760
  })(EnumRelationResource || {});
294
1761
  var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType22) => {
295
- EnumNotificationResourceType22["APPROVED_AFFILIATE"] = "approved_affiliate";
296
1762
  EnumNotificationResourceType22["AFFILIATE_REWARD_RECEIVED"] = "affiliate_reward_received";
1763
+ EnumNotificationResourceType22["APPROVED_AFFILIATE"] = "approved_affiliate";
297
1764
  EnumNotificationResourceType22["APPROVED_EVENT"] = "approved_event";
298
1765
  EnumNotificationResourceType22["APPROVED_PARTNER"] = "approved_partner";
299
1766
  EnumNotificationResourceType22["APPROVED_SCHOOL"] = "approved_school";
@@ -321,6 +1788,7 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
321
1788
  EnumNotificationResourceType22["NEW_POST_CREATED"] = "new_post_created";
322
1789
  EnumNotificationResourceType22["REGISTERED_USER_BY_SCHOOL_CODE"] = "registered_user_by_school_code";
323
1790
  EnumNotificationResourceType22["SYSTEM_ALERT"] = "system_alert";
1791
+ EnumNotificationResourceType22["USER_COUPON_REDEEMED"] = "user_coupon_redeemed";
324
1792
  EnumNotificationResourceType22["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
325
1793
  EnumNotificationResourceType22["VENDOR_UPDATE_RELATION_TO_EVENT"] = "vendor_update_relation_to_event";
326
1794
  return EnumNotificationResourceType22;
@@ -395,6 +1863,11 @@ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
395
1863
  EnumSubscriptionStatus22["TRIALING"] = "trialing";
396
1864
  return EnumSubscriptionStatus22;
397
1865
  })(EnumSubscriptionStatus || {});
1866
+ var EnumBillingPeriod = /* @__PURE__ */ ((EnumBillingPeriod22) => {
1867
+ EnumBillingPeriod22["MONTHLY_CANCEL_ANYTIME"] = "monthly_cancel_anytime";
1868
+ EnumBillingPeriod22["YEARLY_ANNUAL_BILLED"] = "yearly_annual_billed";
1869
+ return EnumBillingPeriod22;
1870
+ })(EnumBillingPeriod || {});
398
1871
  var EnumReward = /* @__PURE__ */ ((EnumReward22) => {
399
1872
  EnumReward22["MYSTERY_JOY_BOX"] = "mystery_joy_box";
400
1873
  EnumReward22["MYSTERY_SQUEEZE_BOX"] = "mystery_squeeze_box";
@@ -1677,6 +3150,80 @@ var availableCategories = assignColorToCategories([
1677
3150
  ...petProductsAndAnimalGoods,
1678
3151
  ...serviceAndExperience
1679
3152
  ]);
3153
+ var BILLING_CATALOG_KEYS = [
3154
+ "pro_vendor_monthly",
3155
+ "pro_vendor_yearly",
3156
+ "pro_plus_vendor_monthly",
3157
+ "pro_plus_vendor_yearly"
3158
+ ];
3159
+ var BILLING_CATALOG_CURRENCY = "nzd";
3160
+ var BILLING_CATALOG_DEFINITIONS = {
3161
+ pro_plus_vendor_monthly: {
3162
+ billingPeriod: "monthly_cancel_anytime",
3163
+ licenceType: "pro_plus_vendor"
3164
+ /* PRO_PLUS_VENDOR */
3165
+ },
3166
+ pro_plus_vendor_yearly: {
3167
+ billingPeriod: "yearly_annual_billed",
3168
+ licenceType: "pro_plus_vendor"
3169
+ /* PRO_PLUS_VENDOR */
3170
+ },
3171
+ pro_vendor_monthly: {
3172
+ billingPeriod: "monthly_cancel_anytime",
3173
+ licenceType: "pro_vendor"
3174
+ /* PRO_VENDOR */
3175
+ },
3176
+ pro_vendor_yearly: {
3177
+ billingPeriod: "yearly_annual_billed",
3178
+ licenceType: "pro_vendor"
3179
+ /* PRO_VENDOR */
3180
+ }
3181
+ };
3182
+ var INITIAL_BILLING_CATALOG = [
3183
+ {
3184
+ active: true,
3185
+ billingPeriod: "monthly_cancel_anytime",
3186
+ currency: BILLING_CATALOG_CURRENCY,
3187
+ key: "pro_vendor_monthly",
3188
+ licenceType: "pro_vendor",
3189
+ taxInclusive: true,
3190
+ unitAmount: 3999
3191
+ },
3192
+ {
3193
+ active: true,
3194
+ billingPeriod: "yearly_annual_billed",
3195
+ currency: BILLING_CATALOG_CURRENCY,
3196
+ key: "pro_vendor_yearly",
3197
+ licenceType: "pro_vendor",
3198
+ taxInclusive: true,
3199
+ unitAmount: 40788
3200
+ },
3201
+ {
3202
+ active: true,
3203
+ billingPeriod: "monthly_cancel_anytime",
3204
+ currency: BILLING_CATALOG_CURRENCY,
3205
+ key: "pro_plus_vendor_monthly",
3206
+ licenceType: "pro_plus_vendor",
3207
+ taxInclusive: true,
3208
+ unitAmount: 6499
3209
+ },
3210
+ {
3211
+ active: true,
3212
+ billingPeriod: "yearly_annual_billed",
3213
+ currency: BILLING_CATALOG_CURRENCY,
3214
+ key: "pro_plus_vendor_yearly",
3215
+ licenceType: "pro_plus_vendor",
3216
+ taxInclusive: true,
3217
+ unitAmount: 62388
3218
+ }
3219
+ ];
3220
+ function billingCatalogDefinitionMatches(entry) {
3221
+ const definition = BILLING_CATALOG_DEFINITIONS[entry.key];
3222
+ if (!definition) {
3223
+ return false;
3224
+ }
3225
+ return definition.billingPeriod === entry.billingPeriod && definition.licenceType === entry.licenceType;
3226
+ }
1680
3227
  var packagingTypes = [
1681
3228
  "Biodegradable",
1682
3229
  "Compostable",
@@ -2121,12 +3668,19 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = gql`
2121
3668
  `;
2122
3669
  var STRIPE_FIELDS_FRAGMENT = gql`
2123
3670
  fragment StripeSubscriptionFields on StripeSubscriptionType {
3671
+ billingPeriod
3672
+ cancelAtPeriodEnd
2124
3673
  customerId
2125
3674
  subscriptionId
2126
3675
  status
2127
3676
  currentPlan
2128
3677
  startDate
2129
3678
  endDate
3679
+ pendingPlan
3680
+ pendingBillingPeriod
3681
+ pendingChangeEffectiveAt
3682
+ priceId
3683
+ scheduleId
2130
3684
  }
2131
3685
  `;
2132
3686
  var USER_FIELDS_FRAGMENT = gql`
@@ -2403,8 +3957,11 @@ var EVENT = gql`
2403
3957
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
2404
3958
  `;
2405
3959
  var GET_EVENTS = gql`
2406
- query getEvents($dateStatus: EventDateStatusEnumType) {
2407
- events(dateStatus: $dateStatus) {
3960
+ query getEvents(
3961
+ $dateStatus: EventDateStatusEnumType
3962
+ $options: PaginationOptions
3963
+ ) {
3964
+ events(dateStatus: $dateStatus, options: $options) {
2408
3965
  ...EventListItemFields
2409
3966
  }
2410
3967
  }
@@ -2706,8 +4263,8 @@ var UNREGISTERED_VENDOR = gql`
2706
4263
  ${UNREGISTERED_VENDOR_INVITATION_FRAGMENT}
2707
4264
  `;
2708
4265
  var GET_VENDORS = gql`
2709
- query getVendors {
2710
- vendors {
4266
+ query getVendors($options: PaginationOptions) {
4267
+ vendors(options: $options) {
2711
4268
  ...VendorFields
2712
4269
  }
2713
4270
  }
@@ -2944,8 +4501,8 @@ var PARTNER = gql`
2944
4501
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
2945
4502
  `;
2946
4503
  var GET_PARTNERS = gql`
2947
- query getPartners {
2948
- partners {
4504
+ query getPartners($options: PaginationOptions) {
4505
+ partners(options: $options) {
2949
4506
  ...PartnerFields
2950
4507
  }
2951
4508
  }
@@ -3150,8 +4707,8 @@ var POST_FIELDS_FRAGMENT = gql`
3150
4707
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
3151
4708
  `;
3152
4709
  var GET_POSTS = gql`
3153
- query getPosts {
3154
- posts {
4710
+ query getPosts($options: PaginationOptions) {
4711
+ posts(options: $options) {
3155
4712
  ...PostFields
3156
4713
  }
3157
4714
  }
@@ -3166,13 +4723,114 @@ var GET_POST = gql`
3166
4723
  ${POST_FIELDS_FRAGMENT}
3167
4724
  `;
3168
4725
  var GET_POSTS_BY_TYPE = gql`
3169
- query getPostsByType($postType: PostTypeEnum!) {
3170
- postsByType(postType: $postType) {
4726
+ query getPostsByType($postType: PostTypeEnum!, $options: PaginationOptions) {
4727
+ postsByType(postType: $postType, options: $options) {
3171
4728
  ...PostFields
3172
4729
  }
3173
4730
  }
3174
4731
  ${POST_FIELDS_FRAGMENT}
3175
4732
  `;
4733
+ var GET_USERS = gql`
4734
+ query getUsers($options: PaginationOptions) {
4735
+ users(options: $options) {
4736
+ ...UserFields
4737
+ }
4738
+ }
4739
+ ${USER_FIELDS_FRAGMENT}
4740
+ `;
4741
+ var GET_USER = gql`
4742
+ query getUser($_id: ID!) {
4743
+ user(_id: $_id) {
4744
+ ...UserFields
4745
+ }
4746
+ }
4747
+ ${USER_FIELDS_FRAGMENT}
4748
+ `;
4749
+ var GET_USER_EVENTS = gql`
4750
+ query getUserEvents {
4751
+ userEvents {
4752
+ ...EventFields
4753
+ }
4754
+ }
4755
+ ${EVENT}
4756
+ `;
4757
+ var GET_USER_VENDORS = gql`
4758
+ query getUserVendors {
4759
+ userVendors {
4760
+ ...VendorFields
4761
+ }
4762
+ }
4763
+ ${VENDOR}
4764
+ `;
4765
+ var GET_USER_PARTNERS = gql`
4766
+ query getUserPartners {
4767
+ userPartners {
4768
+ ...PartnerFields
4769
+ }
4770
+ }
4771
+ ${PARTNER}
4772
+ `;
4773
+ var GET_USER_ACTIVITIES = gql`
4774
+ query getUserActivities {
4775
+ userActivities {
4776
+ favourites {
4777
+ events {
4778
+ ...EventListItemFields
4779
+ }
4780
+ partners {
4781
+ ...PartnerFields
4782
+ }
4783
+ vendors {
4784
+ ...VendorFields
4785
+ }
4786
+ }
4787
+ going {
4788
+ events {
4789
+ ...EventListItemFields
4790
+ }
4791
+ }
4792
+ interested {
4793
+ events {
4794
+ ...EventListItemFields
4795
+ }
4796
+ }
4797
+ present {
4798
+ events {
4799
+ ...EventListItemFields
4800
+ }
4801
+ }
4802
+ }
4803
+ }
4804
+ ${EVENT_LIST_ITEM}
4805
+ ${VENDOR}
4806
+ ${PARTNER}
4807
+ `;
4808
+ var GET_USER_RESOURCES = gql`
4809
+ query getUserResources($userId: ID!) {
4810
+ userResources(userId: $userId) {
4811
+ resources {
4812
+ _id
4813
+ logo
4814
+ name
4815
+ resourceType
4816
+ }
4817
+ }
4818
+ }
4819
+ `;
4820
+ var GET_USERS_BY_PROMO_CODE = gql`
4821
+ query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
4822
+ usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
4823
+ active
4824
+ avatar {
4825
+ ...ResourceImageFields
4826
+ }
4827
+ deletedAt
4828
+ nickName
4829
+ userId
4830
+ }
4831
+ }
4832
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
4833
+ `;
3176
4834
  var GET_EVENT_BY_SLUG = gql`
3177
4835
  query getEventBySlug($slug: String!) {
3178
4836
  eventBySlug(slug: $slug) {
@@ -3637,131 +5295,30 @@ var UPDATE_EVENT_INFO_MUTATION = gql`
3637
5295
  }
3638
5296
  ${EVENT_INFO}
3639
5297
  `;
3640
- var GET_USERS = gql`
3641
- query getUsers {
3642
- users {
3643
- ...UserFields
3644
- }
3645
- }
3646
- ${USER_FIELDS_FRAGMENT}
3647
- `;
3648
- var GET_USER = gql`
3649
- query getUser($_id: ID!) {
3650
- user(_id: $_id) {
3651
- ...UserFields
5298
+ var NOTIFICATION_FRAGMENT = gql`
5299
+ fragment NotificationFields on Notification {
5300
+ _id
5301
+ userId
5302
+ title
5303
+ message
5304
+ type
5305
+ isRead
5306
+ data {
5307
+ resourceId
5308
+ resourceName
5309
+ resourceType
3652
5310
  }
5311
+ createdAt
5312
+ updatedAt
3653
5313
  }
3654
- ${USER_FIELDS_FRAGMENT}
3655
5314
  `;
3656
- var GET_USER_EVENTS = gql`
3657
- query getUserEvents {
3658
- userEvents {
3659
- ...EventFields
5315
+ var GET_USER_NOTIFICATIONS = gql`
5316
+ query getUserNotifications($limit: Int, $offset: Int) {
5317
+ userNotifications(limit: $limit, offset: $offset) {
5318
+ ...NotificationFields
3660
5319
  }
3661
5320
  }
3662
- ${EVENT}
3663
- `;
3664
- var GET_USER_VENDORS = gql`
3665
- query getUserVendors {
3666
- userVendors {
3667
- ...VendorFields
3668
- }
3669
- }
3670
- ${VENDOR}
3671
- `;
3672
- var GET_USER_PARTNERS = gql`
3673
- query getUserPartners {
3674
- userPartners {
3675
- ...PartnerFields
3676
- }
3677
- }
3678
- ${PARTNER}
3679
- `;
3680
- var GET_USER_ACTIVITIES = gql`
3681
- query getUserActivities {
3682
- userActivities {
3683
- favourites {
3684
- events {
3685
- ...EventListItemFields
3686
- }
3687
- partners {
3688
- ...PartnerFields
3689
- }
3690
- vendors {
3691
- ...VendorFields
3692
- }
3693
- }
3694
- going {
3695
- events {
3696
- ...EventListItemFields
3697
- }
3698
- }
3699
- interested {
3700
- events {
3701
- ...EventListItemFields
3702
- }
3703
- }
3704
- present {
3705
- events {
3706
- ...EventListItemFields
3707
- }
3708
- }
3709
- }
3710
- }
3711
- ${EVENT_LIST_ITEM}
3712
- ${VENDOR}
3713
- ${PARTNER}
3714
- `;
3715
- var GET_USER_RESOURCES = gql`
3716
- query getUserResources($userId: ID!) {
3717
- userResources(userId: $userId) {
3718
- resources {
3719
- _id
3720
- logo
3721
- name
3722
- resourceType
3723
- }
3724
- }
3725
- }
3726
- `;
3727
- var GET_USERS_BY_PROMO_CODE = gql`
3728
- query getUsersByPromoCode($promoCode: String!, $limit: Int, $offset: Int) {
3729
- usersByPromoCode(promoCode: $promoCode, limit: $limit, offset: $offset) {
3730
- active
3731
- avatar {
3732
- ...ResourceImageFields
3733
- }
3734
- deletedAt
3735
- nickName
3736
- userId
3737
- }
3738
- }
3739
- ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
3740
- `;
3741
- var NOTIFICATION_FRAGMENT = gql`
3742
- fragment NotificationFields on Notification {
3743
- _id
3744
- userId
3745
- title
3746
- message
3747
- type
3748
- isRead
3749
- data {
3750
- resourceId
3751
- resourceName
3752
- resourceType
3753
- }
3754
- createdAt
3755
- updatedAt
3756
- }
3757
- `;
3758
- var GET_USER_NOTIFICATIONS = gql`
3759
- query getUserNotifications($limit: Int, $offset: Int) {
3760
- userNotifications(limit: $limit, offset: $offset) {
3761
- ...NotificationFields
3762
- }
3763
- }
3764
- ${NOTIFICATION_FRAGMENT}
5321
+ ${NOTIFICATION_FRAGMENT}
3765
5322
  `;
3766
5323
  var GET_NOTIFICATION_COUNT = gql`
3767
5324
  query getNotificationCount {
@@ -4160,11 +5717,8 @@ var GET_RESOURCE_ACTIVITY = gql`
4160
5717
  ${RESOURCE_ACTIVITY_FIELDS_FRAGMENT}
4161
5718
  `;
4162
5719
  var CREATE_CHECKOUT_SESSION_MUTATION = gql`
4163
- mutation createCheckoutSession(
4164
- $planId: LicencesEnumType!
4165
- $billingPeriod: BillingPeriodEnumType
4166
- ) {
4167
- createCheckoutSession(planId: $planId, billingPeriod: $billingPeriod) {
5720
+ mutation createCheckoutSession($input: CreateCheckoutSessionInputType!) {
5721
+ createCheckoutSession(input: $input) {
4168
5722
  data {
4169
5723
  sessionId
4170
5724
  checkoutUrl
@@ -4176,25 +5730,38 @@ var CREATE_CHECKOUT_SESSION_MUTATION = gql`
4176
5730
  var CANCEL_SUBSCRIPTION_MUTATION = gql`
4177
5731
  mutation cancelSubscription {
4178
5732
  cancelSubscription {
4179
- data
5733
+ data {
5734
+ billingPeriod
5735
+ cancelAtPeriodEnd
5736
+ currentPlan
5737
+ endDate
5738
+ pendingBillingPeriod
5739
+ pendingChangeEffectiveAt
5740
+ pendingPlan
5741
+ priceId
5742
+ scheduleId
5743
+ status
5744
+ subscriptionId
5745
+ }
4180
5746
  message
4181
5747
  }
4182
5748
  }
4183
5749
  `;
4184
5750
  var UPDATE_SUBSCRIPTION_PLAN_MUTATION = gql`
4185
- mutation updateSubscriptionPlan(
4186
- $newPlanId: LicencesEnumType!
4187
- $billingPeriod: BillingPeriodEnumType
4188
- ) {
4189
- updateSubscriptionPlan(
4190
- newPlanId: $newPlanId
4191
- billingPeriod: $billingPeriod
4192
- ) {
5751
+ mutation updateSubscriptionPlan($input: UpdateSubscriptionPlanInputType!) {
5752
+ updateSubscriptionPlan(input: $input) {
4193
5753
  data {
4194
- subscriptionId
4195
- status
4196
- priceId
5754
+ billingPeriod
5755
+ cancelAtPeriodEnd
4197
5756
  currentPlan
5757
+ endDate
5758
+ pendingBillingPeriod
5759
+ pendingChangeEffectiveAt
5760
+ pendingPlan
5761
+ priceId
5762
+ scheduleId
5763
+ status
5764
+ subscriptionId
4198
5765
  }
4199
5766
  message
4200
5767
  }
@@ -4210,36 +5777,20 @@ var CREATE_CUSTOMER_PORTAL = gql`
4210
5777
  }
4211
5778
  }
4212
5779
  `;
4213
- var SELECT_PACKAGE_MUTATION = gql`
4214
- mutation selectPackage(
4215
- $billingPeriod: BillingPeriodEnumType
4216
- $selectedLicence: LicencesEnumType!
4217
- $useStripe: Boolean
4218
- ) {
4219
- selectPackage(
4220
- billingPeriod: $billingPeriod
4221
- selectedLicence: $selectedLicence
4222
- useStripe: $useStripe
4223
- ) {
4224
- data {
4225
- checkoutUrl
4226
- licences {
4227
- ...LicenceFields
4228
- }
4229
- userId
4230
- }
4231
- message
4232
- }
4233
- }
4234
- ${LICENCE_FIELDS_FRAGMENT}
4235
- `;
4236
5780
  var GET_SUBSCRIPTION_STATUS = gql`
4237
5781
  query getSubscriptionStatus {
4238
5782
  getSubscriptionStatus {
4239
- subscriptionId
4240
- status
4241
- priceId
5783
+ billingPeriod
5784
+ cancelAtPeriodEnd
4242
5785
  currentPlan
5786
+ endDate
5787
+ pendingBillingPeriod
5788
+ pendingChangeEffectiveAt
5789
+ pendingPlan
5790
+ priceId
5791
+ scheduleId
5792
+ status
5793
+ subscriptionId
4243
5794
  }
4244
5795
  }
4245
5796
  `;
@@ -4266,7 +5817,6 @@ var GET_SUBSCRIPTION_PLANS = gql`
4266
5817
  }
4267
5818
  }
4268
5819
  isNewUser
4269
- isTester
4270
5820
  appliedDiscountType
4271
5821
  }
4272
5822
  }
@@ -4374,6 +5924,57 @@ var GET_APP_SETTINGS = gql`
4374
5924
  }
4375
5925
  ${APP_SETTINGS_FIELDS_FRAGMENT}
4376
5926
  `;
5927
+ var BILLING_CATALOG_FIELDS_FRAGMENT = gql`
5928
+ fragment BillingCatalogFields on BillingCatalogEntryType {
5929
+ _id
5930
+ active
5931
+ billingPeriod
5932
+ createdAt
5933
+ currency
5934
+ effectiveFrom
5935
+ key
5936
+ licenceType
5937
+ revision
5938
+ stripePriceId
5939
+ stripeProductId
5940
+ taxInclusive
5941
+ unitAmount
5942
+ updatedAt
5943
+ updatedBy
5944
+ }
5945
+ `;
5946
+ var GET_BILLING_CATALOG = gql`
5947
+ query getBillingCatalog {
5948
+ billingCatalog {
5949
+ ...BillingCatalogFields
5950
+ }
5951
+ }
5952
+ ${BILLING_CATALOG_FIELDS_FRAGMENT}
5953
+ `;
5954
+ var UPDATE_BILLING_CATALOG_PRICE_MUTATION = gql`
5955
+ mutation updateBillingCatalogPrice(
5956
+ $input: UpdateBillingCatalogPriceInputType!
5957
+ ) {
5958
+ updateBillingCatalogPrice(input: $input) {
5959
+ data {
5960
+ ...BillingCatalogFields
5961
+ }
5962
+ message
5963
+ }
5964
+ }
5965
+ ${BILLING_CATALOG_FIELDS_FRAGMENT}
5966
+ `;
5967
+ var SYNC_BILLING_CATALOG_PRICE_MUTATION = gql`
5968
+ mutation syncBillingCatalogPrice($input: SyncBillingCatalogPriceInputType!) {
5969
+ syncBillingCatalogPrice(input: $input) {
5970
+ data {
5971
+ ...BillingCatalogFields
5972
+ }
5973
+ message
5974
+ }
5975
+ }
5976
+ ${BILLING_CATALOG_FIELDS_FRAGMENT}
5977
+ `;
4377
5978
  var GAME_HISTORY_FIELDS_FRAGMENT = gql`
4378
5979
  fragment GameHistoryFields on GameHistoryType {
4379
5980
  createdAt
@@ -5212,46 +6813,220 @@ schema.index({
5212
6813
  start: 1,
5213
6814
  status: 1
5214
6815
  });
6816
+ schema.index({
6817
+ status: 1,
6818
+ targetRegion: 1,
6819
+ // eslint-disable-next-line sort-keys
6820
+ start: -1
6821
+ });
5215
6822
  var AdModel = mongoose.models.Ad || mongoose.model("Ad", schema);
5216
6823
 
5217
- // src/mongoose/chat/Chat.ts
6824
+ // src/mongoose/BillingCatalog.ts
5218
6825
  import mongoose2 from "mongoose";
5219
6826
  var MongooseSchema2 = mongoose2.Schema;
5220
- var MessageReplyPreviewSchema = new MongooseSchema2(
6827
+ var BILLING_CATALOG_COLLECTION_NAME = "billingCatalog";
6828
+ var paidVendorLicences = [
6829
+ EnumUserLicence.PRO_VENDOR,
6830
+ EnumUserLicence.PRO_PLUS_VENDOR
6831
+ ];
6832
+ var supportedBillingPeriods = [
6833
+ EnumBillingPeriod.MONTHLY_CANCEL_ANYTIME,
6834
+ EnumBillingPeriod.YEARLY_ANNUAL_BILLED
6835
+ ];
6836
+ var unitAmountField = {
6837
+ min: 1,
6838
+ required: true,
6839
+ type: Number,
6840
+ validate: {
6841
+ message: "Billing catalogue price must be a positive integer.",
6842
+ validator: Number.isInteger
6843
+ }
6844
+ };
6845
+ var currencyField = {
6846
+ default: BILLING_CATALOG_CURRENCY,
6847
+ enum: [BILLING_CATALOG_CURRENCY],
6848
+ immutable: true,
6849
+ lowercase: true,
6850
+ required: true,
6851
+ trim: true,
6852
+ type: String
6853
+ };
6854
+ var stripePriceIdField = {
6855
+ default: null,
6856
+ required: false,
6857
+ trim: true,
6858
+ type: String
6859
+ };
6860
+ var stripeProductIdField = {
6861
+ default: null,
6862
+ required: false,
6863
+ trim: true,
6864
+ type: String
6865
+ };
6866
+ var priceHistorySchema = new MongooseSchema2(
6867
+ {
6868
+ changedAt: { required: true, type: Date },
6869
+ changedBy: {
6870
+ default: null,
6871
+ ref: "User",
6872
+ required: false,
6873
+ type: mongoose2.Schema.Types.ObjectId
6874
+ },
6875
+ currency: currencyField,
6876
+ effectiveFrom: { required: true, type: Date },
6877
+ effectiveTo: { required: true, type: Date },
6878
+ stripePriceId: stripePriceIdField,
6879
+ stripeProductId: stripeProductIdField,
6880
+ unitAmount: unitAmountField
6881
+ },
6882
+ { _id: false }
6883
+ );
6884
+ var schema2 = new MongooseSchema2(
6885
+ {
6886
+ active: { default: true, required: true, type: Boolean },
6887
+ billingPeriod: {
6888
+ enum: supportedBillingPeriods,
6889
+ immutable: true,
6890
+ required: true,
6891
+ type: String
6892
+ },
6893
+ currency: currencyField,
6894
+ effectiveFrom: { default: Date.now, required: true, type: Date },
6895
+ key: {
6896
+ enum: BILLING_CATALOG_KEYS,
6897
+ immutable: true,
6898
+ required: true,
6899
+ type: String,
6900
+ unique: true
6901
+ },
6902
+ licenceType: {
6903
+ enum: paidVendorLicences,
6904
+ immutable: true,
6905
+ required: true,
6906
+ type: String
6907
+ },
6908
+ priceHistory: {
6909
+ default: [],
6910
+ required: true,
6911
+ type: [priceHistorySchema]
6912
+ },
6913
+ revision: {
6914
+ default: 1,
6915
+ min: 1,
6916
+ required: true,
6917
+ type: Number,
6918
+ validate: {
6919
+ message: "Billing catalogue revision must be a positive integer.",
6920
+ validator: Number.isInteger
6921
+ }
6922
+ },
6923
+ stripePriceId: stripePriceIdField,
6924
+ stripeProductId: stripeProductIdField,
6925
+ taxInclusive: {
6926
+ default: true,
6927
+ immutable: true,
6928
+ required: true,
6929
+ type: Boolean,
6930
+ validate: {
6931
+ message: "Billing catalogue prices must include GST.",
6932
+ validator: (value) => value === true
6933
+ }
6934
+ },
6935
+ unitAmount: unitAmountField,
6936
+ updatedBy: {
6937
+ default: null,
6938
+ ref: "User",
6939
+ required: false,
6940
+ type: mongoose2.Schema.Types.ObjectId
6941
+ }
6942
+ },
6943
+ {
6944
+ collection: BILLING_CATALOG_COLLECTION_NAME,
6945
+ strict: true,
6946
+ timestamps: true
6947
+ }
6948
+ );
6949
+ schema2.pre("validate", function validateDefinition() {
6950
+ if (!billingCatalogDefinitionMatches(this)) {
6951
+ this.invalidate(
6952
+ "key",
6953
+ "Billing catalogue key does not match its licence and billing period."
6954
+ );
6955
+ }
6956
+ });
6957
+ schema2.index({ billingPeriod: 1, licenceType: 1 }, { unique: true });
6958
+ schema2.index({ active: 1, licenceType: 1 });
6959
+ schema2.index(
6960
+ { stripePriceId: 1 },
6961
+ {
6962
+ partialFilterExpression: { stripePriceId: { $type: "string" } },
6963
+ unique: true
6964
+ }
6965
+ );
6966
+ var BillingCatalogModel = mongoose2.models.BillingCatalogEntry || mongoose2.model(
6967
+ "BillingCatalogEntry",
6968
+ schema2,
6969
+ BILLING_CATALOG_COLLECTION_NAME
6970
+ );
6971
+ function buildInitialBillingCatalogEntries(now = /* @__PURE__ */ new Date()) {
6972
+ return INITIAL_BILLING_CATALOG.map((entry) => ({
6973
+ active: entry.active,
6974
+ billingPeriod: entry.billingPeriod,
6975
+ currency: entry.currency,
6976
+ effectiveFrom: new Date(now.getTime()),
6977
+ key: entry.key,
6978
+ licenceType: entry.licenceType,
6979
+ priceHistory: [],
6980
+ revision: 1,
6981
+ stripePriceId: null,
6982
+ stripeProductId: null,
6983
+ taxInclusive: entry.taxInclusive,
6984
+ unitAmount: entry.unitAmount,
6985
+ updatedBy: null
6986
+ }));
6987
+ }
6988
+ function getBillingCatalogDefinition(key) {
6989
+ return BILLING_CATALOG_DEFINITIONS[key];
6990
+ }
6991
+
6992
+ // src/mongoose/chat/Chat.ts
6993
+ import mongoose3 from "mongoose";
6994
+ var MongooseSchema3 = mongoose3.Schema;
6995
+ var MessageReplyPreviewSchema = new MongooseSchema3(
5221
6996
  {
5222
6997
  contentPreview: { required: true, type: String },
5223
6998
  senderId: {
5224
6999
  ref: "User",
5225
7000
  required: true,
5226
- type: mongoose2.Schema.Types.ObjectId
7001
+ type: mongoose3.Schema.Types.ObjectId
5227
7002
  },
5228
7003
  senderName: { required: true, type: String }
5229
7004
  },
5230
7005
  { _id: false }
5231
7006
  );
5232
- var MessageReactionSchema = new MongooseSchema2(
7007
+ var MessageReactionSchema = new MongooseSchema3(
5233
7008
  {
5234
7009
  createdAt: { required: true, type: Date },
5235
7010
  userId: {
5236
7011
  ref: "User",
5237
7012
  required: true,
5238
- type: mongoose2.Schema.Types.ObjectId
7013
+ type: mongoose3.Schema.Types.ObjectId
5239
7014
  }
5240
7015
  },
5241
7016
  { _id: false }
5242
7017
  );
5243
- var MessageSeenSchema = new MongooseSchema2(
7018
+ var MessageSeenSchema = new MongooseSchema3(
5244
7019
  {
5245
7020
  seenAt: { required: true, type: Date },
5246
7021
  userId: {
5247
7022
  ref: "User",
5248
7023
  required: true,
5249
- type: mongoose2.Schema.Types.ObjectId
7024
+ type: mongoose3.Schema.Types.ObjectId
5250
7025
  }
5251
7026
  },
5252
7027
  { _id: false }
5253
7028
  );
5254
- var MessageSchema = new MongooseSchema2(
7029
+ var MessageSchema = new MongooseSchema3(
5255
7030
  {
5256
7031
  content: { required: true, type: String },
5257
7032
  likedBy: { default: [], required: false, type: [MessageReactionSchema] },
@@ -5262,18 +7037,18 @@ var MessageSchema = new MongooseSchema2(
5262
7037
  replyToMessageId: {
5263
7038
  ref: "Chat.messages",
5264
7039
  required: false,
5265
- type: mongoose2.Schema.Types.ObjectId
7040
+ type: mongoose3.Schema.Types.ObjectId
5266
7041
  },
5267
7042
  seenBy: { default: [], required: false, type: [MessageSeenSchema] },
5268
7043
  senderId: {
5269
7044
  ref: "User",
5270
7045
  required: true,
5271
- type: mongoose2.Schema.Types.ObjectId
7046
+ type: mongoose3.Schema.Types.ObjectId
5272
7047
  }
5273
7048
  },
5274
7049
  { timestamps: true }
5275
7050
  );
5276
- var ParticipantSchema = new MongooseSchema2(
7051
+ var ParticipantSchema = new MongooseSchema3(
5277
7052
  {
5278
7053
  active: { default: true, required: true, type: Boolean },
5279
7054
  userAvatar: { required: false, type: String },
@@ -5281,14 +7056,14 @@ var ParticipantSchema = new MongooseSchema2(
5281
7056
  userId: {
5282
7057
  ref: "User",
5283
7058
  required: true,
5284
- type: mongoose2.Schema.Types.ObjectId
7059
+ type: mongoose3.Schema.Types.ObjectId
5285
7060
  },
5286
7061
  userName: { required: true, type: String }
5287
7062
  },
5288
7063
  { _id: false }
5289
7064
  // Prevents Mongoose from creating an additional _id field for subdocuments
5290
7065
  );
5291
- var ChatSchema = new MongooseSchema2(
7066
+ var ChatSchema = new MongooseSchema3(
5292
7067
  {
5293
7068
  active: { default: true, required: true, type: Boolean },
5294
7069
  chatDescription: { required: false, type: String },
@@ -5312,12 +7087,12 @@ ChatSchema.index({
5312
7087
  "participants.userId": 1,
5313
7088
  updatedAt: -1
5314
7089
  });
5315
- var ChatModel = mongoose2.models.Chat || mongoose2.model("Chat", ChatSchema);
7090
+ var ChatModel = mongoose3.models.Chat || mongoose3.model("Chat", ChatSchema);
5316
7091
 
5317
7092
  // src/mongoose/chat/ChatReport.ts
5318
- import mongoose3 from "mongoose";
5319
- var MongooseSchema3 = mongoose3.Schema;
5320
- var ReasonSchema = new MongooseSchema3(
7093
+ import mongoose4 from "mongoose";
7094
+ var MongooseSchema4 = mongoose4.Schema;
7095
+ var ReasonSchema = new MongooseSchema4(
5321
7096
  {
5322
7097
  details: { default: null, required: false, type: String },
5323
7098
  reasonType: {
@@ -5328,23 +7103,23 @@ var ReasonSchema = new MongooseSchema3(
5328
7103
  },
5329
7104
  { _id: false }
5330
7105
  );
5331
- var ChatReportSchema = new MongooseSchema3(
7106
+ var ChatReportSchema = new MongooseSchema4(
5332
7107
  {
5333
7108
  chatId: {
5334
7109
  ref: "Chat",
5335
7110
  required: true,
5336
- type: mongoose3.Schema.Types.ObjectId
7111
+ type: mongoose4.Schema.Types.ObjectId
5337
7112
  },
5338
7113
  reason: { required: true, type: ReasonSchema },
5339
7114
  reportedUserId: {
5340
7115
  ref: "User",
5341
7116
  required: true,
5342
- type: mongoose3.Schema.Types.ObjectId
7117
+ type: mongoose4.Schema.Types.ObjectId
5343
7118
  },
5344
7119
  reporterUserId: {
5345
7120
  ref: "User",
5346
7121
  required: true,
5347
- type: mongoose3.Schema.Types.ObjectId
7122
+ type: mongoose4.Schema.Types.ObjectId
5348
7123
  },
5349
7124
  resolved: { default: false, required: true, type: Boolean }
5350
7125
  },
@@ -5352,18 +7127,18 @@ var ChatReportSchema = new MongooseSchema3(
5352
7127
  );
5353
7128
  ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
5354
7129
  ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
5355
- var ChatReportModel = mongoose3.models.ChatReport || mongoose3.model("ChatReport", ChatReportSchema);
7130
+ var ChatReportModel = mongoose4.models.ChatReport || mongoose4.model("ChatReport", ChatReportSchema);
5356
7131
 
5357
7132
  // src/mongoose/global.ts
5358
- import mongoose6 from "mongoose";
7133
+ import mongoose7 from "mongoose";
5359
7134
 
5360
7135
  // src/mongoose/Relation.ts
5361
- import mongoose5 from "mongoose";
7136
+ import mongoose6 from "mongoose";
5362
7137
 
5363
7138
  // src/mongoose/event/EventInfo.ts
5364
- import mongoose4 from "mongoose";
5365
- var MongooseSchema4 = mongoose4.Schema;
5366
- var StallTypeSchema = new MongooseSchema4(
7139
+ import mongoose5 from "mongoose";
7140
+ var MongooseSchema5 = mongoose5.Schema;
7141
+ var StallTypeSchema = new MongooseSchema5(
5367
7142
  {
5368
7143
  label: { required: false, type: String },
5369
7144
  price: { required: false, type: Number },
@@ -5374,7 +7149,7 @@ var StallTypeSchema = new MongooseSchema4(
5374
7149
  // Prevents Mongoose from creating an additional _id field for subdocuments
5375
7150
  }
5376
7151
  );
5377
- var dateTimeSchema = new MongooseSchema4(
7152
+ var dateTimeSchema = new MongooseSchema5(
5378
7153
  {
5379
7154
  dateStatus: {
5380
7155
  enum: Object.values(EnumEventDateStatus),
@@ -5390,7 +7165,7 @@ var dateTimeSchema = new MongooseSchema4(
5390
7165
  { _id: false }
5391
7166
  // Prevents Mongoose from creating an additional _id field for subdocuments
5392
7167
  );
5393
- var paymentInfoSchema = new MongooseSchema4(
7168
+ var paymentInfoSchema = new MongooseSchema5(
5394
7169
  {
5395
7170
  accountHolderName: { required: false, type: String },
5396
7171
  accountNumber: { required: false, type: String },
@@ -5404,7 +7179,7 @@ var paymentInfoSchema = new MongooseSchema4(
5404
7179
  { _id: false }
5405
7180
  // Prevents Mongoose from creating an additional _id field
5406
7181
  );
5407
- var requirementsSchema = new MongooseSchema4(
7182
+ var requirementsSchema = new MongooseSchema5(
5408
7183
  {
5409
7184
  category: { required: true, type: String },
5410
7185
  label: { required: true, type: String },
@@ -5415,7 +7190,7 @@ var requirementsSchema = new MongooseSchema4(
5415
7190
  // Prevents Mongoose from creating an additional _id field for
5416
7191
  }
5417
7192
  );
5418
- var refundPolicySchema = new MongooseSchema4(
7193
+ var refundPolicySchema = new MongooseSchema5(
5419
7194
  {
5420
7195
  category: { required: true, type: String },
5421
7196
  label: { required: true, type: String },
@@ -5423,7 +7198,7 @@ var refundPolicySchema = new MongooseSchema4(
5423
7198
  },
5424
7199
  { _id: false }
5425
7200
  );
5426
- var schema2 = new MongooseSchema4(
7201
+ var schema3 = new MongooseSchema5(
5427
7202
  {
5428
7203
  active: { default: true, type: Boolean },
5429
7204
  applicationDeadlineHours: { required: true, type: Number },
@@ -5431,7 +7206,7 @@ var schema2 = new MongooseSchema4(
5431
7206
  eventId: {
5432
7207
  ref: "Event",
5433
7208
  required: true,
5434
- type: mongoose4.Schema.Types.ObjectId
7209
+ type: mongoose5.Schema.Types.ObjectId
5435
7210
  },
5436
7211
  packInTime: { required: true, type: Number },
5437
7212
  paymentDueHours: { required: true, type: Number },
@@ -5441,11 +7216,12 @@ var schema2 = new MongooseSchema4(
5441
7216
  },
5442
7217
  { timestamps: true }
5443
7218
  );
5444
- var EventInfoModel = mongoose4.models.EventInfo || mongoose4.model("EventInfo", schema2);
7219
+ schema3.index({ eventId: 1 });
7220
+ var EventInfoModel = mongoose5.models.EventInfo || mongoose5.model("EventInfo", schema3);
5445
7221
 
5446
7222
  // src/mongoose/Relation.ts
5447
- var MongooseSchema5 = mongoose5.Schema;
5448
- var relationDateTimeSchema = new MongooseSchema5(
7223
+ var MongooseSchema6 = mongoose6.Schema;
7224
+ var relationDateTimeSchema = new MongooseSchema6(
5449
7225
  {
5450
7226
  dateStatus: {
5451
7227
  enum: Object.values(EnumEventDateStatus),
@@ -5460,7 +7236,7 @@ var relationDateTimeSchema = new MongooseSchema5(
5460
7236
  },
5461
7237
  { _id: false }
5462
7238
  );
5463
- var relationDatesSchema = new MongooseSchema5(
7239
+ var relationDatesSchema = new MongooseSchema6(
5464
7240
  {
5465
7241
  dateTime: {
5466
7242
  required: true,
@@ -5479,19 +7255,19 @@ var relationDatesSchema = new MongooseSchema5(
5479
7255
  },
5480
7256
  { _id: false }
5481
7257
  );
5482
- var RelationTypeSchema = new MongooseSchema5(
7258
+ var RelationTypeSchema = new MongooseSchema6(
5483
7259
  {
5484
7260
  active: { default: true, required: true, type: Boolean },
5485
7261
  chatId: {
5486
7262
  ref: "Chat",
5487
7263
  required: true,
5488
- type: mongoose5.Schema.Types.ObjectId
7264
+ type: mongoose6.Schema.Types.ObjectId
5489
7265
  },
5490
7266
  deletedAt: { default: null, required: false, type: Date },
5491
7267
  eventId: {
5492
7268
  ref: "Event",
5493
7269
  required: true,
5494
- type: mongoose5.Schema.Types.ObjectId
7270
+ type: mongoose6.Schema.Types.ObjectId
5495
7271
  },
5496
7272
  lastUpdateBy: {
5497
7273
  enum: Object.values(EnumResourceType),
@@ -5507,7 +7283,7 @@ var RelationTypeSchema = new MongooseSchema5(
5507
7283
  vendorId: {
5508
7284
  ref: "Vendor",
5509
7285
  required: true,
5510
- type: mongoose5.Schema.Types.ObjectId
7286
+ type: mongoose6.Schema.Types.ObjectId
5511
7287
  }
5512
7288
  },
5513
7289
  { timestamps: true }
@@ -5519,23 +7295,23 @@ RelationTypeSchema.index({
5519
7295
  "relationDates.status": 1,
5520
7296
  vendorId: 1
5521
7297
  });
5522
- var RelationModel = mongoose5.models.Relation || mongoose5.model("Relation", RelationTypeSchema);
7298
+ var RelationModel = mongoose6.models.Relation || mongoose6.model("Relation", RelationTypeSchema);
5523
7299
 
5524
7300
  // src/mongoose/global.ts
5525
- var MongooseSchema6 = mongoose6.Schema;
5526
- var OwnerTypeSchema = new MongooseSchema6(
7301
+ var MongooseSchema7 = mongoose7.Schema;
7302
+ var OwnerTypeSchema = new MongooseSchema7(
5527
7303
  {
5528
7304
  email: { required: true, type: String },
5529
7305
  userId: {
5530
7306
  ref: "User",
5531
7307
  required: true,
5532
- type: mongoose6.Schema.Types.ObjectId
7308
+ type: mongoose7.Schema.Types.ObjectId
5533
7309
  }
5534
7310
  },
5535
7311
  { _id: false }
5536
7312
  // Prevents Mongoose from creating an additional _id field for subdocuments
5537
7313
  );
5538
- var SocialMediaTypeSchema = new MongooseSchema6(
7314
+ var SocialMediaTypeSchema = new MongooseSchema7(
5539
7315
  {
5540
7316
  link: { required: true, type: String },
5541
7317
  name: { required: true, type: String }
@@ -5543,7 +7319,7 @@ var SocialMediaTypeSchema = new MongooseSchema6(
5543
7319
  { _id: false }
5544
7320
  // Prevents Mongoose from creating an additional _id field
5545
7321
  );
5546
- var ResourceImageTypeSchema = new MongooseSchema6(
7322
+ var ResourceImageTypeSchema = new MongooseSchema7(
5547
7323
  {
5548
7324
  active: { default: true, required: true, type: Boolean },
5549
7325
  source: { required: false, type: String },
@@ -5552,7 +7328,7 @@ var ResourceImageTypeSchema = new MongooseSchema6(
5552
7328
  { _id: false }
5553
7329
  // Prevents Mongoose from creating an additional _id field for subdocuments
5554
7330
  );
5555
- var SubCategorySchema = new MongooseSchema6(
7331
+ var SubCategorySchema = new MongooseSchema7(
5556
7332
  {
5557
7333
  id: { required: false, type: String },
5558
7334
  items: [
@@ -5566,7 +7342,7 @@ var SubCategorySchema = new MongooseSchema6(
5566
7342
  { _id: false }
5567
7343
  // Prevents Mongoose from creating an additional _id field for subdocuments
5568
7344
  );
5569
- var CategorySchema = new MongooseSchema6(
7345
+ var CategorySchema = new MongooseSchema7(
5570
7346
  {
5571
7347
  id: { required: true, type: String },
5572
7348
  name: { required: true, type: String },
@@ -5575,7 +7351,7 @@ var CategorySchema = new MongooseSchema6(
5575
7351
  { _id: false }
5576
7352
  // Prevents Mongoose from creating an additional _id field for subdocuments
5577
7353
  );
5578
- var PosterUsageTypeSchema = new MongooseSchema6(
7354
+ var PosterUsageTypeSchema = new MongooseSchema7(
5579
7355
  {
5580
7356
  count: { default: 0, required: false, type: Number },
5581
7357
  month: { required: false, type: String }
@@ -5583,7 +7359,7 @@ var PosterUsageTypeSchema = new MongooseSchema6(
5583
7359
  { _id: false }
5584
7360
  // Prevents Mongoose from creating an additional _id field for subdocuments
5585
7361
  );
5586
- var userLicenseSchema = new MongooseSchema6(
7362
+ var userLicenseSchema = new MongooseSchema7(
5587
7363
  {
5588
7364
  expiryDate: { required: true, type: Date },
5589
7365
  issuedDate: { required: true, type: Date },
@@ -5600,7 +7376,7 @@ var userLicenseSchema = new MongooseSchema6(
5600
7376
  },
5601
7377
  { _id: false, timestamps: false }
5602
7378
  );
5603
- var ContactDetailsSchema = new MongooseSchema6(
7379
+ var ContactDetailsSchema = new MongooseSchema7(
5604
7380
  {
5605
7381
  email: { required: false, type: String },
5606
7382
  landlinePhone: { required: false, type: String },
@@ -5609,7 +7385,7 @@ var ContactDetailsSchema = new MongooseSchema6(
5609
7385
  { _id: false }
5610
7386
  // Prevents Mongoose from creating an additional _id field for subdocuments
5611
7387
  );
5612
- var termsAgreementSchema = new MongooseSchema6(
7388
+ var termsAgreementSchema = new MongooseSchema7(
5613
7389
  {
5614
7390
  appBuildNumber: { required: true, type: String },
5615
7391
  appId: { required: true, type: String },
@@ -5626,7 +7402,7 @@ var termsAgreementSchema = new MongooseSchema6(
5626
7402
  },
5627
7403
  { _id: false }
5628
7404
  );
5629
- var resourceRelationsSchema = new MongooseSchema6(
7405
+ var resourceRelationsSchema = new MongooseSchema7(
5630
7406
  {
5631
7407
  relationDates: {
5632
7408
  default: [],
@@ -5636,12 +7412,12 @@ var resourceRelationsSchema = new MongooseSchema6(
5636
7412
  relationId: {
5637
7413
  ref: "Relation",
5638
7414
  required: false,
5639
- type: mongoose6.Schema.Types.ObjectId
7415
+ type: mongoose7.Schema.Types.ObjectId
5640
7416
  }
5641
7417
  },
5642
7418
  { _id: false }
5643
7419
  );
5644
- var dateTimeSchema2 = new MongooseSchema6(
7420
+ var dateTimeSchema2 = new MongooseSchema7(
5645
7421
  {
5646
7422
  dateStatus: {
5647
7423
  enum: Object.values(EnumEventDateStatus),
@@ -5656,7 +7432,7 @@ var dateTimeSchema2 = new MongooseSchema6(
5656
7432
  { _id: false }
5657
7433
  // Prevents Mongoose from creating an additional _id field for subdocuments
5658
7434
  );
5659
- var locationGeoSchema = new MongooseSchema6(
7435
+ var locationGeoSchema = new MongooseSchema7(
5660
7436
  {
5661
7437
  coordinates: { required: true, type: [Number] },
5662
7438
  // [longitude, latitude]
@@ -5665,7 +7441,7 @@ var locationGeoSchema = new MongooseSchema6(
5665
7441
  { _id: false }
5666
7442
  // Prevents Mongoose from creating an additional _id field for subdocuments
5667
7443
  );
5668
- var locationsSchema = new MongooseSchema6(
7444
+ var locationsSchema = new MongooseSchema7(
5669
7445
  {
5670
7446
  city: { required: true, type: String },
5671
7447
  country: { required: true, type: String },
@@ -5681,13 +7457,13 @@ var locationsSchema = new MongooseSchema6(
5681
7457
  { _id: false }
5682
7458
  // Prevents Mongoose from creating an additional _id field for subdocuments
5683
7459
  );
5684
- var relatedPostSchema = new MongooseSchema6(
7460
+ var relatedPostSchema = new MongooseSchema7(
5685
7461
  {
5686
7462
  postActive: { default: true, required: true, type: Boolean },
5687
7463
  postId: {
5688
7464
  ref: "Post",
5689
7465
  required: true,
5690
- type: mongoose6.Schema.Types.ObjectId
7466
+ type: mongoose7.Schema.Types.ObjectId
5691
7467
  },
5692
7468
  postSlug: { required: true, type: String },
5693
7469
  postType: {
@@ -5699,7 +7475,7 @@ var relatedPostSchema = new MongooseSchema6(
5699
7475
  { _id: false }
5700
7476
  // Prevents Mongoose from creating an additional _id field for subdocuments
5701
7477
  );
5702
- var socialShareResourceSchema = new MongooseSchema6(
7478
+ var socialShareResourceSchema = new MongooseSchema7(
5703
7479
  {
5704
7480
  qrCode: { required: true, type: ResourceImageTypeSchema },
5705
7481
  socialImage: { required: true, type: ResourceImageTypeSchema }
@@ -5712,7 +7488,7 @@ var baseResourceFields = {
5712
7488
  adIds: {
5713
7489
  ref: "Ad",
5714
7490
  required: false,
5715
- type: [mongoose6.Schema.Types.ObjectId]
7491
+ type: [mongoose7.Schema.Types.ObjectId]
5716
7492
  },
5717
7493
  approvedAt: { default: null, required: false, type: Date },
5718
7494
  contactDetails: { required: false, type: ContactDetailsSchema },
@@ -5742,9 +7518,64 @@ var baseResourceFields = {
5742
7518
  };
5743
7519
 
5744
7520
  // src/mongoose/GoogleImportedMarket.ts
5745
- import mongoose7 from "mongoose";
5746
- var MongooseSchema7 = mongoose7.Schema;
5747
- var addressComponentSchema = new MongooseSchema7(
7521
+ import mongoose8 from "mongoose";
7522
+
7523
+ // src/mongoose/searchNamePlugin.ts
7524
+ function deriveSearchName(name) {
7525
+ return typeof name === "string" ? name.trim().toLowerCase() : "";
7526
+ }
7527
+ function searchNamePlugin(schema20) {
7528
+ schema20.add({ searchName: { default: "", required: false, type: String } });
7529
+ schema20.index({ searchName: 1 });
7530
+ schema20.pre("save", function syncSearchNameOnSave(next) {
7531
+ const doc = this;
7532
+ doc.searchName = deriveSearchName(doc.name);
7533
+ next();
7534
+ });
7535
+ schema20.pre("insertMany", function syncSearchNameOnInsertMany(next, docs) {
7536
+ const list = Array.isArray(docs) ? docs : [docs];
7537
+ for (const doc of list) {
7538
+ if (doc && typeof doc.name === "string") {
7539
+ doc.searchName = deriveSearchName(doc.name);
7540
+ }
7541
+ }
7542
+ next();
7543
+ });
7544
+ schema20.pre("bulkWrite", function syncSearchNameOnBulkWrite(next, ops) {
7545
+ for (const op of ops) {
7546
+ const doc = op.insertOne?.document ?? op.replaceOne?.replacement;
7547
+ if (doc && typeof doc.name === "string") {
7548
+ doc.searchName = deriveSearchName(doc.name);
7549
+ }
7550
+ const $set = op.updateOne?.update?.$set;
7551
+ if ($set && typeof $set.name === "string") {
7552
+ $set.searchName = deriveSearchName($set.name);
7553
+ }
7554
+ }
7555
+ next();
7556
+ });
7557
+ const syncSearchNameOnUpdate = function(next) {
7558
+ const update = this.getUpdate();
7559
+ if (update && typeof update === "object" && "$set" in update) {
7560
+ const $set = update.$set;
7561
+ if ($set && typeof $set.name === "string") {
7562
+ this.setUpdate({
7563
+ ...update,
7564
+ $set: { ...$set, searchName: deriveSearchName($set.name) }
7565
+ });
7566
+ }
7567
+ }
7568
+ next();
7569
+ };
7570
+ schema20.pre(
7571
+ ["findOneAndUpdate", "updateOne", "updateMany"],
7572
+ syncSearchNameOnUpdate
7573
+ );
7574
+ }
7575
+
7576
+ // src/mongoose/GoogleImportedMarket.ts
7577
+ var MongooseSchema8 = mongoose8.Schema;
7578
+ var addressComponentSchema = new MongooseSchema8(
5748
7579
  {
5749
7580
  longName: { required: false, type: String },
5750
7581
  shortName: { required: false, type: String },
@@ -5752,7 +7583,7 @@ var addressComponentSchema = new MongooseSchema7(
5752
7583
  },
5753
7584
  { _id: false }
5754
7585
  );
5755
- var schema3 = new MongooseSchema7(
7586
+ var schema4 = new MongooseSchema8(
5756
7587
  {
5757
7588
  active: { default: false, required: true, type: Boolean },
5758
7589
  address: { required: true, type: String },
@@ -5764,7 +7595,7 @@ var schema3 = new MongooseSchema7(
5764
7595
  claimedByUserId: {
5765
7596
  ref: "User",
5766
7597
  required: false,
5767
- type: mongoose7.Schema.Types.ObjectId
7598
+ type: mongoose8.Schema.Types.ObjectId
5768
7599
  },
5769
7600
  cover: {
5770
7601
  required: false,
@@ -5776,7 +7607,7 @@ var schema3 = new MongooseSchema7(
5776
7607
  eventId: {
5777
7608
  ref: "Event",
5778
7609
  required: false,
5779
- type: mongoose7.Schema.Types.ObjectId
7610
+ type: mongoose8.Schema.Types.ObjectId
5780
7611
  },
5781
7612
  eventType: {
5782
7613
  enum: Object.values(EnumEventType),
@@ -5815,18 +7646,20 @@ var schema3 = new MongooseSchema7(
5815
7646
  },
5816
7647
  { timestamps: true }
5817
7648
  );
5818
- schema3.index({ "location.geo": "2dsphere" });
5819
- schema3.index({ name: 1 });
5820
- schema3.index({ region: 1 });
5821
- schema3.index({ deletedAt: 1 });
5822
- schema3.index({ "dateTime.dateStatus": 1 });
5823
- schema3.index({ slug: 1 });
5824
- var GoogleImportedMarketModel = mongoose7.models.GoogleImportedMarket || mongoose7.model("GoogleImportedMarket", schema3);
7649
+ schema4.index({ "location.geo": "2dsphere" });
7650
+ schema4.index({ name: 1 });
7651
+ schema4.index({ region: 1 });
7652
+ schema4.index({ deletedAt: 1 });
7653
+ schema4.index({ "dateTime.dateStatus": 1 });
7654
+ schema4.index({ slug: 1 });
7655
+ schema4.index({ name: "text", description: "text" });
7656
+ schema4.plugin(searchNamePlugin);
7657
+ var GoogleImportedMarketModel = mongoose8.models.GoogleImportedMarket || mongoose8.model("GoogleImportedMarket", schema4);
5825
7658
 
5826
7659
  // src/mongoose/Notification.ts
5827
- import mongoose8 from "mongoose";
5828
- var MongooseSchema8 = mongoose8.Schema;
5829
- var schema4 = new MongooseSchema8(
7660
+ import mongoose9 from "mongoose";
7661
+ var MongooseSchema9 = mongoose9.Schema;
7662
+ var schema5 = new MongooseSchema9(
5830
7663
  {
5831
7664
  data: {
5832
7665
  resourceId: { required: true, type: String },
@@ -5849,16 +7682,16 @@ var schema4 = new MongooseSchema8(
5849
7682
  userId: {
5850
7683
  ref: "User",
5851
7684
  required: true,
5852
- type: mongoose8.Schema.Types.ObjectId
7685
+ type: mongoose9.Schema.Types.ObjectId
5853
7686
  }
5854
7687
  },
5855
7688
  { timestamps: true }
5856
7689
  );
5857
- schema4.index({ isRead: 1, userId: 1 });
5858
- schema4.index({ createdAt: -1, userId: 1 });
5859
- var NotificationModel = mongoose8.models.Notification || mongoose8.model("Notification", schema4);
7690
+ schema5.index({ isRead: 1, userId: 1 });
7691
+ schema5.index({ createdAt: -1, userId: 1 });
7692
+ var NotificationModel = mongoose9.models.Notification || mongoose9.model("Notification", schema5);
5860
7693
 
5861
- // node_modules/@timardex/cluemart-shared/dist/chunk-7IB7QPVH.mjs
7694
+ // node_modules/@timardex/cluemart-shared/dist/chunk-P4NLBWEJ.mjs
5862
7695
  var EnumInviteStatus2 = /* @__PURE__ */ ((EnumInviteStatus22) => {
5863
7696
  EnumInviteStatus22["ACCEPTED"] = "Accepted";
5864
7697
  EnumInviteStatus22["COMPLETED"] = "Completed";
@@ -5936,9 +7769,9 @@ var EnumSubscriptionStatus2 = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
5936
7769
  })(EnumSubscriptionStatus2 || {});
5937
7770
 
5938
7771
  // src/mongoose/PushToken.ts
5939
- import mongoose9 from "mongoose";
5940
- var MongooseSchema9 = mongoose9.Schema;
5941
- var schema5 = new MongooseSchema9(
7772
+ import mongoose10 from "mongoose";
7773
+ var MongooseSchema10 = mongoose10.Schema;
7774
+ var schema6 = new MongooseSchema10(
5942
7775
  {
5943
7776
  platform: {
5944
7777
  enum: Object.values(EnumOSPlatform2),
@@ -5949,17 +7782,17 @@ var schema5 = new MongooseSchema9(
5949
7782
  userId: {
5950
7783
  ref: "User",
5951
7784
  required: true,
5952
- type: mongoose9.Schema.Types.ObjectId
7785
+ type: mongoose10.Schema.Types.ObjectId
5953
7786
  }
5954
7787
  },
5955
7788
  { timestamps: true }
5956
7789
  );
5957
- var PushTokenModel = mongoose9.models.PushToken || mongoose9.model("PushToken", schema5);
7790
+ var PushTokenModel = mongoose10.models.PushToken || mongoose10.model("PushToken", schema6);
5958
7791
 
5959
7792
  // src/mongoose/ResourceActivity.ts
5960
- import mongoose10 from "mongoose";
5961
- var MongooseSchema10 = mongoose10.Schema;
5962
- var ActivitySchema = new MongooseSchema10(
7793
+ import mongoose11 from "mongoose";
7794
+ var MongooseSchema11 = mongoose11.Schema;
7795
+ var ActivitySchema = new MongooseSchema11(
5963
7796
  {
5964
7797
  activityType: {
5965
7798
  enum: Object.values(EnumActivity),
@@ -5987,7 +7820,7 @@ var ActivitySchema = new MongooseSchema10(
5987
7820
  },
5988
7821
  { _id: false }
5989
7822
  );
5990
- var schema6 = new MongooseSchema10(
7823
+ var schema7 = new MongooseSchema11(
5991
7824
  {
5992
7825
  activity: { default: [], type: [ActivitySchema] },
5993
7826
  resourceId: { required: true, type: String },
@@ -5999,46 +7832,55 @@ var schema6 = new MongooseSchema10(
5999
7832
  },
6000
7833
  { timestamps: true }
6001
7834
  );
6002
- schema6.index({ resourceId: 1, resourceType: 1 }, { unique: true });
6003
- schema6.index({ "views.location": "2dsphere" });
6004
- var ResourceActivityModel = mongoose10.models.ResourceActivity || mongoose10.model("ResourceActivity", schema6);
7835
+ schema7.index({ resourceId: 1, resourceType: 1 }, { unique: true });
7836
+ schema7.index({ "views.location": "2dsphere" });
7837
+ var ResourceActivityModel = mongoose11.models.ResourceActivity || mongoose11.model("ResourceActivity", schema7);
6005
7838
 
6006
7839
  // src/mongoose/User.ts
6007
- import mongoose11 from "mongoose";
6008
- var MongooseSchema11 = mongoose11.Schema;
6009
- var userActivityEventSchema = new MongooseSchema11(
7840
+ import mongoose12 from "mongoose";
7841
+ var MongooseSchema12 = mongoose12.Schema;
7842
+ var userActivityEventSchema = new MongooseSchema12(
6010
7843
  {
6011
7844
  dateTime: dateTimeSchema2,
6012
7845
  resourceId: {
6013
7846
  ref: "Event",
6014
7847
  required: false,
6015
- type: mongoose11.Schema.Types.ObjectId
7848
+ type: mongoose12.Schema.Types.ObjectId
6016
7849
  }
6017
7850
  },
6018
7851
  { _id: false }
6019
7852
  );
6020
- var userActivityFavouritesSchema = new MongooseSchema11(
7853
+ var userActivityFavouritesSchema = new MongooseSchema12(
6021
7854
  {
6022
7855
  events: {
6023
7856
  ref: "Event",
6024
7857
  required: false,
6025
- type: [mongoose11.Schema.Types.ObjectId]
7858
+ type: [mongoose12.Schema.Types.ObjectId]
6026
7859
  },
6027
7860
  partners: {
6028
7861
  ref: "Partner",
6029
7862
  required: false,
6030
- type: [mongoose11.Schema.Types.ObjectId]
7863
+ type: [mongoose12.Schema.Types.ObjectId]
6031
7864
  },
6032
7865
  vendors: {
6033
7866
  ref: "Vendor",
6034
7867
  required: false,
6035
- type: [mongoose11.Schema.Types.ObjectId]
7868
+ type: [mongoose12.Schema.Types.ObjectId]
6036
7869
  }
6037
7870
  },
6038
7871
  { _id: false }
6039
7872
  );
6040
- var stripeSchema = new MongooseSchema11(
7873
+ var stripeSchema = new MongooseSchema12(
6041
7874
  {
7875
+ billingPeriod: {
7876
+ enum: Object.values(EnumBillingPeriod),
7877
+ required: false,
7878
+ type: String
7879
+ },
7880
+ cancelAtPeriodEnd: {
7881
+ required: false,
7882
+ type: Boolean
7883
+ },
6042
7884
  currentPlan: {
6043
7885
  enum: Object.values(EnumUserLicence),
6044
7886
  required: false,
@@ -6052,6 +7894,28 @@ var stripeSchema = new MongooseSchema11(
6052
7894
  required: false,
6053
7895
  type: Date
6054
7896
  },
7897
+ pendingBillingPeriod: {
7898
+ enum: Object.values(EnumBillingPeriod),
7899
+ required: false,
7900
+ type: String
7901
+ },
7902
+ pendingChangeEffectiveAt: {
7903
+ required: false,
7904
+ type: Date
7905
+ },
7906
+ pendingPlan: {
7907
+ enum: Object.values(EnumUserLicence),
7908
+ required: false,
7909
+ type: String
7910
+ },
7911
+ priceId: {
7912
+ required: false,
7913
+ type: String
7914
+ },
7915
+ scheduleId: {
7916
+ required: false,
7917
+ type: String
7918
+ },
6055
7919
  startDate: {
6056
7920
  required: false,
6057
7921
  type: Date
@@ -6064,11 +7928,19 @@ var stripeSchema = new MongooseSchema11(
6064
7928
  subscriptionId: {
6065
7929
  required: false,
6066
7930
  type: String
7931
+ },
7932
+ subscriptionMutationLockExpiresAt: {
7933
+ required: false,
7934
+ type: Date
7935
+ },
7936
+ subscriptionMutationLockId: {
7937
+ required: false,
7938
+ type: String
6067
7939
  }
6068
7940
  },
6069
7941
  { _id: false }
6070
7942
  );
6071
- var redeemedRewardSchema = new MongooseSchema11(
7943
+ var redeemedRewardSchema = new MongooseSchema12(
6072
7944
  {
6073
7945
  name: {
6074
7946
  enum: Object.values(EnumReward),
@@ -6080,13 +7952,13 @@ var redeemedRewardSchema = new MongooseSchema11(
6080
7952
  },
6081
7953
  { _id: false }
6082
7954
  );
6083
- var schema7 = new MongooseSchema11(
7955
+ var schema8 = new MongooseSchema12(
6084
7956
  {
6085
7957
  active: { default: false, required: true, type: Boolean },
6086
7958
  affiliate: {
6087
7959
  ref: "Affiliate",
6088
7960
  required: false,
6089
- type: mongoose11.Schema.Types.ObjectId
7961
+ type: mongoose12.Schema.Types.ObjectId
6090
7962
  },
6091
7963
  avatar: {
6092
7964
  required: false,
@@ -6095,7 +7967,7 @@ var schema7 = new MongooseSchema11(
6095
7967
  coupon: {
6096
7968
  ref: "Coupon",
6097
7969
  required: false,
6098
- type: mongoose11.Schema.Types.ObjectId
7970
+ type: mongoose12.Schema.Types.ObjectId
6099
7971
  },
6100
7972
  deletedAt: { default: null, required: false, type: Date },
6101
7973
  email: { required: true, type: String },
@@ -6107,13 +7979,13 @@ var schema7 = new MongooseSchema11(
6107
7979
  events: {
6108
7980
  ref: "Event",
6109
7981
  required: false,
6110
- type: [mongoose11.Schema.Types.ObjectId]
7982
+ type: [mongoose12.Schema.Types.ObjectId]
6111
7983
  },
6112
7984
  firstName: { required: true, type: String },
6113
7985
  game: {
6114
7986
  ref: "Game",
6115
7987
  required: false,
6116
- type: mongoose11.Schema.Types.ObjectId
7988
+ type: mongoose12.Schema.Types.ObjectId
6117
7989
  },
6118
7990
  interests: {
6119
7991
  enum: Object.values(EnumResourceType),
@@ -6135,7 +8007,7 @@ var schema7 = new MongooseSchema11(
6135
8007
  partner: {
6136
8008
  ref: "Partner",
6137
8009
  required: false,
6138
- type: mongoose11.Schema.Types.ObjectId
8010
+ type: mongoose12.Schema.Types.ObjectId
6139
8011
  },
6140
8012
  password: { required: true, type: String },
6141
8013
  platform: {
@@ -6168,7 +8040,7 @@ var schema7 = new MongooseSchema11(
6168
8040
  school: {
6169
8041
  ref: "School",
6170
8042
  required: false,
6171
- type: mongoose11.Schema.Types.ObjectId
8043
+ type: mongoose12.Schema.Types.ObjectId
6172
8044
  },
6173
8045
  stripe: {
6174
8046
  required: false,
@@ -6193,19 +8065,20 @@ var schema7 = new MongooseSchema11(
6193
8065
  vendor: {
6194
8066
  ref: "Vendor",
6195
8067
  required: false,
6196
- type: mongoose11.Schema.Types.ObjectId
8068
+ type: mongoose12.Schema.Types.ObjectId
6197
8069
  }
6198
8070
  },
6199
8071
  { strict: false, timestamps: true }
6200
8072
  );
6201
- schema7.index({ "licences.expiryDate": 1 });
6202
- schema7.index({ "licences.licenceType": 1 });
6203
- var UserModel = mongoose11.models.User || mongoose11.model("User", schema7);
8073
+ schema8.index({ "licences.expiryDate": 1 });
8074
+ schema8.index({ "licences.licenceType": 1 });
8075
+ schema8.index({ promoCodes: 1, active: 1, deletedAt: 1 });
8076
+ var UserModel = mongoose12.models.User || mongoose12.model("User", schema8);
6204
8077
 
6205
8078
  // src/mongoose/VerificationToken.ts
6206
- import mongoose12 from "mongoose";
6207
- var MongooseSchema12 = mongoose12.Schema;
6208
- var schema8 = new MongooseSchema12(
8079
+ import mongoose13 from "mongoose";
8080
+ var MongooseSchema13 = mongoose13.Schema;
8081
+ var schema9 = new MongooseSchema13(
6209
8082
  {
6210
8083
  createdAt: {
6211
8084
  default: Date.now,
@@ -6220,12 +8093,12 @@ var schema8 = new MongooseSchema12(
6220
8093
  },
6221
8094
  { timestamps: true }
6222
8095
  );
6223
- var VerificationTokenModel = mongoose12.models.VerificationToken || mongoose12.model("VerificationToken", schema8);
8096
+ var VerificationTokenModel = mongoose13.models.VerificationToken || mongoose13.model("VerificationToken", schema9);
6224
8097
 
6225
8098
  // src/mongoose/vendor/Vendor.ts
6226
- import mongoose13 from "mongoose";
6227
- var MongooseSchema13 = mongoose13.Schema;
6228
- var vendorProductTypeSchema = new MongooseSchema13(
8099
+ import mongoose14 from "mongoose";
8100
+ var MongooseSchema14 = mongoose14.Schema;
8101
+ var vendorProductTypeSchema = new MongooseSchema14(
6229
8102
  {
6230
8103
  description: { required: false, type: String },
6231
8104
  name: { required: true, type: String },
@@ -6236,14 +8109,14 @@ var vendorProductTypeSchema = new MongooseSchema13(
6236
8109
  },
6237
8110
  { timestamps: true }
6238
8111
  );
6239
- var productWrapperSchema = new MongooseSchema13(
8112
+ var productWrapperSchema = new MongooseSchema14(
6240
8113
  {
6241
8114
  active: { default: false, required: false, type: Boolean },
6242
8115
  productsList: { required: false, type: [vendorProductTypeSchema] }
6243
8116
  },
6244
8117
  { _id: false }
6245
8118
  );
6246
- var calendarSchema = new MongooseSchema13(
8119
+ var calendarSchema = new MongooseSchema14(
6247
8120
  {
6248
8121
  dateTime: {
6249
8122
  dateStatus: {
@@ -6264,14 +8137,14 @@ var calendarSchema = new MongooseSchema13(
6264
8137
  },
6265
8138
  { _id: false }
6266
8139
  );
6267
- var calendarWrapperSchema = new MongooseSchema13(
8140
+ var calendarWrapperSchema = new MongooseSchema14(
6268
8141
  {
6269
8142
  active: { default: false, required: true, type: Boolean },
6270
8143
  calendarData: { required: false, type: [calendarSchema] }
6271
8144
  },
6272
8145
  { _id: false }
6273
8146
  );
6274
- var schema9 = new MongooseSchema13(
8147
+ var schema10 = new MongooseSchema14(
6275
8148
  {
6276
8149
  ...baseResourceFields,
6277
8150
  // Importing base resource fields from global.ts
@@ -6285,6 +8158,7 @@ var schema9 = new MongooseSchema13(
6285
8158
  type: calendarWrapperSchema
6286
8159
  },
6287
8160
  categories: { required: true, type: [CategorySchema] },
8161
+ categoriesNames: { default: [], required: false, type: [String] },
6288
8162
  claimed: { default: true, required: false, type: Boolean },
6289
8163
  foodTruck: { required: true, type: Boolean },
6290
8164
  products: { required: false, type: productWrapperSchema },
@@ -6297,12 +8171,12 @@ var schema9 = new MongooseSchema13(
6297
8171
  unregisteredVendorId: {
6298
8172
  ref: "UnregisteredVendor",
6299
8173
  required: false,
6300
- type: mongoose13.Schema.Types.ObjectId
8174
+ type: mongoose14.Schema.Types.ObjectId
6301
8175
  },
6302
8176
  vendorInfoId: {
6303
8177
  ref: "VendorInfo",
6304
8178
  required: false,
6305
- type: mongoose13.Schema.Types.ObjectId
8179
+ type: mongoose14.Schema.Types.ObjectId
6306
8180
  },
6307
8181
  vendorType: {
6308
8182
  enum: Object.values(EnumVendorType),
@@ -6312,24 +8186,31 @@ var schema9 = new MongooseSchema13(
6312
8186
  },
6313
8187
  { timestamps: true }
6314
8188
  );
6315
- schema9.index({ name: 1 });
6316
- schema9.index({ description: 1 });
6317
- schema9.index({ region: 1 });
6318
- schema9.index({ "categories.name": 1 });
6319
- schema9.index({ slug: 1 });
6320
- var VendorModel = mongoose13.models.Vendor || mongoose13.model("Vendor", schema9);
8189
+ schema10.index({ name: 1 });
8190
+ schema10.index({ description: 1 });
8191
+ schema10.index({ region: 1 });
8192
+ schema10.index({ "categories.name": 1 });
8193
+ schema10.index({ slug: 1 });
8194
+ schema10.index({
8195
+ name: "text",
8196
+ description: "text",
8197
+ categoriesNames: "text"
8198
+ });
8199
+ schema10.index({ "owner.userId": 1, deletedAt: 1 });
8200
+ schema10.plugin(searchNamePlugin);
8201
+ var VendorModel = mongoose14.models.Vendor || mongoose14.model("Vendor", schema10);
6321
8202
 
6322
8203
  // src/mongoose/vendor/VendorInfo.ts
6323
- import mongoose14 from "mongoose";
6324
- var MongooseSchema14 = mongoose14.Schema;
6325
- var AttributesSchema = new MongooseSchema14(
8204
+ import mongoose15 from "mongoose";
8205
+ var MongooseSchema15 = mongoose15.Schema;
8206
+ var AttributesSchema = new MongooseSchema15(
6326
8207
  {
6327
8208
  details: { required: false, type: String },
6328
8209
  isRequired: { default: false, required: true, type: Boolean }
6329
8210
  },
6330
8211
  { _id: false }
6331
8212
  );
6332
- var schema10 = new MongooseSchema14(
8213
+ var schema11 = new MongooseSchema15(
6333
8214
  {
6334
8215
  active: { default: true, type: Boolean },
6335
8216
  compliance: {
@@ -6364,28 +8245,29 @@ var schema10 = new MongooseSchema14(
6364
8245
  vendorId: {
6365
8246
  ref: "Vendor",
6366
8247
  required: true,
6367
- type: mongoose14.Schema.Types.ObjectId
8248
+ type: mongoose15.Schema.Types.ObjectId
6368
8249
  }
6369
8250
  },
6370
8251
  { timestamps: true }
6371
8252
  );
6372
- var VendorInfoModel = mongoose14.models.VendorInfo || mongoose14.model("VendorInfo", schema10);
8253
+ schema11.index({ vendorId: 1 });
8254
+ var VendorInfoModel = mongoose15.models.VendorInfo || mongoose15.model("VendorInfo", schema11);
6373
8255
 
6374
8256
  // src/mongoose/vendor/UnregisteredVendor.ts
6375
- import mongoose15 from "mongoose";
6376
- var MongooseSchema15 = mongoose15.Schema;
6377
- var invitationSchema = new MongooseSchema15(
8257
+ import mongoose16 from "mongoose";
8258
+ var MongooseSchema16 = mongoose16.Schema;
8259
+ var invitationSchema = new MongooseSchema16(
6378
8260
  {
6379
8261
  dateTime: { required: true, type: [dateTimeSchema2] },
6380
8262
  inviterId: {
6381
8263
  ref: "Event",
6382
8264
  required: true,
6383
- type: mongoose15.Schema.Types.ObjectId
8265
+ type: mongoose16.Schema.Types.ObjectId
6384
8266
  }
6385
8267
  },
6386
8268
  { _id: false }
6387
8269
  );
6388
- var schema11 = new MongooseSchema15(
8270
+ var schema12 = new MongooseSchema16(
6389
8271
  {
6390
8272
  active: { default: true, required: true, type: Boolean },
6391
8273
  categoryIds: { required: true, type: [String] },
@@ -6394,7 +8276,7 @@ var schema11 = new MongooseSchema15(
6394
8276
  claimedByUserId: {
6395
8277
  ref: "User",
6396
8278
  required: false,
6397
- type: mongoose15.Schema.Types.ObjectId
8279
+ type: mongoose16.Schema.Types.ObjectId
6398
8280
  },
6399
8281
  claimInitiatedAt: { default: null, required: false, type: Date },
6400
8282
  claimToken: { default: null, required: false, type: String },
@@ -6407,14 +8289,14 @@ var schema11 = new MongooseSchema15(
6407
8289
  },
6408
8290
  { timestamps: true }
6409
8291
  );
6410
- schema11.index({ name: 1 });
6411
- schema11.index({ email: 1 });
6412
- var UnregisteredVendorModel = mongoose15.models.UnregisteredVendor || mongoose15.model("UnregisteredVendor", schema11);
8292
+ schema12.index({ name: 1 });
8293
+ schema12.index({ email: 1 });
8294
+ var UnregisteredVendorModel = mongoose16.models.UnregisteredVendor || mongoose16.model("UnregisteredVendor", schema12);
6413
8295
 
6414
8296
  // src/mongoose/event/Event.ts
6415
- import mongoose16 from "mongoose";
6416
- var MongooseSchema16 = mongoose16.Schema;
6417
- var schema12 = new MongooseSchema16(
8297
+ import mongoose17 from "mongoose";
8298
+ var MongooseSchema17 = mongoose17.Schema;
8299
+ var schema13 = new MongooseSchema17(
6418
8300
  {
6419
8301
  ...baseResourceFields,
6420
8302
  // Importing base resource fields from global.ts
@@ -6423,7 +8305,7 @@ var schema12 = new MongooseSchema16(
6423
8305
  eventInfoId: {
6424
8306
  ref: "EventInfo",
6425
8307
  required: false,
6426
- type: mongoose16.Schema.Types.ObjectId
8308
+ type: mongoose17.Schema.Types.ObjectId
6427
8309
  },
6428
8310
  eventType: {
6429
8311
  enum: Object.values(EnumEventType),
@@ -6452,20 +8334,23 @@ var schema12 = new MongooseSchema16(
6452
8334
  },
6453
8335
  { timestamps: true }
6454
8336
  );
6455
- schema12.index({ name: 1 });
6456
- schema12.index({ description: 1 });
6457
- schema12.index({ region: 1 });
6458
- schema12.index({ "location.geo": "2dsphere" });
6459
- schema12.index({ tags: 1 });
6460
- schema12.index({ deletedAt: 1 });
6461
- schema12.index({ "dateTime.dateStatus": 1 });
6462
- schema12.index({ slug: 1 });
6463
- var EventModel = mongoose16.models.Event || mongoose16.model("Event", schema12);
8337
+ schema13.index({ name: 1 });
8338
+ schema13.index({ description: 1 });
8339
+ schema13.index({ region: 1 });
8340
+ schema13.index({ "location.geo": "2dsphere" });
8341
+ schema13.index({ tags: 1 });
8342
+ schema13.index({ deletedAt: 1 });
8343
+ schema13.index({ "dateTime.dateStatus": 1 });
8344
+ schema13.index({ slug: 1 });
8345
+ schema13.index({ name: "text", description: "text", tags: "text" });
8346
+ schema13.index({ "owner.userId": 1, deletedAt: 1 });
8347
+ schema13.plugin(searchNamePlugin);
8348
+ var EventModel = mongoose17.models.Event || mongoose17.model("Event", schema13);
6464
8349
 
6465
8350
  // src/mongoose/Partner.ts
6466
- import mongoose17 from "mongoose";
6467
- var MongooseSchema17 = mongoose17.Schema;
6468
- var schema13 = new MongooseSchema17(
8351
+ import mongoose18 from "mongoose";
8352
+ var MongooseSchema18 = mongoose18.Schema;
8353
+ var schema14 = new MongooseSchema18(
6469
8354
  {
6470
8355
  ...baseResourceFields,
6471
8356
  location: {
@@ -6481,17 +8366,20 @@ var schema13 = new MongooseSchema17(
6481
8366
  },
6482
8367
  { timestamps: true }
6483
8368
  );
6484
- schema13.index({ name: 1 });
6485
- schema13.index({ description: 1 });
6486
- schema13.index({ region: 1 });
6487
- schema13.index({ "location.geo": "2dsphere" });
6488
- schema13.index({ slug: 1 });
6489
- var PartnerModel = mongoose17.models.Partner || mongoose17.model("Partner", schema13);
8369
+ schema14.index({ name: 1 });
8370
+ schema14.index({ description: 1 });
8371
+ schema14.index({ region: 1 });
8372
+ schema14.index({ "location.geo": "2dsphere" });
8373
+ schema14.index({ slug: 1 });
8374
+ schema14.index({ name: "text", description: "text" });
8375
+ schema14.index({ "owner.userId": 1, deletedAt: 1 });
8376
+ schema14.plugin(searchNamePlugin);
8377
+ var PartnerModel = mongoose18.models.Partner || mongoose18.model("Partner", schema14);
6490
8378
 
6491
8379
  // src/mongoose/Post.ts
6492
- import mongoose18, { Schema } from "mongoose";
6493
- var MongooseSchema18 = mongoose18.Schema;
6494
- var contentSchema = new MongooseSchema18(
8380
+ import mongoose19, { Schema } from "mongoose";
8381
+ var MongooseSchema19 = mongoose19.Schema;
8382
+ var contentSchema = new MongooseSchema19(
6495
8383
  {
6496
8384
  contentData: Schema.Types.Mixed,
6497
8385
  contentOrder: { required: true, type: Number },
@@ -6503,7 +8391,7 @@ var contentSchema = new MongooseSchema18(
6503
8391
  },
6504
8392
  { _id: false }
6505
8393
  );
6506
- var resourceSchema = new MongooseSchema18(
8394
+ var resourceSchema = new MongooseSchema19(
6507
8395
  {
6508
8396
  resourceId: { required: true, type: String },
6509
8397
  resourceRegion: { required: true, type: String },
@@ -6516,7 +8404,7 @@ var resourceSchema = new MongooseSchema18(
6516
8404
  },
6517
8405
  { _id: false }
6518
8406
  );
6519
- var schema14 = new MongooseSchema18(
8407
+ var schema15 = new MongooseSchema19(
6520
8408
  {
6521
8409
  active: { default: false, required: true, type: Boolean },
6522
8410
  approvedAt: { default: null, required: false, type: Date },
@@ -6547,16 +8435,16 @@ var schema14 = new MongooseSchema18(
6547
8435
  },
6548
8436
  { timestamps: true }
6549
8437
  );
6550
- schema14.index({ title: 1 });
6551
- schema14.index({ tags: 1 });
6552
- schema14.index({ postType: 1, slug: 1 }, { unique: true });
6553
- var PostModel = mongoose18.models.Post || mongoose18.model("Post", schema14);
8438
+ schema15.index({ title: 1 });
8439
+ schema15.index({ tags: 1 });
8440
+ schema15.index({ postType: 1, slug: 1 }, { unique: true });
8441
+ var PostModel = mongoose19.models.Post || mongoose19.model("Post", schema15);
6554
8442
 
6555
8443
  // src/mongoose/AppSetting.ts
6556
- import mongoose19 from "mongoose";
6557
- var MongooseSchema19 = mongoose19.Schema;
8444
+ import mongoose20 from "mongoose";
8445
+ var MongooseSchema20 = mongoose20.Schema;
6558
8446
  var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
6559
- var AppSettingSchema = new MongooseSchema19(
8447
+ var AppSettingSchema = new MongooseSchema20(
6560
8448
  {
6561
8449
  activeSchoolsStudentCountTotal: {
6562
8450
  default: 0,
@@ -6587,18 +8475,18 @@ var AppSettingSchema = new MongooseSchema19(
6587
8475
  },
6588
8476
  { timestamps: true }
6589
8477
  );
6590
- var AppSettingModel = mongoose19.models.AppSetting || mongoose19.model("AppSetting", AppSettingSchema);
8478
+ var AppSettingModel = mongoose20.models.AppSetting || mongoose20.model("AppSetting", AppSettingSchema);
6591
8479
 
6592
8480
  // src/mongoose/game/Game.ts
6593
- import mongoose23 from "mongoose";
8481
+ import mongoose24 from "mongoose";
6594
8482
 
6595
8483
  // src/mongoose/game/DailyClue.ts
6596
- import mongoose21 from "mongoose";
8484
+ import mongoose22 from "mongoose";
6597
8485
 
6598
8486
  // src/mongoose/game/utils.ts
6599
- import mongoose20 from "mongoose";
6600
- var MongooseSchema20 = mongoose20.Schema;
6601
- var schemaGameDate = new MongooseSchema20(
8487
+ import mongoose21 from "mongoose";
8488
+ var MongooseSchema21 = mongoose21.Schema;
8489
+ var schemaGameDate = new MongooseSchema21(
6602
8490
  {
6603
8491
  endDate: { required: true, type: Date },
6604
8492
  startDate: { required: true, type: Date }
@@ -6607,8 +8495,8 @@ var schemaGameDate = new MongooseSchema20(
6607
8495
  );
6608
8496
 
6609
8497
  // src/mongoose/game/DailyClue.ts
6610
- var MongooseSchema21 = mongoose21.Schema;
6611
- var schemaLetters = new MongooseSchema21(
8498
+ var MongooseSchema22 = mongoose22.Schema;
8499
+ var schemaLetters = new MongooseSchema22(
6612
8500
  {
6613
8501
  collected: { required: false, type: [String] },
6614
8502
  solutionShuffled: { required: true, type: [String] }
@@ -6616,14 +8504,14 @@ var schemaLetters = new MongooseSchema21(
6616
8504
  },
6617
8505
  { _id: false }
6618
8506
  );
6619
- var schemaDailyClueBaseGame = new MongooseSchema21(
8507
+ var schemaDailyClueBaseGame = new MongooseSchema22(
6620
8508
  {
6621
8509
  gameDate: { required: true, type: schemaGameDate },
6622
8510
  gameSolution: { required: true, type: String }
6623
8511
  },
6624
8512
  { _id: false }
6625
8513
  );
6626
- var schemaDailyClueGameData = new MongooseSchema21(
8514
+ var schemaDailyClueGameData = new MongooseSchema22(
6627
8515
  {
6628
8516
  gameFields: { required: true, type: schemaDailyClueBaseGame },
6629
8517
  lastFoundDate: { default: null, required: false, type: Date },
@@ -6638,9 +8526,9 @@ var schemaDailyClueGameData = new MongooseSchema21(
6638
8526
  );
6639
8527
 
6640
8528
  // src/mongoose/game/PuzzleGame.ts
6641
- import mongoose22 from "mongoose";
6642
- var MongooseSchema22 = mongoose22.Schema;
6643
- var schemaPuzzleAnswer = new MongooseSchema22(
8529
+ import mongoose23 from "mongoose";
8530
+ var MongooseSchema23 = mongoose23.Schema;
8531
+ var schemaPuzzleAnswer = new MongooseSchema23(
6644
8532
  {
6645
8533
  answer: { required: true, type: String },
6646
8534
  answerId: { required: true, type: String },
@@ -6648,7 +8536,7 @@ var schemaPuzzleAnswer = new MongooseSchema22(
6648
8536
  },
6649
8537
  { _id: false }
6650
8538
  );
6651
- var schemaPuzzleQuestion = new MongooseSchema22(
8539
+ var schemaPuzzleQuestion = new MongooseSchema23(
6652
8540
  {
6653
8541
  answers: { required: true, type: [schemaPuzzleAnswer] },
6654
8542
  question: { required: true, type: String },
@@ -6656,20 +8544,20 @@ var schemaPuzzleQuestion = new MongooseSchema22(
6656
8544
  },
6657
8545
  { _id: false }
6658
8546
  );
6659
- var schemaPuzzleBaseGame = new MongooseSchema22(
8547
+ var schemaPuzzleBaseGame = new MongooseSchema23(
6660
8548
  {
6661
8549
  questions: { required: true, type: [schemaPuzzleQuestion] }
6662
8550
  },
6663
8551
  { _id: false }
6664
8552
  );
6665
- var schemaPuzzleAnsweredQuestion = new MongooseSchema22(
8553
+ var schemaPuzzleAnsweredQuestion = new MongooseSchema23(
6666
8554
  {
6667
8555
  questionId: { required: true, type: String },
6668
8556
  selectedAnswerId: { required: true, type: String }
6669
8557
  },
6670
8558
  { _id: false }
6671
8559
  );
6672
- var schemaPuzzleGameData = new MongooseSchema22(
8560
+ var schemaPuzzleGameData = new MongooseSchema23(
6673
8561
  {
6674
8562
  answeredQuestions: {
6675
8563
  default: null,
@@ -6684,19 +8572,19 @@ var schemaPuzzleGameData = new MongooseSchema22(
6684
8572
  );
6685
8573
 
6686
8574
  // src/mongoose/game/Game.ts
6687
- var MongooseSchema23 = mongoose23.Schema;
8575
+ var MongooseSchema24 = mongoose24.Schema;
6688
8576
  var gameDataSchemas = {
6689
8577
  [EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
6690
8578
  [EnumGameType.MINI_QUIZ]: schemaPuzzleGameData,
6691
8579
  [EnumGameType.ODD_ONE_OUT]: schemaPuzzleGameData
6692
8580
  };
6693
8581
  var gameDataDefinition = Object.fromEntries(
6694
- Object.entries(gameDataSchemas).map(([key, schema19]) => [
8582
+ Object.entries(gameDataSchemas).map(([key, schema20]) => [
6695
8583
  key,
6696
- { default: null, required: false, type: schema19 }
8584
+ { default: null, required: false, type: schema20 }
6697
8585
  ])
6698
8586
  );
6699
- var gameHistorySchema = new MongooseSchema23(
8587
+ var gameHistorySchema = new MongooseSchema24(
6700
8588
  {
6701
8589
  createdAt: { required: true, type: Date },
6702
8590
  gameDate: { required: true, type: schemaGameDate },
@@ -6716,7 +8604,7 @@ var gameHistorySchema = new MongooseSchema23(
6716
8604
  },
6717
8605
  { _id: false }
6718
8606
  );
6719
- var gameTypeSchema = new MongooseSchema23(
8607
+ var gameTypeSchema = new MongooseSchema24(
6720
8608
  {
6721
8609
  active: { default: true, required: true, type: Boolean },
6722
8610
  gameData: gameDataDefinition,
@@ -6731,7 +8619,7 @@ var gameTypeSchema = new MongooseSchema23(
6731
8619
  },
6732
8620
  { timestamps: true }
6733
8621
  );
6734
- var schema15 = new MongooseSchema23(
8622
+ var schema16 = new MongooseSchema24(
6735
8623
  {
6736
8624
  active: { default: false, required: true, type: Boolean },
6737
8625
  deletedAt: { default: null, required: false, type: Date },
@@ -6744,12 +8632,12 @@ var schema15 = new MongooseSchema23(
6744
8632
  },
6745
8633
  { timestamps: true }
6746
8634
  );
6747
- var GameModel = mongoose23.models.Game || mongoose23.model("Game", schema15);
8635
+ var GameModel = mongoose24.models.Game || mongoose24.model("Game", schema16);
6748
8636
 
6749
8637
  // src/mongoose/School.ts
6750
- import mongoose24 from "mongoose";
6751
- var MongooseSchema24 = mongoose24.Schema;
6752
- var campaignsSchema = new MongooseSchema24(
8638
+ import mongoose25 from "mongoose";
8639
+ var MongooseSchema25 = mongoose25.Schema;
8640
+ var campaignsSchema = new MongooseSchema25(
6753
8641
  {
6754
8642
  endDate: { required: true, type: Date },
6755
8643
  name: { required: true, type: String },
@@ -6757,7 +8645,7 @@ var campaignsSchema = new MongooseSchema24(
6757
8645
  },
6758
8646
  { _id: false }
6759
8647
  );
6760
- var schema16 = new MongooseSchema24(
8648
+ var schema17 = new MongooseSchema25(
6761
8649
  {
6762
8650
  // New schools are active by default
6763
8651
  active: { default: false, required: true, type: Boolean },
@@ -6784,19 +8672,19 @@ var schema16 = new MongooseSchema24(
6784
8672
  },
6785
8673
  { timestamps: true }
6786
8674
  );
6787
- schema16.index(
8675
+ schema17.index(
6788
8676
  { schoolCode: 1 },
6789
8677
  {
6790
8678
  partialFilterExpression: { active: true, deletedAt: null },
6791
8679
  unique: true
6792
8680
  }
6793
8681
  );
6794
- var SchoolModel = mongoose24.models.School || mongoose24.model("School", schema16);
8682
+ var SchoolModel = mongoose25.models.School || mongoose25.model("School", schema17);
6795
8683
 
6796
8684
  // src/mongoose/Affiliate.ts
6797
- import mongoose25 from "mongoose";
6798
- var MongooseSchema25 = mongoose25.Schema;
6799
- var affiliateRewardSchema = new MongooseSchema25(
8685
+ import mongoose26 from "mongoose";
8686
+ var MongooseSchema26 = mongoose26.Schema;
8687
+ var affiliateRewardSchema = new MongooseSchema26(
6800
8688
  {
6801
8689
  createdAt: { required: true, type: Date },
6802
8690
  redeemedAt: { default: null, required: false, type: Date },
@@ -6810,13 +8698,13 @@ var affiliateRewardSchema = new MongooseSchema25(
6810
8698
  },
6811
8699
  { _id: false }
6812
8700
  );
6813
- var affiliateResourceSchema = new MongooseSchema25(
8701
+ var affiliateResourceSchema = new MongooseSchema26(
6814
8702
  {
6815
8703
  resourceActive: { default: true, required: true, type: Boolean },
6816
8704
  resourceDeletedAt: { default: null, required: false, type: Date },
6817
8705
  resourceId: {
6818
8706
  required: true,
6819
- type: mongoose25.Schema.Types.ObjectId
8707
+ type: mongoose26.Schema.Types.ObjectId
6820
8708
  },
6821
8709
  resourceName: { required: true, type: String },
6822
8710
  resourceOwner: {
@@ -6836,20 +8724,20 @@ var affiliateResourceSchema = new MongooseSchema25(
6836
8724
  },
6837
8725
  { _id: false }
6838
8726
  );
6839
- var affiliateContactDetailsSchema = new MongooseSchema25(
8727
+ var affiliateContactDetailsSchema = new MongooseSchema26(
6840
8728
  {
6841
8729
  mobilePhone: { required: true, type: String }
6842
8730
  },
6843
8731
  { _id: false }
6844
8732
  );
6845
- var affiliateBankAccountDetailsSchema = new MongooseSchema25(
8733
+ var affiliateBankAccountDetailsSchema = new MongooseSchema26(
6846
8734
  {
6847
8735
  accountHolderName: { required: true, type: String },
6848
8736
  accountNumber: { required: true, type: String }
6849
8737
  },
6850
8738
  { _id: false }
6851
8739
  );
6852
- var affiliateDetailsSchema = new MongooseSchema25(
8740
+ var affiliateDetailsSchema = new MongooseSchema26(
6853
8741
  {
6854
8742
  bankAccountDetails: {
6855
8743
  required: true,
@@ -6871,7 +8759,7 @@ var affiliateDetailsSchema = new MongooseSchema25(
6871
8759
  },
6872
8760
  { _id: false }
6873
8761
  );
6874
- var redeemHistorySchema = new MongooseSchema25(
8762
+ var redeemHistorySchema = new MongooseSchema26(
6875
8763
  {
6876
8764
  paidAt: { default: null, required: false, type: Date },
6877
8765
  redeemedAt: { required: true, type: Date },
@@ -6879,7 +8767,7 @@ var redeemHistorySchema = new MongooseSchema25(
6879
8767
  },
6880
8768
  { _id: false }
6881
8769
  );
6882
- var schema17 = new MongooseSchema25(
8770
+ var schema18 = new MongooseSchema26(
6883
8771
  {
6884
8772
  active: { default: false, required: true, type: Boolean },
6885
8773
  affiliateBonusRewards: {
@@ -6909,19 +8797,19 @@ var schema17 = new MongooseSchema25(
6909
8797
  },
6910
8798
  { timestamps: true }
6911
8799
  );
6912
- schema17.index(
8800
+ schema18.index(
6913
8801
  { affiliateCode: 1 },
6914
8802
  {
6915
8803
  partialFilterExpression: { active: true, deletedAt: null },
6916
8804
  unique: true
6917
8805
  }
6918
8806
  );
6919
- var AffiliateModel = mongoose25.models.Affiliate || mongoose25.model("Affiliate", schema17);
8807
+ var AffiliateModel = mongoose26.models.Affiliate || mongoose26.model("Affiliate", schema18);
6920
8808
 
6921
8809
  // src/mongoose/Coupon.ts
6922
- import mongoose26 from "mongoose";
6923
- var MongooseSchema26 = mongoose26.Schema;
6924
- var couponOptionSchema = new MongooseSchema26(
8810
+ import mongoose27 from "mongoose";
8811
+ var MongooseSchema27 = mongoose27.Schema;
8812
+ var couponOptionSchema = new MongooseSchema27(
6925
8813
  {
6926
8814
  buy: { required: false, type: Number },
6927
8815
  get: { required: false, type: Number },
@@ -6936,29 +8824,29 @@ var couponOptionSchema = new MongooseSchema26(
6936
8824
  },
6937
8825
  { _id: false }
6938
8826
  );
6939
- var couponVendorProductSchema = new MongooseSchema26(
8827
+ var couponVendorProductSchema = new MongooseSchema27(
6940
8828
  {
6941
8829
  couponId: {
6942
8830
  required: true,
6943
- type: mongoose26.Schema.Types.ObjectId
8831
+ type: mongoose27.Schema.Types.ObjectId
6944
8832
  },
6945
8833
  productId: {
6946
8834
  required: true,
6947
- type: mongoose26.Schema.Types.ObjectId
8835
+ type: mongoose27.Schema.Types.ObjectId
6948
8836
  },
6949
8837
  vendorCouponId: {
6950
8838
  required: false,
6951
- type: mongoose26.Schema.Types.ObjectId
8839
+ type: mongoose27.Schema.Types.ObjectId
6952
8840
  },
6953
8841
  vendorId: {
6954
8842
  ref: "Vendor",
6955
8843
  required: true,
6956
- type: mongoose26.Schema.Types.ObjectId
8844
+ type: mongoose27.Schema.Types.ObjectId
6957
8845
  }
6958
8846
  },
6959
8847
  { _id: false }
6960
8848
  );
6961
- var couponCodeSchema = new MongooseSchema26(
8849
+ var couponCodeSchema = new MongooseSchema27(
6962
8850
  {
6963
8851
  code: { required: true, type: String },
6964
8852
  qrCode: { required: true, type: ResourceImageTypeSchema },
@@ -6966,7 +8854,7 @@ var couponCodeSchema = new MongooseSchema26(
6966
8854
  },
6967
8855
  { _id: false }
6968
8856
  );
6969
- var couponParticipantUserSchema = new MongooseSchema26(
8857
+ var couponParticipantUserSchema = new MongooseSchema27(
6970
8858
  {
6971
8859
  couponCollectedCount: { default: 0, required: true, type: Number },
6972
8860
  couponCycleRedeemed: { default: false, required: true, type: Boolean },
@@ -6975,12 +8863,12 @@ var couponParticipantUserSchema = new MongooseSchema26(
6975
8863
  userId: {
6976
8864
  ref: "User",
6977
8865
  required: true,
6978
- type: mongoose26.Schema.Types.ObjectId
8866
+ type: mongoose27.Schema.Types.ObjectId
6979
8867
  }
6980
8868
  },
6981
8869
  { timestamps: true }
6982
8870
  );
6983
- var couponDataSchema = new MongooseSchema26(
8871
+ var couponDataSchema = new MongooseSchema27(
6984
8872
  {
6985
8873
  active: { default: true, required: true, type: Boolean },
6986
8874
  couponCode: { required: false, type: couponCodeSchema },
@@ -7007,7 +8895,7 @@ var couponDataSchema = new MongooseSchema26(
7007
8895
  },
7008
8896
  { timestamps: true }
7009
8897
  );
7010
- var schema18 = new MongooseSchema26(
8898
+ var schema19 = new MongooseSchema27(
7011
8899
  {
7012
8900
  active: { default: true, required: true, type: Boolean },
7013
8901
  couponData: { default: [], required: false, type: [couponDataSchema] },
@@ -7019,7 +8907,9 @@ var schema18 = new MongooseSchema26(
7019
8907
  },
7020
8908
  { timestamps: true }
7021
8909
  );
7022
- var CouponModel = mongoose26.models.Coupon || mongoose26.model("Coupon", schema18);
8910
+ schema19.index({ active: 1, deletedAt: 1, "owner.userId": 1 });
8911
+ schema19.index({ "couponData.participantUsers.userId": 1 });
8912
+ var CouponModel = mongoose27.models.Coupon || mongoose27.model("Coupon", schema19);
7023
8913
 
7024
8914
  export {
7025
8915
  EnumInviteStatus,
@@ -7029,12 +8919,17 @@ export {
7029
8919
  EnumNotificationType,
7030
8920
  EnumUserLicence,
7031
8921
  EnumEventDateStatus,
8922
+ EnumSubscriptionStatus,
7032
8923
  dateFormat,
7033
8924
  timeFormat,
7034
8925
  EnumAdStatus,
7035
8926
  EnumAffiliateRewardType,
7036
8927
  licenseNiceNames,
7037
8928
  AdModel,
8929
+ BILLING_CATALOG_COLLECTION_NAME,
8930
+ BillingCatalogModel,
8931
+ buildInitialBillingCatalogEntries,
8932
+ getBillingCatalogDefinition,
7038
8933
  ChatModel,
7039
8934
  ChatReportModel,
7040
8935
  StallTypeSchema,
@@ -7064,7 +8959,7 @@ export {
7064
8959
  EnumRegions2 as EnumRegions,
7065
8960
  EnumUserLicence2,
7066
8961
  EnumEventDateStatus2,
7067
- EnumSubscriptionStatus2 as EnumSubscriptionStatus,
8962
+ EnumSubscriptionStatus2,
7068
8963
  PushTokenModel,
7069
8964
  ResourceActivityModel,
7070
8965
  UserModel,
@@ -7083,4 +8978,28 @@ export {
7083
8978
  AffiliateModel,
7084
8979
  CouponModel
7085
8980
  };
7086
- //# sourceMappingURL=chunk-DJHOLZ3J.mjs.map
8981
+ /*! Bundled license information:
8982
+
8983
+ react/cjs/react.production.js:
8984
+ (**
8985
+ * @license React
8986
+ * react.production.js
8987
+ *
8988
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8989
+ *
8990
+ * This source code is licensed under the MIT license found in the
8991
+ * LICENSE file in the root directory of this source tree.
8992
+ *)
8993
+
8994
+ react/cjs/react.development.js:
8995
+ (**
8996
+ * @license React
8997
+ * react.development.js
8998
+ *
8999
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9000
+ *
9001
+ * This source code is licensed under the MIT license found in the
9002
+ * LICENSE file in the root directory of this source tree.
9003
+ *)
9004
+ */
9005
+ //# sourceMappingURL=chunk-EGUFWI7R.mjs.map