@bedrock-layout/solid 1.7.1 → 1.7.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/lib/index.m.js CHANGED
@@ -1,7 +1,7 @@
1
- import ot from "open-props";
2
- import { createRenderEffect as w, sharedConfig as y, splitProps as V, createMemo as T, untrack as L, createComponent as I, mergeProps as d, createContext as ct, useContext as rt, createSignal as v, onMount as X, createEffect as U, onCleanup as q, children as lt } from "solid-js";
3
- import { init as Q, registerCallback as Y } from "@bedrock-layout/register-resize-callback";
4
- const at = [
1
+ import oe from "open-props";
2
+ import { splitProps as X, createMemo as O, sharedConfig as g, untrack as B, createRenderEffect as w, createComponent as T, mergeProps as d, createContext as ce, useContext as le, createSignal as P, onMount as U, createEffect as q, onCleanup as Q, children as fe } from "solid-js";
3
+ import { init as Y, registerCallback as J } from "@bedrock-layout/register-resize-callback";
4
+ const ae = [
5
5
  "allowfullscreen",
6
6
  "async",
7
7
  "autofocus",
@@ -27,7 +27,7 @@ const at = [
27
27
  "reversed",
28
28
  "seamless",
29
29
  "selected"
30
- ], ft = /* @__PURE__ */ new Set([
30
+ ], ue = /* @__PURE__ */ new Set([
31
31
  "className",
32
32
  "value",
33
33
  "readOnly",
@@ -35,16 +35,16 @@ const at = [
35
35
  "isMap",
36
36
  "noModule",
37
37
  "playsInline",
38
- ...at
39
- ]), ut = /* @__PURE__ */ new Set([
38
+ ...ae
39
+ ]), de = /* @__PURE__ */ new Set([
40
40
  "innerHTML",
41
41
  "textContent",
42
42
  "innerText",
43
43
  "children"
44
- ]), dt = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
44
+ ]), ye = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
45
45
  className: "class",
46
46
  htmlFor: "for"
47
- }), yt = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
47
+ }), ge = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
48
48
  class: "className",
49
49
  formnovalidate: {
50
50
  $: "formNoValidate",
@@ -69,11 +69,11 @@ const at = [
69
69
  TEXTAREA: 1
70
70
  }
71
71
  });
72
- function mt(t, e) {
73
- const n = yt[t];
74
- return typeof n == "object" ? n[e] ? n.$ : void 0 : n;
72
+ function me(e, t) {
73
+ const n = ge[e];
74
+ return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
75
75
  }
76
- const ht = /* @__PURE__ */ new Set([
76
+ const he = /* @__PURE__ */ new Set([
77
77
  "beforeinput",
78
78
  "click",
79
79
  "dblclick",
@@ -96,7 +96,7 @@ const ht = /* @__PURE__ */ new Set([
96
96
  "touchend",
97
97
  "touchmove",
98
98
  "touchstart"
99
- ]), gt = /* @__PURE__ */ new Set([
99
+ ]), be = /* @__PURE__ */ new Set([
100
100
  "altGlyph",
101
101
  "altGlyphDef",
102
102
  "altGlyphItem",
@@ -174,384 +174,353 @@ const ht = /* @__PURE__ */ new Set([
174
174
  "use",
175
175
  "view",
176
176
  "vkern"
177
- ]), bt = {
177
+ ]), $e = {
178
178
  xlink: "http://www.w3.org/1999/xlink",
179
179
  xml: "http://www.w3.org/XML/1998/namespace"
180
180
  };
181
- function $t(t, e, n) {
182
- let i = n.length, s = e.length, o = i, r = 0, c = 0, l = e[s - 1].nextSibling, a = null;
183
- for (; r < s || c < o; ) {
184
- if (e[r] === n[c]) {
185
- r++, c++;
181
+ function Se(e, t, n) {
182
+ let i = n.length, s = t.length, r = i, c = 0, o = 0, l = t[s - 1].nextSibling, f = null;
183
+ for (; c < s || o < r; ) {
184
+ if (t[c] === n[o]) {
185
+ c++, o++;
186
186
  continue;
187
187
  }
188
- for (; e[s - 1] === n[o - 1]; )
189
- s--, o--;
190
- if (s === r) {
191
- const f = o < i ? c ? n[c - 1].nextSibling : n[o - c] : l;
192
- for (; c < o; )
193
- t.insertBefore(n[c++], f);
194
- } else if (o === c)
195
- for (; r < s; )
196
- (!a || !a.has(e[r])) && e[r].remove(), r++;
197
- else if (e[r] === n[o - 1] && n[c] === e[s - 1]) {
198
- const f = e[--s].nextSibling;
199
- t.insertBefore(n[c++], e[r++].nextSibling), t.insertBefore(n[--o], f), e[s] = n[o];
188
+ for (; t[s - 1] === n[r - 1]; )
189
+ s--, r--;
190
+ if (s === c) {
191
+ const a = r < i ? o ? n[o - 1].nextSibling : n[r - o] : l;
192
+ for (; o < r; ) e.insertBefore(n[o++], a);
193
+ } else if (r === o)
194
+ for (; c < s; )
195
+ (!f || !f.has(t[c])) && t[c].remove(), c++;
196
+ else if (t[c] === n[r - 1] && n[o] === t[s - 1]) {
197
+ const a = t[--s].nextSibling;
198
+ e.insertBefore(n[o++], t[c++].nextSibling), e.insertBefore(n[--r], a), t[s] = n[r];
200
199
  } else {
201
- if (!a) {
202
- a = /* @__PURE__ */ new Map();
203
- let u = c;
204
- for (; u < o; )
205
- a.set(n[u], u++);
200
+ if (!f) {
201
+ f = /* @__PURE__ */ new Map();
202
+ let y = o;
203
+ for (; y < r; ) f.set(n[y], y++);
206
204
  }
207
- const f = a.get(e[r]);
208
- if (f != null)
209
- if (c < f && f < o) {
210
- let u = r, b = 1, S;
211
- for (; ++u < s && u < o && !((S = a.get(e[u])) == null || S !== f + b); )
212
- b++;
213
- if (b > f - c) {
214
- const P = e[r];
215
- for (; c < f; )
216
- t.insertBefore(n[c++], P);
217
- } else
218
- t.replaceChild(n[c++], e[r++]);
219
- } else
220
- r++;
221
- else
222
- e[r++].remove();
205
+ const a = f.get(t[c]);
206
+ if (a != null)
207
+ if (o < a && a < r) {
208
+ let y = c, u = 1, $;
209
+ for (; ++y < s && y < r && !(($ = f.get(t[y])) == null || $ !== a + u); )
210
+ u++;
211
+ if (u > a - o) {
212
+ const C = t[c];
213
+ for (; o < a; ) e.insertBefore(n[o++], C);
214
+ } else e.replaceChild(n[o++], t[c++]);
215
+ } else c++;
216
+ else t[c++].remove();
223
217
  }
224
218
  }
225
219
  }
226
- const D = "_$DX_DELEGATE";
227
- function J(t, e, n) {
220
+ const v = "_$DX_DELEGATE";
221
+ function Z(e, t, n) {
228
222
  let i;
229
223
  const s = () => {
230
- const r = document.createElement("template");
231
- return r.innerHTML = t, n ? r.content.firstChild.firstChild : r.content.firstChild;
232
- }, o = e ? () => L(() => document.importNode(i || (i = s()), !0)) : () => (i || (i = s())).cloneNode(!0);
233
- return o.cloneNode = o, o;
234
- }
235
- function xt(t, e = window.document) {
236
- const n = e[D] || (e[D] = /* @__PURE__ */ new Set());
237
- for (let i = 0, s = t.length; i < s; i++) {
238
- const o = t[i];
239
- n.has(o) || (n.add(o), e.addEventListener(o, vt));
224
+ const c = document.createElement("template");
225
+ return c.innerHTML = e, c.content.firstChild;
226
+ }, r = t ? () => B(() => document.importNode(i || (i = s()), !0)) : () => (i || (i = s())).cloneNode(!0);
227
+ return r.cloneNode = r, r;
228
+ }
229
+ function xe(e, t = window.document) {
230
+ const n = t[v] || (t[v] = /* @__PURE__ */ new Set());
231
+ for (let i = 0, s = e.length; i < s; i++) {
232
+ const r = e[i];
233
+ n.has(r) || (n.add(r), t.addEventListener(r, Pe));
240
234
  }
241
235
  }
242
- function z(t, e, n) {
243
- y.context && t.isConnected || (n == null ? t.removeAttribute(e) : t.setAttribute(e, n));
236
+ function N(e, t, n) {
237
+ j(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
244
238
  }
245
- function St(t, e, n, i) {
246
- y.context && t.isConnected || (i == null ? t.removeAttributeNS(e, n) : t.setAttributeNS(e, n, i));
239
+ function we(e, t, n, i) {
240
+ j(e) || (i == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, i));
247
241
  }
248
- function wt(t, e) {
249
- y.context && t.isConnected || (e == null ? t.removeAttribute("class") : t.className = e);
242
+ function je(e, t, n) {
243
+ j(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
250
244
  }
251
- function jt(t, e, n, i) {
245
+ function Ae(e, t) {
246
+ j(e) || (t == null ? e.removeAttribute("class") : e.className = t);
247
+ }
248
+ function Ce(e, t, n, i) {
252
249
  if (i)
253
- Array.isArray(n) ? (t[`$$${e}`] = n[0], t[`$$${e}Data`] = n[1]) : t[`$$${e}`] = n;
250
+ Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
254
251
  else if (Array.isArray(n)) {
255
252
  const s = n[0];
256
- t.addEventListener(e, n[0] = (o) => s.call(t, n[1], o));
257
- } else
258
- t.addEventListener(e, n);
259
- }
260
- function Ct(t, e, n = {}) {
261
- const i = Object.keys(e || {}), s = Object.keys(n);
262
- let o, r;
263
- for (o = 0, r = s.length; o < r; o++) {
264
- const c = s[o];
265
- !c || c === "undefined" || e[c] || (R(t, c, !1), delete n[c]);
253
+ e.addEventListener(t, n[0] = (r) => s.call(e, n[1], r));
254
+ } else e.addEventListener(t, n, typeof n != "function" && n);
255
+ }
256
+ function Ee(e, t, n = {}) {
257
+ const i = Object.keys(t || {}), s = Object.keys(n);
258
+ let r, c;
259
+ for (r = 0, c = s.length; r < c; r++) {
260
+ const o = s[r];
261
+ !o || o === "undefined" || t[o] || (G(e, o, !1), delete n[o]);
266
262
  }
267
- for (o = 0, r = i.length; o < r; o++) {
268
- const c = i[o], l = !!e[c];
269
- !c || c === "undefined" || n[c] === l || !l || (R(t, c, !0), n[c] = l);
263
+ for (r = 0, c = i.length; r < c; r++) {
264
+ const o = i[r], l = !!t[o];
265
+ !o || o === "undefined" || n[o] === l || !l || (G(e, o, !0), n[o] = l);
270
266
  }
271
267
  return n;
272
268
  }
273
- function Z(t, e, n) {
274
- if (!e)
275
- return n ? z(t, "style") : e;
276
- const i = t.style;
277
- if (typeof e == "string")
278
- return i.cssText = e;
279
- typeof n == "string" && (i.cssText = n = void 0), n || (n = {}), e || (e = {});
280
- let s, o;
281
- for (o in n)
282
- e[o] == null && i.removeProperty(o), delete n[o];
283
- for (o in e)
284
- s = e[o], s !== n[o] && (i.setProperty(o, s), n[o] = s);
269
+ function K(e, t, n) {
270
+ if (!t) return n ? N(e, "style") : t;
271
+ const i = e.style;
272
+ if (typeof t == "string") return i.cssText = t;
273
+ typeof n == "string" && (i.cssText = n = void 0), n || (n = {}), t || (t = {});
274
+ let s, r;
275
+ for (r in n)
276
+ t[r] == null && i.removeProperty(r), delete n[r];
277
+ for (r in t)
278
+ s = t[r], s !== n[r] && (i.setProperty(r, s), n[r] = s);
285
279
  return n;
286
280
  }
287
- function At(t, e = {}, n, i) {
281
+ function Te(e, t = {}, n, i) {
288
282
  const s = {};
289
- return i || w(
290
- () => s.children = C(t, e.children, s.children)
291
- ), w(
292
- () => typeof e.ref == "function" ? K(e.ref, t) : e.ref = t
293
- ), w(() => Et(t, e, n, !0, s, !0)), s;
294
- }
295
- function K(t, e, n) {
296
- return L(() => t(e, n));
297
- }
298
- function p(t, e, n, i) {
299
- if (n !== void 0 && !i && (i = []), typeof e != "function")
300
- return C(t, e, i, n);
301
- w((s) => C(t, e(), s, n), i);
302
- }
303
- function Et(t, e, n, i, s = {}, o = !1) {
304
- e || (e = {});
305
- for (const r in s)
306
- if (!(r in e)) {
307
- if (r === "children")
308
- continue;
309
- s[r] = G(t, r, null, s[r], n, o);
283
+ return w(
284
+ () => s.children = I(e, t.children, s.children)
285
+ ), w(() => typeof t.ref == "function" && p(t.ref, e)), w(() => Ie(e, t, n, !0, s, !0)), s;
286
+ }
287
+ function p(e, t, n) {
288
+ return B(() => e(t, n));
289
+ }
290
+ function ee(e, t, n, i) {
291
+ if (typeof t != "function") return I(e, t, i, n);
292
+ w((s) => I(e, t(), s, n), i);
293
+ }
294
+ function Ie(e, t, n, i, s = {}, r = !1) {
295
+ t || (t = {});
296
+ for (const c in s)
297
+ if (!(c in t)) {
298
+ if (c === "children") continue;
299
+ s[c] = H(e, c, null, s[c], n, r, t);
310
300
  }
311
- for (const r in e) {
312
- if (r === "children") {
313
- i || C(t, e.children);
301
+ for (const c in t) {
302
+ if (c === "children")
314
303
  continue;
315
- }
316
- const c = e[r];
317
- s[r] = G(t, r, c, s[r], n, o);
304
+ const o = t[c];
305
+ s[c] = H(e, c, o, s[c], n, r, t);
318
306
  }
319
307
  }
320
- function It(t) {
321
- let e, n;
322
- return !y.context || !(e = y.registry.get(n = Ot())) ? t() : (y.completed && y.completed.add(e), y.registry.delete(n), e);
323
- }
324
- function Tt(t) {
325
- return t.toLowerCase().replace(/-([a-z])/g, (e, n) => n.toUpperCase());
326
- }
327
- function R(t, e, n) {
328
- const i = e.trim().split(/\s+/);
329
- for (let s = 0, o = i.length; s < o; s++)
330
- t.classList.toggle(i[s], n);
331
- }
332
- function G(t, e, n, i, s, o) {
333
- let r, c, l, a, f;
334
- if (e === "style")
335
- return Z(t, n, i);
336
- if (e === "classList")
337
- return Ct(t, n, i);
338
- if (n === i)
339
- return i;
340
- if (e === "ref")
341
- o || n(t);
342
- else if (e.slice(0, 3) === "on:") {
343
- const u = e.slice(3);
344
- i && t.removeEventListener(u, i), n && t.addEventListener(u, n);
345
- } else if (e.slice(0, 10) === "oncapture:") {
346
- const u = e.slice(10);
347
- i && t.removeEventListener(u, i, !0), n && t.addEventListener(u, n, !0);
348
- } else if (e.slice(0, 2) === "on") {
349
- const u = e.slice(2).toLowerCase(), b = ht.has(u);
350
- if (!b && i) {
351
- const S = Array.isArray(i) ? i[0] : i;
352
- t.removeEventListener(u, S);
308
+ function ke(e) {
309
+ let t, n;
310
+ return !j() || !(t = g.registry.get(n = Me())) ? e() : (g.completed && g.completed.add(t), g.registry.delete(n), t);
311
+ }
312
+ function j(e) {
313
+ return !!g.context && !g.done && (!e || e.isConnected);
314
+ }
315
+ function Oe(e) {
316
+ return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
317
+ }
318
+ function G(e, t, n) {
319
+ const i = t.trim().split(/\s+/);
320
+ for (let s = 0, r = i.length; s < r; s++)
321
+ e.classList.toggle(i[s], n);
322
+ }
323
+ function H(e, t, n, i, s, r, c) {
324
+ let o, l, f, a, y;
325
+ if (t === "style") return K(e, n, i);
326
+ if (t === "classList") return Ee(e, n, i);
327
+ if (n === i) return i;
328
+ if (t === "ref")
329
+ r || n(e);
330
+ else if (t.slice(0, 3) === "on:") {
331
+ const u = t.slice(3);
332
+ i && e.removeEventListener(u, i, typeof i != "function" && i), n && e.addEventListener(u, n, typeof n != "function" && n);
333
+ } else if (t.slice(0, 10) === "oncapture:") {
334
+ const u = t.slice(10);
335
+ i && e.removeEventListener(u, i, !0), n && e.addEventListener(u, n, !0);
336
+ } else if (t.slice(0, 2) === "on") {
337
+ const u = t.slice(2).toLowerCase(), $ = he.has(u);
338
+ if (!$ && i) {
339
+ const C = Array.isArray(i) ? i[0] : i;
340
+ e.removeEventListener(u, C);
353
341
  }
354
- (b || n) && (jt(t, u, n, b), b && xt([u]));
355
- } else if (e.slice(0, 5) === "attr:")
356
- z(t, e.slice(5), n);
357
- else if ((f = e.slice(0, 5) === "prop:") || (l = ut.has(e)) || !s && ((a = mt(e, t.tagName)) || (c = ft.has(e))) || (r = t.nodeName.includes("-"))) {
358
- if (f)
359
- e = e.slice(5), c = !0;
360
- else if (y.context && t.isConnected)
361
- return n;
362
- e === "class" || e === "className" ? wt(t, n) : r && !c && !l ? t[Tt(e)] = n : t[a || e] = n;
342
+ ($ || n) && (Ce(e, u, n, $), $ && xe([u]));
343
+ } else if (t.slice(0, 5) === "attr:")
344
+ N(e, t.slice(5), n);
345
+ else if (t.slice(0, 5) === "bool:")
346
+ je(e, t.slice(5), n);
347
+ else if ((y = t.slice(0, 5) === "prop:") || (f = de.has(t)) || !s && ((a = me(t, e.tagName)) || (l = ue.has(t))) || (o = e.nodeName.includes("-") || "is" in c)) {
348
+ if (y)
349
+ t = t.slice(5), l = !0;
350
+ else if (j(e)) return n;
351
+ t === "class" || t === "className" ? Ae(e, n) : o && !l && !f ? e[Oe(t)] = n : e[a || t] = n;
363
352
  } else {
364
- const u = s && e.indexOf(":") > -1 && bt[e.split(":")[0]];
365
- u ? St(t, u, e, n) : z(t, dt[e] || e, n);
353
+ const u = s && t.indexOf(":") > -1 && $e[t.split(":")[0]];
354
+ u ? we(e, u, t, n) : N(e, ye[t] || t, n);
366
355
  }
367
356
  return n;
368
357
  }
369
- function vt(t) {
370
- const e = `$$${t.type}`;
371
- let n = t.composedPath && t.composedPath()[0] || t.target;
372
- for (t.target !== n && Object.defineProperty(t, "target", {
358
+ function Pe(e) {
359
+ if (g.registry && g.events && g.events.find(([l, f]) => f === e))
360
+ return;
361
+ let t = e.target;
362
+ const n = `$$${e.type}`, i = e.target, s = e.currentTarget, r = (l) => Object.defineProperty(e, "target", {
373
363
  configurable: !0,
374
- value: n
375
- }), Object.defineProperty(t, "currentTarget", {
364
+ value: l
365
+ }), c = () => {
366
+ const l = t[n];
367
+ if (l && !t.disabled) {
368
+ const f = t[`${n}Data`];
369
+ if (f !== void 0 ? l.call(t, f, e) : l.call(t, e), e.cancelBubble) return;
370
+ }
371
+ return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && r(t.host), !0;
372
+ }, o = () => {
373
+ for (; c() && (t = t._$host || t.parentNode || t.host); ) ;
374
+ };
375
+ if (Object.defineProperty(e, "currentTarget", {
376
376
  configurable: !0,
377
377
  get() {
378
- return n || document;
378
+ return t || document;
379
379
  }
380
- }), y.registry && !y.done && (y.done = _$HY.done = !0); n; ) {
381
- const i = n[e];
382
- if (i && !n.disabled) {
383
- const s = n[`${e}Data`];
384
- if (s !== void 0 ? i.call(n, s, t) : i.call(n, t), t.cancelBubble)
385
- return;
380
+ }), g.registry && !g.done && (g.done = _$HY.done = !0), e.composedPath) {
381
+ const l = e.composedPath();
382
+ r(l[0]);
383
+ for (let f = 0; f < l.length - 2 && (t = l[f], !!c()); f++) {
384
+ if (t._$host) {
385
+ t = t._$host, o();
386
+ break;
387
+ }
388
+ if (t.parentNode === s)
389
+ break;
386
390
  }
387
- n = n._$host || n.parentNode || n.host;
388
- }
389
- }
390
- function C(t, e, n, i, s) {
391
- const o = !!y.context && t.isConnected;
392
- if (o) {
393
- !n && (n = [...t.childNodes]);
394
- let l = [];
395
- for (let a = 0; a < n.length; a++) {
396
- const f = n[a];
397
- f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : l.push(f);
391
+ } else o();
392
+ r(i);
393
+ }
394
+ function I(e, t, n, i, s) {
395
+ const r = j(e);
396
+ if (r) {
397
+ !n && (n = [...e.childNodes]);
398
+ let o = [];
399
+ for (let l = 0; l < n.length; l++) {
400
+ const f = n[l];
401
+ f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : o.push(f);
398
402
  }
399
- n = l;
403
+ n = o;
400
404
  }
401
- for (; typeof n == "function"; )
402
- n = n();
403
- if (e === n)
404
- return n;
405
- const r = typeof e, c = i !== void 0;
406
- if (t = c && n[0] && n[0].parentNode || t, r === "string" || r === "number") {
407
- if (o)
405
+ for (; typeof n == "function"; ) n = n();
406
+ if (t === n) return n;
407
+ const c = typeof t;
408
+ if (e = e, c === "string" || c === "number") {
409
+ if (r || c === "number" && (t = t.toString(), t === n))
408
410
  return n;
409
- if (r === "number" && (e = e.toString()), c) {
410
- let l = n[0];
411
- l && l.nodeType === 3 ? l.data !== e && (l.data = e) : l = document.createTextNode(e), n = j(t, n, i, l);
412
- } else
413
- n !== "" && typeof n == "string" ? n = t.firstChild.data = e : n = t.textContent = e;
414
- } else if (e == null || r === "boolean") {
415
- if (o)
416
- return n;
417
- n = j(t, n, i);
411
+ n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
412
+ } else if (t == null || c === "boolean") {
413
+ if (r) return n;
414
+ n = k(e, n, i);
418
415
  } else {
419
- if (r === "function")
416
+ if (c === "function")
420
417
  return w(() => {
421
- let l = e();
422
- for (; typeof l == "function"; )
423
- l = l();
424
- n = C(t, l, n, i);
418
+ let o = t();
419
+ for (; typeof o == "function"; ) o = o();
420
+ n = I(e, o, n, i);
425
421
  }), () => n;
426
- if (Array.isArray(e)) {
427
- const l = [], a = n && Array.isArray(n);
428
- if (N(l, e, n, s))
429
- return w(() => n = C(t, l, n, i, !0)), () => n;
430
- if (o) {
431
- if (!l.length)
432
- return n;
433
- if (i === void 0)
434
- return [...t.childNodes];
435
- let f = l[0], u = [f];
436
- for (; (f = f.nextSibling) !== i; )
437
- u.push(f);
438
- return n = u;
439
- }
440
- if (l.length === 0) {
441
- if (n = j(t, n, i), c)
442
- return n;
443
- } else
444
- a ? n.length === 0 ? H(t, l, i) : $t(t, n, l) : (n && j(t), H(t, l));
445
- n = l;
446
- } else if (e.nodeType) {
447
- if (o && e.parentNode)
448
- return n = c ? [e] : e;
449
- if (Array.isArray(n)) {
450
- if (c)
451
- return n = j(t, n, i, e);
452
- j(t, n, null, e);
453
- } else
454
- n == null || n === "" || !t.firstChild ? t.appendChild(e) : t.replaceChild(e, t.firstChild);
455
- n = e;
422
+ if (Array.isArray(t)) {
423
+ const o = [], l = n && Array.isArray(n);
424
+ if (L(o, t, n, s))
425
+ return w(() => n = I(e, o, n, i, !0)), () => n;
426
+ if (r)
427
+ return o.length ? n = [...e.childNodes] : n;
428
+ o.length === 0 ? n = k(e, n, i) : l ? n.length === 0 ? _(e, o, i) : Se(e, n, o) : (n && k(e), _(e, o)), n = o;
429
+ } else if (t.nodeType) {
430
+ if (r && t.parentNode) return n = t;
431
+ Array.isArray(n) ? k(e, n, null, t) : n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild), n = t;
456
432
  }
457
433
  }
458
434
  return n;
459
435
  }
460
- function N(t, e, n, i) {
436
+ function L(e, t, n, i) {
461
437
  let s = !1;
462
- for (let o = 0, r = e.length; o < r; o++) {
463
- let c = e[o], l = n && n[t.length], a;
464
- if (!(c == null || c === !0 || c === !1))
465
- if ((a = typeof c) == "object" && c.nodeType)
466
- t.push(c);
467
- else if (Array.isArray(c))
468
- s = N(t, c, l) || s;
469
- else if (a === "function")
470
- if (i) {
471
- for (; typeof c == "function"; )
472
- c = c();
473
- s = N(
474
- t,
475
- Array.isArray(c) ? c : [c],
476
- Array.isArray(l) ? l : [l]
477
- ) || s;
478
- } else
479
- t.push(c), s = !0;
480
- else {
481
- const f = String(c);
482
- l && l.nodeType === 3 && l.data === f ? t.push(l) : t.push(document.createTextNode(f));
483
- }
438
+ for (let r = 0, c = t.length; r < c; r++) {
439
+ let o = t[r], l = n && n[e.length], f;
440
+ if (!(o == null || o === !0 || o === !1)) if ((f = typeof o) == "object" && o.nodeType)
441
+ e.push(o);
442
+ else if (Array.isArray(o))
443
+ s = L(e, o, l) || s;
444
+ else if (f === "function")
445
+ if (i) {
446
+ for (; typeof o == "function"; ) o = o();
447
+ s = L(
448
+ e,
449
+ Array.isArray(o) ? o : [o],
450
+ Array.isArray(l) ? l : [l]
451
+ ) || s;
452
+ } else
453
+ e.push(o), s = !0;
454
+ else {
455
+ const a = String(o);
456
+ l && l.nodeType === 3 && l.data === a ? e.push(l) : e.push(document.createTextNode(a));
457
+ }
484
458
  }
485
459
  return s;
486
460
  }
487
- function H(t, e, n = null) {
488
- for (let i = 0, s = e.length; i < s; i++)
489
- t.insertBefore(e[i], n);
461
+ function _(e, t, n = null) {
462
+ for (let i = 0, s = t.length; i < s; i++) e.insertBefore(t[i], n);
490
463
  }
491
- function j(t, e, n, i) {
492
- if (n === void 0)
493
- return t.textContent = "";
464
+ function k(e, t, n, i) {
465
+ if (n === void 0) return e.textContent = "";
494
466
  const s = i || document.createTextNode("");
495
- if (e.length) {
496
- let o = !1;
497
- for (let r = e.length - 1; r >= 0; r--) {
498
- const c = e[r];
499
- if (s !== c) {
500
- const l = c.parentNode === t;
501
- !o && !r ? l ? t.replaceChild(s, c) : t.insertBefore(s, n) : l && c.remove();
502
- } else
503
- o = !0;
467
+ if (t.length) {
468
+ let r = !1;
469
+ for (let c = t.length - 1; c >= 0; c--) {
470
+ const o = t[c];
471
+ if (s !== o) {
472
+ const l = o.parentNode === e;
473
+ !r && !c ? l ? e.replaceChild(s, o) : e.insertBefore(s, n) : l && o.remove();
474
+ } else r = !0;
504
475
  }
505
- } else
506
- t.insertBefore(s, n);
476
+ } else e.insertBefore(s, n);
507
477
  return [s];
508
478
  }
509
- function Ot() {
510
- const t = y.context;
511
- return `${t.id}${t.count++}`;
479
+ function Me() {
480
+ return g.getNextContextId();
512
481
  }
513
- const Pt = "http://www.w3.org/2000/svg";
514
- function Mt(t, e = !1) {
515
- return e ? document.createElementNS(Pt, t) : document.createElement(t);
482
+ const ze = "http://www.w3.org/2000/svg";
483
+ function Ne(e, t = !1) {
484
+ return t ? document.createElementNS(ze, e) : document.createElement(e);
516
485
  }
517
- function zt(t) {
518
- const [e, n] = V(t, ["component"]), i = T(() => e.component);
519
- return T(() => {
486
+ function Le(e) {
487
+ const [t, n] = X(e, ["component"]), i = O(() => t.component);
488
+ return O(() => {
520
489
  const s = i();
521
490
  switch (typeof s) {
522
491
  case "function":
523
- return L(() => s(n));
492
+ return B(() => s(n));
524
493
  case "string":
525
- const o = gt.has(s), r = y.context ? It() : Mt(s, o);
526
- return At(r, n, o), r;
494
+ const r = be.has(s), c = g.context ? ke() : Ne(s, r);
495
+ return Te(c, n, r), c;
527
496
  }
528
497
  });
529
498
  }
530
- function A(t) {
531
- return t ?? void 0;
499
+ function A(e) {
500
+ return e ?? void 0;
532
501
  }
533
- function m(t, e) {
534
- return Object.keys(t).filter((n) => !e.includes(n)).reduce((n, i) => Object.defineProperty({
502
+ function m(e, t) {
503
+ return Object.keys(e).filter((n) => !t.includes(n)).reduce((n, i) => Object.defineProperty({
535
504
  ...n
536
505
  }, i, {
537
506
  get() {
538
- return t[i];
507
+ return e[i];
539
508
  },
540
509
  configurable: !0,
541
510
  enumerable: !0
542
511
  }), {});
543
512
  }
544
- function h(t, e) {
545
- return I(zt, d({
513
+ function h(e, t) {
514
+ return T(Le, d({
546
515
  get component() {
547
- return t();
516
+ return e();
548
517
  }
549
- }, e));
518
+ }, t));
550
519
  }
551
- function g(t) {
552
- return Object.values(t).every((e) => typeof e == "function") ? Object.keys(t).reduce((e, n) => {
553
- const i = t[n];
554
- return Object.defineProperty(e, n, {
520
+ function b(e) {
521
+ return Object.values(e).every((t) => typeof t == "function") ? Object.keys(e).reduce((t, n) => {
522
+ const i = e[n];
523
+ return Object.defineProperty(t, n, {
555
524
  get() {
556
525
  return i();
557
526
  },
@@ -560,190 +529,185 @@ function g(t) {
560
529
  });
561
530
  }, {}) : new Error("Please provide an object with accessor values only.");
562
531
  }
563
- const tt = /^--\D{1}.{0,100}$/;
564
- function et(t) {
565
- return tt.test(t);
532
+ const te = /^--\D{1}.{0,100}$/;
533
+ function ne(e) {
534
+ return te.test(e);
566
535
  }
567
- function W(t) {
568
- return typeof t != "string" ? !1 : [/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/, /^var\(--\D{1}.{0,100}\)$/, tt].some((e) => e.test(t));
536
+ function D(e) {
537
+ return typeof e != "string" ? !1 : [/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/, /^var\(--\D{1}.{0,100}\)$/, te].some((t) => t.test(e));
569
538
  }
570
539
  const {
571
- sizeXxs: Nt,
572
- sizeXs: kt,
573
- sizeSm: Lt,
574
- sizeMd: Wt,
575
- sizeLg: Bt,
576
- sizeXl: Dt,
577
- sizeXxl: Rt,
578
- sizeContent1: Gt,
579
- sizeContent2: Ht,
580
- sizeContent3: _t,
581
- sizeHeader1: Ft,
582
- sizeHeader2: Vt,
583
- sizeHeader3: Xt,
584
- size000: Ut,
585
- size00: qt,
586
- size1: Qt,
587
- size2: Yt,
588
- size3: Jt,
589
- size4: Zt,
590
- size5: Kt,
591
- size6: pt,
592
- size7: te,
593
- size8: ee,
594
- size9: ne,
595
- size10: ie,
596
- size11: se,
597
- size12: oe,
598
- size13: ce,
599
- size14: re,
600
- size15: le
601
- } = ot, ae = {
602
- size000: Ut,
603
- size00: qt,
604
- size1: Qt,
605
- size2: Yt,
606
- size3: Jt,
607
- size4: Zt,
608
- size5: Kt,
609
- size6: pt,
610
- size7: te,
611
- size8: ee,
612
- size9: ne,
613
- size10: ie,
614
- size11: se,
615
- size12: oe,
616
- size13: ce,
617
- size14: re,
618
- size15: le
619
- }, fe = {
620
- sizeXxs: Nt,
621
- sizeXs: kt,
622
- sizeSm: Lt,
623
- sizeMd: Wt,
624
- sizeLg: Bt,
625
- sizeXl: Dt,
626
- sizeXxl: Rt,
627
- sizeContent1: Gt,
628
- sizeContent2: Ht,
629
- sizeContent3: _t,
630
- sizeHeader1: Ft,
631
- sizeHeader2: Vt,
632
- sizeHeader3: Xt
633
- }, ue = ae, de = fe;
634
- function nt(t) {
635
- return t.reduce((e, [n, i]) => ({
636
- ...e,
540
+ sizeXxs: We,
541
+ sizeXs: Be,
542
+ sizeSm: De,
543
+ sizeMd: Re,
544
+ sizeLg: ve,
545
+ sizeXl: Ge,
546
+ sizeXxl: He,
547
+ sizeContent1: _e,
548
+ sizeContent2: Fe,
549
+ sizeContent3: Ve,
550
+ sizeHeader1: Xe,
551
+ sizeHeader2: Ue,
552
+ sizeHeader3: qe,
553
+ size000: Qe,
554
+ size00: Ye,
555
+ size1: Je,
556
+ size2: Ze,
557
+ size3: Ke,
558
+ size4: pe,
559
+ size5: et,
560
+ size6: tt,
561
+ size7: nt,
562
+ size8: it,
563
+ size9: st,
564
+ size10: rt,
565
+ size11: ot,
566
+ size12: ct,
567
+ size13: lt,
568
+ size14: ft,
569
+ size15: at
570
+ } = oe, ut = {
571
+ size000: Qe,
572
+ size00: Ye,
573
+ size1: Je,
574
+ size2: Ze,
575
+ size3: Ke,
576
+ size4: pe,
577
+ size5: et,
578
+ size6: tt,
579
+ size7: nt,
580
+ size8: it,
581
+ size9: st,
582
+ size10: rt,
583
+ size11: ot,
584
+ size12: ct,
585
+ size13: lt,
586
+ size14: ft,
587
+ size15: at
588
+ }, dt = {
589
+ sizeXxs: We,
590
+ sizeXs: Be,
591
+ sizeSm: De,
592
+ sizeMd: Re,
593
+ sizeLg: ve,
594
+ sizeXl: Ge,
595
+ sizeXxl: He,
596
+ sizeContent1: _e,
597
+ sizeContent2: Fe,
598
+ sizeContent3: Ve,
599
+ sizeHeader1: Xe,
600
+ sizeHeader2: Ue,
601
+ sizeHeader3: qe
602
+ }, yt = ut, gt = dt;
603
+ function ie(e) {
604
+ return e.reduce((t, [n, i]) => ({
605
+ ...t,
637
606
  [n]: i
638
607
  }), {});
639
608
  }
640
- function _(t, e) {
641
- if (e !== void 0)
642
- return typeof e == "number" && e >= 0 ? `${e}px` : typeof e == "string" && W(e) ? et(e) ? `var(${e})` : e : A($(t, e));
609
+ function F(e, t) {
610
+ if (t !== void 0)
611
+ return typeof t == "number" && t >= 0 ? `${t}px` : typeof t == "string" && D(t) ? ne(t) ? `var(${t})` : t : A(S(e, t));
643
612
  }
644
- function $(t, e) {
645
- const n = t.space ?? ue, i = nt(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
646
- return A(i[e]);
613
+ function S(e, t) {
614
+ const n = e.space ?? yt, i = ie(Object.entries(n).map(([s, r]) => [s, typeof r == "number" ? `${r}px` : r]));
615
+ return A(i[t]);
647
616
  }
648
- function O(t, e) {
649
- if (e === void 0)
650
- return;
651
- if (typeof e == "number" && e >= 0)
652
- return `${e}px`;
653
- if (typeof e == "string" && W(e))
654
- return et(e) ? `var(${e})` : e;
655
- const n = t.sizes ?? de, i = nt(Object.entries(n).map(([s, o]) => [s, typeof o == "number" ? `${o}px` : o]));
656
- return A(i[e]);
657
- }
658
- function ye(t) {
659
- return t === void 0 ? "100%" : typeof t == "number" ? `${t}px` : t;
660
- }
661
- function Be(t) {
662
- const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), n = () => `--maxWidth: ${ye(t.maxWidth)};`, i = () => t.centerText ? "center-text" : "", s = () => t.centerChildren ? "center-children" : "", o = () => [i(), s()].filter(Boolean).join(" "), r = () => [e(), n()].join("; ");
663
- return h(() => t.as ?? "div", d(m(t, ["as", "maxWidth", "centerText", "centerChildren"]), g({
664
- style: r,
665
- "data-bedrock-center": o
617
+ function M(e, t) {
618
+ if (t === void 0) return;
619
+ if (typeof t == "number" && t >= 0) return `${t}px`;
620
+ if (typeof t == "string" && D(t)) return ne(t) ? `var(${t})` : t;
621
+ const n = e.sizes ?? gt, i = ie(Object.entries(n).map(([s, r]) => [s, typeof r == "number" ? `${r}px` : r]));
622
+ return A(i[t]);
623
+ }
624
+ function mt(e) {
625
+ return e === void 0 ? "100%" : typeof e == "number" ? `${e}px` : e;
626
+ }
627
+ function vt(e) {
628
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [l, f]) => o + `${l}:${f};`, ""), n = () => `--maxWidth: ${mt(e.maxWidth)};`, i = () => e.centerText ? "center-text" : "", s = () => e.centerChildren ? "center-children" : "", r = () => [i(), s()].filter(Boolean).join(" "), c = () => [t(), n()].join("; ");
629
+ return h(() => e.as ?? "div", d(m(e, ["as", "maxWidth", "centerText", "centerChildren"]), b({
630
+ style: c,
631
+ "data-bedrock-center": r
666
632
  })));
667
633
  }
668
- const it = ct({});
669
- function De(t) {
670
- return I(it.Provider, {
634
+ const se = ce({});
635
+ function Gt(e) {
636
+ return T(se.Provider, {
671
637
  get value() {
672
- return t.theme;
638
+ return e.theme;
673
639
  },
674
640
  get children() {
675
- return t.children;
641
+ return e.children;
676
642
  }
677
643
  });
678
644
  }
679
645
  function x() {
680
646
  try {
681
- return rt(it);
647
+ return le(se);
682
648
  } catch {
683
649
  return {};
684
650
  }
685
651
  }
686
- function me(t, e) {
687
- return O(t, e);
652
+ function ht(e, t) {
653
+ return M(e, t);
688
654
  }
689
- function Re(t) {
690
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${me(e, t.minItemWidth)}`, o = () => t.noStretchedColumns === !0 ? "no-stretched-columns" : "", r = () => [n(), i(), s()].join("; ");
691
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "minItemWidth", "noStretchedColumns"]), g({
692
- style: r,
693
- "data-bedrock-column-drop": o
655
+ function Ht(e) {
656
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [l, f]) => o + `${l}:${f};`, ""), i = () => `--gutter: ${S(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${ht(t, e.minItemWidth)}`, r = () => e.noStretchedColumns === !0 ? "no-stretched-columns" : "", c = () => [n(), i(), s()].join("; ");
657
+ return h(() => e.as ?? "div", d(m(e, ["as", "gutter", "minItemWidth", "noStretchedColumns"]), b({
658
+ style: c,
659
+ "data-bedrock-column-drop": r
694
660
  })));
695
661
  }
696
- function Ge(t, e) {
697
- const [n, i] = v(!1), [s, o] = v();
698
- return X(() => {
699
- Q();
700
- }), U(() => {
701
- if (A(s()) === void 0)
702
- return;
703
- e && e(s());
704
- const r = Y(s(), (c) => {
705
- var a;
706
- const l = ((a = c.borderBoxSize) == null ? void 0 : a.inlineSize) ?? c.contentRect.width;
662
+ function _t(e, t) {
663
+ const [n, i] = P(!1), [s, r] = P();
664
+ return U(() => {
665
+ Y();
666
+ }), q(() => {
667
+ if (A(s()) === void 0) return;
668
+ t && t(s());
669
+ const c = J(s(), (o) => {
670
+ var f;
671
+ const l = ((f = o.borderBoxSize) == null ? void 0 : f.inlineSize) ?? o.contentRect.width;
707
672
  if (l > 0) {
708
- const f = l <= t;
709
- i(f);
673
+ const a = l <= e;
674
+ i(a);
710
675
  }
711
676
  });
712
- q(r);
713
- }), [n, o];
677
+ Q(c);
678
+ }), [n, r];
714
679
  }
715
- function he(t) {
716
- return Array.isArray(t) && t.length === 2 && t.every(Number.isFinite) || typeof t == "string" && /^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(t);
680
+ function bt(e) {
681
+ return Array.isArray(e) && e.length === 2 && e.every(Number.isFinite) || typeof e == "string" && /^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e);
717
682
  }
718
- function ge(t) {
719
- return Array.isArray(t) ? t.join("/") : t;
683
+ function $t(e) {
684
+ return Array.isArray(e) ? e.join("/") : e;
720
685
  }
721
- function be(t) {
722
- return he(t) ? ge(t) : void 0;
686
+ function St(e) {
687
+ return bt(e) ? $t(e) : void 0;
723
688
  }
724
- function He(t) {
725
- const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [c, l]) => r + `${c}:${l};`, ""), n = () => be(t.ratio), i = () => n() ? `--ratio: ${n()}` : "", s = () => typeof t.position == "string" ? `--position: ${t.position}` : "50%", o = () => [e(), i(), s()].join("; ");
726
- return h(() => t.as ?? "div", d(m(t, ["as", "ratio", "position"]), g({
727
- style: o,
689
+ function Ft(e) {
690
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [o, l]) => c + `${o}:${l};`, ""), n = () => St(e.ratio), i = () => n() ? `--ratio: ${n()}` : "", s = () => typeof e.position == "string" ? `--position: ${e.position}` : "50%", r = () => [t(), i(), s()].join("; ");
691
+ return h(() => e.as ?? "div", d(m(e, ["as", "ratio", "position"]), b({
692
+ style: r,
728
693
  "data-bedrock-frame": () => ""
729
694
  })));
730
695
  }
731
- function $e(t) {
732
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [c, l]) => r + `${c}:${l};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth ?? 0}px`};`, o = () => [n(), i(), s()].join("; ");
733
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "minItemWidth"]), g({
734
- style: o,
735
- "data-bedrock-grid": () => t.variant === "masonry" ? "variant:masonry" : ""
696
+ function xt(e) {
697
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [o, l]) => c + `${o}:${l};`, ""), i = () => `--gutter: ${S(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--minItemWidth: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth ?? 0}px`};`, r = () => [n(), i(), s()].join("; ");
698
+ return h(() => e.as ?? "div", d(m(e, ["as", "gutter", "minItemWidth"]), b({
699
+ style: r,
700
+ "data-bedrock-grid": () => e.variant === "masonry" ? "variant:masonry" : ""
736
701
  })));
737
702
  }
738
703
  const E = 96;
739
- function st(t) {
740
- const e = String(t), n = parseFloat(e), [, i] = e.match(/[\d.\-+]*\s*(.*)/) ?? ["", ""];
704
+ function re(e) {
705
+ const t = String(e), n = parseFloat(t), [, i] = t.match(/[\d.\-+]*\s*(.*)/) ?? ["", ""];
741
706
  return [n, i];
742
707
  }
743
- function B(t, e) {
744
- if (!t)
745
- return;
746
- const n = e ?? document.body, i = (t ?? "px").trim().toLowerCase();
708
+ function R(e, t) {
709
+ if (!e) return;
710
+ const n = t ?? document.body, i = (e ?? "px").trim().toLowerCase();
747
711
  switch (i) {
748
712
  case "vmin":
749
713
  case "vmax":
@@ -753,11 +717,11 @@ function B(t, e) {
753
717
  return;
754
718
  case "ch":
755
719
  case "ex":
756
- return xe(i, n);
720
+ return wt(i, n);
757
721
  case "em":
758
- return k(n, "font-size");
722
+ return W(n, "font-size");
759
723
  case "rem":
760
- return k(document.body, "font-size");
724
+ return W(document.body, "font-size");
761
725
  case "in":
762
726
  return E;
763
727
  case "cm":
@@ -771,98 +735,95 @@ function B(t, e) {
771
735
  case "px":
772
736
  return 1;
773
737
  default: {
774
- const [s, o] = st(i);
775
- if (isNaN(s))
776
- return;
777
- if (!o)
778
- return s;
779
- const r = B(o, e);
780
- return typeof r == "number" ? s * r : void 0;
738
+ const [s, r] = re(i);
739
+ if (isNaN(s)) return;
740
+ if (!r) return s;
741
+ const c = R(r, t);
742
+ return typeof c == "number" ? s * c : void 0;
781
743
  }
782
744
  }
783
745
  }
784
- function k(t, e) {
785
- const [n, i] = st(
786
- getComputedStyle(t).getPropertyValue(e)
746
+ function W(e, t) {
747
+ const [n, i] = re(
748
+ getComputedStyle(e).getPropertyValue(t)
787
749
  );
788
- return n * (B(i, t) ?? 1);
750
+ return n * (R(i, e) ?? 1);
789
751
  }
790
- function xe(t, e) {
752
+ function wt(e, t) {
791
753
  const n = document.createElement("div");
792
- n.style.height = "128" + t, e.appendChild(n);
793
- const i = k(n, "height") / 128;
794
- return e.removeChild(n), i;
795
- }
796
- var Se = /* @__PURE__ */ J("<div>");
797
- const M = 1, we = typeof window == "object" && typeof document == "object" && document.nodeType === 9, je = (t) => {
798
- const [e, n] = v(1), [i, s] = v(), o = x();
799
- return X(() => (Q(), 0)), U(() => {
800
- const r = A(i());
801
- if (r === void 0)
802
- return;
803
- const c = Y(r, ({
754
+ n.style.height = "128" + e, t.appendChild(n);
755
+ const i = W(n, "height") / 128;
756
+ return t.removeChild(n), i;
757
+ }
758
+ var jt = /* @__PURE__ */ Z("<div>");
759
+ const z = 1, At = typeof window == "object" && typeof document == "object" && document.nodeType === 9, Ct = (e) => {
760
+ const [t, n] = P(1), [i, s] = P(), r = x();
761
+ return U(() => (Y(), 0)), q(() => {
762
+ const c = A(i());
763
+ if (c === void 0) return;
764
+ const o = J(c, ({
804
765
  target: l
805
766
  }) => {
806
767
  n(1);
807
- const a = t.gutter ? $(o, t.gutter) ?? "1px" : "1px", f = we ? B(a, l) : void 0, u = Math.max(f ?? M, M), [b] = Array.from(l.children), S = 1 + Math.min(l.scrollHeight, b.scrollHeight), P = Math.max(Math.ceil(S / u), M);
808
- return n(P), 0;
768
+ const f = e.gutter ? S(r, e.gutter) ?? "1px" : "1px", a = At ? R(f, l) : void 0, y = Math.max(a ?? z, z), [u] = Array.from(l.children), $ = 1 + Math.min(l.scrollHeight, u.scrollHeight), C = Math.max(Math.ceil($ / y), z);
769
+ return n(C), 0;
809
770
  });
810
- return q(c), 0;
771
+ return Q(o), 0;
811
772
  }), (() => {
812
- var r = Se();
813
- return K(s, r), p(r, () => t.children), w((c) => Z(r, `grid-row: span ${e()};`, c)), r;
773
+ var c = jt();
774
+ return p(s, c), ee(c, () => e.children), w((o) => K(c, `grid-row: span ${t()};`, o)), c;
814
775
  })();
815
- }, _e = (t) => {
816
- const e = lt(() => t.children), i = [].concat(e()).filter(Boolean).map((s) => I(je, {
776
+ }, Vt = (e) => {
777
+ const t = fe(() => e.children), i = [].concat(t()).filter(Boolean).map((s) => T(Ct, {
817
778
  get gutter() {
818
- return t.gutter;
779
+ return e.gutter;
819
780
  },
820
781
  children: s
821
782
  }));
822
- return I($e, d({
783
+ return T(xt, d({
823
784
  style: "grid-template-rows: 1px;"
824
- }, t, {
785
+ }, e, {
825
786
  children: i
826
787
  }));
827
- }, Ce = {
788
+ }, Et = {
828
789
  start: "justify:start",
829
790
  end: "justify:end",
830
791
  center: "justify:center",
831
792
  "space-between": "justify:space-between",
832
793
  "space-around": "justify:space-around"
833
- }, Ae = {
794
+ }, Tt = {
834
795
  start: "align:start",
835
796
  end: "align:end",
836
797
  center: "align:center",
837
798
  stretch: "align:stretch"
838
799
  };
839
- function Fe(t) {
840
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.justify !== void 0 ? Ce[t.justify] : void 0, o = () => t.align !== void 0 ? Ae[t.align] : void 0, r = () => [n(), i()].join("; "), c = () => [s(), o()].filter(Boolean).join(" ");
841
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "justify", "align"]), g({
842
- style: r,
843
- "data-bedrock-inline-cluster": c
800
+ function Xt(e) {
801
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((l, [f, a]) => l + `${f}:${a};`, ""), i = () => `--gutter: ${S(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => e.justify !== void 0 ? Et[e.justify] : void 0, r = () => e.align !== void 0 ? Tt[e.align] : void 0, c = () => [n(), i()].join("; "), o = () => [s(), r()].filter(Boolean).join(" ");
802
+ return h(() => e.as ?? "div", d(m(e, ["as", "gutter", "justify", "align"]), b({
803
+ style: c,
804
+ "data-bedrock-inline-cluster": o
844
805
  })));
845
806
  }
846
- const Ee = {
807
+ const It = {
847
808
  start: "justify:start",
848
809
  end: "justify:end",
849
810
  center: "justify:center",
850
811
  "space-between": "justify:space-between",
851
812
  "space-around": "justify:space-around"
852
- }, Ie = {
813
+ }, kt = {
853
814
  start: "align:start",
854
815
  end: "align:end",
855
816
  center: "align:center",
856
817
  stretch: "align:stretch"
857
818
  };
858
- function Ve(t) {
859
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((u, [b, S]) => u + `${b}:${S};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, o = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", r = () => t.justify !== void 0 ? Ee[t.justify] : void 0, c = () => t.align !== void 0 ? Ie[t.align] : void 0, l = () => t.stretch ? `stretch:${t.stretch}` : void 0, a = () => [n(), i(), o(), s()].join("; "), f = () => [r(), c(), l()].filter(Boolean).join(" ");
860
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "justify", "align", "stretch", "switchAt"]), g({
861
- style: a,
862
- "data-bedrock-inline": f
819
+ function Ut(e) {
820
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((y, [u, $]) => y + `${u}:${$};`, ""), i = () => `--gutter: ${S(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => e.minItemWidth ? `--minItemWidth: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth}px`};` : void 0, r = () => e.switchAt ? `--switchAt: ${M(t, e.switchAt) ?? "0px"};` : "", c = () => e.justify !== void 0 ? It[e.justify] : void 0, o = () => e.align !== void 0 ? kt[e.align] : void 0, l = () => e.stretch ? `stretch:${e.stretch}` : void 0, f = () => [n(), i(), r(), s()].join("; "), a = () => [c(), o(), l()].filter(Boolean).join(" ");
821
+ return h(() => e.as ?? "div", d(m(e, ["as", "gutter", "justify", "align", "stretch", "switchAt"]), b({
822
+ style: f,
823
+ "data-bedrock-inline": a
863
824
  })));
864
825
  }
865
- const Te = (t) => ({
826
+ const Ot = (e) => ({
866
827
  left: "padding-inline-start",
867
828
  right: "padding-inline-end",
868
829
  top: "padding-block-start",
@@ -871,29 +832,28 @@ const Te = (t) => ({
871
832
  inlineEnd: "padding-inline-end",
872
833
  blockStart: "padding-block-start",
873
834
  blockEnd: "padding-block-end"
874
- })[t], ve = (t, e) => {
875
- if (!e)
876
- return "";
877
- if (Array.isArray(e) && e.length > 4)
835
+ })[e], Pt = (e, t) => {
836
+ if (!t) return "";
837
+ if (Array.isArray(t) && t.length > 4)
878
838
  throw new Error("padding arrays can only be 4 or less in length");
879
- const n = typeof e == "object" && !Array.isArray(e) ? Object.entries(e).reduce((i, [s, o]) => ({
839
+ const n = typeof t == "object" && !Array.isArray(t) ? Object.entries(t).reduce((i, [s, r]) => ({
880
840
  ...i,
881
- [Te(s)]: _(t, o) ?? "0px"
841
+ [Ot(s)]: F(e, r) ?? "0px"
882
842
  }), {}) : {
883
- padding: Array.from(Array.isArray(e) ? e : [e]).map((i) => _(t, i) ?? "0px").join(" ")
843
+ padding: Array.from(Array.isArray(t) ? t : [t]).map((i) => F(e, i) ?? "0px").join(" ")
884
844
  };
885
- return Object.entries(n).reduce((i, [s, o]) => i + `${s}:${o};`, "");
845
+ return Object.entries(n).reduce((i, [s, r]) => i + `${s}:${r};`, "");
886
846
  };
887
- function Xe(t) {
888
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((o, [r, c]) => o + `${r}:${c};`, ""), i = () => ve(e, t.padding), s = () => [n(), i()].join("; ");
889
- return h(() => t.as ?? "div", d(m(t, ["as", "padding"]), g({
847
+ function qt(e) {
848
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((r, [c, o]) => r + `${c}:${o};`, ""), i = () => Pt(t, e.padding), s = () => [n(), i()].join("; ");
849
+ return h(() => e.as ?? "div", d(m(e, ["as", "padding"]), b({
890
850
  style: s,
891
851
  "data-bedrock-padbox": () => ""
892
852
  })));
893
853
  }
894
- function Ue(t) {
895
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [c, l]) => r + `${c}:${l};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => {
896
- switch (t.snapType) {
854
+ function Qt(e) {
855
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [o, l]) => c + `${o}:${l};`, ""), i = () => `--gutter: ${S(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => {
856
+ switch (e.snapType) {
897
857
  case "none":
898
858
  return "snapType:none";
899
859
  case "proximity":
@@ -903,13 +863,13 @@ function Ue(t) {
903
863
  default:
904
864
  return "snapType:none";
905
865
  }
906
- }, o = () => [n(), i()].join("; ");
907
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter"]), g({
908
- style: o,
866
+ }, r = () => [n(), i()].join("; ");
867
+ return h(() => e.as ?? "div", d(m(e, ["as", "gutter"]), b({
868
+ style: r,
909
869
  "data-bedrock-reel": s
910
870
  })));
911
871
  }
912
- const F = {
872
+ const V = {
913
873
  "1/4": "fraction:1/4",
914
874
  "1/3": "fraction:1/3",
915
875
  "1/2": "fraction:1/2",
@@ -918,85 +878,85 @@ const F = {
918
878
  "auto-start": "fraction:auto-start",
919
879
  "auto-end": "fraction:auto-end"
920
880
  };
921
- function qe(t) {
922
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((l, [a, f]) => l + `${a}:${f};`, ""), i = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", s = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, o = () => F[t.fraction ?? "1/2"] ?? F["1/2"], r = () => t.minItemWidth ? `--minItemWidth: ${typeof t.minItemWidth == "string" ? t.minItemWidth : `${t.minItemWidth}px`};` : void 0, c = () => [n(), s(), i(), r()].join("; ");
923
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "fraction"]), g({
924
- style: c,
925
- "data-bedrock-split": o
881
+ function Yt(e) {
882
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((l, [f, a]) => l + `${f}:${a};`, ""), i = () => e.switchAt ? `--switchAt: ${M(t, e.switchAt) ?? "0px"};` : "", s = () => `--gutter: ${S(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, r = () => V[e.fraction ?? "1/2"] ?? V["1/2"], c = () => e.minItemWidth ? `--minItemWidth: ${typeof e.minItemWidth == "string" ? e.minItemWidth : `${e.minItemWidth}px`};` : void 0, o = () => [n(), s(), i(), c()].join("; ");
883
+ return h(() => e.as ?? "div", d(m(e, ["as", "gutter", "fraction"]), b({
884
+ style: o,
885
+ "data-bedrock-split": r
926
886
  })));
927
887
  }
928
- const Oe = {
888
+ const Mt = {
929
889
  start: "align:start",
930
890
  end: "align:end",
931
891
  center: "align:center",
932
892
  stretch: "align:stretch"
933
893
  };
934
- function Qe(t) {
935
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => [n(), i()].join("; "), o = () => t.align !== void 0 ? Oe[t.align] : void 0, r = () => [o()].filter(Boolean).join(" ");
936
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter"]), g({
894
+ function Jt(e) {
895
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [l, f]) => o + `${l}:${f};`, ""), i = () => `--gutter: ${S(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => [n(), i()].join("; "), r = () => e.align !== void 0 ? Mt[e.align] : void 0, c = () => [r()].filter(Boolean).join(" ");
896
+ return h(() => e.as ?? "div", d(m(e, ["as", "gutter"]), b({
937
897
  style: s,
938
- "data-bedrock-stack": r
898
+ "data-bedrock-stack": c
939
899
  })));
940
900
  }
941
- var Pe = /* @__PURE__ */ J("<div data-bedrock-cover-centered>");
942
- function Me(t) {
943
- return typeof t == "number" ? `${t}px` : t && W(t) ? t : "100vh";
901
+ var zt = /* @__PURE__ */ Z("<div data-bedrock-cover-centered>");
902
+ function Nt(e) {
903
+ return typeof e == "number" ? `${e}px` : e && D(e) ? e : "100vh";
944
904
  }
945
- function ze(t) {
946
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--minHeight: ${Me(t.minHeight)};`, o = () => t.variant === "stretch-content" || t.stretchContent === !0 ? "stretch-content" : "", r = () => [n(), i(), s()].join("; ");
947
- return h(() => t.as ?? "div", d(m(t, ["as", "minHeight", "stretchContent"]), g({
948
- style: r,
949
- "data-bedrock-cover": o
905
+ function Lt(e) {
906
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [l, f]) => o + `${l}:${f};`, ""), i = () => `--gutter: ${S(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--minHeight: ${Nt(e.minHeight)};`, r = () => e.variant === "stretch-content" || e.stretchContent === !0 ? "stretch-content" : "", c = () => [n(), i(), s()].join("; ");
907
+ return h(() => e.as ?? "div", d(m(e, ["as", "minHeight", "stretchContent"]), b({
908
+ style: c,
909
+ "data-bedrock-cover": r
950
910
  })));
951
911
  }
952
- function Ye(t) {
953
- const [e, n] = V(t, ["children", "top", "bottom"]);
954
- return I(ze, d(n, {
912
+ function Zt(e) {
913
+ const [t, n] = X(e, ["children", "top", "bottom"]);
914
+ return T(Lt, d(n, {
955
915
  get children() {
956
- return [T(() => e.top), (() => {
957
- var i = Pe();
958
- return p(i, () => e.children), i;
959
- })(), T(() => e.bottom)];
916
+ return [O(() => t.top), (() => {
917
+ var i = zt();
918
+ return ee(i, () => t.children), i;
919
+ })(), O(() => t.bottom)];
960
920
  }
961
921
  }));
962
922
  }
963
- function Je(t) {
964
- const e = x(), n = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((c, [l, a]) => c + `${l}:${a};`, ""), i = () => `--gutter: ${$(e, t.gap ?? t.gutter ?? "size00") ?? "0px"}`, s = () => `--columns: ${A(Math.max(t.colCount ?? t.columns ?? 1, 1)) ?? 1};`, o = () => t.switchAt ? `--switchAt: ${O(e, t.switchAt) ?? "0px"};` : "", r = () => [n(), i(), s(), o()].filter(Boolean).join("; ");
965
- return h(() => t.as ?? "div", d(m(t, ["as", "gutter", "columns", "colCount", "switchAt"]), g({
966
- style: r,
923
+ function Kt(e) {
924
+ const t = x(), n = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((o, [l, f]) => o + `${l}:${f};`, ""), i = () => `--gutter: ${S(t, e.gap ?? e.gutter ?? "size00") ?? "0px"}`, s = () => `--columns: ${A(Math.max(e.colCount ?? e.columns ?? 1, 1)) ?? 1};`, r = () => e.switchAt ? `--switchAt: ${M(t, e.switchAt) ?? "0px"};` : "", c = () => [n(), i(), s(), r()].filter(Boolean).join("; ");
925
+ return h(() => e.as ?? "div", d(m(e, ["as", "gutter", "columns", "colCount", "switchAt"]), b({
926
+ style: c,
967
927
  "data-bedrock-columns": () => ""
968
928
  })));
969
929
  }
970
- const Ne = (t) => typeof t == "number" ? t : 1;
971
- function Ze(t) {
972
- const e = () => typeof t.style == "string" ? t.style : Object.entries(t.style ?? {}).reduce((r, [c, l]) => r + `${c}:${l};`, ""), n = () => `--span: ${Ne(t.span)};`, i = () => t.offsetStart && t.offsetStart > 0 ? `--offsetStart: ${t.offsetStart};` : "", s = () => t.offsetEnd && t.offsetEnd > 0 ? `--offsetEnd: ${t.offsetEnd};` : "", o = () => [e(), n(), i(), s()].join("; ");
973
- return h(() => t.as ?? "div", d(m(t, ["as", "span", "offsetStart", "offsetEnd"]), g({
974
- style: o,
930
+ const Wt = (e) => typeof e == "number" ? e : 1;
931
+ function pt(e) {
932
+ const t = () => typeof e.style == "string" ? e.style : Object.entries(e.style ?? {}).reduce((c, [o, l]) => c + `${o}:${l};`, ""), n = () => `--span: ${Wt(e.span)};`, i = () => e.offsetStart && e.offsetStart > 0 ? `--offsetStart: ${e.offsetStart};` : "", s = () => e.offsetEnd && e.offsetEnd > 0 ? `--offsetEnd: ${e.offsetEnd};` : "", r = () => [t(), n(), i(), s()].join("; ");
933
+ return h(() => e.as ?? "div", d(m(e, ["as", "span", "offsetStart", "offsetEnd"]), b({
934
+ style: r,
975
935
  "data-bedrock-column": () => ""
976
936
  })));
977
937
  }
978
938
  export {
979
- Be as Center,
980
- Ze as Column,
981
- Re as ColumnDrop,
982
- Je as Columns,
983
- Ye as Cover,
984
- He as Frame,
985
- $e as Grid,
986
- Ve as Inline,
987
- Fe as InlineCluster,
988
- _e as MasonryGrid,
989
- Xe as PadBox,
990
- Ue as Reel,
991
- qe as Split,
992
- Qe as Stack,
993
- De as ThemeProvider,
994
- W as checkIsCSSLength,
995
- Ge as createContainerQuery,
996
- _ as getSafeGutter,
997
- O as getSizeValue,
998
- $ as getSpacingValue,
999
- de as sizes,
1000
- ue as spacing,
939
+ vt as Center,
940
+ pt as Column,
941
+ Ht as ColumnDrop,
942
+ Kt as Columns,
943
+ Zt as Cover,
944
+ Ft as Frame,
945
+ xt as Grid,
946
+ Ut as Inline,
947
+ Xt as InlineCluster,
948
+ Vt as MasonryGrid,
949
+ qt as PadBox,
950
+ Qt as Reel,
951
+ Yt as Split,
952
+ Jt as Stack,
953
+ Gt as ThemeProvider,
954
+ D as checkIsCSSLength,
955
+ _t as createContainerQuery,
956
+ F as getSafeGutter,
957
+ M as getSizeValue,
958
+ S as getSpacingValue,
959
+ gt as sizes,
960
+ yt as spacing,
1001
961
  x as useTheme
1002
962
  };