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