@plasmicpkgs/plasmic-sanity-io 1.0.138 → 1.0.140
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/LICENSE.app.md +661 -0
- package/dist/plasmic-sanity-io.cjs.development.js +336 -699
- package/dist/plasmic-sanity-io.cjs.development.js.map +1 -1
- package/dist/plasmic-sanity-io.cjs.production.min.js +1 -1
- package/dist/plasmic-sanity-io.cjs.production.min.js.map +1 -1
- package/dist/plasmic-sanity-io.esm.js +336 -699
- package/dist/plasmic-sanity-io.esm.js.map +1 -1
- package/dist/sanity.d.ts +3 -3
- package/package.json +3 -3
- package/LICENSE.md +0 -21
|
@@ -8,694 +8,337 @@ import { pascalCase } from 'change-case';
|
|
|
8
8
|
import get from 'dlv';
|
|
9
9
|
import React, { useContext } from 'react';
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function _regeneratorRuntime() {
|
|
12
|
+
_regeneratorRuntime = function () {
|
|
13
|
+
return e;
|
|
14
|
+
};
|
|
15
|
+
var t,
|
|
16
|
+
e = {},
|
|
17
|
+
r = Object.prototype,
|
|
18
|
+
n = r.hasOwnProperty,
|
|
19
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
20
|
+
t[e] = r.value;
|
|
21
|
+
},
|
|
22
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
23
|
+
a = i.iterator || "@@iterator",
|
|
24
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
25
|
+
u = i.toStringTag || "@@toStringTag";
|
|
26
|
+
function define(t, e, r) {
|
|
27
|
+
return Object.defineProperty(t, e, {
|
|
28
|
+
value: r,
|
|
29
|
+
enumerable: !0,
|
|
30
|
+
configurable: !0,
|
|
31
|
+
writable: !0
|
|
32
|
+
}), t[e];
|
|
33
|
+
}
|
|
12
34
|
try {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
35
|
+
define({}, "");
|
|
36
|
+
} catch (t) {
|
|
37
|
+
define = function (t, e, r) {
|
|
38
|
+
return t[e] = r;
|
|
39
|
+
};
|
|
18
40
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
41
|
+
function wrap(t, e, r, n) {
|
|
42
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
43
|
+
a = Object.create(i.prototype),
|
|
44
|
+
c = new Context(n || []);
|
|
45
|
+
return o(a, "_invoke", {
|
|
46
|
+
value: makeInvokeMethod(t, r, c)
|
|
47
|
+
}), a;
|
|
23
48
|
}
|
|
24
|
-
|
|
25
|
-
function _asyncToGenerator(fn) {
|
|
26
|
-
return function () {
|
|
27
|
-
var self = this,
|
|
28
|
-
args = arguments;
|
|
29
|
-
return new Promise(function (resolve, reject) {
|
|
30
|
-
var gen = fn.apply(self, args);
|
|
31
|
-
function _next(value) {
|
|
32
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
33
|
-
}
|
|
34
|
-
function _throw(err) {
|
|
35
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
36
|
-
}
|
|
37
|
-
_next(undefined);
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function createCommonjsModule(fn, module) {
|
|
43
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
47
|
-
/**
|
|
48
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
49
|
-
*
|
|
50
|
-
* This source code is licensed under the MIT license found in the
|
|
51
|
-
* LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
var runtime = function (exports) {
|
|
55
|
-
|
|
56
|
-
var Op = Object.prototype;
|
|
57
|
-
var hasOwn = Op.hasOwnProperty;
|
|
58
|
-
var undefined$1; // More compressible than void 0.
|
|
59
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
60
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
61
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
62
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
63
|
-
function define(obj, key, value) {
|
|
64
|
-
Object.defineProperty(obj, key, {
|
|
65
|
-
value: value,
|
|
66
|
-
enumerable: true,
|
|
67
|
-
configurable: true,
|
|
68
|
-
writable: true
|
|
69
|
-
});
|
|
70
|
-
return obj[key];
|
|
71
|
-
}
|
|
49
|
+
function tryCatch(t, e, r) {
|
|
72
50
|
try {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
51
|
+
return {
|
|
52
|
+
type: "normal",
|
|
53
|
+
arg: t.call(e, r)
|
|
54
|
+
};
|
|
55
|
+
} catch (t) {
|
|
56
|
+
return {
|
|
57
|
+
type: "throw",
|
|
58
|
+
arg: t
|
|
78
59
|
};
|
|
79
60
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
function tryCatch(fn, obj, arg) {
|
|
104
|
-
try {
|
|
105
|
-
return {
|
|
106
|
-
type: "normal",
|
|
107
|
-
arg: fn.call(obj, arg)
|
|
108
|
-
};
|
|
109
|
-
} catch (err) {
|
|
110
|
-
return {
|
|
111
|
-
type: "throw",
|
|
112
|
-
arg: err
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
117
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
118
|
-
var GenStateExecuting = "executing";
|
|
119
|
-
var GenStateCompleted = "completed";
|
|
120
|
-
|
|
121
|
-
// Returning this object from the innerFn has the same effect as
|
|
122
|
-
// breaking out of the dispatch switch statement.
|
|
123
|
-
var ContinueSentinel = {};
|
|
124
|
-
|
|
125
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
126
|
-
// .constructor.prototype properties for functions that return Generator
|
|
127
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
128
|
-
// minifier not to mangle the names of these two functions.
|
|
129
|
-
function Generator() {}
|
|
130
|
-
function GeneratorFunction() {}
|
|
131
|
-
function GeneratorFunctionPrototype() {}
|
|
132
|
-
|
|
133
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
134
|
-
// don't natively support it.
|
|
135
|
-
var IteratorPrototype = {};
|
|
136
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
137
|
-
return this;
|
|
61
|
+
}
|
|
62
|
+
e.wrap = wrap;
|
|
63
|
+
var h = "suspendedStart",
|
|
64
|
+
l = "suspendedYield",
|
|
65
|
+
f = "executing",
|
|
66
|
+
s = "completed",
|
|
67
|
+
y = {};
|
|
68
|
+
function Generator() {}
|
|
69
|
+
function GeneratorFunction() {}
|
|
70
|
+
function GeneratorFunctionPrototype() {}
|
|
71
|
+
var p = {};
|
|
72
|
+
define(p, a, function () {
|
|
73
|
+
return this;
|
|
74
|
+
});
|
|
75
|
+
var d = Object.getPrototypeOf,
|
|
76
|
+
v = d && d(d(values([])));
|
|
77
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
78
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
79
|
+
function defineIteratorMethods(t) {
|
|
80
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
81
|
+
define(t, e, function (t) {
|
|
82
|
+
return this._invoke(e, t);
|
|
83
|
+
});
|
|
138
84
|
});
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
function defineIteratorMethods(prototype) {
|
|
155
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
156
|
-
define(prototype, method, function (arg) {
|
|
157
|
-
return this._invoke(method, arg);
|
|
85
|
+
}
|
|
86
|
+
function AsyncIterator(t, e) {
|
|
87
|
+
function invoke(r, o, i, a) {
|
|
88
|
+
var c = tryCatch(t[r], t, o);
|
|
89
|
+
if ("throw" !== c.type) {
|
|
90
|
+
var u = c.arg,
|
|
91
|
+
h = u.value;
|
|
92
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
93
|
+
invoke("next", t, i, a);
|
|
94
|
+
}, function (t) {
|
|
95
|
+
invoke("throw", t, i, a);
|
|
96
|
+
}) : e.resolve(h).then(function (t) {
|
|
97
|
+
u.value = t, i(u);
|
|
98
|
+
}, function (t) {
|
|
99
|
+
return invoke("throw", t, i, a);
|
|
158
100
|
});
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
exports.isGeneratorFunction = function (genFun) {
|
|
162
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
163
|
-
return ctor ? ctor === GeneratorFunction ||
|
|
164
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
165
|
-
// do is to check its .name property.
|
|
166
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction" : false;
|
|
167
|
-
};
|
|
168
|
-
exports.mark = function (genFun) {
|
|
169
|
-
if (Object.setPrototypeOf) {
|
|
170
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
171
|
-
} else {
|
|
172
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
173
|
-
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
174
|
-
}
|
|
175
|
-
genFun.prototype = Object.create(Gp);
|
|
176
|
-
return genFun;
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
// Within the body of any async function, `await x` is transformed to
|
|
180
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
181
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
182
|
-
// meant to be awaited.
|
|
183
|
-
exports.awrap = function (arg) {
|
|
184
|
-
return {
|
|
185
|
-
__await: arg
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
189
|
-
function invoke(method, arg, resolve, reject) {
|
|
190
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
191
|
-
if (record.type === "throw") {
|
|
192
|
-
reject(record.arg);
|
|
193
|
-
} else {
|
|
194
|
-
var result = record.arg;
|
|
195
|
-
var value = result.value;
|
|
196
|
-
if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
|
|
197
|
-
return PromiseImpl.resolve(value.__await).then(function (value) {
|
|
198
|
-
invoke("next", value, resolve, reject);
|
|
199
|
-
}, function (err) {
|
|
200
|
-
invoke("throw", err, resolve, reject);
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
return PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
204
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
205
|
-
// the .value of the Promise<{value,done}> result for the
|
|
206
|
-
// current iteration.
|
|
207
|
-
result.value = unwrapped;
|
|
208
|
-
resolve(result);
|
|
209
|
-
}, function (error) {
|
|
210
|
-
// If a rejected Promise was yielded, throw the rejection back
|
|
211
|
-
// into the async generator function so it can be handled there.
|
|
212
|
-
return invoke("throw", error, resolve, reject);
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
101
|
}
|
|
216
|
-
|
|
217
|
-
|
|
102
|
+
a(c.arg);
|
|
103
|
+
}
|
|
104
|
+
var r;
|
|
105
|
+
o(this, "_invoke", {
|
|
106
|
+
value: function (t, n) {
|
|
218
107
|
function callInvokeWithMethodAndArg() {
|
|
219
|
-
return new
|
|
220
|
-
invoke(
|
|
108
|
+
return new e(function (e, r) {
|
|
109
|
+
invoke(t, n, e, r);
|
|
221
110
|
});
|
|
222
111
|
}
|
|
223
|
-
return
|
|
224
|
-
// If enqueue has been called before, then we want to wait until
|
|
225
|
-
// all previous Promises have been resolved before calling invoke,
|
|
226
|
-
// so that results are always delivered in the correct order. If
|
|
227
|
-
// enqueue has not been called before, then it is important to
|
|
228
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
229
|
-
// so that the async generator function has the opportunity to do
|
|
230
|
-
// any necessary setup in a predictable way. This predictability
|
|
231
|
-
// is why the Promise constructor synchronously invokes its
|
|
232
|
-
// executor callback, and why async functions synchronously
|
|
233
|
-
// execute code before the first await. Since we implement simple
|
|
234
|
-
// async functions in terms of async generators, it is especially
|
|
235
|
-
// important to get this right, even though it requires care.
|
|
236
|
-
previousPromise ? previousPromise.then(callInvokeWithMethodAndArg,
|
|
237
|
-
// Avoid propagating failures to Promises returned by later
|
|
238
|
-
// invocations of the iterator.
|
|
239
|
-
callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
112
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
240
113
|
}
|
|
241
|
-
|
|
242
|
-
// Define the unified helper method that is used to implement .next,
|
|
243
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
244
|
-
this._invoke = enqueue;
|
|
245
|
-
}
|
|
246
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
247
|
-
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
248
|
-
return this;
|
|
249
114
|
});
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
if (state === GenStateCompleted) {
|
|
270
|
-
if (method === "throw") {
|
|
271
|
-
throw arg;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
275
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
276
|
-
return doneResult();
|
|
277
|
-
}
|
|
278
|
-
context.method = method;
|
|
279
|
-
context.arg = arg;
|
|
280
|
-
while (true) {
|
|
281
|
-
var delegate = context.delegate;
|
|
282
|
-
if (delegate) {
|
|
283
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
284
|
-
if (delegateResult) {
|
|
285
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
286
|
-
return delegateResult;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
if (context.method === "next") {
|
|
290
|
-
// Setting context._sent for legacy support of Babel's
|
|
291
|
-
// function.sent implementation.
|
|
292
|
-
context.sent = context._sent = context.arg;
|
|
293
|
-
} else if (context.method === "throw") {
|
|
294
|
-
if (state === GenStateSuspendedStart) {
|
|
295
|
-
state = GenStateCompleted;
|
|
296
|
-
throw context.arg;
|
|
297
|
-
}
|
|
298
|
-
context.dispatchException(context.arg);
|
|
299
|
-
} else if (context.method === "return") {
|
|
300
|
-
context.abrupt("return", context.arg);
|
|
301
|
-
}
|
|
302
|
-
state = GenStateExecuting;
|
|
303
|
-
var record = tryCatch(innerFn, self, context);
|
|
304
|
-
if (record.type === "normal") {
|
|
305
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
306
|
-
// GenStateExecuting and loop back for another invocation.
|
|
307
|
-
state = context.done ? GenStateCompleted : GenStateSuspendedYield;
|
|
308
|
-
if (record.arg === ContinueSentinel) {
|
|
309
|
-
continue;
|
|
310
|
-
}
|
|
311
|
-
return {
|
|
312
|
-
value: record.arg,
|
|
313
|
-
done: context.done
|
|
314
|
-
};
|
|
315
|
-
} else if (record.type === "throw") {
|
|
316
|
-
state = GenStateCompleted;
|
|
317
|
-
// Dispatch the exception by looping back around to the
|
|
318
|
-
// context.dispatchException(context.arg) call above.
|
|
319
|
-
context.method = "throw";
|
|
320
|
-
context.arg = record.arg;
|
|
115
|
+
}
|
|
116
|
+
function makeInvokeMethod(e, r, n) {
|
|
117
|
+
var o = h;
|
|
118
|
+
return function (i, a) {
|
|
119
|
+
if (o === f) throw new Error("Generator is already running");
|
|
120
|
+
if (o === s) {
|
|
121
|
+
if ("throw" === i) throw a;
|
|
122
|
+
return {
|
|
123
|
+
value: t,
|
|
124
|
+
done: !0
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
for (n.method = i, n.arg = a;;) {
|
|
128
|
+
var c = n.delegate;
|
|
129
|
+
if (c) {
|
|
130
|
+
var u = maybeInvokeDelegate(c, n);
|
|
131
|
+
if (u) {
|
|
132
|
+
if (u === y) continue;
|
|
133
|
+
return u;
|
|
321
134
|
}
|
|
322
135
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
context.delegate = null;
|
|
336
|
-
if (context.method === "throw") {
|
|
337
|
-
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
338
|
-
if (delegate.iterator["return"]) {
|
|
339
|
-
// If the delegate iterator has a return method, give it a
|
|
340
|
-
// chance to clean up.
|
|
341
|
-
context.method = "return";
|
|
342
|
-
context.arg = undefined$1;
|
|
343
|
-
maybeInvokeDelegate(delegate, context);
|
|
344
|
-
if (context.method === "throw") {
|
|
345
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
346
|
-
// "return" to "throw", let that override the TypeError below.
|
|
347
|
-
return ContinueSentinel;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
context.method = "throw";
|
|
351
|
-
context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
136
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
137
|
+
if (o === h) throw o = s, n.arg;
|
|
138
|
+
n.dispatchException(n.arg);
|
|
139
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
140
|
+
o = f;
|
|
141
|
+
var p = tryCatch(e, r, n);
|
|
142
|
+
if ("normal" === p.type) {
|
|
143
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
144
|
+
return {
|
|
145
|
+
value: p.arg,
|
|
146
|
+
done: n.done
|
|
147
|
+
};
|
|
352
148
|
}
|
|
353
|
-
|
|
149
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
354
150
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function maybeInvokeDelegate(e, r) {
|
|
154
|
+
var n = r.method,
|
|
155
|
+
o = e.iterator[n];
|
|
156
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
157
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
158
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
159
|
+
var a = i.arg;
|
|
160
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
161
|
+
}
|
|
162
|
+
function pushTryEntry(t) {
|
|
163
|
+
var e = {
|
|
164
|
+
tryLoc: t[0]
|
|
165
|
+
};
|
|
166
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
167
|
+
}
|
|
168
|
+
function resetTryEntry(t) {
|
|
169
|
+
var e = t.completion || {};
|
|
170
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
171
|
+
}
|
|
172
|
+
function Context(t) {
|
|
173
|
+
this.tryEntries = [{
|
|
174
|
+
tryLoc: "root"
|
|
175
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
176
|
+
}
|
|
177
|
+
function values(e) {
|
|
178
|
+
if (e || "" === e) {
|
|
179
|
+
var r = e[a];
|
|
180
|
+
if (r) return r.call(e);
|
|
181
|
+
if ("function" == typeof e.next) return e;
|
|
182
|
+
if (!isNaN(e.length)) {
|
|
183
|
+
var o = -1,
|
|
184
|
+
i = function next() {
|
|
185
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
186
|
+
return next.value = t, next.done = !0, next;
|
|
187
|
+
};
|
|
188
|
+
return i.next = i;
|
|
390
189
|
}
|
|
391
|
-
|
|
392
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
393
|
-
// the outer generator.
|
|
394
|
-
context.delegate = null;
|
|
395
|
-
return ContinueSentinel;
|
|
396
190
|
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
191
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
192
|
+
}
|
|
193
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
194
|
+
value: GeneratorFunctionPrototype,
|
|
195
|
+
configurable: !0
|
|
196
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
197
|
+
value: GeneratorFunction,
|
|
198
|
+
configurable: !0
|
|
199
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
200
|
+
var e = "function" == typeof t && t.constructor;
|
|
201
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
202
|
+
}, e.mark = function (t) {
|
|
203
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
204
|
+
}, e.awrap = function (t) {
|
|
205
|
+
return {
|
|
206
|
+
__await: t
|
|
207
|
+
};
|
|
208
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
209
|
+
return this;
|
|
210
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
211
|
+
void 0 === i && (i = Promise);
|
|
212
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
213
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
214
|
+
return t.done ? t.value : a.next();
|
|
413
215
|
});
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
216
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
217
|
+
return this;
|
|
218
|
+
}), define(g, "toString", function () {
|
|
219
|
+
return "[object Generator]";
|
|
220
|
+
}), e.keys = function (t) {
|
|
221
|
+
var e = Object(t),
|
|
222
|
+
r = [];
|
|
223
|
+
for (var n in e) r.push(n);
|
|
224
|
+
return r.reverse(), function next() {
|
|
225
|
+
for (; r.length;) {
|
|
226
|
+
var t = r.pop();
|
|
227
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
424
228
|
}
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
function resetTryEntry(entry) {
|
|
428
|
-
var record = entry.completion || {};
|
|
429
|
-
record.type = "normal";
|
|
430
|
-
delete record.arg;
|
|
431
|
-
entry.completion = record;
|
|
432
|
-
}
|
|
433
|
-
function Context(tryLocsList) {
|
|
434
|
-
// The root entry object (effectively a try statement without a catch
|
|
435
|
-
// or a finally block) gives us a place to store values thrown from
|
|
436
|
-
// locations where there is no enclosing try statement.
|
|
437
|
-
this.tryEntries = [{
|
|
438
|
-
tryLoc: "root"
|
|
439
|
-
}];
|
|
440
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
441
|
-
this.reset(true);
|
|
442
|
-
}
|
|
443
|
-
exports.keys = function (object) {
|
|
444
|
-
var keys = [];
|
|
445
|
-
for (var key in object) {
|
|
446
|
-
keys.push(key);
|
|
447
|
-
}
|
|
448
|
-
keys.reverse();
|
|
449
|
-
|
|
450
|
-
// Rather than returning an object with a next method, we keep
|
|
451
|
-
// things simple and return the next function itself.
|
|
452
|
-
return function next() {
|
|
453
|
-
while (keys.length) {
|
|
454
|
-
var key = keys.pop();
|
|
455
|
-
if (key in object) {
|
|
456
|
-
next.value = key;
|
|
457
|
-
next.done = false;
|
|
458
|
-
return next;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
// To avoid creating an additional object, we just hang the .value
|
|
463
|
-
// and .done properties off the next function object itself. This
|
|
464
|
-
// also ensures that the minifier will not anonymize the function.
|
|
465
|
-
next.done = true;
|
|
466
|
-
return next;
|
|
467
|
-
};
|
|
229
|
+
return next.done = !0, next;
|
|
468
230
|
};
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
return next;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
next.value = undefined$1;
|
|
489
|
-
next.done = true;
|
|
490
|
-
return next;
|
|
491
|
-
};
|
|
492
|
-
return next.next = next;
|
|
493
|
-
}
|
|
231
|
+
}, e.values = values, Context.prototype = {
|
|
232
|
+
constructor: Context,
|
|
233
|
+
reset: function (e) {
|
|
234
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
235
|
+
},
|
|
236
|
+
stop: function () {
|
|
237
|
+
this.done = !0;
|
|
238
|
+
var t = this.tryEntries[0].completion;
|
|
239
|
+
if ("throw" === t.type) throw t.arg;
|
|
240
|
+
return this.rval;
|
|
241
|
+
},
|
|
242
|
+
dispatchException: function (e) {
|
|
243
|
+
if (this.done) throw e;
|
|
244
|
+
var r = this;
|
|
245
|
+
function handle(n, o) {
|
|
246
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
494
247
|
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
reset: function reset(skipTempReset) {
|
|
511
|
-
this.prev = 0;
|
|
512
|
-
this.next = 0;
|
|
513
|
-
// Resetting context._sent for legacy support of Babel's
|
|
514
|
-
// function.sent implementation.
|
|
515
|
-
this.sent = this._sent = undefined$1;
|
|
516
|
-
this.done = false;
|
|
517
|
-
this.delegate = null;
|
|
518
|
-
this.method = "next";
|
|
519
|
-
this.arg = undefined$1;
|
|
520
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
521
|
-
if (!skipTempReset) {
|
|
522
|
-
for (var name in this) {
|
|
523
|
-
// Not sure about the optimal order of these conditions:
|
|
524
|
-
if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
|
|
525
|
-
this[name] = undefined$1;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
stop: function stop() {
|
|
531
|
-
this.done = true;
|
|
532
|
-
var rootEntry = this.tryEntries[0];
|
|
533
|
-
var rootRecord = rootEntry.completion;
|
|
534
|
-
if (rootRecord.type === "throw") {
|
|
535
|
-
throw rootRecord.arg;
|
|
536
|
-
}
|
|
537
|
-
return this.rval;
|
|
538
|
-
},
|
|
539
|
-
dispatchException: function dispatchException(exception) {
|
|
540
|
-
if (this.done) {
|
|
541
|
-
throw exception;
|
|
542
|
-
}
|
|
543
|
-
var context = this;
|
|
544
|
-
function handle(loc, caught) {
|
|
545
|
-
record.type = "throw";
|
|
546
|
-
record.arg = exception;
|
|
547
|
-
context.next = loc;
|
|
548
|
-
if (caught) {
|
|
549
|
-
// If the dispatched exception was caught by a catch block,
|
|
550
|
-
// then let that catch block handle the exception normally.
|
|
551
|
-
context.method = "next";
|
|
552
|
-
context.arg = undefined$1;
|
|
553
|
-
}
|
|
554
|
-
return !!caught;
|
|
555
|
-
}
|
|
556
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
557
|
-
var entry = this.tryEntries[i];
|
|
558
|
-
var record = entry.completion;
|
|
559
|
-
if (entry.tryLoc === "root") {
|
|
560
|
-
// Exception thrown outside of any try block that could handle
|
|
561
|
-
// it, so set the completion value of the entire function to
|
|
562
|
-
// throw the exception.
|
|
563
|
-
return handle("end");
|
|
564
|
-
}
|
|
565
|
-
if (entry.tryLoc <= this.prev) {
|
|
566
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
567
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
568
|
-
if (hasCatch && hasFinally) {
|
|
569
|
-
if (this.prev < entry.catchLoc) {
|
|
570
|
-
return handle(entry.catchLoc, true);
|
|
571
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
572
|
-
return handle(entry.finallyLoc);
|
|
573
|
-
}
|
|
574
|
-
} else if (hasCatch) {
|
|
575
|
-
if (this.prev < entry.catchLoc) {
|
|
576
|
-
return handle(entry.catchLoc, true);
|
|
577
|
-
}
|
|
578
|
-
} else if (hasFinally) {
|
|
579
|
-
if (this.prev < entry.finallyLoc) {
|
|
580
|
-
return handle(entry.finallyLoc);
|
|
581
|
-
}
|
|
582
|
-
} else {
|
|
583
|
-
throw new Error("try statement without catch or finally");
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
abrupt: function abrupt(type, arg) {
|
|
589
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
590
|
-
var entry = this.tryEntries[i];
|
|
591
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
592
|
-
var finallyEntry = entry;
|
|
593
|
-
break;
|
|
248
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
249
|
+
var i = this.tryEntries[o],
|
|
250
|
+
a = i.completion;
|
|
251
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
252
|
+
if (i.tryLoc <= this.prev) {
|
|
253
|
+
var c = n.call(i, "catchLoc"),
|
|
254
|
+
u = n.call(i, "finallyLoc");
|
|
255
|
+
if (c && u) {
|
|
256
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
257
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
258
|
+
} else if (c) {
|
|
259
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
260
|
+
} else {
|
|
261
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
262
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
594
263
|
}
|
|
595
264
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
if (finallyEntry) {
|
|
605
|
-
this.method = "next";
|
|
606
|
-
this.next = finallyEntry.finallyLoc;
|
|
607
|
-
return ContinueSentinel;
|
|
608
|
-
}
|
|
609
|
-
return this.complete(record);
|
|
610
|
-
},
|
|
611
|
-
complete: function complete(record, afterLoc) {
|
|
612
|
-
if (record.type === "throw") {
|
|
613
|
-
throw record.arg;
|
|
614
|
-
}
|
|
615
|
-
if (record.type === "break" || record.type === "continue") {
|
|
616
|
-
this.next = record.arg;
|
|
617
|
-
} else if (record.type === "return") {
|
|
618
|
-
this.rval = this.arg = record.arg;
|
|
619
|
-
this.method = "return";
|
|
620
|
-
this.next = "end";
|
|
621
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
622
|
-
this.next = afterLoc;
|
|
623
|
-
}
|
|
624
|
-
return ContinueSentinel;
|
|
625
|
-
},
|
|
626
|
-
finish: function finish(finallyLoc) {
|
|
627
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
628
|
-
var entry = this.tryEntries[i];
|
|
629
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
630
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
631
|
-
resetTryEntry(entry);
|
|
632
|
-
return ContinueSentinel;
|
|
633
|
-
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
abrupt: function (t, e) {
|
|
268
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
269
|
+
var o = this.tryEntries[r];
|
|
270
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
271
|
+
var i = o;
|
|
272
|
+
break;
|
|
634
273
|
}
|
|
635
|
-
}
|
|
636
|
-
"
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
274
|
+
}
|
|
275
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
276
|
+
var a = i ? i.completion : {};
|
|
277
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
278
|
+
},
|
|
279
|
+
complete: function (t, e) {
|
|
280
|
+
if ("throw" === t.type) throw t.arg;
|
|
281
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
282
|
+
},
|
|
283
|
+
finish: function (t) {
|
|
284
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
285
|
+
var r = this.tryEntries[e];
|
|
286
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
catch: function (t) {
|
|
290
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
291
|
+
var r = this.tryEntries[e];
|
|
292
|
+
if (r.tryLoc === t) {
|
|
293
|
+
var n = r.completion;
|
|
294
|
+
if ("throw" === n.type) {
|
|
295
|
+
var o = n.arg;
|
|
296
|
+
resetTryEntry(r);
|
|
646
297
|
}
|
|
298
|
+
return o;
|
|
647
299
|
}
|
|
648
|
-
|
|
649
|
-
// The context.catch method must only be called with a location
|
|
650
|
-
// argument that corresponds to a known catch block.
|
|
651
|
-
throw new Error("illegal catch attempt");
|
|
652
|
-
},
|
|
653
|
-
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
|
654
|
-
this.delegate = {
|
|
655
|
-
iterator: values(iterable),
|
|
656
|
-
resultName: resultName,
|
|
657
|
-
nextLoc: nextLoc
|
|
658
|
-
};
|
|
659
|
-
if (this.method === "next") {
|
|
660
|
-
// Deliberately forget the last sent value so that we don't
|
|
661
|
-
// accidentally pass it on to the delegate.
|
|
662
|
-
this.arg = undefined$1;
|
|
663
|
-
}
|
|
664
|
-
return ContinueSentinel;
|
|
665
300
|
}
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
// If this script is executing as a CommonJS module, use module.exports
|
|
675
|
-
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
676
|
-
// object. Either way, the resulting object will be used to initialize
|
|
677
|
-
// the regeneratorRuntime variable at the top of this file.
|
|
678
|
-
module.exports );
|
|
679
|
-
try {
|
|
680
|
-
regeneratorRuntime = runtime;
|
|
681
|
-
} catch (accidentalStrictMode) {
|
|
682
|
-
// This module should not be running in strict mode, so the above
|
|
683
|
-
// assignment should always work unless something is misconfigured. Just
|
|
684
|
-
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
685
|
-
// we can explicitly access globalThis. In older engines we can escape
|
|
686
|
-
// strict mode using a global Function call. This could conceivably fail
|
|
687
|
-
// if a Content Security Policy forbids using Function, but in that case
|
|
688
|
-
// the proper solution is to fix the accidental strict mode problem. If
|
|
689
|
-
// you've misconfigured your bundler to force strict mode and applied a
|
|
690
|
-
// CSP to forbid Function, and you're not willing to fix either of those
|
|
691
|
-
// problems, please detail your unique predicament in a GitHub issue.
|
|
692
|
-
if (typeof globalThis === "object") {
|
|
693
|
-
globalThis.regeneratorRuntime = runtime;
|
|
694
|
-
} else {
|
|
695
|
-
Function("r", "regeneratorRuntime = r")(runtime);
|
|
301
|
+
throw new Error("illegal catch attempt");
|
|
302
|
+
},
|
|
303
|
+
delegateYield: function (e, r, n) {
|
|
304
|
+
return this.delegate = {
|
|
305
|
+
iterator: values(e),
|
|
306
|
+
resultName: r,
|
|
307
|
+
nextLoc: n
|
|
308
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
696
309
|
}
|
|
310
|
+
}, e;
|
|
311
|
+
}
|
|
312
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
313
|
+
try {
|
|
314
|
+
var info = gen[key](arg);
|
|
315
|
+
var value = info.value;
|
|
316
|
+
} catch (error) {
|
|
317
|
+
reject(error);
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
if (info.done) {
|
|
321
|
+
resolve(value);
|
|
322
|
+
} else {
|
|
323
|
+
Promise.resolve(value).then(_next, _throw);
|
|
697
324
|
}
|
|
698
|
-
}
|
|
325
|
+
}
|
|
326
|
+
function _asyncToGenerator(fn) {
|
|
327
|
+
return function () {
|
|
328
|
+
var self = this,
|
|
329
|
+
args = arguments;
|
|
330
|
+
return new Promise(function (resolve, reject) {
|
|
331
|
+
var gen = fn.apply(self, args);
|
|
332
|
+
function _next(value) {
|
|
333
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
334
|
+
}
|
|
335
|
+
function _throw(err) {
|
|
336
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
337
|
+
}
|
|
338
|
+
_next(undefined);
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
}
|
|
699
342
|
|
|
700
343
|
var filterParameters = [{
|
|
701
344
|
value: '==',
|
|
@@ -953,22 +596,20 @@ function SanityFetcher(_ref2) {
|
|
|
953
596
|
return acc;
|
|
954
597
|
}, []);
|
|
955
598
|
};
|
|
956
|
-
var allDataTypes = usePlasmicQueryData(JSON.stringify(creds) + "/SANITY_DOCTYPES", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
599
|
+
var allDataTypes = usePlasmicQueryData(JSON.stringify(creds) + "/SANITY_DOCTYPES", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
957
600
|
var sanity, resp;
|
|
958
|
-
return
|
|
959
|
-
while (1) {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
return _context.stop();
|
|
971
|
-
}
|
|
601
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
602
|
+
while (1) switch (_context.prev = _context.next) {
|
|
603
|
+
case 0:
|
|
604
|
+
sanity = makeSanityClient(creds);
|
|
605
|
+
_context.next = 3;
|
|
606
|
+
return sanity.fetch("*{_type}").then(filterUniqueDocTypes);
|
|
607
|
+
case 3:
|
|
608
|
+
resp = _context.sent;
|
|
609
|
+
return _context.abrupt("return", resp);
|
|
610
|
+
case 5:
|
|
611
|
+
case "end":
|
|
612
|
+
return _context.stop();
|
|
972
613
|
}
|
|
973
614
|
}, _callee);
|
|
974
615
|
})));
|
|
@@ -997,16 +638,14 @@ function SanityFetcher(_ref2) {
|
|
|
997
638
|
var _usePlasmicQueryData = usePlasmicQueryData(unfilteredQuery ? JSON.stringify({
|
|
998
639
|
fullQuery: unfilteredQuery,
|
|
999
640
|
creds: creds
|
|
1000
|
-
}) : null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
1001
|
-
return
|
|
1002
|
-
while (1) {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
return _context2.stop();
|
|
1009
|
-
}
|
|
641
|
+
}) : null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
642
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
643
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
644
|
+
case 0:
|
|
645
|
+
return _context2.abrupt("return", sanity.fetch(unfilteredQuery));
|
|
646
|
+
case 1:
|
|
647
|
+
case "end":
|
|
648
|
+
return _context2.stop();
|
|
1010
649
|
}
|
|
1011
650
|
}, _callee2);
|
|
1012
651
|
}))),
|
|
@@ -1043,21 +682,19 @@ function SanityFetcher(_ref2) {
|
|
|
1043
682
|
var _usePlasmicQueryData2 = usePlasmicQueryData(filteredQuery ? JSON.stringify({
|
|
1044
683
|
filteredQuery: filteredQuery,
|
|
1045
684
|
creds: creds
|
|
1046
|
-
}) : null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
|
685
|
+
}) : null, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
1047
686
|
var resp;
|
|
1048
|
-
return
|
|
1049
|
-
while (1) {
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
return _context3.stop();
|
|
1060
|
-
}
|
|
687
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
688
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
689
|
+
case 0:
|
|
690
|
+
_context3.next = 2;
|
|
691
|
+
return sanity.fetch(filteredQuery);
|
|
692
|
+
case 2:
|
|
693
|
+
resp = _context3.sent;
|
|
694
|
+
return _context3.abrupt("return", resp);
|
|
695
|
+
case 4:
|
|
696
|
+
case "end":
|
|
697
|
+
return _context3.stop();
|
|
1061
698
|
}
|
|
1062
699
|
}, _callee3);
|
|
1063
700
|
}))),
|
|
@@ -1067,7 +704,7 @@ function SanityFetcher(_ref2) {
|
|
|
1067
704
|
className: className
|
|
1068
705
|
}, "Please configure the Sanity provider with a valid projectId, dataset, and token (if necessary). Don't forget to add 'https://host.plasmicdev.com' as an authorized host on the CORS origins section of your project.");
|
|
1069
706
|
}
|
|
1070
|
-
setControlContextData == null
|
|
707
|
+
setControlContextData == null || setControlContextData({
|
|
1071
708
|
docTypes: docTypes
|
|
1072
709
|
});
|
|
1073
710
|
if (!groq && !docType) {
|
|
@@ -1111,7 +748,7 @@ function SanityFetcher(_ref2) {
|
|
|
1111
748
|
}];
|
|
1112
749
|
}
|
|
1113
750
|
});
|
|
1114
|
-
setControlContextData == null
|
|
751
|
+
setControlContextData == null || setControlContextData({
|
|
1115
752
|
queryOptions: operators,
|
|
1116
753
|
docTypes: docTypes,
|
|
1117
754
|
sanityFields: sanityFields[0]
|
|
@@ -1199,7 +836,7 @@ function SanityField(_ref6) {
|
|
|
1199
836
|
var value = get(item, field);
|
|
1200
837
|
return typeof value !== "object" || value._type === "image";
|
|
1201
838
|
});
|
|
1202
|
-
setControlContextData == null
|
|
839
|
+
setControlContextData == null || setControlContextData({
|
|
1203
840
|
fields: displayableFields,
|
|
1204
841
|
isImage: false
|
|
1205
842
|
});
|
|
@@ -1210,7 +847,7 @@ function SanityField(_ref6) {
|
|
|
1210
847
|
path = field;
|
|
1211
848
|
}
|
|
1212
849
|
var data = get(item, path);
|
|
1213
|
-
setControlContextData == null
|
|
850
|
+
setControlContextData == null || setControlContextData({
|
|
1214
851
|
fields: displayableFields,
|
|
1215
852
|
isImage: (data == null ? void 0 : data._type) == "image"
|
|
1216
853
|
});
|