@depict-ai/utilishared 2.0.10 → 2.0.14

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/latest/index.cjs CHANGED
@@ -26,6 +26,7 @@ function $parcel$export(e, n, v, s) {
26
26
  function $parcel$interopDefault(a) {
27
27
  return a && a.__esModule ? a.default : a;
28
28
  }
29
+ $parcel$export(module.exports, "findMostFrequentItem", () => $273f6ade978074c1$export$2d9dc2897d88588);
29
30
  $parcel$export(module.exports, "base64_decode_unicode", () => $ff7c981d968fe09a$export$a7e53ec3b3fdd030);
30
31
  $parcel$export(module.exports, "base64_encode_unicode", () => $ff7c981d968fe09a$export$a1893782a2a6be0d);
31
32
  $parcel$export(module.exports, "make_plp_recommendations_inserted_handler", () => $dba5a9c0f6fb4324$export$6f051469dd676a8b);
@@ -271,7 +272,7 @@ $parcel$export(module.exports, "version", () => $815f67c61b4c0a42$export$83d89fb
271
272
  $parcel$export(module.exports, "add_to_version_info", () => $e4a18bf12ad092d9$export$2cefb7e61fcbae00);
272
273
  $parcel$export(module.exports, "sync_el_content_with_accessor", () => $35303d72263038db$export$c3f56a35e076f139);
273
274
  $parcel$export(module.exports, "use_href_accessor", () => $da35c7e27be2a442$export$e35115e6d0715f77);
274
- const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.0.10";
275
+ const $815f67c61b4c0a42$export$83d89fbfd8236492 = "2.0.14";
275
276
  const $7b5e577a60b81e60$export$55fe61489d2c7417 = /*@__PURE__*/(() => process.env.STRIP_DEBUG === "true" ? false : process.env.DEBUG === "true" || process.env.NODE_ENV === "development" || process.env.BUILD_TARGET !== "node" && (globalThis?.document?.currentScript?.dataset?.debug === "true" || globalThis?.localStorage?.getItem?.("debug") === "true"))();
276
277
  const $e6c6e7929ea385ae$var$browser_prefix_styling = "color: #fff;";
277
278
  let $e6c6e7929ea385ae$var$browser_prefix = "[Depict]";
@@ -302,6 +303,18 @@ function $e4a18bf12ad092d9$export$fe609f0216e4ebef(url) {
302
303
  return got_url_object ? url_object.href : url_object;
303
304
  }
304
305
 
306
+ /**
307
+ * Finds most frequent item in an array, written by chatGPT with some nudging. Returns `undefined` if the array is empty.
308
+ * @param arr array to find the most frequent item in
309
+ */
310
+ function $273f6ade978074c1$export$2d9dc2897d88588(arr) {
311
+ const freqMap = arr.reduce((map, item) => map.set(item, (map.get(item) || 0) + 1), new Map());
312
+ const maxFreq = Math.max(...freqMap.values());
313
+ for (let [key, value] of freqMap) {
314
+ if (value === maxFreq) return key;
315
+ }
316
+ }
317
+
305
318
  // Source: https://stackoverflow.com/a/30106551
306
319
  /**
307
320
  * Encoding UTF8 ⇢ base64
@@ -3998,7 +4011,7 @@ function $1da560af170fb839$export$e4741190ccada479(element, selector) {
3998
4011
  }
3999
4012
  return result;
4000
4013
  }
4001
- const $1683d0164abd7c1d$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class="depict-slider depict">`),
4014
+ var $1683d0164abd7c1d$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class="depict-slider depict">`),
4002
4015
  $1683d0164abd7c1d$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=sliding>`),
4003
4016
  $1683d0164abd7c1d$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button aria-label="Scroll left"class="left d-navbutton"type=button>`),
4004
4017
  $1683d0164abd7c1d$var$_tmpl$4 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button aria-label="Scroll right"class="right d-navbutton"type=button>`);
@@ -4976,7 +4989,7 @@ async function $7af744346f17bf99$export$cd12721587f4f16d(t, rendering_options, o
4976
4989
  elements: container ? container : [slider.container]
4977
4990
  };
4978
4991
  }
4979
- const $66a2a93dfa520bc6$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button class=load_more>`);
4992
+ var $66a2a93dfa520bc6$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button class=load_more>`);
4980
4993
  async function $66a2a93dfa520bc6$export$30933c637c977eef({
4981
4994
  t: t,
4982
4995
  recs: recs,
@@ -5117,7 +5130,7 @@ function $66a2a93dfa520bc6$var$setup_load_more(t, root, chunk_size, view_more_te
5117
5130
  } = t,
5118
5131
  load_more_cont = $bf7f12fe044e41b2$export$d3e2a0560cbf4787(`<div class="load-more-container"></div>`),
5119
5132
  load_button = load_more_cont.appendChild((() => {
5120
- const _el$ = $z0IcO$solidjsweb.getNextElement($66a2a93dfa520bc6$var$_tmpl$);
5133
+ var _el$ = $z0IcO$solidjsweb.getNextElement($66a2a93dfa520bc6$var$_tmpl$);
5121
5134
  $z0IcO$solidjsweb.insert(_el$, view_more_text);
5122
5135
  return _el$;
5123
5136
  })());
@@ -5266,7 +5279,7 @@ const $107a74aa4ea5902d$export$ffb0004e005737fa = ({
5266
5279
  $107a74aa4ea5902d$var$appendChild(df, children);
5267
5280
  return df;
5268
5281
  };
5269
- const $c3af1bfb402a8820$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
5282
+ var $c3af1bfb402a8820$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
5270
5283
  $c3af1bfb402a8820$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
5271
5284
  const $c3af1bfb402a8820$export$dc84183312f0c201 = /*@__PURE__*/(() => $z0IcO$solidjsweb.getNextElement($c3af1bfb402a8820$var$_tmpl$))();
5272
5285
  const $c3af1bfb402a8820$export$6038895ac52bd044 = /*@__PURE__*/(() => $z0IcO$solidjsweb.getNextElement($c3af1bfb402a8820$var$_tmpl$2))();
@@ -5305,7 +5318,7 @@ function $ef237c2bba47492f$export$f8913c8a18f7ca21(iterables) {
5305
5318
  }))).then($268cbd9e4ade92db$export$b3bbfd758f11cfa9(ourselves.exit));
5306
5319
  return ourselves;
5307
5320
  }
5308
- const $1cc2444a0f1b992e$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<style type=text/css>`),
5321
+ var $1cc2444a0f1b992e$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<style type=text/css>`),
5309
5322
  $1cc2444a0f1b992e$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div>`);
5310
5323
  const $1cc2444a0f1b992e$export$717f13d9ba00ca19 = (min, max) => `@media ${min ? `(min-width:${min})` : ``}${min && max ? ` and ` : ``}${max ? `(max-width:${max})` : ``}`;
5311
5324
  async function $1cc2444a0f1b992e$export$c84671f46d6a1ca({
@@ -5365,7 +5378,7 @@ async function $1cc2444a0f1b992e$export$c84671f46d6a1ca({
5365
5378
  if (button) {
5366
5379
  button_class = $650b64c1b384c895$export$a6db784f019668ba();
5367
5380
  const button_container = (() => {
5368
- const _el$2 = $z0IcO$solidjsweb.getNextElement($1cc2444a0f1b992e$var$_tmpl$2);
5381
+ var _el$2 = $z0IcO$solidjsweb.getNextElement($1cc2444a0f1b992e$var$_tmpl$2);
5369
5382
  $z0IcO$solidjsweb.className(_el$2, "load-more-container " + button_class);
5370
5383
  $z0IcO$solidjsweb.insert(_el$2, () => $90e0b983530610e7$export$f63fcc839cb0f734("click", () => ipns(ipns.state + (rows_or_empty_object.rows_per_click ?? 1)), button));
5371
5384
  return _el$2;
@@ -5665,7 +5678,7 @@ function $a8a0385b88626561$export$80039a49055269fb() {
5665
5678
  };
5666
5679
  return Object.fromEntries(["left", "right"].map(side => [side, [new_arrowimage()]]));
5667
5680
  }
5668
- const $edc9fe0b09e00df6$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<img src=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+>`);
5681
+ var $edc9fe0b09e00df6$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<img src=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7IiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgOCAxNSI+PHBhdGggc3R5bGU9ImZpbGw6IHJnYigwLCAwLCAwKTsiIGQ9Ik0uNjI5LjAwMWMuMTUuMDA4LjI5My4wNzIuMzk4LjE4bDYuNzkyIDYuODlhLjYwMS42MDEgMCAwIDEgMCAuODZsLTYuNzkyIDYuODg4YS41ODYuNTg2IDAgMCAxLS44NDYgMCAuNjAxLjYwMSAwIDAgMSAwLS44Nkw2LjU1NCA3LjUuMjExIDEuMDAxYS42MDEuNjAxIDAgMCAxIDAtLjg2Yy4xMTUtLjEuMjY2LS4xNS40MTgtLjE0Ij48L3BhdGg+PC9zdmc+>`);
5669
5682
  function $edc9fe0b09e00df6$export$af88b4929c2dc86() {
5670
5683
  const img = $z0IcO$solidjsweb.getNextElement($edc9fe0b09e00df6$var$_tmpl$);
5671
5684
  return {
@@ -5673,7 +5686,7 @@ function $edc9fe0b09e00df6$export$af88b4929c2dc86() {
5673
5686
  right: [img.cloneNode()]
5674
5687
  };
5675
5688
  }
5676
- const $158313c0231e6555$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<label class=checkbox_container><input type=radio><span class=checkmark>`);
5689
+ var $158313c0231e6555$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<label class=checkbox_container><input type=radio><span class=checkmark>`);
5677
5690
  function $158313c0231e6555$export$1d17a045bcc711b1({
5678
5691
  t: t,
5679
5692
  navcont_insertion_fn: navcont_insertion_fn,
@@ -5762,7 +5775,7 @@ function $158313c0231e6555$export$1d17a045bcc711b1({
5762
5775
  }
5763
5776
  function $158313c0231e6555$export$a09282b33e69b43f(unique_name) {
5764
5777
  return (() => {
5765
- const _el$ = $z0IcO$solidjsweb.getNextElement($158313c0231e6555$var$_tmpl$),
5778
+ var _el$ = $z0IcO$solidjsweb.getNextElement($158313c0231e6555$var$_tmpl$),
5766
5779
  _el$2 = _el$.firstChild;
5767
5780
  $z0IcO$solidjsweb.setAttribute(_el$2, "name", `radio-${unique_name}`);
5768
5781
  return _el$;
@@ -5955,7 +5968,7 @@ function $91f7baba008bce7d$export$5723caf9a8335aa6(_t, fraction = 1, max_steps,
5955
5968
  mutation_plugin: mutation_plugin
5956
5969
  };
5957
5970
  }
5958
- const $1942530ef27e571b$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=depict_slider_scroll_bar>`),
5971
+ var $1942530ef27e571b$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=depict_slider_scroll_bar>`),
5959
5972
  $1942530ef27e571b$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=depict_slider_scroll_container>`);
5960
5973
  function $1942530ef27e571b$export$93223e488e7ee078(options) {
5961
5974
  function constructor_plugin(_slider_options) {
@@ -5987,7 +6000,7 @@ function $1942530ef27e571b$export$93223e488e7ee078(options) {
5987
6000
  mutation_plugin: mutation_plugin
5988
6001
  };
5989
6002
  }
5990
- const $6af20338fcad1911$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div style="position:absolute;width:1em;overflow:scroll;scroll-snap-type:x mandatory;"><div style=scroll-snap-align:start;color:transparent;>test`);
6003
+ var $6af20338fcad1911$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div style="position:absolute;width:1em;overflow:scroll;scroll-snap-type:x mandatory;"><div style=scroll-snap-align:start;color:transparent;>test`);
5991
6004
  function $6af20338fcad1911$export$b36d2489a5a16728(_t, {
5992
6005
  snapEvery: snapEvery,
5993
6006
  align: align
@@ -7517,13 +7530,13 @@ const $5185cc9bd668b8f9$var$get_voyado_id = () => {
7517
7530
  const $5185cc9bd668b8f9$export$a739d9a07da7f9ce = /*@__PURE__*/$268cbd9e4ade92db$export$b3bbfd758f11cfa9(() => {
7518
7531
  $e0a87646d12cb987$export$93ae15b1ae509334($5185cc9bd668b8f9$var$get_voyado_id);
7519
7532
  });
7520
- const $dba3e72fb3e5c53d$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button>`);
7533
+ var $dba3e72fb3e5c53d$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button>`);
7521
7534
  function $dba3e72fb3e5c53d$export$4a3043e508dd72f0({
7522
7535
  children: children,
7523
7536
  ...attributes
7524
7537
  }) {
7525
7538
  const button = (() => {
7526
- const _el$ = $z0IcO$solidjsweb.getNextElement($dba3e72fb3e5c53d$var$_tmpl$);
7539
+ var _el$ = $z0IcO$solidjsweb.getNextElement($dba3e72fb3e5c53d$var$_tmpl$);
7527
7540
  $z0IcO$solidjsweb.spread(_el$, $z0IcO$solidjsweb.mergeProps(attributes, {
7528
7541
  "type": "button"
7529
7542
  }), false, true);
@@ -7534,7 +7547,7 @@ function $dba3e72fb3e5c53d$export$4a3043e508dd72f0({
7534
7547
  button.classList.add("show-more");
7535
7548
  return button;
7536
7549
  }
7537
- const $a7550e9f97f84465$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=slidein-backdrop>`),
7550
+ var $a7550e9f97f84465$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=slidein-backdrop>`),
7538
7551
  $a7550e9f97f84465$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=slidein><div class=header><span class=title></span><button class=close></button></div><div class=body>`),
7539
7552
  $a7550e9f97f84465$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=depict><!$><!/><!$><!/>`);
7540
7553
  async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({
@@ -7547,7 +7560,7 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({
7547
7560
  const open_promise = new Promise(r => close_ = r);
7548
7561
  const body = await (0, $2a1cbc63a04d4a2d$export$b6ae1bc530f4c149).wait_for_element("body");
7549
7562
  const backdrop = (() => {
7550
- const _el$ = $z0IcO$solidjsweb.getNextElement($a7550e9f97f84465$var$_tmpl$);
7563
+ var _el$ = $z0IcO$solidjsweb.getNextElement($a7550e9f97f84465$var$_tmpl$);
7551
7564
  $z0IcO$solidjsweb.addEventListener(_el$, "click", close_, true);
7552
7565
  $z0IcO$solidjsweb.runHydrationEvents();
7553
7566
  return _el$;
@@ -7555,7 +7568,7 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({
7555
7568
  const [exit_title_iterator, exitable_title_iterator] = $bbe52965151ee7f0$export$927664b47117acb0(title_);
7556
7569
  const closing_handlers = [exit_title_iterator];
7557
7570
  const slidein = (() => {
7558
- const _el$2 = $z0IcO$solidjsweb.getNextElement($a7550e9f97f84465$var$_tmpl$2),
7571
+ var _el$2 = $z0IcO$solidjsweb.getNextElement($a7550e9f97f84465$var$_tmpl$2),
7559
7572
  _el$3 = _el$2.firstChild,
7560
7573
  _el$4 = _el$3.firstChild,
7561
7574
  _el$5 = _el$4.nextSibling,
@@ -7568,7 +7581,7 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({
7568
7581
  return _el$2;
7569
7582
  })();
7570
7583
  const elements_in_container = (() => {
7571
- const _el$7 = $z0IcO$solidjsweb.getNextElement($a7550e9f97f84465$var$_tmpl$3),
7584
+ var _el$7 = $z0IcO$solidjsweb.getNextElement($a7550e9f97f84465$var$_tmpl$3),
7572
7585
  _el$8 = _el$7.firstChild,
7573
7586
  [_el$9, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$8.nextSibling),
7574
7587
  _el$10 = _el$9.nextSibling,
@@ -7625,7 +7638,7 @@ async function $a7550e9f97f84465$export$8a0e4d6f6abf7e90({
7625
7638
  };
7626
7639
  }
7627
7640
  $z0IcO$solidjsweb.delegateEvents(["click"]);
7628
- const $bd0fccdac6624b01$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=option-list>`),
7641
+ var $bd0fccdac6624b01$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=option-list>`),
7629
7642
  $bd0fccdac6624b01$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button type=button><span class=size></span><!$><!/>`),
7630
7643
  $bd0fccdac6624b01$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<span class=sold-out>`);
7631
7644
  async function $bd0fccdac6624b01$export$c068ad5361be7646({
@@ -7644,14 +7657,14 @@ async function $bd0fccdac6624b01$export$c068ad5361be7646({
7644
7657
  CloseIcon: CloseIcon,
7645
7658
  title_: title_,
7646
7659
  children: [(() => {
7647
- const _el$ = $z0IcO$solidjsweb.getNextElement($bd0fccdac6624b01$var$_tmpl$);
7660
+ var _el$ = $z0IcO$solidjsweb.getNextElement($bd0fccdac6624b01$var$_tmpl$);
7648
7661
  $z0IcO$solidjsweb.insert(_el$, () => items_.map(({
7649
7662
  size_name_: size_name_,
7650
7663
  is_available_: is_available_,
7651
7664
  id_: id_
7652
7665
  }) => {
7653
7666
  const button = (() => {
7654
- const _el$2 = $z0IcO$solidjsweb.getNextElement($bd0fccdac6624b01$var$_tmpl$2),
7667
+ var _el$2 = $z0IcO$solidjsweb.getNextElement($bd0fccdac6624b01$var$_tmpl$2),
7655
7668
  _el$3 = _el$2.firstChild,
7656
7669
  _el$4 = _el$3.nextSibling,
7657
7670
  [_el$5, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$4.nextSibling);
@@ -7662,7 +7675,7 @@ async function $bd0fccdac6624b01$export$c068ad5361be7646({
7662
7675
  $z0IcO$solidjsweb.className(_el$2, "option" + (is_available_ ? " available" : ""));
7663
7676
  $z0IcO$solidjsweb.insert(_el$3, size_name_);
7664
7677
  $z0IcO$solidjsweb.insert(_el$2, !is_available_ && (() => {
7665
- const _el$6 = $z0IcO$solidjsweb.getNextElement($bd0fccdac6624b01$var$_tmpl$3);
7678
+ var _el$6 = $z0IcO$solidjsweb.getNextElement($bd0fccdac6624b01$var$_tmpl$3);
7666
7679
  $z0IcO$solidjsweb.insert(_el$6, () => $374ca311b64f260b$export$7c081fdbc65b6a2a(exitable_oos_iterator));
7667
7680
  return _el$6;
7668
7681
  })(), _el$5, _co$);
@@ -7682,7 +7695,7 @@ async function $bd0fccdac6624b01$export$c068ad5361be7646({
7682
7695
  $z0IcO$solidjsweb.delegateEvents(["click"]);
7683
7696
  var $dcdbfd7a994587c9$exports = {};
7684
7697
  $dcdbfd7a994587c9$exports = ".depict-placeholder {\n will-change: mask, -webkit-mask;\n mask-position-x: 125%;\n mask-position-y: center;\n background: #ddd;\n animation: 1.5s linear infinite depict-placeholder;\n display: inline-block;\n position: relative;\n overflow: hidden;\n -webkit-mask: linear-gradient(-60deg, #000 30%, #0005, #000 70%) 125% / 300% 100%;\n -webkit-mask-image: ;\n mask-image: ;\n -webkit-mask-size: ;\n mask-size: ;\n}\n\n@keyframes depict-placeholder {\n 0% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 10% {\n mask-position-x: 125%;\n -webkit-mask-position-x: 125%;\n }\n\n 90% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n\n 100% {\n mask-position-x: -25%;\n -webkit-mask-position-x: -25%;\n }\n}\n\n";
7685
- const $e587cb3b31b82f43$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div>`);
7698
+ var $e587cb3b31b82f43$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div>`);
7686
7699
  let $e587cb3b31b82f43$var$inserted = false;
7687
7700
  const $e587cb3b31b82f43$export$84712d0562a614b8 = ({
7688
7701
  width: width,
@@ -7697,7 +7710,7 @@ const $e587cb3b31b82f43$export$84712d0562a614b8 = ({
7697
7710
  $e587cb3b31b82f43$var$inserted = true;
7698
7711
  }
7699
7712
  return (() => {
7700
- const _el$ = $z0IcO$solidjsweb.getNextElement($e587cb3b31b82f43$var$_tmpl$);
7713
+ var _el$ = $z0IcO$solidjsweb.getNextElement($e587cb3b31b82f43$var$_tmpl$);
7701
7714
  $z0IcO$solidjsweb.className(_el$, `depict-placeholder${extra_classes ? " " + extra_classes : ""}`);
7702
7715
  $z0IcO$solidjsweb.spread(_el$, attributes, false, false);
7703
7716
  $z0IcO$solidjsweb.effect(_$p => $z0IcO$solidjsweb.style(_el$, style ? style : `width:${width};height:${height};`, _$p));
@@ -7713,25 +7726,25 @@ const $e587cb3b31b82f43$export$d613f5b6d0a331a8 = ({
7713
7726
  style: `position:relative;width:100%;padding-bottom:${1 / aspect_ratio * 100}%`
7714
7727
  }, attributes));
7715
7728
  };
7716
- const $b9c0746e4d18273a$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class="depict recommendation_container"><!$><!/><div class=grid>`),
7729
+ var $b9c0746e4d18273a$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class="depict recommendation_container"><!$><!/><div class=grid>`),
7717
7730
  $b9c0746e4d18273a$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<h4 class=recs_header>`);
7718
7731
  const $b9c0746e4d18273a$export$97f31f44c68c1d5 = (title, surface_classes = []) => $90e0b983530610e7$export$eb0b9ed911409b57(e => e.classList.add(...surface_classes), (() => {
7719
- const _el$ = $z0IcO$solidjsweb.getNextElement($b9c0746e4d18273a$var$_tmpl$),
7732
+ var _el$ = $z0IcO$solidjsweb.getNextElement($b9c0746e4d18273a$var$_tmpl$),
7720
7733
  _el$3 = _el$.firstChild,
7721
7734
  [_el$4, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$3.nextSibling),
7722
7735
  _el$2 = _el$4.nextSibling;
7723
7736
  $z0IcO$solidjsweb.insert(_el$, title && typeof title === "string" ? (() => {
7724
- const _el$5 = $z0IcO$solidjsweb.getNextElement($b9c0746e4d18273a$var$_tmpl$2);
7737
+ var _el$5 = $z0IcO$solidjsweb.getNextElement($b9c0746e4d18273a$var$_tmpl$2);
7725
7738
  $z0IcO$solidjsweb.insert(_el$5, title);
7726
7739
  return _el$5;
7727
7740
  })() : title, _el$4, _co$);
7728
7741
  return _el$;
7729
7742
  })());
7730
- const $69accc27bcbd6972$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
7743
+ var $69accc27bcbd6972$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg viewBox="0 0 320 512"><desc>Right arrow</desc><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z">`),
7731
7744
  $69accc27bcbd6972$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<svg viewBox="0 0 320 512"><desc>Left arrow</desc><path d="M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z">`);
7732
7745
  const $69accc27bcbd6972$export$32a55d57d151bc5a = () => $z0IcO$solidjsweb.getNextElement($69accc27bcbd6972$var$_tmpl$);
7733
7746
  const $69accc27bcbd6972$export$ddd70fdae1b350e6 = () => $z0IcO$solidjsweb.getNextElement($69accc27bcbd6972$var$_tmpl$2);
7734
- const $af92e61c7dfccf01$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button class=color-circle-container><div class=outer-circle><div class=inner-circle>`),
7747
+ var $af92e61c7dfccf01$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<button class=color-circle-container><div class=outer-circle><div class=inner-circle>`),
7735
7748
  $af92e61c7dfccf01$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=color-picker role=form aria-label="Color picker">`);
7736
7749
  /**
7737
7750
  * Internal color circle used in ColorPicker
@@ -7743,22 +7756,22 @@ function $af92e61c7dfccf01$var$ColorCircle({
7743
7756
  onHoverUpdate: onHoverUpdate
7744
7757
  }) {
7745
7758
  const button = (() => {
7746
- const _el$ = $z0IcO$solidjsweb.getNextElement($af92e61c7dfccf01$var$_tmpl$),
7759
+ var _el$ = $z0IcO$solidjsweb.getNextElement($af92e61c7dfccf01$var$_tmpl$),
7747
7760
  _el$2 = _el$.firstChild,
7748
7761
  _el$3 = _el$2.firstChild;
7749
7762
  _el$.$$click = e => onClick(e.currentTarget, color);
7750
7763
  $z0IcO$solidjsweb.effect(_p$ => {
7751
- const _v$ = color.label || "",
7764
+ var _v$ = color.label || "",
7752
7765
  _v$2 = `border-color: ${color.value};`,
7753
7766
  _v$3 = `background-color: ${color.value};`;
7754
- _v$ !== _p$._v$ && $z0IcO$solidjsweb.setAttribute(_el$, "title", _p$._v$ = _v$);
7755
- _p$._v$2 = $z0IcO$solidjsweb.style(_el$2, _v$2, _p$._v$2);
7756
- _p$._v$3 = $z0IcO$solidjsweb.style(_el$3, _v$3, _p$._v$3);
7767
+ _v$ !== _p$.e && $z0IcO$solidjsweb.setAttribute(_el$, "title", _p$.e = _v$);
7768
+ _p$.t = $z0IcO$solidjsweb.style(_el$2, _v$2, _p$.t);
7769
+ _p$.a = $z0IcO$solidjsweb.style(_el$3, _v$3, _p$.a);
7757
7770
  return _p$;
7758
7771
  }, {
7759
- _v$: undefined,
7760
- _v$2: undefined,
7761
- _v$3: undefined
7772
+ e: undefined,
7773
+ t: undefined,
7774
+ a: undefined
7762
7775
  });
7763
7776
  $z0IcO$solidjsweb.runHydrationEvents();
7764
7777
  return _el$;
@@ -7829,7 +7842,7 @@ function $af92e61c7dfccf01$export$590326cc34f49e2d({
7829
7842
  if (initial_index > -1) setActiveIndex(initial_index);
7830
7843
  if (onlyCircles) return circles;
7831
7844
  return (() => {
7832
- const _el$4 = $z0IcO$solidjsweb.getNextElement($af92e61c7dfccf01$var$_tmpl$2);
7845
+ var _el$4 = $z0IcO$solidjsweb.getNextElement($af92e61c7dfccf01$var$_tmpl$2);
7833
7846
  $z0IcO$solidjsweb.insert(_el$4, circles);
7834
7847
  return _el$4;
7835
7848
  })();
@@ -7837,7 +7850,7 @@ function $af92e61c7dfccf01$export$590326cc34f49e2d({
7837
7850
  };
7838
7851
  }
7839
7852
  $z0IcO$solidjsweb.delegateEvents(["click"]);
7840
- const $b25f388f0fe2f1b3$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div>`),
7853
+ var $b25f388f0fe2f1b3$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div>`),
7841
7854
  $b25f388f0fe2f1b3$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div style=overflow:hidden;height:0px;visibility:hidden aria-hidden=true>`);
7842
7855
  const $b25f388f0fe2f1b3$export$237455ad7e59d4e5 = ({
7843
7856
  duration = 500,
@@ -7863,12 +7876,12 @@ const $b25f388f0fe2f1b3$export$237455ad7e59d4e5 = ({
7863
7876
  }) => {
7864
7877
  if (Array.isArray(children) && children.length === 1) children = children[0];
7865
7878
  innerRef = (() => {
7866
- const _el$ = $z0IcO$solidjsweb.getNextElement($b25f388f0fe2f1b3$var$_tmpl$);
7879
+ var _el$ = $z0IcO$solidjsweb.getNextElement($b25f388f0fe2f1b3$var$_tmpl$);
7867
7880
  $z0IcO$solidjsweb.insert(_el$, children);
7868
7881
  return _el$;
7869
7882
  })();
7870
7883
  outerRef = (() => {
7871
- const _el$2 = $z0IcO$solidjsweb.getNextElement($b25f388f0fe2f1b3$var$_tmpl$2);
7884
+ var _el$2 = $z0IcO$solidjsweb.getNextElement($b25f388f0fe2f1b3$var$_tmpl$2);
7872
7885
  $z0IcO$solidjsweb.insert(_el$2, innerRef);
7873
7886
  return _el$2;
7874
7887
  })();
@@ -7922,7 +7935,7 @@ const $b25f388f0fe2f1b3$export$237455ad7e59d4e5 = ({
7922
7935
  };
7923
7936
  var $aa123ed8001baa5e$exports = {};
7924
7937
  $aa123ed8001baa5e$exports = ".depict-img-cont {\n width: 100%;\n height: 100%;\n position: absolute;\n}\n\n.depict-img-filler {\n width: 100%;\n height: auto;\n display: inline-block;\n}\n\n.depict-img-comp {\n width: auto;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n.depict-img-mod {\n width: 100%;\n height: 100%;\n object-fit: contain;\n position: absolute;\n inset: 0;\n}\n\n";
7925
- const $ff973b2032639b5f$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<img>`),
7938
+ var $ff973b2032639b5f$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<img>`),
7926
7939
  $ff973b2032639b5f$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<source sizes=0px>`),
7927
7940
  $ff973b2032639b5f$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<picture>`);
7928
7941
  const $ff973b2032639b5f$export$3d13beba9b52c947 = "https://img.depict.ai/ResizeImage" + (process.env.TENANT ? "/" + process.env.TENANT : "");
@@ -8003,7 +8016,7 @@ function $ff973b2032639b5f$export$a62825542f1bfcf5({
8003
8016
  $e6c6e7929ea385ae$export$de56f1198d121036(image_options, () => {}); // noop function is to allow to get here quickly by "jump to function definition"
8004
8017
  $548fd58b14b25a52$export$8048b892d651b310(new Error("no image src provided: " + src));
8005
8018
  return (() => {
8006
- const _el$ = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$);
8019
+ var _el$ = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$);
8007
8020
  $z0IcO$solidjsweb.spread(_el$, image_options, false, false);
8008
8021
  $z0IcO$solidjsweb.runHydrationEvents();
8009
8022
  return _el$;
@@ -8017,7 +8030,7 @@ function $ff973b2032639b5f$export$a62825542f1bfcf5({
8017
8030
  const format = formats[i];
8018
8031
  const srcset = $ff973b2032639b5f$var$make_srcset(src, format, resolutions);
8019
8032
  sources.push((() => {
8020
- const _el$2 = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$2);
8033
+ var _el$2 = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$2);
8021
8034
  $z0IcO$solidjsweb.setAttribute(_el$2, "type", `image/${format}`);
8022
8035
  $z0IcO$solidjsweb.spread(_el$2, set_dataset ? {
8023
8036
  "data-srcset": srcset
@@ -8034,7 +8047,7 @@ function $ff973b2032639b5f$export$a62825542f1bfcf5({
8034
8047
  delete opts_without_src["src"];
8035
8048
  delete opts_without_src["srcset"];
8036
8049
  const the_image = (() => {
8037
- const _el$3 = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$);
8050
+ var _el$3 = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$);
8038
8051
  $z0IcO$solidjsweb.spread(_el$3, opts_without_src, false, false);
8039
8052
  $z0IcO$solidjsweb.runHydrationEvents();
8040
8053
  return _el$3;
@@ -8046,7 +8059,7 @@ function $ff973b2032639b5f$export$a62825542f1bfcf5({
8046
8059
  for (let i = 0; i < sources.length; i++) sizes_setter_(sources[i]).catch((0, $548fd58b14b25a52$export$8048b892d651b310));
8047
8060
  // embed all sources into a <picture> so that the browser understands they're "together"
8048
8061
  const picture = (() => {
8049
- const _el$4 = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$3);
8062
+ var _el$4 = $z0IcO$solidjsweb.getNextElement($ff973b2032639b5f$var$_tmpl$3);
8050
8063
  $z0IcO$solidjsweb.insert(_el$4, sources);
8051
8064
  return _el$4;
8052
8065
  })();
@@ -8078,7 +8091,7 @@ function $ff973b2032639b5f$var$optimized_img_url_generator(format, url, width) {
8078
8091
  // using make_url_with_query_params takes ~100ms on CDON with 2 surfaces and hover images, we can't afford that when it could be essentially free
8079
8092
  return `${$ff973b2032639b5f$export$3d13beba9b52c947}?format=${format}&url=${encodeURIComponent(url)}&width=${width}`;
8080
8093
  }
8081
- const $a312bccd722ac9e4$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div>`),
8094
+ var $a312bccd722ac9e4$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div>`),
8082
8095
  $a312bccd722ac9e4$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<canvas class=depict-img-filler height=3000>`),
8083
8096
  $a312bccd722ac9e4$var$_tmpl$3 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div style=position:relative><div class=depict-img-cont></div><!$><!/>`);
8084
8097
  const $a312bccd722ac9e4$var$rendering_options_to_sourceset_component = /*@__PURE__*/new WeakMap();
@@ -8110,7 +8123,7 @@ function $a312bccd722ac9e4$var$Image({
8110
8123
  ...image_options
8111
8124
  }) {
8112
8125
  const div = (() => {
8113
- const _el$ = $z0IcO$solidjsweb.getNextElement($a312bccd722ac9e4$var$_tmpl$);
8126
+ var _el$ = $z0IcO$solidjsweb.getNextElement($a312bccd722ac9e4$var$_tmpl$);
8114
8127
  $z0IcO$solidjsweb.effect(_$p => $z0IcO$solidjsweb.style(_el$, `position:relative;width:100%;padding-bottom:${1 / aspect_ratio * 100}%`, _$p));
8115
8128
  return _el$;
8116
8129
  })();
@@ -8136,14 +8149,14 @@ function $a312bccd722ac9e4$var$CompatibleImage({
8136
8149
  ...image_options
8137
8150
  }) {
8138
8151
  const canvas = (() => {
8139
- const _el$2 = $z0IcO$solidjsweb.getNextElement($a312bccd722ac9e4$var$_tmpl$2);
8152
+ var _el$2 = $z0IcO$solidjsweb.getNextElement($a312bccd722ac9e4$var$_tmpl$2);
8140
8153
  $z0IcO$solidjsweb.setAttribute(_el$2, "width", 3000 * aspect_ratio);
8141
8154
  return _el$2;
8142
8155
  })();
8143
8156
  const sourceset_component = $a312bccd722ac9e4$var$srcset_comp_from_map_or_new(rendering_options, srcset_opts, canvas);
8144
8157
  const IMG_tag = image_options.src?.startsWith("data:") || !sourceset_component ? "img" : sourceset_component;
8145
8158
  return (() => {
8146
- const _el$3 = $z0IcO$solidjsweb.getNextElement($a312bccd722ac9e4$var$_tmpl$3),
8159
+ var _el$3 = $z0IcO$solidjsweb.getNextElement($a312bccd722ac9e4$var$_tmpl$3),
8147
8160
  _el$4 = _el$3.firstChild,
8148
8161
  _el$5 = _el$4.nextSibling,
8149
8162
  [_el$6, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$5.nextSibling);
@@ -8177,7 +8190,7 @@ function $a312bccd722ac9e4$var$srcset_comp_from_map_or_new(rendering_options, sr
8177
8190
  }
8178
8191
  var $db57c943efeaebed$exports = {};
8179
8192
  $db57c943efeaebed$exports = ".depict .images-container {\n position: relative;\n}\n\n.depict .second-image-container {\n width: 100%;\n opacity: 0;\n position: absolute;\n top: 0;\n}\n\n.depict .hovering .main-image-container {\n opacity: 0;\n}\n\n.depict .hovering .second-image-container {\n opacity: 1;\n}\n\n";
8180
- const $a656daa2fa8c279a$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=images-container><!$><!/><div class=main-image-container>`),
8193
+ var $a656daa2fa8c279a$var$_tmpl$ = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=images-container><!$><!/><div class=main-image-container>`),
8181
8194
  $a656daa2fa8c279a$var$_tmpl$2 = /*#__PURE__*/$z0IcO$solidjsweb.template(`<div class=second-image-container>`);
8182
8195
  // Saving bytez
8183
8196
  // Maybe? @Daniel
@@ -8319,12 +8332,12 @@ const $a656daa2fa8c279a$export$2369f6fc1c911576 = ({
8319
8332
  });
8320
8333
  const no_second_img = !second_src && !second_srcset && !second_srcset_opts;
8321
8334
  const images_container = (() => {
8322
- const _el$ = $z0IcO$solidjsweb.getNextElement($a656daa2fa8c279a$var$_tmpl$),
8335
+ var _el$ = $z0IcO$solidjsweb.getNextElement($a656daa2fa8c279a$var$_tmpl$),
8323
8336
  _el$3 = _el$.firstChild,
8324
8337
  [_el$4, _co$] = $z0IcO$solidjsweb.getNextMarker(_el$3.nextSibling),
8325
8338
  _el$2 = _el$4.nextSibling;
8326
8339
  $z0IcO$solidjsweb.insert(_el$, !no_second_img && (() => {
8327
- const _el$5 = $z0IcO$solidjsweb.getNextElement($a656daa2fa8c279a$var$_tmpl$2);
8340
+ var _el$5 = $z0IcO$solidjsweb.getNextElement($a656daa2fa8c279a$var$_tmpl$2);
8328
8341
  $z0IcO$solidjsweb.insert(_el$5, second_image);
8329
8342
  return _el$5;
8330
8343
  })(), _el$4, _co$);
package/latest/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JSX, Accessor } from "solid-js";
2
- export const version = "2.0.10";
2
+ export const version = "2.0.14";
3
3
  export const is_debug: boolean;
4
4
  /**
5
5
  * Sets the prefix of dlog, dwarn, and derror messages in the browser console. Defaults to `[Depict]`.
@@ -21,6 +21,11 @@ export function add_to_version_info(package_name: string, version: string): void
21
21
  * @returns the same type as the input but with added query params
22
22
  */
23
23
  export function add_version_query_params<T extends string | URL>(url: T): T;
24
+ /**
25
+ * Finds most frequent item in an array, written by chatGPT with some nudging. Returns `undefined` if the array is empty.
26
+ * @param arr array to find the most frequent item in
27
+ */
28
+ export function findMostFrequentItem<T>(arr: T[]): T | undefined;
24
29
  /**
25
30
  * Encoding UTF8 ⇢ base64
26
31
  */