docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1,486 @@
module.exports = globSync
globSync.GlobSync = GlobSync
var rp = require('fs.realpath')
var minimatch = require('minimatch')
var Minimatch = minimatch.Minimatch
var Glob = require('./glob.js').Glob
var util = require('util')
var path = require('path')
var assert = require('assert')
var isAbsolute = require('path').isAbsolute
var common = require('./common.js')
var setopts = common.setopts
var ownProp = common.ownProp
var childrenIgnored = common.childrenIgnored
var isIgnored = common.isIgnored
function globSync (pattern, options) {
if (typeof options === 'function' || arguments.length === 3)
throw new TypeError('callback provided to sync glob\n'+
'See: https://github.com/isaacs/node-glob/issues/167')
return new GlobSync(pattern, options).found
}
function GlobSync (pattern, options) {
if (!pattern)
throw new Error('must provide pattern')
if (typeof options === 'function' || arguments.length === 3)
throw new TypeError('callback provided to sync glob\n'+
'See: https://github.com/isaacs/node-glob/issues/167')
if (!(this instanceof GlobSync))
return new GlobSync(pattern, options)
setopts(this, pattern, options)
if (this.noprocess)
return this
var n = this.minimatch.set.length
this.matches = new Array(n)
for (var i = 0; i < n; i ++) {
this._process(this.minimatch.set[i], i, false)
}
this._finish()
}
GlobSync.prototype._finish = function () {
assert.ok(this instanceof GlobSync)
if (this.realpath) {
var self = this
this.matches.forEach(function (matchset, index) {
var set = self.matches[index] = Object.create(null)
for (var p in matchset) {
try {
p = self._makeAbs(p)
var real = rp.realpathSync(p, self.realpathCache)
set[real] = true
} catch (er) {
if (er.syscall === 'stat')
set[self._makeAbs(p)] = true
else
throw er
}
}
})
}
common.finish(this)
}
GlobSync.prototype._process = function (pattern, index, inGlobStar) {
assert.ok(this instanceof GlobSync)
// Get the first [n] parts of pattern that are all strings.
var n = 0
while (typeof pattern[n] === 'string') {
n ++
}
// now n is the index of the first one that is *not* a string.
// See if there's anything else
var prefix
switch (n) {
// if not, then this is rather simple
case pattern.length:
this._processSimple(pattern.join('/'), index)
return
case 0:
// pattern *starts* with some non-trivial item.
// going to readdir(cwd), but not include the prefix in matches.
prefix = null
break
default:
// pattern has some string bits in the front.
// whatever it starts with, whether that's 'absolute' like /foo/bar,
// or 'relative' like '../baz'
prefix = pattern.slice(0, n).join('/')
break
}
var remain = pattern.slice(n)
// get the list of entries.
var read
if (prefix === null)
read = '.'
else if (isAbsolute(prefix) ||
isAbsolute(pattern.map(function (p) {
return typeof p === 'string' ? p : '[*]'
}).join('/'))) {
if (!prefix || !isAbsolute(prefix))
prefix = '/' + prefix
read = prefix
} else
read = prefix
var abs = this._makeAbs(read)
//if ignored, skip processing
if (childrenIgnored(this, read))
return
var isGlobStar = remain[0] === minimatch.GLOBSTAR
if (isGlobStar)
this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
else
this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
}
GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
var entries = this._readdir(abs, inGlobStar)
// if the abs isn't a dir, then nothing can match!
if (!entries)
return
// It will only match dot entries if it starts with a dot, or if
// dot is set. Stuff like @(.foo|.bar) isn't allowed.
var pn = remain[0]
var negate = !!this.minimatch.negate
var rawGlob = pn._glob
var dotOk = this.dot || rawGlob.charAt(0) === '.'
var matchedEntries = []
for (var i = 0; i < entries.length; i++) {
var e = entries[i]
if (e.charAt(0) !== '.' || dotOk) {
var m
if (negate && !prefix) {
m = !e.match(pn)
} else {
m = e.match(pn)
}
if (m)
matchedEntries.push(e)
}
}
var len = matchedEntries.length
// If there are no matched entries, then nothing matches.
if (len === 0)
return
// if this is the last remaining pattern bit, then no need for
// an additional stat *unless* the user has specified mark or
// stat explicitly. We know they exist, since readdir returned
// them.
if (remain.length === 1 && !this.mark && !this.stat) {
if (!this.matches[index])
this.matches[index] = Object.create(null)
for (var i = 0; i < len; i ++) {
var e = matchedEntries[i]
if (prefix) {
if (prefix.slice(-1) !== '/')
e = prefix + '/' + e
else
e = prefix + e
}
if (e.charAt(0) === '/' && !this.nomount) {
e = path.join(this.root, e)
}
this._emitMatch(index, e)
}
// This was the last one, and no stats were needed
return
}
// now test all matched entries as stand-ins for that part
// of the pattern.
remain.shift()
for (var i = 0; i < len; i ++) {
var e = matchedEntries[i]
var newPattern
if (prefix)
newPattern = [prefix, e]
else
newPattern = [e]
this._process(newPattern.concat(remain), index, inGlobStar)
}
}
GlobSync.prototype._emitMatch = function (index, e) {
if (isIgnored(this, e))
return
var abs = this._makeAbs(e)
if (this.mark)
e = this._mark(e)
if (this.absolute) {
e = abs
}
if (this.matches[index][e])
return
if (this.nodir) {
var c = this.cache[abs]
if (c === 'DIR' || Array.isArray(c))
return
}
this.matches[index][e] = true
if (this.stat)
this._stat(e)
}
GlobSync.prototype._readdirInGlobStar = function (abs) {
// follow all symlinked directories forever
// just proceed as if this is a non-globstar situation
if (this.follow)
return this._readdir(abs, false)
var entries
var lstat
var stat
try {
lstat = this.fs.lstatSync(abs)
} catch (er) {
if (er.code === 'ENOENT') {
// lstat failed, doesn't exist
return null
}
}
var isSym = lstat && lstat.isSymbolicLink()
this.symlinks[abs] = isSym
// If it's not a symlink or a dir, then it's definitely a regular file.
// don't bother doing a readdir in that case.
if (!isSym && lstat && !lstat.isDirectory())
this.cache[abs] = 'FILE'
else
entries = this._readdir(abs, false)
return entries
}
GlobSync.prototype._readdir = function (abs, inGlobStar) {
var entries
if (inGlobStar && !ownProp(this.symlinks, abs))
return this._readdirInGlobStar(abs)
if (ownProp(this.cache, abs)) {
var c = this.cache[abs]
if (!c || c === 'FILE')
return null
if (Array.isArray(c))
return c
}
try {
return this._readdirEntries(abs, this.fs.readdirSync(abs))
} catch (er) {
this._readdirError(abs, er)
return null
}
}
GlobSync.prototype._readdirEntries = function (abs, entries) {
// if we haven't asked to stat everything, then just
// assume that everything in there exists, so we can avoid
// having to stat it a second time.
if (!this.mark && !this.stat) {
for (var i = 0; i < entries.length; i ++) {
var e = entries[i]
if (abs === '/')
e = abs + e
else
e = abs + '/' + e
this.cache[e] = true
}
}
this.cache[abs] = entries
// mark and cache dir-ness
return entries
}
GlobSync.prototype._readdirError = function (f, er) {
// handle errors, and cache the information
switch (er.code) {
case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
case 'ENOTDIR': // totally normal. means it *does* exist.
var abs = this._makeAbs(f)
this.cache[abs] = 'FILE'
if (abs === this.cwdAbs) {
var error = new Error(er.code + ' invalid cwd ' + this.cwd)
error.path = this.cwd
error.code = er.code
throw error
}
break
case 'ENOENT': // not terribly unusual
case 'ELOOP':
case 'ENAMETOOLONG':
case 'UNKNOWN':
this.cache[this._makeAbs(f)] = false
break
default: // some unusual error. Treat as failure.
this.cache[this._makeAbs(f)] = false
if (this.strict)
throw er
if (!this.silent)
console.error('glob error', er)
break
}
}
GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
var entries = this._readdir(abs, inGlobStar)
// no entries means not a dir, so it can never have matches
// foo.txt/** doesn't match foo.txt
if (!entries)
return
// test without the globstar, and with every child both below
// and replacing the globstar.
var remainWithoutGlobStar = remain.slice(1)
var gspref = prefix ? [ prefix ] : []
var noGlobStar = gspref.concat(remainWithoutGlobStar)
// the noGlobStar pattern exits the inGlobStar state
this._process(noGlobStar, index, false)
var len = entries.length
var isSym = this.symlinks[abs]
// If it's a symlink, and we're in a globstar, then stop
if (isSym && inGlobStar)
return
for (var i = 0; i < len; i++) {
var e = entries[i]
if (e.charAt(0) === '.' && !this.dot)
continue
// these two cases enter the inGlobStar state
var instead = gspref.concat(entries[i], remainWithoutGlobStar)
this._process(instead, index, true)
var below = gspref.concat(entries[i], remain)
this._process(below, index, true)
}
}
GlobSync.prototype._processSimple = function (prefix, index) {
// XXX review this. Shouldn't it be doing the mounting etc
// before doing stat? kinda weird?
var exists = this._stat(prefix)
if (!this.matches[index])
this.matches[index] = Object.create(null)
// If it doesn't exist, then just mark the lack of results
if (!exists)
return
if (prefix && isAbsolute(prefix) && !this.nomount) {
var trail = /[\/\\]$/.test(prefix)
if (prefix.charAt(0) === '/') {
prefix = path.join(this.root, prefix)
} else {
prefix = path.resolve(this.root, prefix)
if (trail)
prefix += '/'
}
}
if (process.platform === 'win32')
prefix = prefix.replace(/\\/g, '/')
// Mark this as a match
this._emitMatch(index, prefix)
}
// Returns either 'DIR', 'FILE', or false
GlobSync.prototype._stat = function (f) {
var abs = this._makeAbs(f)
var needDir = f.slice(-1) === '/'
if (f.length > this.maxLength)
return false
if (!this.stat && ownProp(this.cache, abs)) {
var c = this.cache[abs]
if (Array.isArray(c))
c = 'DIR'
// It exists, but maybe not how we need it
if (!needDir || c === 'DIR')
return c
if (needDir && c === 'FILE')
return false
// otherwise we have to stat, because maybe c=true
// if we know it exists, but not what it is.
}
var exists
var stat = this.statCache[abs]
if (!stat) {
var lstat
try {
lstat = this.fs.lstatSync(abs)
} catch (er) {
if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
this.statCache[abs] = false
return false
}
}
if (lstat && lstat.isSymbolicLink()) {
try {
stat = this.fs.statSync(abs)
} catch (er) {
stat = lstat
}
} else {
stat = lstat
}
}
this.statCache[abs] = stat
var c = true
if (stat)
c = stat.isDirectory() ? 'DIR' : 'FILE'
this.cache[abs] = this.cache[abs] || c
if (needDir && c === 'FILE')
return false
return c
}
GlobSync.prototype._mark = function (p) {
return common.mark(this, p)
}
GlobSync.prototype._makeAbs = function (f) {
return common.makeAbs(this, f)
}
@@ -0,0 +1,77 @@
var Promise = require('any-promise')
var assert = require('assert')
module.exports = thenify
/**
* Turn async functions into promises
*
* @param {Function} fn
* @return {Function}
* @api public
*/
function thenify(fn, options) {
assert(typeof fn === 'function')
return createWrapper(fn, options)
}
/**
* Turn async functions into promises and backward compatible with callback
*
* @param {Function} fn
* @return {Function}
* @api public
*/
thenify.withCallback = function (fn, options) {
assert(typeof fn === 'function')
options = options || {}
options.withCallback = true
return createWrapper(fn, options)
}
function createCallback(resolve, reject, multiArgs) {
// default to true
if (multiArgs === undefined) multiArgs = true
return function(err, value) {
if (err) return reject(err)
var length = arguments.length
if (length <= 2 || !multiArgs) return resolve(value)
if (Array.isArray(multiArgs)) {
var values = {}
for (var i = 1; i < length; i++) values[multiArgs[i - 1]] = arguments[i]
return resolve(values)
}
var values = new Array(length - 1)
for (var i = 1; i < length; ++i) values[i - 1] = arguments[i]
resolve(values)
}
}
function createWrapper(fn, options) {
options = options || {}
var name = fn.name;
name = (name || '').replace(/\s|bound(?!$)/g, '')
var newFn = function () {
var self = this
var len = arguments.length
if (options.withCallback) {
var lastType = typeof arguments[len - 1]
if (lastType === 'function') return fn.apply(self, arguments)
}
var args = new Array(len + 1)
for (var i = 0; i < len; ++i) args[i] = arguments[i]
var lastIndex = i
return new Promise(function (resolve, reject) {
args[lastIndex] = createCallback(resolve, reject, options.multiArgs)
fn.apply(self, args)
})
}
Object.defineProperty(newFn, 'name', { value: name })
return newFn
}
@@ -0,0 +1,4 @@
function _arrayWithHoles(r) {
if (Array.isArray(r)) return r;
}
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,8 @@
import { PluginFunc } from 'dayjs'
declare const plugin: PluginFunc
export = plugin
declare module 'dayjs' {
export function updateLocale(localeName: string, customConfig: Record<string, unknown>): Record<string, unknown>
}
@@ -0,0 +1,226 @@
import { LongType, ScalarType } from "./reflection-info";
import { isOneofGroup } from "./oneof";
// noinspection JSMethodCanBeStatic
export class ReflectionTypeCheck {
constructor(info) {
var _a;
this.fields = (_a = info.fields) !== null && _a !== void 0 ? _a : [];
}
prepare() {
if (this.data)
return;
const req = [], known = [], oneofs = [];
for (let field of this.fields) {
if (field.oneof) {
if (!oneofs.includes(field.oneof)) {
oneofs.push(field.oneof);
req.push(field.oneof);
known.push(field.oneof);
}
}
else {
known.push(field.localName);
switch (field.kind) {
case "scalar":
case "enum":
if (!field.opt || field.repeat)
req.push(field.localName);
break;
case "message":
if (field.repeat)
req.push(field.localName);
break;
case "map":
req.push(field.localName);
break;
}
}
}
this.data = { req, known, oneofs: Object.values(oneofs) };
}
/**
* Is the argument a valid message as specified by the
* reflection information?
*
* Checks all field types recursively. The `depth`
* specifies how deep into the structure the check will be.
*
* With a depth of 0, only the presence of fields
* is checked.
*
* With a depth of 1 or more, the field types are checked.
*
* With a depth of 2 or more, the members of map, repeated
* and message fields are checked.
*
* Message fields will be checked recursively with depth - 1.
*
* The number of map entries / repeated values being checked
* is < depth.
*/
is(message, depth, allowExcessProperties = false) {
if (depth < 0)
return true;
if (message === null || message === undefined || typeof message != 'object')
return false;
this.prepare();
let keys = Object.keys(message), data = this.data;
// if a required field is missing in arg, this cannot be a T
if (keys.length < data.req.length || data.req.some(n => !keys.includes(n)))
return false;
if (!allowExcessProperties) {
// if the arg contains a key we dont know, this is not a literal T
if (keys.some(k => !data.known.includes(k)))
return false;
}
// "With a depth of 0, only the presence and absence of fields is checked."
// "With a depth of 1 or more, the field types are checked."
if (depth < 1) {
return true;
}
// check oneof group
for (const name of data.oneofs) {
const group = message[name];
if (!isOneofGroup(group))
return false;
if (group.oneofKind === undefined)
continue;
const field = this.fields.find(f => f.localName === group.oneofKind);
if (!field)
return false; // we found no field, but have a kind, something is wrong
if (!this.field(group[group.oneofKind], field, allowExcessProperties, depth))
return false;
}
// check types
for (const field of this.fields) {
if (field.oneof !== undefined)
continue;
if (!this.field(message[field.localName], field, allowExcessProperties, depth))
return false;
}
return true;
}
field(arg, field, allowExcessProperties, depth) {
let repeated = field.repeat;
switch (field.kind) {
case "scalar":
if (arg === undefined)
return field.opt;
if (repeated)
return this.scalars(arg, field.T, depth, field.L);
return this.scalar(arg, field.T, field.L);
case "enum":
if (arg === undefined)
return field.opt;
if (repeated)
return this.scalars(arg, ScalarType.INT32, depth);
return this.scalar(arg, ScalarType.INT32);
case "message":
if (arg === undefined)
return true;
if (repeated)
return this.messages(arg, field.T(), allowExcessProperties, depth);
return this.message(arg, field.T(), allowExcessProperties, depth);
case "map":
if (typeof arg != 'object' || arg === null)
return false;
if (depth < 2)
return true;
if (!this.mapKeys(arg, field.K, depth))
return false;
switch (field.V.kind) {
case "scalar":
return this.scalars(Object.values(arg), field.V.T, depth, field.V.L);
case "enum":
return this.scalars(Object.values(arg), ScalarType.INT32, depth);
case "message":
return this.messages(Object.values(arg), field.V.T(), allowExcessProperties, depth);
}
break;
}
return true;
}
message(arg, type, allowExcessProperties, depth) {
if (allowExcessProperties) {
return type.isAssignable(arg, depth);
}
return type.is(arg, depth);
}
messages(arg, type, allowExcessProperties, depth) {
if (!Array.isArray(arg))
return false;
if (depth < 2)
return true;
if (allowExcessProperties) {
for (let i = 0; i < arg.length && i < depth; i++)
if (!type.isAssignable(arg[i], depth - 1))
return false;
}
else {
for (let i = 0; i < arg.length && i < depth; i++)
if (!type.is(arg[i], depth - 1))
return false;
}
return true;
}
scalar(arg, type, longType) {
let argType = typeof arg;
switch (type) {
case ScalarType.UINT64:
case ScalarType.FIXED64:
case ScalarType.INT64:
case ScalarType.SFIXED64:
case ScalarType.SINT64:
switch (longType) {
case LongType.BIGINT:
return argType == "bigint";
case LongType.NUMBER:
return argType == "number" && !isNaN(arg);
default:
return argType == "string";
}
case ScalarType.BOOL:
return argType == 'boolean';
case ScalarType.STRING:
return argType == 'string';
case ScalarType.BYTES:
return arg instanceof Uint8Array;
case ScalarType.DOUBLE:
case ScalarType.FLOAT:
return argType == 'number' && !isNaN(arg);
default:
// case ScalarType.UINT32:
// case ScalarType.FIXED32:
// case ScalarType.INT32:
// case ScalarType.SINT32:
// case ScalarType.SFIXED32:
return argType == 'number' && Number.isInteger(arg);
}
}
scalars(arg, type, depth, longType) {
if (!Array.isArray(arg))
return false;
if (depth < 2)
return true;
if (Array.isArray(arg))
for (let i = 0; i < arg.length && i < depth; i++)
if (!this.scalar(arg[i], type, longType))
return false;
return true;
}
mapKeys(map, type, depth) {
let keys = Object.keys(map);
switch (type) {
case ScalarType.INT32:
case ScalarType.FIXED32:
case ScalarType.SFIXED32:
case ScalarType.SINT32:
case ScalarType.UINT32:
return this.scalars(keys.slice(0, depth).map(k => parseInt(k)), type, depth);
case ScalarType.BOOL:
return this.scalars(keys.slice(0, depth).map(k => k == 'true' ? true : k == 'false' ? false : k), type, depth);
default:
return this.scalars(keys, type, depth, LongType.STRING);
}
}
}
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC,GAED,gEAAgE;AAChE,gGAAgG;;;AAMhG,MAAM,sCAAgB;AAEtB,wEAAwE;AACxE,MAAM,oCAAc;IAClB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAK,SAAS;CACf;AAQM,MAAM;IAGX,cAAc,EAAU,EAAgB;QACtC,IAAI,iBAAiB,KAAK;QAC1B,IAAI,OAAO,IAAI,KAAK,KAAK,CAAC,AAAC,CAAA,KAAK,iBAAiB,CAAA,IAAK;QACtD,IAAI,aAAa,MAAO,CAAA,OAAO,CAAA,IAAK,KAAK,KAAK,CAAC,AAAC,CAAA,IAAI,OAAO,EAAC,IAAK;QACjE,IAAI,YAAY,iBAAiB;QACjC,IAAI,QAAQ,YAAY,MACpB,KAAK,KAAK,CAAC,YAAY,MACvB,KAAK,KAAK,CAAC,AAAC,CAAA,YAAY,CAAA,IAAK;QACjC,IAAI,MAAM,YAAY,iCAAW,CAAC,MAAM,GAAG;QAC3C,OAAO,IAAI,CAAA,GAAA,yCAAW,EAAE,IAAI,EAAE,MAAM,QAAQ,GAAG;IACjD;IAEA,YAAY,IAAqB,EAAU;QACzC,IAAI,KAAK,sCAAgB,IAAI,MAAO,CAAA,KAAK,IAAI,GAAG,CAAA,IAAK,KAAK,KAAK,CAAC,AAAC,CAAA,IAAI,KAAK,IAAI,GAAG,EAAC,IAAK;QACvF,MAAM,iCAAW,CAAC,KAAK,KAAK,GAAG,EAAE;QACjC,MAAM,KAAK,GAAG;QACd,OAAO;IACT;IAEA,kBAA0B;QACxB,OAAO;IACT;IAEA,eAAe,IAAqB,EAAU;QAC5C,IAAI,KAAK,KAAK,IAAI,GAChB,OAAO;QAGT,IAAI,KAAK,KAAK,IAAI,IAChB,OAAO;QAGT,IAAI,aAAa,CAAA,GAAA,yCAAE,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,MAAM;QAChD,OAAO,aAAa,KAAK;IAC3B;IAEA,UAAU;QACR,OAAO;YAAC;SAAK;IACf;IAEA,gBAAwB;QACtB,8CAA8C;QAC9C,mDAAmD;QACnD,OAAO;IACT;;aA9CA,aAAa;;AA+Cf","sources":["packages/@internationalized/date/src/calendars/PersianCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {mod} from '../utils';\n\nconst PERSIAN_EPOCH = 1948320;\n\n// Number of days from the start of the year to the start of each month.\nconst MONTH_START = [\n 0, // Farvardin\n 31, // Ordibehesht\n 62, // Khordad\n 93, // Tir\n 124, // Mordad\n 155, // Shahrivar\n 186, // Mehr\n 216, // Aban\n 246, // Azar\n 276, // Dey\n 306, // Bahman\n 336 // Esfand\n];\n\n/**\n * The Persian calendar is the main calendar used in Iran and Afghanistan. It has 12 months\n * in each year, the first 6 of which have 31 days, and the next 5 have 30 days. The 12th month\n * has either 29 or 30 days depending on whether it is a leap year. The Persian year starts\n * around the March equinox.\n */\nexport class PersianCalendar implements Calendar {\n identifier = 'persian';\n\n fromJulianDay(jd: number): CalendarDate {\n let daysSinceEpoch = jd - PERSIAN_EPOCH;\n let year = 1 + Math.floor((33 * daysSinceEpoch + 3) / 12053);\n let farvardin1 = 365 * (year - 1) + Math.floor((8 * year + 21) / 33);\n let dayOfYear = daysSinceEpoch - farvardin1;\n let month = dayOfYear < 216\n ? Math.floor(dayOfYear / 31)\n : Math.floor((dayOfYear - 6) / 30);\n let day = dayOfYear - MONTH_START[month] + 1;\n return new CalendarDate(this, year, month + 1, day);\n }\n\n toJulianDay(date: AnyCalendarDate): number {\n let jd = PERSIAN_EPOCH - 1 + 365 * (date.year - 1) + Math.floor((8 * date.year + 21) / 33);\n jd += MONTH_START[date.month - 1];\n jd += date.day;\n return jd;\n }\n\n getMonthsInYear(): number {\n return 12;\n }\n\n getDaysInMonth(date: AnyCalendarDate): number {\n if (date.month <= 6) {\n return 31;\n }\n\n if (date.month <= 11) {\n return 30;\n }\n\n let isLeapYear = mod(25 * date.year + 11, 33) < 8;\n return isLeapYear ? 30 : 29;\n }\n\n getEras() {\n return ['AP'];\n }\n\n getYearsInEra(): number {\n // 9378-10-10 persian is 9999-12-31 gregorian.\n // Round down to 9377 to set the maximum full year.\n return 9377;\n }\n}\n"],"names":[],"version":3,"file":"PersianCalendar.module.js.map"}
@@ -0,0 +1,109 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.0.4](https://github.com/es-shims/globalThis/compare/v1.0.3...v1.0.4) - 2024-04-29
### Commits
- [actions] remove redundant finisher [`280d796`](https://github.com/es-shims/globalThis/commit/280d796f7cd61da47c026d8ec8dd88015d4ed95f)
- [Refactor] use `gopd` [`0209ccb`](https://github.com/es-shims/globalThis/commit/0209ccb2cd95b785e7e8868fab035cdc87216b58)
- [actions] update rebase action to use reusable workflow [`c08aea6`](https://github.com/es-shims/globalThis/commit/c08aea6240c3747cbc3e5f4d7c3eb740ec4f0627)
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`f38f2af`](https://github.com/es-shims/globalThis/commit/f38f2af14797abbe466b428f0ce74843c43746d7)
- [Dev Deps] update `aud`, `tape` [`a1be102`](https://github.com/es-shims/globalThis/commit/a1be102c91da38830a45804de6a0582f752fe53f)
- [Deps] update `define-properties` [`3e41644`](https://github.com/es-shims/globalThis/commit/3e416444f87350a6df70bf778e95eb713c3011e6)
- [Deps] update `define-properties` [`3d81f70`](https://github.com/es-shims/globalThis/commit/3d81f7048ce35285e3e719b1f53fba02516e9811)
- [Dev Deps] add missing `npmignore` dep [`c2d00f7`](https://github.com/es-shims/globalThis/commit/c2d00f70d4c11cb2f035c398cb560db9677b6dc6)
## [v1.0.3](https://github.com/es-shims/globalThis/compare/v1.0.2...v1.0.3) - 2022-05-07
### Commits
- [actions] reuse common workflows [`65891e4`](https://github.com/es-shims/globalThis/commit/65891e4d285ae04e216ff01160cff861e0e41a4f)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`82f8481`](https://github.com/es-shims/globalThis/commit/82f84815027f666f625e1ccb41f723800a05d016)
- [meta] use `npmignore` to autogenerate an npmignore file [`53afc39`](https://github.com/es-shims/globalThis/commit/53afc39bfd3eb262c5e6e9dfd25e4f81f3578c1c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`03169d4`](https://github.com/es-shims/globalThis/commit/03169d4254c9ef177d6537becca5b0b56df50d91)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`4986e3e`](https://github.com/es-shims/globalThis/commit/4986e3e20c5f664601871a0fac68c1efd0a68472)
- [actions] update codecov uploader [`15c4b06`](https://github.com/es-shims/globalThis/commit/15c4b062b1a9434dbec93604ed31b6893d11d458)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`8b04a74`](https://github.com/es-shims/globalThis/commit/8b04a749d3cb2f825920beb700899f0c13ad2fb8)
- [Fix] `globalThis` should be writable [`8759985`](https://github.com/es-shims/globalThis/commit/87599852d5f91e2e1f06e424cdefcd443ec98476)
- [readme] add github actions/codecov badges [`0263f0d`](https://github.com/es-shims/globalThis/commit/0263f0debfa982b928fcd301b11fe3e3193bf33d)
- [Dev Deps] update `aud`, `eslint`, `tape` [`e88d296`](https://github.com/es-shims/globalThis/commit/e88d296bb026633bdd1be2e1542903a5d0107cd8)
- [meta] use `prepublishOnly` script for npm 7+ [`c81fde6`](https://github.com/es-shims/globalThis/commit/c81fde6a9e44345e56dada588e16db736809ddd9)
- [Tests] nycignore `dist` [`bde0c0d`](https://github.com/es-shims/globalThis/commit/bde0c0df46f684316ab414da1487a0cd2efe3eeb)
- [meta] gitignore coverage output [`79f73f8`](https://github.com/es-shims/globalThis/commit/79f73f8b0c1180567fba473f92c07d71efd4dd0b)
## [v1.0.2](https://github.com/es-shims/globalThis/compare/v1.0.1...v1.0.2) - 2021-02-22
### Commits
- [Tests] migrate tests to Github Actions [`a3f50f7`](https://github.com/es-shims/globalThis/commit/a3f50f77a392c0ffdaca18fb5881743b874d0a6f)
- [meta] do not publish github action workflow files [`eb5c787`](https://github.com/es-shims/globalThis/commit/eb5c7879317cd7f1fde52228660be8e779c9d4e3)
- [Tests] add `implementation` est; run `es-shim-api` in postlint; use `tape` runner [`c9dd792`](https://github.com/es-shims/globalThis/commit/c9dd792d492ec9744a5e5d5033e919b94d441bac)
- [Tests] fix native tests [`6b76dff`](https://github.com/es-shims/globalThis/commit/6b76dff3af3fe9bcd7b24d48c6ba55116169e840)
- [Tests] run `nyc` on all tests [`0407f79`](https://github.com/es-shims/globalThis/commit/0407f79f64bf9fc30111f3bf4dff7e4205331fb6)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape`, `browserify` [`b8cc020`](https://github.com/es-shims/globalThis/commit/b8cc020e5ecc2d5a5a5b4160aabc60cc42d50c03)
- [actions] add "Allow Edits" workflow [`e2854df`](https://github.com/es-shims/globalThis/commit/e2854df653667b16ff34a7a0a7b677231dfe2b02)
- [readme] remove travis badge [`262eb76`](https://github.com/es-shims/globalThis/commit/262eb76e4e0d3f2df354cc6aff1b18f50c7b147f)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`; add `safe-publish-latest` [`3c76883`](https://github.com/es-shims/globalThis/commit/3c7688325f6aa050afe3ed978e423e70974e4d3b)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`7276123`](https://github.com/es-shims/globalThis/commit/727612396262fc22275f44159ec5b39115dc359f)
- [actions] update workflows [`bcb0f42`](https://github.com/es-shims/globalThis/commit/bcb0f42c319cf19746e03a6667cf25d3e835f46e)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5485851`](https://github.com/es-shims/globalThis/commit/548585148e874d6eb0b0463526a88e8b64e7c5eb)
- [Dev Deps] update `auto-changelog`, `tape` [`6a01da3`](https://github.com/es-shims/globalThis/commit/6a01da3f321983d1970d793711d31cf8508ef94d)
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`7a07f4e`](https://github.com/es-shims/globalThis/commit/7a07f4ebc5580933b40bbe67f357632e0f7d5586)
- [meta] only run the build script in publish [`797e492`](https://github.com/es-shims/globalThis/commit/797e492519ed0bf6270537290e69ca0456790575)
- [meta] combine duplicate `prepublish` scripts [`92bbef0`](https://github.com/es-shims/globalThis/commit/92bbef0f91f6e91163186f68b5f5f1ffd26c479d)
- [Dev Deps] update `auto-changelog`; add `aud` [`be6dbec`](https://github.com/es-shims/globalThis/commit/be6dbecefddb40493c5568a2cbe83f74e2e0385f)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bfd54f8`](https://github.com/es-shims/globalThis/commit/bfd54f8388758e7dec618dc34956e7075a7c15f0)
- [Tests] only audit prod deps [`0f64b47`](https://github.com/es-shims/globalThis/commit/0f64b47acfa812affbacbe487fcb0f6c02eccc25)
## [v1.0.1](https://github.com/es-shims/globalThis/compare/v1.0.0...v1.0.1) - 2019-12-15
### Fixed
- [Refactor] only use `global` in node; only check browser globals in browsers [`#2`](https://github.com/es-shims/globalThis/issues/2)
### Commits
- [Tests] use shared travis-ci configs [`edb1cc9`](https://github.com/es-shims/globalThis/commit/edb1cc9d900a40e8c1732264b6e85d4f9760920c)
- [Tests] remove `jscs` [`1847ac2`](https://github.com/es-shims/globalThis/commit/1847ac2487e2c13cf8bf717211c6a93fe60831f9)
- [meta] add `auto-changelog` [`933c381`](https://github.com/es-shims/globalThis/commit/933c381083890965ac848d3da21ed9e910cc09cf)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `tape` [`93310bc`](https://github.com/es-shims/globalThis/commit/93310bc01ddacbe23a93b3022daebc9b6f6ae8c3)
- [actions] add automatic rebasing / merge commit blocking [`231dec5`](https://github.com/es-shims/globalThis/commit/231dec511c42e1509035d176e2451c55de20bfe7)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `covert`, `is`, `tape` [`e50c1f6`](https://github.com/es-shims/globalThis/commit/e50c1f6d2d45c66f53ffda471bbf62c08ed15c9b)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`4abd340`](https://github.com/es-shims/globalThis/commit/4abd3400fc8942963e77515d0cf2fbcac3cb7bc8)
- [meta] add `funding` field [`2d1f9eb`](https://github.com/es-shims/globalThis/commit/2d1f9eb00b2dea46f6de7d563b31db17f44f1899)
- [meta] remove unused deps [`5bd6bef`](https://github.com/es-shims/globalThis/commit/5bd6befefbaf0c7e6f70eb3c1919b5c5a271d29d)
- readme: Fix casing + phrasing [`66379cc`](https://github.com/es-shims/globalThis/commit/66379ccf5008f7676aac5f3dec1ea2fe55e3516c)
- [Deps] update `define-properties`, `object-keys` [`4585e5a`](https://github.com/es-shims/globalThis/commit/4585e5ab461093ab6c62ce0b22b959925e8f818c)
- fix issue with Webpack's CaseSensitivePathsPlugin [`842e84e`](https://github.com/es-shims/globalThis/commit/842e84e0096c9eea660c78fd19c9c07799b81537)
## v1.0.0 - 2018-08-10
### Commits
- Dotfiles. [`f01b02d`](https://github.com/es-shims/globalThis/commit/f01b02d315865c812e5b9158f71bb18f3b153def)
- [Tests] up to `node` `v10.7`, `v9.11`, `v8.11`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm`; improve matrix [`ed1fa5d`](https://github.com/es-shims/globalThis/commit/ed1fa5d473d933b3270410b658183dc1c556a663)
- Tests [`ab99527`](https://github.com/es-shims/globalThis/commit/ab99527e3c434e89dd40f8cba3b0e2e976156611)
- [breaking] update property name, rename repo [`be42e3d`](https://github.com/es-shims/globalThis/commit/be42e3dce08b62a78260d487f62fa69b410d7918)
- package.json [`ca43a36`](https://github.com/es-shims/globalThis/commit/ca43a363e3ce0dbc2d4623169f8cb3d792f8bc84)
- implementation [`80b5a40`](https://github.com/es-shims/globalThis/commit/80b5a403ef532254b2af46ec3ba5f442a308a57d)
- read me [`f6df9b3`](https://github.com/es-shims/globalThis/commit/f6df9b3b69977f04e080d1720ba1203c13447884)
- Rename `System.global` to `global` [`fa8503c`](https://github.com/es-shims/globalThis/commit/fa8503cf94afe84b3729dd5b0e9f73f481fb1fee)
- Initial commit [`99f1dc3`](https://github.com/es-shims/globalThis/commit/99f1dc328d0b4c52a550037de0139d5452ac01de)
- [Tests] up to `node` `v6.7`, `v5.12`, `v4.6`; improve test matrix [`712ec0e`](https://github.com/es-shims/globalThis/commit/712ec0e545d1603c4e23f4ff1acb066cc4a3c9ee)
- [Dev Deps] update `browserify`, `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`73278bd`](https://github.com/es-shims/globalThis/commit/73278bd638d1e762eb7415350a738f5d345896f5)
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `browserify`, `eslint`, `for-each`, `is`, `nsp`, `tape` [`75fa992`](https://github.com/es-shims/globalThis/commit/75fa9929be81afec43895c02e33d0b8a78f11d1f)
- [Dev Deps] update `browserify`, `is`, `tape`, `nsp`, `eslint` [`b223e86`](https://github.com/es-shims/globalThis/commit/b223e86d0868efb1f0c966370ff2f822516d6956)
- [Tests] fix linting; remove parallelshell [`271b329`](https://github.com/es-shims/globalThis/commit/271b329d174b94c08913060752a2e9f9116fe5b8)
- [Deps] update `function-bind`, `object-keys` [`002d0c5`](https://github.com/es-shims/globalThis/commit/002d0c5685a83f97e014a8a07134eb621794c649)
- Only apps should have lockfiles [`960f1d0`](https://github.com/es-shims/globalThis/commit/960f1d00598cbba5427849c863eb10b8de82fb1b)
- [Tests] on `node` `v10.8` [`37fad9d`](https://github.com/es-shims/globalThis/commit/37fad9db9860c654efe0a32ec187f21730d5fed8)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`df28dfe`](https://github.com/es-shims/globalThis/commit/df28dfe7f0daf3db95a536a6ce64062bd706185d)
- [New] add `auto` entry point [`86eb2ab`](https://github.com/es-shims/globalThis/commit/86eb2ab4c4dc2babff20ac436cf7fb7f8da7d2f2)
- [Dev Deps] update `eslint` [`1bdc1aa`](https://github.com/es-shims/globalThis/commit/1bdc1aacfb94dcdc7bb61688c7634c435012e35d)
- [Deps] update `object-keys` [`72cdbf5`](https://github.com/es-shims/globalThis/commit/72cdbf596b16103ee711d52b2b645b42efc08c51)
- Update most common usage to invoke the function upon being required [`5026296`](https://github.com/es-shims/globalThis/commit/502629660da2c21cfb0f8ca233e2b9d427c052fe)
@@ -0,0 +1,7 @@
import { default as Mime } from "./Mime";
declare const mimelite: Mime;
export as namespace mimelite;
export = mimelite;
@@ -0,0 +1,7 @@
function _skipFirstGeneratorNext(t) {
return function () {
var r = t.apply(this, arguments);
return r.next(), r;
};
}
export { _skipFirstGeneratorNext as default };
@@ -0,0 +1,12 @@
import * as _heroui_system from '@heroui/system';
import { UseLinkProps } from './use-link.js';
import 'react';
import '@react-types/link';
import '@heroui/theme';
import '@heroui/react-utils';
interface LinkProps extends UseLinkProps {
}
declare const Link: _heroui_system.InternalForwardRefRenderFunction<"a", LinkProps, never>;
export { LinkProps, Link as default };
@@ -0,0 +1,140 @@
<h1 align="center"> <img width="35" height="35" alt="Motion logo" src="https://github.com/user-attachments/assets/00d6d1c3-72c4-4c2f-a664-69da13182ffc" /><br />Motion</h1>
<h3 align="center">
An open source animation library<br />for JavaScript, React and Vue
</h3>
<p align="center">
<a href="https://www.npmjs.com/package/motion" rel="noopener noreferrer nofollow" ><img src="https://img.shields.io/npm/v/motion?color=0368FF&label=version" alt="npm version"></a>
<a href="https://www.npmjs.com/package/motion" rel="noopener noreferrer nofollow" ><img src="https://img.shields.io/npm/dm/framer-motion?color=8D30FF&label=npm" alt="npm downloads per month"></a>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://www.jsdelivr.com/package/npm/motion"><img alt="jsDelivr hits (npm)" src="https://img.shields.io/jsdelivr/npm/hm/framer-motion?logo=jsdeliver&color=FF4FBA"></a>
<img alt="NPM License" src="https://img.shields.io/npm/l/motion?color=FF2B6E">
</p>
```bash
# React / JavaScript
npm install motion
# Vue
npm install motion-v
```
## Table of Contents
1. [Why Motion?](#why-motion)
2. [🍦 Platforms](#-platforms)
3. [🎓 Examples](#-examples)
4. [⚡️ Motion+](#-motion)
5. [👩🏻‍⚖️ License](#-license)
6. [💎 Contribute](#-contribute)
7. [✨ Sponsors](#-sponsors)
## Why Motion?
- **Simple API:** First-class React, JavaScript, and Vue packages.
- **Hybrid engine:** Power of JavaScript combined with native browser APIs for 120fps, GPU-accelerated animations.
- **Production-ready:** TypeScript, extensive test suite, tree-shakable, tiny footprint.
**Batteries included:** Gestures, springs, layout transitions, scroll-linked effects, timelines.
## 🍦 Platforms
Motion is available for [React](https://motion.dev/docs/react), [JavaScript](https://motion.dev/docs/quick-start) and [Vue](https://motion.dev/docs/vue).
<details>
<summary>React ⬇</summary>
```jsx
import { motion } from "motion/react"
function Component() {
return <motion.div animate={{ x: 100 }} />
}
```
Get started with [Motion for React](https://motion.dev/docs/react).
</details>
<details>
<summary>JavaScript ⬇</summary>
```javascript
import { animate } from "motion"
animate("#box", { x: 100 })
```
Get started with [JavaScript](https://motion.dev/docs/quick-start).
</details>
<details>
<summary>Vue ⬇</summary>
```html
<script>
import { motion } from "motion-v"
</script>
<template> <motion.div :animate={{ x: 100 }} /> </template>
```
Get started with [Motion for Vue](https://motion.dev/docs/vue).
</details>
## 🎓 Examples
Browse 100+ free and 180+ premium [Motion Examples](https://motion.dev/examples), with copy-paste code that'll level-up your animations whether you're a beginner or an expert.
## ⚡️ Motion+
A one-time payment, lifetime-updates membership:
- **180+ premium examples**
- **Premium APIs** like [Cursor](https://motion.dev/docs/cursor) and [Ticker](https://motion.dev/docs/react-ticker)
- **Visual editing** for VS Code (alpha)
- **Private Discord**
- **Early access content**
[Get Motion+](https://motion.dev/plus)
## 👩🏻‍⚖️ License
- Motion is MIT licensed.
## 💎 Contribute
- Want to contribute to Motion? Our [contributing guide](https://github.com/motiondivision/motion/blob/master/CONTRIBUTING.md) has you covered.
## ✨ Sponsors
Motion is sustainable thanks to the kind support of its sponsors.
[Become a sponsor](https://motion.dev/sponsor)
### Partner
Motion powers Framer animations, the web builder for creative pros. Design and ship your dream site. Zero code, maximum speed.
<a href="https://framer.link/FlnUbQY">
<img alt="Framer" src="https://github.com/user-attachments/assets/22a79be7-672e-4336-bfb7-5d55d1deb917" width="250px" height="150px">
</a>
### Platinum
<a href="https://linear.app"><img alt="Linear" src="https://github.com/user-attachments/assets/f9ce44b4-af28-4770-bb6e-9515b474bfb2" width="250px" height="150px"></a> <a href="https://figma.com"><img alt="Figma" src="https://github.com/user-attachments/assets/1077d0ab-4305-4a1f-81c8-d5be8c4c6717" width="250px" height="150px"></a> <a href="https://sanity.io"><img alt="Sanity" src="https://github.com/user-attachments/assets/80134088-f456-483f-8edd-940593c120ce" width="250px" height="150px"></a>
### Gold
<a href="https://tailwindcss.com"><img alt="Tailwind" src="https://github.com/user-attachments/assets/1d5f2571-8bc3-4367-9fec-14d291168ff0" width="200px" height="120px"></a> <a href="https://emilkowal.ski"><img alt="Emil Kowalski" src="https://github.com/user-attachments/assets/33d1cb98-238a-4eed-a0df-9c7ab097d65b" width="200px" height="120px"></a> <a href="https://liveblocks.io"><img alt="Liveblocks" src="https://github.com/user-attachments/assets/28eddbe5-1617-4e74-969d-2eb6fcd481af" width="200px" height="120px"></a> <a href="https://lu.ma"><img alt="Luma" src="https://github.com/user-attachments/assets/ac282433-6adb-4ad2-9fd2-5c6ee513c14b" width="200px" height="120px"></a> <a href="https://notion.com"><img alt="Notion" src="https://github.com/user-attachments/assets/a27a6033-3cb0-4232-a6bb-625e1824517b" width="200px" height="120px"></a> <a href="https://lottiefiles.com"><img alt="LottieFiles" src="https://github.com/user-attachments/assets/4e99d8c7-4cba-43ee-93c5-93861ae708ec" width="200px" height="120px"></a>
### Silver
<a href="https://www.frontend.fyi/?utm_source=motion"><img alt="Frontend.fyi" src="https://github.com/user-attachments/assets/f16e3eb9-f0bd-4ad1-8049-f079a3d65c69" width="150px" height="100px"></a> <a href="https://firecrawl.dev"><img alt="Firecrawl" src="https://github.com/user-attachments/assets/2c44e7f4-5c2a-4714-9050-1570538665ff" width="150px" height="100px"></a> <a href="https://puzzmo.com"><img alt="Puzzmo" src="https://github.com/user-attachments/assets/e32205a7-3ab1-41ec-8729-a794058fd655" width="150px" height="100px"></a> <a href="https://bolt.new"><img alt="Bolt.new" src="https://github.com/user-attachments/assets/7932d4b2-bb6c-422e-82b9-6ad78a7e3090" width="150px" height="100px"></a>
### Personal
- [OlegWock](https://sinja.io)
- [Lambert Weller](https://github.com/l-mbert)
- [Jake LeBoeuf](https://jklb.wf)
- [Han Lee](https://github.com/hahnlee)
@@ -0,0 +1,104 @@
'use strict';
var parse = require('../');
var test = require('tape');
test('boolean and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['-h', 'true', '--derp', 'true'];
var regular = ['--herp', 'true', '-d', 'true'];
var opts = {
alias: { h: 'herp' },
boolean: 'h',
unknown: unknownFn,
};
parse(aliased, opts);
parse(regular, opts);
t.same(unknown, ['--derp', '-d']);
t.end();
});
test('flag boolean true any double hyphen argument is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], {
boolean: true,
unknown: unknownFn,
});
t.same(unknown, ['--tacos=good', 'cow', '-p']);
t.same(argv, {
honk: true,
_: [],
});
t.end();
});
test('string and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['-h', 'hello', '--derp', 'goodbye'];
var regular = ['--herp', 'hello', '-d', 'moon'];
var opts = {
alias: { h: 'herp' },
string: 'h',
unknown: unknownFn,
};
parse(aliased, opts);
parse(regular, opts);
t.same(unknown, ['--derp', '-d']);
t.end();
});
test('default and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['-h', 'hello'];
var regular = ['--herp', 'hello'];
var opts = {
default: { h: 'bar' },
alias: { h: 'herp' },
unknown: unknownFn,
};
parse(aliased, opts);
parse(regular, opts);
t.same(unknown, []);
t.end();
unknownFn(); // exercise fn for 100% coverage
});
test('value following -- is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['--bad', '--', 'good', 'arg'];
var opts = {
'--': true,
unknown: unknownFn,
};
var argv = parse(aliased, opts);
t.same(unknown, ['--bad']);
t.same(argv, {
'--': ['good', 'arg'],
_: [],
});
t.end();
});
@@ -0,0 +1,20 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./pick-from-mapped-key"), exports);
__exportStar(require("./pick-from-mapped-result"), exports);
__exportStar(require("./pick"), exports);
@@ -0,0 +1,20 @@
// given an input that may or may not be an object, return an object that has
// a copy of every defined property listed in 'copy'. if the input is not an
// object, assign it to the property named by 'wrap'
const getOptions = (input, { copy, wrap }) => {
const result = {}
if (input && typeof input === 'object') {
for (const prop of copy) {
if (input[prop] !== undefined) {
result[prop] = input[prop]
}
}
} else {
result[wrap] = input
}
return result
}
module.exports = getOptions
@@ -0,0 +1,527 @@
export default `flf2a$ 5 4 99 0 16
_____ _____ ____ ___ _____ _____
/ ___>/ __ \\/ _/ /___\\/ __\\/ __\\
|___ || __|| |---| || __|| __|
<_____/\\__/ \\_____/\\___/\\__/ \\__/
#-> spliff : by nathan bloomfield (xzovik@gmail.com)
#-> based on the letters a,i,j,m,n,r,u, seen on the web, by E.DUB
#->
#-> History:
#-> 5-3-2008 : version 1.1
#-> Added umlauts (to make the file valid) and small letters ~Markus Gebhard
#-> 5-10-2007 : version 1.0
#->
#-> You are free to make changes- just note them in the history.
#->
#-> (end comments)
$$@
$$@
$$@
$$@
$$@@
___ @
/ \\@
\\___/@
<___>@
@@
_ _ @
| | | @
\\_|_/ @
@
@@
_ _ @
_| |_|_ @
|_|_|___|@
|___| |_|@
|_|_| @@
_/_/@
/ __>@
\\__ \\@
<___/@
/_/ @@
_ __ @
<_>/ / @
/ /_ @
/_/<_>@
@@
___ @
< _ > @
/ _ \\/@
\\__\\ \\@
/@@
_ @
< >@
|/ @
@
@@
___@
/ /@
| | @
\\__\\@
@@
___ @
\\ \\@
| |@
/__/@
@@
__A__@
\\ /@
/_ _\\@
V @
@@
_ @
_| |_ @
|_ _|@
|_| @
@@
@
@
_ @
< >@
|/ @@
@
___ @
<___>@
@
@@
@
@
_ @
<_>@
@@
___@
/ /@
/ / @
/__/ @
@@
_____ @
/ _ \\@
| | |@
\\_____/@
@@
___ @
/ | @
| | @
<____>@
@@
_____ @
<___ \\@
/ __/@
<_____|@
@@
_____ @
/ _ \\@
>-<_ <@
\\_____/@
@@
__ __ @
/ | \\@
\\_ |@
\\___/@
@@
_____ @
| ___|@
|___ \\@
<_____/@
@@
____ @
/ __| @
| _ \\@
\\_____/@
@@
_____ @
<__ \\@
/ /@
<___/ @
@@
_____ @
/ _ \\@
> _ <@
\\_____/@
@@
_____ @
/ _ \\@
\\___ |@
|_____/@
@@
_ @
<_>@
_ @
<_>@
@@
_ @
<_>@
_ @
< >@
|/ @@
___@
/ /@
< < @
\\__\\@
@@
@
___ @
<___> @
<___> @
@@
___ @
\\ \\ @
> >@
/__/ @
@@
_____ @
<___ \\@
|__ /@
<___> @
@@
_____ @
/ __ \\@
| |___|@
\\_____/@
@@
_____ @
/ _ \\@
| _ |@
\\__|__/@
@@
_____ @
/ _ \\@
| _ <@
\\_____/@
@@
_____ @
/ \\@
| |--|@
\\_____/@
@@
_____ @
| _ \\@
| | |@
|_____/@
@@
_____ @
/ __\\@
| __|@
\\_____/@
@@
_____ @
/ __\\@
| __|@
\\__/ @
@@
_____ @
/ __\\@
| |_ |@
\\_____/@
@@
__ __ @
/ | \\@
| _ |@
\\__|__/@
@@
___ @
/___\\@
| |@
\\___/@
@@
____ @
\\_ \\@
---| |@
\\_____/@
@@
__ ___@
| | /@
| _ < @
|__|__\\@
@@
____ @
/ _/ @
| |---@
\\_____/@
@@
__ __ @
/ \\/ \\@
| \\/ |@
\\__ \\__/@
@@
_____ @
/ _ \\@
| | |@
\\__|__/@
@@
_____ @
/ _ \\@
| | |@
\\_____/@
@@
_____ @
/ _ \\@
| __/@
\\__/ @
@@
_____ @
/ _ \\@
| | |@
\\___\\ \\@
/@@
_____ @
/ _ \\@
| _ <@
\\__|\\_/@
@@
_____ @
/ ___>@
|___ |@
<_____/@
@@
____ @
/ \\@
\\- -/@
|__| @
@@
__ __ @
/ | \\@
| | |@
\\_____/@
@@
__ __ @
/ | \\@
\\ | /@
\\___/ @
@@
__ __ @
/ / \\@
| /\\ |@
\\__/\\__/@
@@
__ __ @
/ \\/ \\@
>- -<@
\\__/\\__/@
@@
___ ___@
\\ | /@
| | @
\\___/ @
@@
_____ @
|__ /@
/ _/ @
/_____|@
@@
___ @
| _|@
| |_ @
|___|@
@@
___ @
\\ \\ @
\\ \\ @
\\__\\@
@@
___ @
|_ |@
_| |@
|___|@
@@
__ @
/ \\ @
/_/\\_\\@
@
@@
@
@
@
____ @
<____>@@
_ @
< >@
\\|@
@
@@
_____ @
/ _ \\@
| _ |@
\\__|__/@
@@
_____ @
/ _ \\@
| _ <@
\\_____/@
@@
_____ @
/ \\@
| |--|@
\\_____/@
@@
_____ @
| _ \\@
| | |@
|_____/@
@@
_____ @
/ __\\@
| __|@
\\_____/@
@@
_____ @
/ __\\@
| __|@
\\__/ @
@@
_____ @
/ __\\@
| |_ |@
\\_____/@
@@
__ __ @
/ | \\@
| _ |@
\\__|__/@
@@
___ @
/___\\@
| |@
\\___/@
@@
____ @
\\_ \\@
---| |@
\\_____/@
@@
__ ___@
| | /@
| _ < @
|__|__\\@
@@
____ @
/ _/ @
| |---@
\\_____/@
@@
__ __ @
/ \\/ \\@
| \\/ |@
\\__ \\__/@
@@
_____ @
/ _ \\@
| | |@
\\__|__/@
@@
_____ @
/ _ \\@
| | |@
\\_____/@
@@
_____ @
/ _ \\@
| __/@
\\__/ @
@@
_____ @
/ _ \\@
| | |@
\\___\\ \\@
/@@
_____ @
/ _ \\@
| _ <@
\\__|\\_/@
@@
_____ @
/ ___>@
|___ |@
<_____/@
@@
____ @
/ \\@
\\- -/@
|__| @
@@
__ __ @
/ | \\@
| | |@
\\_____/@
@@
__ __ @
/ | \\@
\\ | /@
\\___/ @
@@
__ __ @
/ / \\@
| /\\ |@
\\__/\\__/@
@@
__ __ @
/ \\/ \\@
>- -<@
\\__/\\__/@
@@
___ ___@
\\ | /@
| | @
\\___/ @
@@
_____ @
|__ /@
/ _/ @
/_____|@
@@
___@
| /@
< | @
|__\\@
@@
_ @
| |@
| |@
|_|@
@@
___ @
\\ | @
| >@
/__| @
@@
_ _ @
/ \\/ >@
<_/\\_/ @
@
@@
/_\\_/_\\@
/ _ \\@
| _ |@
\\__|__/@
@@
/_\\_/_\\@
/ _ \\@
| | |@
\\_____/@
@@
/_\\ /_\\@
/ | \\@
| | |@
\\_____/@
@@
/_\\_/_\\@
/ _ \\@
| _ |@
\\__|__/@
@@
/_\\_/_\\@
/ _ \\@
| | |@
\\_____/@
@@
/_\\ /_\\@
/ | \\@
| | |@
\\_____/@
@@
�@
@
@
@
@@ `
@@ -0,0 +1,10 @@
import { __decorate } from "tslib";
import { AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { SignerInfo } from "../signer_info";
export const id_counterSignature = "1.2.840.113549.1.9.6";
let CounterSignature = class CounterSignature extends SignerInfo {
};
CounterSignature = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], CounterSignature);
export { CounterSignature };
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Var = exports.User = exports.Statement = exports.SpreadProperty = exports.Scope = exports.RestProperty = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = exports.Referenced = exports.Pure = exports.NumericLiteralTypeAnnotation = exports.Generated = exports.ForAwaitStatement = exports.Flow = exports.Expression = exports.ExistentialTypeParam = exports.BlockScoped = exports.BindingIdentifier = void 0;
const ReferencedIdentifier = exports.ReferencedIdentifier = ["Identifier", "JSXIdentifier"];
const ReferencedMemberExpression = exports.ReferencedMemberExpression = ["MemberExpression"];
const BindingIdentifier = exports.BindingIdentifier = ["Identifier"];
const Statement = exports.Statement = ["Statement"];
const Expression = exports.Expression = ["Expression"];
const Scope = exports.Scope = ["Scopable", "Pattern"];
const Referenced = exports.Referenced = null;
const BlockScoped = exports.BlockScoped = ["FunctionDeclaration", "ClassDeclaration", "VariableDeclaration"];
const Var = exports.Var = ["VariableDeclaration"];
const User = exports.User = null;
const Generated = exports.Generated = null;
const Pure = exports.Pure = null;
const Flow = exports.Flow = ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"];
const RestProperty = exports.RestProperty = ["RestElement"];
const SpreadProperty = exports.SpreadProperty = ["RestElement"];
const ExistentialTypeParam = exports.ExistentialTypeParam = ["ExistsTypeAnnotation"];
const NumericLiteralTypeAnnotation = exports.NumericLiteralTypeAnnotation = ["NumberLiteralTypeAnnotation"];
const ForAwaitStatement = exports.ForAwaitStatement = ["ForOfStatement"];
//# sourceMappingURL=virtual-types.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"Q H R S T U V W","2":"C L M G N O P","1025":"0 1 2 3 4 5 X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC 0C 1C","260":"0 1 2 3 4 5 HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC"},D:{"1":"HC IC JC KC LC Q H R S T U V W","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC","132":"4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC","1025":"0 1 2 3 4 5 X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"2":"J ZB K D E F A B 2C ZC 3C 4C 5C 6C aC","772":"C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB FD GD HD ID NC uC JD OC","132":"sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B","1025":"0 1 2 3 4 5 IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD","772":"UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","1025":"H"},L:{"1025":"I"},M:{"260":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB tD uD vD wD xD QC RC SC yD","2":"J oD pD qD","132":"rD sD aC"},Q:{"132":"zD"},R:{"1025":"0D"},S:{"2":"1D","260":"2D"}},B:7,C:"Feature Policy",D:true};
@@ -0,0 +1,395 @@
Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
@@ -0,0 +1,67 @@
/**
* The `node:string_decoder` module provides an API for decoding `Buffer` objects
* into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
* characters. It can be accessed using:
*
* ```js
* import { StringDecoder } from 'node:string_decoder';
* ```
*
* The following example shows the basic use of the `StringDecoder` class.
*
* ```js
* import { StringDecoder } from 'node:string_decoder';
* const decoder = new StringDecoder('utf8');
*
* const cent = Buffer.from([0xC2, 0xA2]);
* console.log(decoder.write(cent)); // Prints: ¢
*
* const euro = Buffer.from([0xE2, 0x82, 0xAC]);
* console.log(decoder.write(euro)); // Prints: €
* ```
*
* When a `Buffer` instance is written to the `StringDecoder` instance, an
* internal buffer is used to ensure that the decoded string does not contain
* any incomplete multibyte characters. These are held in the buffer until the
* next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
*
* In the following example, the three UTF-8 encoded bytes of the European Euro
* symbol (`€`) are written over three separate operations:
*
* ```js
* import { StringDecoder } from 'node:string_decoder';
* const decoder = new StringDecoder('utf8');
*
* decoder.write(Buffer.from([0xE2]));
* decoder.write(Buffer.from([0x82]));
* console.log(decoder.end(Buffer.from([0xAC]))); // Prints: €
* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/string_decoder.js)
*/
declare module "string_decoder" {
class StringDecoder {
constructor(encoding?: BufferEncoding);
/**
* Returns a decoded string, ensuring that any incomplete multibyte characters at
* the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
* returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`.
* @since v0.1.99
* @param buffer The bytes to decode.
*/
write(buffer: string | NodeJS.ArrayBufferView): string;
/**
* Returns any remaining input stored in the internal buffer as a string. Bytes
* representing incomplete UTF-8 and UTF-16 characters will be replaced with
* substitution characters appropriate for the character encoding.
*
* If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input.
* After `end()` is called, the `stringDecoder` object can be reused for new input.
* @since v0.9.3
* @param buffer The bytes to decode.
*/
end(buffer?: string | NodeJS.ArrayBufferView): string;
}
}
declare module "node:string_decoder" {
export * from "string_decoder";
}
@@ -0,0 +1,68 @@
import type { Program } from 'typescript';
import type { Lib } from './lib';
export type DebugLevel = boolean | ('eslint' | 'typescript' | 'typescript-eslint')[];
export type CacheDurationSeconds = number | 'Infinity';
export type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | 'latest' | undefined;
export type SourceTypeClassic = 'module' | 'script';
export type SourceType = 'commonjs' | SourceTypeClassic;
export type JSDocParsingMode = 'all' | 'none' | 'type-info';
/**
* Granular options to configure the project service.
*/
export interface ProjectServiceOptions {
/**
* Globs of files to allow running with the default project compiler options
* despite not being matched by the project service.
*/
allowDefaultProject?: string[];
/**
* Path to a TSConfig to use instead of TypeScript's default project configuration.
* @default 'tsconfig.json'
*/
defaultProject?: string;
/**
* Whether to allow TypeScript plugins as configured in the TSConfig.
*/
loadTypeScriptPlugins?: boolean;
/**
* The maximum number of files {@link allowDefaultProject} may match.
* Each file match slows down linting, so if you do need to use this, please
* file an informative issue on typescript-eslint explaining why - so we can
* help you avoid using it!
* @default 8
*/
maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number;
}
export interface ParserOptions {
[additionalProperties: string]: unknown;
cacheLifetime?: {
glob?: CacheDurationSeconds;
};
debugLevel?: DebugLevel;
ecmaFeatures?: {
[key: string]: unknown;
globalReturn?: boolean | undefined;
jsx?: boolean | undefined;
} | undefined;
ecmaVersion?: EcmaVersion;
emitDecoratorMetadata?: boolean;
errorOnTypeScriptSyntacticAndSemanticIssues?: boolean;
errorOnUnknownASTType?: boolean;
experimentalDecorators?: boolean;
extraFileExtensions?: string[];
filePath?: string;
isolatedDeclarations?: boolean;
jsDocParsingMode?: JSDocParsingMode;
jsxFragmentName?: string | null;
jsxPragma?: string | null;
lib?: Lib[];
programs?: Program[] | null;
project?: boolean | string | string[] | null;
projectFolderIgnoreList?: string[];
projectService?: boolean | ProjectServiceOptions;
range?: boolean;
sourceType?: SourceType | undefined;
tokens?: boolean;
tsconfigRootDir?: string;
warnOnUnsupportedTypeScriptVersion?: boolean;
}
@@ -0,0 +1,126 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "caractères", verb: "avoir" },
file: { unit: "octets", verb: "avoir" },
array: { unit: "éléments", verb: "avoir" },
set: { unit: "éléments", verb: "avoir" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "entrée",
email: "adresse courriel",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "date-heure ISO",
date: "date ISO",
time: "heure ISO",
duration: "durée ISO",
ipv4: "adresse IPv4",
ipv6: "adresse IPv6",
cidrv4: "plage IPv4",
cidrv6: "plage IPv6",
base64: "chaîne encodée en base64",
base64url: "chaîne encodée en base64url",
json_string: "chaîne JSON",
e164: "numéro E.164",
jwt: "JWT",
template_literal: "entrée",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Entrée invalide : attendu ${issue.expected}, reçu ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Entrée invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;
return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "≤" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Trop grand : attendu que ${issue.origin ?? "la valeur"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;
return `Trop grand : attendu que ${issue.origin ?? "la valeur"} soit ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? "≥" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") {
return `Chaîne invalide : doit commencer par "${_issue.prefix}"`;
}
if (_issue.format === "ends_with") return `Chaîne invalide : doit se terminer par "${_issue.suffix}"`;
if (_issue.format === "includes") return `Chaîne invalide : doit inclure "${_issue.includes}"`;
if (_issue.format === "regex") return `Chaîne invalide : doit correspondre au motif ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} invalide`;
}
case "not_multiple_of":
return `Nombre invalide : doit être un multiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clé${issue.keys.length > 1 ? "s" : ""} non reconnue${issue.keys.length > 1 ? "s" : ""} : ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clé invalide dans ${issue.origin}`;
case "invalid_union":
return "Entrée invalide";
case "invalid_element":
return `Valeur invalide dans ${issue.origin}`;
default:
return `Entrée invalide`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,30 @@
import { current, isDraft } from './immerImports'
import { createSelectorCreator, weakMapMemoize } from './reselectImports'
export const createDraftSafeSelectorCreator: typeof createSelectorCreator = (
...args: unknown[]
) => {
const createSelector = (createSelectorCreator as any)(...args)
const createDraftSafeSelector = Object.assign(
(...args: unknown[]) => {
const selector = createSelector(...args)
const wrappedSelector = (value: unknown, ...rest: unknown[]) =>
selector(isDraft(value) ? current(value) : value, ...rest)
Object.assign(wrappedSelector, selector)
return wrappedSelector as any
},
{ withTypes: () => createDraftSafeSelector },
)
return createDraftSafeSelector
}
/**
* "Draft-Safe" version of `reselect`'s `createSelector`:
* If an `immer`-drafted object is passed into the resulting selector's first argument,
* the selector will act on the current draft value, instead of returning a cached value
* that might be possibly outdated if the draft has been modified since.
* @public
*/
export const createDraftSafeSelector =
/* @__PURE__ */
createDraftSafeSelectorCreator(weakMapMemoize)
@@ -0,0 +1 @@
{"name":"@humanwhocodes/gitignore-to-minimatch","version":"1.0.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532092659,"integrity":"sha512-3Gto0TuM+VlkS5NfEZKwLHGqelz2U71DtEgPqJ7sjU0/FqInjsjDtAqx/bIzsxc6eP2DWQ1vc54Mno/1bCglVw==","mode":420,"size":11357},"dist/gitignore-to-minimatch.cjs":{"checkedAt":1794532095058,"integrity":"sha512-VlI6nkdwvsrRZEXQu/OnJ+DHNUaxdYJa5rGNruSCuGPagUGuiEiJbJzphWs+nzOtVf4RwE55amjsRl6qbrDR1g==","mode":420,"size":1897},"dist/gitignore-to-minimatch.js":{"checkedAt":1794532095058,"integrity":"sha512-Dz3rR+GPJoqR+j0I/FmH/R+75923QqtJxXUvJYRLteWSA07Bh0a1xY49v8TiJAZaa7R5ouZh1HJi/g5Gcoy9Aw==","mode":420,"size":1798},"package.json":{"checkedAt":1794532095058,"integrity":"sha512-+uyZyt/P94CdYqzzsgBBCkfh8gFcAyPz/xlFupQkGQ+T4f47Yf98CnwQsc7LUEMm95/EiU7+Bo3p+6GkW+O1xg==","mode":420,"size":1547},"README.md":{"checkedAt":1794532095058,"integrity":"sha512-Qz4daF2jJzQwmakf1yo8ok8i1c0KMtEmU/sC6dQ6ca/xR/oZJLpF5WUy64nI+9A/BFzbLIVWatojegmSgvMvlw==","mode":420,"size":1890},"dist/gitignore-to-minimatch.d.ts":{"checkedAt":1794532095058,"integrity":"sha512-gKuPSzZzC2Lm6WA3LdUMd4oClUPUzRrWkwAz3mH4jO0/bXGbHBoi+mtL67oKDMYLYVF0FIvLfyytLuUpnToBfQ==","mode":420,"size":360}}}
@@ -0,0 +1,17 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export type {CheckboxAria} from './useCheckbox';
export {useCheckbox} from './useCheckbox';
export {useCheckboxGroup} from './useCheckboxGroup';
export {useCheckboxGroupItem} from './useCheckboxGroupItem';
export type {AriaCheckboxGroupItemProps, AriaCheckboxGroupProps, AriaCheckboxProps} from '@react-types/checkbox';
export type {CheckboxGroupAria} from './useCheckboxGroup';
@@ -0,0 +1 @@
module.exports={C:{"4":0.02851,"78":0.00407,"115":0.03666,"120":0.07739,"128":0.00407,"134":0.1059,"136":0.00407,"137":0.03666,"139":0.00407,"140":0.02851,"141":0.00407,"142":0.02037,"143":0.7698,"144":0.6191,_:"2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 121 122 123 124 125 126 127 129 130 131 132 133 135 138 145 146 147 3.5 3.6"},D:{"39":0.00407,"40":0.00407,"41":0.00407,"42":0.00407,"43":0.00407,"44":0.00407,"45":0.00407,"46":0.00407,"47":0.00407,"48":0.00407,"49":0.00407,"50":0.00407,"51":0.00407,"52":0.00407,"53":0.00407,"54":0.00407,"55":0.00407,"56":0.00407,"57":0.00407,"58":0.00407,"59":0.00407,"60":0.00407,"65":0.00815,"70":0.00815,"74":0.00407,"76":0.00407,"79":0.01222,"87":0.01222,"101":0.00407,"103":0.13034,"104":0.00407,"108":0.00407,"109":0.2118,"110":0.00407,"112":0.92864,"113":0.12219,"116":0.03666,"119":0.01222,"120":0.00407,"121":0.00407,"122":0.03258,"123":0.00815,"124":0.00815,"125":3.19323,"126":0.09775,"127":0.00815,"128":0.06924,"129":0.01222,"130":0.02037,"131":0.02851,"132":0.02851,"133":0.01222,"134":0.04888,"135":0.07739,"136":0.02851,"137":0.12219,"138":0.30548,"139":0.66797,"140":3.79604,"141":9.24978,"142":0.15477,"143":0.00407,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 66 67 68 69 71 72 73 75 77 78 80 81 83 84 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 102 105 106 107 111 114 115 117 118 144 145"},F:{"73":0.00815,"90":0.00407,"91":0.00407,"92":0.01222,"95":0.00407,"120":0.05295,"121":0.06517,"122":0.75758,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00407,"92":0.00407,"109":0.01222,"122":0.02444,"128":0.00407,"130":0.02037,"131":0.00815,"132":0.00815,"133":0.00407,"134":0.06517,"135":0.00815,"136":0.00815,"137":0.01222,"138":0.03666,"139":0.03666,"140":1.34002,"141":5.66962,"142":0.02037,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 123 124 125 126 127 129"},E:{"14":0.01222,"15":0.00407,_:"0 4 5 6 7 8 9 10 11 12 13 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 15.1 15.2-15.3 16.0 26.2","12.1":0.00407,"13.1":0.00815,"14.1":0.02851,"15.4":0.00407,"15.5":0.00815,"15.6":0.08553,"16.1":0.02037,"16.2":0.01222,"16.3":0.02444,"16.4":0.03666,"16.5":0.02851,"16.6":0.14663,"17.0":0.00815,"17.1":0.05702,"17.2":0.02444,"17.3":0.02037,"17.4":0.12626,"17.5":0.04888,"17.6":0.26475,"18.0":0.02037,"18.1":0.04888,"18.2":0.0611,"18.3":0.08146,"18.4":0.0611,"18.5-18.6":0.20772,"26.0":0.74129,"26.1":0.02444},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00262,"5.0-5.1":0,"6.0-6.1":0.01047,"7.0-7.1":0.00785,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.02356,"10.0-10.2":0.00262,"10.3":0.04451,"11.0-11.2":0.65976,"11.3-11.4":0.01571,"12.0-12.1":0.00524,"12.2-12.5":0.12829,"13.0-13.1":0,"13.2":0.01309,"13.3":0.00524,"13.4-13.7":0.02094,"14.0-14.4":0.04451,"14.5-14.8":0.04713,"15.0-15.1":0.04451,"15.2-15.3":0.03404,"15.4":0.03927,"15.5":0.04451,"15.6-15.8":0.58122,"16.0":0.07854,"16.1":0.14661,"16.2":0.07593,"16.3":0.13614,"16.4":0.03404,"16.5":0.06022,"16.6-16.7":0.77758,"17.0":0.05498,"17.1":0.08378,"17.2":0.06022,"17.3":0.08902,"17.4":0.15709,"17.5":0.26967,"17.6-17.7":0.68071,"18.0":0.15447,"18.1":0.31941,"18.2":0.1728,"18.3":0.55504,"18.4":0.28537,"18.5-18.6":14.55144,"26.0":1.79864,"26.1":0.06545},P:{"4":0.02089,"21":0.01045,"23":0.01045,"24":0.03134,"25":0.03134,"26":0.02089,"27":0.03134,"28":2.78921,"29":0.22982,_:"20 22 6.2-6.4 8.2 10.1 12.0 13.0 14.0 15.0 17.0 18.0 19.0","5.0-5.4":0.02089,"7.2-7.4":0.01045,"9.2":0.01045,"11.1-11.2":0.01045,"16.0":0.03134},I:{"0":0.01184,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.18963,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.00407,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.62816},Q:{_:"14.9"},O:{"0":0.00593},H:{"0":0},L:{"0":34.41989}};
@@ -0,0 +1,143 @@
/**
* @fileoverview Prevent usage of `javascript:` URLs
* @author Sergei Startsev
*/
'use strict';
const includes = require('array-includes');
const docsUrl = require('../util/docsUrl');
const linkComponentsUtil = require('../util/linkComponents');
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
// https://github.com/facebook/react/blob/d0ebde77f6d1232cefc0da184d731943d78e86f2/packages/react-dom/src/shared/sanitizeURL.js#L30
/* eslint-disable-next-line max-len, no-control-regex */
const isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
function hasJavaScriptProtocol(attr) {
return attr.value && attr.value.type === 'Literal'
&& isJavaScriptProtocol.test(attr.value.value);
}
function shouldVerifyProp(node, config) {
const name = node.name && node.name.name;
const parentName = node.parent.name && node.parent.name.name;
if (!name || !parentName || !config.has(parentName)) return false;
const attributes = config.get(parentName);
return includes(attributes, name);
}
function parseLegacyOption(config, option) {
option.forEach((opt) => {
config.set(opt.name, opt.props);
});
}
const messages = {
noScriptURL: 'A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML, try using dangerouslySetInnerHTML instead.',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow usage of `javascript:` URLs',
category: 'Best Practices',
recommended: false,
url: docsUrl('jsx-no-script-url'),
},
messages,
schema: {
anyOf: [
{
type: 'array',
items: [
{
type: 'array',
uniqueItems: true,
items: {
type: 'object',
properties: {
name: {
type: 'string',
},
props: {
type: 'array',
items: {
type: 'string',
uniqueItems: true,
},
},
},
required: ['name', 'props'],
additionalProperties: false,
},
},
{
type: 'object',
properties: {
includeFromSettings: {
type: 'boolean',
},
},
additionalItems: false,
},
],
additionalItems: false,
},
{
type: 'array',
items: [
{
type: 'object',
properties: {
includeFromSettings: {
type: 'boolean',
},
},
additionalItems: false,
},
],
additionalItems: false,
},
],
},
},
create(context) {
const options = context.options;
const hasLegacyOption = Array.isArray(options[0]);
const legacyOptions = hasLegacyOption ? options[0] : [];
// eslint-disable-next-line no-nested-ternary
const objectOption = (hasLegacyOption && options.length > 1)
? options[1]
: (options.length > 0
? options[0]
: {
includeFromSettings: false,
}
);
const includeFromSettings = objectOption.includeFromSettings;
const linkComponents = linkComponentsUtil.getLinkComponents(includeFromSettings ? context : {});
parseLegacyOption(linkComponents, legacyOptions);
return {
JSXAttribute(node) {
if (shouldVerifyProp(node, linkComponents) && hasJavaScriptProtocol(node)) {
report(context, messages.noScriptURL, 'noScriptURL', {
node,
});
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"throwAtInvalidClassMetadata.js","sourceRoot":"","sources":["../../../../src/metadata/calculations/throwAtInvalidClassMetadata.ts"],"names":[],"mappings":";;AAQA,kEA+CC;AArDD,8EAA2E;AAC3E,sFAAmF;AAEnF,2FAAwF;AAGxF,SAAgB,2BAA2B,CACzC,IAAa,EACb,aAAiC;IAEjC,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,KAAK,IAAI,CAAC,GAAW,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,oBAAoB,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QAC3E,MAAM,mBAAmB,GACvB,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAExC,IACE,mBAAmB,KAAK,SAAS;YACjC,mBAAmB,CAAC,IAAI,KAAK,6DAA6B,CAAC,OAAO,EAClE,CAAC;YACD,MAAM,CAAC,IAAI,CACT,gDAAgD,IAAI,CAAC,IAAI,wCAAwC,CAAC,CAAC,QAAQ,EAAE;yGACZ,CAClG,CAAC;QACJ,CAAC;IACH,CAAC;IAED,KAAK,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,IAAI,aAAa,CAAC,UAAU,EAAE,CAAC;QAC/D,IAAI,QAAQ,CAAC,IAAI,KAAK,6DAA6B,CAAC,OAAO,EAAE,CAAC;YAC5D,MAAM,CAAC,IAAI,CACT,gDAAgD,IAAI,CAAC,IAAI,kBAAkB,WAAW,CAAC,QAAQ,EAAE;+EAC1B,CACxE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,uCAAkB,CAC1B,+CAAsB,CAAC,OAAO,EAC9B,uCAAuC,IAAI,CAAC,IAAI;;;;sEAIgB,CACjE,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,uCAAkB,CAC1B,+CAAsB,CAAC,yBAAyB,EAChD,kCAAkC,IAAI,CAAC,IAAI;;EAE7C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACpB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,31 @@
import type { IsFlatObject, Noop } from './utils';
import type { RegisterOptions } from './validator';
export type InternalFieldName = string;
export type FieldName<TFieldValues extends FieldValues> = IsFlatObject<TFieldValues> extends true ? Extract<keyof TFieldValues, string> : string;
export type CustomElement<TFieldValues extends FieldValues> = Partial<HTMLElement> & {
name: FieldName<TFieldValues>;
type?: string;
value?: any;
disabled?: boolean;
checked?: boolean;
options?: HTMLOptionsCollection;
files?: FileList | null;
focus?: Noop;
};
export type FieldValue<TFieldValues extends FieldValues> = TFieldValues[InternalFieldName];
export type FieldValues = Record<string, any>;
export type NativeFieldValue = string | number | boolean | null | undefined | unknown[];
export type FieldElement<TFieldValues extends FieldValues = FieldValues> = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | CustomElement<TFieldValues>;
export type Ref = FieldElement;
export type Field = {
_f: {
ref: Ref;
name: InternalFieldName;
refs?: HTMLInputElement[];
mount?: boolean;
} & RegisterOptions;
};
export type FieldRefs = Partial<{
[key: InternalFieldName]: Field | FieldRefs;
}>;
//# sourceMappingURL=fields.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"wC","8":"K D","132":"E"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C","8":"xC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GD HD ID NC uC JD OC","8":"F FD"},G:{"1":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"1":"hD"},I:{"1":"TC J I iD jD kD lD vC mD nD"},J:{"1":"D A"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"querySelector/querySelectorAll",D:true};
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=getFirstIterableResult.spec.d.ts.map
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAKM,MAAM,4CAAgD,IAAI;AAEjE,SAAS,mCAAa,GAAQ;IAC5B,IAAI,OAAO,QAAQ,UACjB,OAAO,IAAI,OAAO,CAAC,QAAQ;IAG7B,OAAO,KAAK;AACd;AAEO,SAAS,0CAAqB,KAAoB,EAAE,SAAc;IACvE,IAAI,SAAS,0CAAQ,GAAG,CAAC;IACzB,IAAI,CAAC,QACH,MAAM,IAAI,MAAM;IAGlB,OAAO,GAAG,OAAO,CAAC,EAAE,mCAAa,YAAY;AAC/C;AAEO,SAAS,0CAAa,KAAoB,EAAE,MAAW,EAAE,SAAc;IAC5E,IAAI,SAAS,0CAAQ,GAAG,CAAC;IACzB,IAAI,CAAC,QACH,MAAM,IAAI,MAAM;IAGlB,OAAO,GAAG,OAAO,CAAC,EAAE,mCAAa,QAAQ,CAAC,EAAE,mCAAa,YAAY;AACvE;AAEO,SAAS,yCAAoB,KAAoB,EAAE,MAAW;IACnE,yCAAyC;IACzC,OAAO;WAAI,MAAM,UAAU,CAAC,mBAAmB;KAAC,CAAC,GAAG,CAAC,CAAA,YACnD,0CAAU,OAAO,QAAQ,YACzB,IAAI,CAAC;AACT","sources":["packages/@react-aria/table/src/utils.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Key} from '@react-types/shared';\nimport {TableState} from '@react-stately/table';\n\nexport const gridIds: WeakMap<TableState<unknown>, string> = new WeakMap<TableState<unknown>, string>();\n\nfunction normalizeKey(key: Key): string {\n if (typeof key === 'string') {\n return key.replace(/\\s*/g, '');\n }\n\n return '' + key;\n}\n\nexport function getColumnHeaderId<T>(state: TableState<T>, columnKey: Key): string {\n let gridId = gridIds.get(state);\n if (!gridId) {\n throw new Error('Unknown grid');\n }\n\n return `${gridId}-${normalizeKey(columnKey)}`;\n}\n\nexport function getCellId<T>(state: TableState<T>, rowKey: Key, columnKey: Key): string {\n let gridId = gridIds.get(state);\n if (!gridId) {\n throw new Error('Unknown grid');\n }\n\n return `${gridId}-${normalizeKey(rowKey)}-${normalizeKey(columnKey)}`;\n}\n\nexport function getRowLabelledBy<T>(state: TableState<T>, rowKey: Key): string {\n // A row is labelled by it's row headers.\n return [...state.collection.rowHeaderColumnKeys].map(columnKey =>\n getCellId(state, rowKey, columnKey)\n ).join(' ');\n}\n"],"names":[],"version":3,"file":"utils.module.js.map"}
@@ -0,0 +1,67 @@
{
"name": "tsconfig-paths",
"version": "3.15.0",
"description": "Load node modules according to tsconfig paths, in run-time or via API.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"author": "Jonas Kello",
"license": "MIT",
"repository": "https://github.com/dividab/tsconfig-paths",
"files": [
"/src",
"/lib",
"register.js",
"package.json",
"CHANGELOG.md",
"LICENSE",
"README.md"
],
"devDependencies": {
"@types/jest": "^27.0.3",
"@types/minimist": "^1.2.2",
"@types/node": "^6.0.54",
"@types/strip-bom": "^3.0.0",
"@types/strip-json-comments": "^0.0.30",
"husky": "^4.2.5",
"jest": "^27.3.1",
"lint-staged": "^10.2.11",
"prettier": "^2.0.5",
"rimraf": "^2.6.2",
"ts-jest": "^27.0.7",
"ts-node": "^10.7.0",
"tslint": "^5.8.0",
"typescript": "^4.5.2"
},
"dependencies": {
"@types/json5": "^0.0.29",
"json5": "^1.0.2",
"minimist": "^1.2.6",
"strip-bom": "^3.0.0"
},
"scripts": {
"start": "cd src && ts-node index.ts",
"example:node": "yarn build && cd ./example/node && ts-node -r ../register.js main.ts",
"example:project": "yarn build && ts-node -r ./register.js -P ./example/project/tsconfig.json ./example/project/main.ts",
"example:api": "cd example/api && ts-node main.ts",
"example:perf": "cd example/perf && ts-node main.ts",
"test": "jest",
"test-coverage": "jest --coverage",
"build": "rimraf lib && tsc -p .",
"lint": "tslint './{src,tests}/**/*.ts{,x}'",
"verify": "yarn build && yarn lint && yarn test-coverage",
"preversion": "yarn verify",
"postversion": "git push --tags && yarn publish --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\""
},
"lint-staged": {
"*.{ts,tsx}": "tslint",
"*.{ts,tsx,json,css}": [
"prettier --write",
"git add"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('forOwn', require('../forOwn'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,74 @@
// Serbian Cyrillic [sr-cyrl]
import dayjs from '../index';
var translator = {
words: {
m: ['један минут', 'једног минута'],
mm: ['%d минут', '%d минута', '%d минута'],
h: ['један сат', 'једног сата'],
hh: ['%d сат', '%d сата', '%d сати'],
d: ['један дан', 'једног дана'],
dd: ['%d дан', '%d дана', '%d дана'],
M: ['један месец', 'једног месеца'],
MM: ['%d месец', '%d месеца', '%d месеци'],
y: ['једну годину', 'једне године'],
yy: ['%d годину', '%d године', '%d година']
},
correctGrammarCase: function correctGrammarCase(number, wordKey) {
if (number % 10 >= 1 && number % 10 <= 4 && (number % 100 < 10 || number % 100 >= 20)) {
return number % 10 === 1 ? wordKey[0] : wordKey[1];
}
return wordKey[2];
},
relativeTimeFormatter: function relativeTimeFormatter(number, withoutSuffix, key, isFuture) {
var wordKey = translator.words[key];
if (key.length === 1) {
// Nominativ
if (key === 'y' && withoutSuffix) return 'једна година';
return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
}
var word = translator.correctGrammarCase(number, wordKey); // Nominativ
if (key === 'yy' && withoutSuffix && word === '%d годину') return number + " \u0433\u043E\u0434\u0438\u043D\u0430";
return word.replace('%d', number);
}
};
var locale = {
name: 'sr-cyrl',
weekdays: 'Недеља_Понедељак_Уторак_Среда_Четвртак_Петак_Субота'.split('_'),
weekdaysShort: 'Нед._Пон._Уто._Сре._Чет._Пет._Суб.'.split('_'),
weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
months: 'Јануар_Фебруар_Март_Април_Мај_Јун_Јул_Август_Септембар_Октобар_Новембар_Децембар'.split('_'),
monthsShort: 'Јан._Феб._Мар._Апр._Мај_Јун_Јул_Авг._Сеп._Окт._Нов._Дец.'.split('_'),
weekStart: 1,
relativeTime: {
future: 'за %s',
past: 'пре %s',
s: 'неколико секунди',
m: translator.relativeTimeFormatter,
mm: translator.relativeTimeFormatter,
h: translator.relativeTimeFormatter,
hh: translator.relativeTimeFormatter,
d: translator.relativeTimeFormatter,
dd: translator.relativeTimeFormatter,
M: translator.relativeTimeFormatter,
MM: translator.relativeTimeFormatter,
y: translator.relativeTimeFormatter,
yy: translator.relativeTimeFormatter
},
ordinal: function ordinal(n) {
return n + ".";
},
formats: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'D. M. YYYY.',
LL: 'D. MMMM YYYY.',
LLL: 'D. MMMM YYYY. H:mm',
LLLL: 'dddd, D. MMMM YYYY. H:mm'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["../../../src/ast-types/generated/index.ts"],"sourcesContent":["// NOTE: This file is autogenerated. Do not modify.\n// See packages/babel-types/scripts/generators/ast-types.ts for script used.\n\ninterface BaseComment {\n value: string;\n start?: number;\n end?: number;\n loc?: SourceLocation;\n // generator will skip the comment if ignore is true\n ignore?: boolean;\n type: \"CommentBlock\" | \"CommentLine\";\n}\n\ninterface Position {\n line: number;\n column: number;\n index: number;\n}\n\nexport interface CommentBlock extends BaseComment {\n type: \"CommentBlock\";\n}\n\nexport interface CommentLine extends BaseComment {\n type: \"CommentLine\";\n}\n\nexport type Comment = CommentBlock | CommentLine;\n\nexport interface SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: string | undefined | null;\n}\n\ninterface BaseNode {\n leadingComments?: Comment[] | null;\n innerComments?: Comment[] | null;\n trailingComments?: Comment[] | null;\n start?: number | null;\n end?: number | null;\n loc?: SourceLocation | null;\n range?: [number, number];\n extra?: Record<string, unknown>;\n}\n\nexport type CommentTypeShorthand = \"leading\" | \"inner\" | \"trailing\";\n\nexport type Node =\n | AnyTypeAnnotation\n | ArgumentPlaceholder\n | ArrayExpression\n | ArrayPattern\n | ArrayTypeAnnotation\n | ArrowFunctionExpression\n | AssignmentExpression\n | AssignmentPattern\n | AwaitExpression\n | BigIntLiteral\n | BinaryExpression\n | BindExpression\n | BlockStatement\n | BooleanLiteral\n | BooleanLiteralTypeAnnotation\n | BooleanTypeAnnotation\n | BreakStatement\n | CallExpression\n | CatchClause\n | ClassAccessorProperty\n | ClassBody\n | ClassDeclaration\n | ClassExpression\n | ClassImplements\n | ClassMethod\n | ClassPrivateMethod\n | ClassPrivateProperty\n | ClassProperty\n | ConditionalExpression\n | ContinueStatement\n | DebuggerStatement\n | DecimalLiteral\n | DeclareClass\n | DeclareExportAllDeclaration\n | DeclareExportDeclaration\n | DeclareFunction\n | DeclareInterface\n | DeclareModule\n | DeclareModuleExports\n | DeclareOpaqueType\n | DeclareTypeAlias\n | DeclareVariable\n | DeclaredPredicate\n | Decorator\n | Directive\n | DirectiveLiteral\n | DoExpression\n | DoWhileStatement\n | EmptyStatement\n | EmptyTypeAnnotation\n | EnumBooleanBody\n | EnumBooleanMember\n | EnumDeclaration\n | EnumDefaultedMember\n | EnumNumberBody\n | EnumNumberMember\n | EnumStringBody\n | EnumStringMember\n | EnumSymbolBody\n | ExistsTypeAnnotation\n | ExportAllDeclaration\n | ExportDefaultDeclaration\n | ExportDefaultSpecifier\n | ExportNamedDeclaration\n | ExportNamespaceSpecifier\n | ExportSpecifier\n | ExpressionStatement\n | File\n | ForInStatement\n | ForOfStatement\n | ForStatement\n | FunctionDeclaration\n | FunctionExpression\n | FunctionTypeAnnotation\n | FunctionTypeParam\n | GenericTypeAnnotation\n | Identifier\n | IfStatement\n | Import\n | ImportAttribute\n | ImportDeclaration\n | ImportDefaultSpecifier\n | ImportExpression\n | ImportNamespaceSpecifier\n | ImportSpecifier\n | IndexedAccessType\n | InferredPredicate\n | InterfaceDeclaration\n | InterfaceExtends\n | InterfaceTypeAnnotation\n | InterpreterDirective\n | IntersectionTypeAnnotation\n | JSXAttribute\n | JSXClosingElement\n | JSXClosingFragment\n | JSXElement\n | JSXEmptyExpression\n | JSXExpressionContainer\n | JSXFragment\n | JSXIdentifier\n | JSXMemberExpression\n | JSXNamespacedName\n | JSXOpeningElement\n | JSXOpeningFragment\n | JSXSpreadAttribute\n | JSXSpreadChild\n | JSXText\n | LabeledStatement\n | LogicalExpression\n | MemberExpression\n | MetaProperty\n | MixedTypeAnnotation\n | ModuleExpression\n | NewExpression\n | Noop\n | NullLiteral\n | NullLiteralTypeAnnotation\n | NullableTypeAnnotation\n | NumberLiteral\n | NumberLiteralTypeAnnotation\n | NumberTypeAnnotation\n | NumericLiteral\n | ObjectExpression\n | ObjectMethod\n | ObjectPattern\n | ObjectProperty\n | ObjectTypeAnnotation\n | ObjectTypeCallProperty\n | ObjectTypeIndexer\n | ObjectTypeInternalSlot\n | ObjectTypeProperty\n | ObjectTypeSpreadProperty\n | OpaqueType\n | OptionalCallExpression\n | OptionalIndexedAccessType\n | OptionalMemberExpression\n | ParenthesizedExpression\n | PipelineBareFunction\n | PipelinePrimaryTopicReference\n | PipelineTopicExpression\n | Placeholder\n | PrivateName\n | Program\n | QualifiedTypeIdentifier\n | RecordExpression\n | RegExpLiteral\n | RegexLiteral\n | RestElement\n | RestProperty\n | ReturnStatement\n | SequenceExpression\n | SpreadElement\n | SpreadProperty\n | StaticBlock\n | StringLiteral\n | StringLiteralTypeAnnotation\n | StringTypeAnnotation\n | Super\n | SwitchCase\n | SwitchStatement\n | SymbolTypeAnnotation\n | TSAnyKeyword\n | TSArrayType\n | TSAsExpression\n | TSBigIntKeyword\nLine truncated
@@ -0,0 +1,73 @@
'use strict';
var test = require('tape');
var hasToStringTag = require('has-tostringtag/shams')();
var inspect = require('object-inspect');
var isBoolean = require('../');
test('not Booleans', function (t) {
t.test('primitives', function (st) {
// @ts-expect-error
st.notOk(isBoolean(), 'undefined is not Boolean');
st.notOk(isBoolean(null), 'null is not Boolean');
st.notOk(isBoolean(0), '0 is not Boolean');
st.notOk(isBoolean(NaN), 'NaN is not Boolean');
st.notOk(isBoolean(Infinity), 'Infinity is not Boolean');
st.notOk(isBoolean('foo'), 'string is not Boolean');
st.end();
});
t.test('objects', function (st) {
st.notOk(isBoolean(Object(42)), 'number object is not Boolean');
st.notOk(isBoolean([]), 'array is not Boolean');
st.notOk(isBoolean({}), 'object is not Boolean');
st.notOk(isBoolean(function () {}), 'function is not Boolean');
st.notOk(isBoolean(/a/g), 'regex literal is not Boolean');
st.notOk(isBoolean(new RegExp('a', 'g')), 'regex object is not Boolean');
st.notOk(isBoolean(new Date()), 'new Date() is not Boolean');
st.end();
});
t.end();
});
test('@@toStringTag', { skip: !hasToStringTag }, function (t) {
/** @type {{ toString(): unknown; valueOf(): unknown; [Symbol.toStringTag]?: string; }} */
var fakeBoolean = {
toString: function () { return 'true'; },
valueOf: function () { return true; }
};
fakeBoolean[Symbol.toStringTag] = 'Boolean';
t.notOk(isBoolean(fakeBoolean), 'fake Boolean with @@toStringTag "Boolean" is not Boolean');
t.end();
});
test('Booleans', function (t) {
t.ok(isBoolean(true), 'true is Boolean');
t.ok(isBoolean(false), 'false is Boolean');
t.ok(isBoolean(Object(true)), 'Object(true) is Boolean');
t.ok(isBoolean(Object(false)), 'Object(false) is Boolean');
t.end();
});
test('Proxy', { skip: typeof Proxy !== 'function' || !hasToStringTag }, function (t) {
/** @type {Record<PropertyKey, unknown>} */
var target = {};
target[Symbol.toStringTag] = 'Boolean';
var fake = new Proxy(target, { has: function () { return false; } });
t.equal(
isBoolean(target),
false,
inspect(target) + ' is not a Boolean'
);
t.equal(
isBoolean(fake),
false,
inspect(fake) + ' is not a Boolean'
);
t.end();
});
@@ -0,0 +1,77 @@
{
"name": "uri-js",
"version": "4.4.1",
"description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.",
"main": "dist/es5/uri.all.js",
"types": "dist/es5/uri.all.d.ts",
"directories": {
"test": "tests"
},
"files": [
"dist",
"package.json",
"yarn.lock",
"README.md",
"CHANGELOG",
"LICENSE"
],
"scripts": {
"build:esnext": "tsc",
"build:es5": "rollup -c && cp dist/esnext/uri.d.ts dist/es5/uri.all.d.ts && npm run build:es5:fix-sourcemap",
"build:es5:fix-sourcemap": "sorcery -i dist/es5/uri.all.js",
"build:es5:min": "uglifyjs dist/es5/uri.all.js --support-ie8 --output dist/es5/uri.all.min.js --in-source-map dist/es5/uri.all.js.map --source-map uri.all.min.js.map --comments --compress --mangle --pure-funcs merge subexp && mv uri.all.min.js.map dist/es5/ && cp dist/es5/uri.all.d.ts dist/es5/uri.all.min.d.ts",
"build": "npm run build:esnext && npm run build:es5 && npm run build:es5:min",
"clean": "rm -rf dist",
"test": "mocha -u mocha-qunit-ui dist/es5/uri.all.js tests/tests.js"
},
"repository": {
"type": "git",
"url": "http://github.com/garycourt/uri-js"
},
"keywords": [
"URI",
"IRI",
"IDN",
"URN",
"UUID",
"HTTP",
"HTTPS",
"WS",
"WSS",
"MAILTO",
"RFC3986",
"RFC3987",
"RFC5891",
"RFC2616",
"RFC2818",
"RFC2141",
"RFC4122",
"RFC4291",
"RFC5952",
"RFC6068",
"RFC6455",
"RFC6874"
],
"author": "Gary Court <gary.court@gmail.com>",
"license": "BSD-2-Clause",
"bugs": {
"url": "https://github.com/garycourt/uri-js/issues"
},
"homepage": "https://github.com/garycourt/uri-js",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-latest": "^6.24.1",
"mocha": "^8.2.1",
"mocha-qunit-ui": "^0.1.3",
"rollup": "^0.41.6",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-node-resolve": "^2.0.0",
"sorcery": "^0.10.0",
"typescript": "^2.8.1",
"uglify-js": "^2.8.14"
},
"dependencies": {
"punycode": "^2.1.0"
}
}
@@ -0,0 +1,8 @@
import Settings from '../../settings';
import { ErrorFilterFunction } from '../../types';
export default class ErrorFilter {
private readonly _settings;
constructor(_settings: Settings);
getFilter(): ErrorFilterFunction;
private _isNonFatalError;
}
@@ -0,0 +1,137 @@
// @flow
import createListComponent from './createListComponent';
import type { Props, ScrollToAlign } from './createListComponent';
type InstanceProps = any;
const FixedSizeList = createListComponent({
getItemOffset: ({ itemSize }: Props<any>, index: number): number =>
index * ((itemSize: any): number),
getItemSize: ({ itemSize }: Props<any>, index: number): number =>
((itemSize: any): number),
getEstimatedTotalSize: ({ itemCount, itemSize }: Props<any>) =>
((itemSize: any): number) * itemCount,
getOffsetForIndexAndAlignment: (
{ direction, height, itemCount, itemSize, layout, width }: Props<any>,
index: number,
align: ScrollToAlign,
scrollOffset: number,
instanceProps: InstanceProps,
scrollbarSize: number
): number => {
// TODO Deprecate direction "horizontal"
const isHorizontal = direction === 'horizontal' || layout === 'horizontal';
const size = (((isHorizontal ? width : height): any): number);
const lastItemOffset = Math.max(
0,
itemCount * ((itemSize: any): number) - size
);
const maxOffset = Math.min(
lastItemOffset,
index * ((itemSize: any): number)
);
const minOffset = Math.max(
0,
index * ((itemSize: any): number) -
size +
((itemSize: any): number) +
scrollbarSize
);
if (align === 'smart') {
if (
scrollOffset >= minOffset - size &&
scrollOffset <= maxOffset + size
) {
align = 'auto';
} else {
align = 'center';
}
}
switch (align) {
case 'start':
return maxOffset;
case 'end':
return minOffset;
case 'center': {
// "Centered" offset is usually the average of the min and max.
// But near the edges of the list, this doesn't hold true.
const middleOffset = Math.round(
minOffset + (maxOffset - minOffset) / 2
);
if (middleOffset < Math.ceil(size / 2)) {
return 0; // near the beginning
} else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {
return lastItemOffset; // near the end
} else {
return middleOffset;
}
}
case 'auto':
default:
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
return scrollOffset;
} else if (scrollOffset < minOffset) {
return minOffset;
} else {
return maxOffset;
}
}
},
getStartIndexForOffset: (
{ itemCount, itemSize }: Props<any>,
offset: number
): number =>
Math.max(
0,
Math.min(itemCount - 1, Math.floor(offset / ((itemSize: any): number)))
),
getStopIndexForStartIndex: (
{ direction, height, itemCount, itemSize, layout, width }: Props<any>,
startIndex: number,
scrollOffset: number
): number => {
// TODO Deprecate direction "horizontal"
const isHorizontal = direction === 'horizontal' || layout === 'horizontal';
const offset = startIndex * ((itemSize: any): number);
const size = (((isHorizontal ? width : height): any): number);
const numVisibleItems = Math.ceil(
(size + scrollOffset - offset) / ((itemSize: any): number)
);
return Math.max(
0,
Math.min(
itemCount - 1,
startIndex + numVisibleItems - 1 // -1 is because stop index is inclusive
)
);
},
initInstanceProps(props: Props<any>): any {
// Noop
},
shouldResetStyleCacheOnItemSizeChange: true,
validateProps: ({ itemSize }: Props<any>): void => {
if (process.env.NODE_ENV !== 'production') {
if (typeof itemSize !== 'number') {
throw Error(
'An invalid "itemSize" prop has been specified. ' +
'Value should be a number. ' +
`"${itemSize === null ? 'null' : typeof itemSize}" was specified.`
);
}
}
},
});
export default FixedSizeList;
@@ -0,0 +1,375 @@
import * as _codemirror_state from '@codemirror/state';
import { Text, Extension, StateCommand, EditorState, SelectionRange, StateEffect } from '@codemirror/state';
import { Command, KeyBinding, EditorView, Panel } from '@codemirror/view';
/**
A search cursor provides an iterator over text matches in a
document.
*/
declare class SearchCursor implements Iterator<{
from: number;
to: number;
}> {
private test?;
private iter;
/**
The current match (only holds a meaningful value after
[`next`](https://codemirror.net/6/docs/ref/#search.SearchCursor.next) has been called and when
`done` is false).
*/
value: {
from: number;
to: number;
};
/**
Whether the end of the iterated region has been reached.
*/
done: boolean;
private matches;
private buffer;
private bufferPos;
private bufferStart;
private normalize;
private query;
/**
Create a text cursor. The query is the search string, `from` to
`to` provides the region to search.
When `normalize` is given, it will be called, on both the query
string and the content it is matched against, before comparing.
You can, for example, create a case-insensitive search by
passing `s => s.toLowerCase()`.
Text is always normalized with
[`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
(when supported).
*/
constructor(text: Text, query: string, from?: number, to?: number, normalize?: (string: string) => string, test?: ((from: number, to: number, buffer: string, bufferPos: number) => boolean) | undefined);
private peek;
/**
Look for the next match. Updates the iterator's
[`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
[`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
at least once before using the cursor.
*/
next(): this;
/**
The `next` method will ignore matches that partially overlap a
previous match. This method behaves like `next`, but includes
such matches.
*/
nextOverlapping(): this;
private match;
[Symbol.iterator]: () => Iterator<{
from: number;
to: number;
}>;
}
interface RegExpCursorOptions {
ignoreCase?: boolean;
test?: (from: number, to: number, match: RegExpExecArray) => boolean;
}
/**
This class is similar to [`SearchCursor`](https://codemirror.net/6/docs/ref/#search.SearchCursor)
but searches for a regular expression pattern instead of a plain
string.
*/
declare class RegExpCursor implements Iterator<{
from: number;
to: number;
match: RegExpExecArray;
}> {
private text;
private to;
private iter;
private re;
private test?;
private curLine;
private curLineStart;
private matchPos;
/**
Set to `true` when the cursor has reached the end of the search
range.
*/
done: boolean;
/**
Will contain an object with the extent of the match and the
match object when [`next`](https://codemirror.net/6/docs/ref/#search.RegExpCursor.next)
sucessfully finds a match.
*/
value: {
from: number;
to: number;
match: RegExpExecArray;
};
/**
Create a cursor that will search the given range in the given
document. `query` should be the raw pattern (as you'd pass it to
`new RegExp`).
*/
constructor(text: Text, query: string, options?: RegExpCursorOptions, from?: number, to?: number);
private getLine;
private nextLine;
/**
Move to the next match, if there is one.
*/
next(): this;
[Symbol.iterator]: () => Iterator<{
from: number;
to: number;
match: RegExpExecArray;
}>;
}
/**
Command that shows a dialog asking the user for a line number, and
when a valid position is provided, moves the cursor to that line.
Supports line numbers, relative line offsets prefixed with `+` or
`-`, document percentages suffixed with `%`, and an optional
column position by adding `:` and a second number after the line
number.
*/
declare const gotoLine: Command;
type HighlightOptions = {
/**
Determines whether, when nothing is selected, the word around
the cursor is matched instead. Defaults to false.
*/
highlightWordAroundCursor?: boolean;
/**
The minimum length of the selection before it is highlighted.
Defaults to 1 (always highlight non-cursor selections).
*/
minSelectionLength?: number;
/**
The amount of matches (in the viewport) at which to disable
highlighting. Defaults to 100.
*/
maxMatches?: number;
/**
Whether to only highlight whole words.
*/
wholeWords?: boolean;
};
/**
This extension highlights text that matches the selection. It uses
the `"cm-selectionMatch"` class for the highlighting. When
`highlightWordAroundCursor` is enabled, the word at the cursor
itself will be highlighted with `"cm-selectionMatch-main"`.
*/
declare function highlightSelectionMatches(options?: HighlightOptions): Extension;
/**
Select next occurrence of the current selection. Expand selection
to the surrounding word when the selection is empty.
*/
declare const selectNextOccurrence: StateCommand;
interface SearchConfig {
/**
Whether to position the search panel at the top of the editor
(the default is at the bottom).
*/
top?: boolean;
/**
Whether to enable case sensitivity by default when the search
panel is activated (defaults to false).
*/
caseSensitive?: boolean;
/**
Whether to treat string searches literally by default (defaults to false).
*/
literal?: boolean;
/**
Controls whether the default query has by-word matching enabled.
Defaults to false.
*/
wholeWord?: boolean;
/**
Used to turn on regular expression search in the default query.
Defaults to false.
*/
regexp?: boolean;
/**
Can be used to override the way the search panel is implemented.
Should create a [Panel](https://codemirror.net/6/docs/ref/#view.Panel) that contains a form
which lets the user:
- See the [current](https://codemirror.net/6/docs/ref/#search.getSearchQuery) search query.
- Manipulate the [query](https://codemirror.net/6/docs/ref/#search.SearchQuery) and
[update](https://codemirror.net/6/docs/ref/#search.setSearchQuery) the search state with a new
query.
- Notice external changes to the query by reacting to the
appropriate [state effect](https://codemirror.net/6/docs/ref/#search.setSearchQuery).
- Run some of the search commands.
The field that should be focused when opening the panel must be
tagged with a `main-field=true` DOM attribute.
*/
createPanel?: (view: EditorView) => Panel;
/**
By default, matches are scrolled into view using the default
behavior of
[`EditorView.scrollIntoView`](https://codemirror.net/6/docs/ref/#view.EditorView^scrollIntoView).
This option allows you to pass a custom function to produce the
scroll effect.
*/
scrollToMatch?: (range: SelectionRange, view: EditorView) => StateEffect<unknown>;
}
/**
Add search state to the editor configuration, and optionally
configure the search extension.
([`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel) will automatically
enable this if it isn't already on).
*/
declare function search(config?: SearchConfig): Extension;
/**
A search query. Part of the editor's search state.
*/
declare class SearchQuery {
/**
The search string (or regular expression).
*/
readonly search: string;
/**
Indicates whether the search is case-sensitive.
*/
readonly caseSensitive: boolean;
/**
By default, string search will replace `\n`, `\r`, and `\t` in
the query with newline, return, and tab characters. When this
is set to true, that behavior is disabled.
*/
readonly literal: boolean;
/**
When true, the search string is interpreted as a regular
expression.
*/
readonly regexp: boolean;
/**
The replace text, or the empty string if no replace text has
been given.
*/
readonly replace: string;
/**
Whether this query is non-empty and, in case of a regular
expression search, syntactically valid.
*/
readonly valid: boolean;
/**
When true, matches that contain words are ignored when there are
further word characters around them.
*/
readonly wholeWord: boolean;
/**
Create a query object.
*/
constructor(config: {
/**
The search string.
*/
search: string;
/**
Controls whether the search should be case-sensitive.
*/
caseSensitive?: boolean;
/**
By default, string search will replace `\n`, `\r`, and `\t` in
the query with newline, return, and tab characters. When this
is set to true, that behavior is disabled.
*/
literal?: boolean;
/**
When true, interpret the search string as a regular expression.
*/
regexp?: boolean;
/**
The replace text.
*/
replace?: string;
/**
Enable whole-word matching.
*/
wholeWord?: boolean;
});
/**
Compare this query to another query.
*/
eq(other: SearchQuery): boolean;
/**
Get a search cursor for this query, searching through the given
range in the given state.
*/
getCursor(state: EditorState | Text, from?: number, to?: number): Iterator<{
from: number;
to: number;
}>;
}
/**
A state effect that updates the current search query. Note that
this only has an effect if the search state has been initialized
(by including [`search`](https://codemirror.net/6/docs/ref/#search.search) in your configuration or
by running [`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel) at least
once).
*/
declare const setSearchQuery: _codemirror_state.StateEffectType<SearchQuery>;
/**
Get the current search query from an editor state.
*/
declare function getSearchQuery(state: EditorState): SearchQuery;
/**
Query whether the search panel is open in the given editor state.
*/
declare function searchPanelOpen(state: EditorState): boolean;
/**
Open the search panel if it isn't already open, and move the
selection to the first match after the current main selection.
Will wrap around to the start of the document when it reaches the
end.
*/
declare const findNext: Command;
/**
Move the selection to the previous instance of the search query,
before the current main selection. Will wrap past the start
of the document to start searching at the end again.
*/
declare const findPrevious: Command;
/**
Select all instances of the search query.
*/
declare const selectMatches: Command;
/**
Select all instances of the currently selected text.
*/
declare const selectSelectionMatches: StateCommand;
/**
Replace the current match of the search query.
*/
declare const replaceNext: Command;
/**
Replace all instances of the search query with the given
replacement.
*/
declare const replaceAll: Command;
/**
Make sure the search panel is open and focused.
*/
declare const openSearchPanel: Command;
/**
Close the search panel.
*/
declare const closeSearchPanel: Command;
/**
Default search-related key bindings.
- Mod-f: [`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel)
- F3, Mod-g: [`findNext`](https://codemirror.net/6/docs/ref/#search.findNext)
- Shift-F3, Shift-Mod-g: [`findPrevious`](https://codemirror.net/6/docs/ref/#search.findPrevious)
- Mod-Alt-g: [`gotoLine`](https://codemirror.net/6/docs/ref/#search.gotoLine)
- Mod-d: [`selectNextOccurrence`](https://codemirror.net/6/docs/ref/#search.selectNextOccurrence)
*/
declare const searchKeymap: readonly KeyBinding[];
export { RegExpCursor, SearchCursor, SearchQuery, closeSearchPanel, findNext, findPrevious, getSearchQuery, gotoLine, highlightSelectionMatches, openSearchPanel, replaceAll, replaceNext, search, searchKeymap, searchPanelOpen, selectMatches, selectNextOccurrence, selectSelectionMatches, setSearchQuery };
@@ -0,0 +1,367 @@
flf2a 1 1 10 -1 8
rot13.flf (C) 1994 by Victor Parada (vparada@inf.utfsm.cl) 94/12/28.
Based on Terminal by Glenn Chappell 4/93
Includes characters 128-255
figlet release 2.1 -- 12 Aug 1994
@
!@
"@
#@
$@
%@
&@
'@
(@
)@
*@
+@
,@
-@
.@
/@
0@
1@
2@
3@
4@
5@
6@
7@
8@
9@
:@
;@
<@
=@
>@
?@
@#
N@
O@
P@
Q@
R@
S@
T@
U@
V@
W@
X@
Y@
Z@
A@
B@
C@
D@
E@
F@
G@
H@
I@
J@
K@
L@
M@
[@
\@
]@
^@
_@
`@
n@
o@
p@
q@
r@
s@
t@
u@
v@
w@
x@
y@
z@
a@
b@
c@
d@
e@
f@
g@
h@
i@
j@
k@
l@
m@
{@
|@
}@
~@
願
淐
軹
裰
蠩
廹
稛
128
�@
129
�
130
�
131
�
132
�
133
�
134
�
135
䏰
136
㇀
137
𪎩
138
𧶄
139
𣏴
140
倻
141
𠮟
142
𣻗
143
蕋
144
趩
145
𥜆
146
𡏆
147
媁
148
銉
149
𦅜
150
桇
151
愌
152
𦴦
153
䄉
154
鋣
155
𡨭
156
嵛
157
𨆉
158
𠺢
159
籖
160
𨩚
161
 
162
\
163
w
164
一
165
世
166
共
167
作
168
杓
169
咖
170
昇
171
陂
172
拯
173
耐
174
哦
175
浬
176
虔
177
娼
178
毫
179
莆
180
婷
181
溉
182
詔
183
媳
184
睹
185
辟
186
愿
187
罰
188
劇
189
瑾
190
輥
191
濃
192
錐
193
瞧
194
駿
195
鞭
196
願
197
護
198
讖
199
す
200
Л
201
乂
202
汌
203
杙
204
坨
205
泒
206
哃
207
柜
208
穾
209
唊
210
毨
211
笄
212
酎
213
崰
214
淐
215
耞
216
釫
217
惲
218
湨
219
罦
220
軹
221
媷
222
毹
223
稛
224
觡
225
凘
226
榠
227
禗
228
裰
229
噚
230
澍
231
膞
232
踔
233
噳
234
澢
235
蕀
236
錋
237
檕
238
蕷
239
鞞
240
璸
241
蹛
242
徿
243
譑
244
嚵
245
鏼
246
蠩
247
糴
248
讌
249
纘
250
𠕇
251
𨦼
252
廹
253
𣑯
254
鑂
255
�@
@@ -0,0 +1,169 @@
import { __read, __spreadArray } from "tslib";
import { useCallback, useRef, useState } from 'react';
import isDev from '../utils/isDev';
var useDynamicList = function (initialList) {
if (initialList === void 0) { initialList = []; }
var counterRef = useRef(-1);
var keyList = useRef([]);
var setKey = useCallback(function (index) {
counterRef.current += 1;
keyList.current.splice(index, 0, counterRef.current);
}, []);
var _a = __read(useState(function () {
initialList.forEach(function (_, index) {
setKey(index);
});
return initialList;
}), 2), list = _a[0], setList = _a[1];
var resetList = useCallback(function (newList) {
keyList.current = [];
setList(function () {
newList.forEach(function (_, index) {
setKey(index);
});
return newList;
});
}, []);
var insert = useCallback(function (index, item) {
setList(function (l) {
var temp = __spreadArray([], __read(l), false);
temp.splice(index, 0, item);
setKey(index);
return temp;
});
}, []);
var getKey = useCallback(function (index) { return keyList.current[index]; }, []);
var getIndex = useCallback(function (key) { return keyList.current.findIndex(function (ele) { return ele === key; }); }, []);
var merge = useCallback(function (index, items) {
setList(function (l) {
var temp = __spreadArray([], __read(l), false);
items.forEach(function (_, i) {
setKey(index + i);
});
temp.splice.apply(temp, __spreadArray([index, 0], __read(items), false));
return temp;
});
}, []);
var replace = useCallback(function (index, item) {
setList(function (l) {
var temp = __spreadArray([], __read(l), false);
temp[index] = item;
return temp;
});
}, []);
var remove = useCallback(function (index) {
setList(function (l) {
var temp = __spreadArray([], __read(l), false);
temp.splice(index, 1);
// remove keys if necessary
try {
keyList.current.splice(index, 1);
}
catch (e) {
console.error(e);
}
return temp;
});
}, []);
var batchRemove = useCallback(function (indexes) {
if (!Array.isArray(indexes)) {
if (isDev) {
console.error("`indexes` parameter of `batchRemove` function expected to be an array, but got \"".concat(typeof indexes, "\"."));
}
return;
}
if (!indexes.length) {
return;
}
setList(function (prevList) {
var newKeyList = [];
var newList = prevList.filter(function (item, index) {
var shouldKeep = !indexes.includes(index);
if (shouldKeep) {
newKeyList.push(getKey(index));
}
return shouldKeep;
});
keyList.current = newKeyList;
return newList;
});
}, []);
var move = useCallback(function (oldIndex, newIndex) {
if (oldIndex === newIndex) {
return;
}
setList(function (l) {
var newList = __spreadArray([], __read(l), false);
var temp = newList.filter(function (_, index) { return index !== oldIndex; });
temp.splice(newIndex, 0, newList[oldIndex]);
// move keys if necessary
try {
var keyTemp = keyList.current.filter(function (_, index) { return index !== oldIndex; });
keyTemp.splice(newIndex, 0, keyList.current[oldIndex]);
keyList.current = keyTemp;
}
catch (e) {
console.error(e);
}
return temp;
});
}, []);
var push = useCallback(function (item) {
setList(function (l) {
setKey(l.length);
return l.concat([item]);
});
}, []);
var pop = useCallback(function () {
// remove keys if necessary
try {
keyList.current = keyList.current.slice(0, keyList.current.length - 1);
}
catch (e) {
console.error(e);
}
setList(function (l) { return l.slice(0, l.length - 1); });
}, []);
var unshift = useCallback(function (item) {
setList(function (l) {
setKey(0);
return [item].concat(l);
});
}, []);
var shift = useCallback(function () {
// remove keys if necessary
try {
keyList.current = keyList.current.slice(1, keyList.current.length);
}
catch (e) {
console.error(e);
}
setList(function (l) { return l.slice(1, l.length); });
}, []);
var sortList = useCallback(function (result) {
return result
.map(function (item, index) { return ({ key: index, item: item }); }) // add index into obj
.sort(function (a, b) { return getIndex(a.key) - getIndex(b.key); }) // sort based on the index of table
.filter(function (item) { return !!item.item; }) // remove undefined(s)
.map(function (item) { return item.item; });
}, // retrive the data
[]);
return {
list: list,
insert: insert,
merge: merge,
replace: replace,
remove: remove,
batchRemove: batchRemove,
getKey: getKey,
getIndex: getIndex,
move: move,
push: push,
pop: pop,
unshift: unshift,
shift: shift,
sortList: sortList,
resetList: resetList,
};
};
export default useDynamicList;
@@ -0,0 +1,49 @@
function buildProjectionTransform(delta, treeScale, latestTransform) {
let transform = "";
/**
* The translations we use to calculate are always relative to the viewport coordinate space.
* But when we apply scales, we also scale the coordinate space of an element and its children.
* For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need
* to move an element 100 pixels, we actually need to move it 200 in within that scaled space.
*/
const xTranslate = delta.x.translate / treeScale.x;
const yTranslate = delta.y.translate / treeScale.y;
const zTranslate = latestTransform?.z || 0;
if (xTranslate || yTranslate || zTranslate) {
transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;
}
/**
* Apply scale correction for the tree transform.
* This will apply scale to the screen-orientated axes.
*/
if (treeScale.x !== 1 || treeScale.y !== 1) {
transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;
}
if (latestTransform) {
const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY } = latestTransform;
if (transformPerspective)
transform = `perspective(${transformPerspective}px) ${transform}`;
if (rotate)
transform += `rotate(${rotate}deg) `;
if (rotateX)
transform += `rotateX(${rotateX}deg) `;
if (rotateY)
transform += `rotateY(${rotateY}deg) `;
if (skewX)
transform += `skewX(${skewX}deg) `;
if (skewY)
transform += `skewY(${skewY}deg) `;
}
/**
* Apply scale to match the size of the element to the size we want it.
* This will apply scale to the element-orientated axes.
*/
const elementScaleX = delta.x.scale * treeScale.x;
const elementScaleY = delta.y.scale * treeScale.y;
if (elementScaleX !== 1 || elementScaleY !== 1) {
transform += `scale(${elementScaleX}, ${elementScaleY})`;
}
return transform || "none";
}
export { buildProjectionTransform };
@@ -0,0 +1,41 @@
var baseAssignValue = require('./_baseAssignValue'),
createAggregator = require('./_createAggregator');
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The order of grouped values
* is determined by the order they occur in `collection`. The corresponding
* value of each key is an array of elements responsible for generating the
* key. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* _.groupBy([6.1, 4.2, 6.3], Math.floor);
* // => { '4': [4.2], '6': [6.1, 6.3] }
*
* // The `_.property` iteratee shorthand.
* _.groupBy(['one', 'two', 'three'], 'length');
* // => { '3': ['one', 'two'], '5': ['three'] }
*/
var groupBy = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
result[key].push(value);
} else {
baseAssignValue(result, key, [value]);
}
});
module.exports = groupBy;
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qGAAkG;AAchG,4GAdO,yDAA2B,OAcP;AAb7B,yGAAsG;AAcpG,8GAdO,6DAA6B,OAcP;AAb/B,qGAAkG;AAchG,4GAdO,yDAA2B,OAcP;AAb7B,6FAA0F;AAcxF,wGAdO,iDAAuB,OAcP;AAbzB,yFAAsF;AAcpF,sGAdO,6CAAqB,OAcP;AAbvB,yFAAsF;AAcpF,sGAdO,6CAAqB,OAcP;AAbvB,yFAAsF;AAcpF,sGAdO,6CAAqB,OAcP;AAbvB,mFAAgF;AAc9E,mGAdO,uCAAkB,OAcP;AAbpB,mFAAgF;AAc9E,mGAdO,uCAAkB,OAcP;AAbpB,+FAA4F;AAc1F,yGAdO,mDAAwB,OAcP;AAb1B,yFAAsF;AAcpF,sGAdO,6CAAqB,OAcP;AAbvB,iGAA8F;AAc5F,0GAdO,qDAAyB,OAcP"}
@@ -0,0 +1,53 @@
import { InstanceContext, NapCatCore } from '../../napcat-core';
import { Peer } from '../types';
export declare class NTQQOnlineApi {
context: InstanceContext;
core: NapCatCore;
constructor(context: InstanceContext, core: NapCatCore);
/**
* 这里不等待node返回,因为the fuck wrapper.node 根本不返回(会卡死不知道为什么)!!! 只能手动查询判断死活
* @param peer
* @param filePath
* @param fileName
*/
sendOnlineFile(peer: Peer, filePath: string, fileName: string): Promise<any>;
/**
* 发送在线文件夹
* @param peer
* @param folderPath
* @param folderName
*/
sendOnlineFolder(peer: Peer, folderPath: string, folderName?: string): Promise<any>;
/**
* 获取好友的在线文件消息
* @param peer
*/
getOnlineFileMsg(peer: Peer): Promise<any>;
/**
* 取消在线文件的发送
* @param peer
* @param msgId
*/
cancelMyOnlineFileMsg(peer: Peer, msgId: string): Promise<void>;
/**
* 拒绝接收在线文件
* @param peer
* @param msgId
* @param elementId
*/
refuseOnlineFileMsg(peer: Peer, msgId: string, elementId: string): Promise<void>;
/**
* 接收在线文件/文件夹
* @param peer
* @param msgId
* @param elementId
* @constructor
*/
receiveOnlineFileOrFolder(peer: Peer, msgId: string, elementId: string): Promise<any>;
/**
* 在线文件/文件夹转离线
* @param peer
* @param msgId
*/
switchFileToOffline(peer: Peer, msgId: string): Promise<void>;
}
@@ -0,0 +1,7 @@
"use client";
import {
table_row_default
} from "./chunk-CKWQQGXG.mjs";
export {
table_row_default as default
};
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC,GAED,gEAAgE;AAChE,gGAAgG;;AAKhG,MAAM,mCAAa,SAAS,gFAAgF;AAC5G,MAAM,0CAAoB,SAAS,4CAA4C;AAC/E,MAAM,4CAAsB;AAC5B,MAAM,0CAAoB;AAC1B,MAAM,4CAAsB;AAE5B,SAAS,yCAAmB,KAAa,EAAE,IAAY,EAAE,KAAa,EAAE,GAAW;IACjF,OAAO,MACL,KAAK,IAAI,CAAC,OAAQ,CAAA,QAAQ,CAAA,KAC1B,AAAC,CAAA,OAAO,CAAA,IAAK,MACb,KAAK,KAAK,CAAC,AAAC,CAAA,IAAI,KAAK,IAAG,IAAK,MAC7B,QAAQ;AACZ;AAEA,SAAS,yCAAmB,QAAkB,EAAE,KAAa,EAAE,EAAU;IACvE,IAAI,OAAO,KAAK,KAAK,CAAC,AAAC,CAAA,KAAM,CAAA,KAAK,KAAI,IAAK,KAAI,IAAK;IACpD,IAAI,QAAQ,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,AAAC,CAAA,KAAM,CAAA,KAAK,yCAAmB,OAAO,MAAM,GAAG,EAAC,CAAC,IAAK,QAAQ;IACjG,IAAI,MAAM,KAAK,yCAAmB,OAAO,MAAM,OAAO,KAAK;IAE3D,OAAO,IAAI,CAAA,GAAA,yCAAW,EAAE,UAAU,MAAM,OAAO;AACjD;AAEA,SAAS,iCAAW,IAAY;IAC9B,OAAO,AAAC,CAAA,KAAK,KAAK,IAAG,IAAK,KAAK;AACjC;AASO,MAAM;IAGX,cAAc,EAAU,EAAgB;QACtC,OAAO,yCAAmB,IAAI,EAAE,kCAAY;IAC9C;IAEA,YAAY,IAAqB,EAAE;QACjC,OAAO,yCAAmB,kCAAY,KAAK,IAAI,EAAE,KAAK,KAAK,EAAE,KAAK,GAAG;IACvE;IAEA,eAAe,IAAqB,EAAU;QAC5C,IAAI,SAAS,KAAK,KAAK,KAAK,GAAG;QAC/B,IAAI,KAAK,KAAK,KAAK,MAAM,iCAAW,KAAK,IAAI,GAC3C;QAGF,OAAO;IACT;IAEA,kBAA0B;QACxB,OAAO;IACT;IAEA,cAAc,IAAqB,EAAU;QAC3C,OAAO,iCAAW,KAAK,IAAI,IAAI,MAAM;IACvC;IAEA,gBAAwB;QACtB,iBAAiB;QACjB,OAAO;IACT;IAEA,UAAU;QACR,OAAO;YAAC;SAAK;IACf;;aAlCA,aAAa;;AAmCf;AASO,MAAM,kDAA+B;IAG1C,cAAc,EAAU,EAAgB;QACtC,OAAO,yCAAmB,IAAI,EAAE,yCAAmB;IACrD;IAEA,YAAY,IAAqB,EAAE;QACjC,OAAO,yCAAmB,yCAAmB,KAAK,IAAI,EAAE,KAAK,KAAK,EAAE,KAAK,GAAG;IAC9E;;6BARA,aAAa;;AASf;AAEA,4CAA4C;AAC5C,MAAM,sCAAgB;AACtB,IAAI;AACJ,IAAI;AAEJ,SAAS,wCAAkB,IAAY;IACrC,OAAO,4CAAsB,+CAAyB,CAAC,OAAO,0CAAoB;AACpF;AAEA,SAAS,0CAAoB,IAAY,EAAE,KAAa;IACtD,IAAI,MAAO,OAAO;IAClB,IAAI,OAAQ,QAAS,KAAM,CAAA,QAAQ,CAAA;IACnC,IAAI,AAAC,CAAA,0CAAoB,CAAC,IAAI,GAAG,IAAG,MAAO,GACzC,OAAO;SAEP,OAAO;AAEX;AAEA,SAAS,yCAAmB,IAAY,EAAE,KAAa;IACrD,IAAI,MAAM,wCAAkB;IAC5B,IAAK,IAAI,IAAI,GAAG,IAAI,OAAO,IACzB,OAAO,0CAAoB,MAAM;IAEnC,OAAO;AACT;AAEA,SAAS,yCAAmB,IAAY;IACtC,OAAO,+CAAyB,CAAC,OAAO,IAAI,0CAAoB,GAAG,+CAAyB,CAAC,OAAO,0CAAoB;AAC1H;AASO,MAAM,kDAAgC;IAsB3C,cAAc,EAAU,EAAgB;QACtC,IAAI,OAAO,KAAK;QAChB,IAAI,YAAY,wCAAkB;QAClC,IAAI,UAAU,wCAAkB;QAChC,IAAI,OAAO,aAAa,OAAO,SAC7B,OAAO,KAAK,CAAC,cAAc;aACtB;YACL,IAAI,IAAI,4CAAsB;YAC9B,IAAI,IAAI;YACR,IAAI,IAAI;YACR,MAAO,IAAI,EAAG;gBACZ;gBACA,IAAI,OAAO,wCAAkB,KAAK;gBAClC,IAAI,aAAa,yCAAmB;gBACpC,IAAI,MAAM,YAAY;oBACpB,IAAI;oBACJ;gBACF,OAAO,IAAI,IAAI,YAAY;oBACzB,IAAI,cAAc,0CAAoB,GAAG;oBACzC,IAAI;oBACJ,MAAO,IAAI,YAAa;wBACtB,KAAK;wBACL;wBACA,cAAc,0CAAoB,GAAG;oBACvC;oBACA;gBACF;YACF;YAEA,OAAO,IAAI,CAAA,GAAA,yCAAW,EAAE,IAAI,EAAE,GAAG,GAAI,OAAO,yCAAmB,GAAG,KAAK;QACzE;IACF;IAEA,YAAY,IAAqB,EAAU;QACzC,IAAI,KAAK,IAAI,GAAG,6CAAuB,KAAK,IAAI,GAAG,yCACjD,OAAO,KAAK,CAAC,YAAY;QAG3B,OAAO,mCAAa,yCAAmB,KAAK,IAAI,EAAE,KAAK,KAAK,IAAK,CAAA,KAAK,GAAG,GAAG,CAAA;IAC9E;IAEA,eAAe,IAAqB,EAAU;QAC5C,IAAI,KAAK,IAAI,GAAG,6CAAuB,KAAK,IAAI,GAAG,yCACjD,OAAO,KAAK,CAAC,eAAe;QAG9B,OAAO,0CAAoB,KAAK,IAAI,EAAE,KAAK,KAAK;IAClD;IAEA,cAAc,IAAqB,EAAU;QAC3C,IAAI,KAAK,IAAI,GAAG,6CAAuB,KAAK,IAAI,GAAG,yCACjD,OAAO,KAAK,CAAC,cAAc;QAG7B,OAAO,yCAAmB,KAAK,IAAI;IACrC;IA1EA,aAAc;QACZ,KAAK,SAHP,aAAa;QAIX,IAAI,CAAC,4CACH,6CAAuB,IAAI,YAAY,WAAW,IAAI,CAAC,KAAK,sCAAgB,CAAA,IAAK,EAAE,UAAU,CAAC,IAAI,MAAM;QAG1G,IAAI,CAAC,iDAA2B;YAC9B,kDAA4B,IAAI,YAAY,0CAAoB,4CAAsB;YAEtF,IAAI,YAAY;YAChB,IAAK,IAAI,OAAO,2CAAqB,QAAQ,yCAAmB,OAAQ;gBACtE,+CAAyB,CAAC,OAAO,0CAAoB,GAAG;gBACxD,IAAK,IAAI,IAAI,GAAG,KAAK,IAAI,IACvB,aAAa,0CAAoB,MAAM;YAE3C;QACF;IACF;AA0DF","sources":["packages/@internationalized/date/src/calendars/IslamicCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar} from '../types';\nimport {CalendarDate} from '../CalendarDate';\n\nconst CIVIL_EPOC = 1948440; // CE 622 July 16 Friday (Julian calendar) / CE 622 July 19 (Gregorian calendar)\nconst ASTRONOMICAL_EPOC = 1948439; // CE 622 July 15 Thursday (Julian calendar)\nconst UMALQURA_YEAR_START = 1300;\nconst UMALQURA_YEAR_END = 1600;\nconst UMALQURA_START_DAYS = 460322;\n\nfunction islamicToJulianDay(epoch: number, year: number, month: number, day: number): number {\n return day +\n Math.ceil(29.5 * (month - 1)) +\n (year - 1) * 354 +\n Math.floor((3 + 11 * year) / 30) +\n epoch - 1;\n}\n\nfunction julianDayToIslamic(calendar: Calendar, epoch: number, jd: number) {\n letLine truncated
@@ -0,0 +1 @@
{"name":"yocto-queue","version":"0.1.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532094608,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532094608,"integrity":"sha512-wglk2JaUmJkp+CVT59KRJQwdUsMD603mGi5aTb4GQAZO1ptS5RUoqSBpm8X8cHwJ+7SyVRRFifqBTduGgRrAAg==","mode":420,"size":949},"package.json":{"checkedAt":1794532094608,"integrity":"sha512-UE5uilRYzZlvZ/zLu+VR2Y17BqUWNlegnYoRIR/cuSs6i0yFifmbNIPrGRqn5mToHfmnAeNvmeyZ/pYdKBNCnQ==","mode":420,"size":725},"readme.md":{"checkedAt":1794532094608,"integrity":"sha512-H72sBXSo4Lmf7eEZHMLaEgbFSRXNKjXAVFFUrMtdiXZcA+U+dovWhieEwMSXsaQOX+qNRDiyfo67ZOHOT8B/Lg==","mode":420,"size":2096},"index.d.ts":{"checkedAt":1794532094608,"integrity":"sha512-vCiwh0vRuDHHweQIcDuDnrFu6NIghxkwOCj8ZO2CWEM+Ci1BM7lqBW791tcDcccON804Xctorve2c0KtPAC83w==","mode":420,"size":1140}}}
@@ -0,0 +1,13 @@
/**
* https://tc39.es/ecma402/#table-sanctioned-simple-unit-identifiers
*/
export declare const SANCTIONED_UNITS: readonly ["angle-degree", "area-acre", "area-hectare", "concentr-percent", "digital-bit", "digital-byte", "digital-gigabit", "digital-gigabyte", "digital-kilobit", "digital-kilobyte", "digital-megabit", "digital-megabyte", "digital-petabyte", "digital-terabit", "digital-terabyte", "duration-day", "duration-hour", "duration-millisecond", "duration-minute", "duration-month", "duration-second", "duration-week", "duration-year", "length-centimeter", "length-foot", "length-inch", "length-kilometer", "length-meter", "length-mile-scandinavian", "length-mile", "length-millimeter", "length-yard", "mass-gram", "mass-kilogram", "mass-ounce", "mass-pound", "mass-stone", "temperature-celsius", "temperature-fahrenheit", "volume-fluid-ounce", "volume-gallon", "volume-liter", "volume-milliliter"];
export declare function removeUnitNamespace(unit: string): string;
/**
* https://tc39.es/ecma402/#table-sanctioned-simple-unit-identifiers
*/
export declare const SIMPLE_UNITS: string[];
/**
* https://tc39.es/ecma402/#sec-issanctionedsimpleunitidentifier
*/
export declare function IsSanctionedSimpleUnitIdentifier(unitIdentifier: string): boolean;
@@ -0,0 +1 @@
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_ie=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"en-ie",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekStart:1,weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return t.default.locale(_,null,!0),_}));
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docEndnoteRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'rearnote [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: ['doc-endnotes'],
requiredContextRole: ['doc-endnotes'],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'listitem']]
};
var _default = exports.default = docEndnoteRole;
@@ -0,0 +1,70 @@
// Karma configuration
// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai', 'sinon'],
// list of files / patterns to load in the browser
files: [
'dist/debug.js',
'test/*spec.js'
],
// list of files to exclude
exclude: [
'src/node.js'
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}
@@ -0,0 +1,517 @@
flf2a$ 5 4 20 15 6
Square by Chris Gill, 30-JUN-94 -- based on .sig of Jeb Hagan.
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@@
__ @
| |@
|__|@
|__|@
@@
____ @
| | |@
|_|_|@
@
@@
_____ @
_| | |_ @
|_ _|@
|_ _|@
|__|__| @@
__,-,__ @
| ' '__|@
|__ |@
|_______|@
|_| @@
__ ___ @
|__| |@
| __|@
|___|__|@
@@
__,-,__ @
| ' '__|@
| __|@
|_______|@
|_| @@
__ @
| |@
|_|@
@
@@
___ @
,' _|@
| | @
| |_ @
`.___|@@
___ @
|_ `.@
| |@
_| |@
|___,'@@
__ _ __ @
| | | |@
> < @
|__|_|__|@
@@
__ @
_| |_ @
|_ _|@
|__| @
@@
@
@
__ @
| |@
|_|@@
@
______ @
|______|@
@
@@
@
@
__ @
|__|@
@@
___@
/ /@
,' ,' @
/__/ @
@@
______ @
| |@
| -- |@
|______|@
@@
____ @
|_ | @
_| |_ @
|______|@
@@
______ @
|__ |@
| __|@
|______|@
@@
______ @
|__ |@
|__ |@
|______|@
@@
_____ @
| | | @
|__ |@
|__| @
@@
______ @
| __|@
|__ |@
|______|@
@@
______ @
| __|@
| __ |@
|______|@
@@
______ @
| |@
|_ |@
|____|@
@@
______ @
| __ |@
| __ |@
|______|@
@@
______ @
| __ |@
|__ |@
|______|@
@@
__ @
|__|@
__ @
|__|@
@@
__ @
|__|@
__ @
| |@
|_|@@
__ @
,' _|@
/ / @
\ \_ @
`.__|@@
@
______ @
|______|@
|______|@
@@
__ @
|_ `. @
\ \@
_/ /@
|__,' @@
_____ @
|__ |@
', ,-'@
|--| @
'--' @@
_________ @
| ___ |@
| | _ |@
| |______|@
|_________|@@
_______ @
| _ |@
| |@
|___|___|@
@@
______ @
| __ \@
| __ <@
|______/@
@@
______ @
| |@
| ---|@
|______|@
@@
_____ @
| \ @
| -- |@
|_____/ @
@@
_______ @
| ___|@
| ___|@
|_______|@
@@
_______ @
| ___|@
| ___|@
|___| @
@@
_______ @
| __|@
| | |@
|_______|@
@@
_______ @
| | |@
| |@
|___|___|@
@@
_______ @
|_ _|@
_| |_ @
|_______|@
@@
_____ @
_| |@
| |@
|_______|@
@@
__ __ @
| |/ |@
| < @
|__|\__|@
@@
_____ @
| |_ @
| |@
|_______|@
@@
_______ @
| | |@
| |@
|__|_|__|@
@@
_______ @
| | |@
| |@
|__|____|@
@@
_______ @
| |@
| - |@
|_______|@
@@
______ @
| __ \@
| __/@
|___| @
@@
_______ @
| |@
| - _|@
|_______|@
@@
______ @
| __ \@
| <@
|___|__|@
@@
_______ @
| __|@
|__ |@
|_______|@
@@
_______ @
|_ _|@
| | @
|___| @
@@
_______ @
| | |@
| | |@
|_______|@
@@
___ ___ @
| | |@
| | |@
\_____/ @
@@
________ @
| | | |@
| | | |@
|________|@
@@
___ ___ @
| | |@
|- -|@
|___|___|@
@@
___ ___ @
| | |@
\ / @
|___| @
@@
_______ @
|__ |@
| __|@
|_______|@
@@
____ @
| _|@
| | @
| |_ @
|____|@@
___ @
\ \ @
`. `. @
\__\@
@@
____ @
|_ |@
| |@
_| |@
|____|@@
____ @
| |@
|_/\_|@
@
@@
@
@
@
______ @
|______|@@
__ @
| |@
|_| @
@
@@
@
.---.-.@
| _ |@
|___._|@
@@
__ @
| |--.@
| _ |@
|_____|@
@@
@
.----.@
| __|@
|____|@
@@
__ @
.--| |@
| _ |@
|_____|@
@@
@
.-----.@
| -__|@
|_____|@
@@
___ @
.' _|@
| _|@
|__| @
@@
@
.-----.@
| _ |@
|___ |@
|_____|@@
__ @
| |--.@
| |@
|__|__|@
@@
__ @
|__|@
| |@
|__|@
@@
__ @
|__|@
| |@
| |@
|___|@@
__ @
| |--.@
| < @
|__|__|@
@@
__ @
| |@
| |@
|__|@
@@
@
.--------.@
| |@
|__|__|__|@
@@
@
.-----.@
| |@
|__|__|@
@@
@
.-----.@
| _ |@
|_____|@
@@
@
.-----.@
| _ |@
| __|@
|__| @@
@
.-----.@
| _ |@
|__ |@
|__|@@
@
.----.@
| _|@
|__| @
@@
@
.-----.@
|__ --|@
|_____|@
@@
__ @
| |_ @
| _|@
|____|@
@@
@
.--.--.@
| | |@
|_____|@
@@
@
.--.--.@
| | |@
\___/ @
@@
@
.--.--.--.@
| | | |@
|________|@
@@
@
.--.--.@
|_ _|@
|__.__|@
@@
@
.--.--.@
| | |@
|___ |@
|_____|@@
@
.-----.@
|-- __|@
|_____|@
@@
___ @
| _|@
/ / @
\ \_ @
|___|@@
__ @
| |@
| |@
| |@
|__|@@
___ @
|_ | @
\ \@
_/ /@
|___| @@
___ @
| ' |@
|_,_| @
@
@@
.--.--.@
|-----|@
| - |@
|__|__|@
@@
.--.--.@
|-----|@
| _ |@
|_____|@
@@
.--.--.@
|--|--|@
| | |@
|_____|@
@@
.--.--.@
|---.-|@
| _ |@
|___._|@
@@
.--.--.@
|-----|@
| _ |@
|_____|@
@@
.--.--.@
|--|--|@
| | |@
|_____|@
@@
_______ @
| __ \@
| __ <@
| |____/@
|__| @@
@@ -0,0 +1,532 @@
flf2a$ 5 4 12 -1 21 0 -2 12 34 63 HIKE
double.flf (FIGlet font)
figlet conversion by Kent Nassen, kentn@cyberspace.org, 11/24/94
From: stuce@csv.warwick.ac.uk (Peter Weighill)
Newsgroups: alt.ascii-art
Subject: FONT: double (not .flf)
Date: 15 Mar 1994 16:20:01 -0000
Organization: Commodore 64 Services, University of Warwick, UK
Lines: 30
Message-ID: <2m4n7h$2ti@basil.csv.warwick.ac.uk>
NNTP-Posting-Host: basil.csv.warwick.ac.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Keywords: font
Status: RO
Below is the capital letters for a font & also a few punctuation characters
(no lower case).
$ $@
$ $@
$ $@
$ $@
$ $@@
__@
||@
||@
..@
@@
_@
//@
@
@
@@
__ __ @
|| || @
=||=||=@
|| || @
@@
@
@
@
@
@@
_@
O //@
// @
// O@
@@
@
@
@
@
@@
//@
@
@
@
@@
_@
//@
(( @
\\@
@@
_ @
\\ @
))@
// @
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
//@
@@
@
@
@
@
@@
@
@
@
||@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
____ @
| \\@
_//@
|| @
@@
@
@
@
@
@@
___ @
// \\@
||=||@
|| ||@
@@
____ @
|| ))@
||=) @
||_))@
@@
___@
// @
(( @
\\__@
@@
____ @
|| \\ @
|| ))@
||_// @
@@
____@
|| @
||== @
||___@
@@
____@
|| @
||== @
|| @
@@
___ @
// \\@
(( ___@
\\_||@
@@
__ __@
|| ||@
||==||@
|| ||@
@@
__@
||@
||@
||@
@@
__@
||@
||@
|__||@
@@
__ __@
|| //@
||<< @
|| \\@
@@
__ @
|| @
|| @
||__|@
@@
___ ___@
||\\//||@
|| \/ ||@
|| ||@
@@
__ __@
||\ ||@
||\\||@
|| \||@
@@
___ @
// \\ @
(( ))@
\\_// @
@@
____ @
|| \\@
||_//@
|| @
@@
___ @
// \\ @
(( ))@
\\_/X|@
@@
____ @
|| \\@
||_//@
|| \\@
@@
__ @
(( \@
\\ @
\_))@
@@
______@
| || |@
|| @
|| @
@@
__ __@
|| ||@
|| ||@
\\_//@
@@
__ __@
|| ||@
\\ //@
\V/ @
@@
__ __@
|| ||@
\\ /\ //@
\V/\V/ @
@@
_ _@
\\ //@
)X( @
// \\@
@@
_ _@
\\//@
)/ @
// @
@@
____@
//@
// @
//__@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
___ @
// \\@
||=||@
|| ||@
@@
____ @
|| ))@
||=) @
||_))@
@@
___@
// @
(( @
\\__@
@@
____ @
|| \\ @
|| ))@
||_// @
@@
____@
|| @
||== @
||___@
@@
____@
|| @
||== @
|| @
@@
___ @
// \\@
(( ___@
\\_||@
@@
__ __@
|| ||@
||==||@
|| ||@
@@
__@
||@
||@
||@
@@
__@
||@
||@
|__||@
@@
__ __@
|| //@
||<< @
|| \\@
@@
__ @
|| @
|| @
||__|@
@@
___ ___@
||\\//||@
|| \/ ||@
|| ||@
@@
__ __@
||\ ||@
||\\||@
|| \||@
@@
___ @
// \\ @
(( ))@
\\_// @
@@
____ @
|| \\@
||_//@
|| @
@@
___ @
// \\ @
(( ))@
\\_/X|@
@@
____ @
|| \\@
||_//@
|| \\@
@@
__ @
(( \@
\\ @
\_))@
@@
______@
| || |@
|| @
|| @
@@
__ __@
|| ||@
|| ||@
\\_//@
@@
__ __@
|| ||@
\\ //@
\V/ @
@@
__ __@
|| ||@
\\ /\ //@
\V/\V/ @
@@
_ _@
\\ //@
)X( @
// \\@
@@
_ _@
\\//@
)/ @
// @
@@
____@
//@
// @
//__@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveResolvedValueBindingNode = resolveResolvedValueBindingNode;
const common_1 = require("@inversifyjs/common");
function resolveResolvedValueBindingNode(resolveResolvedValueBindingParams) {
return (params, node) => {
const paramValues = resolveResolvedValueBindingParams(params, node);
if ((0, common_1.isPromise)(paramValues)) {
return paramValues.then((resolvedParamValues) => node.binding.factory(...resolvedParamValues));
}
return node.binding.factory(...paramValues);
};
}
//# sourceMappingURL=resolveResolvedValueBindingNode.js.map
@@ -0,0 +1,110 @@
import type { ActionCreatorsMapObject, Dispatch, ActionCreator } from 'redux'
import type { FixTypeLater } from '../types'
import verifyPlainObject from '../utils/verifyPlainObject'
type AnyState = { [key: string]: any }
type StateOrDispatch<S extends AnyState = AnyState> = S | Dispatch
type AnyProps = { [key: string]: any }
export type MapToProps<P extends AnyProps = AnyProps> = {
// eslint-disable-next-line no-unused-vars
(stateOrDispatch: StateOrDispatch, ownProps?: P): FixTypeLater
dependsOnOwnProps?: boolean
}
export function wrapMapToPropsConstant(
// * Note:
// It seems that the dispatch argument
// could be a dispatch function in some cases (ex: whenMapDispatchToPropsIsMissing)
// and a state object in some others (ex: whenMapStateToPropsIsMissing)
// eslint-disable-next-line no-unused-vars
getConstant: (dispatch: Dispatch) =>
| {
dispatch?: Dispatch
dependsOnOwnProps?: boolean
}
| ActionCreatorsMapObject
| ActionCreator<any>,
) {
return function initConstantSelector(dispatch: Dispatch) {
const constant = getConstant(dispatch)
function constantSelector() {
return constant
}
constantSelector.dependsOnOwnProps = false
return constantSelector
}
}
// dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
// whether mapToProps needs to be invoked when props have changed.
//
// A length of one signals that mapToProps does not depend on props from the parent component.
// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
// therefore not reporting its length accurately..
// TODO Can this get pulled out so that we can subscribe directly to the store if we don't need ownProps?
function getDependsOnOwnProps(mapToProps: MapToProps) {
return mapToProps.dependsOnOwnProps
? Boolean(mapToProps.dependsOnOwnProps)
: mapToProps.length !== 1
}
// Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
// this function wraps mapToProps in a proxy function which does several things:
//
// * Detects whether the mapToProps function being called depends on props, which
// is used by selectorFactory to decide if it should reinvoke on props changes.
//
// * On first call, handles mapToProps if returns another function, and treats that
// new function as the true mapToProps for subsequent calls.
//
// * On first call, verifies the first result is a plain object, in order to warn
// the developer that their mapToProps function is not returning a valid result.
//
export function wrapMapToPropsFunc<P extends AnyProps = AnyProps>(
mapToProps: MapToProps,
methodName: string,
) {
return function initProxySelector(
dispatch: Dispatch,
{ displayName }: { displayName: string },
) {
const proxy = function mapToPropsProxy(
stateOrDispatch: StateOrDispatch,
ownProps?: P,
): MapToProps {
return proxy.dependsOnOwnProps
? proxy.mapToProps(stateOrDispatch, ownProps)
: proxy.mapToProps(stateOrDispatch, undefined)
}
// allow detectFactoryAndVerify to get ownProps
proxy.dependsOnOwnProps = true
proxy.mapToProps = function detectFactoryAndVerify(
stateOrDispatch: StateOrDispatch,
ownProps?: P,
): MapToProps {
proxy.mapToProps = mapToProps
proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps)
let props = proxy(stateOrDispatch, ownProps)
if (typeof props === 'function') {
proxy.mapToProps = props
proxy.dependsOnOwnProps = getDependsOnOwnProps(props)
props = proxy(stateOrDispatch, ownProps)
}
if (process.env.NODE_ENV !== 'production')
verifyPlainObject(props, displayName, methodName)
return props
}
return proxy
}
}
@@ -0,0 +1,317 @@
import {immerable} from "../immer"
import {
ImmerState,
Patch,
SetState,
ProxyArrayState,
MapState,
ProxyObjectState,
PatchPath,
get,
each,
has,
getArchtype,
getPrototypeOf,
isSet,
isMap,
loadPlugin,
ArchType,
die,
isDraft,
isDraftable,
NOTHING,
errors
} from "../internal"
export function enablePatches() {
const errorOffset = 16
if (process.env.NODE_ENV !== "production") {
errors.push(
'Sets cannot have "replace" patches.',
function(op: string) {
return "Unsupported patch operation: " + op
},
function(path: string) {
return "Cannot apply patch, path doesn't resolve: " + path
},
"Patching reserved attributes like __proto__, prototype and constructor is not allowed"
)
}
const REPLACE = "replace"
const ADD = "add"
const REMOVE = "remove"
function generatePatches_(
state: ImmerState,
basePath: PatchPath,
patches: Patch[],
inversePatches: Patch[]
): void {
switch (state.type_) {
case ArchType.Object:
case ArchType.Map:
return generatePatchesFromAssigned(
state,
basePath,
patches,
inversePatches
)
case ArchType.Array:
return generateArrayPatches(state, basePath, patches, inversePatches)
case ArchType.Set:
return generateSetPatches(
(state as any) as SetState,
basePath,
patches,
inversePatches
)
}
}
function generateArrayPatches(
state: ProxyArrayState,
basePath: PatchPath,
patches: Patch[],
inversePatches: Patch[]
) {
let {base_, assigned_} = state
let copy_ = state.copy_!
// Reduce complexity by ensuring `base` is never longer.
if (copy_.length < base_.length) {
// @ts-ignore
;[base_, copy_] = [copy_, base_]
;[patches, inversePatches] = [inversePatches, patches]
}
// Process replaced indices.
for (let i = 0; i < base_.length; i++) {
if (assigned_[i] && copy_[i] !== base_[i]) {
const path = basePath.concat([i])
patches.push({
op: REPLACE,
path,
// Need to maybe clone it, as it can in fact be the original value
// due to the base/copy inversion at the start of this function
value: clonePatchValueIfNeeded(copy_[i])
})
inversePatches.push({
op: REPLACE,
path,
value: clonePatchValueIfNeeded(base_[i])
})
}
}
// Process added indices.
for (let i = base_.length; i < copy_.length; i++) {
const path = basePath.concat([i])
patches.push({
op: ADD,
path,
// Need to maybe clone it, as it can in fact be the original value
// due to the base/copy inversion at the start of this function
value: clonePatchValueIfNeeded(copy_[i])
})
}
for (let i = copy_.length - 1; base_.length <= i; --i) {
const path = basePath.concat([i])
inversePatches.push({
op: REMOVE,
path
})
}
}
// This is used for both Map objects and normal objects.
function generatePatchesFromAssigned(
state: MapState | ProxyObjectState,
basePath: PatchPath,
patches: Patch[],
inversePatches: Patch[]
) {
const {base_, copy_} = state
each(state.assigned_!, (key, assignedValue) => {
const origValue = get(base_, key)
const value = get(copy_!, key)
const op = !assignedValue ? REMOVE : has(base_, key) ? REPLACE : ADD
if (origValue === value && op === REPLACE) return
const path = basePath.concat(key as any)
patches.push(op === REMOVE ? {op, path} : {op, path, value})
inversePatches.push(
op === ADD
? {op: REMOVE, path}
: op === REMOVE
? {op: ADD, path, value: clonePatchValueIfNeeded(origValue)}
: {op: REPLACE, path, value: clonePatchValueIfNeeded(origValue)}
)
})
}
function generateSetPatches(
state: SetState,
basePath: PatchPath,
patches: Patch[],
inversePatches: Patch[]
) {
let {base_, copy_} = state
let i = 0
base_.forEach((value: any) => {
if (!copy_!.has(value)) {
const path = basePath.concat([i])
patches.push({
op: REMOVE,
path,
value
})
inversePatches.unshift({
op: ADD,
path,
value
})
}
i++
})
i = 0
copy_!.forEach((value: any) => {
if (!base_.has(value)) {
const path = basePath.concat([i])
patches.push({
op: ADD,
path,
value
})
inversePatches.unshift({
op: REMOVE,
path,
value
})
}
i++
})
}
function generateReplacementPatches_(
baseValue: any,
replacement: any,
patches: Patch[],
inversePatches: Patch[]
): void {
patches.push({
op: REPLACE,
path: [],
value: replacement === NOTHING ? undefined : replacement
})
inversePatches.push({
op: REPLACE,
path: [],
value: baseValue
})
}
function applyPatches_<T>(draft: T, patches: readonly Patch[]): T {
patches.forEach(patch => {
const {path, op} = patch
let base: any = draft
for (let i = 0; i < path.length - 1; i++) {
const parentType = getArchtype(base)
let p = path[i]
if (typeof p !== "string" && typeof p !== "number") {
p = "" + p
}
// See #738, avoid prototype pollution
if (
(parentType === ArchType.Object || parentType === ArchType.Array) &&
(p === "__proto__" || p === "constructor")
)
die(errorOffset + 3)
if (typeof base === "function" && p === "prototype")
die(errorOffset + 3)
base = get(base, p)
if (typeof base !== "object") die(errorOffset + 2, path.join("/"))
}
const type = getArchtype(base)
const value = deepClonePatchValue(patch.value) // used to clone patch to ensure original patch is not modified, see #411
const key = path[path.length - 1]
switch (op) {
case REPLACE:
switch (type) {
case ArchType.Map:
return base.set(key, value)
/* istanbul ignore next */
case ArchType.Set:
die(errorOffset)
default:
// if value is an object, then it's assigned by reference
// in the following add or remove ops, the value field inside the patch will also be modifyed
// so we use value from the cloned patch
// @ts-ignore
return (base[key] = value)
}
case ADD:
switch (type) {
case ArchType.Array:
return key === "-"
? base.push(value)
: base.splice(key as any, 0, value)
case ArchType.Map:
return base.set(key, value)
case ArchType.Set:
return base.add(value)
default:
return (base[key] = value)
}
case REMOVE:
switch (type) {
case ArchType.Array:
return base.splice(key as any, 1)
case ArchType.Map:
return base.delete(key)
case ArchType.Set:
return base.delete(patch.value)
default:
return delete base[key]
}
default:
die(errorOffset + 1, op)
}
})
return draft
}
// optimize: this is quite a performance hit, can we detect intelligently when it is needed?
// E.g. auto-draft when new objects from outside are assigned and modified?
// (See failing test when deepClone just returns obj)
function deepClonePatchValue<T>(obj: T): T
function deepClonePatchValue(obj: any) {
if (!isDraftable(obj)) return obj
if (Array.isArray(obj)) return obj.map(deepClonePatchValue)
if (isMap(obj))
return new Map(
Array.from(obj.entries()).map(([k, v]) => [k, deepClonePatchValue(v)])
)
if (isSet(obj)) return new Set(Array.from(obj).map(deepClonePatchValue))
const cloned = Object.create(getPrototypeOf(obj))
for (const key in obj) cloned[key] = deepClonePatchValue(obj[key])
if (has(obj, immerable)) cloned[immerable] = obj[immerable]
return cloned
}
function clonePatchValueIfNeeded<T>(obj: T): T {
if (isDraft(obj)) {
return deepClonePatchValue(obj)
} else return obj
}
loadPlugin("Patches", {
applyPatches_,
generatePatches_,
generateReplacementPatches_
})
}
@@ -0,0 +1,151 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { EventEmitter } from 'common/EventEmitter';
import { Disposable } from 'common/Lifecycle';
import { IAttributeData, IBufferLine, ScrollSource } from 'common/Types';
import { BufferSet } from 'common/buffer/BufferSet';
import { IBuffer, IBufferSet } from 'common/buffer/Types';
import { IBufferService, IOptionsService } from 'common/services/Services';
export const MINIMUM_COLS = 2; // Less than 2 can mess with wide chars
export const MINIMUM_ROWS = 1;
export class BufferService extends Disposable implements IBufferService {
public serviceBrand: any;
public cols: number;
public rows: number;
public buffers: IBufferSet;
/** Whether the user is scrolling (locks the scroll position) */
public isUserScrolling: boolean = false;
private readonly _onResize = this.register(new EventEmitter<{ cols: number, rows: number }>());
public readonly onResize = this._onResize.event;
private readonly _onScroll = this.register(new EventEmitter<number>());
public readonly onScroll = this._onScroll.event;
public get buffer(): IBuffer { return this.buffers.active; }
/** An IBufferline to clone/copy from for new blank lines */
private _cachedBlankLine: IBufferLine | undefined;
constructor(@IOptionsService optionsService: IOptionsService) {
super();
this.cols = Math.max(optionsService.rawOptions.cols || 0, MINIMUM_COLS);
this.rows = Math.max(optionsService.rawOptions.rows || 0, MINIMUM_ROWS);
this.buffers = this.register(new BufferSet(optionsService, this));
}
public resize(cols: number, rows: number): void {
this.cols = cols;
this.rows = rows;
this.buffers.resize(cols, rows);
// TODO: This doesn't fire when scrollback changes - add a resize event to BufferSet and forward
// event
this._onResize.fire({ cols, rows });
}
public reset(): void {
this.buffers.reset();
this.isUserScrolling = false;
}
/**
* Scroll the terminal down 1 row, creating a blank line.
* @param eraseAttr The attribute data to use the for blank line.
* @param isWrapped Whether the new line is wrapped from the previous line.
*/
public scroll(eraseAttr: IAttributeData, isWrapped: boolean = false): void {
const buffer = this.buffer;
let newLine: IBufferLine | undefined;
newLine = this._cachedBlankLine;
if (!newLine || newLine.length !== this.cols || newLine.getFg(0) !== eraseAttr.fg || newLine.getBg(0) !== eraseAttr.bg) {
newLine = buffer.getBlankLine(eraseAttr, isWrapped);
this._cachedBlankLine = newLine;
}
newLine.isWrapped = isWrapped;
const topRow = buffer.ybase + buffer.scrollTop;
const bottomRow = buffer.ybase + buffer.scrollBottom;
if (buffer.scrollTop === 0) {
// Determine whether the buffer is going to be trimmed after insertion.
const willBufferBeTrimmed = buffer.lines.isFull;
// Insert the line using the fastest method
if (bottomRow === buffer.lines.length - 1) {
if (willBufferBeTrimmed) {
buffer.lines.recycle().copyFrom(newLine);
} else {
buffer.lines.push(newLine.clone());
}
} else {
buffer.lines.splice(bottomRow + 1, 0, newLine.clone());
}
// Only adjust ybase and ydisp when the buffer is not trimmed
if (!willBufferBeTrimmed) {
buffer.ybase++;
// Only scroll the ydisp with ybase if the user has not scrolled up
if (!this.isUserScrolling) {
buffer.ydisp++;
}
} else {
// When the buffer is full and the user has scrolled up, keep the text
// stable unless ydisp is right at the top
if (this.isUserScrolling) {
buffer.ydisp = Math.max(buffer.ydisp - 1, 0);
}
}
} else {
// scrollTop is non-zero which means no line will be going to the
// scrollback, instead we can just shift them in-place.
const scrollRegionHeight = bottomRow - topRow + 1 /* as it's zero-based */;
buffer.lines.shiftElements(topRow + 1, scrollRegionHeight - 1, -1);
buffer.lines.set(bottomRow, newLine.clone());
}
// Move the viewport to the bottom of the buffer unless the user is
// scrolling.
if (!this.isUserScrolling) {
buffer.ydisp = buffer.ybase;
}
this._onScroll.fire(buffer.ydisp);
}
/**
* Scroll the display of the terminal
* @param disp The number of lines to scroll down (negative scroll up).
* @param suppressScrollEvent Don't emit the scroll event as scrollLines. This is used
* to avoid unwanted events being handled by the viewport when the event was triggered from the
* viewport originally.
*/
public scrollLines(disp: number, suppressScrollEvent?: boolean, source?: ScrollSource): void {
const buffer = this.buffer;
if (disp < 0) {
if (buffer.ydisp === 0) {
return;
}
this.isUserScrolling = true;
} else if (disp + buffer.ydisp >= buffer.ybase) {
this.isUserScrolling = false;
}
const oldYdisp = buffer.ydisp;
buffer.ydisp = Math.max(Math.min(buffer.ydisp + disp, buffer.ybase), 0);
// No change occurred, don't trigger scroll/refresh
if (oldYdisp === buffer.ydisp) {
return;
}
if (!suppressScrollEvent) {
this._onScroll.fire(buffer.ydisp);
}
}
}
@@ -0,0 +1,135 @@
export type Formats = Pick<Intl.DateTimeFormatOptions, 'weekday' | 'era' | 'year' | 'month' | 'day' | 'dayPeriod' | 'hour' | 'minute' | 'second' | 'timeZoneName'> & {
fractionalSecondDigits?: 1 | 2 | 3;
hour12?: boolean;
pattern: string;
pattern12: string;
skeleton: string;
rawPattern: string;
rangePatterns: Record<TABLE_2 | 'default', RangePatterns>;
rangePatterns12: Record<TABLE_2 | 'default', RangePatterns>;
};
export interface IntlDateTimeFormatInternal {
locale: string;
dataLocale: string;
calendar?: string;
dateStyle?: 'full' | 'long' | 'medium' | 'short';
timeStyle?: 'full' | 'long' | 'medium' | 'short';
weekday: 'narrow' | 'short' | 'long';
era: 'narrow' | 'short' | 'long';
year: '2-digit' | 'numeric';
month: '2-digit' | 'numeric' | 'narrow' | 'short' | 'long';
day: '2-digit' | 'numeric';
dayPeriod: 'narrow' | 'short' | 'long';
hour: '2-digit' | 'numeric';
minute: '2-digit' | 'numeric';
second: '2-digit' | 'numeric';
timeZoneName: 'short' | 'long' | 'shortOffset' | 'longOffset' | 'shortGeneric' | 'longGeneric';
fractionalSecondDigits?: 1 | 2 | 3;
hourCycle: string;
numberingSystem: string;
timeZone: string;
pattern: string;
format: Formats;
rangePatterns: Record<TABLE_2 | 'default', RangePatterns>;
boundFormat?: Intl.DateTimeFormat['format'];
}
export interface RangePatternPart<T extends RangePatternType = RangePatternType> {
source: T;
pattern: string;
}
export type RangePatterns = Pick<Intl.DateTimeFormatOptions, 'weekday' | 'era' | 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'timeZoneName'> & {
hour12?: boolean;
patternParts: Array<RangePatternPart>;
};
export declare enum RangePatternType {
startRange = "startRange",
shared = "shared",
endRange = "endRange"
}
export type TABLE_6 = 'weekday' | 'era' | 'year' | 'month' | 'day' | 'dayPeriod' | 'hour' | 'minute' | 'second' | 'fractionalSecondDigits' | 'timeZoneName';
export type TABLE_2 = 'era' | 'year' | 'month' | 'day' | 'dayPeriod' | 'ampm' | 'hour' | 'minute' | 'second' | 'fractionalSecondDigits';
export type TimeZoneNameData = Record<string, {
long?: [string, string];
short?: [string, string];
}>;
export interface EraData {
BC: string;
AD: string;
}
export interface DateTimeFormatLocaleInternalData {
am: string;
pm: string;
weekday: {
narrow: string[];
long: string[];
short: string[];
};
era: {
narrow: EraData;
long: EraData;
short: EraData;
};
month: {
narrow: string[];
long: string[];
short: string[];
};
timeZoneName: TimeZoneNameData;
/**
* So we can construct GMT+08:00
*/
gmtFormat: string;
/**
* So we can construct GMT+08:00
*/
hourFormat: string;
hourCycle: string;
dateFormat: {
full: Formats;
long: Formats;
medium: Formats;
short: Formats;
};
timeFormat: {
full: Formats;
long: Formats;
medium: Formats;
short: Formats;
};
dateTimeFormat: {
full: string;
long: string;
medium: string;
short: string;
};
formats: Record<string, Formats[]>;
nu: string[];
hc: string[];
ca: string[];
}
export type IntervalFormatsData = {
intervalFormatFallback: string;
} & Record<string, Record<string, string>>;
export interface DateTimeFormat extends Omit<Intl.DateTimeFormat, 'resolvedOptions' | 'formatRange' | 'formatRangeToParts' | 'formatToParts'> {
resolvedOptions(): ResolvedDateTimeFormatOptions;
formatToParts(date?: Date | number): IntlDateTimeFormatPart[];
formatRange(startDate: number | Date, endDate: number | Date): string;
formatRangeToParts(startDate: number | Date, endDate: number | Date): IntlDateTimeFormatPart[];
}
export interface ResolvedDateTimeFormatOptions extends Intl.ResolvedDateTimeFormatOptions {
dateStyle?: 'full' | 'long' | 'medium' | 'short';
timeStyle?: 'full' | 'long' | 'medium' | 'short';
numberingSystem: string;
}
export type UnpackedZoneData = [
number,
string,
number,
boolean
];
export type IntlDateTimeFormatPartType = Intl.DateTimeFormatPartTypes | 'ampm' | 'relatedYear' | 'yearName' | 'unknown' | 'fractionalSecondDigits';
export interface IntlDateTimeFormatPart {
type: IntlDateTimeFormatPartType;
value: string | undefined;
source?: RangePatternType;
}
@@ -0,0 +1,5 @@
<svg viewbox="0 0 18 18">
<line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"></line>
<polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"></polyline>
<line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"></line>
</svg>

After

Width:  |  Height:  |  Size: 266 B

@@ -0,0 +1,62 @@
// @ts-check
const { createRequire } = require('node:module')
const { pathToFileURL } = require('node:url')
const TS_EXT_RE = /\.[mc]?ts$/
let tsx
let jiti
let importError = []
/**
* @param {string} name
* @param {string} rootFile
* @returns {Promise<any>}
*/
async function req(name, rootFile = __filename) {
let url = createRequire(rootFile).resolve(name)
try {
return (await import(`${pathToFileURL(url)}?t=${Date.now()}`)).default
} catch (err) {
if (!TS_EXT_RE.test(url)) {
/* c8 ignore start */
throw err
}
}
if (tsx === undefined) {
try {
tsx = await import('tsx/cjs/api')
} catch (error) {
importError.push(error)
}
}
if (tsx) {
let loaded = tsx.require(name, rootFile)
return loaded && '__esModule' in loaded ? loaded.default : loaded
}
if (jiti === undefined) {
try {
jiti = (await import('jiti')).default
} catch (error) {
importError.push(error)
}
}
if (jiti) {
return jiti(rootFile, { interopDefault: true })(name)
}
throw new Error(
`'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed\nError: ${importError
.map(error => error.message)
.join('\n')}`
)
}
module.exports = req
@@ -0,0 +1,21 @@
// Given a version, figure out what the release notes are so that we can use this to pre-fill the
// relase notes on a GitHub release for the current version.
let path = require('path')
let fs = require('fs')
let version =
process.argv[2] || process.env.npm_package_version || require('../package.json').version
let changelog = fs.readFileSync(path.resolve(__dirname, '..', 'CHANGELOG.md'), 'utf8')
let match = new RegExp(
`## \\[${version}\\] - (.*)\\n\\n([\\s\\S]*?)\\n(?:(?:##\\s)|(?:\\[))`,
'g'
).exec(changelog)
if (match) {
let [, , notes] = match
console.log(notes.trim())
} else {
console.log(`Placeholder release notes for version: v${version}`)
}
@@ -0,0 +1,38 @@
"use client";
import {
avatar_default
} from "./chunk-SXMLSBOY.mjs";
import {
useAvatarGroup
} from "./chunk-QH65JCLF.mjs";
import {
AvatarGroupProvider
} from "./chunk-JUJ53SJZ.mjs";
// src/avatar-group.tsx
import { forwardRef } from "@heroui/system";
import { jsx, jsxs } from "react/jsx-runtime";
var AvatarGroup = forwardRef((props, ref) => {
const {
Component,
clones,
context,
remainingCount,
getAvatarGroupCountProps,
getAvatarGroupProps,
renderCount = (count) => /* @__PURE__ */ jsx(avatar_default, { ...getAvatarGroupCountProps(), name: `+${count}` })
} = useAvatarGroup({
...props,
ref
});
return /* @__PURE__ */ jsx(Component, { ...getAvatarGroupProps(), children: /* @__PURE__ */ jsxs(AvatarGroupProvider, { value: context, children: [
clones,
remainingCount > 0 && renderCount(remainingCount)
] }) });
});
AvatarGroup.displayName = "HeroUI.AvatarGroup";
var avatar_group_default = AvatarGroup;
export {
avatar_group_default
};
@@ -0,0 +1,303 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var pathModule = require('path');
var isWindows = process.platform === 'win32';
var fs = require('fs');
// JavaScript implementation of realpath, ported from node pre-v6
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
function rethrow() {
// Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and
// is fairly slow to generate.
var callback;
if (DEBUG) {
var backtrace = new Error;
callback = debugCallback;
} else
callback = missingCallback;
return callback;
function debugCallback(err) {
if (err) {
backtrace.message = err.message;
err = backtrace;
missingCallback(err);
}
}
function missingCallback(err) {
if (err) {
if (process.throwDeprecation)
throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
else if (!process.noDeprecation) {
var msg = 'fs: missing callback ' + (err.stack || err.message);
if (process.traceDeprecation)
console.trace(msg);
else
console.error(msg);
}
}
}
}
function maybeCallback(cb) {
return typeof cb === 'function' ? cb : rethrow();
}
var normalize = pathModule.normalize;
// Regexp that finds the next partion of a (partial) path
// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
if (isWindows) {
var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
} else {
var nextPartRe = /(.*?)(?:[\/]+|$)/g;
}
// Regex to find the device root, including trailing slash. E.g. 'c:\\'.
if (isWindows) {
var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
} else {
var splitRootRe = /^[\/]*/;
}
exports.realpathSync = function realpathSync(p, cache) {
// make p is absolute
p = pathModule.resolve(p);
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
return cache[p];
}
var original = p,
seenLinks = {},
knownHard = {};
// current character position in p
var pos;
// the partial path so far, including a trailing slash if any
var current;
// the partial path without a trailing slash (except when pointing at a root)
var base;
// the partial path scanned in the previous round, with slash
var previous;
start();
function start() {
// Skip over roots
var m = splitRootRe.exec(p);
pos = m[0].length;
current = m[0];
base = m[0];
previous = '';
// On windows, check that the root exists. On unix there is no need.
if (isWindows && !knownHard[base]) {
fs.lstatSync(base);
knownHard[base] = true;
}
}
// walk down the path, swapping out linked pathparts for their real
// values
// NB: p.length changes.
while (pos < p.length) {
// find the next part
nextPartRe.lastIndex = pos;
var result = nextPartRe.exec(p);
previous = current;
current += result[0];
base = previous + result[1];
pos = nextPartRe.lastIndex;
// continue if not a symlink
if (knownHard[base] || (cache && cache[base] === base)) {
continue;
}
var resolvedLink;
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
// some known symbolic link. no need to stat again.
resolvedLink = cache[base];
} else {
var stat = fs.lstatSync(base);
if (!stat.isSymbolicLink()) {
knownHard[base] = true;
if (cache) cache[base] = base;
continue;
}
// read the link if it wasn't read before
// dev/ino always return 0 on windows, so skip the check.
var linkTarget = null;
if (!isWindows) {
var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
if (seenLinks.hasOwnProperty(id)) {
linkTarget = seenLinks[id];
}
}
if (linkTarget === null) {
fs.statSync(base);
linkTarget = fs.readlinkSync(base);
}
resolvedLink = pathModule.resolve(previous, linkTarget);
// track this, if given a cache.
if (cache) cache[base] = resolvedLink;
if (!isWindows) seenLinks[id] = linkTarget;
}
// resolve the link, then start over
p = pathModule.resolve(resolvedLink, p.slice(pos));
start();
}
if (cache) cache[original] = p;
return p;
};
exports.realpath = function realpath(p, cache, cb) {
if (typeof cb !== 'function') {
cb = maybeCallback(cache);
cache = null;
}
// make p is absolute
p = pathModule.resolve(p);
if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
return process.nextTick(cb.bind(null, null, cache[p]));
}
var original = p,
seenLinks = {},
knownHard = {};
// current character position in p
var pos;
// the partial path so far, including a trailing slash if any
var current;
// the partial path without a trailing slash (except when pointing at a root)
var base;
// the partial path scanned in the previous round, with slash
var previous;
start();
function start() {
// Skip over roots
var m = splitRootRe.exec(p);
pos = m[0].length;
current = m[0];
base = m[0];
previous = '';
// On windows, check that the root exists. On unix there is no need.
if (isWindows && !knownHard[base]) {
fs.lstat(base, function(err) {
if (err) return cb(err);
knownHard[base] = true;
LOOP();
});
} else {
process.nextTick(LOOP);
}
}
// walk down the path, swapping out linked pathparts for their real
// values
function LOOP() {
// stop if scanned past end of path
if (pos >= p.length) {
if (cache) cache[original] = p;
return cb(null, p);
}
// find the next part
nextPartRe.lastIndex = pos;
var result = nextPartRe.exec(p);
previous = current;
current += result[0];
base = previous + result[1];
pos = nextPartRe.lastIndex;
// continue if not a symlink
if (knownHard[base] || (cache && cache[base] === base)) {
return process.nextTick(LOOP);
}
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
// known symbolic link. no need to stat again.
return gotResolvedLink(cache[base]);
}
return fs.lstat(base, gotStat);
}
function gotStat(err, stat) {
if (err) return cb(err);
// if not a symlink, skip to the next path part
if (!stat.isSymbolicLink()) {
knownHard[base] = true;
if (cache) cache[base] = base;
return process.nextTick(LOOP);
}
// stat & read the link if not read before
// call gotTarget as soon as the link target is known
// dev/ino always return 0 on windows, so skip the check.
if (!isWindows) {
var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
if (seenLinks.hasOwnProperty(id)) {
return gotTarget(null, seenLinks[id], base);
}
}
fs.stat(base, function(err) {
if (err) return cb(err);
fs.readlink(base, function(err, target) {
if (!isWindows) seenLinks[id] = target;
gotTarget(err, target);
});
});
}
function gotTarget(err, target, base) {
if (err) return cb(err);
var resolvedLink = pathModule.resolve(previous, target);
if (cache) cache[base] = resolvedLink;
gotResolvedLink(resolvedLink);
}
function gotResolvedLink(resolvedLink) {
// resolve the link, then start over
p = pathModule.resolve(resolvedLink, p.slice(pos));
start();
}
};
@@ -0,0 +1,17 @@
// Standard YAML's Failsafe schema.
// http://www.yaml.org/spec/1.2/spec.html#id2802346
'use strict';
var Schema = require('../schema');
module.exports = new Schema({
explicit: [
require('../type/str'),
require('../type/seq'),
require('../type/map')
]
});
@@ -0,0 +1,23 @@
/**
* Given a absolute or relative time definition and current/prev time state of the sequence,
* calculate an absolute time for the next keyframes.
*/
function calcNextTime(current, next, prev, labels) {
if (typeof next === "number") {
return next;
}
else if (next.startsWith("-") || next.startsWith("+")) {
return Math.max(0, current + parseFloat(next));
}
else if (next === "<") {
return prev;
}
else if (next.startsWith("<")) {
return Math.max(0, prev + parseFloat(next.slice(1)));
}
else {
return labels.get(next) ?? current;
}
}
export { calcNextTime };
@@ -0,0 +1,80 @@
import { resize, frame, cancelFrame, frameData } from 'motion-dom';
import { noop } from 'motion-utils';
import { createScrollInfo } from './info.mjs';
import { createOnScrollHandler } from './on-scroll-handler.mjs';
const scrollListeners = new WeakMap();
const resizeListeners = new WeakMap();
const onScrollHandlers = new WeakMap();
const getEventTarget = (element) => element === document.scrollingElement ? window : element;
function scrollInfo(onScroll, { container = document.scrollingElement, ...options } = {}) {
if (!container)
return noop;
let containerHandlers = onScrollHandlers.get(container);
/**
* Get the onScroll handlers for this container.
* If one isn't found, create a new one.
*/
if (!containerHandlers) {
containerHandlers = new Set();
onScrollHandlers.set(container, containerHandlers);
}
/**
* Create a new onScroll handler for the provided callback.
*/
const info = createScrollInfo();
const containerHandler = createOnScrollHandler(container, onScroll, info, options);
containerHandlers.add(containerHandler);
/**
* Check if there's a scroll event listener for this container.
* If not, create one.
*/
if (!scrollListeners.has(container)) {
const measureAll = () => {
for (const handler of containerHandlers) {
handler.measure(frameData.timestamp);
}
frame.preUpdate(notifyAll);
};
const notifyAll = () => {
for (const handler of containerHandlers) {
handler.notify();
}
};
const listener = () => frame.read(measureAll);
scrollListeners.set(container, listener);
const target = getEventTarget(container);
window.addEventListener("resize", listener, { passive: true });
if (container !== document.documentElement) {
resizeListeners.set(container, resize(container, listener));
}
target.addEventListener("scroll", listener, { passive: true });
listener();
}
const listener = scrollListeners.get(container);
frame.read(listener, false, true);
return () => {
cancelFrame(listener);
/**
* Check if we even have any handlers for this container.
*/
const currentHandlers = onScrollHandlers.get(container);
if (!currentHandlers)
return;
currentHandlers.delete(containerHandler);
if (currentHandlers.size)
return;
/**
* If no more handlers, remove the scroll listener too.
*/
const scrollListener = scrollListeners.get(container);
scrollListeners.delete(container);
if (scrollListener) {
getEventTarget(container).removeEventListener("scroll", scrollListener);
resizeListeners.get(container)?.();
window.removeEventListener("resize", scrollListener);
}
};
}
export { scrollInfo };
@@ -0,0 +1,53 @@
/**
* profiler.js: TODO: add file header description.
*
* (C) 2010 Charlie Robbins
* MIT LICENCE
*/
'use strict';
/**
* TODO: add class description.
* @type {Profiler}
* @private
*/
class Profiler {
/**
* Constructor function for the Profiler instance used by
* `Logger.prototype.startTimer`. When done is called the timer will finish
* and log the duration.
* @param {!Logger} logger - TODO: add param description.
* @private
*/
constructor(logger) {
const Logger = require('./logger');
if (typeof logger !== 'object' || Array.isArray(logger) || !(logger instanceof Logger)) {
throw new Error('Logger is required for profiling');
} else {
this.logger = logger;
this.start = Date.now();
}
}
/**
* Ends the current timer (i.e. Profiler) instance and logs the `msg` along
* with the duration since creation.
* @returns {mixed} - TODO: add return description.
* @private
*/
done(...args) {
if (typeof args[args.length - 1] === 'function') {
// eslint-disable-next-line no-console
console.warn('Callback function no longer supported as of winston@3.0.0');
args.pop();
}
const info = typeof args[args.length - 1] === 'object' ? args.pop() : {};
info.level = info.level || 'info';
info.durationMs = (Date.now()) - this.start;
return this.logger.write(info);
}
};
module.exports = Profiler;
@@ -0,0 +1,8 @@
interface LinkedNode {
prev: LinkedNode | null;
next: LinkedNode | null;
length(): number;
}
export type { LinkedNode as default };
@@ -0,0 +1,11 @@
import { isObject } from 'motion-utils';
/**
* Checks if an element is an SVG element in a way
* that works across iframes
*/
function isSVGElement(element) {
return isObject(element) && "ownerSVGElement" in element;
}
export { isSVGElement };
@@ -0,0 +1,55 @@
import { MutableRefObject } from "react";
import { DEFAULT_HEARTBEAT } from "./constants";
import { HeartbeatOptions } from "./types";
function getLastMessageTime(lastMessageTime: MutableRefObject<number> | MutableRefObject<number>[]): number {
if (Array.isArray(lastMessageTime)) {
return lastMessageTime.reduce((p, c) => { return (p.current > c.current) ? p : c; }).current;
}
return lastMessageTime.current
}
export function heartbeat(ws: WebSocket, lastMessageTime: MutableRefObject<number> | MutableRefObject<number>[], options?: HeartbeatOptions): () => void {
const {
interval = DEFAULT_HEARTBEAT.interval,
timeout = DEFAULT_HEARTBEAT.timeout,
message = DEFAULT_HEARTBEAT.message,
} = options || {};
// how often check interval between ping messages
// minimum is 100ms
// maximum is ${interval / 10}ms
const intervalCheck = Math.max(100, interval / 10);
let lastPingSentAt = Date.now();
const heartbeatInterval = setInterval(() => {
const timeNow = Date.now();
const lastMessageReceivedAt = getLastMessageTime(lastMessageTime);
if (lastMessageReceivedAt + timeout <= timeNow) {
console.warn(`Heartbeat timed out, closing connection, last message received ${timeNow - lastMessageReceivedAt}ms ago, last ping sent ${timeNow - lastPingSentAt}ms ago`);
ws.close();
} else {
if (lastMessageReceivedAt + interval <= timeNow && lastPingSentAt + interval <= timeNow) {
try {
if (typeof message === 'function') {
ws.send(message());
} else {
ws.send(message);
}
lastPingSentAt = timeNow;
} catch (err: unknown) {
console.error(`Heartbeat failed, closing connection`, err instanceof Error ? err.message : err);
ws.close();
}
}
}
}, intervalCheck);
ws.addEventListener("close", () => {
clearInterval(heartbeatInterval);
});
return () => { };
}
@@ -0,0 +1,24 @@
import arraySample from './_arraySample.js';
import baseSample from './_baseSample.js';
import isArray from './isArray.js';
/**
* Gets a random element from `collection`.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Collection
* @param {Array|Object} collection The collection to sample.
* @returns {*} Returns the random element.
* @example
*
* _.sample([1, 2, 3, 4]);
* // => 2
*/
function sample(collection) {
var func = isArray(collection) ? arraySample : baseSample;
return func(collection);
}
export default sample;
@@ -0,0 +1,17 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-flat-configs.js" script.
*/
"use strict"
module.exports = {
plugins: {
get "es-x"() {
return require("../../index.js")
},
},
rules: {
...require("./no-new-in-es2023").rules,
...require("./no-new-in-es2022").rules,
},
}
@@ -0,0 +1,238 @@
'use strict';var _contextCompat = require('eslint-module-utils/contextCompat');
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
function isComma(token) {
return token.type === 'Punctuator' && token.value === ',';
}
/**
* @param {import('eslint').Rule.Fix[]} fixes
* @param {import('eslint').Rule.RuleFixer} fixer
* @param {import('eslint').SourceCode.SourceCode} sourceCode
* @param {(ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[]} specifiers
* */
function removeSpecifiers(fixes, fixer, sourceCode, specifiers) {var _iteratorNormalCompletion = true;var _didIteratorError = false;var _iteratorError = undefined;try {
for (var _iterator = specifiers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {var specifier = _step.value;
// remove the trailing comma
var token = sourceCode.getTokenAfter(specifier);
if (token && isComma(token)) {
fixes.push(fixer.remove(token));
}
fixes.push(fixer.remove(specifier));
}} catch (err) {_didIteratorError = true;_iteratorError = err;} finally {try {if (!_iteratorNormalCompletion && _iterator['return']) {_iterator['return']();}} finally {if (_didIteratorError) {throw _iteratorError;}}}
}
/** @type {(node: import('estree').Node, sourceCode: import('eslint').SourceCode.SourceCode, specifiers: (ImportSpecifier | ImportNamespaceSpecifier)[], kind: 'type' | 'typeof') => string} */
function getImportText(
node,
sourceCode,
specifiers,
kind)
{
var sourceString = sourceCode.getText(node.source);
if (specifiers.length === 0) {
return '';
}
var names = specifiers.map(function (s) {
if (s.imported.name === s.local.name) {
return s.imported.name;
}
return String(s.imported.name) + ' as ' + String(s.local.name);
});
// insert a fresh top-level import
return 'import ' + String(kind) + ' {' + String(names.join(', ')) + '} from ' + String(sourceString) + ';';
}
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Style guide',
description: 'Enforce or ban the use of inline type-only markers for named imports.',
url: (0, _docsUrl2['default'])('consistent-type-specifier-style') },
fixable: 'code',
schema: [
{
type: 'string',
'enum': ['prefer-inline', 'prefer-top-level'],
'default': 'prefer-inline' }] },
create: function () {function create(context) {
var sourceCode = (0, _contextCompat.getSourceCode)(context);
if (context.options[0] === 'prefer-inline') {
return {
ImportDeclaration: function () {function ImportDeclaration(node) {
if (node.importKind === 'value' || node.importKind == null) {
// top-level value / unknown is valid
return;
}
if (
// no specifiers (import type {} from '') have no specifiers to mark as inline
node.specifiers.length === 0 ||
node.specifiers.length === 1
// default imports are both "inline" and "top-level"
&& (
node.specifiers[0].type === 'ImportDefaultSpecifier'
// namespace imports are both "inline" and "top-level"
|| node.specifiers[0].type === 'ImportNamespaceSpecifier'))
{
return;
}
context.report({
node: node,
message: 'Prefer using inline {{kind}} specifiers instead of a top-level {{kind}}-only import.',
data: {
kind: node.importKind },
fix: function () {function fix(fixer) {
var kindToken = sourceCode.getFirstToken(node, { skip: 1 });
return [].concat(
kindToken ? fixer.remove(kindToken) : [],
node.specifiers.map(function (specifier) {return fixer.insertTextBefore(specifier, String(node.importKind) + ' ');}));
}return fix;}() });
}return ImportDeclaration;}() };
}
// prefer-top-level
return {
/** @param {import('estree').ImportDeclaration} node */
ImportDeclaration: function () {function ImportDeclaration(node) {
if (
// already top-level is valid
node.importKind === 'type' ||
node.importKind === 'typeof'
// no specifiers (import {} from '') cannot have inline - so is valid
|| node.specifiers.length === 0 ||
node.specifiers.length === 1
// default imports are both "inline" and "top-level"
&& (
node.specifiers[0].type === 'ImportDefaultSpecifier'
// namespace imports are both "inline" and "top-level"
|| node.specifiers[0].type === 'ImportNamespaceSpecifier'))
{
return;
}
/** @type {typeof node.specifiers} */
var typeSpecifiers = [];
/** @type {typeof node.specifiers} */
var typeofSpecifiers = [];
/** @type {typeof node.specifiers} */
var valueSpecifiers = [];
/** @type {typeof node.specifiers[number]} */
var defaultSpecifier = null;var _iteratorNormalCompletion2 = true;var _didIteratorError2 = false;var _iteratorError2 = undefined;try {
for (var _iterator2 = node.specifiers[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {var specifier = _step2.value;
if (specifier.type === 'ImportDefaultSpecifier') {
defaultSpecifier = specifier;
continue;
}
if (specifier.importKind === 'type') {
typeSpecifiers.push(specifier);
} else if (specifier.importKind === 'typeof') {
typeofSpecifiers.push(specifier);
} else if (specifier.importKind === 'value' || specifier.importKind == null) {
valueSpecifiers.push(specifier);
}
}} catch (err) {_didIteratorError2 = true;_iteratorError2 = err;} finally {try {if (!_iteratorNormalCompletion2 && _iterator2['return']) {_iterator2['return']();}} finally {if (_didIteratorError2) {throw _iteratorError2;}}}
var typeImport = getImportText(node, sourceCode, typeSpecifiers, 'type');
var typeofImport = getImportText(node, sourceCode, typeofSpecifiers, 'typeof');
var newImports = (String(typeImport) + '\n' + String(typeofImport)).trim();
if (typeSpecifiers.length + typeofSpecifiers.length === node.specifiers.length) {
/** @type {('type' | 'typeof')[]} */
// all specifiers have inline specifiers - so we replace the entire import
var kind = [].concat(
typeSpecifiers.length > 0 ? 'type' : [],
typeofSpecifiers.length > 0 ? 'typeof' : []);
context.report({
node: node,
message: 'Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.',
data: {
kind: kind.join('/') },
fix: function () {function fix(fixer) {
return fixer.replaceText(node, newImports);
}return fix;}() });
} else {
// remove specific specifiers and insert new imports for them
typeSpecifiers.concat(typeofSpecifiers).forEach(function (specifier) {
context.report({
node: specifier,
message: 'Prefer using a top-level {{kind}}-only import instead of inline {{kind}} specifiers.',
data: {
kind: specifier.importKind },
fix: function () {function fix(fixer) {
/** @type {import('eslint').Rule.Fix[]} */
var fixes = [];
// if there are no value specifiers, then the other report fixer will be called, not this one
if (valueSpecifiers.length > 0) {
// import { Value, type Type } from 'mod';
// we can just remove the type specifiers
removeSpecifiers(fixes, fixer, sourceCode, typeSpecifiers);
removeSpecifiers(fixes, fixer, sourceCode, typeofSpecifiers);
// make the import nicely formatted by also removing the trailing comma after the last value import
// eg
// import { Value, type Type } from 'mod';
// to
// import { Value } from 'mod';
// not
// import { Value, } from 'mod';
var maybeComma = sourceCode.getTokenAfter(valueSpecifiers[valueSpecifiers.length - 1]);
if (isComma(maybeComma)) {
fixes.push(fixer.remove(maybeComma));
}
} else if (defaultSpecifier) {
// import Default, { type Type } from 'mod';
// remove the entire curly block so we don't leave an empty one behind
// NOTE - the default specifier *must* be the first specifier always!
// so a comma exists that we also have to clean up or else it's bad syntax
var comma = sourceCode.getTokenAfter(defaultSpecifier, isComma);
var closingBrace = sourceCode.getTokenAfter(
node.specifiers[node.specifiers.length - 1],
function (token) {return token.type === 'Punctuator' && token.value === '}';});
fixes.push(fixer.removeRange([
comma.range[0],
closingBrace.range[1]]));
}
return fixes.concat(
// insert the new imports after the old declaration
fixer.insertTextAfter(node, '\n' + String(newImports)));
}return fix;}() });
});
}
}return ImportDeclaration;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9jb25zaXN0ZW50LXR5cGUtc3BlY2lmaWVyLXN0eWxlLmpzIl0sIm5hbWVzIjpbImlzQ29tbWEiLCJ0b2tlbiIsInR5cGUiLCJ2YWx1ZSIsInJlbW92ZVNwZWNpZmllcnMiLCJmaXhlcyIsImZpeGVyIiwic291cmNlQ29kZSIsInNwZWNpZmllcnMiLCJzcGVjaWZpZXIiLCJnZXRUb2tlbkFmdGVyIiwicHVzaCIsInJlbW92ZSIsImdldEltcG9ydFRleHQiLCJub2RlIiwia2luZCIsInNvdXJjZVN0cmluZyIsImdldFRleHQiLCJzb3VyY2UiLCJsZW5ndGgiLCJuYW1lcyIsIm1hcCIsInMiLCJpbXBvcnRlZCIsIm5hbWUiLCJsb2NhbCIsImpvaW4iLCJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJjYXRlZ29yeSIsImRlc2NyaXB0aW9uIiwidXJsIiwiZml4YWJsZSIsInNjaGVtYSIsImNyZWF0ZSIsImNvbnRleHQiLCJvcHRpb25zIiwiSW1wb3J0RGVjbGFyYXRpb24iLCJpbXBvcnRLaW5kIiwicmVwb3J0IiwibWVzc2FnZSIsImRhdGEiLCJmaXgiLCJraW5kVG9rZW4iLCJnZXRGaXJzdFRva2VuIiwic2tpcCIsImNvbmNhdCIsImluc2VydFRleHRCZWZvcmUiLCJ0eXBlU3BlY2lmaWVycyIsInR5cGVvZlNwZWNpZmllcnMiLCJ2YWx1ZVNwZWNpZmllcnMiLCJkZWZhdWx0U3BlY2lmaWVyIiwidHlwZUltcG9ydCIsInR5cGVvZkltcG9ydCIsIm5ld0ltcG9ydHMiLCJ0cmltIiwicmVwbGFjZVRleHQiLCJmb3JFYWNoIiwibWF5YmVDb21tYSIsImNvbW1hIiwiY2xvc2luZ0JyYWNlIiwicmVtb3ZlUmFuZ2UiLCJyYW5nZSIsImluc2VydFRleHRBZnRlciJdLCJtYXBwaW5ncyI6ImFBQUE7O0FBRUEscUM7O0FBRUEsU0FBU0EsT0FBVCxDQUFpQkMsS0FBakIsRUFBd0I7QUFDdEIsU0FBT0EsTUFBTUMsSUFBTixLQUFlLFlBQWYsSUFBK0JELE1BQU1FLEtBQU4sS0FBZ0IsR0FBdEQ7QUFDRDs7QUFFRDs7Ozs7O0FBTUEsU0FBU0MsZ0JBQVQsQ0FBMEJDLEtBQTFCLEVBQWlDQyxLQUFqQyxFQUF3Q0MsVUFBeEMsRUFBb0RDLFVBQXBELEVBQWdFO0FBQzlELHlCQUF3QkEsVUFBeEIsOEhBQW9DLEtBQXpCQyxTQUF5QjtBQUNsQztBQUNBLFVBQU1SLFFBQVFNLFdBQVdHLGFBQVgsQ0FBeUJELFNBQXpCLENBQWQ7QUFDQSxVQUFJUixTQUFTRCxRQUFRQyxLQUFSLENBQWIsRUFBNkI7QUFDM0JJLGNBQU1NLElBQU4sQ0FBV0wsTUFBTU0sTUFBTixDQUFhWCxLQUFiLENBQVg7QUFDRDtBQUNESSxZQUFNTSxJQUFOLENBQVdMLE1BQU1NLE1BQU4sQ0FBYUgsU0FBYixDQUFYO0FBQ0QsS0FSNkQ7QUFTL0Q7O0FBRUQ7QUFDQSxTQUFTSSxhQUFUO0FBQ0VDLElBREY7QUFFRVAsVUFGRjtBQUdFQyxVQUhGO0FBSUVPLElBSkY7QUFLRTtBQUNBLE1BQU1DLGVBQWVULFdBQVdVLE9BQVgsQ0FBbUJILEtBQUtJLE1BQXhCLENBQXJCO0FBQ0EsTUFBSVYsV0FBV1csTUFBWCxLQUFzQixDQUExQixFQUE2QjtBQUMzQixXQUFPLEVBQVA7QUFDRDs7QUFFRCxNQUFNQyxRQUFRWixXQUFXYSxHQUFYLENBQWUsVUFBQ0MsQ0FBRCxFQUFPO0FBQ2xDLFFBQUlBLEVBQUVDLFFBQUYsQ0FBV0MsSUFBWCxLQUFvQkYsRUFBRUcsS0FBRixDQUFRRCxJQUFoQyxFQUFzQztBQUNwQyxhQUFPRixFQUFFQyxRQUFGLENBQVdDLElBQWxCO0FBQ0Q7QUFDRCxrQkFBVUYsRUFBRUMsUUFBRixDQUFXQyxJQUFyQixvQkFBZ0NGLEVBQUVHLEtBQUYsQ0FBUUQsSUFBeEM7QUFDRCxHQUxhLENBQWQ7QUFNQTtBQUNBLDRCQUFpQlQsSUFBakIsa0JBQTBCSyxNQUFNTSxJQUFOLENBQVcsSUFBWCxDQUExQix1QkFBb0RWLFlBQXBEO0FBQ0Q7O0FBRUQ7QUFDQVcsT0FBT0MsT0FBUCxHQUFpQjtBQUNmQyxRQUFNO0FBQ0ozQixVQUFNLFlBREY7QUFFSjRCLFVBQU07QUFDSkMsZ0JBQVUsYUFETjtBQUVKQyxtQkFBYSx1RUFGVDtBQUdKQyxXQUFLLDBCQUFRLGlDQUFSLENBSEQsRUFGRjs7QUFPSkMsYUFBUyxNQVBMO0FBUUpDLFlBQVE7QUFDTjtBQUNFakMsWUFBTSxRQURSO0FBRUUsY0FBTSxDQUFDLGVBQUQsRUFBa0Isa0JBQWxCLENBRlI7QUFHRSxpQkFBUyxlQUhYLEVBRE0sQ0FSSixFQURTOzs7OztBQWtCZmtDLFFBbEJlLCtCQWtCUkMsT0FsQlEsRUFrQkM7QUFDZCxVQUFNOUIsYUFBYSxrQ0FBYzhCLE9BQWQsQ0FBbkI7O0FBRUEsVUFBSUEsUUFBUUMsT0FBUixDQUFnQixDQUFoQixNQUF1QixlQUEzQixFQUE0QztBQUMxQyxlQUFPO0FBQ0xDLDJCQURLLDBDQUNhekIsSUFEYixFQUNtQjtBQUN0QixrQkFBSUEsS0FBSzBCLFVBQUwsS0FBb0IsT0FBcEIsSUFBK0IxQixLQUFLMEIsVUFBTCxJQUFtQixJQUF0RCxFQUE0RDtBQUMxRDtBQUNBO0FBQ0Q7O0FBRUQ7QUFDRTtBQUNBMUIsbUJBQUtOLFVBQUwsQ0FBZ0JXLE1BQWhCLEtBQTJCLENBQTNCO0FBQ0dMLG1CQUFLTixVQUFMLENBQWdCVyxNQUFoQixLQUEyQjtBQUM5QjtBQURHO0FBR0RMLG1CQUFLTixVQUFMLENBQWdCLENBQWhCLEVBQW1CTixJQUFuQixLQUE0QjtBQUM1QjtBQURBLGlCQUVHWSxLQUFLTixVQUFMLENBQWdCLENBQWhCLEVBQW1CTixJQUFuQixLQUE0QiwwQkFMOUIsQ0FITDs7QUFVRTtBQUNBO0FBQ0Q7O0FBRURtQyxzQkFBUUksTUFBUixDQUFlO0FBQ2IzQiwwQkFEYTtBQUViNEIseUJBQVMsc0ZBRkk7QUFHYkMsc0JBQU07QUFDSjVCLHdCQUFNRCxLQUFLMEIsVUFEUCxFQUhPOztBQU1iSSxtQkFOYSw0QkFNVHRDLEtBTlMsRUFNRjtBQUNULHdCQUFNdUMsWUFBWXRDLFdBQVd1QyxhQUFYLENBQXlCaEMsSUFBekIsRUFBK0IsRUFBRWlDLE1BQU0sQ0FBUixFQUEvQixDQUFsQjs7QUFFQSwyQkFBTyxHQUFHQyxNQUFIO0FBQ0xILGdDQUFZdkMsTUFBTU0sTUFBTixDQUFhaUMsU0FBYixDQUFaLEdBQXNDLEVBRGpDO0FBRUwvQix5QkFBS04sVUFBTCxDQUFnQmEsR0FBaEIsQ0FBb0IsVUFBQ1osU0FBRCxVQUFlSCxNQUFNMkMsZ0JBQU4sQ0FBdUJ4QyxTQUF2QixTQUFxQ0ssS0FBSzBCLFVBQTFDLFFBQWYsRUFBcEIsQ0FGSyxDQUFQOztBQUlELG1CQWJZLGdCQUFmOztBQWVELGFBcENJLDhCQUFQOztBQXNDRDs7QUFFRDtBQUNBLGFBQU87QUFDTDtBQUNBRCx5QkFGSywwQ0FFYXpCLElBRmIsRUFFbUI7QUFDdEI7QUFDRTtBQUNBQSxpQkFBSzBCLFVBQUwsS0FBb0IsTUFBcEI7QUFDRzFCLGlCQUFLMEIsVUFBTCxLQUFvQjtBQUN2QjtBQUZBLGVBR0cxQixLQUFLTixVQUFMLENBQWdCVyxNQUFoQixLQUEyQixDQUg5QjtBQUlHTCxpQkFBS04sVUFBTCxDQUFnQlcsTUFBaEIsS0FBMkI7QUFDOUI7QUFERztBQUdETCxpQkFBS04sVUFBTCxDQUFnQixDQUFoQixFQUFtQk4sSUFBbkIsS0FBNEI7QUFDNUI7QUFEQSxlQUVHWSxLQUFLTixVQUFMLENBQWdCLENBQWhCLEVBQW1CTixJQUFuQixLQUE0QiwwQkFMOUIsQ0FOTDs7QUFhRTtBQUNBO0FBQ0Q7O0FBRUQ7QUFDQSxnQkFBTWdELGlCQUFpQixFQUF2QjtBQUNBO0FBQ0EsZ0JBQU1DLG1CQUFtQixFQUF6QjtBQUNBO0FBQ0EsZ0JBQU1DLGtCQUFrQixFQUF4QjtBQUNBO0FBQ0EsZ0JBQUlDLG1CQUFtQixJQUF2QixDQXpCc0I7QUEwQnRCLG9DQUF3QnZDLEtBQUtOLFVBQTdCLG1JQUF5QyxLQUE5QkMsU0FBOEI7QUFDdkMsb0JBQUlBLFVBQVVQLElBQVYsS0FBbUIsd0JBQXZCLEVBQWlEO0FBQy9DbUQscUNBQW1CNUMsU0FBbkI7QUFDQTtBQUNEOztBQUVELG9CQUFJQSxVQUFVK0IsVUFBVixLQUF5QixNQUE3QixFQUFxQztBQUNuQ1UsaUNBQWV2QyxJQUFmLENBQW9CRixTQUFwQjtBQUNELGlCQUZELE1BRU8sSUFLine truncated
@@ -0,0 +1,4 @@
export interface IDelay {
apply: () => Promise<unknown>;
setAttemptNumber: (attempt: number) => void;
}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var defaultShouldUpdate = function defaultShouldUpdate(a, b) {
return !Object.is(a, b);
};
function usePrevious(state, shouldUpdate) {
if (shouldUpdate === void 0) {
shouldUpdate = defaultShouldUpdate;
}
var prevRef = (0, _react.useRef)(undefined);
var curRef = (0, _react.useRef)(undefined);
if (shouldUpdate(curRef.current, state)) {
prevRef.current = curRef.current;
curRef.current = state;
}
return prevRef.current;
}
var _default = exports["default"] = usePrevious;
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CertificationRequest = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const certification_request_info_1 = require("./certification_request_info");
const asn1_x509_1 = require("@peculiar/asn1-x509");
class CertificationRequest {
constructor(params = {}) {
this.certificationRequestInfo = new certification_request_info_1.CertificationRequestInfo();
this.signatureAlgorithm = new asn1_x509_1.AlgorithmIdentifier();
this.signature = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.CertificationRequest = CertificationRequest;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: certification_request_info_1.CertificationRequestInfo, raw: true })
], CertificationRequest.prototype, "certificationRequestInfo", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.AlgorithmIdentifier })
], CertificationRequest.prototype, "signatureAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.BitString })
], CertificationRequest.prototype, "signature", void 0);
@@ -0,0 +1,77 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.encodeNonAsciiHTML = exports.encodeHTML = void 0;
var encode_html_js_1 = __importDefault(require("./generated/encode-html.js"));
var escape_js_1 = require("./escape.js");
var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;
/**
* Encodes all characters in the input using HTML entities. This includes
* characters that are valid ASCII characters in HTML documents, such as `#`.
*
* To get a more compact output, consider using the `encodeNonAsciiHTML`
* function, which will only encode characters that are not valid in HTML
* documents, as well as non-ASCII characters.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
function encodeHTML(data) {
return encodeHTMLTrieRe(htmlReplacer, data);
}
exports.encodeHTML = encodeHTML;
/**
* Encodes all non-ASCII characters, as well as characters not valid in HTML
* documents using HTML entities. This function will not encode characters that
* are valid in HTML documents, such as `#`.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
function encodeNonAsciiHTML(data) {
return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);
}
exports.encodeNonAsciiHTML = encodeNonAsciiHTML;
function encodeHTMLTrieRe(regExp, str) {
var ret = "";
var lastIdx = 0;
var match;
while ((match = regExp.exec(str)) !== null) {
var i = match.index;
ret += str.substring(lastIdx, i);
var char = str.charCodeAt(i);
var next = encode_html_js_1.default.get(char);
if (typeof next === "object") {
// We are in a branch. Try to match the next char.
if (i + 1 < str.length) {
var nextChar = str.charCodeAt(i + 1);
var value = typeof next.n === "number"
? next.n === nextChar
? next.o
: undefined
: next.n.get(nextChar);
if (value !== undefined) {
ret += value;
lastIdx = regExp.lastIndex += 1;
continue;
}
}
next = next.v;
}
// We might have a tree node without a value; skip and use a numeric entity.
if (next !== undefined) {
ret += next;
lastIdx = i + 1;
}
else {
var cp = (0, escape_js_1.getCodePoint)(str, i);
ret += "&#x".concat(cp.toString(16), ";");
// Increase by 1 if we have a surrogate pair
lastIdx = regExp.lastIndex += Number(cp !== char);
}
}
return ret + str.substr(lastIdx);
}
//# sourceMappingURL=encode.js.map
@@ -0,0 +1,26 @@
import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';
import { animateTarget } from './visual-element-target.mjs';
import { animateVariant } from './visual-element-variant.mjs';
function animateVisualElement(visualElement, definition, options = {}) {
visualElement.notify("AnimationStart", definition);
let animation;
if (Array.isArray(definition)) {
const animations = definition.map((variant) => animateVariant(visualElement, variant, options));
animation = Promise.all(animations);
}
else if (typeof definition === "string") {
animation = animateVariant(visualElement, definition, options);
}
else {
const resolvedDefinition = typeof definition === "function"
? resolveVariant(visualElement, definition, options.custom)
: definition;
animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));
}
return animation.then(() => {
visualElement.notify("AnimationComplete", definition);
});
}
export { animateVisualElement };
@@ -0,0 +1,29 @@
'use strict';
var define = require('define-properties');
var gOPD = require('gopd');
var getPolyfill = require('./polyfill');
module.exports = function shimGlobal() {
var polyfill = getPolyfill();
if (define.supportsDescriptors) {
var descriptor = gOPD(polyfill, 'globalThis');
if (
!descriptor
|| (
descriptor.configurable
&& (descriptor.enumerable || !descriptor.writable || globalThis !== polyfill)
)
) {
Object.defineProperty(polyfill, 'globalThis', {
configurable: true,
enumerable: false,
value: polyfill,
writable: true
});
}
} else if (typeof globalThis !== 'object' || globalThis !== polyfill) {
polyfill.globalThis = polyfill;
}
return polyfill;
};
@@ -0,0 +1,24 @@
{
"name": "@react-types/datepicker",
"version": "3.9.0",
"description": "Spectrum UI components in React",
"license": "Apache-2.0",
"types": "src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@internationalized/date": "^3.6.0",
"@react-types/calendar": "^3.5.0",
"@react-types/overlays": "^3.8.11",
"@react-types/shared": "^3.26.0"
},
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
}
@@ -0,0 +1,43 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Number.MIN_SAFE_INTEGER` property.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-number-minsafeinteger.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' property is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
Number: {
MIN_SAFE_INTEGER: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,53 @@
{
"name": "@heroui/shared-utils",
"version": "2.1.3",
"description": "A set of HeroUI utilities",
"keywords": [
"system"
],
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/core/system"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"clean-package": "../../../clean-package.config.json",
"tsup": {
"clean": true,
"target": "es2019",
"format": [
"cjs",
"esm"
]
},
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"build:fast": "tsup src"
}
}
@@ -0,0 +1,83 @@
{
"name": "string.prototype.trimend",
"version": "1.0.9",
"author": "Jordan Harband <ljharb@gmail.com>",
"contributors": [
"Jordan Harband <ljharb@gmail.com>",
"Khaled Al-Ansari <khaledelansari@gmail.com>"
],
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"description": "ES2019 spec-compliant String.prototype.trimEnd shim.",
"license": "MIT",
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"lint": "eslint --ext=js,mjs .",
"postlint": "es-shim-api --bound",
"pretest": "npm run lint",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"tests-only": "nyc tape 'test/**/*.js'",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git://github.com/es-shims/String.prototype.trimEnd.git"
},
"keywords": [
"es6",
"es7",
"es8",
"javascript",
"prototype",
"polyfill",
"utility",
"trim",
"trimLeft",
"trimRight",
"trimStart",
"trimEnd",
"tc39"
],
"dependencies": {
"call-bind": "^1.0.8",
"call-bound": "^1.0.2",
"define-properties": "^1.2.1",
"es-object-atoms": "^1.0.0"
},
"devDependencies": {
"@es-shims/api": "^2.5.1",
"@ljharb/eslint-config": "^21.1.1",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"functions-have-names": "^1.2.3",
"has-strict-mode": "^1.0.1",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1,38 @@
var baseSlice = require('./_baseSlice'),
toInteger = require('./toInteger');
/**
* Creates a slice of `array` with `n` elements dropped from the beginning.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.drop([1, 2, 3]);
* // => [2, 3]
*
* _.drop([1, 2, 3], 2);
* // => [3]
*
* _.drop([1, 2, 3], 5);
* // => []
*
* _.drop([1, 2, 3], 0);
* // => [1, 2, 3]
*/
function drop(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
return baseSlice(array, n < 0 ? 0 : n, length);
}
module.exports = drop;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAKM,MAAM;IAKX,eAAe,IAAU,EAAQ;QAC/B,IAAI,OAAO,YAAY,GAAG,KAAK,IAAI,CAAC,SAAS;QAC7C,IAAI,OAAO,KAAK;YACd,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,OAAO,GAC1C,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,AAAC,CAAA,KAAK,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,AAAD,IAAK;YAGpD,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,OAAO,GAC1C,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,AAAC,CAAA,KAAK,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,AAAD,IAAK;QAEtD;QAEA,IAAI,CAAC,SAAS,GAAG,YAAY,GAAG;QAChC,IAAI,CAAC,WAAW,GAAG;IACrB;IAEA,qBAA2B;QACzB,IAAI,cAAc,IAAI,CAAC,WAAW,CAAC,IAAI;QAEvC,IAAI,YAAY,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG;QAC1C,YAAY,MAAM,IAAI;QACtB,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,GACpB,YAAY,CAAC,IAAI;QAGnB,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG;YACzB,IAAI,YAAY,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG;YACzC,YAAY,KAAK,IAAI;YACrB,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,GACpB,YAAY,CAAC,IAAI;QAErB;QAEA,OAAO;IACT;;aAtCQ,YAAY;aACZ,WAAW,IAAI,CAAA,GAAA,+BAAI,EAAE,GAAG;aACxB,cAAc,IAAI,CAAA,GAAA,8BAAG;;AAqC/B","sources":["packages/@react-stately/virtualizer/src/OverscanManager.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Point} from './Point';\nimport {Rect} from './Rect';\n\nexport class OverscanManager {\n private startTime = 0;\n private velocity = new Point(0, 0);\n private visibleRect = new Rect();\n\n setVisibleRect(rect: Rect): void {\n let time = performance.now() - this.startTime;\n if (time < 500) {\n if (rect.x !== this.visibleRect.x && time > 0) {\n this.velocity.x = (rect.x - this.visibleRect.x) / time;\n }\n\n if (rect.y !== this.visibleRect.y && time > 0) {\n this.velocity.y = (rect.y - this.visibleRect.y) / time;\n }\n }\n\n this.startTime = performance.now();\n this.visibleRect = rect;\n }\n\n getOverscannedRect(): Rect {\n let overscanned = this.visibleRect.copy();\n\n let overscanY = this.visibleRect.height / 3;\n overscanned.height += overscanY;\n if (this.velocity.y < 0) {\n overscanned.y -= overscanY;\n }\n\n if (this.velocity.x !== 0) {\n let overscanX = this.visibleRect.width / 3;\n overscanned.width += overscanX;\n if (this.velocity.x < 0) {\n overscanned.x -= overscanX;\n }\n }\n\n return overscanned;\n }\n}\n"],"names":[],"version":3,"file":"OverscanManager.main.js.map"}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('forIn', require('../forIn'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,11 @@
export enum MsfStatusType {
KUNKNOWN = 0,
KDISCONNECTED = 1,
KCONNECTED = 2
}
export enum MsfChangeReasonType {
KUNKNOWN = 0,
KUSERLOGININ = 1,
KUSERLOGINOUT = 2,
KAUTO = 3
}
@@ -0,0 +1,2 @@
export { inverseTransform } from './inverseTransform';
export { parseTransform } from './parseTransform';
@@ -0,0 +1,122 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "ariaHideOutside", () => $08ef1685902b6011$export$1c3ebcada18427bf);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ // Keeps a ref count of all hidden elements. Added to when hiding an element, and
// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.
let $08ef1685902b6011$var$refCountMap = new WeakMap();
let $08ef1685902b6011$var$observerStack = [];
function $08ef1685902b6011$export$1c3ebcada18427bf(targets, root = document.body) {
let visibleNodes = new Set(targets);
let hiddenNodes = new Set();
let walk = (root)=>{
// Keep live announcer and top layer elements (e.g. toasts) visible.
for (let element of root.querySelectorAll('[data-live-announcer], [data-react-aria-top-layer]'))visibleNodes.add(element);
let acceptNode = (node)=>{
// Skip this node and its children if it is one of the target nodes, or a live announcer.
// Also skip children of already hidden nodes, as aria-hidden is recursive. An exception is
// made for elements with role="row" since VoiceOver on iOS has issues hiding elements with role="row".
// For that case we want to hide the cells inside as well (https://bugs.webkit.org/show_bug.cgi?id=222623).
if (visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;
// Skip this node but continue to children if one of the targets is inside the node.
for (let target of visibleNodes){
if (node.contains(target)) return NodeFilter.FILTER_SKIP;
}
return NodeFilter.FILTER_ACCEPT;
};
let walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {
acceptNode: acceptNode
});
// TreeWalker does not include the root.
let acceptRoot = acceptNode(root);
if (acceptRoot === NodeFilter.FILTER_ACCEPT) hide(root);
if (acceptRoot !== NodeFilter.FILTER_REJECT) {
let node = walker.nextNode();
while(node != null){
hide(node);
node = walker.nextNode();
}
}
};
let hide = (node)=>{
var _refCountMap_get;
let refCount = (_refCountMap_get = $08ef1685902b6011$var$refCountMap.get(node)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;
// If already aria-hidden, and the ref count is zero, then this element
// was already hidden and there's nothing for us to do.
if (node.getAttribute('aria-hidden') === 'true' && refCount === 0) return;
if (refCount === 0) node.setAttribute('aria-hidden', 'true');
hiddenNodes.add(node);
$08ef1685902b6011$var$refCountMap.set(node, refCount + 1);
};
// If there is already a MutationObserver listening from a previous call,
// disconnect it so the new on takes over.
if ($08ef1685902b6011$var$observerStack.length) $08ef1685902b6011$var$observerStack[$08ef1685902b6011$var$observerStack.length - 1].disconnect();
walk(root);
let observer = new MutationObserver((changes)=>{
for (let change of changes){
if (change.type !== 'childList' || change.addedNodes.length === 0) continue;
// If the parent element of the added nodes is not within one of the targets,
// and not already inside a hidden node, hide all of the new children.
if (![
...visibleNodes,
...hiddenNodes
].some((node)=>node.contains(change.target))) {
for (let node of change.removedNodes)if (node instanceof Element) {
visibleNodes.delete(node);
hiddenNodes.delete(node);
}
for (let node of change.addedNodes){
if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === 'true' || node.dataset.reactAriaTopLayer === 'true')) visibleNodes.add(node);
else if (node instanceof Element) walk(node);
}
}
}
});
observer.observe(root, {
childList: true,
subtree: true
});
let observerWrapper = {
observe () {
observer.observe(root, {
childList: true,
subtree: true
});
},
disconnect () {
observer.disconnect();
}
};
$08ef1685902b6011$var$observerStack.push(observerWrapper);
return ()=>{
observer.disconnect();
for (let node of hiddenNodes){
let count = $08ef1685902b6011$var$refCountMap.get(node);
if (count == null) continue;
if (count === 1) {
node.removeAttribute('aria-hidden');
$08ef1685902b6011$var$refCountMap.delete(node);
} else $08ef1685902b6011$var$refCountMap.set(node, count - 1);
}
// Remove this observer from the stack, and start the previous one.
if (observerWrapper === $08ef1685902b6011$var$observerStack[$08ef1685902b6011$var$observerStack.length - 1]) {
$08ef1685902b6011$var$observerStack.pop();
if ($08ef1685902b6011$var$observerStack.length) $08ef1685902b6011$var$observerStack[$08ef1685902b6011$var$observerStack.length - 1].observe();
} else $08ef1685902b6011$var$observerStack.splice($08ef1685902b6011$var$observerStack.indexOf(observerWrapper), 1);
};
}
//# sourceMappingURL=ariaHideOutside.main.js.map
@@ -0,0 +1,140 @@
/**
* @license React
* scheduler-unstable_post_task.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var perf = window.performance,
setTimeout = window.setTimeout,
scheduler = global.scheduler,
getCurrentTime = perf.now.bind(perf),
deadline = 0,
currentPriorityLevel_DEPRECATED = 3;
function runTask(priorityLevel, postTaskPriority, node, callback) {
deadline = getCurrentTime() + 5;
try {
currentPriorityLevel_DEPRECATED = priorityLevel;
var result = callback(!1);
if ("function" === typeof result) {
var continuationOptions = { signal: node._controller.signal },
nextTask = runTask.bind(
null,
priorityLevel,
postTaskPriority,
node,
result
);
void 0 !== scheduler.yield
? scheduler
.yield(continuationOptions)
.then(nextTask)
.catch(handleAbortError)
: scheduler
.postTask(nextTask, continuationOptions)
.catch(handleAbortError);
}
} catch (error) {
setTimeout(function () {
throw error;
});
} finally {
currentPriorityLevel_DEPRECATED = 3;
}
}
function handleAbortError() {}
exports.unstable_IdlePriority = 5;
exports.unstable_ImmediatePriority = 1;
exports.unstable_LowPriority = 4;
exports.unstable_NormalPriority = 3;
exports.unstable_Profiling = null;
exports.unstable_UserBlockingPriority = 2;
exports.unstable_cancelCallback = function (node) {
node._controller.abort();
};
exports.unstable_forceFrameRate = function () {};
exports.unstable_getCurrentPriorityLevel = function () {
return currentPriorityLevel_DEPRECATED;
};
exports.unstable_next = function (callback) {
switch (currentPriorityLevel_DEPRECATED) {
case 1:
case 2:
case 3:
var priorityLevel = 3;
break;
default:
priorityLevel = currentPriorityLevel_DEPRECATED;
}
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_now = getCurrentTime;
exports.unstable_requestPaint = function () {};
exports.unstable_runWithPriority = function (priorityLevel, callback) {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = priorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
exports.unstable_scheduleCallback = function (
priorityLevel,
callback,
options
) {
switch (priorityLevel) {
case 1:
case 2:
var postTaskPriority = "user-blocking";
break;
case 4:
case 3:
postTaskPriority = "user-visible";
break;
case 5:
postTaskPriority = "background";
break;
default:
postTaskPriority = "user-visible";
}
var controller = new TaskController({ priority: postTaskPriority });
options = {
delay: "object" === typeof options && null !== options ? options.delay : 0,
signal: controller.signal
};
controller = { _controller: controller };
scheduler
.postTask(
runTask.bind(null, priorityLevel, postTaskPriority, controller, callback),
options
)
.catch(handleAbortError);
return controller;
};
exports.unstable_shouldYield = function () {
return getCurrentTime() >= deadline;
};
exports.unstable_wrapCallback = function (callback) {
var parentPriorityLevel = currentPriorityLevel_DEPRECATED;
return function () {
var previousPriorityLevel = currentPriorityLevel_DEPRECATED;
currentPriorityLevel_DEPRECATED = parentPriorityLevel;
try {
return callback();
} finally {
currentPriorityLevel_DEPRECATED = previousPriorityLevel;
}
};
};
@@ -0,0 +1,46 @@
import type { AuthenticationExtensionsClientInputs, AuthenticatorSelectionCriteria, AuthenticatorTransportFuture, Base64URLString, COSEAlgorithmIdentifier, PublicKeyCredentialCreationOptionsJSON, Uint8Array_ } from '../types/index.js';
export type GenerateRegistrationOptionsOpts = Parameters<typeof generateRegistrationOptions>[0];
/**
* Supported crypto algo identifiers
* See https://w3c.github.io/webauthn/#sctn-alg-identifier
* and https://www.iana.org/assignments/cose/cose.xhtml#algorithms
*/
export declare const supportedCOSEAlgorithmIdentifiers: COSEAlgorithmIdentifier[];
/**
* Prepare a value to pass into navigator.credentials.create(...) for authenticator registration
*
* **Options:**
*
* @param rpName - User-visible, "friendly" website/service name
* @param rpID - Valid domain name (after `https://`)
* @param userName - User's website-specific username (email, etc...)
* @param userID **(Optional)** - User's website-specific unique ID. Defaults to generating a random identifier
* @param challenge **(Optional)** - Random value the authenticator needs to sign and pass back. Defaults to generating a random value
* @param userDisplayName **(Optional)** - User's actual name. Defaults to `""`
* @param timeout **(Optional)** - How long (in ms) the user can take to complete attestation. Defaults to `60000`
* @param attestationType **(Optional)** - Specific attestation statement. Defaults to `"none"`
* @param excludeCredentials **(Optional)** - Authenticators registered by the user so the user can't register the same credential multiple times. Defaults to `[]`
* @param authenticatorSelection **(Optional)** - Advanced criteria for restricting the types of authenticators that may be used. Defaults to `{ residentKey: 'preferred', userVerification: 'preferred' }`
* @param extensions **(Optional)** - Additional plugins the authenticator or browser should use during attestation
* @param supportedAlgorithmIDs **(Optional)** - Array of numeric COSE algorithm identifiers supported for attestation by this RP. See https://www.iana.org/assignments/cose/cose.xhtml#algorithms. Defaults to `[-8, -7, -257]`
* @param preferredAuthenticatorType **(Optional)** - Encourage the browser to prompt the user to register a specific type of authenticator
*/
export declare function generateRegistrationOptions(options: {
rpName: string;
rpID: string;
userName: string;
userID?: Uint8Array_;
challenge?: string | Uint8Array_;
userDisplayName?: string;
timeout?: number;
attestationType?: 'direct' | 'enterprise' | 'none';
excludeCredentials?: {
id: Base64URLString;
transports?: AuthenticatorTransportFuture[];
}[];
authenticatorSelection?: AuthenticatorSelectionCriteria;
extensions?: AuthenticationExtensionsClientInputs;
supportedAlgorithmIDs?: COSEAlgorithmIdentifier[];
preferredAuthenticatorType?: 'securityKey' | 'localDevice' | 'remoteDevice';
}): Promise<PublicKeyCredentialCreationOptionsJSON>;
//# sourceMappingURL=generateRegistrationOptions.d.ts.map
@@ -0,0 +1,5 @@
import { TSchema, SchemaOptions } from '../schema/index';
/** Clones a Rest */
export declare function CloneRest<T extends TSchema[]>(schemas: T): T;
/** Clones a Type */
export declare function CloneType<T extends TSchema>(schema: T, options?: SchemaOptions): T;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more