@popp0102/questify 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/questify.js +300 -288
- package/dist/questify.js.map +1 -1
- package/package.json +1 -1
package/dist/questify.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import Oe, { createContext as pr, useState as Pe, useContext as gr } from "react";
|
|
2
|
+
var Z = { exports: {} }, L = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,19 +9,19 @@ var Q = { exports: {} }, F = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
function T
|
|
18
|
-
var
|
|
19
|
-
m !== void 0 && (
|
|
20
|
-
for (
|
|
21
|
-
if (
|
|
22
|
-
return { $$typeof:
|
|
12
|
+
var Ce;
|
|
13
|
+
function yr() {
|
|
14
|
+
if (Ce) return L;
|
|
15
|
+
Ce = 1;
|
|
16
|
+
var R = Oe, S = Symbol.for("react.element"), d = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, x = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, C = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function b(T, l, m) {
|
|
18
|
+
var s, v = {}, _ = null, k = null;
|
|
19
|
+
m !== void 0 && (_ = "" + m), l.key !== void 0 && (_ = "" + l.key), l.ref !== void 0 && (k = l.ref);
|
|
20
|
+
for (s in l) E.call(l, s) && !C.hasOwnProperty(s) && (v[s] = l[s]);
|
|
21
|
+
if (T && T.defaultProps) for (s in l = T.defaultProps, l) v[s] === void 0 && (v[s] = l[s]);
|
|
22
|
+
return { $$typeof: S, type: T, key: _, ref: k, props: v, _owner: x.current };
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return L.Fragment = d, L.jsx = b, L.jsxs = b, L;
|
|
25
25
|
}
|
|
26
26
|
var $ = {};
|
|
27
27
|
/**
|
|
@@ -33,91 +33,91 @@ var $ = {};
|
|
|
33
33
|
* This source code is licensed under the MIT license found in the
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
return
|
|
39
|
-
var
|
|
36
|
+
var we;
|
|
37
|
+
function Er() {
|
|
38
|
+
return we || (we = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
+
var R = Oe, S = Symbol.for("react.element"), d = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), b = Symbol.for("react.provider"), T = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), W = Symbol.iterator, Ae = "@@iterator";
|
|
40
40
|
function Ie(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
|
-
var r =
|
|
43
|
+
var r = W && e[W] || e[Ae];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var j =
|
|
47
|
-
function
|
|
46
|
+
var j = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
|
+
function p(e) {
|
|
48
48
|
{
|
|
49
49
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
50
50
|
t[n - 1] = arguments[n];
|
|
51
|
-
|
|
51
|
+
ke("error", e, t);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function ke(e, r, t) {
|
|
55
55
|
{
|
|
56
56
|
var n = j.ReactDebugCurrentFrame, i = n.getStackAddendum();
|
|
57
57
|
i !== "" && (r += "%s", t = t.concat([i]));
|
|
58
|
-
var
|
|
58
|
+
var u = t.map(function(o) {
|
|
59
59
|
return String(o);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
64
|
+
var De = !1, Fe = !1, Le = !1, $e = !1, Ye = !1, re;
|
|
65
|
+
re = Symbol.for("react.module.reference");
|
|
66
|
+
function We(e) {
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === E || e === C || Ye || e === x || e === m || e === s || $e || e === k || De || Fe || Le || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === v || e.$$typeof === b || e.$$typeof === T || e.$$typeof === l || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
71
|
-
e.$$typeof ===
|
|
71
|
+
e.$$typeof === re || e.getModuleId !== void 0));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Ve(e, r, t) {
|
|
74
74
|
var n = e.displayName;
|
|
75
75
|
if (n)
|
|
76
76
|
return n;
|
|
77
77
|
var i = r.displayName || r.name || "";
|
|
78
78
|
return i !== "" ? t + "(" + i + ")" : t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function te(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function w(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
|
-
if (typeof e.tag == "number" &&
|
|
86
|
+
if (typeof e.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
87
87
|
return e.displayName || e.name || null;
|
|
88
88
|
if (typeof e == "string")
|
|
89
89
|
return e;
|
|
90
90
|
switch (e) {
|
|
91
|
-
case
|
|
91
|
+
case E:
|
|
92
92
|
return "Fragment";
|
|
93
|
-
case
|
|
93
|
+
case d:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case C:
|
|
96
96
|
return "Profiler";
|
|
97
|
-
case
|
|
97
|
+
case x:
|
|
98
98
|
return "StrictMode";
|
|
99
99
|
case m:
|
|
100
100
|
return "Suspense";
|
|
101
|
-
case
|
|
101
|
+
case s:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
105
105
|
switch (e.$$typeof) {
|
|
106
|
-
case d:
|
|
107
|
-
var r = e;
|
|
108
|
-
return re(r) + ".Consumer";
|
|
109
106
|
case T:
|
|
110
|
-
var
|
|
111
|
-
return
|
|
112
|
-
case u:
|
|
113
|
-
return We(e, e.render, "ForwardRef");
|
|
107
|
+
var r = e;
|
|
108
|
+
return te(r) + ".Consumer";
|
|
114
109
|
case b:
|
|
110
|
+
var t = e;
|
|
111
|
+
return te(t._context) + ".Provider";
|
|
112
|
+
case l:
|
|
113
|
+
return Ve(e, e.render, "ForwardRef");
|
|
114
|
+
case v:
|
|
115
115
|
var n = e.displayName || null;
|
|
116
|
-
return n !== null ? n :
|
|
117
|
-
case
|
|
118
|
-
var i = e,
|
|
116
|
+
return n !== null ? n : w(e.type) || "Memo";
|
|
117
|
+
case _: {
|
|
118
|
+
var i = e, u = i._payload, o = i._init;
|
|
119
119
|
try {
|
|
120
|
-
return
|
|
120
|
+
return w(o(u));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,18 +125,18 @@ function yr() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var
|
|
129
|
-
function
|
|
128
|
+
var O = Object.assign, D = 0, ne, ae, oe, ie, ue, se, le;
|
|
129
|
+
function ce() {
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
function
|
|
131
|
+
ce.__reactDisabledLog = !0;
|
|
132
|
+
function Me() {
|
|
133
133
|
{
|
|
134
|
-
if (
|
|
135
|
-
|
|
134
|
+
if (D === 0) {
|
|
135
|
+
ne = console.log, ae = console.info, oe = console.warn, ie = console.error, ue = console.group, se = console.groupCollapsed, le = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
139
|
-
value:
|
|
139
|
+
value: ce,
|
|
140
140
|
writable: !0
|
|
141
141
|
};
|
|
142
142
|
Object.defineProperties(console, {
|
|
@@ -149,77 +149,77 @@ function yr() {
|
|
|
149
149
|
groupEnd: e
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
D++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ne() {
|
|
156
156
|
{
|
|
157
|
-
if (
|
|
157
|
+
if (D--, D === 0) {
|
|
158
158
|
var e = {
|
|
159
159
|
configurable: !0,
|
|
160
160
|
enumerable: !0,
|
|
161
161
|
writable: !0
|
|
162
162
|
};
|
|
163
163
|
Object.defineProperties(console, {
|
|
164
|
-
log:
|
|
165
|
-
value: te
|
|
166
|
-
}),
|
|
167
|
-
info: P({}, e, {
|
|
164
|
+
log: O({}, e, {
|
|
168
165
|
value: ne
|
|
169
166
|
}),
|
|
170
|
-
|
|
167
|
+
info: O({}, e, {
|
|
171
168
|
value: ae
|
|
172
169
|
}),
|
|
173
|
-
|
|
170
|
+
warn: O({}, e, {
|
|
174
171
|
value: oe
|
|
175
172
|
}),
|
|
176
|
-
|
|
173
|
+
error: O({}, e, {
|
|
177
174
|
value: ie
|
|
178
175
|
}),
|
|
179
|
-
|
|
176
|
+
group: O({}, e, {
|
|
180
177
|
value: ue
|
|
181
178
|
}),
|
|
182
|
-
|
|
179
|
+
groupCollapsed: O({}, e, {
|
|
183
180
|
value: se
|
|
181
|
+
}),
|
|
182
|
+
groupEnd: O({}, e, {
|
|
183
|
+
value: le
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
D < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
191
|
-
function
|
|
190
|
+
var q = j.ReactCurrentDispatcher, B;
|
|
191
|
+
function V(e, r, t) {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
193
|
+
if (B === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
196
|
} catch (i) {
|
|
197
197
|
var n = i.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
-
|
|
198
|
+
B = n && n[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
|
-
` +
|
|
201
|
+
` + B + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
204
|
+
var J = !1, M;
|
|
205
205
|
{
|
|
206
206
|
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
-
|
|
207
|
+
M = new Ue();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
if (!e ||
|
|
209
|
+
function fe(e, r) {
|
|
210
|
+
if (!e || J)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
|
-
var t =
|
|
213
|
+
var t = M.get(e);
|
|
214
214
|
if (t !== void 0)
|
|
215
215
|
return t;
|
|
216
216
|
}
|
|
217
217
|
var n;
|
|
218
|
-
|
|
218
|
+
J = !0;
|
|
219
219
|
var i = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var u;
|
|
222
|
+
u = q.current, q.current = null, Me();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
225
|
var o = function() {
|
|
@@ -232,167 +232,167 @@ function yr() {
|
|
|
232
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
233
|
try {
|
|
234
234
|
Reflect.construct(o, []);
|
|
235
|
-
} catch (
|
|
236
|
-
n =
|
|
235
|
+
} catch (y) {
|
|
236
|
+
n = y;
|
|
237
237
|
}
|
|
238
238
|
Reflect.construct(e, [], o);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
241
|
o.call();
|
|
242
|
-
} catch (
|
|
243
|
-
n =
|
|
242
|
+
} catch (y) {
|
|
243
|
+
n = y;
|
|
244
244
|
}
|
|
245
245
|
e.call(o.prototype);
|
|
246
246
|
}
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
throw Error();
|
|
250
|
-
} catch (
|
|
251
|
-
n =
|
|
250
|
+
} catch (y) {
|
|
251
|
+
n = y;
|
|
252
252
|
}
|
|
253
253
|
e();
|
|
254
254
|
}
|
|
255
|
-
} catch (
|
|
256
|
-
if (
|
|
257
|
-
for (var a =
|
|
258
|
-
`),
|
|
259
|
-
`),
|
|
260
|
-
|
|
261
|
-
for (;
|
|
262
|
-
if (a[
|
|
263
|
-
if (
|
|
255
|
+
} catch (y) {
|
|
256
|
+
if (y && n && typeof y.stack == "string") {
|
|
257
|
+
for (var a = y.stack.split(`
|
|
258
|
+
`), g = n.stack.split(`
|
|
259
|
+
`), c = a.length - 1, f = g.length - 1; c >= 1 && f >= 0 && a[c] !== g[f]; )
|
|
260
|
+
f--;
|
|
261
|
+
for (; c >= 1 && f >= 0; c--, f--)
|
|
262
|
+
if (a[c] !== g[f]) {
|
|
263
|
+
if (c !== 1 || f !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (
|
|
266
|
-
var
|
|
267
|
-
` + a[
|
|
268
|
-
return e.displayName &&
|
|
265
|
+
if (c--, f--, f < 0 || a[c] !== g[f]) {
|
|
266
|
+
var h = `
|
|
267
|
+
` + a[c].replace(" at new ", " at ");
|
|
268
|
+
return e.displayName && h.includes("<anonymous>") && (h = h.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, h), h;
|
|
269
269
|
}
|
|
270
|
-
while (
|
|
270
|
+
while (c >= 1 && f >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
|
|
275
|
+
J = !1, q.current = u, Ne(), Error.prepareStackTrace = i;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
return typeof e == "function" &&
|
|
277
|
+
var I = e ? e.displayName || e.name : "", P = I ? V(I) : "";
|
|
278
|
+
return typeof e == "function" && M.set(e, P), P;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
return
|
|
280
|
+
function qe(e, r, t) {
|
|
281
|
+
return fe(e, !1);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Be(e) {
|
|
284
284
|
var r = e.prototype;
|
|
285
285
|
return !!(r && r.isReactComponent);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function N(e, r, t) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
|
-
return
|
|
291
|
+
return fe(e, Be(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
|
-
return
|
|
293
|
+
return V(e);
|
|
294
294
|
switch (e) {
|
|
295
295
|
case m:
|
|
296
|
-
return
|
|
297
|
-
case
|
|
298
|
-
return
|
|
296
|
+
return V("Suspense");
|
|
297
|
+
case s:
|
|
298
|
+
return V("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
|
-
case
|
|
303
|
-
return
|
|
304
|
-
case
|
|
305
|
-
return
|
|
306
|
-
case
|
|
307
|
-
var n = e, i = n._payload,
|
|
302
|
+
case l:
|
|
303
|
+
return qe(e.render);
|
|
304
|
+
case v:
|
|
305
|
+
return N(e.type, r, t);
|
|
306
|
+
case _: {
|
|
307
|
+
var n = e, i = n._payload, u = n._init;
|
|
308
308
|
try {
|
|
309
|
-
return
|
|
309
|
+
return N(u(i), r, t);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var
|
|
316
|
+
var F = Object.prototype.hasOwnProperty, de = {}, ve = j.ReactDebugCurrentFrame;
|
|
317
317
|
function U(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var r = e._owner, t =
|
|
320
|
-
|
|
319
|
+
var r = e._owner, t = N(e.type, e._source, r ? r.type : null);
|
|
320
|
+
ve.setExtraStackFrame(t);
|
|
321
321
|
} else
|
|
322
|
-
|
|
322
|
+
ve.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Je(e, r, t, n, i) {
|
|
325
325
|
{
|
|
326
|
-
var
|
|
326
|
+
var u = Function.call.bind(F);
|
|
327
327
|
for (var o in e)
|
|
328
|
-
if (
|
|
328
|
+
if (u(e, o)) {
|
|
329
329
|
var a = void 0;
|
|
330
330
|
try {
|
|
331
331
|
if (typeof e[o] != "function") {
|
|
332
|
-
var
|
|
333
|
-
throw
|
|
332
|
+
var g = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
|
+
throw g.name = "Invariant Violation", g;
|
|
334
334
|
}
|
|
335
335
|
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
-
} catch (
|
|
337
|
-
a =
|
|
336
|
+
} catch (c) {
|
|
337
|
+
a = c;
|
|
338
338
|
}
|
|
339
|
-
a && !(a instanceof Error) && (U(i),
|
|
339
|
+
a && !(a instanceof Error) && (U(i), p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), U(null)), a instanceof Error && !(a.message in de) && (de[a.message] = !0, U(i), p("Failed %s type: %s", t, a.message), U(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
var
|
|
344
|
-
function
|
|
345
|
-
return
|
|
343
|
+
var Ke = Array.isArray;
|
|
344
|
+
function K(e) {
|
|
345
|
+
return Ke(e);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Ge(e) {
|
|
348
348
|
{
|
|
349
349
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
350
350
|
return t;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function ze(e) {
|
|
354
354
|
try {
|
|
355
|
-
return
|
|
355
|
+
return pe(e), !1;
|
|
356
356
|
} catch {
|
|
357
357
|
return !0;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function pe(e) {
|
|
361
361
|
return "" + e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
if (
|
|
365
|
-
return
|
|
363
|
+
function ge(e) {
|
|
364
|
+
if (ze(e))
|
|
365
|
+
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), pe(e);
|
|
366
366
|
}
|
|
367
|
-
var
|
|
367
|
+
var ye = j.ReactCurrentOwner, Xe = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
},
|
|
373
|
-
function
|
|
374
|
-
if (
|
|
372
|
+
}, Ee, me;
|
|
373
|
+
function Qe(e) {
|
|
374
|
+
if (F.call(e, "ref")) {
|
|
375
375
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
376
376
|
if (r && r.isReactWarning)
|
|
377
377
|
return !1;
|
|
378
378
|
}
|
|
379
379
|
return e.ref !== void 0;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
if (
|
|
381
|
+
function He(e) {
|
|
382
|
+
if (F.call(e, "key")) {
|
|
383
383
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
384
384
|
if (r && r.isReactWarning)
|
|
385
385
|
return !1;
|
|
386
386
|
}
|
|
387
387
|
return e.key !== void 0;
|
|
388
388
|
}
|
|
389
|
-
function He(e, r) {
|
|
390
|
-
typeof e.ref == "string" && ge.current;
|
|
391
|
-
}
|
|
392
389
|
function Ze(e, r) {
|
|
390
|
+
typeof e.ref == "string" && ye.current;
|
|
391
|
+
}
|
|
392
|
+
function er(e, r) {
|
|
393
393
|
{
|
|
394
394
|
var t = function() {
|
|
395
|
-
|
|
395
|
+
Ee || (Ee = !0, p("%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://reactjs.org/link/special-props)", r));
|
|
396
396
|
};
|
|
397
397
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
398
|
get: t,
|
|
@@ -400,10 +400,10 @@ function yr() {
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function rr(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var t = function() {
|
|
406
|
-
|
|
406
|
+
me || (me = !0, p("%s: `ref` 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://reactjs.org/link/special-props)", r));
|
|
407
407
|
};
|
|
408
408
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
409
|
get: t,
|
|
@@ -411,17 +411,17 @@ function yr() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var
|
|
414
|
+
var tr = function(e, r, t, n, i, u, o) {
|
|
415
415
|
var a = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof:
|
|
417
|
+
$$typeof: S,
|
|
418
418
|
// Built-in properties that belong on the element
|
|
419
419
|
type: e,
|
|
420
420
|
key: r,
|
|
421
421
|
ref: t,
|
|
422
422
|
props: o,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
|
-
_owner:
|
|
424
|
+
_owner: u
|
|
425
425
|
};
|
|
426
426
|
return a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
@@ -440,41 +440,41 @@ function yr() {
|
|
|
440
440
|
value: i
|
|
441
441
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
442
442
|
};
|
|
443
|
-
function
|
|
443
|
+
function nr(e, r, t, n, i) {
|
|
444
444
|
{
|
|
445
|
-
var
|
|
446
|
-
t !== void 0 && (
|
|
447
|
-
for (
|
|
448
|
-
|
|
445
|
+
var u, o = {}, a = null, g = null;
|
|
446
|
+
t !== void 0 && (ge(t), a = "" + t), He(r) && (ge(r.key), a = "" + r.key), Qe(r) && (g = r.ref, Ze(r, i));
|
|
447
|
+
for (u in r)
|
|
448
|
+
F.call(r, u) && !Xe.hasOwnProperty(u) && (o[u] = r[u]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
|
-
var
|
|
451
|
-
for (
|
|
452
|
-
o[
|
|
450
|
+
var c = e.defaultProps;
|
|
451
|
+
for (u in c)
|
|
452
|
+
o[u] === void 0 && (o[u] = c[u]);
|
|
453
453
|
}
|
|
454
|
-
if (a ||
|
|
455
|
-
var
|
|
456
|
-
a &&
|
|
454
|
+
if (a || g) {
|
|
455
|
+
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
+
a && er(o, f), g && rr(o, f);
|
|
457
457
|
}
|
|
458
|
-
return
|
|
458
|
+
return tr(e, a, g, i, n, ye.current, o);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
462
|
-
function
|
|
461
|
+
var G = j.ReactCurrentOwner, he = j.ReactDebugCurrentFrame;
|
|
462
|
+
function A(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var r = e._owner, t =
|
|
465
|
-
|
|
464
|
+
var r = e._owner, t = N(e.type, e._source, r ? r.type : null);
|
|
465
|
+
he.setExtraStackFrame(t);
|
|
466
466
|
} else
|
|
467
|
-
|
|
467
|
+
he.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
function
|
|
472
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
469
|
+
var z;
|
|
470
|
+
z = !1;
|
|
471
|
+
function X(e) {
|
|
472
|
+
return typeof e == "object" && e !== null && e.$$typeof === S;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function Te() {
|
|
475
475
|
{
|
|
476
|
-
if (
|
|
477
|
-
var e =
|
|
476
|
+
if (G.current) {
|
|
477
|
+
var e = w(G.current.type);
|
|
478
478
|
if (e)
|
|
479
479
|
return `
|
|
480
480
|
|
|
@@ -483,13 +483,13 @@ Check the render method of \`` + e + "`.";
|
|
|
483
483
|
return "";
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function ar(e) {
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
|
-
var
|
|
490
|
-
function
|
|
489
|
+
var _e = {};
|
|
490
|
+
function or(e) {
|
|
491
491
|
{
|
|
492
|
-
var r =
|
|
492
|
+
var r = Te();
|
|
493
493
|
if (!r) {
|
|
494
494
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
495
495
|
t && (r = `
|
|
@@ -499,39 +499,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
499
499
|
return r;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function be(e, r) {
|
|
503
503
|
{
|
|
504
504
|
if (!e._store || e._store.validated || e.key != null)
|
|
505
505
|
return;
|
|
506
506
|
e._store.validated = !0;
|
|
507
|
-
var t =
|
|
508
|
-
if (
|
|
507
|
+
var t = or(r);
|
|
508
|
+
if (_e[t])
|
|
509
509
|
return;
|
|
510
|
-
|
|
510
|
+
_e[t] = !0;
|
|
511
511
|
var n = "";
|
|
512
|
-
e && e._owner && e._owner !==
|
|
512
|
+
e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + w(e._owner.type) + "."), A(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), A(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
function Re(e, r) {
|
|
516
516
|
{
|
|
517
517
|
if (typeof e != "object")
|
|
518
518
|
return;
|
|
519
|
-
if (
|
|
519
|
+
if (K(e))
|
|
520
520
|
for (var t = 0; t < e.length; t++) {
|
|
521
521
|
var n = e[t];
|
|
522
|
-
|
|
522
|
+
X(n) && be(n, r);
|
|
523
523
|
}
|
|
524
|
-
else if (
|
|
524
|
+
else if (X(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
527
|
var i = Ie(e);
|
|
528
528
|
if (typeof i == "function" && i !== e.entries)
|
|
529
|
-
for (var
|
|
530
|
-
|
|
529
|
+
for (var u = i.call(e), o; !(o = u.next()).done; )
|
|
530
|
+
X(o.value) && be(o.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function ir(e) {
|
|
535
535
|
{
|
|
536
536
|
var r = e.type;
|
|
537
537
|
if (r == null || typeof r == "string")
|
|
@@ -539,158 +539,170 @@ Check the top-level render call using <` + t + ">.");
|
|
|
539
539
|
var t;
|
|
540
540
|
if (typeof r == "function")
|
|
541
541
|
t = r.propTypes;
|
|
542
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
542
|
+
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
543
543
|
// Inner props are checked in the reconciler.
|
|
544
|
-
r.$$typeof ===
|
|
544
|
+
r.$$typeof === v))
|
|
545
545
|
t = r.propTypes;
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
548
548
|
if (t) {
|
|
549
|
-
var n =
|
|
550
|
-
|
|
551
|
-
} else if (r.PropTypes !== void 0 && !
|
|
552
|
-
|
|
553
|
-
var i =
|
|
554
|
-
|
|
549
|
+
var n = w(r);
|
|
550
|
+
Je(t, e.props, "prop", n, e);
|
|
551
|
+
} else if (r.PropTypes !== void 0 && !z) {
|
|
552
|
+
z = !0;
|
|
553
|
+
var i = w(r);
|
|
554
|
+
p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
|
|
555
555
|
}
|
|
556
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
556
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function ur(e) {
|
|
560
560
|
{
|
|
561
561
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
562
562
|
var n = r[t];
|
|
563
563
|
if (n !== "children" && n !== "key") {
|
|
564
|
-
|
|
564
|
+
A(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), A(null);
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
e.ref !== null && (
|
|
568
|
+
e.ref !== null && (A(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
function xe(e, r, t, n, i,
|
|
571
|
+
var Se = {};
|
|
572
|
+
function xe(e, r, t, n, i, u) {
|
|
573
573
|
{
|
|
574
|
-
var o =
|
|
574
|
+
var o = We(e);
|
|
575
575
|
if (!o) {
|
|
576
576
|
var a = "";
|
|
577
577
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
578
|
-
var
|
|
579
|
-
|
|
580
|
-
var
|
|
581
|
-
e === null ?
|
|
578
|
+
var g = ar();
|
|
579
|
+
g ? a += g : a += Te();
|
|
580
|
+
var c;
|
|
581
|
+
e === null ? c = "null" : K(e) ? c = "array" : e !== void 0 && e.$$typeof === S ? (c = "<" + (w(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, a);
|
|
582
582
|
}
|
|
583
|
-
var
|
|
584
|
-
if (
|
|
585
|
-
return
|
|
583
|
+
var f = nr(e, r, t, i, u);
|
|
584
|
+
if (f == null)
|
|
585
|
+
return f;
|
|
586
586
|
if (o) {
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
587
|
+
var h = r.children;
|
|
588
|
+
if (h !== void 0)
|
|
589
589
|
if (n)
|
|
590
|
-
if (
|
|
591
|
-
for (var
|
|
592
|
-
Re(
|
|
593
|
-
Object.freeze && Object.freeze(
|
|
590
|
+
if (K(h)) {
|
|
591
|
+
for (var I = 0; I < h.length; I++)
|
|
592
|
+
Re(h[I], e);
|
|
593
|
+
Object.freeze && Object.freeze(h);
|
|
594
594
|
} else
|
|
595
|
-
|
|
595
|
+
p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
596
596
|
else
|
|
597
|
-
Re(
|
|
597
|
+
Re(h, e);
|
|
598
598
|
}
|
|
599
|
-
if (
|
|
600
|
-
var
|
|
601
|
-
return
|
|
602
|
-
}),
|
|
603
|
-
if (!
|
|
604
|
-
var
|
|
605
|
-
|
|
599
|
+
if (F.call(r, "key")) {
|
|
600
|
+
var P = w(e), y = Object.keys(r).filter(function(vr) {
|
|
601
|
+
return vr !== "key";
|
|
602
|
+
}), Q = y.length > 0 ? "{key: someKey, " + y.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
|
+
if (!Se[P + Q]) {
|
|
604
|
+
var dr = y.length > 0 ? "{" + y.join(": ..., ") + ": ...}" : "{}";
|
|
605
|
+
p(`A props object containing a "key" prop is being spread into JSX:
|
|
606
606
|
let props = %s;
|
|
607
607
|
<%s {...props} />
|
|
608
608
|
React keys must be passed directly to JSX without using spread:
|
|
609
609
|
let props = %s;
|
|
610
|
-
<%s key={someKey} {...props} />`,
|
|
610
|
+
<%s key={someKey} {...props} />`, Q, P, dr, P), Se[P + Q] = !0;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
return e ===
|
|
613
|
+
return e === E ? ur(f) : ir(f), f;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function sr(e, r, t) {
|
|
617
617
|
return xe(e, r, t, !0);
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function lr(e, r, t) {
|
|
620
620
|
return xe(e, r, t, !1);
|
|
621
621
|
}
|
|
622
|
-
var
|
|
623
|
-
$.Fragment =
|
|
622
|
+
var cr = lr, fr = sr;
|
|
623
|
+
$.Fragment = E, $.jsx = cr, $.jsxs = fr;
|
|
624
624
|
}()), $;
|
|
625
625
|
}
|
|
626
|
-
process.env.NODE_ENV === "production" ?
|
|
627
|
-
var
|
|
628
|
-
function
|
|
629
|
-
return /* @__PURE__ */
|
|
630
|
-
/* @__PURE__ */
|
|
631
|
-
/* @__PURE__ */
|
|
626
|
+
process.env.NODE_ENV === "production" ? Z.exports = yr() : Z.exports = Er();
|
|
627
|
+
var Y = Z.exports;
|
|
628
|
+
function _r() {
|
|
629
|
+
return /* @__PURE__ */ Y.jsxs(Y.Fragment, { children: [
|
|
630
|
+
/* @__PURE__ */ Y.jsx("h1", { children: "New Package Created" }),
|
|
631
|
+
/* @__PURE__ */ Y.jsx("h2", { children: "Questify ready to go!" })
|
|
632
632
|
] });
|
|
633
633
|
}
|
|
634
|
-
const
|
|
634
|
+
const ee = "questify-last-completed-trial", mr = localStorage.getItem(ee) || 0, hr = parseInt(mr), je = pr({
|
|
635
|
+
playerLocation: "trail",
|
|
635
636
|
currentTrialIdx: 0,
|
|
636
637
|
trials: {},
|
|
637
638
|
submitAnswer: () => {
|
|
638
639
|
},
|
|
639
640
|
completeTrial: () => {
|
|
640
641
|
}
|
|
641
|
-
});
|
|
642
|
-
function
|
|
643
|
-
const
|
|
644
|
-
function
|
|
645
|
-
const
|
|
646
|
-
|
|
642
|
+
}), H = -1;
|
|
643
|
+
function br({ trials: R, children: S }) {
|
|
644
|
+
const [d, E] = Pe({ currentTrialIdx: hr, playerLocation: H });
|
|
645
|
+
function x() {
|
|
646
|
+
const s = d.currentTrialIdx + 1;
|
|
647
|
+
E((v) => ({ ...v, currentTrialIdx: s })), localStorage.setItem(ee, s);
|
|
647
648
|
}
|
|
648
|
-
function
|
|
649
|
-
let
|
|
650
|
-
const
|
|
651
|
-
return
|
|
649
|
+
function C(s) {
|
|
650
|
+
let v = !1;
|
|
651
|
+
const _ = d.currentTrialIdx + 1;
|
|
652
|
+
return R[_].solution === s.trim().toLowerCase() && (v = !0, E((W) => ({ ...W, currentTrialIdx: _ })), localStorage.setItem(ee, _)), v;
|
|
653
|
+
}
|
|
654
|
+
function b() {
|
|
655
|
+
d.playerLocation;
|
|
656
|
+
}
|
|
657
|
+
function T() {
|
|
658
|
+
E((s) => ({ ...s, playerLocation: H }));
|
|
659
|
+
}
|
|
660
|
+
function l(s) {
|
|
661
|
+
E((v) => ({ ...v, playerLocation: s }));
|
|
652
662
|
}
|
|
653
|
-
const
|
|
654
|
-
currentTrialIdx:
|
|
655
|
-
currentTrial:
|
|
656
|
-
trials:
|
|
657
|
-
submitAnswer:
|
|
658
|
-
completeTrial:
|
|
663
|
+
const m = {
|
|
664
|
+
currentTrialIdx: d.currentTrialIdx,
|
|
665
|
+
currentTrial: R[d.currentTrialIdx],
|
|
666
|
+
trials: R,
|
|
667
|
+
submitAnswer: C,
|
|
668
|
+
completeTrial: x,
|
|
669
|
+
playerOnTrialSelectScreen: b,
|
|
670
|
+
moveToTrialSelectScreen: T,
|
|
671
|
+
moveToTrialScreen: l
|
|
659
672
|
};
|
|
660
|
-
return /* @__PURE__ */
|
|
673
|
+
return /* @__PURE__ */ Y.jsx(je.Provider, { value: m, children: S });
|
|
661
674
|
}
|
|
662
675
|
function Rr() {
|
|
663
|
-
const [
|
|
664
|
-
if (!
|
|
665
|
-
const
|
|
666
|
-
function
|
|
667
|
-
let
|
|
668
|
-
const
|
|
669
|
-
return
|
|
676
|
+
const [R, S] = Pe(-1), d = gr(je);
|
|
677
|
+
if (!d) throw new Error("useQuestify must be used within a ProgressContextProvider");
|
|
678
|
+
const E = d.trials.map((l) => l.solution);
|
|
679
|
+
function x(l) {
|
|
680
|
+
let m = !1;
|
|
681
|
+
const s = d.currentTrialIdx;
|
|
682
|
+
return E[s] === l.trim().toLowerCase() && (m = !0, d.completeTrial()), m;
|
|
670
683
|
}
|
|
671
|
-
function
|
|
672
|
-
const
|
|
673
|
-
return
|
|
684
|
+
function C() {
|
|
685
|
+
const l = d.currentTrialIdx;
|
|
686
|
+
return d.trials.filter((m) => m.section < l);
|
|
687
|
+
}
|
|
688
|
+
function b() {
|
|
689
|
+
d.moveToTrialSelectScreen();
|
|
674
690
|
}
|
|
675
691
|
function T() {
|
|
676
|
-
|
|
677
|
-
type: "path",
|
|
678
|
-
data: R().map((d) => ({ title: d.title }))
|
|
679
|
-
} : {
|
|
680
|
-
type: "trial",
|
|
681
|
-
data: g.currentTrial
|
|
682
|
-
};
|
|
692
|
+
d.playerOnTrialSelectScreen();
|
|
683
693
|
}
|
|
684
694
|
return {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
695
|
+
navigateSelectScreen: b,
|
|
696
|
+
navigateToTrial: navigateToTrialnavigateSelectScree,
|
|
697
|
+
isOnTrialSelectScreen: T,
|
|
698
|
+
submitAnswer: x,
|
|
699
|
+
solvedTrials: C
|
|
688
700
|
};
|
|
689
701
|
}
|
|
690
702
|
export {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
703
|
+
je as ProgressContext,
|
|
704
|
+
br as ProgressContextProvider,
|
|
705
|
+
_r as default,
|
|
694
706
|
Rr as useQuestify
|
|
695
707
|
};
|
|
696
708
|
//# sourceMappingURL=questify.js.map
|