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