@pie-lib/tools 2.0.2 → 2.0.3-next.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/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/anchor-utils.d.ts +60 -0
- package/dist/anchor-utils.js +87 -0
- package/dist/anchor.d.ts +13 -0
- package/dist/anchor.js +17 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +5 -0
- package/dist/node_modules/.bun/assert@1.5.1/node_modules/assert/assert.js +174 -0
- package/dist/node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js +13 -0
- package/dist/node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js +8 -0
- package/dist/node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js +8 -0
- package/dist/node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js +16 -0
- package/dist/node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js +8 -0
- package/dist/node_modules/.bun/call-bound@1.0.4/node_modules/call-bound/index.js +14 -0
- package/dist/node_modules/.bun/degrees-radians@1.0.3/node_modules/degrees-radians/index.js +12 -0
- package/dist/node_modules/.bun/dunder-proto@1.0.1/node_modules/dunder-proto/get.js +19 -0
- package/dist/node_modules/.bun/es-define-property@1.0.1/node_modules/es-define-property/index.js +14 -0
- package/dist/node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/eval.js +8 -0
- package/dist/node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/index.js +8 -0
- package/dist/node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/range.js +8 -0
- package/dist/node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/ref.js +8 -0
- package/dist/node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/syntax.js +8 -0
- package/dist/node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/type.js +8 -0
- package/dist/node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/uri.js +8 -0
- package/dist/node_modules/.bun/es-object-atoms@1.1.2/node_modules/es-object-atoms/index.js +8 -0
- package/dist/node_modules/.bun/function-bind@1.1.2/node_modules/function-bind/implementation.js +34 -0
- package/dist/node_modules/.bun/function-bind@1.1.2/node_modules/function-bind/index.js +10 -0
- package/dist/node_modules/.bun/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js +283 -0
- package/dist/node_modules/.bun/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js +9 -0
- package/dist/node_modules/.bun/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js +8 -0
- package/dist/node_modules/.bun/get-proto@1.0.1/node_modules/get-proto/index.js +19 -0
- package/dist/node_modules/.bun/gopd@1.2.0/node_modules/gopd/gOPD.js +8 -0
- package/dist/node_modules/.bun/gopd@1.2.0/node_modules/gopd/index.js +15 -0
- package/dist/node_modules/.bun/has-symbols@1.1.0/node_modules/has-symbols/index.js +12 -0
- package/dist/node_modules/.bun/has-symbols@1.1.0/node_modules/has-symbols/shams.js +23 -0
- package/dist/node_modules/.bun/hasown@2.0.4/node_modules/hasown/index.js +10 -0
- package/dist/node_modules/.bun/inherits@2.0.3/node_modules/inherits/inherits_browser.js +19 -0
- package/dist/node_modules/.bun/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js +8 -0
- package/dist/node_modules/.bun/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js +8 -0
- package/dist/node_modules/.bun/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js +10 -0
- package/dist/node_modules/.bun/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js +8 -0
- package/dist/node_modules/.bun/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js +8 -0
- package/dist/node_modules/.bun/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js +8 -0
- package/dist/node_modules/.bun/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js +8 -0
- package/dist/node_modules/.bun/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js +12 -0
- package/dist/node_modules/.bun/object-keys@1.1.1/node_modules/object-keys/implementation.js +77 -0
- package/dist/node_modules/.bun/object-keys@1.1.1/node_modules/object-keys/index.js +20 -0
- package/dist/node_modules/.bun/object-keys@1.1.1/node_modules/object-keys/isArguments.js +12 -0
- package/dist/node_modules/.bun/object.assign@4.1.7/node_modules/object.assign/implementation.js +29 -0
- package/dist/node_modules/.bun/object.assign@4.1.7/node_modules/object.assign/polyfill.js +27 -0
- package/dist/node_modules/.bun/radians-degrees@1.0.0/node_modules/radians-degrees/index.js +11 -0
- package/dist/node_modules/.bun/react-portal@4.3.0_6dbf9a050bc9aadb/node_modules/react-portal/es/LegacyPortal.js +77 -0
- package/dist/node_modules/.bun/react-portal@4.3.0_6dbf9a050bc9aadb/node_modules/react-portal/es/Portal.js +55 -0
- package/dist/node_modules/.bun/react-portal@4.3.0_6dbf9a050bc9aadb/node_modules/react-portal/es/PortalCompat.js +9 -0
- package/dist/node_modules/.bun/react-portal@4.3.0_6dbf9a050bc9aadb/node_modules/react-portal/es/utils.js +4 -0
- package/dist/node_modules/.bun/trigonometry-calculator@2.0.0/node_modules/trigonometry-calculator/lib/index.js +53 -0
- package/dist/node_modules/.bun/trigonometry-equations@2.0.1/node_modules/trigonometry-equations/lib/index.js +129 -0
- package/dist/node_modules/.bun/util@0.10.4/node_modules/util/support/isBufferBrowser.js +10 -0
- package/dist/node_modules/.bun/util@0.10.4/node_modules/util/util.js +262 -0
- package/dist/protractor/graphic.d.ts +13 -0
- package/dist/protractor/graphic.js +85 -0
- package/dist/protractor/index.d.ts +29 -0
- package/dist/protractor/index.js +56 -0
- package/dist/rotatable.d.ts +56 -0
- package/dist/rotatable.js +210 -0
- package/dist/ruler/graphic.d.ts +20 -0
- package/dist/ruler/graphic.js +53 -0
- package/dist/ruler/index.d.ts +32 -0
- package/dist/ruler/index.js +77 -0
- package/dist/ruler/unit-type.d.ts +30 -0
- package/dist/ruler/unit-type.js +38 -0
- package/dist/ruler/unit.d.ts +21 -0
- package/dist/ruler/unit.js +69 -0
- package/dist/style-utils.d.ts +12 -0
- package/dist/style-utils.js +5 -0
- package/dist/transform-origin.d.ts +18 -0
- package/dist/transform-origin.js +21 -0
- package/package.json +31 -25
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -626
- package/LICENSE.md +0 -5
- package/lib/anchor-utils.js +0 -193
- package/lib/anchor-utils.js.map +0 -1
- package/lib/anchor.js +0 -33
- package/lib/anchor.js.map +0 -1
- package/lib/index.js +0 -33
- package/lib/index.js.map +0 -1
- package/lib/protractor/graphic.js +0 -147
- package/lib/protractor/graphic.js.map +0 -1
- package/lib/protractor/index.js +0 -90
- package/lib/protractor/index.js.map +0 -1
- package/lib/rotatable.js +0 -335
- package/lib/rotatable.js.map +0 -1
- package/lib/ruler/graphic.js +0 -89
- package/lib/ruler/graphic.js.map +0 -1
- package/lib/ruler/index.js +0 -114
- package/lib/ruler/index.js.map +0 -1
- package/lib/ruler/unit-type.js +0 -55
- package/lib/ruler/unit-type.js.map +0 -1
- package/lib/ruler/unit.js +0 -124
- package/lib/ruler/unit.js.map +0 -1
- package/lib/style-utils.js +0 -21
- package/lib/style-utils.js.map +0 -1
- package/lib/transform-origin.js +0 -71
- package/lib/transform-origin.js.map +0 -1
- package/src/__tests__/anchor-utils.test.js +0 -131
- package/src/__tests__/rotatable.test.jsx +0 -263
- package/src/__tests__/transform-origin.test.jsx +0 -24
- package/src/anchor-utils.js +0 -153
- package/src/anchor.jsx +0 -20
- package/src/index.js +0 -6
- package/src/protractor/__tests__/graphic.test.jsx +0 -64
- package/src/protractor/__tests__/index.test.jsx +0 -65
- package/src/protractor/graphic.jsx +0 -82
- package/src/protractor/index.jsx +0 -67
- package/src/rotatable.jsx +0 -290
- package/src/ruler/__tests__/graphic.test.jsx +0 -64
- package/src/ruler/__tests__/index.test.jsx +0 -85
- package/src/ruler/__tests__/unit-type.test.jsx +0 -66
- package/src/ruler/__tests__/unit.test.jsx +0 -68
- package/src/ruler/graphic.jsx +0 -48
- package/src/ruler/index.jsx +0 -78
- package/src/ruler/unit-type.jsx +0 -39
- package/src/ruler/unit.jsx +0 -83
- package/src/style-utils.js +0 -7
- package/src/transform-origin.jsx +0 -60
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var e = Object.defineProperty, t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = (t, n) => {
|
|
3
|
+
let r = {};
|
|
4
|
+
for (var i in t) e(r, i, {
|
|
5
|
+
get: t[i],
|
|
6
|
+
enumerable: !0
|
|
7
|
+
});
|
|
8
|
+
return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as __commonJSMin, n as __exportAll };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/tools/src/anchor-utils.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import Point from '@mapbox/point-geometry';
|
|
10
|
+
export declare const toDegrees: (radians: any) => number;
|
|
11
|
+
export declare const toRadians: (degrees: any) => number;
|
|
12
|
+
export declare const normalizeAngle: (a: any) => any;
|
|
13
|
+
export declare const toPoint: (rect: any, edge: any) => Point;
|
|
14
|
+
/**
|
|
15
|
+
* Get the distance between to anchor points in a rect.
|
|
16
|
+
* @param {{width: number, height: number}} rect - the rect
|
|
17
|
+
* @param {number} degrees - the degrees
|
|
18
|
+
* @param {string} from - from anchor
|
|
19
|
+
* @param {string} to - to anchor
|
|
20
|
+
* @returns {Point} point - the distance as a Point
|
|
21
|
+
*/
|
|
22
|
+
export declare const distanceBetween: (rect: any, degrees: any, from: any, to: any) => Point;
|
|
23
|
+
/**
|
|
24
|
+
* For a corner string, a point and a rect, return a relative x,y from that point to a corner.
|
|
25
|
+
* Note that the y value descends as it goes down (unlike for a screen's y value), so this is only really useful for math functions.
|
|
26
|
+
* @example
|
|
27
|
+
* ```
|
|
28
|
+
* getXAndY('top-left', {width: 100, height: 100}, 10, 10) //=> {x:10, y: -90}
|
|
29
|
+
* ```
|
|
30
|
+
* @param {*} corner
|
|
31
|
+
* @param {*} rect
|
|
32
|
+
* @param {*} point
|
|
33
|
+
*/
|
|
34
|
+
export declare const getXAndY: (corner: any, rect: any, point: any) => {
|
|
35
|
+
x: number;
|
|
36
|
+
y: any;
|
|
37
|
+
} | undefined;
|
|
38
|
+
export declare const arctangent: (x: any, y: any) => number;
|
|
39
|
+
export declare const getAngleAndHypotenuse: (corner: any, rect: any, point: any) => {
|
|
40
|
+
x: any;
|
|
41
|
+
y: any;
|
|
42
|
+
degrees: number;
|
|
43
|
+
hypotenuse: number;
|
|
44
|
+
};
|
|
45
|
+
export declare const getTop: (rect: any, point: any, angle: any) => any;
|
|
46
|
+
export declare const getLeft: (rect: any, point: any, angle: any) => any;
|
|
47
|
+
/**
|
|
48
|
+
* Calculate the position of an anchor within a bounding rect, if the source rect has been rotated by an angle.
|
|
49
|
+
* It does this by finding the appropriate corner of the src rect, that touches the bounding rect, calculates
|
|
50
|
+
* the hypotenuse (h) of that anchor to that point. Then using that plus the rotation it calculates
|
|
51
|
+
* the sides of the triangle and returns the length of the side that touches the bounding rect.
|
|
52
|
+
* @param {{width: number, height: number}} rect - the rect which contains the point
|
|
53
|
+
* @param {{x:number, y: number}} point - the point within the rect
|
|
54
|
+
* @param {number} angle - the angle in degrees that the rect has rotated.
|
|
55
|
+
* @returns {{left: number, top: number}} position
|
|
56
|
+
*/
|
|
57
|
+
export declare const getAnchor: (rect: any, point: any, angle: any) => {
|
|
58
|
+
top: any;
|
|
59
|
+
left: any;
|
|
60
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { __exportAll as e } from "./_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_lib as t } from "./node_modules/.bun/trigonometry-calculator@2.0.0/node_modules/trigonometry-calculator/lib/index.js";
|
|
3
|
+
import { parse as n } from "./transform-origin.js";
|
|
4
|
+
import r from "@mapbox/point-geometry";
|
|
5
|
+
import i from "debug";
|
|
6
|
+
//#region src/anchor-utils.ts
|
|
7
|
+
var a = /* @__PURE__ */ e({
|
|
8
|
+
arctangent: () => m,
|
|
9
|
+
distanceBetween: () => f,
|
|
10
|
+
getAnchor: () => y,
|
|
11
|
+
getAngleAndHypotenuse: () => h,
|
|
12
|
+
getLeft: () => v,
|
|
13
|
+
getTop: () => _,
|
|
14
|
+
getXAndY: () => p,
|
|
15
|
+
normalizeAngle: () => u,
|
|
16
|
+
toDegrees: () => c,
|
|
17
|
+
toPoint: () => d,
|
|
18
|
+
toRadians: () => l
|
|
19
|
+
}), o = t(), s = i("@pie-lib:tools:anchor-utils"), c = (e) => 180 / Math.PI * e, l = (e) => Math.PI / 180 * e, u = (e) => e > 360 ? e % 360 : e < 0 ? 360 + e % 360 : e, d = (e, t) => {
|
|
20
|
+
let i = n(e, t);
|
|
21
|
+
return new r(i.x, i.y);
|
|
22
|
+
}, f = (e, t, n, i) => {
|
|
23
|
+
let a = new r(e.width / 2, e.height / 2), o = l(t), s = a.rotateAround(o, d(e, n)), c = a.rotateAround(o, d(e, i));
|
|
24
|
+
return s.sub(c);
|
|
25
|
+
}, p = (e, t, n) => {
|
|
26
|
+
if (e === "top-left") return {
|
|
27
|
+
x: n.x * -1,
|
|
28
|
+
y: n.y
|
|
29
|
+
};
|
|
30
|
+
if (e === "bottom-left") return {
|
|
31
|
+
x: n.x * -1,
|
|
32
|
+
y: n.y - t.height
|
|
33
|
+
};
|
|
34
|
+
if (e === "top-right") return {
|
|
35
|
+
x: t.width - n.x,
|
|
36
|
+
y: n.y
|
|
37
|
+
};
|
|
38
|
+
if (e === "bottom-right") return {
|
|
39
|
+
x: t.width - n.x,
|
|
40
|
+
y: n.y - t.height
|
|
41
|
+
};
|
|
42
|
+
}, m = (e, t) => c(Math.atan2(e, t)), h = (e, t, n) => {
|
|
43
|
+
let { x: r, y: i } = p(e, t, n);
|
|
44
|
+
return {
|
|
45
|
+
x: r,
|
|
46
|
+
y: i,
|
|
47
|
+
degrees: m(r, i),
|
|
48
|
+
hypotenuse: Math.sqrt(r ** 2 + i ** 2)
|
|
49
|
+
};
|
|
50
|
+
}, g = (e, t, n, r, i) => {
|
|
51
|
+
if (r === 0) return e === "left" ? n.x : n.y;
|
|
52
|
+
let a = b(r)[e], { degrees: s, hypotenuse: c } = h(a, t, n), l = i(s);
|
|
53
|
+
return l === 0 ? c : (0, o.trigCalculator)({
|
|
54
|
+
angles: {
|
|
55
|
+
0: l,
|
|
56
|
+
1: 90
|
|
57
|
+
},
|
|
58
|
+
sides: { 1: c }
|
|
59
|
+
}).sides[2];
|
|
60
|
+
}, _ = (e, t, n) => g("top", e, t, n, (e) => Math.abs(n + e)), v = (e, t, n) => g("left", e, t, n, (e) => Math.abs(n + e + 90)), y = (e, t, n) => {
|
|
61
|
+
if (s("[getAnchor] rect: ", e, "point:", t, "angle: ", n), t.x > e.width) throw Error(`x: ${t.x} cannot be greater than width: ${e.width}`);
|
|
62
|
+
if (t.y > e.height) throw Error(`y: ${t.y} cannot be greater than height: ${e.height}`);
|
|
63
|
+
let r = u(n), i = _(e, t, r), a = v(e, t, r);
|
|
64
|
+
return s("[getAnchor] top: ", i, "left: ", a), {
|
|
65
|
+
top: i,
|
|
66
|
+
left: a
|
|
67
|
+
};
|
|
68
|
+
}, b = (e) => {
|
|
69
|
+
if (e <= 90) return {
|
|
70
|
+
top: "top-left",
|
|
71
|
+
left: "bottom-left"
|
|
72
|
+
};
|
|
73
|
+
if (e > 90 && e <= 180) return {
|
|
74
|
+
top: "bottom-left",
|
|
75
|
+
left: "bottom-right"
|
|
76
|
+
};
|
|
77
|
+
if (e > 180 && e <= 270) return {
|
|
78
|
+
top: "bottom-right",
|
|
79
|
+
left: "top-right"
|
|
80
|
+
};
|
|
81
|
+
if (e > 270 && e < 360) return {
|
|
82
|
+
top: "top-right",
|
|
83
|
+
left: "top-left"
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
export { a as anchor_utils_exports, m as arctangent, f as distanceBetween, y as getAnchor };
|
package/dist/anchor.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/tools/src/anchor.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
declare const Anchor: ({ ...props }: {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
}) => React.JSX.Element;
|
|
13
|
+
export default Anchor;
|
package/dist/anchor.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { styled as e } from "@mui/material/styles";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/anchor.tsx
|
|
5
|
+
var n = e("div")(({ theme: e }) => ({
|
|
6
|
+
cursor: "pointer",
|
|
7
|
+
width: "20px",
|
|
8
|
+
height: "20px",
|
|
9
|
+
position: "absolute",
|
|
10
|
+
borderRadius: "10px",
|
|
11
|
+
backgroundColor: `var(--ruler-bg, ${e.palette.primary.contrastText})`,
|
|
12
|
+
transition: "background-color 200ms ease-in",
|
|
13
|
+
border: `solid 1px var(--ruler-stroke, ${e.palette.primary.dark})`,
|
|
14
|
+
"&:hover": { backgroundColor: `var(--ruler-bg-hover, ${e.palette.primary.light})` }
|
|
15
|
+
})), r = ({ ...e }) => /* @__PURE__ */ t(n, { ...e });
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-lib/packages/tools/src/index.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import Protractor from './protractor/index.js';
|
|
10
|
+
import Ruler from './ruler/index.js';
|
|
11
|
+
import Rotatable from './rotatable.js';
|
|
12
|
+
import * as utils from './anchor-utils.js';
|
|
13
|
+
export { Protractor, Ruler, Rotatable, utils };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_polyfill as t } from "../../../object.assign@4.1.7/node_modules/object.assign/polyfill.js";
|
|
3
|
+
import { require_util as n } from "../../../util@0.10.4/node_modules/util/util.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/assert@1.5.1/node_modules/assert/assert.js
|
|
5
|
+
var r = /* @__PURE__ */ e(((e, r) => {
|
|
6
|
+
var i = t()();
|
|
7
|
+
function a(e, t) {
|
|
8
|
+
if (e === t) return 0;
|
|
9
|
+
for (var n = e.length, r = t.length, i = 0, a = Math.min(n, r); i < a; ++i) if (e[i] !== t[i]) {
|
|
10
|
+
n = e[i], r = t[i];
|
|
11
|
+
break;
|
|
12
|
+
}
|
|
13
|
+
return n < r ? -1 : +(r < n);
|
|
14
|
+
}
|
|
15
|
+
function o(e) {
|
|
16
|
+
return global.Buffer && typeof global.Buffer.isBuffer == "function" ? global.Buffer.isBuffer(e) : !!(e != null && e._isBuffer);
|
|
17
|
+
}
|
|
18
|
+
var s = n(), c = Object.prototype.hasOwnProperty, l = Array.prototype.slice, u = function() {
|
|
19
|
+
return function() {}.name === "foo";
|
|
20
|
+
}();
|
|
21
|
+
function d(e) {
|
|
22
|
+
return Object.prototype.toString.call(e);
|
|
23
|
+
}
|
|
24
|
+
function f(e) {
|
|
25
|
+
return o(e) || typeof global.ArrayBuffer != "function" ? !1 : typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(e) : e ? !!(e instanceof DataView || e.buffer && e.buffer instanceof ArrayBuffer) : !1;
|
|
26
|
+
}
|
|
27
|
+
var p = r.exports = b, m = /\s*function\s+([^\(\s]*)\s*/;
|
|
28
|
+
function h(e) {
|
|
29
|
+
if (s.isFunction(e)) {
|
|
30
|
+
if (u) return e.name;
|
|
31
|
+
var t = e.toString().match(m);
|
|
32
|
+
return t && t[1];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
p.AssertionError = function(e) {
|
|
36
|
+
this.name = "AssertionError", this.actual = e.actual, this.expected = e.expected, this.operator = e.operator, e.message ? (this.message = e.message, this.generatedMessage = !1) : (this.message = v(this), this.generatedMessage = !0);
|
|
37
|
+
var t = e.stackStartFunction || y;
|
|
38
|
+
if (Error.captureStackTrace) Error.captureStackTrace(this, t);
|
|
39
|
+
else {
|
|
40
|
+
var n = /* @__PURE__ */ Error();
|
|
41
|
+
if (n.stack) {
|
|
42
|
+
var r = n.stack, i = h(t), a = r.indexOf("\n" + i);
|
|
43
|
+
if (a >= 0) {
|
|
44
|
+
var o = r.indexOf("\n", a + 1);
|
|
45
|
+
r = r.substring(o + 1);
|
|
46
|
+
}
|
|
47
|
+
this.stack = r;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}, s.inherits(p.AssertionError, Error);
|
|
51
|
+
function g(e, t) {
|
|
52
|
+
return typeof e == "string" ? e.length < t ? e : e.slice(0, t) : e;
|
|
53
|
+
}
|
|
54
|
+
function _(e) {
|
|
55
|
+
if (u || !s.isFunction(e)) return s.inspect(e);
|
|
56
|
+
var t = h(e);
|
|
57
|
+
return "[Function" + (t ? ": " + t : "") + "]";
|
|
58
|
+
}
|
|
59
|
+
function v(e) {
|
|
60
|
+
return g(_(e.actual), 128) + " " + e.operator + " " + g(_(e.expected), 128);
|
|
61
|
+
}
|
|
62
|
+
function y(e, t, n, r, i) {
|
|
63
|
+
throw new p.AssertionError({
|
|
64
|
+
message: n,
|
|
65
|
+
actual: e,
|
|
66
|
+
expected: t,
|
|
67
|
+
operator: r,
|
|
68
|
+
stackStartFunction: i
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
p.fail = y;
|
|
72
|
+
function b(e, t) {
|
|
73
|
+
e || y(e, !0, t, "==", p.ok);
|
|
74
|
+
}
|
|
75
|
+
p.ok = b, p.equal = function(e, t, n) {
|
|
76
|
+
e != t && y(e, t, n, "==", p.equal);
|
|
77
|
+
}, p.notEqual = function(e, t, n) {
|
|
78
|
+
e == t && y(e, t, n, "!=", p.notEqual);
|
|
79
|
+
}, p.deepEqual = function(e, t, n) {
|
|
80
|
+
x(e, t, !1) || y(e, t, n, "deepEqual", p.deepEqual);
|
|
81
|
+
}, p.deepStrictEqual = function(e, t, n) {
|
|
82
|
+
x(e, t, !0) || y(e, t, n, "deepStrictEqual", p.deepStrictEqual);
|
|
83
|
+
};
|
|
84
|
+
function x(e, t, n, r) {
|
|
85
|
+
if (e === t) return !0;
|
|
86
|
+
if (o(e) && o(t)) return a(e, t) === 0;
|
|
87
|
+
if (s.isDate(e) && s.isDate(t)) return e.getTime() === t.getTime();
|
|
88
|
+
if (s.isRegExp(e) && s.isRegExp(t)) return e.source === t.source && e.global === t.global && e.multiline === t.multiline && e.lastIndex === t.lastIndex && e.ignoreCase === t.ignoreCase;
|
|
89
|
+
if ((typeof e != "object" || !e) && (typeof t != "object" || !t)) return n ? e === t : e == t;
|
|
90
|
+
if (f(e) && f(t) && d(e) === d(t) && !(e instanceof Float32Array || e instanceof Float64Array)) return a(new Uint8Array(e.buffer), new Uint8Array(t.buffer)) === 0;
|
|
91
|
+
if (o(e) !== o(t)) return !1;
|
|
92
|
+
r ||= {
|
|
93
|
+
actual: [],
|
|
94
|
+
expected: []
|
|
95
|
+
};
|
|
96
|
+
var i = r.actual.indexOf(e);
|
|
97
|
+
return i !== -1 && i === r.expected.indexOf(t) ? !0 : (r.actual.push(e), r.expected.push(t), C(e, t, n, r));
|
|
98
|
+
}
|
|
99
|
+
function S(e) {
|
|
100
|
+
return Object.prototype.toString.call(e) == "[object Arguments]";
|
|
101
|
+
}
|
|
102
|
+
function C(e, t, n, r) {
|
|
103
|
+
if (e == null || t == null) return !1;
|
|
104
|
+
if (s.isPrimitive(e) || s.isPrimitive(t)) return e === t;
|
|
105
|
+
if (n && Object.getPrototypeOf(e) !== Object.getPrototypeOf(t)) return !1;
|
|
106
|
+
var i = S(e), a = S(t);
|
|
107
|
+
if (i && !a || !i && a) return !1;
|
|
108
|
+
if (i) return e = l.call(e), t = l.call(t), x(e, t, n);
|
|
109
|
+
var o = k(e), c = k(t), u, d;
|
|
110
|
+
if (o.length !== c.length) return !1;
|
|
111
|
+
for (o.sort(), c.sort(), d = o.length - 1; d >= 0; d--) if (o[d] !== c[d]) return !1;
|
|
112
|
+
for (d = o.length - 1; d >= 0; d--) if (u = o[d], !x(e[u], t[u], n, r)) return !1;
|
|
113
|
+
return !0;
|
|
114
|
+
}
|
|
115
|
+
p.notDeepEqual = function(e, t, n) {
|
|
116
|
+
x(e, t, !1) && y(e, t, n, "notDeepEqual", p.notDeepEqual);
|
|
117
|
+
}, p.notDeepStrictEqual = w;
|
|
118
|
+
function w(e, t, n) {
|
|
119
|
+
x(e, t, !0) && y(e, t, n, "notDeepStrictEqual", w);
|
|
120
|
+
}
|
|
121
|
+
p.strictEqual = function(e, t, n) {
|
|
122
|
+
e !== t && y(e, t, n, "===", p.strictEqual);
|
|
123
|
+
}, p.notStrictEqual = function(e, t, n) {
|
|
124
|
+
e === t && y(e, t, n, "!==", p.notStrictEqual);
|
|
125
|
+
};
|
|
126
|
+
function T(e, t) {
|
|
127
|
+
if (!e || !t) return !1;
|
|
128
|
+
if (Object.prototype.toString.call(t) == "[object RegExp]") return t.test(e);
|
|
129
|
+
try {
|
|
130
|
+
if (e instanceof t) return !0;
|
|
131
|
+
} catch {}
|
|
132
|
+
return Error.isPrototypeOf(t) ? !1 : t.call({}, e) === !0;
|
|
133
|
+
}
|
|
134
|
+
function E(e) {
|
|
135
|
+
var t;
|
|
136
|
+
try {
|
|
137
|
+
e();
|
|
138
|
+
} catch (e) {
|
|
139
|
+
t = e;
|
|
140
|
+
}
|
|
141
|
+
return t;
|
|
142
|
+
}
|
|
143
|
+
function D(e, t, n, r) {
|
|
144
|
+
var i;
|
|
145
|
+
if (typeof t != "function") throw TypeError("\"block\" argument must be a function");
|
|
146
|
+
typeof n == "string" && (r = n, n = null), i = E(t), r = (n && n.name ? " (" + n.name + ")." : ".") + (r ? " " + r : "."), e && !i && y(i, n, "Missing expected exception" + r);
|
|
147
|
+
var a = typeof r == "string", o = !e && s.isError(i), c = !e && i && !n;
|
|
148
|
+
if ((o && a && T(i, n) || c) && y(i, n, "Got unwanted exception" + r), e && i && n && !T(i, n) || !e && i) throw i;
|
|
149
|
+
}
|
|
150
|
+
p.throws = function(e, t, n) {
|
|
151
|
+
D(!0, e, t, n);
|
|
152
|
+
}, p.doesNotThrow = function(e, t, n) {
|
|
153
|
+
D(!1, e, t, n);
|
|
154
|
+
}, p.ifError = function(e) {
|
|
155
|
+
if (e) throw e;
|
|
156
|
+
};
|
|
157
|
+
function O(e, t) {
|
|
158
|
+
e || y(e, !0, t, "==", O);
|
|
159
|
+
}
|
|
160
|
+
p.strict = i(O, p, {
|
|
161
|
+
equal: p.strictEqual,
|
|
162
|
+
deepEqual: p.deepStrictEqual,
|
|
163
|
+
notEqual: p.notStrictEqual,
|
|
164
|
+
notDeepEqual: p.notDeepStrictEqual
|
|
165
|
+
}), p.strict.strict = p.strict;
|
|
166
|
+
var k = Object.keys || function(e) {
|
|
167
|
+
var t = [];
|
|
168
|
+
for (var n in e) c.call(e, n) && t.push(n);
|
|
169
|
+
return t;
|
|
170
|
+
};
|
|
171
|
+
}));
|
|
172
|
+
//#endregion
|
|
173
|
+
export default r();
|
|
174
|
+
export { r as require_assert };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_function_bind as t } from "../../../function-bind@1.1.2/node_modules/function-bind/index.js";
|
|
3
|
+
import { require_functionCall as n } from "./functionCall.js";
|
|
4
|
+
import { require_functionApply as r } from "./functionApply.js";
|
|
5
|
+
import { require_reflectApply as i } from "./reflectApply.js";
|
|
6
|
+
//#region ../../../node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js
|
|
7
|
+
var a = /* @__PURE__ */ e(((e, a) => {
|
|
8
|
+
var o = t(), s = r(), c = n();
|
|
9
|
+
a.exports = i() || o.call(c, s);
|
|
10
|
+
}));
|
|
11
|
+
//#endregion
|
|
12
|
+
export default a();
|
|
13
|
+
export { a as require_actualApply };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = Function.prototype.apply;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_functionApply };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = Function.prototype.call;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_functionCall };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_type as t } from "../../../es-errors@1.3.0/node_modules/es-errors/type.js";
|
|
3
|
+
import { require_function_bind as n } from "../../../function-bind@1.1.2/node_modules/function-bind/index.js";
|
|
4
|
+
import { require_functionCall as r } from "./functionCall.js";
|
|
5
|
+
import { require_actualApply as i } from "./actualApply.js";
|
|
6
|
+
//#region ../../../node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js
|
|
7
|
+
var a = /* @__PURE__ */ e(((e, a) => {
|
|
8
|
+
var o = n(), s = t(), c = r(), l = i();
|
|
9
|
+
a.exports = function(e) {
|
|
10
|
+
if (e.length < 1 || typeof e[0] != "function") throw new s("a function is required");
|
|
11
|
+
return l(o, c, e);
|
|
12
|
+
};
|
|
13
|
+
}));
|
|
14
|
+
//#endregion
|
|
15
|
+
export default a();
|
|
16
|
+
export { a as require_call_bind_apply_helpers };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_reflectApply };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_call_bind_apply_helpers as t } from "../../../call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js";
|
|
3
|
+
import { require_get_intrinsic as n } from "../../../get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/call-bound@1.0.4/node_modules/call-bound/index.js
|
|
5
|
+
var r = /* @__PURE__ */ e(((e, r) => {
|
|
6
|
+
var i = n(), a = t(), o = a([i("%String.prototype.indexOf%")]);
|
|
7
|
+
r.exports = function(e, t) {
|
|
8
|
+
var n = i(e, !!t);
|
|
9
|
+
return typeof n == "function" && o(e, ".prototype.") > -1 ? a([n]) : n;
|
|
10
|
+
};
|
|
11
|
+
}));
|
|
12
|
+
//#endregion
|
|
13
|
+
export default r();
|
|
14
|
+
export { r as require_call_bound };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_assert as t } from "../../../assert@1.5.1/node_modules/assert/assert.js";
|
|
3
|
+
//#region ../../../node_modules/.bun/degrees-radians@1.0.3/node_modules/degrees-radians/index.js
|
|
4
|
+
var n = /* @__PURE__ */ e(((e, n) => {
|
|
5
|
+
var r = t();
|
|
6
|
+
n.exports = function(e) {
|
|
7
|
+
return r(typeof e == "number", "Degrees should be a number"), Math.PI / 180 * e;
|
|
8
|
+
};
|
|
9
|
+
}));
|
|
10
|
+
//#endregion
|
|
11
|
+
export default n();
|
|
12
|
+
export { n as require_degrees_radians };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_gopd as t } from "../../../gopd@1.2.0/node_modules/gopd/index.js";
|
|
3
|
+
import { require_call_bind_apply_helpers as n } from "../../../call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js";
|
|
4
|
+
//#region ../../../node_modules/.bun/dunder-proto@1.0.1/node_modules/dunder-proto/get.js
|
|
5
|
+
var r = /* @__PURE__ */ e(((e, r) => {
|
|
6
|
+
var i = n(), a = t(), o;
|
|
7
|
+
try {
|
|
8
|
+
o = [].__proto__ === Array.prototype;
|
|
9
|
+
} catch (e) {
|
|
10
|
+
if (!e || typeof e != "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") throw e;
|
|
11
|
+
}
|
|
12
|
+
var s = !!o && a && a(Object.prototype, "__proto__"), c = Object, l = c.getPrototypeOf;
|
|
13
|
+
r.exports = s && typeof s.get == "function" ? i([s.get]) : typeof l == "function" ? function(e) {
|
|
14
|
+
return l(e == null ? e : c(e));
|
|
15
|
+
} : !1;
|
|
16
|
+
}));
|
|
17
|
+
//#endregion
|
|
18
|
+
export default r();
|
|
19
|
+
export { r as require_get };
|
package/dist/node_modules/.bun/es-define-property@1.0.1/node_modules/es-define-property/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/es-define-property@1.0.1/node_modules/es-define-property/index.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
var n = Object.defineProperty || !1;
|
|
5
|
+
if (n) try {
|
|
6
|
+
n({}, "a", { value: 1 });
|
|
7
|
+
} catch {
|
|
8
|
+
n = !1;
|
|
9
|
+
}
|
|
10
|
+
t.exports = n;
|
|
11
|
+
}));
|
|
12
|
+
//#endregion
|
|
13
|
+
export default t();
|
|
14
|
+
export { t as require_es_define_property };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/eval.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = EvalError;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_eval };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/index.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = Error;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_es_errors };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/range.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = RangeError;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_range };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/ref.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = ReferenceError;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_ref };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/syntax.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = SyntaxError;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_syntax };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/type.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = TypeError;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_type };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/es-errors@1.3.0/node_modules/es-errors/uri.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = URIError;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_uri };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/es-object-atoms@1.1.2/node_modules/es-object-atoms/index.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
t.exports = Object;
|
|
5
|
+
}));
|
|
6
|
+
//#endregion
|
|
7
|
+
export default t();
|
|
8
|
+
export { t as require_es_object_atoms };
|
package/dist/node_modules/.bun/function-bind@1.1.2/node_modules/function-bind/implementation.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/function-bind@1.1.2/node_modules/function-bind/implementation.js
|
|
3
|
+
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
|
+
var n = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, i = Math.max, a = "[object Function]", o = function(e, t) {
|
|
5
|
+
for (var n = [], r = 0; r < e.length; r += 1) n[r] = e[r];
|
|
6
|
+
for (var i = 0; i < t.length; i += 1) n[i + e.length] = t[i];
|
|
7
|
+
return n;
|
|
8
|
+
}, s = function(e, t) {
|
|
9
|
+
for (var n = [], r = t || 0, i = 0; r < e.length; r += 1, i += 1) n[i] = e[r];
|
|
10
|
+
return n;
|
|
11
|
+
}, c = function(e, t) {
|
|
12
|
+
for (var n = "", r = 0; r < e.length; r += 1) n += e[r], r + 1 < e.length && (n += t);
|
|
13
|
+
return n;
|
|
14
|
+
};
|
|
15
|
+
t.exports = function(e) {
|
|
16
|
+
var t = this;
|
|
17
|
+
if (typeof t != "function" || r.apply(t) !== a) throw TypeError(n + t);
|
|
18
|
+
for (var l = s(arguments, 1), u, d = function() {
|
|
19
|
+
if (this instanceof u) {
|
|
20
|
+
var n = t.apply(this, o(l, arguments));
|
|
21
|
+
return Object(n) === n ? n : this;
|
|
22
|
+
}
|
|
23
|
+
return t.apply(e, o(l, arguments));
|
|
24
|
+
}, f = i(0, t.length - l.length), p = [], m = 0; m < f; m++) p[m] = "$" + m;
|
|
25
|
+
if (u = Function("binder", "return function (" + c(p, ",") + "){ return binder.apply(this,arguments); }")(d), t.prototype) {
|
|
26
|
+
var h = function() {};
|
|
27
|
+
h.prototype = t.prototype, u.prototype = new h(), h.prototype = null;
|
|
28
|
+
}
|
|
29
|
+
return u;
|
|
30
|
+
};
|
|
31
|
+
}));
|
|
32
|
+
//#endregion
|
|
33
|
+
export default t();
|
|
34
|
+
export { t as require_implementation };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __commonJSMin as e } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_implementation as t } from "./implementation.js";
|
|
3
|
+
//#region ../../../node_modules/.bun/function-bind@1.1.2/node_modules/function-bind/index.js
|
|
4
|
+
var n = /* @__PURE__ */ e(((e, n) => {
|
|
5
|
+
var r = t();
|
|
6
|
+
n.exports = Function.prototype.bind || r;
|
|
7
|
+
}));
|
|
8
|
+
//#endregion
|
|
9
|
+
export default n();
|
|
10
|
+
export { n as require_function_bind };
|