| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- module.exports = (function() {
- var __MODS__ = {};
- var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; };
- var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
- var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
- var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
- __DEFINE__(1765242269471, function(require, module, exports) {
-
-
- var GetIntrinsic = require('get-intrinsic');
- var callBound = require('call-bind/callBound');
- var inspect = require('object-inspect');
-
- var $TypeError = require('es-errors/type');
- var $WeakMap = GetIntrinsic('%WeakMap%', true);
- var $Map = GetIntrinsic('%Map%', true);
-
- var $weakMapGet = callBound('WeakMap.prototype.get', true);
- var $weakMapSet = callBound('WeakMap.prototype.set', true);
- var $weakMapHas = callBound('WeakMap.prototype.has', true);
- var $mapGet = callBound('Map.prototype.get', true);
- var $mapSet = callBound('Map.prototype.set', true);
- var $mapHas = callBound('Map.prototype.has', true);
-
- /*
- * This function traverses the list returning the node corresponding to the given key.
- *
- * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
- */
- /** @type {import('.').listGetNode} */
- var listGetNode = function (list, key) { // eslint-disable-line consistent-return
- /** @type {typeof list | NonNullable<(typeof list)['next']>} */
- var prev = list;
- /** @type {(typeof list)['next']} */
- var curr;
- for (; (curr = prev.next) !== null; prev = curr) {
- if (curr.key === key) {
- prev.next = curr.next;
- // eslint-disable-next-line no-extra-parens
- curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
- list.next = curr; // eslint-disable-line no-param-reassign
- return curr;
- }
- }
- };
-
- /** @type {import('.').listGet} */
- var listGet = function (objects, key) {
- var node = listGetNode(objects, key);
- return node && node.value;
- };
- /** @type {import('.').listSet} */
- var listSet = function (objects, key, value) {
- var node = listGetNode(objects, key);
- if (node) {
- node.value = value;
- } else {
- // Prepend the new node to the beginning of the list
- objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
- key: key,
- next: objects.next,
- value: value
- });
- }
- };
- /** @type {import('.').listHas} */
- var listHas = function (objects, key) {
- return !!listGetNode(objects, key);
- };
-
- /** @type {import('.')} */
- module.exports = function getSideChannel() {
- /** @type {WeakMap<object, unknown>} */ var $wm;
- /** @type {Map<object, unknown>} */ var $m;
- /** @type {import('.').RootNode<unknown>} */ var $o;
-
- /** @type {import('.').Channel} */
- var channel = {
- assert: function (key) {
- if (!channel.has(key)) {
- throw new $TypeError('Side channel does not contain ' + inspect(key));
- }
- },
- get: function (key) { // eslint-disable-line consistent-return
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
- if ($wm) {
- return $weakMapGet($wm, key);
- }
- } else if ($Map) {
- if ($m) {
- return $mapGet($m, key);
- }
- } else {
- if ($o) { // eslint-disable-line no-lonely-if
- return listGet($o, key);
- }
- }
- },
- has: function (key) {
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
- if ($wm) {
- return $weakMapHas($wm, key);
- }
- } else if ($Map) {
- if ($m) {
- return $mapHas($m, key);
- }
- } else {
- if ($o) { // eslint-disable-line no-lonely-if
- return listHas($o, key);
- }
- }
- return false;
- },
- set: function (key, value) {
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
- if (!$wm) {
- $wm = new $WeakMap();
- }
- $weakMapSet($wm, key, value);
- } else if ($Map) {
- if (!$m) {
- $m = new $Map();
- }
- $mapSet($m, key, value);
- } else {
- if (!$o) {
- // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
- $o = { key: {}, next: null };
- }
- listSet($o, key, value);
- }
- }
- };
- return channel;
- };
-
- }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
- return __REQUIRE__(1765242269471);
- })()
- //miniprogram-npm-outsideDeps=["get-intrinsic","call-bind/callBound","object-inspect","es-errors/type"]
- //# sourceMappingURL=index.js.map
|