@oj-module/cli 0.2.64 → 0.2.66
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/devkit/README.md +9 -3
- package/devkit/SKILL.md +5 -2
- package/devkit/framework-dev.md +12 -7
- package/devkit/manual.md +123 -56
- package/devkit/menu-rules.md +4 -1
- package/package.json +3 -2
- package/shell-dist/assets/ahooks.2l850ymmh0.js +18 -0
- package/shell-dist/assets/antd-es-locale-zh_CN.1gjjsvxbf0.js +1 -0
- package/shell-dist/assets/antd-img-crop.196rkty480.js +99 -0
- package/shell-dist/assets/antd-locale-en_US.561tozx860.js +1 -0
- package/shell-dist/assets/antd-locale-zh_CN.1cmpmgzh70.js +1 -0
- package/shell-dist/assets/antd.uw1coq15l0.js +348 -0
- package/shell-dist/assets/clsx.jotilrt2e0.js +1 -0
- package/shell-dist/assets/contract-errors.2o17vz9u50.js +1 -0
- package/shell-dist/assets/contract.3h327o3mj0.js +57 -0
- package/shell-dist/assets/cssinjs.atgmhan7m0.js +3 -0
- package/shell-dist/assets/dayjs-plugin-advancedFormat.3vsyd2eis0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-customParseFormat.13xhghv1d0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-isoWeek.1fn1tw82p0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-localeData.2rwbjp9nk0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-quarterOfYear.2oqo1lcx80.js +1 -0
- package/shell-dist/assets/dayjs-plugin-relativeTime.2pqs3et4y0.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekOfYear.gvn9iph080.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekYear.2u78l3ex10.js +1 -0
- package/shell-dist/assets/dayjs-plugin-weekday.2d56a4tml0.js +1 -0
- package/shell-dist/assets/dayjs.pa60l6wjo0.js +1 -0
- package/shell-dist/assets/dnd-kit-core.1xyreig6r0.js +5 -0
- package/shell-dist/assets/dnd-kit-sortable.s94qciuft0.js +1 -0
- package/shell-dist/assets/dnd-kit-utilities.1umw4xphb0.js +1 -0
- package/shell-dist/assets/i18next.33zqofapj0.js +1 -0
- package/shell-dist/assets/icons-es-components-Context.365qmflwg0.js +1 -0
- package/shell-dist/assets/icons.159wjwals0.js +57 -0
- package/shell-dist/assets/jsx-dev-runtime.3uibuc82f0.js +14 -0
- package/shell-dist/assets/jsx-runtime.h40xu4o5b0.js +14 -0
- package/shell-dist/assets/keepalive-for-react.xenu5vam70.js +1 -0
- package/shell-dist/assets/kit.37kr8ui390.js +1 -0
- package/shell-dist/assets/ky.1cgch7gu60.js +6 -0
- package/shell-dist/assets/motion-react.pjsxytvjs0.js +12 -0
- package/shell-dist/assets/motion.21tciqutg0.js +4 -0
- package/shell-dist/assets/nprogress.2nz76n9ny0.js +7 -0
- package/shell-dist/assets/ojm-dayjs-locale-zh-cn.3vr3beiyp0.js +9 -0
- package/shell-dist/assets/pinyin-pro.3v0mnxczn0.js +1 -0
- package/shell-dist/assets/pro-components.2kyot1vcl0.js +83 -0
- package/shell-dist/assets/react-countup.2x8idnr8y0.js +10 -0
- package/shell-dist/assets/react-dom-client.ick0v05ob0.js +43 -0
- package/shell-dist/assets/react-dom.2so9uxg3f0.js +22 -0
- package/shell-dist/assets/react-error-boundary.2dncdfj3b0.js +1 -0
- package/shell-dist/assets/react-i18next.auhvjhqv00.js +1 -0
- package/shell-dist/assets/react-jss.1ei6dr9e00.js +29 -0
- package/shell-dist/assets/react-query.3rln45ow00.js +1 -0
- package/shell-dist/assets/react-router-dom.3c6zld8h40.js +44 -0
- package/shell-dist/assets/react-router.2h9rebcv50.js +56 -0
- package/shell-dist/assets/react.1ew63mwts0.js +14 -0
- package/shell-dist/assets/runtime.1xfsxcajj0.js +21702 -0
- package/shell-dist/assets/simplebar-react.2g739uvai0.js +1 -0
- package/shell-dist/assets/spin-delay.yjeyj6iwp0.js +9 -0
- package/shell-dist/assets/tailwind-merge.125ehiqjw0.js +1 -0
- package/shell-dist/assets/use-sync-external-store-shim.1nz1pi9bb0.js +22 -0
- package/shell-dist/assets/zustand-middleware.1xaxjueme0.js +6 -0
- package/shell-dist/assets/zustand-react-shallow.pybayv1hx0.js +1 -0
- package/shell-dist/assets/zustand-react.9fsl9brxy0.js +1 -0
- package/shell-dist/assets/zustand-shallow.6cz0yyv9x0.js +1 -0
- package/shell-dist/assets/zustand-vanilla-shallow.3424monv50.js +1 -0
- package/shell-dist/assets/zustand-vanilla.1mo3ka3g30.js +1 -0
- package/shell-dist/assets/zustand.3gjgzlnqo0.js +1 -0
- package/shell-dist/index.html +67 -118
- package/shell-dist/versions.json +3 -3
- package/src/esm-exports.ts +152 -70
- package/src/shared-deps.ts +69 -19
- package/src/site-base.ts +4 -0
- package/templates/src/app/web/home/pages/components/bar-chart.tsx +5 -3
- package/templates/src/app/web/home/pages/components/echarts-setup.ts +30 -0
- package/templates/src/app/web/home/pages/components/line-chart.tsx +5 -3
- package/templates/src/app/web/home/pages/components/pie-chart.tsx +6 -3
- package/templates/src/app/web/home/pages/index.tsx +3 -2
- package/templates/src/app/web/home/routes.ts +3 -2
- package/vendor/host-versions.json +3 -3
- package/shell-dist/assets/ahooks.js +0 -6909
- package/shell-dist/assets/antd-es-locale-zh_CN.js +0 -257
- package/shell-dist/assets/antd-img-crop.js +0 -1495
- package/shell-dist/assets/antd-locale-en_US.js +0 -374
- package/shell-dist/assets/antd-locale-zh_CN.js +0 -379
- package/shell-dist/assets/antd.js +0 -106874
- package/shell-dist/assets/clsx.js +0 -33
- package/shell-dist/assets/contract-errors.js +0 -30
- package/shell-dist/assets/contract.js +0 -18900
- package/shell-dist/assets/cssinjs.js +0 -2595
- package/shell-dist/assets/dayjs-plugin-advancedFormat.js +0 -98
- package/shell-dist/assets/dayjs-plugin-customParseFormat.js +0 -173
- package/shell-dist/assets/dayjs-plugin-isoWeek.js +0 -77
- package/shell-dist/assets/dayjs-plugin-localeData.js +0 -126
- package/shell-dist/assets/dayjs-plugin-quarterOfYear.js +0 -77
- package/shell-dist/assets/dayjs-plugin-relativeTime.js +0 -92
- package/shell-dist/assets/dayjs-plugin-weekOfYear.js +0 -73
- package/shell-dist/assets/dayjs-plugin-weekYear.js +0 -63
- package/shell-dist/assets/dayjs-plugin-weekday.js +0 -63
- package/shell-dist/assets/dayjs.js +0 -326
- package/shell-dist/assets/dnd-kit-core.js +0 -3601
- package/shell-dist/assets/dnd-kit-sortable.js +0 -717
- package/shell-dist/assets/dnd-kit-utilities.js +0 -340
- package/shell-dist/assets/i18next.js +0 -2321
- package/shell-dist/assets/icons-es-components-Context.js +0 -20
- package/shell-dist/assets/icons.js +0 -34961
- package/shell-dist/assets/jsx-dev-runtime.js +0 -75
- package/shell-dist/assets/jsx-runtime.js +0 -97
- package/shell-dist/assets/keepalive-for-react.js +0 -283
- package/shell-dist/assets/kit.js +0 -151
- package/shell-dist/assets/ky.js +0 -1427
- package/shell-dist/assets/motion-react.js +0 -13589
- package/shell-dist/assets/motion.js +0 -9959
- package/shell-dist/assets/nprogress.js +0 -314
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-BarsOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CalendarOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretDownOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CaretUpOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CheckOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ClockCircleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CloseOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-CopyOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DeleteOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleLeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DoubleRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-DownloadOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EditOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EllipsisOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EnterOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ExclamationCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeInvisibleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-EyeOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FileTextOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FilterFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOpenOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-FolderOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-HolderOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-InfoCircleFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-LeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-LoadingOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-MinusSquareOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PaperClipOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PictureOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-PlusSquareOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-QuestionCircleOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ReloadOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateLeftOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-RotateRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SearchOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-StarFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-SwapRightOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-UpOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-VerticalAlignTopOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-WarningFilled.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomInOutlined.js +0 -7
- package/shell-dist/assets/ojm--ant-design-icons-es-icons-ZoomOutOutlined.js +0 -7
- package/shell-dist/assets/ojm-dayjs-locale-zh-cn.js +0 -81
- package/shell-dist/assets/pinyin-pro.js +0 -25175
- package/shell-dist/assets/pro-components.js +0 -44627
- package/shell-dist/assets/react-countup.js +0 -525
- package/shell-dist/assets/react-dom-client.js +0 -12134
- package/shell-dist/assets/react-dom.js +0 -266
- package/shell-dist/assets/react-error-boundary.js +0 -141
- package/shell-dist/assets/react-i18next.js +0 -1773
- package/shell-dist/assets/react-jss.js +0 -4089
- package/shell-dist/assets/react-query.js +0 -3072
- package/shell-dist/assets/react-router-dom.js +0 -9927
- package/shell-dist/assets/react-router.js +0 -14584
- package/shell-dist/assets/react.js +0 -590
- package/shell-dist/assets/runtime.js +0 -28311
- package/shell-dist/assets/simplebar-react.js +0 -1119
- package/shell-dist/assets/spin-delay.js +0 -111
- package/shell-dist/assets/tailwind-merge.js +0 -3364
- package/shell-dist/assets/use-sync-external-store-shim.js +0 -130
- package/shell-dist/assets/zustand-middleware.js +0 -513
- package/shell-dist/assets/zustand-react-shallow.js +0 -27
- package/shell-dist/assets/zustand-react.js +0 -39
- package/shell-dist/assets/zustand-shallow.js +0 -22
- package/shell-dist/assets/zustand-vanilla-shallow.js +0 -71
- package/shell-dist/assets/zustand-vanilla.js +0 -40
- package/shell-dist/assets/zustand.js +0 -32
- /package/shell-dist/assets/{index-xZhmujjM.js → index.i0kqbxp050.js} +0 -0
- /package/shell-dist/assets/{nprogress-css.js → nprogress-css.1cq2pzkre0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-button.js → ojm-antd-es-button.2uriphio50.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-modal.js → ojm-antd-es-modal.bf3tgdh8v0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-slider.js → ojm-antd-es-slider.xyvptuhid0.js} +0 -0
- /package/shell-dist/assets/{ojm-antd-es-upload.js → ojm-antd-es-upload.13gx45e0g0.js} +0 -0
|
@@ -1,1119 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __export = (target, all) => {
|
|
3
|
-
for (var name in all)
|
|
4
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// ../../node_modules/.pnpm/simplebar-react@3.3.2_react@19.2.8/node_modules/simplebar-react/dist/index.mjs
|
|
8
|
-
var dist_exports = {};
|
|
9
|
-
__export(dist_exports, {
|
|
10
|
-
default: () => SimpleBar
|
|
11
|
-
});
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
|
|
14
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObject.js
|
|
15
|
-
function isObject(value) {
|
|
16
|
-
var type = typeof value;
|
|
17
|
-
return value != null && (type == "object" || type == "function");
|
|
18
|
-
}
|
|
19
|
-
var isObject_default = isObject;
|
|
20
|
-
|
|
21
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js
|
|
22
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
23
|
-
var freeGlobal_default = freeGlobal;
|
|
24
|
-
|
|
25
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_root.js
|
|
26
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
27
|
-
var root = freeGlobal_default || freeSelf || Function("return this")();
|
|
28
|
-
var root_default = root;
|
|
29
|
-
|
|
30
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/now.js
|
|
31
|
-
var now = function() {
|
|
32
|
-
return root_default.Date.now();
|
|
33
|
-
};
|
|
34
|
-
var now_default = now;
|
|
35
|
-
|
|
36
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js
|
|
37
|
-
var reWhitespace = /\s/;
|
|
38
|
-
function trimmedEndIndex(string) {
|
|
39
|
-
var index = string.length;
|
|
40
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
41
|
-
}
|
|
42
|
-
return index;
|
|
43
|
-
}
|
|
44
|
-
var trimmedEndIndex_default = trimmedEndIndex;
|
|
45
|
-
|
|
46
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js
|
|
47
|
-
var reTrimStart = /^\s+/;
|
|
48
|
-
function baseTrim(string) {
|
|
49
|
-
return string ? string.slice(0, trimmedEndIndex_default(string) + 1).replace(reTrimStart, "") : string;
|
|
50
|
-
}
|
|
51
|
-
var baseTrim_default = baseTrim;
|
|
52
|
-
|
|
53
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js
|
|
54
|
-
var Symbol2 = root_default.Symbol;
|
|
55
|
-
var Symbol_default = Symbol2;
|
|
56
|
-
|
|
57
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js
|
|
58
|
-
var objectProto = Object.prototype;
|
|
59
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
60
|
-
var nativeObjectToString = objectProto.toString;
|
|
61
|
-
var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
62
|
-
function getRawTag(value) {
|
|
63
|
-
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
64
|
-
try {
|
|
65
|
-
value[symToStringTag] = void 0;
|
|
66
|
-
var unmasked = true;
|
|
67
|
-
} catch (e) {
|
|
68
|
-
}
|
|
69
|
-
var result = nativeObjectToString.call(value);
|
|
70
|
-
if (unmasked) {
|
|
71
|
-
if (isOwn) {
|
|
72
|
-
value[symToStringTag] = tag;
|
|
73
|
-
} else {
|
|
74
|
-
delete value[symToStringTag];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return result;
|
|
78
|
-
}
|
|
79
|
-
var getRawTag_default = getRawTag;
|
|
80
|
-
|
|
81
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js
|
|
82
|
-
var objectProto2 = Object.prototype;
|
|
83
|
-
var nativeObjectToString2 = objectProto2.toString;
|
|
84
|
-
function objectToString(value) {
|
|
85
|
-
return nativeObjectToString2.call(value);
|
|
86
|
-
}
|
|
87
|
-
var objectToString_default = objectToString;
|
|
88
|
-
|
|
89
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js
|
|
90
|
-
var nullTag = "[object Null]";
|
|
91
|
-
var undefinedTag = "[object Undefined]";
|
|
92
|
-
var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
|
|
93
|
-
function baseGetTag(value) {
|
|
94
|
-
if (value == null) {
|
|
95
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
96
|
-
}
|
|
97
|
-
return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
|
|
98
|
-
}
|
|
99
|
-
var baseGetTag_default = baseGetTag;
|
|
100
|
-
|
|
101
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js
|
|
102
|
-
function isObjectLike(value) {
|
|
103
|
-
return value != null && typeof value == "object";
|
|
104
|
-
}
|
|
105
|
-
var isObjectLike_default = isObjectLike;
|
|
106
|
-
|
|
107
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js
|
|
108
|
-
var symbolTag = "[object Symbol]";
|
|
109
|
-
function isSymbol(value) {
|
|
110
|
-
return typeof value == "symbol" || isObjectLike_default(value) && baseGetTag_default(value) == symbolTag;
|
|
111
|
-
}
|
|
112
|
-
var isSymbol_default = isSymbol;
|
|
113
|
-
|
|
114
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js
|
|
115
|
-
var NAN = 0 / 0;
|
|
116
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
117
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
118
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
119
|
-
var freeParseInt = parseInt;
|
|
120
|
-
function toNumber(value) {
|
|
121
|
-
if (typeof value == "number") {
|
|
122
|
-
return value;
|
|
123
|
-
}
|
|
124
|
-
if (isSymbol_default(value)) {
|
|
125
|
-
return NAN;
|
|
126
|
-
}
|
|
127
|
-
if (isObject_default(value)) {
|
|
128
|
-
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
129
|
-
value = isObject_default(other) ? other + "" : other;
|
|
130
|
-
}
|
|
131
|
-
if (typeof value != "string") {
|
|
132
|
-
return value === 0 ? value : +value;
|
|
133
|
-
}
|
|
134
|
-
value = baseTrim_default(value);
|
|
135
|
-
var isBinary = reIsBinary.test(value);
|
|
136
|
-
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
137
|
-
}
|
|
138
|
-
var toNumber_default = toNumber;
|
|
139
|
-
|
|
140
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/debounce.js
|
|
141
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
142
|
-
var nativeMax = Math.max;
|
|
143
|
-
var nativeMin = Math.min;
|
|
144
|
-
function debounce(func, wait, options) {
|
|
145
|
-
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
146
|
-
if (typeof func != "function") {
|
|
147
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
148
|
-
}
|
|
149
|
-
wait = toNumber_default(wait) || 0;
|
|
150
|
-
if (isObject_default(options)) {
|
|
151
|
-
leading = !!options.leading;
|
|
152
|
-
maxing = "maxWait" in options;
|
|
153
|
-
maxWait = maxing ? nativeMax(toNumber_default(options.maxWait) || 0, wait) : maxWait;
|
|
154
|
-
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
155
|
-
}
|
|
156
|
-
function invokeFunc(time) {
|
|
157
|
-
var args = lastArgs, thisArg = lastThis;
|
|
158
|
-
lastArgs = lastThis = void 0;
|
|
159
|
-
lastInvokeTime = time;
|
|
160
|
-
result = func.apply(thisArg, args);
|
|
161
|
-
return result;
|
|
162
|
-
}
|
|
163
|
-
function leadingEdge(time) {
|
|
164
|
-
lastInvokeTime = time;
|
|
165
|
-
timerId = setTimeout(timerExpired, wait);
|
|
166
|
-
return leading ? invokeFunc(time) : result;
|
|
167
|
-
}
|
|
168
|
-
function remainingWait(time) {
|
|
169
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
170
|
-
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
171
|
-
}
|
|
172
|
-
function shouldInvoke(time) {
|
|
173
|
-
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
174
|
-
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
175
|
-
}
|
|
176
|
-
function timerExpired() {
|
|
177
|
-
var time = now_default();
|
|
178
|
-
if (shouldInvoke(time)) {
|
|
179
|
-
return trailingEdge(time);
|
|
180
|
-
}
|
|
181
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
182
|
-
}
|
|
183
|
-
function trailingEdge(time) {
|
|
184
|
-
timerId = void 0;
|
|
185
|
-
if (trailing && lastArgs) {
|
|
186
|
-
return invokeFunc(time);
|
|
187
|
-
}
|
|
188
|
-
lastArgs = lastThis = void 0;
|
|
189
|
-
return result;
|
|
190
|
-
}
|
|
191
|
-
function cancel() {
|
|
192
|
-
if (timerId !== void 0) {
|
|
193
|
-
clearTimeout(timerId);
|
|
194
|
-
}
|
|
195
|
-
lastInvokeTime = 0;
|
|
196
|
-
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
197
|
-
}
|
|
198
|
-
function flush() {
|
|
199
|
-
return timerId === void 0 ? result : trailingEdge(now_default());
|
|
200
|
-
}
|
|
201
|
-
function debounced() {
|
|
202
|
-
var time = now_default(), isInvoking = shouldInvoke(time);
|
|
203
|
-
lastArgs = arguments;
|
|
204
|
-
lastThis = this;
|
|
205
|
-
lastCallTime = time;
|
|
206
|
-
if (isInvoking) {
|
|
207
|
-
if (timerId === void 0) {
|
|
208
|
-
return leadingEdge(lastCallTime);
|
|
209
|
-
}
|
|
210
|
-
if (maxing) {
|
|
211
|
-
clearTimeout(timerId);
|
|
212
|
-
timerId = setTimeout(timerExpired, wait);
|
|
213
|
-
return invokeFunc(lastCallTime);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
if (timerId === void 0) {
|
|
217
|
-
timerId = setTimeout(timerExpired, wait);
|
|
218
|
-
}
|
|
219
|
-
return result;
|
|
220
|
-
}
|
|
221
|
-
debounced.cancel = cancel;
|
|
222
|
-
debounced.flush = flush;
|
|
223
|
-
return debounced;
|
|
224
|
-
}
|
|
225
|
-
var debounce_default = debounce;
|
|
226
|
-
|
|
227
|
-
// ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/throttle.js
|
|
228
|
-
var FUNC_ERROR_TEXT2 = "Expected a function";
|
|
229
|
-
function throttle(func, wait, options) {
|
|
230
|
-
var leading = true, trailing = true;
|
|
231
|
-
if (typeof func != "function") {
|
|
232
|
-
throw new TypeError(FUNC_ERROR_TEXT2);
|
|
233
|
-
}
|
|
234
|
-
if (isObject_default(options)) {
|
|
235
|
-
leading = "leading" in options ? !!options.leading : leading;
|
|
236
|
-
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
237
|
-
}
|
|
238
|
-
return debounce_default(func, wait, {
|
|
239
|
-
"leading": leading,
|
|
240
|
-
"maxWait": wait,
|
|
241
|
-
"trailing": trailing
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
var throttle_default = throttle;
|
|
245
|
-
|
|
246
|
-
// ../../node_modules/.pnpm/simplebar-core@1.3.2/node_modules/simplebar-core/dist/index.mjs
|
|
247
|
-
var __assign = function() {
|
|
248
|
-
__assign = Object.assign || function __assign3(t) {
|
|
249
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
250
|
-
s = arguments[i];
|
|
251
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
252
|
-
}
|
|
253
|
-
return t;
|
|
254
|
-
};
|
|
255
|
-
return __assign.apply(this, arguments);
|
|
256
|
-
};
|
|
257
|
-
function getElementWindow$1(element) {
|
|
258
|
-
if (!element || !element.ownerDocument || !element.ownerDocument.defaultView) {
|
|
259
|
-
return window;
|
|
260
|
-
}
|
|
261
|
-
return element.ownerDocument.defaultView;
|
|
262
|
-
}
|
|
263
|
-
function getElementDocument$1(element) {
|
|
264
|
-
if (!element || !element.ownerDocument) {
|
|
265
|
-
return document;
|
|
266
|
-
}
|
|
267
|
-
return element.ownerDocument;
|
|
268
|
-
}
|
|
269
|
-
var getOptions$1 = function(obj) {
|
|
270
|
-
var initialObj = {};
|
|
271
|
-
var options = Array.prototype.reduce.call(obj, function(acc, attribute) {
|
|
272
|
-
var option = attribute.name.match(/data-simplebar-(.+)/);
|
|
273
|
-
if (option) {
|
|
274
|
-
var key = option[1].replace(/\W+(.)/g, function(_, chr) {
|
|
275
|
-
return chr.toUpperCase();
|
|
276
|
-
});
|
|
277
|
-
switch (attribute.value) {
|
|
278
|
-
case "true":
|
|
279
|
-
acc[key] = true;
|
|
280
|
-
break;
|
|
281
|
-
case "false":
|
|
282
|
-
acc[key] = false;
|
|
283
|
-
break;
|
|
284
|
-
case void 0:
|
|
285
|
-
acc[key] = true;
|
|
286
|
-
break;
|
|
287
|
-
default:
|
|
288
|
-
acc[key] = attribute.value;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
return acc;
|
|
292
|
-
}, initialObj);
|
|
293
|
-
return options;
|
|
294
|
-
};
|
|
295
|
-
function addClasses$1(el, classes) {
|
|
296
|
-
var _a;
|
|
297
|
-
if (!el)
|
|
298
|
-
return;
|
|
299
|
-
(_a = el.classList).add.apply(_a, classes.split(" "));
|
|
300
|
-
}
|
|
301
|
-
function removeClasses$1(el, classes) {
|
|
302
|
-
if (!el)
|
|
303
|
-
return;
|
|
304
|
-
classes.split(" ").forEach(function(className) {
|
|
305
|
-
el.classList.remove(className);
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
function classNamesToQuery$1(classNames) {
|
|
309
|
-
return ".".concat(classNames.split(" ").join("."));
|
|
310
|
-
}
|
|
311
|
-
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
312
|
-
var helpers = /* @__PURE__ */ Object.freeze({
|
|
313
|
-
__proto__: null,
|
|
314
|
-
addClasses: addClasses$1,
|
|
315
|
-
canUseDOM,
|
|
316
|
-
classNamesToQuery: classNamesToQuery$1,
|
|
317
|
-
getElementDocument: getElementDocument$1,
|
|
318
|
-
getElementWindow: getElementWindow$1,
|
|
319
|
-
getOptions: getOptions$1,
|
|
320
|
-
removeClasses: removeClasses$1
|
|
321
|
-
});
|
|
322
|
-
var cachedScrollbarWidth = null;
|
|
323
|
-
var cachedDevicePixelRatio = null;
|
|
324
|
-
if (canUseDOM) {
|
|
325
|
-
window.addEventListener("resize", function() {
|
|
326
|
-
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
|
|
327
|
-
cachedDevicePixelRatio = window.devicePixelRatio;
|
|
328
|
-
cachedScrollbarWidth = null;
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
function scrollbarWidth() {
|
|
333
|
-
if (cachedScrollbarWidth === null) {
|
|
334
|
-
if (typeof document === "undefined") {
|
|
335
|
-
cachedScrollbarWidth = 0;
|
|
336
|
-
return cachedScrollbarWidth;
|
|
337
|
-
}
|
|
338
|
-
var body = document.body;
|
|
339
|
-
var box = document.createElement("div");
|
|
340
|
-
box.classList.add("simplebar-hide-scrollbar");
|
|
341
|
-
body.appendChild(box);
|
|
342
|
-
var width = box.getBoundingClientRect().right;
|
|
343
|
-
body.removeChild(box);
|
|
344
|
-
cachedScrollbarWidth = width;
|
|
345
|
-
}
|
|
346
|
-
return cachedScrollbarWidth;
|
|
347
|
-
}
|
|
348
|
-
var getElementWindow = getElementWindow$1;
|
|
349
|
-
var getElementDocument = getElementDocument$1;
|
|
350
|
-
var getOptions = getOptions$1;
|
|
351
|
-
var addClasses = addClasses$1;
|
|
352
|
-
var removeClasses = removeClasses$1;
|
|
353
|
-
var classNamesToQuery = classNamesToQuery$1;
|
|
354
|
-
var SimpleBarCore = (
|
|
355
|
-
/** @class */
|
|
356
|
-
(function() {
|
|
357
|
-
function SimpleBarCore2(element, options) {
|
|
358
|
-
if (options === void 0) {
|
|
359
|
-
options = {};
|
|
360
|
-
}
|
|
361
|
-
var _this = this;
|
|
362
|
-
this.removePreventClickId = null;
|
|
363
|
-
this.minScrollbarWidth = 20;
|
|
364
|
-
this.stopScrollDelay = 175;
|
|
365
|
-
this.isScrolling = false;
|
|
366
|
-
this.isMouseEntering = false;
|
|
367
|
-
this.isDragging = false;
|
|
368
|
-
this.scrollXTicking = false;
|
|
369
|
-
this.scrollYTicking = false;
|
|
370
|
-
this.wrapperEl = null;
|
|
371
|
-
this.contentWrapperEl = null;
|
|
372
|
-
this.contentEl = null;
|
|
373
|
-
this.offsetEl = null;
|
|
374
|
-
this.maskEl = null;
|
|
375
|
-
this.placeholderEl = null;
|
|
376
|
-
this.heightAutoObserverWrapperEl = null;
|
|
377
|
-
this.heightAutoObserverEl = null;
|
|
378
|
-
this.rtlHelpers = null;
|
|
379
|
-
this.scrollbarWidth = 0;
|
|
380
|
-
this.resizeObserver = null;
|
|
381
|
-
this.mutationObserver = null;
|
|
382
|
-
this.elStyles = null;
|
|
383
|
-
this.isRtl = null;
|
|
384
|
-
this.mouseX = 0;
|
|
385
|
-
this.mouseY = 0;
|
|
386
|
-
this.onMouseMove = function() {
|
|
387
|
-
};
|
|
388
|
-
this.onWindowResize = function() {
|
|
389
|
-
};
|
|
390
|
-
this.onStopScrolling = function() {
|
|
391
|
-
};
|
|
392
|
-
this.onMouseEntered = function() {
|
|
393
|
-
};
|
|
394
|
-
this.onScroll = function() {
|
|
395
|
-
var elWindow = getElementWindow(_this.el);
|
|
396
|
-
if (!_this.scrollXTicking) {
|
|
397
|
-
elWindow.requestAnimationFrame(_this.scrollX);
|
|
398
|
-
_this.scrollXTicking = true;
|
|
399
|
-
}
|
|
400
|
-
if (!_this.scrollYTicking) {
|
|
401
|
-
elWindow.requestAnimationFrame(_this.scrollY);
|
|
402
|
-
_this.scrollYTicking = true;
|
|
403
|
-
}
|
|
404
|
-
if (!_this.isScrolling) {
|
|
405
|
-
_this.isScrolling = true;
|
|
406
|
-
addClasses(_this.el, _this.classNames.scrolling);
|
|
407
|
-
}
|
|
408
|
-
_this.showScrollbar("x");
|
|
409
|
-
_this.showScrollbar("y");
|
|
410
|
-
_this.onStopScrolling();
|
|
411
|
-
};
|
|
412
|
-
this.scrollX = function() {
|
|
413
|
-
if (_this.axis.x.isOverflowing) {
|
|
414
|
-
_this.positionScrollbar("x");
|
|
415
|
-
}
|
|
416
|
-
_this.scrollXTicking = false;
|
|
417
|
-
};
|
|
418
|
-
this.scrollY = function() {
|
|
419
|
-
if (_this.axis.y.isOverflowing) {
|
|
420
|
-
_this.positionScrollbar("y");
|
|
421
|
-
}
|
|
422
|
-
_this.scrollYTicking = false;
|
|
423
|
-
};
|
|
424
|
-
this._onStopScrolling = function() {
|
|
425
|
-
removeClasses(_this.el, _this.classNames.scrolling);
|
|
426
|
-
if (_this.options.autoHide) {
|
|
427
|
-
_this.hideScrollbar("x");
|
|
428
|
-
_this.hideScrollbar("y");
|
|
429
|
-
}
|
|
430
|
-
_this.isScrolling = false;
|
|
431
|
-
};
|
|
432
|
-
this.onMouseEnter = function() {
|
|
433
|
-
if (!_this.isMouseEntering) {
|
|
434
|
-
addClasses(_this.el, _this.classNames.mouseEntered);
|
|
435
|
-
_this.showScrollbar("x");
|
|
436
|
-
_this.showScrollbar("y");
|
|
437
|
-
_this.isMouseEntering = true;
|
|
438
|
-
}
|
|
439
|
-
_this.onMouseEntered();
|
|
440
|
-
};
|
|
441
|
-
this._onMouseEntered = function() {
|
|
442
|
-
removeClasses(_this.el, _this.classNames.mouseEntered);
|
|
443
|
-
if (_this.options.autoHide) {
|
|
444
|
-
_this.hideScrollbar("x");
|
|
445
|
-
_this.hideScrollbar("y");
|
|
446
|
-
}
|
|
447
|
-
_this.isMouseEntering = false;
|
|
448
|
-
};
|
|
449
|
-
this._onMouseMove = function(e) {
|
|
450
|
-
_this.mouseX = e.clientX;
|
|
451
|
-
_this.mouseY = e.clientY;
|
|
452
|
-
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
|
453
|
-
_this.onMouseMoveForAxis("x");
|
|
454
|
-
}
|
|
455
|
-
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
|
456
|
-
_this.onMouseMoveForAxis("y");
|
|
457
|
-
}
|
|
458
|
-
};
|
|
459
|
-
this.onMouseLeave = function() {
|
|
460
|
-
_this.onMouseMove.cancel();
|
|
461
|
-
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
|
462
|
-
_this.onMouseLeaveForAxis("x");
|
|
463
|
-
}
|
|
464
|
-
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
|
465
|
-
_this.onMouseLeaveForAxis("y");
|
|
466
|
-
}
|
|
467
|
-
_this.mouseX = -1;
|
|
468
|
-
_this.mouseY = -1;
|
|
469
|
-
};
|
|
470
|
-
this._onWindowResize = function() {
|
|
471
|
-
_this.scrollbarWidth = _this.getScrollbarWidth();
|
|
472
|
-
_this.hideNativeScrollbar();
|
|
473
|
-
};
|
|
474
|
-
this.onPointerEvent = function(e) {
|
|
475
|
-
if (!_this.axis.x.track.el || !_this.axis.y.track.el || !_this.axis.x.scrollbar.el || !_this.axis.y.scrollbar.el)
|
|
476
|
-
return;
|
|
477
|
-
var isWithinTrackXBounds, isWithinTrackYBounds;
|
|
478
|
-
_this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
|
|
479
|
-
_this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
|
|
480
|
-
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
|
481
|
-
isWithinTrackXBounds = _this.isWithinBounds(_this.axis.x.track.rect);
|
|
482
|
-
}
|
|
483
|
-
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
|
484
|
-
isWithinTrackYBounds = _this.isWithinBounds(_this.axis.y.track.rect);
|
|
485
|
-
}
|
|
486
|
-
if (isWithinTrackXBounds || isWithinTrackYBounds) {
|
|
487
|
-
e.stopPropagation();
|
|
488
|
-
if (e.type === "pointerdown" && e.pointerType !== "touch") {
|
|
489
|
-
if (isWithinTrackXBounds) {
|
|
490
|
-
_this.axis.x.scrollbar.rect = _this.axis.x.scrollbar.el.getBoundingClientRect();
|
|
491
|
-
if (_this.isWithinBounds(_this.axis.x.scrollbar.rect)) {
|
|
492
|
-
_this.onDragStart(e, "x");
|
|
493
|
-
} else {
|
|
494
|
-
_this.onTrackClick(e, "x");
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
if (isWithinTrackYBounds) {
|
|
498
|
-
_this.axis.y.scrollbar.rect = _this.axis.y.scrollbar.el.getBoundingClientRect();
|
|
499
|
-
if (_this.isWithinBounds(_this.axis.y.scrollbar.rect)) {
|
|
500
|
-
_this.onDragStart(e, "y");
|
|
501
|
-
} else {
|
|
502
|
-
_this.onTrackClick(e, "y");
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
this.drag = function(e) {
|
|
509
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
510
|
-
if (!_this.draggedAxis || !_this.contentWrapperEl)
|
|
511
|
-
return;
|
|
512
|
-
var eventOffset;
|
|
513
|
-
var track = _this.axis[_this.draggedAxis].track;
|
|
514
|
-
var trackSize = (_b = (_a = track.rect) === null || _a === void 0 ? void 0 : _a[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _b !== void 0 ? _b : 0;
|
|
515
|
-
var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
|
|
516
|
-
var contentSize = (_d = (_c = _this.contentWrapperEl) === null || _c === void 0 ? void 0 : _c[_this.axis[_this.draggedAxis].scrollSizeAttr]) !== null && _d !== void 0 ? _d : 0;
|
|
517
|
-
var hostSize = parseInt((_f = (_e = _this.elStyles) === null || _e === void 0 ? void 0 : _e[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _f !== void 0 ? _f : "0px", 10);
|
|
518
|
-
e.preventDefault();
|
|
519
|
-
e.stopPropagation();
|
|
520
|
-
if (_this.draggedAxis === "y") {
|
|
521
|
-
eventOffset = e.pageY;
|
|
522
|
-
} else {
|
|
523
|
-
eventOffset = e.pageX;
|
|
524
|
-
}
|
|
525
|
-
var dragPos = eventOffset - ((_h = (_g = track.rect) === null || _g === void 0 ? void 0 : _g[_this.axis[_this.draggedAxis].offsetAttr]) !== null && _h !== void 0 ? _h : 0) - _this.axis[_this.draggedAxis].dragOffset;
|
|
526
|
-
dragPos = _this.draggedAxis === "x" && _this.isRtl ? ((_k = (_j = track.rect) === null || _j === void 0 ? void 0 : _j[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _k !== void 0 ? _k : 0) - scrollbar.size - dragPos : dragPos;
|
|
527
|
-
var dragPerc = dragPos / (trackSize - scrollbar.size);
|
|
528
|
-
var scrollPos = dragPerc * (contentSize - hostSize);
|
|
529
|
-
if (_this.draggedAxis === "x" && _this.isRtl) {
|
|
530
|
-
scrollPos = ((_l = SimpleBarCore2.getRtlHelpers()) === null || _l === void 0 ? void 0 : _l.isScrollingToNegative) ? -scrollPos : scrollPos;
|
|
531
|
-
}
|
|
532
|
-
_this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollOffsetAttr] = scrollPos;
|
|
533
|
-
};
|
|
534
|
-
this.onEndDrag = function(e) {
|
|
535
|
-
_this.isDragging = false;
|
|
536
|
-
var elDocument = getElementDocument(_this.el);
|
|
537
|
-
var elWindow = getElementWindow(_this.el);
|
|
538
|
-
e.preventDefault();
|
|
539
|
-
e.stopPropagation();
|
|
540
|
-
removeClasses(_this.el, _this.classNames.dragging);
|
|
541
|
-
_this.onStopScrolling();
|
|
542
|
-
elDocument.removeEventListener("mousemove", _this.drag, true);
|
|
543
|
-
elDocument.removeEventListener("mouseup", _this.onEndDrag, true);
|
|
544
|
-
_this.removePreventClickId = elWindow.setTimeout(function() {
|
|
545
|
-
elDocument.removeEventListener("click", _this.preventClick, true);
|
|
546
|
-
elDocument.removeEventListener("dblclick", _this.preventClick, true);
|
|
547
|
-
_this.removePreventClickId = null;
|
|
548
|
-
});
|
|
549
|
-
};
|
|
550
|
-
this.preventClick = function(e) {
|
|
551
|
-
e.preventDefault();
|
|
552
|
-
e.stopPropagation();
|
|
553
|
-
};
|
|
554
|
-
this.el = element;
|
|
555
|
-
this.options = __assign(__assign({}, SimpleBarCore2.defaultOptions), options);
|
|
556
|
-
this.classNames = __assign(__assign({}, SimpleBarCore2.defaultOptions.classNames), options.classNames);
|
|
557
|
-
this.axis = {
|
|
558
|
-
x: {
|
|
559
|
-
scrollOffsetAttr: "scrollLeft",
|
|
560
|
-
sizeAttr: "width",
|
|
561
|
-
scrollSizeAttr: "scrollWidth",
|
|
562
|
-
offsetSizeAttr: "offsetWidth",
|
|
563
|
-
offsetAttr: "left",
|
|
564
|
-
overflowAttr: "overflowX",
|
|
565
|
-
dragOffset: 0,
|
|
566
|
-
isOverflowing: true,
|
|
567
|
-
forceVisible: false,
|
|
568
|
-
track: { size: null, el: null, rect: null, isVisible: false },
|
|
569
|
-
scrollbar: { size: null, el: null, rect: null, isVisible: false }
|
|
570
|
-
},
|
|
571
|
-
y: {
|
|
572
|
-
scrollOffsetAttr: "scrollTop",
|
|
573
|
-
sizeAttr: "height",
|
|
574
|
-
scrollSizeAttr: "scrollHeight",
|
|
575
|
-
offsetSizeAttr: "offsetHeight",
|
|
576
|
-
offsetAttr: "top",
|
|
577
|
-
overflowAttr: "overflowY",
|
|
578
|
-
dragOffset: 0,
|
|
579
|
-
isOverflowing: true,
|
|
580
|
-
forceVisible: false,
|
|
581
|
-
track: { size: null, el: null, rect: null, isVisible: false },
|
|
582
|
-
scrollbar: { size: null, el: null, rect: null, isVisible: false }
|
|
583
|
-
}
|
|
584
|
-
};
|
|
585
|
-
if (typeof this.el !== "object" || !this.el.nodeName) {
|
|
586
|
-
throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));
|
|
587
|
-
}
|
|
588
|
-
this.onMouseMove = throttle_default(this._onMouseMove, 64);
|
|
589
|
-
this.onWindowResize = debounce_default(this._onWindowResize, 64, { leading: true });
|
|
590
|
-
this.onStopScrolling = debounce_default(this._onStopScrolling, this.stopScrollDelay);
|
|
591
|
-
this.onMouseEntered = debounce_default(this._onMouseEntered, this.stopScrollDelay);
|
|
592
|
-
this.init();
|
|
593
|
-
}
|
|
594
|
-
SimpleBarCore2.getRtlHelpers = function() {
|
|
595
|
-
if (SimpleBarCore2.rtlHelpers) {
|
|
596
|
-
return SimpleBarCore2.rtlHelpers;
|
|
597
|
-
}
|
|
598
|
-
var dummyDiv = document.createElement("div");
|
|
599
|
-
dummyDiv.innerHTML = '<div class="simplebar-dummy-scrollbar-size"><div></div></div>';
|
|
600
|
-
var scrollbarDummyEl = dummyDiv.firstElementChild;
|
|
601
|
-
var dummyChild = scrollbarDummyEl === null || scrollbarDummyEl === void 0 ? void 0 : scrollbarDummyEl.firstElementChild;
|
|
602
|
-
if (!dummyChild)
|
|
603
|
-
return null;
|
|
604
|
-
document.body.appendChild(scrollbarDummyEl);
|
|
605
|
-
scrollbarDummyEl.scrollLeft = 0;
|
|
606
|
-
var dummyContainerOffset = SimpleBarCore2.getOffset(scrollbarDummyEl);
|
|
607
|
-
var dummyChildOffset = SimpleBarCore2.getOffset(dummyChild);
|
|
608
|
-
scrollbarDummyEl.scrollLeft = -999;
|
|
609
|
-
var dummyChildOffsetAfterScroll = SimpleBarCore2.getOffset(dummyChild);
|
|
610
|
-
document.body.removeChild(scrollbarDummyEl);
|
|
611
|
-
SimpleBarCore2.rtlHelpers = {
|
|
612
|
-
// determines if the scrolling is responding with negative values
|
|
613
|
-
isScrollOriginAtZero: dummyContainerOffset.left !== dummyChildOffset.left,
|
|
614
|
-
// determines if the origin scrollbar position is inverted or not (positioned on left or right)
|
|
615
|
-
isScrollingToNegative: dummyChildOffset.left !== dummyChildOffsetAfterScroll.left
|
|
616
|
-
};
|
|
617
|
-
return SimpleBarCore2.rtlHelpers;
|
|
618
|
-
};
|
|
619
|
-
SimpleBarCore2.prototype.getScrollbarWidth = function() {
|
|
620
|
-
try {
|
|
621
|
-
if (this.contentWrapperEl && getComputedStyle(this.contentWrapperEl, "::-webkit-scrollbar").display === "none" || "scrollbarWidth" in document.documentElement.style || "-ms-overflow-style" in document.documentElement.style) {
|
|
622
|
-
return 0;
|
|
623
|
-
} else {
|
|
624
|
-
return scrollbarWidth();
|
|
625
|
-
}
|
|
626
|
-
} catch (e) {
|
|
627
|
-
return scrollbarWidth();
|
|
628
|
-
}
|
|
629
|
-
};
|
|
630
|
-
SimpleBarCore2.getOffset = function(el) {
|
|
631
|
-
var rect = el.getBoundingClientRect();
|
|
632
|
-
var elDocument = getElementDocument(el);
|
|
633
|
-
var elWindow = getElementWindow(el);
|
|
634
|
-
return {
|
|
635
|
-
top: rect.top + (elWindow.pageYOffset || elDocument.documentElement.scrollTop),
|
|
636
|
-
left: rect.left + (elWindow.pageXOffset || elDocument.documentElement.scrollLeft)
|
|
637
|
-
};
|
|
638
|
-
};
|
|
639
|
-
SimpleBarCore2.prototype.init = function() {
|
|
640
|
-
if (canUseDOM) {
|
|
641
|
-
this.initDOM();
|
|
642
|
-
this.rtlHelpers = SimpleBarCore2.getRtlHelpers();
|
|
643
|
-
this.scrollbarWidth = this.getScrollbarWidth();
|
|
644
|
-
this.recalculate();
|
|
645
|
-
this.initListeners();
|
|
646
|
-
}
|
|
647
|
-
};
|
|
648
|
-
SimpleBarCore2.prototype.initDOM = function() {
|
|
649
|
-
var _a, _b;
|
|
650
|
-
this.wrapperEl = this.el.querySelector(classNamesToQuery(this.classNames.wrapper));
|
|
651
|
-
this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector(classNamesToQuery(this.classNames.contentWrapper));
|
|
652
|
-
this.contentEl = this.options.contentNode || this.el.querySelector(classNamesToQuery(this.classNames.contentEl));
|
|
653
|
-
this.offsetEl = this.el.querySelector(classNamesToQuery(this.classNames.offset));
|
|
654
|
-
this.maskEl = this.el.querySelector(classNamesToQuery(this.classNames.mask));
|
|
655
|
-
this.placeholderEl = this.findChild(this.wrapperEl, classNamesToQuery(this.classNames.placeholder));
|
|
656
|
-
this.heightAutoObserverWrapperEl = this.el.querySelector(classNamesToQuery(this.classNames.heightAutoObserverWrapperEl));
|
|
657
|
-
this.heightAutoObserverEl = this.el.querySelector(classNamesToQuery(this.classNames.heightAutoObserverEl));
|
|
658
|
-
this.axis.x.track.el = this.findChild(this.el, "".concat(classNamesToQuery(this.classNames.track)).concat(classNamesToQuery(this.classNames.horizontal)));
|
|
659
|
-
this.axis.y.track.el = this.findChild(this.el, "".concat(classNamesToQuery(this.classNames.track)).concat(classNamesToQuery(this.classNames.vertical)));
|
|
660
|
-
this.axis.x.scrollbar.el = ((_a = this.axis.x.track.el) === null || _a === void 0 ? void 0 : _a.querySelector(classNamesToQuery(this.classNames.scrollbar))) || null;
|
|
661
|
-
this.axis.y.scrollbar.el = ((_b = this.axis.y.track.el) === null || _b === void 0 ? void 0 : _b.querySelector(classNamesToQuery(this.classNames.scrollbar))) || null;
|
|
662
|
-
if (!this.options.autoHide) {
|
|
663
|
-
addClasses(this.axis.x.scrollbar.el, this.classNames.visible);
|
|
664
|
-
addClasses(this.axis.y.scrollbar.el, this.classNames.visible);
|
|
665
|
-
}
|
|
666
|
-
};
|
|
667
|
-
SimpleBarCore2.prototype.initListeners = function() {
|
|
668
|
-
var _this = this;
|
|
669
|
-
var _a;
|
|
670
|
-
var elWindow = getElementWindow(this.el);
|
|
671
|
-
this.el.addEventListener("mouseenter", this.onMouseEnter);
|
|
672
|
-
this.el.addEventListener("pointerdown", this.onPointerEvent, true);
|
|
673
|
-
this.el.addEventListener("mousemove", this.onMouseMove);
|
|
674
|
-
this.el.addEventListener("mouseleave", this.onMouseLeave);
|
|
675
|
-
(_a = this.contentWrapperEl) === null || _a === void 0 ? void 0 : _a.addEventListener("scroll", this.onScroll);
|
|
676
|
-
elWindow.addEventListener("resize", this.onWindowResize);
|
|
677
|
-
if (!this.contentEl)
|
|
678
|
-
return;
|
|
679
|
-
if (window.ResizeObserver) {
|
|
680
|
-
var resizeObserverStarted_1 = false;
|
|
681
|
-
var resizeObserver = elWindow.ResizeObserver || ResizeObserver;
|
|
682
|
-
this.resizeObserver = new resizeObserver(function() {
|
|
683
|
-
if (!resizeObserverStarted_1)
|
|
684
|
-
return;
|
|
685
|
-
elWindow.requestAnimationFrame(function() {
|
|
686
|
-
_this.recalculate();
|
|
687
|
-
});
|
|
688
|
-
});
|
|
689
|
-
this.resizeObserver.observe(this.el);
|
|
690
|
-
this.resizeObserver.observe(this.contentEl);
|
|
691
|
-
elWindow.requestAnimationFrame(function() {
|
|
692
|
-
resizeObserverStarted_1 = true;
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
this.mutationObserver = new elWindow.MutationObserver(function() {
|
|
696
|
-
elWindow.requestAnimationFrame(function() {
|
|
697
|
-
_this.recalculate();
|
|
698
|
-
});
|
|
699
|
-
});
|
|
700
|
-
this.mutationObserver.observe(this.contentEl, {
|
|
701
|
-
childList: true,
|
|
702
|
-
subtree: true,
|
|
703
|
-
characterData: true
|
|
704
|
-
});
|
|
705
|
-
};
|
|
706
|
-
SimpleBarCore2.prototype.recalculate = function() {
|
|
707
|
-
if (!this.heightAutoObserverEl || !this.contentEl || !this.contentWrapperEl || !this.wrapperEl || !this.placeholderEl)
|
|
708
|
-
return;
|
|
709
|
-
var elWindow = getElementWindow(this.el);
|
|
710
|
-
this.elStyles = elWindow.getComputedStyle(this.el);
|
|
711
|
-
this.isRtl = this.elStyles.direction === "rtl";
|
|
712
|
-
var contentElOffsetWidth = this.contentEl.offsetWidth;
|
|
713
|
-
var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
|
|
714
|
-
var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1 || contentElOffsetWidth > 0;
|
|
715
|
-
var contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
|
|
716
|
-
var elOverflowX = this.elStyles.overflowX;
|
|
717
|
-
var elOverflowY = this.elStyles.overflowY;
|
|
718
|
-
this.contentEl.style.padding = "".concat(this.elStyles.paddingTop, " ").concat(this.elStyles.paddingRight, " ").concat(this.elStyles.paddingBottom, " ").concat(this.elStyles.paddingLeft);
|
|
719
|
-
this.wrapperEl.style.margin = "-".concat(this.elStyles.paddingTop, " -").concat(this.elStyles.paddingRight, " -").concat(this.elStyles.paddingBottom, " -").concat(this.elStyles.paddingLeft);
|
|
720
|
-
var contentElScrollHeight = this.contentEl.scrollHeight;
|
|
721
|
-
var contentElScrollWidth = this.contentEl.scrollWidth;
|
|
722
|
-
this.contentWrapperEl.style.height = isHeightAuto ? "auto" : "100%";
|
|
723
|
-
this.placeholderEl.style.width = isWidthAuto ? "".concat(contentElOffsetWidth || contentElScrollWidth, "px") : "auto";
|
|
724
|
-
this.placeholderEl.style.height = "".concat(contentElScrollHeight, "px");
|
|
725
|
-
var contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
|
|
726
|
-
this.axis.x.isOverflowing = contentElOffsetWidth !== 0 && contentElScrollWidth > contentElOffsetWidth;
|
|
727
|
-
this.axis.y.isOverflowing = contentElScrollHeight > contentWrapperElOffsetHeight;
|
|
728
|
-
this.axis.x.isOverflowing = elOverflowX === "hidden" ? false : this.axis.x.isOverflowing;
|
|
729
|
-
this.axis.y.isOverflowing = elOverflowY === "hidden" ? false : this.axis.y.isOverflowing;
|
|
730
|
-
this.axis.x.forceVisible = this.options.forceVisible === "x" || this.options.forceVisible === true;
|
|
731
|
-
this.axis.y.forceVisible = this.options.forceVisible === "y" || this.options.forceVisible === true;
|
|
732
|
-
this.hideNativeScrollbar();
|
|
733
|
-
var offsetForXScrollbar = this.axis.x.isOverflowing ? this.scrollbarWidth : 0;
|
|
734
|
-
var offsetForYScrollbar = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
|
|
735
|
-
this.axis.x.isOverflowing = this.axis.x.isOverflowing && contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
|
|
736
|
-
this.axis.y.isOverflowing = this.axis.y.isOverflowing && contentElScrollHeight > contentWrapperElOffsetHeight - offsetForXScrollbar;
|
|
737
|
-
this.axis.x.scrollbar.size = this.getScrollbarSize("x");
|
|
738
|
-
this.axis.y.scrollbar.size = this.getScrollbarSize("y");
|
|
739
|
-
if (this.axis.x.scrollbar.el)
|
|
740
|
-
this.axis.x.scrollbar.el.style.width = "".concat(this.axis.x.scrollbar.size, "px");
|
|
741
|
-
if (this.axis.y.scrollbar.el)
|
|
742
|
-
this.axis.y.scrollbar.el.style.height = "".concat(this.axis.y.scrollbar.size, "px");
|
|
743
|
-
this.positionScrollbar("x");
|
|
744
|
-
this.positionScrollbar("y");
|
|
745
|
-
this.toggleTrackVisibility("x");
|
|
746
|
-
this.toggleTrackVisibility("y");
|
|
747
|
-
};
|
|
748
|
-
SimpleBarCore2.prototype.getScrollbarSize = function(axis) {
|
|
749
|
-
var _a, _b;
|
|
750
|
-
if (axis === void 0) {
|
|
751
|
-
axis = "y";
|
|
752
|
-
}
|
|
753
|
-
if (!this.axis[axis].isOverflowing || !this.contentEl) {
|
|
754
|
-
return 0;
|
|
755
|
-
}
|
|
756
|
-
var contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
|
|
757
|
-
var trackSize = (_b = (_a = this.axis[axis].track.el) === null || _a === void 0 ? void 0 : _a[this.axis[axis].offsetSizeAttr]) !== null && _b !== void 0 ? _b : 0;
|
|
758
|
-
var scrollbarRatio = trackSize / contentSize;
|
|
759
|
-
var scrollbarSize;
|
|
760
|
-
scrollbarSize = Math.max(~~(scrollbarRatio * trackSize), this.options.scrollbarMinSize);
|
|
761
|
-
if (this.options.scrollbarMaxSize) {
|
|
762
|
-
scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);
|
|
763
|
-
}
|
|
764
|
-
return scrollbarSize;
|
|
765
|
-
};
|
|
766
|
-
SimpleBarCore2.prototype.positionScrollbar = function(axis) {
|
|
767
|
-
var _a, _b, _c;
|
|
768
|
-
if (axis === void 0) {
|
|
769
|
-
axis = "y";
|
|
770
|
-
}
|
|
771
|
-
var scrollbar = this.axis[axis].scrollbar;
|
|
772
|
-
if (!this.axis[axis].isOverflowing || !this.contentWrapperEl || !scrollbar.el || !this.elStyles) {
|
|
773
|
-
return;
|
|
774
|
-
}
|
|
775
|
-
var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
|
|
776
|
-
var trackSize = ((_a = this.axis[axis].track.el) === null || _a === void 0 ? void 0 : _a[this.axis[axis].offsetSizeAttr]) || 0;
|
|
777
|
-
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
|
|
778
|
-
var scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
|
779
|
-
scrollOffset = axis === "x" && this.isRtl && ((_b = SimpleBarCore2.getRtlHelpers()) === null || _b === void 0 ? void 0 : _b.isScrollOriginAtZero) ? -scrollOffset : scrollOffset;
|
|
780
|
-
if (axis === "x" && this.isRtl) {
|
|
781
|
-
scrollOffset = ((_c = SimpleBarCore2.getRtlHelpers()) === null || _c === void 0 ? void 0 : _c.isScrollingToNegative) ? scrollOffset : -scrollOffset;
|
|
782
|
-
}
|
|
783
|
-
var scrollPourcent = scrollOffset / (contentSize - hostSize);
|
|
784
|
-
var handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);
|
|
785
|
-
handleOffset = axis === "x" && this.isRtl ? -handleOffset + (trackSize - scrollbar.size) : handleOffset;
|
|
786
|
-
scrollbar.el.style.transform = axis === "x" ? "translate3d(".concat(handleOffset, "px, 0, 0)") : "translate3d(0, ".concat(handleOffset, "px, 0)");
|
|
787
|
-
};
|
|
788
|
-
SimpleBarCore2.prototype.toggleTrackVisibility = function(axis) {
|
|
789
|
-
if (axis === void 0) {
|
|
790
|
-
axis = "y";
|
|
791
|
-
}
|
|
792
|
-
var track = this.axis[axis].track.el;
|
|
793
|
-
var scrollbar = this.axis[axis].scrollbar.el;
|
|
794
|
-
if (!track || !scrollbar || !this.contentWrapperEl)
|
|
795
|
-
return;
|
|
796
|
-
if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {
|
|
797
|
-
track.style.visibility = "visible";
|
|
798
|
-
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = "scroll";
|
|
799
|
-
this.el.classList.add("".concat(this.classNames.scrollable, "-").concat(axis));
|
|
800
|
-
} else {
|
|
801
|
-
track.style.visibility = "hidden";
|
|
802
|
-
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = "hidden";
|
|
803
|
-
this.el.classList.remove("".concat(this.classNames.scrollable, "-").concat(axis));
|
|
804
|
-
}
|
|
805
|
-
if (this.axis[axis].isOverflowing) {
|
|
806
|
-
scrollbar.style.display = "block";
|
|
807
|
-
} else {
|
|
808
|
-
scrollbar.style.display = "none";
|
|
809
|
-
}
|
|
810
|
-
};
|
|
811
|
-
SimpleBarCore2.prototype.showScrollbar = function(axis) {
|
|
812
|
-
if (axis === void 0) {
|
|
813
|
-
axis = "y";
|
|
814
|
-
}
|
|
815
|
-
if (this.axis[axis].isOverflowing && !this.axis[axis].scrollbar.isVisible) {
|
|
816
|
-
addClasses(this.axis[axis].scrollbar.el, this.classNames.visible);
|
|
817
|
-
this.axis[axis].scrollbar.isVisible = true;
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
SimpleBarCore2.prototype.hideScrollbar = function(axis) {
|
|
821
|
-
if (axis === void 0) {
|
|
822
|
-
axis = "y";
|
|
823
|
-
}
|
|
824
|
-
if (this.isDragging)
|
|
825
|
-
return;
|
|
826
|
-
if (this.axis[axis].isOverflowing && this.axis[axis].scrollbar.isVisible) {
|
|
827
|
-
removeClasses(this.axis[axis].scrollbar.el, this.classNames.visible);
|
|
828
|
-
this.axis[axis].scrollbar.isVisible = false;
|
|
829
|
-
}
|
|
830
|
-
};
|
|
831
|
-
SimpleBarCore2.prototype.hideNativeScrollbar = function() {
|
|
832
|
-
if (!this.offsetEl)
|
|
833
|
-
return;
|
|
834
|
-
this.offsetEl.style[this.isRtl ? "left" : "right"] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px";
|
|
835
|
-
this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px";
|
|
836
|
-
};
|
|
837
|
-
SimpleBarCore2.prototype.onMouseMoveForAxis = function(axis) {
|
|
838
|
-
if (axis === void 0) {
|
|
839
|
-
axis = "y";
|
|
840
|
-
}
|
|
841
|
-
var currentAxis = this.axis[axis];
|
|
842
|
-
if (!currentAxis.track.el || !currentAxis.scrollbar.el)
|
|
843
|
-
return;
|
|
844
|
-
currentAxis.track.rect = currentAxis.track.el.getBoundingClientRect();
|
|
845
|
-
currentAxis.scrollbar.rect = currentAxis.scrollbar.el.getBoundingClientRect();
|
|
846
|
-
if (this.isWithinBounds(currentAxis.track.rect)) {
|
|
847
|
-
this.showScrollbar(axis);
|
|
848
|
-
addClasses(currentAxis.track.el, this.classNames.hover);
|
|
849
|
-
if (this.isWithinBounds(currentAxis.scrollbar.rect)) {
|
|
850
|
-
addClasses(currentAxis.scrollbar.el, this.classNames.hover);
|
|
851
|
-
} else {
|
|
852
|
-
removeClasses(currentAxis.scrollbar.el, this.classNames.hover);
|
|
853
|
-
}
|
|
854
|
-
} else {
|
|
855
|
-
removeClasses(currentAxis.track.el, this.classNames.hover);
|
|
856
|
-
if (this.options.autoHide) {
|
|
857
|
-
this.hideScrollbar(axis);
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
};
|
|
861
|
-
SimpleBarCore2.prototype.onMouseLeaveForAxis = function(axis) {
|
|
862
|
-
if (axis === void 0) {
|
|
863
|
-
axis = "y";
|
|
864
|
-
}
|
|
865
|
-
removeClasses(this.axis[axis].track.el, this.classNames.hover);
|
|
866
|
-
removeClasses(this.axis[axis].scrollbar.el, this.classNames.hover);
|
|
867
|
-
if (this.options.autoHide) {
|
|
868
|
-
this.hideScrollbar(axis);
|
|
869
|
-
}
|
|
870
|
-
};
|
|
871
|
-
SimpleBarCore2.prototype.onDragStart = function(e, axis) {
|
|
872
|
-
var _a;
|
|
873
|
-
if (axis === void 0) {
|
|
874
|
-
axis = "y";
|
|
875
|
-
}
|
|
876
|
-
this.isDragging = true;
|
|
877
|
-
var elDocument = getElementDocument(this.el);
|
|
878
|
-
var elWindow = getElementWindow(this.el);
|
|
879
|
-
var scrollbar = this.axis[axis].scrollbar;
|
|
880
|
-
var eventOffset = axis === "y" ? e.pageY : e.pageX;
|
|
881
|
-
this.axis[axis].dragOffset = eventOffset - (((_a = scrollbar.rect) === null || _a === void 0 ? void 0 : _a[this.axis[axis].offsetAttr]) || 0);
|
|
882
|
-
this.draggedAxis = axis;
|
|
883
|
-
addClasses(this.el, this.classNames.dragging);
|
|
884
|
-
elDocument.addEventListener("mousemove", this.drag, true);
|
|
885
|
-
elDocument.addEventListener("mouseup", this.onEndDrag, true);
|
|
886
|
-
if (this.removePreventClickId === null) {
|
|
887
|
-
elDocument.addEventListener("click", this.preventClick, true);
|
|
888
|
-
elDocument.addEventListener("dblclick", this.preventClick, true);
|
|
889
|
-
} else {
|
|
890
|
-
elWindow.clearTimeout(this.removePreventClickId);
|
|
891
|
-
this.removePreventClickId = null;
|
|
892
|
-
}
|
|
893
|
-
};
|
|
894
|
-
SimpleBarCore2.prototype.onTrackClick = function(e, axis) {
|
|
895
|
-
var _this = this;
|
|
896
|
-
var _a, _b, _c, _d;
|
|
897
|
-
if (axis === void 0) {
|
|
898
|
-
axis = "y";
|
|
899
|
-
}
|
|
900
|
-
var currentAxis = this.axis[axis];
|
|
901
|
-
if (!this.options.clickOnTrack || !currentAxis.scrollbar.el || !this.contentWrapperEl)
|
|
902
|
-
return;
|
|
903
|
-
e.preventDefault();
|
|
904
|
-
var elWindow = getElementWindow(this.el);
|
|
905
|
-
this.axis[axis].scrollbar.rect = currentAxis.scrollbar.el.getBoundingClientRect();
|
|
906
|
-
var scrollbar = this.axis[axis].scrollbar;
|
|
907
|
-
var scrollbarOffset = (_b = (_a = scrollbar.rect) === null || _a === void 0 ? void 0 : _a[this.axis[axis].offsetAttr]) !== null && _b !== void 0 ? _b : 0;
|
|
908
|
-
var hostSize = parseInt((_d = (_c = this.elStyles) === null || _c === void 0 ? void 0 : _c[this.axis[axis].sizeAttr]) !== null && _d !== void 0 ? _d : "0px", 10);
|
|
909
|
-
var scrolled = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
|
910
|
-
var t = axis === "y" ? this.mouseY - scrollbarOffset : this.mouseX - scrollbarOffset;
|
|
911
|
-
var dir = t < 0 ? -1 : 1;
|
|
912
|
-
var scrollSize = dir === -1 ? scrolled - hostSize : scrolled + hostSize;
|
|
913
|
-
var speed = 40;
|
|
914
|
-
var scrollTo = function() {
|
|
915
|
-
if (!_this.contentWrapperEl)
|
|
916
|
-
return;
|
|
917
|
-
if (dir === -1) {
|
|
918
|
-
if (scrolled > scrollSize) {
|
|
919
|
-
scrolled -= speed;
|
|
920
|
-
_this.contentWrapperEl[_this.axis[axis].scrollOffsetAttr] = scrolled;
|
|
921
|
-
elWindow.requestAnimationFrame(scrollTo);
|
|
922
|
-
}
|
|
923
|
-
} else {
|
|
924
|
-
if (scrolled < scrollSize) {
|
|
925
|
-
scrolled += speed;
|
|
926
|
-
_this.contentWrapperEl[_this.axis[axis].scrollOffsetAttr] = scrolled;
|
|
927
|
-
elWindow.requestAnimationFrame(scrollTo);
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
};
|
|
931
|
-
scrollTo();
|
|
932
|
-
};
|
|
933
|
-
SimpleBarCore2.prototype.getContentElement = function() {
|
|
934
|
-
return this.contentEl;
|
|
935
|
-
};
|
|
936
|
-
SimpleBarCore2.prototype.getScrollElement = function() {
|
|
937
|
-
return this.contentWrapperEl;
|
|
938
|
-
};
|
|
939
|
-
SimpleBarCore2.prototype.removeListeners = function() {
|
|
940
|
-
var elWindow = getElementWindow(this.el);
|
|
941
|
-
this.el.removeEventListener("mouseenter", this.onMouseEnter);
|
|
942
|
-
this.el.removeEventListener("pointerdown", this.onPointerEvent, true);
|
|
943
|
-
this.el.removeEventListener("mousemove", this.onMouseMove);
|
|
944
|
-
this.el.removeEventListener("mouseleave", this.onMouseLeave);
|
|
945
|
-
if (this.contentWrapperEl) {
|
|
946
|
-
this.contentWrapperEl.removeEventListener("scroll", this.onScroll);
|
|
947
|
-
}
|
|
948
|
-
elWindow.removeEventListener("resize", this.onWindowResize);
|
|
949
|
-
if (this.mutationObserver) {
|
|
950
|
-
this.mutationObserver.disconnect();
|
|
951
|
-
}
|
|
952
|
-
if (this.resizeObserver) {
|
|
953
|
-
this.resizeObserver.disconnect();
|
|
954
|
-
}
|
|
955
|
-
this.onMouseMove.cancel();
|
|
956
|
-
this.onWindowResize.cancel();
|
|
957
|
-
this.onStopScrolling.cancel();
|
|
958
|
-
this.onMouseEntered.cancel();
|
|
959
|
-
};
|
|
960
|
-
SimpleBarCore2.prototype.unMount = function() {
|
|
961
|
-
this.removeListeners();
|
|
962
|
-
};
|
|
963
|
-
SimpleBarCore2.prototype.isWithinBounds = function(bbox) {
|
|
964
|
-
return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
|
|
965
|
-
};
|
|
966
|
-
SimpleBarCore2.prototype.findChild = function(el, query) {
|
|
967
|
-
var matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
|
|
968
|
-
return Array.prototype.filter.call(el.children, function(child) {
|
|
969
|
-
return matches.call(child, query);
|
|
970
|
-
})[0];
|
|
971
|
-
};
|
|
972
|
-
SimpleBarCore2.rtlHelpers = null;
|
|
973
|
-
SimpleBarCore2.defaultOptions = {
|
|
974
|
-
forceVisible: false,
|
|
975
|
-
clickOnTrack: true,
|
|
976
|
-
scrollbarMinSize: 25,
|
|
977
|
-
scrollbarMaxSize: 0,
|
|
978
|
-
ariaLabel: "scrollable content",
|
|
979
|
-
tabIndex: 0,
|
|
980
|
-
classNames: {
|
|
981
|
-
contentEl: "simplebar-content",
|
|
982
|
-
contentWrapper: "simplebar-content-wrapper",
|
|
983
|
-
offset: "simplebar-offset",
|
|
984
|
-
mask: "simplebar-mask",
|
|
985
|
-
wrapper: "simplebar-wrapper",
|
|
986
|
-
placeholder: "simplebar-placeholder",
|
|
987
|
-
scrollbar: "simplebar-scrollbar",
|
|
988
|
-
track: "simplebar-track",
|
|
989
|
-
heightAutoObserverWrapperEl: "simplebar-height-auto-observer-wrapper",
|
|
990
|
-
heightAutoObserverEl: "simplebar-height-auto-observer",
|
|
991
|
-
visible: "simplebar-visible",
|
|
992
|
-
horizontal: "simplebar-horizontal",
|
|
993
|
-
vertical: "simplebar-vertical",
|
|
994
|
-
hover: "simplebar-hover",
|
|
995
|
-
dragging: "simplebar-dragging",
|
|
996
|
-
scrolling: "simplebar-scrolling",
|
|
997
|
-
scrollable: "simplebar-scrollable",
|
|
998
|
-
mouseEntered: "simplebar-mouse-entered"
|
|
999
|
-
},
|
|
1000
|
-
scrollableNode: null,
|
|
1001
|
-
contentNode: null,
|
|
1002
|
-
autoHide: true
|
|
1003
|
-
};
|
|
1004
|
-
SimpleBarCore2.getOptions = getOptions;
|
|
1005
|
-
SimpleBarCore2.helpers = helpers;
|
|
1006
|
-
return SimpleBarCore2;
|
|
1007
|
-
})()
|
|
1008
|
-
);
|
|
1009
|
-
|
|
1010
|
-
// ../../node_modules/.pnpm/simplebar-react@3.3.2_react@19.2.8/node_modules/simplebar-react/dist/index.mjs
|
|
1011
|
-
var __assign2 = function() {
|
|
1012
|
-
__assign2 = Object.assign || function __assign3(t) {
|
|
1013
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1014
|
-
s = arguments[i];
|
|
1015
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
1016
|
-
}
|
|
1017
|
-
return t;
|
|
1018
|
-
};
|
|
1019
|
-
return __assign2.apply(this, arguments);
|
|
1020
|
-
};
|
|
1021
|
-
function __rest(s, e) {
|
|
1022
|
-
var t = {};
|
|
1023
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1024
|
-
t[p] = s[p];
|
|
1025
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1026
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1027
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1028
|
-
t[p[i]] = s[p[i]];
|
|
1029
|
-
}
|
|
1030
|
-
return t;
|
|
1031
|
-
}
|
|
1032
|
-
var SimpleBar = React.forwardRef(function(_a, ref) {
|
|
1033
|
-
var children = _a.children, _b = _a.scrollableNodeProps, scrollableNodeProps = _b === void 0 ? {} : _b, otherProps = __rest(_a, ["children", "scrollableNodeProps"]);
|
|
1034
|
-
var elRef = React.useRef();
|
|
1035
|
-
var scrollableNodeRef = React.useRef();
|
|
1036
|
-
var contentNodeRef = React.useRef();
|
|
1037
|
-
var options = {};
|
|
1038
|
-
var rest = {};
|
|
1039
|
-
Object.keys(otherProps).forEach(function(key) {
|
|
1040
|
-
if (Object.prototype.hasOwnProperty.call(SimpleBarCore.defaultOptions, key)) {
|
|
1041
|
-
options[key] = otherProps[key];
|
|
1042
|
-
} else {
|
|
1043
|
-
rest[key] = otherProps[key];
|
|
1044
|
-
}
|
|
1045
|
-
});
|
|
1046
|
-
var classNames = __assign2(__assign2({}, SimpleBarCore.defaultOptions.classNames), options.classNames);
|
|
1047
|
-
var scrollableNodeFullProps = __assign2(__assign2({}, scrollableNodeProps), { className: "".concat(classNames.contentWrapper).concat(scrollableNodeProps.className ? " ".concat(scrollableNodeProps.className) : ""), tabIndex: options.tabIndex || SimpleBarCore.defaultOptions.tabIndex, role: "region", "aria-label": options.ariaLabel || SimpleBarCore.defaultOptions.ariaLabel });
|
|
1048
|
-
React.useEffect(function() {
|
|
1049
|
-
var instance;
|
|
1050
|
-
scrollableNodeRef.current = scrollableNodeFullProps.ref ? scrollableNodeFullProps.ref.current : scrollableNodeRef.current;
|
|
1051
|
-
if (elRef.current) {
|
|
1052
|
-
instance = new SimpleBarCore(elRef.current, __assign2(__assign2(__assign2({}, options), scrollableNodeRef.current && {
|
|
1053
|
-
scrollableNode: scrollableNodeRef.current
|
|
1054
|
-
}), contentNodeRef.current && {
|
|
1055
|
-
contentNode: contentNodeRef.current
|
|
1056
|
-
}));
|
|
1057
|
-
if (typeof ref === "function") {
|
|
1058
|
-
ref(instance);
|
|
1059
|
-
} else if (ref) {
|
|
1060
|
-
ref.current = instance;
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
return function() {
|
|
1064
|
-
instance === null || instance === void 0 ? void 0 : instance.unMount();
|
|
1065
|
-
instance = null;
|
|
1066
|
-
if (typeof ref === "function") {
|
|
1067
|
-
ref(null);
|
|
1068
|
-
}
|
|
1069
|
-
};
|
|
1070
|
-
}, []);
|
|
1071
|
-
return React.createElement(
|
|
1072
|
-
"div",
|
|
1073
|
-
__assign2({ "data-simplebar": "init", ref: elRef }, rest),
|
|
1074
|
-
React.createElement(
|
|
1075
|
-
"div",
|
|
1076
|
-
{ className: classNames.wrapper },
|
|
1077
|
-
React.createElement(
|
|
1078
|
-
"div",
|
|
1079
|
-
{ className: classNames.heightAutoObserverWrapperEl },
|
|
1080
|
-
React.createElement("div", { className: classNames.heightAutoObserverEl })
|
|
1081
|
-
),
|
|
1082
|
-
React.createElement(
|
|
1083
|
-
"div",
|
|
1084
|
-
{ className: classNames.mask },
|
|
1085
|
-
React.createElement("div", { className: classNames.offset }, typeof children === "function" ? children({
|
|
1086
|
-
scrollableNodeRef,
|
|
1087
|
-
scrollableNodeProps: __assign2(__assign2({}, scrollableNodeFullProps), { ref: scrollableNodeRef }),
|
|
1088
|
-
contentNodeRef,
|
|
1089
|
-
contentNodeProps: {
|
|
1090
|
-
className: classNames.contentEl,
|
|
1091
|
-
ref: contentNodeRef
|
|
1092
|
-
}
|
|
1093
|
-
}) : React.createElement(
|
|
1094
|
-
"div",
|
|
1095
|
-
__assign2({}, scrollableNodeFullProps),
|
|
1096
|
-
React.createElement("div", { className: classNames.contentEl }, children)
|
|
1097
|
-
))
|
|
1098
|
-
),
|
|
1099
|
-
React.createElement("div", { className: classNames.placeholder })
|
|
1100
|
-
),
|
|
1101
|
-
React.createElement(
|
|
1102
|
-
"div",
|
|
1103
|
-
{ className: "".concat(classNames.track, " ").concat(classNames.horizontal) },
|
|
1104
|
-
React.createElement("div", { className: classNames.scrollbar })
|
|
1105
|
-
),
|
|
1106
|
-
React.createElement(
|
|
1107
|
-
"div",
|
|
1108
|
-
{ className: "".concat(classNames.track, " ").concat(classNames.vertical) },
|
|
1109
|
-
React.createElement("div", { className: classNames.scrollbar })
|
|
1110
|
-
)
|
|
1111
|
-
);
|
|
1112
|
-
});
|
|
1113
|
-
SimpleBar.displayName = "SimpleBar";
|
|
1114
|
-
|
|
1115
|
-
// shell/.ojm-shim-simplebar-react.mjs
|
|
1116
|
-
var ojm_shim_simplebar_react_default = SimpleBar ?? dist_exports;
|
|
1117
|
-
export {
|
|
1118
|
-
ojm_shim_simplebar_react_default as default
|
|
1119
|
-
};
|