jobsys-explore 4.0.4 → 4.0.6
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/.changeset/perfect-laws-warn.md +5 -0
- package/.changeset/quiet-chairs-rhyme.md +5 -0
- package/CHANGELOG.md +21 -0
- package/components/form/ExAddress.jsx +13 -2
- package/components/form/ExCascader.jsx +9 -2
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +19 -18
- package/dist/index-e25b2495.cjs +2 -0
- package/dist/index-e25b2495.cjs.map +1 -0
- package/dist/{index-a53a1d2f.js → index-f11fba00.js} +319 -307
- package/dist/index-f11fba00.js.map +1 -0
- package/dist/jobsys-explore.cjs +6 -6
- package/dist/jobsys-explore.cjs.map +1 -1
- package/dist/jobsys-explore.js +763 -758
- package/dist/jobsys-explore.js.map +1 -1
- package/hooks/utils.js +16 -1
- package/package.json +1 -1
- package/playground/TestForm.vue +3 -0
- package/dist/index-56b010bd.cjs +0 -2
- package/dist/index-56b010bd.cjs.map +0 -1
- package/dist/index-a53a1d2f.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# jobsys-explore
|
|
2
2
|
|
|
3
|
+
## 4.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- address
|
|
8
|
+
- add exPros parameter
|
|
9
|
+
- fixed textInValue
|
|
10
|
+
- fixed textInValue
|
|
11
|
+
- add key_cn
|
|
12
|
+
- e
|
|
13
|
+
|
|
14
|
+
## 4.0.5
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- address
|
|
19
|
+
- add exPros parameter
|
|
20
|
+
- fixed textInValue
|
|
21
|
+
- add key_cn
|
|
22
|
+
- e
|
|
23
|
+
|
|
3
24
|
## 4.0.4
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -72,17 +72,27 @@ export default defineComponent({
|
|
|
72
72
|
|
|
73
73
|
const pickerRef = ref(null)
|
|
74
74
|
const options = ref([])
|
|
75
|
+
const hasChange = ref(false)
|
|
75
76
|
|
|
76
77
|
const displayText = computed(() => {
|
|
77
78
|
if (props.modelValue.length === 0) {
|
|
78
79
|
return ""
|
|
79
80
|
}
|
|
80
|
-
const
|
|
81
|
+
const displayTextType = props.displayTextType || defaultDisplayTextType
|
|
82
|
+
|
|
83
|
+
//textInValue状态下的初始值
|
|
84
|
+
if (!hasChange.value && props.textInValue && props.modelValue) {
|
|
85
|
+
return displayTextType === "last" ? last(props.modelValue)[textKey] : props.modelValue.map((item) => item[textKey]).join("/")
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//反向赋值
|
|
89
|
+
const mValue = props.textInValue ? props.modelValue.map((item) => item[valueKey]) : props.modelValue
|
|
90
|
+
const optionsTexts = useFindTextsFromPath(options.value, mValue, {
|
|
81
91
|
value: valueKey,
|
|
82
92
|
children: childrenKey,
|
|
83
93
|
label: textKey,
|
|
84
94
|
})
|
|
85
|
-
|
|
95
|
+
|
|
86
96
|
return displayTextType === "last" ? last(optionsTexts) : optionsTexts.join("/")
|
|
87
97
|
})
|
|
88
98
|
|
|
@@ -109,6 +119,7 @@ export default defineComponent({
|
|
|
109
119
|
|
|
110
120
|
const onFinish = ({ selectedOptions }) => {
|
|
111
121
|
pickerRef.value.close()
|
|
122
|
+
hasChange.value = true
|
|
112
123
|
emit("update:modelValue", props.textInValue ? selectedOptions : selectedOptions.map((item) => item[valueKey]))
|
|
113
124
|
}
|
|
114
125
|
|
|
@@ -60,7 +60,7 @@ export default defineComponent({
|
|
|
60
60
|
|
|
61
61
|
const options = ref([]) //整理后的原始 Options
|
|
62
62
|
const shownOptions = ref([]) //根据 keyword 过滤后的 Options
|
|
63
|
-
|
|
63
|
+
const hasChange = ref(false)
|
|
64
64
|
const keyword = ref("")
|
|
65
65
|
|
|
66
66
|
//先处理好 options
|
|
@@ -113,12 +113,19 @@ export default defineComponent({
|
|
|
113
113
|
if (props.modelValue.length === 0) {
|
|
114
114
|
return ""
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
//textInValue状态下的初始值
|
|
117
|
+
if (!hasChange.value && props.textInValue && props.modelValue) {
|
|
118
|
+
return props.displayTextType === "last" ? last(props.modelValue).text : props.modelValue.map((item) => item.text).join("/")
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const mValue = props.textInValue ? props.modelValue.map((item) => item.value) : props.modelValue
|
|
122
|
+
const optionsTexts = useFindTextsFromPath(options.value, mValue)
|
|
117
123
|
return props.displayTextType === "last" ? last(optionsTexts) : optionsTexts.join("/")
|
|
118
124
|
})
|
|
119
125
|
|
|
120
126
|
const onFinish = ({ selectedOptions }) => {
|
|
121
127
|
const value = props.textInValue ? selectedOptions : selectedOptions.map((item) => item.value)
|
|
128
|
+
hasChange.value = true
|
|
122
129
|
emit("change", value)
|
|
123
130
|
emit("update:modelValue", value)
|
|
124
131
|
pickerRef.value.close()
|
package/dist/hooks.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-e25b2495.cjs"),r=require("dayjs"),o=require("lodash-es");require("axios");require("vant");function i(){return s.sm2_exports}function c(e,u){return s.sm32(e,u)}function a(e,u,n){return s.sm4_exports.encrypt(e,u,n)}function F(e,u,n){return s.sm4_exports.encrypt(e,u,n)}function m(e,u){return u?r(e,u):r(e)}function t(e,u){return e?(r.isDayjs(e)||(e=r(e)),e.format(u||"YYYY-MM-DD HH:mm")):""}function S(e){return e?(r.isDayjs(e)||(e=r(e)),e.unix()):""}function f(e,u){return e&&o.isString(e)&&(e=parseInt(e)),e<9999999999&&(e*=1e3),t(new Date(e),u)}exports.STATUS=s.STATUS;exports._configStatus=s._configStatus;exports.useCache=s.useCache;exports.useFetch=s.useFetch;exports.useFindLabelsFromPath=s.useFindLabelsFromPath;exports.useFindParentValues=s.useFindParentValues;exports.useFindTextsFromPath=s.useFindTextsFromPath;exports.useFindTextsInValues=s.useFindTextsInValues;exports.useFormFail=s.useFormFail;exports.useFormFormat=s.useFormFormat;exports.useHiddenForm=s.useHiddenForm;exports.useProcessStatus=s.useProcessStatus;exports.useProcessStatusSuccess=s.useProcessStatusSuccess;exports.useTextFromOptionsValue=s.useTextFromOptionsValue;exports.useDateFormat=t;exports.useDateUnix=S;exports.useDayjs=m;exports.useSm2=i;exports.useSm3=c;exports.useSm4Decrypt=F;exports.useSm4Encrypt=a;exports.useTimestampFormat=f;
|
|
2
2
|
//# sourceMappingURL=hooks.cjs.map
|
package/dist/hooks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as o, e as t, f as
|
|
2
|
-
import { S as Y, _,
|
|
1
|
+
import { s as o, e as t, f as n } from "./index-f11fba00.js";
|
|
2
|
+
import { S as Y, _, k as g, u as H, i as V, j as b, a as I, h as M, d as U, c as k, l as w, m as A, b as C, g as E } from "./index-f11fba00.js";
|
|
3
3
|
import u from "dayjs";
|
|
4
4
|
import { isString as i } from "lodash-es";
|
|
5
5
|
import "axios";
|
|
@@ -10,11 +10,11 @@ function p() {
|
|
|
10
10
|
function x(s, r) {
|
|
11
11
|
return t(s, r);
|
|
12
12
|
}
|
|
13
|
-
function D(s, r,
|
|
14
|
-
return
|
|
13
|
+
function D(s, r, e) {
|
|
14
|
+
return n.encrypt(s, r, e);
|
|
15
15
|
}
|
|
16
|
-
function y(s, r,
|
|
17
|
-
return
|
|
16
|
+
function y(s, r, e) {
|
|
17
|
+
return n.encrypt(s, r, e);
|
|
18
18
|
}
|
|
19
19
|
function l(s, r) {
|
|
20
20
|
return r ? u(s, r) : u(s);
|
|
@@ -25,30 +25,31 @@ function a(s, r) {
|
|
|
25
25
|
function T(s) {
|
|
26
26
|
return s ? (u.isDayjs(s) || (s = u(s)), s.unix()) : "";
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function h(s, r) {
|
|
29
29
|
return s && i(s) && (s = parseInt(s)), s < 9999999999 && (s *= 1e3), a(new Date(s), r);
|
|
30
30
|
}
|
|
31
31
|
export {
|
|
32
32
|
Y as STATUS,
|
|
33
33
|
_ as _configStatus,
|
|
34
|
+
g as useCache,
|
|
34
35
|
a as useDateFormat,
|
|
35
36
|
T as useDateUnix,
|
|
36
37
|
l as useDayjs,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
H as useFetch,
|
|
39
|
+
V as useFindLabelsFromPath,
|
|
40
|
+
b as useFindParentValues,
|
|
41
|
+
I as useFindTextsFromPath,
|
|
42
|
+
M as useFindTextsInValues,
|
|
43
|
+
U as useFormFail,
|
|
44
|
+
k as useFormFormat,
|
|
45
|
+
w as useHiddenForm,
|
|
46
|
+
A as useProcessStatus,
|
|
47
|
+
C as useProcessStatusSuccess,
|
|
47
48
|
p as useSm2,
|
|
48
49
|
x as useSm3,
|
|
49
50
|
y as useSm4Decrypt,
|
|
50
51
|
D as useSm4Encrypt,
|
|
51
52
|
E as useTextFromOptionsValue,
|
|
52
|
-
|
|
53
|
+
h as useTimestampFormat
|
|
53
54
|
};
|
|
54
55
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var $e=Object.defineProperty;var ke=(t,n,e)=>n in t?$e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var N=(t,n,e)=>(ke(t,typeof n!="symbol"?n+"":n,e),e);const V=require("lodash-es"),le=require("axios"),X=require("vant"),ue=require("dayjs"),at={STATE_CODE_SUCCESS:"SUCCESS",STATE_CODE_FAIL:"FAIL",STATE_CODE_NOT_FOUND:"NOT_FOUND",STATE_CODE_INFO_NOT_COMPLETE:"INCOMPLETE",STATE_CODE_NOT_ALLOWED:"NOT_ALLOWED"};function Ze(t){Object.keys(t).forEach(n=>{at[n]=t[n]})}function De(t){let n=null;return t||(t={}),t.loading=!0,{get(e,o){return new Promise((r,s)=>{le.get(e,o).then(l=>{r(l)}).catch(l=>{s(l)}).finally(()=>{n&&(X.allowMultipleToast(!1),n.close()),t.loading=!1})})},post(e,o,r){return new Promise((s,l)=>{le.post(e,o,r).then(i=>{s(i)}).catch(i=>{l(i)}).finally(()=>{n&&(X.allowMultipleToast(!1),n.close()),t.loading=!1})})},loading(e){return X.closeToast(!0),X.allowMultipleToast(),V.isString(e)?n=X.showLoadingToast({message:e||"加载中...",duration:0,forbidClick:!0}):V.isObject(e)?n=X.showLoadingToast({duration:0,...e}):n=X.showLoadingToast({message:"加载中...",duration:0,forbidClick:!0}),this}}}function Ke(t,n){if(!n)return"";const e=n.find(o=>o.value===t);return e?e.text:""}function ze(t,n,e){e=e||{value:"value",label:"text",children:"children"};const o=[];function r(s){var l;n.includes(s[e.value])&&o.push(s[e.label]),(l=s[e.children])!=null&&l.length&&s[e.children].forEach(i=>{r(i)})}return t.forEach(s=>{r(s)}),o}function be(t,n,e){e=e||{value:"value",label:"text",children:"children"};let o=[];return V.reduce(n,(r,s)=>{const l=V.find(r,{[e.value]:s});if(l)return o.push(l[e.label]),l[e.children]},t),o}function je(t,n,e){return e=e||{value:"value",label:"text",children:"children"},be(t,n,e)}function Ye(t,n,e){e=e||{value:"value",label:"text",children:"children"};const o=[];function r(s,l,i){for(const c of s)if(c[e.value]===l){i.unshift(c[e.value]);break}else if(c[e.children]&&r(c[e.children],l,i).length>0){i.unshift(c[e.value]);break}return i}return r(t,n,o)}const Ct={};function Me(t){return V.isUndefined(Ct[t])&&(Ct[t]=null),{get(n){return Ct[t]||n},set(n){Ct[t]=n}}}function Ge(t){const{url:n,data:e,csrfToken:o}=t;let{method:r}=t;r=r||"post";const s=document.createElement("form");if(s.action=n,s.method=r,s.target="_blank",s.style.display="none",Object.keys(e).forEach(l=>{const i=document.createElement("input");i.type="hidden",i.name=l,i.value=e[l],s.appendChild(i)}),!o){const l=document.createElement("input");l.type="hidden",l.name="_token",l.value=document.querySelector('meta[name="csrf-token"]').getAttribute("content"),s.appendChild(l)}return document.body.appendChild(s),s}function ve(t,n){const{status:e}=t,o=t.result,r={};r.default="请求失败, 请检查数据并重试",r[at.STATE_CODE_FAIL]="系统错误,请稍候再试",r[at.STATE_CODE_NOT_FOUND]="请求的内容不存在",r[at.STATE_CODE_INFO_NOT_COMPLETE]="信息不完整",r[at.STATE_CODE_NOT_ALLOWED]="没有权限";const s={[at.STATE_CODE_SUCCESS]:"success"},l=n[e]||n[s[e]]||r[e]||r.default;V.isString(l)?e===at.STATE_CODE_SUCCESS?X.showSuccessToast(l):X.showFailToast(o||l):V.isFunction(l)&&l()}function We(t,n){ve(t,{success:n})}function Qe(t){t&&t.errorFields?t.errorFields.forEach(n=>{X.showFailToast(n.errors.join(" "))}):t&&t.response?X.showFailToast("网络异常"):X.showFailToast("请检查填写项")}function Xe(t,n){const e=V.cloneDeep(t);n=n||{};const o=r=>{var s,l;for(let i in r){let c;if(ue.isDayjs(r[i])?c=r[i]:Object.prototype.toString.call(r[i])==="[object Date]"&&(c=ue(r[i])),c&&n.date){V.isString(n.date)?r[i]=c.format(n.date):V.isFunction(n.date)?r[i]=n.date(c):r[i]=r[i].unix();continue}if(V.isBoolean(r[i])&&n.boolean){n.boolean===!0?r[i]=r[i]?1:0:Array.isArray(n.boolean)&&(r[i]=r[i]?((s=n.boolean)==null?void 0:s[0])||1:((l=n.boolean)==null?void 0:l[1])||0);continue}if(n.attachment){const u=n.attachment;if(V.isObject(r[i])&&V.isString(u)&&!V.isUndefined(r[i][u])){r[i]=r[i][u];continue}else if(V.isObject(r[i])&&V.isFunction(u)){r[i]=u(r[i]);continue}}if(V.isArray(r[i]))for(let u in r[i])r[i][u]=o(r[i][u])}return r};return o(e)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xe=BigInt(0),Rt=BigInt(1),Je=BigInt(2),Vt=t=>t instanceof Uint8Array,tn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function ot(t){if(!Vt(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=tn[t[e]];return n}function $(t){const n=t.toString(16);return n.length&1?`0${n}`:n}function _(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function At(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const n=t.length;if(n%2)throw new Error("padded hex string expected, got unpadded hex of length "+n);const e=new Uint8Array(n/2);for(let o=0;o<e.length;o++){const r=o*2,s=t.slice(r,r+2),l=Number.parseInt(s,16);if(Number.isNaN(l)||l<0)throw new Error("Invalid byte sequence");e[o]=l}return e}function mt(t){return _(ot(t))}function Mt(t){if(!Vt(t))throw new Error("Uint8Array expected");return _(ot(Uint8Array.from(t).reverse()))}function Et(t,n){return At(t.toString(16).padStart(n*2,"0"))}function Se(t,n){return Et(t,n).reverse()}function en(t){return At($(t))}function G(t,n,e){let o;if(typeof n=="string")try{o=At(n)}catch(s){throw new Error(`${t} must be valid hex string, got "${n}". Cause: ${s}`)}else if(Vt(n))o=Uint8Array.from(n);else throw new Error(`${t} must be hex string or Uint8Array`);const r=o.length;if(typeof e=="number"&&r!==e)throw new Error(`${t} expected ${e} bytes, got ${r}`);return o}function Y(...t){const n=new Uint8Array(t.reduce((o,r)=>o+r.length,0));let e=0;return t.forEach(o=>{if(!Vt(o))throw new Error("Uint8Array expected");n.set(o,e),e+=o.length}),n}function nn(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}function rn(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function on(t){let n;for(n=0;t>xe;t>>=Rt,n+=1);return n}function sn(t,n){return t>>BigInt(n)&Rt}const cn=(t,n,e)=>t|(e?Rt:xe)<<BigInt(n),Gt=t=>(Je<<BigInt(t-1))-Rt,kt=t=>new Uint8Array(t),fe=t=>Uint8Array.from(t);function Be(t,n,e){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof n!="number"||n<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let o=kt(t),r=kt(t),s=0;const l=()=>{o.fill(1),r.fill(0),s=0},i=(...f)=>e(r,o,...f),c=(f=kt())=>{r=i(fe([0]),f),o=i(),f.length!==0&&(r=i(fe([1]),f),o=i())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const m=[];for(;f<n;){o=i();const b=o.slice();m.push(b),f+=o.length}return Y(...m)};return(f,m)=>{l(),c(f);let b;for(;!(b=m(u()));)c();return l(),b}}const ln={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,n)=>n.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function Ut(t,n,e={}){const o=(r,s,l)=>{const i=ln[s];if(typeof i!="function")throw new Error(`Invalid validator "${s}", expected function`);const c=t[r];if(!(l&&c===void 0)&&!i(c,t))throw new Error(`Invalid param ${String(r)}=${c} (${typeof c}), expected ${s}`)};for(const[r,s]of Object.entries(n))o(r,s,!1);for(const[r,s]of Object.entries(e))o(r,s,!0);return t}const un=Object.freeze(Object.defineProperty({__proto__:null,bitGet:sn,bitLen:on,bitMask:Gt,bitSet:cn,bytesToHex:ot,bytesToNumberBE:mt,bytesToNumberLE:Mt,concatBytes:Y,createHmacDrbg:Be,ensureBytes:G,equalBytes:nn,hexToBytes:At,hexToNumber:_,numberToBytesBE:Et,numberToBytesLE:Se,numberToHexUnpadded:$,numberToVarBytesBE:en,utf8ToBytes:rn,validateObject:Ut},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const F=BigInt(0),H=BigInt(1),wt=BigInt(2),fn=BigInt(3),jt=BigInt(4),ae=BigInt(5),he=BigInt(8);BigInt(9);BigInt(16);function Z(t,n){const e=t%n;return e>=F?e:n+e}function an(t,n,e){if(e<=F||n<F)throw new Error("Expected power/modulo > 0");if(e===H)return F;let o=H;for(;n>F;)n&H&&(o=o*t%e),t=t*t%e,n>>=H;return o}function Yt(t,n){if(t===F||n<=F)throw new Error(`invert: expected positive integers, got n=${t} mod=${n}`);let e=Z(t,n),o=n,r=F,s=H;for(;e!==F;){const i=o/e,c=o%e,u=r-s*i;o=e,e=c,r=s,s=u}if(o!==H)throw new Error("invert: does not exist");return Z(r,n)}function hn(t){const n=(t-H)/wt;let e,o,r;for(e=t-H,o=0;e%wt===F;e/=wt,o++);for(r=wt;r<t&&an(r,n,t)!==t-H;r++);if(o===1){const l=(t+H)/jt;return function(c,u){const h=c.pow(u,l);if(!c.eql(c.sqr(h),u))throw new Error("Cannot find square root");return h}}const s=(e+H)/wt;return function(i,c){if(i.pow(c,n)===i.neg(i.ONE))throw new Error("Cannot find square root");let u=o,h=i.pow(i.mul(i.ONE,r),e),f=i.pow(c,s),m=i.pow(c,e);for(;!i.eql(m,i.ONE);){if(i.eql(m,i.ZERO))return i.ZERO;let b=1;for(let a=i.sqr(m);b<u&&!i.eql(a,i.ONE);b++)a=i.sqr(a);const g=i.pow(h,H<<BigInt(u-b-1));h=i.sqr(g),f=i.mul(f,g),m=i.mul(m,h),u=b}return f}}function dn(t){if(t%jt===fn){const n=(t+H)/jt;return function(o,r){const s=o.pow(r,n);if(!o.eql(o.sqr(s),r))throw new Error("Cannot find square root");return s}}if(t%he===ae){const n=(t-ae)/he;return function(o,r){const s=o.mul(r,wt),l=o.pow(s,n),i=o.mul(r,l),c=o.mul(o.mul(i,wt),l),u=o.mul(i,o.sub(c,o.ONE));if(!o.eql(o.sqr(u),r))throw new Error("Cannot find square root");return u}}return hn(t)}const gn=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function wn(t){const n={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=gn.reduce((o,r)=>(o[r]="function",o),n);return Ut(t,e)}function yn(t,n,e){if(e<F)throw new Error("Expected power > 0");if(e===F)return t.ONE;if(e===H)return n;let o=t.ONE,r=n;for(;e>F;)e&H&&(o=t.mul(o,r)),r=t.sqr(r),e>>=H;return o}function pn(t,n){const e=new Array(n.length),o=n.reduce((s,l,i)=>t.is0(l)?s:(e[i]=s,t.mul(s,l)),t.ONE),r=t.inv(o);return n.reduceRight((s,l,i)=>t.is0(l)?s:(e[i]=t.mul(s,e[i]),t.mul(s,l)),r),e}function Wt(t,n){const e=n!==void 0?n:t.toString(2).length,o=Math.ceil(e/8);return{nBitLength:e,nByteLength:o}}function Ae(t,n,e=!1,o={}){if(t<=F)throw new Error(`Expected Fp ORDER > 0, got ${t}`);const{nBitLength:r,nByteLength:s}=Wt(t,n);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const l=dn(t),i=Object.freeze({ORDER:t,BITS:r,BYTES:s,MASK:Gt(r),ZERO:F,ONE:H,create:c=>Z(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return F<=c&&c<t},is0:c=>c===F,isOdd:c=>(c&H)===H,neg:c=>Z(-c,t),eql:(c,u)=>c===u,sqr:c=>Z(c*c,t),add:(c,u)=>Z(c+u,t),sub:(c,u)=>Z(c-u,t),mul:(c,u)=>Z(c*u,t),pow:(c,u)=>yn(i,c,u),div:(c,u)=>Z(c*Yt(u,t),t),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>Yt(c,t),sqrt:o.sqrt||(c=>l(i,c)),invertBatch:c=>pn(i,c),cmov:(c,u,h)=>h?u:c,toBytes:c=>e?Se(c,s):Et(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return e?Mt(c):mt(c)}});return Object.freeze(i)}function mn(t,n,e=!1){t=G("privateHash",t);const o=t.length,r=Wt(n).nByteLength+8;if(r<24||o<r||o>1024)throw new Error(`hashToPrivateScalar: expected ${r}-1024 bytes of input, got ${o}`);const s=e?Mt(t):mt(t);return Z(s,n-H)+H}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const En=BigInt(0),Zt=BigInt(1);function bn(t,n){const e=(r,s)=>{const l=s.negate();return r?l:s},o=r=>{const s=Math.ceil(n/r)+1,l=2**(r-1);return{windows:s,windowSize:l}};return{constTimeNegate:e,unsafeLadder(r,s){let l=t.ZERO,i=r;for(;s>En;)s&Zt&&(l=l.add(i)),i=i.double(),s>>=Zt;return l},precomputeWindow(r,s){const{windows:l,windowSize:i}=o(s),c=[];let u=r,h=u;for(let f=0;f<l;f++){h=u,c.push(h);for(let m=1;m<i;m++)h=h.add(u),c.push(h);u=h.double()}return c},wNAF(r,s,l){const{windows:i,windowSize:c}=o(r);let u=t.ZERO,h=t.BASE;const f=BigInt(2**r-1),m=2**r,b=BigInt(r);for(let g=0;g<i;g++){const a=g*c;let w=Number(l&f);l>>=b,w>c&&(w-=m,l+=Zt);const y=a,v=a+Math.abs(w)-1,S=g%2!==0,I=w<0;w===0?h=h.add(e(S,s[y])):u=u.add(e(I,s[v]))}return{p:u,f:h}},wNAFCached(r,s,l,i){const c=r._WINDOW_SIZE||1;let u=s.get(r);return u||(u=this.precomputeWindow(r,c),c!==1&&s.set(r,i(u))),this.wNAF(c,u,l)}}}function Te(t){return wn(t.Fp),Ut(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Wt(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function vn(t){const n=Te(t);Ut(n,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:o,a:r}=n;if(e){if(!o.eql(r,o.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...n})}const{bytesToNumberBE:xn,hexToBytes:Sn}=un,yt={Err:class extends Error{constructor(n=""){super(n)}},_parseInt(t){const{Err:n}=yt;if(t.length<2||t[0]!==2)throw new n("Invalid signature integer tag");const e=t[1],o=t.subarray(2,e+2);if(!e||o.length!==e)throw new n("Invalid signature integer: wrong length");if(o[0]&128)throw new n("Invalid signature integer: negative");if(o[0]===0&&!(o[1]&128))throw new n("Invalid signature integer: unnecessary leading zero");return{d:xn(o),l:t.subarray(e+2)}},toSig(t){const{Err:n}=yt,e=typeof t=="string"?Sn(t):t;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let o=e.length;if(o<2||e[0]!=48)throw new n("Invalid signature tag");if(e[1]!==o-2)throw new n("Invalid signature: incorrect length");const{d:r,l:s}=yt._parseInt(e.subarray(2)),{d:l,l:i}=yt._parseInt(s);if(i.length)throw new n("Invalid signature: left bytes after parsing");return{r,s:l}},hexFromSig(t){const n=u=>Number.parseInt(u[0],16)&8?"00"+u:u,e=u=>{const h=u.toString(16);return h.length&1?`0${h}`:h},o=n(e(t.s)),r=n(e(t.r)),s=o.length/2,l=r.length/2,i=e(s),c=e(l);return`30${e(l+s+4)}02${c}${r}02${i}${o}`}},rt=BigInt(0),W=BigInt(1);BigInt(2);const de=BigInt(3);BigInt(4);function Bn(t){const n=vn(t),{Fp:e}=n,o=n.toBytes||((g,a,w)=>{const y=a.toAffine();return Y(Uint8Array.from([4]),e.toBytes(y.x),e.toBytes(y.y))}),r=n.fromBytes||(g=>{const a=g.subarray(1),w=e.fromBytes(a.subarray(0,e.BYTES)),y=e.fromBytes(a.subarray(e.BYTES,2*e.BYTES));return{x:w,y}});function s(g){const{a,b:w}=n,y=e.sqr(g),v=e.mul(y,g);return e.add(e.add(v,e.mul(g,a)),w)}if(!e.eql(e.sqr(n.Gy),s(n.Gx)))throw new Error("bad generator point: equation left != right");function l(g){return typeof g=="bigint"&&rt<g&&g<n.n}function i(g){if(!l(g))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(g){const{allowedPrivateKeyLengths:a,nByteLength:w,wrapPrivateKey:y,n:v}=n;if(a&&typeof g!="bigint"){if(g instanceof Uint8Array&&(g=ot(g)),typeof g!="string"||!a.includes(g.length))throw new Error("Invalid key");g=g.padStart(w*2,"0")}let S;try{S=typeof g=="bigint"?g:mt(G("private key",g,w))}catch{throw new Error(`private key must be ${w} bytes, hex or bigint, not ${typeof g}`)}return y&&(S=Z(S,v)),i(S),S}const u=new Map;function h(g){if(!(g instanceof f))throw new Error("ProjectivePoint expected")}class f{constructor(a,w,y){if(this.px=a,this.py=w,this.pz=y,a==null||!e.isValid(a))throw new Error("x required");if(w==null||!e.isValid(w))throw new Error("y required");if(y==null||!e.isValid(y))throw new Error("z required")}static fromAffine(a){const{x:w,y}=a||{};if(!a||!e.isValid(w)||!e.isValid(y))throw new Error("invalid affine point");if(a instanceof f)throw new Error("projective point not allowed");const v=S=>e.eql(S,e.ZERO);return v(w)&&v(y)?f.ZERO:new f(w,y,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(a){const w=e.invertBatch(a.map(y=>y.pz));return a.map((y,v)=>y.toAffine(w[v])).map(f.fromAffine)}static fromHex(a){const w=f.fromAffine(r(G("pointHex",a)));return w.assertValidity(),w}static fromPrivateKey(a){return f.BASE.multiply(c(a))}_setWindowSize(a){this._WINDOW_SIZE=a,u.delete(this)}assertValidity(){if(this.is0()){if(n.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:a,y:w}=this.toAffine();if(!e.isValid(a)||!e.isValid(w))throw new Error("bad point: x or y not FE");const y=e.sqr(w),v=s(a);if(!e.eql(y,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:a}=this.toAffine();if(e.isOdd)return!e.isOdd(a);throw new Error("Field doesn't support isOdd")}equals(a){h(a);const{px:w,py:y,pz:v}=this,{px:S,py:I,pz:T}=a,E=e.eql(e.mul(w,T),e.mul(S,v)),x=e.eql(e.mul(y,T),e.mul(I,v));return E&&x}negate(){return new f(this.px,e.neg(this.py),this.pz)}double(){const{a,b:w}=n,y=e.mul(w,de),{px:v,py:S,pz:I}=this;let T=e.ZERO,E=e.ZERO,x=e.ZERO,A=e.mul(v,v),M=e.mul(S,S),C=e.mul(I,I),O=e.mul(v,S);return O=e.add(O,O),x=e.mul(v,I),x=e.add(x,x),T=e.mul(a,x),E=e.mul(y,C),E=e.add(T,E),T=e.sub(M,E),E=e.add(M,E),E=e.mul(T,E),T=e.mul(O,T),x=e.mul(y,x),C=e.mul(a,C),O=e.sub(A,C),O=e.mul(a,O),O=e.add(O,x),x=e.add(A,A),A=e.add(x,A),A=e.add(A,C),A=e.mul(A,O),E=e.add(E,A),C=e.mul(S,I),C=e.add(C,C),A=e.mul(C,O),T=e.sub(T,A),x=e.mul(C,M),x=e.add(x,x),x=e.add(x,x),new f(T,E,x)}add(a){h(a);const{px:w,py:y,pz:v}=this,{px:S,py:I,pz:T}=a;let E=e.ZERO,x=e.ZERO,A=e.ZERO;const M=n.a,C=e.mul(n.b,de);let O=e.mul(w,S),D=e.mul(y,I),K=e.mul(v,T),it=e.add(w,y),d=e.add(S,I);it=e.mul(it,d),d=e.add(O,D),it=e.sub(it,d),d=e.add(w,v);let p=e.add(S,T);return d=e.mul(d,p),p=e.add(O,K),d=e.sub(d,p),p=e.add(y,v),E=e.add(I,T),p=e.mul(p,E),E=e.add(D,K),p=e.sub(p,E),A=e.mul(M,d),E=e.mul(C,K),A=e.add(E,A),E=e.sub(D,A),A=e.add(D,A),x=e.mul(E,A),D=e.add(O,O),D=e.add(D,O),K=e.mul(M,K),d=e.mul(C,d),D=e.add(D,K),K=e.sub(O,K),K=e.mul(M,K),d=e.add(d,K),O=e.mul(D,d),x=e.add(x,O),O=e.mul(p,d),E=e.mul(it,E),E=e.sub(E,O),O=e.mul(it,D),A=e.mul(p,A),A=e.add(A,O),new f(E,x,A)}subtract(a){return this.add(a.negate())}is0(){return this.equals(f.ZERO)}wNAF(a){return b.wNAFCached(this,u,a,w=>{const y=e.invertBatch(w.map(v=>v.pz));return w.map((v,S)=>v.toAffine(y[S])).map(f.fromAffine)})}multiplyUnsafe(a){const w=f.ZERO;if(a===rt)return w;if(i(a),a===W)return this;const{endo:y}=n;if(!y)return b.unsafeLadder(this,a);let{k1neg:v,k1:S,k2neg:I,k2:T}=y.splitScalar(a),E=w,x=w,A=this;for(;S>rt||T>rt;)S&W&&(E=E.add(A)),T&W&&(x=x.add(A)),A=A.double(),S>>=W,T>>=W;return v&&(E=E.negate()),I&&(x=x.negate()),x=new f(e.mul(x.px,y.beta),x.py,x.pz),E.add(x)}multiply(a){i(a);let w=a,y,v;const{endo:S}=n;if(S){const{k1neg:I,k1:T,k2neg:E,k2:x}=S.splitScalar(w);let{p:A,f:M}=this.wNAF(T),{p:C,f:O}=this.wNAF(x);A=b.constTimeNegate(I,A),C=b.constTimeNegate(E,C),C=new f(e.mul(C.px,S.beta),C.py,C.pz),y=A.add(C),v=M.add(O)}else{const{p:I,f:T}=this.wNAF(w);y=I,v=T}return f.normalizeZ([y,v])[0]}multiplyAndAddUnsafe(a,w,y){const v=f.BASE,S=(T,E)=>E===rt||E===W||!T.equals(v)?T.multiplyUnsafe(E):T.multiply(E),I=S(this,w).add(S(a,y));return I.is0()?void 0:I}toAffine(a){const{px:w,py:y,pz:v}=this,S=this.is0();a==null&&(a=S?e.ONE:e.inv(v));const I=e.mul(w,a),T=e.mul(y,a),E=e.mul(v,a);if(S)return{x:e.ZERO,y:e.ZERO};if(!e.eql(E,e.ONE))throw new Error("invZ was invalid");return{x:I,y:T}}isTorsionFree(){const{h:a,isTorsionFree:w}=n;if(a===W)return!0;if(w)return w(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:a,clearCofactor:w}=n;return a===W?this:w?w(f,this):this.multiplyUnsafe(n.h)}toRawBytes(a=!0){return this.assertValidity(),o(f,this,a)}toHex(a=!0){return ot(this.toRawBytes(a))}}f.BASE=new f(n.Gx,n.Gy,e.ONE),f.ZERO=new f(e.ZERO,e.ONE,e.ZERO);const m=n.nBitLength,b=bn(f,n.endo?Math.ceil(m/2):m);return{CURVE:n,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:l}}function An(t){const n=Te(t);return Ut(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function Tn(t){const n=An(t),{Fp:e,n:o}=n,r=e.BYTES+1,s=2*e.BYTES+1;function l(d){return rt<d&&d<e.ORDER}function i(d){return Z(d,o)}function c(d){return Yt(d,o)}const{ProjectivePoint:u,normPrivateKeyToScalar:h,weierstrassEquation:f,isWithinCurveOrder:m}=Bn({...n,toBytes(d,p,B){const U=p.toAffine(),P=e.toBytes(U.x),R=Y;return B?R(Uint8Array.from([p.hasEvenY()?2:3]),P):R(Uint8Array.from([4]),P,e.toBytes(U.y))},fromBytes(d){const p=d.length,B=d[0],U=d.subarray(1);if(p===r&&(B===2||B===3)){const P=mt(U);if(!l(P))throw new Error("Point is not on curve");const R=f(P);let z=e.sqrt(R);const j=(z&W)===W;return(B&1)===1!==j&&(z=e.neg(z)),{x:P,y:z}}else if(p===s&&B===4){const P=e.fromBytes(U.subarray(0,e.BYTES)),R=e.fromBytes(U.subarray(e.BYTES,2*e.BYTES));return{x:P,y:R}}else throw new Error(`Point of length ${p} was invalid. Expected ${r} compressed bytes or ${s} uncompressed bytes`)}}),b=d=>ot(Et(d,n.nByteLength));function g(d){const p=o>>W;return d>p}function a(d){return g(d)?i(-d):d}const w=(d,p,B)=>mt(d.slice(p,B));class y{constructor(p,B,U){this.r=p,this.s=B,this.recovery=U,this.assertValidity()}static fromCompact(p){const B=n.nByteLength;return p=G("compactSignature",p,B*2),new y(w(p,0,B),w(p,B,2*B))}static fromDER(p){const{r:B,s:U}=yt.toSig(G("DER",p));return new y(B,U)}assertValidity(){if(!m(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!m(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(p){return new y(this.r,this.s,p)}recoverPublicKey(p){const{r:B,s:U,recovery:P}=this,R=x(G("msgHash",p));if(P==null||![0,1,2,3].includes(P))throw new Error("recovery id invalid");const z=P===2||P===3?B+n.n:B;if(z>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const j=P&1?"03":"02",st=u.fromHex(j+b(z)),ct=c(z),bt=i(-R*ct),Ot=i(U*ct),lt=u.BASE.multiplyAndAddUnsafe(st,bt,Ot);if(!lt)throw new Error("point at infinify");return lt.assertValidity(),lt}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return At(this.toDERHex())}toDERHex(){return yt.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return At(this.toCompactHex())}toCompactHex(){return b(this.r)+b(this.s)}}const v={isValidPrivateKey(d){try{return h(d),!0}catch{return!1}},normPrivateKeyToScalar:h,randomPrivateKey:()=>{const d=n.randomBytes(e.BYTES+8),p=mn(d,o);return Et(p,n.nByteLength)},precompute(d=8,p=u.BASE){return p._setWindowSize(d),p.multiply(BigInt(3)),p}};function S(d,p=!0){return u.fromPrivateKey(d).toRawBytes(p)}function I(d){const p=d instanceof Uint8Array,B=typeof d=="string",U=(p||B)&&d.length;return p?U===r||U===s:B?U===2*r||U===2*s:d instanceof u}function T(d,p,B=!0){if(I(d))throw new Error("first arg must be private key");if(!I(p))throw new Error("second arg must be public key");return u.fromHex(p).multiply(h(d)).toRawBytes(B)}const E=n.bits2int||function(d){const p=mt(d),B=d.length*8-n.nBitLength;return B>0?p>>BigInt(B):p},x=n.bits2int_modN||function(d){return i(E(d))},A=Gt(n.nBitLength);function M(d){if(typeof d!="bigint")throw new Error("bigint expected");if(!(rt<=d&&d<A))throw new Error(`bigint expected < 2^${n.nBitLength}`);return Et(d,n.nByteLength)}function C(d,p,B=O){if(["recovered","canonical"].some(dt=>dt in B))throw new Error("sign() legacy options not supported");const{hash:U,randomBytes:P}=n;let{lowS:R,prehash:z,extraEntropy:j}=B;R==null&&(R=!0),d=G("msgHash",d),z&&(d=G("prehashed msgHash",U(d)));const st=x(d),ct=h(p),bt=[M(ct),M(st)];if(j!=null){const dt=j===!0?P(e.BYTES):j;bt.push(G("extraEntropy",dt,e.BYTES))}const Ot=Y(...bt),lt=st;function $t(dt){const vt=E(dt);if(!m(vt))return;const ie=c(vt),xt=u.BASE.multiply(vt).toAffine(),J=i(xt.x);if(J===rt)return;const St=i(ie*i(lt+J*ct));if(St===rt)return;let se=(xt.x===J?0:2)|Number(xt.y&W),ce=St;return R&&g(St)&&(ce=a(St),se^=1),new y(J,ce,se)}return{seed:Ot,k2sig:$t}}const O={lowS:n.lowS,prehash:!1},D={lowS:n.lowS,prehash:!1};function K(d,p,B=O){const{seed:U,k2sig:P}=C(d,p,B),R=n;return Be(R.hash.outputLen,R.nByteLength,R.hmac)(U,P)}u.BASE._setWindowSize(8);function it(d,p,B,U=D){var xt;const P=d;if(p=G("msgHash",p),B=G("publicKey",B),"strict"in U)throw new Error("options.strict was renamed to lowS");const{lowS:R,prehash:z}=U;let j,st;try{if(typeof P=="string"||P instanceof Uint8Array)try{j=y.fromDER(P)}catch(J){if(!(J instanceof yt.Err))throw J;j=y.fromCompact(P)}else if(typeof P=="object"&&typeof P.r=="bigint"&&typeof P.s=="bigint"){const{r:J,s:St}=P;j=new y(J,St)}else throw new Error("PARSE");st=u.fromHex(B)}catch(J){if(J.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(R&&j.hasHighS())return!1;z&&(p=n.hash(p));const{r:ct,s:bt}=j,Ot=x(p),lt=c(bt),$t=i(Ot*lt),dt=i(ct*lt),vt=(xt=u.BASE.multiplyAndAddUnsafe(st,$t,dt))==null?void 0:xt.toAffine();return vt?i(vt.x)===ct:!1}return{CURVE:n,getPublicKey:S,getSharedSecret:T,sign:K,verify:it,ProjectivePoint:u,Signature:y,utils:v}}var In=Object.defineProperty,Ie=(t,n)=>{for(var e in n)In(t,e,{get:n[e],enumerable:!0})},Oe={};Ie(Oe,{EmptyArray:()=>ne,arrayToHex:()=>Ft,arrayToUtf8:()=>ee,calculateSharedKey:()=>Jn,comparePublicKeyHex:()=>Qn,compressPublicKeyHex:()=>Gn,doDecrypt:()=>er,doEncrypt:()=>tr,doSignature:()=>nr,doVerifySignature:()=>rr,generateKeyPairHex:()=>te,getHash:()=>re,getPoint:()=>Re,getPublicKeyFromPrivateKey:()=>qe,getZ:()=>qt,hexToArray:()=>k,initRNGPool:()=>Qt,leftPad:()=>q,precomputePublicKey:()=>or,utf8ToHex:()=>It,verifyPublicKey:()=>Wn});var _t=BigInt(0),Pt=BigInt(1),On=BigInt(2);BigInt(3);function Pn(t){let n=t.toString(16);if(n[0]!=="-")n.length%2===1?n="0"+n:n.match(/^[0-7]/)||(n="00"+n);else{n=n.substring(1);let e=n.length;e%2===1?e+=1:n.match(/^[0-7]/)||(e+=2);let o="";for(let l=0;l<e;l++)o+="f";n=((_(o)^t)+Pt).toString(16).replace(/^-/,"")}return n}var Pe=class{constructor(t=null,n="00",e="00",o=""){this.tlv=t,this.t=n,this.l=e,this.v=o}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){const t=this.v.length/2;let n=t.toString(16);return n.length%2===1&&(n="0"+n),t<128?n:(128+n.length/2).toString(16)+n}getValue(){return""}},ge=class extends Pe{constructor(t){super(),this.t="02",t&&(this.v=Pn(t))}getValue(){return this.v}},Un=class extends Pe{constructor(n){super();N(this,"t","30");this.asn1Array=n}getValue(){return this.v=this.asn1Array.map(n=>n.getEncodedHex()).join(""),this.v}};function Ue(t,n){return+t[n+2]<8?1:+t.substring(n+2,n+4)&127+1}function we(t,n){const e=Ue(t,n),o=t.substring(n+2,n+2+e*2);return o?+(+o[0]<8?_(o):_(o.substring(2))).toString():-1}function Dt(t,n){const e=Ue(t,n);return n+(e+1)*2}function Cn(t,n){const e=new ge(t),o=new ge(n);return new Un([e,o]).getEncodedHex()}function Ln(t){const n=Dt(t,0),e=Dt(t,n),o=we(t,n),r=t.substr(e,o*2),s=e+r.length,l=Dt(t,s),i=we(t,s),c=t.substring(l,l+i*2),u=_(r),h=_(c);return{r:u,s:h}}var Kt=16384,pt=new Uint8Array(0),Bt;async function Qt(){if("crypto"in globalThis){Bt=globalThis.crypto;return}if(!(pt.length>Kt/2))if("wx"in globalThis&&"getRandomValues"in globalThis.wx)pt=await new Promise(t=>{wx.getRandomValues({length:Kt,success(n){t(new Uint8Array(n.randomValues))}})});else try{globalThis.crypto?Bt=globalThis.crypto:Bt=(await Promise.resolve().then(()=>require("./__vite-browser-external-b3701507.cjs"))).webcrypto;const t=new Uint8Array(Kt);Bt.getRandomValues(t),pt=t}catch{throw new Error("no available csprng, abort.")}}Qt();function Nn(t){if(pt.length>t){const n=pt.slice(0,t);return pt=pt.slice(t),Qt(),n}else throw new Error("random number pool is not ready or insufficient, prevent getting too long random values or too often.")}function Hn(t=0){const n=new Uint8Array(t);return Bt?Bt.getRandomValues(n):Nn(t)}var Ce=t=>t instanceof Uint8Array,zt=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),_n=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!_n)throw new Error("Non little-endian hardware is not supported");var qn=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function Tt(t){if(!Ce(t))throw new Error("Uint8Array expected");let n="";for(let e=0;e<t.length;e++)n+=qn[t[e]];return n}function Rn(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Xt(t){if(typeof t=="string"&&(t=Rn(t)),!Ce(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}var Le=class{clone(){return this._cloneInto()}};function Vn(t){const n=o=>t().update(Xt(o)).digest(),e=t();return n.outputLen=e.outputLen,n.blockLen=e.blockLen,n.create=()=>t(),n}var Fn=(t,n,e)=>t&n|t&e|n&e,ye=(t,n,e)=>t^n^e,$n=(t,n,e)=>t&n|~t&e;function kn(t,n,e,o){if(typeof t.setBigUint64=="function")return t.setBigUint64(n,e,o);const r=BigInt(32),s=BigInt(4294967295),l=Number(e>>r&s),i=Number(e&s),c=o?4:0,u=o?0:4;t.setUint32(n+c,l,o),t.setUint32(n+u,i,o)}function Q(t,n){const e=n&31;return t<<e|t>>>32-e}function Zn(t){return t^Q(t,9)^Q(t,17)}function Dn(t){return t^Q(t,15)^Q(t,23)}var Kn=class extends Le{constructor(n,e,o,r){super();N(this,"buffer");N(this,"view");N(this,"finished",!1);N(this,"length",0);N(this,"pos",0);N(this,"destroyed",!1);this.blockLen=n,this.outputLen=e,this.padOffset=o,this.isLE=r,this.buffer=new Uint8Array(n),this.view=zt(this.buffer)}update(n){const{view:e,buffer:o,blockLen:r}=this;n=Xt(n);const s=n.length;for(let l=0;l<s;){const i=Math.min(r-this.pos,s-l);if(i===r){const c=zt(n);for(;r<=s-l;l+=r)this.process(c,l);continue}o.set(n.subarray(l,l+i),this.pos),this.pos+=i,l+=i,this.pos===r&&(this.process(e,0),this.pos=0)}return this.length+=n.length,this.roundClean(),this}digestInto(n){this.finished=!0;const{buffer:e,view:o,blockLen:r,isLE:s}=this;let{pos:l}=this;e[l++]=128,this.buffer.subarray(l).fill(0),this.padOffset>r-l&&(this.process(o,0),l=0);for(let f=l;f<r;f++)e[f]=0;kn(o,r-8,BigInt(this.length*8),s),this.process(o,0);const i=zt(n),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,h=this.get();if(u>h.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<u;f++)i.setUint32(4*f,h[f],s)}digest(){const{buffer:n,outputLen:e}=this;this.digestInto(n);const o=n.slice(0,e);return this.destroy(),o}_cloneInto(n){n||(n=new this.constructor),n.set(...this.get());const{blockLen:e,buffer:o,length:r,finished:s,destroyed:l,pos:i}=this;return n.length=r,n.pos=i,n.finished=s,n.destroyed=l,r%e&&n.buffer.set(o),n}},ut=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]),tt=new Uint32Array(68),pe=new Uint32Array(64),zn=2043430169,jn=2055708042,Yn=class extends Kn{constructor(){super(64,32,8,!1);N(this,"A",ut[0]|0);N(this,"B",ut[1]|0);N(this,"C",ut[2]|0);N(this,"D",ut[3]|0);N(this,"E",ut[4]|0);N(this,"F",ut[5]|0);N(this,"G",ut[6]|0);N(this,"H",ut[7]|0)}get(){const{A:n,B:e,C:o,D:r,E:s,F:l,G:i,H:c}=this;return[n,e,o,r,s,l,i,c]}set(n,e,o,r,s,l,i,c){this.A=n|0,this.B=e|0,this.C=o|0,this.D=r|0,this.E=s|0,this.F=l|0,this.G=i|0,this.H=c|0}process(n,e){for(let f=0;f<16;f++,e+=4)tt[f]=n.getUint32(e,!1);for(let f=16;f<68;f++)tt[f]=Dn(tt[f-16]^tt[f-9]^Q(tt[f-3],15))^Q(tt[f-13],7)^tt[f-6];for(let f=0;f<64;f++)pe[f]=tt[f]^tt[f+4];let{A:o,B:r,C:s,D:l,E:i,F:c,G:u,H:h}=this;for(let f=0;f<64;f++){let m=f>=0&&f<=15,b=m?zn:jn,g=Q(Q(o,12)+i+Q(b,f),7),a=g^Q(o,12),w=(m?ye(o,r,s):Fn(o,r,s))+l+a+pe[f]|0,y=(m?ye(i,c,u):$n(i,c,u))+h+g+tt[f]|0;l=s,s=Q(r,9),r=o,o=w,h=u,u=Q(c,19),c=i,i=Zn(y)}o=o^this.A|0,r=r^this.B|0,s=s^this.C|0,l=l^this.D|0,i=i^this.E|0,c=c^this.F|0,u=u^this.G|0,h=h^this.H|0,this.set(o,r,s,l,i,c,u,h)}roundClean(){tt.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},nt=Vn(()=>new Yn),Ne=class extends Le{constructor(n,e){super();N(this,"oHash");N(this,"iHash");N(this,"blockLen");N(this,"outputLen");N(this,"finished",!1);N(this,"destroyed",!1);const o=Xt(e);if(this.iHash=n.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,s=new Uint8Array(r);s.set(o.length>r?n.create().update(o).digest():o);for(let l=0;l<s.length;l++)s[l]^=54;this.iHash.update(s),this.oHash=n.create();for(let l=0;l<s.length;l++)s[l]^=106;this.oHash.update(s),s.fill(0)}update(n){return this.iHash.update(n),this}digestInto(n){this.finished=!0,this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const n=new Uint8Array(this.oHash.outputLen);return this.digestInto(n),n}_cloneInto(n){n||(n=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:o,finished:r,destroyed:s,blockLen:l,outputLen:i}=this;return n=n,n.finished=r,n.destroyed=s,n.blockLen=l,n.outputLen=i,n.oHash=e._cloneInto(n.oHash),n.iHash=o._cloneInto(n.iHash),n}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},Jt=(t,n,e)=>new Ne(t,n).update(e).digest();Jt.create=(t,n)=>new Ne(t,n);var Mn=Ae(BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991999")),L=Tn({a:BigInt("115792089210356248756420345214020892766250353991924191454421193933289684991996"),b:BigInt("18505919022281880113072981827955639221458448578012075254857346196103069175443"),Fp:Mn,h:Pt,n:BigInt("115792089210356248756420345214020892766061623724957744567843809356293439045923"),Gx:BigInt("22963146547237050559479531362550074578802567295341616970375194840604139615431"),Gy:BigInt("85132369209828568825618990617112496413088388631904505083283536607588877201568"),hash:nt,hmac:(t,...n)=>Jt(nt,t,Y(...n)),randomBytes:Hn}),et=Ae(BigInt(L.CURVE.n));function te(t){const n=t?Et(Z(BigInt(t),Pt)+Pt,32):L.utils.randomPrivateKey(),e=L.getPublicKey(n,!1),o=q(ot(n),64),r=q(ot(e),64);return{privateKey:o,publicKey:r}}function Gn(t){if(t.length!==130)throw new Error("Invalid public key to compress");const n=(t.length-2)/2,e=t.substring(2,2+n),o=_(t.substring(n+2,n+n+2));let r="03";return Z(o,On)===_t&&(r="02"),r+e}function It(t){t=decodeURIComponent(encodeURIComponent(t));const n=t.length,e=new Uint32Array((n>>>2)+1);for(let r=0;r<n;r++)e[r>>>2]|=(t.charCodeAt(r)&255)<<24-r%4*8;const o=[];for(let r=0;r<n;r++){const s=e[r>>>2]>>>24-r%4*8&255;o.push((s>>>4).toString(16)),o.push((s&15).toString(16))}return o.join("")}function q(t,n){return t.length>=n?t:new Array(n-t.length+1).join("0")+t}function Ft(t){return t.map(n=>{const e=n.toString(16);return e.length===1?"0"+e:e}).join("")}function ee(t){const n=[];for(let e=0,o=t.length;e<o;e++)t[e]>=240&&t[e]<=247?(n.push(String.fromCodePoint(((t[e]&7)<<18)+((t[e+1]&63)<<12)+((t[e+2]&63)<<6)+(t[e+3]&63))),e+=3):t[e]>=224&&t[e]<=239?(n.push(String.fromCodePoint(((t[e]&15)<<12)+((t[e+1]&63)<<6)+(t[e+2]&63))),e+=2):t[e]>=192&&t[e]<=223?(n.push(String.fromCodePoint(((t[e]&31)<<6)+(t[e+1]&63))),e++):n.push(String.fromCodePoint(t[e]));return n.join("")}function k(t){let n=t.length;n%2!==0&&(t=q(t,n+1)),n=t.length;const e=n/2,o=new Uint8Array(e);for(let r=0;r<e;r++)o[r]=parseInt(t.substring(r*2,r*2+2),16);return o}function Wn(t){const n=L.ProjectivePoint.fromHex(t);if(!n)return!1;try{return n.assertValidity(),!0}catch{return!1}}function Qn(t,n){const e=L.ProjectivePoint.fromHex(t);if(!e)return!1;const o=L.ProjectivePoint.fromHex(n);return o?e.equals(o):!1}var me=_("80000000000000000000000000000000"),Ee=_("7fffffffffffffffffffffffffffffff");function Xn(t,n){let e=new Uint8Array(n),o=1,r=0,s=ne;const l=new Uint8Array(4),i=()=>{l[0]=o>>24&255,l[1]=o>>16&255,l[2]=o>>8&255,l[3]=o&255,s=nt(Y(t,l)),o++,r=0};i();for(let c=0,u=e.length;c<u;c++)r===s.length&&i(),e[c]=s[r++]&255;return e}function Jn(t,n,e,o,r,s=!1,l="1234567812345678",i="1234567812345678"){const c=L.ProjectivePoint.fromHex(n.publicKey),u=L.ProjectivePoint.fromHex(o),h=L.ProjectivePoint.fromHex(e);let f=qt(t.publicKey,l),m=qt(e,i);s&&([f,m]=[m,f]);const b=_(n.privateKey),g=_(t.privateKey),a=c.x,w=me+(a&Ee),y=et.add(g,et.mulN(w,b)),v=u.x,S=et.add(me,v&Ee),I=u.multiply(S).add(h).multiply(y),T=k(q($(I.x),64)),E=k(q($(I.y),64));return Xn(Y(T,E,f,m),r)}var He=0,ne=new Uint8Array;function tr(t,n,e=1){const o=typeof t=="string"?k(It(t)):Uint8Array.from(t),r=typeof n=="string"?L.ProjectivePoint.fromHex(n):n,s=te(),l=_(s.privateKey);let i=s.publicKey;i.length>128&&(i=i.substring(i.length-128));const c=r.multiply(l),u=k(q($(c.x),64)),h=k(q($(c.y),64)),f=Tt(nt(Y(u,o,h)));_e(u,h,o);const m=Tt(o);return e===He?i+m+f:i+f+m}function _e(t,n,e){let o=1,r=0,s=ne;const l=new Uint8Array(4),i=()=>{l[0]=o>>24&255,l[1]=o>>16&255,l[2]=o>>8&255,l[3]=o&255,s=nt(Y(t,n,l)),o++,r=0};i();for(let c=0,u=e.length;c<u;c++)r===s.length&&i(),e[c]^=s[r++]&255}function er(t,n,e=1,{output:o="string"}={}){const r=_(n);let s=t.substring(128,128+64),l=t.substring(128+64);e===He&&(s=t.substring(t.length-64),l=t.substring(128,t.length-64));const i=k(l),u=L.ProjectivePoint.fromHex("04"+t.substring(0,128)).multiply(r),h=k(q($(u.x),64)),f=k(q($(u.y),64));return _e(h,f,i),Ft(Array.from(nt(Y(h,i,f))))===s.toLowerCase()?o==="array"?i:ee(i):o==="array"?[]:""}function nr(t,n,e={}){let{pointPool:o,der:r,hash:s,publicKey:l,userId:i}=e,c=typeof t=="string"?It(t):Ft(Array.from(t));s&&(l=l||qe(n),c=re(c,l,i));const u=_(n),h=_(c);let f=null,m=null,b=null;do{do{let g;o&&o.length?g=o.pop():g=Re(),f=g.k,m=et.add(h,g.x1)}while(m===_t||m+f===L.CURVE.n);b=et.mul(et.inv(et.addN(u,Pt)),et.subN(f,et.mulN(m,u)))}while(b===_t);return r?Cn(m,b):q($(m),64)+q($(b),64)}function rr(t,n,e,o={}){let r;const{hash:s,der:l,userId:i}=o,c=typeof e=="string"?e:e.toHex(!1);s?r=re(typeof t=="string"?It(t):t,c,i):r=typeof t=="string"?It(t):Ft(Array.from(t));let u,h;if(l){const w=Ln(n);u=w.r,h=w.s}else u=_(n.substring(0,64)),h=_(n.substring(64));const f=typeof e=="string"?L.ProjectivePoint.fromHex(e):e,m=_(r),b=et.add(u,h);if(b===_t)return!1;const g=L.ProjectivePoint.BASE.multiply(h).add(f.multiply(b)),a=et.add(m,g.x);return u===a}function qt(t,n="1234567812345678"){n=It(n);const e=q($(L.CURVE.a),64),o=q($(L.CURVE.b),64),r=q($(L.ProjectivePoint.BASE.x),64),s=q($(L.ProjectivePoint.BASE.y),64);let l,i;if(t.length===128)l=t.substring(0,64),i=t.substring(64,128);else{const f=L.ProjectivePoint.fromHex(t);l=q($(f.x),64),i=q($(f.y),64)}const c=k(n+e+o+r+s+l+i),u=n.length*4;return nt(Y(new Uint8Array([u>>8&255,u&255]),c))}function re(t,n,e="1234567812345678"){const o=qt(n,e);return Tt(nt(Y(o,typeof t=="string"?k(t):t)))}function or(t,n){const e=L.ProjectivePoint.fromHex(t);return L.utils.precompute(n,e)}function qe(t){const n=L.getPublicKey(t,!1);return q(ot(n),64)}function Re(){const t=te(),n=L.ProjectivePoint.fromHex(t.publicKey),e=_(t.privateKey);return{...t,k:e,x1:n.x}}function Ve(t){const n=[];for(let e=0,o=t.length;e<o;e++){const r=t.codePointAt(e);if(r<=127)n.push(r);else if(r<=2047)n.push(192|r>>>6),n.push(128|r&63);else if(r<=55295||r>=57344&&r<=65535)n.push(224|r>>>12),n.push(128|r>>>6&63),n.push(128|r&63);else if(r>=65536&&r<=1114111)e++,n.push(240|r>>>18&28),n.push(128|r>>>12&63),n.push(128|r>>>6&63),n.push(128|r&63);else throw n.push(r),new Error("input is not supported")}return new Uint8Array(n)}function ir(t,n){if(t=typeof t=="string"?Ve(t):t,n){if((n.mode||"hmac")!=="hmac")throw new Error("invalid mode");let o=n.key;if(!o)throw new Error("invalid key");return o=typeof o=="string"?k(o):o,Tt(Jt(nt,o,t))}return Tt(nt(t))}var Fe={};Ie(Fe,{decrypt:()=>fr,encrypt:()=>ur,sm4:()=>oe});var ft=0,sr=32,gt=16,Lt=Uint8Array.from([214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]),Nt=new Uint32Array([462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257]);function ht(t){return(Lt[t>>>24&255]&255)<<24|(Lt[t>>>16&255]&255)<<16|(Lt[t>>>8&255]&255)<<8|Lt[t&255]&255}function cr(t,n,e){let o=0,r=0,s=0,l=0,i=0,c=0,u=0,h=0;i=t[0]&255,c=t[1]&255,u=t[2]&255,h=t[3]&255,o=i<<24|c<<16|u<<8|h,i=t[4]&255,c=t[5]&255,u=t[6]&255,h=t[7]&255,r=i<<24|c<<16|u<<8|h,i=t[8]&255,c=t[9]&255,u=t[10]&255,h=t[11]&255,s=i<<24|c<<16|u<<8|h,i=t[12]&255,c=t[13]&255,u=t[14]&255,h=t[15]&255,l=i<<24|c<<16|u<<8|h;for(let f=0;f<32;f+=4)i=r^s^l^e[f],i=ht(i),o^=i^(i<<2|i>>>30)^(i<<10|i>>>22)^(i<<18|i>>>14)^(i<<24|i>>>8),c=s^l^o^e[f+1],c=ht(c),r^=c^(c<<2|c>>>30)^(c<<10|c>>>22)^(c<<18|c>>>14)^(c<<24|c>>>8),u=l^o^r^e[f+2],u=ht(u),s^=u^(u<<2|u>>>30)^(u<<10|u>>>22)^(u<<18|u>>>14)^(u<<24|u>>>8),h=o^r^s^e[f+3],h=ht(h),l^=h^(h<<2|h>>>30)^(h<<10|h>>>22)^(h<<18|h>>>14)^(h<<24|h>>>8);n[0]=l>>>24&255,n[1]=l>>>16&255,n[2]=l>>>8&255,n[3]=l&255,n[4]=s>>>24&255,n[5]=s>>>16&255,n[6]=s>>>8&255,n[7]=s&255,n[8]=r>>>24&255,n[9]=r>>>16&255,n[10]=r>>>8&255,n[11]=r&255,n[12]=o>>>24&255,n[13]=o>>>16&255,n[14]=o>>>8&255,n[15]=o&255}function lr(t,n,e){let o=0,r=0,s=0,l=0,i=0;o=(t[0]&255)<<24|(t[1]&255)<<16|(t[2]&255)<<8|t[3]&255,r=(t[4]&255)<<24|(t[5]&255)<<16|(t[6]&255)<<8|t[7]&255,s=(t[8]&255)<<24|(t[9]&255)<<16|(t[10]&255)<<8|t[11]&255,l=(t[12]&255)<<24|(t[13]&255)<<16|(t[14]&255)<<8|t[15]&255,o^=2746333894,r^=1453994832,s^=1736282519,l^=2993693404;for(let c=0;c<32;c+=4)i=r^s^l^Nt[c+0],i=ht(i),o^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[c+0]=o,i=s^l^o^Nt[c+1],i=ht(i),r^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[c+1]=r,i=l^o^r^Nt[c+2],i=ht(i),s^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[c+2]=s,i=o^r^s^Nt[c+3],i=ht(i),l^=i^(i<<13|i>>>19)^(i<<23|i>>>9),n[c+3]=l;if(e===ft)for(let c=0;c<16;c++)[n[c],n[31-c]]=[n[31-c],n[c]]}var Ht=new Uint8Array(16);function oe(t,n,e,o={}){let{padding:r="pkcs#7",mode:s,iv:l=new Uint8Array(16),output:i}=o;if(s==="cbc"&&(typeof l=="string"&&(l=k(l)),l.length!==128/8))throw new Error("iv is invalid");if(typeof n=="string"&&(n=k(n)),n.length!==128/8)throw new Error("key is invalid");if(typeof t=="string"?e!==ft?t=Ve(t):t=k(t):t=Uint8Array.from(t),(r==="pkcs#5"||r==="pkcs#7")&&e!==ft){const b=gt-t.length%gt,g=new Uint8Array(t.length+b);g.set(t,0);for(let a=0;a<b;a++)g[t.length+a]=b;t=g}const c=new Uint32Array(sr);lr(n,c,e);let u=new Uint8Array(t.length),h=l,f=t.length,m=0;for(;f>=gt;){const b=t.subarray(m,m+16);if(s==="cbc")for(let g=0;g<gt;g++)e!==ft&&(b[g]^=h[g]);cr(b,Ht,c);for(let g=0;g<gt;g++)s==="cbc"&&e===ft&&(Ht[g]^=h[g]),u[m+g]=Ht[g];s==="cbc"&&(e!==ft?h=Ht:h=b),f-=gt,m+=gt}if((r==="pkcs#5"||r==="pkcs#7")&&e===ft){const b=u.length,g=u[b-1];for(let a=1;a<=g;a++)if(u[b-a]!==g)throw new Error("padding is invalid");u=u.slice(0,b-g)}return i!=="array"?e!==ft?Tt(u):ee(u):u}function ur(t,n,e={}){return oe(t,n,1,e)}function fr(t,n,e={}){return oe(t,n,0,e)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */exports.STATUS=at;exports._configStatus=Ze;exports.sm2_exports=Oe;exports.sm32=ir;exports.sm4_exports=Fe;exports.useCache=Me;exports.useFetch=De;exports.useFindLabelsFromPath=be;exports.useFindParentValues=Ye;exports.useFindTextsFromPath=je;exports.useFindTextsInValues=ze;exports.useFormFail=Qe;exports.useFormFormat=Xe;exports.useHiddenForm=Ge;exports.useProcessStatus=ve;exports.useProcessStatusSuccess=We;exports.useTextFromOptionsValue=Ke;
|
|
2
|
+
//# sourceMappingURL=index-e25b2495.cjs.map
|