PageSourceSearch

https://minhaescola.app/js/chunk-vendors~caa00a0d.6275bd0d.js

js minhaescola.app collected 2026-10-02 01:15:45 UTC 14,540 bytes, 594 lines download raw bytes

1(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-vendors~caa00a0d"],{
2
3/***/ "53a3":
4/***/ (function(module, exports, __webpack_require__) {
5
6/*
7  Module dependencies
8*/
9
10var parse = __webpack_require__("72ce"),
11    isHtml = __webpack_require__("4a1c").isHtml,
12    _ = {
13      extend: __webpack_require__("971f"),
14      bind: __webpack_require__("fe69"),
15      forEach: __webpack_require__("aa6f"),
16      defaults: __webpack_require__("13ca")
17    };
18
19/*
20 * The API
21 */
22
23var api = [
24  __webpack_require__("7703"),
25  __webpack_require__("f84c"),
26  __webpack_require__("9db9"),
27  __webpack_require__("65cd"),
28  __webpack_require__("9459")
29];
30
31/*
32 * Instance of cheerio
33 */
34
35var Cheerio = module.exports = function(selector, context, root, options) {
36  if (!(this instanceof Cheerio)) return new Cheerio(selector, context, root, options);
37
38  this.options = _.defaults(options || {}, this.options);
39
40  // $(), $(null), $(undefined), $(false)
41  if (!selector) return this;
42
43  if (root) {
44    if (typeof root === 'string') root = parse(root, this.options);
45    this._root = Cheerio.call(this, root);
46  }
47
48  // $($)
49  if (selector.cheerio) return selector;
50
51  // $(dom)
52  if (isNode(selector))
53    selector = [selector];
54
55  // $([dom])
56  if (Array.isArray(selector)) {
57    _.forEach(selector, _.bind(function(elem, idx) {
58      this[idx] = elem;
59    }, this));
60    this.length = selector.length;
61    return this;
62  }
63
64  // $(<html>)
65  if (typeof selector === 'string' && isHtml(selector)) {
66    return Cheerio.call(this, parse(selector, this.options).children);
67  }
68
69  // If we don't have a context, maybe we have a root, from loading
70  if (!context) {
71    context = this._root;
72  } else if (typeof context === 'string') {
73    if (isHtml(context)) {
74      // $('li', '<ul>...</ul>')
75      context = parse(context, this.options);
76      context = Cheerio.call(this, context);
77    } else {
78      // $('li', 'ul')
79      selector = [context, selector].join(' ');
80      context = this._root;
81    }
82  // $('li', node), $('li', [nodes])
83  } else if (!context.cheerio) {
84    context = Cheerio.call(this, context);
85  }
86
87  // If we still don't have a context, return
88  if (!context) return this;
89
90  // #id, .class, tag
91  return context.find(selector);
92};
93
94/**
95 * Mix in `static`
96 */
97
98_.extend(Cheerio, __webpack_require__("d116"));
99
100/*
101 * Set a signature of the object
102 */
103
104Cheerio.prototype.cheerio = '[cheerio object]';
105
106/*
107 * Cheerio default options
108 */
109
110Cheerio.prototype.options = {
111  withDomLvl1: true,
112  normalizeWhitespace: false,
113  xmlMode: false,
114  decodeEntities: true
115};
116
117/*
118 * Make cheerio an array-like object
119 */
120
121Cheerio.prototype.length = 0;
122Cheerio.prototype.splice = Array.prototype.splice;
123
124/*
125 * Make a cheerio object
126 *
127 * @api private
128 */
129
130Cheerio.prototype._make = function(dom, context) {
131  var cheerio = new this.constructor(dom, context, this._root, this.options);
132  cheerio.prevObject = this;
133  return cheerio;
134};
135
136/**
137 * Turn a cheerio object into an array
138 */
139
140Cheerio.prototype.toArray = function() {
141  return this.get();
142};
143
144/**
145 * Plug in the API
146 */
147api.forEach(function(mod) {
148  _.extend(Cheerio.prototype, mod);
149});
150
151var isNode = function(obj) {
152  return obj.name || obj.type === 'text' || obj.type === 'comment';
153};
154
155
156/***/ }),
157
158/***/ "f84c":
159/***/ (function(module, exports, __webpack_require__) {
160
161var select = __webpack_require__("7909"),
162    utils = __webpack_require__("4a1c"),
163    domEach = utils.domEach,
164    uniqueSort = __webpack_require__("852e").DomUtils.uniqueSort,
165    isTag = utils.isTag,
166    _ = {
167      bind: __webpack_require__("fe69"),
168      forEach: __webpack_require__("aa6f"),
169      reject: __webpack_require__("0db4"),
170      filter: __webpack_require__("d76b"),
171      reduce: __webpack_require__("4840e")
172    };
173
174exports.find = function(selectorOrHaystack) {
175  var elems = _.reduce(this, function(memo, elem) {
176    return memo.concat(_.filter(elem.children, isTag));
177  }, []);
178  var contains = this.constructor.contains;
179  var haystack;
180
181  if (selectorOrHaystack && typeof selectorOrHaystack !== 'string') {
182    if (selectorOrHaystack.cheerio) {
183      haystack = selectorOrHaystack.get();
184    } else {
185      haystack = [selectorOrHaystack];
186    }
187
188    return this._make(haystack.filter(function(elem) {
189      var idx, len;
190      for (idx = 0, len = this.length; idx < len; ++idx) {
191        if (contains(this[idx], elem)) {
192          return true;
193        }
194      }
195    }, this));
196  }
197
198  var options = {__proto__: this.options, context: this.toArray()};
199
200  return this._make(select(selectorOrHaystack, elems, options));
201};
202
203// Get the parent of each element in the current set of matched elements,
204// optionally filtered by a selector.
205exports.parent = function(selector) {
206  var set = [];
207
208  domEach(this, function(idx, elem) {
209    var parentElem = elem.parent;
210    if (parentElem && set.indexOf(parentElem) < 0) {
211      set.push(parentElem);
212    }
213  });
214
215  if (arguments.length) {
216    set = exports.filter.call(set, selector, this);
217  }
218
219  return this._make(set);
220};
221
222exports.parents = function(selector) {
223  var parentNodes = [];
224
225  // When multiple DOM elements are in the original set, the resulting set will
226  // be in *reverse* order of the original elements as well, with duplicates
227  // removed.
228  this.get().reverse().forEach(function(elem) {
229    traverseParents(this, elem.parent, selector, Infinity)
230      .forEach(function(node) {
231        if (parentNodes.indexOf(node) === -1) {
232          parentNodes.push(node);
233        }
234      }
235    );
236  }, this);
237
238  return this._make(parentNodes);
239};
240
241exports.parentsUntil = function(selector, filter) {
242  var parentNodes = [], untilNode, untilNodes;
243
244  if (typeof selector === 'string') {
245    untilNode = select(selector, this.parents().toArray(), this.options)[0];
246  } else if (selector && selector.cheerio) {
247    untilNodes = selector.toArray();
248  } else if (selector) {
249    untilNode = selector;
250  }
251
252  // When multiple DOM elements are in the original set, the resulting set will
253  // be in *reverse* order of the original elements as well, with duplicates
254  // removed.
255
256  this.toArray().reverse().forEach(function(elem) {
257    while ((elem = elem.parent)) {
258      if ((untilNode && elem !== untilNode) ||
259        (untilNodes && untilNodes.indexOf(elem) === -1) ||
260        (!untilNode && !untilNodes)) {
261        if (isTag(elem) && parentNodes.indexOf(elem) === -1) { parentNodes.push(elem); }
262      } else {
263        break;
264      }
265    }
266  }, this);
267
268  return this._make(filter ? select(filter, parentNodes, this.options) : parentNodes);
269};
270
271// For each element in the set, get the first element that matches the selector
272// by testing the element itself and traversing up through its ancestors in the
273// DOM tree.
274exports.closest = function(selector) {
275  var set = [];
276
277  if (!selector) {
278    return this._make(set);
279  }
280
281  domEach(this, function(idx, elem) {
282    var closestElem = traverseParents(this, elem, selector, 1)[0];
283
284    // Do not add duplicate elements to the set
285    if (closestElem && set.indexOf(closestElem) < 0) {
286      set.push(closestElem);
287    }
288  }.bind(this));
289
290  return this._make(set);
291};
292
293exports.next = function(selector) {
294  if (!this[0]) { return this; }
295  var elems = [];
296
297  _.forEach(this, function(elem) {
298    while ((elem = elem.next)) {
299      if (isTag(elem)) {
300        elems.push(elem);
301        return;
302      }
303    }
304  });
305
306  return selector ?
307    exports.filter.call(elems, selector, this) :
308    this._make(elems);
309};
310
311exports.nextAll = function(selector) {
312  if (!this[0]) { return this; }
313  var elems = [];
314
315  _.forEach(this, function(elem) {
316    while ((elem = elem.next)) {
317      if (isTag(elem) && elems.indexOf(elem) === -1) {
318        elems.push(elem);
319      }
320    }
321  });
322
323  return selector ?
324    exports.filter.call(elems, selector, this) :
325    this._make(elems);
326};
327
328exports.nextUntil = function(selector, filterSelector) {
329  if (!this[0]) { return this; }
330  var elems = [], untilNode, untilNodes;
331
332  if (typeof selector === 'string') {
333    untilNode = select(selector, this.nextAll().get(), this.options)[0];
334  } else if (selector && selector.cheerio) {
335    untilNodes = selector.get();
336  } else if (selector) {
337    untilNode = selector;
338  }
339
340  _.forEach(this, function(elem) {
341    while ((elem = elem.next)) {
342      if ((untilNode && elem !== untilNode) ||
343        (untilNodes && untilNodes.indexOf(elem) === -1) ||
344        (!untilNode && !untilNodes)) {
345        if (isTag(elem) && elems.indexOf(elem) === -1) {
346          elems.push(elem);
347        }
348      } else {
349        break;
350      }
351    }
352  });
353
354  return filterSelector ?
355    exports.filter.call(elems, filterSelector, this) :
356    this._make(elems);
357};
358
359exports.prev = function(selector) {
360  if (!this[0]) { return this; }
361  var elems = [];
362
363  _.forEach(this, function(elem) {
364    while ((elem = elem.prev)) {
365      if (isTag(elem)) {
366        elems.push(elem);
367        return;
368      }
369    }
370  });
371
372  return selector ?
373    exports.filter.call(elems, selector, this) :
374    this._make(elems);
375};
376
377exports.prevAll = function(selector) {
378  if (!this[0]) { return this; }
379  var elems = [];
380
381  _.forEach(this, function(elem) {
382    while ((elem = elem.prev)) {
383      if (isTag(elem) && elems.indexOf(elem) === -1) {
384        elems.push(elem);
385      }
386    }
387  });
388
389  return selector ?
390    exports.filter.call(elems, selector, this) :
391    this._make(elems);
392};
393
394exports.prevUntil = function(selector, filterSelector) {
395  if (!this[0]) { return this; }
396  var elems = [], untilNode, untilNodes;
397
398  if (typeof selector === 'string') {
399    untilNode = select(selector, this.prevAll().get(), this.options)[0];
400  } else if (selector && selector.cheerio) {
401    untilNodes = selector.get();
402  } else if (selector) {
403    untilNode = selector;
404  }
405
406  _.forEach(this, function(elem) {
407    while ((elem = elem.prev)) {
408      if ((untilNode && elem !== untilNode) ||
409        (untilNodes && untilNodes.indexOf(elem) === -1) ||
410        (!untilNode && !untilNodes)) {
411        if (isTag(elem) && elems.indexOf(elem) === -1) {
412          elems.push(elem);
413        }
414      } else {
415        break;
416      }
417    }
418  });
419
420  return filterSelector ?
421    exports.filter.call(elems, filterSelector, this) :
422    this._make(elems);
423};
424
425exports.siblings = function(selector) {
426  var parent = this.parent();
427
428  var elems = _.filter(
429    parent ? parent.children() : this.siblingsAndMe(),
430    _.bind(function(elem) { return isTag(elem) && !this.is(elem); }, this)
431  );
432
433  if (selector !== undefined) {
434    return exports.filter.call(elems, selector, this);
435  } else {
436    return this._make(elems);
437  }
438};
439
440exports.children = function(selector) {
441
442  var elems = _.reduce(this, function(memo, elem) {
443    return memo.concat(_.filter(elem.children, isTag));
444  }, []);
445
446  if (selector === undefined) return this._make(elems);
447
448  return exports.filter.call(elems, selector, this);
449};
450
451exports.contents = function() {
452  return this._make(_.reduce(this, function(all, elem) {
453    all.push.apply(all, elem.children);
454    return all;
455  }, []));
456};
457
458exports.each = function(fn) {
459  var i = 0, len = this.length;
460  while (i < len && fn.call(this[i], i, this[i]) !== false) ++i;
461  return this;
462};
463
464exports.map = function(fn) {
465  return this._make(_.reduce(this, function(memo, el, i) {
466    var val = fn.call(el, i, el);
467    return val == null ? memo : memo.concat(val);
468  }, []));
469};
470
471var makeFilterMethod = function(filterFn) {
472  return function(match, container) {
473    var testFn;
474    container = container || this;
475
476    if (typeof match === 'string') {
477      testFn = select.compile(match, container.options);
478    } else if (typeof match === 'function') {
479      testFn = function(el, i) {
480        return match.call(el, i, el);
481      };
482    } else if (match.cheerio) {
483      testFn = match.is.bind(match);
484    } else {
485      testFn = function(el) {
486        return match === el;
487      };
488    }
489
490    return container._make(filterFn(this, testFn));
491  };
492};
493
494exports.filter = makeFilterMethod(_.filter);
495exports.not = makeFilterMethod(_.reject);
496
497exports.has = function(selectorOrHaystack) {
498  var that = this;
499  return exports.filter.call(this, function() {
500    return that._make(this).find(selectorOrHaystack).length > 0;
501  });
502};
503
504exports.first = function() {
505  return this.length > 1 ? this._make(this[0]) : this;
506};
507
508exports.last = function() {
509  return this.length > 1 ? this._make(this[this.length - 1]) : this;
510};
511
512// Reduce the set of matched elements to the one at the specified index.
513exports.eq = function(i) {
514  i = +i;
515
516  // Use the first identity optimization if possible
517  if (i === 0 && this.length <= 1) return this;
518
519  if (i < 0) i = this.length + i;
520  return this[i] ? this._make(this[i]) : this._make([]);
521};
522
523// Retrieve the DOM elements matched by the jQuery object.
524exports.get = function(i) {
525  if (i == null) {
526    return Array.prototype.slice.call(this);
527  } else {
528    return this[i < 0 ? (this.length + i) : i];
529  }
530};
531
532// Search for a given element from among the matched elements.
533exports.index = function(selectorOrNeedle) {
534  var $haystack, needle;
535
536  if (arguments.length === 0) {
537    $haystack = this.parent().children();
538    needle = this[0];
539  } else if (typeof selectorOrNeedle === 'string') {
540    $haystack = this._make(selectorOrNeedle);
541    needle = this[0];
542  } else {
543    $haystack = this;
544    needle = selectorOrNeedle.cheerio ? selectorOrNeedle[0] : selectorOrNeedle;
545  }
546
547  return $haystack.get().indexOf(needle);
548};
549
550exports.slice = function() {
551  return this._make([].slice.apply(this, arguments));
552};
553
554function traverseParents(self, elem, selector, limit) {
555  var elems = [];
556  while (elem && elems.length < limit) {
557    if (!selector || exports.filter.call([elem], selector, self).length) {
558      elems.push(elem);
559    }
560    elem = elem.parent;
561  }
562  return elems;
563}
564
565// End the most recent filtering operation in the current chain and return the
566// set of matched elements to its previous state.
567exports.end = function() {
568  return this.prevObject || this._make([]);
569};
570
571exports.add = function(other, context) {
572  var selection = this._make(other, context);
573  var contents = uniqueSort(selection.get().concat(this.get()));
574
575  for (var i = 0; i < contents.length; ++i) {
576    selection[i] = contents[i];
577  }
578  selection.length = contents.length;
579
580  return selection;
581};
582
583// Add the previous set of elements on the stack to the current set, optionally
584// filtered by a selector.
585exports.addBack = function(selector) {
586  return this.add(
587    arguments.length ? this.prevObject.filter(selector) : this.prevObject
588  );
589};
590
591
592/***/ })
593
594}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.