@fluid-app/fluid-cli-theme-dev 0.1.63 → 0.1.64

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.
Files changed (137) hide show
  1. package/README.md +1 -1
  2. package/dist/dist-cli-preview/.vite/manifest.json +225 -225
  3. package/dist/dist-cli-preview/account-screens.js +1 -1
  4. package/dist/dist-cli-preview/chunks/{Breadcrumb-CZ-skiUy.js → Breadcrumb-BQKo8hPc.js} +1 -1
  5. package/dist/dist-cli-preview/chunks/{Combobox-BGiCYa56.js → Combobox-cf11L_T-.js} +4 -4
  6. package/dist/dist-cli-preview/chunks/{ContactsScreen-vsNgy_gn.js → ContactsScreen-gIiy4u7c.js} +1160 -1155
  7. package/dist/dist-cli-preview/chunks/{MemberManagementProviders-DMwkh3JW.js → MemberManagementProviders-C1bwc3tB.js} +258 -224
  8. package/dist/dist-cli-preview/chunks/{MessagingScreen-DzJOwPGH.js → MessagingScreen-B8ZxAE0L.js} +3904 -3927
  9. package/dist/dist-cli-preview/chunks/{MobileActionSheet-DqVPgFKI.js → MobileActionSheet-DMeTsLlK.js} +100 -100
  10. package/dist/dist-cli-preview/chunks/{MySiteScreen-BSmWlCKA.js → MySiteScreen-Dtw1rsF9.js} +69 -69
  11. package/dist/dist-cli-preview/chunks/OrdersScreen-C-b6i5jB.js +9 -0
  12. package/dist/dist-cli-preview/chunks/{OrdersScreen-CVEl9FnN.js → OrdersScreen-D9HfcTaa.js} +247 -249
  13. package/dist/dist-cli-preview/chunks/{ProfileScreen-BC5gyJDY.js → ProfileScreen-DwXozaLs.js} +1051 -965
  14. package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-CFM4Pufg.js → SubscriptionsScreen-CIdYNpWT.js} +3 -3
  15. package/dist/dist-cli-preview/chunks/{account-screen-runtime-DxhJm6Qd.js → account-screen-runtime-DYMunv0A.js} +2482 -2407
  16. package/dist/dist-cli-preview/chunks/ar-DaN3xEy4.js +351 -0
  17. package/dist/dist-cli-preview/chunks/{arrow-left-UFKI-PQf.js → arrow-left-Bd7dJtIV.js} +1 -1
  18. package/dist/dist-cli-preview/chunks/bg-D3Np0de3.js +351 -0
  19. package/dist/dist-cli-preview/chunks/bn-BDSehnZ3.js +351 -0
  20. package/dist/dist-cli-preview/chunks/{cli-preview-DunPfnjU.js → cli-preview-BT_ARKjk.js} +13 -13
  21. package/dist/dist-cli-preview/chunks/{client.gen-CSTBgfxj.js → client.gen-Ck6Pm2jV.js} +246 -236
  22. package/dist/dist-cli-preview/chunks/contacts-ChSWj70z.js +4 -0
  23. package/dist/dist-cli-preview/chunks/{countries-api-adapter-B3usO25w.js → countries-api-adapter-lxSE748x.js} +2 -2
  24. package/dist/dist-cli-preview/chunks/{create-card-entry-container-DHgsbSyr.js → create-card-entry-container-D6kSC2Aw.js} +20726 -20509
  25. package/dist/dist-cli-preview/chunks/cs-CrmATj4L.js +351 -0
  26. package/dist/dist-cli-preview/chunks/da-CmJdErjd.js +351 -0
  27. package/dist/dist-cli-preview/chunks/de-C0KTNBZq.js +351 -0
  28. package/dist/dist-cli-preview/chunks/el-BOQs49GU.js +351 -0
  29. package/dist/dist-cli-preview/chunks/es-Dt3VSQPu.js +351 -0
  30. package/dist/dist-cli-preview/chunks/fi-B8UZ7eJL.js +351 -0
  31. package/dist/dist-cli-preview/chunks/fr-BomEiNL0.js +351 -0
  32. package/dist/dist-cli-preview/chunks/he-CfmnXjsr.js +351 -0
  33. package/dist/dist-cli-preview/chunks/{hey-api-client-DSvKWGPq.js → hey-api-client-DGRBsZ7Y.js} +3 -3
  34. package/dist/dist-cli-preview/chunks/hi-CTk5zGoJ.js +351 -0
  35. package/dist/dist-cli-preview/chunks/hr-DaNToqEm.js +351 -0
  36. package/dist/dist-cli-preview/chunks/hu-lcAuIwez.js +351 -0
  37. package/dist/dist-cli-preview/chunks/id-CEThcKZG.js +351 -0
  38. package/dist/dist-cli-preview/chunks/it-BCRCoDOg.js +351 -0
  39. package/dist/dist-cli-preview/chunks/ja-BIkFdIfq.js +351 -0
  40. package/dist/dist-cli-preview/chunks/ko-CD3bk6gv.js +351 -0
  41. package/dist/dist-cli-preview/chunks/{log-out-CBUq5Hd-.js → log-out-CSPZjXTK.js} +1 -1
  42. package/dist/dist-cli-preview/chunks/{map-pin-DHfjSyoR.js → map-pin-B2ScoijR.js} +1 -1
  43. package/dist/dist-cli-preview/chunks/messaging-Bq5UPkvG.js +4 -0
  44. package/dist/dist-cli-preview/chunks/{mount-account-screen-pc1VISwF.js → mount-account-screen-C_CdoGir.js} +2453 -2392
  45. package/dist/dist-cli-preview/chunks/ms-DI4mGa5X.js +351 -0
  46. package/dist/dist-cli-preview/chunks/mysite-DcpuKsuW.js +4 -0
  47. package/dist/dist-cli-preview/chunks/nl-B-XAD3Ra.js +351 -0
  48. package/dist/dist-cli-preview/chunks/no-C_NmYGbe.js +351 -0
  49. package/dist/dist-cli-preview/chunks/orders-B_57xKkq.js +4 -0
  50. package/dist/dist-cli-preview/chunks/pl-mQRzJZEW.js +351 -0
  51. package/dist/dist-cli-preview/chunks/{plus-C-lo0pFM.js → plus-CocoE5gC.js} +1 -1
  52. package/dist/dist-cli-preview/chunks/profile-BfM2KxKe.js +4 -0
  53. package/dist/dist-cli-preview/chunks/pt-BYMWPjog.js +351 -0
  54. package/dist/dist-cli-preview/chunks/ro-B98EuFQI.js +351 -0
  55. package/dist/dist-cli-preview/chunks/ru-DBO9IasC.js +351 -0
  56. package/dist/dist-cli-preview/chunks/schemas-D94nZk5x.js +5374 -0
  57. package/dist/dist-cli-preview/chunks/{screen-route-slug-utils-B254xI_J.js → screen-route-slug-utils-BDjSpDoe.js} +1 -1
  58. package/dist/dist-cli-preview/chunks/{sheet-haptics-context-D2WUiXJm.js → sheet-haptics-context-iOjKcNDj.js} +1 -1
  59. package/dist/dist-cli-preview/chunks/{sidebar-CMSWZCPS.js → sidebar-Ckzom4Xc.js} +12 -12
  60. package/dist/dist-cli-preview/chunks/sk-hRvNJfiN.js +351 -0
  61. package/dist/dist-cli-preview/chunks/{store-api-context-BIdILNWL.js → store-api-context-B96Ip2FB.js} +1 -1
  62. package/dist/dist-cli-preview/chunks/subscriptions-8VtIA4w9.js +4 -0
  63. package/dist/dist-cli-preview/chunks/sv-noYtTQbO.js +351 -0
  64. package/dist/dist-cli-preview/chunks/th-CJCAKsR-.js +351 -0
  65. package/dist/dist-cli-preview/chunks/tl-Bx8pJ7p7.js +351 -0
  66. package/dist/dist-cli-preview/chunks/tr-C4tCNiV7.js +351 -0
  67. package/dist/dist-cli-preview/chunks/{trash-2-Bq4IqH0j.js → trash-2-wVweQZMw.js} +4 -4
  68. package/dist/dist-cli-preview/chunks/uk-xFjXQDP3.js +351 -0
  69. package/dist/dist-cli-preview/chunks/{use-optional-store-Csor1Z3z.js → use-optional-store-lZUz976C.js} +2 -2
  70. package/dist/dist-cli-preview/chunks/use-store-DVmgsDXy.js +103 -0
  71. package/dist/dist-cli-preview/chunks/{useInfiniteQuery-BpFtQ7DH.js → useInfiniteQuery-Dtzov9uh.js} +1 -1
  72. package/dist/dist-cli-preview/chunks/{user-BGrQJ1GJ.js → user-B81IrSgp.js} +1 -1
  73. package/dist/dist-cli-preview/chunks/{users-DBL0isYy.js → users-BXTjoCUz.js} +1 -1
  74. package/dist/dist-cli-preview/chunks/vi-BAvhRTgb.js +351 -0
  75. package/dist/dist-cli-preview/chunks/zh_CN-Cyq9zeex.js +351 -0
  76. package/dist/dist-cli-preview/chunks/zh_TW-DFM5MhMA.js +351 -0
  77. package/dist/index.mjs +346 -32
  78. package/dist/index.mjs.map +1 -1
  79. package/dist/skills/themes-cart-feedback/SKILL.md +9 -14
  80. package/dist/skills/themes-review/SKILL.md +40 -34
  81. package/dist/skills/themes-review/references/blocks-vs-sections.md +2 -2
  82. package/dist/skills/themes-review/references/dead-code.md +1 -1
  83. package/dist/skills/themes-review/references/dynamism.md +9 -3
  84. package/dist/skills/themes-review/references/editor-attributes.md +25 -26
  85. package/dist/skills/themes-review/references/examples.md +3 -4
  86. package/dist/skills/themes-review/references/fairshare-attributes.md +5 -5
  87. package/dist/skills/themes-review/references/global-settings.md +56 -67
  88. package/dist/skills/themes-review/references/liquid-correctness.md +10 -15
  89. package/dist/skills/themes-review/references/media-tag.md +8 -7
  90. package/dist/skills/themes-review/references/navigation.md +18 -13
  91. package/dist/skills/themes-review/references/security-accessibility.md +11 -6
  92. package/dist/skills/themes-review/references/setting-types.md +136 -77
  93. package/dist/skills/themes-settings-schema/SKILL.md +15 -2
  94. package/package.json +2 -2
  95. package/dist/dist-cli-preview/chunks/OrdersScreen-d4fJE_dm.js +0 -9
  96. package/dist/dist-cli-preview/chunks/ar-B7NQmkZ1.js +0 -341
  97. package/dist/dist-cli-preview/chunks/bg-CxfL8rZN.js +0 -341
  98. package/dist/dist-cli-preview/chunks/bn-CdhHCK--.js +0 -341
  99. package/dist/dist-cli-preview/chunks/contacts-CpYlEgAq.js +0 -4
  100. package/dist/dist-cli-preview/chunks/cs-DTe-xGeI.js +0 -341
  101. package/dist/dist-cli-preview/chunks/da-B8Cl_vkl.js +0 -341
  102. package/dist/dist-cli-preview/chunks/de-D8cYy8G-.js +0 -341
  103. package/dist/dist-cli-preview/chunks/el-Chjin2JW.js +0 -341
  104. package/dist/dist-cli-preview/chunks/es-mp8RwFN4.js +0 -341
  105. package/dist/dist-cli-preview/chunks/fi-91gcpxoy.js +0 -341
  106. package/dist/dist-cli-preview/chunks/fr-ekvUCKTH.js +0 -341
  107. package/dist/dist-cli-preview/chunks/he-B7QiuquT.js +0 -341
  108. package/dist/dist-cli-preview/chunks/hi-DNNhi7ud.js +0 -341
  109. package/dist/dist-cli-preview/chunks/hr-CAwxMKX_.js +0 -341
  110. package/dist/dist-cli-preview/chunks/hu-D_oQwH4Q.js +0 -341
  111. package/dist/dist-cli-preview/chunks/id-oeAszBoo.js +0 -341
  112. package/dist/dist-cli-preview/chunks/isAfter-BUGgByEf.js +0 -1414
  113. package/dist/dist-cli-preview/chunks/it-Dme6GXSG.js +0 -341
  114. package/dist/dist-cli-preview/chunks/ja-CRnvQNCa.js +0 -341
  115. package/dist/dist-cli-preview/chunks/ko-8mk8A3_I.js +0 -341
  116. package/dist/dist-cli-preview/chunks/messaging-DkyH4CPP.js +0 -4
  117. package/dist/dist-cli-preview/chunks/ms-Bs0GvdOw.js +0 -341
  118. package/dist/dist-cli-preview/chunks/mysite-wvfITV7T.js +0 -4
  119. package/dist/dist-cli-preview/chunks/nl-tsI6lLxl.js +0 -341
  120. package/dist/dist-cli-preview/chunks/no-DMot6qX0.js +0 -341
  121. package/dist/dist-cli-preview/chunks/orders-c13r499A.js +0 -4
  122. package/dist/dist-cli-preview/chunks/pl-DmTxONNg.js +0 -341
  123. package/dist/dist-cli-preview/chunks/profile-CoWo9Sxe.js +0 -4
  124. package/dist/dist-cli-preview/chunks/pt-DgmwnAV-.js +0 -341
  125. package/dist/dist-cli-preview/chunks/ro-B4M17oRc.js +0 -341
  126. package/dist/dist-cli-preview/chunks/ru-BS2gZnbs.js +0 -341
  127. package/dist/dist-cli-preview/chunks/schemas-9_ZwC5nC.js +0 -3977
  128. package/dist/dist-cli-preview/chunks/sk-BdDjjHfn.js +0 -341
  129. package/dist/dist-cli-preview/chunks/subscriptions-BHALQrcU.js +0 -4
  130. package/dist/dist-cli-preview/chunks/sv-CW7FL5HA.js +0 -341
  131. package/dist/dist-cli-preview/chunks/th-BYBMKmSh.js +0 -341
  132. package/dist/dist-cli-preview/chunks/tl-CDigaLsK.js +0 -341
  133. package/dist/dist-cli-preview/chunks/tr-PxiurNCr.js +0 -341
  134. package/dist/dist-cli-preview/chunks/uk-B4aYnJ8t.js +0 -341
  135. package/dist/dist-cli-preview/chunks/vi-BoKSdzH3.js +0 -341
  136. package/dist/dist-cli-preview/chunks/zh_CN-DrCrXsZC.js +0 -341
  137. package/dist/dist-cli-preview/chunks/zh_TW-JmyC1W5K.js +0 -341
@@ -1,100 +1,109 @@
1
- var X = Object.defineProperty;
2
- var Y = (t, e, r) => e in t ? X(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var D = (t, e, r) => Y(t, typeof e != "symbol" ? e + "" : e, r);
4
- import { aA as A, az as Z, ad as C } from "./account-screen-runtime-DxhJm6Qd.js";
1
+ var Y = Object.defineProperty;
2
+ var Z = (t, e, r) => e in t ? Y(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var v = (t, e, r) => Z(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { b4 as O, b3 as ee, aw as C } from "./account-screen-runtime-DYMunv0A.js";
5
5
  function j(t) {
6
6
  if (typeof t != "string")
7
7
  return;
8
8
  const e = t.trim();
9
9
  return e.length > 0 ? e : void 0;
10
10
  }
11
- function P(t, e) {
11
+ function D(t, e) {
12
12
  const r = C(e?.meta);
13
13
  return j(t.headers.get("x-request-id")) ?? j(t.headers.get("request-id")) ?? j(e?.request_id) ?? j(e?.requestId) ?? j(r?.request_id) ?? j(r?.requestId);
14
14
  }
15
- function ee(t, e) {
15
+ function te(t, e) {
16
16
  const r = C(t.error);
17
17
  return j(t.message) ?? j(t.error_message) ?? j(r?.message) ?? e;
18
18
  }
19
- function Se(t = {}) {
20
- return (e, r, n, o) => {
19
+ function Ee(t = {}) {
20
+ return (e, r, s, i) => {
21
21
  if (!r)
22
- return e instanceof A || t.shouldPassThroughTransportError?.(e) || !n ? e : new A(
22
+ return e instanceof O || t.shouldPassThroughTransportError?.(e) || !s ? e : new O(
23
23
  `Network error: ${e instanceof Error ? e.message : "Unknown network error"}`,
24
24
  0,
25
25
  null
26
26
  );
27
27
  if (r.ok && e instanceof SyntaxError)
28
- return new A(
28
+ return new O(
29
29
  "Failed to parse response as JSON",
30
30
  r.status,
31
31
  null,
32
- P(r, null)
32
+ D(r, null)
33
33
  );
34
34
  t.onResponseError?.(r);
35
- const c = n?.method ?? o.method ?? "GET", s = C(e), a = P(r, s);
36
- if (s)
37
- return new A(
38
- ee(s, `${c} request failed`),
35
+ const c = s?.method ?? i.method ?? "GET", a = C(e), n = D(r, a);
36
+ if (a)
37
+ return new O(
38
+ te(a, `${c} request failed`),
39
39
  r.status,
40
- Z(s),
41
- a,
42
- s
40
+ ee(a),
41
+ n,
42
+ a
43
43
  );
44
- const i = r.headers.get("content-type")?.includes("application/json"), p = j(e);
45
- return new A(
46
- i && p ? p.slice(0, 200) : `${c} request failed with status ${r.status}`,
44
+ const o = r.headers.get("content-type")?.includes("application/json"), p = j(e);
45
+ return new O(
46
+ o && p ? p.slice(0, 200) : `${c} request failed with status ${r.status}`,
47
47
  r.status,
48
48
  // A parsed JSON string is a legal `ApiErrorData` member, so it is kept
49
49
  // rather than dropped — the shared fetch client already preserves it, and
50
50
  // discarding it here made the two producers disagree.
51
- i ? e : null,
52
- a,
51
+ o ? e : null,
52
+ n,
53
53
  // Unreachable as an envelope: this branch runs only when the payload is
54
54
  // not a plain object, which is exactly what `toApiErrorBody` rejects.
55
55
  null
56
56
  );
57
57
  };
58
58
  }
59
- const te = {
59
+ const H = (t, e, r) => {
60
+ typeof r == "string" ? t.append(e, r) : t.append(e, JSON.stringify(r));
61
+ }, re = {
60
62
  bodySerializer: (t) => JSON.stringify(
61
63
  t,
62
64
  (e, r) => typeof r == "bigint" ? r.toString() : r
63
65
  )
66
+ }, je = {
67
+ bodySerializer: (t) => {
68
+ const e = new URLSearchParams();
69
+ return Object.entries(t).forEach(([r, s]) => {
70
+ s != null && (Array.isArray(s) ? s.forEach((i) => H(e, r, i)) : H(e, r, s));
71
+ }), e.toString();
72
+ }
64
73
  };
65
- function re({
74
+ function se({
66
75
  onRequest: t,
67
76
  onSseError: e,
68
77
  onSseEvent: r,
69
- responseTransformer: n,
70
- responseValidator: o,
78
+ responseTransformer: s,
79
+ responseValidator: i,
71
80
  sseDefaultRetryDelay: c,
72
- sseMaxRetryAttempts: s,
73
- sseMaxRetryDelay: a,
74
- sseSleepFn: i,
81
+ sseMaxRetryAttempts: a,
82
+ sseMaxRetryDelay: n,
83
+ sseSleepFn: o,
75
84
  url: p,
76
85
  ...u
77
86
  }) {
78
87
  let l;
79
- const g = i ?? ((d) => new Promise((h) => setTimeout(h, d)));
88
+ const g = o ?? ((d) => new Promise((h) => setTimeout(h, d)));
80
89
  return { stream: async function* () {
81
90
  let d = c ?? 3e3, h = 0;
82
91
  const w = u.signal ?? new AbortController().signal;
83
92
  for (; !w.aborted; ) {
84
93
  h++;
85
- const O = u.headers instanceof Headers ? u.headers : new Headers(u.headers);
86
- l !== void 0 && O.set("Last-Event-ID", l);
94
+ const A = u.headers instanceof Headers ? u.headers : new Headers(u.headers);
95
+ l !== void 0 && A.set("Last-Event-ID", l);
87
96
  try {
88
97
  const x = {
89
98
  redirect: "follow",
90
99
  ...u,
91
100
  body: u.serializedBody,
92
- headers: O,
101
+ headers: A,
93
102
  signal: w
94
103
  };
95
- let q = new Request(p, x);
96
- t && (q = await t(p, x));
97
- const y = await (u.fetch ?? globalThis.fetch)(q);
104
+ let z = new Request(p, x);
105
+ t && (z = await t(p, x));
106
+ const y = await (u.fetch ?? globalThis.fetch)(z);
98
107
  if (!y.ok)
99
108
  throw new Error(
100
109
  `SSE failed: ${y.status} ${y.statusText}`
@@ -102,32 +111,32 @@ function re({
102
111
  if (!y.body) throw new Error("No body in SSE response");
103
112
  const S = y.body.pipeThrough(new TextDecoderStream()).getReader();
104
113
  let b = "";
105
- const v = () => {
114
+ const B = () => {
106
115
  try {
107
116
  S.cancel();
108
117
  } catch {
109
118
  }
110
119
  };
111
- w.addEventListener("abort", v);
120
+ w.addEventListener("abort", B);
112
121
  try {
113
122
  for (; ; ) {
114
- const { done: G, value: M } = await S.read();
115
- if (G) break;
116
- b += M, b = b.replace(/\r\n?/g, `
123
+ const { done: M, value: Q } = await S.read();
124
+ if (M) break;
125
+ b += Q, b = b.replace(/\r\n?/g, `
117
126
  `);
118
- const B = b.split(`
127
+ const N = b.split(`
119
128
 
120
129
  `);
121
- b = B.pop() ?? "";
122
- for (const Q of B) {
123
- const K = Q.split(`
124
- `), k = [];
125
- let N;
126
- for (const E of K)
130
+ b = N.pop() ?? "";
131
+ for (const K of N) {
132
+ const X = K.split(`
133
+ `), $ = [];
134
+ let P;
135
+ for (const E of X)
127
136
  if (E.startsWith("data:"))
128
- k.push(E.replace(/^data:\s*/, ""));
137
+ $.push(E.replace(/^data:\s*/, ""));
129
138
  else if (E.startsWith("event:"))
130
- N = E.replace(/^event:\s*/, "");
139
+ P = E.replace(/^event:\s*/, "");
131
140
  else if (E.startsWith("id:"))
132
141
  l = E.replace(/^id:\s*/, "");
133
142
  else if (E.startsWith("retry:")) {
@@ -137,41 +146,41 @@ function re({
137
146
  );
138
147
  Number.isNaN(U) || (d = U);
139
148
  }
140
- let z, R = !1;
141
- if (k.length) {
142
- const E = k.join(`
149
+ let q, R = !1;
150
+ if ($.length) {
151
+ const E = $.join(`
143
152
  `);
144
153
  try {
145
- z = JSON.parse(E), R = !0;
154
+ q = JSON.parse(E), R = !0;
146
155
  } catch {
147
- z = E;
156
+ q = E;
148
157
  }
149
158
  }
150
- R && (o && await o(z), n && (z = await n(z))), r?.({
151
- data: z,
152
- event: N,
159
+ R && (i && await i(q), s && (q = await s(q))), r?.({
160
+ data: q,
161
+ event: P,
153
162
  id: l,
154
163
  retry: d
155
- }), k.length && (yield z);
164
+ }), $.length && (yield q);
156
165
  }
157
166
  }
158
167
  } finally {
159
- w.removeEventListener("abort", v), S.releaseLock();
168
+ w.removeEventListener("abort", B), S.releaseLock();
160
169
  }
161
170
  break;
162
171
  } catch (x) {
163
- if (e?.(x), s !== void 0 && h >= s)
172
+ if (e?.(x), a !== void 0 && h >= a)
164
173
  break;
165
- const q = Math.min(
174
+ const z = Math.min(
166
175
  d * 2 ** (h - 1),
167
- a ?? 3e4
176
+ n ?? 3e4
168
177
  );
169
- await g(q);
178
+ await g(z);
170
179
  }
171
180
  }
172
181
  }() };
173
182
  }
174
- const se = (t) => {
183
+ const ae = (t) => {
175
184
  switch (t) {
176
185
  case "label":
177
186
  return ".";
@@ -182,7 +191,7 @@ const se = (t) => {
182
191
  default:
183
192
  return "&";
184
193
  }
185
- }, ae = (t) => {
194
+ }, ne = (t) => {
186
195
  switch (t) {
187
196
  case "form":
188
197
  return ",";
@@ -193,7 +202,7 @@ const se = (t) => {
193
202
  default:
194
203
  return ",";
195
204
  }
196
- }, ne = (t) => {
205
+ }, ie = (t) => {
197
206
  switch (t) {
198
207
  case "label":
199
208
  return ".";
@@ -204,33 +213,33 @@ const se = (t) => {
204
213
  default:
205
214
  return "&";
206
215
  }
207
- }, _ = ({
216
+ }, V = ({
208
217
  allowReserved: t,
209
218
  explode: e,
210
219
  name: r,
211
- style: n,
212
- value: o
220
+ style: s,
221
+ value: i
213
222
  }) => {
214
223
  if (!e) {
215
- const a = (t ? o : o.map((i) => encodeURIComponent(i))).join(ae(n));
216
- switch (n) {
224
+ const n = (t ? i : i.map((o) => encodeURIComponent(o))).join(ne(s));
225
+ switch (s) {
217
226
  case "label":
218
- return `.${a}`;
227
+ return `.${n}`;
219
228
  case "matrix":
220
- return `;${r}=${a}`;
229
+ return `;${r}=${n}`;
221
230
  case "simple":
222
- return a;
231
+ return n;
223
232
  default:
224
- return `${r}=${a}`;
233
+ return `${r}=${n}`;
225
234
  }
226
235
  }
227
- const c = se(n), s = o.map((a) => n === "label" || n === "simple" ? t ? a : encodeURIComponent(a) : $({
236
+ const c = ae(s), a = i.map((n) => s === "label" || s === "simple" ? t ? n : encodeURIComponent(n) : T({
228
237
  allowReserved: t,
229
238
  name: r,
230
- value: a
239
+ value: n
231
240
  })).join(c);
232
- return n === "label" || n === "matrix" ? c + s : s;
233
- }, $ = ({
241
+ return s === "label" || s === "matrix" ? c + a : a;
242
+ }, T = ({
234
243
  allowReserved: t,
235
244
  name: e,
236
245
  value: r
@@ -242,27 +251,27 @@ const se = (t) => {
242
251
  "Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these."
243
252
  );
244
253
  return `${e}=${t ? r : encodeURIComponent(r)}`;
245
- }, J = ({
254
+ }, _ = ({
246
255
  allowReserved: t,
247
256
  explode: e,
248
257
  name: r,
249
- style: n,
250
- value: o,
258
+ style: s,
259
+ value: i,
251
260
  valueOnly: c
252
261
  }) => {
253
- if (o instanceof Date)
254
- return c ? o.toISOString() : `${r}=${o.toISOString()}`;
255
- if (n !== "deepObject" && !e) {
256
- let i = [];
257
- Object.entries(o).forEach(([u, l]) => {
258
- i = [
259
- ...i,
262
+ if (i instanceof Date)
263
+ return c ? i.toISOString() : `${r}=${i.toISOString()}`;
264
+ if (s !== "deepObject" && !e) {
265
+ let o = [];
266
+ Object.entries(i).forEach(([u, l]) => {
267
+ o = [
268
+ ...o,
260
269
  u,
261
270
  t ? l : encodeURIComponent(l)
262
271
  ];
263
272
  });
264
- const p = i.join(",");
265
- switch (n) {
273
+ const p = o.join(",");
274
+ switch (s) {
266
275
  case "form":
267
276
  return `${r}=${p}`;
268
277
  case "label":
@@ -273,129 +282,129 @@ const se = (t) => {
273
282
  return p;
274
283
  }
275
284
  }
276
- const s = ne(n), a = Object.entries(o).map(
277
- ([i, p]) => $({
285
+ const a = ie(s), n = Object.entries(i).map(
286
+ ([o, p]) => T({
278
287
  allowReserved: t,
279
- name: n === "deepObject" ? `${r}[${i}]` : i,
288
+ name: s === "deepObject" ? `${r}[${o}]` : o,
280
289
  value: p
281
290
  })
282
- ).join(s);
283
- return n === "label" || n === "matrix" ? s + a : a;
284
- }, ie = /\{[^{}]+\}/g, oe = ({
291
+ ).join(a);
292
+ return s === "label" || s === "matrix" ? a + n : n;
293
+ }, oe = /\{[^{}]+\}/g, ce = ({
285
294
  path: t,
286
295
  url: e
287
296
  }) => {
288
297
  let r = e;
289
- const n = e.match(ie);
290
- if (n)
291
- for (const o of n) {
292
- let c = !1, s = o.substring(1, o.length - 1), a = "simple";
293
- s.endsWith("*") && (c = !0, s = s.substring(0, s.length - 1)), s.startsWith(".") ? (s = s.substring(1), a = "label") : s.startsWith(";") && (s = s.substring(1), a = "matrix");
294
- const i = t[s];
295
- if (i == null)
298
+ const s = e.match(oe);
299
+ if (s)
300
+ for (const i of s) {
301
+ let c = !1, a = i.substring(1, i.length - 1), n = "simple";
302
+ a.endsWith("*") && (c = !0, a = a.substring(0, a.length - 1)), a.startsWith(".") ? (a = a.substring(1), n = "label") : a.startsWith(";") && (a = a.substring(1), n = "matrix");
303
+ const o = t[a];
304
+ if (o == null)
296
305
  continue;
297
- if (Array.isArray(i)) {
306
+ if (Array.isArray(o)) {
298
307
  r = r.replace(
299
- o,
300
- _({ explode: c, name: s, style: a, value: i })
308
+ i,
309
+ V({ explode: c, name: a, style: n, value: o })
301
310
  );
302
311
  continue;
303
312
  }
304
- if (typeof i == "object") {
313
+ if (typeof o == "object") {
305
314
  r = r.replace(
306
- o,
307
- J({
315
+ i,
316
+ _({
308
317
  explode: c,
309
- name: s,
310
- style: a,
311
- value: i,
318
+ name: a,
319
+ style: n,
320
+ value: o,
312
321
  valueOnly: !0
313
322
  })
314
323
  );
315
324
  continue;
316
325
  }
317
- if (a === "matrix") {
326
+ if (n === "matrix") {
318
327
  r = r.replace(
319
- o,
320
- `;${$({
321
- name: s,
322
- value: i
328
+ i,
329
+ `;${T({
330
+ name: a,
331
+ value: o
323
332
  })}`
324
333
  );
325
334
  continue;
326
335
  }
327
336
  const p = encodeURIComponent(
328
- a === "label" ? `.${i}` : i
337
+ n === "label" ? `.${o}` : o
329
338
  );
330
- r = r.replace(o, p);
339
+ r = r.replace(i, p);
331
340
  }
332
341
  return r;
333
- }, ce = ({
342
+ }, le = ({
334
343
  baseUrl: t,
335
344
  path: e,
336
345
  query: r,
337
- querySerializer: n,
338
- url: o
346
+ querySerializer: s,
347
+ url: i
339
348
  }) => {
340
- const c = o.startsWith("/") ? o : `/${o}`;
341
- let s = (t ?? "") + c;
342
- e && (s = oe({ path: e, url: s }));
343
- let a = r ? n(r) : "";
344
- return a.startsWith("?") && (a = a.substring(1)), a && (s += `?${a}`), s;
349
+ const c = i.startsWith("/") ? i : `/${i}`;
350
+ let a = (t ?? "") + c;
351
+ e && (a = ce({ path: e, url: a }));
352
+ let n = r ? s(r) : "";
353
+ return n.startsWith("?") && (n = n.substring(1)), n && (a += `?${n}`), a;
345
354
  };
346
- function H(t) {
355
+ function W(t) {
347
356
  const e = t.body !== void 0;
348
357
  if (e && t.bodySerializer)
349
358
  return "serializedBody" in t ? t.serializedBody !== void 0 && t.serializedBody !== "" ? t.serializedBody : null : t.body !== "" ? t.body : null;
350
359
  if (e)
351
360
  return t.body;
352
361
  }
353
- const le = async (t, e) => {
362
+ const ue = async (t, e) => {
354
363
  const r = typeof e == "function" ? await e(t) : e;
355
364
  if (r)
356
365
  return t.scheme === "bearer" ? `Bearer ${r}` : t.scheme === "basic" ? `Basic ${btoa(r)}` : r;
357
- }, L = ({
366
+ }, F = ({
358
367
  parameters: t = {},
359
368
  ...e
360
- } = {}) => (n) => {
361
- const o = [];
362
- if (n && typeof n == "object")
363
- for (const c in n) {
364
- const s = n[c];
365
- if (s == null)
369
+ } = {}) => (s) => {
370
+ const i = [];
371
+ if (s && typeof s == "object")
372
+ for (const c in s) {
373
+ const a = s[c];
374
+ if (a == null)
366
375
  continue;
367
- const a = t[c] || e;
368
- if (Array.isArray(s)) {
369
- const i = _({
370
- allowReserved: a.allowReserved,
376
+ const n = t[c] || e;
377
+ if (Array.isArray(a)) {
378
+ const o = V({
379
+ allowReserved: n.allowReserved,
371
380
  explode: !0,
372
381
  name: c,
373
382
  style: "form",
374
- value: s,
375
- ...a.array
383
+ value: a,
384
+ ...n.array
376
385
  });
377
- i && o.push(i);
378
- } else if (typeof s == "object") {
379
- const i = J({
380
- allowReserved: a.allowReserved,
386
+ o && i.push(o);
387
+ } else if (typeof a == "object") {
388
+ const o = _({
389
+ allowReserved: n.allowReserved,
381
390
  explode: !0,
382
391
  name: c,
383
392
  style: "deepObject",
384
- value: s,
385
- ...a.object
393
+ value: a,
394
+ ...n.object
386
395
  });
387
- i && o.push(i);
396
+ o && i.push(o);
388
397
  } else {
389
- const i = $({
390
- allowReserved: a.allowReserved,
398
+ const o = T({
399
+ allowReserved: n.allowReserved,
391
400
  name: c,
392
- value: s
401
+ value: a
393
402
  });
394
- i && o.push(i);
403
+ o && i.push(o);
395
404
  }
396
405
  }
397
- return o.join("&");
398
- }, ue = (t) => {
406
+ return i.join("&");
407
+ }, de = (t) => {
399
408
  if (!t)
400
409
  return "stream";
401
410
  const e = t.split(";")[0]?.trim();
@@ -411,57 +420,57 @@ const le = async (t, e) => {
411
420
  if (e.startsWith("text/"))
412
421
  return "text";
413
422
  }
414
- }, de = (t, e) => e ? !!(t.headers.has(e) || t.query?.[e] || t.headers.get("Cookie")?.includes(`${e}=`)) : !1;
415
- async function fe(t) {
423
+ }, fe = (t, e) => e ? !!(t.headers.has(e) || t.query?.[e] || t.headers.get("Cookie")?.includes(`${e}=`)) : !1;
424
+ async function he(t) {
416
425
  for (const e of t.security ?? []) {
417
- if (de(t, e.name))
426
+ if (fe(t, e.name))
418
427
  continue;
419
- const r = await le(e, t.auth);
428
+ const r = await ue(e, t.auth);
420
429
  if (!r)
421
430
  continue;
422
- const n = e.name ?? "Authorization";
431
+ const s = e.name ?? "Authorization";
423
432
  switch (e.in) {
424
433
  case "query":
425
- t.query || (t.query = {}), t.query[n] = r;
434
+ t.query || (t.query = {}), t.query[s] = r;
426
435
  break;
427
436
  case "cookie":
428
- t.headers.append("Cookie", `${n}=${r}`);
437
+ t.headers.append("Cookie", `${s}=${r}`);
429
438
  break;
430
439
  case "header":
431
440
  default:
432
- t.headers.set(n, r);
441
+ t.headers.set(s, r);
433
442
  break;
434
443
  }
435
444
  }
436
445
  }
437
- const W = (t) => ce({
446
+ const J = (t) => le({
438
447
  baseUrl: t.baseUrl,
439
448
  path: t.path,
440
449
  query: t.query,
441
- querySerializer: typeof t.querySerializer == "function" ? t.querySerializer : L(t.querySerializer),
450
+ querySerializer: typeof t.querySerializer == "function" ? t.querySerializer : F(t.querySerializer),
442
451
  url: t.url
443
- }), V = (t, e) => {
452
+ }), L = (t, e) => {
444
453
  const r = { ...t, ...e };
445
- return r.baseUrl?.endsWith("/") && (r.baseUrl = r.baseUrl.substring(0, r.baseUrl.length - 1)), r.headers = F(t.headers, e.headers), r;
446
- }, he = (t) => {
454
+ return r.baseUrl?.endsWith("/") && (r.baseUrl = r.baseUrl.substring(0, r.baseUrl.length - 1)), r.headers = G(t.headers, e.headers), r;
455
+ }, ye = (t) => {
447
456
  const e = [];
448
- return t.forEach((r, n) => {
449
- e.push([n, r]);
457
+ return t.forEach((r, s) => {
458
+ e.push([s, r]);
450
459
  }), e;
451
- }, F = (...t) => {
460
+ }, G = (...t) => {
452
461
  const e = new Headers();
453
462
  for (const r of t) {
454
463
  if (!r)
455
464
  continue;
456
- const n = r instanceof Headers ? he(r) : Object.entries(r);
457
- for (const [o, c] of n)
465
+ const s = r instanceof Headers ? ye(r) : Object.entries(r);
466
+ for (const [i, c] of s)
458
467
  if (c === null)
459
- e.delete(o);
468
+ e.delete(i);
460
469
  else if (Array.isArray(c))
461
- for (const s of c)
462
- e.append(o, s);
470
+ for (const a of c)
471
+ e.append(i, a);
463
472
  else c !== void 0 && e.set(
464
- o,
473
+ i,
465
474
  typeof c == "object" ? JSON.stringify(c) : c
466
475
  );
467
476
  }
@@ -469,7 +478,7 @@ const W = (t) => ce({
469
478
  };
470
479
  class I {
471
480
  constructor() {
472
- D(this, "fns", []);
481
+ v(this, "fns", []);
473
482
  }
474
483
  clear() {
475
484
  this.fns = [];
@@ -486,18 +495,18 @@ class I {
486
495
  return typeof e == "number" ? this.fns[e] ? e : -1 : this.fns.indexOf(e);
487
496
  }
488
497
  update(e, r) {
489
- const n = this.getInterceptorIndex(e);
490
- return this.fns[n] ? (this.fns[n] = r, e) : !1;
498
+ const s = this.getInterceptorIndex(e);
499
+ return this.fns[s] ? (this.fns[s] = r, e) : !1;
491
500
  }
492
501
  use(e) {
493
502
  return this.fns.push(e), this.fns.length - 1;
494
503
  }
495
504
  }
496
- const ye = () => ({
505
+ const pe = () => ({
497
506
  error: new I(),
498
507
  request: new I(),
499
508
  response: new I()
500
- }), pe = L({
509
+ }), be = F({
501
510
  allowReserved: !1,
502
511
  array: {
503
512
  explode: !0,
@@ -507,49 +516,49 @@ const ye = () => ({
507
516
  explode: !0,
508
517
  style: "deepObject"
509
518
  }
510
- }), be = {
519
+ }), me = {
511
520
  "Content-Type": "application/json"
512
- }, me = (t = {}) => ({
513
- ...te,
514
- headers: be,
521
+ }, we = (t = {}) => ({
522
+ ...re,
523
+ headers: me,
515
524
  parseAs: "auto",
516
- querySerializer: pe,
525
+ querySerializer: be,
517
526
  ...t
518
- }), Ee = (t = {}) => {
519
- let e = V(me(), t);
520
- const r = () => ({ ...e }), n = (u) => (e = V(e, u), r()), o = ye(), c = async (u) => {
527
+ }), xe = (t = {}) => {
528
+ let e = L(we(), t);
529
+ const r = () => ({ ...e }), s = (u) => (e = L(e, u), r()), i = pe(), c = async (u) => {
521
530
  const l = {
522
531
  ...e,
523
532
  ...u,
524
533
  fetch: u.fetch ?? e.fetch ?? globalThis.fetch,
525
- headers: F(e.headers, u.headers),
534
+ headers: G(e.headers, u.headers),
526
535
  serializedBody: void 0
527
536
  };
528
- l.security && await fe(l), l.requestValidator && await l.requestValidator(l), l.body !== void 0 && l.bodySerializer && (l.serializedBody = l.bodySerializer(l.body)), (l.body === void 0 || l.serializedBody === "") && l.headers.delete("Content-Type");
529
- const g = l, m = W(g);
537
+ l.security && await he(l), l.requestValidator && await l.requestValidator(l), l.body !== void 0 && l.bodySerializer && (l.serializedBody = l.bodySerializer(l.body)), (l.body === void 0 || l.serializedBody === "") && l.headers.delete("Content-Type");
538
+ const g = l, m = J(g);
530
539
  return { opts: g, url: m };
531
- }, s = async (u) => {
540
+ }, a = async (u) => {
532
541
  const l = u.throwOnError ?? e.throwOnError, g = u.responseStyle ?? e.responseStyle;
533
542
  let m, f;
534
543
  try {
535
544
  const { opts: d, url: h } = await c(u), w = {
536
545
  redirect: "follow",
537
546
  ...d,
538
- body: H(d)
547
+ body: W(d)
539
548
  };
540
549
  m = new Request(h, w);
541
- for (const y of o.request.fns)
550
+ for (const y of i.request.fns)
542
551
  y && (m = await y(m, d));
543
- const O = d.fetch;
544
- f = await O(m);
545
- for (const y of o.response.fns)
552
+ const A = d.fetch;
553
+ f = await A(m);
554
+ for (const y of i.response.fns)
546
555
  y && (f = await y(f, m, d));
547
556
  const x = {
548
557
  request: m,
549
558
  response: f
550
559
  };
551
560
  if (f.ok) {
552
- const y = (d.parseAs === "auto" ? ue(f.headers.get("Content-Type")) : d.parseAs) ?? "json";
561
+ const y = (d.parseAs === "auto" ? de(f.headers.get("Content-Type")) : d.parseAs) ?? "json";
553
562
  if (f.status === 204 || f.headers.get("Content-Length") === "0") {
554
563
  let b;
555
564
  switch (y) {
@@ -598,16 +607,16 @@ const ye = () => ({
598
607
  ...x
599
608
  };
600
609
  }
601
- const q = await f.text();
602
- let T;
610
+ const z = await f.text();
611
+ let k;
603
612
  try {
604
- T = JSON.parse(q);
613
+ k = JSON.parse(z);
605
614
  } catch {
606
615
  }
607
- throw T ?? q;
616
+ throw k ?? z;
608
617
  } catch (d) {
609
618
  let h = d;
610
- for (const w of o.error.fns)
619
+ for (const w of i.error.fns)
611
620
  w && (h = await w(
612
621
  h,
613
622
  f,
@@ -622,51 +631,52 @@ const ye = () => ({
622
631
  response: f
623
632
  };
624
633
  }
625
- }, a = (u) => (l) => s({ ...l, method: u }), i = (u) => async (l) => {
634
+ }, n = (u) => (l) => a({ ...l, method: u }), o = (u) => async (l) => {
626
635
  const { opts: g, url: m } = await c(l);
627
- return re({
636
+ return se({
628
637
  ...g,
629
638
  body: g.body,
630
639
  method: u,
631
640
  onRequest: async (f, d) => {
632
641
  let h = new Request(f, d);
633
- for (const w of o.request.fns)
642
+ for (const w of i.request.fns)
634
643
  w && (h = await w(h, g));
635
644
  return h;
636
645
  },
637
- serializedBody: H(g),
646
+ serializedBody: W(g),
638
647
  url: m
639
648
  });
640
649
  };
641
650
  return {
642
- buildUrl: (u) => W({ ...e, ...u }),
643
- connect: a("CONNECT"),
644
- delete: a("DELETE"),
645
- get: a("GET"),
651
+ buildUrl: (u) => J({ ...e, ...u }),
652
+ connect: n("CONNECT"),
653
+ delete: n("DELETE"),
654
+ get: n("GET"),
646
655
  getConfig: r,
647
- head: a("HEAD"),
648
- interceptors: o,
649
- options: a("OPTIONS"),
650
- patch: a("PATCH"),
651
- post: a("POST"),
652
- put: a("PUT"),
653
- request: s,
654
- setConfig: n,
656
+ head: n("HEAD"),
657
+ interceptors: i,
658
+ options: n("OPTIONS"),
659
+ patch: n("PATCH"),
660
+ post: n("POST"),
661
+ put: n("PUT"),
662
+ request: a,
663
+ setConfig: s,
655
664
  sse: {
656
- connect: i("CONNECT"),
657
- delete: i("DELETE"),
658
- get: i("GET"),
659
- head: i("HEAD"),
660
- options: i("OPTIONS"),
661
- patch: i("PATCH"),
662
- post: i("POST"),
663
- put: i("PUT"),
664
- trace: i("TRACE")
665
+ connect: o("CONNECT"),
666
+ delete: o("DELETE"),
667
+ get: o("GET"),
668
+ head: o("HEAD"),
669
+ options: o("OPTIONS"),
670
+ patch: o("PATCH"),
671
+ post: o("POST"),
672
+ put: o("PUT"),
673
+ trace: o("TRACE")
665
674
  },
666
- trace: a("TRACE")
675
+ trace: n("TRACE")
667
676
  };
668
677
  };
669
678
  export {
670
- Se as a,
671
- Ee as c
679
+ Ee as a,
680
+ xe as c,
681
+ je as u
672
682
  };