@shgysk8zer0/polyfills 0.3.14 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +5 -1
- package/abort.js +166 -168
- package/all.min.js +11 -11
- package/all.min.js.map +1 -1
- package/assets/dedent.js +172 -0
- package/node.js +19 -0
- package/node.min.js +6 -0
- package/node.min.js.map +1 -0
- package/package.json +15 -15
- package/rollup.config.js +29 -8
- package/string.js +1 -1
- package/weakMap.js +21 -25
package/assets/dedent.js
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
+
|
|
3
|
+
function getDefaultExportFromCjs (x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
var dedent_umd = {exports: {}};
|
|
8
|
+
|
|
9
|
+
(function (module, exports) {
|
|
10
|
+
(function (global, factory) {
|
|
11
|
+
module.exports = factory() ;
|
|
12
|
+
})(commonjsGlobal, (function () {
|
|
13
|
+
const cache = new WeakMap();
|
|
14
|
+
const newline = /(\n|\r\n?|\u2028|\u2029)/g;
|
|
15
|
+
const leadingWhitespace = /^\s*/;
|
|
16
|
+
const nonWhitespace = /\S/;
|
|
17
|
+
const slice = Array.prototype.slice;
|
|
18
|
+
function dedent(arg) {
|
|
19
|
+
if (typeof arg === 'string') {
|
|
20
|
+
return process([arg])[0];
|
|
21
|
+
}
|
|
22
|
+
if (typeof arg === 'function') {
|
|
23
|
+
return function () {
|
|
24
|
+
const args = slice.call(arguments);
|
|
25
|
+
args[0] = processTemplateStringsArray(args[0]);
|
|
26
|
+
return arg.apply(this, args);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const strings = processTemplateStringsArray(arg);
|
|
30
|
+
// TODO: This is just `String.cooked`: https://tc39.es/proposal-string-cooked/
|
|
31
|
+
let s = getCooked(strings, 0);
|
|
32
|
+
for (let i = 1; i < strings.length; i++) {
|
|
33
|
+
s += arguments[i] + getCooked(strings, i);
|
|
34
|
+
}
|
|
35
|
+
return s;
|
|
36
|
+
}
|
|
37
|
+
function getCooked(strings, index) {
|
|
38
|
+
const str = strings[index];
|
|
39
|
+
if (str === undefined)
|
|
40
|
+
throw new TypeError(`invalid cooked string at index ${index}`);
|
|
41
|
+
return str;
|
|
42
|
+
}
|
|
43
|
+
function processTemplateStringsArray(strings) {
|
|
44
|
+
const cached = cache.get(strings);
|
|
45
|
+
if (cached)
|
|
46
|
+
return cached;
|
|
47
|
+
const dedented = process(strings);
|
|
48
|
+
cache.set(strings, dedented);
|
|
49
|
+
Object.defineProperty(dedented, 'raw', {
|
|
50
|
+
value: Object.freeze(process(strings.raw)),
|
|
51
|
+
});
|
|
52
|
+
Object.freeze(dedented);
|
|
53
|
+
return dedented;
|
|
54
|
+
}
|
|
55
|
+
function process(strings) {
|
|
56
|
+
// splitQuasis is now an array of arrays. The inner array is contains text content lines on the
|
|
57
|
+
// even indices, and the newline char that ends the text content line on the odd indices.
|
|
58
|
+
// In the first array, the inner array's 0 index is the opening line of the template literal.
|
|
59
|
+
// In all other arrays, the inner array's 0 index is the continuation of the line directly after a
|
|
60
|
+
// template expression.
|
|
61
|
+
//
|
|
62
|
+
// Eg, in the following case:
|
|
63
|
+
//
|
|
64
|
+
// ```
|
|
65
|
+
// String.dedent`
|
|
66
|
+
// first
|
|
67
|
+
// ${expression} second
|
|
68
|
+
// third
|
|
69
|
+
// `
|
|
70
|
+
// ```
|
|
71
|
+
//
|
|
72
|
+
// We expect the following splitQuasis:
|
|
73
|
+
//
|
|
74
|
+
// ```
|
|
75
|
+
// [
|
|
76
|
+
// ["", "\n", " first", "\n", " "],
|
|
77
|
+
// [" second", "\n", " third", "\n", ""],
|
|
78
|
+
// ]
|
|
79
|
+
// ```
|
|
80
|
+
const splitQuasis = strings.map((quasi) => quasi === null || quasi === void 0 ? void 0 : quasi.split(newline));
|
|
81
|
+
let common;
|
|
82
|
+
for (let i = 0; i < splitQuasis.length; i++) {
|
|
83
|
+
const lines = splitQuasis[i];
|
|
84
|
+
if (lines === undefined)
|
|
85
|
+
continue;
|
|
86
|
+
// The first split is the static text starting at the opening line until the first template
|
|
87
|
+
// expression (or the end of the template if there are no expressions).
|
|
88
|
+
const firstSplit = i === 0;
|
|
89
|
+
// The last split is all the static text after the final template expression until the closing
|
|
90
|
+
// line. If there are no template expressions, then the first split is also the last split.
|
|
91
|
+
const lastSplit = i + 1 === splitQuasis.length;
|
|
92
|
+
// The opening line must be empty (it very likely is) and it must not contain a template
|
|
93
|
+
// expression. The opening line's trailing newline char is removed.
|
|
94
|
+
if (firstSplit) {
|
|
95
|
+
// Length > 1 ensures there is a newline, and there is not a template expression.
|
|
96
|
+
if (lines.length === 1 || lines[0].length > 0) {
|
|
97
|
+
throw new Error('invalid content on opening line');
|
|
98
|
+
}
|
|
99
|
+
// Clear the captured newline char.
|
|
100
|
+
lines[1] = '';
|
|
101
|
+
}
|
|
102
|
+
// The closing line may only contain whitespace and must not contain a template expression. The
|
|
103
|
+
// closing line and its preceding newline are removed.
|
|
104
|
+
if (lastSplit) {
|
|
105
|
+
// Length > 1 ensures there is a newline, and there is not a template expression.
|
|
106
|
+
if (lines.length === 1 || nonWhitespace.test(lines[lines.length - 1])) {
|
|
107
|
+
throw new Error('invalid content on closing line');
|
|
108
|
+
}
|
|
109
|
+
// Clear the captured newline char, and the whitespace on the closing line.
|
|
110
|
+
lines[lines.length - 2] = '';
|
|
111
|
+
lines[lines.length - 1] = '';
|
|
112
|
+
}
|
|
113
|
+
// In the first spit, the index 0 is the opening line (which must be empty by now), and in all
|
|
114
|
+
// other splits, its the content trailing the template expression (and so can't be part of
|
|
115
|
+
// leading whitespace).
|
|
116
|
+
// Every odd index is the captured newline char, so we'll skip and only process evens.
|
|
117
|
+
for (let j = 2; j < lines.length; j += 2) {
|
|
118
|
+
const text = lines[j];
|
|
119
|
+
// If we are on the last line of this split, and we are not processing the last split (which
|
|
120
|
+
// is after all template expressions), then this line contains a template expression.
|
|
121
|
+
const lineContainsTemplateExpression = j + 1 === lines.length && !lastSplit;
|
|
122
|
+
// leadingWhitespace is guaranteed to match something, but it could be 0 chars.
|
|
123
|
+
const leading = leadingWhitespace.exec(text)[0];
|
|
124
|
+
// Empty lines do not affect the common indentation, and whitespace only lines are emptied
|
|
125
|
+
// (and also don't affect the comon indentation).
|
|
126
|
+
if (!lineContainsTemplateExpression && leading.length === text.length) {
|
|
127
|
+
lines[j] = '';
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
common = commonStart(leading, common);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const min = common ? common.length : 0;
|
|
134
|
+
return splitQuasis.map((lines) => {
|
|
135
|
+
if (lines === undefined)
|
|
136
|
+
return lines;
|
|
137
|
+
let quasi = lines[0];
|
|
138
|
+
for (let i = 1; i < lines.length; i += 2) {
|
|
139
|
+
const newline = lines[i];
|
|
140
|
+
const text = lines[i + 1];
|
|
141
|
+
quasi += newline + text.slice(min);
|
|
142
|
+
}
|
|
143
|
+
return quasi;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
function commonStart(a, b) {
|
|
147
|
+
if (b === undefined || a === b)
|
|
148
|
+
return a;
|
|
149
|
+
let i = 0;
|
|
150
|
+
for (const len = Math.min(a.length, b.length); i < len; i++) {
|
|
151
|
+
if (a[i] !== b[i])
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
return a.slice(0, i);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
return dedent;
|
|
158
|
+
|
|
159
|
+
}));
|
|
160
|
+
|
|
161
|
+
} (dedent_umd));
|
|
162
|
+
|
|
163
|
+
var dedent_umdExports = dedent_umd.exports;
|
|
164
|
+
|
|
165
|
+
/* eslint-env node */
|
|
166
|
+
|
|
167
|
+
// This exists just to re-export dedent as a module in the codebase
|
|
168
|
+
var dedent = dedent_umdExports;
|
|
169
|
+
|
|
170
|
+
var dedent$1 = /*@__PURE__*/getDefaultExportFromCjs(dedent);
|
|
171
|
+
|
|
172
|
+
export { dedent$1 as default };
|
package/node.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import './abort.js';
|
|
2
|
+
import './array.js';
|
|
3
|
+
import './blob.js';
|
|
4
|
+
import './errors.js';
|
|
5
|
+
import './function.js';
|
|
6
|
+
import './iterator.js';
|
|
7
|
+
import './map.js';
|
|
8
|
+
import './math.js';
|
|
9
|
+
import './object.js';
|
|
10
|
+
import './performance.js';
|
|
11
|
+
import './promise.js';
|
|
12
|
+
import './request.js';
|
|
13
|
+
import './response.js';
|
|
14
|
+
import './scheduler.js';
|
|
15
|
+
import './string.js';
|
|
16
|
+
import './symbols.js';
|
|
17
|
+
import './set.js';
|
|
18
|
+
import './url.js';
|
|
19
|
+
import './weakMap.js';
|
package/node.min.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
!function(){"use strict";if(!("AbortSignal"in globalThis)){const t={signal:Symbol("signal"),aborted:Symbol("aborted"),reason:Symbol("reason"),onabort:Symbol("onabort")};globalThis.AbortError=class extends Error{},globalThis.AbortSignal=class e extends EventTarget{constructor(){super(),Object.defineProperties(this,{[t.aborted]:{enumerable:!1,writable:!0,configurable:!1,value:!1},[t.reason]:{enumerable:!1,writable:!0,configurable:!1,value:void 0},[t.onabort]:{enumerable:!1,writable:!0,configurable:!1,value:null}}),this.addEventListener("abort",(t=>{this.onabort instanceof Function&&this.onabort.call(this,t)}))}get aborted(){return this[t.aborted]}get onabort(){return this[t.onabort]}set onabort(e){this[t.onabort]=e instanceof Function?e:null}get reason(){return this[t.reason]}throwIfAborted(){if(this.aborted)throw this.reason}static abort(n=new DOMException("Operation aborted")){const r=new e;return r[t.aborted]=!0,r[t.reason]=n,r}},globalThis.AbortController=class{constructor(){this[t.signal]=new AbortSignal}get signal(){return this[t.signal]}abort(e=new DOMException("Operation aborted")){const n=this.signal;n.aborted||(n[t.aborted]=!0,n[t.reason]=e,n.dispatchEvent(new Event("abort")))}}}if(!("reason"in AbortSignal.prototype)){const t=new WeakMap,e=AbortController.prototype.abort;if(AbortSignal.abort instanceof Function){const e=AbortSignal.abort;AbortSignal.abort=function(n=new DOMException("Operation aborted")){const r=e();return t.set(r,n),r}}else AbortSignal.abort=function(t=new DOMException("Operation aborted")){const e=new AbortController;return e.abort(t),e.reason};Object.defineProperty(AbortSignal.prototype,"reason",{enumerable:!0,configurable:!0,get:function(){return t.has(this)?t.get(this):void 0}}),AbortController.prototype.abort=function(n=new DOMException("Operation aborted")){t.set(this.signal,n),e.call(this)}}AbortSignal.prototype.throwIfAborted instanceof Function||(AbortSignal.prototype.throwIfAborted=function(){if(this.aborted)throw this.reason}),AbortSignal.timeout instanceof Function||(AbortSignal.timeout=function(t){if(void 0===t)throw new TypeError("At least one 1 argument required but only 0 passed");if(Number.isFinite(t)){if(t<0)throw new TypeError("Argument 1 is out of range for unsigned long long.");{const e=new AbortController;return setTimeout((()=>e.abort(new DOMException("The operation timed out."))),t),e.signal}}throw new TypeError("Argument 1 is not a finite value, so it is out of range for unsigned long long.")}),AbortSignal.any instanceof Function||(AbortSignal.any=function(t){if(!Array.isArray(t))throw new TypeError("Expected an array of signals");const e=new AbortController;for(const n of t){if(!(n instanceof AbortSignal)){const t=new TypeError("`signal` is not an `AbortSignal`");throw e.abort(t),t}if(n.aborted){e.abort(n.reason||new DOMException("Operation aborted."));break}n.addEventListener("abort",(({target:t})=>{e.abort(t.reason||new DOMException("Operation aborted."))}),{signal:e.signal})}return e.signal});const t=[Array,String,globalThis.Int8Array,globalThis.Uint8Array,globalThis.Uint8ClampedArray,globalThis.Int16Array,globalThis.Uint16Array,globalThis.Int32Array,globalThis.Uint32Array,globalThis.Float32Array,globalThis.Float64Array,globalThis.BigInt64Array,globalThis.BigUint64Array];if(Array.prototype.flat instanceof Function||(Array.prototype.flat=function(t=1){const e=[];t=Math.min(Number.MAX_SAFE_INTEGER,Math.max(0,t));const n=(t,r)=>{Array.isArray(t)&&r>=0?t.forEach((t=>n(t,r-1))):e.push(t)};return n(this,Number.isNaN(t)?0:t),e}),Array.prototype.flatMap instanceof Function||(Array.prototype.flatMap=function(t,e){return this.map(t,e).flat(1)}),Array.prototype.findLast instanceof Function||(Array.prototype.findLast=function(t,e){let n;return this.forEach(((r,o,i)=>{t.call(e,r,o,i)&&(n=r)}),e),n}),"lastIndex"in Array.prototype||Object.defineProperty(Array.prototype,"lastIndex",{enumerable:!1,configurable:!1,get:function(){return Math.max(0,this.length-1)}}),"lastItem"in Array.prototype||Object.defineProperty(Array.prototype,"lastItem",{enumerable:!1,configurable:!1,get:function(){return this[this.lastIndex]},set:function(t){this[this.lastIndex]=t}}),Array.prototype.findLastIndex instanceof Function||(Array.prototype.findLastIndex=function(t,e){let n=-1;return this.forEach(((r,o,i)=>{t.call(e,r,o,i)&&(n=o)}),e),n}),!(Array.prototype.at instanceof Function)){const e=function(t){if((t=Math.trunc(t)||0)<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]};for(const n of t)void 0!==n&&Object.defineProperty(n.prototype,"at",{value:e,writable:!0,enumerable:!1,configurable:!0})}function e(t,e,n,{writable:r=!0,enumerable:o=!0,configurable:i=!0}={}){t[e]instanceof Function||Object.defineProperty(t,e,{value:n,writable:r,enumerable:o,configurable:i})}!(Array.prototype.group instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.group=function(t){return console.warn("`Array.group()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,t)}),!(Array.prototype.groupBy instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.groupBy=function(t){return console.warn("`Array.goupBy()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,t)}),!(Array.prototype.groupToMap instanceof Function)&&Map.groupBy instanceof Function&&(Array.prototype.groupToMap=function(t){return console.warn("`Array.groupToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,t)}),Map.groupBy instanceof Function&&(Array.prototype.groupByToMap=function(t){return console.warn("`Array.groupByToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,t)}),Array.fromAsync instanceof Function||(Array.fromAsync=async function(t,e,n=globalThis){let r=[];for await(const e of t)r.push(await e);return Array.from(r,e,n)}),Array.prototype.equals instanceof Function||(Array.prototype.equals=function(t){return this===t||!!Array.isArray(t)&&(this.length===t.length&&this.every(((e,n)=>{const r=t[n];return Array.isArray(e)?Array.isArray(r)&&e.equals(r):Object.is(e,r)})))}),Array.prototype.uniqueBy instanceof Function||(Array.prototype.uniqueBy=function(t){if(void 0===t)return[...new Set(this)];if("string"==typeof t){const e=[];return this.filter((n=>{const r=n[t];return!e.includes(r)&&(e.push(r),!0)}))}if(t instanceof Function){const e=[];return this.filter(((...n)=>{try{const r=t.apply(this,n);return"string"==typeof r&&(!e.includes(r)&&(e.push(r),!0))}catch(t){return!1}}))}throw new TypeError("Not a valid argument for uniqueBy")}),Array.prototype.toReversed instanceof Function||(Array.prototype.toReversed=function(){return[...this].reverse()}),Array.prototype.toSorted instanceof Function||(Array.prototype.toSorted=function(t){return[...this].sort(t)}),Array.prototype.toSpliced instanceof Function||(Array.prototype.toSpliced=function(t,e,...n){const r=[...this];return r.splice(t,e,...n),r}),Array.prototype.with instanceof Function||(Array.prototype.with=function(t,e){const n=[...this];return n[t]=e,n}),Array.isTemplateObject instanceof Function||(Array.isTemplateObject=function(t){return!!(Array.isArray(t)&&Array.isArray(t.raw)&&Object.isFrozen(t)&&Object.isFrozen(t.raw))&&(0!==t.length&&t.length===t.raw.length)}),Uint8Array.prototype.toHex instanceof Function||(Uint8Array.prototype.toHex=function(){return Array.from(this,(t=>t.toString(16).padStart("0",2))).join("")}),Uint8Array.prototype.toBase64 instanceof Function||(Uint8Array.prototype.toBase64=function({alphabet:t="base64"}={}){if("base64"===t){const t=32768;let e="";for(let n=0;n<this.length;n+=t){const r=this.subarray(n,n+t);e+=String.fromCharCode.apply(null,r)}return btoa(e)}if("base64url"===t)return this.toBase64({alphabet:"base64"}).replaceAll("+","-").replaceAll("/","_");throw new TypeError('expected alphabet to be either "base64" or "base64url')}),Uint8Array.fromHex instanceof Function||(Uint8Array.fromHex=function(t){if("string"!=typeof t)throw new TypeError("expected input to be a string");if(0===!(1&t.length))throw new SyntaxError("string should be an even number of characters");return Uint8Array.from(globalThis.Iterator.range(0,t.length,{step:2}),(e=>parseInt(t.substring(e,e+2),16)))}),Uint8Array.fromBase64 instanceof Function||(Uint8Array.fromBase64=function(t,{alphabet:e="base64",lastChunkHandling:n="loose"}={}){if("string"!=typeof t)throw new TypeError("expected input to be a string");if(!["base64","base64url"].includes(e))throw new TypeError('expected alphabet to be either "base64" or "base64url');if(!["loose","strict","stop-before-partial"].includes(n))throw new TypeError(`Invalid \`lastChunkHandling\`: "${n}".`);if("base64"!==e)return Uint8Array.fromBase64(t.replaceAll("-","+").replaceAll("_","/"),{alphabet:"base64"});{const e=t.length%4;if(1===e)throw new TypeError("Invalid string length.");if(0===e)return Uint8Array.from(atob(t),(t=>t.charCodeAt(0)));switch(n){case"strict":throw new SyntaxError("Missing padding.");case"loose":return Uint8Array.fromBase64(t.padEnd(t.length+(4-e),"="),{alphabet:"base64",lastChunkHandling:"strict"});case"stop-before-partial":return Uint8Array.fromBase64(t.slice(0,t.length-e),{alphabet:"base64",lastChunkHandling:"strict"})}}}),e(Blob.prototype,"bytes",(async function(){return new Uint8Array(await this.arrayBuffer())})),globalThis.hasOwnProperty("AggregateError")||(globalThis.AggregateError=class extends Error{constructor(t,e){void 0===e?(super(t),this.errors=[]):(super(e),this.errors=t)}}),globalThis.reportError instanceof Function||(globalThis.reportError=function(t){globalThis.dispatchEvent(function(t,e="error"){if(t instanceof Error){const{message:n,name:r,fileName:o,lineNumber:i,columnNumber:a}=t;return new ErrorEvent(e,{error:t,message:`${r}: ${n}`,filename:o,lineno:i,colno:a})}throw new TypeError("`errorToEvent()` only accepts Errors")}(t))}),function(){if(!(Function.prototype.once instanceof Function)){const t=new WeakMap;Function.prototype.once=function(e){const n=this;return function(...r){if(t.has(n))return t.get(n);if("AsyncFunction"===n.constructor.name){const o=n.apply(e||n,r).catch((e=>{throw t.delete(n),e}));return t.set(n,o),o}if(n instanceof Function){const o=n.apply(e||n,r);return t.set(n,o),o}}}}}();const n="Iterator"in globalThis,r=n?Object.getPrototypeOf(globalThis.Iterator):Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())),o=n?globalThis.Iterator:(t=>{class e{[Symbol.iterator](){return this}}return Object.setPrototypeOf(e,t),e})(r);var i;o.range instanceof Function||(o.range=function(t,e,n){if("number"==typeof n||"bigint"==typeof n)return o.range(t,e,{step:n});if("object"!=typeof n||Object.is(n,null))return o.range(t,e,{});{const{step:r=("number"==typeof t?t<e?1:-1:t<e?1n:-1n),inclusive:i=!1}=n;if("number"!=typeof t&&"bigint"!=typeof t)throw new TypeError("Start must be a number");if(Number.isNaN(t))throw new RangeError("Invalid start");if("number"!=typeof e&&"bigint"!=typeof e)throw new TypeError("End must be a number");if(Number.isNaN(e))throw new RangeError("Invalid end");if("number"!=typeof r&&"bigint"!=typeof r)throw new TypeError("Step must be a number");if(Number.isNaN(r))throw new RangeError("Invalid step");if(0===r)throw new RangeError("Step must not be 0");if(r<0&&t<e||r>0&&t>e)return;if(i){let n=t;return r>0?o.from({next(){const t=n<=e?{value:n,done:!1}:{done:!0};return n+=r,t}}):o.from({next(){const t=n>=e?{value:n,done:!1}:{done:!0};return n+=r,t}})}{let n=t;if(r>0)return o.from({next(){const t=n<e?{value:n,done:!1}:{done:!0};return n+=r,t}});{let n=t;return o.from({next(){const t=n>e?{value:n,done:!1}:{done:!0};return n+=r,t}})}}}}),r[Symbol.toStringTag]||(r[Symbol.toStringTag]="Iterator"),r.take instanceof Function||(r.take=function(t){let e=0;const n=this;return o.from({next:()=>e++>=t?{done:!0}:n.next()})}),r.drop instanceof Function||(r.drop=function(t){for(let e=0;e<t;e++){const{done:t}=this.next();if(t)break}return this}),r.toArray instanceof Function||(r.toArray=function(){return Array.from(this)}),r.forEach instanceof Function||(r.forEach=function(t){for(const e of this)t.call(this,e)}),r.flatMap instanceof Function||(r.flatMap=function(t){const e=this;let n=this.next();const r=({value:n,done:r=!0}={})=>r?o.from({next:()=>({done:!0})}):o.from(t.call(e,n));let i=r(n);return o.from({next(){const{value:t,done:o=!0}=i.next();return n.done&&o?{done:!0}:o?n.done?{done:!0}:(n=e.next(),i=r(n),i.next()):{value:t,done:o}}})}),r.map instanceof Function||(r.map=function(t){const e=this;return o.from({next(){const{done:n,value:r}=e.next();return n?{done:n}:{value:t.call(e,r),done:!1}}})}),r.reduce instanceof Function||(r.reduce=function(t,e){let n=void 0===e?this.next().value:e;for(const e of this)n=t.call(this,n,e);return n}),r.filter instanceof Function||(r.filter=function(t){const e=this;let n,r=!1;return o.from({next(){for(;!r;){const o=e.next();if(r=o.done,r)break;if(t.call(e,o.value)){n=o.value;break}}return{done:r,value:n}}})}),r.some instanceof Function||(r.some=function(t){let e=!1;for(const n of this)if(t.call(this,n)){e=!0;break}return e}),r.every instanceof Function||(r.every=function(t){let e=!0;for(const n of this)if(!t.call(this,n)){e=!1;break}return e}),r.find instanceof Function||(r.find=function(t){for(const e of this)if(t.call(this,e))return e}),r.indexed instanceof Function||(r.indexed=function(){let t=0;return this.map((e=>[t++,e]))}),r.chunks instanceof Function||(r.chunks=function(t){if(!Number.isSafeInteger(t)||t<1)throw new TypeError("Size must be a positive integer.");{const e=this;let n=!1;return o.from({next(){if(n)return{done:n};{const r=[];let o=0;for(;o++<t&&!n;){const t=e.next();if(t.done){n=!0,void 0!==t.value&&r.push(t.value);break}r.push(t.value)}return{value:r,done:!1}}}})}}),o.from instanceof Function||(o.from=function(t){if("object"!=typeof t||null===t)throw new TypeError("Not an object.");if(t.next instanceof Function){return Object.create(r,{next:{enumerable:!0,configurable:!1,writable:!1,value:(...e)=>t.next(...e)}})}if(t[Symbol.iterator]instanceof Function)return o.from(t[Symbol.iterator]())}),n||(globalThis.Iterator=o),Map.prototype.emplace instanceof Function||(Map.prototype.emplace=function(t,{insert:e,update:n}={}){const r=this.has(t);if(r&&n instanceof Function){const e=this.get(t),r=n.call(this,e,t,this);return r!==e&&this.set(t,r),r}if(r)return this.get(t);if(e instanceof Function){const n=e.call(this,t,this);return this.set(t,n),n}throw new Error("Key is not found and no `insert()` given")}),Map.groupBy instanceof Function||(Map.groupBy=function(t,e){return Array.from(t).reduce(((t,n,r)=>(t.emplace(e.call(t,n,r),{insert:()=>[n],update:t=>(t.push(n),t)}),t)),new Map)}),Number.hasOwnProperty("isSafeInteger")||(Number.MAX_SAFE_INTEGER=2**53-1,Number.MIN_SAFE_INTEGER=-Number.MAX_SAFE_INTEGER,Number.isSafeInteger=t=>t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER),Number.hasOwnProperty("EPSILON")||(Number.EPSILON=2**-52),Math.hasOwnProperty("sign")||(Math.sign=t=>(t>0)-(t<0)||+t),Math.hasOwnProperty("trunc")||(Math.trunc=t=>{const e=t-t%1;return 0===e&&(t<0||0===t&&1/t!=1/0)?-0:e}),Math.hasOwnProperty("expm1")||(Math.expm1=t=>Math.exp(t)-1),Math.hasOwnProperty("hypot")||(Math.hypot=(...t)=>Math.sqrt(t.reduce(((t,e)=>t+e**2),0))),Math.hasOwnProperty("cbrt")||(Math.cbrt=t=>t**(1/3)),Math.hasOwnProperty("log10")||(Math.log10=t=>Math.log(t)*Math.LOG10E),Math.hasOwnProperty("log2")||(Math.log2=t=>Math.log(t)*Math.LOG2E),Math.hasOwnProperty("log1p")||(Math.log1p=t=>Math.log(1+t)),Math.hasOwnProperty("fround")||(Math.fround=(i=new Float32Array(1),function(t){return i[0]=t,i[0]})),Math.clamp instanceof Function||(Math.clamp=function(t,e,n){return Math.min(Math.max(t,e),n)}),Math.constrain instanceof Function||(Math.constrain=Math.clamp),Math.sumPrecise instanceof Function||(Math.sumPrecise=function(t){let e=-0;for(const n of t){if(!Number.isFinite(n)){e=-0;break}e+=n}return e}),Math.sum instanceof Function||(Math.sum=function(...t){return console.warn("Math.sum is deprecated. Please use Math.sumPrecise instead."),Math.sumPrecise(t)}),Object.groupBy instanceof Function||(Object.groupBy=function(t,e){return Array.from(t).reduce(((t,n,r)=>{const o=e.call(t,n,r);return t.hasOwnProperty(o)?t[o].push(n):t[o]=[n],t}),{})}),function(){if(!(globalThis.requestIdleCallback instanceof Function)){const t=t=>Number.isSafeInteger(t)&&t>0;globalThis.requestIdleCallback=function(e,{timeout:n}={}){const r=performance.now(),o=()=>t(n)?Math.max(0,n-(performance.now()-r)):Math.max(0,600-(performance.now()-r));return setTimeout((()=>e({didTimeout:!!t(n)&&0===o(),timeRemaining:o})),1)}}globalThis.cancelIdleCallback instanceof Function||(globalThis.cancelIdleCallback=t=>clearTimeout(t)),globalThis.requestAnimationFrame instanceof Function||(globalThis.requestAnimationFrame=t=>setTimeout((()=>t(performance.now())),1e3/60)),globalThis.cancelAnimationFrame instanceof Function||(globalThis.cancelAnimationFrame=t=>clearTimeout(t)),globalThis.queueMicrotask instanceof Function||(globalThis.queueMicrotask=t=>Promise.resolve().then(t).catch((t=>setTimeout((()=>{throw t})))))}(),"Promise"in globalThis&&(Promise.prototype.finally instanceof Function||(Promise.prototype.finally=function(t){return this.then((async e=>(await t(),e)),(async e=>(await t(),e)))}),Promise.allSettled instanceof Function||(Promise.allSettled=function(t){return Promise.all(Array.from(t).map((function(t){return new Promise((function(e){t instanceof Promise||(t=Promise.resolve(t)),t.then((function(t){e({status:"fulfilled",value:t})})).catch((function(t){e({status:"rejected",reason:t})}))}))})))}),Promise.any instanceof Function||(Promise.any=t=>new Promise(((e,n)=>{let r=[];t.forEach((o=>{o.then(e).catch((e=>{r.push(e),r.length===t.length&&n(new globalThis.AggregateError(r,"No Promise in Promise.any was resolved"))}))}))}))),Promise.race instanceof Function||(Promise.race=t=>new Promise(((e,n)=>{t.forEach((t=>t.then(e,n)))}))),Promise.try instanceof Function||(Promise.try=t=>new Promise((e=>e(t())))),Promise.withResolvers instanceof Function||(Promise.withResolvers=function(){const t={};return t.promise=new Promise(((e,n)=>{t.resolve=e,t.reject=n})),t}),Promise.fromEntries instanceof Function||(Promise.fromEntries=async function(t){const e=[],n=[];for(const[r,o]of t)e.push(r),n.push(o);return await Promise.all(n).then((t=>Object.fromEntries(t.map(((t,n)=>[e[n],t])))))}),Promise.ownProperties instanceof Function||(Promise.ownProperties=async function(t){return await Promise.fromEntries(Object.entries(t))})),e(Request.prototype,"bytes",(async function(){return new Uint8Array(await this.arrayBuffer())})),e(Response,"json",((t,{status:e=200,statusText:n="",headers:r=new Headers}={})=>r instanceof Headers?(r.set("Content-Type","application/json"),new Response(JSON.stringify(t),{status:e,statusText:n,headers:r})):Response.json(t,{status:e,statusText:n,headers:new Headers(r)}))),e(Response,"redirect",((t,e=302)=>new Response("",{status:e,headers:new Headers({Location:t})}))),e(Response.prototype,"bytes",(async function(){return new Uint8Array(await this.arrayBuffer())}));
|
|
2
|
+
/**
|
|
3
|
+
* @copyright 2023 Chris Zuber <admin@kernvalley.us>
|
|
4
|
+
*/
|
|
5
|
+
const a="user-blocking",s="user-visible",c="background";async function u(t,{delay:e=0,signal:n}={}){return new Promise(((r,o)=>{if(n instanceof AbortSignal&&n.aborted)o(n.reason);else{const i=new AbortController,a=setTimeout((()=>{r(t()),i.abort()}),e);n instanceof AbortSignal&&n.addEventListener("abort",(({target:t})=>{o(t.reason),clearTimeout(a)}),{once:!0,signal:i.signal})}}))}class l{async postTask(t,{priority:e=s,delay:n,signal:r}={}){return new Promise(((o,i)=>{if(r instanceof AbortSignal&&r.aborted)i(r.reason);else switch(e){case a:"number"==typeof n&&!Number.isNaN(n)&&n>0?u(t,{delay:n,signal:r}).then(o,i):o((async()=>await t())());break;case s:if("number"==typeof n&&!Number.isNaN(n)&&n>0)u((()=>requestAnimationFrame((async()=>{try{const e=await t();o(e)}catch(t){i(t)}}))),{delay:n,signal:r}).catch(i);else{const e=new AbortController,n=requestAnimationFrame((async()=>{try{const e=await t();o(e)}catch(t){i(t)}finally{e.abort()}}));r instanceof AbortSignal&&r.addEventListener("abort",(({target:t})=>{cancelAnimationFrame(n),i(t.reason)}),{once:!0,signal:e.signal})}break;case c:if("number"==typeof n&&!Number.isNaN(n)&&n>0)u((()=>requestIdleCallback((async()=>{try{const e=await t();o(e)}catch(t){i(t)}}))),{delay:n,signal:r}).catch(i);else{const e=new AbortController,n=requestIdleCallback((async()=>{try{const e=await t();o(e)}catch(t){i(t)}finally{e.abort()}}));r instanceof AbortSignal&&r.addEventListener("abort",(({target:t})=>{cancelIdleCallback(n),i(t.reason)}),{once:!0,signal:e.signal})}break;default:throw new TypeError(`Scheduler.postTask: '${e}' (value of 'priority' member of SchedulerPostTaskOptions) is not a valid value for enumeration TaskPriority.`)}}))}}"scheduler"in globalThis||(globalThis.scheduler=new l);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function f(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var p={exports:{}};p.exports=function(){const t=new WeakMap,e=/(\n|\r\n?|\u2028|\u2029)/g,n=/^\s*/,r=/\S/,o=Array.prototype.slice;function i(t){if("string"==typeof t)return c([t])[0];if("function"==typeof t)return function(){const e=o.call(arguments);return e[0]=s(e[0]),t.apply(this,e)};const e=s(t);let n=a(e,0);for(let t=1;t<e.length;t++)n+=arguments[t]+a(e,t);return n}function a(t,e){const n=t[e];if(void 0===n)throw new TypeError(`invalid cooked string at index ${e}`);return n}function s(e){const n=t.get(e);if(n)return n;const r=c(e);return t.set(e,r),Object.defineProperty(r,"raw",{value:Object.freeze(c(e.raw))}),Object.freeze(r),r}function c(t){const o=t.map((t=>null==t?void 0:t.split(e)));let i;for(let t=0;t<o.length;t++){const e=o[t];if(void 0===e)continue;const a=0===t,s=t+1===o.length;if(a){if(1===e.length||e[0].length>0)throw new Error("invalid content on opening line");e[1]=""}if(s){if(1===e.length||r.test(e[e.length-1]))throw new Error("invalid content on closing line");e[e.length-2]="",e[e.length-1]=""}for(let t=2;t<e.length;t+=2){const r=e[t],o=t+1===e.length&&!s,a=n.exec(r)[0];o||a.length!==r.length?i=u(a,i):e[t]=""}}const a=i?i.length:0;return o.map((t=>{if(void 0===t)return t;let e=t[0];for(let n=1;n<t.length;n+=2)e+=t[n]+t[n+1].slice(a);return e}))}function u(t,e){if(void 0===e||t===e)return t;let n=0;for(const r=Math.min(t.length,e.length);n<r&&t[n]===e[n];n++);return t.slice(0,n)}return i}();var h=f(p.exports);if(String.dedent instanceof Function||(String.dedent=h),"Symbol"in globalThis){const t=new Set(Reflect.ownKeys(Symbol).filter((t=>"symbol"==typeof Symbol[t])).map((t=>Symbol[t])));void 0===Symbol.toStringTag&&(Symbol.toStringTag=Symbol("Symbol.toStringTag")),void 0===Symbol.iterator&&(Symbol.iterator=Symbol("Symbol.iterator")),e(Symbol,"isRegistered",(function(t){return"symbol"==typeof t&&"string"==typeof Symbol.keyFor(t)})),e(Symbol,"isWellKnown",(function(e){return t.has(e)}))}const y="Expected a set-like object.",b=["has","keys"],g=["size"],d=t=>t instanceof Set,m=t=>d(t)||"object"==typeof t&&null!==t&&b.every((e=>t[e]instanceof Function))&&g.every((e=>e in t));Set.prototype.intersection instanceof Function||(Set.prototype.intersection=function(t){if(!m(t))throw new TypeError(y);return new Set([...this].filter((e=>t.has(e))))}),Set.prototype.difference instanceof Function||(Set.prototype.difference=function(t){if(!m(t))throw new TypeError(y);return new Set([...this].filter((e=>!t.has(e))))}),Set.prototype.union instanceof Function||(Set.prototype.union=function(t){return new Set([...this,...t])}),Set.prototype.isSubsetOf instanceof Function||(Set.prototype.isSubsetOf=function(t){if(!m(t))throw new TypeError(y);return[...this].every((e=>t.has(e)))}),Set.prototype.isSupersetOf instanceof Function||(Set.prototype.isSupersetOf=function(t){if(!m(t))throw new TypeError(y);return d(t)?t.isSubsetOf(this):new Set(t.keys()).isSubsetOf(this)}),Set.prototype.symmetricDifference instanceof Function||(Set.prototype.symmetricDifference=function(t){if(!m(t))throw new TypeError(y);return d(t)?new Set([...this.difference(t),...t.difference(this)]):new Set([...this.difference(t),...new Set(t.keys()).difference(this)])}),Set.prototype.isDisjointFrom instanceof Function||(Set.prototype.isDisjointFrom=function(t){if(!m(t))throw new TypeError(y);return new Set([...this,...t]).size===this.size+t.size}),e(URL,"parse",((t,e)=>{try{return new URL(t,e)}catch{return null}})),e(URL,"canParse",((t,e)=>{try{return new URL(t,e)instanceof URL}catch{return!1}})),WeakMap.prototype.emplace instanceof Function||(WeakMap.prototype.emplace=function(t,{insert:e,update:n}={}){const r=this.has(t);if(r&&n instanceof Function){const e=this.get(t),r=n.call(this,e,t,this);return r!==e&&this.set(t,e),r}if(r)return this.get(t);if(e instanceof Function){const n=e.call(this,t,this);return this.set(t,n),n}throw new Error("Key is not found and no `insert()` given")})}();
|
|
6
|
+
//# sourceMappingURL=node.min.js.map
|
package/node.min.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.min.js","sources":["abort.js","array.js","utils.js","blob.js","errors.js","assets/error.js","function.js","iterator.js","math.js","map.js","object.js","performance.js","promise.js","request.js","response.js","assets/Scheduler.js","scheduler.js","assets/dedent.js","symbols.js","string.js","set.js","url.js","weakMap.js"],"sourcesContent":["'use strict';\n\nif (! ('AbortSignal' in globalThis)) {\n\tconst symbols = {\n\t\tsignal: Symbol('signal'),\n\t\taborted: Symbol('aborted'),\n\t\treason: Symbol('reason'),\n\t\tonabort: Symbol('onabort'),\n\t};\n\n\tglobalThis.AbortError = class AbortError extends Error {};\n\n\tglobalThis.AbortSignal = class AbortSignal extends EventTarget {\n\t\tconstructor() {\n\t\t\tsuper();\n\n\t\t\tObject.defineProperties(this,{\n\t\t\t\t[symbols.aborted]: {\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tvalue: false,\n\t\t\t\t},\n\t\t\t\t[symbols.reason]: {\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tvalue: undefined,\n\t\t\t\t},\n\t\t\t\t[symbols.onabort]: {\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\tvalue: null,\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tthis.addEventListener('abort', event => {\n\t\t\t\tif (this.onabort instanceof Function) {\n\t\t\t\t\tthis.onabort.call(this, event);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tget aborted() {\n\t\t\treturn this[symbols.aborted];\n\t\t}\n\n\t\tget onabort() {\n\t\t\treturn this[symbols.onabort];\n\t\t}\n\n\t\tset onabort(value) {\n\t\t\tif (value instanceof Function) {\n\t\t\t\tthis[symbols.onabort] = value;\n\t\t\t} else {\n\t\t\t\tthis[symbols.onabort] = null;\n\t\t\t}\n\t\t}\n\n\t\tget reason() {\n\t\t\treturn this[symbols.reason];\n\t\t}\n\n\t\tthrowIfAborted() {\n\t\t\tif (this.aborted) {\n\t\t\t\tthrow this.reason;\n\t\t\t}\n\t\t}\n\n\t\tstatic abort(reason = new DOMException('Operation aborted')) {\n\t\t\tconst signal = new AbortSignal();\n\t\t\tsignal[symbols.aborted] = true;\n\t\t\tsignal[symbols.reason] = reason;\n\t\t\treturn signal;\n\t\t}\n\t};\n\n\tglobalThis.AbortController = class AbortController {\n\t\tconstructor() {\n\t\t\tthis[symbols.signal] = new AbortSignal();\n\t\t}\n\n\t\tget signal() {\n\t\t\treturn this[symbols.signal];\n\t\t}\n\n\t\tabort(reason = new DOMException('Operation aborted')) {\n\t\t\tconst signal = this.signal;\n\n\t\t\tif (! signal.aborted) {\n\t\t\t\tsignal[symbols.aborted] = true;\n\t\t\t\tsignal[symbols.reason] = reason;\n\t\t\t\tsignal.dispatchEvent(new Event('abort'));\n\t\t\t}\n\t\t}\n\t};\n}\n\nif (! ('reason' in AbortSignal.prototype)) {\n\tconst reasons = new WeakMap();\n\tconst abort = AbortController.prototype.abort;\n\n\tif (AbortSignal.abort instanceof Function) {\n\t\tconst staticAbort = AbortSignal.abort;\n\n\t\tAbortSignal.abort = function(reason = new DOMException('Operation aborted')) {\n\t\t\tconst signal = staticAbort();\n\t\t\treasons.set(signal, reason);\n\t\t\treturn signal;\n\t\t};\n\t} else {\n\t\tAbortSignal.abort = function abort(reason = new DOMException('Operation aborted')) {\n\t\t\tconst controller = new AbortController();\n\t\t\tcontroller.abort(reason);\n\t\t\treturn controller.reason;\n\t\t};\n\t}\n\n\tObject.defineProperty(AbortSignal.prototype, 'reason', {\n\t\tenumerable: true,\n\t\tconfigurable: true,\n\t\tget: function() {\n\t\t\tif (reasons.has(this)) {\n\t\t\t\treturn reasons.get(this);\n\t\t\t} else {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\t});\n\n\tAbortController.prototype.abort = function(reason = new DOMException('Operation aborted')) {\n\t\treasons.set(this.signal, reason);\n\t\tabort.call(this);\n\t};\n}\n\nif (! (AbortSignal.prototype.throwIfAborted instanceof Function)) {\n\tAbortSignal.prototype.throwIfAborted = function() {\n\t\tif (this.aborted) {\n\t\t\tthrow this.reason;\n\t\t}\n\t};\n}\n\nif (! (AbortSignal.timeout instanceof Function)) {\n\tAbortSignal.timeout = function(ms) {\n\t\tif (typeof ms === 'undefined') {\n\t\t\tthrow new TypeError('At least one 1 argument required but only 0 passed');\n\t\t} else if (! Number.isFinite(ms)) {\n\t\t\tthrow new TypeError('Argument 1 is not a finite value, so it is out of range for unsigned long long.');\n\t\t} else if (ms < 0) {\n\t\t\tthrow new TypeError('Argument 1 is out of range for unsigned long long.');\n\t\t} else {\n\t\t\tconst controller = new AbortController();\n\t\t\tsetTimeout(() => controller.abort(new DOMException('The operation timed out.')), ms);\n\t\t\treturn controller.signal;\n\t\t}\n\t};\n}\n\n/**\n * @see https://chromestatus.com/feature/5202879349522432\n * @TODO How do I handle if a signal is already aborted\n * @TODO Should controller abort on a TypeError\n */\nif (! (AbortSignal.any instanceof Function)) {\n\tAbortSignal.any = function(signals) {\n\t\tif (! Array.isArray(signals)) {\n\t\t\tthrow new TypeError('Expected an array of signals');\n\t\t}\n\n\t\tconst controller = new AbortController();\n\n\t\tfor (const signal of signals) {\n\t\t\tif (! (signal instanceof AbortSignal)) {\n\t\t\t\tconst err = new TypeError('`signal` is not an `AbortSignal`');\n\t\t\t\tcontroller.abort(err);\n\t\t\t\tthrow err;\n\t\t\t} else if (signal.aborted) {\n\t\t\t\tcontroller.abort(signal.reason || new DOMException('Operation aborted.'));\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tsignal.addEventListener('abort', ({ target }) => {\n\t\t\t\t\tcontroller.abort(target.reason || new DOMException('Operation aborted.'));\n\t\t\t\t}, { signal: controller.signal });\n\t\t\t}\n\t\t}\n\n\t\treturn controller.signal;\n\t};\n}\n","/**\n * @SEE https://github.com/tc39/proposal-relative-indexing-method#polyfill\n * @SEE https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray\n */\n\nconst SHIM_TARGETS = [Array, String, globalThis.Int8Array, globalThis.Uint8Array,\n\tglobalThis.Uint8ClampedArray, globalThis.Int16Array, globalThis.Uint16Array,\n\tglobalThis.Int32Array, globalThis.Uint32Array, globalThis.Float32Array,\n\tglobalThis.Float64Array, globalThis.BigInt64Array, globalThis.BigUint64Array,\n];\n\nif (! (Array.prototype.flat instanceof Function)) {\n\tArray.prototype.flat = function(depth = 1) {\n\t\tconst result = [];\n\t\tdepth = Math.min(Number.MAX_SAFE_INTEGER, Math.max(0, depth));\n\n\t\tconst flattenFn = (item, depth) => {\n\t\t\tif (Array.isArray(item) && depth >= 0) {\n\t\t\t\titem.forEach(i => flattenFn(i, depth - 1));\n\t\t\t} else {\n\t\t\t\tresult.push(item);\n\t\t\t}\n\t\t};\n\n\t\tflattenFn(this, Number.isNaN(depth) ? 0 : depth);\n\t\treturn result;\n\t};\n}\n\nif (! (Array.prototype.flatMap instanceof Function)) {\n\tArray.prototype.flatMap = function(cb, thisArg) {\n\t\treturn this.map(cb, thisArg).flat(1);\n\t};\n}\n\nif (! (Array.prototype.findLast instanceof Function)) {\n\tArray.prototype.findLast = function(callback, thisArg) {\n\t\tlet found = undefined;\n\n\t\tthis.forEach((item, index, arr) => {\n\t\t\tif (callback.call(thisArg, item, index, arr)) {\n\t\t\t\tfound = item;\n\t\t\t}\n\t\t}, thisArg);\n\n\t\treturn found;\n\t};\n}\n\nif(! ('lastIndex' in Array.prototype)) {\n\tObject.defineProperty(Array.prototype, 'lastIndex', {\n\t\tenumerable: false,\n\t\tconfigurable: false,\n\t\tget: function() {\n\t\t\treturn Math.max(0, this.length - 1);\n\t\t}\n\t});\n}\n\nif(! ('lastItem' in Array.prototype)) {\n\tObject.defineProperty(Array.prototype, 'lastItem', {\n\t\tenumerable: false,\n\t\tconfigurable: false,\n\t\tget: function() {\n\t\t\treturn this[this.lastIndex];\n\t\t},\n\t\tset: function(val) {\n\t\t\tthis[this.lastIndex] = val;\n\t\t}\n\t});\n}\n\nif (! (Array.prototype.findLastIndex instanceof Function)) {\n\tArray.prototype.findLastIndex = function(callback, thisArg) {\n\t\tlet found = -1;\n\n\t\tthis.forEach((item, index, arr) => {\n\t\t\tif (callback.call(thisArg, item, index, arr)) {\n\t\t\t\tfound = index;\n\t\t\t}\n\t\t}, thisArg);\n\n\t\treturn found;\n\t};\n}\n\nif (! (Array.prototype.at instanceof Function)) {\n\tconst at = function at(n) {\n\t\tn = Math.trunc(n) || 0;\n\t\tif (n < 0) n += this.length;\n\t\tif (n < 0 || n >= this.length) return undefined;\n\t\treturn this[n];\n\t};\n\n\tfor (const C of SHIM_TARGETS) {\n\t\tif (typeof C !== 'undefined') {\n\t\t\tObject.defineProperty(C.prototype, 'at', {\n\t\t\t\tvalue: at,\n\t\t\t\twritable: true,\n\t\t\t\tenumerable: false,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\t}\n}\n\n/**\n * @deprecated [moved to `Object.groupBy()`]\n * @see https://github.com/tc39/proposal-array-grouping\n */\nif (! (Array.prototype.group instanceof Function) && Object.groupBy instanceof Function) {\n\tArray.prototype.group = function group(callback) {\n\t\tconsole.warn('`Array.group()` is deprecated. Please use `Object.groupBy()` instead.');\n\t\treturn Object.groupBy(this, callback);\n\t};\n}\n\n/**\n * @deprecated [moved to `Object.groupBy()`]\n */\nif (! (Array.prototype.groupBy instanceof Function) && Object.groupBy instanceof Function) {\n\tArray.prototype.groupBy = function groupBy(callback) {\n\t\tconsole.warn('`Array.goupBy()` is deprecated. Please use `Object.groupBy()` instead.');\n\t\treturn Object.groupBy(this, callback);\n\t};\n}\n\n/**\n * @see https://github.com/tc39/proposal-array-grouping\n * @deprecated [moved to `Map.groupBy()`]\n * @requires `Map.prototype.emplace`\n */\nif (! (Array.prototype.groupToMap instanceof Function) && (Map.groupBy instanceof Function)) {\n\tArray.prototype.groupToMap = function groupToMap(callback) {\n\t\tconsole.warn('`Array.groupToMap()` is deprecated. Please use `Map.groupBy()` instead.');\n\t\treturn Map.groupBy(this, callback);\n\t};\n}\n\n/**\n * @deprecated [moved to `Map.groupBy()`]\n */\nif (Map.groupBy instanceof Function) {\n\tArray.prototype.groupByToMap = function groupByToMap(callback) {\n\t\tconsole.warn('`Array.groupByToMap()` is deprecated. Please use `Map.groupBy()` instead.');\n\t\treturn Map.groupBy(this, callback);\n\t};\n}\n\n/**\n * @see https://github.com/tc39/proposal-array-from-async\n */\nif (! (Array.fromAsync instanceof Function)) {\n\tArray.fromAsync = async function fromAsync(items, mapFn, thisArg = globalThis) {\n\t\tlet arr = [];\n\n\t\tfor await (const item of items) {\n\t\t\tarr.push(await item);\n\t\t}\n\n\t\treturn Array.from(arr, mapFn, thisArg);\n\t};\n}\n\n/**\n * @see https://github.com/tc39/proposal-array-equality/\n */\nif (! (Array.prototype.equals instanceof Function)) {\n\tArray.prototype.equals = function equals(arr) {\n\t\tif (this === arr) {\n\t\t\treturn true;\n\t\t} else if (! Array.isArray(arr)) {\n\t\t\treturn false;\n\t\t} else if (this.length !== arr.length) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn this.every((item, i) => {\n\t\t\t\tconst val = arr[i];\n\t\t\t\tif (Array.isArray(item)) {\n\t\t\t\t\treturn Array.isArray(val) && item.equals(val);\n\t\t\t\t} else {\n\t\t\t\t\treturn Object.is(item, val);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n}\n/**\n * @see https://github.com/tc39/proposal-array-unique\n */\nif (! (Array.prototype.uniqueBy instanceof Function)) {\n\tArray.prototype.uniqueBy = function uniqueBy(arg) {\n\t\tif (typeof arg === 'undefined') {\n\t\t\treturn [...new Set(this)];\n\t\t} else if (typeof arg === 'string') {\n\t\t\tconst found = [];\n\n\t\t\treturn this.filter(obj => {\n\t\t\t\tconst key = obj[arg];\n\t\t\t\tif (found.includes(key)) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tfound.push(key);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (arg instanceof Function) {\n\t\t\tconst found = [];\n\n\t\t\treturn this.filter((...args) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst key = arg.apply(this, args);\n\n\t\t\t\t\tif (typeof key !== 'string') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else if (found.includes(key)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfound.push(key);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t} catch(err) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthrow new TypeError('Not a valid argument for uniqueBy');\n\t\t}\n\t};\n}\n\n/**\n * Change Array by copy proposal\n * @Note: Not clear if should use `structedClone` or `[...this]` for copies\n * @see https://github.com/tc39/proposal-change-array-by-copy\n */\nif (! (Array.prototype.toReversed instanceof Function)) {\n\tArray.prototype.toReversed = function toReversed() {\n\t\treturn [...this].reverse();\n\t};\n}\n\nif (! (Array.prototype.toSorted instanceof Function)) {\n\tArray.prototype.toSorted = function toSorted(cmpFn) {\n\t\treturn [...this].sort(cmpFn);\n\t};\n}\n\nif (! (Array.prototype.toSpliced instanceof Function)) {\n\tArray.prototype.toSpliced = function toSpliced(start, deleteCount, ...items) {\n\t\tconst cpy = [...this];\n\t\tcpy.splice(start, deleteCount, ...items);\n\t\treturn cpy;\n\t};\n}\n\nif (! (Array.prototype.with instanceof Function)) {\n\tArray.prototype.with = function (index, value) {\n\t\tconst cpy = [...this];\n\t\tcpy[index] = value;\n\t\treturn cpy;\n\t};\n}\n\nif (! (Array.isTemplateObject instanceof Function)) {\n\tArray.isTemplateObject = function(target) {\n\t\tif (! (\n\t\t\tArray.isArray(target) && Array.isArray(target.raw)\n\t\t\t&& Object.isFrozen(target) && Object.isFrozen(target.raw)\n\t\t)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn target.length !== 0 && target.length === target.raw.length;\n\t\t}\n\t};\n}\n\n/**\n * @see https://github.com/tc39/proposal-arraybuffer-base64\n */\nif (! (Uint8Array.prototype.toHex instanceof Function)) {\n\tUint8Array.prototype.toHex = function toHex() {\n\t\treturn Array.from(\n\t\t\tthis,\n\t\t\tn => n.toString(16).padStart('0', 2)\n\t\t).join('');\n\t};\n}\n\nif (! (Uint8Array.prototype.toBase64 instanceof Function)) {\n\tUint8Array.prototype.toBase64 = function toBase64({ alphabet = 'base64' } = {}) {\n\t\tif (alphabet === 'base64') {\n\t\t\t// @todo Figure out encoding specifics\n\t\t\t//return btoa(String.fromCodePoint(...this));\n\t\t\tconst chunkSize = 0x8000; // 32,768 bytes per chunk\n\t\t\tlet str = '';\n\n\t\t\tfor (let i = 0; i < this.length; i += chunkSize) {\n\t\t\t\tconst chunk = this.subarray(i, i + chunkSize);\n\t\t\t\tstr += String.fromCharCode.apply(null, chunk);\n\t\t\t}\n\n\t\t\treturn btoa(str);\n\t\t\t// return btoa(new TextDecoder().decode(this));\n\t\t} else if (alphabet === 'base64url') {\n\t\t\treturn this.toBase64({ alphabet: 'base64' }).replaceAll('+', '-').replaceAll('/', '_');\n\t\t} else {\n\t\t\tthrow new TypeError('expected alphabet to be either \"base64\" or \"base64url');\n\t\t}\n\t};\n}\n\nif (! (Uint8Array.fromHex instanceof Function)) {\n\tUint8Array.fromHex = function fromHex(str) {\n\t\tif (typeof str !== 'string') {\n\t\t\tthrow new TypeError('expected input to be a string');\n\t\t} else if (! (str.length & 1) === 0) {\n\t\t\tthrow new SyntaxError('string should be an even number of characters');\n\t\t} else {\n\t\t\treturn Uint8Array.from(\n\t\t\t\tglobalThis.Iterator.range(0, str.length, { step: 2 }),\n\t\t\t\ti => parseInt(str.substring(i, i + 2), 16)\n\t\t\t);\n\t\t}\n\t};\n}\n\nif (! (Uint8Array.fromBase64 instanceof Function)) {\n\tUint8Array.fromBase64 = function fromBase64(str, {\n\t\talphabet = 'base64',\n\t\tlastChunkHandling = 'loose',\n\t} = {}) {\n\t\tif (typeof str !== 'string') {\n\t\t\tthrow new TypeError('expected input to be a string');\n\t\t} else if (! ['base64', 'base64url'].includes(alphabet)) {\n\t\t\tthrow new TypeError('expected alphabet to be either \"base64\" or \"base64url');\n\t\t} else if (! ['loose', 'strict', 'stop-before-partial'].includes(lastChunkHandling)) {\n\t\t\tthrow new TypeError(`Invalid \\`lastChunkHandling\\`: \"${lastChunkHandling}\".`);\n\t\t} else if (alphabet === 'base64') {\n\t\t\tconst lastChunkLength = str.length % 4;\n\n\t\t\tif (lastChunkLength === 1) {\n\t\t\t\tthrow new TypeError('Invalid string length.');\n\t\t\t} else if (lastChunkLength !== 0) {\n\t\t\t\tswitch(lastChunkHandling) {\n\t\t\t\t\tcase 'strict':\n\t\t\t\t\t\tthrow new SyntaxError('Missing padding.');\n\n\t\t\t\t\tcase 'loose':\n\t\t\t\t\t\treturn Uint8Array.fromBase64(str.padEnd(str.length + (4 - lastChunkLength), '='), {\n\t\t\t\t\t\t\talphabet: 'base64',\n\t\t\t\t\t\t\tlastChunkHandling: 'strict',\n\t\t\t\t\t\t});\n\n\t\t\t\t\tcase 'stop-before-partial':\n\t\t\t\t\t\treturn Uint8Array.fromBase64(str.slice(0, str.length - lastChunkLength), {\n\t\t\t\t\t\t\talphabet: 'base64',\n\t\t\t\t\t\t\tlastChunkHandling: 'strict',\n\t\t\t\t\t\t});\n\n\t\t\t\t\t// Already checked for valid `lastChunkHandling`\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// return new TextEncoder().encode(atob(str));\n\t\t\t\treturn Uint8Array.from(atob(str), char => char.charCodeAt(0));\n\t\t\t}\n\t\t} else {\n\t\t\treturn Uint8Array.fromBase64(\n\t\t\t\tstr.replaceAll('-', '+').replaceAll('_', '/'),\n\t\t\t\t{ alphabet: 'base64', }\n\t\t\t);\n\t\t}\n\t};\n}\n\n// @todo Implement Uint8Array.fromBase64Into & Uint8Array.fromHexInto\n// if (! (Uint8Array.fromBase64Into instanceof Function)) {\n// \tUint8Array.fromBase64Into = function fromBase64Into(str, target) {\n// \t\tconst { read, written } = new TextEncoder().encodeInto(atob(str), target);\n// \t\treturn { read, written, target };\n// \t};\n// }\n","export function polyfillMethod(parent, name, value, {\n\twritable = true,\n\tenumerable = true,\n\tconfigurable = true,\n} = {}) {\n\tif (! (parent[name] instanceof Function)) {\n\t\tObject.defineProperty(parent, name, { value, writable, enumerable, configurable });\n\t}\n}\n\nexport function polyfillGetterSetter(parent, name, {\n\tget,\n\tset,\n\tenumerable = true,\n\tconfigurable = true,\n} = {}) {\n\tif (! parent.hasOwnProperty(name)) {\n\t\tObject.defineProperty(parent, name, { get, set, enumerable, configurable });\n\t}\n}\n\nexport function overwriteMethod(parent, name, func) {\n\tconst { value, enumerable, configurable, writable } = Object.getOwnPropertyDescriptor(parent, name);\n\tconst newMethod = func(value);\n\n\tif (! (newMethod instanceof Function)) {\n\t\tthrow new TypeError(`Error overwriting ${name}. The func MUST be a function that accepts the original as an argument and return a function.`);\n\t} else {\n\t\tObject.defineProperty(parent, name, { value: newMethod, enumerable, configurable, writable });\n\t}\n}\n","import { polyfillMethod } from './utils.js';\n\npolyfillMethod(Blob.prototype, 'bytes', async function () {\n\treturn new Uint8Array(await this.arrayBuffer());\n});\n","import { errorToEvent } from './assets/error.js';\n\nif (! globalThis.hasOwnProperty('AggregateError')) {\n\tglobalThis.AggregateError = class AggregateError extends Error {\n\t\tconstructor(errors, message) {\n\t\t\tif (typeof message === 'undefined') {\n\t\t\t\tsuper(errors);\n\t\t\t\tthis.errors = [];\n\t\t\t} else {\n\t\t\t\tsuper(message);\n\t\t\t\tthis.errors = errors;\n\t\t\t}\n\t\t}\n\t};\n}\n\nif (! (globalThis.reportError instanceof Function)) {\n\tglobalThis.reportError = function reportError(error) {\n\t\tglobalThis.dispatchEvent(errorToEvent(error));\n\t};\n}\n","export function errorToEvent(error, type = 'error') {\n\tif (error instanceof Error) {\n\t\tconst { message, name, fileName: filename, lineNumber: lineno, columnNumber: colno } = error;\n\t\treturn new ErrorEvent(type, { error, message: `${name}: ${message}`, filename, lineno, colno });\n\t} else {\n\t\tthrow new TypeError('`errorToEvent()` only accepts Errors');\n\t}\n}\n","(function() {\n\t'use strict';\n\n\tif (! (Function.prototype.once instanceof Function)) {\n\t\tconst funcs = new WeakMap();\n\n\t\t/**\n\t\t * @see https://github.com/tc39/proposal-function-once\n\t\t */\n\t\tFunction.prototype.once = function once(thisArg) {\n\t\t\tconst callback = this;\n\t\t\treturn function(...args) {\n\t\t\t\tif (funcs.has(callback)) {\n\t\t\t\t\treturn funcs.get(callback);\n\t\t\t\t} else if (callback.constructor.name === 'AsyncFunction') {\n\t\t\t\t\tconst retVal = callback.apply(thisArg || callback, args).catch(err => {\n\t\t\t\t\t\tfuncs.delete(callback);\n\t\t\t\t\t\tthrow err;\n\t\t\t\t\t});\n\n\t\t\t\t\tfuncs.set(callback, retVal);\n\t\t\t\t\treturn retVal;\n\t\t\t\t} else if (callback instanceof Function) {\n\t\t\t\t\tconst retVal = callback.apply(thisArg || callback, args);\n\t\t\t\t\tfuncs.set(callback, retVal);\n\t\t\t\t\treturn retVal;\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t}\n})();\n","/**\n * @see https://github.com/tc39/proposal-iterator-helpers\n */\n\nconst supported = 'Iterator' in globalThis;\n\nconst IteratorPrototype = supported\n\t? Object.getPrototypeOf(globalThis.Iterator)\n\t: Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));\n\nconst Iterator = supported\n\t? globalThis.Iterator\n\t: (proto => {\n\t\tclass Iterator {\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\tObject.setPrototypeOf(Iterator, proto);\n\n\t\treturn Iterator;\n\t})(IteratorPrototype);\n\nif (! (Iterator.range instanceof Function)) {\n\tIterator.range = function range(start, end, option) {\n\t\tif (typeof option === 'number' || typeof option === 'bigint') {\n\t\t\treturn Iterator.range(start, end, { step: option });\n\t\t} else if (typeof option !== 'object' || Object.is(option, null)) {\n\t\t\treturn Iterator.range(start, end, {});\n\t\t} else {\n\t\t\tconst {\n\t\t\t\t// Default to +/-, Number/BigInt based on start & end\n\t\t\t\tstep = typeof start === 'number'\n\t\t\t\t\t? start < end ? 1 : -1\n\t\t\t\t\t: start < end ? 1n : -1n,\n\t\t\t\tinclusive = false,\n\t\t\t} = option;\n\n\t\t\tif (typeof start !== 'number' && typeof start !== 'bigint') {\n\t\t\t\tthrow new TypeError('Start must be a number');\n\t\t\t} else if (Number.isNaN(start)) {\n\t\t\t\tthrow new RangeError('Invalid start');\n\t\t\t} else if (typeof end !== 'number' && typeof end !== 'bigint') {\n\t\t\t\tthrow new TypeError('End must be a number');\n\t\t\t} else if (Number.isNaN(end)) {\n\t\t\t\tthrow new RangeError('Invalid end');\n\t\t\t} else if (typeof step !== 'number' && typeof step !== 'bigint') {\n\t\t\t\tthrow new TypeError('Step must be a number');\n\t\t\t} else if (Number.isNaN(step)) {\n\t\t\t\tthrow new RangeError('Invalid step');\n\t\t\t} else if (step === 0) {\n\t\t\t\tthrow new RangeError('Step must not be 0');\n\t\t\t} else if ((step < 0 && start < end) || (step > 0 && start > end)) {\n\t\t\t\treturn;\n\t\t\t} else if (inclusive) {\n\t\t\t\tlet n = start;\n\t\t\t\tif (step > 0) {\n\t\t\t\t\treturn Iterator.from({\n\t\t\t\t\t\tnext() {\n\t\t\t\t\t\t\tconst ret = n <= end ? { value: n, done: false } : { done: true };\n\t\t\t\t\t\t\tn+= step;\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\treturn Iterator.from({\n\t\t\t\t\t\tnext() {\n\t\t\t\t\t\t\tconst ret = n >= end ? { value: n, done: false } : { done: true };\n\t\t\t\t\t\t\tn+= step;\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlet n = start;\n\n\t\t\t\tif (step > 0) {\n\t\t\t\t\treturn Iterator.from({\n\t\t\t\t\t\tnext() {\n\t\t\t\t\t\t\tconst ret = n < end ? { value: n, done: false } : { done: true };\n\t\t\t\t\t\t\tn+= step;\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tlet n = start;\n\n\t\t\t\t\treturn Iterator.from({\n\t\t\t\t\t\tnext() {\n\t\t\t\t\t\t\tconst ret = n > end ? { value: n, done: false } : { done: true };\n\t\t\t\t\t\t\tn+= step;\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\nif (! (IteratorPrototype[Symbol.toStringTag])) {\n\tIteratorPrototype[Symbol.toStringTag] = 'Iterator';\n}\n\nif (! (IteratorPrototype.take instanceof Function)) {\n\tIteratorPrototype.take = function take(limit) {\n\t\tlet n = 0;\n\t\tconst iter = this;\n\n\t\treturn Iterator.from({\n\t\t\tnext() {\n\t\t\t\tif (n++ >= limit) {\n\t\t\t\t\treturn { done: true };\n\t\t\t\t} else {\n\t\t\t\t\treturn iter.next();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n}\n\nif (! (IteratorPrototype.drop instanceof Function)) {\n\tIteratorPrototype.drop = function drop(limit) {\n\t\tfor (let n = 0; n < limit; n++) {\n\t\t\tconst { done } = this.next();\n\n\t\t\tif (done) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t};\n}\n\nif (! (IteratorPrototype.toArray instanceof Function)) {\n\tIteratorPrototype.toArray = function toArray() {\n\t\treturn Array.from(this);\n\t};\n}\n\nif (! (IteratorPrototype.forEach instanceof Function)) {\n\tIteratorPrototype.forEach = function forEach(callback) {\n\t\tfor (const item of this) {\n\t\t\tcallback.call(this, item);\n\t\t}\n\t};\n}\n\nif (! (IteratorPrototype.flatMap instanceof Function)) {\n\tIteratorPrototype.flatMap = function flatMap(mapper) {\n\t\tconst iter = this;\n\t\tlet cur = this.next();\n\n\t\tconst getSubIter = ({ value, done = true } = {}) => {\n\t\t\treturn done\n\t\t\t\t? Iterator.from({\n\t\t\t\t\tnext() {\n\t\t\t\t\t\treturn { done: true };\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t: Iterator.from(mapper.call(iter, value));\n\t\t};\n\n\t\tlet sub = getSubIter(cur);\n\n\t\treturn Iterator.from({\n\t\t\tnext() {\n\t\t\t\tconst { value, done = true } = sub.next();\n\n\t\t\t\tif (cur.done && done) {\n\t\t\t\t\treturn { done: true };\n\t\t\t\t} else if (! done) {\n\t\t\t\t\treturn { value, done };\n\t\t\t\t} else if (! cur.done) {\n\t\t\t\t\tcur = iter.next();\n\t\t\t\t\tsub = getSubIter(cur);\n\t\t\t\t\treturn sub.next();\n\t\t\t\t} else {\n\t\t\t\t\treturn { done: true };\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t};\n}\n\nif (! (IteratorPrototype.map instanceof Function)) {\n\tIteratorPrototype.map = function map(callback) {\n\t\tconst iter = this;\n\n\t\treturn Iterator.from({\n\t\t\tnext() {\n\t\t\t\tconst { done, value } = iter.next();\n\n\t\t\t\tif (done) {\n\t\t\t\t\treturn { done };\n\t\t\t\t} else {\n\t\t\t\t\treturn { value: callback.call(iter, value), done: false };\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n}\n\nif (! (IteratorPrototype.reduce instanceof Function)) {\n\tIteratorPrototype.reduce = function reduce(callback, initialValue) {\n\t\tlet current = typeof initialValue === 'undefined' ? this.next().value : initialValue;\n\n\t\tfor (const item of this) {\n\t\t\tcurrent = callback.call(this, current, item);\n\t\t}\n\n\t\treturn current;\n\t};\n}\n\nif (! (IteratorPrototype.filter instanceof Function)) {\n\tIteratorPrototype.filter = function filter(callback) {\n\t\tconst iter = this;\n\t\tlet done = false;\n\t\tlet value = undefined;\n\n\t\treturn Iterator.from({\n\t\t\tnext() {\n\t\t\t\twhile (! done) {\n\t\t\t\t\tconst cur = iter.next();\n\t\t\t\t\tdone = cur.done;\n\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (callback.call(iter, cur.value)) {\n\t\t\t\t\t\tvalue = cur.value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn { done, value };\n\t\t\t}\n\t\t});\n\t};\n}\n\nif (! (IteratorPrototype.some instanceof Function)) {\n\tIteratorPrototype.some = function some(callback) {\n\t\tlet retVal = false;\n\t\tfor (const item of this) {\n\t\t\tif (callback.call(this, item)) {\n\t\t\t\tretVal = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn retVal;\n\t};\n}\n\nif (! (IteratorPrototype.every instanceof Function)) {\n\tIteratorPrototype.every = function every(callback) {\n\t\tlet retVal = true;\n\t\tfor (const item of this) {\n\t\t\tif (! callback.call(this, item)) {\n\t\t\t\tretVal = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn retVal;\n\t};\n}\n\nif (! (IteratorPrototype.find instanceof Function)) {\n\tIteratorPrototype.find = function find(callback) {\n\t\tfor (const item of this) {\n\t\t\tif (callback.call(this, item)) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t}\n\t};\n}\n\nif (! (IteratorPrototype.indexed instanceof Function)) {\n\tIteratorPrototype.indexed = function indexed() {\n\t\tlet n = 0;\n\t\treturn this.map(item => [n++, item]);\n\t};\n}\n\nif (! (IteratorPrototype.chunks instanceof Function)) {\n\tIteratorPrototype.chunks = function(size) {\n\t\tif (! Number.isSafeInteger(size) || size < 1) {\n\t\t\tthrow new TypeError('Size must be a positive integer.');\n\t\t} else {\n\t\t\tconst iter = this;\n\t\t\tlet done = false;\n\n\t\t\treturn Iterator.from({\n\t\t\t\tnext() {\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\treturn { done };\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst items = [];\n\t\t\t\t\t\tlet i = 0;\n\n\t\t\t\t\t\twhile(i++ < size && ! done) {\n\t\t\t\t\t\t\tconst next = iter.next();\n\n\t\t\t\t\t\t\tif (next.done) {\n\t\t\t\t\t\t\t\tdone = true;\n\n\t\t\t\t\t\t\t\tif (typeof next.value !== 'undefined') {\n\t\t\t\t\t\t\t\t\titems.push(next.value);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titems.push(next.value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn { value: items, done: false };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n}\n\nif (! (Iterator.from instanceof Function)) {\n\tIterator.from = function from(obj) {\n\t\tif (typeof obj !== 'object' || obj === null) {\n\t\t\tthrow new TypeError('Not an object.');\n\t\t} else if (obj.next instanceof Function) {\n\t\t\tconst iter = Object.create(IteratorPrototype, {\n\t\t\t\t'next': {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t\twritable: false,\n\t\t\t\t\tvalue: (...args) => obj.next(...args),\n\t\t\t\t},\n\t\t\t});\n\n\t\t\treturn iter;\n\t\t} else if(obj[Symbol.iterator] instanceof Function) {\n\t\t\treturn Iterator.from(obj[Symbol.iterator]());\n\t\t}\n\t};\n}\n\nif (! supported) {\n\tglobalThis.Iterator = Iterator;\n}\n","if (! Number.hasOwnProperty('isSafeInteger')) {\n\tNumber.MAX_SAFE_INTEGER = 2**53 -1;\n\tNumber.MIN_SAFE_INTEGER = -Number.MAX_SAFE_INTEGER;\n\tNumber.isSafeInteger = num => num <= Number.MAX_SAFE_INTEGER && num >= Number.MIN_SAFE_INTEGER;\n}\n\nif (! Number.hasOwnProperty('EPSILON')) {\n\tNumber.EPSILON = 2**-52;\n}\n\nif (! Math.hasOwnProperty('sign')) {\n\tMath.sign = x => ((x > 0) - (x < 0)) || +x;\n}\n\nif (! Math.hasOwnProperty('trunc')) {\n\tMath.trunc = x => {\n\t\tconst n = x - x%1;\n\t\treturn n===0 && (x<0 || (x===0 && (1/x !== 1/0))) ? -0 : n;\n\t};\n}\n\nif (! Math.hasOwnProperty('expm1')) {\n\tMath.expm1 = x => Math.exp(x) - 1;\n}\n\nif (! Math.hasOwnProperty('hypot')) {\n\tMath.hypot = (...nums) => Math.sqrt(nums.reduce((sum, num) => sum + num**2, 0));\n}\n\nif (! Math.hasOwnProperty('cbrt')) {\n\tMath.cbrt = x => x**(1/3);\n}\n\nif (! Math.hasOwnProperty('log10')) {\n\tMath.log10 = x => Math.log(x) * Math.LOG10E;\n}\n\nif (! Math.hasOwnProperty('log2')) {\n\tMath.log2 = x => Math.log(x) * Math.LOG2E;\n}\n\nif (! Math.hasOwnProperty('log1p')) {\n\tMath.log1p = x => Math.log(1 + x);\n}\n\nif (! Math.hasOwnProperty('fround')) {\n\tMath.fround = (function (array) {\n\t\treturn function(x) {\n\t\t\treturn array[0] = x, array[0];\n\t\t};\n\t})(new Float32Array(1));\n}\n\nif (! (Math.clamp instanceof Function)) {\n\tMath.clamp = function(value, min, max) {\n\t\treturn Math.min(Math.max(value, min), max);\n\t};\n}\n\n/*\n * Question of if it will be `Math.clamp` or `Math.constrain`\n */\nif (! (Math.constrain instanceof Function)) {\n\tMath.constrain = Math.clamp;\n}\n\n/**\n * @see https://github.com/tc39/proposal-math-sum\n */\nif (! (Math.sumPrecise instanceof Function)) {\n\tMath.sumPrecise = function sumPrecise(nums) {\n\t\tlet sum = -0;\n\n\t\tfor (const num of nums) {\n\t\t\tif (! Number.isFinite(num)) {\n\t\t\t\tsum = -0;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tsum += num;\n\t\t\t}\n\t\t}\n\n\t\treturn sum;\n\t};\n}\n\n/**\n * @deprecated\n */\nif(! (Math.sum instanceof Function)) {\n\tMath.sum = function(...nums) {\n\t\tconsole.warn('Math.sum is deprecated. Please use Math.sumPrecise instead.');\n\t\treturn Math.sumPrecise(nums);\n\t};\n}\n","(function() {\n\t'use strict';\n\n\t/**\n\t * @see https://github.com/tc39/proposal-upsert\n\t */\n\n\tif (! (Map.prototype.emplace instanceof Function)) {\n\t\tMap.prototype.emplace = function emplace(key, { insert, update } = {}) {\n\t\t\tconst has = this.has(key);\n\n\t\t\tif (has && update instanceof Function) {\n\t\t\t\tconst existing = this.get(key);\n\t\t\t\tconst value = update.call(this, existing, key, this);\n\n\t\t\t\tif (value !== existing) {\n\t\t\t\t\tthis.set(key, value);\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t} else if (has) {\n\t\t\t\treturn this.get(key);\n\t\t\t} else if (insert instanceof Function) {\n\t\t\t\tconst value = insert.call(this, key, this);\n\t\t\t\tthis.set(key, value);\n\t\t\t\treturn value;\n\t\t\t} else {\n\t\t\t\tthrow new Error('Key is not found and no `insert()` given');\n\t\t\t}\n\t\t};\n\t}\n\n\tif (! (Map.groupBy instanceof Function)) {\n\t\tMap.groupBy = function groupTo(items, callbackFn) {\n\t\t\treturn Array.from(items).reduce((map, element, index) => {\n\t\t\t\tmap.emplace(callbackFn.call(map, element, index), {\n\t\t\t\t\tinsert: () => [element],\n\t\t\t\t\tupdate: existing => {\n\t\t\t\t\t\texisting.push(element);\n\t\t\t\t\t\treturn existing;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn map;\n\t\t\t}, new Map());\n\t\t};\n\t}\n})();\n","if (! (Object.groupBy instanceof Function)) {\n\tObject.groupBy = function(items, callbackFn) {\n\t\treturn Array.from(items).reduce((groups, element, index) => {\n\t\t\tconst key = callbackFn.call(groups, element, index);\n\n\t\t\tif (! groups.hasOwnProperty(key)) {\n\t\t\t\tgroups[key] = [element];\n\t\t\t} else {\n\t\t\t\tgroups[key].push(element);\n\t\t\t}\n\n\t\t\treturn groups;\n\t\t}, {});\n\t};\n}\n","(function() {\n\t'use strict';\n\n\tif (! (globalThis.requestIdleCallback instanceof Function)) {\n\t\tconst isValidTimeout = timeout => Number.isSafeInteger(timeout) && timeout > 0;\n\n\t\tglobalThis.requestIdleCallback = function(callback, { timeout } = {}) {\n\t\t\tconst start = performance.now();\n\t\t\tconst timeRemaining = () => isValidTimeout(timeout)\n\t\t\t\t? Math.max(0, timeout - (performance.now() - start))\n\t\t\t\t: Math.max(0, 600 - (performance.now() - start));\n\n\t\t\treturn setTimeout(() => callback({\n\t\t\t\tdidTimeout: isValidTimeout(timeout) ? timeRemaining() === 0 : false,\n\t\t\t\ttimeRemaining,\n\t\t\t}), 1);\n\t\t};\n\t}\n\n\tif (! (globalThis.cancelIdleCallback instanceof Function)) {\n\t\tglobalThis.cancelIdleCallback = id => clearTimeout(id);\n\t}\n\n\tif (! (globalThis.requestAnimationFrame instanceof Function)) {\n\t\tglobalThis.requestAnimationFrame = callback => setTimeout(() => callback(performance.now()), 1000 / 60);\n\t}\n\n\tif (! (globalThis.cancelAnimationFrame instanceof Function)) {\n\t\tglobalThis.cancelAnimationFrame = id => clearTimeout(id);\n\t}\n\n\tif (! (globalThis.queueMicrotask instanceof Function)) {\n\t\tglobalThis.queueMicrotask = cb => Promise.resolve().then(cb)\n\t\t\t.catch(e => setTimeout(() => { throw e; }));\n\t}\n})();\n","if ('Promise' in globalThis) {\n\tif (! (Promise.prototype.finally instanceof Function)) {\n\t\tPromise.prototype.finally = function(callback) {\n\t\t\treturn this.then(async val => {\n\t\t\t\tawait callback();\n\t\t\t\treturn val;\n\t\t\t}, async val => {\n\t\t\t\tawait callback();\n\t\t\t\treturn val;\n\t\t\t});\n\t\t};\n\t}\n\n\tif (! (Promise.allSettled instanceof Function)) {\n\t\tPromise.allSettled = function(promises) {\n\t\t\treturn Promise.all(Array.from(promises).map(function(call) {\n\t\t\t\treturn new Promise(function(resolve) {\n\t\t\t\t\tif (! (call instanceof Promise)) {\n\t\t\t\t\t\tcall = Promise.resolve(call);\n\t\t\t\t\t}\n\t\t\t\t\tcall.then(function(value) {\n\t\t\t\t\t\tresolve({ status: 'fulfilled', value: value });\n\t\t\t\t\t}).catch(function(reason) {\n\t\t\t\t\t\tresolve({ status: 'rejected', reason: reason });\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}));\n\t\t};\n\t}\n\n\tif (! (Promise.any instanceof Function)) {\n\t\tPromise.any = (promises) => new Promise((resolve, reject) => {\n\t\t\tlet errors = [];\n\n\t\t\tpromises.forEach(promise => {\n\t\t\t\tpromise.then(resolve).catch(e => {\n\t\t\t\t\terrors.push(e);\n\t\t\t\t\tif (errors.length === promises.length) {\n\t\t\t\t\t\treject(new globalThis.AggregateError(errors, 'No Promise in Promise.any was resolved'));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tif (! (Promise.race instanceof Function)) {\n\t\tPromise.race = (promises) => new Promise((resolve, reject) => {\n\t\t\tpromises.forEach(promise => promise.then(resolve, reject));\n\t\t});\n\t}\n\n\tif (! (Promise.try instanceof Function)) {\n\t\t/**\n\t\t * @see https://github.com/tc39/proposal-promise-try\n\t\t */\n\t\tPromise.try = callback => new Promise(resolve => resolve(callback()));\n\t}\n\n\tif (! (Promise.withResolvers instanceof Function)) {\n\t\tPromise.withResolvers = function() {\n\t\t\tconst def = {};\n\t\t\tdef.promise = new Promise((resolve, reject) => {\n\t\t\t\tdef.resolve = resolve;\n\t\t\t\tdef.reject = reject;\n\t\t\t});\n\n\t\t\treturn def;\n\t\t};\n\t}\n\n\tif (! (Promise.fromEntries instanceof Function)) {\n\t\tPromise.fromEntries = async function fromEntries(entries) {\n\t\t\tconst keys = [];\n\t\t\tconst values = [];\n\n\t\t\tfor (const [key, value] of entries) {\n\t\t\t\tkeys.push(key);\n\t\t\t\tvalues.push(value);\n\t\t\t}\n\n\t\t\treturn await Promise.all(values)\n\t\t\t\t.then(values => Object.fromEntries(values.map((value, i) => [keys[i], value])));\n\t\t};\n\t}\n\n\tif (!(Promise.ownProperties instanceof Function)) {\n\t\tPromise.ownProperties = async function ownProperties(obj) {\n\t\t\treturn await Promise.fromEntries(Object.entries(obj));\n\t\t};\n\t}\n}\n","import { polyfillMethod } from './utils.js';\n\npolyfillMethod(Request.prototype, 'bytes', async function () {\n\treturn new Uint8Array(await this.arrayBuffer());\n});\n","import { polyfillMethod } from './utils.js';\n\npolyfillMethod(Response, 'json', (data, { status = 200, statusText = '', headers = new Headers() } = {}) => {\n\tif (! (headers instanceof Headers)) {\n\t\treturn Response.json(data, { status, statusText, headers: new Headers(headers) });\n\t} else {\n\t\theaders.set('Content-Type', 'application/json');\n\t\treturn new Response(JSON.stringify(data), { status, statusText, headers });\n\t}\n});\n\npolyfillMethod(Response, 'redirect', (url, status = 302) => {\n\treturn new Response('', {\n\t\tstatus,\n\t\theaders: new Headers({ Location: url }),\n\t});\n});\n\npolyfillMethod(Response.prototype, 'bytes', async function() {\n\treturn new Uint8Array(await this.arrayBuffer());\n});\n","/**\n * @copyright 2023 Chris Zuber <admin@kernvalley.us>\n */\nexport const PRIORITIES = {\n\tblocking: 'user-blocking',\n\tvisible: 'user-visible',\n\tbackground: 'background',\n};\n\nasync function delayCallback(cb, { delay = 0, signal } = {}) {\n\treturn new Promise((resolve, reject) => {\n\t\tif (signal instanceof AbortSignal && signal.aborted) {\n\t\t\treject(signal.reason);\n\t\t} else {\n\t\t\tconst controller = new AbortController();\n\t\t\tconst handle = setTimeout(() => {\n\t\t\t\tresolve(cb());\n\t\t\t\tcontroller.abort();\n\t\t\t}, delay);\n\n\t\t\tif (signal instanceof AbortSignal) {\n\t\t\t\tsignal.addEventListener('abort', ({ target }) => {\n\t\t\t\t\treject(target.reason);\n\t\t\t\t\tclearTimeout(handle);\n\t\t\t\t}, { once: true, signal: controller.signal });\n\t\t\t}\n\t\t}\n\t});\n}\n\nexport class Scheduler {\n\tasync postTask(callback, {\n\t\tpriority = PRIORITIES.visible,\n\t\tdelay,\n\t\tsignal,\n\t} = {}) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tif (signal instanceof AbortSignal && signal.aborted) {\n\t\t\t\treject(signal.reason);\n\t\t\t} else {\n\t\t\t\tswitch(priority) {\n\t\t\t\t\tcase PRIORITIES.blocking:\n\t\t\t\t\t\tif (typeof delay === 'number' && ! Number.isNaN(delay) && delay > 0) {\n\t\t\t\t\t\t\tdelayCallback(callback, { delay, signal })\n\t\t\t\t\t\t\t\t.then(resolve, reject);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresolve((async () => await callback())());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase PRIORITIES.visible:\n\t\t\t\t\t\tif (typeof delay === 'number' && ! Number.isNaN(delay) && delay > 0) {\n\t\t\t\t\t\t\tdelayCallback(() => requestAnimationFrame(async () => {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tconst result = await callback();\n\t\t\t\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t\t\t\t} catch(err) {\n\t\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}), { delay, signal }).catch(reject);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\t\t\tconst handle = requestAnimationFrame(async () => {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tconst result = await callback();\n\t\t\t\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t\t\t\t} catch(err) {\n\t\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tcontroller.abort();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (signal instanceof AbortSignal) {\n\t\t\t\t\t\t\t\tsignal.addEventListener('abort', ({ target }) => {\n\t\t\t\t\t\t\t\t\tcancelAnimationFrame(handle);\n\t\t\t\t\t\t\t\t\treject(target.reason);\n\t\t\t\t\t\t\t\t}, { once: true, signal: controller.signal });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase PRIORITIES.background:\n\t\t\t\t\t\tif (typeof delay === 'number' && ! Number.isNaN(delay) && delay > 0) {\n\t\t\t\t\t\t\tdelayCallback(() => requestIdleCallback(async () => {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tconst result = await callback();\n\t\t\t\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t\t\t\t} catch(err) {\n\t\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}), { delay, signal }).catch(reject);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst controller = new AbortController();\n\t\t\t\t\t\t\tconst handle = requestIdleCallback(async () => {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tconst result = await callback();\n\t\t\t\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t\t\t\t} catch(err) {\n\t\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\t\tcontroller.abort();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (signal instanceof AbortSignal) {\n\t\t\t\t\t\t\t\tsignal.addEventListener('abort', ({ target }) => {\n\t\t\t\t\t\t\t\t\tcancelIdleCallback(handle);\n\t\t\t\t\t\t\t\t\treject(target.reason);\n\t\t\t\t\t\t\t\t}, { once: true, signal: controller.signal });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new TypeError(`Scheduler.postTask: '${priority}' (value of 'priority' member of SchedulerPostTaskOptions) is not a valid value for enumeration TaskPriority.`);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Scheduler } from './assets/Scheduler.js';\n\nif (! ('scheduler' in globalThis)) {\n\tglobalThis.scheduler = new Scheduler();\n}\n","var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar dedent_umd = {exports: {}};\n\n(function (module, exports) {\n\t(function (global, factory) {\n\t module.exports = factory() ;\n\t})(commonjsGlobal, (function () {\n\t const cache = new WeakMap();\n\t const newline = /(\\n|\\r\\n?|\\u2028|\\u2029)/g;\n\t const leadingWhitespace = /^\\s*/;\n\t const nonWhitespace = /\\S/;\n\t const slice = Array.prototype.slice;\n\t function dedent(arg) {\n\t if (typeof arg === 'string') {\n\t return process([arg])[0];\n\t }\n\t if (typeof arg === 'function') {\n\t return function () {\n\t const args = slice.call(arguments);\n\t args[0] = processTemplateStringsArray(args[0]);\n\t return arg.apply(this, args);\n\t };\n\t }\n\t const strings = processTemplateStringsArray(arg);\n\t // TODO: This is just `String.cooked`: https://tc39.es/proposal-string-cooked/\n\t let s = getCooked(strings, 0);\n\t for (let i = 1; i < strings.length; i++) {\n\t s += arguments[i] + getCooked(strings, i);\n\t }\n\t return s;\n\t }\n\t function getCooked(strings, index) {\n\t const str = strings[index];\n\t if (str === undefined)\n\t throw new TypeError(`invalid cooked string at index ${index}`);\n\t return str;\n\t }\n\t function processTemplateStringsArray(strings) {\n\t const cached = cache.get(strings);\n\t if (cached)\n\t return cached;\n\t const dedented = process(strings);\n\t cache.set(strings, dedented);\n\t Object.defineProperty(dedented, 'raw', {\n\t value: Object.freeze(process(strings.raw)),\n\t });\n\t Object.freeze(dedented);\n\t return dedented;\n\t }\n\t function process(strings) {\n\t // splitQuasis is now an array of arrays. The inner array is contains text content lines on the\n\t // even indices, and the newline char that ends the text content line on the odd indices.\n\t // In the first array, the inner array's 0 index is the opening line of the template literal.\n\t // In all other arrays, the inner array's 0 index is the continuation of the line directly after a\n\t // template expression.\n\t //\n\t // Eg, in the following case:\n\t //\n\t // ```\n\t // String.dedent`\n\t // first\n\t // ${expression} second\n\t // third\n\t // `\n\t // ```\n\t //\n\t // We expect the following splitQuasis:\n\t //\n\t // ```\n\t // [\n\t // [\"\", \"\\n\", \" first\", \"\\n\", \" \"],\n\t // [\" second\", \"\\n\", \" third\", \"\\n\", \"\"],\n\t // ]\n\t // ```\n\t const splitQuasis = strings.map((quasi) => quasi === null || quasi === void 0 ? void 0 : quasi.split(newline));\n\t let common;\n\t for (let i = 0; i < splitQuasis.length; i++) {\n\t const lines = splitQuasis[i];\n\t if (lines === undefined)\n\t continue;\n\t // The first split is the static text starting at the opening line until the first template\n\t // expression (or the end of the template if there are no expressions).\n\t const firstSplit = i === 0;\n\t // The last split is all the static text after the final template expression until the closing\n\t // line. If there are no template expressions, then the first split is also the last split.\n\t const lastSplit = i + 1 === splitQuasis.length;\n\t // The opening line must be empty (it very likely is) and it must not contain a template\n\t // expression. The opening line's trailing newline char is removed.\n\t if (firstSplit) {\n\t // Length > 1 ensures there is a newline, and there is not a template expression.\n\t if (lines.length === 1 || lines[0].length > 0) {\n\t throw new Error('invalid content on opening line');\n\t }\n\t // Clear the captured newline char.\n\t lines[1] = '';\n\t }\n\t // The closing line may only contain whitespace and must not contain a template expression. The\n\t // closing line and its preceding newline are removed.\n\t if (lastSplit) {\n\t // Length > 1 ensures there is a newline, and there is not a template expression.\n\t if (lines.length === 1 || nonWhitespace.test(lines[lines.length - 1])) {\n\t throw new Error('invalid content on closing line');\n\t }\n\t // Clear the captured newline char, and the whitespace on the closing line.\n\t lines[lines.length - 2] = '';\n\t lines[lines.length - 1] = '';\n\t }\n\t // In the first spit, the index 0 is the opening line (which must be empty by now), and in all\n\t // other splits, its the content trailing the template expression (and so can't be part of\n\t // leading whitespace).\n\t // Every odd index is the captured newline char, so we'll skip and only process evens.\n\t for (let j = 2; j < lines.length; j += 2) {\n\t const text = lines[j];\n\t // If we are on the last line of this split, and we are not processing the last split (which\n\t // is after all template expressions), then this line contains a template expression.\n\t const lineContainsTemplateExpression = j + 1 === lines.length && !lastSplit;\n\t // leadingWhitespace is guaranteed to match something, but it could be 0 chars.\n\t const leading = leadingWhitespace.exec(text)[0];\n\t // Empty lines do not affect the common indentation, and whitespace only lines are emptied\n\t // (and also don't affect the comon indentation).\n\t if (!lineContainsTemplateExpression && leading.length === text.length) {\n\t lines[j] = '';\n\t continue;\n\t }\n\t common = commonStart(leading, common);\n\t }\n\t }\n\t const min = common ? common.length : 0;\n\t return splitQuasis.map((lines) => {\n\t if (lines === undefined)\n\t return lines;\n\t let quasi = lines[0];\n\t for (let i = 1; i < lines.length; i += 2) {\n\t const newline = lines[i];\n\t const text = lines[i + 1];\n\t quasi += newline + text.slice(min);\n\t }\n\t return quasi;\n\t });\n\t }\n\t function commonStart(a, b) {\n\t if (b === undefined || a === b)\n\t return a;\n\t let i = 0;\n\t for (const len = Math.min(a.length, b.length); i < len; i++) {\n\t if (a[i] !== b[i])\n\t break;\n\t }\n\t return a.slice(0, i);\n\t }\n\n\t return dedent;\n\n\t}));\n\t\n} (dedent_umd));\n\nvar dedent_umdExports = dedent_umd.exports;\n\n/* eslint-env node */\n\n// This exists just to re-export dedent as a module in the codebase\nvar dedent = dedent_umdExports;\n\nvar dedent$1 = /*@__PURE__*/getDefaultExportFromCjs(dedent);\n\nexport { dedent$1 as default };\n","import { polyfillMethod } from './utils.js';\n\nif ('Symbol' in globalThis) {\n\tconst known = new Set(\n\t\tReflect.ownKeys(Symbol)\n\t\t\t.filter(item => typeof Symbol[item] === 'symbol')\n\t\t\t.map(key => Symbol[key])\n\t);\n\n\tif (typeof Symbol.toStringTag === 'undefined') {\n\t\tSymbol.toStringTag = Symbol('Symbol.toStringTag');\n\t}\n\n\tif (typeof Symbol.iterator === 'undefined') {\n\t\tSymbol.iterator = Symbol('Symbol.iterator');\n\t}\n\n\tpolyfillMethod(Symbol, 'isRegistered', function(symbol) {\n\t\treturn typeof symbol === 'symbol' && typeof Symbol.keyFor(symbol) === 'string';\n\t});\n\n\tpolyfillMethod(Symbol, 'isWellKnown', function(symbol) {\n\t\treturn known.has(symbol);\n\t});\n}\n","import dedent from './assets/dedent.js';\n\nif (! (String.dedent instanceof Function)) {\n\tString.dedent = dedent;\n}\n","/**\n * @see https://github.com/tc39/proposal-set-methods\n */\n'use strict';\n\nconst TYPE_ERR_MSG = 'Expected a set-like object.';\nconst SET_METHODS = ['has', 'keys'];\nconst SET_PROPS = ['size'];\nconst isSet = thing => thing instanceof Set;\nconst isSetLike = thing => isSet(thing) || (\n\ttypeof thing === 'object'\n\t&& thing !== null\n\t&& SET_METHODS.every(method => thing[method] instanceof Function)\n\t&& SET_PROPS.every(prop => prop in thing)\n);\n\nif (! (Set.prototype.intersection instanceof Function)) {\n\tSet.prototype.intersection = function intersection(set) {\n\t\tif (! isSetLike(set)) {\n\t\t\tthrow new TypeError(TYPE_ERR_MSG);\n\t\t}\n\n\t\treturn new Set([...this].filter(item => set.has(item)));\n\t};\n}\n\nif (! (Set.prototype.difference instanceof Function)) {\n\tSet.prototype.difference = function difference(set) {\n\t\tif (! isSetLike(set)) {\n\t\t\tthrow new TypeError(TYPE_ERR_MSG);\n\t\t}\n\n\t\treturn new Set([...this].filter(item => ! set.has(item)));\n\t};\n}\n\nif (! (Set.prototype.union instanceof Function)) {\n\tSet.prototype.union = function union(set) {\n\t\treturn new Set([...this, ...set]);\n\t};\n}\n\nif (! (Set.prototype.isSubsetOf instanceof Function)) {\n\tSet.prototype.isSubsetOf = function isSubsetOf(set) {\n\t\tif (! isSetLike(set)) {\n\t\t\tthrow new TypeError(TYPE_ERR_MSG);\n\t\t}\n\n\t\treturn [...this].every(item => set.has(item));\n\t};\n}\n\nif (! (Set.prototype.isSupersetOf instanceof Function)) {\n\tSet.prototype.isSupersetOf = function isSupersetOf(set) {\n\t\tif (! isSetLike(set)) {\n\t\t\tthrow new TypeError(TYPE_ERR_MSG);\n\t\t}\n\n\t\t// @TODO Handle when `set` is set-like\n\t\treturn isSet(set)\n\t\t\t? set.isSubsetOf(this)\n\t\t\t: new Set(set.keys()).isSubsetOf(this);\n\t};\n}\n\nif (! (Set.prototype.symmetricDifference instanceof Function)) {\n\tSet.prototype.symmetricDifference = function symmetricDifference(set) {\n\t\tif (! isSetLike(set)) {\n\t\t\tthrow new TypeError(TYPE_ERR_MSG);\n\t\t}\n\n\t\t// @TODO Handle when `set` is set-like\n\t\treturn isSet(set)\n\t\t\t? new Set([...this.difference(set), ...set.difference(this)])\n\t\t\t: new Set([...this.difference(set), ...new Set(set.keys()).difference(this)]);\n\t};\n}\n\nif (! (Set.prototype.isDisjointFrom instanceof Function)) {\n\tSet.prototype.isDisjointFrom = function isDisjointFrom(set) {\n\t\tif (! isSetLike(set)) {\n\t\t\tthrow new TypeError(TYPE_ERR_MSG);\n\t\t}\n\n\t\treturn new Set([...this, ...set]).size === this.size + set.size;\n\t};\n}\n","import { polyfillMethod } from './utils.js';\n\npolyfillMethod(URL, 'parse', (url, base) => {\n\ttry {\n\t\treturn new URL(url, base);\n\t} catch {\n\t\treturn null;\n\t}\n});\n\npolyfillMethod(URL, 'canParse', (url, base) => {\n\ttry {\n\t\treturn new URL(url, base) instanceof URL;\n\t} catch {\n\t\treturn false;\n\t}\n});\n","if (! (WeakMap.prototype.emplace instanceof Function)) {\n\tWeakMap.prototype.emplace = function emplace(key, { insert, update } = {}) {\n\t\tconst has = this.has(key);\n\n\t\tif (has && update instanceof Function) {\n\t\t\tconst existing = this.get(key);\n\t\t\tconst value = update.call(this, existing, key, this);\n\n\t\t\tif (value !== existing) {\n\t\t\t\tthis.set(key, existing);\n\t\t\t}\n\n\t\t\treturn value;\n\t\t} else if (has) {\n\t\t\treturn this.get(key);\n\t\t} else if (insert instanceof Function) {\n\t\t\tconst value = insert.call(this, key, this);\n\t\t\tthis.set(key, value);\n\t\t\treturn value;\n\t\t} else {\n\t\t\tthrow new Error('Key is not found and no `insert()` given');\n\t\t}\n\t};\n}\n"],"names":["globalThis","symbols","signal","Symbol","aborted","reason","onabort","AbortError","Error","AbortSignal","EventTarget","constructor","super","Object","defineProperties","this","enumerable","writable","configurable","value","undefined","addEventListener","event","Function","call","throwIfAborted","static","DOMException","AbortController","abort","dispatchEvent","Event","prototype","reasons","WeakMap","staticAbort","set","controller","defineProperty","get","has","timeout","ms","TypeError","Number","isFinite","setTimeout","any","signals","Array","isArray","err","target","SHIM_TARGETS","String","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","flat","depth","result","Math","min","MAX_SAFE_INTEGER","max","flattenFn","item","forEach","i","push","isNaN","flatMap","cb","thisArg","map","findLast","callback","found","index","arr","length","lastIndex","val","findLastIndex","at","n","trunc","C","polyfillMethod","parent","name","group","groupBy","console","warn","groupToMap","Map","groupByToMap","fromAsync","async","items","mapFn","from","equals","every","is","uniqueBy","arg","Set","filter","obj","key","includes","args","apply","toReversed","reverse","toSorted","cmpFn","sort","toSpliced","start","deleteCount","cpy","splice","with","isTemplateObject","raw","isFrozen","toHex","toString","padStart","join","toBase64","alphabet","chunkSize","str","chunk","subarray","fromCharCode","btoa","replaceAll","fromHex","SyntaxError","Iterator","range","step","parseInt","substring","fromBase64","lastChunkHandling","lastChunkLength","atob","char","charCodeAt","padEnd","slice","Blob","arrayBuffer","hasOwnProperty","AggregateError","errors","message","reportError","error","type","fileName","filename","lineNumber","lineno","columnNumber","colno","ErrorEvent","errorToEvent","once","funcs","retVal","catch","delete","supported","IteratorPrototype","getPrototypeOf","iterator","proto","setPrototypeOf","array","end","option","inclusive","RangeError","next","ret","done","toStringTag","take","limit","iter","drop","toArray","mapper","cur","getSubIter","sub","reduce","initialValue","current","some","find","indexed","chunks","size","isSafeInteger","create","emplace","insert","update","existing","callbackFn","element","MIN_SAFE_INTEGER","num","EPSILON","sign","x","expm1","exp","hypot","nums","sqrt","sum","cbrt","log10","log","LOG10E","log2","LOG2E","log1p","fround","clamp","constrain","sumPrecise","groups","requestIdleCallback","isValidTimeout","performance","now","timeRemaining","didTimeout","cancelIdleCallback","id","clearTimeout","requestAnimationFrame","cancelAnimationFrame","queueMicrotask","Promise","resolve","then","e","finally","allSettled","promises","all","status","reject","promise","race","try","withResolvers","def","fromEntries","entries","keys","values","ownProperties","Request","Response","data","statusText","headers","Headers","JSON","stringify","json","url","Location","PRIORITIES","delayCallback","delay","handle","Scheduler","priority","scheduler","window","global","self","getDefaultExportFromCjs","__esModule","dedent_umd","exports","cache","newline","leadingWhitespace","nonWhitespace","dedent","process","arguments","processTemplateStringsArray","strings","s","getCooked","cached","dedented","freeze","splitQuasis","quasi","split","common","lines","firstSplit","lastSplit","test","j","text","lineContainsTemplateExpression","leading","exec","commonStart","a","b","len","factory","dedent$1","known","Reflect","ownKeys","symbol","keyFor","TYPE_ERR_MSG","SET_METHODS","SET_PROPS","isSet","thing","isSetLike","method","prop","intersection","difference","union","isSubsetOf","isSupersetOf","symmetricDifference","isDisjointFrom","URL","base"],"mappings":"yBAEA,KAAO,gBAAiBA,YAAa,CACpC,MAAMC,EAAU,CACfC,OAAQC,OAAO,UACfC,QAASD,OAAO,WAChBE,OAAQF,OAAO,UACfG,QAASH,OAAO,YAGjBH,WAAWO,WAAa,cAAyBC,QAEjDR,WAAWS,YAAc,MAAMA,UAAoBC,YAClDC,cACCC,QAEAC,OAAOC,iBAAiBC,KAAK,CAC5B,CAACd,EAAQG,SAAU,CAClBY,YAAY,EACZC,UAAU,EACVC,cAAc,EACdC,OAAO,GAER,CAAClB,EAAQI,QAAS,CACjBW,YAAY,EACZC,UAAU,EACVC,cAAc,EACdC,WAAOC,GAER,CAACnB,EAAQK,SAAU,CAClBU,YAAY,EACZC,UAAU,EACVC,cAAc,EACdC,MAAO,QAITJ,KAAKM,iBAAiB,SAASC,IAC1BP,KAAKT,mBAAmBiB,UAC3BR,KAAKT,QAAQkB,KAAKT,KAAMO,EACxB,GAEF,CAEGlB,cACH,OAAOW,KAAKd,EAAQG,QACpB,CAEGE,cACH,OAAOS,KAAKd,EAAQK,QACpB,CAEGA,YAAQa,GAEVJ,KAAKd,EAAQK,SADVa,aAAiBI,SACIJ,EAEA,IAEzB,CAEGd,aACH,OAAOU,KAAKd,EAAQI,OACpB,CAEDoB,iBACC,GAAIV,KAAKX,QACR,MAAMW,KAAKV,MAEZ,CAEDqB,aAAarB,EAAS,IAAIsB,aAAa,sBACtC,MAAMzB,EAAS,IAAIO,EAGnB,OAFAP,EAAOD,EAAQG,UAAW,EAC1BF,EAAOD,EAAQI,QAAUA,EAClBH,CACP,GAGFF,WAAW4B,gBAAkB,MAC5BjB,cACCI,KAAKd,EAAQC,QAAU,IAAIO,WAC3B,CAEGP,aACH,OAA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3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A collection of JavaScript polyfills",
|
|
7
|
-
"main": "./
|
|
8
|
-
"module": "./
|
|
9
|
-
"unpkg": "./all.js",
|
|
7
|
+
"main": "./node.min.js",
|
|
8
|
+
"module": "./node.min.js",
|
|
9
|
+
"unpkg": "./all.min.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"import": "./
|
|
13
|
-
"require": "./
|
|
14
|
-
},
|
|
15
|
-
"./*": {
|
|
16
|
-
"import": "./*.js"
|
|
12
|
+
"import": "./node.min.js",
|
|
13
|
+
"require": "./node.min.js"
|
|
17
14
|
}
|
|
18
15
|
},
|
|
19
16
|
"config": {
|
|
@@ -30,9 +27,10 @@
|
|
|
30
27
|
}
|
|
31
28
|
},
|
|
32
29
|
"scripts": {
|
|
33
|
-
"test": "npm run lint:js && npm run lint:html",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
30
|
+
"test": "npm run lint:js && npm run test:node && npm run lint:html",
|
|
31
|
+
"postinstall": "if [ -f './assets/dedent.cjs' ]; then npm run build; fi",
|
|
32
|
+
"preversion": "npm test && npm run build",
|
|
33
|
+
"prepare": "npm test && npm run build",
|
|
36
34
|
"start": "http-server ${npm_package_config_serve_path} -c-1 --port ${npm_package_config_serve_port} --gzip true --brotli true -a ${npm_package_config_serve_domain} -o /test/",
|
|
37
35
|
"fix": "npm run fix:js",
|
|
38
36
|
"fix:js": "eslint . --fix",
|
|
@@ -40,6 +38,7 @@
|
|
|
40
38
|
"lint:html": "htmlhint \"**/*.html\"",
|
|
41
39
|
"build": "npm run build:js",
|
|
42
40
|
"build:js": "rollup -c rollup.config.js",
|
|
41
|
+
"test:node": "node test/node.js",
|
|
43
42
|
"create:lock": "npm i --package-lock-only --ignore-scripts --no-audit --no-fund",
|
|
44
43
|
"version:bump": "npm run version:bump:patch",
|
|
45
44
|
"version:bump:patch": "npm version --no-git-tag-version patch && npm run create:lock",
|
|
@@ -71,14 +70,15 @@
|
|
|
71
70
|
},
|
|
72
71
|
"homepage": "https://github.com/shgysk8zer0/polyfills#readme",
|
|
73
72
|
"devDependencies": {
|
|
73
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
74
74
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
75
75
|
"@shgysk8zer0/js-utils": "^1.0.1",
|
|
76
76
|
"htmlhint": "^1.1.4",
|
|
77
|
-
"http-server": "^14.1.1"
|
|
77
|
+
"http-server": "^14.1.1",
|
|
78
|
+
"string-dedent": "^3.0.1"
|
|
78
79
|
},
|
|
79
80
|
"dependencies": {
|
|
80
81
|
"@aegisjsproject/sanitizer": "^0.1.0",
|
|
81
|
-
"@aegisjsproject/trusted-types": "^1.0.1"
|
|
82
|
-
"string-dedent": "^3.0.1"
|
|
82
|
+
"@aegisjsproject/trusted-types": "^1.0.1"
|
|
83
83
|
}
|
|
84
84
|
}
|
package/rollup.config.js
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
import { getConfig } from '@shgysk8zer0/js-utils/rollup';
|
|
3
1
|
import nodeResolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import terser from '@rollup/plugin-terser';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export default [{
|
|
6
|
+
input: 'assets/dedent.cjs',
|
|
7
|
+
plugins: [nodeResolve(), commonjs()],
|
|
8
|
+
output: [{
|
|
9
|
+
file: 'assets/dedent.js',
|
|
10
|
+
format: 'esm',
|
|
11
|
+
}]
|
|
12
|
+
}, {
|
|
13
|
+
// Browser bundle
|
|
14
|
+
input: 'all.js',
|
|
15
|
+
plugins: [nodeResolve()],
|
|
16
|
+
output: [{
|
|
17
|
+
file: 'all.min.js',
|
|
18
|
+
format: 'iife',
|
|
19
|
+
plugins: [terser()],
|
|
20
|
+
sourcemap: true,
|
|
21
|
+
}],
|
|
22
|
+
}, {
|
|
23
|
+
// Node.js bundles
|
|
24
|
+
input: 'node.js',
|
|
10
25
|
plugins: [nodeResolve()],
|
|
11
|
-
|
|
26
|
+
output: [{
|
|
27
|
+
file: 'node.min.js',
|
|
28
|
+
format: 'iife',
|
|
29
|
+
plugins: [terser()],
|
|
30
|
+
sourcemap: true,
|
|
31
|
+
}],
|
|
32
|
+
}];
|
package/string.js
CHANGED