scordi-extension 1.15.2 → 1.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk/index.js CHANGED
@@ -162,8 +162,8 @@ class at extends Error {
162
162
  else {
163
163
  let f = a, b = 0;
164
164
  for (; b < c.path.length; ) {
165
- const _ = c.path[b];
166
- b === c.path.length - 1 ? (f[_] = f[_] || { _errors: [] }, f[_]._errors.push(t(c))) : f[_] = f[_] || { _errors: [] }, f = f[_], b++;
165
+ const k = c.path[b];
166
+ b === c.path.length - 1 ? (f[k] = f[k] || { _errors: [] }, f[k]._errors.push(t(c))) : f[k] = f[k] || { _errors: [] }, f = f[k], b++;
167
167
  }
168
168
  }
169
169
  };
@@ -272,9 +272,9 @@ const _r = (r) => {
272
272
  message: s.message
273
273
  };
274
274
  let f = "";
275
- const b = a.filter((_) => !!_).slice().reverse();
276
- for (const _ of b)
277
- f = _(c, { data: e, defaultError: f }).message;
275
+ const b = a.filter((k) => !!k).slice().reverse();
276
+ for (const k of b)
277
+ f = k(c, { data: e, defaultError: f }).message;
278
278
  return {
279
279
  ...s,
280
280
  path: i,
@@ -1631,47 +1631,47 @@ class Re extends ce {
1631
1631
  }
1632
1632
  _parse(e) {
1633
1633
  if (this._getType(e) !== z.object) {
1634
- const _ = this._getOrReturnCtx(e);
1635
- return U(_, {
1634
+ const k = this._getOrReturnCtx(e);
1635
+ return U(k, {
1636
1636
  code: O.invalid_type,
1637
1637
  expected: z.object,
1638
- received: _.parsedType
1638
+ received: k.parsedType
1639
1639
  }), ee;
1640
1640
  }
1641
1641
  const { status: a, ctx: s } = this._processInputParams(e), { shape: i, keys: c } = this._getCached(), f = [];
1642
1642
  if (!(this._def.catchall instanceof Et && this._def.unknownKeys === "strip"))
1643
- for (const _ in s.data)
1644
- c.includes(_) || f.push(_);
1643
+ for (const k in s.data)
1644
+ c.includes(k) || f.push(k);
1645
1645
  const b = [];
1646
- for (const _ of c) {
1647
- const I = i[_], S = s.data[_];
1646
+ for (const k of c) {
1647
+ const I = i[k], S = s.data[k];
1648
1648
  b.push({
1649
- key: { status: "valid", value: _ },
1650
- value: I._parse(new gt(s, S, s.path, _)),
1651
- alwaysSet: _ in s.data
1649
+ key: { status: "valid", value: k },
1650
+ value: I._parse(new gt(s, S, s.path, k)),
1651
+ alwaysSet: k in s.data
1652
1652
  });
1653
1653
  }
1654
1654
  if (this._def.catchall instanceof Et) {
1655
- const _ = this._def.unknownKeys;
1656
- if (_ === "passthrough")
1655
+ const k = this._def.unknownKeys;
1656
+ if (k === "passthrough")
1657
1657
  for (const I of f)
1658
1658
  b.push({
1659
1659
  key: { status: "valid", value: I },
1660
1660
  value: { status: "valid", value: s.data[I] }
1661
1661
  });
1662
- else if (_ === "strict")
1662
+ else if (k === "strict")
1663
1663
  f.length > 0 && (U(s, {
1664
1664
  code: O.unrecognized_keys,
1665
1665
  keys: f
1666
1666
  }), a.dirty());
1667
- else if (_ !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1667
+ else if (k !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1668
1668
  } else {
1669
- const _ = this._def.catchall;
1669
+ const k = this._def.catchall;
1670
1670
  for (const I of f) {
1671
1671
  const S = s.data[I];
1672
1672
  b.push({
1673
1673
  key: { status: "valid", value: I },
1674
- value: _._parse(
1674
+ value: k._parse(
1675
1675
  new gt(s, S, s.path, I)
1676
1676
  //, ctx.child(key), value, getParsedType(value)
1677
1677
  ),
@@ -1680,17 +1680,17 @@ class Re extends ce {
1680
1680
  }
1681
1681
  }
1682
1682
  return s.common.async ? Promise.resolve().then(async () => {
1683
- const _ = [];
1683
+ const k = [];
1684
1684
  for (const I of b) {
1685
- const S = await I.key, k = await I.value;
1686
- _.push({
1685
+ const S = await I.key, x = await I.value;
1686
+ k.push({
1687
1687
  key: S,
1688
- value: k,
1688
+ value: x,
1689
1689
  alwaysSet: I.alwaysSet
1690
1690
  });
1691
1691
  }
1692
- return _;
1693
- }).then((_) => Ke.mergeObjectSync(a, _)) : Ke.mergeObjectSync(a, b);
1692
+ return k;
1693
+ }).then((k) => Ke.mergeObjectSync(a, k)) : Ke.mergeObjectSync(a, b);
1694
1694
  }
1695
1695
  get shape() {
1696
1696
  return this._def.shape();
@@ -1946,7 +1946,7 @@ class sr extends ce {
1946
1946
  let i;
1947
1947
  const c = [];
1948
1948
  for (const b of a) {
1949
- const _ = {
1949
+ const k = {
1950
1950
  ...t,
1951
1951
  common: {
1952
1952
  ...t.common,
@@ -1956,11 +1956,11 @@ class sr extends ce {
1956
1956
  }, I = b._parseSync({
1957
1957
  data: t.data,
1958
1958
  path: t.path,
1959
- parent: _
1959
+ parent: k
1960
1960
  });
1961
1961
  if (I.status === "valid")
1962
1962
  return I;
1963
- I.status === "dirty" && !i && (i = { result: I, ctx: _ }), _.common.issues.length && c.push(_.common.issues);
1963
+ I.status === "dirty" && !i && (i = { result: I, ctx: k }), k.common.issues.length && c.push(k.common.issues);
1964
1964
  }
1965
1965
  if (i)
1966
1966
  return t.common.issues.push(...i.ctx.common.issues), i.result;
@@ -2213,28 +2213,28 @@ class Ar extends ce {
2213
2213
  expected: z.map,
2214
2214
  received: a.parsedType
2215
2215
  }), ee;
2216
- const s = this._def.keyType, i = this._def.valueType, c = [...a.data.entries()].map(([f, b], _) => ({
2217
- key: s._parse(new gt(a, f, a.path, [_, "key"])),
2218
- value: i._parse(new gt(a, b, a.path, [_, "value"]))
2216
+ const s = this._def.keyType, i = this._def.valueType, c = [...a.data.entries()].map(([f, b], k) => ({
2217
+ key: s._parse(new gt(a, f, a.path, [k, "key"])),
2218
+ value: i._parse(new gt(a, b, a.path, [k, "value"]))
2219
2219
  }));
2220
2220
  if (a.common.async) {
2221
2221
  const f = /* @__PURE__ */ new Map();
2222
2222
  return Promise.resolve().then(async () => {
2223
2223
  for (const b of c) {
2224
- const _ = await b.key, I = await b.value;
2225
- if (_.status === "aborted" || I.status === "aborted")
2224
+ const k = await b.key, I = await b.value;
2225
+ if (k.status === "aborted" || I.status === "aborted")
2226
2226
  return ee;
2227
- (_.status === "dirty" || I.status === "dirty") && t.dirty(), f.set(_.value, I.value);
2227
+ (k.status === "dirty" || I.status === "dirty") && t.dirty(), f.set(k.value, I.value);
2228
2228
  }
2229
2229
  return { status: t.value, value: f };
2230
2230
  });
2231
2231
  } else {
2232
2232
  const f = /* @__PURE__ */ new Map();
2233
2233
  for (const b of c) {
2234
- const _ = b.key, I = b.value;
2235
- if (_.status === "aborted" || I.status === "aborted")
2234
+ const k = b.key, I = b.value;
2235
+ if (k.status === "aborted" || I.status === "aborted")
2236
2236
  return ee;
2237
- (_.status === "dirty" || I.status === "dirty") && t.dirty(), f.set(_.value, I.value);
2237
+ (k.status === "dirty" || I.status === "dirty") && t.dirty(), f.set(k.value, I.value);
2238
2238
  }
2239
2239
  return { status: t.value, value: f };
2240
2240
  }
@@ -2273,15 +2273,15 @@ class $t extends ce {
2273
2273
  }), t.dirty());
2274
2274
  const i = this._def.valueType;
2275
2275
  function c(b) {
2276
- const _ = /* @__PURE__ */ new Set();
2276
+ const k = /* @__PURE__ */ new Set();
2277
2277
  for (const I of b) {
2278
2278
  if (I.status === "aborted")
2279
2279
  return ee;
2280
- I.status === "dirty" && t.dirty(), _.add(I.value);
2280
+ I.status === "dirty" && t.dirty(), k.add(I.value);
2281
2281
  }
2282
- return { status: t.value, value: _ };
2282
+ return { status: t.value, value: k };
2283
2283
  }
2284
- const f = [...a.data.values()].map((b, _) => i._parse(new gt(a, b, a.path, _)));
2284
+ const f = [...a.data.values()].map((b, k) => i._parse(new gt(a, b, a.path, k)));
2285
2285
  return a.common.async ? Promise.all(f).then((b) => c(b)) : c(f);
2286
2286
  }
2287
2287
  min(e, t) {
@@ -2326,7 +2326,7 @@ class qt extends ce {
2326
2326
  return _r({
2327
2327
  data: f,
2328
2328
  path: t.path,
2329
- errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, xr(), Ht].filter((_) => !!_),
2329
+ errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, xr(), Ht].filter((k) => !!k),
2330
2330
  issueData: {
2331
2331
  code: O.invalid_arguments,
2332
2332
  argumentsError: b
@@ -2337,7 +2337,7 @@ class qt extends ce {
2337
2337
  return _r({
2338
2338
  data: f,
2339
2339
  path: t.path,
2340
- errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, xr(), Ht].filter((_) => !!_),
2340
+ errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, xr(), Ht].filter((k) => !!k),
2341
2341
  issueData: {
2342
2342
  code: O.invalid_return_type,
2343
2343
  returnTypeError: b
@@ -2348,20 +2348,20 @@ class qt extends ce {
2348
2348
  if (this._def.returns instanceof Yt) {
2349
2349
  const f = this;
2350
2350
  return Je(async function(...b) {
2351
- const _ = new at([]), I = await f._def.args.parseAsync(b, i).catch((E) => {
2352
- throw _.addIssue(a(b, E)), _;
2351
+ const k = new at([]), I = await f._def.args.parseAsync(b, i).catch((E) => {
2352
+ throw k.addIssue(a(b, E)), k;
2353
2353
  }), S = await Reflect.apply(c, this, I);
2354
2354
  return await f._def.returns._def.type.parseAsync(S, i).catch((E) => {
2355
- throw _.addIssue(s(S, E)), _;
2355
+ throw k.addIssue(s(S, E)), k;
2356
2356
  });
2357
2357
  });
2358
2358
  } else {
2359
2359
  const f = this;
2360
2360
  return Je(function(...b) {
2361
- const _ = f._def.args.safeParse(b, i);
2362
- if (!_.success)
2363
- throw new at([a(b, _.error)]);
2364
- const I = Reflect.apply(c, this, _.data), S = f._def.returns.safeParse(I, i);
2361
+ const k = f._def.args.safeParse(b, i);
2362
+ if (!k.success)
2363
+ throw new at([a(b, k.error)]);
2364
+ const I = Reflect.apply(c, this, k.data), S = f._def.returns.safeParse(I, i);
2365
2365
  if (!S.success)
2366
2366
  throw new at([s(I, S.error)]);
2367
2367
  return S.data;
@@ -2972,16 +2972,24 @@ const ra = (r, e = {
2972
2972
  },
2973
2973
  void: da
2974
2974
  }, Symbol.toStringTag, { value: "Module" })), Ia = Nt({
2975
+ // 워크스페이스 이름
2975
2976
  name: Ue(),
2977
+ // 워크스페이스를 구분할 수 있는 구분자, ex) slug 같은 것들 01republic
2976
2978
  key: Ue(),
2979
+ // 워크스페이스의 프로필 이미지
2977
2980
  image: Ue()
2978
2981
  });
2979
2982
  var nn = /* @__PURE__ */ ((r) => (r.monthly = "MONTHLY", r.yearly = "YEARLY", r))(nn || {});
2980
2983
  const $r = Nt({
2984
+ // 실제 표시되는 통화 표시
2981
2985
  text: Ue(),
2986
+ // 통화 코드
2982
2987
  code: Ue(),
2988
+ // 통화 기호
2983
2989
  symbol: Ue(),
2990
+ // 통화 표시 형식
2984
2991
  format: Ue(),
2992
+ // 통화 금액
2985
2993
  amount: Kt()
2986
2994
  });
2987
2995
  var Ra = /* @__PURE__ */ ((r) => (r.USD = "USD", r.KRW = "KRW", r))(Ra || {});
@@ -2989,27 +2997,47 @@ const Hs = {
2989
2997
  en: { code: "USD", symbol: "$" },
2990
2998
  ko: { code: "KRW", symbol: "₩" }
2991
2999
  }, ja = Nt({
3000
+ // 플랜 이름
2992
3001
  planName: Ue(),
3002
+ // 현재 주기 결제 금액
2993
3003
  currentCycleBillAmount: $r,
3004
+ // 다음 결제 예정일
2994
3005
  nextPaymentDue: Ue(),
3006
+ // 주기 단위
2995
3007
  cycleTerm: rn(nn).nullable(),
3008
+ // 무료 티어 여부
2996
3009
  isFreeTier: Ut(),
3010
+ // 플랜 단위 여부
2997
3011
  isPerUser: Ut(),
3012
+ // 결제 멤버 수
2998
3013
  paidMemberCount: Kt(),
3014
+ // 사용 멤버 수
2999
3015
  usedMemberCount: Kt(),
3016
+ // 단위 가격
3000
3017
  unitPrice: $r.nullable()
3001
3018
  }), Fa = Nt({
3019
+ // 결제 이력 고유 아이디
3002
3020
  uid: Ue(),
3021
+ // 결제 일자
3003
3022
  issuedDate: Fr.date(),
3023
+ // 결제 완료 일자
3004
3024
  paidDate: Fr.date().nullable().optional(),
3025
+ // 결제 방법
3005
3026
  paymentMethod: Ue(),
3027
+ // 결제 금액
3006
3028
  amount: $r,
3029
+ // 결제 성공 여부
3007
3030
  isSuccessfulPaid: Ut(),
3031
+ // 결제 영수증 링크
3008
3032
  receiptUrl: Ue()
3009
3033
  }), $a = Nt({
3034
+ // 멤버 이름
3010
3035
  name: Ue(),
3036
+ // 멤버 이메일
3011
3037
  email: Ue().email(),
3038
+ // 멤버 프로필 이미지 링크
3012
3039
  profileImageUrl: Ue(),
3040
+ // 멤버 역할
3013
3041
  role: Ue()
3014
3042
  });
3015
3043
  class Gs {
@@ -3036,10 +3064,10 @@ class Gs {
3036
3064
  const s = `8g_wf_${Date.now()}_${Math.random()}`, i = e.timeoutMs ?? 6e5, c = setTimeout(() => {
3037
3065
  a(lt.requestTimeout(i));
3038
3066
  }, i), f = (b) => {
3039
- var _, I, S, k;
3040
- if (((_ = b.data) == null ? void 0 : _.type) === "8G_COLLECT_RESPONSE" && b.data.requestId === s) {
3067
+ var k, I, S, x;
3068
+ if (((k = b.data) == null ? void 0 : k.type) === "8G_COLLECT_RESPONSE" && b.data.requestId === s) {
3041
3069
  clearTimeout(c), window.removeEventListener("message", f);
3042
- const E = b.data, R = ((I = E == null ? void 0 : E.result) == null ? void 0 : I.steps) ?? ((k = (S = E == null ? void 0 : E.result) == null ? void 0 : S.result) == null ? void 0 : k.steps) ?? [];
3070
+ const E = b.data, R = ((I = E == null ? void 0 : E.result) == null ? void 0 : I.steps) ?? ((x = (S = E == null ? void 0 : E.result) == null ? void 0 : S.result) == null ? void 0 : x.steps) ?? [];
3043
3071
  t({
3044
3072
  success: E.success,
3045
3073
  steps: R,
@@ -3067,7 +3095,7 @@ class Gs {
3067
3095
  const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
3068
3096
  if (!a || !Array.isArray(a))
3069
3097
  return {
3070
- rawData: t,
3098
+ ...t,
3071
3099
  data: [],
3072
3100
  isSuccess: !1
3073
3101
  };
@@ -3077,58 +3105,70 @@ class Gs {
3077
3105
  b.success ? s.push(b.data) : console.warn("Invalid workspace data:", f, b.error);
3078
3106
  }
3079
3107
  return {
3080
- rawData: t,
3108
+ ...t,
3081
3109
  data: s,
3082
3110
  isSuccess: !0
3083
3111
  };
3084
3112
  }
3085
3113
  // 플랜, 결제주기
3086
- async getWorkspacePlanAndCycle(e) {
3087
- var i, c;
3088
- const t = await this.collectWorkflow(e);
3089
- if (!t.success)
3114
+ async getWorkspacePlanAndCycle(e, t) {
3115
+ var c, f;
3116
+ t.workflow.vars = {
3117
+ ...t.workflow.vars,
3118
+ workspaceKey: e
3119
+ };
3120
+ const a = await this.collectWorkflow(t);
3121
+ if (!a.success)
3090
3122
  throw new lt("Failed to get workspace plan and cycle", "GET_WORKSPACE_PLAN_AND_CYCLE_FAILED");
3091
- const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
3092
- if (!a)
3093
- return { rawData: t };
3094
- const s = ja.safeParse(a);
3095
- if (s.success) {
3096
- const f = s.data;
3097
- return { rawData: t, ...f };
3123
+ const s = (f = (c = a.steps[a.steps.length - 1]) == null ? void 0 : c.result) == null ? void 0 : f.data;
3124
+ if (!s)
3125
+ return { ...a };
3126
+ const i = ja.safeParse(s);
3127
+ if (i.success) {
3128
+ const b = i.data;
3129
+ return { ...a, ...b };
3098
3130
  } else
3099
- return console.warn("Invalid workspace billing data:", a, s.error), { rawData: t };
3131
+ return console.warn("Invalid workspace billing data:", s, i.error), { ...a };
3100
3132
  }
3101
3133
  // 결제내역
3102
- async getWorkspaceBillingHistories(e) {
3103
- var i, c;
3104
- const t = await this.collectWorkflow(e);
3105
- if (!t.success)
3134
+ async getWorkspaceBillingHistories(e, t) {
3135
+ var c, f;
3136
+ t.workflow.vars = {
3137
+ ...t.workflow.vars,
3138
+ workspaceKey: e
3139
+ };
3140
+ const a = await this.collectWorkflow(t);
3141
+ if (!a.success)
3106
3142
  throw new lt("Failed to get workspace billing histories", "GET_WORKSPACE_BILLING_HISTORIES_FAILED");
3107
- const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
3108
- if (!a || !Array.isArray(a))
3109
- return { rawData: t, data: [] };
3110
- const s = [];
3111
- for (const f of a) {
3112
- const b = Fa.safeParse(f);
3113
- b.success ? s.push(b.data) : console.warn("Invalid workspace billing history data:", f, b.error);
3143
+ const s = (f = (c = a.steps[a.steps.length - 1]) == null ? void 0 : c.result) == null ? void 0 : f.data;
3144
+ if (!s || !Array.isArray(s))
3145
+ return { ...a, data: [] };
3146
+ const i = [];
3147
+ for (const b of s) {
3148
+ const k = Fa.safeParse(b);
3149
+ k.success ? i.push(k.data) : console.warn("Invalid workspace billing history data:", b, k.error);
3114
3150
  }
3115
- return { rawData: t, data: s };
3151
+ return { ...a, data: i };
3116
3152
  }
3117
3153
  // 구성원
3118
- async getWorkspaceMembers(e) {
3119
- var i, c;
3120
- const t = await this.collectWorkflow(e);
3121
- if (!t.success)
3154
+ async getWorkspaceMembers(e, t) {
3155
+ var c, f;
3156
+ t.workflow.vars = {
3157
+ ...t.workflow.vars,
3158
+ workspaceKey: e
3159
+ };
3160
+ const a = await this.collectWorkflow(t);
3161
+ if (!a.success)
3122
3162
  throw new lt("Failed to get workspace members", "GET_WORKSPACE_MEMBERS_FAILED");
3123
- const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
3124
- if (!a || !Array.isArray(a))
3125
- return { rawData: t, data: [] };
3126
- const s = [];
3127
- for (const f of a) {
3128
- const b = $a.safeParse(f);
3129
- b.success ? s.push(b.data) : console.warn("Invalid workspace member data:", f, b.error);
3163
+ const s = (f = (c = a.steps[a.steps.length - 1]) == null ? void 0 : c.result) == null ? void 0 : f.data;
3164
+ if (!s || !Array.isArray(s))
3165
+ return { ...a, data: [] };
3166
+ const i = [];
3167
+ for (const b of s) {
3168
+ const k = $a.safeParse(b);
3169
+ k.success ? i.push(k.data) : console.warn("Invalid workspace member data:", b, k.error);
3130
3170
  }
3131
- return { rawData: t, data: s };
3171
+ return { ...a, data: i };
3132
3172
  }
3133
3173
  }
3134
3174
  const bt = Nt({
@@ -3279,8 +3319,8 @@ class Wa extends Dr {
3279
3319
  if (s) {
3280
3320
  a.setAttribute("data-contains", s);
3281
3321
  const f = Array.from(a.childNodes).filter((b) => b.nodeType === Node.TEXT_NODE).map((b) => {
3282
- var _;
3283
- return ((_ = b.textContent) == null ? void 0 : _.trim()) || "";
3322
+ var k;
3323
+ return ((k = b.textContent) == null ? void 0 : k.trim()) || "";
3284
3324
  }).join(" ").trim();
3285
3325
  (f && f === s || a.children.length === 0 && s) && a.setAttribute("data-equal", s);
3286
3326
  }
@@ -3292,19 +3332,19 @@ class Va extends Dr {
3292
3332
  const { selector: a, option: s } = e, { multiple: i = !1 } = s || {};
3293
3333
  if (!a || a.trim() === "")
3294
3334
  return null;
3295
- const c = a.split("|>").map((_) => _.trim());
3335
+ const c = a.split("|>").map((k) => k.trim());
3296
3336
  if (c.length !== 2)
3297
3337
  return null;
3298
3338
  const f = c[0], b = c[1];
3299
3339
  if (!f || !b)
3300
3340
  return null;
3301
3341
  try {
3302
- const _ = t.querySelector(f);
3303
- if (!_ || !_.contentDocument) return null;
3304
- const I = _.contentDocument;
3342
+ const k = t.querySelector(f);
3343
+ if (!k || !k.contentDocument) return null;
3344
+ const I = k.contentDocument;
3305
3345
  return i ? Array.from(I.querySelectorAll(b)) : I.querySelector(b);
3306
- } catch (_) {
3307
- return console.error("Iframe Selector error:", _), null;
3346
+ } catch (k) {
3347
+ return console.error("Iframe Selector error:", k), null;
3308
3348
  }
3309
3349
  }
3310
3350
  }
@@ -3317,12 +3357,12 @@ class qa extends Dr {
3317
3357
  let f = t;
3318
3358
  try {
3319
3359
  for (let b = 0; b < c.length; b++) {
3320
- const _ = c[b], I = b === c.length - 1;
3321
- if (!_)
3360
+ const k = c[b], I = b === c.length - 1;
3361
+ if (!k)
3322
3362
  return null;
3323
3363
  if (I && i)
3324
- return Array.from(f.querySelectorAll(_));
3325
- const S = f.querySelector(_);
3364
+ return Array.from(f.querySelectorAll(k));
3365
+ const S = f.querySelector(k);
3326
3366
  if (!S) return null;
3327
3367
  if (I)
3328
3368
  return S;
@@ -3351,8 +3391,8 @@ class Ha extends Dr {
3351
3391
  if (i) {
3352
3392
  const f = [];
3353
3393
  for (let b = 0; b < c.snapshotLength; b++) {
3354
- const _ = c.snapshotItem(b);
3355
- _ && _.nodeType === Node.ELEMENT_NODE && f.push(_);
3394
+ const k = c.snapshotItem(b);
3395
+ k && k.nodeType === Node.ELEMENT_NODE && f.push(k);
3356
3396
  }
3357
3397
  return Promise.resolve(f.length > 0 ? f : null);
3358
3398
  } else {
@@ -3460,10 +3500,10 @@ async function Ja(r) {
3460
3500
  suffixText: c = "",
3461
3501
  findBy: f = "cssSelector",
3462
3502
  option: b,
3463
- filterEmpty: _ = !0,
3503
+ filterEmpty: k = !0,
3464
3504
  scrollToCollect: I = !1,
3465
3505
  scrollDistance: S = 500,
3466
- scrollWaitMs: k = 300,
3506
+ scrollWaitMs: x = 300,
3467
3507
  maxScrollAttempts: E = 100
3468
3508
  } = r;
3469
3509
  if (!e)
@@ -3478,9 +3518,9 @@ async function Ja(r) {
3478
3518
  regex: s,
3479
3519
  prefixText: i,
3480
3520
  suffixText: c,
3481
- filterEmpty: _,
3521
+ filterEmpty: k,
3482
3522
  scrollDistance: S,
3483
- scrollWaitMs: k,
3523
+ scrollWaitMs: x,
3484
3524
  maxScrollAttempts: E
3485
3525
  });
3486
3526
  const R = await pt({ selector: e, findBy: f, option: b });
@@ -3495,7 +3535,7 @@ async function Ja(r) {
3495
3535
  );
3496
3536
  if (Array.isArray(R)) {
3497
3537
  const me = R.map(se);
3498
- return { data: _ ? me.filter((H) => H.trim() !== "") : me };
3538
+ return { data: k ? me.filter((H) => H.trim() !== "") : me };
3499
3539
  } else
3500
3540
  return { data: se(R) };
3501
3541
  } catch (e) {
@@ -3516,20 +3556,20 @@ async function Xa(r) {
3516
3556
  regex: c,
3517
3557
  prefixText: f,
3518
3558
  suffixText: b,
3519
- filterEmpty: _,
3559
+ filterEmpty: k,
3520
3560
  scrollDistance: I,
3521
3561
  scrollWaitMs: S,
3522
- maxScrollAttempts: k
3562
+ maxScrollAttempts: x
3523
3563
  } = r, E = on(s, i, c, f, b), R = /* @__PURE__ */ new Set();
3524
3564
  let se = 0, me = 0;
3525
3565
  const ge = 5;
3526
- for (; se < k; ) {
3566
+ for (; se < x; ) {
3527
3567
  const H = await pt({ selector: e, findBy: t, option: a });
3528
3568
  if (H && Array.isArray(H)) {
3529
3569
  const B = R.size;
3530
3570
  if (H.forEach((L) => {
3531
3571
  const W = E(L);
3532
- (!_ || W.trim() !== "") && R.add(W);
3572
+ (!k || W.trim() !== "") && R.add(W);
3533
3573
  }), R.size === B) {
3534
3574
  if (me++, me >= ge)
3535
3575
  break;
@@ -3973,16 +4013,16 @@ async function _s(r) {
3973
4013
  } = r;
3974
4014
  console.log("[WaitForCondition] Starting wait with conditions:", e), console.log("[WaitForCondition] Mode:", t, "Timeout:", s);
3975
4015
  const c = !!(e.urlPattern || e.elementExists || e.cookieExists || e.storageKey), f = e.userConfirmation === !0;
3976
- let b = null, _ = null;
4016
+ let b = null, k = null;
3977
4017
  (t === "manual" || t === "auto-or-manual") && f && (b = new Promise((S) => {
3978
- _ = S;
4018
+ k = S;
3979
4019
  }), window.dispatchEvent(
3980
4020
  new CustomEvent("8g-show-confirmation-ui", {
3981
4021
  detail: {
3982
4022
  message: e.message || "작업을 완료하셨나요?",
3983
4023
  buttonText: e.buttonText || "완료",
3984
4024
  position: i,
3985
- onConfirm: _
4025
+ onConfirm: k
3986
4026
  }
3987
4027
  })
3988
4028
  ));
@@ -3999,9 +4039,9 @@ async function _s(r) {
3999
4039
  console.warn("[WaitForCondition] Invalid URL pattern:", S);
4000
4040
  }
4001
4041
  if (e.elementExists) {
4002
- const { selector: S, findBy: k } = e.elementExists;
4042
+ const { selector: S, findBy: x } = e.elementExists;
4003
4043
  let E = null;
4004
- if (k === "cssSelector" ? E = document.querySelector(S) : k === "xpath" && (E = document.evaluate(
4044
+ if (x === "cssSelector" ? E = document.querySelector(S) : x === "xpath" && (E = document.evaluate(
4005
4045
  S,
4006
4046
  document,
4007
4047
  null,
@@ -4024,20 +4064,20 @@ async function _s(r) {
4024
4064
  message: `Cookie found: ${e.cookieExists}`
4025
4065
  };
4026
4066
  if (e.storageKey) {
4027
- const { type: S, key: k } = e.storageKey;
4028
- if ((S === "localStorage" ? window.localStorage : window.sessionStorage).getItem(k) !== null)
4067
+ const { type: S, key: x } = e.storageKey;
4068
+ if ((S === "localStorage" ? window.localStorage : window.sessionStorage).getItem(x) !== null)
4029
4069
  return {
4030
4070
  success: !0,
4031
4071
  reason: "storageKey",
4032
- message: `Storage key found: ${S}.${k}`
4072
+ message: `Storage key found: ${S}.${x}`
4033
4073
  };
4034
4074
  }
4035
4075
  return null;
4036
4076
  };
4037
4077
  return new Promise((S) => {
4038
- let k = null, E = !1;
4078
+ let x = null, E = !1;
4039
4079
  const R = () => {
4040
- k && (clearInterval(k), k = null), window.dispatchEvent(new CustomEvent("8g-hide-confirmation-ui"));
4080
+ x && (clearInterval(x), x = null), window.dispatchEvent(new CustomEvent("8g-hide-confirmation-ui"));
4041
4081
  }, se = (ge) => {
4042
4082
  E || (E = !0, R(), console.log("[WaitForCondition] Resolved with:", ge), S({ data: ge }));
4043
4083
  }, me = setTimeout(() => {
@@ -4047,7 +4087,7 @@ async function _s(r) {
4047
4087
  message: `Timeout after ${s}ms`
4048
4088
  });
4049
4089
  }, s);
4050
- (t === "auto" || t === "auto-or-manual") && c && (k = setInterval(async () => {
4090
+ (t === "auto" || t === "auto-or-manual") && c && (x = setInterval(async () => {
4051
4091
  const ge = await I();
4052
4092
  ge && (clearTimeout(me), se(ge));
4053
4093
  }, a)), (t === "manual" || t === "auto-or-manual") && b && b.then(() => {
@@ -4202,16 +4242,16 @@ async function Os(r) {
4202
4242
  prefixText: c = "",
4203
4243
  suffixText: f = "",
4204
4244
  attributes: b = [],
4205
- includeSelector: _ = !1,
4245
+ includeSelector: k = !1,
4206
4246
  includeXPath: I = !1,
4207
4247
  findBy: S = "cssSelector",
4208
- option: k
4248
+ option: x
4209
4249
  } = r;
4210
4250
  if (!e)
4211
4251
  throw new Error("Selector is required for get-element-data block");
4212
4252
  if (!t && b.length === 0)
4213
4253
  throw new Error("Either includeText must be true or attributes must be provided");
4214
- const E = await pt({ selector: e, findBy: S, option: k });
4254
+ const E = await pt({ selector: e, findBy: S, option: x });
4215
4255
  if (!E)
4216
4256
  return { data: Array.isArray(E) ? [] : {} };
4217
4257
  const R = Ps(
@@ -4222,7 +4262,7 @@ async function Os(r) {
4222
4262
  c,
4223
4263
  f,
4224
4264
  b,
4225
- _,
4265
+ k,
4226
4266
  I
4227
4267
  );
4228
4268
  return Array.isArray(E) ? { data: E.map(R) } : { data: R(E) };
@@ -4235,24 +4275,24 @@ async function Os(r) {
4235
4275
  }
4236
4276
  }
4237
4277
  function Ps(r, e, t, a, s = "", i = "", c = [], f = !1, b = !1) {
4238
- return (_) => {
4278
+ return (k) => {
4239
4279
  const I = {};
4240
4280
  if (r) {
4241
4281
  let S = "";
4242
- if (e ? S = _.innerHTML : S = t ? _.textContent || "" : _.innerText || "", a) {
4243
- const k = new RegExp(a, "g"), E = S.match(k);
4282
+ if (e ? S = k.innerHTML : S = t ? k.textContent || "" : k.innerText || "", a) {
4283
+ const x = new RegExp(a, "g"), E = S.match(x);
4244
4284
  S = E ? E.join(" ") : "";
4245
4285
  }
4246
4286
  S.trim() && (S = s + S.trim() + i), I.text = S;
4247
4287
  }
4248
4288
  return c.length > 0 && (I.attributes = {}, c.forEach((S) => {
4249
- let k = _.getAttribute(S);
4250
- if (k === null) {
4251
- const E = _.querySelector(`[${S}]`);
4252
- E && (k = E.getAttribute(S));
4289
+ let x = k.getAttribute(S);
4290
+ if (x === null) {
4291
+ const E = k.querySelector(`[${S}]`);
4292
+ E && (x = E.getAttribute(S));
4253
4293
  }
4254
- I.attributes[S] = k;
4255
- })), f && (I.selector = Ga.generate(_)), b && (I.xpath = Cs.generate(_)), I;
4294
+ I.attributes[S] = x;
4295
+ })), f && (I.selector = Ga.generate(k)), b && (I.xpath = Cs.generate(k)), I;
4256
4296
  };
4257
4297
  }
4258
4298
  const wn = bt.extend({
@@ -4336,7 +4376,7 @@ async function Fs(r, e, t, a) {
4336
4376
  top: e,
4337
4377
  behavior: t
4338
4378
  // Use provided behavior
4339
- }), await new Promise((_) => setTimeout(_, a));
4379
+ }), await new Promise((k) => setTimeout(k, a));
4340
4380
  const c = document.body.scrollHeight, f = window.pageYOffset || document.documentElement.scrollTop, b = window.innerHeight;
4341
4381
  if (f + b >= c - 10 && c === i)
4342
4382
  break;
@@ -4403,22 +4443,22 @@ function Bs() {
4403
4443
  })(function() {
4404
4444
  return (/* @__PURE__ */ (function() {
4405
4445
  function t(a, s, i) {
4406
- function c(_, I) {
4407
- if (!s[_]) {
4408
- if (!a[_]) {
4446
+ function c(k, I) {
4447
+ if (!s[k]) {
4448
+ if (!a[k]) {
4409
4449
  var S = typeof kr == "function" && kr;
4410
- if (!I && S) return S(_, !0);
4411
- if (f) return f(_, !0);
4412
- var k = new Error("Cannot find module '" + _ + "'");
4413
- throw k.code = "MODULE_NOT_FOUND", k;
4450
+ if (!I && S) return S(k, !0);
4451
+ if (f) return f(k, !0);
4452
+ var x = new Error("Cannot find module '" + k + "'");
4453
+ throw x.code = "MODULE_NOT_FOUND", x;
4414
4454
  }
4415
- var E = s[_] = { exports: {} };
4416
- a[_][0].call(E.exports, function(R) {
4417
- var se = a[_][1][R];
4455
+ var E = s[k] = { exports: {} };
4456
+ a[k][0].call(E.exports, function(R) {
4457
+ var se = a[k][1][R];
4418
4458
  return c(se || R);
4419
4459
  }, E, E.exports, t, a, s, i);
4420
4460
  }
4421
- return s[_].exports;
4461
+ return s[k].exports;
4422
4462
  }
4423
4463
  for (var f = typeof kr == "function" && kr, b = 0; b < i.length; b++) c(i[b]);
4424
4464
  return c;
@@ -4447,7 +4487,7 @@ function Bs() {
4447
4487
  "Seventeen",
4448
4488
  "Eighteen",
4449
4489
  "Nineteen"
4450
- ], _ = [
4490
+ ], k = [
4451
4491
  "Zeroth",
4452
4492
  "First",
4453
4493
  "Second",
@@ -4469,11 +4509,11 @@ function Bs() {
4469
4509
  "Eighteenth",
4470
4510
  "Nineteenth"
4471
4511
  ], I = ["Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety", "Hundred"], S = ["Thousand", "Million", "Billion", "Trillion"];
4472
- function k(v, A) {
4512
+ function x(v, A) {
4473
4513
  var w = function($, j, C) {
4474
4514
  var F = "";
4475
4515
  if ($ <= 19)
4476
- F = (j ? " and " : "") + (C ? _[$] : b[$]);
4516
+ F = (j ? " and " : "") + (C ? k[$] : b[$]);
4477
4517
  else if ($ < 100) {
4478
4518
  const ye = Math.floor($ / 10), we = $ % 10;
4479
4519
  F = (j ? " and " : "") + I[ye - 2], we > 0 ? F += "-" + w(we, !1, C) : C && (F = F.substring(0, F.length - 1) + "ieth");
@@ -4493,7 +4533,7 @@ function Bs() {
4493
4533
  const E = {};
4494
4534
  b.forEach(function(v, A) {
4495
4535
  E[v.toLowerCase()] = A;
4496
- }), _.forEach(function(v, A) {
4536
+ }), k.forEach(function(v, A) {
4497
4537
  E[v.toLowerCase()] = A;
4498
4538
  }), I.forEach(function(v, A) {
4499
4539
  const w = v.toLowerCase();
@@ -4582,7 +4622,7 @@ function Bs() {
4582
4622
  w = ge(v), A.case === L.UPPER && (w = w.toUpperCase());
4583
4623
  break;
4584
4624
  case T.WORDS:
4585
- w = k(v, A.ordinal), A.case === L.UPPER ? w = w.toUpperCase() : A.case === L.LOWER && (w = w.toLowerCase());
4625
+ w = x(v, A.ordinal), A.case === L.UPPER ? w = w.toUpperCase() : A.case === L.LOWER && (w = w.toLowerCase());
4586
4626
  break;
4587
4627
  case T.DECIMAL:
4588
4628
  w = "" + v;
@@ -5112,7 +5152,7 @@ function Bs() {
5112
5152
  (function() {
5113
5153
  var c = t("./utils");
5114
5154
  const f = (() => {
5115
- var b = c.isNumeric, _ = c.isArrayOfStrings, I = c.isArrayOfNumbers, S = c.createSequence, k = c.isSequence, E = c.isFunction, R = c.isLambda, se = c.isPromise, me = c.getFunctionArity, ge = c.isDeepEqual, H = c.stringToArray;
5155
+ var b = c.isNumeric, k = c.isArrayOfStrings, I = c.isArrayOfNumbers, S = c.createSequence, x = c.isSequence, E = c.isFunction, R = c.isLambda, se = c.isPromise, me = c.getFunctionArity, ge = c.isDeepEqual, H = c.stringToArray;
5116
5156
  function N(n) {
5117
5157
  if (!(typeof n > "u")) {
5118
5158
  var o = 0;
@@ -5155,8 +5195,8 @@ function Bs() {
5155
5195
  stack: new Error().stack
5156
5196
  };
5157
5197
  var g = o ? 2 : 0;
5158
- Array.isArray(n) && n.outerWrapper && (n = n[0]), l = JSON.stringify(n, function(p, x) {
5159
- return typeof x < "u" && x !== null && x.toPrecision && b(x) ? Number(x.toPrecision(15)) : x && E(x) ? "" : x;
5198
+ Array.isArray(n) && n.outerWrapper && (n = n[0]), l = JSON.stringify(n, function(p, _) {
5199
+ return typeof _ < "u" && _ !== null && _.toPrecision && b(_) ? Number(_.toPrecision(15)) : _ && E(_) ? "" : _;
5160
5200
  }, g);
5161
5201
  }
5162
5202
  return l;
@@ -5168,8 +5208,8 @@ function Bs() {
5168
5208
  if (p + o < 0 && (o = 0), typeof l < "u") {
5169
5209
  if (l <= 0)
5170
5210
  return "";
5171
- var x = o >= 0 ? o + l : p + o + l;
5172
- return g.slice(o, x).join("");
5211
+ var _ = o >= 0 ? o + l : p + o + l;
5212
+ return g.slice(o, _).join("");
5173
5213
  }
5174
5214
  return g.slice(o).join("");
5175
5215
  }
@@ -5211,8 +5251,8 @@ function Bs() {
5211
5251
  o = Math.trunc(o);
5212
5252
  var p = Math.abs(o) - Me(n);
5213
5253
  if (p > 0) {
5214
- var x = new Array(p + 1).join(l);
5215
- l.length > 1 && (x = de(x, 0, p)), o > 0 ? g = n + x : g = x + n;
5254
+ var _ = new Array(p + 1).join(l);
5255
+ l.length > 1 && (_ = de(_, 0, p)), o > 0 ? g = n + _ : g = _ + n;
5216
5256
  } else
5217
5257
  g = n;
5218
5258
  return g;
@@ -5250,14 +5290,14 @@ function Bs() {
5250
5290
  };
5251
5291
  var g = S();
5252
5292
  if (typeof l > "u" || l > 0) {
5253
- var p = 0, x = await ue(o, n);
5254
- if (typeof x < "u")
5255
- for (; typeof x < "u" && (typeof l > "u" || p < l); )
5293
+ var p = 0, _ = await ue(o, n);
5294
+ if (typeof _ < "u")
5295
+ for (; typeof _ < "u" && (typeof l > "u" || p < l); )
5256
5296
  g.push({
5257
- match: x.match,
5258
- index: x.start,
5259
- groups: x.groups
5260
- }), x = await ue(x.next), p++;
5297
+ match: _.match,
5298
+ index: _.start,
5299
+ groups: _.groups
5300
+ }), _ = await ue(_.next), p++;
5261
5301
  }
5262
5302
  return g;
5263
5303
  }
@@ -5279,8 +5319,8 @@ function Bs() {
5279
5319
  value: g,
5280
5320
  index: 4
5281
5321
  };
5282
- var x;
5283
- typeof l == "string" ? x = function(Se) {
5322
+ var _;
5323
+ typeof l == "string" ? _ = function(Se) {
5284
5324
  for (var ze = "", ke = 0, je = l.indexOf("$", ke); je !== -1 && ke < l.length; ) {
5285
5325
  ze += l.substring(ke, je), ke = je + 1;
5286
5326
  var ot = l.charAt(ke);
@@ -5303,7 +5343,7 @@ function Bs() {
5303
5343
  je = l.indexOf("$", ke);
5304
5344
  }
5305
5345
  return ze += l.substring(ke), ze;
5306
- } : x = l;
5346
+ } : _ = l;
5307
5347
  var M = "", q = 0;
5308
5348
  if (typeof g > "u" || g > 0) {
5309
5349
  var X = 0;
@@ -5316,7 +5356,7 @@ function Bs() {
5316
5356
  if (typeof pe < "u") {
5317
5357
  for (; typeof pe < "u" && (typeof g > "u" || X < g); ) {
5318
5358
  M += n.substring(q, pe.start);
5319
- var Pe = x.apply(p, [pe]);
5359
+ var Pe = _.apply(p, [pe]);
5320
5360
  if (se(Pe) && (Pe = await Pe), typeof Pe == "string")
5321
5361
  M += Pe;
5322
5362
  else
@@ -5436,10 +5476,10 @@ function Bs() {
5436
5476
  if (typeof o == "string")
5437
5477
  g = n.split(o, l);
5438
5478
  else {
5439
- var p = 0, x = await ue(o, n);
5440
- if (typeof x < "u") {
5441
- for (var M = 0; typeof x < "u" && (typeof l > "u" || p < l); )
5442
- g.push(n.substring(M, x.start)), M = x.end, x = await ue(x.next), p++;
5479
+ var p = 0, _ = await ue(o, n);
5480
+ if (typeof _ < "u") {
5481
+ for (var M = 0; typeof _ < "u" && (typeof l > "u" || p < l); )
5482
+ g.push(n.substring(M, _.start)), M = _.end, _ = await ue(_.next), p++;
5443
5483
  (typeof l > "u" || p < l) && g.push(n.substring(M));
5444
5484
  } else
5445
5485
  g.push(n);
@@ -5469,9 +5509,9 @@ function Bs() {
5469
5509
  typeof l < "u" && Object.keys(l).forEach(function(te) {
5470
5510
  p[te] = l[te];
5471
5511
  });
5472
- for (var x = [], M = p["zero-digit"].charCodeAt(0), q = M; q < M + 10; q++)
5473
- x.push(String.fromCharCode(q));
5474
- var X = x.concat([p["decimal-separator"], p["exponent-separator"], p["grouping-separator"], p.digit, p["pattern-separator"]]), De = o.split(p["pattern-separator"]);
5512
+ for (var _ = [], M = p["zero-digit"].charCodeAt(0), q = M; q < M + 10; q++)
5513
+ _.push(String.fromCharCode(q));
5514
+ var X = _.concat([p["decimal-separator"], p["exponent-separator"], p["grouping-separator"], p.digit, p["pattern-separator"]]), De = o.split(p["pattern-separator"]);
5475
5515
  if (De.length > 2)
5476
5516
  throw {
5477
5517
  code: "D3080",
@@ -5505,7 +5545,7 @@ function Bs() {
5505
5545
  var St = !1;
5506
5546
  for (Ye = 0; Ye < te.mantissaPart.length; Ye++) {
5507
5547
  var Qe = te.mantissaPart.charAt(Ye);
5508
- if (x.indexOf(Qe) !== -1 || Qe === p.digit) {
5548
+ if (_.indexOf(Qe) !== -1 || Qe === p.digit) {
5509
5549
  St = !0;
5510
5550
  break;
5511
5551
  }
@@ -5517,13 +5557,13 @@ function Bs() {
5517
5557
  It.indexOf("p") !== -1 && (Ie = "D3086"), Xe !== -1 ? (Ne.charAt(Xe - 1) === p["grouping-separator"] || Ne.charAt(Xe + 1) === p["grouping-separator"]) && (Ie = "D3087") : te.integerPart.charAt(te.integerPart.length - 1) === p["grouping-separator"] && (Ie = "D3088"), Ne.indexOf(p["grouping-separator"] + p["grouping-separator"]) !== -1 && (Ie = "D3089");
5518
5558
  var rt = te.integerPart.indexOf(p.digit);
5519
5559
  rt !== -1 && te.integerPart.substring(0, rt).split("").filter(function(Be) {
5520
- return x.indexOf(Be) > -1;
5560
+ return _.indexOf(Be) > -1;
5521
5561
  }).length > 0 && (Ie = "D3090"), rt = te.fractionalPart.lastIndexOf(p.digit), rt !== -1 && te.fractionalPart.substring(rt).split("").filter(function(Be) {
5522
- return x.indexOf(Be) > -1;
5562
+ return _.indexOf(Be) > -1;
5523
5563
  }).length > 0 && (Ie = "D3091");
5524
5564
  var ut = typeof te.exponentPart == "string";
5525
5565
  if (ut && te.exponentPart.length > 0 && (Ne.indexOf(p.percent) !== -1 || Ne.indexOf(p["per-mille"]) !== -1) && (Ie = "D3092"), ut && (te.exponentPart.length === 0 || te.exponentPart.split("").filter(function(Be) {
5526
- return x.indexOf(Be) === -1;
5566
+ return _.indexOf(Be) === -1;
5527
5567
  }).length > 0) && (Ie = "D3093"), Ie)
5528
5568
  throw {
5529
5569
  code: Ie,
@@ -5533,7 +5573,7 @@ function Bs() {
5533
5573
  var Ie = function(Ve, br) {
5534
5574
  for (var er = [], kt = Ve.indexOf(p["grouping-separator"]); kt !== -1; ) {
5535
5575
  var wr = (br ? Ve.substring(0, kt) : Ve.substring(kt)).split("").filter(function(zt) {
5536
- return x.indexOf(zt) !== -1 || zt === p.digit;
5576
+ return _.indexOf(zt) !== -1 || zt === p.digit;
5537
5577
  }).length;
5538
5578
  er.push(wr), kt = te.integerPart.indexOf(p["grouping-separator"], kt + 1);
5539
5579
  }
@@ -5548,16 +5588,16 @@ function Bs() {
5548
5588
  return 0;
5549
5589
  return er;
5550
5590
  }, Xe = Ne(Ye), St = Ie(te.fractionalPart, !0), Qe = te.integerPart.split("").filter(function(Ve) {
5551
- return x.indexOf(Ve) !== -1;
5591
+ return _.indexOf(Ve) !== -1;
5552
5592
  }).length, It = Qe, rt = te.fractionalPart.split(""), ut = rt.filter(function(Ve) {
5553
- return x.indexOf(Ve) !== -1;
5593
+ return _.indexOf(Ve) !== -1;
5554
5594
  }).length, Be = rt.filter(function(Ve) {
5555
- return x.indexOf(Ve) !== -1 || Ve === p.digit;
5595
+ return _.indexOf(Ve) !== -1 || Ve === p.digit;
5556
5596
  }).length, nt = typeof te.exponentPart == "string";
5557
5597
  Qe === 0 && Be === 0 && (nt ? (ut = 1, Be = 1) : Qe = 1), nt && Qe === 0 && te.integerPart.indexOf(p.digit) !== -1 && (Qe = 1), Qe === 0 && ut === 0 && (ut = 1);
5558
5598
  var Zr = 0;
5559
5599
  return nt && (Zr = te.exponentPart.split("").filter(function(Ve) {
5560
- return x.indexOf(Ve) !== -1;
5600
+ return _.indexOf(Ve) !== -1;
5561
5601
  }).length), {
5562
5602
  integerPartGroupingPositions: Ye,
5563
5603
  regularGrouping: Xe,
@@ -5592,7 +5632,7 @@ function Bs() {
5592
5632
  var Tn = F(Mt, $e.maximumFactionalPartSize), Lr = function(te, Ie) {
5593
5633
  var Ye = Math.abs(te).toFixed(Ie);
5594
5634
  return ot !== "0" && (Ye = Ye.split("").map(function(Ne) {
5595
- return Ne >= "0" && Ne <= "9" ? x[Ne.charCodeAt(0) - 48] : Ne;
5635
+ return Ne >= "0" && Ne <= "9" ? _[Ne.charCodeAt(0) - 48] : Ne;
5596
5636
  }).join("")), Ye;
5597
5637
  }, oe = Lr(Tn, $e.maximumFactionalPartSize), Ge = oe.indexOf(".");
5598
5638
  for (Ge === -1 ? oe = oe + We : oe = oe.replace(".", We); oe.charAt(0) === ot; )
@@ -5730,14 +5770,14 @@ function Bs() {
5730
5770
  return !K(n);
5731
5771
  }
5732
5772
  function he(n, o, l, g) {
5733
- var p = [o], x = me(n);
5734
- return x >= 2 && p.push(l), x >= 3 && p.push(g), p;
5773
+ var p = [o], _ = me(n);
5774
+ return _ >= 2 && p.push(l), _ >= 3 && p.push(g), p;
5735
5775
  }
5736
5776
  async function G(n, o) {
5737
5777
  if (!(typeof n > "u")) {
5738
5778
  for (var l = S(), g = 0; g < n.length; g++) {
5739
- var p = he(o, n[g], g, n), x = await o.apply(this, p);
5740
- typeof x < "u" && l.push(x);
5779
+ var p = he(o, n[g], g, n), _ = await o.apply(this, p);
5780
+ typeof _ < "u" && l.push(_);
5741
5781
  }
5742
5782
  return l;
5743
5783
  }
@@ -5745,7 +5785,7 @@ function Bs() {
5745
5785
  async function Ze(n, o) {
5746
5786
  if (!(typeof n > "u")) {
5747
5787
  for (var l = S(), g = 0; g < n.length; g++) {
5748
- var p = n[g], x = he(o, p, g, n), M = await o.apply(this, x);
5788
+ var p = n[g], _ = he(o, p, g, n), M = await o.apply(this, _);
5749
5789
  K(M) && l.push(p);
5750
5790
  }
5751
5791
  return l;
@@ -5754,14 +5794,14 @@ function Bs() {
5754
5794
  async function it(n, o) {
5755
5795
  if (!(typeof n > "u")) {
5756
5796
  for (var l = !1, g, p = 0; p < n.length; p++) {
5757
- var x = n[p], M = !0;
5797
+ var _ = n[p], M = !0;
5758
5798
  if (typeof o < "u") {
5759
- var q = he(o, x, p, n), X = await o.apply(this, q);
5799
+ var q = he(o, _, p, n), X = await o.apply(this, q);
5760
5800
  M = K(X);
5761
5801
  }
5762
5802
  if (M)
5763
5803
  if (!l)
5764
- g = x, l = !0;
5804
+ g = _, l = !0;
5765
5805
  else
5766
5806
  throw {
5767
5807
  stack: new Error().stack,
@@ -5778,10 +5818,10 @@ function Bs() {
5778
5818
  }
5779
5819
  }
5780
5820
  function qe() {
5781
- for (var n = [], o = Array.prototype.slice.call(arguments), l = Math.min.apply(Math, o.map(function(x) {
5782
- return Array.isArray(x) ? x.length : 0;
5821
+ for (var n = [], o = Array.prototype.slice.call(arguments), l = Math.min.apply(Math, o.map(function(_) {
5822
+ return Array.isArray(_) ? _.length : 0;
5783
5823
  })), g = 0; g < l; g++) {
5784
- var p = o.map((x) => x[g]);
5824
+ var p = o.map((_) => _[g]);
5785
5825
  n.push(p);
5786
5826
  }
5787
5827
  return n;
@@ -5795,10 +5835,10 @@ function Bs() {
5795
5835
  code: "D3050",
5796
5836
  index: 1
5797
5837
  };
5798
- var x;
5799
- for (typeof l > "u" && n.length > 0 ? (g = n[0], x = 1) : (g = l, x = 0); x < n.length; ) {
5800
- var M = [g, n[x]];
5801
- p >= 3 && M.push(x), p >= 4 && M.push(n), g = await o.apply(this, M), x++;
5838
+ var _;
5839
+ for (typeof l > "u" && n.length > 0 ? (g = n[0], _ = 1) : (g = l, _ = 0); _ < n.length; ) {
5840
+ var M = [g, n[_]];
5841
+ p >= 3 && M.push(_), p >= 4 && M.push(n), g = await o.apply(this, M), _++;
5802
5842
  }
5803
5843
  return g;
5804
5844
  }
@@ -5809,8 +5849,8 @@ function Bs() {
5809
5849
  var l = {};
5810
5850
  n.forEach(function(g) {
5811
5851
  var p = He(g);
5812
- p.forEach(function(x) {
5813
- l[x] = !0;
5852
+ p.forEach(function(_) {
5853
+ l[_] = !0;
5814
5854
  });
5815
5855
  }), o = He(l);
5816
5856
  } else n !== null && typeof n == "object" && !E(n) && Object.keys(n).forEach((g) => o.push(g));
@@ -5822,7 +5862,7 @@ function Bs() {
5822
5862
  l = S();
5823
5863
  for (var g = 0; g < n.length; g++) {
5824
5864
  var p = wt(n[g], o);
5825
- typeof p < "u" && (Array.isArray(p) ? p.forEach((x) => l.push(x)) : l.push(p));
5865
+ typeof p < "u" && (Array.isArray(p) ? p.forEach((_) => l.push(_)) : l.push(p));
5826
5866
  }
5827
5867
  } else n !== null && typeof n == "object" && !E(n) && (l = n[o]);
5828
5868
  return l;
@@ -5869,8 +5909,8 @@ function Bs() {
5869
5909
  async function Jt(n, o) {
5870
5910
  var l = S();
5871
5911
  for (var g in n) {
5872
- var p = he(o, n[g], g, n), x = await o.apply(this, p);
5873
- typeof x < "u" && l.push(x);
5912
+ var p = he(o, n[g], g, n), _ = await o.apply(this, p);
5913
+ typeof _ < "u" && l.push(_);
5874
5914
  }
5875
5915
  return l;
5876
5916
  }
@@ -5899,7 +5939,7 @@ function Bs() {
5899
5939
  return n;
5900
5940
  var l;
5901
5941
  if (typeof o > "u") {
5902
- if (!I(n) && !_(n))
5942
+ if (!I(n) && !k(n))
5903
5943
  throw {
5904
5944
  stack: new Error().stack,
5905
5945
  code: "D3070",
@@ -5920,8 +5960,8 @@ function Bs() {
5920
5960
  return M;
5921
5961
  var q = Math.floor(M.length / 2), X = M.slice(0, q), De = M.slice(q);
5922
5962
  return X = await p(X), De = await p(De), await g(X, De);
5923
- }, x = await p(n);
5924
- return x;
5963
+ }, _ = await p(n);
5964
+ return _;
5925
5965
  }
5926
5966
  }
5927
5967
  function u(n) {
@@ -5939,9 +5979,9 @@ function Bs() {
5939
5979
  if (!(typeof n > "u")) {
5940
5980
  if (!Array.isArray(n) || n.length <= 1)
5941
5981
  return n;
5942
- for (var o = k(n) ? S() : [], l = 0; l < n.length; l++) {
5943
- for (var g = n[l], p = !1, x = 0; x < o.length; x++)
5944
- if (ge(g, o[x])) {
5982
+ for (var o = x(n) ? S() : [], l = 0; l < n.length; l++) {
5983
+ for (var g = n[l], p = !1, _ = 0; _ < o.length; _++)
5984
+ if (ge(g, o[_])) {
5945
5985
  p = !0;
5946
5986
  break;
5947
5987
  }
@@ -5953,7 +5993,7 @@ function Bs() {
5953
5993
  async function y(n, o) {
5954
5994
  var l = {};
5955
5995
  for (var g in n) {
5956
- var p = n[g], x = he(o, p, g, n), M = await o.apply(this, x);
5996
+ var p = n[g], _ = he(o, p, g, n), M = await o.apply(this, _);
5957
5997
  K(M) && (l[g] = p);
5958
5998
  }
5959
5999
  return Object.keys(l).length === 0 && (l = void 0), l;
@@ -6022,8 +6062,8 @@ function Bs() {
6022
6062
  }).call(this);
6023
6063
  }).call(this, typeof Hr < "u" ? Hr : typeof self < "u" ? self : typeof window < "u" ? window : {});
6024
6064
  }, { "./utils": 6 }], 3: [function(t, a, s) {
6025
- var i = t("./datetime"), c = t("./functions"), f = t("./utils"), b = t("./parser"), _ = t("./signature"), I = (function() {
6026
- var S = f.isNumeric, k = f.isArrayOfStrings, E = f.isArrayOfNumbers, R = f.createSequence, se = f.isSequence, me = f.isFunction, ge = f.isLambda, H = f.isIterable, N = f.isPromise, ne = f.getFunctionArity, B = f.isDeepEqual, T = ct(null);
6065
+ var i = t("./datetime"), c = t("./functions"), f = t("./utils"), b = t("./parser"), k = t("./signature"), I = (function() {
6066
+ var S = f.isNumeric, x = f.isArrayOfStrings, E = f.isArrayOfNumbers, R = f.createSequence, se = f.isSequence, me = f.isFunction, ge = f.isLambda, H = f.isIterable, N = f.isPromise, ne = f.getFunctionArity, B = f.isDeepEqual, T = ct(null);
6027
6067
  async function L(u, h, y) {
6028
6068
  var n, o = y.lookup(Symbol.for("jsonata.__evaluate_entry"));
6029
6069
  switch (o && await o(u, h, y), u.type) {
@@ -6095,10 +6135,10 @@ function Bs() {
6095
6135
  var n;
6096
6136
  Array.isArray(h) && u.steps[0].type !== "variable" ? n = h : n = R(h);
6097
6137
  for (var o, l = !1, g = void 0, p = 0; p < u.steps.length; p++) {
6098
- var x = u.steps[p];
6099
- if (x.tuple && (l = !0), p === 0 && x.consarray ? o = await L(x, n, y) : l ? g = await Ae(x, n, g, y) : o = await xe(x, n, y, p === u.steps.length - 1), !l && (typeof o > "u" || o.length === 0))
6138
+ var _ = u.steps[p];
6139
+ if (_.tuple && (l = !0), p === 0 && _.consarray ? o = await L(_, n, y) : l ? g = await Ae(_, n, g, y) : o = await xe(_, n, y, p === u.steps.length - 1), !l && (typeof o > "u" || o.length === 0))
6100
6140
  break;
6101
- typeof x.focus > "u" && (n = o);
6141
+ typeof _.focus > "u" && (n = o);
6102
6142
  }
6103
6143
  if (l)
6104
6144
  if (u.tuple)
@@ -6126,10 +6166,10 @@ function Bs() {
6126
6166
  g = await ve(u.stages[p].expr, g, y);
6127
6167
  typeof g < "u" && o.push(g);
6128
6168
  }
6129
- var x = R();
6130
- return n && o.length === 1 && Array.isArray(o[0]) && !se(o[0]) ? x = o[0] : o.forEach(function(M) {
6131
- !Array.isArray(M) || M.cons ? x.push(M) : M.forEach((q) => x.push(q));
6132
- }), x;
6169
+ var _ = R();
6170
+ return n && o.length === 1 && Array.isArray(o[0]) && !se(o[0]) ? _ = o[0] : o.forEach(function(M) {
6171
+ !Array.isArray(M) || M.cons ? _.push(M) : M.forEach((q) => _.push(q));
6172
+ }), _;
6133
6173
  }
6134
6174
  async function Te(u, h, y) {
6135
6175
  for (var n = h, o = 0; o < u.length; o++) {
@@ -6164,11 +6204,11 @@ function Bs() {
6164
6204
  return u.stages && (o = await Te(u.stages, o, n)), o;
6165
6205
  }
6166
6206
  o = R(), o.tupleStream = !0;
6167
- var x = n;
6207
+ var _ = n;
6168
6208
  y === void 0 && (y = h.map((De) => ({ "@": De })));
6169
6209
  for (var M = 0; M < y.length; M++) {
6170
- x = de(n, y[M]);
6171
- var q = await L(u, y[M]["@"], x);
6210
+ _ = de(n, y[M]);
6211
+ var q = await L(u, y[M]["@"], _);
6172
6212
  if (typeof q < "u") {
6173
6213
  Array.isArray(q) || (q = [q]);
6174
6214
  for (var X = 0; X < q.length; X++)
@@ -6188,11 +6228,11 @@ function Bs() {
6188
6228
  for (o = 0; o < h.length; o++) {
6189
6229
  var l = h[o], g = l, p = y;
6190
6230
  h.tupleStream && (g = l["@"], p = de(y, l));
6191
- var x = await L(u, g, p);
6192
- S(x) && (x = [x]), E(x) ? x.forEach(function(q) {
6231
+ var _ = await L(u, g, p);
6232
+ S(_) && (_ = [_]), E(_) ? _.forEach(function(q) {
6193
6233
  var X = Math.floor(q);
6194
6234
  X < 0 && (X = h.length + X), X === o && n.push(l);
6195
- }) : c.boolean(x) && n.push(l);
6235
+ }) : c.boolean(_) && n.push(l);
6196
6236
  }
6197
6237
  return n;
6198
6238
  }
@@ -6201,8 +6241,8 @@ function Bs() {
6201
6241
  if (l === "and" || l === "or")
6202
6242
  try {
6203
6243
  return await Oe(o, g, l);
6204
- } catch (x) {
6205
- throw x.position = u.position, x.token = l, x;
6244
+ } catch (_) {
6245
+ throw _.position = u.position, _.token = l, _;
6206
6246
  }
6207
6247
  var p = await g();
6208
6248
  try {
@@ -6234,8 +6274,8 @@ function Bs() {
6234
6274
  n = le(o, p);
6235
6275
  break;
6236
6276
  }
6237
- } catch (x) {
6238
- throw x.position = u.position, x.token = l, x;
6277
+ } catch (_) {
6278
+ throw _.position = u.position, _.token = l, _;
6239
6279
  }
6240
6280
  return n;
6241
6281
  }
@@ -6258,7 +6298,7 @@ function Bs() {
6258
6298
  break;
6259
6299
  case "[":
6260
6300
  n = [];
6261
- let g = await Promise.all(u.expressions.map(async (p, x) => (y.isParallelCall = x > 0, [p, await L(p, h, y)])));
6301
+ let g = await Promise.all(u.expressions.map(async (p, _) => (y.isParallelCall = _ > 0, [p, await L(p, h, y)])));
6262
6302
  for (let p of g) {
6263
6303
  var [o, l] = p;
6264
6304
  typeof l < "u" && (o.value === "[" ? n.push(l) : n = c.append(n, l));
@@ -6422,8 +6462,8 @@ function Bs() {
6422
6462
  var n = {}, o = {}, l = !!(h && h.tupleStream);
6423
6463
  Array.isArray(h) || (h = R(h)), h.length === 0 && h.push(void 0);
6424
6464
  for (var g = 0; g < h.length; g++)
6425
- for (var p = h[g], x = l ? de(y, p) : y, M = 0; M < u.lhs.length; M++) {
6426
- var q = u.lhs[M], X = await L(q[0], l ? p["@"] : p, x);
6465
+ for (var p = h[g], _ = l ? de(y, p) : y, M = 0; M < u.lhs.length; M++) {
6466
+ var q = u.lhs[M], X = await L(q[0], l ? p["@"] : p, _);
6427
6467
  if (typeof X != "string" && X !== void 0)
6428
6468
  throw {
6429
6469
  code: "T1003",
@@ -6528,15 +6568,15 @@ function Bs() {
6528
6568
  l.groups.push(g[p]);
6529
6569
  l.next = function() {
6530
6570
  if (!(h.lastIndex >= n.length)) {
6531
- var x = y(n, h.lastIndex);
6532
- if (x && x.match === "")
6571
+ var _ = y(n, h.lastIndex);
6572
+ if (_ && _.match === "")
6533
6573
  throw {
6534
6574
  code: "D1004",
6535
6575
  stack: new Error().stack,
6536
6576
  position: u.position,
6537
6577
  value: u.value.source
6538
6578
  };
6539
- return x;
6579
+ return _;
6540
6580
  }
6541
6581
  };
6542
6582
  }
@@ -6549,10 +6589,10 @@ function Bs() {
6549
6589
  return u.value === "" ? n = h && h.outerWrapper ? h[0] : h : n = y.lookup(u.value), n;
6550
6590
  }
6551
6591
  async function ye(u, h, y) {
6552
- var n, o = h, l = !!h.tupleStream, g = async function(x, M) {
6592
+ var n, o = h, l = !!h.tupleStream, g = async function(_, M) {
6553
6593
  for (var q = 0, X = 0; q === 0 && X < u.terms.length; X++) {
6554
- var De = u.terms[X], pe = x, Pe = y;
6555
- l && (pe = x["@"], Pe = de(y, x));
6594
+ var De = u.terms[X], pe = _, Pe = y;
6595
+ l && (pe = _["@"], Pe = de(y, _));
6556
6596
  var Se = await L(De.expression, pe, Pe);
6557
6597
  pe = M, Pe = y, l && (pe = M["@"], Pe = de(y, M));
6558
6598
  var ze = await L(De.expression, pe, Pe), ke = typeof Se, je = typeof ze;
@@ -6601,8 +6641,8 @@ function Bs() {
6601
6641
  var g = await G(l, [o], null, y), p = await L(u.pattern, g, y);
6602
6642
  if (typeof p < "u") {
6603
6643
  Array.isArray(p) || (p = [p]);
6604
- for (var x = 0; x < p.length; x++) {
6605
- var M = p[x];
6644
+ for (var _ = 0; _ < p.length; _++) {
6645
+ var M = p[_];
6606
6646
  if (M && (M.isPrototypeOf(g) || M instanceof Object.constructor))
6607
6647
  throw {
6608
6648
  code: "D1010",
@@ -6625,7 +6665,7 @@ function Bs() {
6625
6665
  var pe = await L(u.delete, M, y);
6626
6666
  if (typeof pe < "u") {
6627
6667
  var Pe = pe;
6628
- if (Array.isArray(pe) || (pe = [pe]), !k(pe))
6668
+ if (Array.isArray(pe) || (pe = [pe]), !x(pe))
6629
6669
  throw {
6630
6670
  code: "T2012",
6631
6671
  stack: new Error().stack,
@@ -6686,11 +6726,11 @@ function Bs() {
6686
6726
  } else
6687
6727
  g.push(M);
6688
6728
  }
6689
- var x = u.procedure.type === "path" ? u.procedure.steps[0].value : u.procedure.value;
6729
+ var _ = u.procedure.type === "path" ? u.procedure.steps[0].value : u.procedure.value;
6690
6730
  try {
6691
- typeof l == "object" && (l.token = x, l.position = u.position), o = await G(l, g, h, y);
6731
+ typeof l == "object" && (l.token = _, l.position = u.position), o = await G(l, g, h, y);
6692
6732
  } catch (M) {
6693
- throw M.position || (M.position = u.position), M.token || (M.token = x), M;
6733
+ throw M.position || (M.position = u.position), M.token || (M.token = _), M;
6694
6734
  }
6695
6735
  return o;
6696
6736
  }
@@ -6824,7 +6864,7 @@ function Bs() {
6824
6864
  _jsonata_function: !0,
6825
6865
  implementation: u
6826
6866
  };
6827
- return typeof h < "u" && (y.signature = _(h)), y;
6867
+ return typeof h < "u" && (y.signature = k(h)), y;
6828
6868
  }
6829
6869
  async function yr(u, h) {
6830
6870
  if (!(typeof u > "u")) {
@@ -7006,7 +7046,7 @@ function Bs() {
7006
7046
  }, "<s?s?:s>")), o.bind("millis", Z(function() {
7007
7047
  return l.getTime();
7008
7048
  }, "<:n>")), h && h.RegexEngine ? Ce.RegexEngine = h.RegexEngine : Ce.RegexEngine = RegExp, {
7009
- evaluate: async function(g, p, x) {
7049
+ evaluate: async function(g, p, _) {
7010
7050
  if (typeof n < "u") {
7011
7051
  var M = {
7012
7052
  code: "S0500",
@@ -7024,7 +7064,7 @@ function Bs() {
7024
7064
  q.bind("$", g), l = /* @__PURE__ */ new Date(), q.timestamp = l, Array.isArray(g) && !se(g) && (g = R(g), g.outerWrapper = !0);
7025
7065
  var De;
7026
7066
  try {
7027
- return De = await L(y, g, q), typeof x == "function" && x(null, De), De;
7067
+ return De = await L(y, g, q), typeof _ == "function" && _(null, De), De;
7028
7068
  } catch (pe) {
7029
7069
  throw mt(pe), pe;
7030
7070
  }
@@ -7032,8 +7072,8 @@ function Bs() {
7032
7072
  assign: function(g, p) {
7033
7073
  o.bind(g, p);
7034
7074
  },
7035
- registerFunction: function(g, p, x) {
7036
- var M = Z(p, x);
7075
+ registerFunction: function(g, p, _) {
7076
+ var M = Z(p, _);
7037
7077
  o.bind(g, M);
7038
7078
  },
7039
7079
  ast: function() {
@@ -7102,12 +7142,12 @@ function Bs() {
7102
7142
  `,
7103
7143
  r: "\r",
7104
7144
  t: " "
7105
- }, _ = function(S) {
7106
- var k = 0, E = S.length, R = function(ge, H) {
7107
- var N = { type: ge, value: H, position: k };
7145
+ }, k = function(S) {
7146
+ var x = 0, E = S.length, R = function(ge, H) {
7147
+ var N = { type: ge, value: H, position: x };
7108
7148
  return N;
7109
7149
  }, se = function() {
7110
- for (var ge = k, H = 0, N, ne, B = function(L) {
7150
+ for (var ge = x, H = 0, N, ne, B = function(L) {
7111
7151
  if (S.charAt(L) === "/" && H === 0) {
7112
7152
  for (var W = 0; S.charAt(L - (W + 1)) === "\\"; )
7113
7153
  W++;
@@ -7115,132 +7155,132 @@ function Bs() {
7115
7155
  return !0;
7116
7156
  }
7117
7157
  return !1;
7118
- }; k < E; ) {
7119
- var T = S.charAt(k);
7120
- if (B(k)) {
7121
- if (N = S.substring(ge, k), N === "")
7158
+ }; x < E; ) {
7159
+ var T = S.charAt(x);
7160
+ if (B(x)) {
7161
+ if (N = S.substring(ge, x), N === "")
7122
7162
  throw {
7123
7163
  code: "S0301",
7124
7164
  stack: new Error().stack,
7125
- position: k
7165
+ position: x
7126
7166
  };
7127
- for (k++, T = S.charAt(k), ge = k; T === "i" || T === "m"; )
7128
- k++, T = S.charAt(k);
7129
- return ne = S.substring(ge, k) + "g", new RegExp(N, ne);
7167
+ for (x++, T = S.charAt(x), ge = x; T === "i" || T === "m"; )
7168
+ x++, T = S.charAt(x);
7169
+ return ne = S.substring(ge, x) + "g", new RegExp(N, ne);
7130
7170
  }
7131
- (T === "(" || T === "[" || T === "{") && S.charAt(k - 1) !== "\\" && H++, (T === ")" || T === "]" || T === "}") && S.charAt(k - 1) !== "\\" && H--, k++;
7171
+ (T === "(" || T === "[" || T === "{") && S.charAt(x - 1) !== "\\" && H++, (T === ")" || T === "]" || T === "}") && S.charAt(x - 1) !== "\\" && H--, x++;
7132
7172
  }
7133
7173
  throw {
7134
7174
  code: "S0302",
7135
7175
  stack: new Error().stack,
7136
- position: k
7176
+ position: x
7137
7177
  };
7138
7178
  }, me = function(ge) {
7139
- if (k >= E) return null;
7140
- for (var H = S.charAt(k); k < E && `
7179
+ if (x >= E) return null;
7180
+ for (var H = S.charAt(x); x < E && `
7141
7181
  \r\v`.indexOf(H) > -1; )
7142
- k++, H = S.charAt(k);
7143
- if (H === "/" && S.charAt(k + 1) === "*") {
7144
- var N = k;
7145
- for (k += 2, H = S.charAt(k); !(H === "*" && S.charAt(k + 1) === "/"); )
7146
- if (H = S.charAt(++k), k >= E)
7182
+ x++, H = S.charAt(x);
7183
+ if (H === "/" && S.charAt(x + 1) === "*") {
7184
+ var N = x;
7185
+ for (x += 2, H = S.charAt(x); !(H === "*" && S.charAt(x + 1) === "/"); )
7186
+ if (H = S.charAt(++x), x >= E)
7147
7187
  throw {
7148
7188
  code: "S0106",
7149
7189
  stack: new Error().stack,
7150
7190
  position: N
7151
7191
  };
7152
- return k += 2, H = S.charAt(k), me(ge);
7192
+ return x += 2, H = S.charAt(x), me(ge);
7153
7193
  }
7154
7194
  if (ge !== !0 && H === "/")
7155
- return k++, R("regex", se());
7156
- if (H === "." && S.charAt(k + 1) === ".")
7157
- return k += 2, R("operator", "..");
7158
- if (H === ":" && S.charAt(k + 1) === "=")
7159
- return k += 2, R("operator", ":=");
7160
- if (H === "!" && S.charAt(k + 1) === "=")
7161
- return k += 2, R("operator", "!=");
7162
- if (H === ">" && S.charAt(k + 1) === "=")
7163
- return k += 2, R("operator", ">=");
7164
- if (H === "<" && S.charAt(k + 1) === "=")
7165
- return k += 2, R("operator", "<=");
7166
- if (H === "*" && S.charAt(k + 1) === "*")
7167
- return k += 2, R("operator", "**");
7168
- if (H === "~" && S.charAt(k + 1) === ">")
7169
- return k += 2, R("operator", "~>");
7170
- if (H === "?" && S.charAt(k + 1) === ":")
7171
- return k += 2, R("operator", "?:");
7172
- if (H === "?" && S.charAt(k + 1) === "?")
7173
- return k += 2, R("operator", "??");
7195
+ return x++, R("regex", se());
7196
+ if (H === "." && S.charAt(x + 1) === ".")
7197
+ return x += 2, R("operator", "..");
7198
+ if (H === ":" && S.charAt(x + 1) === "=")
7199
+ return x += 2, R("operator", ":=");
7200
+ if (H === "!" && S.charAt(x + 1) === "=")
7201
+ return x += 2, R("operator", "!=");
7202
+ if (H === ">" && S.charAt(x + 1) === "=")
7203
+ return x += 2, R("operator", ">=");
7204
+ if (H === "<" && S.charAt(x + 1) === "=")
7205
+ return x += 2, R("operator", "<=");
7206
+ if (H === "*" && S.charAt(x + 1) === "*")
7207
+ return x += 2, R("operator", "**");
7208
+ if (H === "~" && S.charAt(x + 1) === ">")
7209
+ return x += 2, R("operator", "~>");
7210
+ if (H === "?" && S.charAt(x + 1) === ":")
7211
+ return x += 2, R("operator", "?:");
7212
+ if (H === "?" && S.charAt(x + 1) === "?")
7213
+ return x += 2, R("operator", "??");
7174
7214
  if (Object.prototype.hasOwnProperty.call(f, H))
7175
- return k++, R("operator", H);
7215
+ return x++, R("operator", H);
7176
7216
  if (H === '"' || H === "'") {
7177
7217
  var ne = H;
7178
- k++;
7179
- for (var B = ""; k < E; ) {
7180
- if (H = S.charAt(k), H === "\\")
7181
- if (k++, H = S.charAt(k), Object.prototype.hasOwnProperty.call(b, H))
7218
+ x++;
7219
+ for (var B = ""; x < E; ) {
7220
+ if (H = S.charAt(x), H === "\\")
7221
+ if (x++, H = S.charAt(x), Object.prototype.hasOwnProperty.call(b, H))
7182
7222
  B += b[H];
7183
7223
  else if (H === "u") {
7184
- var T = S.substr(k + 1, 4);
7224
+ var T = S.substr(x + 1, 4);
7185
7225
  if (/^[0-9a-fA-F]+$/.test(T)) {
7186
7226
  var L = parseInt(T, 16);
7187
- B += String.fromCharCode(L), k += 4;
7227
+ B += String.fromCharCode(L), x += 4;
7188
7228
  } else
7189
7229
  throw {
7190
7230
  code: "S0104",
7191
7231
  stack: new Error().stack,
7192
- position: k
7232
+ position: x
7193
7233
  };
7194
7234
  } else
7195
7235
  throw {
7196
7236
  code: "S0103",
7197
7237
  stack: new Error().stack,
7198
- position: k,
7238
+ position: x,
7199
7239
  token: H
7200
7240
  };
7201
7241
  else {
7202
7242
  if (H === ne)
7203
- return k++, R("string", B);
7243
+ return x++, R("string", B);
7204
7244
  B += H;
7205
7245
  }
7206
- k++;
7246
+ x++;
7207
7247
  }
7208
7248
  throw {
7209
7249
  code: "S0101",
7210
7250
  stack: new Error().stack,
7211
- position: k
7251
+ position: x
7212
7252
  };
7213
7253
  }
7214
- var W = /^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/, de = W.exec(S.substring(k));
7254
+ var W = /^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/, de = W.exec(S.substring(x));
7215
7255
  if (de !== null) {
7216
7256
  var xe = parseFloat(de[0]);
7217
7257
  if (!isNaN(xe) && isFinite(xe))
7218
- return k += de[0].length, R("number", xe);
7258
+ return x += de[0].length, R("number", xe);
7219
7259
  throw {
7220
7260
  code: "S0102",
7221
7261
  stack: new Error().stack,
7222
- position: k,
7262
+ position: x,
7223
7263
  token: de[0]
7224
7264
  };
7225
7265
  }
7226
7266
  var Te;
7227
7267
  if (H === "`") {
7228
- k++;
7229
- var Ae = S.indexOf("`", k);
7268
+ x++;
7269
+ var Ae = S.indexOf("`", x);
7230
7270
  if (Ae !== -1)
7231
- return Te = S.substring(k, Ae), k = Ae + 1, R("name", Te);
7232
- throw k = E, {
7271
+ return Te = S.substring(x, Ae), x = Ae + 1, R("name", Te);
7272
+ throw x = E, {
7233
7273
  code: "S0105",
7234
7274
  stack: new Error().stack,
7235
- position: k
7275
+ position: x
7236
7276
  };
7237
7277
  }
7238
- for (var ve = k, Me; ; )
7278
+ for (var ve = x, Me; ; )
7239
7279
  if (Me = S.charAt(ve), ve === E || `
7240
7280
  \r\v`.indexOf(Me) > -1 || Object.prototype.hasOwnProperty.call(f, Me)) {
7241
- if (S.charAt(k) === "$")
7242
- return Te = S.substring(k + 1, ve), k = ve, R("variable", Te);
7243
- switch (Te = S.substring(k, ve), k = ve, Te) {
7281
+ if (S.charAt(x) === "$")
7282
+ return Te = S.substring(x + 1, ve), x = ve, R("variable", Te);
7283
+ switch (Te = S.substring(x, ve), x = ve, Te) {
7244
7284
  case "or":
7245
7285
  case "in":
7246
7286
  case "and":
@@ -7252,13 +7292,13 @@ function Bs() {
7252
7292
  case "null":
7253
7293
  return R("value", null);
7254
7294
  default:
7255
- return k === E && Te === "" ? null : R("name", Te);
7295
+ return x === E && Te === "" ? null : R("name", Te);
7256
7296
  }
7257
7297
  } else
7258
7298
  ve++;
7259
7299
  };
7260
7300
  return me;
7261
- }, I = function(S, k) {
7301
+ }, I = function(S, x) {
7262
7302
  var E, R, se = {}, me = [], ge = function() {
7263
7303
  var d = [];
7264
7304
  E.id !== "(end)" && d.push({ type: E.type, value: E.value, position: E.position });
@@ -7272,7 +7312,7 @@ function Bs() {
7272
7312
  token: this.value,
7273
7313
  position: this.position
7274
7314
  };
7275
- if (k)
7315
+ if (x)
7276
7316
  return d.remaining = ge(), d.type = "error", me.push(d), d;
7277
7317
  throw d.stack = new Error().stack, d;
7278
7318
  }
@@ -7280,7 +7320,7 @@ function Bs() {
7280
7320
  var V = se[d];
7281
7321
  return m = m || 0, V ? m >= V.lbp && (V.lbp = m) : (V = Object.create(H), V.id = V.value = d, V.lbp = m, se[d] = V), V;
7282
7322
  }, ne = function(d) {
7283
- if (k) {
7323
+ if (x) {
7284
7324
  d.remaining = ge(), me.push(d);
7285
7325
  var m = se["(error)"];
7286
7326
  return E = Object.create(m), E.error = d, E.type = "(error)", E;
@@ -7714,13 +7754,13 @@ function Bs() {
7714
7754
  position: d.position,
7715
7755
  token: d.value
7716
7756
  };
7717
- if (k)
7757
+ if (x)
7718
7758
  return me.push(C), { type: "error", error: C };
7719
7759
  throw C.stack = new Error().stack, C;
7720
7760
  }
7721
7761
  return d.keepArray && (m.keepArray = !0), m;
7722
7762
  };
7723
- R = _(S), B();
7763
+ R = k(S), B();
7724
7764
  var Fe = T(0);
7725
7765
  if (E.id !== "(end)") {
7726
7766
  var st = {
@@ -7752,13 +7792,13 @@ function Bs() {
7752
7792
  o: "objects",
7753
7793
  s: "strings"
7754
7794
  };
7755
- function b(_) {
7756
- for (var I = 1, S = [], k = {}, E = k; I < _.length; ) {
7757
- var R = _.charAt(I);
7795
+ function b(k) {
7796
+ for (var I = 1, S = [], x = {}, E = x; I < k.length; ) {
7797
+ var R = k.charAt(I);
7758
7798
  if (R === ":")
7759
7799
  break;
7760
7800
  var se = function() {
7761
- S.push(k), E = k, k = {};
7801
+ S.push(x), E = x, x = {};
7762
7802
  }, me = function(W, de, xe, Te) {
7763
7803
  for (var Ae = 1, ve = de; ve < W.length; )
7764
7804
  if (ve++, R = W.charAt(ve), R === Te) {
@@ -7777,19 +7817,19 @@ function Bs() {
7777
7817
  case "l":
7778
7818
  // not so sure about expecting null?
7779
7819
  case "o":
7780
- k.regex = "[" + R + "m]", k.type = R, se();
7820
+ x.regex = "[" + R + "m]", x.type = R, se();
7781
7821
  break;
7782
7822
  case "a":
7783
- k.regex = "[asnblfom]", k.type = R, k.array = !0, se();
7823
+ x.regex = "[asnblfom]", x.type = R, x.array = !0, se();
7784
7824
  break;
7785
7825
  case "f":
7786
- k.regex = "f", k.type = R, se();
7826
+ x.regex = "f", x.type = R, se();
7787
7827
  break;
7788
7828
  case "j":
7789
- k.regex = "[asnblom]", k.type = R, se();
7829
+ x.regex = "[asnblom]", x.type = R, se();
7790
7830
  break;
7791
7831
  case "x":
7792
- k.regex = "[asnblfom]", k.type = R, se();
7832
+ x.regex = "[asnblfom]", x.type = R, se();
7793
7833
  break;
7794
7834
  case "-":
7795
7835
  E.context = !0, E.contextRegex = new RegExp(E.regex), E.regex += "?";
@@ -7800,9 +7840,9 @@ function Bs() {
7800
7840
  E.regex += R;
7801
7841
  break;
7802
7842
  case "(":
7803
- var ge = me(_, I, "(", ")"), H = _.substring(I + 1, ge);
7843
+ var ge = me(k, I, "(", ")"), H = k.substring(I + 1, ge);
7804
7844
  if (H.indexOf("<") === -1)
7805
- k.regex = "[" + H + "m]";
7845
+ x.regex = "[" + H + "m]";
7806
7846
  else
7807
7847
  throw {
7808
7848
  code: "S0402",
@@ -7810,12 +7850,12 @@ function Bs() {
7810
7850
  value: H,
7811
7851
  offset: I
7812
7852
  };
7813
- k.type = "(" + H + ")", I = ge, se();
7853
+ x.type = "(" + H + ")", I = ge, se();
7814
7854
  break;
7815
7855
  case "<":
7816
7856
  if (E.type === "a" || E.type === "f") {
7817
- var N = me(_, I, "<", ">");
7818
- E.subtype = _.substring(I + 1, N), I = N;
7857
+ var N = me(k, I, "<", ">");
7858
+ E.subtype = k.substring(I + 1, N), I = N;
7819
7859
  } else
7820
7860
  throw {
7821
7861
  code: "S0401",
@@ -7875,7 +7915,7 @@ function Bs() {
7875
7915
  };
7876
7916
  };
7877
7917
  return {
7878
- definition: _,
7918
+ definition: k,
7879
7919
  validate: function(W, de) {
7880
7920
  var xe = "";
7881
7921
  W.forEach(function(Me) {
@@ -7970,7 +8010,7 @@ function Bs() {
7970
8010
  return !c(B);
7971
8011
  }).length === 0), ne;
7972
8012
  }
7973
- function _() {
8013
+ function k() {
7974
8014
  var N = [];
7975
8015
  return N.sequence = !0, arguments.length === 1 && N.push(arguments[0]), N;
7976
8016
  }
@@ -7980,7 +8020,7 @@ function Bs() {
7980
8020
  function S(N) {
7981
8021
  return N && (N._jsonata_function === !0 || N._jsonata_lambda === !0) || typeof N == "function";
7982
8022
  }
7983
- function k(N) {
8023
+ function x(N) {
7984
8024
  var ne = typeof N.arity == "number" ? N.arity : typeof N.implementation == "function" ? N.implementation.length : typeof N.length == "number" ? N.length : N.arguments.length;
7985
8025
  return ne;
7986
8026
  }
@@ -8031,12 +8071,12 @@ function Bs() {
8031
8071
  isNumeric: c,
8032
8072
  isArrayOfStrings: f,
8033
8073
  isArrayOfNumbers: b,
8034
- createSequence: _,
8074
+ createSequence: k,
8035
8075
  isSequence: I,
8036
8076
  isFunction: S,
8037
8077
  isLambda: E,
8038
8078
  isIterable: se,
8039
- getFunctionArity: k,
8079
+ getFunctionArity: x,
8040
8080
  isDeepEqual: me,
8041
8081
  stringToArray: H,
8042
8082
  isPromise: ge